@rslsp1/fa-app-tools 2.0.78 → 2.0.82

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/dist/index.mjs CHANGED
@@ -1,3 +1,8 @@
1
+ import {
2
+ SzenenView,
3
+ createFlowSzenenViewPort
4
+ } from "./chunk-GEGJD43Y.mjs";
5
+ import "./chunk-FUY2OCVC.mjs";
1
6
  import {
2
7
  exportProjectToZip,
3
8
  importProjectFromZip,
@@ -22,10 +27,10 @@ import {
22
27
  setHFToken,
23
28
  tsFromEventPath,
24
29
  writeHFEvent
25
- } from "./chunk-BYD4RMYM.mjs";
30
+ } from "./chunk-VBWQP7PO.mjs";
26
31
 
27
32
  // package.json
28
- var version = "2.0.78";
33
+ var version = "2.0.82";
29
34
 
30
35
  // src/hooks/useOnClickOutside.ts
31
36
  import { useEffect } from "react";
@@ -63,6 +68,9 @@ function useKeyboardNavigation(history, currentResult, setCurrentResult) {
63
68
  }, [currentResult, history, setCurrentResult]);
64
69
  }
65
70
 
71
+ // src/features/szenen/szenenViewStyles.generated.ts
72
+ var SZENEN_VIEW_STYLES = '/* ==========================================================================\n SZENEN VIEW\n ========================================================================== */\n\n.szenen-view {\n display: grid;\n gap: var(--space-md);\n width: 100%;\n min-width: 0;\n font-family: var(--font-sans);\n padding: var(--space-md);\n}\n\n@media (max-width: 760px) {\n .szenen-view {\n padding: var(--space-sm);\n gap: var(--space-sm);\n }\n}\n\n.szenen-view__intro {\n display: flex;\n align-items: end;\n justify-content: space-between;\n gap: var(--space-md);\n padding: clamp(1rem, 3vw, 1.75rem);\n color: var(--color-text-primary);\n background:\n radial-gradient(circle at 85% 15%, rgba(45, 212, 191, 0.16), transparent 34%),\n linear-gradient(135deg, var(--color-bg-surface), var(--color-bg-elevated));\n border: 1px solid var(--color-border);\n border-radius: var(--radius-lg);\n}\n\n.szenen-view__intro h2,\n.szenen-view__intro p {\n margin: 0;\n}\n\n.szenen-view__intro h2 {\n margin-bottom: var(--space-xs);\n font-size: clamp(1.25rem, 4vw, 2rem);\n}\n\n.szenen-view__intro > div > p:last-child {\n max-width: 44rem;\n color: var(--color-text-secondary);\n}\n\n.szenen-view__eyebrow {\n margin-bottom: var(--space-xs) !important;\n color: var(--color-accent-teal, #2dd4bf);\n font-size: 0.72rem;\n font-weight: 800;\n letter-spacing: 0.12em;\n text-transform: uppercase;\n}\n\n.szenen-view__step {\n flex: none;\n padding: 0.35rem 0.65rem;\n color: var(--color-text-primary);\n background: rgba(45, 212, 191, 0.12);\n border: 1px solid rgba(45, 212, 191, 0.35);\n border-radius: var(--radius-full);\n font-size: 0.78rem;\n font-weight: 700;\n}\n\n.szenen-view__nav {\n display: flex;\n flex-wrap: wrap;\n gap: var(--space-sm);\n padding: var(--space-sm);\n background: var(--color-bg-surface);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-md);\n}\n\n.szenen-view__nav button,\n.szenen-view button {\n min-height: 2.25rem;\n padding: 0.45rem 0.75rem;\n color: var(--color-text-secondary);\n background: var(--color-bg-elevated);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-sm);\n cursor: pointer;\n}\n\n.szenen-view button:hover:not(:disabled) {\n color: var(--color-text-primary);\n background: var(--color-bg-surface-hover);\n border-color: var(--color-border-hover);\n}\n\n.szenen-view button:focus-visible,\n.szenen-view input:focus-visible,\n.szenen-view select:focus-visible,\n.szenen-view textarea:focus-visible {\n outline: 2px solid var(--color-accent-blue);\n outline-offset: 2px;\n}\n\n.szenen-view button:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.szenen-view__nav button.is-active,\n.szenen-view__nav button[aria-selected="true"] {\n color: var(--color-text-primary);\n background: var(--color-accent-blue-dim);\n border-color: var(--color-accent-blue);\n}\n\n.szenen-view__area {\n min-width: 0;\n padding: 0;\n background: transparent;\n border: none;\n border-radius: 0;\n}\n\n.szenen-view__capability-note,\n.szenen-area__lead {\n margin: 0;\n padding: var(--space-sm) var(--space-md);\n color: var(--color-text-secondary);\n background: var(--color-bg-surface);\n border-left: 3px solid var(--color-accent-purple);\n border-radius: var(--radius-sm);\n}\n\n.szenen-view__host-notes {\n color: var(--color-text-secondary);\n}\n\n.szenen-view__host-notes > summary {\n cursor: pointer;\n font-size: 0.8rem;\n}\n\n.szenen-view input:not([type="checkbox"]),\n.szenen-view select,\n.szenen-view textarea {\n width: 100%;\n min-height: 2.25rem;\n padding: 0.5rem 0.65rem;\n color: var(--color-text-primary);\n background: var(--color-bg-app);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-sm);\n font: inherit;\n}\n\n.szenen-view textarea {\n min-height: 7rem;\n resize: vertical;\n font-family: var(--font-mono);\n font-size: 0.8rem;\n}\n\n.szenen-view label {\n display: grid;\n gap: var(--space-xs);\n color: var(--color-text-secondary);\n font-size: 0.85rem;\n}\n\n.szenen-view code,\n.szenen-view pre {\n font-family: var(--font-mono);\n overflow-wrap: anywhere;\n}\n\n.szenen-view h3,\n.szenen-view h4,\n.szenen-view h5 {\n margin-top: 0;\n}\n\n.szenen-view ul,\n.szenen-view ol {\n padding-left: 1.25rem;\n}\n\n.szenen-elements,\n.szenen-detail,\n.szenen-scene,\n.szenen-setup,\n.szenen-shot,\n.szenen-media,\n.szenen-runs {\n display: grid;\n gap: var(--space-md);\n min-width: 0;\n}\n\n.szenen-elements__filter,\n.szenen-elements__create,\n.szenen-detail__actions,\n.szenen-runs__start,\n.szenen-scene-editor__add,\n.szenen-scene-editor__add-relation {\n display: flex;\n flex-wrap: wrap;\n align-items: end;\n gap: var(--space-sm);\n}\n\n.szenen-elements__filter > label,\n.szenen-elements__create > input,\n.szenen-runs__start > label,\n.szenen-scene-editor__add > input {\n flex: 1 1 16rem;\n}\n\n.szenen-elements__filter > label:has(input[type="checkbox"]) {\n display: flex;\n flex: 1 1 16rem;\n flex-direction: row;\n align-items: center;\n}\n\n.szenen-elements__filter input[type="checkbox"] {\n width: 1rem;\n height: 1rem;\n accent-color: var(--color-accent-blue);\n}\n\n.szenen-elements__list {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));\n gap: var(--space-sm);\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\n.szenen-elements__list > li > button {\n display: grid;\n grid-template-columns: auto 1fr;\n gap: var(--space-xs) var(--space-sm);\n width: 100%;\n height: 100%;\n text-align: left;\n}\n\n.szenen-elements__list > li > button.is-selected,\n.szenen-elements__list > li > button[aria-current="true"] {\n background: var(--color-accent-blue-dim);\n border-color: var(--color-accent-blue);\n}\n\n.szenen-elements__type {\n color: var(--color-accent-blue);\n font-size: 0.75rem;\n font-weight: 700;\n text-transform: uppercase;\n}\n\n.szenen-elements__title {\n color: var(--color-text-primary);\n font-size: 0.95rem;\n}\n\n.szenen-elements__technical {\n grid-column: 1 / -1;\n color: var(--color-text-tertiary);\n font-size: 0.72rem;\n}\n\n.szenen-elements__subtype,\n.szenen-elements__retired {\n color: var(--color-text-secondary);\n font-size: 0.75rem;\n}\n\n.szenen-elements__retired {\n color: var(--color-warning);\n}\n\n.szenen-elements__id {\n grid-column: 1 / -1;\n color: var(--color-text-tertiary);\n font-size: 0.72rem;\n}\n\n.szenen-detail {\n margin-top: 0;\n padding: 0;\n background: transparent;\n border: none;\n border-radius: 0;\n}\n\n@media (min-width: 761px) {\n .szenen-detail {\n padding: var(--space-md);\n background: var(--color-bg-surface);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-sm);\n }\n}\n\n.szenen-detail > header,\n.szenen-detail__heads,\n.szenen-detail__draft,\n.szenen-capability {\n padding: 0;\n background: transparent;\n border: none;\n border-radius: 0;\n}\n\n/* .szenen-runs ist ein eigenst\xE4ndiger sichtbarer Bereich, beh\xE4lt Styling auf Desktop */\n@media (min-width: 761px) {\n .szenen-runs {\n padding: var(--space-md);\n background: var(--color-bg-surface);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-md);\n }\n}\n\n@media (max-width: 760px) {\n .szenen-runs {\n padding: 0;\n background: transparent;\n border: none;\n border-radius: 0;\n }\n}\n\n.szenen-detail__ids {\n display: flex;\n flex-wrap: wrap;\n gap: var(--space-sm);\n margin-bottom: 0;\n color: var(--color-text-secondary);\n}\n\n.szenen-detail__heads ul,\n.szenen-scene-editor ul,\n.szenen-runs > ol,\n.szenen-capability > ul {\n display: grid;\n gap: var(--space-sm);\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\n.szenen-detail__heads li,\n.szenen-scene-editor li,\n.szenen-runs > ol > li,\n.szenen-capability > ul > li {\n padding: var(--space-sm);\n background: var(--color-bg-surface);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-sm);\n}\n\n.szenen-detail__field {\n margin-bottom: var(--space-md);\n}\n\n/* Stufe 6.7.2 (D-126) \u2014 Advanced-/Debug-Fl\xE4che f\xFCr die rohe, schema-getriebene\n * Feldliste einer Szene. Gestrichelt wie die anderen \u201EAngebot statt\n * Auskunft"-Bereiche, aber ohne Akzentfarbe: sie ist kein Vorschlag, sondern\n * ein Eskalationsweg. */\n.szenen-detail__technical {\n margin-top: var(--space-md);\n padding: var(--space-sm) var(--space-md) var(--space-md);\n border: 1px dashed var(--color-border);\n border-radius: var(--radius-sm);\n}\n\n.szenen-detail__technical > summary {\n margin-bottom: var(--space-sm);\n color: var(--color-text-secondary);\n font-weight: 600;\n cursor: pointer;\n}\n\n.szenen-detail__technical[open] > summary {\n margin-bottom: var(--space-md);\n}\n\n.szenen-detail__field small,\n.szenen-capability small {\n color: var(--color-text-tertiary);\n}\n\n.szenen-detail__preview-errors,\n.szenen-detail__notice--error,\n.szenen-view [role="alert"] {\n color: #fecaca;\n background: var(--color-accent-red-dim);\n border-color: var(--color-accent-red);\n}\n\n.szenen-detail__notice {\n padding: var(--space-sm) var(--space-md);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-sm);\n}\n\n.szenen-detail__notice--success,\n.szenen-view [data-tone="success"] {\n color: #bbf7d0;\n background: var(--color-accent-green-dim);\n border-color: var(--color-accent-green);\n}\n\n.szenen-scene-editor {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: var(--space-md);\n margin-bottom: 0;\n}\n\n.szenen-scene-editor > section {\n min-width: 0;\n padding: 0;\n background: transparent;\n border: none;\n border-radius: 0;\n}\n\n/* \u2500\u2500 Stufe 6.7.2 (D-126): Node-/Relationskarten \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n *\n * Nodes und Beziehungen sind `<details>` \u2014 dieselbe Interaktionssprache wie\n * \u201ERohantwort (Diagnose)" und \u201EBilder zu diesem Lauf" in RunsPanel.tsx. Kopf\n * (immer sichtbar) tr\xE4gt Inhalt zuerst, Technik zuletzt; Body (nur bei\n * ge\xF6ffneter Karte) tr\xE4gt die Bearbeitungscontrols. Padding wandert von der\n * `<li>` in Kopf/Body, damit die Karte keinen doppelten Rand bekommt. */\n.szenen-scene-editor li {\n padding: 0;\n overflow: hidden;\n}\n\n.szenen-node-karte__kopf,\n.szenen-relation-karte__kopf {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--space-xs) var(--space-sm);\n padding: var(--space-sm);\n cursor: pointer;\n list-style: none;\n}\n\n.szenen-node-karte__kopf::-webkit-details-marker,\n.szenen-relation-karte__kopf::-webkit-details-marker {\n display: none;\n}\n\n.szenen-node-karte__titel {\n flex: 1 1 12rem;\n min-width: 0;\n color: var(--color-text-primary);\n font-weight: 600;\n overflow-wrap: anywhere;\n}\n\n.szenen-node-karte__typ {\n flex: none;\n padding: 0.15rem 0.55rem;\n color: var(--color-text-secondary);\n background: var(--color-bg-app);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-full);\n font-size: 0.72rem;\n white-space: nowrap;\n}\n\n/* node_id klein, monospace, sekund\xE4r \u2014 sichtbar auch bei zugeklappter Karte,\n * aber optisch klar hinter Beschreibung und Typ. */\n.szenen-node-karte__meta {\n flex: 1 1 100%;\n display: flex;\n flex-wrap: wrap;\n gap: 0.25rem;\n color: var(--color-text-tertiary);\n font-size: 0.75rem;\n}\n\n.szenen-node-karte__meta code {\n font-size: inherit;\n}\n\n.szenen-node-karte__body,\n.szenen-relation-karte__body {\n display: grid;\n gap: var(--space-sm);\n padding: var(--space-sm) var(--space-sm) var(--space-sm);\n border-top: 1px solid var(--color-border);\n}\n\n/* \xA74 \u2014 Prim\xE4raktion und destruktive Aktion optisch getrennt: \u201ENode/Beziehung\n * entfernen" bekommt einen eigenen, warnenden Ton statt gleichgewichtig neben\n * der normalen Bearbeitung zu stehen. */\n.szenen-node-karte__entfernen,\n.szenen-relation-karte__entfernen {\n justify-self: start;\n color: #fecaca;\n background: var(--color-accent-red-dim);\n border-color: var(--color-accent-red);\n}\n\n.szenen-relation-karte__kopf {\n font-size: 0.9rem;\n}\n\n.szenen-relation-karte__kopf code {\n overflow-wrap: anywhere;\n}\n\n.szenen-relation-karte__pfeil {\n flex: none;\n color: var(--color-text-secondary);\n}\n\n/* Die Composer-\xD6ffner (\u201E+ Node hinzuf\xFCgen", \u201E+ Beziehung hinzuf\xFCgen") sind\n * Angebote, keine Ausk\xFCnfte \u2014 dasselbe gestrichelte Muster wie beim Folgelauf\n * und der Fehlerrettung (\xA73.3/\xA73.5). */\n.szenen-scene-editor__oeffnen {\n width: 100%;\n border-style: dashed;\n}\n\n.szenen-refpicker {\n display: grid;\n gap: var(--space-sm);\n min-width: 0;\n margin: var(--space-sm) 0;\n padding: var(--space-sm) 0;\n border: none;\n border-radius: 0;\n}\n\n.szenen-refpicker legend {\n padding: 0 var(--space-xs);\n color: var(--color-text-secondary);\n font-weight: 600;\n}\n\n.szenen-capability > ul > li {\n display: grid;\n grid-template-columns: minmax(10rem, 1fr) auto minmax(14rem, 2fr);\n align-items: start;\n gap: var(--space-sm);\n}\n\n.szenen-capability__state {\n padding: 0.1rem 0.5rem;\n border-radius: var(--radius-full);\n font-size: 0.75rem;\n font-weight: 700;\n text-transform: uppercase;\n}\n\n.szenen-capability__state--yes {\n color: #bbf7d0;\n background: var(--color-accent-green-dim);\n}\n\n.szenen-capability__state--no {\n color: #fecaca;\n background: var(--color-accent-red-dim);\n}\n\n.szenen-capability__state--unknown {\n color: #fef08a;\n background: rgba(234, 179, 8, 0.2);\n}\n\n.szenen-runs > ol > li {\n display: grid;\n gap: var(--space-sm);\n}\n\n.szenen-runs > ol > li > header {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--space-sm);\n color: var(--color-text-secondary);\n}\n\n.szenen-runs > ol > li[data-status="succeeded"] {\n border-left: 3px solid var(--color-success);\n}\n\n.szenen-runs > ol > li[data-status="failed"] {\n border-left: 3px solid var(--color-danger);\n}\n\n.szenen-runs details pre {\n max-height: 20rem;\n overflow: auto;\n padding: var(--space-sm);\n white-space: pre-wrap;\n color: var(--color-text-secondary);\n background: var(--color-bg-app);\n border-radius: var(--radius-sm);\n}\n\n.szenen-media > section {\n display: grid;\n gap: var(--space-sm);\n padding: 0;\n background: transparent;\n border: none;\n border-radius: 0;\n}\n\n.szenen-media__lookup,\n.szenen-media__attach {\n display: flex;\n flex-wrap: wrap;\n align-items: end;\n gap: var(--space-sm);\n}\n\n.szenen-media__lookup > label,\n.szenen-media__attach > label:first-child {\n flex: 1 1 18rem;\n}\n\n.szenen-media__list {\n display: grid;\n gap: var(--space-sm);\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\n.szenen-media__list > li {\n display: grid;\n grid-template-columns: minmax(12rem, 1fr) auto auto auto;\n align-items: center;\n gap: var(--space-sm);\n padding: var(--space-sm);\n background: var(--color-bg-app);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-sm);\n}\n@media (max-width: 760px) {\n .szenen-view {\n gap: var(--space-sm);\n }\n\n .szenen-view__intro {\n align-items: start;\n flex-direction: column;\n gap: var(--space-sm);\n padding: var(--space-md);\n }\n\n .szenen-view__intro h2 {\n font-size: 1.25rem;\n }\n\n .szenen-view__intro > div > p:last-child {\n font-size: 0.9rem;\n }\n\n .szenen-view__nav {\n position: sticky;\n top: 0;\n z-index: 2;\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: var(--space-xs);\n padding: var(--space-xs);\n }\n\n .szenen-view__nav button {\n width: 100%;\n min-width: 0;\n min-height: 2.5rem;\n padding: 0.35rem 0.5rem;\n }\n\n\n .szenen-scene-editor {\n grid-template-columns: 1fr;\n }\n\n .szenen-capability > ul > li {\n grid-template-columns: 1fr;\n }\n\n .szenen-derive,\n .szenen-elements,\n .szenen-scene,\n .szenen-setup,\n .szenen-shot,\n .szenen-media,\n .szenen-runs {\n gap: var(--space-sm);\n }\n\n .szenen-elements__filter,\n .szenen-elements__create {\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto;\n align-items: center;\n gap: var(--space-sm);\n }\n\n .szenen-elements__filter > label,\n .szenen-elements__create > input {\n width: 100%;\n min-width: 0;\n flex: none;\n }\n\n .szenen-elements__filter > label:first-child,\n .szenen-elements__create > input {\n grid-column: 1 / -1;\n }\n\n .szenen-elements__filter > label:has(input[type="checkbox"]) {\n flex: none;\n }\n\n .szenen-detail__actions,\n .szenen-runs__start,\n .szenen-scene-editor__add,\n .szenen-scene-editor__add-relation {\n align-items: stretch;\n flex-direction: column;\n }\n\n .szenen-runs__start > *,\n .szenen-scene-editor__add > *,\n .szenen-scene-editor__add-relation > * {\n width: 100%;\n flex: none;\n }\n}\n\n/* \u2500\u2500 Stufe 6.5: Rekonstruktion \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n *\n * Der Bereich zeigt drei Dinge nebeneinander: den Vorschlag, das nicht\n * Ableitbare und die Widerspr\xFCche. Die Diagnosen sind deshalb bewusst nicht\n * kleiner gesetzt als der Vorschlag \u2014 wer sie \xFCbersieht, \xFCbernimmt Geratenes.\n */\n\n.szenen-derive {\n display: grid;\n gap: var(--space-md);\n}\n\n.szenen-form {\n display: grid;\n gap: var(--space-sm);\n padding: 0;\n background: transparent;\n border: none;\n border-radius: 0;\n}\n\n.szenen-field {\n display: grid;\n gap: var(--space-xs);\n}\n\n.szenen-field > span {\n color: var(--color-text-secondary);\n font-size: 0.875rem;\n}\n\n.szenen-error {\n padding: var(--space-sm) var(--space-md);\n color: var(--color-danger);\n background: var(--color-accent-red-dim);\n border: 1px solid var(--color-accent-red);\n border-radius: var(--radius-sm);\n}\n\n.szenen-empty {\n padding: var(--space-md);\n color: var(--color-text-secondary);\n background: var(--color-bg-surface);\n border: 1px dashed var(--color-border);\n border-radius: var(--radius-md);\n}\n\n.szenen-diagnose {\n padding: var(--space-md);\n background: var(--color-bg-surface);\n border: 1px solid var(--color-border);\n border-left: 3px solid var(--color-warning);\n border-radius: var(--radius-sm);\n}\n\n/* Ein Widerspruch ist der schwerste der drei Befunde: dort steht eine\n * Entscheidung aus, die das System bewusst nicht getroffen hat (D-74). */\n.szenen-diagnose--konflikt {\n border-left-color: var(--color-danger);\n}\n\n.szenen-diagnose > h4 {\n margin: 0 0 var(--space-sm);\n font-size: 0.9375rem;\n}\n\n.szenen-diagnose ul {\n display: grid;\n gap: var(--space-xs);\n margin: 0;\n padding-left: var(--space-md);\n}\n\n.szenen-proposal {\n padding: var(--space-md);\n background: var(--color-bg-surface);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-md);\n}\n\n.szenen-proposal > h4 {\n margin: 0 0 var(--space-sm);\n font-family: var(--font-mono);\n font-size: 0.9375rem;\n}\n\n.szenen-proposal__payload {\n max-height: 18rem;\n margin: 0 0 var(--space-sm);\n padding: var(--space-sm);\n overflow: auto;\n /* Ein erzeugter Prompt ist ein einziger langer Satz \u2014 ohne Umbruch\n verschwindet er nach rechts aus dem Bild. JSON-Payloads bringen ihre\n eigenen Zeilenumbrueche mit und leiden nicht darunter. */\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n font-family: var(--font-mono);\n font-size: 0.8125rem;\n background: var(--color-bg-app);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-sm);\n}\n\n.szenen-proposal__done {\n margin: var(--space-sm) 0 0;\n color: var(--color-success);\n}\n\n/* Die Belege eines Laufs: Rohantwort und Systemprompt. Zum Lesen und Kopieren,\n nicht zum Bedienen \u2014 deshalb voll markierbar und in Monospace. */\n.szenen-beleg__text {\n width: 100%;\n margin: var(--space-sm) 0 0;\n padding: var(--space-sm);\n font-family: var(--font-mono);\n font-size: 0.8125rem;\n line-height: 1.5;\n white-space: pre;\n background: var(--color-bg-app);\n color: var(--color-text);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-sm);\n resize: vertical;\n}\n\n/* Der Folgelauf (D-87): abgesetzt, damit er nicht wie Teil des Ergebnisses\n aussieht \u2014 er ist eine Frage, keine Auskunft. */\n.szenen-folgelauf {\n margin-top: var(--space-md);\n padding: var(--space-sm) var(--space-md) var(--space-md);\n border: 1px dashed var(--color-border);\n border-radius: var(--radius-sm);\n}\n\n.szenen-folgelauf > h4 {\n margin: var(--space-sm) 0 0;\n}\n\n.szenen-run__herkunft {\n margin: 0 0 var(--space-sm);\n font-size: 0.875rem;\n color: var(--color-text-muted, inherit);\n}\n\n/* Widerspricht das Modell, ist das das Wichtigste auf der Seite. */\n.szenen-diagnose--antwort {\n border-left: 3px solid var(--color-accent, var(--color-border));\n}\n\n/* Der Bildw\xE4hler (D-92) \u2014 Kacheln wie in den Labs, aber mit dem CSS dieser\n Ansicht: eine gemeinsame Komponente \xFCber zwei Dom\xE4nengrenzen w\xE4re eine\n Kopplung, die keiner gewollt hat. */\n.szenen-bildwahl__liste {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));\n gap: var(--space-sm);\n margin: var(--space-sm) 0 0;\n padding: 0;\n list-style: none;\n}\n\n.szenen-bildwahl__liste button {\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n width: 100%;\n padding: var(--space-sm);\n text-align: left;\n font-size: 0.8125rem;\n}\n\n.szenen-bildwahl__liste img {\n width: 100%;\n aspect-ratio: 1;\n object-fit: cover;\n border-radius: var(--radius-sm);\n}\n\n.szenen-bildwahl__gewaehlt {\n display: flex;\n flex-wrap: wrap;\n gap: var(--space-sm);\n margin: var(--space-sm) 0 0;\n padding: 0;\n list-style: none;\n}\n\n.szenen-bildwahl__gewaehlt li {\n display: flex;\n align-items: center;\n gap: 0.375rem;\n padding: 0.25rem 0.5rem;\n font-size: 0.8125rem;\n background: var(--color-bg-app);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-sm);\n}\n\n.szenen-beleg__kopf {\n display: flex;\n align-items: center;\n gap: var(--space-sm);\n margin-top: var(--space-sm);\n}\n\n.szenen-diagnose > details + details {\n margin-top: var(--space-sm);\n}\n\n.szenen-diagnose > details > summary {\n cursor: pointer;\n font-weight: 600;\n}\n\n/* \u2500\u2500 Die Fehlerrettung (Stufe 6.6, A5) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n *\n * Sie steht im Fehlerblock und muss trotzdem als Werkzeug lesbar sein, nicht\n * als weitere Fehlermeldung. Deshalb abgesetzt wie der Folgelauf \u2014 und aus\n * demselben Grund: Beides sind Angebote, keine Ausk\xFCnfte.\n *\n * Der wichtigste optische Punkt ist die Trennung von Original und\n * Arbeitskopie. Das Original bekommt den ruhigen, \u201Efesten" Hintergrund der\n * Belege; die Kopie sieht aus wie ein normales Eingabefeld, weil sie eines\n * ist. */\n.szenen-rettung {\n margin-top: var(--space-md);\n padding: var(--space-sm) var(--space-md) var(--space-md);\n border: 1px dashed var(--color-border);\n border-radius: var(--radius-sm);\n}\n\n.szenen-rettung > h4 {\n margin: var(--space-sm) 0 0;\n}\n\n.szenen-rettung textarea[readonly] {\n background: var(--color-bg-surface);\n color: var(--color-text-secondary);\n font-family: var(--font-mono, monospace);\n font-size: 0.8125rem;\n}\n\n.szenen-rettung textarea:not([readonly]) {\n font-family: var(--font-mono, monospace);\n font-size: 0.8125rem;\n}\n\n.szenen-rettung__aktionen {\n display: flex;\n flex-wrap: wrap;\n gap: var(--space-sm);\n margin: var(--space-sm) 0;\n}\n\n/* Ein Befund tr\xE4gt Code, Bezug und Meldung. Der Code steht klein und\n * monospaced davor: Er ist die Kennung, nicht die Aussage. */\n.szenen-diagnose__liste {\n display: grid;\n gap: var(--space-sm);\n margin: 0;\n padding-left: var(--space-md);\n}\n\n.szenen-diagnose__liste code {\n font-size: 0.8125rem;\n}\n\n.szenen-diagnose__liste > li[data-severity=\'warning\'] {\n color: var(--color-text-secondary);\n}\n\n/* \u2500\u2500 Die Draft-Kette (Stufe 6.6, C4) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n *\n * Der Hauptweg. Er steht nach den Einzel\xFCbernahmen und muss als das erkennbar\n * sein, was er ist: nicht eine weitere Option, sondern der k\xFCrzere Weg zum\n * selben Ziel. Deshalb durchgezogener Rahmen statt gestricheltem \u2014 er ist\n * Angebot **und** Empfehlung. */\n.szenen-kette {\n margin-top: var(--space-md);\n padding: var(--space-sm) var(--space-md) var(--space-md);\n background: var(--color-bg-surface);\n border: 1px solid var(--color-border);\n border-left: 3px solid var(--color-accent, var(--color-border));\n border-radius: var(--radius-sm);\n}\n\n.szenen-kette > h4 {\n margin: var(--space-sm) 0 0;\n}\n\n.szenen-kette ul {\n display: grid;\n gap: var(--space-xs);\n margin: 0 0 var(--space-sm);\n padding-left: var(--space-md);\n}\n\n.szenen-kette code {\n font-size: 0.8125rem;\n}\n\n/* Ein Hinweis, der eine Bedingung erklaert \u2014 nicht rot, weil er kein Fehler\n ist, aber abgesetzt, weil er eine Folge hat. */\n.szenen-detail__hint {\n margin: var(--space-sm) 0 0;\n padding: var(--space-sm);\n font-size: 0.875rem;\n color: var(--color-text-secondary);\n background: var(--color-bg-surface);\n border-left: 3px solid var(--color-border);\n border-radius: var(--radius-sm);\n}\n\n/* \u2500\u2500 Stufe 6.7: Bilder am Prompt-Lauf (H0/H1) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n *\n * Der Bereich tr\xE4gt zwei Dinge, die man nie verwechseln darf: den **Eingang**\n * (woraus der Prompt entstand) und den **Ausgang** (was daraus wurde). Sie\n * bekommen deshalb verschiedene Akzentkanten statt nur verschiedener\n * \xDCberschriften \u2014 wer schnell liest, sieht die Trennung, bevor er sie liest.\n */\n.szenen-bilder {\n display: grid;\n gap: var(--space-md);\n margin-top: var(--space-sm);\n}\n\n.szenen-bilder__eingang,\n.szenen-bilder__ausgang {\n display: grid;\n gap: var(--space-sm);\n padding: var(--space-sm) var(--space-md);\n background: var(--color-bg-surface);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-sm);\n}\n\n.szenen-bilder__eingang {\n border-left: 3px solid var(--color-accent-purple, var(--color-border));\n}\n\n.szenen-bilder__ausgang {\n border-left: 3px solid var(--color-accent-teal, var(--color-border));\n}\n\n.szenen-bilder h5 {\n margin: 0;\n}\n\n.szenen-bilder__ids {\n display: flex;\n flex-wrap: wrap;\n gap: var(--space-sm);\n margin: 0;\n align-items: baseline;\n color: var(--color-text-secondary);\n font-size: 0.875rem;\n}\n\n.szenen-bilder__eingangsliste,\n.szenen-bilder__batchliste,\n.szenen-bilder__auftraege {\n display: grid;\n gap: var(--space-sm);\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\n.szenen-bilder__eingangsliste > li,\n.szenen-bilder__batchliste > li,\n.szenen-bilder__auftraege > li {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--space-sm);\n padding: var(--space-sm);\n background: var(--color-bg-app);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-sm);\n font-size: 0.8125rem;\n}\n\n/* Ein unterbrochener Auftrag ist der Fall, f\xFCr den der Auftragssatz existiert.\n Er wird deshalb markiert \u2014 nicht rot, denn er ist kein Fehler, sondern eine\n offene Entscheidung. */\n.szenen-bilder__auftraege > li[data-status="started"] {\n border-left: 3px solid var(--color-warning);\n}\n\n.szenen-bilder__auftraege > li[data-status="succeeded"] {\n border-left: 3px solid var(--color-success);\n}\n\n.szenen-bilder__auftraege > li[data-status="partial"] {\n border-left: 3px solid var(--color-accent-blue, var(--color-border));\n}\n\n.szenen-bilder__auftraege > li[data-status="failed"] {\n border-left: 3px solid var(--color-danger);\n}\n\n.szenen-bilder__eingangsliste img,\n.szenen-bilder__batchliste img {\n width: 4rem;\n height: 4rem;\n object-fit: cover;\n border-radius: var(--radius-sm);\n}\n\n.szenen-bilder__batch {\n display: grid;\n gap: var(--space-sm);\n padding: var(--space-sm);\n background: var(--color-bg-app);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-sm);\n}\n\n/* Die Aktionen stehen abgesetzt: Sie sind Angebote, keine Ausk\xFCnfte \u2014 dasselbe\n Muster wie beim Folgelauf und bei der Fehlerrettung. */\n.szenen-bilder__aktion {\n display: grid;\n gap: var(--space-sm);\n padding: var(--space-sm) var(--space-md) var(--space-md);\n border: 1px dashed var(--color-border);\n border-radius: var(--radius-sm);\n}\n\n.szenen-bilder__aktion > h5 {\n margin: var(--space-sm) 0 0;\n}\n\n.szenen-bilder__aktion ol {\n display: grid;\n gap: var(--space-sm);\n margin: 0;\n padding-left: var(--space-md);\n font-size: 0.8125rem;\n}\n';
73
+
66
74
  // src/lib/utils.ts
