@rslsp1/fa-app-tools 7.4.0 → 8.0.0

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/szenen.js CHANGED
@@ -114,6 +114,7 @@ __export(szenen_exports, {
114
114
  collectVersionRefs: () => collectVersionRefs2,
115
115
  compileSchemas: () => compileSchemas,
116
116
  completePromptOperation: () => completePromptOperation,
117
+ contextOfRun: () => contextOfRun,
117
118
  createBrowserTextGenerationPort: () => createBrowserTextGenerationPort,
118
119
  createClientDerivationPort: () => createClientDerivationPort,
119
120
  createClientRunPort: () => createClientRunPort,
@@ -164,6 +165,8 @@ __export(szenen_exports, {
164
165
  generationBatchIdOf: () => generationBatchIdOf,
165
166
  gesamtHerkunft: () => gesamtHerkunft,
166
167
  getSzenenSchemas: () => getSzenenSchemas,
168
+ groupKeyOf: () => groupKeyOf,
169
+ groupOf: () => groupOf,
167
170
  gruppiereZuItems: () => gruppiereZuItems,
168
171
  hasPlacementCapability: () => hasPlacementCapability,
169
172
  isKnownElementType: () => isKnownElementType,
@@ -185,6 +188,7 @@ __export(szenen_exports, {
185
188
  mergeSzenenBatchOrigin: () => mergeSzenenBatchOrigin,
186
189
  mimeTypAus: () => mimeTypAus,
187
190
  mitDefaultVorlage: () => mitDefaultVorlage,
191
+ namingElementOf: () => namingElementOf,
188
192
  noticeFor: () => noticeFor,
189
193
  ordersForPromptRun: () => ordersForPromptRun,
190
194
  ordneSeedsZu: () => ordneSeedsZu,
@@ -220,9 +224,12 @@ __export(szenen_exports, {
220
224
  sceneOnlyCapabilities: () => sceneOnlyCapabilities,
221
225
  scopeOfPath: () => scopeOfPath,
222
226
  seedFehlerText: () => seedFehlerText,
227
+ selectPromptRuns: () => selectPromptRuns,
223
228
  selectableTargetModels: () => selectableTargetModels,
224
229
  showChain: () => showChain,
230
+ siblingsOf: () => siblingsOf,
225
231
  simulatedAnswerFor: () => simulatedAnswerFor,
232
+ sourceOf: () => sourceOf,
226
233
  szenenSnapshotFilename: () => szenenSnapshotFilename,
227
234
  totalModelCalls: () => totalModelCalls,
228
235
  typAusBytes: () => typAusBytes,
@@ -6152,6 +6159,88 @@ function collectPromptRuns(events) {
6152
6159
  function findPromptRun(events, runId) {
6153
6160
  return collectPromptRuns(events).find((run) => run.run_id === runId) ?? null;
6154
6161
  }
6162
+ var istKennung = (wert) => typeof wert === "string" && wert.trim().length > 0;
6163
+ function groupOf(run) {
6164
+ const quelle = sourceOf(run);
6165
+ if (quelle.kind === "published") {
6166
+ return istKennung(quelle.shot_version_id) ? {
6167
+ kind: "published",
6168
+ key: `published:${quelle.shot_version_id}`,
6169
+ shot_version_id: quelle.shot_version_id
6170
+ } : {
6171
+ kind: "unresolved",
6172
+ key: `run:${run.run_id}`,
6173
+ reason: `Der Lauf ${run.run_id} gilt als ver\xF6ffentlichte Herkunft, tr\xE4gt aber keine shot_version_id. Er steht deshalb f\xFCr sich; eine Zuordnung w\xE4re geraten.`
6174
+ };
6175
+ }
6176
+ if (quelle.kind === "draft_chain") {
6177
+ return istKennung(quelle.chain_id) ? { kind: "draft_chain", key: `chain:${quelle.chain_id}`, chain_id: quelle.chain_id } : {
6178
+ kind: "unresolved",
6179
+ key: `run:${run.run_id}`,
6180
+ reason: `Der Lauf ${run.run_id} stammt aus einer Draft-Kette ohne chain_id. Er steht deshalb f\xFCr sich; eine Zuordnung w\xE4re geraten.`
6181
+ };
6182
+ }
6183
+ const elementId = quelle.scene?.element_id;
6184
+ return istKennung(elementId) ? { kind: "scene_direct", key: `scene:${elementId}`, scene_element_id: elementId } : {
6185
+ kind: "unresolved",
6186
+ key: `run:${run.run_id}`,
6187
+ reason: `Der Lauf ${run.run_id} entstand direkt aus einer Szene, nennt aber kein Szenen-Element. Er steht deshalb f\xFCr sich; eine Zuordnung w\xE4re geraten.`
6188
+ };
6189
+ }
6190
+ function groupKeyOf(run) {
6191
+ return groupOf(run).key;
6192
+ }
6193
+ function siblingsOf(run, alle) {
6194
+ const schluessel = groupKeyOf(run);
6195
+ return alle.filter((kandidat) => groupKeyOf(kandidat) === schluessel);
6196
+ }
6197
+ function namingElementOf(run) {
6198
+ const quelle = sourceOf(run);
6199
+ if (quelle.kind === "scene_direct") {
6200
+ return istKennung(quelle.scene?.element_id) ? quelle.scene.element_id : null;
6201
+ }
6202
+ if (quelle.kind === "draft_chain") {
6203
+ const szene = (quelle.nodes ?? []).find((knoten) => knoten?.type === "scene");
6204
+ if (szene && istKennung(szene.element_id)) return szene.element_id;
6205
+ const shot = (quelle.nodes ?? []).find((knoten) => knoten?.type === "shot");
6206
+ if (shot && istKennung(shot.element_id)) return shot.element_id;
6207
+ }
6208
+ return istKennung(run.shot_element_id) ? run.shot_element_id : null;
6209
+ }
6210
+ function contextOfRun(run) {
6211
+ const kette = run.input_payload?.context_chain;
6212
+ if (!Array.isArray(kette) || kette.length === 0) return void 0;
6213
+ const erstes = kette[0];
6214
+ if (erstes === null) return null;
6215
+ return istKennung(erstes) ? erstes : void 0;
6216
+ }
6217
+ function selectPromptRuns(alle, filter = {}) {
6218
+ const status = filter.status ?? "succeeded";
6219
+ const nachKontext = filter.contextId !== void 0;
6220
+ const runs = [];
6221
+ let hiddenByStatus = 0;
6222
+ let hiddenByContext = 0;
6223
+ let withoutContext = 0;
6224
+ for (const run of alle) {
6225
+ if (status !== "all" && run.status !== status) {
6226
+ hiddenByStatus += 1;
6227
+ continue;
6228
+ }
6229
+ if (nachKontext) {
6230
+ const kontext = contextOfRun(run);
6231
+ if (kontext === void 0) {
6232
+ withoutContext += 1;
6233
+ continue;
6234
+ }
6235
+ if (kontext !== filter.contextId) {
6236
+ hiddenByContext += 1;
6237
+ continue;
6238
+ }
6239
+ }
6240
+ runs.push(run);
6241
+ }
6242
+ return { runs, hiddenByStatus, hiddenByContext, withoutContext };
6243
+ }
6155
6244
 
6156
6245
  // src/lib/szenen/derivationExamples.ts
6157
6246
  var PROPOSAL_EXAMPLE = {
@@ -7719,7 +7808,10 @@ function deriveItemFromRun(input) {
7719
7808
  kind: "rejected",
7720
7809
  failure: {
7721
7810
  class: "run_not_among_siblings",
7722
- message: `Der Lauf ${run.run_id} ist unter den ${runsOfShot.length} Laeufen des Shots ${run.shot_version_id} nicht enthalten. Ohne seinen Platz gaebe es keine Rundennummer.`
7811
+ // Regel 11: Die Meldung nennt die **Bezugsgruppe**, nicht ein Feld,
7812
+ // das bei einem shotlosen Lauf leer ist. „des Shots ''" war keine
7813
+ // Auskunft (P1-B).
7814
+ message: `Der Lauf ${run.run_id} ist unter den ${runsOfShot.length} Laeufen seiner Bezugsgruppe ${groupKeyOf(run)} nicht enthalten. Ohne seinen Platz gaebe es keine Rundennummer.`
7723
7815
  }
7724
7816
  };
7725
7817
  }
@@ -10267,7 +10359,10 @@ function capabilitiesOf(port) {
10267
10359
  imageOrderHistory: typeof port.imageBatchHistory?.listOrdersForPromptRun === "function",
10268
10360
  imageBatchWrite: typeof port.imageBatchWrite?.importBatch === "function",
10269
10361
  imageGeneration: typeof port.imageGeneration?.startFromPromptRun === "function",
10270
- imageJobs: typeof port.imageJobs?.claimAndRun === "function"
10362
+ imageJobs: typeof port.imageJobs?.claimAndRun === "function",
10363
+ // P1-A: die herkunftsuebergreifende Prompt-Sicht. Ein Host ohne sie
10364
+ // verliert nur diesen Bereich — nicht die drei bestehenden Einstiege.
10365
+ promptOverview: typeof port.runs.listAllRuns === "function"
10271
10366
  };
10272
10367
  }
10273
10368
  function unsupportedReason(capability) {
@@ -11241,7 +11336,7 @@ function createMemoryViewPort(options = {}) {
11241
11336
  const itemMedien = /* @__PURE__ */ new Map();
11242
11337
  const runs = {
11243
11338
  async listRunsForShot(shotVersionId) {
11244
- return ok2(laeufe.filter((l) => l.shot_version_id === shotVersionId));
11339
+ return ok2(laeufe.filter((l) => groupKeyOf(l) === `published:${shotVersionId}`));
11245
11340
  },
11246
11341
  async getRun(runId) {
11247
11342
  return ok2(laeufe.find((l) => l.run_id === runId) ?? null);
@@ -11325,6 +11420,12 @@ function createMemoryViewPort(options = {}) {
11325
11420
  return ok2(laeufe.filter(
11326
11421
  (r) => r.source?.kind === "scene_direct" && r.source.scene.element_id === sceneElementId
11327
11422
  ));
11423
+ },
11424
+ // P1-A: die gemeinsame Sicht. Auch hier nur die **Form** — gefiltert wird
11425
+ // mit `selectPromptRuns()`, derselben Funktion wie im Client und im
11426
+ // Server. Ein eigener Filter waere eine zweite Wahrheit.
11427
+ async listAllRuns(filter) {
11428
+ return ok2(selectPromptRuns(laeufe, filter));
11328
11429
  }
11329
11430
  };
11330
11431
  const itemPort = {
@@ -12439,8 +12540,13 @@ function createEventLogRunPersistence(channel) {
12439
12540
  // Nur veroeffentlichte Laeufe. Ein Draft-Lauf hat eine **leere**
12440
12541
  // shot_version_id (D-98) und wuerde bei der Suche nach '' sonst
12441
12542
  // faelschlich mitkommen — eine stille Vermischung zweier Herkuenfte.
12543
+ //
12544
+ // Seit P1-B faellt die Entscheidung nicht mehr hier, sondern in
12545
+ // `groupKeyOf()`: dieselbe Regel, aus der auch die Geschwister und
12546
+ // damit die Rundennummer entstehen. Vorher stand sie hier **und**
12547
+ // — anders — in `domainService.getPromptRunWithSiblings()`.
12442
12548
  value: collectPromptRuns(events).filter(
12443
- (run) => sourceOf(run).kind === "published" && run.shot_version_id === shotVersionId
12549
+ (run) => groupKeyOf(run) === `published:${shotVersionId}`
12444
12550
  )
12445
12551
  };
12446
12552
  } catch (error) {
@@ -12462,10 +12568,9 @@ function createEventLogRunPersistence(channel) {
12462
12568
  const events = await channel.readEvents();
12463
12569
  return {
12464
12570
  kind: "ok",
12465
- value: collectPromptRuns(events).filter((run) => {
12466
- const quelle = sourceOf(run);
12467
- return quelle.kind === "draft_chain" && quelle.chain_id === chainId;
12468
- })
12571
+ value: collectPromptRuns(events).filter(
12572
+ (run) => groupKeyOf(run) === `chain:${chainId}`
12573
+ )
12469
12574
  };
12470
12575
  } catch (error) {
12471
12576
  return queryError2(error, `Laeufe der Kette ${chainId} konnten nicht gelesen werden`);
@@ -12476,10 +12581,9 @@ function createEventLogRunPersistence(channel) {
12476
12581
  const events = await channel.readEvents();
12477
12582
  return {
12478
12583
  kind: "ok",
12479
- value: collectPromptRuns(events).filter((run) => {
12480
- const quelle = sourceOf(run);
12481
- return quelle.kind === "scene_direct" && quelle.scene.element_id === sceneElementId;
12482
- })
12584
+ value: collectPromptRuns(events).filter(
12585
+ (run) => groupKeyOf(run) === `scene:${sceneElementId}`
12586
+ )
12483
12587
  };
12484
12588
  } catch (error) {
12485
12589
  return queryError2(
@@ -12488,6 +12592,16 @@ function createEventLogRunPersistence(channel) {
12488
12592
  );
12489
12593
  }
12490
12594
  },
12595
+ // P1-A: dieselbe Faltung, nur ohne Herkunftsfilter. Sie las schon bisher
12596
+ // in jedem der drei Fälle den **vollen** Log — hier fällt lediglich das
12597
+ // Aussieben weg.
12598
+ async listAll() {
12599
+ try {
12600
+ return { kind: "ok", value: collectPromptRuns(await channel.readEvents()) };
12601
+ } catch (error) {
12602
+ return queryError2(error, "Die Prompt-Laeufe konnten nicht gelesen werden");
12603
+ }
12604
+ },
12491
12605
  async record(record) {
12492
12606
  try {
12493
12607
  await channel.appendEvent(SZENEN_EVENT_TYPES.promptRunRecorded, record);
@@ -12784,7 +12898,25 @@ function createClientRunPort(options) {
12784
12898
  `Laeufe der Szene ${sceneElementId} konnten nicht gelesen werden`
12785
12899
  );
12786
12900
  }
12787
- }
12901
+ },
12902
+ // ── Die gemeinsame Prompt-Sicht (P1-A) ────────────────────────────────
12903
+ //
12904
+ // Sie wird nur angeboten, wenn die **Persistenz** aufzählen kann. Ein
12905
+ // Host, dessen Speicher das nicht hergibt, bekommt hier keine Operation —
12906
+ // und die Ansicht nennt den Grund, statt eine leere Liste zu zeigen (§8).
12907
+ // Der Filter läuft über `selectPromptRuns()`, dieselbe Funktion, die auch
12908
+ // der Server benutzt; zwei Bezugsrahmen wären zwei Wahrheiten.
12909
+ ...typeof runs.listAll === "function" ? {
12910
+ async listAllRuns(filter) {
12911
+ try {
12912
+ const alle = await runs.listAll();
12913
+ if (alle.kind !== "ok") return alle;
12914
+ return { kind: "ok", value: selectPromptRuns(alle.value, filter) };
12915
+ } catch (error) {
12916
+ return queryError2(error, "Die Prompt-Laeufe konnten nicht gelesen werden");
12917
+ }
12918
+ }
12919
+ } : {}
12788
12920
  };
12789
12921
  }
12790
12922
 
@@ -14285,40 +14417,55 @@ async function leseBilderAusZip(datei) {
14285
14417
  }
14286
14418
 
14287
14419
  // src/features/szenen/SzenenView.tsx
14288
- var import_react17 = require("react");
14420
+ var import_react20 = require("react");
14289
14421
 
14290
14422
  // src/features/szenen/szenenViewModel.ts
14291
- var KEINE_BAUSTEINE = [
14292
- "scene",
14423
+ var BAUSTEIN_TYPES = [
14424
+ "scene_component",
14425
+ "style",
14426
+ "shot_concept",
14427
+ "prompt_fragment",
14428
+ "prompt_policy"
14429
+ ];
14430
+ var ERWEITERT_REIHENFOLGE = [
14293
14431
  "scene_setup",
14294
- "shot"
14432
+ "shot",
14433
+ "camera_preset",
14434
+ "camera_pattern",
14435
+ "target_model",
14436
+ "scene_derivation_policy",
14437
+ "sequence"
14295
14438
  ];
14296
- var BAUSTEIN_TYPES = SZENEN_ELEMENT_TYPES.filter((typ) => !KEINE_BAUSTEINE.includes(typ));
14439
+ var ERWEITERT_TYPES = (() => {
14440
+ const gehoertHierher = (typ) => typ !== "scene" && !BAUSTEIN_TYPES.includes(typ);
14441
+ const bekannt = ERWEITERT_REIHENFOLGE.filter(
14442
+ (typ) => SZENEN_ELEMENT_TYPES.includes(typ) && gehoertHierher(typ)
14443
+ );
14444
+ const rest = SZENEN_ELEMENT_TYPES.filter(
14445
+ (typ) => gehoertHierher(typ) && !bekannt.includes(typ)
14446
+ );
14447
+ return [...bekannt, ...rest];
14448
+ })();
14297
14449
  var ALLE_BEREICHE = [
14298
14450
  {
14299
- id: "derive",
14300
- title: "0 \xB7 Rekonstruktion",
14301
- description: "Aus einem Bild oder Prompt einen Szenenentwurf vorschlagen lassen."
14451
+ id: "scene",
14452
+ title: "Szenen",
14453
+ description: "Szenen anlegen, aus Bild oder Text ableiten und daraus Prompts starten."
14302
14454
  },
14303
14455
  {
14304
- id: "elements",
14305
- title: "1 \xB7 Bausteine",
14306
- description: "Figuren, Orte, Stile und Regeln f\xFCr sp\xE4tere Bildprompts pflegen."
14456
+ id: "prompts",
14457
+ title: "Prompts",
14458
+ description: "Alle erzeugten Prompts mit ihren Bildern \u2014 unabhaengig davon, ueber welchen Weg sie entstanden sind."
14307
14459
  },
14308
14460
  {
14309
- id: "scene",
14310
- title: "2 \xB7 Szene",
14311
- description: "Aus Bausteinen eine konkrete Szene und ihre Beziehungen bauen."
14312
- },
14313
- {
14314
- id: "setup",
14315
- title: "3 \xB7 Bildaufbau",
14316
- description: "Stil, Komposition und Kamera f\xFCr das sp\xE4tere Bild festlegen."
14461
+ id: "elements",
14462
+ title: "Bausteine",
14463
+ description: "Figuren, Orte, Stile, Prompt-Bausteine und Prompt-Regeln pflegen."
14317
14464
  },
14318
14465
  {
14319
- id: "shot",
14320
- title: "4 \xB7 Prompt",
14321
- description: "Bildprompt erzeugen, Varianten vergleichen und als Item speichern."
14466
+ id: "advanced",
14467
+ title: "Erweitert",
14468
+ description: "Optionale Pr\xE4zisierung: Bildaufbau, Shot, Kameras, Zielmodelle, Regeln, Sequenzen."
14322
14469
  },
14323
14470
  {
14324
14471
  id: "media",
@@ -14328,16 +14475,12 @@ var ALLE_BEREICHE = [
14328
14475
  ];
14329
14476
  function areasFor(port) {
14330
14477
  const faehig = capabilitiesOf(port);
14331
- return ALLE_BEREICHE.filter((bereich) => {
14332
- if (bereich.id === "media") return faehig.media;
14333
- if (bereich.id === "derive") return faehig.derivation;
14334
- return true;
14335
- });
14478
+ return ALLE_BEREICHE.filter((bereich) => bereich.id !== "media" || faehig.media);
14336
14479
  }
14337
14480
  function resolveArea(port, gewuenscht) {
14338
14481
  const verfuegbar = areasFor(port);
14339
14482
  if (gewuenscht && verfuegbar.some((b) => b.id === gewuenscht)) return gewuenscht;
14340
- return verfuegbar.find((b) => b.id === "elements")?.id ?? verfuegbar[0].id;
14483
+ return verfuegbar.find((b) => b.id === "scene")?.id ?? verfuegbar[0].id;
14341
14484
  }
14342
14485
  function noticeFor(ergebnis, was) {
14343
14486
  switch (ergebnis.kind) {
@@ -14378,7 +14521,7 @@ function noticeFor(ergebnis, was) {
14378
14521
  }
14379
14522
 
14380
14523
  // src/features/szenen/areas/ElementsArea.tsx
14381
- var import_react12 = require("react");
14524
+ var import_react13 = require("react");
14382
14525
 
14383
14526
  // src/features/szenen/areas/usePortQuery.ts
14384
14527
  var import_react = require("react");
@@ -14410,7 +14553,7 @@ function usePortQuery(frage, abhaengigkeiten) {
14410
14553
  }
14411
14554
 
14412
14555
  // src/features/szenen/areas/ElementDetail.tsx
14413
- var import_react10 = require("react");
14556
+ var import_react11 = require("react");
14414
14557
 
14415
14558
  // src/features/szenen/elementLabels.ts
14416
14559
  var LABELS = {
@@ -16502,13 +16645,57 @@ var VersionNavigator = ({
16502
16645
  };
16503
16646
 
16504
16647
  // src/features/szenen/areas/RunsPanel.tsx
16505
- var import_react9 = require("react");
16648
+ var import_react10 = require("react");
16649
+
16650
+ // src/features/szenen/areas/useLaufTitel.ts
16651
+ var import_react7 = require("react");
16652
+ function useLaufTitel(port, laeufe) {
16653
+ const [titelJeElement, setTitelJeElement] = (0, import_react7.useState)(
16654
+ () => /* @__PURE__ */ new Map()
16655
+ );
16656
+ const gebraucht = [...new Set(
16657
+ laeufe.map(namingElementOf).filter((id) => id !== null)
16658
+ )].sort();
16659
+ const schluessel = gebraucht.join(",");
16660
+ (0, import_react7.useEffect)(() => {
16661
+ let abgemeldet = false;
16662
+ const offen = gebraucht.filter((id) => !titelJeElement.has(id));
16663
+ if (offen.length === 0) return void 0;
16664
+ void (async () => {
16665
+ const gelesen = /* @__PURE__ */ new Map();
16666
+ for (const id of offen) {
16667
+ try {
16668
+ const ergebnis = await port.elements.getElement(id);
16669
+ gelesen.set(
16670
+ id,
16671
+ ergebnis.kind === "ok" && ergebnis.value ? ergebnis.value.metadata?.title ?? null : null
16672
+ );
16673
+ } catch {
16674
+ gelesen.set(id, null);
16675
+ }
16676
+ }
16677
+ if (abgemeldet) return;
16678
+ setTitelJeElement((bisher) => new Map([...bisher, ...gelesen]));
16679
+ })();
16680
+ return () => {
16681
+ abgemeldet = true;
16682
+ };
16683
+ }, [port, schluessel]);
16684
+ const jeLauf = /* @__PURE__ */ new Map();
16685
+ for (const lauf of laeufe) {
16686
+ const elementId = namingElementOf(lauf);
16687
+ if (!elementId) continue;
16688
+ const titel = titelJeElement.get(elementId);
16689
+ if (titel) jeLauf.set(lauf.run_id, titel);
16690
+ }
16691
+ return jeLauf;
16692
+ }
16506
16693
 
16507
16694
  // src/features/szenen/areas/RunImagesPanel.tsx
16508
- var import_react8 = __toESM(require("react"));
16695
+ var import_react9 = __toESM(require("react"));
16509
16696
 
16510
16697
  // src/features/szenen/areas/Bildbausteine.tsx
16511
- var import_react7 = require("react");
16698
+ var import_react8 = require("react");
16512
16699
  var import_jsx_runtime7 = require("react/jsx-runtime");
16513
16700
  var Kachel = ({
16514
16701
  quelle,
@@ -16525,11 +16712,11 @@ var BildViewer = ({
16525
16712
  }) => {
16526
16713
  const anzahl = bilder.length;
16527
16714
  const bild = bilder[position];
16528
- const blaettern = (0, import_react7.useCallback)((schritt) => {
16715
+ const blaettern = (0, import_react8.useCallback)((schritt) => {
16529
16716
  if (anzahl === 0) return;
16530
16717
  onWechseln((position + schritt + anzahl) % anzahl);
16531
16718
  }, [anzahl, position, onWechseln]);
16532
- (0, import_react7.useEffect)(() => {
16719
+ (0, import_react8.useEffect)(() => {
16533
16720
  const taste = (e) => {
16534
16721
  if (e.key === "Escape") onSchliessen();
16535
16722
  else if (e.key === "ArrowLeft") blaettern(-1);
@@ -16612,8 +16799,8 @@ var BildViewer = ({
16612
16799
  );
16613
16800
  };
16614
16801
  var BildGalerie = ({ bilder, testId, satzTitel }) => {
16615
- const [offen, setOffen] = (0, import_react7.useState)(null);
16616
- (0, import_react7.useEffect)(() => {
16802
+ const [offen, setOffen] = (0, import_react8.useState)(null);
16803
+ (0, import_react8.useEffect)(() => {
16617
16804
  setOffen((vorher) => vorher !== null && vorher >= bilder.length ? null : vorher);
16618
16805
  }, [bilder.length]);
16619
16806
  if (bilder.length === 0) return null;
@@ -16669,11 +16856,11 @@ var AUFTRAG_TEXT = {
16669
16856
  };
16670
16857
  var RunImagesPanel = ({ port, lauf }) => {
16671
16858
  const faehig = capabilitiesOf(port);
16672
- const [nachladen, setNachladen] = (0, import_react8.useState)(0);
16859
+ const [nachladen, setNachladen] = (0, import_react9.useState)(0);
16673
16860
  const neuLesen = () => setNachladen((n) => n + 1);
16674
- const [erzeugenOffen, setErzeugenOffen] = (0, import_react8.useState)(null);
16675
- const [zuordnenOffen, setZuordnenOffen] = (0, import_react8.useState)(null);
16676
- const [chatAuftraegeOffen, setChatAuftraegeOffen] = (0, import_react8.useState)(null);
16861
+ const [erzeugenOffen, setErzeugenOffen] = (0, import_react9.useState)(null);
16862
+ const [zuordnenOffen, setZuordnenOffen] = (0, import_react9.useState)(null);
16863
+ const [chatAuftraegeOffen, setChatAuftraegeOffen] = (0, import_react9.useState)(null);
16677
16864
  const quelle = sourceOf(lauf);
16678
16865
  const [wahlPhase] = usePortQuery(
16679
16866
  () => port.imageGeneration ? port.imageGeneration.imageModelChoiceForRun(lauf.run_id) : Promise.resolve({ kind: "ok", value: null }),
@@ -16987,12 +17174,12 @@ var BestandsBild = ({ port, mediaRef }) => {
16987
17174
  ] });
16988
17175
  };
16989
17176
  function useBildQuellen(port, bilder) {
16990
- const [stand, setStand] = (0, import_react8.useState)(() => ({ quellen: /* @__PURE__ */ new Map(), fehler: /* @__PURE__ */ new Map() }));
16991
- const gehalten = (0, import_react8.useRef)(/* @__PURE__ */ new Map());
16992
- const gescheitert = (0, import_react8.useRef)(/* @__PURE__ */ new Map());
16993
- const [versuch, setVersuch] = (0, import_react8.useState)(0);
17177
+ const [stand, setStand] = (0, import_react9.useState)(() => ({ quellen: /* @__PURE__ */ new Map(), fehler: /* @__PURE__ */ new Map() }));
17178
+ const gehalten = (0, import_react9.useRef)(/* @__PURE__ */ new Map());
17179
+ const gescheitert = (0, import_react9.useRef)(/* @__PURE__ */ new Map());
17180
+ const [versuch, setVersuch] = (0, import_react9.useState)(0);
16994
17181
  const schluessel = bilder.map((b) => `${b.media_ref}|${b.mime_type ?? ""}`).join(" ");
16995
- (0, import_react8.useEffect)(() => {
17182
+ (0, import_react9.useEffect)(() => {
16996
17183
  const bestand = port.imageLibrary;
16997
17184
  if (!bestand) return void 0;
16998
17185
  let abgebrochen = false;
@@ -17128,7 +17315,7 @@ var BatchKachel = ({ port, batch }) => {
17128
17315
  /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
17129
17316
  "Batches",
17130
17317
  " ",
17131
- batch.origins.length > 0 ? batch.origins.map((h, i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react8.default.Fragment, { children: [
17318
+ batch.origins.length > 0 ? batch.origins.map((h, i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react9.default.Fragment, { children: [
17132
17319
  i > 0 ? ", " : "",
17133
17320
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: h.generation_batch_id }),
17134
17321
  ` (${HERKUNFT_KURZ[h.source_kind]})`
@@ -17157,11 +17344,11 @@ var ProfilBefunde = ({ wahl, runId }) => {
17157
17344
  ] });
17158
17345
  };
17159
17346
  var ErzeugenAktion = ({ port, lauf, wahl, wahlFehler, onFertig }) => {
17160
- const [modellWahl, setModellWahl] = (0, import_react8.useState)(null);
17161
- const [anzahlText, setAnzahlText] = (0, import_react8.useState)("1");
17162
- const [seitenverhaeltnis, setSeitenverhaeltnis] = (0, import_react8.useState)("");
17163
- const [laeuft, setLaeuft] = (0, import_react8.useState)(false);
17164
- const [notiz, setNotiz] = (0, import_react8.useState)(null);
17347
+ const [modellWahl, setModellWahl] = (0, import_react9.useState)(null);
17348
+ const [anzahlText, setAnzahlText] = (0, import_react9.useState)("1");
17349
+ const [seitenverhaeltnis, setSeitenverhaeltnis] = (0, import_react9.useState)("");
17350
+ const [laeuft, setLaeuft] = (0, import_react9.useState)(false);
17351
+ const [notiz, setNotiz] = (0, import_react9.useState)(null);
17165
17352
  if (!port.imageGeneration) {
17166
17353
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { "data-testid": `erzeugen-unsupported-${lauf.run_id}`, children: "Dieser Host erzeugt keine Bilder \u2014 entweder fehlt der Providerzugang oder der gesicherte Speicherweg. Externe Bilder lassen sich trotzdem zuordnen." });
17167
17354
  }
@@ -17338,23 +17525,23 @@ var ErzeugenAktion = ({ port, lauf, wahl, wahlFehler, onFertig }) => {
17338
17525
  };
17339
17526
  var DEFAULT_VORLAGE_KEY = "__default__";
17340
17527
  var ZuordnenAktion = ({ port, lauf, onFertig }) => {
17341
- const [dateien, setDateien] = (0, import_react8.useState)([]);
17342
- const [seeds, setSeeds] = (0, import_react8.useState)({});
17343
- const [zip, setZip] = (0, import_react8.useState)(null);
17344
- const [zipLaedt, setZipLaedt] = (0, import_react8.useState)(false);
17345
- const [seedListe, setSeedListe] = (0, import_react8.useState)("");
17346
- const [vorlagen, setVorlagen] = (0, import_react8.useState)([DEFAULT_SEED_VORLAGE]);
17347
- const [vorlageKey, setVorlageKey] = (0, import_react8.useState)(DEFAULT_VORLAGE_KEY);
17348
- const [vorlagenStand, setVorlagenStand] = (0, import_react8.useState)(0);
17349
- const [vorlageBenennen, setVorlageBenennen] = (0, import_react8.useState)(false);
17350
- const [vorlageName, setVorlageName] = (0, import_react8.useState)("");
17351
- const [modell, setModell] = (0, import_react8.useState)("");
17352
- const [itemId, setItemId] = (0, import_react8.useState)("");
17353
- const [laeuft, setLaeuft] = (0, import_react8.useState)(false);
17354
- const [notiz, setNotiz] = (0, import_react8.useState)(null);
17355
- const auswahlMarke = (0, import_react8.useRef)(0);
17528
+ const [dateien, setDateien] = (0, import_react9.useState)([]);
17529
+ const [seeds, setSeeds] = (0, import_react9.useState)({});
17530
+ const [zip, setZip] = (0, import_react9.useState)(null);
17531
+ const [zipLaedt, setZipLaedt] = (0, import_react9.useState)(false);
17532
+ const [seedListe, setSeedListe] = (0, import_react9.useState)("");
17533
+ const [vorlagen, setVorlagen] = (0, import_react9.useState)([DEFAULT_SEED_VORLAGE]);
17534
+ const [vorlageKey, setVorlageKey] = (0, import_react9.useState)(DEFAULT_VORLAGE_KEY);
17535
+ const [vorlagenStand, setVorlagenStand] = (0, import_react9.useState)(0);
17536
+ const [vorlageBenennen, setVorlageBenennen] = (0, import_react9.useState)(false);
17537
+ const [vorlageName, setVorlageName] = (0, import_react9.useState)("");
17538
+ const [modell, setModell] = (0, import_react9.useState)("");
17539
+ const [itemId, setItemId] = (0, import_react9.useState)("");
17540
+ const [laeuft, setLaeuft] = (0, import_react9.useState)(false);
17541
+ const [notiz, setNotiz] = (0, import_react9.useState)(null);
17542
+ const auswahlMarke = (0, import_react9.useRef)(0);
17356
17543
  const zipAktiv = zip !== null;
17357
- (0, import_react8.useEffect)(() => {
17544
+ (0, import_react9.useEffect)(() => {
17358
17545
  if (!zipAktiv) return;
17359
17546
  let abgebrochen = false;
17360
17547
  void (async () => {
@@ -17814,8 +18001,8 @@ var ChatAuftraegeAktion = ({
17814
18001
  laedt,
17815
18002
  onFertig
17816
18003
  }) => {
17817
- const [laufend, setLaufend] = (0, import_react8.useState)(null);
17818
- const [notiz, setNotiz] = (0, import_react8.useState)(null);
18004
+ const [laufend, setLaufend] = (0, import_react9.useState)(null);
18005
+ const [notiz, setNotiz] = (0, import_react9.useState)(null);
17819
18006
  async function uebernehmen(jobId) {
17820
18007
  if (!port.imageJobs) return;
17821
18008
  setLaufend(jobId);
@@ -17894,13 +18081,13 @@ var ChatAuftraegeAktion = ({
17894
18081
  // src/features/szenen/areas/RunsPanel.tsx
17895
18082
  var import_jsx_runtime9 = require("react/jsx-runtime");
17896
18083
  var RunsPanel = ({ port, source, contextId }) => {
17897
- const [anweisung, setAnweisung] = (0, import_react9.useState)("");
17898
- const [laeuft, setLaeuft] = (0, import_react9.useState)(false);
17899
- const [notiz, setNotiz] = (0, import_react9.useState)(null);
17900
- const [nachladen, setNachladen] = (0, import_react9.useState)(0);
18084
+ const [anweisung, setAnweisung] = (0, import_react10.useState)("");
18085
+ const [laeuft, setLaeuft] = (0, import_react10.useState)(false);
18086
+ const [notiz, setNotiz] = (0, import_react10.useState)(null);
18087
+ const [nachladen, setNachladen] = (0, import_react10.useState)(0);
17901
18088
  const faehig = capabilitiesOf(port);
17902
18089
  const quellSchluessel = source.kind === "published" ? source.shotVersionId : source.kind === "draft_chain" ? source.chainId : source.sceneElementId;
17903
- const aktuelleQuelle = (0, import_react9.useRef)({ kind: source.kind, id: quellSchluessel });
18090
+ const aktuelleQuelle = (0, import_react10.useRef)({ kind: source.kind, id: quellSchluessel });
17904
18091
  aktuelleQuelle.current = { kind: source.kind, id: quellSchluessel };
17905
18092
  const [phase, neuLaden] = usePortQuery(
17906
18093
  () => {
@@ -17928,10 +18115,11 @@ var RunsPanel = ({ port, source, contextId }) => {
17928
18115
  neuLaden();
17929
18116
  };
17930
18117
  const laeufe = phase.status === "ready" ? phase.value : [];
17931
- const [gewaehlteRunde, setGewaehlteRunde] = (0, import_react9.useState)(void 0);
18118
+ const titel = useLaufTitel(port, laeufe);
18119
+ const [gewaehlteRunde, setGewaehlteRunde] = (0, import_react10.useState)(void 0);
17932
18120
  const neueste = laeufe.length > 0 ? laeufe[laeufe.length - 1].run_id : null;
17933
18121
  const offeneRunde = gewaehlteRunde === void 0 ? neueste : gewaehlteRunde;
17934
- (0, import_react9.useEffect)(() => {
18122
+ (0, import_react10.useEffect)(() => {
17935
18123
  setGewaehlteRunde(void 0);
17936
18124
  setAnweisung("");
17937
18125
  setNotiz(null);
@@ -17966,6 +18154,7 @@ var RunsPanel = ({ port, source, contextId }) => {
17966
18154
  port,
17967
18155
  lauf,
17968
18156
  runde: roundOfRun(lauf, laeufe),
18157
+ titel: titel.get(lauf.run_id) ?? null,
17969
18158
  offen: lauf.run_id === offeneRunde,
17970
18159
  onUmschalten: () => setGewaehlteRunde(
17971
18160
  lauf.run_id === offeneRunde ? null : lauf.run_id
@@ -17990,7 +18179,7 @@ var STATUS_TEXT = {
17990
18179
  };
17991
18180
  var LANGER_TEXT = 240;
17992
18181
  var Sekundaertext = ({ titel, text, testId }) => {
17993
- const [ganz, setGanz] = (0, import_react9.useState)(false);
18182
+ const [ganz, setGanz] = (0, import_react10.useState)(false);
17994
18183
  const lang = text.length > LANGER_TEXT;
17995
18184
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("section", { className: "szenen-runs__sekundaer", children: [
17996
18185
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h5", { children: titel }),
@@ -18009,7 +18198,7 @@ var Sekundaertext = ({ titel, text, testId }) => {
18009
18198
  };
18010
18199
  var LISTE_ANFANG = 3;
18011
18200
  var SekundaerListe = ({ titel, eintraege, testId, className }) => {
18012
- const [alle, setAlle] = (0, import_react9.useState)(false);
18201
+ const [alle, setAlle] = (0, import_react10.useState)(false);
18013
18202
  const lang = eintraege.length > LISTE_ANFANG;
18014
18203
  const gezeigt = lang && !alle ? eintraege.slice(0, LISTE_ANFANG) : eintraege;
18015
18204
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("section", { className: "szenen-runs__sekundaer", children: [
@@ -18027,10 +18216,10 @@ var SekundaerListe = ({ titel, eintraege, testId, className }) => {
18027
18216
  )
18028
18217
  ] });
18029
18218
  };
18030
- var RundenEintrag = ({ port, lauf, runde, offen, onUmschalten, itemMoeglich, onItemGespeichert }) => {
18031
- const [notiz, setNotiz] = (0, import_react9.useState)(null);
18032
- const [laeuft, setLaeuft] = (0, import_react9.useState)(false);
18033
- const [nachladen, setNachladen] = (0, import_react9.useState)(0);
18219
+ var RundenEintrag = ({ port, lauf, runde, titel, offen, onUmschalten, itemMoeglich, onItemGespeichert }) => {
18220
+ const [notiz, setNotiz] = (0, import_react10.useState)(null);
18221
+ const [laeuft, setLaeuft] = (0, import_react10.useState)(false);
18222
+ const [nachladen, setNachladen] = (0, import_react10.useState)(0);
18034
18223
  const [itemPhase] = usePortQuery(
18035
18224
  () => offen && port.items ? port.items.getItemForRun(lauf.run_id) : Promise.resolve({ kind: "ok", value: null }),
18036
18225
  [port, lauf.run_id, nachladen, offen]
@@ -18058,10 +18247,7 @@ var RundenEintrag = ({ port, lauf, runde, offen, onUmschalten, itemMoeglich, onI
18058
18247
  "aria-expanded": offen,
18059
18248
  "data-testid": `runde-umschalten-${lauf.run_id}`,
18060
18249
  children: [
18061
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { className: "szenen-runs__marke", children: [
18062
- "Runde ",
18063
- runde
18064
- ] }),
18250
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "szenen-runs__marke", "data-testid": `titel-${lauf.run_id}`, children: titel ? `${titel} \xB7 Runde ${runde}` : `Runde ${runde}` }),
18065
18251
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
18066
18252
  "span",
18067
18253
  {
@@ -18185,43 +18371,43 @@ var ElementDetail = ({
18185
18371
  author,
18186
18372
  onChanged
18187
18373
  }) => {
18188
- const [nachladen, setNachladen] = (0, import_react10.useState)(0);
18374
+ const [nachladen, setNachladen] = (0, import_react11.useState)(0);
18189
18375
  const [phase] = usePortQuery(
18190
18376
  () => port.elements.getElement(elementId),
18191
18377
  [port, elementId, nachladen]
18192
18378
  );
18193
- const [entwurf, setEntwurf] = (0, import_react10.useState)({});
18194
- const [notiz, setNotiz] = (0, import_react10.useState)(null);
18195
- const [laeuft, setLaeuft] = (0, import_react10.useState)(false);
18196
- const [wahl, setWahl] = (0, import_react10.useState)(null);
18197
- const [basiswechsel, setBasiswechsel] = (0, import_react10.useState)(null);
18379
+ const [entwurf, setEntwurf] = (0, import_react11.useState)({});
18380
+ const [notiz, setNotiz] = (0, import_react11.useState)(null);
18381
+ const [laeuft, setLaeuft] = (0, import_react11.useState)(false);
18382
+ const [wahl, setWahl] = (0, import_react11.useState)(null);
18383
+ const [basiswechsel, setBasiswechsel] = (0, import_react11.useState)(null);
18198
18384
  const [kettenPhase] = usePortQuery(
18199
18385
  () => port.context.chainFor(contextId),
18200
18386
  [port, contextId]
18201
18387
  );
18202
- const kontextkette = (0, import_react10.useMemo)(() => {
18388
+ const kontextkette = (0, import_react11.useMemo)(() => {
18203
18389
  if (kettenPhase.status === "ready") return { status: "ready", chain: kettenPhase.value };
18204
18390
  if (kettenPhase.status === "error") return { status: "error", message: kettenPhase.message };
18205
18391
  return { status: "loading" };
18206
18392
  }, [kettenPhase]);
18207
18393
  const kette = kontextkette.status === "ready" ? kontextkette.chain : null;
18208
18394
  const schnappschuss = phase.status === "ready" ? phase.value : null;
18209
- const kopfErgebnis = (0, import_react10.useMemo)(
18395
+ const kopfErgebnis = (0, import_react11.useMemo)(
18210
18396
  () => schnappschuss && kette ? effectivePreferredHeadSafe(schnappschuss, kette) : null,
18211
18397
  [schnappschuss, kette]
18212
18398
  );
18213
18399
  const kopfAufloesung = resolutionOf(kopfErgebnis);
18214
18400
  const bevorzugteVersion = selectedHeadVersionId(kopfAufloesung);
18215
- const felder = (0, import_react10.useMemo)(
18401
+ const felder = (0, import_react11.useMemo)(
18216
18402
  () => schnappschuss ? fieldsForType(schnappschuss.element.type) : [],
18217
18403
  [schnappschuss?.element.type]
18218
18404
  );
18219
- (0, import_react10.useEffect)(() => {
18405
+ (0, import_react11.useEffect)(() => {
18220
18406
  setWahl(null);
18221
18407
  setBasiswechsel(null);
18222
18408
  setNotiz(null);
18223
18409
  }, [elementId]);
18224
- const automatisch = (0, import_react10.useMemo)(() => {
18410
+ const automatisch = (0, import_react11.useMemo)(() => {
18225
18411
  if (!schnappschuss) return { kind: "keiner" };
18226
18412
  if (schnappschuss.draft) return { kind: "draft" };
18227
18413
  if (bevorzugteVersion) return { kind: "version", versionId: bevorzugteVersion };
@@ -18231,14 +18417,14 @@ var ElementDetail = ({
18231
18417
  if (schnappschuss.versions.length === 0) return { kind: "draft" };
18232
18418
  return { kind: "keiner" };
18233
18419
  }, [schnappschuss, bevorzugteVersion]);
18234
- const angezeigt = (0, import_react10.useMemo)(() => {
18420
+ const angezeigt = (0, import_react11.useMemo)(() => {
18235
18421
  if (!wahl) return automatisch;
18236
18422
  if (wahl.kind === "version" && !schnappschuss?.versions.some((v) => v.version_id === wahl.versionId)) {
18237
18423
  return automatisch;
18238
18424
  }
18239
18425
  return wahl;
18240
18426
  }, [wahl, automatisch, schnappschuss]);
18241
- const angezeigtePayload = (0, import_react10.useMemo)(() => {
18427
+ const angezeigtePayload = (0, import_react11.useMemo)(() => {
18242
18428
  if (!schnappschuss) return {};
18243
18429
  if (angezeigt.kind === "draft") return schnappschuss.draft?.payload ?? {};
18244
18430
  if (angezeigt.kind === "version") {
@@ -18247,7 +18433,7 @@ var ElementDetail = ({
18247
18433
  return {};
18248
18434
  }, [schnappschuss, angezeigt]);
18249
18435
  const anzeigeSchluessel = angezeigt.kind === "version" ? `v:${angezeigt.versionId}` : angezeigt.kind;
18250
- (0, import_react10.useEffect)(() => {
18436
+ (0, import_react11.useEffect)(() => {
18251
18437
  if (!schnappschuss) return;
18252
18438
  setEntwurf(formFromPayload(felder, angezeigtePayload));
18253
18439
  }, [
@@ -18260,7 +18446,7 @@ var ElementDetail = ({
18260
18446
  const bearbeitbar = angezeigt.kind === "draft";
18261
18447
  const setzeFeld = (pfad, wert) => setEntwurf((vorher) => ({ ...vorher, [pfad]: wert }));
18262
18448
  const payloadAusFormular = () => payloadFromForm(felder, entwurf);
18263
- const strukturPayload = (0, import_react10.useMemo)(() => {
18449
+ const strukturPayload = (0, import_react11.useMemo)(() => {
18264
18450
  const lies = (name) => {
18265
18451
  try {
18266
18452
  const roh = JSON.parse(entwurf[name] || "[]");
@@ -18271,19 +18457,19 @@ var ElementDetail = ({
18271
18457
  };
18272
18458
  return { nodes: lies("nodes"), relations: lies("relations") };
18273
18459
  }, [entwurf.nodes, entwurf.relations]);
18274
- const kettenfeld = (0, import_react10.useMemo)(() => {
18460
+ const kettenfeld = (0, import_react11.useMemo)(() => {
18275
18461
  const kette2 = schnappschuss?.draft?.chain;
18276
18462
  if (!kette2) return null;
18277
18463
  return kette2.links[0]?.field ?? null;
18278
18464
  }, [schnappschuss?.draft?.chain]);
18279
- const laufStand = (0, import_react10.useMemo)(() => {
18465
+ const laufStand = (0, import_react11.useMemo)(() => {
18280
18466
  if (!schnappschuss || schnappschuss.element.type !== "scene") return null;
18281
18467
  if (schnappschuss.draft) return schnappschuss.draft.payload;
18282
18468
  const kopf = usableHeadVersionId(kopfAufloesung);
18283
18469
  if (!kopf) return null;
18284
18470
  return schnappschuss.versions.find((v) => v.version_id === kopf)?.payload ?? null;
18285
18471
  }, [schnappschuss, kopfAufloesung]);
18286
- const szenenBlocker = (0, import_react10.useMemo)(() => {
18472
+ const szenenBlocker = (0, import_react11.useMemo)(() => {
18287
18473
  if (!schnappschuss || schnappschuss.element.type !== "scene") return null;
18288
18474
  if (laufStand === null) {
18289
18475
  return schnappschuss.versions.length > 0 ? "Diese Szene hat keinen Entwurf und in diesem Kontext keinen bevorzugten Kopf. Welcher Stand gilt, entscheidet keine Reihenfolge (D-36) \u2014 bitte oben eine Version als bevorzugt setzen." : "Diese Szene hat noch keinen gespeicherten Stand. Ein Lauf friert ein, was gespeichert ist \u2014 bitte zuerst den Entwurf speichern.";
@@ -18293,7 +18479,7 @@ var ElementDetail = ({
18293
18479
  const grund = flag.reasons[0];
18294
18480
  return grund && "message" in grund ? grund.message : "Kein Lauf moeglich.";
18295
18481
  }, [schnappschuss, laufStand]);
18296
- const vorschau = (0, import_react10.useMemo)(() => {
18482
+ const vorschau = (0, import_react11.useMemo)(() => {
18297
18483
  if (!schnappschuss) return null;
18298
18484
  try {
18299
18485
  const roh = validatePayload(schnappschuss.element.type, payloadAusFormular());
@@ -18679,15 +18865,15 @@ var ElementDetail = ({
18679
18865
  };
18680
18866
 
18681
18867
  // src/features/szenen/areas/useSchmalesDisplay.ts
18682
- var import_react11 = require("react");
18868
+ var import_react12 = require("react");
18683
18869
  var SCHMALE_ANSICHT = "(max-width: 760px)";
18684
18870
  function messen(abfrage) {
18685
18871
  if (typeof window === "undefined" || typeof window.matchMedia !== "function") return false;
18686
18872
  return window.matchMedia(abfrage).matches;
18687
18873
  }
18688
18874
  function useSchmalesDisplay(abfrage = SCHMALE_ANSICHT) {
18689
- const [schmal, setSchmal] = (0, import_react11.useState)(() => messen(abfrage));
18690
- (0, import_react11.useEffect)(() => {
18875
+ const [schmal, setSchmal] = (0, import_react12.useState)(() => messen(abfrage));
18876
+ (0, import_react12.useEffect)(() => {
18691
18877
  if (typeof window === "undefined" || typeof window.matchMedia !== "function") return;
18692
18878
  const liste = window.matchMedia(abfrage);
18693
18879
  const aktualisieren = () => setSchmal(liste.matches);
@@ -18714,16 +18900,16 @@ var ElementsArea = ({
18714
18900
  const gemischt = auswahlTypen.length > 1;
18715
18901
  const ueberschrift = listTitle ?? (einzelTyp ? elementTypPlural(einzelTyp) : "Bausteine");
18716
18902
  const einzahl = einzelTyp ? elementTypLabel(einzelTyp) : "Objekt";
18717
- const [typ, setTyp] = (0, import_react12.useState)(einzelTyp ?? "");
18718
- const [zeigeStillgelegte, setZeigeStillgelegte] = (0, import_react12.useState)(false);
18719
- const [gewaehlt, setGewaehlt] = (0, import_react12.useState)(null);
18720
- const [neuerTitel, setNeuerTitel] = (0, import_react12.useState)("");
18721
- const [neuerTyp, setNeuerTyp] = (0, import_react12.useState)(auswahlTypen[0]);
18722
- const [notiz, setNotiz] = (0, import_react12.useState)(null);
18723
- const [anlegend, setAnlegend] = (0, import_react12.useState)(false);
18724
- const [anlageOffen, setAnlageOffen] = (0, import_react12.useState)(false);
18903
+ const [typ, setTyp] = (0, import_react13.useState)(einzelTyp ?? "");
18904
+ const [zeigeStillgelegte, setZeigeStillgelegte] = (0, import_react13.useState)(false);
18905
+ const [gewaehlt, setGewaehlt] = (0, import_react13.useState)(null);
18906
+ const [neuerTitel, setNeuerTitel] = (0, import_react13.useState)("");
18907
+ const [neuerTyp, setNeuerTyp] = (0, import_react13.useState)(auswahlTypen[0]);
18908
+ const [notiz, setNotiz] = (0, import_react13.useState)(null);
18909
+ const [anlegend, setAnlegend] = (0, import_react13.useState)(false);
18910
+ const [anlageOffen, setAnlageOffen] = (0, import_react13.useState)(false);
18725
18911
  const schmal = useSchmalesDisplay();
18726
- const [ansicht, setAnsicht] = (0, import_react12.useState)("liste");
18912
+ const [ansicht, setAnsicht] = (0, import_react13.useState)("liste");
18727
18913
  const zeigeListe = !schmal || ansicht === "liste";
18728
18914
  const zeigeDetail = !schmal || ansicht === "detail";
18729
18915
  const waehle = (elementId) => {
@@ -18935,235 +19121,59 @@ var ElementsArea = ({
18935
19121
  };
18936
19122
 
18937
19123
  // src/features/szenen/areas/SceneArea.tsx
18938
- var import_jsx_runtime12 = require("react/jsx-runtime");
18939
- var SceneArea = ({ port, contextId }) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "szenen-scene", "data-testid": "bereich-szene", children: [
18940
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "szenen-area__lead", children: "Szenen dieses Kontexts. Auswahl \xF6ffnet die Bearbeitung der Nodes und Beziehungen." }),
18941
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ElementsArea, { port, contextId, restrictToTypes: ["scene"] })
18942
- ] });
18943
-
18944
- // src/features/szenen/areas/SetupArea.tsx
18945
- var import_jsx_runtime13 = require("react/jsx-runtime");
18946
- var SetupArea = ({ port, contextId }) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "szenen-setup", "data-testid": "bereich-setup", children: [
18947
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "szenen-area__lead", children: "Bildaufbauten, Kameras und Stile dieses Kontexts." }),
18948
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
18949
- ElementsArea,
18950
- {
18951
- port,
18952
- contextId,
18953
- restrictToTypes: ["scene_setup", "camera_preset", "camera_pattern", "style"],
18954
- allTypesLabel: "alle Bildaufbau-Typen",
18955
- listTitle: "Bildaufbau"
18956
- }
18957
- )
18958
- ] });
18959
-
18960
- // src/features/szenen/areas/ShotArea.tsx
18961
- var import_jsx_runtime14 = require("react/jsx-runtime");
18962
- var ShotArea = ({ port, contextId }) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "szenen-shot", "data-testid": "bereich-shot", children: [
18963
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "szenen-area__lead", children: "Prompts dieses Kontexts. Auswahl zeigt Runden und startet Prompt-L\xE4ufe." }),
18964
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
18965
- ElementsArea,
18966
- {
18967
- port,
18968
- contextId,
18969
- restrictToTypes: ["shot", "shot_concept", "target_model"],
18970
- allTypesLabel: "alle Prompt-Typen",
18971
- listTitle: "Prompts"
18972
- }
18973
- )
18974
- ] });
18975
-
18976
- // src/features/szenen/areas/MediaArea.tsx
18977
- var import_react13 = require("react");
18978
- var import_jsx_runtime15 = require("react/jsx-runtime");
18979
- var leer = async () => ({ kind: "ok", value: [] });
18980
- var MediaArea = ({ port }) => {
18981
- const media = port.media;
18982
- const [versionInput, setVersionInput] = (0, import_react13.useState)("");
18983
- const [versionId, setVersionId] = (0, import_react13.useState)("");
18984
- const [itemInput, setItemInput] = (0, import_react13.useState)("");
18985
- const [itemId, setItemId] = (0, import_react13.useState)("");
18986
- const [assetId, setAssetId] = (0, import_react13.useState)("");
18987
- const [role, setRole] = (0, import_react13.useState)("reference");
18988
- const [position, setPosition] = (0, import_react13.useState)("0");
18989
- const [notiz, setNotiz] = (0, import_react13.useState)(null);
18990
- const [busy, setBusy] = (0, import_react13.useState)(false);
18991
- const [refresh, setRefresh] = (0, import_react13.useState)(0);
18992
- const [versionPhase] = usePortQuery(
18993
- () => versionId ? media.listVersionMedia(versionId) : leer(),
18994
- [media, versionId, refresh]
18995
- );
18996
- const [itemPhase] = usePortQuery(
18997
- () => itemId ? media.listItemMedia(itemId) : Promise.resolve({ kind: "ok", value: [] }),
18998
- [media, itemId, refresh]
18999
- );
19000
- const zuordnen = async () => {
19001
- if (!versionInput.trim() || !assetId.trim()) {
19002
- setNotiz({ tone: "error", text: "Version-ID und Asset-ID sind erforderlich." });
19003
- return;
19004
- }
19005
- const parsedPosition = Number(position);
19006
- if (!Number.isInteger(parsedPosition) || parsedPosition < 0) {
19007
- setNotiz({ tone: "error", text: `Position muss eine nicht-negative Ganzzahl sein, war ${JSON.stringify(position)}.` });
19008
- return;
19009
- }
19010
- setBusy(true);
19011
- const result = await media.attachVersionMedium({
19012
- versionId: versionInput.trim(),
19013
- assetId: assetId.trim(),
19014
- role,
19015
- position: parsedPosition
19016
- });
19017
- setNotiz(noticeFor(result, "Referenzmedium zuordnen"));
19018
- if (result.kind === "ok") {
19019
- setVersionId(versionInput.trim());
19020
- setRefresh((value) => value + 1);
19021
- }
19022
- setBusy(false);
19023
- };
19024
- const entfernen = async (medium) => {
19025
- setBusy(true);
19026
- const result = await media.detachVersionMedium({
19027
- versionId,
19028
- assetId: medium.assetId,
19029
- role: medium.role
19030
- });
19031
- setNotiz(noticeFor(result, "Referenzmedium entfernen"));
19032
- if (result.kind === "ok") setRefresh((value) => value + 1);
19033
- setBusy(false);
19034
- };
19035
- const versionMedien = versionPhase.status === "ready" ? versionPhase.value : [];
19036
- const itemMedien = itemPhase.status === "ready" ? itemPhase.value : [];
19037
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "szenen-media", "data-testid": "bereich-medien", children: [
19038
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "szenen-area__lead", children: "Bereits vorhandene Medien-Assets einer Elementversion zuordnen. Hochgeladen wird hier nichts \u2014 Medien entstehen \xFCber den bestehenden Speicherweg aus Stufe 5." }),
19039
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("section", { children: [
19040
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h3", { children: "Version" }),
19041
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "szenen-media__lookup", children: [
19042
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { children: [
19043
- "Version-ID",
19044
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("input", { value: versionInput, onChange: (event) => setVersionInput(event.target.value) })
19045
- ] }),
19046
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { type: "button", onClick: () => setVersionId(versionInput.trim()), children: "Medien laden" })
19047
- ] }),
19048
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "szenen-media__attach", children: [
19049
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { children: [
19050
- "Asset-ID",
19051
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("input", { value: assetId, onChange: (event) => setAssetId(event.target.value) })
19052
- ] }),
19053
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { children: [
19054
- "Rolle",
19055
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("select", { value: role, onChange: (event) => setRole(event.target.value), children: [
19056
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "reference", children: "reference" }),
19057
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "mask", children: "mask" }),
19058
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "palette", children: "palette" }),
19059
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "example", children: "example" })
19060
- ] })
19061
- ] }),
19062
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { children: [
19063
- "Position",
19064
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("input", { type: "number", min: "0", value: position, onChange: (event) => setPosition(event.target.value) })
19065
- ] }),
19066
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { type: "button", disabled: busy, onClick: zuordnen, children: "zuordnen" })
19067
- ] }),
19068
- versionPhase.status === "loading" && versionId && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { children: "Versionsmedien werden geladen \u2026" }),
19069
- versionPhase.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { role: "alert", children: [
19070
- "Versionsmedien konnten nicht geladen werden: ",
19071
- versionPhase.message
19072
- ] }),
19073
- versionPhase.status === "ready" && versionId && versionMedien.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { children: [
19074
- "Version ",
19075
- versionId,
19076
- " hat keine Medien."
19077
- ] }),
19078
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("ul", { className: "szenen-media__list", children: versionMedien.map((medium) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("li", { children: [
19079
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("code", { children: medium.assetId }),
19080
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { children: [
19081
- medium.role,
19082
- " \xB7 Position ",
19083
- medium.position
19084
- ] }),
19085
- medium.url && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("a", { href: medium.url, target: "_blank", rel: "noreferrer", children: "\xF6ffnen" }),
19086
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { type: "button", disabled: busy, onClick: () => entfernen(medium), children: "entfernen" })
19087
- ] }, `${medium.assetId}:${medium.role}`)) })
19088
- ] }),
19089
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("section", { children: [
19090
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h3", { children: "Item-Medien" }),
19091
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "szenen-media__lookup", children: [
19092
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { children: [
19093
- "Item-ID",
19094
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("input", { value: itemInput, onChange: (event) => setItemInput(event.target.value) })
19095
- ] }),
19096
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { type: "button", onClick: () => setItemId(itemInput.trim()), children: "Item-Medien laden" })
19097
- ] }),
19098
- itemPhase.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { role: "alert", children: [
19099
- "Item-Medien konnten nicht geladen werden: ",
19100
- itemPhase.message
19101
- ] }),
19102
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("ul", { className: "szenen-media__list", children: itemMedien.map((medium) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("li", { children: [
19103
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("code", { children: medium.assetId }),
19104
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { children: [
19105
- medium.role,
19106
- " \xB7 Position ",
19107
- medium.position
19108
- ] }),
19109
- medium.url && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("a", { href: medium.url, target: "_blank", rel: "noreferrer", children: "\xF6ffnen" })
19110
- ] }, `${medium.assetId}:${medium.role}:${medium.position}`)) })
19111
- ] }),
19112
- notiz && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { role: notiz.tone === "error" ? "alert" : "status", "data-tone": notiz.tone, children: notiz.text })
19113
- ] });
19114
- };
19124
+ var import_react17 = require("react");
19115
19125
 
19116
19126
  // src/features/szenen/areas/DeriveArea.tsx
19117
19127
  var import_react16 = require("react");
19118
19128
 
19119
19129
  // src/features/szenen/areas/RecoveryPanel.tsx
19120
19130
  var import_react14 = require("react");
19121
- var import_jsx_runtime16 = require("react/jsx-runtime");
19131
+ var import_jsx_runtime12 = require("react/jsx-runtime");
19122
19132
  var Diagnosen = ({ befunde, testId }) => {
19123
19133
  if (befunde.length === 0) return null;
19124
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("ul", { className: "szenen-diagnose__liste", "data-testid": testId, children: befunde.map((d, i) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("li", { "data-severity": d.severity, children: [
19125
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("code", { children: d.code }),
19126
- d.proposal_type && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
19134
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("ul", { className: "szenen-diagnose__liste", "data-testid": testId, children: befunde.map((d, i) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("li", { "data-severity": d.severity, children: [
19135
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("code", { children: d.code }),
19136
+ d.proposal_type && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
19127
19137
  " \xB7 ",
19128
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("strong", { children: d.proposal_type })
19138
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("strong", { children: d.proposal_type })
19129
19139
  ] }),
19130
- d.pointer && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
19140
+ d.pointer && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
19131
19141
  " \xB7 ",
19132
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("code", { children: d.pointer })
19142
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("code", { children: d.pointer })
19133
19143
  ] }),
19134
- typeof d.line === "number" && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
19144
+ typeof d.line === "number" && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
19135
19145
  " \xB7 Zeile ",
19136
19146
  d.line,
19137
19147
  ", Spalte ",
19138
19148
  d.column
19139
19149
  ] }),
19140
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { children: d.message })
19150
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { children: d.message })
19141
19151
  ] }, i)) });
19142
19152
  };
19143
- var Ausbeute = ({ bewertung }) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "szenen-diagnose", "data-testid": "rettung-ergebnis", children: [
19144
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("p", { "data-testid": "rettung-status", children: [
19153
+ var Ausbeute = ({ bewertung }) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "szenen-diagnose", "data-testid": "rettung-ergebnis", children: [
19154
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("p", { "data-testid": "rettung-status", children: [
19145
19155
  bewertung.status === "usable" && "Diese Fassung ist vollst\xE4ndig verwertbar.",
19146
19156
  bewertung.status === "partial" && "Diese Fassung ist teilweise verwertbar \u2014 nicht alles kommt durch.",
19147
19157
  bewertung.status === "invalid" && "Aus dieser Fassung ist nichts zu \xFCbernehmen."
19148
19158
  ] }),
19149
- bewertung.proposals.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
19150
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h5", { children: "Verwertbar" }),
19151
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("ul", { "data-testid": "rettung-verwertbar", children: bewertung.proposals.map((p) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("li", { "data-testid": `rettung-verwertbar-${p.type}`, children: [
19152
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("strong", { children: p.type }),
19159
+ bewertung.proposals.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
19160
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h5", { children: "Verwertbar" }),
19161
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("ul", { "data-testid": "rettung-verwertbar", children: bewertung.proposals.map((p) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("li", { "data-testid": `rettung-verwertbar-${p.type}`, children: [
19162
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("strong", { children: p.type }),
19153
19163
  " \u2014 ",
19154
19164
  p.status === "complete" ? "vollst\xE4ndig" : "teilweise; vor dem Ver\xF6ffentlichen zu erg\xE4nzen",
19155
- p.status === "partial" && p.gaps && p.gaps.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("ul", { children: p.gaps.map((l, i) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("li", { children: [
19156
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("code", { children: l.pointer }),
19165
+ p.status === "partial" && p.gaps && p.gaps.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("ul", { children: p.gaps.map((l, i) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("li", { children: [
19166
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("code", { children: l.pointer }),
19157
19167
  ": ",
19158
19168
  l.reason
19159
19169
  ] }, i)) })
19160
19170
  ] }, p.type)) })
19161
19171
  ] }),
19162
- bewertung.rejected.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
19163
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h5", { children: "Nicht verwertbar" }),
19164
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("ul", { "data-testid": "rettung-abgelehnt", children: bewertung.rejected.map((r) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("li", { "data-testid": `rettung-abgelehnt-${r.type}`, children: [
19165
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("strong", { children: r.type }),
19166
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Diagnosen, { befunde: r.diagnostics, testId: `rettung-grund-${r.type}` })
19172
+ bewertung.rejected.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
19173
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h5", { children: "Nicht verwertbar" }),
19174
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("ul", { "data-testid": "rettung-abgelehnt", children: bewertung.rejected.map((r) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("li", { "data-testid": `rettung-abgelehnt-${r.type}`, children: [
19175
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("strong", { children: r.type }),
19176
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Diagnosen, { befunde: r.diagnostics, testId: `rettung-grund-${r.type}` })
19167
19177
  ] }, r.type)) })
19168
19178
  ] })
19169
19179
  ] });
@@ -19208,16 +19218,16 @@ var RecoveryPanel = ({ port, lauf }) => {
19208
19218
  setLaeuft(false);
19209
19219
  }
19210
19220
  }
19211
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("section", { className: "szenen-rettung", "data-testid": "rettung", children: [
19212
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h4", { children: "Antwort retten" }),
19213
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("p", { className: "szenen-area__lead", children: [
19221
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("section", { className: "szenen-rettung", "data-testid": "rettung", children: [
19222
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h4", { children: "Antwort retten" }),
19223
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("p", { className: "szenen-area__lead", children: [
19214
19224
  "Der Lauf ist bezahlt und seine Antwort liegt vor. Sie l\xE4sst sich hier pr\xFCfen und korrigieren \u2014 ",
19215
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("strong", { children: "ohne" }),
19225
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("strong", { children: "ohne" }),
19216
19226
  " einen weiteren Modellaufruf. Das Original bleibt unver\xE4ndert."
19217
19227
  ] }),
19218
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("label", { className: "szenen-field", children: [
19219
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: "Original der Modellantwort (unver\xE4nderlich)" }),
19220
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
19228
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: "szenen-field", children: [
19229
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: "Original der Modellantwort (unver\xE4nderlich)" }),
19230
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
19221
19231
  "textarea",
19222
19232
  {
19223
19233
  readOnly: true,
@@ -19228,12 +19238,12 @@ var RecoveryPanel = ({ port, lauf }) => {
19228
19238
  }
19229
19239
  )
19230
19240
  ] }),
19231
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("label", { className: "szenen-field", children: [
19232
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { children: [
19241
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: "szenen-field", children: [
19242
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { children: [
19233
19243
  "Arbeitskopie",
19234
19244
  bearbeitet ? " (bearbeitet)" : ""
19235
19245
  ] }),
19236
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
19246
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
19237
19247
  "textarea",
19238
19248
  {
19239
19249
  rows: 8,
@@ -19243,8 +19253,8 @@ var RecoveryPanel = ({ port, lauf }) => {
19243
19253
  }
19244
19254
  )
19245
19255
  ] }),
19246
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "szenen-rettung__aktionen", children: [
19247
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
19256
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "szenen-rettung__aktionen", children: [
19257
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
19248
19258
  "button",
19249
19259
  {
19250
19260
  type: "button",
@@ -19254,7 +19264,7 @@ var RecoveryPanel = ({ port, lauf }) => {
19254
19264
  children: "Arbeitskopie pr\xFCfen (kein Modellaufruf)"
19255
19265
  }
19256
19266
  ),
19257
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
19267
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
19258
19268
  "button",
19259
19269
  {
19260
19270
  type: "button",
@@ -19264,7 +19274,7 @@ var RecoveryPanel = ({ port, lauf }) => {
19264
19274
  children: "Arbeitsfassung speichern"
19265
19275
  }
19266
19276
  ),
19267
- arbeitskopie !== null && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
19277
+ arbeitskopie !== null && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
19268
19278
  "button",
19269
19279
  {
19270
19280
  type: "button",
@@ -19279,15 +19289,15 @@ var RecoveryPanel = ({ port, lauf }) => {
19279
19289
  }
19280
19290
  )
19281
19291
  ] }),
19282
- meldung && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "szenen-error", role: "alert", "data-testid": "rettung-meldung", children: meldung }),
19283
- bewertung && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Ausbeute, { bewertung }),
19284
- bewertung && bewertung.diagnostics.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "szenen-diagnose", children: [
19285
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h5", { children: "Befunde an dieser Fassung" }),
19286
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Diagnosen, { befunde: bewertung.diagnostics, testId: "rettung-befunde" })
19292
+ meldung && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "szenen-error", role: "alert", "data-testid": "rettung-meldung", children: meldung }),
19293
+ bewertung && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Ausbeute, { bewertung }),
19294
+ bewertung && bewertung.diagnostics.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "szenen-diagnose", children: [
19295
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h5", { children: "Befunde an dieser Fassung" }),
19296
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Diagnosen, { befunde: bewertung.diagnostics, testId: "rettung-befunde" })
19287
19297
  ] }),
19288
- gesichert && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("p", { "data-testid": "rettung-gesichert", children: [
19298
+ gesichert && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("p", { "data-testid": "rettung-gesichert", children: [
19289
19299
  "Gespeichert als Arbeitsfassung ",
19290
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("code", { children: gesichert.recovery_id }),
19300
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("code", { children: gesichert.recovery_id }),
19291
19301
  gesichert.edited ? " (bearbeitet)" : " (unver\xE4ndert)",
19292
19302
  ". Das Original des Laufs ist davon unber\xFChrt."
19293
19303
  ] })
@@ -19296,7 +19306,7 @@ var RecoveryPanel = ({ port, lauf }) => {
19296
19306
 
19297
19307
  // src/features/szenen/areas/ChainActions.tsx
19298
19308
  var import_react15 = require("react");
19299
- var import_jsx_runtime17 = require("react/jsx-runtime");
19309
+ var import_jsx_runtime13 = require("react/jsx-runtime");
19300
19310
  var ChainActions = ({ port, runId, recoveryId }) => {
19301
19311
  const [graph, setGraph] = (0, import_react15.useState)(null);
19302
19312
  const [meldung, setMeldung] = (0, import_react15.useState)(null);
@@ -19322,14 +19332,14 @@ var ChainActions = ({ port, runId, recoveryId }) => {
19322
19332
  setLaeuft(false);
19323
19333
  }
19324
19334
  }
19325
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("section", { className: "szenen-kette", "data-testid": "kette", children: [
19326
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h4", { children: "Draft-Kette" }),
19327
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { className: "szenen-area__lead", children: [
19335
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("section", { className: "szenen-kette", "data-testid": "kette", children: [
19336
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("h4", { children: "Draft-Kette" }),
19337
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("p", { className: "szenen-area__lead", children: [
19328
19338
  "Szene, Aufbau und Shot entstehen als zusammenh\xE4ngende Entw\xFCrfe. Daraus l\xE4sst sich sofort ein Prompt erzeugen \u2014 ",
19329
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("strong", { children: "ohne" }),
19339
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("strong", { children: "ohne" }),
19330
19340
  " vorher etwas zu ver\xF6ffentlichen."
19331
19341
  ] }),
19332
- !graph && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
19342
+ !graph && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
19333
19343
  "button",
19334
19344
  {
19335
19345
  type: "button",
@@ -19339,34 +19349,34 @@ var ChainActions = ({ port, runId, recoveryId }) => {
19339
19349
  children: "Als Draft-Kette \xFCbernehmen"
19340
19350
  }
19341
19351
  ),
19342
- graph && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { "data-testid": "kette-ergebnis", children: [
19343
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { children: [
19352
+ graph && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { "data-testid": "kette-ergebnis", children: [
19353
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("p", { children: [
19344
19354
  "Kette ",
19345
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("code", { children: graph.chainId }),
19355
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("code", { children: graph.chainId }),
19346
19356
  " angelegt. Kein Knoten ist ver\xF6ffentlicht."
19347
19357
  ] }),
19348
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("ul", { "data-testid": "kette-knoten", children: graph.created.map((k) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("li", { "data-testid": `kette-knoten-${k.type}`, children: [
19349
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("strong", { children: k.type }),
19358
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("ul", { "data-testid": "kette-knoten", children: graph.created.map((k) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("li", { "data-testid": `kette-knoten-${k.type}`, children: [
19359
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("strong", { children: k.type }),
19350
19360
  " \u2014 Element ",
19351
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("code", { children: k.elementId }),
19361
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("code", { children: k.elementId }),
19352
19362
  ", Entwurf ",
19353
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("code", { children: k.draftId }),
19363
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("code", { children: k.draftId }),
19354
19364
  " (Revision ",
19355
19365
  k.revision,
19356
19366
  ")"
19357
19367
  ] }, k.type)) }),
19358
- graph.missing.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "szenen-diagnose", "data-testid": "kette-fehlend", children: [
19359
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h5", { children: "Unvollst\xE4ndig erzeugt" }),
19360
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("ul", { children: graph.missing.map((m) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("li", { children: [
19361
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("strong", { children: m.type }),
19368
+ graph.missing.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "szenen-diagnose", "data-testid": "kette-fehlend", children: [
19369
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("h5", { children: "Unvollst\xE4ndig erzeugt" }),
19370
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("ul", { children: graph.missing.map((m) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("li", { children: [
19371
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("strong", { children: m.type }),
19362
19372
  ": ",
19363
19373
  m.reason
19364
19374
  ] }, m.type)) })
19365
19375
  ] })
19366
19376
  ] }),
19367
- shotKnoten && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
19368
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { children: 'Die Entw\xFCrfe lassen sich jetzt unter \u201E1 \xB7 Bausteine" \xE4ndern. Der Prompt-Lauf friert den Stand ein, den er dabei vorfindet \u2014 dieselbe Aktion steht auch am Shot selbst, unter \u201E4 \xB7 Prompt".' }),
19369
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
19377
+ shotKnoten && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
19378
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { children: 'Die Entw\xFCrfe lassen sich jetzt unter \u201E1 \xB7 Bausteine" \xE4ndern. Der Prompt-Lauf friert den Stand ein, den er dabei vorfindet \u2014 dieselbe Aktion steht auch am Shot selbst, unter \u201E4 \xB7 Prompt".' }),
19379
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
19370
19380
  PromptStartAction,
19371
19381
  {
19372
19382
  port,
@@ -19374,12 +19384,12 @@ var ChainActions = ({ port, runId, recoveryId }) => {
19374
19384
  }
19375
19385
  )
19376
19386
  ] }),
19377
- meldung && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "szenen-error", role: "alert", "data-testid": "kette-meldung", children: meldung })
19387
+ meldung && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "szenen-error", role: "alert", "data-testid": "kette-meldung", children: meldung })
19378
19388
  ] });
19379
19389
  };
19380
19390
 
19381
19391
  // src/features/szenen/areas/DeriveArea.tsx
19382
- var import_jsx_runtime18 = require("react/jsx-runtime");
19392
+ var import_jsx_runtime14 = require("react/jsx-runtime");
19383
19393
  var MODUS_TEXT = {
19384
19394
  prompt: "Nur Prompt",
19385
19395
  image: "Nur Bild",
@@ -19397,15 +19407,15 @@ var BelegFeld = ({ titel, text, testId, offen }) => {
19397
19407
  setKopiert(false);
19398
19408
  }
19399
19409
  }
19400
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("details", { open: offen, "data-testid": `belege-${testId}`, children: [
19401
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("summary", { children: [
19410
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("details", { open: offen, "data-testid": `belege-${testId}`, children: [
19411
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("summary", { children: [
19402
19412
  titel,
19403
19413
  " (",
19404
19414
  text.length,
19405
19415
  " Zeichen)"
19406
19416
  ] }),
19407
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-beleg__kopf", children: [
19408
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
19417
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "szenen-beleg__kopf", children: [
19418
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19409
19419
  "button",
19410
19420
  {
19411
19421
  type: "button",
@@ -19414,9 +19424,9 @@ var BelegFeld = ({ titel, text, testId, offen }) => {
19414
19424
  children: "Kopieren"
19415
19425
  }
19416
19426
  ),
19417
- kopiert && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { "data-testid": `kopiert-${testId}`, children: "Kopiert." })
19427
+ kopiert && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { "data-testid": `kopiert-${testId}`, children: "Kopiert." })
19418
19428
  ] }),
19419
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
19429
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19420
19430
  "textarea",
19421
19431
  {
19422
19432
  ref: feld,
@@ -19430,8 +19440,8 @@ var BelegFeld = ({ titel, text, testId, offen }) => {
19430
19440
  )
19431
19441
  ] });
19432
19442
  };
19433
- var Belege = ({ lauf }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-diagnose", "data-testid": "belege", children: [
19434
- lauf.raw_output ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
19443
+ var Belege = ({ lauf }) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "szenen-diagnose", "data-testid": "belege", children: [
19444
+ lauf.raw_output ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19435
19445
  BelegFeld,
19436
19446
  {
19437
19447
  titel: "Rohantwort des Modells",
@@ -19442,9 +19452,9 @@ var Belege = ({ lauf }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div",
19442
19452
  ) : (
19443
19453
  /* Kein Text ist auch eine Auskunft: Der Provider hat nichts geliefert,
19444
19454
  das Modell hat also nicht „falsch geantwortet". */
19445
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { "data-testid": "roh-antwort-fehlt", children: "Es gibt keine Rohantwort \u2014 der Lauf ist gescheitert, bevor ein Text ankam (etwa Netz, Sperre oder Providerfehler)." })
19455
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { "data-testid": "roh-antwort-fehlt", children: "Es gibt keine Rohantwort \u2014 der Lauf ist gescheitert, bevor ein Text ankam (etwa Netz, Sperre oder Providerfehler)." })
19446
19456
  ),
19447
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
19457
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19448
19458
  BelegFeld,
19449
19459
  {
19450
19460
  titel: "Systemprompt dieses Laufs",
@@ -19456,18 +19466,18 @@ var Belege = ({ lauf }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div",
19456
19466
  ] });
19457
19467
  var Herkunft = ({ lauf }) => {
19458
19468
  if (!lauf.follows) return null;
19459
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { className: "szenen-run__herkunft", "data-testid": "folgt-auf", children: [
19469
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { className: "szenen-run__herkunft", "data-testid": "folgt-auf", children: [
19460
19470
  "Folgt auf Lauf ",
19461
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("code", { children: lauf.follows.run_id }),
19471
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("code", { children: lauf.follows.run_id }),
19462
19472
  ".",
19463
19473
  lauf.status === "succeeded" && " Im Folgelauf gelungen."
19464
19474
  ] });
19465
19475
  };
19466
19476
  var Widerspruch = ({ lauf }) => {
19467
19477
  if (!lauf.reply) return null;
19468
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-diagnose szenen-diagnose--antwort", "data-testid": "modell-antwort", children: [
19469
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h4", { children: "Das Modell antwortet auf die Beanstandung" }),
19470
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { children: lauf.reply })
19478
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "szenen-diagnose szenen-diagnose--antwort", "data-testid": "modell-antwort", children: [
19479
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h4", { children: "Das Modell antwortet auf die Beanstandung" }),
19480
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { children: lauf.reply })
19471
19481
  ] });
19472
19482
  };
19473
19483
  function readAsBase642(datei) {
@@ -19574,10 +19584,10 @@ var BildWaehler = ({ port, gewaehlt, onWaehlen, onEntfernen }) => {
19574
19584
  if (item.images.length === 1) onWaehlen(deckbild);
19575
19585
  else setFokus(item.itemRef === fokus ? null : item.itemRef);
19576
19586
  }
19577
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-bildwahl", "data-testid": "bildwahl", children: [
19578
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { className: "szenen-field", children: [
19579
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Bild aus dem Bestand" }),
19580
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
19587
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "szenen-bildwahl", "data-testid": "bildwahl", children: [
19588
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "szenen-field", children: [
19589
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "Bild aus dem Bestand" }),
19590
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19581
19591
  "input",
19582
19592
  {
19583
19593
  type: "search",
@@ -19591,23 +19601,23 @@ var BildWaehler = ({ port, gewaehlt, onWaehlen, onEntfernen }) => {
19591
19601
  }
19592
19602
  )
19593
19603
  ] }),
19594
- items.status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { children: "Bilder werden geladen \u2026" }),
19595
- items.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { className: "szenen-error", role: "alert", children: [
19604
+ items.status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { children: "Bilder werden geladen \u2026" }),
19605
+ items.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { className: "szenen-error", role: "alert", children: [
19596
19606
  "Der Bildbestand ist nicht lesbar: ",
19597
19607
  items.message
19598
19608
  ] }),
19599
- items.status === "ready" && werke.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "szenen-empty", "data-testid": "bildwahl-leer", children: "Zu dieser Suche gibt es kein Bild. Ohne Treffer bleibt der Upload." }),
19600
- werke.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
19609
+ items.status === "ready" && werke.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "szenen-empty", "data-testid": "bildwahl-leer", children: "Zu dieser Suche gibt es kein Bild. Ohne Treffer bleibt der Upload." }),
19610
+ werke.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19601
19611
  "div",
19602
19612
  {
19603
19613
  className: "szenen-bildwahl__browser",
19604
19614
  ref: browser,
19605
19615
  "data-testid": "bildwahl-werke",
19606
- children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ul", { className: "szenen-bildwahl__raster", children: werke.map((item) => {
19616
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("ul", { className: "szenen-bildwahl__raster", children: werke.map((item) => {
19607
19617
  const deckbild = item.images[0];
19608
19618
  if (!deckbild) return null;
19609
19619
  const fokussiert = item.itemRef === fokus;
19610
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("li", { "data-media-ref": deckbild.mediaRef, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
19620
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("li", { "data-media-ref": deckbild.mediaRef, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
19611
19621
  "button",
19612
19622
  {
19613
19623
  type: "button",
@@ -19617,7 +19627,7 @@ var BildWaehler = ({ port, gewaehlt, onWaehlen, onEntfernen }) => {
19617
19627
  "data-testid": `item-waehlen-${item.itemRef}`,
19618
19628
  title: item.title,
19619
19629
  children: [
19620
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
19630
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19621
19631
  Kachel,
19622
19632
  {
19623
19633
  quelle: quelleVon(deckbild),
@@ -19625,7 +19635,7 @@ var BildWaehler = ({ port, gewaehlt, onWaehlen, onEntfernen }) => {
19625
19635
  ...gescheitert.has(deckbild.mediaRef) ? { leerText: "Vorschau fehlt" } : {}
19626
19636
  }
19627
19637
  ),
19628
- item.images.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
19638
+ item.images.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
19629
19639
  "span",
19630
19640
  {
19631
19641
  className: "szenen-bildwahl__anzahl",
@@ -19636,22 +19646,22 @@ var BildWaehler = ({ port, gewaehlt, onWaehlen, onEntfernen }) => {
19636
19646
  ]
19637
19647
  }
19638
19648
  ),
19639
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "szenen-bildwahl__kacheltitel", children: item.title })
19649
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "szenen-bildwahl__kacheltitel", children: item.title })
19640
19650
  ]
19641
19651
  }
19642
19652
  ) }, item.itemRef);
19643
19653
  }) })
19644
19654
  }
19645
19655
  ),
19646
- werk && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("section", { className: "szenen-bildwahl__inspector", "data-testid": "bildwahl-galerie", children: [
19647
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("header", { className: "szenen-bildwahl__inspektorkopf", children: [
19648
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "szenen-bildwahl__werktitel", "data-testid": "bildwahl-werktitel", children: [
19656
+ werk && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("section", { className: "szenen-bildwahl__inspector", "data-testid": "bildwahl-galerie", children: [
19657
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("header", { className: "szenen-bildwahl__inspektorkopf", children: [
19658
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "szenen-bildwahl__werktitel", "data-testid": "bildwahl-werktitel", children: [
19649
19659
  werk.title,
19650
19660
  " \xB7 ",
19651
19661
  werk.images.length,
19652
19662
  " Bilder"
19653
19663
  ] }),
19654
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
19664
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19655
19665
  "button",
19656
19666
  {
19657
19667
  type: "button",
@@ -19662,7 +19672,7 @@ var BildWaehler = ({ port, gewaehlt, onWaehlen, onEntfernen }) => {
19662
19672
  }
19663
19673
  )
19664
19674
  ] }),
19665
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ul", { className: "szenen-bildwahl__streifen", children: werk.images.map((bild, position) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
19675
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("ul", { className: "szenen-bildwahl__streifen", children: werk.images.map((bild, position) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
19666
19676
  "button",
19667
19677
  {
19668
19678
  type: "button",
@@ -19672,7 +19682,7 @@ var BildWaehler = ({ port, gewaehlt, onWaehlen, onEntfernen }) => {
19672
19682
  "data-testid": `bild-waehlen-${bild.mediaRef}`,
19673
19683
  title: bild.title,
19674
19684
  children: [
19675
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
19685
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19676
19686
  Kachel,
19677
19687
  {
19678
19688
  quelle: quelleVon(bild),
@@ -19680,7 +19690,7 @@ var BildWaehler = ({ port, gewaehlt, onWaehlen, onEntfernen }) => {
19680
19690
  ...gescheitert.has(bild.mediaRef) ? { leerText: "Vorschau fehlt" } : {}
19681
19691
  }
19682
19692
  ),
19683
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "szenen-bildwahl__nummer", children: [
19693
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "szenen-bildwahl__nummer", children: [
19684
19694
  "#",
19685
19695
  position + 1
19686
19696
  ] })
@@ -19688,10 +19698,10 @@ var BildWaehler = ({ port, gewaehlt, onWaehlen, onEntfernen }) => {
19688
19698
  }
19689
19699
  ) }, bild.mediaRef)) })
19690
19700
  ] }),
19691
- gewaehlt.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ul", { className: "szenen-bildwahl__gewaehlt", "data-testid": "bilder-gewaehlt", children: gewaehlt.map((bild) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("li", { children: [
19692
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Kachel, { quelle: quelleVon(bild), alt: bild.title }),
19693
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "szenen-bildwahl__kacheltitel", children: bild.title }),
19694
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
19701
+ gewaehlt.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("ul", { className: "szenen-bildwahl__gewaehlt", "data-testid": "bilder-gewaehlt", children: gewaehlt.map((bild) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("li", { children: [
19702
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Kachel, { quelle: quelleVon(bild), alt: bild.title }),
19703
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "szenen-bildwahl__kacheltitel", children: bild.title }),
19704
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19695
19705
  "button",
19696
19706
  {
19697
19707
  type: "button",
@@ -19727,6 +19737,15 @@ var DeriveArea = ({ port, contextId }) => {
19727
19737
  () => port.derivation.listPolicies(contextId),
19728
19738
  [port, contextId]
19729
19739
  );
19740
+ const sortiert = (0, import_react16.useMemo)(() => regeln.status === "ready" ? [...regeln.value].sort((a, b) => {
19741
+ const szeneZuerst = Number(b.produces.includes("scene")) - Number(a.produces.includes("scene"));
19742
+ return szeneZuerst !== 0 ? szeneZuerst : a.title.localeCompare(b.title, "de");
19743
+ }) : [], [regeln]);
19744
+ (0, import_react16.useEffect)(() => {
19745
+ if (policyVersionId) return;
19746
+ const fuerSzene = sortiert.find((r) => r.produces.includes("scene"));
19747
+ if (fuerSzene) setPolicyVersionId(fuerSzene.versionId);
19748
+ }, [sortiert, policyVersionId]);
19730
19749
  const gewaehlt = regeln.status === "ready" ? regeln.value.find((r) => r.versionId === policyVersionId) ?? null : null;
19731
19750
  async function starten(folgt) {
19732
19751
  if (!gewaehlt) {
@@ -19801,12 +19820,12 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
19801
19820
  const text = beanstandung ?? vorgabeBeanstandung(satz);
19802
19821
  const bilderFehlen = satz.input.images.some((bild) => bild.kind !== "library");
19803
19822
  const bereit = Boolean(text.trim()) && !bilderFehlen && !laeuft;
19804
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-folgelauf", "data-testid": "folgelauf", children: [
19805
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h4", { children: "Korrektur- oder Erg\xE4nzungslauf" }),
19806
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "szenen-area__lead", children: satz.status === "failed" ? "Das Modell bekommt seine Antwort und die Beanstandung noch einmal vorgelegt." : "Das Ergebnis steht. Wenn etwas offen blieb, kann das Modell nachbessern." }),
19807
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { className: "szenen-field", children: [
19808
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Beanstandung" }),
19809
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
19823
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "szenen-folgelauf", "data-testid": "folgelauf", children: [
19824
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h4", { children: "Korrektur- oder Erg\xE4nzungslauf" }),
19825
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "szenen-area__lead", children: satz.status === "failed" ? "Das Modell bekommt seine Antwort und die Beanstandung noch einmal vorgelegt." : "Das Ergebnis steht. Wenn etwas offen blieb, kann das Modell nachbessern." }),
19826
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "szenen-field", children: [
19827
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "Beanstandung" }),
19828
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19810
19829
  "textarea",
19811
19830
  {
19812
19831
  rows: 4,
@@ -19816,9 +19835,9 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
19816
19835
  }
19817
19836
  )
19818
19837
  ] }),
19819
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { className: "szenen-field", children: [
19820
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Zus\xE4tzliche Anweisung (optional)" }),
19821
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
19838
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "szenen-field", children: [
19839
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "Zus\xE4tzliche Anweisung (optional)" }),
19840
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19822
19841
  "textarea",
19823
19842
  {
19824
19843
  rows: 2,
@@ -19829,8 +19848,8 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
19829
19848
  }
19830
19849
  )
19831
19850
  ] }),
19832
- bilderFehlen && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "szenen-error", "data-testid": "folgelauf-ohne-bild", children: "Die Bilder dieses Laufs wurden nicht im Bestand abgelegt \u2014 er ist \xE4lter als diese M\xF6glichkeit. Ein Folgelauf ohne sie k\xF6nnte ein fehlendes Pflichtfeld nur erfinden. Starten Sie einen neuen Lauf mit dem Referenzbild; dessen Bilder bleiben dann erhalten." }),
19833
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
19851
+ bilderFehlen && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "szenen-error", "data-testid": "folgelauf-ohne-bild", children: "Die Bilder dieses Laufs wurden nicht im Bestand abgelegt \u2014 er ist \xE4lter als diese M\xF6glichkeit. Ein Folgelauf ohne sie k\xF6nnte ein fehlendes Pflichtfeld nur erfinden. Starten Sie einen neuen Lauf mit dem Referenzbild; dessen Bilder bleiben dann erhalten." }),
19852
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19834
19853
  "button",
19835
19854
  {
19836
19855
  type: "button",
@@ -19870,19 +19889,19 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
19870
19889
  setMeldung(ergebnis.message);
19871
19890
  }
19872
19891
  }
19873
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-derive", "data-testid": "bereich-rekonstruktion", children: [
19874
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "szenen-area__lead", children: "Aus einem Referenzbild, einem Prompt oder beidem einen Szenenentwurf vorschlagen lassen. Der Vorschlag wird nie ver\xF6ffentlicht \u2014 er wird ein Entwurf, den Sie pr\xFCfen und \xE4ndern." }),
19875
- regeln.status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { children: "Regeln werden geladen \u2026" }),
19876
- regeln.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { className: "szenen-error", role: "alert", children: [
19892
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "szenen-derive", "data-testid": "bereich-rekonstruktion", children: [
19893
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "szenen-area__lead", children: "Aus einem Referenzbild, einem Prompt oder beidem einen Szenenentwurf vorschlagen lassen. Der Vorschlag wird nie ver\xF6ffentlicht \u2014 er wird ein Entwurf, den Sie pr\xFCfen und \xE4ndern." }),
19894
+ regeln.status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { children: "Regeln werden geladen \u2026" }),
19895
+ regeln.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { className: "szenen-error", role: "alert", children: [
19877
19896
  "Die Regeln konnten nicht gelesen werden: ",
19878
19897
  regeln.message
19879
19898
  ] }),
19880
- regeln.status === "ready" && regeln.value.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { className: "szenen-empty", children: [
19899
+ regeln.status === "ready" && regeln.value.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { className: "szenen-empty", children: [
19881
19900
  "In diesem Kontext ist keine Rekonstruktionsregel (",
19882
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("code", { children: "scene_derivation_policy" }),
19883
- ') ver\xF6ffentlicht. Ohne sie ist kein Lauf reproduzierbar \u2014 legen Sie hier eine unter \u201E1 \xB7 Bausteine" an, oder wechseln Sie in den Kontext, in dem Ihre Regel liegt. Regeln aus anderen Kontexten stehen hier bewusst nicht zur Auswahl.'
19901
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("code", { children: "scene_derivation_policy" }),
19902
+ ') ver\xF6ffentlicht. Ohne sie ist kein Lauf reproduzierbar \u2014 legen Sie eine unter \u201EErweitert" an, oder wechseln Sie in den Kontext, in dem Ihre Regel liegt. Regeln aus anderen Kontexten stehen hier bewusst nicht zur Auswahl.'
19884
19903
  ] }),
19885
- regeln.status === "ready" && regeln.value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
19904
+ regeln.status === "ready" && regeln.value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
19886
19905
  "form",
19887
19906
  {
19888
19907
  className: "szenen-form",
@@ -19891,17 +19910,17 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
19891
19910
  void starten();
19892
19911
  },
19893
19912
  children: [
19894
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { className: "szenen-field", children: [
19895
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Regel" }),
19896
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
19913
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "szenen-field", children: [
19914
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "Regel" }),
19915
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
19897
19916
  "select",
19898
19917
  {
19899
19918
  value: policyVersionId,
19900
19919
  onChange: (e) => setPolicyVersionId(e.target.value),
19901
19920
  "data-testid": "regel-auswahl",
19902
19921
  children: [
19903
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("option", { value: "", children: "\u2014 bitte w\xE4hlen \u2014" }),
19904
- regeln.value.map((regel) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("option", { value: regel.versionId, children: [
19922
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: "", children: "\u2014 bitte w\xE4hlen \u2014" }),
19923
+ sortiert.map((regel) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("option", { value: regel.versionId, children: [
19905
19924
  regel.title,
19906
19925
  " (",
19907
19926
  regel.produces.join(", "),
@@ -19911,21 +19930,21 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
19911
19930
  }
19912
19931
  )
19913
19932
  ] }),
19914
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { className: "szenen-field", children: [
19915
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Eingang" }),
19916
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
19933
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "szenen-field", children: [
19934
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "Eingang" }),
19935
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19917
19936
  "select",
19918
19937
  {
19919
19938
  value: modus,
19920
19939
  onChange: (e) => setModus(e.target.value),
19921
19940
  "data-testid": "modus-auswahl",
19922
- children: (gewaehlt ? gewaehlt.inputModes : ["prompt", "image", "image_prompt"]).map((m) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("option", { value: m, children: MODUS_TEXT[m] }, m))
19941
+ children: (gewaehlt ? gewaehlt.inputModes : ["prompt", "image", "image_prompt"]).map((m) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: m, children: MODUS_TEXT[m] }, m))
19923
19942
  }
19924
19943
  )
19925
19944
  ] }),
19926
- modus !== "image" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { className: "szenen-field", children: [
19927
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Referenzprompt" }),
19928
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
19945
+ modus !== "image" && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "szenen-field", children: [
19946
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "Referenzprompt" }),
19947
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19929
19948
  "textarea",
19930
19949
  {
19931
19950
  value: promptText,
@@ -19935,8 +19954,8 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
19935
19954
  }
19936
19955
  )
19937
19956
  ] }),
19938
- modus !== "prompt" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
19939
- port.imageLibrary && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
19957
+ modus !== "prompt" && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
19958
+ port.imageLibrary && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19940
19959
  BildWaehler,
19941
19960
  {
19942
19961
  port,
@@ -19945,9 +19964,9 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
19945
19964
  onEntfernen: (ref) => setBestandsbilder((v) => v.filter((b) => b.mediaRef !== ref))
19946
19965
  }
19947
19966
  ),
19948
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { className: "szenen-field", children: [
19949
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: port.imageLibrary ? "Oder hochladen" : "Referenzbild" }),
19950
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
19967
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "szenen-field", children: [
19968
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: port.imageLibrary ? "Oder hochladen" : "Referenzbild" }),
19969
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19951
19970
  "input",
19952
19971
  {
19953
19972
  type: "file",
@@ -19957,40 +19976,40 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
19957
19976
  "data-testid": "bild-eingabe"
19958
19977
  }
19959
19978
  ),
19960
- port.imageLibrary && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("small", { "data-testid": "upload-hinweis", children: "Hochgeladene Bilder werden im Bestand abgelegt \u2014 nur so ist sp\xE4ter ein Folgelauf damit m\xF6glich." })
19979
+ port.imageLibrary && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("small", { "data-testid": "upload-hinweis", children: "Hochgeladene Bilder werden im Bestand abgelegt \u2014 nur so ist sp\xE4ter ein Folgelauf damit m\xF6glich." })
19961
19980
  ] })
19962
19981
  ] }),
19963
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { type: "submit", disabled: !gewaehlt || laeuft, "data-testid": "lauf-starten", children: laeuft ? "Rekonstruiert \u2026" : "Rekonstruieren" })
19982
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("button", { type: "submit", disabled: !gewaehlt || laeuft, "data-testid": "lauf-starten", children: laeuft ? "Rekonstruiert \u2026" : "Rekonstruieren" })
19964
19983
  ]
19965
19984
  }
19966
19985
  ),
19967
- meldung && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "szenen-error", role: "alert", "data-testid": "derive-meldung", children: meldung }),
19968
- lauf && lauf.status === "failed" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("section", { className: "szenen-run szenen-run--failed", "data-testid": "lauf-fehler", children: [
19969
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h3", { children: "Der Lauf ist gescheitert" }),
19970
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { children: [
19971
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("strong", { children: lauf.failure?.class }),
19986
+ meldung && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "szenen-error", role: "alert", "data-testid": "derive-meldung", children: meldung }),
19987
+ lauf && lauf.status === "failed" && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("section", { className: "szenen-run szenen-run--failed", "data-testid": "lauf-fehler", children: [
19988
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h3", { children: "Der Lauf ist gescheitert" }),
19989
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { children: [
19990
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("strong", { children: lauf.failure?.class }),
19972
19991
  " \u2014 ",
19973
19992
  lauf.failure?.message
19974
19993
  ] }),
19975
- lauf.failure?.diagnostics && lauf.failure.diagnostics.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-diagnose", "data-testid": "lauf-diagnosen", children: [
19976
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h4", { children: "Befunde" }),
19977
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Diagnosen, { befunde: lauf.failure.diagnostics, testId: "lauf-befunde" })
19994
+ lauf.failure?.diagnostics && lauf.failure.diagnostics.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "szenen-diagnose", "data-testid": "lauf-diagnosen", children: [
19995
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h4", { children: "Befunde" }),
19996
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Diagnosen, { befunde: lauf.failure.diagnostics, testId: "lauf-befunde" })
19978
19997
  ] }),
19979
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Herkunft, { lauf }),
19980
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Widerspruch, { lauf }),
19981
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Belege, { lauf }),
19982
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(RecoveryPanel, { port, lauf }),
19998
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Herkunft, { lauf }),
19999
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Widerspruch, { lauf }),
20000
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Belege, { lauf }),
20001
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(RecoveryPanel, { port, lauf }),
19983
20002
  folgeblock(lauf)
19984
20003
  ] }),
19985
- lauf && lauf.status === "succeeded" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("section", { className: "szenen-run", "data-testid": "lauf-ergebnis", children: [
19986
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h3", { children: "Vorschlag" }),
19987
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Herkunft, { lauf }),
19988
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Widerspruch, { lauf }),
19989
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "szenen-run__feedback", children: lauf.feedback }),
19990
- lauf.conflicts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-diagnose szenen-diagnose--konflikt", "data-testid": "konflikte", children: [
19991
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h4", { children: "Widerspr\xFCche zwischen Bild und Prompt" }),
19992
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ul", { children: lauf.conflicts.map((k, i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("li", { children: [
19993
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("code", { children: k.field }),
20004
+ lauf && lauf.status === "succeeded" && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("section", { className: "szenen-run", "data-testid": "lauf-ergebnis", children: [
20005
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h3", { children: "Vorschlag" }),
20006
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Herkunft, { lauf }),
20007
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Widerspruch, { lauf }),
20008
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "szenen-run__feedback", children: lauf.feedback }),
20009
+ lauf.conflicts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "szenen-diagnose szenen-diagnose--konflikt", "data-testid": "konflikte", children: [
20010
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h4", { children: "Widerspr\xFCche zwischen Bild und Prompt" }),
20011
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("ul", { children: lauf.conflicts.map((k, i) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("li", { children: [
20012
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("code", { children: k.field }),
19994
20013
  ": Bild sagt \u201E",
19995
20014
  k.from_image,
19996
20015
  '", Prompt sagt \u201E',
@@ -19998,31 +20017,31 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
19998
20017
  '". Nichts davon wurde \xFCbernommen.'
19999
20018
  ] }, i)) })
20000
20019
  ] }),
20001
- lauf.not_derivable.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-diagnose", "data-testid": "nicht-ableitbar", children: [
20002
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h4", { children: "Nicht ableitbar" }),
20003
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ul", { children: lauf.not_derivable.map((n, i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("li", { children: [
20004
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("code", { children: n.field }),
20020
+ lauf.not_derivable.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "szenen-diagnose", "data-testid": "nicht-ableitbar", children: [
20021
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h4", { children: "Nicht ableitbar" }),
20022
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("ul", { children: lauf.not_derivable.map((n, i) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("li", { children: [
20023
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("code", { children: n.field }),
20005
20024
  ": ",
20006
20025
  n.reason
20007
20026
  ] }, i)) })
20008
20027
  ] }),
20009
- lauf.assumptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-diagnose", "data-testid": "annahmen", children: [
20010
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h4", { children: "Erschlossen, nicht belegt" }),
20011
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ul", { children: lauf.assumptions.map((a, i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("li", { children: a }, i)) })
20028
+ lauf.assumptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "szenen-diagnose", "data-testid": "annahmen", children: [
20029
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h4", { children: "Erschlossen, nicht belegt" }),
20030
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("ul", { children: lauf.assumptions.map((a, i) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("li", { children: a }, i)) })
20012
20031
  ] }),
20013
20032
  lauf.proposals.map((vorschlag) => {
20014
20033
  const bezug = REFERENCE_FIELD[vorschlag.type];
20015
20034
  const fertig = uebernommen[vorschlag.type];
20016
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
20035
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
20017
20036
  "article",
20018
20037
  {
20019
20038
  className: "szenen-proposal",
20020
20039
  "data-testid": `vorschlag-${vorschlag.type}`,
20021
20040
  children: [
20022
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h4", { children: vorschlag.type }),
20023
- !fertig && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { className: "szenen-field", children: [
20024
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Titel" }),
20025
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
20041
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h4", { children: vorschlag.type }),
20042
+ !fertig && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "szenen-field", children: [
20043
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "Titel" }),
20044
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
20026
20045
  "input",
20027
20046
  {
20028
20047
  type: "text",
@@ -20036,9 +20055,9 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
20036
20055
  }
20037
20056
  )
20038
20057
  ] }),
20039
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("pre", { className: "szenen-proposal__payload", children: JSON.stringify(vorschlag.payload, null, 2) }),
20040
- bezug && !fertig && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
20041
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
20058
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("pre", { className: "szenen-proposal__payload", children: JSON.stringify(vorschlag.payload, null, 2) }),
20059
+ bezug && !fertig && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
20060
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
20042
20061
  ReferencePicker,
20043
20062
  {
20044
20063
  port,
@@ -20052,30 +20071,30 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
20052
20071
  }))
20053
20072
  }
20054
20073
  ),
20055
- referenzen[vorschlag.type] ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { "data-testid": `referenz-gewaehlt-${vorschlag.type}`, children: [
20074
+ referenzen[vorschlag.type] ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { "data-testid": `referenz-gewaehlt-${vorschlag.type}`, children: [
20056
20075
  "Zeigt auf Version ",
20057
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("code", { children: referenzen[vorschlag.type] }),
20076
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("code", { children: referenzen[vorschlag.type] }),
20058
20077
  "."
20059
20078
  ] }) : (
20060
20079
  /* Der Grund steht **vor** der Handlung. Den Nutzer erst
20061
20080
  auf einen Knopf drücken zu lassen, um ihm dann eine
20062
20081
  Ablehnung zu zeigen, ist keine Auskunft. */
20063
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { "data-testid": `referenz-fehlt-${vorschlag.type}`, children: [
20082
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { "data-testid": `referenz-fehlt-${vorschlag.type}`, children: [
20064
20083
  "Diese ",
20065
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("strong", { children: "Einzel\xFCbernahme" }),
20084
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("strong", { children: "Einzel\xFCbernahme" }),
20066
20085
  " braucht eine ver\xF6ffentlichte ",
20067
20086
  bezug.refersTo,
20068
20087
  "-Version, auf die der Entwurf zeigt (D-03) \u2014 sie ist der Weg in einen bestehenden, l\xE4ngst ver\xF6ffentlichten Zusammenhang. Wollen Sie aus diesem Lauf erst einmal einen Prompt ausprobieren, nehmen Sie unten die ",
20069
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("strong", { children: "Draft-Kette" }),
20088
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("strong", { children: "Draft-Kette" }),
20070
20089
  ": Dort entstehen Szene, Aufbau und Shot zusammenh\xE4ngend, und es muss nichts ver\xF6ffentlicht werden."
20071
20090
  ] })
20072
20091
  )
20073
20092
  ] }),
20074
- fertig ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { className: "szenen-proposal__done", children: [
20093
+ fertig ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { className: "szenen-proposal__done", children: [
20075
20094
  "Als Entwurf \xFCbernommen: ",
20076
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("code", { children: fertig }),
20095
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("code", { children: fertig }),
20077
20096
  ". Er ist noch nicht ver\xF6ffentlicht."
20078
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
20097
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
20079
20098
  "button",
20080
20099
  {
20081
20100
  type: "button",
@@ -20090,13 +20109,337 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
20090
20109
  vorschlag.type
20091
20110
  );
20092
20111
  }),
20093
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ChainActions, { port, runId: lauf.run_id }),
20094
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Belege, { lauf }),
20112
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ChainActions, { port, runId: lauf.run_id }),
20113
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Belege, { lauf }),
20095
20114
  folgeblock(lauf)
20096
20115
  ] })
20097
20116
  ] });
20098
20117
  };
20099
20118
 
20119
+ // src/features/szenen/areas/SceneArea.tsx
20120
+ var import_jsx_runtime15 = require("react/jsx-runtime");
20121
+ var SceneArea = ({ port, contextId }) => {
20122
+ const kannAbleiten = capabilitiesOf(port).derivation;
20123
+ const [ableiten, setAbleiten] = (0, import_react17.useState)(false);
20124
+ const zeigeDerive = kannAbleiten && ableiten;
20125
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "szenen-scene", "data-testid": "bereich-szene", children: [
20126
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "szenen-elements__toolbar", children: [
20127
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "szenen-area__lead", children: "Szenen dieses Kontexts. Auswahl \xF6ffnet die Bearbeitung der Nodes und Beziehungen und startet Prompt-L\xE4ufe." }),
20128
+ kannAbleiten && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
20129
+ "button",
20130
+ {
20131
+ type: "button",
20132
+ className: "szenen-elements__new",
20133
+ "data-testid": "neu-aus-bild-text",
20134
+ "aria-expanded": ableiten,
20135
+ onClick: () => setAbleiten((offen) => !offen),
20136
+ children: ableiten ? "Zur\xFCck zu den Szenen" : "+ Neu aus Bild/Text"
20137
+ }
20138
+ )
20139
+ ] }),
20140
+ !kannAbleiten && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "szenen-view__capability-note", "data-testid": "hinweis-keine-rekonstruktion", children: "Aus Bild oder Text l\xE4sst sich in diesem Host keine Szene ableiten." }),
20141
+ zeigeDerive ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DeriveArea, { port, contextId }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ElementsArea, { port, contextId, restrictToTypes: ["scene"] })
20142
+ ] });
20143
+ };
20144
+
20145
+ // src/features/szenen/areas/AdvancedArea.tsx
20146
+ var import_jsx_runtime16 = require("react/jsx-runtime");
20147
+ var AdvancedArea = ({ port, contextId }) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "szenen-erweitert", "data-testid": "bereich-erweitert", children: [
20148
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "szenen-area__lead", children: "Optionale Pr\xE4zisierung: Bildaufbau und Shot, Kameras und Stile der Aufnahme, Zielmodelle, Rekonstruktionsregeln und Sequenzen. F\xFCr den normalen Weg von der Szene zum Bild wird hier nichts gebraucht." }),
20149
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20150
+ ElementsArea,
20151
+ {
20152
+ port,
20153
+ contextId,
20154
+ restrictToTypes: ERWEITERT_TYPES,
20155
+ allTypesLabel: "alle erweiterten Typen",
20156
+ listTitle: "Erweitert"
20157
+ }
20158
+ )
20159
+ ] });
20160
+
20161
+ // src/features/szenen/areas/PromptsArea.tsx
20162
+ var import_react18 = require("react");
20163
+ var import_jsx_runtime17 = require("react/jsx-runtime");
20164
+ var HERKUNFT_TEXT2 = {
20165
+ published: "aus ver\xF6ffentlichtem Shot",
20166
+ draft_chain: "aus Draft-Kette",
20167
+ scene_direct: "direkt aus Szene",
20168
+ unresolved: "Herkunft unvollst\xE4ndig"
20169
+ };
20170
+ var PromptsArea = ({ port, contextId }) => {
20171
+ const faehig = capabilitiesOf(port);
20172
+ const [nachladen, setNachladen] = (0, import_react18.useState)(0);
20173
+ const [offen, setOffen] = (0, import_react18.useState)(null);
20174
+ const [alleKontexte, setAlleKontexte] = (0, import_react18.useState)(false);
20175
+ const [mitFehllaeufen, setMitFehllaeufen] = (0, import_react18.useState)(false);
20176
+ const [herkunft, setHerkunft] = (0, import_react18.useState)("alle");
20177
+ const [phase] = usePortQuery(
20178
+ () => port.runs.listAllRuns ? port.runs.listAllRuns({ status: "all" }) : Promise.resolve({
20179
+ kind: "ok",
20180
+ value: { runs: [], hiddenByStatus: 0, hiddenByContext: 0, withoutContext: 0 }
20181
+ }),
20182
+ [port, nachladen]
20183
+ );
20184
+ const alle = phase.status === "ready" ? phase.value.runs : [];
20185
+ const sicht = (0, import_react18.useMemo)(() => selectPromptRuns(alle, {
20186
+ status: mitFehllaeufen ? "all" : "succeeded",
20187
+ ...alleKontexte ? {} : { contextId }
20188
+ }), [alle, mitFehllaeufen, alleKontexte, contextId]);
20189
+ const titel = useLaufTitel(port, alle);
20190
+ const gezeigt = (0, import_react18.useMemo)(
20191
+ () => herkunft === "alle" ? sicht.runs : sicht.runs.filter((lauf) => groupOf(lauf).kind === herkunft),
20192
+ [sicht.runs, herkunft]
20193
+ );
20194
+ if (!faehig.promptOverview) {
20195
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "szenen-prompts", "data-testid": "prompts-bereich", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { "data-testid": "hinweis-keine-promptsicht", children: "Dieser Host bietet keine herkunfts\xFCbergreifende Prompt-Liste an. Prompt-L\xE4ufe bleiben im Detail ihrer Szene bzw. ihres Shots erreichbar \u2014 es ist kein Fehler und kein vor\xFCbergehender Zustand." }) });
20196
+ }
20197
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "szenen-prompts", "data-testid": "prompts-bereich", children: [
20198
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "szenen-prompts__toolbar", children: [
20199
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h3", { className: "szenen-prompts__heading", children: "Prompts" }),
20200
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { className: "szenen-prompts__filter", children: [
20201
+ "Herkunft",
20202
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
20203
+ "select",
20204
+ {
20205
+ "data-testid": "prompts-herkunft",
20206
+ value: herkunft,
20207
+ onChange: (e) => setHerkunft(e.target.value),
20208
+ children: [
20209
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "alle", children: "alle" }),
20210
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "published", children: HERKUNFT_TEXT2.published }),
20211
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "draft_chain", children: HERKUNFT_TEXT2.draft_chain }),
20212
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "scene_direct", children: HERKUNFT_TEXT2.scene_direct }),
20213
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "unresolved", children: HERKUNFT_TEXT2.unresolved })
20214
+ ]
20215
+ }
20216
+ )
20217
+ ] }),
20218
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { className: "szenen-prompts__filter", children: [
20219
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
20220
+ "input",
20221
+ {
20222
+ type: "checkbox",
20223
+ "data-testid": "prompts-alle-kontexte",
20224
+ checked: alleKontexte,
20225
+ onChange: (e) => setAlleKontexte(e.target.checked)
20226
+ }
20227
+ ),
20228
+ "Alle Kontexte"
20229
+ ] }),
20230
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { className: "szenen-prompts__filter", children: [
20231
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
20232
+ "input",
20233
+ {
20234
+ type: "checkbox",
20235
+ "data-testid": "prompts-mit-fehllaeufen",
20236
+ checked: mitFehllaeufen,
20237
+ onChange: (e) => setMitFehllaeufen(e.target.checked)
20238
+ }
20239
+ ),
20240
+ "Fehll\xE4ufe zeigen"
20241
+ ] })
20242
+ ] }),
20243
+ phase.status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { "data-testid": "prompts-laden", children: "Prompts werden geladen \u2026" }),
20244
+ phase.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { "data-testid": "prompts-fehler", role: "alert", children: [
20245
+ "Prompts konnten nicht geladen werden: ",
20246
+ phase.message
20247
+ ] }),
20248
+ phase.status === "ready" && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
20249
+ gezeigt.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { "data-testid": "keine-prompts", children: alle.length === 0 ? "Es gibt noch keinen Prompt-Lauf." : `Kein Prompt passt zu dieser Auswahl \u2014 von ${alle.length} vorhandenen L\xE4ufen bleibt keiner \xFCbrig.` }),
20250
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("ol", { "data-testid": "prompts-liste", children: gezeigt.map((lauf) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
20251
+ PromptEintrag,
20252
+ {
20253
+ port,
20254
+ lauf,
20255
+ alle,
20256
+ titel: titel.get(lauf.run_id) ?? null,
20257
+ offen: lauf.run_id === offen,
20258
+ onUmschalten: () => setOffen(
20259
+ lauf.run_id === offen ? null : lauf.run_id
20260
+ ),
20261
+ itemMoeglich: faehig.saveRunAsItem,
20262
+ onItemGespeichert: () => setNachladen((n) => n + 1)
20263
+ },
20264
+ lauf.run_id
20265
+ )) }),
20266
+ (sicht.hiddenByContext > 0 || sicht.withoutContext > 0 || sicht.hiddenByStatus > 0) && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { className: "szenen-prompts__ausgeblendet", "data-testid": "prompts-ausgeblendet", children: [
20267
+ sicht.hiddenByStatus > 0 && `${sicht.hiddenByStatus} Fehllauf/-l\xE4ufe ausgeblendet. `,
20268
+ sicht.hiddenByContext > 0 && `${sicht.hiddenByContext} Lauf/L\xE4ufe geh\xF6ren zu einem anderen Kontext. `,
20269
+ sicht.withoutContext > 0 && `${sicht.withoutContext} Lauf/L\xE4ufe nennen keinen Kontext und werden keinem zugeordnet \u2014 \u201EAlle Kontexte" zeigt sie. `
20270
+ ] })
20271
+ ] })
20272
+ ] });
20273
+ };
20274
+ var PromptEintrag = ({ port, lauf, alle, titel, offen, onUmschalten, itemMoeglich, onItemGespeichert }) => {
20275
+ const gruppe = groupOf(lauf);
20276
+ const runde = roundOfRun(lauf, siblingsOf(lauf, alle));
20277
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("li", { className: "szenen-prompts__eintrag", "data-testid": `prompt-${lauf.run_id}`, children: [
20278
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { className: "szenen-prompts__herkunft", "data-testid": `herkunft-${lauf.run_id}`, children: [
20279
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { "data-herkunft": gruppe.kind, children: HERKUNFT_TEXT2[gruppe.kind] }),
20280
+ gruppe.kind === "unresolved" && // D-75: Was nicht belegbar ist, wird benannt und nicht
20281
+ // durch eine plausible Kennung ersetzt.
20282
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "szenen-prompts__hinweis", children: [
20283
+ " \u2014 ",
20284
+ gruppe.reason
20285
+ ] })
20286
+ ] }),
20287
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("ol", { className: "szenen-prompts__lauf", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
20288
+ RundenEintrag,
20289
+ {
20290
+ port,
20291
+ lauf,
20292
+ runde,
20293
+ titel,
20294
+ offen,
20295
+ onUmschalten,
20296
+ itemMoeglich,
20297
+ onItemGespeichert
20298
+ }
20299
+ ) })
20300
+ ] });
20301
+ };
20302
+
20303
+ // src/features/szenen/areas/MediaArea.tsx
20304
+ var import_react19 = require("react");
20305
+ var import_jsx_runtime18 = require("react/jsx-runtime");
20306
+ var leer = async () => ({ kind: "ok", value: [] });
20307
+ var MediaArea = ({ port }) => {
20308
+ const media = port.media;
20309
+ const [versionInput, setVersionInput] = (0, import_react19.useState)("");
20310
+ const [versionId, setVersionId] = (0, import_react19.useState)("");
20311
+ const [itemInput, setItemInput] = (0, import_react19.useState)("");
20312
+ const [itemId, setItemId] = (0, import_react19.useState)("");
20313
+ const [assetId, setAssetId] = (0, import_react19.useState)("");
20314
+ const [role, setRole] = (0, import_react19.useState)("reference");
20315
+ const [position, setPosition] = (0, import_react19.useState)("0");
20316
+ const [notiz, setNotiz] = (0, import_react19.useState)(null);
20317
+ const [busy, setBusy] = (0, import_react19.useState)(false);
20318
+ const [refresh, setRefresh] = (0, import_react19.useState)(0);
20319
+ const [versionPhase] = usePortQuery(
20320
+ () => versionId ? media.listVersionMedia(versionId) : leer(),
20321
+ [media, versionId, refresh]
20322
+ );
20323
+ const [itemPhase] = usePortQuery(
20324
+ () => itemId ? media.listItemMedia(itemId) : Promise.resolve({ kind: "ok", value: [] }),
20325
+ [media, itemId, refresh]
20326
+ );
20327
+ const zuordnen = async () => {
20328
+ if (!versionInput.trim() || !assetId.trim()) {
20329
+ setNotiz({ tone: "error", text: "Version-ID und Asset-ID sind erforderlich." });
20330
+ return;
20331
+ }
20332
+ const parsedPosition = Number(position);
20333
+ if (!Number.isInteger(parsedPosition) || parsedPosition < 0) {
20334
+ setNotiz({ tone: "error", text: `Position muss eine nicht-negative Ganzzahl sein, war ${JSON.stringify(position)}.` });
20335
+ return;
20336
+ }
20337
+ setBusy(true);
20338
+ const result = await media.attachVersionMedium({
20339
+ versionId: versionInput.trim(),
20340
+ assetId: assetId.trim(),
20341
+ role,
20342
+ position: parsedPosition
20343
+ });
20344
+ setNotiz(noticeFor(result, "Referenzmedium zuordnen"));
20345
+ if (result.kind === "ok") {
20346
+ setVersionId(versionInput.trim());
20347
+ setRefresh((value) => value + 1);
20348
+ }
20349
+ setBusy(false);
20350
+ };
20351
+ const entfernen = async (medium) => {
20352
+ setBusy(true);
20353
+ const result = await media.detachVersionMedium({
20354
+ versionId,
20355
+ assetId: medium.assetId,
20356
+ role: medium.role
20357
+ });
20358
+ setNotiz(noticeFor(result, "Referenzmedium entfernen"));
20359
+ if (result.kind === "ok") setRefresh((value) => value + 1);
20360
+ setBusy(false);
20361
+ };
20362
+ const versionMedien = versionPhase.status === "ready" ? versionPhase.value : [];
20363
+ const itemMedien = itemPhase.status === "ready" ? itemPhase.value : [];
20364
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-media", "data-testid": "bereich-medien", children: [
20365
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "szenen-area__lead", children: "Bereits vorhandene Medien-Assets einer Elementversion zuordnen. Hochgeladen wird hier nichts \u2014 Medien entstehen \xFCber den bestehenden Speicherweg aus Stufe 5." }),
20366
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("section", { children: [
20367
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h3", { children: "Version" }),
20368
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-media__lookup", children: [
20369
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { children: [
20370
+ "Version-ID",
20371
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("input", { value: versionInput, onChange: (event) => setVersionInput(event.target.value) })
20372
+ ] }),
20373
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { type: "button", onClick: () => setVersionId(versionInput.trim()), children: "Medien laden" })
20374
+ ] }),
20375
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-media__attach", children: [
20376
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { children: [
20377
+ "Asset-ID",
20378
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("input", { value: assetId, onChange: (event) => setAssetId(event.target.value) })
20379
+ ] }),
20380
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { children: [
20381
+ "Rolle",
20382
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("select", { value: role, onChange: (event) => setRole(event.target.value), children: [
20383
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("option", { value: "reference", children: "reference" }),
20384
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("option", { value: "mask", children: "mask" }),
20385
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("option", { value: "palette", children: "palette" }),
20386
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("option", { value: "example", children: "example" })
20387
+ ] })
20388
+ ] }),
20389
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { children: [
20390
+ "Position",
20391
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("input", { type: "number", min: "0", value: position, onChange: (event) => setPosition(event.target.value) })
20392
+ ] }),
20393
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { type: "button", disabled: busy, onClick: zuordnen, children: "zuordnen" })
20394
+ ] }),
20395
+ versionPhase.status === "loading" && versionId && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { children: "Versionsmedien werden geladen \u2026" }),
20396
+ versionPhase.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { role: "alert", children: [
20397
+ "Versionsmedien konnten nicht geladen werden: ",
20398
+ versionPhase.message
20399
+ ] }),
20400
+ versionPhase.status === "ready" && versionId && versionMedien.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { children: [
20401
+ "Version ",
20402
+ versionId,
20403
+ " hat keine Medien."
20404
+ ] }),
20405
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ul", { className: "szenen-media__list", children: versionMedien.map((medium) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("li", { children: [
20406
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("code", { children: medium.assetId }),
20407
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { children: [
20408
+ medium.role,
20409
+ " \xB7 Position ",
20410
+ medium.position
20411
+ ] }),
20412
+ medium.url && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("a", { href: medium.url, target: "_blank", rel: "noreferrer", children: "\xF6ffnen" }),
20413
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { type: "button", disabled: busy, onClick: () => entfernen(medium), children: "entfernen" })
20414
+ ] }, `${medium.assetId}:${medium.role}`)) })
20415
+ ] }),
20416
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("section", { children: [
20417
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h3", { children: "Item-Medien" }),
20418
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-media__lookup", children: [
20419
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { children: [
20420
+ "Item-ID",
20421
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("input", { value: itemInput, onChange: (event) => setItemInput(event.target.value) })
20422
+ ] }),
20423
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { type: "button", onClick: () => setItemId(itemInput.trim()), children: "Item-Medien laden" })
20424
+ ] }),
20425
+ itemPhase.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { role: "alert", children: [
20426
+ "Item-Medien konnten nicht geladen werden: ",
20427
+ itemPhase.message
20428
+ ] }),
20429
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ul", { className: "szenen-media__list", children: itemMedien.map((medium) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("li", { children: [
20430
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("code", { children: medium.assetId }),
20431
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { children: [
20432
+ medium.role,
20433
+ " \xB7 Position ",
20434
+ medium.position
20435
+ ] }),
20436
+ medium.url && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("a", { href: medium.url, target: "_blank", rel: "noreferrer", children: "\xF6ffnen" })
20437
+ ] }, `${medium.assetId}:${medium.role}:${medium.position}`)) })
20438
+ ] }),
20439
+ notiz && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { role: notiz.tone === "error" ? "alert" : "status", "data-tone": notiz.tone, children: notiz.text })
20440
+ ] });
20441
+ };
20442
+
20100
20443
  // src/features/szenen/SzenenView.tsx