67
75
  var getFormattedTimestamp = () => {
68
76
  const d = /* @__PURE__ */ new Date();
@@ -78,7 +86,45 @@ var GLOBAL_STYLES = `
78
86
  .prompt-loading { background: linear-gradient(90deg, rgba(255,255,255,0.02) 25%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.02) 75%); background-size: 200% 100%; animation: prompt-shimmer 2s infinite linear; }
79
87
  @keyframes dropdown-enter { from { opacity: 0; transform: scale(0.95) translateY(-5px); } to { opacity: 1; transform: scale(1) translateY(0); } }
80
88
  .animate-dropdown { animation: dropdown-enter 0.1s ease-out forwards; }
81
- `;
89
+ .flow-szenen-entry { display: grid; gap: 6px; width: 100%; max-width: 280px; text-align: center; }
90
+ .flow-szenen-entry button, .flow-szenen-shell__header button { min-height: 44px; padding: 0 16px; color: #e7e5e4; background: #1d4ed8; border: 1px solid #3b82f6; border-radius: 12px; font: inherit; font-weight: 700; cursor: pointer; }
91
+ .flow-szenen-entry button { display: flex; align-items: center; justify-content: center; gap: 8px; }
92
+ .flow-szenen-entry button:disabled { color: rgba(255,255,255,.3); background: transparent; border-color: rgba(255,255,255,.1); cursor: not-allowed; }
93
+ .flow-szenen-entry small { color: rgba(255,255,255,.35); font-size: 10px; }
94
+ .flow-workspace-picker { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; color: #f5f5f5; background: #050505; overflow: auto; }
95
+ .flow-workspace-picker__card { box-sizing: border-box; display: grid; gap: 16px; width: min(100%, 448px); padding: 24px; background: #171717; border: 1px solid #404040; border-radius: 12px; box-shadow: 0 25px 50px rgba(0,0,0,.55); }
96
+ .flow-workspace-picker__card header { display: grid; gap: 4px; }
97
+ .flow-workspace-picker__card header strong { font-size: 22px; }
98
+ .flow-workspace-picker__card header small, .flow-workspace-picker__choices small { color: #a3a3a3; }
99
+ .flow-workspace-picker__choices { display: grid; gap: 8px; }
100
+ .flow-workspace-picker__choices button { display: flex; justify-content: space-between; align-items: center; min-height: 46px; padding: 10px 12px; color: #f5f5f5; background: #050505; border: 1px solid #404040; border-radius: 8px; font: inherit; cursor: pointer; }
101
+ .flow-workspace-picker__choices button:hover { border-color: #3b82f6; background: #262626; }
102
+ .flow-workspace-picker__back { justify-self: start; padding: 0; color: #a3a3a3; background: transparent; border: 0; font: inherit; cursor: pointer; }
103
+ .flow-workspace-picker__warning { margin: 0; padding: 10px; color: #fbbf24; background: rgba(146,64,14,.2); border: 1px solid rgba(217,119,6,.4); border-radius: 8px; font-size: 12px; }
104
+ .flow-szenen-shell {
105
+ --sz-bg: #0e0e0e; --sz-surface: #171717; --sz-elevated: #262626;
106
+ --sz-border: #404040; --sz-text: #f5f5f5; --sz-muted: #a3a3a3;
107
+ --color-bg-app: #000; --color-bg-surface: #0a0a0a; --color-bg-surface-hover: #171717; --color-bg-elevated: #171717;
108
+ --color-border: #262626; --color-border-hover: #404040;
109
+ --color-text-primary: #fff; --color-text-secondary: #a3a3a3; --color-text-tertiary: #525252;
110
+ --color-accent-blue: #3b82f6; --color-accent-blue-dim: rgba(59,130,246,.2);
111
+ --color-accent-purple: #a855f7; --color-accent-green: #22c55e; --color-accent-green-dim: rgba(34,197,94,.2);
112
+ --color-accent-red: #ef4444; --color-accent-red-dim: rgba(239,68,68,.2);
113
+ --color-success: #22c55e; --color-warning: #eab308; --color-danger: #ef4444;
114
+ --space-xs: .25rem; --space-sm: .5rem; --space-md: 1rem;
115
+ --radius-sm: .25rem; --radius-md: .5rem; --radius-lg: .75rem; --radius-full: 9999px;
116
+ --font-sans: system-ui, -apple-system, sans-serif;
117
+ --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
118
+ position: fixed; inset: 0; display: flex; flex-direction: column;
119
+ color: var(--sz-text); background: var(--sz-bg); overflow: hidden;
120
+ }
121
+ .flow-szenen-shell__header { display: flex; align-items: center; gap: 16px; min-height: 58px; padding: 8px 16px; background: #050505; border-bottom: 1px solid var(--sz-border); }
122
+ .flow-szenen-shell__header button { min-height: 36px; background: var(--sz-elevated); border-color: var(--sz-border); }
123
+ .flow-szenen-shell__header div { display: grid; gap: 2px; }
124
+ .flow-szenen-shell__header small { color: var(--sz-muted); font-family: monospace; }
125
+ .flow-szenen-shell__content { flex: 1; min-height: 0; padding: 16px; overflow: auto; }
126
+ @media (max-width: 760px) { .flow-szenen-shell__content { padding: 8px; } }
127
+ ` + SZENEN_VIEW_STYLES;
82
128
 
83
129
  // src/lib/aiHelpers.ts
84
130
  function buildGenerationPrompt(hierarchyText, mode = "creative") {
@@ -184,13 +230,13 @@ function createFlowServices(Flow) {
184
230
  generateText: async (text, options) => {
185
231
  try {
186
232
  const response = await Flow.generate.text(text, {
187
- thinkingLevel: "low",
233
+ thinkingLevel: options?.thinkingLevel ?? "low",
188
234
  systemInstruction: options?.systemInstruction || "You are an expert prompt engineer. Always return ONLY the generated prompt text, no headers, no quotes, no conversational filler.",
189
235
  images: options?.images
190
236
  });
191
237
  const result = response?.text?.trim() || "";
192
238
  if (!result) throw new Error("Empty AI response");
193
- return cleanAiResponse(result);
239
+ return options?.responseFormat === "json" ? result : cleanAiResponse(result);
194
240
  } catch (err) {
195
241
  throw interpretSdkError(err);
196
242
  }
@@ -603,7 +649,7 @@ function TagBaseSection(props) {
603
649
  className: "w-full bg-black/40 border border-white/10 rounded px-2 py-1.5 text-[11px] text-white outline-none focus:border-white/20",
604
650
  children: [
605
651
  /* @__PURE__ */ jsx7("option", { value: "", children: "\u2014 Context w\xE4hlen \u2014" }),
606
- tagBase.contexts.map((c) => /* @__PURE__ */ jsxs5("option", { value: c.id, children: [
652
+ tagBase.contexts.filter((c) => tagBase.users.find((u) => u.id === selectedUserId)?.context_ids?.includes(c.id)).map((c) => /* @__PURE__ */ jsxs5("option", { value: c.id, children: [
607
653
  c.label || c.name,
608
654
  " (id=",
609
655
  c.id,
@@ -1398,7 +1444,7 @@ function ListView({ nodes, edges, onNodeChange, onAddChild, onDeleteNode, onMove
1398
1444
  }
1399
1445
 
1400
1446
  // src/components/AvatarArchitectApp.tsx
1401
- import { useState as useState24, useCallback as useCallback4, useMemo as useMemo5, useEffect as useEffect10, useRef as useRef11 } from "react";
1447
+ import { useState as useState25, useCallback as useCallback4, useMemo as useMemo6, useEffect as useEffect10, useRef as useRef11 } from "react";
1402
1448
 
1403
1449
  // src/components/PromptTab.tsx
1404
1450
  import { useRef as useRef5, useState as useState8 } from "react";
@@ -2262,7 +2308,7 @@ var ProjectSyncTab = ({
2262
2308
  {
2263
2309
  onClick: async () => {
2264
2310
  try {
2265
- const { hfDownloadProject: hfDownloadProject2 } = await import("./hfStateService-JKEVTY66.mjs");
2311
+ const { hfDownloadProject: hfDownloadProject2 } = await import("./hfStateService-WKQLNDHO.mjs");
2266
2312
  const file = await hfDownloadProject2(p.path, hfToken);
2267
2313
  onHfLoad(file);
2268
2314
  } catch (e) {
@@ -2854,12 +2900,19 @@ function deriveTagBaseWorkspaceTags(tags, contextId, pending = []) {
2854
2900
  }
2855
2901
  function validateTagBaseSelection(base, userId, contextId) {
2856
2902
  if (userId === null || contextId === null) return { valid: false, reason: null };
2857
- const userExists = base.users.some((u) => u.id === userId);
2903
+ const user = base.users.find((u) => u.id === userId);
2904
+ const userExists = user !== void 0;
2858
2905
  const contextExists = base.contexts.some((c) => c.id === contextId);
2859
- if (userExists && contextExists) return { valid: true, reason: null };
2906
+ const contextAllowed = userExists && Array.isArray(user.context_ids) && user.context_ids.includes(contextId);
2907
+ if (userExists && contextExists && contextAllowed) return { valid: true, reason: null };
2860
2908
  const missing = [];
2861
2909
  if (!userExists) missing.push(`User id=${userId}`);
2862
2910
  if (!contextExists) missing.push(`Context id=${contextId}`);
2911
+ if (userExists && contextExists && !Array.isArray(user.context_ids)) {
2912
+ missing.push(`User id=${userId} hat keine context_ids (Tag-Base muss neu erzeugt werden)`);
2913
+ } else if (userExists && contextExists && !contextAllowed) {
2914
+ missing.push(`Context id=${contextId} ist User id=${userId} nicht zugeordnet`);
2915
+ }
2863
2916
  return {
2864
2917
  valid: false,
2865
2918
  reason: `Gespeicherte Auswahl (${missing.join(", ")}) existiert nicht mehr in der Tag-Base (Version ${base.meta.version}) \u2014 bitte neu w\xE4hlen.`
@@ -2869,6 +2922,21 @@ function validateTagBaseSelection(base, userId, contextId) {
2869
2922
  // src/hooks/useTagBase.ts
2870
2923
  var USER_ID_KEY = "aa-user-id";
2871
2924
  var CONTEXT_ID_KEY = "aa-context-id";
2925
+ var IDENTITY_NAMESPACE_KEY = "aa-identity-namespace";
2926
+ function readStoredNamespace() {
2927
+ try {
2928
+ return localStorage.getItem(IDENTITY_NAMESPACE_KEY);
2929
+ } catch {
2930
+ return null;
2931
+ }
2932
+ }
2933
+ function writeStoredNamespace(namespace) {
2934
+ try {
2935
+ if (namespace === null) localStorage.removeItem(IDENTITY_NAMESPACE_KEY);
2936
+ else localStorage.setItem(IDENTITY_NAMESPACE_KEY, namespace);
2937
+ } catch {
2938
+ }
2939
+ }
2872
2940
  function readStoredId(key) {
2873
2941
  try {
2874
2942
  const v = localStorage.getItem(key);
@@ -2905,6 +2973,16 @@ function useTagBase(token, namespace) {
2905
2973
  }, [selectedContextId]);
2906
2974
  const load = useCallback2(async () => {
2907
2975
  if (!token || !namespace) return;
2976
+ if (readStoredNamespace() !== namespace) {
2977
+ selectedUserIdRef.current = null;
2978
+ selectedContextIdRef.current = null;
2979
+ setSelectedUserId(null);
2980
+ setSelectedContextId(null);
2981
+ writeStoredId(USER_ID_KEY, null);
2982
+ writeStoredId(CONTEXT_ID_KEY, null);
2983
+ writeStoredNamespace(namespace);
2984
+ setPickerMessage(null);
2985
+ }
2908
2986
  setIsLoading(true);
2909
2987
  setError(null);
2910
2988
  try {
@@ -2940,17 +3018,22 @@ function useTagBase(token, namespace) {
2940
3018
  }, [load]);
2941
3019
  const selectUser = useCallback2((userId) => {
2942
3020
  setSelectedUserId(userId);
3021
+ setSelectedContextId(null);
2943
3022
  writeStoredId(USER_ID_KEY, userId);
2944
- }, []);
3023
+ writeStoredId(CONTEXT_ID_KEY, null);
3024
+ writeStoredNamespace(namespace);
3025
+ }, [namespace]);
2945
3026
  const selectContext = useCallback2((contextId) => {
2946
3027
  setSelectedContextId(contextId);
2947
3028
  writeStoredId(CONTEXT_ID_KEY, contextId);
2948
- }, []);
3029
+ writeStoredNamespace(namespace);
3030
+ }, [namespace]);
2949
3031
  const resetSelection = useCallback2(() => {
2950
3032
  setSelectedUserId(null);
2951
3033
  setSelectedContextId(null);
2952
3034
  writeStoredId(USER_ID_KEY, null);
2953
3035
  writeStoredId(CONTEXT_ID_KEY, null);
3036
+ writeStoredNamespace(null);
2954
3037
  setPickerMessage(null);
2955
3038
  }, []);
2956
3039
  const validation = tagBase ? validateTagBaseSelection(tagBase, selectedUserId, selectedContextId) : { valid: false, reason: null };
@@ -5586,9 +5669,131 @@ function ServerTab({ serverBaseUrl }) {
5586
5669
  ] });
5587
5670
  }
5588
5671
 
5589
- // src/components/AvatarArchitectApp.tsx
5672
+ // src/components/FlowWorkspacePicker.tsx
5673
+ import { useMemo as useMemo5, useState as useState24 } from "react";
5590
5674
  import { Fragment as Fragment10, jsx as jsx28, jsxs as jsxs26 } from "react/jsx-runtime";
5591
- function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onSelectMedia, buildInfo, initialHfToken, hfNamespace, allowDevNamespace, serverBaseUrl, onFetchServerProjects, onServerSave, onServerLoad, onServerDelete }) {
5675
+ function FlowWorkspacePicker({
5676
+ tagBase,
5677
+ selectedUserId,
5678
+ message,
5679
+ onSelectUser,
5680
+ onSelectContext
5681
+ }) {
5682
+ const [step, setStep] = useState24(selectedUserId === null ? "user" : "context");
5683
+ const selectedUser = tagBase.users.find((user) => user.id === selectedUserId) ?? null;
5684
+ const contexts = useMemo5(() => {
5685
+ if (!selectedUser) return [];
5686
+ if (!Array.isArray(selectedUser.context_ids)) return [];
5687
+ const allowed = new Set(selectedUser.context_ids);
5688
+ return tagBase.contexts.filter((context) => allowed.has(context.id));
5689
+ }, [selectedUser, tagBase.contexts]);
5690
+ const chooseUser = (userId) => {
5691
+ onSelectUser(userId);
5692
+ setStep("context");
5693
+ };
5694
+ const back = () => {
5695
+ setStep("user");
5696
+ };
5697
+ return /* @__PURE__ */ jsx28("main", { className: "flow-workspace-picker", "data-testid": "flow-workspace-picker", children: /* @__PURE__ */ jsxs26("section", { className: "flow-workspace-picker__card", children: [
5698
+ /* @__PURE__ */ jsxs26("header", { children: [
5699
+ /* @__PURE__ */ jsx28("strong", { children: "FineArt Flow" }),
5700
+ /* @__PURE__ */ jsx28("small", { children: step === "user" ? "Benutzer w\xE4hlen" : `Kontext f\xFCr ${selectedUser?.username ?? `User ${selectedUserId}`}` })
5701
+ ] }),
5702
+ message && /* @__PURE__ */ jsx28("p", { className: "flow-workspace-picker__warning", children: message }),
5703
+ step === "user" ? /* @__PURE__ */ jsxs26("div", { className: "flow-workspace-picker__choices", "aria-label": "Benutzer w\xE4hlen", children: [
5704
+ tagBase.users.map((user) => /* @__PURE__ */ jsxs26("button", { type: "button", onClick: () => chooseUser(user.id), children: [
5705
+ /* @__PURE__ */ jsx28("span", { children: user.username }),
5706
+ /* @__PURE__ */ jsxs26("small", { children: [
5707
+ "id=",
5708
+ user.id
5709
+ ] })
5710
+ ] }, user.id)),
5711
+ tagBase.users.length === 0 && /* @__PURE__ */ jsxs26("p", { children: [
5712
+ "Tag-Base v",
5713
+ tagBase.meta.version,
5714
+ " enth\xE4lt keine Benutzer."
5715
+ ] })
5716
+ ] }) : /* @__PURE__ */ jsxs26(Fragment10, { children: [
5717
+ /* @__PURE__ */ jsx28("button", { className: "flow-workspace-picker__back", type: "button", onClick: back, children: "\u2190 Anderen Benutzer w\xE4hlen" }),
5718
+ /* @__PURE__ */ jsxs26("div", { className: "flow-workspace-picker__choices", "aria-label": "Kontext w\xE4hlen", children: [
5719
+ contexts.map((context) => /* @__PURE__ */ jsxs26("button", { type: "button", onClick: () => onSelectContext(context.id), children: [
5720
+ /* @__PURE__ */ jsx28("span", { children: context.label || context.name }),
5721
+ /* @__PURE__ */ jsxs26("small", { children: [
5722
+ "id=",
5723
+ context.id
5724
+ ] })
5725
+ ] }, context.id)),
5726
+ selectedUser && !Array.isArray(selectedUser.context_ids) && /* @__PURE__ */ jsxs26("p", { children: [
5727
+ "User ",
5728
+ selectedUser.id,
5729
+ " hat keine context_ids. Die Tag-Base muss auf dem Server neu erzeugt werden."
5730
+ ] }),
5731
+ selectedUser && Array.isArray(selectedUser.context_ids) && contexts.length === 0 && /* @__PURE__ */ jsxs26("p", { children: [
5732
+ "F\xFCr User ",
5733
+ selectedUser.id,
5734
+ " sind in Tag-Base v",
5735
+ tagBase.meta.version,
5736
+ " keine Contexts freigegeben."
5737
+ ] })
5738
+ ] })
5739
+ ] })
5740
+ ] }) });
5741
+ }
5742
+
5743
+ // src/lib/flowBootstrapTarget.ts
5744
+ var PROD_NAMESPACE = "app.art-by-rolands.de/";
5745
+ var DEV_NAMESPACE = "dev-app.art-by-rolands.de/";
5746
+ var SELECTABLE_NAMESPACES = [PROD_NAMESPACE, DEV_NAMESPACE];
5747
+ var DEFAULT_NAMESPACE = PROD_NAMESPACE;
5748
+ function environmentForNamespace(namespace) {
5749
+ if (!namespace) return null;
5750
+ if (namespace === DEV_NAMESPACE) return "dev";
5751
+ if (namespace === PROD_NAMESPACE) return "prod";
5752
+ return null;
5753
+ }
5754
+ function normalizeSelectableNamespace(namespace) {
5755
+ return namespace && SELECTABLE_NAMESPACES.includes(namespace) ? namespace : DEFAULT_NAMESPACE;
5756
+ }
5757
+ function resolveBootstrapTarget(input) {
5758
+ const { hostNamespace, serverNamespace, isProbingServer = false } = input;
5759
+ if (hostNamespace) {
5760
+ return {
5761
+ source: "host",
5762
+ phase: "ready",
5763
+ ready: true,
5764
+ namespace: hostNamespace,
5765
+ environment: environmentForNamespace(hostNamespace)
5766
+ };
5767
+ }
5768
+ if (serverNamespace) {
5769
+ return {
5770
+ source: "server",
5771
+ phase: "ready",
5772
+ ready: true,
5773
+ namespace: serverNamespace,
5774
+ environment: environmentForNamespace(serverNamespace)
5775
+ };
5776
+ }
5777
+ if (isProbingServer) {
5778
+ return { source: "server", phase: "probing", ready: false, namespace: null, environment: null };
5779
+ }
5780
+ const { selectedNamespace, isStartDialogOpen = false } = input;
5781
+ if (isStartDialogOpen) {
5782
+ return { source: "dialog", phase: "awaiting-choice", ready: false, namespace: null, environment: null };
5783
+ }
5784
+ const namespace = normalizeSelectableNamespace(selectedNamespace);
5785
+ return {
5786
+ source: "dialog",
5787
+ phase: "ready",
5788
+ ready: true,
5789
+ namespace,
5790
+ environment: environmentForNamespace(namespace)
5791
+ };
5792
+ }
5793
+
5794
+ // src/components/AvatarArchitectApp.tsx
5795
+ import { Fragment as Fragment11, jsx as jsx29, jsxs as jsxs27 } from "react/jsx-runtime";
5796
+ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onSelectMedia, buildInfo, initialHfToken, hfNamespace, allowDevNamespace, requireWorkspaceSelection = false, serverBaseUrl, onFetchServerProjects, onServerSave, onServerLoad, onServerDelete }) {
5592
5797
  useEffect10(() => {
5593
5798
  const id = "flow-styles";
5594
5799
  if (!document.getElementById(id)) {
@@ -5598,41 +5803,51 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
5598
5803
  document.head.appendChild(style);
5599
5804
  }
5600
5805
  }, []);
5601
- const [showStart, setShowStart] = useState24(true);
5602
- const [layoutChoice, setLayoutChoice] = useState24(() => {
5806
+ const [showStart, setShowStart] = useState25(true);
5807
+ const [showSzenen, setShowSzenen] = useState25(false);
5808
+ const [layoutChoice, setLayoutChoice] = useState25(() => {
5603
5809
  try {
5604
5810
  return localStorage.getItem("aa-layout") || null;
5605
5811
  } catch {
5606
5812
  return null;
5607
5813
  }
5608
5814
  });
5609
- const [projectLoaded, setProjectLoaded] = useState24(false);
5610
- const [hfToken, setHfToken] = useState24(initialHfToken || "");
5611
- const [hfTokenInput, setHfTokenInput] = useState24(initialHfToken || "");
5612
- const [isLoadingFromHF, setIsLoadingFromHF] = useState24(false);
5613
- const [hfNamespaceLocal, setHfNamespaceLocal] = useState24(() => {
5614
- const KNOWN = ["app.art-by-rolands.de/", "dev-app.art-by-rolands.de/"];
5615
- const DEFAULT = "app.art-by-rolands.de/";
5815
+ const [projectLoaded, setProjectLoaded] = useState25(false);
5816
+ const [hfToken, setHfToken] = useState25(initialHfToken || "");
5817
+ const [hfTokenInput, setHfTokenInput] = useState25(initialHfToken || "");
5818
+ const [isLoadingFromHF, setIsLoadingFromHF] = useState25(false);
5819
+ const [hfNamespaceLocal, setHfNamespaceLocal] = useState25(() => {
5616
5820
  try {
5617
- const stored = localStorage.getItem("aa-hf-namespace");
5618
- if (stored && KNOWN.includes(stored)) return stored;
5619
- localStorage.setItem("aa-hf-namespace", DEFAULT);
5620
- return DEFAULT;
5821
+ return normalizeSelectableNamespace(localStorage.getItem("aa-hf-namespace"));
5621
5822
  } catch {
5622
- return DEFAULT;
5823
+ return DEFAULT_NAMESPACE;
5623
5824
  }
5624
5825
  });
5625
- const [hfNamespaceFromServer, setHfNamespaceFromServer] = useState24(null);
5826
+ const [hfNamespaceFromServer, setHfNamespaceFromServer] = useState25(null);
5827
+ const [serverProbeFailed, setServerProbeFailed] = useState25(false);
5626
5828
  useEffect10(() => {
5627
- if (hfNamespace !== void 0) return;
5628
- const backendUrl = typeof window !== "undefined" ? window.BACKEND_URL || window.location.origin : null;
5629
- if (!backendUrl) return;
5630
- fetch(`${backendUrl}/api/status`).then((r) => r.json()).then((d) => {
5829
+ if (hfNamespace !== void 0 || !serverBaseUrl) return;
5830
+ fetch(`${serverBaseUrl}/api/status`).then((r) => r.json()).then((d) => {
5631
5831
  if (typeof d.hfNamespace === "string" && d.hfNamespace) setHfNamespaceFromServer(d.hfNamespace);
5632
- }).catch(() => {
5633
- });
5634
- }, [hfNamespace]);
5635
- const effectiveNamespace = hfNamespace ?? hfNamespaceFromServer ?? hfNamespaceLocal;
5832
+ else setServerProbeFailed(true);
5833
+ }).catch(() => setServerProbeFailed(true));
5834
+ }, [hfNamespace, serverBaseUrl]);
5835
+ const [targetConfirmed, setTargetConfirmed] = useState25(false);
5836
+ const isDialogTarget = hfNamespace === void 0 && hfNamespaceFromServer === null && (!serverBaseUrl || serverProbeFailed);
5837
+ const isProbingServer = hfNamespace === void 0 && !!serverBaseUrl && hfNamespaceFromServer === null && !serverProbeFailed;
5838
+ const bootstrapTarget = resolveBootstrapTarget({
5839
+ hostNamespace: hfNamespace,
5840
+ serverNamespace: hfNamespaceFromServer,
5841
+ isProbingServer,
5842
+ selectedNamespace: hfNamespaceLocal,
5843
+ isStartDialogOpen: isDialogTarget && !targetConfirmed
5844
+ });
5845
+ const effectiveNamespace = bootstrapTarget.namespace ?? "";
5846
+ const szenenPort = useMemo6(() => hfToken && effectiveNamespace ? createFlowSzenenViewPort({
5847
+ generateText: onGeneratePrompt,
5848
+ token: hfToken,
5849
+ namespace: effectiveNamespace
5850
+ }) : null, [hfToken, effectiveNamespace, onGeneratePrompt]);
5636
5851
  const {
5637
5852
  state: hfState,
5638
5853
  isLoading: isHfRefreshing,
@@ -5646,36 +5861,36 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
5646
5861
  hasStateZip
5647
5862
  } = useHFState(hfToken, effectiveNamespace);
5648
5863
  const tagBaseResult = useTagBase(hfToken, effectiveNamespace);
5649
- const [imageUploadStatus, setImageUploadStatus] = useState24(/* @__PURE__ */ new Map());
5650
- const [bootstrapLog, setBootstrapLog] = useState24([]);
5651
- const [isBootstrapping, setIsBootstrapping] = useState24(false);
5652
- const [hfMissingImages, setHfMissingImages] = useState24([]);
5653
- const syncTopSlot = /* @__PURE__ */ jsxs26(Fragment10, { children: [
5654
- localOnlyCount > 0 && /* @__PURE__ */ jsxs26("div", { style: { background: "rgba(234,179,8,0.15)", border: "1px solid rgba(234,179,8,0.3)", padding: "4px 10px", fontSize: 11, color: "#fbbf24", borderRadius: 4, marginBottom: 4 }, children: [
5864
+ const [imageUploadStatus, setImageUploadStatus] = useState25(/* @__PURE__ */ new Map());
5865
+ const [bootstrapLog, setBootstrapLog] = useState25([]);
5866
+ const [isBootstrapping, setIsBootstrapping] = useState25(false);
5867
+ const [hfMissingImages, setHfMissingImages] = useState25([]);
5868
+ const syncTopSlot = /* @__PURE__ */ jsxs27(Fragment11, { children: [
5869
+ localOnlyCount > 0 && /* @__PURE__ */ jsxs27("div", { style: { background: "rgba(234,179,8,0.15)", border: "1px solid rgba(234,179,8,0.3)", padding: "4px 10px", fontSize: 11, color: "#fbbf24", borderRadius: 4, marginBottom: 4 }, children: [
5655
5870
  "\u26A0 ",
5656
5871
  localOnlyCount,
5657
5872
  " lokale Event",
5658
5873
  localOnlyCount > 1 ? "s" : "",
5659
5874
  " noch nicht auf HF best\xE4tigt"
5660
5875
  ] }),
5661
- pendingBufferCount > 0 && /* @__PURE__ */ jsxs26("div", { style: { background: "linear-gradient(90deg,#f59e0b,#ef4444)", padding: "4px 10px", fontSize: 11, color: "#fff", borderRadius: 4, marginBottom: 4 }, children: [
5876
+ pendingBufferCount > 0 && /* @__PURE__ */ jsxs27("div", { style: { background: "linear-gradient(90deg,#f59e0b,#ef4444)", padding: "4px 10px", fontSize: 11, color: "#fff", borderRadius: 4, marginBottom: 4 }, children: [
5662
5877
  pendingBufferCount,
5663
5878
  " \xC4nderung",
5664
5879
  pendingBufferCount > 1 ? "en" : "",
5665
5880
  " lokal \u2014 bei Flow-Reload verloren wenn nicht synchronisiert"
5666
5881
  ] }),
5667
- eventCount > 100 && /* @__PURE__ */ jsxs26("div", { style: { background: "#dc2626", color: "#fff", padding: "5px 10px", borderRadius: 4, marginBottom: 4, fontWeight: 600, fontSize: 11 }, children: [
5882
+ eventCount > 100 && /* @__PURE__ */ jsxs27("div", { style: { background: "#dc2626", color: "#fff", padding: "5px 10px", borderRadius: 4, marginBottom: 4, fontWeight: 600, fontSize: 11 }, children: [
5668
5883
  "\u26A0 ",
5669
5884
  eventCount,
5670
5885
  " Events nicht konsolidiert \u2014 Konsolidierung dringend empfohlen"
5671
5886
  ] }),
5672
- eventCount > 50 && eventCount <= 100 && /* @__PURE__ */ jsxs26("div", { style: { background: "#44403c", color: "#a8a29e", padding: "4px 10px", borderRadius: 4, marginBottom: 4, fontSize: 11 }, children: [
5887
+ eventCount > 50 && eventCount <= 100 && /* @__PURE__ */ jsxs27("div", { style: { background: "#44403c", color: "#a8a29e", padding: "4px 10px", borderRadius: 4, marginBottom: 4, fontSize: 11 }, children: [
5673
5888
  eventCount,
5674
5889
  " Events seit letzter Konsolidierung \u2014 Konsolidierung empfohlen"
5675
5890
  ] }),
5676
- hfToken && !hasStateZip && !isHfRefreshing && /* @__PURE__ */ jsxs26("div", { style: { background: "#1c1917", border: "1px solid #44403c", borderRadius: 6, padding: "10px 12px" }, children: [
5677
- /* @__PURE__ */ jsx28("div", { style: { fontSize: 12, color: "#a8a29e", marginBottom: 6 }, children: effectiveNamespace ? `Kein State-Snapshot in HF (${effectiveNamespace}) \u2014 aus Legacy-Daten (tags.json + metadata.json) migrieren?` : "Namespace wird geladen\u2026" }),
5678
- /* @__PURE__ */ jsx28(
5891
+ hfToken && !hasStateZip && !isHfRefreshing && /* @__PURE__ */ jsxs27("div", { style: { background: "#1c1917", border: "1px solid #44403c", borderRadius: 6, padding: "10px 12px" }, children: [
5892
+ /* @__PURE__ */ jsx29("div", { style: { fontSize: 12, color: "#a8a29e", marginBottom: 6 }, children: effectiveNamespace ? `Kein State-Snapshot in HF (${effectiveNamespace}) \u2014 aus Legacy-Daten (tags.json + metadata.json) migrieren?` : "Namespace wird geladen\u2026" }),
5893
+ /* @__PURE__ */ jsx29(
5679
5894
  "button",
5680
5895
  {
5681
5896
  disabled: isBootstrapping || !effectiveNamespace,
@@ -5696,7 +5911,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
5696
5911
  children: isBootstrapping ? "Migriere\u2026" : "Legacy-Migration starten"
5697
5912
  }
5698
5913
  ),
5699
- bootstrapLog.length > 0 && /* @__PURE__ */ jsx28("div", { style: { marginTop: 6, fontFamily: "monospace", fontSize: 10, color: "#78716c", lineHeight: 1.6 }, children: bootstrapLog.map((l, i) => /* @__PURE__ */ jsx28("div", { children: l }, i)) })
5914
+ bootstrapLog.length > 0 && /* @__PURE__ */ jsx29("div", { style: { marginTop: 6, fontFamily: "monospace", fontSize: 10, color: "#78716c", lineHeight: 1.6 }, children: bootstrapLog.map((l, i) => /* @__PURE__ */ jsx29("div", { children: l }, i)) })
5700
5915
  ] })
5701
5916
  ] });
5702
5917
  const wsInputRef = useRef11(null);
@@ -5706,19 +5921,20 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
5706
5921
  } catch {
5707
5922
  }
5708
5923
  setLayoutChoice(choice);
5924
+ setTargetConfirmed(true);
5709
5925
  setShowStart(false);
5710
5926
  };
5711
- const [nodes, setNodes] = useState24([{ id: "1", type: "custom", position: { x: 0, y: 0 }, data: { label: "Fine Art Project", placeholder: "Name..." } }]);
5712
- const [edges, setEdges] = useState24([]);
5713
- const [history, setHistory] = useState24([]);
5714
- const [galleryItems, setGalleryItems] = useState24([]);
5927
+ const [nodes, setNodes] = useState25([{ id: "1", type: "custom", position: { x: 0, y: 0 }, data: { label: "Fine Art Project", placeholder: "Name..." } }]);
5928
+ const [edges, setEdges] = useState25([]);
5929
+ const [history, setHistory] = useState25([]);
5930
+ const [galleryItems, setGalleryItems] = useState25([]);
5715
5931
  const galleryItemsRef = useRef11([]);
5716
5932
  useEffect10(() => {
5717
5933
  galleryItemsRef.current = galleryItems;
5718
5934
  }, [galleryItems]);
5719
5935
  const hfImageNotFoundRef = useRef11(/* @__PURE__ */ new Map());
5720
- const [galleryVisibleCount, setGalleryVisibleCount] = useState24(20);
5721
- const [historyVisibleCount, setHistoryVisibleCount] = useState24(20);
5936
+ const [galleryVisibleCount, setGalleryVisibleCount] = useState25(20);
5937
+ const [historyVisibleCount, setHistoryVisibleCount] = useState25(20);
5722
5938
  const loadThumbnailsForEntries = useCallback4(async (entries) => {
5723
5939
  for (const entry of entries) {
5724
5940
  if (galleryItemsRef.current.find((g) => g.id === entry.id)?.base64) continue;
@@ -5777,24 +5993,24 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
5777
5993
  const sortedMeta = [...hfState.metadata].sort((a, b) => (b.timestamp ?? 0) - (a.timestamp ?? 0));
5778
5994
  loadThumbnailsForEntries(sortedMeta.slice(0, historyVisibleCount));
5779
5995
  }, [hfState, historyVisibleCount, loadThumbnailsForEntries]);
5780
- const [activePrompt, setActivePrompt] = useState24("");
5781
- const [isSynthesizing, setIsSynthesizing] = useState24(false);
5782
- const [activeGenerationsCount, setActiveGenerationsCount] = useState24(0);
5783
- const [currentResult, setCurrentResult] = useState24(null);
5784
- const [focusedNodeId, setFocusedNodeId] = useState24(null);
5785
- const [leftTab, setLeftTab] = useState24("prompt");
5786
- const [promptFeedback, setPromptFeedback] = useState24(null);
5787
- const [lastPromptPayload, setLastPromptPayload] = useState24(null);
5788
- const [isPromptTabGenerating, setIsPromptTabGenerating] = useState24(false);
5789
- const [activeTab, setActiveTab] = useState24("history");
5790
- const [mobileTab, setMobileTab] = useState24("stage");
5791
- const [middlePanel, setMiddlePanel] = useState24("stage");
5792
- const [recentLabItems, setRecentLabItems] = useState24([]);
5793
- const [aspectRatio, setAspectRatio] = useState24("1:1");
5794
- const [selectedModel, setSelectedModel] = useState24("\u{1F34C} Nano Banana Pro");
5795
- const [seed, setSeed] = useState24(Math.floor(Math.random() * 1e6));
5796
- const [seedMode, setSeedMode] = useState24("random");
5797
- const [imageCount, setImageCount] = useState24(() => {
5996
+ const [activePrompt, setActivePrompt] = useState25("");
5997
+ const [isSynthesizing, setIsSynthesizing] = useState25(false);
5998
+ const [activeGenerationsCount, setActiveGenerationsCount] = useState25(0);
5999
+ const [currentResult, setCurrentResult] = useState25(null);
6000
+ const [focusedNodeId, setFocusedNodeId] = useState25(null);
6001
+ const [leftTab, setLeftTab] = useState25("prompt");
6002
+ const [promptFeedback, setPromptFeedback] = useState25(null);
6003
+ const [lastPromptPayload, setLastPromptPayload] = useState25(null);
6004
+ const [isPromptTabGenerating, setIsPromptTabGenerating] = useState25(false);
6005
+ const [activeTab, setActiveTab] = useState25("history");
6006
+ const [mobileTab, setMobileTab] = useState25("stage");
6007
+ const [middlePanel, setMiddlePanel] = useState25("stage");
6008
+ const [recentLabItems, setRecentLabItems] = useState25([]);
6009
+ const [aspectRatio, setAspectRatio] = useState25("1:1");
6010
+ const [selectedModel, setSelectedModel] = useState25("\u{1F34C} Nano Banana Pro");
6011
+ const [seed, setSeed] = useState25(Math.floor(Math.random() * 1e6));
6012
+ const [seedMode, setSeedMode] = useState25("random");
6013
+ const [imageCount, setImageCount] = useState25(() => {
5798
6014
  try {
5799
6015
  const v = parseInt(localStorage.getItem("aa-image-count") || "", 10);
5800
6016
  return v >= 1 && v <= 8 ? v : 4;
@@ -5816,42 +6032,42 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
5816
6032
  { label: "4 Bilder", value: "4" },
5817
6033
  { label: "8 Bilder", value: "8" }
5818
6034
  ];
5819
- const [isLeftCollapsed, setIsLeftCollapsed] = useState24(false);
5820
- const [isRightCollapsed, setIsRightCollapsed] = useState24(false);
5821
- const [leftPanelWidth, setLeftPanelWidth] = useState24(() => {
6035
+ const [isLeftCollapsed, setIsLeftCollapsed] = useState25(false);
6036
+ const [isRightCollapsed, setIsRightCollapsed] = useState25(false);
6037
+ const [leftPanelWidth, setLeftPanelWidth] = useState25(() => {
5822
6038
  try {
5823
6039
  return parseInt(localStorage.getItem("aa-left-width") || "260", 10);
5824
6040
  } catch {
5825
6041
  return 260;
5826
6042
  }
5827
6043
  });
5828
- const [rightPanelWidth, setRightPanelWidth] = useState24(() => {
6044
+ const [rightPanelWidth, setRightPanelWidth] = useState25(() => {
5829
6045
  try {
5830
6046
  return parseInt(localStorage.getItem("aa-right-width") || "320", 10);
5831
6047
  } catch {
5832
6048
  return 320;
5833
6049
  }
5834
6050
  });
5835
- const [isPromptCollapsed, setIsPromptCollapsed] = useState24(false);
5836
- const [projectActionState, setProjectActionState] = useState24("idle");
6051
+ const [isPromptCollapsed, setIsPromptCollapsed] = useState25(false);
6052
+ const [projectActionState, setProjectActionState] = useState25("idle");
5837
6053
  const syncServerDataRef = useRef11(null);
5838
- const [workspaceTags, setWorkspaceTags] = useState24(null);
5839
- const [serverProjects, setServerProjects] = useState24([]);
5840
- const [isLoadingFromServer, setIsLoadingFromServer] = useState24(false);
5841
- const [highContrast, setHighContrast] = useState24(() => {
6054
+ const [workspaceTags, setWorkspaceTags] = useState25(null);
6055
+ const [serverProjects, setServerProjects] = useState25([]);
6056
+ const [isLoadingFromServer, setIsLoadingFromServer] = useState25(false);
6057
+ const [highContrast, setHighContrast] = useState25(() => {
5842
6058
  try {
5843
6059
  return localStorage.getItem("aa-contrast") === "high";
5844
6060
  } catch {
5845
6061
  return false;
5846
6062
  }
5847
6063
  });
5848
- const [activeReferenceId, setActiveReferenceId] = useState24(null);
5849
- const [activeReferenceThumbnail, setActiveReferenceThumbnail] = useState24(null);
5850
- const [isScanningImage, setIsScanningImage] = useState24(false);
5851
- const [touchStartX, setTouchStartX] = useState24(null);
5852
- const [isFullscreen, setIsFullscreen] = useState24(false);
5853
- const [zoomScale, setZoomScale] = useState24(1);
5854
- const [zoomOffset, setZoomOffset] = useState24({ x: 0, y: 0 });
6064
+ const [activeReferenceId, setActiveReferenceId] = useState25(null);
6065
+ const [activeReferenceThumbnail, setActiveReferenceThumbnail] = useState25(null);
6066
+ const [isScanningImage, setIsScanningImage] = useState25(false);
6067
+ const [touchStartX, setTouchStartX] = useState25(null);
6068
+ const [isFullscreen, setIsFullscreen] = useState25(false);
6069
+ const [zoomScale, setZoomScale] = useState25(1);
6070
+ const [zoomOffset, setZoomOffset] = useState25({ x: 0, y: 0 });
5855
6071
  const lastPinchDist = useRef11(null);
5856
6072
  const lastTapTime = useRef11(0);
5857
6073
  const dragStart = useRef11(null);
@@ -5917,7 +6133,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
5917
6133
  setActiveReferenceId(null);
5918
6134
  setActiveReferenceThumbnail(null);
5919
6135
  };
5920
- const labServices = useMemo5(() => {
6136
+ const labServices = useMemo6(() => {
5921
6137
  const available = groupGenerationsToLabItems([...galleryItems, ...history]);
5922
6138
  return {
5923
6139
  availableItems: available,
@@ -5997,7 +6213,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
5997
6213
  setIsScanningImage(false);
5998
6214
  }
5999
6215
  };
6000
- const currentIndex = useMemo5(() => history.findIndex((h) => h.id === currentResult?.id), [history, currentResult]);
6216
+ const currentIndex = useMemo6(() => history.findIndex((h) => h.id === currentResult?.id), [history, currentResult]);
6001
6217
  const goToPrev = useCallback4(() => {
6002
6218
  if (currentIndex > 0) setCurrentResult(history[currentIndex - 1]);
6003
6219
  }, [currentIndex, history]);
@@ -6026,7 +6242,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6026
6242
  });
6027
6243
  }
6028
6244
  }, [hfToken, effectiveNamespace, hfWriteEvent]);
6029
- const currentGroup = useMemo5(() => {
6245
+ const currentGroup = useMemo6(() => {
6030
6246
  if (!currentResult?.prompt) return [];
6031
6247
  const groups = groupByPrompt(galleryItems.filter((g) => g.status === "done" && !!g.base64));
6032
6248
  const group = groups.find((gr) => gr.prompt === currentResult.prompt);
@@ -6058,15 +6274,15 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6058
6274
  })();
6059
6275
  }, [currentResult?.id, currentResult?.prompt]);
6060
6276
  const hcStyle = highContrast ? { filter: "brightness(1.6) contrast(1.05)" } : void 0;
6061
- const runningBadge = activeGenerationsCount > 0 ? /* @__PURE__ */ jsxs26(
6277
+ const runningBadge = activeGenerationsCount > 0 ? /* @__PURE__ */ jsxs27(
6062
6278
  "div",
6063
6279
  {
6064
6280
  className: "flex items-center gap-1 rounded-full bg-sky-500/15 border border-sky-400/30 px-2 shrink-0",
6065
6281
  style: { height: 24 },
6066
6282
  title: `${activeGenerationsCount} Generierung${activeGenerationsCount === 1 ? "" : "en"} l\xE4uft gerade`,
6067
6283
  children: [
6068
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-sky-300", style: { fontSize: 14, lineHeight: 1 }, children: "autorenew" }),
6069
- /* @__PURE__ */ jsx28("span", { className: "text-[11px] font-bold text-sky-300 tabular-nums", children: activeGenerationsCount })
6284
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-sky-300", style: { fontSize: 14, lineHeight: 1 }, children: "autorenew" }),
6285
+ /* @__PURE__ */ jsx29("span", { className: "text-[11px] font-bold text-sky-300 tabular-nums", children: activeGenerationsCount })
6070
6286
  ]
6071
6287
  }
6072
6288
  ) : null;
@@ -6079,7 +6295,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6079
6295
  return `${indent}- ${node.data.label || "(unbenannt)"}
6080
6296
  ` + childrenIds.map((id) => getSubtreeFormat(id, depth + 1)).join("");
6081
6297
  }, [nodes, edges]);
6082
- const activePath = useMemo5(() => {
6298
+ const activePath = useMemo6(() => {
6083
6299
  if (!focusedNodeId) return /* @__PURE__ */ new Set();
6084
6300
  const path = /* @__PURE__ */ new Set([focusedNodeId]);
6085
6301
  let currId = focusedNodeId;
@@ -6470,7 +6686,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6470
6686
  if (isFullscreen && currentResult?.base64) {
6471
6687
  const fsRaw = currentResult.fullBase64 || currentResult.base64;
6472
6688
  const fsBase64 = fsRaw.startsWith("data:") ? fsRaw : `data:image/png;base64,${fsRaw}`;
6473
- return /* @__PURE__ */ jsxs26(
6689
+ return /* @__PURE__ */ jsxs27(
6474
6690
  "div",
6475
6691
  {
6476
6692
  className: "fixed inset-0 bg-black z-50 flex items-center justify-center overflow-hidden touch-none",
@@ -6478,7 +6694,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6478
6694
  onTouchMove: handleFsTouchMove,
6479
6695
  onTouchEnd: handleFsTouchEnd,
6480
6696
  children: [
6481
- /* @__PURE__ */ jsx28(
6697
+ /* @__PURE__ */ jsx29(
6482
6698
  "img",
6483
6699
  {
6484
6700
  src: fsBase64,
@@ -6495,77 +6711,95 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6495
6711
  }
6496
6712
  }
6497
6713
  ),
6498
- /* @__PURE__ */ jsx28("button", { onClick: closeFullscreen, className: "absolute top-4 right-4 w-10 h-10 flex items-center justify-center rounded-full bg-black/70 border border-white/20 z-10", children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[22px]", children: "close" }) }),
6499
- zoomScale > 1 && /* @__PURE__ */ jsx28("button", { onClick: () => {
6714
+ /* @__PURE__ */ jsx29("button", { onClick: closeFullscreen, className: "absolute top-4 right-4 w-10 h-10 flex items-center justify-center rounded-full bg-black/70 border border-white/20 z-10", children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[22px]", children: "close" }) }),
6715
+ zoomScale > 1 && /* @__PURE__ */ jsx29("button", { onClick: () => {
6500
6716
  setZoomScale(1);
6501
6717
  setZoomOffset({ x: 0, y: 0 });
6502
- }, className: "absolute top-4 left-4 w-10 h-10 flex items-center justify-center rounded-full bg-black/70 border border-white/20 z-10", children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[20px]", children: "zoom_out_map" }) }),
6503
- history.length > 1 && /* @__PURE__ */ jsxs26(Fragment10, { children: [
6504
- /* @__PURE__ */ jsx28("button", { onClick: () => {
6718
+ }, className: "absolute top-4 left-4 w-10 h-10 flex items-center justify-center rounded-full bg-black/70 border border-white/20 z-10", children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[20px]", children: "zoom_out_map" }) }),
6719
+ history.length > 1 && /* @__PURE__ */ jsxs27(Fragment11, { children: [
6720
+ /* @__PURE__ */ jsx29("button", { onClick: () => {
6505
6721
  if (currentIndex > 0) setCurrentResult(history[currentIndex - 1]);
6506
- }, disabled: currentIndex <= 0, className: "absolute left-2 top-1/2 -translate-y-1/2 w-10 h-10 flex items-center justify-center rounded-full bg-black/60 border border-white/10 disabled:opacity-0", children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[22px]", children: "chevron_left" }) }),
6507
- /* @__PURE__ */ jsx28("button", { onClick: () => {
6722
+ }, disabled: currentIndex <= 0, className: "absolute left-2 top-1/2 -translate-y-1/2 w-10 h-10 flex items-center justify-center rounded-full bg-black/60 border border-white/10 disabled:opacity-0", children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[22px]", children: "chevron_left" }) }),
6723
+ /* @__PURE__ */ jsx29("button", { onClick: () => {
6508
6724
  if (currentIndex < history.length - 1) setCurrentResult(history[currentIndex + 1]);
6509
- }, disabled: currentIndex >= history.length - 1, className: "absolute right-2 top-1/2 -translate-y-1/2 w-10 h-10 flex items-center justify-center rounded-full bg-black/60 border border-white/10 disabled:opacity-0", children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[22px]", children: "chevron_right" }) }),
6510
- /* @__PURE__ */ jsxs26("div", { className: "absolute bottom-6 left-1/2 -translate-x-1/2 bg-black/60 rounded-full px-3 py-0.5 text-[10px] text-white/40 font-mono", children: [
6725
+ }, disabled: currentIndex >= history.length - 1, className: "absolute right-2 top-1/2 -translate-y-1/2 w-10 h-10 flex items-center justify-center rounded-full bg-black/60 border border-white/10 disabled:opacity-0", children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[22px]", children: "chevron_right" }) }),
6726
+ /* @__PURE__ */ jsxs27("div", { className: "absolute bottom-6 left-1/2 -translate-x-1/2 bg-black/60 rounded-full px-3 py-0.5 text-[10px] text-white/40 font-mono", children: [
6511
6727
  currentIndex + 1,
6512
6728
  " / ",
6513
6729
  history.length
6514
6730
  ] })
6515
6731
  ] }),
6516
- zoomScale === 1 && /* @__PURE__ */ jsx28("div", { className: "absolute bottom-6 right-4 text-[9px] text-white/20 font-mono", children: "Pinch zum Zoomen \xB7 Doppeltipp 2.5\xD7" })
6732
+ zoomScale === 1 && /* @__PURE__ */ jsx29("div", { className: "absolute bottom-6 right-4 text-[9px] text-white/20 font-mono", children: "Pinch zum Zoomen \xB7 Doppeltipp 2.5\xD7" })
6517
6733
  ]
6518
6734
  }
6519
6735
  );
6520
6736
  }
6737
+ if (showSzenen && szenenPort) {
6738
+ return /* @__PURE__ */ jsxs27("main", { className: "flow-szenen-shell", children: [
6739
+ /* @__PURE__ */ jsxs27("header", { className: "flow-szenen-shell__header", children: [
6740
+ /* @__PURE__ */ jsx29("button", { type: "button", onClick: () => setShowSzenen(false), children: "Zur\xFCck" }),
6741
+ /* @__PURE__ */ jsxs27("div", { children: [
6742
+ /* @__PURE__ */ jsx29("strong", { children: "Szenen" }),
6743
+ /* @__PURE__ */ jsxs27("small", { children: [
6744
+ effectiveNamespace,
6745
+ " \xB7 User ",
6746
+ tagBaseResult.selectedUserId,
6747
+ " \xB7 Context ",
6748
+ tagBaseResult.selectedContextId
6749
+ ] })
6750
+ ] })
6751
+ ] }),
6752
+ /* @__PURE__ */ jsx29("div", { className: "flow-szenen-shell__content", children: /* @__PURE__ */ jsx29(SzenenView, { port: szenenPort, contextId: tagBaseResult.selectedContextId === null ? null : String(tagBaseResult.selectedContextId) }) })
6753
+ ] });
6754
+ }
6521
6755
  if (showStart) {
6522
- return /* @__PURE__ */ jsxs26("div", { className: "fixed inset-0 bg-[#0e0e0e] flex flex-col items-center justify-center p-6", style: { gap: 28, ...hcStyle }, children: [
6523
- /* @__PURE__ */ jsx28("input", { ref: wsInputRef, type: "file", accept: ".zip", className: "hidden", onChange: (e) => {
6756
+ return /* @__PURE__ */ jsxs27("div", { className: "fixed inset-0 bg-[#0e0e0e] flex flex-col items-center justify-center p-6", style: { gap: 28, ...hcStyle }, children: [
6757
+ /* @__PURE__ */ jsx29("input", { ref: wsInputRef, type: "file", accept: ".zip", className: "hidden", onChange: (e) => {
6524
6758
  const f = e.target.files?.[0];
6525
6759
  if (f) handleProjectImport(f);
6526
6760
  e.target.value = "";
6527
6761
  } }),
6528
- /* @__PURE__ */ jsxs26("div", { className: "flex flex-col items-center gap-1", children: [
6529
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-white/15 text-[44px]", children: "palette" }),
6530
- /* @__PURE__ */ jsx28("span", { className: "text-white/25 text-[10px] font-bold uppercase tracking-[0.25em]", children: "Avatar Architect" }),
6531
- /* @__PURE__ */ jsxs26("span", { className: "text-white text-[13px] font-mono", children: [
6762
+ /* @__PURE__ */ jsxs27("div", { className: "flex flex-col items-center gap-1", children: [
6763
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-white/15 text-[44px]", children: "palette" }),
6764
+ /* @__PURE__ */ jsx29("span", { className: "text-white/25 text-[10px] font-bold uppercase tracking-[0.25em]", children: "Avatar Architect" }),
6765
+ /* @__PURE__ */ jsxs27("span", { className: "text-white text-[13px] font-mono", children: [
6532
6766
  "v",
6533
6767
  version
6534
6768
  ] })
6535
6769
  ] }),
6536
- /* @__PURE__ */ jsxs26(
6770
+ /* @__PURE__ */ jsxs27(
6537
6771
  "button",
6538
6772
  {
6539
6773
  onClick: toggleContrast,
6540
6774
  className: "flex items-center gap-3 px-5 py-3 rounded-2xl border transition-colors",
6541
6775
  style: { borderColor: highContrast ? "rgba(255,255,255,0.3)" : "rgba(255,255,255,0.08)", background: highContrast ? "rgba(255,255,255,0.08)" : "transparent" },
6542
6776
  children: [
6543
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[22px]", style: { color: highContrast ? "#fff" : "rgba(255,255,255,0.35)" }, children: highContrast ? "light_mode" : "dark_mode" }),
6544
- /* @__PURE__ */ jsxs26("div", { className: "flex flex-col items-start", children: [
6545
- /* @__PURE__ */ jsx28("span", { className: "text-[13px] font-bold", style: { color: highContrast ? "#fff" : "rgba(255,255,255,0.5)" }, children: highContrast ? "Hoher Kontrast" : "Normaler Kontrast" }),
6546
- /* @__PURE__ */ jsx28("span", { className: "text-[10px]", style: { color: "rgba(255,255,255,0.25)" }, children: "Tippen zum Umschalten" })
6777
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[22px]", style: { color: highContrast ? "#fff" : "rgba(255,255,255,0.35)" }, children: highContrast ? "light_mode" : "dark_mode" }),
6778
+ /* @__PURE__ */ jsxs27("div", { className: "flex flex-col items-start", children: [
6779
+ /* @__PURE__ */ jsx29("span", { className: "text-[13px] font-bold", style: { color: highContrast ? "#fff" : "rgba(255,255,255,0.5)" }, children: highContrast ? "Hoher Kontrast" : "Normaler Kontrast" }),
6780
+ /* @__PURE__ */ jsx29("span", { className: "text-[10px]", style: { color: "rgba(255,255,255,0.25)" }, children: "Tippen zum Umschalten" })
6547
6781
  ] })
6548
6782
  ]
6549
6783
  }
6550
6784
  ),
6551
- /* @__PURE__ */ jsxs26("div", { className: "flex flex-col items-center gap-2 w-full max-w-[280px]", children: [
6552
- /* @__PURE__ */ jsxs26(
6785
+ /* @__PURE__ */ jsxs27("div", { className: "flex flex-col items-center gap-2 w-full max-w-[280px]", children: [
6786
+ /* @__PURE__ */ jsxs27(
6553
6787
  "button",
6554
6788
  {
6555
6789
  onClick: () => wsInputRef.current?.click(),
6556
6790
  className: "w-full flex items-center justify-center gap-3 rounded-2xl font-bold text-[14px] uppercase tracking-wide text-white active:scale-95 transition-transform",
6557
6791
  style: { height: 56, background: projectLoaded ? "#16a34a" : "#0284c7" },
6558
6792
  children: [
6559
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[22px]", children: projectLoaded ? "check_circle" : "folder_zip" }),
6793
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[22px]", children: projectLoaded ? "check_circle" : "folder_zip" }),
6560
6794
  projectLoaded ? "Projekt geladen \u2713" : "Projekt laden (.zip)"
6561
6795
  ]
6562
6796
  }
6563
6797
  ),
6564
- !projectLoaded && /* @__PURE__ */ jsx28("span", { className: "text-white/20 text-[10px] text-center", children: "Baum, Bilder und Einstellungen wiederherstellen" })
6798
+ !projectLoaded && /* @__PURE__ */ jsx29("span", { className: "text-white/20 text-[10px] text-center", children: "Baum, Bilder und Einstellungen wiederherstellen" })
6565
6799
  ] }),
6566
- /* @__PURE__ */ jsxs26("div", { className: "flex flex-col items-center gap-2 w-full max-w-[280px]", children: [
6567
- !initialHfToken && /* @__PURE__ */ jsxs26("div", { className: "flex gap-2 w-full", children: [
6568
- /* @__PURE__ */ jsx28(
6800
+ /* @__PURE__ */ jsxs27("div", { className: "flex flex-col items-center gap-2 w-full max-w-[280px]", children: [
6801
+ !initialHfToken && /* @__PURE__ */ jsxs27("div", { className: "flex gap-2 w-full", children: [
6802
+ /* @__PURE__ */ jsx29(
6569
6803
  "input",
6570
6804
  {
6571
6805
  type: "password",
@@ -6581,7 +6815,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6581
6815
  style: { height: 44, background: "rgba(255,255,255,0.05)", border: "1px solid rgba(255,255,255,0.1)", color: "rgba(255,255,255,0.7)" }
6582
6816
  }
6583
6817
  ),
6584
- hfTokenInput.trim() && /* @__PURE__ */ jsx28(
6818
+ hfTokenInput.trim() && /* @__PURE__ */ jsx29(
6585
6819
  "button",
6586
6820
  {
6587
6821
  type: "button",
@@ -6592,9 +6826,9 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6592
6826
  }
6593
6827
  )
6594
6828
  ] }),
6595
- !hfNamespace && /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-3 w-full", children: [
6596
- /* @__PURE__ */ jsx28("span", { className: "text-white/25 text-[10px] uppercase tracking-widest font-bold flex-shrink-0", children: "State:" }),
6597
- ["app.art-by-rolands.de/", "dev-app.art-by-rolands.de/"].map((ns, i) => /* @__PURE__ */ jsx28(
6829
+ isDialogTarget && /* @__PURE__ */ jsxs27("div", { className: "flex items-center gap-3 w-full", children: [
6830
+ /* @__PURE__ */ jsx29("span", { className: "text-white/25 text-[10px] uppercase tracking-widest font-bold flex-shrink-0", children: "State:" }),
6831
+ ["app.art-by-rolands.de/", "dev-app.art-by-rolands.de/"].map((ns, i) => /* @__PURE__ */ jsx29(
6598
6832
  "button",
6599
6833
  {
6600
6834
  onClick: () => {
@@ -6614,14 +6848,14 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6614
6848
  ns
6615
6849
  ))
6616
6850
  ] }),
6617
- hfToken && /* @__PURE__ */ jsxs26(
6851
+ hfToken && /* @__PURE__ */ jsxs27(
6618
6852
  "button",
6619
6853
  {
6620
6854
  disabled: isLoadingFromHF,
6621
6855
  onClick: async () => {
6622
6856
  setIsLoadingFromHF(true);
6623
6857
  try {
6624
- const { hfListProjects: hfListProjects2, hfDownloadProject: hfDownloadProject2 } = await import("./hfStateService-JKEVTY66.mjs");
6858
+ const { hfListProjects: hfListProjects2, hfDownloadProject: hfDownloadProject2 } = await import("./hfStateService-WKQLNDHO.mjs");
6625
6859
  const projects = await hfListProjects2(hfToken);
6626
6860
  if (projects.length > 0) {
6627
6861
  const file = await hfDownloadProject2(projects[0].path, hfToken);
@@ -6636,15 +6870,15 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6636
6870
  className: "w-full flex items-center justify-center gap-3 rounded-2xl font-bold text-[14px] uppercase tracking-wide text-white active:scale-95 transition-transform disabled:opacity-50",
6637
6871
  style: { height: 56, background: "#f59e0b" },
6638
6872
  children: [
6639
- /* @__PURE__ */ jsx28("span", { className: `material-symbols-outlined text-[22px]${isLoadingFromHF ? " animate-spin" : ""}`, children: isLoadingFromHF ? "sync" : "cloud_download" }),
6873
+ /* @__PURE__ */ jsx29("span", { className: `material-symbols-outlined text-[22px]${isLoadingFromHF ? " animate-spin" : ""}`, children: isLoadingFromHF ? "sync" : "cloud_download" }),
6640
6874
  isLoadingFromHF ? "Laden\u2026" : "Von HF laden"
6641
6875
  ]
6642
6876
  }
6643
6877
  ),
6644
- hfToken && /* @__PURE__ */ jsx28("span", { className: "text-white/20 text-[10px] text-center", children: "Letzten Stand von Hugging Face laden" })
6878
+ hfToken && /* @__PURE__ */ jsx29("span", { className: "text-white/20 text-[10px] text-center", children: "Letzten Stand von Hugging Face laden" })
6645
6879
  ] }),
6646
- onFetchServerProjects && /* @__PURE__ */ jsxs26("div", { className: "flex flex-col items-center gap-2 w-full max-w-[280px]", children: [
6647
- /* @__PURE__ */ jsxs26(
6880
+ onFetchServerProjects && /* @__PURE__ */ jsxs27("div", { className: "flex flex-col items-center gap-2 w-full max-w-[280px]", children: [
6881
+ /* @__PURE__ */ jsxs27(
6648
6882
  "button",
6649
6883
  {
6650
6884
  disabled: isLoadingFromServer,
@@ -6665,59 +6899,116 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6665
6899
  className: "w-full flex items-center justify-center gap-3 rounded-2xl font-bold text-[14px] uppercase tracking-wide text-white active:scale-95 transition-transform disabled:opacity-50",
6666
6900
  style: { height: 56, background: "#7c3aed" },
6667
6901
  children: [
6668
- /* @__PURE__ */ jsx28("span", { className: `material-symbols-outlined text-[22px]${isLoadingFromServer ? " animate-spin" : ""}`, children: isLoadingFromServer ? "sync" : "cloud_download" }),
6902
+ /* @__PURE__ */ jsx29("span", { className: `material-symbols-outlined text-[22px]${isLoadingFromServer ? " animate-spin" : ""}`, children: isLoadingFromServer ? "sync" : "cloud_download" }),
6669
6903
  isLoadingFromServer ? "Laden\u2026" : "Vom Server laden"
6670
6904
  ]
6671
6905
  }
6672
6906
  ),
6673
- /* @__PURE__ */ jsx28("span", { className: "text-white/20 text-[10px] text-center", children: "Letzten Stand vom Server wiederherstellen" })
6907
+ /* @__PURE__ */ jsx29("span", { className: "text-white/20 text-[10px] text-center", children: "Letzten Stand vom Server wiederherstellen" })
6908
+ ] }),
6909
+ /* @__PURE__ */ jsxs27("div", { className: "flow-szenen-entry", children: [
6910
+ /* @__PURE__ */ jsxs27(
6911
+ "button",
6912
+ {
6913
+ type: "button",
6914
+ disabled: !szenenPort || !bootstrapTarget.ready,
6915
+ onClick: () => setShowSzenen(true),
6916
+ children: [
6917
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined", children: "movie" }),
6918
+ "Szenen \xF6ffnen"
6919
+ ]
6920
+ }
6921
+ ),
6922
+ !szenenPort && /* @__PURE__ */ jsx29("small", { children: "F\xFCr Szenen zuerst den HF-Token setzen." })
6674
6923
  ] }),
6675
- /* @__PURE__ */ jsxs26("div", { className: "flex flex-col items-center gap-2 w-full max-w-[280px]", children: [
6676
- /* @__PURE__ */ jsx28("span", { className: "text-white/25 text-[10px] uppercase tracking-widest font-bold", children: "Layout w\xE4hlen & starten" }),
6677
- /* @__PURE__ */ jsx28("div", { className: "grid grid-cols-2 gap-2 w-full", children: [
6924
+ /* @__PURE__ */ jsxs27("div", { className: "flex flex-col items-center gap-2 w-full max-w-[280px]", children: [
6925
+ /* @__PURE__ */ jsx29("span", { className: "text-white/25 text-[10px] uppercase tracking-widest font-bold", children: "Layout w\xE4hlen & starten" }),
6926
+ /* @__PURE__ */ jsx29("div", { className: "grid grid-cols-2 gap-2 w-full", children: [
6678
6927
  { id: "mobile", icon: "smartphone", label: "Mobile" },
6679
6928
  { id: "mobile-desktop", icon: "phonelink", label: "Mobile+" },
6680
6929
  { id: "desktop", icon: "desktop_windows", label: "Desktop" },
6681
6930
  { id: "tablet-landscape", icon: "tablet", label: "Landscape" }
6682
- ].map((opt) => /* @__PURE__ */ jsxs26(
6931
+ ].map((opt) => /* @__PURE__ */ jsxs27(
6683
6932
  "button",
6684
6933
  {
6685
6934
  onClick: () => startApp(opt.id),
6686
6935
  className: "flex flex-col items-center gap-2 py-4 rounded-2xl border transition-colors",
6687
6936
  style: { borderColor: layoutChoice === opt.id ? "rgba(255,255,255,0.35)" : "rgba(255,255,255,0.08)", background: layoutChoice === opt.id ? "rgba(255,255,255,0.07)" : "transparent" },
6688
6937
  children: [
6689
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[24px]", style: { color: layoutChoice === opt.id ? "#fff" : "rgba(255,255,255,0.4)" }, children: opt.icon }),
6690
- /* @__PURE__ */ jsx28("span", { className: "text-[11px] font-bold", style: { color: layoutChoice === opt.id ? "#fff" : "rgba(255,255,255,0.4)" }, children: opt.label })
6938
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[24px]", style: { color: layoutChoice === opt.id ? "#fff" : "rgba(255,255,255,0.4)" }, children: opt.icon }),
6939
+ /* @__PURE__ */ jsx29("span", { className: "text-[11px] font-bold", style: { color: layoutChoice === opt.id ? "#fff" : "rgba(255,255,255,0.4)" }, children: opt.label })
6691
6940
  ]
6692
6941
  },
6693
6942
  opt.id
6694
6943
  )) }),
6695
- layoutChoice === "mobile-desktop" && /* @__PURE__ */ jsx28("span", { className: "text-white/20 text-[9px] text-center", children: "Mobil-Layout skaliert f\xFCr Desktop-Modus" }),
6696
- layoutChoice === "tablet-landscape" && /* @__PURE__ */ jsx28("span", { className: "text-white/20 text-[9px] text-center", children: "2-Spalten-Layout f\xFCr Landscape-Tablet im Desktop-Mode" })
6944
+ layoutChoice === "mobile-desktop" && /* @__PURE__ */ jsx29("span", { className: "text-white/20 text-[9px] text-center", children: "Mobil-Layout skaliert f\xFCr Desktop-Modus" }),
6945
+ layoutChoice === "tablet-landscape" && /* @__PURE__ */ jsx29("span", { className: "text-white/20 text-[9px] text-center", children: "2-Spalten-Layout f\xFCr Landscape-Tablet im Desktop-Mode" })
6697
6946
  ] })
6698
6947
  ] });
6699
6948
  }
6949
+ if (requireWorkspaceSelection) {
6950
+ if (!bootstrapTarget.ready) {
6951
+ return /* @__PURE__ */ jsx29("main", { className: "flow-workspace-picker", children: /* @__PURE__ */ jsx29("section", { className: "flow-workspace-picker__card", children: "Zielraum wird bestimmt\u2026" }) });
6952
+ }
6953
+ if (!hfToken) {
6954
+ return /* @__PURE__ */ jsx29("main", { className: "flow-workspace-picker", children: /* @__PURE__ */ jsx29("section", { className: "flow-workspace-picker__card", role: "alert", children: "HF-Token fehlt \u2014 User und Context koennen nicht aus der Tag-Base geladen werden." }) });
6955
+ }
6956
+ if (tagBaseResult.isLoading) {
6957
+ return /* @__PURE__ */ jsx29("main", { className: "flow-workspace-picker", children: /* @__PURE__ */ jsxs27("section", { className: "flow-workspace-picker__card", children: [
6958
+ "Lade User und Contexts aus ",
6959
+ effectiveNamespace,
6960
+ "\u2026"
6961
+ ] }) });
6962
+ }
6963
+ if (tagBaseResult.error) {
6964
+ return /* @__PURE__ */ jsx29("main", { className: "flow-workspace-picker", children: /* @__PURE__ */ jsxs27("section", { className: "flow-workspace-picker__card", role: "alert", children: [
6965
+ "Tag-Base ",
6966
+ effectiveNamespace,
6967
+ " konnte nicht geladen werden: ",
6968
+ tagBaseResult.error
6969
+ ] }) });
6970
+ }
6971
+ if (!tagBaseResult.tagBase) {
6972
+ return /* @__PURE__ */ jsx29("main", { className: "flow-workspace-picker", children: /* @__PURE__ */ jsxs27("section", { className: "flow-workspace-picker__card", role: "alert", children: [
6973
+ "Im Namespace ",
6974
+ effectiveNamespace,
6975
+ " fehlt tags-state-*.zip. Der Server muss zuerst die Tag-Base erzeugen."
6976
+ ] }) });
6977
+ }
6978
+ if (tagBaseResult.needsPicker) {
6979
+ return /* @__PURE__ */ jsx29(
6980
+ FlowWorkspacePicker,
6981
+ {
6982
+ tagBase: tagBaseResult.tagBase,
6983
+ selectedUserId: tagBaseResult.selectedUserId,
6984
+ message: tagBaseResult.pickerMessage,
6985
+ onSelectUser: tagBaseResult.selectUser,
6986
+ onSelectContext: tagBaseResult.selectContext
6987
+ }
6988
+ );
6989
+ }
6990
+ }
6700
6991
  if (layoutChoice === "mobile" || layoutChoice === "mobile-desktop") {
6701
6992
  const mdMode = layoutChoice === "mobile-desktop";
6702
6993
  const mdScale = mdMode ? window.innerWidth / 430 : 1;
6703
6994
  const mdW = mdMode ? 430 : void 0;
6704
6995
  const mdH = mdMode ? Math.ceil(window.innerHeight / mdScale) : void 0;
6705
- const mobileRoot = /* @__PURE__ */ jsxs26("div", { className: "flex flex-col bg-[#0e0e0e] text-white overflow-hidden", style: {
6996
+ const mobileRoot = /* @__PURE__ */ jsxs27("div", { className: "flex flex-col bg-[#0e0e0e] text-white overflow-hidden", style: {
6706
6997
  width: mdMode ? mdW : "100vw",
6707
6998
  height: mdMode ? mdH : "100dvh",
6708
6999
  transform: mdMode ? `scale(${mdScale})` : void 0,
6709
7000
  transformOrigin: mdMode ? "top left" : void 0,
6710
7001
  ...hcStyle || {}
6711
7002
  }, children: [
6712
- mobileTab === "labs" && /* @__PURE__ */ jsx28("div", { className: "flex flex-col flex-1 min-h-0", children: /* @__PURE__ */ jsx28(LabsTab, { services: labServices, onResult: (item) => {
7003
+ mobileTab === "labs" && /* @__PURE__ */ jsx29("div", { className: "flex flex-col flex-1 min-h-0", children: /* @__PURE__ */ jsx29(LabsTab, { services: labServices, onResult: (item) => {
6713
7004
  const frame = item.frames[0];
6714
7005
  if (frame?.base64) {
6715
7006
  setCurrentResult(frameToGeneration(frame, item));
6716
7007
  setMobileTab("stage");
6717
7008
  }
6718
7009
  } }) }),
6719
- mobileTab === "server" && /* @__PURE__ */ jsx28("div", { className: "flex flex-col flex-1 min-h-0 relative", children: /* @__PURE__ */ jsx28(ServerTab, { serverBaseUrl }) }),
6720
- mobileTab === "tags" && workspaceTags && /* @__PURE__ */ jsx28("div", { className: "flex flex-col flex-1 min-h-0", children: /* @__PURE__ */ jsx28(
7010
+ mobileTab === "server" && /* @__PURE__ */ jsx29("div", { className: "flex flex-col flex-1 min-h-0 relative", children: /* @__PURE__ */ jsx29(ServerTab, { serverBaseUrl }) }),
7011
+ mobileTab === "tags" && workspaceTags && /* @__PURE__ */ jsx29("div", { className: "flex flex-col flex-1 min-h-0", children: /* @__PURE__ */ jsx29(
6721
7012
  TagManagerPanel,
6722
7013
  {
6723
7014
  workspaceTags,
@@ -6728,24 +7019,24 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6728
7019
  onTagMove: handleTagMove
6729
7020
  }
6730
7021
  ) }),
6731
- mobileTab === "stage" && /* @__PURE__ */ jsxs26("div", { className: "flex flex-col flex-1 min-h-0", children: [
6732
- /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-2 px-3 border-b border-white/5 bg-black/30 shrink-0", style: { height: 52 }, children: [
6733
- /* @__PURE__ */ jsx28(CompactDropdown, { value: aspectRatio, onChange: setAspectRatio, options: [{ label: "1:1", value: "1:1" }, { label: "16:9", value: "16:9" }, { label: "9:16", value: "9:16" }] }),
6734
- /* @__PURE__ */ jsx28(CompactDropdown, { value: selectedModel, onChange: setSelectedModel, options: [{ value: "\u{1F34C} Nano Banana Pro", label: "\u{1F34C} Nano Banana Pro" }, { value: "\u{1F34C} Nano Banana 2", label: "\u{1F34C} Nano Banana 2" }, { value: "Imagen 4", label: "Imagen 4" }] }),
6735
- /* @__PURE__ */ jsx28(CompactDropdown, { value: String(imageCount), displayValue: `${imageCount}\xD7`, onChange: updateImageCount, options: imageCountOptions }),
6736
- /* @__PURE__ */ jsx28("div", { className: "flex-1" }),
6737
- /* @__PURE__ */ jsx28(TaskExecutor, { openTasks: hfState?.openTasks || {}, onExecute: handleExecuteTask, onTaskCompleted: handleTaskCompleted }),
7022
+ mobileTab === "stage" && /* @__PURE__ */ jsxs27("div", { className: "flex flex-col flex-1 min-h-0", children: [
7023
+ /* @__PURE__ */ jsxs27("div", { className: "flex items-center gap-2 px-3 border-b border-white/5 bg-black/30 shrink-0", style: { height: 52 }, children: [
7024
+ /* @__PURE__ */ jsx29(CompactDropdown, { value: aspectRatio, onChange: setAspectRatio, options: [{ label: "1:1", value: "1:1" }, { label: "16:9", value: "16:9" }, { label: "9:16", value: "9:16" }] }),
7025
+ /* @__PURE__ */ jsx29(CompactDropdown, { value: selectedModel, onChange: setSelectedModel, options: [{ value: "\u{1F34C} Nano Banana Pro", label: "\u{1F34C} Nano Banana Pro" }, { value: "\u{1F34C} Nano Banana 2", label: "\u{1F34C} Nano Banana 2" }, { value: "Imagen 4", label: "Imagen 4" }] }),
7026
+ /* @__PURE__ */ jsx29(CompactDropdown, { value: String(imageCount), displayValue: `${imageCount}\xD7`, onChange: updateImageCount, options: imageCountOptions }),
7027
+ /* @__PURE__ */ jsx29("div", { className: "flex-1" }),
7028
+ /* @__PURE__ */ jsx29(TaskExecutor, { openTasks: hfState?.openTasks || {}, onExecute: handleExecuteTask, onTaskCompleted: handleTaskCompleted }),
6738
7029
  runningBadge,
6739
- activeReferenceThumbnail ? /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-1 rounded-lg border border-white/20 bg-white/5 overflow-hidden mr-2", style: { height: 28 }, children: [
6740
- /* @__PURE__ */ jsx28("img", { src: activeReferenceThumbnail, className: "h-full aspect-square object-cover" }),
6741
- /* @__PURE__ */ jsx28("span", { className: "text-[10px] text-white/60 font-bold uppercase tracking-wide px-1", children: "Ref" }),
6742
- /* @__PURE__ */ jsx28("button", { onClick: clearReference, className: "w-6 h-full flex items-center justify-center text-white/30 active:text-white/80 transition-colors", children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[14px]", children: "close" }) })
6743
- ] }) : /* @__PURE__ */ jsx28("button", { onClick: handleSelectReference, className: "text-white/20 active:text-white/60 transition-colors mr-2", children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[20px]", children: "add_photo_alternate" }) }),
6744
- /* @__PURE__ */ jsx28("button", { onClick: toggleContrast, className: "text-white/20 active:text-white/60 transition-colors mr-2", children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[20px]", children: highContrast ? "light_mode" : "dark_mode" }) }),
6745
- /* @__PURE__ */ jsx28("button", { onClick: () => setShowStart(true), className: "text-white/20 active:text-white/60 transition-colors mr-1", children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[20px]", children: "desktop_windows" }) })
7030
+ activeReferenceThumbnail ? /* @__PURE__ */ jsxs27("div", { className: "flex items-center gap-1 rounded-lg border border-white/20 bg-white/5 overflow-hidden mr-2", style: { height: 28 }, children: [
7031
+ /* @__PURE__ */ jsx29("img", { src: activeReferenceThumbnail, className: "h-full aspect-square object-cover" }),
7032
+ /* @__PURE__ */ jsx29("span", { className: "text-[10px] text-white/60 font-bold uppercase tracking-wide px-1", children: "Ref" }),
7033
+ /* @__PURE__ */ jsx29("button", { onClick: clearReference, className: "w-6 h-full flex items-center justify-center text-white/30 active:text-white/80 transition-colors", children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[14px]", children: "close" }) })
7034
+ ] }) : /* @__PURE__ */ jsx29("button", { onClick: handleSelectReference, className: "text-white/20 active:text-white/60 transition-colors mr-2", children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[20px]", children: "add_photo_alternate" }) }),
7035
+ /* @__PURE__ */ jsx29("button", { onClick: toggleContrast, className: "text-white/20 active:text-white/60 transition-colors mr-2", children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[20px]", children: highContrast ? "light_mode" : "dark_mode" }) }),
7036
+ /* @__PURE__ */ jsx29("button", { onClick: () => setShowStart(true), className: "text-white/20 active:text-white/60 transition-colors mr-1", children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[20px]", children: "desktop_windows" }) })
6746
7037
  ] }),
6747
- /* @__PURE__ */ jsx28("div", { className: "px-3 pt-3 pb-2 shrink-0", children: /* @__PURE__ */ jsxs26("div", { className: `relative rounded-xl border transition-all ${isSynthesizing ? "prompt-loading" : "bg-white/5 border-white/10"}`, children: [
6748
- /* @__PURE__ */ jsx28(
7038
+ /* @__PURE__ */ jsx29("div", { className: "px-3 pt-3 pb-2 shrink-0", children: /* @__PURE__ */ jsxs27("div", { className: `relative rounded-xl border transition-all ${isSynthesizing ? "prompt-loading" : "bg-white/5 border-white/10"}`, children: [
7039
+ /* @__PURE__ */ jsx29(
6749
7040
  "textarea",
6750
7041
  {
6751
7042
  value: activePrompt,
@@ -6755,9 +7046,9 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6755
7046
  placeholder: "Prompt eingeben..."
6756
7047
  }
6757
7048
  ),
6758
- activePrompt && !isSynthesizing && /* @__PURE__ */ jsx28("button", { onClick: () => setActivePrompt(""), className: "absolute top-2 right-2 w-8 h-8 flex items-center justify-center text-white/20 active:text-white transition-colors", children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[18px]", children: "close" }) })
7049
+ activePrompt && !isSynthesizing && /* @__PURE__ */ jsx29("button", { onClick: () => setActivePrompt(""), className: "absolute top-2 right-2 w-8 h-8 flex items-center justify-center text-white/20 active:text-white transition-colors", children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[18px]", children: "close" }) })
6759
7050
  ] }) }),
6760
- /* @__PURE__ */ jsx28("div", { className: "px-3 pb-3 shrink-0", children: /* @__PURE__ */ jsxs26(
7051
+ /* @__PURE__ */ jsx29("div", { className: "px-3 pb-3 shrink-0", children: /* @__PURE__ */ jsxs27(
6761
7052
  "button",
6762
7053
  {
6763
7054
  onClick: () => handleGenerateBatch(),
@@ -6765,13 +7056,13 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6765
7056
  className: "w-full flex items-center justify-center gap-2 rounded-xl font-bold text-[14px] uppercase tracking-wide transition-all disabled:opacity-30 active:scale-95",
6766
7057
  style: { height: 48, background: activePrompt.trim() ? "#0284c7" : void 0, border: "1px solid rgba(255,255,255,0.1)" },
6767
7058
  children: [
6768
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[20px]", children: "bolt" }),
6769
- /* @__PURE__ */ jsx28("span", { children: "Generieren" })
7059
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[20px]", children: "bolt" }),
7060
+ /* @__PURE__ */ jsx29("span", { children: "Generieren" })
6770
7061
  ]
6771
7062
  }
6772
7063
  ) }),
6773
- /* @__PURE__ */ jsxs26("div", { className: "flex-1 min-h-0 px-3 pb-3 flex flex-col", children: [
6774
- /* @__PURE__ */ jsxs26(
7064
+ /* @__PURE__ */ jsxs27("div", { className: "flex-1 min-h-0 px-3 pb-3 flex flex-col", children: [
7065
+ /* @__PURE__ */ jsxs27(
6775
7066
  "div",
6776
7067
  {
6777
7068
  className: "w-full rounded-2xl border border-white/5 bg-black/40 relative overflow-hidden flex items-center justify-center",
@@ -6785,25 +7076,25 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6785
7076
  setTouchStartX(null);
6786
7077
  },
6787
7078
  children: [
6788
- currentResult?.status === "processing" && /* @__PURE__ */ jsxs26("div", { className: "flex flex-col items-center gap-3 opacity-40", children: [
6789
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[40px]", children: "hourglass_top" }),
6790
- /* @__PURE__ */ jsx28("span", { className: "text-[11px] uppercase font-bold tracking-widest", children: "Erstelle Bild..." })
7079
+ currentResult?.status === "processing" && /* @__PURE__ */ jsxs27("div", { className: "flex flex-col items-center gap-3 opacity-40", children: [
7080
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[40px]", children: "hourglass_top" }),
7081
+ /* @__PURE__ */ jsx29("span", { className: "text-[11px] uppercase font-bold tracking-widest", children: "Erstelle Bild..." })
6791
7082
  ] }),
6792
- currentResult?.status === "error" && /* @__PURE__ */ jsxs26("div", { className: "p-6 text-center flex flex-col items-center gap-3", children: [
6793
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-red-400 text-[36px]", children: "warning" }),
6794
- /* @__PURE__ */ jsx28("p", { className: "text-white/50 text-[13px]", children: currentResult.error?.message }),
6795
- /* @__PURE__ */ jsx28("button", { onClick: () => handleGenerateImage(currentResult.prompt), className: "px-4 py-2 rounded-lg border border-white/20 text-[13px] text-white/70 active:bg-white/10", children: "Erneut versuchen" })
7083
+ currentResult?.status === "error" && /* @__PURE__ */ jsxs27("div", { className: "p-6 text-center flex flex-col items-center gap-3", children: [
7084
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-red-400 text-[36px]", children: "warning" }),
7085
+ /* @__PURE__ */ jsx29("p", { className: "text-white/50 text-[13px]", children: currentResult.error?.message }),
7086
+ /* @__PURE__ */ jsx29("button", { onClick: () => handleGenerateImage(currentResult.prompt), className: "px-4 py-2 rounded-lg border border-white/20 text-[13px] text-white/70 active:bg-white/10", children: "Erneut versuchen" })
6796
7087
  ] }),
6797
- currentResult?.status === "done" && currentResult.base64 && /* @__PURE__ */ jsx28("img", { src: currentResult.fullBase64 || currentResult.base64, className: "w-full h-full object-contain" }),
6798
- !currentResult && /* @__PURE__ */ jsxs26("div", { className: "flex flex-col items-center gap-2 opacity-10", children: [
6799
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[64px]", children: "palette" }),
6800
- /* @__PURE__ */ jsx28("span", { className: "text-[11px] font-bold uppercase tracking-[0.2em]", children: "Avatar Architect" })
7088
+ currentResult?.status === "done" && currentResult.base64 && /* @__PURE__ */ jsx29("img", { src: currentResult.fullBase64 || currentResult.base64, className: "w-full h-full object-contain" }),
7089
+ !currentResult && /* @__PURE__ */ jsxs27("div", { className: "flex flex-col items-center gap-2 opacity-10", children: [
7090
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[64px]", children: "palette" }),
7091
+ /* @__PURE__ */ jsx29("span", { className: "text-[11px] font-bold uppercase tracking-[0.2em]", children: "Avatar Architect" })
6801
7092
  ] }),
6802
- currentResult?.status === "done" && /* @__PURE__ */ jsx28("button", { onClick: openFullscreen, className: "absolute top-2 right-2 w-8 h-8 flex items-center justify-center rounded-full bg-black/60 border border-white/10 z-10", children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[18px]", children: "fullscreen" }) }),
6803
- history.length > 1 && currentResult && /* @__PURE__ */ jsxs26(Fragment10, { children: [
6804
- /* @__PURE__ */ jsx28("button", { onClick: goToPrev, disabled: currentIndex <= 0, className: "absolute left-2 top-1/2 -translate-y-1/2 w-10 h-10 flex items-center justify-center rounded-full bg-black/60 border border-white/10 disabled:opacity-0 transition-opacity", children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[22px]", children: "chevron_left" }) }),
6805
- /* @__PURE__ */ jsx28("button", { onClick: goToNext, disabled: currentIndex >= history.length - 1, className: "absolute right-2 top-1/2 -translate-y-1/2 w-10 h-10 flex items-center justify-center rounded-full bg-black/60 border border-white/10 disabled:opacity-0 transition-opacity", children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[22px]", children: "chevron_right" }) }),
6806
- /* @__PURE__ */ jsxs26("div", { className: "absolute bottom-2 left-1/2 -translate-x-1/2 bg-black/60 rounded-full px-3 py-0.5 text-[10px] text-white/40 font-mono", children: [
7093
+ currentResult?.status === "done" && /* @__PURE__ */ jsx29("button", { onClick: openFullscreen, className: "absolute top-2 right-2 w-8 h-8 flex items-center justify-center rounded-full bg-black/60 border border-white/10 z-10", children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[18px]", children: "fullscreen" }) }),
7094
+ history.length > 1 && currentResult && /* @__PURE__ */ jsxs27(Fragment11, { children: [
7095
+ /* @__PURE__ */ jsx29("button", { onClick: goToPrev, disabled: currentIndex <= 0, className: "absolute left-2 top-1/2 -translate-y-1/2 w-10 h-10 flex items-center justify-center rounded-full bg-black/60 border border-white/10 disabled:opacity-0 transition-opacity", children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[22px]", children: "chevron_left" }) }),
7096
+ /* @__PURE__ */ jsx29("button", { onClick: goToNext, disabled: currentIndex >= history.length - 1, className: "absolute right-2 top-1/2 -translate-y-1/2 w-10 h-10 flex items-center justify-center rounded-full bg-black/60 border border-white/10 disabled:opacity-0 transition-opacity", children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[22px]", children: "chevron_right" }) }),
7097
+ /* @__PURE__ */ jsxs27("div", { className: "absolute bottom-2 left-1/2 -translate-x-1/2 bg-black/60 rounded-full px-3 py-0.5 text-[10px] text-white/40 font-mono", children: [
6807
7098
  currentIndex + 1,
6808
7099
  " / ",
6809
7100
  history.length
@@ -6812,8 +7103,8 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6812
7103
  ]
6813
7104
  }
6814
7105
  ),
6815
- currentResult?.status === "done" && currentGroup.length > 1 && /* @__PURE__ */ jsx28("div", { className: "mt-2 flex gap-1.5 overflow-x-auto pb-1", style: { scrollbarWidth: "none" }, children: currentGroup.map((item) => /* @__PURE__ */ jsxs26("div", { style: { position: "relative", flexShrink: 0 }, children: [
6816
- /* @__PURE__ */ jsx28(
7106
+ currentResult?.status === "done" && currentGroup.length > 1 && /* @__PURE__ */ jsx29("div", { className: "mt-2 flex gap-1.5 overflow-x-auto pb-1", style: { scrollbarWidth: "none" }, children: currentGroup.map((item) => /* @__PURE__ */ jsxs27("div", { style: { position: "relative", flexShrink: 0 }, children: [
7107
+ /* @__PURE__ */ jsx29(
6817
7108
  "div",
6818
7109
  {
6819
7110
  onClick: () => handleGallerySelect(item),
@@ -6826,10 +7117,10 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6826
7117
  border: item.id === currentResult.id ? "2px solid rgba(255,255,255,0.8)" : "2px solid rgba(255,255,255,0.15)",
6827
7118
  opacity: item.id === currentResult.id ? 1 : 0.55
6828
7119
  },
6829
- children: /* @__PURE__ */ jsx28("img", { src: item.base64, style: { width: "100%", height: "100%", objectFit: "cover" }, alt: "" })
7120
+ children: /* @__PURE__ */ jsx29("img", { src: item.base64, style: { width: "100%", height: "100%", objectFit: "cover" }, alt: "" })
6830
7121
  }
6831
7122
  ),
6832
- /* @__PURE__ */ jsx28(
7123
+ /* @__PURE__ */ jsx29(
6833
7124
  "button",
6834
7125
  {
6835
7126
  onClick: (e) => {
@@ -6851,34 +7142,34 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6851
7142
  alignItems: "center",
6852
7143
  justifyContent: "center"
6853
7144
  },
6854
- children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined", style: { fontSize: 9, color: item.titleTs ? "#fff" : "rgba(255,255,255,0.5)", lineHeight: 1 }, children: "star" })
7145
+ children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined", style: { fontSize: 9, color: item.titleTs ? "#fff" : "rgba(255,255,255,0.5)", lineHeight: 1 }, children: "star" })
6855
7146
  }
6856
7147
  )
6857
7148
  ] }, item.id)) }),
6858
- currentResult?.status === "done" && /* @__PURE__ */ jsxs26("div", { className: "flex gap-2 mt-3", children: [
6859
- /* @__PURE__ */ jsxs26("button", { onClick: () => setActivePrompt(currentResult.prompt || ""), className: "flex-1 flex items-center justify-center gap-1.5 rounded-xl border border-white/10 bg-white/5 active:bg-white/10 transition-colors", style: { height: 44 }, children: [
6860
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[18px] text-white/60", children: "replay" }),
6861
- /* @__PURE__ */ jsx28("span", { className: "text-[12px] text-white/60", children: "Prompt" })
7149
+ currentResult?.status === "done" && /* @__PURE__ */ jsxs27("div", { className: "flex gap-2 mt-3", children: [
7150
+ /* @__PURE__ */ jsxs27("button", { onClick: () => setActivePrompt(currentResult.prompt || ""), className: "flex-1 flex items-center justify-center gap-1.5 rounded-xl border border-white/10 bg-white/5 active:bg-white/10 transition-colors", style: { height: 44 }, children: [
7151
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[18px] text-white/60", children: "replay" }),
7152
+ /* @__PURE__ */ jsx29("span", { className: "text-[12px] text-white/60", children: "Prompt" })
6862
7153
  ] }),
6863
- /* @__PURE__ */ jsxs26("button", { onClick: () => handleGenerateBatch(currentResult.prompt || activePrompt, currentResult.mediaId, void 0, { silent: true }), className: "flex-1 flex items-center justify-center gap-1.5 rounded-xl bg-white/10 active:bg-white/15 transition-colors", style: { height: 44 }, children: [
6864
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[18px] text-white/80", children: "auto_fix_high" }),
6865
- /* @__PURE__ */ jsx28("span", { className: "text-[12px] text-white/80 font-bold", children: "Referenz" })
7154
+ /* @__PURE__ */ jsxs27("button", { onClick: () => handleGenerateBatch(currentResult.prompt || activePrompt, currentResult.mediaId, void 0, { silent: true }), className: "flex-1 flex items-center justify-center gap-1.5 rounded-xl bg-white/10 active:bg-white/15 transition-colors", style: { height: 44 }, children: [
7155
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[18px] text-white/80", children: "auto_fix_high" }),
7156
+ /* @__PURE__ */ jsx29("span", { className: "text-[12px] text-white/80 font-bold", children: "Referenz" })
6866
7157
  ] }),
6867
- /* @__PURE__ */ jsxs26("button", { onClick: handleDownloadSingle, className: "flex-1 flex items-center justify-center gap-1.5 rounded-xl border border-white/10 bg-white/5 active:bg-white/10 transition-colors", style: { height: 44 }, children: [
6868
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[18px] text-white/60", children: "download" }),
6869
- /* @__PURE__ */ jsx28("span", { className: "text-[12px] text-white/60", children: "Laden" })
7158
+ /* @__PURE__ */ jsxs27("button", { onClick: handleDownloadSingle, className: "flex-1 flex items-center justify-center gap-1.5 rounded-xl border border-white/10 bg-white/5 active:bg-white/10 transition-colors", style: { height: 44 }, children: [
7159
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[18px] text-white/60", children: "download" }),
7160
+ /* @__PURE__ */ jsx29("span", { className: "text-[12px] text-white/60", children: "Laden" })
6870
7161
  ] })
6871
7162
  ] })
6872
7163
  ] })
6873
7164
  ] }),
6874
- mobileTab === "browse" && /* @__PURE__ */ jsxs26("div", { className: "flex flex-col flex-1 min-h-0", children: [
6875
- /* @__PURE__ */ jsxs26("div", { className: "flex border-b border-white/5 shrink-0", style: { height: 52 }, children: [
6876
- ["history", "gallery", "inspect"].map((tab) => /* @__PURE__ */ jsx28("button", { onClick: () => setActiveTab(tab), className: `flex-1 flex items-center justify-center gap-1.5 transition-colors text-[11px] font-bold uppercase tracking-wide ${activeTab === tab ? "text-white border-b-2 border-white" : "text-white/30"}`, children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[20px]", children: tab === "history" ? "history" : tab === "gallery" ? "photo_library" : "info" }) }, tab)),
6877
- hfToken && /* @__PURE__ */ jsx28("button", { onClick: () => refreshHF(), disabled: isHfRefreshing, className: "w-12 flex items-center justify-center text-white/20 active:text-white transition-colors disabled:opacity-30", children: /* @__PURE__ */ jsx28("span", { className: `material-symbols-outlined text-[20px]${isHfRefreshing ? " animate-spin" : ""}`, children: "sync" }) })
7165
+ mobileTab === "browse" && /* @__PURE__ */ jsxs27("div", { className: "flex flex-col flex-1 min-h-0", children: [
7166
+ /* @__PURE__ */ jsxs27("div", { className: "flex border-b border-white/5 shrink-0", style: { height: 52 }, children: [
7167
+ ["history", "gallery", "inspect"].map((tab) => /* @__PURE__ */ jsx29("button", { onClick: () => setActiveTab(tab), className: `flex-1 flex items-center justify-center gap-1.5 transition-colors text-[11px] font-bold uppercase tracking-wide ${activeTab === tab ? "text-white border-b-2 border-white" : "text-white/30"}`, children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[20px]", children: tab === "history" ? "history" : tab === "gallery" ? "photo_library" : "info" }) }, tab)),
7168
+ hfToken && /* @__PURE__ */ jsx29("button", { onClick: () => refreshHF(), disabled: isHfRefreshing, className: "w-12 flex items-center justify-center text-white/20 active:text-white transition-colors disabled:opacity-30", children: /* @__PURE__ */ jsx29("span", { className: `material-symbols-outlined text-[20px]${isHfRefreshing ? " animate-spin" : ""}`, children: "sync" }) })
6878
7169
  ] }),
6879
- /* @__PURE__ */ jsxs26("div", { className: "flex-1 overflow-hidden relative", children: [
6880
- activeTab === "history" && /* @__PURE__ */ jsx28(HistoryPanel, { history, currentResultId: currentResult?.id || null, onSelect: handleGallerySelect, onDelete: (id) => setHistory((h) => h.filter((x) => x.id !== id)), visibleCount: historyVisibleCount, onLoadMore: () => setHistoryVisibleCount((c) => c + 20) }),
6881
- activeTab === "gallery" && /* @__PURE__ */ jsx28(
7170
+ /* @__PURE__ */ jsxs27("div", { className: "flex-1 overflow-hidden relative", children: [
7171
+ activeTab === "history" && /* @__PURE__ */ jsx29(HistoryPanel, { history, currentResultId: currentResult?.id || null, onSelect: handleGallerySelect, onDelete: (id) => setHistory((h) => h.filter((x) => x.id !== id)), visibleCount: historyVisibleCount, onLoadMore: () => setHistoryVisibleCount((c) => c + 20) }),
7172
+ activeTab === "gallery" && /* @__PURE__ */ jsx29(
6882
7173
  MediaLibrary,
6883
7174
  {
6884
7175
  items: galleryItems,
@@ -6897,44 +7188,44 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6897
7188
  onLoadMore: () => setGalleryVisibleCount((c) => c + 20)
6898
7189
  }
6899
7190
  ),
6900
- activeTab === "inspect" && /* @__PURE__ */ jsx28(InspectPanel, { currentResult, history, onSelect: (g) => {
7191
+ activeTab === "inspect" && /* @__PURE__ */ jsx29(InspectPanel, { currentResult, history, onSelect: (g) => {
6901
7192
  setCurrentResult(g);
6902
7193
  } })
6903
7194
  ] })
6904
7195
  ] }),
6905
- /* @__PURE__ */ jsxs26("div", { style: { display: mobileTab === "tools" ? "flex" : "none" }, className: "flex flex-col flex-1 min-h-0", children: [
6906
- /* @__PURE__ */ jsxs26("div", { className: "flex border-b border-white/5 shrink-0", style: { height: 52 }, children: [
6907
- workspaceTags && /* @__PURE__ */ jsxs26("button", { onClick: () => {
7196
+ /* @__PURE__ */ jsxs27("div", { style: { display: mobileTab === "tools" ? "flex" : "none" }, className: "flex flex-col flex-1 min-h-0", children: [
7197
+ /* @__PURE__ */ jsxs27("div", { className: "flex border-b border-white/5 shrink-0", style: { height: 52 }, children: [
7198
+ workspaceTags && /* @__PURE__ */ jsxs27("button", { onClick: () => {
6908
7199
  setLeftTab("prompt");
6909
7200
  if (activeTab === "setup" || activeTab === "sync") setActiveTab("history");
6910
7201
  }, className: `flex-1 flex items-center justify-center gap-1.5 text-[11px] font-bold uppercase tracking-wide transition-colors ${leftTab === "prompt" && activeTab !== "setup" && activeTab !== "sync" ? "text-white border-b-2 border-white" : "text-white/30"}`, children: [
6911
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[20px]", children: "auto_fix_high" }),
7202
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[20px]", children: "auto_fix_high" }),
6912
7203
  "Prompt"
6913
7204
  ] }),
6914
- /* @__PURE__ */ jsxs26("button", { onClick: () => {
7205
+ /* @__PURE__ */ jsxs27("button", { onClick: () => {
6915
7206
  setLeftTab("hierarchy");
6916
7207
  if (activeTab === "setup" || activeTab === "sync") setActiveTab("history");
6917
7208
  }, className: `flex-1 flex items-center justify-center gap-1.5 text-[11px] font-bold uppercase tracking-wide transition-colors ${leftTab === "hierarchy" && activeTab !== "setup" && activeTab !== "sync" ? "text-white border-b-2 border-white" : "text-white/30"}`, children: [
6918
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[20px]", children: "account_tree" }),
7209
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[20px]", children: "account_tree" }),
6919
7210
  "Hierarchie"
6920
7211
  ] }),
6921
- /* @__PURE__ */ jsxs26("button", { onClick: () => setActiveTab("setup"), className: `flex-1 flex items-center justify-center gap-1.5 text-[11px] font-bold uppercase tracking-wide transition-colors ${activeTab === "setup" ? "text-white border-b-2 border-white" : "text-white/30"}`, children: [
6922
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[20px]", children: "settings" }),
7212
+ /* @__PURE__ */ jsxs27("button", { onClick: () => setActiveTab("setup"), className: `flex-1 flex items-center justify-center gap-1.5 text-[11px] font-bold uppercase tracking-wide transition-colors ${activeTab === "setup" ? "text-white border-b-2 border-white" : "text-white/30"}`, children: [
7213
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[20px]", children: "settings" }),
6923
7214
  "Setup"
6924
7215
  ] }),
6925
- /* @__PURE__ */ jsxs26("button", { onClick: () => setActiveTab("sync"), className: `flex-1 flex items-center justify-center gap-1.5 text-[11px] font-bold uppercase tracking-wide transition-colors ${activeTab === "sync" ? "text-white border-b-2 border-white" : "text-white/30"}`, children: [
6926
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[20px]", children: "cloud_sync" }),
7216
+ /* @__PURE__ */ jsxs27("button", { onClick: () => setActiveTab("sync"), className: `flex-1 flex items-center justify-center gap-1.5 text-[11px] font-bold uppercase tracking-wide transition-colors ${activeTab === "sync" ? "text-white border-b-2 border-white" : "text-white/30"}`, children: [
7217
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[20px]", children: "cloud_sync" }),
6927
7218
  "Sync"
6928
7219
  ] }),
6929
- /* @__PURE__ */ jsxs26("button", { onClick: () => setActiveTab("hftest"), className: `flex-1 flex items-center justify-center gap-1.5 text-[11px] font-bold uppercase tracking-wide transition-colors ${activeTab === "hftest" ? "text-white border-b-2 border-white" : "text-white/30"}`, children: [
6930
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[20px]", children: "biotech" }),
7220
+ /* @__PURE__ */ jsxs27("button", { onClick: () => setActiveTab("hftest"), className: `flex-1 flex items-center justify-center gap-1.5 text-[11px] font-bold uppercase tracking-wide transition-colors ${activeTab === "hftest" ? "text-white border-b-2 border-white" : "text-white/30"}`, children: [
7221
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[20px]", children: "biotech" }),
6931
7222
  "HF"
6932
7223
  ] }),
6933
- serverBaseUrl && /* @__PURE__ */ jsx28("button", { onClick: () => setActiveTab("server"), className: `flex-1 flex items-center justify-center gap-1.5 text-[11px] font-bold uppercase tracking-wide transition-colors ${activeTab === "server" ? "text-white border-b-2 border-white" : "text-white/30"}`, children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[20px]", children: "storage" }) }),
6934
- workspaceTags && /* @__PURE__ */ jsx28("button", { onClick: () => setActiveTab("tags"), className: `flex-1 flex items-center justify-center gap-1.5 text-[11px] font-bold uppercase tracking-wide transition-colors ${activeTab === "tags" ? "text-white border-b-2 border-white" : "text-white/30"}`, children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[20px]", children: "label" }) })
7224
+ serverBaseUrl && /* @__PURE__ */ jsx29("button", { onClick: () => setActiveTab("server"), className: `flex-1 flex items-center justify-center gap-1.5 text-[11px] font-bold uppercase tracking-wide transition-colors ${activeTab === "server" ? "text-white border-b-2 border-white" : "text-white/30"}`, children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[20px]", children: "storage" }) }),
7225
+ workspaceTags && /* @__PURE__ */ jsx29("button", { onClick: () => setActiveTab("tags"), className: `flex-1 flex items-center justify-center gap-1.5 text-[11px] font-bold uppercase tracking-wide transition-colors ${activeTab === "tags" ? "text-white border-b-2 border-white" : "text-white/30"}`, children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[20px]", children: "label" }) })
6935
7226
  ] }),
6936
- /* @__PURE__ */ jsxs26("div", { className: "flex-1 overflow-hidden relative", children: [
6937
- leftTab === "hierarchy" && activeTab !== "setup" && activeTab !== "sync" && activeTab !== "hftest" && /* @__PURE__ */ jsx28("div", { className: "absolute inset-0", children: /* @__PURE__ */ jsx28(
7227
+ /* @__PURE__ */ jsxs27("div", { className: "flex-1 overflow-hidden relative", children: [
7228
+ leftTab === "hierarchy" && activeTab !== "setup" && activeTab !== "sync" && activeTab !== "hftest" && /* @__PURE__ */ jsx29("div", { className: "absolute inset-0", children: /* @__PURE__ */ jsx29(
6938
7229
  ListView,
6939
7230
  {
6940
7231
  nodes,
@@ -6965,12 +7256,12 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6965
7256
  isGeneratingNodeId: (id) => isSynthesizing && focusedNodeId === id
6966
7257
  }
6967
7258
  ) }),
6968
- workspaceTags && /* @__PURE__ */ jsx28("div", { style: { display: leftTab === "prompt" && activeTab !== "setup" && activeTab !== "sync" && activeTab !== "hftest" ? "flex" : "none" }, className: "absolute inset-0 flex-col", children: /* @__PURE__ */ jsx28(PromptTab, { workspaceTags, onGenerate: handlePromptTabGenerate, isGenerating: isPromptTabGenerating, feedback: promptFeedback, promptResult: activePrompt || null, lastPayload: lastPromptPayload, onGenerateImage: (prompt) => {
7259
+ workspaceTags && /* @__PURE__ */ jsx29("div", { style: { display: leftTab === "prompt" && activeTab !== "setup" && activeTab !== "sync" && activeTab !== "hftest" ? "flex" : "none" }, className: "absolute inset-0 flex-col", children: /* @__PURE__ */ jsx29(PromptTab, { workspaceTags, onGenerate: handlePromptTabGenerate, isGenerating: isPromptTabGenerating, feedback: promptFeedback, promptResult: activePrompt || null, lastPayload: lastPromptPayload, onGenerateImage: (prompt) => {
6969
7260
  handleGenerateBatch(prompt);
6970
7261
  setMobileTab("stage");
6971
7262
  }, onTagCreate: handleTagCreate, onTagUpdate: handleTagUpdate, onTagDelete: handleTagDelete, onScanImage: handleScanImage, isScanning: isScanningImage }) }),
6972
- activeTab === "setup" && /* @__PURE__ */ jsx28(SetupPanel, { onWorkspaceImport: handleWorkspaceImport, buildInfo, tagBase: tagBaseResult }),
6973
- activeTab === "sync" && /* @__PURE__ */ jsx28(
7263
+ activeTab === "setup" && /* @__PURE__ */ jsx29(SetupPanel, { onWorkspaceImport: handleWorkspaceImport, buildInfo, tagBase: tagBaseResult }),
7264
+ activeTab === "sync" && /* @__PURE__ */ jsx29(
6974
7265
  ProjectSyncTab,
6975
7266
  {
6976
7267
  topSlot: syncTopSlot,
@@ -6994,7 +7285,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
6994
7285
  onHfInitialSync: hfToken ? handleHfInitialSync : void 0
6995
7286
  }
6996
7287
  ),
6997
- activeTab === "tags" && workspaceTags && /* @__PURE__ */ jsx28(
7288
+ activeTab === "tags" && workspaceTags && /* @__PURE__ */ jsx29(
6998
7289
  TagManagerPanel,
6999
7290
  {
7000
7291
  workspaceTags,
@@ -7005,7 +7296,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
7005
7296
  onTagMove: handleTagMove
7006
7297
  }
7007
7298
  ),
7008
- activeTab === "hftest" && /* @__PURE__ */ jsx28("div", { className: "absolute inset-0", children: /* @__PURE__ */ jsx28(
7299
+ activeTab === "hftest" && /* @__PURE__ */ jsx29("div", { className: "absolute inset-0", children: /* @__PURE__ */ jsx29(
7009
7300
  HFTestTab,
7010
7301
  {
7011
7302
  token: hfToken,
@@ -7017,23 +7308,24 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
7017
7308
  missingImages: hfMissingImages
7018
7309
  }
7019
7310
  ) }),
7020
- activeTab === "server" && /* @__PURE__ */ jsx28("div", { className: "absolute inset-0", children: /* @__PURE__ */ jsx28(ServerTab, { serverBaseUrl }) })
7311
+ activeTab === "server" && /* @__PURE__ */ jsx29("div", { className: "absolute inset-0", children: /* @__PURE__ */ jsx29(ServerTab, { serverBaseUrl }) })
7021
7312
  ] })
7022
7313
  ] }),
7023
- /* @__PURE__ */ jsx28("div", { className: "flex border-t border-white/10 bg-black shrink-0", style: { height: 56, paddingBottom: "env(safe-area-inset-bottom, 0px)" }, children: [
7314
+ /* @__PURE__ */ jsx29("div", { className: "flex overflow-x-auto border-t border-white/10 bg-black shrink-0", style: { height: 56, paddingBottom: "env(safe-area-inset-bottom, 0px)" }, children: [
7024
7315
  { id: "tools", icon: "auto_fix_high", label: "Prompt" },
7316
+ { id: "szenen", icon: "movie", label: "Szenen" },
7025
7317
  { id: "stage", icon: "palette", label: "Stage" },
7026
7318
  { id: "labs", icon: "science", label: "Labs" },
7027
7319
  ...workspaceTags ? [{ id: "tags", icon: "label", label: "Tags" }] : [],
7028
7320
  { id: "browse", icon: "photo_library", label: "Galerie" },
7029
7321
  ...serverBaseUrl ? [{ id: "server", icon: "storage", label: "Server" }] : []
7030
- ].map((tab) => /* @__PURE__ */ jsxs26("button", { onClick: () => setMobileTab(tab.id), className: `flex-1 flex flex-col items-center justify-center gap-0.5 transition-colors ${mobileTab === tab.id ? "text-white" : "text-white/30"}`, children: [
7031
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[24px]", children: tab.icon }),
7032
- /* @__PURE__ */ jsx28("span", { className: "text-[10px] font-bold uppercase tracking-wide", children: tab.label })
7322
+ ].map((tab) => /* @__PURE__ */ jsxs27("button", { onClick: () => tab.id === "szenen" ? setShowSzenen(true) : setMobileTab(tab.id), className: `flex-none min-w-[64px] flex flex-col items-center justify-center gap-0.5 transition-colors ${mobileTab === tab.id ? "text-white" : "text-white/30"}`, children: [
7323
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[24px]", children: tab.icon }),
7324
+ /* @__PURE__ */ jsx29("span", { className: "text-[10px] font-bold uppercase tracking-wide", children: tab.label })
7033
7325
  ] }, tab.id)) })
7034
7326
  ] });
7035
7327
  if (mdMode) {
7036
- return /* @__PURE__ */ jsx28("div", { style: { position: "fixed", inset: 0, overflow: "hidden", background: "#0e0e0e" }, children: mobileRoot });
7328
+ return /* @__PURE__ */ jsx29("div", { style: { position: "fixed", inset: 0, overflow: "hidden", background: "#0e0e0e" }, children: mobileRoot });
7037
7329
  }
7038
7330
  return mobileRoot;
7039
7331
  }
@@ -7041,20 +7333,20 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
7041
7333
  const tlScale = Math.min(window.innerWidth / 920, window.innerHeight / 520);
7042
7334
  const tlW = 920;
7043
7335
  const tlH = 520;
7044
- return /* @__PURE__ */ jsx28("div", { style: { position: "fixed", inset: 0, background: "#0e0e0e", display: "flex", alignItems: "center", justifyContent: "center", overflow: "hidden", ...hcStyle || {} }, children: /* @__PURE__ */ jsxs26("div", { style: { width: tlW, height: tlH, transform: `scale(${tlScale})`, transformOrigin: "center center", display: "flex", flexDirection: "row", color: "#fff", overflow: "hidden", borderRadius: 0 }, children: [
7045
- /* @__PURE__ */ jsxs26("div", { style: { width: 320, height: tlH, display: "flex", flexDirection: "column", borderRight: "1px solid rgba(255,255,255,0.05)", background: "#000", flexShrink: 0 }, children: [
7046
- /* @__PURE__ */ jsxs26("div", { style: { height: 52, borderBottom: "1px solid rgba(255,255,255,0.05)", display: "flex", alignItems: "center", gap: 8, padding: "0 12px", flexShrink: 0 }, children: [
7047
- /* @__PURE__ */ jsx28(CompactDropdown, { value: aspectRatio, onChange: setAspectRatio, options: [{ label: "1:1", value: "1:1" }, { label: "16:9", value: "16:9" }, { label: "9:16", value: "9:16" }] }),
7048
- /* @__PURE__ */ jsx28(CompactDropdown, { value: selectedModel, onChange: setSelectedModel, options: [{ value: "\u{1F34C} Nano Banana Pro", label: "\u{1F34C} Nano Banana Pro" }, { value: "\u{1F34C} Nano Banana 2", label: "\u{1F34C} Nano Banana 2" }, { value: "Imagen 4", label: "Imagen 4" }] }),
7049
- /* @__PURE__ */ jsx28(CompactDropdown, { value: String(imageCount), displayValue: `${imageCount}\xD7`, onChange: updateImageCount, options: imageCountOptions }),
7050
- /* @__PURE__ */ jsx28("div", { style: { flex: 1 } }),
7051
- /* @__PURE__ */ jsx28(TaskExecutor, { openTasks: hfState?.openTasks || {}, onExecute: handleExecuteTask, onTaskCompleted: handleTaskCompleted }),
7336
+ return /* @__PURE__ */ jsx29("div", { style: { position: "fixed", inset: 0, background: "#0e0e0e", display: "flex", alignItems: "center", justifyContent: "center", overflow: "hidden", ...hcStyle || {} }, children: /* @__PURE__ */ jsxs27("div", { style: { width: tlW, height: tlH, transform: `scale(${tlScale})`, transformOrigin: "center center", display: "flex", flexDirection: "row", color: "#fff", overflow: "hidden", borderRadius: 0 }, children: [
7337
+ /* @__PURE__ */ jsxs27("div", { style: { width: 320, height: tlH, display: "flex", flexDirection: "column", borderRight: "1px solid rgba(255,255,255,0.05)", background: "#000", flexShrink: 0 }, children: [
7338
+ /* @__PURE__ */ jsxs27("div", { style: { height: 52, borderBottom: "1px solid rgba(255,255,255,0.05)", display: "flex", alignItems: "center", gap: 8, padding: "0 12px", flexShrink: 0 }, children: [
7339
+ /* @__PURE__ */ jsx29(CompactDropdown, { value: aspectRatio, onChange: setAspectRatio, options: [{ label: "1:1", value: "1:1" }, { label: "16:9", value: "16:9" }, { label: "9:16", value: "9:16" }] }),
7340
+ /* @__PURE__ */ jsx29(CompactDropdown, { value: selectedModel, onChange: setSelectedModel, options: [{ value: "\u{1F34C} Nano Banana Pro", label: "\u{1F34C} Nano Banana Pro" }, { value: "\u{1F34C} Nano Banana 2", label: "\u{1F34C} Nano Banana 2" }, { value: "Imagen 4", label: "Imagen 4" }] }),
7341
+ /* @__PURE__ */ jsx29(CompactDropdown, { value: String(imageCount), displayValue: `${imageCount}\xD7`, onChange: updateImageCount, options: imageCountOptions }),
7342
+ /* @__PURE__ */ jsx29("div", { style: { flex: 1 } }),
7343
+ /* @__PURE__ */ jsx29(TaskExecutor, { openTasks: hfState?.openTasks || {}, onExecute: handleExecuteTask, onTaskCompleted: handleTaskCompleted }),
7052
7344
  runningBadge,
7053
- /* @__PURE__ */ jsx28("button", { onClick: toggleContrast, style: { color: "rgba(255,255,255,0.2)", background: "none", border: "none", cursor: "pointer", padding: 4, lineHeight: 0 }, children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined", style: { fontSize: 18 }, children: highContrast ? "light_mode" : "dark_mode" }) }),
7054
- /* @__PURE__ */ jsx28("button", { onClick: () => setShowStart(true), style: { color: "rgba(255,255,255,0.2)", background: "none", border: "none", cursor: "pointer", padding: 4, lineHeight: 0 }, children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined", style: { fontSize: 18 }, children: "apps" }) })
7345
+ /* @__PURE__ */ jsx29("button", { onClick: toggleContrast, style: { color: "rgba(255,255,255,0.2)", background: "none", border: "none", cursor: "pointer", padding: 4, lineHeight: 0 }, children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined", style: { fontSize: 18 }, children: highContrast ? "light_mode" : "dark_mode" }) }),
7346
+ /* @__PURE__ */ jsx29("button", { onClick: () => setShowStart(true), style: { color: "rgba(255,255,255,0.2)", background: "none", border: "none", cursor: "pointer", padding: 4, lineHeight: 0 }, children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined", style: { fontSize: 18 }, children: "apps" }) })
7055
7347
  ] }),
7056
- /* @__PURE__ */ jsx28("div", { style: { padding: "12px 12px 8px", flexShrink: 0 }, children: /* @__PURE__ */ jsxs26("div", { style: { position: "relative", borderRadius: 12, border: `1px solid ${isSynthesizing ? "rgba(255,255,255,0.2)" : "rgba(255,255,255,0.1)"}`, background: "rgba(255,255,255,0.05)" }, children: [
7057
- /* @__PURE__ */ jsx28(
7348
+ /* @__PURE__ */ jsx29("div", { style: { padding: "12px 12px 8px", flexShrink: 0 }, children: /* @__PURE__ */ jsxs27("div", { style: { position: "relative", borderRadius: 12, border: `1px solid ${isSynthesizing ? "rgba(255,255,255,0.2)" : "rgba(255,255,255,0.1)"}`, background: "rgba(255,255,255,0.05)" }, children: [
7349
+ /* @__PURE__ */ jsx29(
7058
7350
  "textarea",
7059
7351
  {
7060
7352
  value: activePrompt,
@@ -7063,24 +7355,24 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
7063
7355
  placeholder: "Prompt eingeben..."
7064
7356
  }
7065
7357
  ),
7066
- activePrompt && /* @__PURE__ */ jsx28("button", { onClick: () => setActivePrompt(""), style: { position: "absolute", top: 6, right: 6, width: 22, height: 22, display: "flex", alignItems: "center", justifyContent: "center", color: "rgba(255,255,255,0.2)", background: "none", border: "none", cursor: "pointer", padding: 0 }, children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined", style: { fontSize: 15 }, children: "close" }) })
7358
+ activePrompt && /* @__PURE__ */ jsx29("button", { onClick: () => setActivePrompt(""), style: { position: "absolute", top: 6, right: 6, width: 22, height: 22, display: "flex", alignItems: "center", justifyContent: "center", color: "rgba(255,255,255,0.2)", background: "none", border: "none", cursor: "pointer", padding: 0 }, children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined", style: { fontSize: 15 }, children: "close" }) })
7067
7359
  ] }) }),
7068
- /* @__PURE__ */ jsx28("div", { style: { padding: "0 12px 10px", flexShrink: 0 }, children: /* @__PURE__ */ jsxs26(
7360
+ /* @__PURE__ */ jsx29("div", { style: { padding: "0 12px 10px", flexShrink: 0 }, children: /* @__PURE__ */ jsxs27(
7069
7361
  "button",
7070
7362
  {
7071
7363
  onClick: () => handleGenerateBatch(),
7072
7364
  disabled: !activePrompt.trim(),
7073
7365
  style: { width: "100%", height: 42, display: "flex", alignItems: "center", justifyContent: "center", gap: 8, borderRadius: 10, fontWeight: "bold", fontSize: 13, textTransform: "uppercase", letterSpacing: "0.05em", border: "1px solid rgba(255,255,255,0.1)", background: activePrompt.trim() ? "#0284c7" : "transparent", color: "#fff", cursor: activePrompt.trim() ? "pointer" : "default", opacity: !activePrompt.trim() ? 0.3 : 1, fontFamily: "inherit", transition: "background 0.2s" },
7074
7366
  children: [
7075
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined", style: { fontSize: 18 }, children: "bolt" }),
7076
- /* @__PURE__ */ jsx28("span", { children: "Generieren" })
7367
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined", style: { fontSize: 18 }, children: "bolt" }),
7368
+ /* @__PURE__ */ jsx29("span", { children: "Generieren" })
7077
7369
  ]
7078
7370
  }
7079
7371
  ) }),
7080
- /* @__PURE__ */ jsx28("div", { style: { flex: 1, overflow: "hidden", position: "relative" }, children: /* @__PURE__ */ jsx28(HistoryPanel, { history, currentResultId: currentResult?.id || null, onSelect: handleGallerySelect, onDelete: (id) => setHistory((h) => h.filter((x) => x.id !== id)), visibleCount: historyVisibleCount, onLoadMore: () => setHistoryVisibleCount((c) => c + 20) }) })
7372
+ /* @__PURE__ */ jsx29("div", { style: { flex: 1, overflow: "hidden", position: "relative" }, children: /* @__PURE__ */ jsx29(HistoryPanel, { history, currentResultId: currentResult?.id || null, onSelect: handleGallerySelect, onDelete: (id) => setHistory((h) => h.filter((x) => x.id !== id)), visibleCount: historyVisibleCount, onLoadMore: () => setHistoryVisibleCount((c) => c + 20) }) })
7081
7373
  ] }),
7082
- /* @__PURE__ */ jsxs26("div", { style: { flex: 1, height: tlH, display: "flex", flexDirection: "column", background: "#0b0b0b" }, children: [
7083
- /* @__PURE__ */ jsx28(
7374
+ /* @__PURE__ */ jsxs27("div", { style: { flex: 1, height: tlH, display: "flex", flexDirection: "column", background: "#0b0b0b" }, children: [
7375
+ /* @__PURE__ */ jsx29(
7084
7376
  "div",
7085
7377
  {
7086
7378
  style: { flex: 1, padding: 16, display: "flex", alignItems: "center", justifyContent: "center", position: "relative" },
@@ -7092,26 +7384,26 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
7092
7384
  else if (dx > 50) goToPrev();
7093
7385
  setTouchStartX(null);
7094
7386
  },
7095
- children: /* @__PURE__ */ jsxs26("div", { style: { height: "100%", width: "100%", borderRadius: 20, border: "1px solid rgba(255,255,255,0.05)", background: "rgba(0,0,0,0.4)", position: "relative", overflow: "hidden", display: "flex", alignItems: "center", justifyContent: "center" }, children: [
7096
- currentResult?.status === "processing" && /* @__PURE__ */ jsxs26("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", gap: 12, opacity: 0.4 }, children: [
7097
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined", style: { fontSize: 36 }, children: "hourglass_top" }),
7098
- /* @__PURE__ */ jsx28("span", { style: { fontSize: 10, color: "rgba(255,255,255,0.6)", textTransform: "uppercase", fontWeight: "bold", letterSpacing: "0.15em" }, children: "Erstelle Bild..." })
7387
+ children: /* @__PURE__ */ jsxs27("div", { style: { height: "100%", width: "100%", borderRadius: 20, border: "1px solid rgba(255,255,255,0.05)", background: "rgba(0,0,0,0.4)", position: "relative", overflow: "hidden", display: "flex", alignItems: "center", justifyContent: "center" }, children: [
7388
+ currentResult?.status === "processing" && /* @__PURE__ */ jsxs27("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", gap: 12, opacity: 0.4 }, children: [
7389
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined", style: { fontSize: 36 }, children: "hourglass_top" }),
7390
+ /* @__PURE__ */ jsx29("span", { style: { fontSize: 10, color: "rgba(255,255,255,0.6)", textTransform: "uppercase", fontWeight: "bold", letterSpacing: "0.15em" }, children: "Erstelle Bild..." })
7099
7391
  ] }),
7100
- currentResult?.status === "error" && /* @__PURE__ */ jsxs26("div", { style: { padding: 24, textAlign: "center", display: "flex", flexDirection: "column", alignItems: "center", gap: 12 }, children: [
7101
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined", style: { fontSize: 32, color: "#f87171" }, children: "warning" }),
7102
- /* @__PURE__ */ jsx28("p", { style: { fontSize: 11, color: "rgba(255,255,255,0.5)", margin: 0 }, children: currentResult.error?.message }),
7103
- /* @__PURE__ */ jsx28("button", { onClick: () => handleGenerateImage(currentResult.prompt), style: { padding: "8px 16px", borderRadius: 8, border: "1px solid rgba(255,255,255,0.2)", fontSize: 11, color: "rgba(255,255,255,0.7)", background: "none", cursor: "pointer", fontFamily: "inherit" }, children: "Erneut versuchen" })
7392
+ currentResult?.status === "error" && /* @__PURE__ */ jsxs27("div", { style: { padding: 24, textAlign: "center", display: "flex", flexDirection: "column", alignItems: "center", gap: 12 }, children: [
7393
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined", style: { fontSize: 32, color: "#f87171" }, children: "warning" }),
7394
+ /* @__PURE__ */ jsx29("p", { style: { fontSize: 11, color: "rgba(255,255,255,0.5)", margin: 0 }, children: currentResult.error?.message }),
7395
+ /* @__PURE__ */ jsx29("button", { onClick: () => handleGenerateImage(currentResult.prompt), style: { padding: "8px 16px", borderRadius: 8, border: "1px solid rgba(255,255,255,0.2)", fontSize: 11, color: "rgba(255,255,255,0.7)", background: "none", cursor: "pointer", fontFamily: "inherit" }, children: "Erneut versuchen" })
7104
7396
  ] }),
7105
- currentResult?.status === "done" && currentResult.base64 && /* @__PURE__ */ jsx28("img", { src: currentResult.fullBase64 || currentResult.base64, style: { maxWidth: "100%", maxHeight: "100%", objectFit: "contain" } }),
7106
- !currentResult && /* @__PURE__ */ jsxs26("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", gap: 8, opacity: 0.1 }, children: [
7107
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined", style: { fontSize: 64 }, children: "palette" }),
7108
- /* @__PURE__ */ jsx28("span", { style: { fontSize: 11, fontWeight: "bold", textTransform: "uppercase", letterSpacing: "0.2em" }, children: "Avatar Architect" })
7397
+ currentResult?.status === "done" && currentResult.base64 && /* @__PURE__ */ jsx29("img", { src: currentResult.fullBase64 || currentResult.base64, style: { maxWidth: "100%", maxHeight: "100%", objectFit: "contain" } }),
7398
+ !currentResult && /* @__PURE__ */ jsxs27("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", gap: 8, opacity: 0.1 }, children: [
7399
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined", style: { fontSize: 64 }, children: "palette" }),
7400
+ /* @__PURE__ */ jsx29("span", { style: { fontSize: 11, fontWeight: "bold", textTransform: "uppercase", letterSpacing: "0.2em" }, children: "Avatar Architect" })
7109
7401
  ] }),
7110
- currentResult?.status === "done" && /* @__PURE__ */ jsx28("button", { onClick: openFullscreen, style: { position: "absolute", top: 8, right: 8, width: 32, height: 32, display: "flex", alignItems: "center", justifyContent: "center", borderRadius: "50%", background: "rgba(0,0,0,0.6)", border: "1px solid rgba(255,255,255,0.1)", cursor: "pointer", color: "#fff" }, children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined", style: { fontSize: 18 }, children: "fullscreen" }) }),
7111
- history.length > 1 && currentResult && /* @__PURE__ */ jsxs26(Fragment10, { children: [
7112
- /* @__PURE__ */ jsx28("button", { onClick: goToPrev, disabled: currentIndex <= 0, style: { position: "absolute", left: 8, top: "50%", transform: "translateY(-50%)", width: 36, height: 36, display: "flex", alignItems: "center", justifyContent: "center", borderRadius: "50%", background: "rgba(0,0,0,0.6)", border: "1px solid rgba(255,255,255,0.1)", cursor: "pointer", color: "#fff", opacity: currentIndex <= 0 ? 0 : 1, transition: "opacity 0.2s" }, children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined", style: { fontSize: 20 }, children: "chevron_left" }) }),
7113
- /* @__PURE__ */ jsx28("button", { onClick: goToNext, disabled: currentIndex >= history.length - 1, style: { position: "absolute", right: 8, top: "50%", transform: "translateY(-50%)", width: 36, height: 36, display: "flex", alignItems: "center", justifyContent: "center", borderRadius: "50%", background: "rgba(0,0,0,0.6)", border: "1px solid rgba(255,255,255,0.1)", cursor: "pointer", color: "#fff", opacity: currentIndex >= history.length - 1 ? 0 : 1, transition: "opacity 0.2s" }, children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined", style: { fontSize: 20 }, children: "chevron_right" }) }),
7114
- /* @__PURE__ */ jsxs26("div", { style: { position: "absolute", bottom: 8, left: "50%", transform: "translateX(-50%)", background: "rgba(0,0,0,0.6)", borderRadius: 999, padding: "2px 12px", fontSize: 10, color: "rgba(255,255,255,0.4)", fontFamily: "monospace" }, children: [
7402
+ currentResult?.status === "done" && /* @__PURE__ */ jsx29("button", { onClick: openFullscreen, style: { position: "absolute", top: 8, right: 8, width: 32, height: 32, display: "flex", alignItems: "center", justifyContent: "center", borderRadius: "50%", background: "rgba(0,0,0,0.6)", border: "1px solid rgba(255,255,255,0.1)", cursor: "pointer", color: "#fff" }, children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined", style: { fontSize: 18 }, children: "fullscreen" }) }),
7403
+ history.length > 1 && currentResult && /* @__PURE__ */ jsxs27(Fragment11, { children: [
7404
+ /* @__PURE__ */ jsx29("button", { onClick: goToPrev, disabled: currentIndex <= 0, style: { position: "absolute", left: 8, top: "50%", transform: "translateY(-50%)", width: 36, height: 36, display: "flex", alignItems: "center", justifyContent: "center", borderRadius: "50%", background: "rgba(0,0,0,0.6)", border: "1px solid rgba(255,255,255,0.1)", cursor: "pointer", color: "#fff", opacity: currentIndex <= 0 ? 0 : 1, transition: "opacity 0.2s" }, children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined", style: { fontSize: 20 }, children: "chevron_left" }) }),
7405
+ /* @__PURE__ */ jsx29("button", { onClick: goToNext, disabled: currentIndex >= history.length - 1, style: { position: "absolute", right: 8, top: "50%", transform: "translateY(-50%)", width: 36, height: 36, display: "flex", alignItems: "center", justifyContent: "center", borderRadius: "50%", background: "rgba(0,0,0,0.6)", border: "1px solid rgba(255,255,255,0.1)", cursor: "pointer", color: "#fff", opacity: currentIndex >= history.length - 1 ? 0 : 1, transition: "opacity 0.2s" }, children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined", style: { fontSize: 20 }, children: "chevron_right" }) }),
7406
+ /* @__PURE__ */ jsxs27("div", { style: { position: "absolute", bottom: 8, left: "50%", transform: "translateX(-50%)", background: "rgba(0,0,0,0.6)", borderRadius: 999, padding: "2px 12px", fontSize: 10, color: "rgba(255,255,255,0.4)", fontFamily: "monospace" }, children: [
7115
7407
  currentIndex + 1,
7116
7408
  " / ",
7117
7409
  history.length
@@ -7120,42 +7412,42 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
7120
7412
  ] })
7121
7413
  }
7122
7414
  ),
7123
- currentResult?.status === "done" && /* @__PURE__ */ jsxs26("div", { style: { padding: "0 16px 16px", display: "flex", gap: 8, flexShrink: 0 }, children: [
7124
- /* @__PURE__ */ jsxs26("button", { onClick: () => setActivePrompt(currentResult.prompt || ""), style: { flex: 1, height: 40, display: "flex", alignItems: "center", justifyContent: "center", gap: 6, borderRadius: 10, border: "1px solid rgba(255,255,255,0.1)", background: "rgba(255,255,255,0.05)", color: "rgba(255,255,255,0.6)", fontSize: 11, cursor: "pointer", fontFamily: "inherit" }, children: [
7125
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined", style: { fontSize: 16 }, children: "replay" }),
7126
- /* @__PURE__ */ jsx28("span", { children: "Prompt" })
7415
+ currentResult?.status === "done" && /* @__PURE__ */ jsxs27("div", { style: { padding: "0 16px 16px", display: "flex", gap: 8, flexShrink: 0 }, children: [
7416
+ /* @__PURE__ */ jsxs27("button", { onClick: () => setActivePrompt(currentResult.prompt || ""), style: { flex: 1, height: 40, display: "flex", alignItems: "center", justifyContent: "center", gap: 6, borderRadius: 10, border: "1px solid rgba(255,255,255,0.1)", background: "rgba(255,255,255,0.05)", color: "rgba(255,255,255,0.6)", fontSize: 11, cursor: "pointer", fontFamily: "inherit" }, children: [
7417
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined", style: { fontSize: 16 }, children: "replay" }),
7418
+ /* @__PURE__ */ jsx29("span", { children: "Prompt" })
7127
7419
  ] }),
7128
- /* @__PURE__ */ jsxs26("button", { onClick: () => handleGenerateBatch(currentResult.prompt || activePrompt, currentResult.mediaId, void 0, { silent: true }), style: { flex: 1, height: 40, display: "flex", alignItems: "center", justifyContent: "center", gap: 6, borderRadius: 10, border: "none", background: "rgba(255,255,255,0.1)", color: "rgba(255,255,255,0.8)", fontSize: 11, fontWeight: "bold", cursor: "pointer", fontFamily: "inherit" }, children: [
7129
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined", style: { fontSize: 16 }, children: "auto_fix_high" }),
7130
- /* @__PURE__ */ jsx28("span", { children: "Referenz" })
7420
+ /* @__PURE__ */ jsxs27("button", { onClick: () => handleGenerateBatch(currentResult.prompt || activePrompt, currentResult.mediaId, void 0, { silent: true }), style: { flex: 1, height: 40, display: "flex", alignItems: "center", justifyContent: "center", gap: 6, borderRadius: 10, border: "none", background: "rgba(255,255,255,0.1)", color: "rgba(255,255,255,0.8)", fontSize: 11, fontWeight: "bold", cursor: "pointer", fontFamily: "inherit" }, children: [
7421
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined", style: { fontSize: 16 }, children: "auto_fix_high" }),
7422
+ /* @__PURE__ */ jsx29("span", { children: "Referenz" })
7131
7423
  ] }),
7132
- /* @__PURE__ */ jsxs26("button", { onClick: handleDownloadSingle, style: { flex: 1, height: 40, display: "flex", alignItems: "center", justifyContent: "center", gap: 6, borderRadius: 10, border: "1px solid rgba(255,255,255,0.1)", background: "rgba(255,255,255,0.05)", color: "rgba(255,255,255,0.6)", fontSize: 11, cursor: "pointer", fontFamily: "inherit" }, children: [
7133
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined", style: { fontSize: 16 }, children: "download" }),
7134
- /* @__PURE__ */ jsx28("span", { children: "Laden" })
7424
+ /* @__PURE__ */ jsxs27("button", { onClick: handleDownloadSingle, style: { flex: 1, height: 40, display: "flex", alignItems: "center", justifyContent: "center", gap: 6, borderRadius: 10, border: "1px solid rgba(255,255,255,0.1)", background: "rgba(255,255,255,0.05)", color: "rgba(255,255,255,0.6)", fontSize: 11, cursor: "pointer", fontFamily: "inherit" }, children: [
7425
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined", style: { fontSize: 16 }, children: "download" }),
7426
+ /* @__PURE__ */ jsx29("span", { children: "Laden" })
7135
7427
  ] })
7136
7428
  ] })
7137
7429
  ] })
7138
7430
  ] }) });
7139
7431
  }
7140
- return /* @__PURE__ */ jsxs26("div", { className: "flex h-screen w-screen bg-[#0e0e0e] text-white overflow-hidden", style: hcStyle, children: [
7141
- /* @__PURE__ */ jsx28("div", { className: "absolute top-2 right-2 z-50", children: /* @__PURE__ */ jsx28("button", { onClick: () => setShowStart(true), className: "text-white/10 hover:text-white/30 transition-colors text-[10px]", children: "\u21C4" }) }),
7142
- /* @__PURE__ */ jsxs26("div", { className: "flex flex-col border-r border-white/5 overflow-hidden relative bg-black/10 shrink-0", style: { width: isLeftCollapsed ? 48 : leftPanelWidth, transition: "none" }, children: [
7143
- /* @__PURE__ */ jsxs26("div", { className: "h-14 border-b border-white/5 flex items-center justify-between shrink-0 px-1", children: [
7144
- !isLeftCollapsed && /* @__PURE__ */ jsxs26("div", { className: "flex flex-1 gap-1", children: [
7145
- workspaceTags && /* @__PURE__ */ jsxs26("button", { onClick: () => setLeftTab("prompt"), className: `flex-1 flex items-center justify-center gap-1 h-8 rounded-lg text-[8px] font-bold uppercase tracking-wide transition-colors ${leftTab === "prompt" ? "bg-white/10 text-white" : "text-white/30 hover:text-white/60"}`, children: [
7146
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[14px]", children: "auto_fix_high" }),
7432
+ return /* @__PURE__ */ jsxs27("div", { className: "flex h-screen w-screen bg-[#0e0e0e] text-white overflow-hidden", style: hcStyle, children: [
7433
+ /* @__PURE__ */ jsx29("div", { className: "absolute top-2 right-2 z-50", children: /* @__PURE__ */ jsx29("button", { onClick: () => setShowStart(true), className: "text-white/10 hover:text-white/30 transition-colors text-[10px]", children: "\u21C4" }) }),
7434
+ /* @__PURE__ */ jsxs27("div", { className: "flex flex-col border-r border-white/5 overflow-hidden relative bg-black/10 shrink-0", style: { width: isLeftCollapsed ? 48 : leftPanelWidth, transition: "none" }, children: [
7435
+ /* @__PURE__ */ jsxs27("div", { className: "h-14 border-b border-white/5 flex items-center justify-between shrink-0 px-1", children: [
7436
+ !isLeftCollapsed && /* @__PURE__ */ jsxs27("div", { className: "flex flex-1 gap-1", children: [
7437
+ workspaceTags && /* @__PURE__ */ jsxs27("button", { onClick: () => setLeftTab("prompt"), className: `flex-1 flex items-center justify-center gap-1 h-8 rounded-lg text-[8px] font-bold uppercase tracking-wide transition-colors ${leftTab === "prompt" ? "bg-white/10 text-white" : "text-white/30 hover:text-white/60"}`, children: [
7438
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[14px]", children: "auto_fix_high" }),
7147
7439
  "Prompt"
7148
7440
  ] }),
7149
- /* @__PURE__ */ jsxs26("button", { onClick: () => setLeftTab("hierarchy"), className: `flex-1 flex items-center justify-center gap-1 h-8 rounded-lg text-[8px] font-bold uppercase tracking-wide transition-colors ${leftTab === "hierarchy" ? "bg-white/10 text-white" : "text-white/30 hover:text-white/60"}`, children: [
7150
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[14px]", children: "account_tree" }),
7441
+ /* @__PURE__ */ jsxs27("button", { onClick: () => setLeftTab("hierarchy"), className: `flex-1 flex items-center justify-center gap-1 h-8 rounded-lg text-[8px] font-bold uppercase tracking-wide transition-colors ${leftTab === "hierarchy" ? "bg-white/10 text-white" : "text-white/30 hover:text-white/60"}`, children: [
7442
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[14px]", children: "account_tree" }),
7151
7443
  "Hierarchie"
7152
7444
  ] }),
7153
- workspaceTags && /* @__PURE__ */ jsx28("button", { onClick: () => setActiveTab("tags"), className: `flex-1 flex items-center justify-center gap-1.5 text-[11px] font-bold uppercase tracking-wide transition-colors ${activeTab === "tags" ? "text-white border-b-2 border-white" : "text-white/30"}`, children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[20px]", children: "label" }) })
7445
+ workspaceTags && /* @__PURE__ */ jsx29("button", { onClick: () => setActiveTab("tags"), className: `flex-1 flex items-center justify-center gap-1.5 text-[11px] font-bold uppercase tracking-wide transition-colors ${activeTab === "tags" ? "text-white border-b-2 border-white" : "text-white/30"}`, children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[20px]", children: "label" }) })
7154
7446
  ] }),
7155
- /* @__PURE__ */ jsx28("button", { onClick: () => setIsLeftCollapsed(!isLeftCollapsed), className: "material-symbols-outlined text-[18px] text-white/40 hover:text-white transition-all w-10 flex items-center justify-center", children: isLeftCollapsed ? "chevron_right" : "chevron_left" })
7447
+ /* @__PURE__ */ jsx29("button", { onClick: () => setIsLeftCollapsed(!isLeftCollapsed), className: "material-symbols-outlined text-[18px] text-white/40 hover:text-white transition-all w-10 flex items-center justify-center", children: isLeftCollapsed ? "chevron_right" : "chevron_left" })
7156
7448
  ] }),
7157
- !isLeftCollapsed && /* @__PURE__ */ jsxs26("div", { className: "flex-1 overflow-hidden relative", children: [
7158
- activeTab === "tags" && workspaceTags && /* @__PURE__ */ jsx28(
7449
+ !isLeftCollapsed && /* @__PURE__ */ jsxs27("div", { className: "flex-1 overflow-hidden relative", children: [
7450
+ activeTab === "tags" && workspaceTags && /* @__PURE__ */ jsx29(
7159
7451
  TagManagerPanel,
7160
7452
  {
7161
7453
  workspaceTags,
@@ -7166,11 +7458,11 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
7166
7458
  onTagMove: handleTagMove
7167
7459
  }
7168
7460
  ),
7169
- activeTab === "tags" && !workspaceTags && /* @__PURE__ */ jsx28("div", { className: "flex items-center justify-center h-full p-8 text-center", children: /* @__PURE__ */ jsxs26("div", { children: [
7170
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[40px] text-white/10 block mb-3", children: "label_off" }),
7171
- /* @__PURE__ */ jsx28("p", { className: "text-[11px] text-white/20", children: "Erst Workspace importieren um Tags zu verwalten." })
7461
+ activeTab === "tags" && !workspaceTags && /* @__PURE__ */ jsx29("div", { className: "flex items-center justify-center h-full p-8 text-center", children: /* @__PURE__ */ jsxs27("div", { children: [
7462
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[40px] text-white/10 block mb-3", children: "label_off" }),
7463
+ /* @__PURE__ */ jsx29("p", { className: "text-[11px] text-white/20", children: "Erst Workspace importieren um Tags zu verwalten." })
7172
7464
  ] }) }),
7173
- leftTab === "hierarchy" && activeTab !== "tags" && /* @__PURE__ */ jsx28("div", { className: "absolute inset-0", children: /* @__PURE__ */ jsx28(
7465
+ leftTab === "hierarchy" && activeTab !== "tags" && /* @__PURE__ */ jsx29("div", { className: "absolute inset-0", children: /* @__PURE__ */ jsx29(
7174
7466
  ListView,
7175
7467
  {
7176
7468
  nodes,
@@ -7195,19 +7487,19 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
7195
7487
  isGeneratingNodeId: (id) => isSynthesizing && focusedNodeId === id
7196
7488
  }
7197
7489
  ) }),
7198
- leftTab === "prompt" && workspaceTags && activeTab !== "tags" && /* @__PURE__ */ jsx28(PromptTab, { workspaceTags, onGenerate: handlePromptTabGenerate, isGenerating: isPromptTabGenerating, feedback: promptFeedback, promptResult: activePrompt || null, lastPayload: lastPromptPayload, onGenerateImage: (prompt) => handleGenerateBatch(prompt), onTagCreate: handleTagCreate, onTagUpdate: handleTagUpdate, onTagDelete: handleTagDelete, onScanImage: handleScanImage, isScanning: isScanningImage })
7490
+ leftTab === "prompt" && workspaceTags && activeTab !== "tags" && /* @__PURE__ */ jsx29(PromptTab, { workspaceTags, onGenerate: handlePromptTabGenerate, isGenerating: isPromptTabGenerating, feedback: promptFeedback, promptResult: activePrompt || null, lastPayload: lastPromptPayload, onGenerateImage: (prompt) => handleGenerateBatch(prompt), onTagCreate: handleTagCreate, onTagUpdate: handleTagUpdate, onTagDelete: handleTagDelete, onScanImage: handleScanImage, isScanning: isScanningImage })
7199
7491
  ] })
7200
7492
  ] }),
7201
- !isLeftCollapsed && /* @__PURE__ */ jsx28("div", { onMouseDown: startLeftResize, className: "w-1 shrink-0 cursor-col-resize hover:bg-white/20 active:bg-white/30 transition-colors", style: { background: "transparent" } }),
7202
- /* @__PURE__ */ jsxs26("div", { className: "flex-1 flex flex-col bg-[#0b0b0b] overflow-hidden", children: [
7203
- /* @__PURE__ */ jsxs26("div", { className: "h-14 border-b border-white/5 flex items-center px-4 gap-2 justify-between shrink-0 bg-black/20", children: [
7204
- /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-1.5", children: [
7205
- /* @__PURE__ */ jsx28(CompactDropdown, { value: aspectRatio, onChange: setAspectRatio, options: [{ label: "1:1", value: "1:1" }, { label: "16:9", value: "16:9" }, { label: "9:16", value: "9:16" }] }),
7206
- /* @__PURE__ */ jsx28(CompactDropdown, { value: selectedModel, onChange: setSelectedModel, options: [{ value: "\u{1F34C} Nano Banana Pro", label: "\u{1F34C} Nano Banana Pro" }, { value: "\u{1F34C} Nano Banana 2", label: "\u{1F34C} Nano Banana 2" }, { value: "Imagen 4", label: "Imagen 4" }] }),
7207
- /* @__PURE__ */ jsx28(CompactDropdown, { value: String(imageCount), displayValue: `${imageCount}\xD7`, onChange: updateImageCount, options: imageCountOptions })
7493
+ !isLeftCollapsed && /* @__PURE__ */ jsx29("div", { onMouseDown: startLeftResize, className: "w-1 shrink-0 cursor-col-resize hover:bg-white/20 active:bg-white/30 transition-colors", style: { background: "transparent" } }),
7494
+ /* @__PURE__ */ jsxs27("div", { className: "flex-1 flex flex-col bg-[#0b0b0b] overflow-hidden", children: [
7495
+ /* @__PURE__ */ jsxs27("div", { className: "h-14 border-b border-white/5 flex items-center px-4 gap-2 justify-between shrink-0 bg-black/20", children: [
7496
+ /* @__PURE__ */ jsxs27("div", { className: "flex items-center gap-1.5", children: [
7497
+ /* @__PURE__ */ jsx29(CompactDropdown, { value: aspectRatio, onChange: setAspectRatio, options: [{ label: "1:1", value: "1:1" }, { label: "16:9", value: "16:9" }, { label: "9:16", value: "9:16" }] }),
7498
+ /* @__PURE__ */ jsx29(CompactDropdown, { value: selectedModel, onChange: setSelectedModel, options: [{ value: "\u{1F34C} Nano Banana Pro", label: "\u{1F34C} Nano Banana Pro" }, { value: "\u{1F34C} Nano Banana 2", label: "\u{1F34C} Nano Banana 2" }, { value: "Imagen 4", label: "Imagen 4" }] }),
7499
+ /* @__PURE__ */ jsx29(CompactDropdown, { value: String(imageCount), displayValue: `${imageCount}\xD7`, onChange: updateImageCount, options: imageCountOptions })
7208
7500
  ] }),
7209
- /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-1 mx-auto", children: [
7210
- /* @__PURE__ */ jsx28(
7501
+ /* @__PURE__ */ jsxs27("div", { className: "flex items-center gap-1 mx-auto", children: [
7502
+ /* @__PURE__ */ jsx29(
7211
7503
  "button",
7212
7504
  {
7213
7505
  onClick: () => setMiddlePanel("stage"),
@@ -7215,7 +7507,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
7215
7507
  children: "Stage"
7216
7508
  }
7217
7509
  ),
7218
- /* @__PURE__ */ jsx28(
7510
+ /* @__PURE__ */ jsx29(
7219
7511
  "button",
7220
7512
  {
7221
7513
  onClick: () => setMiddlePanel("labs"),
@@ -7224,53 +7516,53 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
7224
7516
  }
7225
7517
  )
7226
7518
  ] }),
7227
- /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-2", children: [
7228
- activeReferenceThumbnail ? /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-1 rounded-lg border border-white/20 bg-white/5 overflow-hidden", style: { height: 28 }, children: [
7229
- /* @__PURE__ */ jsx28("img", { src: activeReferenceThumbnail, className: "h-full aspect-square object-cover" }),
7230
- /* @__PURE__ */ jsx28("span", { className: "text-[10px] text-white/60 font-bold uppercase tracking-wide px-1", children: "Ref" }),
7231
- /* @__PURE__ */ jsx28("button", { onClick: clearReference, className: "w-6 h-full flex items-center justify-center text-white/30 hover:text-white/80 transition-colors", children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[14px]", children: "close" }) })
7232
- ] }) : /* @__PURE__ */ jsxs26("button", { onClick: handleSelectReference, className: "flex items-center gap-1 h-7 px-2 rounded-lg border border-white/10 text-white/30 hover:text-white/60 hover:border-white/20 transition-colors text-[10px] font-bold uppercase tracking-wide", children: [
7233
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[14px]", children: "add_photo_alternate" }),
7234
- /* @__PURE__ */ jsx28("span", { children: "Ref" })
7519
+ /* @__PURE__ */ jsxs27("div", { className: "flex items-center gap-2", children: [
7520
+ activeReferenceThumbnail ? /* @__PURE__ */ jsxs27("div", { className: "flex items-center gap-1 rounded-lg border border-white/20 bg-white/5 overflow-hidden", style: { height: 28 }, children: [
7521
+ /* @__PURE__ */ jsx29("img", { src: activeReferenceThumbnail, className: "h-full aspect-square object-cover" }),
7522
+ /* @__PURE__ */ jsx29("span", { className: "text-[10px] text-white/60 font-bold uppercase tracking-wide px-1", children: "Ref" }),
7523
+ /* @__PURE__ */ jsx29("button", { onClick: clearReference, className: "w-6 h-full flex items-center justify-center text-white/30 hover:text-white/80 transition-colors", children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[14px]", children: "close" }) })
7524
+ ] }) : /* @__PURE__ */ jsxs27("button", { onClick: handleSelectReference, className: "flex items-center gap-1 h-7 px-2 rounded-lg border border-white/10 text-white/30 hover:text-white/60 hover:border-white/20 transition-colors text-[10px] font-bold uppercase tracking-wide", children: [
7525
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[14px]", children: "add_photo_alternate" }),
7526
+ /* @__PURE__ */ jsx29("span", { children: "Ref" })
7235
7527
  ] }),
7236
- /* @__PURE__ */ jsx28("button", { onClick: () => setIsPromptCollapsed(!isPromptCollapsed), className: "text-white/40 hover:text-white transition-colors", children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined", children: isPromptCollapsed ? "expand_more" : "expand_less" }) }),
7237
- /* @__PURE__ */ jsx28(TaskExecutor, { openTasks: hfState?.openTasks || {}, onExecute: handleExecuteTask, onTaskCompleted: handleTaskCompleted }),
7528
+ /* @__PURE__ */ jsx29("button", { onClick: () => setIsPromptCollapsed(!isPromptCollapsed), className: "text-white/40 hover:text-white transition-colors", children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined", children: isPromptCollapsed ? "expand_more" : "expand_less" }) }),
7529
+ /* @__PURE__ */ jsx29(TaskExecutor, { openTasks: hfState?.openTasks || {}, onExecute: handleExecuteTask, onTaskCompleted: handleTaskCompleted }),
7238
7530
  runningBadge,
7239
- /* @__PURE__ */ jsx28(PillButton, { variant: "solid", icon: "bolt", disabled: !activePrompt.trim(), onClick: () => handleGenerateBatch(), children: "Generieren" })
7531
+ /* @__PURE__ */ jsx29(PillButton, { variant: "solid", icon: "bolt", disabled: !activePrompt.trim(), onClick: () => handleGenerateBatch(), children: "Generieren" })
7240
7532
  ] })
7241
7533
  ] }),
7242
- /* @__PURE__ */ jsxs26("div", { className: "flex-1 flex flex-col overflow-hidden relative", children: [
7243
- !isPromptCollapsed && /* @__PURE__ */ jsx28("div", { className: "px-6 py-4 border-b border-white/5 bg-black/10 overflow-hidden shrink-0", children: /* @__PURE__ */ jsxs26("div", { className: `relative min-h-[60px] p-4 rounded-2xl border transition-all ${isSynthesizing ? "prompt-loading" : "bg-white/5 border-white/10"}`, children: [
7244
- /* @__PURE__ */ jsx28("textarea", { value: activePrompt, onChange: (e) => setActivePrompt(e.target.value), className: "w-full bg-transparent border-none outline-none text-[12px] leading-relaxed text-white/80 resize-none h-20 dark-scrollbar", placeholder: "W\xE4hle einen Knoten oder tippe einen Prompt..." }),
7245
- activePrompt && !isSynthesizing && /* @__PURE__ */ jsx28("button", { onClick: () => setActivePrompt(""), className: "absolute top-2 right-2 w-6 h-6 rounded-full bg-white/5 hover:bg-white/10 flex items-center justify-center transition-colors text-white/20 hover:text-white", children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[14px]", children: "close" }) })
7534
+ /* @__PURE__ */ jsxs27("div", { className: "flex-1 flex flex-col overflow-hidden relative", children: [
7535
+ !isPromptCollapsed && /* @__PURE__ */ jsx29("div", { className: "px-6 py-4 border-b border-white/5 bg-black/10 overflow-hidden shrink-0", children: /* @__PURE__ */ jsxs27("div", { className: `relative min-h-[60px] p-4 rounded-2xl border transition-all ${isSynthesizing ? "prompt-loading" : "bg-white/5 border-white/10"}`, children: [
7536
+ /* @__PURE__ */ jsx29("textarea", { value: activePrompt, onChange: (e) => setActivePrompt(e.target.value), className: "w-full bg-transparent border-none outline-none text-[12px] leading-relaxed text-white/80 resize-none h-20 dark-scrollbar", placeholder: "W\xE4hle einen Knoten oder tippe einen Prompt..." }),
7537
+ activePrompt && !isSynthesizing && /* @__PURE__ */ jsx29("button", { onClick: () => setActivePrompt(""), className: "absolute top-2 right-2 w-6 h-6 rounded-full bg-white/5 hover:bg-white/10 flex items-center justify-center transition-colors text-white/20 hover:text-white", children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[14px]", children: "close" }) })
7246
7538
  ] }) }),
7247
- middlePanel === "labs" ? /* @__PURE__ */ jsx28("div", { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ jsx28(LabsTab, { services: labServices, onResult: (item) => {
7539
+ middlePanel === "labs" ? /* @__PURE__ */ jsx29("div", { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ jsx29(LabsTab, { services: labServices, onResult: (item) => {
7248
7540
  const frame = item.frames[0];
7249
7541
  if (frame?.base64) setCurrentResult(frameToGeneration(frame, item));
7250
- } }) }) : /* @__PURE__ */ jsxs26("div", { className: "flex-1 overflow-hidden flex flex-col", children: [
7251
- /* @__PURE__ */ jsx28("div", { className: "flex-1 p-6 overflow-hidden flex items-center justify-center", children: /* @__PURE__ */ jsx28("div", { className: "h-full w-full max-w-4xl aspect-square rounded-3xl border border-white/5 bg-black/40 relative overflow-hidden flex items-center justify-center group shadow-2xl", children: currentResult ? currentResult.status === "processing" ? /* @__PURE__ */ jsxs26("div", { className: "flex flex-col items-center gap-4 opacity-40", children: [
7252
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[40px]", children: "hourglass_top" }),
7253
- /* @__PURE__ */ jsx28("span", { className: "text-[10px] uppercase font-bold tracking-widest", children: "Erstelle Bild..." })
7254
- ] }) : currentResult.status === "error" ? /* @__PURE__ */ jsxs26("div", { className: "p-10 text-center flex flex-col items-center gap-5 max-w-md", children: [
7255
- /* @__PURE__ */ jsx28("div", { className: "w-16 h-16 rounded-full bg-red-500/10 flex items-center justify-center", children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-red-500 text-[32px]", children: "warning" }) }),
7256
- /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-2", children: [
7257
- /* @__PURE__ */ jsx28("h3", { className: "text-[11px] font-bold uppercase tracking-widest text-red-400", children: "Generierungsfehler" }),
7258
- /* @__PURE__ */ jsx28("p", { className: "text-white/60 text-[12px] leading-relaxed", children: currentResult.error?.message })
7542
+ } }) }) : /* @__PURE__ */ jsxs27("div", { className: "flex-1 overflow-hidden flex flex-col", children: [
7543
+ /* @__PURE__ */ jsx29("div", { className: "flex-1 p-6 overflow-hidden flex items-center justify-center", children: /* @__PURE__ */ jsx29("div", { className: "h-full w-full max-w-4xl aspect-square rounded-3xl border border-white/5 bg-black/40 relative overflow-hidden flex items-center justify-center group shadow-2xl", children: currentResult ? currentResult.status === "processing" ? /* @__PURE__ */ jsxs27("div", { className: "flex flex-col items-center gap-4 opacity-40", children: [
7544
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[40px]", children: "hourglass_top" }),
7545
+ /* @__PURE__ */ jsx29("span", { className: "text-[10px] uppercase font-bold tracking-widest", children: "Erstelle Bild..." })
7546
+ ] }) : currentResult.status === "error" ? /* @__PURE__ */ jsxs27("div", { className: "p-10 text-center flex flex-col items-center gap-5 max-w-md", children: [
7547
+ /* @__PURE__ */ jsx29("div", { className: "w-16 h-16 rounded-full bg-red-500/10 flex items-center justify-center", children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-red-500 text-[32px]", children: "warning" }) }),
7548
+ /* @__PURE__ */ jsxs27("div", { className: "flex flex-col gap-2", children: [
7549
+ /* @__PURE__ */ jsx29("h3", { className: "text-[11px] font-bold uppercase tracking-widest text-red-400", children: "Generierungsfehler" }),
7550
+ /* @__PURE__ */ jsx29("p", { className: "text-white/60 text-[12px] leading-relaxed", children: currentResult.error?.message })
7259
7551
  ] }),
7260
- /* @__PURE__ */ jsx28(PillButton, { variant: "outline", icon: "refresh", onClick: () => handleGenerateImage(currentResult.prompt), children: "Erneut versuchen" })
7261
- ] }) : /* @__PURE__ */ jsxs26("div", { className: "h-full w-full relative flex items-center justify-center", children: [
7262
- /* @__PURE__ */ jsx28("img", { src: currentResult.fullBase64 || currentResult.base64, className: "max-h-full max-w-full object-contain rounded-xl shadow-2xl" }),
7263
- /* @__PURE__ */ jsxs26("div", { className: "absolute bottom-6 flex gap-2 opacity-0 group-hover:opacity-100 transition-all translate-y-4 group-hover:translate-y-0 z-20", children: [
7264
- /* @__PURE__ */ jsx28(PillButton, { variant: "outline", icon: "replay", onClick: () => setActivePrompt(currentResult.prompt || ""), children: "Prompt" }),
7265
- /* @__PURE__ */ jsx28(PillButton, { variant: "solid", icon: "auto_fix_high", onClick: () => handleGenerateBatch(currentResult.prompt || activePrompt, currentResult.mediaId, void 0, { silent: true }), children: "Referenz" }),
7266
- /* @__PURE__ */ jsx28(PillButton, { variant: "outline", icon: "download", onClick: handleDownloadSingle, children: "Speichern" })
7552
+ /* @__PURE__ */ jsx29(PillButton, { variant: "outline", icon: "refresh", onClick: () => handleGenerateImage(currentResult.prompt), children: "Erneut versuchen" })
7553
+ ] }) : /* @__PURE__ */ jsxs27("div", { className: "h-full w-full relative flex items-center justify-center", children: [
7554
+ /* @__PURE__ */ jsx29("img", { src: currentResult.fullBase64 || currentResult.base64, className: "max-h-full max-w-full object-contain rounded-xl shadow-2xl" }),
7555
+ /* @__PURE__ */ jsxs27("div", { className: "absolute bottom-6 flex gap-2 opacity-0 group-hover:opacity-100 transition-all translate-y-4 group-hover:translate-y-0 z-20", children: [
7556
+ /* @__PURE__ */ jsx29(PillButton, { variant: "outline", icon: "replay", onClick: () => setActivePrompt(currentResult.prompt || ""), children: "Prompt" }),
7557
+ /* @__PURE__ */ jsx29(PillButton, { variant: "solid", icon: "auto_fix_high", onClick: () => handleGenerateBatch(currentResult.prompt || activePrompt, currentResult.mediaId, void 0, { silent: true }), children: "Referenz" }),
7558
+ /* @__PURE__ */ jsx29(PillButton, { variant: "outline", icon: "download", onClick: handleDownloadSingle, children: "Speichern" })
7267
7559
  ] })
7268
- ] }) : /* @__PURE__ */ jsxs26("div", { className: "flex flex-col items-center gap-2 opacity-10", children: [
7269
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[100px]", children: "palette" }),
7270
- /* @__PURE__ */ jsx28("span", { className: "text-[12px] font-bold uppercase tracking-[0.2em]", children: "Avatar Architect" })
7560
+ ] }) : /* @__PURE__ */ jsxs27("div", { className: "flex flex-col items-center gap-2 opacity-10", children: [
7561
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[100px]", children: "palette" }),
7562
+ /* @__PURE__ */ jsx29("span", { className: "text-[12px] font-bold uppercase tracking-[0.2em]", children: "Avatar Architect" })
7271
7563
  ] }) }) }),
7272
- currentResult?.status === "done" && currentGroup.length > 1 && /* @__PURE__ */ jsx28("div", { className: "px-6 pb-4 shrink-0 flex gap-2 overflow-x-auto", style: { scrollbarWidth: "none" }, children: currentGroup.map((item) => /* @__PURE__ */ jsxs26("div", { style: { position: "relative", flexShrink: 0 }, children: [
7273
- /* @__PURE__ */ jsx28(
7564
+ currentResult?.status === "done" && currentGroup.length > 1 && /* @__PURE__ */ jsx29("div", { className: "px-6 pb-4 shrink-0 flex gap-2 overflow-x-auto", style: { scrollbarWidth: "none" }, children: currentGroup.map((item) => /* @__PURE__ */ jsxs27("div", { style: { position: "relative", flexShrink: 0 }, children: [
7565
+ /* @__PURE__ */ jsx29(
7274
7566
  "div",
7275
7567
  {
7276
7568
  onClick: () => handleGallerySelect(item),
@@ -7285,10 +7577,10 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
7285
7577
  transition: "opacity 0.15s, border-color 0.15s"
7286
7578
  },
7287
7579
  className: "hover:opacity-80",
7288
- children: /* @__PURE__ */ jsx28("img", { src: item.base64, style: { width: "100%", height: "100%", objectFit: "cover" }, alt: "" })
7580
+ children: /* @__PURE__ */ jsx29("img", { src: item.base64, style: { width: "100%", height: "100%", objectFit: "cover" }, alt: "" })
7289
7581
  }
7290
7582
  ),
7291
- /* @__PURE__ */ jsx28(
7583
+ /* @__PURE__ */ jsx29(
7292
7584
  "button",
7293
7585
  {
7294
7586
  onClick: (e) => {
@@ -7311,31 +7603,32 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
7311
7603
  alignItems: "center",
7312
7604
  justifyContent: "center"
7313
7605
  },
7314
- children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined", style: { fontSize: 10, color: item.titleTs ? "#fff" : "rgba(255,255,255,0.5)", lineHeight: 1 }, children: "star" })
7606
+ children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined", style: { fontSize: 10, color: item.titleTs ? "#fff" : "rgba(255,255,255,0.5)", lineHeight: 1 }, children: "star" })
7315
7607
  }
7316
7608
  )
7317
7609
  ] }, item.id)) })
7318
7610
  ] })
7319
7611
  ] })
7320
7612
  ] }),
7321
- !isRightCollapsed && /* @__PURE__ */ jsx28("div", { onMouseDown: startRightResize, className: "w-1 shrink-0 cursor-col-resize hover:bg-white/20 active:bg-white/30 transition-colors", style: { background: "transparent" } }),
7322
- /* @__PURE__ */ jsxs26("div", { className: "flex flex-col border-l border-white/5 bg-[#0e0e0e] shrink-0", style: { width: isRightCollapsed ? 60 : rightPanelWidth, transition: "none" }, children: [
7323
- /* @__PURE__ */ jsxs26("div", { className: "flex border-b border-white/5 h-14 shrink-0 overflow-hidden", children: [
7324
- /* @__PURE__ */ jsxs26("div", { className: "flex flex-1", children: [
7325
- ["history", "gallery", "inspect", "setup", "sync", "tags"].map((tab) => /* @__PURE__ */ jsx28("button", { onClick: () => {
7613
+ !isRightCollapsed && /* @__PURE__ */ jsx29("div", { onMouseDown: startRightResize, className: "w-1 shrink-0 cursor-col-resize hover:bg-white/20 active:bg-white/30 transition-colors", style: { background: "transparent" } }),
7614
+ /* @__PURE__ */ jsxs27("div", { className: "flex flex-col border-l border-white/5 bg-[#0e0e0e] shrink-0", style: { width: isRightCollapsed ? 60 : rightPanelWidth, transition: "none" }, children: [
7615
+ /* @__PURE__ */ jsxs27("div", { className: "flex border-b border-white/5 h-14 shrink-0 overflow-hidden", children: [
7616
+ /* @__PURE__ */ jsxs27("div", { className: "flex flex-1", children: [
7617
+ ["history", "gallery", "inspect", "setup", "sync", "tags"].map((tab) => /* @__PURE__ */ jsx29("button", { onClick: () => {
7326
7618
  setActiveTab(tab);
7327
7619
  setIsRightCollapsed(false);
7328
- }, className: `flex-1 flex items-center justify-center relative transition-colors ${activeTab === tab ? "text-white" : "text-white/20"}`, children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[20px]", children: tab === "history" ? "history" : tab === "gallery" ? "photo_library" : tab === "inspect" ? "info" : tab === "setup" ? "settings" : tab === "sync" ? "cloud_sync" : "label" }) }, tab)),
7329
- serverBaseUrl && /* @__PURE__ */ jsx28("button", { onClick: () => {
7620
+ }, className: `flex-1 flex items-center justify-center relative transition-colors ${activeTab === tab ? "text-white" : "text-white/20"}`, children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[20px]", children: tab === "history" ? "history" : tab === "gallery" ? "photo_library" : tab === "inspect" ? "info" : tab === "setup" ? "settings" : tab === "sync" ? "cloud_sync" : "label" }) }, tab)),
7621
+ serverBaseUrl && /* @__PURE__ */ jsx29("button", { onClick: () => {
7330
7622
  setActiveTab("server");
7331
7623
  setIsRightCollapsed(false);
7332
- }, className: `w-10 flex items-center justify-center relative transition-colors ${activeTab === "server" ? "text-white" : "text-white/20"}`, children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[20px]", children: "storage" }) })
7624
+ }, className: `w-10 flex items-center justify-center relative transition-colors ${activeTab === "server" ? "text-white" : "text-white/20"}`, children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[20px]", children: "storage" }) }),
7625
+ /* @__PURE__ */ jsx29("button", { onClick: () => setShowSzenen(true), className: "w-10 flex items-center justify-center relative text-white/20 hover:text-white", children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[20px]", children: "movie" }) })
7333
7626
  ] }),
7334
- hfToken && /* @__PURE__ */ jsx28("button", { onClick: () => refreshHF(), disabled: isHfRefreshing, className: "w-10 flex items-center justify-center text-white/20 hover:text-white/60 transition-colors disabled:opacity-30", children: /* @__PURE__ */ jsx28("span", { className: `material-symbols-outlined text-[18px]${isHfRefreshing ? " animate-spin" : ""}`, children: "sync" }) }),
7335
- /* @__PURE__ */ jsx28("button", { onClick: () => setIsRightCollapsed(!isRightCollapsed), className: "w-10 flex items-center justify-center text-white/20 hover:text-white", children: /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[18px]", children: isRightCollapsed ? "chevron_left" : "chevron_right" }) })
7627
+ hfToken && /* @__PURE__ */ jsx29("button", { onClick: () => refreshHF(), disabled: isHfRefreshing, className: "w-10 flex items-center justify-center text-white/20 hover:text-white/60 transition-colors disabled:opacity-30", children: /* @__PURE__ */ jsx29("span", { className: `material-symbols-outlined text-[18px]${isHfRefreshing ? " animate-spin" : ""}`, children: "sync" }) }),
7628
+ /* @__PURE__ */ jsx29("button", { onClick: () => setIsRightCollapsed(!isRightCollapsed), className: "w-10 flex items-center justify-center text-white/20 hover:text-white", children: /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[18px]", children: isRightCollapsed ? "chevron_left" : "chevron_right" }) })
7336
7629
  ] }),
7337
- !isRightCollapsed && /* @__PURE__ */ jsxs26("div", { className: "flex-1 overflow-hidden relative", children: [
7338
- activeTab === "tags" && workspaceTags && /* @__PURE__ */ jsx28(
7630
+ !isRightCollapsed && /* @__PURE__ */ jsxs27("div", { className: "flex-1 overflow-hidden relative", children: [
7631
+ activeTab === "tags" && workspaceTags && /* @__PURE__ */ jsx29(
7339
7632
  TagManagerPanel,
7340
7633
  {
7341
7634
  workspaceTags,
@@ -7346,12 +7639,12 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
7346
7639
  onTagMove: handleTagMove
7347
7640
  }
7348
7641
  ),
7349
- activeTab === "tags" && !workspaceTags && /* @__PURE__ */ jsx28("div", { className: "flex items-center justify-center h-full p-8 text-center", children: /* @__PURE__ */ jsxs26("div", { children: [
7350
- /* @__PURE__ */ jsx28("span", { className: "material-symbols-outlined text-[40px] text-white/10 block mb-3", children: "label_off" }),
7351
- /* @__PURE__ */ jsx28("p", { className: "text-[11px] text-white/20", children: "Erst Workspace importieren um Tags zu verwalten." })
7642
+ activeTab === "tags" && !workspaceTags && /* @__PURE__ */ jsx29("div", { className: "flex items-center justify-center h-full p-8 text-center", children: /* @__PURE__ */ jsxs27("div", { children: [
7643
+ /* @__PURE__ */ jsx29("span", { className: "material-symbols-outlined text-[40px] text-white/10 block mb-3", children: "label_off" }),
7644
+ /* @__PURE__ */ jsx29("p", { className: "text-[11px] text-white/20", children: "Erst Workspace importieren um Tags zu verwalten." })
7352
7645
  ] }) }),
7353
- activeTab === "history" && /* @__PURE__ */ jsx28(HistoryPanel, { history, currentResultId: currentResult?.id || null, onSelect: handleGallerySelect, onDelete: (id) => setHistory((h) => h.filter((x) => x.id !== id)), visibleCount: historyVisibleCount, onLoadMore: () => setHistoryVisibleCount((c) => c + 20) }),
7354
- activeTab === "gallery" && /* @__PURE__ */ jsx28(
7646
+ activeTab === "history" && /* @__PURE__ */ jsx29(HistoryPanel, { history, currentResultId: currentResult?.id || null, onSelect: handleGallerySelect, onDelete: (id) => setHistory((h) => h.filter((x) => x.id !== id)), visibleCount: historyVisibleCount, onLoadMore: () => setHistoryVisibleCount((c) => c + 20) }),
7647
+ activeTab === "gallery" && /* @__PURE__ */ jsx29(
7355
7648
  MediaLibrary,
7356
7649
  {
7357
7650
  items: galleryItems,
@@ -7367,9 +7660,9 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
7367
7660
  onLoadMore: () => setGalleryVisibleCount((c) => c + 20)
7368
7661
  }
7369
7662
  ),
7370
- activeTab === "inspect" && /* @__PURE__ */ jsx28(InspectPanel, { currentResult, history, onSelect: setCurrentResult }),
7371
- activeTab === "setup" && /* @__PURE__ */ jsx28(SetupPanel, { onWorkspaceImport: handleWorkspaceImport, buildInfo, tagBase: tagBaseResult }),
7372
- activeTab === "sync" && /* @__PURE__ */ jsx28(
7663
+ activeTab === "inspect" && /* @__PURE__ */ jsx29(InspectPanel, { currentResult, history, onSelect: setCurrentResult }),
7664
+ activeTab === "setup" && /* @__PURE__ */ jsx29(SetupPanel, { onWorkspaceImport: handleWorkspaceImport, buildInfo, tagBase: tagBaseResult }),
7665
+ activeTab === "sync" && /* @__PURE__ */ jsx29(
7373
7666
  ProjectSyncTab,
7374
7667
  {
7375
7668
  topSlot: syncTopSlot,
@@ -7393,15 +7686,15 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
7393
7686
  onHfInitialSync: hfToken ? handleHfInitialSync : void 0
7394
7687
  }
7395
7688
  ),
7396
- activeTab === "server" && /* @__PURE__ */ jsx28(ServerTab, { serverBaseUrl })
7689
+ activeTab === "server" && /* @__PURE__ */ jsx29(ServerTab, { serverBaseUrl })
7397
7690
  ] })
7398
7691
  ] })
7399
7692
  ] });
7400
7693
  }
7401
7694
 
7402
7695
  // src/components/FaApp.tsx
7403
- import { useState as useState25, useEffect as useEffect11 } from "react";
7404
- import { jsx as jsx29 } from "react/jsx-runtime";
7696
+ import { useState as useState26, useEffect as useEffect11 } from "react";
7697
+ import { jsx as jsx30 } from "react/jsx-runtime";
7405
7698
  function FaApp({
7406
7699
  onGenerateImage,
7407
7700
  onGeneratePrompt,
@@ -7420,7 +7713,7 @@ function FaApp({
7420
7713
  onServerDelete,
7421
7714
  buildInfo
7422
7715
  }) {
7423
- const [hfNamespace, setHfNamespace] = useState25(void 0);
7716
+ const [hfNamespace, setHfNamespace] = useState26(void 0);
7424
7717
  useEffect11(() => {
7425
7718
  if (!serverBaseUrl) return;
7426
7719
  fetch(`${serverBaseUrl}/api/status`).then((r) => r.json()).then((d) => {
@@ -7432,7 +7725,7 @@ function FaApp({
7432
7725
  const result = await onGeneratePrompt(text, options);
7433
7726
  return result.text;
7434
7727
  };
7435
- return /* @__PURE__ */ jsx29(
7728
+ return /* @__PURE__ */ jsx30(
7436
7729
  AvatarArchitectApp,
7437
7730
  {
7438
7731
  onGenerateImage,
@@ -7442,6 +7735,7 @@ function FaApp({
7442
7735
  initialHfToken: libToken ? libToken.startsWith("hf_") ? libToken : `hf_${libToken}` : void 0,
7443
7736
  hfNamespace,
7444
7737
  allowDevNamespace: !hfNamespace && allowDevNamespace,
7738
+ requireWorkspaceSelection: true,
7445
7739
  serverBaseUrl,
7446
7740
  onFetchServerProjects,
7447
7741
  onServerSave,
@@ -8018,6 +8312,7 @@ export {
8018
8312
  CompactDropdown,
8019
8313
  FaApp,
8020
8314
  FaToolsBadge,
8315
+ FlowWorkspacePicker,
8021
8316
  GLOBAL_STYLES,
8022
8317
  HistoryPanel,
8023
8318
  InspectPanel,