20101
20444
  var import_jsx_runtime19 = require("react/jsx-runtime");
20102
20445
  var SzenenView = ({
@@ -20105,9 +20448,9 @@ var SzenenView = ({
20105
20448
  initialArea,
20106
20449
  onAreaChange
20107
20450
  }) => {
20108
- const bereiche = (0, import_react17.useMemo)(() => areasFor(port), [port]);
20109
- const faehig = (0, import_react17.useMemo)(() => capabilitiesOf(port), [port]);
20110
- const [aktiv, setAktiv] = (0, import_react17.useState)(() => resolveArea(port, initialArea));
20451
+ const bereiche = (0, import_react20.useMemo)(() => areasFor(port), [port]);
20452
+ const faehig = (0, import_react20.useMemo)(() => capabilitiesOf(port), [port]);
20453
+ const [aktiv, setAktiv] = (0, import_react20.useState)(() => resolveArea(port, initialArea));
20111
20454
  const wechsle = (id) => {
20112
20455
  setAktiv(id);
20113
20456
  onAreaChange?.(id);
@@ -20118,7 +20461,7 @@ var SzenenView = ({
20118
20461
  /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { children: [
20119
20462
  /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "szenen-view__eyebrow", children: "Vom Motiv zum Bild" }),
20120
20463
  /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h2", { children: "Bildprompt aus einer Szene" }),
20121
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { children: "Bausteine w\xE4hlen, Szene und Bildaufbau festlegen und daraus einen wiederholbaren Prompt erzeugen." })
20464
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { children: 'Eine Szene anlegen oder aus Bild bzw. Text ableiten und daraus einen Prompt starten. Alle so entstandenen Prompts stehen mit ihren Bildern unter \u201EPrompts". Bausteine und Erweitertes pr\xE4zisieren den Weg, wenn er pr\xE4ziser werden soll.' })
20122
20465
  ] }),
20123
20466
  /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "szenen-view__step", children: aktuellerBereich.title })
20124
20467
  ] }),
@@ -20137,7 +20480,8 @@ var SzenenView = ({
20137
20480
  bereich.id
20138
20481
  )) }),
20139
20482
  /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("section", { className: "szenen-view__area", "aria-label": aktuellerBereich.title, children: [
20140
- aktiv === "derive" && port.derivation && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(DeriveArea, { port, contextId }),
20483
+ aktiv === "scene" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SceneArea, { port, contextId }),
20484
+ aktiv === "prompts" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(PromptsArea, { port, contextId }),
20141
20485
  aktiv === "elements" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
20142
20486
  ElementsArea,
20143
20487
  {
@@ -20148,9 +20492,7 @@ var SzenenView = ({
20148
20492
  listTitle: "Bausteine"
20149
20493
  }
20150
20494
  ),
20151
- aktiv === "scene" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SceneArea, { port, contextId }),
20152
- aktiv === "setup" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SetupArea, { port, contextId }),
20153
- aktiv === "shot" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ShotArea, { port, contextId }),
20495
+ aktiv === "advanced" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(AdvancedArea, { port, contextId }),
20154
20496
  aktiv === "media" && port.media && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(MediaArea, { port, contextId })
20155
20497
  ] }),
20156
20498
  (!faehig.saveRunAsItem || !faehig.media) && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("details", { className: "szenen-view__host-notes", children: [
@@ -20246,6 +20588,7 @@ var SzenenView = ({
20246
20588
  collectVersionRefs,
20247
20589
  compileSchemas,
20248
20590
  completePromptOperation,
20591
+ contextOfRun,
20249
20592
  createBrowserTextGenerationPort,
20250
20593
  createClientDerivationPort,
20251
20594
  createClientRunPort,
@@ -20296,6 +20639,8 @@ var SzenenView = ({
20296
20639
  generationBatchIdOf,
20297
20640
  gesamtHerkunft,
20298
20641
  getSzenenSchemas,
20642
+ groupKeyOf,
20643
+ groupOf,
20299
20644
  gruppiereZuItems,
20300
20645
  hasPlacementCapability,
20301
20646
  isKnownElementType,
@@ -20317,6 +20662,7 @@ var SzenenView = ({
20317
20662
  mergeSzenenBatchOrigin,
20318
20663
  mimeTypAus,
20319
20664
  mitDefaultVorlage,
20665
+ namingElementOf,
20320
20666
  noticeFor,
20321
20667
  ordersForPromptRun,
20322
20668
  ordneSeedsZu,
@@ -20352,9 +20698,12 @@ var SzenenView = ({
20352
20698
  sceneOnlyCapabilities,
20353
20699
  scopeOfPath,
20354
20700
  seedFehlerText,
20701
+ selectPromptRuns,
20355
20702
  selectableTargetModels,
20356
20703
  showChain,
20704
+ siblingsOf,
20357
20705
  simulatedAnswerFor,
20706
+ sourceOf,
20358
20707
  szenenSnapshotFilename,
20359
20708
  totalModelCalls,
20360
20709
  typAusBytes,