@arcanewizards/timecode-toolbox 0.1.3 → 0.1.5

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/frontend.js CHANGED
@@ -25238,7 +25238,7 @@
25238
25238
  return t4;
25239
25239
  };
25240
25240
 
25241
- // ../../packages/sigil/dist/chunk-E3VUC3Q4.js
25241
+ // ../../packages/sigil/dist/chunk-LDUYBGRY.js
25242
25242
  var import_compiler_runtime4 = __toESM(require_compiler_runtime(), 1);
25243
25243
 
25244
25244
  // ../../packages/sigil/dist/chunk-BIY5HAXP.js
@@ -35386,7 +35386,7 @@
35386
35386
  return condition ? truthyClassName : falseyClassName;
35387
35387
  }
35388
35388
 
35389
- // ../../packages/sigil/dist/chunk-E3VUC3Q4.js
35389
+ // ../../packages/sigil/dist/chunk-LDUYBGRY.js
35390
35390
  var import_react11 = __toESM(require_react(), 1);
35391
35391
 
35392
35392
  // ../../node_modules/.pnpm/@arcanejs+toolkit-frontend@0.11.0/node_modules/@arcanejs/toolkit-frontend/dist/chunk-DK4BAXVE.mjs
@@ -35425,7 +35425,7 @@
35425
35425
  `;
35426
35426
  var TRANSPARENCY_SVG_URI = `data:image/svg+xml,${encodeURIComponent(TRANSPARENCY_SVG)}`;
35427
35427
 
35428
- // ../../packages/sigil/dist/chunk-E3VUC3Q4.js
35428
+ // ../../packages/sigil/dist/chunk-LDUYBGRY.js
35429
35429
  var import_react12 = __toESM(require_react(), 1);
35430
35430
  var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
35431
35431
  var import_react13 = __toESM(require_react(), 1);
@@ -35486,8 +35486,9 @@
35486
35486
  touching,
35487
35487
  position,
35488
35488
  className,
35489
- primary
35490
- }) => cn(`sigil-control-button`, cnd(variant === "border", `sigil-control-button-variant-border`), cnd(variant === "large", `sigil-control-button-variant-large`), cnd(variant === "properties", `sigil-control-button-variant-properties`), cnd(variant === "table-row", `sigil-control-button-variant-table-row`), cnd(variant === "toolbar", `sigil-control-button-variant-toolbar`), cnd(variant === "titlebar", `sigil-control-button-variant-titlebar`), cnd(touching, `sigil-control-button-touching`), cnd(active, `sigil-control-button-active`), cnd(touching && active, `sigil-control-button-active-touching`), cnd(primary, `sigil-control-button-primary`), clsControlPosition(position), className);
35489
+ primary,
35490
+ destructive
35491
+ }) => cn(`sigil-control-button`, cnd(variant === "border", `sigil-control-button-variant-border`), cnd(variant === "large", `sigil-control-button-variant-large`), cnd(variant === "properties", `sigil-control-button-variant-properties`), cnd(variant === "table-row", `sigil-control-button-variant-table-row`), cnd(variant === "toolbar", `sigil-control-button-variant-toolbar`), cnd(variant === "titlebar", `sigil-control-button-variant-titlebar`), cnd(touching, `sigil-control-button-touching`), cnd(active, `sigil-control-button-active`), cnd(touching && active, `sigil-control-button-active-touching`), cnd(primary, `sigil-control-button-primary`), cnd(destructive, `sigil-control-button-destructive`), clsControlPosition(position), className);
35491
35492
  var ControlButtonFrame = /* @__PURE__ */ (0, import_react12.forwardRef)(({
35492
35493
  children,
35493
35494
  className,
@@ -35501,6 +35502,7 @@
35501
35502
  tooltipSide,
35502
35503
  position,
35503
35504
  primary,
35505
+ destructive,
35504
35506
  ...props
35505
35507
  }, ref) => {
35506
35508
  const btn = /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", {
@@ -35514,6 +35516,7 @@
35514
35516
  touching,
35515
35517
  position,
35516
35518
  primary,
35519
+ destructive,
35517
35520
  className
35518
35521
  }),
35519
35522
  children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", {
@@ -35629,7 +35632,7 @@
35629
35632
  subgrid,
35630
35633
  ...props
35631
35634
  }, ref) => {
35632
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", {
35635
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("label", {
35633
35636
  ...props,
35634
35637
  ref,
35635
35638
  className: cn("flex items-center justify-end gap-0.6 p-0.6", clsControlPosition(position), cnd(nonMicro, "max-[550px]:hidden"), cnd(disabled, "opacity-50"), clsControlSubgridPosition(position, subgrid), className)
@@ -35661,9 +35664,12 @@
35661
35664
  children,
35662
35665
  className,
35663
35666
  ...props
35664
- }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ControlButtonGroup, {
35667
+ }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", {
35665
35668
  ref,
35666
- className: cn("control-grid-pos-row", className),
35669
+ className: cn(`
35670
+ flex items-stretch gap-1
35671
+ [&>button]:grow
35672
+ `, clsControlPosition("row"), className),
35667
35673
  ...props,
35668
35674
  children
35669
35675
  }));
@@ -35859,46 +35865,9 @@
35859
35865
  }
35860
35866
  return t1;
35861
35867
  };
35862
- var COLOR_OPTIONS = {
35863
- red: {
35864
- label: "Red",
35865
- value: "red"
35866
- },
35867
- blue: {
35868
- label: "Blue",
35869
- value: "blue"
35870
- },
35871
- teal: {
35872
- label: "Teal",
35873
- value: "teal"
35874
- },
35875
- green: {
35876
- label: "Green",
35877
- value: "green"
35878
- },
35879
- yellow: {
35880
- label: "Yellow",
35881
- value: "yellow"
35882
- },
35883
- purple: {
35884
- label: "Purple",
35885
- value: "purple"
35886
- },
35887
- orange: {
35888
- label: "Orange",
35889
- value: "orange"
35890
- },
35891
- brown: {
35892
- label: "Brown",
35893
- value: "brown"
35894
- },
35895
- gray: {
35896
- label: "Gray",
35897
- value: "gray"
35898
- }
35899
- };
35900
- var ControlColorSelect = ({
35901
- color,
35868
+ var ControlColoredSelect = ({
35869
+ options,
35870
+ value,
35902
35871
  onChange,
35903
35872
  variant,
35904
35873
  position,
@@ -35906,11 +35875,11 @@
35906
35875
  placeholder,
35907
35876
  ...props
35908
35877
  }) => {
35909
- const options = Object.values(COLOR_OPTIONS);
35910
- const selectedColor = sigilColorUsage(color || "gray");
35878
+ const selectedOption = options.find((option) => option.value === value);
35879
+ const selectedColor = sigilColorUsage(selectedOption?.color ?? "gray");
35911
35880
  return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ControlSelect, {
35912
35881
  options,
35913
- value: color,
35882
+ value,
35914
35883
  onChange,
35915
35884
  triggerButton: (option) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(dist_exports2.Trigger, {
35916
35885
  disabled,
@@ -35946,7 +35915,7 @@
35946
35915
  option: (option) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", {
35947
35916
  className: "",
35948
35917
  style: {
35949
- color: `var(--sigil-usage-${option.value}-foreground)`
35918
+ color: `var(--sigil-usage-${option.color}-foreground)`
35950
35919
  },
35951
35920
  children: option.label
35952
35921
  }),
@@ -35956,6 +35925,64 @@
35956
35925
  ...props
35957
35926
  });
35958
35927
  };
35928
+ var COLOR_OPTIONS = {
35929
+ red: {
35930
+ label: "Red",
35931
+ value: "red",
35932
+ color: "red"
35933
+ },
35934
+ blue: {
35935
+ label: "Blue",
35936
+ value: "blue",
35937
+ color: "blue"
35938
+ },
35939
+ teal: {
35940
+ label: "Teal",
35941
+ value: "teal",
35942
+ color: "teal"
35943
+ },
35944
+ green: {
35945
+ label: "Green",
35946
+ value: "green",
35947
+ color: "green"
35948
+ },
35949
+ yellow: {
35950
+ label: "Yellow",
35951
+ value: "yellow",
35952
+ color: "yellow"
35953
+ },
35954
+ purple: {
35955
+ label: "Purple",
35956
+ value: "purple",
35957
+ color: "purple"
35958
+ },
35959
+ orange: {
35960
+ label: "Orange",
35961
+ value: "orange",
35962
+ color: "orange"
35963
+ },
35964
+ brown: {
35965
+ label: "Brown",
35966
+ value: "brown",
35967
+ color: "brown"
35968
+ },
35969
+ gray: {
35970
+ label: "Gray",
35971
+ value: "gray",
35972
+ color: "gray"
35973
+ }
35974
+ };
35975
+ var COLOR_OPTIONS_ARRAY = Object.values(COLOR_OPTIONS);
35976
+ var ControlColorSelect = ({
35977
+ color,
35978
+ ...props
35979
+ }) => {
35980
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ControlColoredSelect, {
35981
+ options: COLOR_OPTIONS_ARRAY,
35982
+ value: color,
35983
+ ...props
35984
+ });
35985
+ };
35959
35986
  var isDarkDialog = (variant) => variant === "dark" || variant === "dark-compact";
35960
35987
  var DialogTitle = /* @__PURE__ */ (0, import_react11.forwardRef)(({
35961
35988
  className,
@@ -37432,6 +37459,7 @@
37432
37459
  };
37433
37460
  var createDefaultBrowserContext = (browser) => {
37434
37461
  const defaults = {
37462
+ appListenerChangesHandledExternally: false,
37435
37463
  openExternalLink: (url) => {
37436
37464
  window.open(url, "_blank", "noopener,noreferrer");
37437
37465
  },
@@ -37680,6 +37708,24 @@ Data Directory: ${system.dataDirectory}`
37680
37708
  return resolvedBrowser;
37681
37709
  };
37682
37710
 
37711
+ // ../../packages/sigil/dist/shared/config.js
37712
+ var APP_LISTENER_CONFIG = zod_default.object({
37713
+ port: zod_default.union([zod_default.number().int().min(1).max(65535), zod_default.object({
37714
+ from: zod_default.number().int().min(1).max(65535),
37715
+ to: zod_default.number().int().min(1).max(65535)
37716
+ }).refine((data) => data.to >= data.from, {
37717
+ message: '"to" must be greater than or equal to "from"'
37718
+ })]),
37719
+ interface: zod_default.string().optional()
37720
+ });
37721
+ var ALL_APP_LISTENER_CONFIG = zod_default.record(zod_default.string(), APP_LISTENER_CONFIG);
37722
+ var portString = (port) => {
37723
+ if (typeof port === "number") {
37724
+ return port.toString();
37725
+ }
37726
+ return `${port.from}-${port.to}`;
37727
+ };
37728
+
37683
37729
  // src/components/proto.ts
37684
37730
  var NET_UTILS_GENERAL_TARGET_DEFINITION = zod_default.union([zod_default.object({
37685
37731
  type: zod_default.literal("host"),
@@ -37742,6 +37788,7 @@ Data Directory: ${system.dataDirectory}`
37742
37788
  link: INPUT_OR_GENERATOR_INSTANCE_ID.nullable()
37743
37789
  });
37744
37790
  var TOOLBOX_CONFIG = zod_default.object({
37791
+ appListener: APP_LISTENER_CONFIG.partial().optional(),
37745
37792
  inputs: zod_default.record(zod_default.string(), INPUT_CONFIG),
37746
37793
  generators: zod_default.record(zod_default.string(), GENERATOR_CONFIG),
37747
37794
  outputs: zod_default.record(zod_default.string(), OUTPUT_CONFIG),
@@ -37757,8 +37804,8 @@ Data Directory: ${system.dataDirectory}`
37757
37804
  var isTimecodeToolboxComponent = (component) => component.namespace === NAMESPACE;
37758
37805
 
37759
37806
  // src/components/frontend/toolbox/root.tsx
37760
- var import_compiler_runtime20 = __toESM(require_compiler_runtime());
37761
- var import_react43 = __toESM(require_react());
37807
+ var import_compiler_runtime28 = __toESM(require_compiler_runtime());
37808
+ var import_react51 = __toESM(require_react());
37762
37809
 
37763
37810
  // ../../packages/artnet/dist/chunk-J2HDMITA.js
37764
37811
  var ARTNET_PORT = 6454;
@@ -37800,10 +37847,16 @@ Data Directory: ${system.dataDirectory}`
37800
37847
  },
37801
37848
  inputs: {
37802
37849
  title: "INPUTS",
37850
+ unnamed: "Unnamed Input",
37851
+ enable: "Enable Input",
37852
+ disable: "Disable Input",
37853
+ edit: "Edit Input",
37803
37854
  noChildren: "No inputs yet. Please add one using the buttons below.",
37804
37855
  addButton: (protocol) => `Add ${protocol}`,
37805
37856
  addDialog: (protocol) => `Add ${protocol} Input`,
37806
- editDialog: (protocol, name) => `Edit ${protocol} Input ${name}`
37857
+ editDialog: (protocol, name) => `Edit ${protocol} Input ${name}`,
37858
+ deleteDialog: `Delete input?`,
37859
+ deleteDialogDetails: `Are you sure you want to delete this input? This action cannot be undone.`
37807
37860
  },
37808
37861
  smtpeModes: {
37809
37862
  SMPTE: `SMPTE ${TIMECODE_FPS.SMPTE}FPS`,
@@ -37821,22 +37874,49 @@ Data Directory: ${system.dataDirectory}`
37821
37874
  delay: (delayMs) => `Delay: ${MS_FORMAT.format(delayMs)}`,
37822
37875
  generators: {
37823
37876
  title: "GENERATORS",
37877
+ unnamed: "Unnamed Generator",
37878
+ edit: "Edit Generator",
37824
37879
  noChildren: "No generators yet. Please add one using the buttons below.",
37825
37880
  type: {
37826
37881
  clock: "Clock"
37827
37882
  },
37828
37883
  addDialog: (protocol) => `Add ${protocol} Generator`,
37829
- editDialog: (protocol, name) => `Edit ${protocol} Generator ${name}`
37884
+ editDialog: (protocol, name) => `Edit ${protocol} Generator ${name}`,
37885
+ deleteDialog: `Delete generator?`,
37886
+ deleteDialogDetails: `Are you sure you want to delete this generator? This action cannot be undone.`
37830
37887
  },
37831
37888
  outputs: {
37832
37889
  title: "OUTPUTS",
37890
+ unnamed: "Unnamed Output",
37891
+ enable: "Enable Output",
37892
+ disable: "Disable Output",
37893
+ link: "Link Output",
37894
+ edit: "Edit Output",
37833
37895
  noChildren: "No outputs yet. Please add one using the buttons below.",
37834
37896
  addButton: (protocol) => `Add ${protocol}`,
37835
37897
  addDialog: (protocol) => `Add ${protocol} Output`,
37836
- editDialog: (protocol, name) => `Edit ${protocol} Output ${name}`
37898
+ editDialog: (protocol, name) => `Edit ${protocol} Output ${name}`,
37899
+ deleteDialog: `Delete output?`,
37900
+ deleteDialogDetails: `Are you sure you want to delete this output? This action cannot be undone.`
37837
37901
  },
37838
37902
  settings: {
37839
- title: "Settings"
37903
+ title: "Settings",
37904
+ network: {
37905
+ appPortLabel: "Application Port",
37906
+ appInterfaceLabel: "Application Interface",
37907
+ anyInterface: "Any Interface",
37908
+ internalInterfaceUsed: (iface) => `Note: The interface ${iface} is only accessible from this device, which means that other devices will not be able to connect to Timecode Toolbox.`,
37909
+ appPortEnvOverride: (envPort) => `Note: The application port is currently set to ${envPort} via the PORT environment variable, and cannot be configured here.`,
37910
+ defaultPort: (port) => `Default: (${port})`,
37911
+ saveChanges: "Save Changes",
37912
+ saveWarning: {
37913
+ external: "When you hit Save, the UI will reload",
37914
+ internal: "When you hit Save, the app will attempt to reconnect using the new network settings, but may require you to adjust the URL manually."
37915
+ },
37916
+ invalidPortSingle: "Port numbers must be an integer between 1 and 65535",
37917
+ invalidPort: 'Please enter a valid port number or range (e.g. "1234" or "8000-8100")',
37918
+ invalidPortRange: 'The first port in a range must be less than or equal to the second port (e.g. "8000-8100")'
37919
+ }
37840
37920
  },
37841
37921
  controls: {
37842
37922
  play: "Play",
@@ -38309,12 +38389,14 @@ Data Directory: ${system.dataDirectory}`
38309
38389
  return t4;
38310
38390
  };
38311
38391
  var TimecodeDisplay = (t0) => {
38312
- const $ = (0, import_compiler_runtime7.c)(71);
38392
+ const $ = (0, import_compiler_runtime7.c)(72);
38313
38393
  const {
38314
38394
  id,
38315
38395
  timecode: t1,
38316
38396
  config,
38317
- headerComponents
38397
+ headerComponents,
38398
+ disabled,
38399
+ rootState
38318
38400
  } = t0;
38319
38401
  const {
38320
38402
  state,
@@ -38457,7 +38539,7 @@ Data Directory: ${system.dataDirectory}`
38457
38539
  let t11;
38458
38540
  if ($[26] !== headerComponents) {
38459
38541
  t11 = headerComponents && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", {
38460
- className: "flex flex-wrap gap-0.25",
38542
+ className: "flex gap-0.25",
38461
38543
  children: headerComponents
38462
38544
  });
38463
38545
  $[26] = headerComponents;
@@ -38465,72 +38547,54 @@ Data Directory: ${system.dataDirectory}`
38465
38547
  } else {
38466
38548
  t11 = $[27];
38467
38549
  }
38468
- const t12 = state?.state === "stopped";
38469
- let t13;
38470
- if ($[28] !== hooks?.pause || $[29] !== hooks?.play || $[30] !== t12) {
38471
- t13 = cn("relative min-h-timecode-min-height grow", cnd(t12, "opacity-50"), cnd(hooks?.play && hooks?.pause, `
38472
- cursor-pointer
38473
- hover:opacity-100
38474
- `));
38475
- $[28] = hooks?.pause;
38476
- $[29] = hooks?.play;
38477
- $[30] = t12;
38478
- $[31] = t13;
38479
- } else {
38480
- t13 = $[31];
38481
- }
38482
- let t14;
38483
- if ($[32] === Symbol.for("react.memo_cache_sentinel")) {
38484
- t14 = cn("font-mono text-timecode-adaptive");
38485
- $[32] = t14;
38486
- } else {
38487
- t14 = $[32];
38488
- }
38489
- let t15;
38490
- if ($[33] !== state.effectiveStartTimeMillis || $[34] !== state.positionMillis || $[35] !== state.speed || $[36] !== state.state) {
38491
- t15 = state.state === "none" ? "--:--:--:---" : state.state === "stopped" ? displayMillis(state.positionMillis) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ActiveTimecodeText, {
38492
- effectiveStartTimeMillis: state.effectiveStartTimeMillis,
38493
- speed: state.speed
38494
- });
38495
- $[33] = state.effectiveStartTimeMillis;
38496
- $[34] = state.positionMillis;
38497
- $[35] = state.speed;
38498
- $[36] = state.state;
38499
- $[37] = t15;
38500
- } else {
38501
- t15 = $[37];
38502
- }
38503
- let t16;
38504
- if ($[38] !== t15) {
38505
- t16 = /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", {
38506
- className: "absolute inset-0 flex items-center justify-center",
38550
+ let t12;
38551
+ if ($[28] !== disabled || $[29] !== hooks?.pause || $[30] !== hooks?.play || $[31] !== state.effectiveStartTimeMillis || $[32] !== state.positionMillis || $[33] !== state.speed || $[34] !== state.state) {
38552
+ t12 = disabled ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SizeAwareDiv, {
38553
+ className: "\n pointer-events-none absolute inset-0 flex items-center\n justify-center\n ",
38554
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Icon2, {
38555
+ icon: "pause",
38556
+ className: "text-timecode-adaptive"
38557
+ })
38558
+ }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", {
38559
+ className: cn("absolute inset-0 flex items-center justify-center", cnd(state?.state === "stopped", "opacity-50"), cnd(hooks?.play && hooks?.pause, `
38560
+ cursor-pointer
38561
+ hover:opacity-100
38562
+ `)),
38507
38563
  children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", {
38508
- className: t14,
38509
- children: t15
38564
+ className: cn("font-mono text-timecode-adaptive"),
38565
+ children: state.state === "none" ? "--:--:--:---" : state.state === "stopped" ? displayMillis(state.positionMillis) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ActiveTimecodeText, {
38566
+ effectiveStartTimeMillis: state.effectiveStartTimeMillis,
38567
+ speed: state.speed
38568
+ })
38510
38569
  })
38511
38570
  });
38512
- $[38] = t15;
38513
- $[39] = t16;
38571
+ $[28] = disabled;
38572
+ $[29] = hooks?.pause;
38573
+ $[30] = hooks?.play;
38574
+ $[31] = state.effectiveStartTimeMillis;
38575
+ $[32] = state.positionMillis;
38576
+ $[33] = state.speed;
38577
+ $[34] = state.state;
38578
+ $[35] = t12;
38514
38579
  } else {
38515
- t16 = $[39];
38580
+ t12 = $[35];
38516
38581
  }
38517
- let t17;
38518
- if ($[40] !== t13 || $[41] !== t16 || $[42] !== toggle) {
38519
- t17 = /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SizeAwareDiv, {
38520
- className: t13,
38582
+ let t13;
38583
+ if ($[36] !== t12 || $[37] !== toggle) {
38584
+ t13 = /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SizeAwareDiv, {
38585
+ className: "relative min-h-timecode-min-height grow",
38521
38586
  onClick: toggle,
38522
- children: t16
38587
+ children: t12
38523
38588
  });
38524
- $[40] = t13;
38525
- $[41] = t16;
38526
- $[42] = toggle;
38527
- $[43] = t17;
38589
+ $[36] = t12;
38590
+ $[37] = toggle;
38591
+ $[38] = t13;
38528
38592
  } else {
38529
- t17 = $[43];
38593
+ t13 = $[38];
38530
38594
  }
38531
- let t18;
38532
- if ($[44] !== back5seconds || $[45] !== beginning || $[46] !== forward5seconds || $[47] !== hooks || $[48] !== pause || $[49] !== play || $[50] !== state.state) {
38533
- t18 = hooks?.pause || hooks?.play ? /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", {
38595
+ let t14;
38596
+ if ($[39] !== back5seconds || $[40] !== beginning || $[41] !== forward5seconds || $[42] !== hooks || $[43] !== pause || $[44] !== play || $[45] !== state.state) {
38597
+ t14 = hooks?.pause || hooks?.play ? /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", {
38534
38598
  className: "flex justify-center gap-px",
38535
38599
  children: [hooks.beginning && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ControlButton, {
38536
38600
  onClick: beginning,
@@ -38569,47 +38633,47 @@ Data Directory: ${system.dataDirectory}`
38569
38633
  className: "text-timecode-usage-foreground!"
38570
38634
  })]
38571
38635
  }) : null;
38572
- $[44] = back5seconds;
38573
- $[45] = beginning;
38574
- $[46] = forward5seconds;
38575
- $[47] = hooks;
38576
- $[48] = pause;
38577
- $[49] = play;
38578
- $[50] = state.state;
38579
- $[51] = t18;
38636
+ $[39] = back5seconds;
38637
+ $[40] = beginning;
38638
+ $[41] = forward5seconds;
38639
+ $[42] = hooks;
38640
+ $[43] = pause;
38641
+ $[44] = play;
38642
+ $[45] = state.state;
38643
+ $[46] = t14;
38580
38644
  } else {
38581
- t18 = $[51];
38645
+ t14 = $[46];
38582
38646
  }
38583
- let t19;
38584
- if ($[52] !== metadata || $[53] !== state) {
38585
- t19 = metadata?.totalTime && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Timeline2, {
38647
+ let t15;
38648
+ if ($[47] !== metadata || $[48] !== state) {
38649
+ t15 = metadata?.totalTime && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Timeline2, {
38586
38650
  state,
38587
38651
  totalTime: metadata.totalTime
38588
38652
  });
38589
- $[52] = metadata;
38590
- $[53] = state;
38591
- $[54] = t19;
38653
+ $[47] = metadata;
38654
+ $[48] = state;
38655
+ $[49] = t15;
38592
38656
  } else {
38593
- t19 = $[54];
38657
+ t15 = $[49];
38594
38658
  }
38595
- let t20;
38596
- if ($[55] !== t10 || $[56] !== t11 || $[57] !== t17 || $[58] !== t18 || $[59] !== t19) {
38597
- t20 = /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", {
38659
+ let t16;
38660
+ if ($[50] !== t10 || $[51] !== t11 || $[52] !== t13 || $[53] !== t14 || $[54] !== t15) {
38661
+ t16 = /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", {
38598
38662
  className: t10,
38599
- children: [t11, t17, t18, t19]
38663
+ children: [t11, t13, t14, t15]
38600
38664
  });
38601
- $[55] = t10;
38602
- $[56] = t11;
38603
- $[57] = t17;
38604
- $[58] = t18;
38605
- $[59] = t19;
38606
- $[60] = t20;
38665
+ $[50] = t10;
38666
+ $[51] = t11;
38667
+ $[52] = t13;
38668
+ $[53] = t14;
38669
+ $[54] = t15;
38670
+ $[55] = t16;
38607
38671
  } else {
38608
- t20 = $[60];
38672
+ t16 = $[55];
38609
38673
  }
38610
- let t21;
38611
- if ($[61] !== config || $[62] !== state.accuracyMillis || $[63] !== state.smpteMode) {
38612
- t21 = (state.smpteMode !== null || state.accuracyMillis !== null || config.delayMs !== null) && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", {
38674
+ let t17;
38675
+ if ($[56] !== config || $[57] !== state.accuracyMillis || $[58] !== state.smpteMode) {
38676
+ t17 = (state.smpteMode !== null || state.accuracyMillis !== null || config.delayMs !== null) && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", {
38613
38677
  className: "flex gap-px",
38614
38678
  children: [config.delayMs !== null && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", {
38615
38679
  className: "grow basis-0 truncate bg-sigil-bg-light p-0.5",
@@ -38622,16 +38686,16 @@ Data Directory: ${system.dataDirectory}`
38622
38686
  children: STRINGS.accuracy(state.accuracyMillis)
38623
38687
  })]
38624
38688
  });
38625
- $[61] = config;
38626
- $[62] = state.accuracyMillis;
38627
- $[63] = state.smpteMode;
38628
- $[64] = t21;
38689
+ $[56] = config;
38690
+ $[57] = state.accuracyMillis;
38691
+ $[58] = state.smpteMode;
38692
+ $[59] = t17;
38629
38693
  } else {
38630
- t21 = $[64];
38694
+ t17 = $[59];
38631
38695
  }
38632
- let t22;
38633
- if ($[65] !== metadata) {
38634
- t22 = metadata?.artist || metadata?.title ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(TooltipWrapper, {
38696
+ let t18;
38697
+ if ($[60] !== metadata) {
38698
+ t18 = metadata?.artist || metadata?.title ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(TooltipWrapper, {
38635
38699
  tooltip: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, {
38636
38700
  children: [metadata.title && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", {
38637
38701
  children: [/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", {
@@ -38656,25 +38720,77 @@ Data Directory: ${system.dataDirectory}`
38656
38720
  })]
38657
38721
  })
38658
38722
  }) : null;
38659
- $[65] = metadata;
38660
- $[66] = t22;
38723
+ $[60] = metadata;
38724
+ $[61] = t18;
38661
38725
  } else {
38662
- t22 = $[66];
38726
+ t18 = $[61];
38663
38727
  }
38664
- let t23;
38665
- if ($[67] !== t20 || $[68] !== t21 || $[69] !== t22) {
38666
- t23 = /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", {
38728
+ let t19;
38729
+ if ($[62] !== rootState.errors) {
38730
+ t19 = rootState.errors.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", {
38731
+ className: "flex gap-px",
38732
+ children: rootState.errors.map(_temp)
38733
+ });
38734
+ $[62] = rootState.errors;
38735
+ $[63] = t19;
38736
+ } else {
38737
+ t19 = $[63];
38738
+ }
38739
+ let t20;
38740
+ if ($[64] !== rootState.warnings) {
38741
+ t20 = rootState.warnings.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", {
38742
+ className: "flex gap-px",
38743
+ children: rootState.warnings.map(_temp2)
38744
+ });
38745
+ $[64] = rootState.warnings;
38746
+ $[65] = t20;
38747
+ } else {
38748
+ t20 = $[65];
38749
+ }
38750
+ let t21;
38751
+ if ($[66] !== t16 || $[67] !== t17 || $[68] !== t18 || $[69] !== t19 || $[70] !== t20) {
38752
+ t21 = /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", {
38667
38753
  className: "flex grow flex-col gap-px",
38668
- children: [t20, t21, t22]
38754
+ children: [t16, t17, t18, t19, t20]
38669
38755
  });
38670
- $[67] = t20;
38671
- $[68] = t21;
38672
- $[69] = t22;
38673
- $[70] = t23;
38756
+ $[66] = t16;
38757
+ $[67] = t17;
38758
+ $[68] = t18;
38759
+ $[69] = t19;
38760
+ $[70] = t20;
38761
+ $[71] = t21;
38674
38762
  } else {
38675
- t23 = $[70];
38763
+ t21 = $[71];
38764
+ }
38765
+ return t21;
38766
+ };
38767
+ var getLinkedSourceInfo = (link, config) => {
38768
+ if (!link) {
38769
+ return void 0;
38770
+ }
38771
+ let info = void 0;
38772
+ if (link[0] === "input") {
38773
+ const input = config.inputs?.[link[1]];
38774
+ if (input) {
38775
+ info = {
38776
+ color: input.color,
38777
+ type: STRINGS.protocols[input.definition.type].short,
38778
+ name: input.name ? [input.name] : [],
38779
+ namePlaceholder: STRINGS.inputs.unnamed
38780
+ };
38781
+ }
38782
+ } else if (link[0] === "generator") {
38783
+ const generator = config.generators?.[link[1]];
38784
+ if (generator) {
38785
+ info = {
38786
+ color: generator.color,
38787
+ type: STRINGS.generators.type[generator.definition.type],
38788
+ name: generator.name ? [generator.name] : [],
38789
+ namePlaceholder: STRINGS.generators.unnamed
38790
+ };
38791
+ }
38676
38792
  }
38677
- return t23;
38793
+ return info;
38678
38794
  };
38679
38795
  var EMPTY_TIMECODE = {
38680
38796
  name: null,
@@ -38694,8 +38810,10 @@ Data Directory: ${system.dataDirectory}`
38694
38810
  id,
38695
38811
  type,
38696
38812
  name,
38813
+ link,
38697
38814
  color,
38698
38815
  timecode,
38816
+ rootState,
38699
38817
  namePlaceholder,
38700
38818
  buttons,
38701
38819
  assignToOutput
@@ -38715,8 +38833,8 @@ Data Directory: ${system.dataDirectory}`
38715
38833
  });
38716
38834
  }
38717
38835
  }, [id, openNewWidow]);
38718
- name = timecode?.name ? [...name, timecode.name] : name;
38719
- if (isTimecodeGroup(timecode) && Object.values(timecode.timecodes).length) {
38836
+ name = timecode !== "disabled" && timecode?.name ? [...name, timecode.name] : name;
38837
+ if (timecode !== "disabled" && isTimecodeGroup(timecode) && Object.values(timecode.timecodes).length) {
38720
38838
  return Object.entries(timecode.timecodes).map(([key, child]) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(TimecodeTreeDisplay, {
38721
38839
  config,
38722
38840
  id: extendId(id, key),
@@ -38724,6 +38842,7 @@ Data Directory: ${system.dataDirectory}`
38724
38842
  name,
38725
38843
  color: timecode.color ?? color,
38726
38844
  timecode: child,
38845
+ rootState,
38727
38846
  namePlaceholder,
38728
38847
  buttons,
38729
38848
  assignToOutput
@@ -38734,18 +38853,47 @@ Data Directory: ${system.dataDirectory}`
38734
38853
  style: color && cssSigilColorUsageVariables("timecode-usage", sigilColorUsage(color)),
38735
38854
  children: [/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(TimecodeDisplay, {
38736
38855
  id,
38737
- timecode: isTimecodeInstance(timecode) ? timecode : EMPTY_TIMECODE,
38856
+ timecode: timecode !== "disabled" && isTimecodeInstance(timecode) ? timecode : EMPTY_TIMECODE,
38857
+ rootState,
38858
+ disabled: timecode === "disabled",
38738
38859
  config,
38739
38860
  headerComponents: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, {
38740
- children: [/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", {
38741
- className: "flex grow items-start gap-0.25",
38742
- children: [/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", {
38743
- className: " m-0.25 rounded-md border border-sigil-bg-light bg-timecode-usage-foreground px-1 py-0.25 text-sigil-control text-timecode-usage-text ",
38744
- children: type
38745
- }), /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", {
38746
- className: cn("grow basis-0 truncate p-0.5", cnd(name.length, "font-bold", "italic opacity-50")),
38747
- children: name.length ? name.join(" / ") : namePlaceholder
38748
- })]
38861
+ children: [/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", {
38862
+ className: "flex grow basis-0 items-start gap-0.25",
38863
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", {
38864
+ className: "grow",
38865
+ children: [/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", {
38866
+ className: "flex items-center gap-0.25",
38867
+ children: [/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", {
38868
+ className: " m-0.25 rounded-md border border-sigil-bg-light bg-timecode-usage-foreground px-1 py-0.25 text-sigil-control text-timecode-usage-text ",
38869
+ children: type
38870
+ }), /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", {
38871
+ className: cn("w-0 grow truncate p-0.5", cnd(name.length, "font-bold", "italic opacity-50")),
38872
+ children: name.length ? name.join(" / ") : namePlaceholder
38873
+ })]
38874
+ }), link && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", {
38875
+ className: " flex items-center gap-0.25 text-timecode-usage-foreground ",
38876
+ style: cssSigilColorUsageVariables(
38877
+ "timecode-usage",
38878
+ // Override timecode color with the user hint preferences
38879
+ // when no color is specified
38880
+ // as that will be what's used by the linked input/generator
38881
+ sigilColorUsage(link.color ?? "hint")
38882
+ ),
38883
+ children: [/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", {
38884
+ className: " m-0.25 flex items-center gap-0.25 rounded-md border border-sigil-bg-light bg-timecode-usage-foreground px-1 py-0.25 text-sigil-control text-timecode-usage-text ",
38885
+ children: [/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Icon2, {
38886
+ icon: "link",
38887
+ className: "text-[120%]"
38888
+ }), /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", {
38889
+ children: link.type
38890
+ })]
38891
+ }), /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", {
38892
+ className: cn("w-0 grow truncate p-0.5", cnd(link.name.length, "font-bold", "italic opacity-50")),
38893
+ children: link.name.length ? link.name.join(" / ") : link.namePlaceholder
38894
+ })]
38895
+ })]
38896
+ })
38749
38897
  }), /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(ControlButtonGroup, {
38750
38898
  className: "rounded-md bg-sigil-bg-light",
38751
38899
  children: [/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ControlButton, {
@@ -38767,7 +38915,7 @@ Data Directory: ${system.dataDirectory}`
38767
38915
  });
38768
38916
  };
38769
38917
  var FullscreenTimecodeDisplay = (t0) => {
38770
- const $ = (0, import_compiler_runtime7.c)(38);
38918
+ const $ = (0, import_compiler_runtime7.c)(64);
38771
38919
  const {
38772
38920
  id
38773
38921
  } = t0;
@@ -38789,7 +38937,7 @@ Data Directory: ${system.dataDirectory}`
38789
38937
  t1 = t22;
38790
38938
  } else {
38791
38939
  const c = config.outputs[id[1]];
38792
- if (!c) {
38940
+ if (!c || !c.enabled) {
38793
38941
  t1 = null;
38794
38942
  break bb0;
38795
38943
  }
@@ -38806,146 +38954,255 @@ Data Directory: ${system.dataDirectory}`
38806
38954
  }
38807
38955
  const timecode = t1;
38808
38956
  let t2;
38809
- bb1: if (isInputInstanceId(id)) {
38810
- const c_0 = config.inputs[id[1]];
38811
- if (!c_0) {
38812
- t2 = null;
38813
- break bb1;
38957
+ bb1: {
38958
+ if (isOutputInstanceId(id)) {
38959
+ const c_0 = config.outputs[id[1]];
38960
+ if (c_0?.link) {
38961
+ let t32;
38962
+ if ($[6] !== c_0.link || $[7] !== config) {
38963
+ t32 = getLinkedSourceInfo(c_0.link, config);
38964
+ $[6] = c_0.link;
38965
+ $[7] = config;
38966
+ $[8] = t32;
38967
+ } else {
38968
+ t32 = $[8];
38969
+ }
38970
+ t2 = t32;
38971
+ break bb1;
38972
+ }
38814
38973
  }
38815
- const t32 = c_0.delayMs ?? null;
38816
- let t4;
38817
- if ($[6] !== t32) {
38818
- t4 = {
38819
- delayMs: t32
38974
+ t2 = void 0;
38975
+ }
38976
+ const linkedSourceInfo = t2;
38977
+ let t3;
38978
+ bb2: if (isInputInstanceId(id)) {
38979
+ const c_1 = config.inputs[id[1]];
38980
+ if (!c_1) {
38981
+ t3 = null;
38982
+ break bb2;
38983
+ }
38984
+ const t42 = c_1.delayMs ?? null;
38985
+ let t52;
38986
+ if ($[9] !== t42) {
38987
+ t52 = {
38988
+ delayMs: t42
38820
38989
  };
38821
- $[6] = t32;
38822
- $[7] = t4;
38990
+ $[9] = t42;
38991
+ $[10] = t52;
38823
38992
  } else {
38824
- t4 = $[7];
38993
+ t52 = $[10];
38825
38994
  }
38826
- const t5 = STRINGS.protocols[c_0.definition.type];
38827
- let t6;
38828
- if ($[8] !== c_0.name) {
38829
- t6 = c_0.name ? [c_0.name] : [];
38830
- $[8] = c_0.name;
38831
- $[9] = t6;
38995
+ const t62 = STRINGS.protocols[c_1.definition.type];
38996
+ let t7;
38997
+ if ($[11] !== c_1.name) {
38998
+ t7 = c_1.name ? [c_1.name] : [];
38999
+ $[11] = c_1.name;
39000
+ $[12] = t7;
38832
39001
  } else {
38833
- t6 = $[9];
39002
+ t7 = $[12];
38834
39003
  }
38835
- let t7;
38836
- if ($[10] !== c_0.color || $[11] !== t4 || $[12] !== t5.short || $[13] !== t6) {
38837
- t7 = {
38838
- config: t4,
38839
- type: t5.short,
38840
- name: t6,
38841
- color: c_0.color,
38842
- namePlaceholder: `Unnamed Input`
39004
+ const t8 = !c_1.enabled;
39005
+ let t9;
39006
+ if ($[13] !== c_1.color || $[14] !== t52 || $[15] !== t62.short || $[16] !== t7 || $[17] !== t8) {
39007
+ t9 = {
39008
+ config: t52,
39009
+ type: t62.short,
39010
+ name: t7,
39011
+ color: c_1.color,
39012
+ namePlaceholder: STRINGS.inputs.unnamed,
39013
+ disabled: t8
38843
39014
  };
38844
- $[10] = c_0.color;
38845
- $[11] = t4;
38846
- $[12] = t5.short;
38847
- $[13] = t6;
38848
- $[14] = t7;
39015
+ $[13] = c_1.color;
39016
+ $[14] = t52;
39017
+ $[15] = t62.short;
39018
+ $[16] = t7;
39019
+ $[17] = t8;
39020
+ $[18] = t9;
38849
39021
  } else {
38850
- t7 = $[14];
39022
+ t9 = $[18];
38851
39023
  }
38852
- t2 = t7;
39024
+ t3 = t9;
38853
39025
  } else {
38854
39026
  if (isGeneratorInstanceId(id)) {
38855
- const c_1 = config.generators[id[1]];
38856
- if (!c_1) {
38857
- t2 = null;
38858
- break bb1;
39027
+ const c_2 = config.generators[id[1]];
39028
+ if (!c_2) {
39029
+ t3 = null;
39030
+ break bb2;
39031
+ }
39032
+ const t42 = c_2.delayMs ?? null;
39033
+ let t52;
39034
+ if ($[19] !== t42) {
39035
+ t52 = {
39036
+ delayMs: t42
39037
+ };
39038
+ $[19] = t42;
39039
+ $[20] = t52;
39040
+ } else {
39041
+ t52 = $[20];
38859
39042
  }
38860
- const t32 = c_1.delayMs ?? null;
38861
- let t4;
38862
- if ($[15] !== t32) {
38863
- t4 = {
38864
- delayMs: t32
39043
+ const t62 = STRINGS.generators.type[c_2.definition.type];
39044
+ let t7;
39045
+ if ($[21] !== c_2.name) {
39046
+ t7 = c_2.name ? [c_2.name] : [];
39047
+ $[21] = c_2.name;
39048
+ $[22] = t7;
39049
+ } else {
39050
+ t7 = $[22];
39051
+ }
39052
+ let t8;
39053
+ if ($[23] !== c_2.color || $[24] !== t52 || $[25] !== t62 || $[26] !== t7) {
39054
+ t8 = {
39055
+ config: t52,
39056
+ type: t62,
39057
+ name: t7,
39058
+ color: c_2.color,
39059
+ namePlaceholder: STRINGS.generators.unnamed,
39060
+ disabled: false
38865
39061
  };
38866
- $[15] = t32;
38867
- $[16] = t4;
39062
+ $[23] = c_2.color;
39063
+ $[24] = t52;
39064
+ $[25] = t62;
39065
+ $[26] = t7;
39066
+ $[27] = t8;
38868
39067
  } else {
38869
- t4 = $[16];
38870
- }
38871
- const t5 = STRINGS.generators.type[c_1.definition.type];
38872
- let t6;
38873
- if ($[17] !== c_1.name) {
38874
- t6 = c_1.name ? [c_1.name] : [];
38875
- $[17] = c_1.name;
38876
- $[18] = t6;
39068
+ t8 = $[27];
39069
+ }
39070
+ t3 = t8;
39071
+ } else {
39072
+ const c_3 = config.outputs[id[1]];
39073
+ if (!c_3) {
39074
+ t3 = null;
39075
+ break bb2;
39076
+ }
39077
+ const t42 = c_3.delayMs ?? null;
39078
+ let t52;
39079
+ if ($[28] !== t42) {
39080
+ t52 = {
39081
+ delayMs: t42
39082
+ };
39083
+ $[28] = t42;
39084
+ $[29] = t52;
38877
39085
  } else {
38878
- t6 = $[18];
39086
+ t52 = $[29];
38879
39087
  }
39088
+ const t62 = STRINGS.protocols[c_3.definition.type];
38880
39089
  let t7;
38881
- if ($[19] !== c_1.color || $[20] !== t4 || $[21] !== t5 || $[22] !== t6) {
38882
- t7 = {
38883
- config: t4,
38884
- type: t5,
38885
- name: t6,
38886
- color: c_1.color,
38887
- namePlaceholder: `Unnamed Generator`
39090
+ if ($[30] !== c_3.name) {
39091
+ t7 = c_3.name ? [c_3.name] : [];
39092
+ $[30] = c_3.name;
39093
+ $[31] = t7;
39094
+ } else {
39095
+ t7 = $[31];
39096
+ }
39097
+ const t8 = !c_3.enabled;
39098
+ let t9;
39099
+ if ($[32] !== c_3.color || $[33] !== t52 || $[34] !== t62.short || $[35] !== t7 || $[36] !== t8) {
39100
+ t9 = {
39101
+ config: t52,
39102
+ type: t62.short,
39103
+ name: t7,
39104
+ color: c_3.color,
39105
+ namePlaceholder: STRINGS.outputs.unnamed,
39106
+ disabled: t8
38888
39107
  };
38889
- $[19] = c_1.color;
38890
- $[20] = t4;
38891
- $[21] = t5;
38892
- $[22] = t6;
38893
- $[23] = t7;
39108
+ $[32] = c_3.color;
39109
+ $[33] = t52;
39110
+ $[34] = t62.short;
39111
+ $[35] = t7;
39112
+ $[36] = t8;
39113
+ $[37] = t9;
38894
39114
  } else {
38895
- t7 = $[23];
39115
+ t9 = $[37];
38896
39116
  }
38897
- t2 = t7;
39117
+ t3 = t9;
39118
+ }
39119
+ }
39120
+ const instanceConfig = t3;
39121
+ let t4;
39122
+ if (isInputInstanceId(id)) {
39123
+ let t52;
39124
+ if ($[38] !== applicationState.inputs || $[39] !== id[1]) {
39125
+ t52 = applicationState.inputs?.[id[1]]?.errors ?? [];
39126
+ $[38] = applicationState.inputs;
39127
+ $[39] = id[1];
39128
+ $[40] = t52;
38898
39129
  } else {
38899
- const c_2 = config.outputs[id[1]];
38900
- if (!c_2) {
38901
- t2 = null;
38902
- break bb1;
38903
- }
38904
- const t32 = c_2.delayMs ?? null;
38905
- let t4;
38906
- if ($[24] !== t32) {
38907
- t4 = {
38908
- delayMs: t32
39130
+ t52 = $[40];
39131
+ }
39132
+ let t62;
39133
+ if ($[41] !== applicationState.inputs || $[42] !== id[1]) {
39134
+ t62 = applicationState.inputs?.[id[1]]?.warnings ?? [];
39135
+ $[41] = applicationState.inputs;
39136
+ $[42] = id[1];
39137
+ $[43] = t62;
39138
+ } else {
39139
+ t62 = $[43];
39140
+ }
39141
+ let t7;
39142
+ if ($[44] !== t52 || $[45] !== t62) {
39143
+ t7 = {
39144
+ errors: t52,
39145
+ warnings: t62
39146
+ };
39147
+ $[44] = t52;
39148
+ $[45] = t62;
39149
+ $[46] = t7;
39150
+ } else {
39151
+ t7 = $[46];
39152
+ }
39153
+ t4 = t7;
39154
+ } else {
39155
+ if (isGeneratorInstanceId(id)) {
39156
+ let t52;
39157
+ if ($[47] === Symbol.for("react.memo_cache_sentinel")) {
39158
+ t52 = {
39159
+ errors: [],
39160
+ warnings: []
38909
39161
  };
38910
- $[24] = t32;
38911
- $[25] = t4;
39162
+ $[47] = t52;
39163
+ } else {
39164
+ t52 = $[47];
39165
+ }
39166
+ t4 = t52;
39167
+ } else {
39168
+ let t52;
39169
+ if ($[48] !== applicationState.outputs || $[49] !== id[1]) {
39170
+ t52 = applicationState.outputs?.[id[1]]?.errors ?? [];
39171
+ $[48] = applicationState.outputs;
39172
+ $[49] = id[1];
39173
+ $[50] = t52;
38912
39174
  } else {
38913
- t4 = $[25];
38914
- }
38915
- const t5 = STRINGS.protocols[c_2.definition.type];
38916
- let t6;
38917
- if ($[26] !== c_2.name) {
38918
- t6 = c_2.name ? [c_2.name] : [];
38919
- $[26] = c_2.name;
38920
- $[27] = t6;
39175
+ t52 = $[50];
39176
+ }
39177
+ let t62;
39178
+ if ($[51] !== applicationState.outputs || $[52] !== id[1]) {
39179
+ t62 = applicationState.outputs?.[id[1]]?.warnings ?? [];
39180
+ $[51] = applicationState.outputs;
39181
+ $[52] = id[1];
39182
+ $[53] = t62;
38921
39183
  } else {
38922
- t6 = $[27];
39184
+ t62 = $[53];
38923
39185
  }
38924
39186
  let t7;
38925
- if ($[28] !== c_2.color || $[29] !== t4 || $[30] !== t5.short || $[31] !== t6) {
39187
+ if ($[54] !== t52 || $[55] !== t62) {
38926
39188
  t7 = {
38927
- config: t4,
38928
- type: t5.short,
38929
- name: t6,
38930
- color: c_2.color,
38931
- namePlaceholder: `Unnamed Output`
39189
+ errors: t52,
39190
+ warnings: t62
38932
39191
  };
38933
- $[28] = c_2.color;
38934
- $[29] = t4;
38935
- $[30] = t5.short;
38936
- $[31] = t6;
38937
- $[32] = t7;
39192
+ $[54] = t52;
39193
+ $[55] = t62;
39194
+ $[56] = t7;
38938
39195
  } else {
38939
- t7 = $[32];
39196
+ t7 = $[56];
38940
39197
  }
38941
- t2 = t7;
39198
+ t4 = t7;
38942
39199
  }
38943
39200
  }
38944
- const instanceConfig = t2;
39201
+ const rootState = t4;
38945
39202
  if (!instanceConfig) {
38946
- let t32;
38947
- if ($[33] === Symbol.for("react.memo_cache_sentinel")) {
38948
- t32 = /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(SizeAwareDiv, {
39203
+ let t52;
39204
+ if ($[57] === Symbol.for("react.memo_cache_sentinel")) {
39205
+ t52 = /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(SizeAwareDiv, {
38949
39206
  className: "\n flex grow flex-col items-center justify-center gap-1 bg-sigil-bg-light\n p-1 text-sigil-foreground-muted\n ",
38950
39207
  children: [/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Icon2, {
38951
39208
  icon: "question_mark",
@@ -38955,33 +39212,50 @@ Data Directory: ${system.dataDirectory}`
38955
39212
  children: STRINGS.errors.unknownTimecodeID
38956
39213
  })]
38957
39214
  });
38958
- $[33] = t32;
39215
+ $[57] = t52;
38959
39216
  } else {
38960
- t32 = $[33];
39217
+ t52 = $[57];
38961
39218
  }
38962
- return t32;
39219
+ return t52;
38963
39220
  }
38964
- let t3;
38965
- if ($[34] !== id || $[35] !== instanceConfig || $[36] !== timecode) {
38966
- t3 = /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", {
39221
+ const t5 = instanceConfig.disabled ? "disabled" : timecode;
39222
+ let t6;
39223
+ if ($[58] !== id || $[59] !== instanceConfig || $[60] !== linkedSourceInfo || $[61] !== rootState || $[62] !== t5) {
39224
+ t6 = /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", {
38967
39225
  className: "\n flex h-0 grow flex-col gap-px overflow-y-auto bg-sigil-border\n scrollbar-sigil\n ",
38968
39226
  children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(TimecodeTreeDisplay, {
38969
39227
  id,
38970
- timecode,
39228
+ timecode: t5,
39229
+ rootState,
38971
39230
  assignToOutput: null,
38972
39231
  buttons: null,
39232
+ link: linkedSourceInfo,
38973
39233
  ...instanceConfig
38974
39234
  })
38975
39235
  });
38976
- $[34] = id;
38977
- $[35] = instanceConfig;
38978
- $[36] = timecode;
38979
- $[37] = t3;
39236
+ $[58] = id;
39237
+ $[59] = instanceConfig;
39238
+ $[60] = linkedSourceInfo;
39239
+ $[61] = rootState;
39240
+ $[62] = t5;
39241
+ $[63] = t6;
38980
39242
  } else {
38981
- t3 = $[37];
39243
+ t6 = $[63];
38982
39244
  }
38983
- return t3;
39245
+ return t6;
38984
39246
  };
39247
+ function _temp(error, index2) {
39248
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", {
39249
+ className: "\n grow truncate bg-sigil-usage-red-background p-0.5\n text-sigil-usage-red-text\n ",
39250
+ children: error
39251
+ }, index2);
39252
+ }
39253
+ function _temp2(warning, index_0) {
39254
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", {
39255
+ className: "\n grow truncate bg-sigil-usage-orange-background p-0.5\n text-sigil-usage-orange-text\n ",
39256
+ children: warning
39257
+ }, index_0);
39258
+ }
38985
39259
 
38986
39260
  // ../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/stringify.js
38987
39261
  var byteToHex = [];
@@ -39248,7 +39522,7 @@ Data Directory: ${system.dataDirectory}`
39248
39522
  })
39249
39523
  }), /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ControlSelect, {
39250
39524
  value: data.target.interface ?? null,
39251
- options: !interfaces ? [] : Object.values(interfaces).map(_temp),
39525
+ options: !interfaces ? [] : Object.values(interfaces).map(_temp3),
39252
39526
  placeholder: "No Interface Selected",
39253
39527
  onChange: (value) => {
39254
39528
  updateSettings((current_0) => ({
@@ -39359,7 +39633,7 @@ Data Directory: ${system.dataDirectory}`
39359
39633
  const t14 = data.mode;
39360
39634
  let t15;
39361
39635
  if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
39362
- t15 = Object.entries(STRINGS.smtpeModeOptions).map(_temp2);
39636
+ t15 = Object.entries(STRINGS.smtpeModeOptions).map(_temp22);
39363
39637
  $[29] = t15;
39364
39638
  } else {
39365
39639
  t15 = $[29];
@@ -39411,7 +39685,7 @@ Data Directory: ${system.dataDirectory}`
39411
39685
  var OutputSettingsDialog = ({
39412
39686
  target,
39413
39687
  output,
39414
- close
39688
+ setDialogMode
39415
39689
  }) => {
39416
39690
  const {
39417
39691
  config,
@@ -39430,6 +39704,7 @@ Data Directory: ${system.dataDirectory}`
39430
39704
  },
39431
39705
  link: null
39432
39706
  });
39707
+ const close = (0, import_react33.useCallback)(() => setDialogMode(null), [setDialogMode]);
39433
39708
  const updateSettings = (0, import_react33.useCallback)((change) => {
39434
39709
  if (target.type === "add") {
39435
39710
  setNewData(change);
@@ -39537,7 +39812,7 @@ Data Directory: ${system.dataDirectory}`
39537
39812
  commitChanges();
39538
39813
  }
39539
39814
  }
39540
- }), resolvedTarget === "add" ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(ControlDialogButtons, {
39815
+ }), target.type === "add" ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(ControlDialogButtons, {
39541
39816
  children: [/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ControlButton, {
39542
39817
  onClick: close,
39543
39818
  variant: "large",
@@ -39547,18 +39822,33 @@ Data Directory: ${system.dataDirectory}`
39547
39822
  variant: "large",
39548
39823
  children: "Add Output"
39549
39824
  })]
39550
- }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ControlDialogButtons, {
39551
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ControlButton, {
39825
+ }) : target.type === "edit" ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(ControlDialogButtons, {
39826
+ children: [/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ControlButton, {
39827
+ onClick: () => setDialogMode({
39828
+ section: {
39829
+ type: "outputs",
39830
+ output
39831
+ },
39832
+ target: {
39833
+ type: "delete",
39834
+ uuid: target.uuid
39835
+ }
39836
+ }),
39837
+ variant: "large",
39838
+ destructive: true,
39839
+ icon: "delete",
39840
+ children: "Delete"
39841
+ }), /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ControlButton, {
39552
39842
  onClick: close,
39553
39843
  variant: "large",
39554
39844
  children: "Close"
39555
- })
39556
- })]
39845
+ })]
39846
+ }) : null]
39557
39847
  })
39558
39848
  });
39559
39849
  };
39560
39850
  var OutputDisplay = (t0) => {
39561
- const $ = (0, import_compiler_runtime9.c)(57);
39851
+ const $ = (0, import_compiler_runtime9.c)(71);
39562
39852
  const {
39563
39853
  uuid,
39564
39854
  config,
@@ -39568,6 +39858,7 @@ Data Directory: ${system.dataDirectory}`
39568
39858
  } = t0;
39569
39859
  const applicationState = useApplicationState();
39570
39860
  const {
39861
+ config: allConfig,
39571
39862
  updateConfig
39572
39863
  } = (0, import_react33.useContext)(ConfigContext);
39573
39864
  let t1;
@@ -39632,8 +39923,20 @@ Data Directory: ${system.dataDirectory}`
39632
39923
  t3 = t5;
39633
39924
  const timecode = t3;
39634
39925
  let t6;
39635
- if ($[13] !== updateConfig || $[14] !== uuid) {
39636
- t6 = () => {
39926
+ let t7;
39927
+ if ($[13] !== allConfig || $[14] !== config.link) {
39928
+ t7 = getLinkedSourceInfo(config.link, allConfig);
39929
+ $[13] = allConfig;
39930
+ $[14] = config.link;
39931
+ $[15] = t7;
39932
+ } else {
39933
+ t7 = $[15];
39934
+ }
39935
+ t6 = t7;
39936
+ const link = t6;
39937
+ let t8;
39938
+ if ($[16] !== updateConfig || $[17] !== uuid) {
39939
+ t8 = () => {
39637
39940
  updateConfig((current_1) => {
39638
39941
  const existing = current_1.outputs?.[uuid];
39639
39942
  if (!existing) {
@@ -39651,90 +39954,123 @@ Data Directory: ${system.dataDirectory}`
39651
39954
  };
39652
39955
  });
39653
39956
  };
39654
- $[13] = updateConfig;
39655
- $[14] = uuid;
39656
- $[15] = t6;
39957
+ $[16] = updateConfig;
39958
+ $[17] = uuid;
39959
+ $[18] = t8;
39657
39960
  } else {
39658
- t6 = $[15];
39961
+ t8 = $[18];
39659
39962
  }
39660
- const toggleEnabled = t6;
39661
- let t7;
39662
- if ($[16] !== config.color) {
39663
- t7 = config.color && cssSigilColorUsageVariables("timecode-usage", sigilColorUsage(config.color));
39664
- $[16] = config.color;
39665
- $[17] = t7;
39963
+ const toggleEnabled = t8;
39964
+ let t9;
39965
+ let t10;
39966
+ if ($[19] !== applicationState.outputs || $[20] !== uuid) {
39967
+ t10 = applicationState.outputs[uuid]?.errors ?? [];
39968
+ $[19] = applicationState.outputs;
39969
+ $[20] = uuid;
39970
+ $[21] = t10;
39666
39971
  } else {
39667
- t7 = $[17];
39972
+ t10 = $[21];
39668
39973
  }
39669
- let t8;
39670
- if ($[18] !== uuid) {
39671
- t8 = ["output", uuid];
39672
- $[18] = uuid;
39673
- $[19] = t8;
39974
+ let t11;
39975
+ if ($[22] !== applicationState.outputs || $[23] !== uuid) {
39976
+ t11 = applicationState.outputs[uuid]?.warnings ?? [];
39977
+ $[22] = applicationState.outputs;
39978
+ $[23] = uuid;
39979
+ $[24] = t11;
39674
39980
  } else {
39675
- t8 = $[19];
39981
+ t11 = $[24];
39676
39982
  }
39677
- const t9 = config.delayMs ?? null;
39678
- let t10;
39679
- if ($[20] !== t9) {
39680
- t10 = {
39681
- delayMs: t9
39983
+ let t12;
39984
+ if ($[25] !== t10 || $[26] !== t11) {
39985
+ t12 = {
39986
+ errors: t10,
39987
+ warnings: t11
39682
39988
  };
39683
- $[20] = t9;
39684
- $[21] = t10;
39989
+ $[25] = t10;
39990
+ $[26] = t11;
39991
+ $[27] = t12;
39685
39992
  } else {
39686
- t10 = $[21];
39993
+ t12 = $[27];
39687
39994
  }
39688
- const t11 = STRINGS.protocols[config.definition.type];
39689
- let t12;
39690
- if ($[22] !== config.name) {
39691
- t12 = config.name ? [config.name] : [];
39692
- $[22] = config.name;
39693
- $[23] = t12;
39995
+ t9 = t12;
39996
+ const rootState = t9;
39997
+ let t13;
39998
+ if ($[28] !== config.color) {
39999
+ t13 = config.color && cssSigilColorUsageVariables("timecode-usage", sigilColorUsage(config.color));
40000
+ $[28] = config.color;
40001
+ $[29] = t13;
39694
40002
  } else {
39695
- t12 = $[23];
40003
+ t13 = $[29];
39696
40004
  }
39697
- const t13 = config.enabled ? timecode : null;
39698
- const t14 = config.enabled ? "Stop Input" : "Start Input";
39699
- const t15 = config.enabled ? "stop" : "play_arrow";
40005
+ let t14;
40006
+ if ($[30] !== uuid) {
40007
+ t14 = ["output", uuid];
40008
+ $[30] = uuid;
40009
+ $[31] = t14;
40010
+ } else {
40011
+ t14 = $[31];
40012
+ }
40013
+ const t15 = config.delayMs ?? null;
39700
40014
  let t16;
39701
- if ($[24] !== t14 || $[25] !== t15 || $[26] !== toggleEnabled) {
39702
- t16 = /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ControlButton, {
40015
+ if ($[32] !== t15) {
40016
+ t16 = {
40017
+ delayMs: t15
40018
+ };
40019
+ $[32] = t15;
40020
+ $[33] = t16;
40021
+ } else {
40022
+ t16 = $[33];
40023
+ }
40024
+ const t17 = STRINGS.protocols[config.definition.type];
40025
+ let t18;
40026
+ if ($[34] !== config.name) {
40027
+ t18 = config.name ? [config.name] : [];
40028
+ $[34] = config.name;
40029
+ $[35] = t18;
40030
+ } else {
40031
+ t18 = $[35];
40032
+ }
40033
+ const t19 = config.enabled ? timecode : "disabled";
40034
+ const t20 = config.enabled ? STRINGS.outputs.disable : STRINGS.outputs.enable;
40035
+ const t21 = config.enabled ? "pause" : "play_arrow";
40036
+ let t22;
40037
+ if ($[36] !== t20 || $[37] !== t21 || $[38] !== toggleEnabled) {
40038
+ t22 = /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ControlButton, {
39703
40039
  variant: "large",
39704
- title: t14,
40040
+ title: t20,
39705
40041
  onClick: toggleEnabled,
39706
- icon: t15
40042
+ icon: t21
39707
40043
  });
39708
- $[24] = t14;
39709
- $[25] = t15;
39710
- $[26] = toggleEnabled;
39711
- $[27] = t16;
40044
+ $[36] = t20;
40045
+ $[37] = t21;
40046
+ $[38] = toggleEnabled;
40047
+ $[39] = t22;
39712
40048
  } else {
39713
- t16 = $[27];
40049
+ t22 = $[39];
39714
40050
  }
39715
- const t17 = assignToOutput === uuid;
39716
- const t18 = config.link ? "link" : "link_off";
39717
- let t19;
39718
- if ($[28] !== linkCallback || $[29] !== t17 || $[30] !== t18) {
39719
- t19 = /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ControlButton, {
40051
+ const t23 = assignToOutput === uuid;
40052
+ const t24 = config.link ? "link" : "link_off";
40053
+ let t25;
40054
+ if ($[40] !== linkCallback || $[41] !== t23 || $[42] !== t24) {
40055
+ t25 = /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ControlButton, {
39720
40056
  variant: "large",
39721
- title: "Link Output",
39722
- active: t17,
40057
+ title: STRINGS.outputs.link,
40058
+ active: t23,
39723
40059
  onClick: linkCallback,
39724
- icon: t18
40060
+ icon: t24
39725
40061
  });
39726
- $[28] = linkCallback;
39727
- $[29] = t17;
39728
- $[30] = t18;
39729
- $[31] = t19;
40062
+ $[40] = linkCallback;
40063
+ $[41] = t23;
40064
+ $[42] = t24;
40065
+ $[43] = t25;
39730
40066
  } else {
39731
- t19 = $[31];
40067
+ t25 = $[43];
39732
40068
  }
39733
- let t20;
39734
- if ($[32] !== config.definition.type || $[33] !== setDialogMode || $[34] !== uuid) {
39735
- t20 = /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ControlButton, {
40069
+ let t26;
40070
+ if ($[44] !== config.definition.type || $[45] !== setDialogMode || $[46] !== uuid) {
40071
+ t26 = /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ControlButton, {
39736
40072
  variant: "large",
39737
- title: "Edit Output",
40073
+ title: STRINGS.outputs.edit,
39738
40074
  onClick: () => setDialogMode({
39739
40075
  section: {
39740
40076
  type: "outputs",
@@ -39747,52 +40083,56 @@ Data Directory: ${system.dataDirectory}`
39747
40083
  }),
39748
40084
  icon: "edit"
39749
40085
  });
39750
- $[32] = config.definition.type;
39751
- $[33] = setDialogMode;
39752
- $[34] = uuid;
39753
- $[35] = t20;
40086
+ $[44] = config.definition.type;
40087
+ $[45] = setDialogMode;
40088
+ $[46] = uuid;
40089
+ $[47] = t26;
39754
40090
  } else {
39755
- t20 = $[35];
40091
+ t26 = $[47];
39756
40092
  }
39757
- let t21;
39758
- if ($[36] !== t16 || $[37] !== t19 || $[38] !== t20) {
39759
- t21 = /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, {
39760
- children: [t16, t19, t20]
40093
+ let t27;
40094
+ if ($[48] !== t22 || $[49] !== t25 || $[50] !== t26) {
40095
+ t27 = /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, {
40096
+ children: [t22, t25, t26]
39761
40097
  });
39762
- $[36] = t16;
39763
- $[37] = t19;
39764
- $[38] = t20;
39765
- $[39] = t21;
40098
+ $[48] = t22;
40099
+ $[49] = t25;
40100
+ $[50] = t26;
40101
+ $[51] = t27;
39766
40102
  } else {
39767
- t21 = $[39];
40103
+ t27 = $[51];
39768
40104
  }
39769
- let t22;
39770
- if ($[40] !== config.color || $[41] !== t10 || $[42] !== t11.short || $[43] !== t12 || $[44] !== t13 || $[45] !== t21 || $[46] !== t8) {
39771
- t22 = /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TimecodeTreeDisplay, {
39772
- id: t8,
39773
- config: t10,
40105
+ let t28;
40106
+ if ($[52] !== config.color || $[53] !== link || $[54] !== rootState || $[55] !== t14 || $[56] !== t16 || $[57] !== t17.short || $[58] !== t18 || $[59] !== t19 || $[60] !== t27) {
40107
+ t28 = /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TimecodeTreeDisplay, {
40108
+ id: t14,
40109
+ config: t16,
39774
40110
  assignToOutput: null,
39775
- type: t11.short,
39776
- name: t12,
40111
+ type: t17.short,
40112
+ name: t18,
39777
40113
  color: config.color,
39778
- timecode: t13,
39779
- namePlaceholder: `Unnamed Output`,
39780
- buttons: t21
40114
+ timecode: t19,
40115
+ rootState,
40116
+ namePlaceholder: STRINGS.outputs.unnamed,
40117
+ link,
40118
+ buttons: t27
39781
40119
  });
39782
- $[40] = config.color;
39783
- $[41] = t10;
39784
- $[42] = t11.short;
39785
- $[43] = t12;
39786
- $[44] = t13;
39787
- $[45] = t21;
39788
- $[46] = t8;
39789
- $[47] = t22;
40120
+ $[52] = config.color;
40121
+ $[53] = link;
40122
+ $[54] = rootState;
40123
+ $[55] = t14;
40124
+ $[56] = t16;
40125
+ $[57] = t17.short;
40126
+ $[58] = t18;
40127
+ $[59] = t19;
40128
+ $[60] = t27;
40129
+ $[61] = t28;
39790
40130
  } else {
39791
- t22 = $[47];
40131
+ t28 = $[61];
39792
40132
  }
39793
- let t23;
39794
- if ($[48] !== assignToOutput || $[49] !== clearLink || $[50] !== config.link || $[51] !== uuid) {
39795
- t23 = assignToOutput === uuid && config.link && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(SizeAwareDiv, {
40133
+ let t29;
40134
+ if ($[62] !== assignToOutput || $[63] !== clearLink || $[64] !== config.link || $[65] !== uuid) {
40135
+ t29 = assignToOutput === uuid && config.link && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(SizeAwareDiv, {
39796
40136
  className: "absolute inset-0",
39797
40137
  onClick: clearLink,
39798
40138
  children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TooltipWrapper, {
@@ -39808,29 +40148,29 @@ Data Directory: ${system.dataDirectory}`
39808
40148
  })
39809
40149
  })
39810
40150
  });
39811
- $[48] = assignToOutput;
39812
- $[49] = clearLink;
39813
- $[50] = config.link;
39814
- $[51] = uuid;
39815
- $[52] = t23;
40151
+ $[62] = assignToOutput;
40152
+ $[63] = clearLink;
40153
+ $[64] = config.link;
40154
+ $[65] = uuid;
40155
+ $[66] = t29;
39816
40156
  } else {
39817
- t23 = $[52];
40157
+ t29 = $[66];
39818
40158
  }
39819
- let t24;
39820
- if ($[53] !== t22 || $[54] !== t23 || $[55] !== t7) {
39821
- t24 = /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", {
40159
+ let t30;
40160
+ if ($[67] !== t13 || $[68] !== t28 || $[69] !== t29) {
40161
+ t30 = /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", {
39822
40162
  className: "relative flex flex-col",
39823
- style: t7,
39824
- children: [t22, t23]
40163
+ style: t13,
40164
+ children: [t28, t29]
39825
40165
  });
39826
- $[53] = t22;
39827
- $[54] = t23;
39828
- $[55] = t7;
39829
- $[56] = t24;
40166
+ $[67] = t13;
40167
+ $[68] = t28;
40168
+ $[69] = t29;
40169
+ $[70] = t30;
39830
40170
  } else {
39831
- t24 = $[56];
40171
+ t30 = $[70];
39832
40172
  }
39833
- return t24;
40173
+ return t30;
39834
40174
  };
39835
40175
  var OutputsSection = (t0) => {
39836
40176
  const $ = (0, import_compiler_runtime9.c)(11);
@@ -39912,13 +40252,13 @@ Data Directory: ${system.dataDirectory}`
39912
40252
  }
39913
40253
  return t4;
39914
40254
  };
39915
- function _temp(iface) {
40255
+ function _temp3(iface) {
39916
40256
  return {
39917
40257
  label: `${iface.name} (${iface.address})`,
39918
40258
  value: iface.name
39919
40259
  };
39920
40260
  }
39921
- function _temp2(t0) {
40261
+ function _temp22(t0) {
39922
40262
  const [mode, label] = t0;
39923
40263
  return {
39924
40264
  label,
@@ -40002,7 +40342,7 @@ Data Directory: ${system.dataDirectory}`
40002
40342
  var GeneratorSettingsDialog = ({
40003
40343
  target,
40004
40344
  generator,
40005
- close
40345
+ setDialogMode
40006
40346
  }) => {
40007
40347
  const {
40008
40348
  config,
@@ -40015,6 +40355,7 @@ Data Directory: ${system.dataDirectory}`
40015
40355
  speed: 1
40016
40356
  }
40017
40357
  });
40358
+ const close = (0, import_react34.useCallback)(() => setDialogMode(null), [setDialogMode]);
40018
40359
  const updateSettings = (0, import_react34.useCallback)((change) => {
40019
40360
  if (target.type === "add") {
40020
40361
  setNewData(change);
@@ -40102,7 +40443,7 @@ Data Directory: ${system.dataDirectory}`
40102
40443
  }), data.definition.type === "clock" ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ClockSpecificSettings, {
40103
40444
  data: data.definition,
40104
40445
  updateSettings: updateDefinition
40105
- }) : null, resolvedTarget === "add" ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(ControlDialogButtons, {
40446
+ }) : null, target.type === "add" ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(ControlDialogButtons, {
40106
40447
  children: [/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ControlButton, {
40107
40448
  onClick: close,
40108
40449
  variant: "large",
@@ -40112,18 +40453,33 @@ Data Directory: ${system.dataDirectory}`
40112
40453
  variant: "large",
40113
40454
  children: "Add Generator"
40114
40455
  })]
40115
- }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ControlDialogButtons, {
40116
- children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ControlButton, {
40456
+ }) : target.type === "edit" ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(ControlDialogButtons, {
40457
+ children: [/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ControlButton, {
40458
+ onClick: () => setDialogMode({
40459
+ section: {
40460
+ type: "generators",
40461
+ generator
40462
+ },
40463
+ target: {
40464
+ type: "delete",
40465
+ uuid: target.uuid
40466
+ }
40467
+ }),
40468
+ variant: "large",
40469
+ destructive: true,
40470
+ icon: "delete",
40471
+ children: "Delete"
40472
+ }), /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ControlButton, {
40117
40473
  onClick: close,
40118
40474
  variant: "large",
40119
40475
  children: "Close"
40120
- })
40121
- })]
40476
+ })]
40477
+ }) : null]
40122
40478
  })
40123
40479
  });
40124
40480
  };
40125
40481
  var GeneratorDisplay = (t0) => {
40126
- const $ = (0, import_compiler_runtime10.c)(19);
40482
+ const $ = (0, import_compiler_runtime10.c)(20);
40127
40483
  const {
40128
40484
  uuid,
40129
40485
  config,
@@ -40135,40 +40491,53 @@ Data Directory: ${system.dataDirectory}`
40135
40491
  } = useApplicationState();
40136
40492
  const state = generators[uuid];
40137
40493
  let t1;
40138
- if ($[0] !== uuid) {
40139
- t1 = ["generator", uuid];
40140
- $[0] = uuid;
40141
- $[1] = t1;
40494
+ let t2;
40495
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
40496
+ t2 = {
40497
+ errors: [],
40498
+ warnings: []
40499
+ };
40500
+ $[0] = t2;
40142
40501
  } else {
40143
- t1 = $[1];
40502
+ t2 = $[0];
40144
40503
  }
40145
- const t2 = config.delayMs ?? null;
40504
+ t1 = t2;
40505
+ const rootState = t1;
40146
40506
  let t3;
40147
- if ($[2] !== t2) {
40148
- t3 = {
40149
- delayMs: t2
40150
- };
40151
- $[2] = t2;
40152
- $[3] = t3;
40507
+ if ($[1] !== uuid) {
40508
+ t3 = ["generator", uuid];
40509
+ $[1] = uuid;
40510
+ $[2] = t3;
40153
40511
  } else {
40154
- t3 = $[3];
40512
+ t3 = $[2];
40155
40513
  }
40156
- const t4 = STRINGS.generators.type[config.definition.type];
40514
+ const t4 = config.delayMs ?? null;
40157
40515
  let t5;
40158
- if ($[4] !== config.name) {
40159
- t5 = config.name ? [config.name] : [];
40160
- $[4] = config.name;
40161
- $[5] = t5;
40516
+ if ($[3] !== t4) {
40517
+ t5 = {
40518
+ delayMs: t4
40519
+ };
40520
+ $[3] = t4;
40521
+ $[4] = t5;
40162
40522
  } else {
40163
- t5 = $[5];
40523
+ t5 = $[4];
40164
40524
  }
40165
- const t6 = state?.timecode ?? null;
40525
+ const t6 = STRINGS.generators.type[config.definition.type];
40166
40526
  let t7;
40167
- if ($[6] !== config.definition.type || $[7] !== setDialogMode || $[8] !== uuid) {
40168
- t7 = /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_jsx_runtime46.Fragment, {
40527
+ if ($[5] !== config.name) {
40528
+ t7 = config.name ? [config.name] : [];
40529
+ $[5] = config.name;
40530
+ $[6] = t7;
40531
+ } else {
40532
+ t7 = $[6];
40533
+ }
40534
+ const t8 = state?.timecode ?? null;
40535
+ let t9;
40536
+ if ($[7] !== config.definition.type || $[8] !== setDialogMode || $[9] !== uuid) {
40537
+ t9 = /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_jsx_runtime46.Fragment, {
40169
40538
  children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ControlButton, {
40170
40539
  variant: "large",
40171
- title: "Edit Generator",
40540
+ title: STRINGS.generators.edit,
40172
40541
  onClick: () => setDialogMode({
40173
40542
  section: {
40174
40543
  type: "generators",
@@ -40182,39 +40551,40 @@ Data Directory: ${system.dataDirectory}`
40182
40551
  icon: "edit"
40183
40552
  })
40184
40553
  });
40185
- $[6] = config.definition.type;
40186
- $[7] = setDialogMode;
40187
- $[8] = uuid;
40188
- $[9] = t7;
40554
+ $[7] = config.definition.type;
40555
+ $[8] = setDialogMode;
40556
+ $[9] = uuid;
40557
+ $[10] = t9;
40189
40558
  } else {
40190
- t7 = $[9];
40559
+ t9 = $[10];
40191
40560
  }
40192
- let t8;
40193
- if ($[10] !== assignToOutput || $[11] !== config.color || $[12] !== t1 || $[13] !== t3 || $[14] !== t4 || $[15] !== t5 || $[16] !== t6 || $[17] !== t7) {
40194
- t8 = /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TimecodeTreeDisplay, {
40195
- id: t1,
40196
- config: t3,
40197
- type: t4,
40198
- name: t5,
40561
+ let t10;
40562
+ if ($[11] !== assignToOutput || $[12] !== config.color || $[13] !== t3 || $[14] !== t5 || $[15] !== t6 || $[16] !== t7 || $[17] !== t8 || $[18] !== t9) {
40563
+ t10 = /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TimecodeTreeDisplay, {
40564
+ id: t3,
40565
+ config: t5,
40566
+ type: t6,
40567
+ name: t7,
40199
40568
  color: config.color,
40200
- timecode: t6,
40201
- namePlaceholder: `Unnamed Generator`,
40202
- buttons: t7,
40569
+ timecode: t8,
40570
+ rootState,
40571
+ namePlaceholder: STRINGS.generators.unnamed,
40572
+ buttons: t9,
40203
40573
  assignToOutput
40204
40574
  });
40205
- $[10] = assignToOutput;
40206
- $[11] = config.color;
40207
- $[12] = t1;
40575
+ $[11] = assignToOutput;
40576
+ $[12] = config.color;
40208
40577
  $[13] = t3;
40209
- $[14] = t4;
40210
- $[15] = t5;
40211
- $[16] = t6;
40212
- $[17] = t7;
40213
- $[18] = t8;
40578
+ $[14] = t5;
40579
+ $[15] = t6;
40580
+ $[16] = t7;
40581
+ $[17] = t8;
40582
+ $[18] = t9;
40583
+ $[19] = t10;
40214
40584
  } else {
40215
- t8 = $[18];
40585
+ t10 = $[19];
40216
40586
  }
40217
- return t8;
40587
+ return t10;
40218
40588
  };
40219
40589
  var GeneratorsSection = (t0) => {
40220
40590
  const $ = (0, import_compiler_runtime10.c)(10);
@@ -40377,7 +40747,7 @@ Data Directory: ${system.dataDirectory}`
40377
40747
  const t7 = data.iface ?? null;
40378
40748
  let t8;
40379
40749
  if ($[9] !== interfaces) {
40380
- t8 = !interfaces ? [] : Object.values(interfaces).map(_temp3);
40750
+ t8 = !interfaces ? [] : Object.values(interfaces).map(_temp4);
40381
40751
  $[9] = interfaces;
40382
40752
  $[10] = t8;
40383
40753
  } else {
@@ -40564,7 +40934,7 @@ Data Directory: ${system.dataDirectory}`
40564
40934
  const t7 = data.iface ?? null;
40565
40935
  let t8;
40566
40936
  if ($[9] !== interfaces) {
40567
- t8 = !interfaces ? [] : Object.values(interfaces).map(_temp22);
40937
+ t8 = !interfaces ? [] : Object.values(interfaces).map(_temp23);
40568
40938
  $[9] = interfaces;
40569
40939
  $[10] = t8;
40570
40940
  } else {
@@ -40624,7 +40994,7 @@ Data Directory: ${system.dataDirectory}`
40624
40994
  var InputSettingsDialog = ({
40625
40995
  target,
40626
40996
  input,
40627
- close
40997
+ setDialogMode
40628
40998
  }) => {
40629
40999
  const {
40630
41000
  config,
@@ -40642,6 +41012,7 @@ Data Directory: ${system.dataDirectory}`
40642
41012
  iface: ""
40643
41013
  }
40644
41014
  });
41015
+ const close = (0, import_react35.useCallback)(() => setDialogMode(null), [setDialogMode]);
40645
41016
  const updateSettings = (0, import_react35.useCallback)((change) => {
40646
41017
  if (target.type === "add") {
40647
41018
  setNewData(change);
@@ -40752,7 +41123,7 @@ Data Directory: ${system.dataDirectory}`
40752
41123
  commitChanges();
40753
41124
  }
40754
41125
  }
40755
- }), resolvedTarget === "add" ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(ControlDialogButtons, {
41126
+ }), target.type === "add" ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(ControlDialogButtons, {
40756
41127
  children: [/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ControlButton, {
40757
41128
  onClick: close,
40758
41129
  variant: "large",
@@ -40760,20 +41131,36 @@ Data Directory: ${system.dataDirectory}`
40760
41131
  }), /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ControlButton, {
40761
41132
  onClick: addInput,
40762
41133
  variant: "large",
41134
+ primary: true,
40763
41135
  children: "Add Input"
40764
41136
  })]
40765
- }) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ControlDialogButtons, {
40766
- children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ControlButton, {
41137
+ }) : target?.type === "edit" ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(ControlDialogButtons, {
41138
+ children: [/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ControlButton, {
41139
+ onClick: () => setDialogMode({
41140
+ section: {
41141
+ type: "inputs",
41142
+ input
41143
+ },
41144
+ target: {
41145
+ type: "delete",
41146
+ uuid: target.uuid
41147
+ }
41148
+ }),
41149
+ variant: "large",
41150
+ destructive: true,
41151
+ icon: "delete",
41152
+ children: "Delete"
41153
+ }), /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ControlButton, {
40767
41154
  onClick: close,
40768
41155
  variant: "large",
40769
41156
  children: "Close"
40770
- })
40771
- })]
41157
+ })]
41158
+ }) : null]
40772
41159
  })
40773
41160
  });
40774
41161
  };
40775
41162
  var InputDisplay = (t0) => {
40776
- const $ = (0, import_compiler_runtime11.c)(29);
41163
+ const $ = (0, import_compiler_runtime11.c)(37);
40777
41164
  const {
40778
41165
  uuid,
40779
41166
  config,
@@ -40814,57 +41201,90 @@ Data Directory: ${system.dataDirectory}`
40814
41201
  t1 = $[2];
40815
41202
  }
40816
41203
  const toggleEnabled = t1;
41204
+ state?.errors;
41205
+ state?.warnings;
40817
41206
  let t2;
40818
- if ($[3] !== uuid) {
40819
- t2 = ["input", uuid];
40820
- $[3] = uuid;
40821
- $[4] = t2;
41207
+ let t3;
41208
+ if ($[3] !== state?.errors) {
41209
+ t3 = state?.errors ?? [];
41210
+ $[3] = state?.errors;
41211
+ $[4] = t3;
40822
41212
  } else {
40823
- t2 = $[4];
41213
+ t3 = $[4];
40824
41214
  }
40825
- const t3 = config.delayMs ?? null;
40826
41215
  let t4;
40827
- if ($[5] !== t3) {
40828
- t4 = {
40829
- delayMs: t3
40830
- };
40831
- $[5] = t3;
41216
+ if ($[5] !== state?.warnings) {
41217
+ t4 = state?.warnings ?? [];
41218
+ $[5] = state?.warnings;
40832
41219
  $[6] = t4;
40833
41220
  } else {
40834
41221
  t4 = $[6];
40835
41222
  }
40836
- const t5 = STRINGS.protocols[config.definition.type];
41223
+ let t5;
41224
+ if ($[7] !== t3 || $[8] !== t4) {
41225
+ t5 = {
41226
+ errors: t3,
41227
+ warnings: t4
41228
+ };
41229
+ $[7] = t3;
41230
+ $[8] = t4;
41231
+ $[9] = t5;
41232
+ } else {
41233
+ t5 = $[9];
41234
+ }
41235
+ t2 = t5;
41236
+ const rootState = t2;
40837
41237
  let t6;
40838
- if ($[7] !== config.name) {
40839
- t6 = config.name ? [config.name] : [];
40840
- $[7] = config.name;
40841
- $[8] = t6;
41238
+ if ($[10] !== uuid) {
41239
+ t6 = ["input", uuid];
41240
+ $[10] = uuid;
41241
+ $[11] = t6;
40842
41242
  } else {
40843
- t6 = $[8];
41243
+ t6 = $[11];
40844
41244
  }
40845
- const t7 = state?.timecode ?? null;
40846
- const t8 = config.enabled ? "Stop Input" : "Start Input";
40847
- const t9 = config.enabled ? "stop" : "play_arrow";
41245
+ const t7 = config.delayMs ?? null;
41246
+ let t8;
41247
+ if ($[12] !== t7) {
41248
+ t8 = {
41249
+ delayMs: t7
41250
+ };
41251
+ $[12] = t7;
41252
+ $[13] = t8;
41253
+ } else {
41254
+ t8 = $[13];
41255
+ }
41256
+ const t9 = STRINGS.protocols[config.definition.type];
40848
41257
  let t10;
40849
- if ($[9] !== t8 || $[10] !== t9 || $[11] !== toggleEnabled) {
40850
- t10 = /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ControlButton, {
41258
+ if ($[14] !== config.name) {
41259
+ t10 = config.name ? [config.name] : [];
41260
+ $[14] = config.name;
41261
+ $[15] = t10;
41262
+ } else {
41263
+ t10 = $[15];
41264
+ }
41265
+ const t11 = config.enabled ? state?.timecode ?? null : "disabled";
41266
+ const t12 = config.enabled ? STRINGS.inputs.disable : STRINGS.inputs.enable;
41267
+ const t13 = config.enabled ? "pause" : "play_arrow";
41268
+ let t14;
41269
+ if ($[16] !== t12 || $[17] !== t13 || $[18] !== toggleEnabled) {
41270
+ t14 = /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ControlButton, {
40851
41271
  variant: "large",
40852
- title: t8,
41272
+ title: t12,
40853
41273
  onClick: toggleEnabled,
40854
- icon: t9
41274
+ icon: t13
40855
41275
  });
40856
- $[9] = t8;
40857
- $[10] = t9;
40858
- $[11] = toggleEnabled;
40859
- $[12] = t10;
41276
+ $[16] = t12;
41277
+ $[17] = t13;
41278
+ $[18] = toggleEnabled;
41279
+ $[19] = t14;
40860
41280
  } else {
40861
- t10 = $[12];
41281
+ t14 = $[19];
40862
41282
  }
40863
- let t11;
40864
- if ($[13] !== config.definition.type || $[14] !== setDialogMode || $[15] !== uuid) {
40865
- t11 = /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ControlButton, {
41283
+ let t15;
41284
+ if ($[20] !== config.definition.type || $[21] !== setDialogMode || $[22] !== uuid) {
41285
+ t15 = /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ControlButton, {
40866
41286
  variant: "large",
40867
- title: "Edit Input",
41287
+ title: STRINGS.inputs.edit,
40868
41288
  onClick: () => setDialogMode({
40869
41289
  section: {
40870
41290
  type: "inputs",
@@ -40877,50 +41297,52 @@ Data Directory: ${system.dataDirectory}`
40877
41297
  }),
40878
41298
  icon: "edit"
40879
41299
  });
40880
- $[13] = config.definition.type;
40881
- $[14] = setDialogMode;
40882
- $[15] = uuid;
40883
- $[16] = t11;
41300
+ $[20] = config.definition.type;
41301
+ $[21] = setDialogMode;
41302
+ $[22] = uuid;
41303
+ $[23] = t15;
40884
41304
  } else {
40885
- t11 = $[16];
41305
+ t15 = $[23];
40886
41306
  }
40887
- let t12;
40888
- if ($[17] !== t10 || $[18] !== t11) {
40889
- t12 = /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, {
40890
- children: [t10, t11]
41307
+ let t16;
41308
+ if ($[24] !== t14 || $[25] !== t15) {
41309
+ t16 = /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, {
41310
+ children: [t14, t15]
40891
41311
  });
40892
- $[17] = t10;
40893
- $[18] = t11;
40894
- $[19] = t12;
41312
+ $[24] = t14;
41313
+ $[25] = t15;
41314
+ $[26] = t16;
40895
41315
  } else {
40896
- t12 = $[19];
41316
+ t16 = $[26];
40897
41317
  }
40898
- let t13;
40899
- if ($[20] !== assignToOutput || $[21] !== config.color || $[22] !== t12 || $[23] !== t2 || $[24] !== t4 || $[25] !== t5.short || $[26] !== t6 || $[27] !== t7) {
40900
- t13 = /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TimecodeTreeDisplay, {
40901
- id: t2,
40902
- config: t4,
40903
- type: t5.short,
40904
- name: t6,
41318
+ let t17;
41319
+ if ($[27] !== assignToOutput || $[28] !== config.color || $[29] !== rootState || $[30] !== t10 || $[31] !== t11 || $[32] !== t16 || $[33] !== t6 || $[34] !== t8 || $[35] !== t9.short) {
41320
+ t17 = /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TimecodeTreeDisplay, {
41321
+ id: t6,
41322
+ config: t8,
41323
+ type: t9.short,
41324
+ name: t10,
40905
41325
  color: config.color,
40906
- timecode: t7,
40907
- namePlaceholder: `Unnamed Input`,
40908
- buttons: t12,
41326
+ timecode: t11,
41327
+ rootState,
41328
+ namePlaceholder: STRINGS.inputs.unnamed,
41329
+ buttons: t16,
40909
41330
  assignToOutput
40910
41331
  });
40911
- $[20] = assignToOutput;
40912
- $[21] = config.color;
40913
- $[22] = t12;
40914
- $[23] = t2;
40915
- $[24] = t4;
40916
- $[25] = t5.short;
40917
- $[26] = t6;
40918
- $[27] = t7;
40919
- $[28] = t13;
41332
+ $[27] = assignToOutput;
41333
+ $[28] = config.color;
41334
+ $[29] = rootState;
41335
+ $[30] = t10;
41336
+ $[31] = t11;
41337
+ $[32] = t16;
41338
+ $[33] = t6;
41339
+ $[34] = t8;
41340
+ $[35] = t9.short;
41341
+ $[36] = t17;
40920
41342
  } else {
40921
- t13 = $[28];
41343
+ t17 = $[36];
40922
41344
  }
40923
- return t13;
41345
+ return t17;
40924
41346
  };
40925
41347
  var InputsSection = (t0) => {
40926
41348
  const $ = (0, import_compiler_runtime11.c)(10);
@@ -40999,19 +41421,24 @@ Data Directory: ${system.dataDirectory}`
40999
41421
  }
41000
41422
  return t4;
41001
41423
  };
41002
- function _temp3(iface) {
41424
+ function _temp4(iface) {
41003
41425
  return {
41004
41426
  label: `${iface.name} (${iface.address})`,
41005
41427
  value: iface.name
41006
41428
  };
41007
41429
  }
41008
- function _temp22(iface) {
41430
+ function _temp23(iface) {
41009
41431
  return {
41010
41432
  label: `${iface.name} (${iface.address})`,
41011
41433
  value: iface.name
41012
41434
  };
41013
41435
  }
41014
41436
 
41437
+ // src/components/frontend/toolbox/types.ts
41438
+ var isDeleteDialogMode = (mode) => {
41439
+ return mode?.target.type === "delete";
41440
+ };
41441
+
41015
41442
  // src/components/frontend/toolbox/settings.tsx
41016
41443
  var import_compiler_runtime13 = __toESM(require_compiler_runtime());
41017
41444
  var import_react38 = __toESM(require_react());
@@ -41207,8 +41634,179 @@ Data Directory: ${system.dataDirectory}`
41207
41634
  var DATE_FORMATTER = new Intl.DateTimeFormat(void 0, {
41208
41635
  timeStyle: "medium"
41209
41636
  });
41637
+ var AppPortConfig = () => {
41638
+ const {
41639
+ getNetworkInterfaces
41640
+ } = (0, import_react38.useContext)(NetworkContext);
41641
+ const [interfaces, setInterfaces] = (0, import_react38.useState)(null);
41642
+ const refreshInterfaces = (0, import_react38.useCallback)(() => {
41643
+ setInterfaces(null);
41644
+ getNetworkInterfaces().then((ifs) => setInterfaces(ifs));
41645
+ }, [getNetworkInterfaces]);
41646
+ (0, import_react38.useEffect)(() => {
41647
+ refreshInterfaces();
41648
+ }, [refreshInterfaces]);
41649
+ const {
41650
+ appListenerChangesHandledExternally
41651
+ } = useBrowserContext();
41652
+ const {
41653
+ network,
41654
+ config,
41655
+ updateConfig
41656
+ } = (0, import_react38.useContext)(ConfigContext);
41657
+ const [nextPort, setNextPort] = (0, import_react38.useState)(null);
41658
+ const [nextInterface, setNextInterface] = (0, import_react38.useState)(null);
41659
+ const iface = nextInterface ?? (config.appListener?.interface ? `specific:${config.appListener?.interface}` : "any");
41660
+ const port = nextPort ?? config.appListener?.port;
41661
+ const currentPortString = !port ? "" : typeof port === "string" ? port : portString(port);
41662
+ const hasNetworkChanges = nextPort !== null || nextInterface !== null;
41663
+ const nextUrlRef = (0, import_react38.useRef)(null);
41664
+ const validatedPort = (0, import_react38.useMemo)(() => {
41665
+ if (nextPort === null) {
41666
+ return {
41667
+ type: "unchanged"
41668
+ };
41669
+ }
41670
+ if (nextPort.trim() === "") {
41671
+ return {
41672
+ type: "empty"
41673
+ };
41674
+ }
41675
+ const portParts = nextPort.split("-").map((part) => parseInt(part.trim(), 10));
41676
+ if (portParts.length === 1) {
41677
+ const [singlePort] = portParts;
41678
+ if (!singlePort || isNaN(singlePort) || singlePort < 1 || singlePort > 65535) {
41679
+ return {
41680
+ type: "invalid",
41681
+ error: STRINGS.settings.network.invalidPortSingle
41682
+ };
41683
+ }
41684
+ return {
41685
+ type: "valid",
41686
+ port: singlePort
41687
+ };
41688
+ }
41689
+ if (portParts.length === 2) {
41690
+ const [from, to] = portParts;
41691
+ if (!from || isNaN(from) || from < 1 || from > 65535 || !to || isNaN(to) || to < 1 || to > 65535) {
41692
+ return {
41693
+ type: "invalid",
41694
+ error: STRINGS.settings.network.invalidPortSingle
41695
+ };
41696
+ } else if (from > to) {
41697
+ return {
41698
+ type: "invalid",
41699
+ error: STRINGS.settings.network.invalidPortRange
41700
+ };
41701
+ }
41702
+ return {
41703
+ type: "valid",
41704
+ port: {
41705
+ from,
41706
+ to
41707
+ }
41708
+ };
41709
+ }
41710
+ return {
41711
+ type: "invalid",
41712
+ error: STRINGS.settings.network.invalidPort
41713
+ };
41714
+ }, [nextPort]);
41715
+ const canSave = hasNetworkChanges && validatedPort?.type !== "invalid";
41716
+ const saveNetworkConfig = (0, import_react38.useCallback)(() => {
41717
+ if (validatedPort?.type === "invalid") {
41718
+ return;
41719
+ }
41720
+ const newPort = validatedPort;
41721
+ updateConfig((current) => {
41722
+ const config_0 = {
41723
+ ...current,
41724
+ appListener: {
41725
+ port: newPort.type === "empty" ? void 0 : newPort.type === "valid" ? newPort.port : current.appListener?.port,
41726
+ interface: nextInterface === "any" ? void 0 : nextInterface ? nextInterface.replace("specific:", "") : current.appListener?.interface
41727
+ }
41728
+ };
41729
+ const nextUrl = new URL(window.location.href);
41730
+ if (config_0.appListener?.interface) {
41731
+ nextUrl.hostname = interfaces?.[config_0.appListener.interface]?.address ?? nextUrl.hostname;
41732
+ }
41733
+ const port_0 = config_0.appListener?.port ?? network.defaultPort;
41734
+ nextUrl.port = (typeof port_0 === "number" ? port_0 : port_0.from).toString();
41735
+ nextUrlRef.current = nextUrl;
41736
+ return config_0;
41737
+ });
41738
+ setNextPort(null);
41739
+ setNextInterface(null);
41740
+ }, [interfaces, nextInterface, validatedPort, updateConfig, network.defaultPort]);
41741
+ (0, import_react38.useEffect)(() => {
41742
+ return () => {
41743
+ if (!appListenerChangesHandledExternally && nextUrlRef.current) {
41744
+ window.location.href = nextUrlRef.current.href;
41745
+ }
41746
+ };
41747
+ }, [appListenerChangesHandledExternally]);
41748
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, {
41749
+ children: [/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ControlLabel, {
41750
+ children: STRINGS.settings.network.appInterfaceLabel
41751
+ }), /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ControlSelect, {
41752
+ value: iface,
41753
+ options: [{
41754
+ label: STRINGS.settings.network.anyInterface,
41755
+ value: "any"
41756
+ }, ...!interfaces ? [] : Object.values(interfaces).map((iface_0) => ({
41757
+ label: `${iface_0.name} (${iface_0.address})`,
41758
+ value: `specific:${iface_0.name}`
41759
+ }))],
41760
+ onChange: setNextInterface,
41761
+ position: "first",
41762
+ variant: "large",
41763
+ triggerClassName: cn("text-sigil-control")
41764
+ }), iface && interfaces?.[iface]?.internal && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ControlDetails, {
41765
+ position: "second",
41766
+ className: "text-sigil-warning-foreground",
41767
+ children: STRINGS.settings.network.internalInterfaceUsed(iface)
41768
+ }), /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ControlButton, {
41769
+ onClick: refreshInterfaces,
41770
+ title: "Refresh Interfaces",
41771
+ position: "extra",
41772
+ variant: "large",
41773
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Icon2, {
41774
+ icon: "refresh",
41775
+ className: "text-arcane-normal"
41776
+ })
41777
+ }), /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ControlLabel, {
41778
+ children: STRINGS.settings.network.appPortLabel
41779
+ }), network.envPort ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ControlDetails, {
41780
+ position: "both",
41781
+ children: STRINGS.settings.network.appPortEnvOverride(network.envPort)
41782
+ }) : /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, {
41783
+ children: [/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ControlInput, {
41784
+ value: currentPortString,
41785
+ onChange: setNextPort,
41786
+ placeholder: STRINGS.settings.network.defaultPort(portString(network.defaultPort))
41787
+ }), validatedPort.type === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ControlDetails, {
41788
+ position: "second",
41789
+ className: "text-sigil-error-foreground",
41790
+ children: validatedPort.error
41791
+ })]
41792
+ }), /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ControlButton, {
41793
+ onClick: saveNetworkConfig,
41794
+ variant: "large",
41795
+ position: "first",
41796
+ disabled: !canSave,
41797
+ children: STRINGS.settings.network.saveChanges
41798
+ }), hasNetworkChanges && appListenerChangesHandledExternally && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ControlDetails, {
41799
+ position: "second",
41800
+ children: STRINGS.settings.network.saveWarning.external
41801
+ }), hasNetworkChanges && !appListenerChangesHandledExternally && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ControlDetails, {
41802
+ position: "second",
41803
+ className: "text-sigil-warning-foreground",
41804
+ children: STRINGS.settings.network.saveWarning.internal
41805
+ })]
41806
+ });
41807
+ };
41210
41808
  var Settings = (t0) => {
41211
- const $ = (0, import_compiler_runtime13.c)(29);
41809
+ const $ = (0, import_compiler_runtime13.c)(30);
41212
41810
  const {
41213
41811
  setWindowMode
41214
41812
  } = t0;
@@ -41356,34 +41954,41 @@ Data Directory: ${system.dataDirectory}`
41356
41954
  t14 = $[21];
41357
41955
  }
41358
41956
  let t15;
41359
- if ($[22] !== t12 || $[23] !== t14 || $[24] !== t8) {
41360
- t15 = /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", {
41957
+ if ($[22] === Symbol.for("react.memo_cache_sentinel")) {
41958
+ t15 = /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(AppPortConfig, {});
41959
+ $[22] = t15;
41960
+ } else {
41961
+ t15 = $[22];
41962
+ }
41963
+ let t16;
41964
+ if ($[23] !== t12 || $[24] !== t14 || $[25] !== t8) {
41965
+ t16 = /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", {
41361
41966
  className: "\n grow basis-0 overflow-y-auto bg-sigil-bg-light scrollbar-sigil\n ",
41362
41967
  children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", {
41363
41968
  className: "control-grid-large",
41364
- children: [t6, t8, t9, t12, t13, t14]
41969
+ children: [t6, t8, t9, t12, t13, t14, t15]
41365
41970
  })
41366
41971
  });
41367
- $[22] = t12;
41368
- $[23] = t14;
41369
- $[24] = t8;
41370
- $[25] = t15;
41972
+ $[23] = t12;
41973
+ $[24] = t14;
41974
+ $[25] = t8;
41975
+ $[26] = t16;
41371
41976
  } else {
41372
- t15 = $[25];
41977
+ t16 = $[26];
41373
41978
  }
41374
- let t16;
41375
- if ($[26] !== t15 || $[27] !== t5) {
41376
- t16 = /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", {
41979
+ let t17;
41980
+ if ($[27] !== t16 || $[28] !== t5) {
41981
+ t17 = /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", {
41377
41982
  className: "flex grow flex-col",
41378
- children: [t5, t15]
41983
+ children: [t5, t16]
41379
41984
  });
41380
- $[26] = t15;
41381
- $[27] = t5;
41382
- $[28] = t16;
41985
+ $[27] = t16;
41986
+ $[28] = t5;
41987
+ $[29] = t17;
41383
41988
  } else {
41384
- t16 = $[28];
41989
+ t17 = $[29];
41385
41990
  }
41386
- return t16;
41991
+ return t17;
41387
41992
  };
41388
41993
 
41389
41994
  // src/components/frontend/toolbox/license.tsx
@@ -42019,7 +42624,7 @@ Data Directory: ${system.dataDirectory}`
42019
42624
  let t7;
42020
42625
  if ($[17] !== t3 || $[18] !== t5 || $[19] !== t6) {
42021
42626
  t7 = /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", {
42022
- className: "flex h-screen flex-col",
42627
+ className: "flex h-dvh flex-col",
42023
42628
  children: [t3, t5, t6]
42024
42629
  });
42025
42630
  $[17] = t3;
@@ -42041,7 +42646,7 @@ Data Directory: ${system.dataDirectory}`
42041
42646
  } = t0;
42042
42647
  let t1;
42043
42648
  if ($[0] !== license) {
42044
- t1 = license.split("\n\n").map(_temp4);
42649
+ t1 = license.split("\n\n").map(_temp5);
42045
42650
  $[0] = license;
42046
42651
  $[1] = t1;
42047
42652
  } else {
@@ -42165,7 +42770,7 @@ Data Directory: ${system.dataDirectory}`
42165
42770
  if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
42166
42771
  t2 = {
42167
42772
  debug: {
42168
- child: _temp23,
42773
+ child: _temp24,
42169
42774
  icon: "bug_report",
42170
42775
  title: STRINGS.debugger
42171
42776
  }
@@ -42235,13 +42840,13 @@ Data Directory: ${system.dataDirectory}`
42235
42840
  }
42236
42841
  return t7;
42237
42842
  };
42238
- function _temp4(paragraph, index2) {
42843
+ function _temp5(paragraph, index2) {
42239
42844
  return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", {
42240
42845
  className: "m-0",
42241
42846
  children: paragraph.replace(/\n/g, " ").trim()
42242
42847
  }, index2);
42243
42848
  }
42244
- function _temp23() {
42849
+ function _temp24() {
42245
42850
  return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Debugger, {
42246
42851
  title: STRINGS.debugger,
42247
42852
  className: "size-full"
@@ -42369,94 +42974,1593 @@ Data Directory: ${system.dataDirectory}`
42369
42974
  return null;
42370
42975
  };
42371
42976
 
42372
- // src/components/frontend/toolbox/root.tsx
42373
- var import_jsx_runtime55 = __toESM(require_jsx_runtime());
42374
- var ToolboxRoot = (t0) => {
42375
- const $ = (0, import_compiler_runtime20.c)(43);
42376
- const {
42377
- info
42378
- } = t0;
42379
- const {
42380
- config
42381
- } = info;
42382
- const {
42383
- sendMessage,
42384
- call
42385
- } = (0, import_react43.useContext)(StageContext);
42386
- const [dialogMode, setDialogMode] = (0, import_react43.useState)(null);
42387
- const [assignToOutput, setAssignToOutput] = (0, import_react43.useState)(null);
42977
+ // ../../packages/sigil/src/frontend/controls/dialogs.tsx
42978
+ var import_compiler_runtime27 = __toESM(require_compiler_runtime(), 1);
42979
+ var import_react50 = __toESM(require_react(), 1);
42980
+
42981
+ // ../../packages/sigil/src/frontend/dialogs.tsx
42982
+ var import_compiler_runtime26 = __toESM(require_compiler_runtime(), 1);
42983
+ var import_react49 = __toESM(require_react(), 1);
42984
+
42985
+ // ../../packages/sigil/src/frontend/controls/buttons.tsx
42986
+ var import_compiler_runtime22 = __toESM(require_compiler_runtime(), 1);
42987
+ var import_react45 = __toESM(require_react(), 1);
42988
+
42989
+ // ../../packages/sigil/src/frontend/styling.ts
42990
+ var SIGIL_COLOR2 = external_exports.enum(["purple", "blue", "teal", "red", "green", "yellow", "brown", "orange", "gray"]);
42991
+ function cnd2(condition, truthyClassName, falseyClassName) {
42992
+ return condition ? truthyClassName : falseyClassName;
42993
+ }
42994
+
42995
+ // ../../packages/sigil/src/frontend/tooltip.tsx
42996
+ var import_compiler_runtime20 = __toESM(require_compiler_runtime(), 1);
42997
+ var import_react43 = __toESM(require_react(), 1);
42998
+ var import_jsx_runtime55 = __toESM(require_jsx_runtime(), 1);
42999
+ var Content4 = /* @__PURE__ */ (0, import_react43.forwardRef)((t0, ref) => {
43000
+ const $ = (0, import_compiler_runtime20.c)(9);
43001
+ let className;
43002
+ let props;
43003
+ if ($[0] !== t0) {
43004
+ ({
43005
+ className,
43006
+ ...props
43007
+ } = t0);
43008
+ $[0] = t0;
43009
+ $[1] = className;
43010
+ $[2] = props;
43011
+ } else {
43012
+ className = $[1];
43013
+ props = $[2];
43014
+ }
42388
43015
  let t1;
42389
- let t2;
42390
- if ($[0] !== assignToOutput) {
42391
- t1 = () => {
42392
- if (assignToOutput) {
42393
- const onEscape = (e) => {
42394
- if (e.key === "Escape") {
42395
- setAssignToOutput(null);
42396
- }
42397
- };
42398
- window.addEventListener("keydown", onEscape);
42399
- return () => {
42400
- window.removeEventListener("keydown", onEscape);
42401
- };
42402
- }
42403
- };
42404
- t2 = [assignToOutput];
42405
- $[0] = assignToOutput;
42406
- $[1] = t1;
42407
- $[2] = t2;
43016
+ if ($[3] !== className) {
43017
+ t1 = cn(`
43018
+ relative z-sigil-tooltip rounded-sigil-control
43019
+ bg-sigil-usage-hint-background px-1 py-0.5 leading-[1.5]
43020
+ text-sigil-usage-hint-text shadow-sigil-box
43021
+ `, className);
43022
+ $[3] = className;
43023
+ $[4] = t1;
42408
43024
  } else {
42409
- t1 = $[1];
42410
- t2 = $[2];
43025
+ t1 = $[4];
42411
43026
  }
42412
- (0, import_react43.useEffect)(t1, t2);
42413
- let t3;
42414
- if ($[3] !== config || $[4] !== info.key || $[5] !== sendMessage) {
42415
- t3 = (change) => {
42416
- const diff = diffJson(config, change(config));
42417
- sendMessage?.({
42418
- type: "component-message",
42419
- namespace: "timecode-toolbox",
42420
- component: "toolbox-root",
42421
- componentKey: info.key,
42422
- action: "update-config",
42423
- diff
42424
- });
42425
- };
42426
- $[3] = config;
42427
- $[4] = info.key;
42428
- $[5] = sendMessage;
42429
- $[6] = t3;
43027
+ let t2;
43028
+ if ($[5] !== props || $[6] !== ref || $[7] !== t1) {
43029
+ t2 = /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(dist_exports4.Content, {
43030
+ ...props,
43031
+ ref,
43032
+ className: t1
43033
+ });
43034
+ $[5] = props;
43035
+ $[6] = ref;
43036
+ $[7] = t1;
43037
+ $[8] = t2;
42430
43038
  } else {
42431
- t3 = $[6];
43039
+ t2 = $[8];
43040
+ }
43041
+ return t2;
43042
+ });
43043
+ Content4.displayName = "Content";
43044
+ var Arrow4 = /* @__PURE__ */ (0, import_react43.forwardRef)((t0, ref) => {
43045
+ const $ = (0, import_compiler_runtime20.c)(9);
43046
+ let className;
43047
+ let props;
43048
+ if ($[0] !== t0) {
43049
+ ({
43050
+ className,
43051
+ ...props
43052
+ } = t0);
43053
+ $[0] = t0;
43054
+ $[1] = className;
43055
+ $[2] = props;
43056
+ } else {
43057
+ className = $[1];
43058
+ props = $[2];
43059
+ }
43060
+ let t1;
43061
+ if ($[3] !== className) {
43062
+ t1 = cn("fill-sigil-usage-hint-background drop-shadow-sigil-tooltip-arrow", className);
43063
+ $[3] = className;
43064
+ $[4] = t1;
43065
+ } else {
43066
+ t1 = $[4];
43067
+ }
43068
+ let t2;
43069
+ if ($[5] !== props || $[6] !== ref || $[7] !== t1) {
43070
+ t2 = /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(dist_exports4.Arrow, {
43071
+ ...props,
43072
+ ref,
43073
+ className: t1
43074
+ });
43075
+ $[5] = props;
43076
+ $[6] = ref;
43077
+ $[7] = t1;
43078
+ $[8] = t2;
43079
+ } else {
43080
+ t2 = $[8];
43081
+ }
43082
+ return t2;
43083
+ });
43084
+ Arrow4.displayName = "Arrow";
43085
+ var TooltipBoundaryContext2 = /* @__PURE__ */ (0, import_react43.createContext)(null);
43086
+ var TooltipWrapper2 = (t0) => {
43087
+ const $ = (0, import_compiler_runtime20.c)(12);
43088
+ const {
43089
+ tooltip,
43090
+ children,
43091
+ side: t1
43092
+ } = t0;
43093
+ const side = t1 === void 0 ? "top" : t1;
43094
+ const boundary = (0, import_react43.useContext)(TooltipBoundaryContext2);
43095
+ if (!tooltip) {
43096
+ return children;
43097
+ }
43098
+ let t2;
43099
+ if ($[0] !== children) {
43100
+ t2 = /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(dist_exports4.Trigger, {
43101
+ asChild: true,
43102
+ children
43103
+ });
43104
+ $[0] = children;
43105
+ $[1] = t2;
43106
+ } else {
43107
+ t2 = $[1];
43108
+ }
43109
+ let t3;
43110
+ if ($[2] !== boundary) {
43111
+ t3 = boundary ? [boundary] : [];
43112
+ $[2] = boundary;
43113
+ $[3] = t3;
43114
+ } else {
43115
+ t3 = $[3];
43116
+ }
43117
+ let t4;
43118
+ if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
43119
+ t4 = /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Arrow4, {});
43120
+ $[4] = t4;
43121
+ } else {
43122
+ t4 = $[4];
43123
+ }
43124
+ let t5;
43125
+ if ($[5] !== side || $[6] !== t3 || $[7] !== tooltip) {
43126
+ t5 = /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Content4, {
43127
+ side,
43128
+ align: "center",
43129
+ sideOffset: 5,
43130
+ alignOffset: 0,
43131
+ collisionBoundary: t3,
43132
+ collisionPadding: 10,
43133
+ children: [t4, tooltip]
43134
+ });
43135
+ $[5] = side;
43136
+ $[6] = t3;
43137
+ $[7] = tooltip;
43138
+ $[8] = t5;
43139
+ } else {
43140
+ t5 = $[8];
43141
+ }
43142
+ let t6;
43143
+ if ($[9] !== t2 || $[10] !== t5) {
43144
+ t6 = /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(dist_exports4.Root, {
43145
+ children: [t2, t5]
43146
+ });
43147
+ $[9] = t2;
43148
+ $[10] = t5;
43149
+ $[11] = t6;
43150
+ } else {
43151
+ t6 = $[11];
43152
+ }
43153
+ return t6;
43154
+ };
43155
+
43156
+ // ../../packages/sigil/src/frontend/input.ts
43157
+ var import_compiler_runtime21 = __toESM(require_compiler_runtime(), 1);
43158
+ var import_react44 = __toESM(require_react(), 1);
43159
+ var usePressable3 = (click) => {
43160
+ const $ = (0, import_compiler_runtime21.c)(11);
43161
+ const [touching, setTouching] = (0, import_react44.useState)(false);
43162
+ let t0;
43163
+ let t1;
43164
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
43165
+ t0 = () => {
43166
+ setTouching(true);
43167
+ };
43168
+ t1 = () => {
43169
+ setTouching(false);
43170
+ };
43171
+ $[0] = t0;
43172
+ $[1] = t1;
43173
+ } else {
43174
+ t0 = $[0];
43175
+ t1 = $[1];
43176
+ }
43177
+ let t2;
43178
+ if ($[2] !== click || $[3] !== touching) {
43179
+ t2 = (event) => {
43180
+ if (touching) {
43181
+ event.preventDefault();
43182
+ setTouching(false);
43183
+ click(event);
43184
+ }
43185
+ };
43186
+ $[2] = click;
43187
+ $[3] = touching;
43188
+ $[4] = t2;
43189
+ } else {
43190
+ t2 = $[4];
43191
+ }
43192
+ let t3;
43193
+ if ($[5] !== click || $[6] !== t2) {
43194
+ t3 = {
43195
+ onClick: click,
43196
+ onTouchStart: t0,
43197
+ onTouchMove: t1,
43198
+ onTouchEnd: t2
43199
+ };
43200
+ $[5] = click;
43201
+ $[6] = t2;
43202
+ $[7] = t3;
43203
+ } else {
43204
+ t3 = $[7];
43205
+ }
43206
+ let t4;
43207
+ if ($[8] !== t3 || $[9] !== touching) {
43208
+ t4 = {
43209
+ touching,
43210
+ handlers: t3
43211
+ };
43212
+ $[8] = t3;
43213
+ $[9] = touching;
43214
+ $[10] = t4;
43215
+ } else {
43216
+ t4 = $[10];
43217
+ }
43218
+ return t4;
43219
+ };
43220
+ var useLongPressable3 = (t0) => {
43221
+ const $ = (0, import_compiler_runtime21.c)(18);
43222
+ const {
43223
+ onPress,
43224
+ onRelease
43225
+ } = t0;
43226
+ const [touching, setTouching] = (0, import_react44.useState)(false);
43227
+ let t1;
43228
+ let t2;
43229
+ let t3;
43230
+ if ($[0] !== onPress) {
43231
+ t2 = () => {
43232
+ setTouching(true);
43233
+ onPress();
43234
+ };
43235
+ t3 = () => {
43236
+ setTouching(true);
43237
+ onPress();
43238
+ };
43239
+ $[0] = onPress;
43240
+ $[1] = t2;
43241
+ $[2] = t3;
43242
+ } else {
43243
+ t2 = $[1];
43244
+ t3 = $[2];
43245
+ }
43246
+ let t4;
43247
+ let t5;
43248
+ if ($[3] !== onRelease) {
43249
+ t4 = () => {
43250
+ setTouching(false);
43251
+ onRelease();
43252
+ };
43253
+ t5 = () => {
43254
+ setTouching(false);
43255
+ onRelease();
43256
+ };
43257
+ $[3] = onRelease;
43258
+ $[4] = t4;
43259
+ $[5] = t5;
43260
+ } else {
43261
+ t4 = $[4];
43262
+ t5 = $[5];
43263
+ }
43264
+ let t6;
43265
+ if ($[6] !== onRelease || $[7] !== touching) {
43266
+ t6 = (event) => {
43267
+ if (touching) {
43268
+ event.preventDefault();
43269
+ setTouching(false);
43270
+ onRelease();
43271
+ }
43272
+ };
43273
+ $[6] = onRelease;
43274
+ $[7] = touching;
43275
+ $[8] = t6;
43276
+ } else {
43277
+ t6 = $[8];
43278
+ }
43279
+ let t7;
43280
+ if ($[9] !== t2 || $[10] !== t3 || $[11] !== t4 || $[12] !== t5 || $[13] !== t6) {
43281
+ t7 = {
43282
+ onTouchStart: t2,
43283
+ onMouseDown: t3,
43284
+ onMouseUp: t4,
43285
+ onTouchMove: t5,
43286
+ onTouchEnd: t6
43287
+ };
43288
+ $[9] = t2;
43289
+ $[10] = t3;
43290
+ $[11] = t4;
43291
+ $[12] = t5;
43292
+ $[13] = t6;
43293
+ $[14] = t7;
43294
+ } else {
43295
+ t7 = $[14];
43296
+ }
43297
+ let t8;
43298
+ if ($[15] !== t7 || $[16] !== touching) {
43299
+ t8 = {
43300
+ touching,
43301
+ handlers: t7
43302
+ };
43303
+ $[15] = t7;
43304
+ $[16] = touching;
43305
+ $[17] = t8;
43306
+ } else {
43307
+ t8 = $[17];
43308
+ }
43309
+ t1 = t8;
43310
+ return t1;
43311
+ };
43312
+
43313
+ // ../../packages/sigil/src/frontend/controls/utils.ts
43314
+ var clsControlPosition2 = (position) => {
43315
+ if (!position) return void 0;
43316
+ switch (position) {
43317
+ case "row":
43318
+ return "control-grid-pos-row";
43319
+ case "label":
43320
+ return "control-grid-pos-label";
43321
+ case "first":
43322
+ return "control-grid-pos-first";
43323
+ case "second":
43324
+ return "control-grid-pos-second";
43325
+ case "both":
43326
+ return "control-grid-pos-both";
43327
+ case "all":
43328
+ return "control-grid-pos-all";
43329
+ case "extra":
43330
+ return "control-grid-pos-extra";
43331
+ }
43332
+ };
43333
+ var clsControlSubgridPosition2 = (position, subgrid) => {
43334
+ if (!subgrid) return void 0;
43335
+ switch (position) {
43336
+ case "label":
43337
+ return "col-[1/span_1]";
43338
+ case "first":
43339
+ return "col-[2/span_1]";
43340
+ case "second":
43341
+ return "col-[3/span_1]";
43342
+ }
43343
+ };
43344
+
43345
+ // ../../packages/sigil/src/frontend/controls/buttons.tsx
43346
+ var import_jsx_runtime56 = __toESM(require_jsx_runtime(), 1);
43347
+ var clsControlButton2 = ({
43348
+ variant,
43349
+ active,
43350
+ touching,
43351
+ position,
43352
+ className,
43353
+ primary,
43354
+ destructive
43355
+ }) => cn(`sigil-control-button`, cnd2(variant === "border", `sigil-control-button-variant-border`), cnd2(variant === "large", `sigil-control-button-variant-large`), cnd2(variant === "properties", `sigil-control-button-variant-properties`), cnd2(variant === "table-row", `sigil-control-button-variant-table-row`), cnd2(variant === "toolbar", `sigil-control-button-variant-toolbar`), cnd2(variant === "titlebar", `sigil-control-button-variant-titlebar`), cnd2(touching, `sigil-control-button-touching`), cnd2(active, `sigil-control-button-active`), cnd2(touching && active, `sigil-control-button-active-touching`), cnd2(primary, `sigil-control-button-primary`), cnd2(destructive, `sigil-control-button-destructive`), clsControlPosition2(position), className);
43356
+ var ControlButtonFrame2 = /* @__PURE__ */ (0, import_react45.forwardRef)((t0, ref) => {
43357
+ const $ = (0, import_compiler_runtime22.c)(40);
43358
+ let active;
43359
+ let children;
43360
+ let className;
43361
+ let destructive;
43362
+ let disabled;
43363
+ let icon;
43364
+ let position;
43365
+ let primary;
43366
+ let props;
43367
+ let t1;
43368
+ let title;
43369
+ let tooltipSide;
43370
+ let touching;
43371
+ let type;
43372
+ if ($[0] !== t0) {
43373
+ ({
43374
+ children,
43375
+ className,
43376
+ type,
43377
+ variant: t1,
43378
+ icon,
43379
+ active,
43380
+ touching,
43381
+ disabled,
43382
+ title,
43383
+ tooltipSide,
43384
+ position,
43385
+ primary,
43386
+ destructive,
43387
+ ...props
43388
+ } = t0);
43389
+ $[0] = t0;
43390
+ $[1] = active;
43391
+ $[2] = children;
43392
+ $[3] = className;
43393
+ $[4] = destructive;
43394
+ $[5] = disabled;
43395
+ $[6] = icon;
43396
+ $[7] = position;
43397
+ $[8] = primary;
43398
+ $[9] = props;
43399
+ $[10] = t1;
43400
+ $[11] = title;
43401
+ $[12] = tooltipSide;
43402
+ $[13] = touching;
43403
+ $[14] = type;
43404
+ } else {
43405
+ active = $[1];
43406
+ children = $[2];
43407
+ className = $[3];
43408
+ destructive = $[4];
43409
+ disabled = $[5];
43410
+ icon = $[6];
43411
+ position = $[7];
43412
+ primary = $[8];
43413
+ props = $[9];
43414
+ t1 = $[10];
43415
+ title = $[11];
43416
+ tooltipSide = $[12];
43417
+ touching = $[13];
43418
+ type = $[14];
43419
+ }
43420
+ const variant = t1 === void 0 ? "toolbar" : t1;
43421
+ const t2 = type ?? "button";
43422
+ let t3;
43423
+ if ($[15] !== active || $[16] !== className || $[17] !== destructive || $[18] !== position || $[19] !== primary || $[20] !== touching || $[21] !== variant) {
43424
+ t3 = clsControlButton2({
43425
+ variant,
43426
+ active,
43427
+ touching,
43428
+ position,
43429
+ primary,
43430
+ destructive,
43431
+ className
43432
+ });
43433
+ $[15] = active;
43434
+ $[16] = className;
43435
+ $[17] = destructive;
43436
+ $[18] = position;
43437
+ $[19] = primary;
43438
+ $[20] = touching;
43439
+ $[21] = variant;
43440
+ $[22] = t3;
43441
+ } else {
43442
+ t3 = $[22];
43443
+ }
43444
+ let t4;
43445
+ if ($[23] !== children || $[24] !== icon) {
43446
+ t4 = icon && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Icon2, {
43447
+ icon,
43448
+ className: cn(cnd2(children, "text-[120%]", "text-[150%]"))
43449
+ });
43450
+ $[23] = children;
43451
+ $[24] = icon;
43452
+ $[25] = t4;
43453
+ } else {
43454
+ t4 = $[25];
43455
+ }
43456
+ let t5;
43457
+ if ($[26] !== children || $[27] !== t4) {
43458
+ t5 = /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", {
43459
+ children: [t4, children]
43460
+ });
43461
+ $[26] = children;
43462
+ $[27] = t4;
43463
+ $[28] = t5;
43464
+ } else {
43465
+ t5 = $[28];
43466
+ }
43467
+ let t6;
43468
+ if ($[29] !== disabled || $[30] !== props || $[31] !== ref || $[32] !== t2 || $[33] !== t3 || $[34] !== t5) {
43469
+ t6 = /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("button", {
43470
+ ...props,
43471
+ ref,
43472
+ type: t2,
43473
+ disabled,
43474
+ className: t3,
43475
+ children: t5
43476
+ });
43477
+ $[29] = disabled;
43478
+ $[30] = props;
43479
+ $[31] = ref;
43480
+ $[32] = t2;
43481
+ $[33] = t3;
43482
+ $[34] = t5;
43483
+ $[35] = t6;
43484
+ } else {
43485
+ t6 = $[35];
43486
+ }
43487
+ const btn = t6;
43488
+ if (!title) {
43489
+ return btn;
43490
+ }
43491
+ let t7;
43492
+ if ($[36] !== btn || $[37] !== title || $[38] !== tooltipSide) {
43493
+ t7 = /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(TooltipWrapper2, {
43494
+ tooltip: title,
43495
+ side: tooltipSide,
43496
+ children: btn
43497
+ });
43498
+ $[36] = btn;
43499
+ $[37] = title;
43500
+ $[38] = tooltipSide;
43501
+ $[39] = t7;
43502
+ } else {
43503
+ t7 = $[39];
43504
+ }
43505
+ return t7;
43506
+ });
43507
+ ControlButtonFrame2.displayName = "ControlButtonFrame";
43508
+ var ControlButton2 = /* @__PURE__ */ (0, import_react45.forwardRef)((t0, ref) => {
43509
+ const $ = (0, import_compiler_runtime22.c)(13);
43510
+ let disabled;
43511
+ let onClick;
43512
+ let props;
43513
+ if ($[0] !== t0) {
43514
+ ({
43515
+ onClick,
43516
+ disabled,
43517
+ ...props
43518
+ } = t0);
43519
+ $[0] = t0;
43520
+ $[1] = disabled;
43521
+ $[2] = onClick;
43522
+ $[3] = props;
43523
+ } else {
43524
+ disabled = $[1];
43525
+ onClick = $[2];
43526
+ props = $[3];
43527
+ }
43528
+ const {
43529
+ handlers,
43530
+ touching
43531
+ } = usePressable3(onClick);
43532
+ let t1;
43533
+ if ($[4] !== disabled || $[5] !== handlers) {
43534
+ t1 = !disabled ? handlers : {};
43535
+ $[4] = disabled;
43536
+ $[5] = handlers;
43537
+ $[6] = t1;
43538
+ } else {
43539
+ t1 = $[6];
43540
+ }
43541
+ let t2;
43542
+ if ($[7] !== disabled || $[8] !== props || $[9] !== ref || $[10] !== t1 || $[11] !== touching) {
43543
+ t2 = /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(ControlButtonFrame2, {
43544
+ ...props,
43545
+ ref,
43546
+ disabled,
43547
+ touching,
43548
+ ...t1
43549
+ });
43550
+ $[7] = disabled;
43551
+ $[8] = props;
43552
+ $[9] = ref;
43553
+ $[10] = t1;
43554
+ $[11] = touching;
43555
+ $[12] = t2;
43556
+ } else {
43557
+ t2 = $[12];
43558
+ }
43559
+ return t2;
43560
+ });
43561
+ ControlButton2.displayName = "ControlButton";
43562
+ var CheckboxControlButton2 = /* @__PURE__ */ (0, import_react45.forwardRef)((t0, ref) => {
43563
+ const $ = (0, import_compiler_runtime22.c)(12);
43564
+ let active;
43565
+ let label;
43566
+ let props;
43567
+ if ($[0] !== t0) {
43568
+ ({
43569
+ active,
43570
+ label,
43571
+ ...props
43572
+ } = t0);
43573
+ $[0] = t0;
43574
+ $[1] = active;
43575
+ $[2] = label;
43576
+ $[3] = props;
43577
+ } else {
43578
+ active = $[1];
43579
+ label = $[2];
43580
+ props = $[3];
43581
+ }
43582
+ const t1 = active ? "check_box" : "check_box_outline_blank";
43583
+ let t2;
43584
+ if ($[4] !== t1) {
43585
+ t2 = /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Icon2, {
43586
+ icon: t1
43587
+ });
43588
+ $[4] = t1;
43589
+ $[5] = t2;
43590
+ } else {
43591
+ t2 = $[5];
43592
+ }
43593
+ let t3;
43594
+ if ($[6] !== active || $[7] !== label || $[8] !== props || $[9] !== ref || $[10] !== t2) {
43595
+ t3 = /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(ControlButton2, {
43596
+ ...props,
43597
+ ref,
43598
+ active,
43599
+ children: [t2, label]
43600
+ });
43601
+ $[6] = active;
43602
+ $[7] = label;
43603
+ $[8] = props;
43604
+ $[9] = ref;
43605
+ $[10] = t2;
43606
+ $[11] = t3;
43607
+ } else {
43608
+ t3 = $[11];
43609
+ }
43610
+ return t3;
43611
+ });
43612
+ CheckboxControlButton2.displayName = "CheckboxControlButton";
43613
+ var LongPressableControlButton2 = /* @__PURE__ */ (0, import_react45.forwardRef)((t0, ref) => {
43614
+ const $ = (0, import_compiler_runtime22.c)(18);
43615
+ let active;
43616
+ let disabled;
43617
+ let onPress;
43618
+ let onRelease;
43619
+ let props;
43620
+ if ($[0] !== t0) {
43621
+ ({
43622
+ active,
43623
+ disabled,
43624
+ onPress,
43625
+ onRelease,
43626
+ ...props
43627
+ } = t0);
43628
+ $[0] = t0;
43629
+ $[1] = active;
43630
+ $[2] = disabled;
43631
+ $[3] = onPress;
43632
+ $[4] = onRelease;
43633
+ $[5] = props;
43634
+ } else {
43635
+ active = $[1];
43636
+ disabled = $[2];
43637
+ onPress = $[3];
43638
+ onRelease = $[4];
43639
+ props = $[5];
43640
+ }
43641
+ let t1;
43642
+ if ($[6] !== onPress || $[7] !== onRelease) {
43643
+ t1 = {
43644
+ onPress,
43645
+ onRelease
43646
+ };
43647
+ $[6] = onPress;
43648
+ $[7] = onRelease;
43649
+ $[8] = t1;
43650
+ } else {
43651
+ t1 = $[8];
43652
+ }
43653
+ const {
43654
+ handlers,
43655
+ touching
43656
+ } = useLongPressable3(t1);
43657
+ const t2 = active || touching;
43658
+ let t3;
43659
+ if ($[9] !== disabled || $[10] !== handlers) {
43660
+ t3 = !disabled ? handlers : {};
43661
+ $[9] = disabled;
43662
+ $[10] = handlers;
43663
+ $[11] = t3;
43664
+ } else {
43665
+ t3 = $[11];
43666
+ }
43667
+ let t4;
43668
+ if ($[12] !== disabled || $[13] !== props || $[14] !== ref || $[15] !== t2 || $[16] !== t3) {
43669
+ t4 = /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(ControlButtonFrame2, {
43670
+ ...props,
43671
+ ref,
43672
+ active: t2,
43673
+ disabled,
43674
+ ...t3
43675
+ });
43676
+ $[12] = disabled;
43677
+ $[13] = props;
43678
+ $[14] = ref;
43679
+ $[15] = t2;
43680
+ $[16] = t3;
43681
+ $[17] = t4;
43682
+ } else {
43683
+ t4 = $[17];
43684
+ }
43685
+ return t4;
43686
+ });
43687
+ LongPressableControlButton2.displayName = "LongPressableControlButton";
43688
+ var ControlButtonGroup2 = /* @__PURE__ */ (0, import_react45.forwardRef)((t0, ref) => {
43689
+ const $ = (0, import_compiler_runtime22.c)(13);
43690
+ let children;
43691
+ let className;
43692
+ let position;
43693
+ let props;
43694
+ if ($[0] !== t0) {
43695
+ ({
43696
+ children,
43697
+ className,
43698
+ position,
43699
+ ...props
43700
+ } = t0);
43701
+ $[0] = t0;
43702
+ $[1] = children;
43703
+ $[2] = className;
43704
+ $[3] = position;
43705
+ $[4] = props;
43706
+ } else {
43707
+ children = $[1];
43708
+ className = $[2];
43709
+ position = $[3];
43710
+ props = $[4];
43711
+ }
43712
+ let t1;
43713
+ if ($[5] !== className || $[6] !== position) {
43714
+ t1 = cn(`
43715
+ flex items-stretch gap-sigil-control-gap
43716
+ [&>button]:grow
43717
+ `, clsControlPosition2(position), className);
43718
+ $[5] = className;
43719
+ $[6] = position;
43720
+ $[7] = t1;
43721
+ } else {
43722
+ t1 = $[7];
43723
+ }
43724
+ let t2;
43725
+ if ($[8] !== children || $[9] !== props || $[10] !== ref || $[11] !== t1) {
43726
+ t2 = /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", {
43727
+ ...props,
43728
+ ref,
43729
+ className: t1,
43730
+ children
43731
+ });
43732
+ $[8] = children;
43733
+ $[9] = props;
43734
+ $[10] = ref;
43735
+ $[11] = t1;
43736
+ $[12] = t2;
43737
+ } else {
43738
+ t2 = $[12];
43739
+ }
43740
+ return t2;
43741
+ });
43742
+ ControlButtonGroup2.displayName = "ControlButtonGroup";
43743
+
43744
+ // ../../packages/sigil/src/frontend/controls/content.tsx
43745
+ var import_compiler_runtime23 = __toESM(require_compiler_runtime(), 1);
43746
+ var import_react46 = __toESM(require_react(), 1);
43747
+ var import_jsx_runtime57 = __toESM(require_jsx_runtime(), 1);
43748
+ var ControlParagraph2 = /* @__PURE__ */ (0, import_react46.forwardRef)((t0, ref) => {
43749
+ const $ = (0, import_compiler_runtime23.c)(13);
43750
+ let className;
43751
+ let mode;
43752
+ let props;
43753
+ let t1;
43754
+ if ($[0] !== t0) {
43755
+ ({
43756
+ className,
43757
+ mode,
43758
+ position: t1,
43759
+ ...props
43760
+ } = t0);
43761
+ $[0] = t0;
43762
+ $[1] = className;
43763
+ $[2] = mode;
43764
+ $[3] = props;
43765
+ $[4] = t1;
43766
+ } else {
43767
+ className = $[1];
43768
+ mode = $[2];
43769
+ props = $[3];
43770
+ t1 = $[4];
43771
+ }
43772
+ const position = t1 === void 0 ? "all" : t1;
43773
+ let t2;
43774
+ if ($[5] !== className || $[6] !== mode || $[7] !== position) {
43775
+ t2 = cn("border border-transparent", clsControlPosition2(position), cnd2(mode === "success", `
43776
+ border-sigil-usage-green-dimmed-border
43777
+ bg-sigil-usage-green-dimmed-background p-1 text-sigil-usage-green-text
43778
+ `), cnd2(mode === "warning", `
43779
+ border-sigil-usage-yellow-dimmed-border
43780
+ bg-sigil-usage-yellow-dimmed-background p-1
43781
+ text-sigil-usage-yellow-text
43782
+ `), cnd2(mode === "error", `
43783
+ border-sigil-usage-red-dimmed-border
43784
+ bg-sigil-usage-red-dimmed-background p-1 text-sigil-usage-red-text
43785
+ `), className);
43786
+ $[5] = className;
43787
+ $[6] = mode;
43788
+ $[7] = position;
43789
+ $[8] = t2;
43790
+ } else {
43791
+ t2 = $[8];
43792
+ }
43793
+ let t3;
43794
+ if ($[9] !== props || $[10] !== ref || $[11] !== t2) {
43795
+ t3 = /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", {
43796
+ ...props,
43797
+ ref,
43798
+ className: t2
43799
+ });
43800
+ $[9] = props;
43801
+ $[10] = ref;
43802
+ $[11] = t2;
43803
+ $[12] = t3;
43804
+ } else {
43805
+ t3 = $[12];
43806
+ }
43807
+ return t3;
43808
+ });
43809
+ ControlParagraph2.displayName = "ControlParagraph";
43810
+ var ControlLabel2 = /* @__PURE__ */ (0, import_react46.forwardRef)((t0, ref) => {
43811
+ const $ = (0, import_compiler_runtime23.c)(17);
43812
+ let className;
43813
+ let disabled;
43814
+ let nonMicro;
43815
+ let props;
43816
+ let subgrid;
43817
+ let t1;
43818
+ if ($[0] !== t0) {
43819
+ ({
43820
+ className,
43821
+ disabled,
43822
+ nonMicro,
43823
+ position: t1,
43824
+ subgrid,
43825
+ ...props
43826
+ } = t0);
43827
+ $[0] = t0;
43828
+ $[1] = className;
43829
+ $[2] = disabled;
43830
+ $[3] = nonMicro;
43831
+ $[4] = props;
43832
+ $[5] = subgrid;
43833
+ $[6] = t1;
43834
+ } else {
43835
+ className = $[1];
43836
+ disabled = $[2];
43837
+ nonMicro = $[3];
43838
+ props = $[4];
43839
+ subgrid = $[5];
43840
+ t1 = $[6];
43841
+ }
43842
+ const position = t1 === void 0 ? "label" : t1;
43843
+ let t2;
43844
+ if ($[7] !== className || $[8] !== disabled || $[9] !== nonMicro || $[10] !== position || $[11] !== subgrid) {
43845
+ t2 = cn("flex items-center justify-end gap-0.6 p-0.6", clsControlPosition2(position), cnd2(nonMicro, "max-[550px]:hidden"), cnd2(disabled, "opacity-50"), clsControlSubgridPosition2(position, subgrid), className);
43846
+ $[7] = className;
43847
+ $[8] = disabled;
43848
+ $[9] = nonMicro;
43849
+ $[10] = position;
43850
+ $[11] = subgrid;
43851
+ $[12] = t2;
43852
+ } else {
43853
+ t2 = $[12];
43854
+ }
43855
+ let t3;
43856
+ if ($[13] !== props || $[14] !== ref || $[15] !== t2) {
43857
+ t3 = /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("label", {
43858
+ ...props,
43859
+ ref,
43860
+ className: t2
43861
+ });
43862
+ $[13] = props;
43863
+ $[14] = ref;
43864
+ $[15] = t2;
43865
+ $[16] = t3;
43866
+ } else {
43867
+ t3 = $[16];
43868
+ }
43869
+ return t3;
43870
+ });
43871
+ ControlLabel2.displayName = "ControlLabel";
43872
+ var ControlDetails2 = /* @__PURE__ */ (0, import_react46.forwardRef)((t0, ref) => {
43873
+ const $ = (0, import_compiler_runtime23.c)(13);
43874
+ let align;
43875
+ let className;
43876
+ let props;
43877
+ let t1;
43878
+ if ($[0] !== t0) {
43879
+ ({
43880
+ align,
43881
+ className,
43882
+ position: t1,
43883
+ ...props
43884
+ } = t0);
43885
+ $[0] = t0;
43886
+ $[1] = align;
43887
+ $[2] = className;
43888
+ $[3] = props;
43889
+ $[4] = t1;
43890
+ } else {
43891
+ align = $[1];
43892
+ className = $[2];
43893
+ props = $[3];
43894
+ t1 = $[4];
43895
+ }
43896
+ const position = t1 === void 0 ? "all" : t1;
43897
+ let t2;
43898
+ if ($[5] !== align || $[6] !== className || $[7] !== position) {
43899
+ t2 = cn("flex items-center px-0.3 text-sigil-foreground-muted", clsControlPosition2(position), cnd2(align === "start", "justify-start"), cnd2(align === "center", "justify-center"), cnd2(align === "end", "justify-end"), className);
43900
+ $[5] = align;
43901
+ $[6] = className;
43902
+ $[7] = position;
43903
+ $[8] = t2;
43904
+ } else {
43905
+ t2 = $[8];
43906
+ }
43907
+ let t3;
43908
+ if ($[9] !== props || $[10] !== ref || $[11] !== t2) {
43909
+ t3 = /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", {
43910
+ ...props,
43911
+ ref,
43912
+ className: t2
43913
+ });
43914
+ $[9] = props;
43915
+ $[10] = ref;
43916
+ $[11] = t2;
43917
+ $[12] = t3;
43918
+ } else {
43919
+ t3 = $[12];
43920
+ }
43921
+ return t3;
43922
+ });
43923
+ ControlDetails2.displayName = "ControlDetails";
43924
+ var InputSpanningTitle2 = /* @__PURE__ */ (0, import_react46.forwardRef)((t0, ref) => {
43925
+ const $ = (0, import_compiler_runtime23.c)(11);
43926
+ let className;
43927
+ let props;
43928
+ let t1;
43929
+ if ($[0] !== t0) {
43930
+ ({
43931
+ className,
43932
+ position: t1,
43933
+ ...props
43934
+ } = t0);
43935
+ $[0] = t0;
43936
+ $[1] = className;
43937
+ $[2] = props;
43938
+ $[3] = t1;
43939
+ } else {
43940
+ className = $[1];
43941
+ props = $[2];
43942
+ t1 = $[3];
43943
+ }
43944
+ const position = t1 === void 0 ? "row" : t1;
43945
+ let t2;
43946
+ if ($[4] !== className || $[5] !== position) {
43947
+ t2 = cn("truncate p-0.6 text-center text-[0.8rem] font-bold", clsControlPosition2(position), className);
43948
+ $[4] = className;
43949
+ $[5] = position;
43950
+ $[6] = t2;
43951
+ } else {
43952
+ t2 = $[6];
43953
+ }
43954
+ let t3;
43955
+ if ($[7] !== props || $[8] !== ref || $[9] !== t2) {
43956
+ t3 = /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", {
43957
+ ...props,
43958
+ ref,
43959
+ className: t2
43960
+ });
43961
+ $[7] = props;
43962
+ $[8] = ref;
43963
+ $[9] = t2;
43964
+ $[10] = t3;
43965
+ } else {
43966
+ t3 = $[10];
43967
+ }
43968
+ return t3;
43969
+ });
43970
+ InputSpanningTitle2.displayName = "InputSpanningTitle";
43971
+
43972
+ // ../../packages/sigil/src/frontend/controls/input.tsx
43973
+ var import_compiler_runtime24 = __toESM(require_compiler_runtime(), 1);
43974
+ var import_react47 = __toESM(require_react(), 1);
43975
+ var import_jsx_runtime58 = __toESM(require_jsx_runtime(), 1);
43976
+
43977
+ // ../../packages/sigil/src/frontend/controls/select.tsx
43978
+ var import_compiler_runtime25 = __toESM(require_compiler_runtime(), 1);
43979
+ var import_react48 = __toESM(require_react(), 1);
43980
+ var import_jsx_runtime59 = __toESM(require_jsx_runtime(), 1);
43981
+ var COLOR_OPTIONS2 = {
43982
+ red: {
43983
+ label: "Red",
43984
+ value: "red",
43985
+ color: "red"
43986
+ },
43987
+ blue: {
43988
+ label: "Blue",
43989
+ value: "blue",
43990
+ color: "blue"
43991
+ },
43992
+ teal: {
43993
+ label: "Teal",
43994
+ value: "teal",
43995
+ color: "teal"
43996
+ },
43997
+ green: {
43998
+ label: "Green",
43999
+ value: "green",
44000
+ color: "green"
44001
+ },
44002
+ yellow: {
44003
+ label: "Yellow",
44004
+ value: "yellow",
44005
+ color: "yellow"
44006
+ },
44007
+ purple: {
44008
+ label: "Purple",
44009
+ value: "purple",
44010
+ color: "purple"
44011
+ },
44012
+ orange: {
44013
+ label: "Orange",
44014
+ value: "orange",
44015
+ color: "orange"
44016
+ },
44017
+ brown: {
44018
+ label: "Brown",
44019
+ value: "brown",
44020
+ color: "brown"
44021
+ },
44022
+ gray: {
44023
+ label: "Gray",
44024
+ value: "gray",
44025
+ color: "gray"
44026
+ }
44027
+ };
44028
+ var COLOR_OPTIONS_ARRAY2 = Object.values(COLOR_OPTIONS2);
44029
+
44030
+ // ../../packages/sigil/src/frontend/dialogs.tsx
44031
+ var import_jsx_runtime60 = __toESM(require_jsx_runtime(), 1);
44032
+ var isDarkDialog2 = (variant) => variant === "dark" || variant === "dark-compact";
44033
+ var DialogTitle2 = /* @__PURE__ */ (0, import_react49.forwardRef)((t0, ref) => {
44034
+ const $ = (0, import_compiler_runtime26.c)(11);
44035
+ let className;
44036
+ let props;
44037
+ let t1;
44038
+ if ($[0] !== t0) {
44039
+ ({
44040
+ className,
44041
+ variant: t1,
44042
+ ...props
44043
+ } = t0);
44044
+ $[0] = t0;
44045
+ $[1] = className;
44046
+ $[2] = props;
44047
+ $[3] = t1;
44048
+ } else {
44049
+ className = $[1];
44050
+ props = $[2];
44051
+ t1 = $[3];
44052
+ }
44053
+ const variant = t1 === void 0 ? "light" : t1;
44054
+ let t2;
44055
+ if ($[4] !== className || $[5] !== variant) {
44056
+ t2 = cn(`
44057
+ flex items-center justify-center gap-0.6 border-b border-sigil-border
44058
+ p-arcane font-bold
44059
+ `, cnd2(isDarkDialog2(variant), "bg-sigil-bg-light", "bg-sigil-bg-dark"), className);
44060
+ $[4] = className;
44061
+ $[5] = variant;
44062
+ $[6] = t2;
44063
+ } else {
44064
+ t2 = $[6];
44065
+ }
44066
+ let t3;
44067
+ if ($[7] !== props || $[8] !== ref || $[9] !== t2) {
44068
+ t3 = /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", {
44069
+ ...props,
44070
+ ref,
44071
+ className: t2
44072
+ });
44073
+ $[7] = props;
44074
+ $[8] = ref;
44075
+ $[9] = t2;
44076
+ $[10] = t3;
44077
+ } else {
44078
+ t3 = $[10];
44079
+ }
44080
+ return t3;
44081
+ });
44082
+ DialogTitle2.displayName = "DialogTitle";
44083
+ var DialogButtons2 = /* @__PURE__ */ (0, import_react49.forwardRef)((t0, ref) => {
44084
+ const $ = (0, import_compiler_runtime26.c)(9);
44085
+ let className;
44086
+ let props;
44087
+ if ($[0] !== t0) {
44088
+ ({
44089
+ className,
44090
+ ...props
44091
+ } = t0);
44092
+ $[0] = t0;
44093
+ $[1] = className;
44094
+ $[2] = props;
44095
+ } else {
44096
+ className = $[1];
44097
+ props = $[2];
44098
+ }
44099
+ let t1;
44100
+ if ($[3] !== className) {
44101
+ t1 = cn("mt-arcane flex justify-end gap-0.6", className);
44102
+ $[3] = className;
44103
+ $[4] = t1;
44104
+ } else {
44105
+ t1 = $[4];
44106
+ }
44107
+ let t2;
44108
+ if ($[5] !== props || $[6] !== ref || $[7] !== t1) {
44109
+ t2 = /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", {
44110
+ ...props,
44111
+ ref,
44112
+ className: t1
44113
+ });
44114
+ $[5] = props;
44115
+ $[6] = ref;
44116
+ $[7] = t1;
44117
+ $[8] = t2;
44118
+ } else {
44119
+ t2 = $[8];
44120
+ }
44121
+ return t2;
44122
+ });
44123
+ DialogButtons2.displayName = "DialogButtons";
44124
+ var Dialog2 = (t0) => {
44125
+ const $ = (0, import_compiler_runtime26.c)(29);
44126
+ const {
44127
+ children,
44128
+ dialogClosed,
44129
+ closable: t1,
44130
+ title,
44131
+ variant: t2
44132
+ } = t0;
44133
+ const closable = t1 === void 0 ? true : t1;
44134
+ const variant = t2 === void 0 ? "light" : t2;
44135
+ const [dialogRef, setDialogRef] = (0, import_react49.useState)(null);
44136
+ let t3;
44137
+ let t4;
44138
+ if ($[0] !== dialogRef) {
44139
+ t3 = () => {
44140
+ if (!dialogRef) {
44141
+ return;
44142
+ }
44143
+ dialogRef.showModal();
44144
+ };
44145
+ t4 = [dialogRef];
44146
+ $[0] = dialogRef;
44147
+ $[1] = t3;
44148
+ $[2] = t4;
44149
+ } else {
44150
+ t3 = $[1];
44151
+ t4 = $[2];
44152
+ }
44153
+ (0, import_react49.useEffect)(t3, t4);
44154
+ let t5;
44155
+ if ($[3] !== dialogRef) {
44156
+ t5 = () => dialogRef?.close();
44157
+ $[3] = dialogRef;
44158
+ $[4] = t5;
44159
+ } else {
44160
+ t5 = $[4];
44161
+ }
44162
+ const close = t5;
44163
+ let t6;
44164
+ if ($[5] !== closable || $[6] !== dialogClosed) {
44165
+ t6 = (event) => {
44166
+ if (closable) {
44167
+ dialogClosed();
44168
+ return;
44169
+ }
44170
+ event.preventDefault();
44171
+ event.currentTarget.showModal();
44172
+ };
44173
+ $[5] = closable;
44174
+ $[6] = dialogClosed;
44175
+ $[7] = t6;
44176
+ } else {
44177
+ t6 = $[7];
44178
+ }
44179
+ const onClose = t6;
44180
+ let t7;
44181
+ if ($[8] !== close) {
44182
+ t7 = (event_0) => {
44183
+ if (event_0.target === event_0.currentTarget) {
44184
+ close();
44185
+ }
44186
+ };
44187
+ $[8] = close;
44188
+ $[9] = t7;
44189
+ } else {
44190
+ t7 = $[9];
44191
+ }
44192
+ const onMouseDown = t7;
44193
+ let t8;
44194
+ if ($[10] !== variant) {
44195
+ t8 = cn(`
44196
+ max-w-[80vw] min-w-[10vw] border-none p-0 text-sigil-dialog-foreground
44197
+ outline-none backdrop-sigil-dialog
44198
+ `, cnd2(isDarkDialog2(variant), "bg-sigil-bg-dark", "bg-sigil-bg-light"));
44199
+ $[10] = variant;
44200
+ $[11] = t8;
44201
+ } else {
44202
+ t8 = $[11];
44203
+ }
44204
+ let t9;
44205
+ if ($[12] !== title || $[13] !== variant) {
44206
+ t9 = title && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(DialogTitle2, {
44207
+ variant,
44208
+ children: title
44209
+ });
44210
+ $[12] = title;
44211
+ $[13] = variant;
44212
+ $[14] = t9;
44213
+ } else {
44214
+ t9 = $[14];
44215
+ }
44216
+ const t10 = variant === "light-compact" || variant === "dark-compact";
44217
+ let t11;
44218
+ if ($[15] !== t10 || $[16] !== variant) {
44219
+ t11 = cn("text-sigil-foreground", cnd2(t10, "p-0"), cnd2(variant !== "light-compact" && variant !== "dark-compact", "p-arcane"));
44220
+ $[15] = t10;
44221
+ $[16] = variant;
44222
+ $[17] = t11;
44223
+ } else {
44224
+ t11 = $[17];
44225
+ }
44226
+ let t12;
44227
+ if ($[18] !== children || $[19] !== t11) {
44228
+ t12 = /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", {
44229
+ className: t11,
44230
+ children
44231
+ });
44232
+ $[18] = children;
44233
+ $[19] = t11;
44234
+ $[20] = t12;
44235
+ } else {
44236
+ t12 = $[20];
44237
+ }
44238
+ let t13;
44239
+ if ($[21] !== t12 || $[22] !== t9) {
44240
+ t13 = /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", {
44241
+ className: "border border-sigil-border",
44242
+ children: [t9, t12]
44243
+ });
44244
+ $[21] = t12;
44245
+ $[22] = t9;
44246
+ $[23] = t13;
44247
+ } else {
44248
+ t13 = $[23];
44249
+ }
44250
+ let t14;
44251
+ if ($[24] !== onClose || $[25] !== onMouseDown || $[26] !== t13 || $[27] !== t8) {
44252
+ t14 = /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("dialog", {
44253
+ ref: setDialogRef,
44254
+ onMouseDown,
44255
+ onClose,
44256
+ className: t8,
44257
+ children: t13
44258
+ });
44259
+ $[24] = onClose;
44260
+ $[25] = onMouseDown;
44261
+ $[26] = t13;
44262
+ $[27] = t8;
44263
+ $[28] = t14;
44264
+ } else {
44265
+ t14 = $[28];
44266
+ }
44267
+ return t14;
44268
+ };
44269
+
44270
+ // ../../packages/sigil/src/frontend/controls/dialogs.tsx
44271
+ var import_jsx_runtime61 = __toESM(require_jsx_runtime(), 1);
44272
+ var ControlDialogButtons2 = /* @__PURE__ */ (0, import_react50.forwardRef)((t0, ref) => {
44273
+ const $ = (0, import_compiler_runtime27.c)(11);
44274
+ let children;
44275
+ let className;
44276
+ let props;
44277
+ if ($[0] !== t0) {
44278
+ ({
44279
+ children,
44280
+ className,
44281
+ ...props
44282
+ } = t0);
44283
+ $[0] = t0;
44284
+ $[1] = children;
44285
+ $[2] = className;
44286
+ $[3] = props;
44287
+ } else {
44288
+ children = $[1];
44289
+ className = $[2];
44290
+ props = $[3];
44291
+ }
44292
+ let t1;
44293
+ if ($[4] !== className) {
44294
+ t1 = cn(`
44295
+ flex items-stretch gap-1
44296
+ [&>button]:grow
44297
+ `, clsControlPosition2("row"), className);
44298
+ $[4] = className;
44299
+ $[5] = t1;
44300
+ } else {
44301
+ t1 = $[5];
44302
+ }
44303
+ let t2;
44304
+ if ($[6] !== children || $[7] !== props || $[8] !== ref || $[9] !== t1) {
44305
+ t2 = /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", {
44306
+ ref,
44307
+ className: t1,
44308
+ ...props,
44309
+ children
44310
+ });
44311
+ $[6] = children;
44312
+ $[7] = props;
44313
+ $[8] = ref;
44314
+ $[9] = t1;
44315
+ $[10] = t2;
44316
+ } else {
44317
+ t2 = $[10];
44318
+ }
44319
+ return t2;
44320
+ });
44321
+ var ControlDialog2 = (t0) => {
44322
+ const $ = (0, import_compiler_runtime27.c)(12);
44323
+ let children;
44324
+ let large;
44325
+ let props;
44326
+ if ($[0] !== t0) {
44327
+ ({
44328
+ children,
44329
+ large,
44330
+ ...props
44331
+ } = t0);
44332
+ $[0] = t0;
44333
+ $[1] = children;
44334
+ $[2] = large;
44335
+ $[3] = props;
44336
+ } else {
44337
+ children = $[1];
44338
+ large = $[2];
44339
+ props = $[3];
44340
+ }
44341
+ let t1;
44342
+ if ($[4] !== large) {
44343
+ t1 = cn("gap-1 bg-sigil-bg-dark select-none", cnd2(large, "control-grid-large", "control-grid"));
44344
+ $[4] = large;
44345
+ $[5] = t1;
44346
+ } else {
44347
+ t1 = $[5];
44348
+ }
44349
+ let t2;
44350
+ if ($[6] !== children || $[7] !== t1) {
44351
+ t2 = /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", {
44352
+ className: t1,
44353
+ children
44354
+ });
44355
+ $[6] = children;
44356
+ $[7] = t1;
44357
+ $[8] = t2;
44358
+ } else {
44359
+ t2 = $[8];
44360
+ }
44361
+ let t3;
44362
+ if ($[9] !== props || $[10] !== t2) {
44363
+ t3 = /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Dialog2, {
44364
+ ...props,
44365
+ variant: "dark",
44366
+ children: t2
44367
+ });
44368
+ $[9] = props;
44369
+ $[10] = t2;
44370
+ $[11] = t3;
44371
+ } else {
44372
+ t3 = $[11];
44373
+ }
44374
+ return t3;
44375
+ };
44376
+
44377
+ // src/components/frontend/toolbox/root.tsx
44378
+ var import_jsx_runtime62 = __toESM(require_jsx_runtime());
44379
+ var DeleteConfirmationDialog = (t0) => {
44380
+ const $ = (0, import_compiler_runtime28.c)(21);
44381
+ const {
44382
+ dialogMode,
44383
+ setDialogMode
44384
+ } = t0;
44385
+ const {
44386
+ updateConfig
44387
+ } = (0, import_react51.useContext)(ConfigContext);
44388
+ let t1;
44389
+ if ($[0] !== dialogMode.section.type || $[1] !== dialogMode.target || $[2] !== setDialogMode || $[3] !== updateConfig) {
44390
+ t1 = () => {
44391
+ updateConfig((current) => ({
44392
+ ...current,
44393
+ [dialogMode.section.type]: Object.fromEntries(Object.entries(current[dialogMode.section.type]).filter((t22) => {
44394
+ const [uuid] = t22;
44395
+ return uuid !== dialogMode.target.uuid;
44396
+ }))
44397
+ }));
44398
+ setDialogMode(null);
44399
+ };
44400
+ $[0] = dialogMode.section.type;
44401
+ $[1] = dialogMode.target;
44402
+ $[2] = setDialogMode;
44403
+ $[3] = updateConfig;
44404
+ $[4] = t1;
44405
+ } else {
44406
+ t1 = $[4];
44407
+ }
44408
+ const deleteTarget = t1;
44409
+ let t2;
44410
+ if ($[5] !== setDialogMode) {
44411
+ t2 = () => setDialogMode(null);
44412
+ $[5] = setDialogMode;
44413
+ $[6] = t2;
44414
+ } else {
44415
+ t2 = $[6];
44416
+ }
44417
+ const t3 = STRINGS[dialogMode.section.type];
44418
+ const t4 = STRINGS[dialogMode.section.type];
44419
+ let t5;
44420
+ if ($[7] !== t4.deleteDialogDetails) {
44421
+ t5 = /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(ControlDetails, {
44422
+ position: "row",
44423
+ children: t4.deleteDialogDetails
44424
+ });
44425
+ $[7] = t4.deleteDialogDetails;
44426
+ $[8] = t5;
44427
+ } else {
44428
+ t5 = $[8];
44429
+ }
44430
+ let t6;
44431
+ if ($[9] !== setDialogMode) {
44432
+ t6 = /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(ControlButton, {
44433
+ onClick: () => setDialogMode(null),
44434
+ variant: "large",
44435
+ children: "Cancel"
44436
+ });
44437
+ $[9] = setDialogMode;
44438
+ $[10] = t6;
44439
+ } else {
44440
+ t6 = $[10];
44441
+ }
44442
+ let t7;
44443
+ if ($[11] !== deleteTarget) {
44444
+ t7 = /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(ControlButton, {
44445
+ onClick: deleteTarget,
44446
+ variant: "large",
44447
+ destructive: true,
44448
+ icon: "delete",
44449
+ children: "Delete"
44450
+ });
44451
+ $[11] = deleteTarget;
44452
+ $[12] = t7;
44453
+ } else {
44454
+ t7 = $[12];
44455
+ }
44456
+ let t8;
44457
+ if ($[13] !== t6 || $[14] !== t7) {
44458
+ t8 = /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(ControlDialogButtons2, {
44459
+ children: [t6, t7]
44460
+ });
44461
+ $[13] = t6;
44462
+ $[14] = t7;
44463
+ $[15] = t8;
44464
+ } else {
44465
+ t8 = $[15];
44466
+ }
44467
+ let t9;
44468
+ if ($[16] !== t2 || $[17] !== t3.deleteDialog || $[18] !== t5 || $[19] !== t8) {
44469
+ t9 = /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(ControlDialog2, {
44470
+ dialogClosed: t2,
44471
+ title: t3.deleteDialog,
44472
+ children: [t5, t8]
44473
+ });
44474
+ $[16] = t2;
44475
+ $[17] = t3.deleteDialog;
44476
+ $[18] = t5;
44477
+ $[19] = t8;
44478
+ $[20] = t9;
44479
+ } else {
44480
+ t9 = $[20];
44481
+ }
44482
+ return t9;
44483
+ };
44484
+ var ToolboxRoot = (t0) => {
44485
+ const $ = (0, import_compiler_runtime28.c)(43);
44486
+ const {
44487
+ info
44488
+ } = t0;
44489
+ const {
44490
+ config
44491
+ } = info;
44492
+ const {
44493
+ sendMessage,
44494
+ call
44495
+ } = (0, import_react51.useContext)(StageContext);
44496
+ const [dialogMode, setDialogMode] = (0, import_react51.useState)(null);
44497
+ const [assignToOutput, setAssignToOutput] = (0, import_react51.useState)(null);
44498
+ let t1;
44499
+ let t2;
44500
+ if ($[0] !== assignToOutput) {
44501
+ t1 = () => {
44502
+ if (assignToOutput) {
44503
+ const onEscape = (e) => {
44504
+ if (e.key === "Escape") {
44505
+ setAssignToOutput(null);
44506
+ }
44507
+ };
44508
+ window.addEventListener("keydown", onEscape);
44509
+ return () => {
44510
+ window.removeEventListener("keydown", onEscape);
44511
+ };
44512
+ }
44513
+ };
44514
+ t2 = [assignToOutput];
44515
+ $[0] = assignToOutput;
44516
+ $[1] = t1;
44517
+ $[2] = t2;
44518
+ } else {
44519
+ t1 = $[1];
44520
+ t2 = $[2];
44521
+ }
44522
+ (0, import_react51.useEffect)(t1, t2);
44523
+ let t3;
44524
+ if ($[3] !== config || $[4] !== info.key || $[5] !== sendMessage) {
44525
+ t3 = (change) => {
44526
+ const diff = diffJson(config, change(config));
44527
+ sendMessage?.({
44528
+ type: "component-message",
44529
+ namespace: "timecode-toolbox",
44530
+ component: "toolbox-root",
44531
+ componentKey: info.key,
44532
+ action: "update-config",
44533
+ diff
44534
+ });
44535
+ };
44536
+ $[3] = config;
44537
+ $[4] = info.key;
44538
+ $[5] = sendMessage;
44539
+ $[6] = t3;
44540
+ } else {
44541
+ t3 = $[6];
42432
44542
  }
42433
44543
  const updateConfig = t3;
42434
44544
  let t4;
42435
44545
  let t5;
42436
- if ($[7] !== config || $[8] !== updateConfig) {
44546
+ if ($[7] !== config || $[8] !== info.network || $[9] !== updateConfig) {
42437
44547
  t5 = {
42438
44548
  config,
44549
+ network: info.network,
42439
44550
  updateConfig
42440
44551
  };
42441
44552
  $[7] = config;
42442
- $[8] = updateConfig;
42443
- $[9] = t5;
44553
+ $[8] = info.network;
44554
+ $[9] = updateConfig;
44555
+ $[10] = t5;
42444
44556
  } else {
42445
- t5 = $[9];
44557
+ t5 = $[10];
42446
44558
  }
42447
44559
  t4 = t5;
42448
44560
  const configContext = t4;
42449
44561
  let t6;
42450
- if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
42451
- t6 = () => setDialogMode(null);
42452
- $[10] = t6;
42453
- } else {
42454
- t6 = $[10];
42455
- }
42456
- const closeDialog = t6;
42457
- let t7;
42458
44562
  if ($[11] !== call || $[12] !== info.key) {
42459
- t7 = async () => {
44563
+ t6 = async () => {
42460
44564
  if (!call) {
42461
44565
  throw new Error("No call function available");
42462
44566
  }
@@ -42469,34 +44573,34 @@ Data Directory: ${system.dataDirectory}`
42469
44573
  };
42470
44574
  $[11] = call;
42471
44575
  $[12] = info.key;
42472
- $[13] = t7;
44576
+ $[13] = t6;
42473
44577
  } else {
42474
- t7 = $[13];
44578
+ t6 = $[13];
42475
44579
  }
42476
- const getNetworkInterfaces = t7;
44580
+ const getNetworkInterfaces = t6;
44581
+ let t7;
42477
44582
  let t8;
42478
- let t9;
42479
44583
  if ($[14] !== getNetworkInterfaces) {
42480
- t9 = {
44584
+ t8 = {
42481
44585
  getNetworkInterfaces
42482
44586
  };
42483
44587
  $[14] = getNetworkInterfaces;
42484
- $[15] = t9;
44588
+ $[15] = t8;
42485
44589
  } else {
42486
- t9 = $[15];
44590
+ t8 = $[15];
42487
44591
  }
42488
- t8 = t9;
42489
- const networkContextValue = t8;
42490
- let t10;
44592
+ t7 = t8;
44593
+ const networkContextValue = t7;
44594
+ let t9;
42491
44595
  bb0: {
42492
44596
  if (!assignToOutput) {
42493
- t10 = null;
44597
+ t9 = null;
42494
44598
  break bb0;
42495
44599
  }
42496
44600
  const outputUuid = assignToOutput;
42497
- let t112;
44601
+ let t102;
42498
44602
  if ($[16] !== outputUuid || $[17] !== updateConfig) {
42499
- t112 = (id) => {
44603
+ t102 = (id) => {
42500
44604
  updateConfig((current) => {
42501
44605
  const output = current.outputs[outputUuid];
42502
44606
  if (!output) {
@@ -42517,21 +44621,21 @@ Data Directory: ${system.dataDirectory}`
42517
44621
  };
42518
44622
  $[16] = outputUuid;
42519
44623
  $[17] = updateConfig;
42520
- $[18] = t112;
44624
+ $[18] = t102;
42521
44625
  } else {
42522
- t112 = $[18];
44626
+ t102 = $[18];
42523
44627
  }
42524
- t10 = t112;
44628
+ t9 = t102;
42525
44629
  }
42526
- const assignToOutputCallback = t10;
42527
- let t11;
44630
+ const assignToOutputCallback = t9;
44631
+ let t10;
42528
44632
  if ($[19] !== call || $[20] !== info.key) {
42529
- t11 = async (t122) => {
44633
+ t10 = async (t112) => {
42530
44634
  const {
42531
44635
  path,
42532
44636
  handler,
42533
44637
  args
42534
- } = t122;
44638
+ } = t112;
42535
44639
  if (!call) {
42536
44640
  throw new Error("No call function available");
42537
44641
  }
@@ -42547,50 +44651,50 @@ Data Directory: ${system.dataDirectory}`
42547
44651
  };
42548
44652
  $[19] = call;
42549
44653
  $[20] = info.key;
42550
- $[21] = t11;
44654
+ $[21] = t10;
42551
44655
  } else {
42552
- t11 = $[21];
44656
+ t10 = $[21];
42553
44657
  }
42554
- const callHandler = t11;
44658
+ const callHandler = t10;
44659
+ let t11;
42555
44660
  let t12;
42556
- let t13;
42557
44661
  if ($[22] !== callHandler || $[23] !== info.handlers) {
42558
- t13 = {
44662
+ t12 = {
42559
44663
  handlers: info.handlers,
42560
44664
  callHandler
42561
44665
  };
42562
44666
  $[22] = callHandler;
42563
44667
  $[23] = info.handlers;
42564
- $[24] = t13;
44668
+ $[24] = t12;
42565
44669
  } else {
42566
- t13 = $[24];
44670
+ t12 = $[24];
42567
44671
  }
42568
- t12 = t13;
42569
- const handlers = t12;
44672
+ t11 = t12;
44673
+ const handlers = t11;
44674
+ let t13;
42570
44675
  let t14;
42571
- let t15;
42572
44676
  if ($[25] === Symbol.for("react.memo_cache_sentinel")) {
42573
- t15 = getFragmentValue("tc", TIMECODE_INSTANCE_ID);
42574
- $[25] = t15;
44677
+ t14 = getFragmentValue("tc", TIMECODE_INSTANCE_ID);
44678
+ $[25] = t14;
42575
44679
  } else {
42576
- t15 = $[25];
44680
+ t14 = $[25];
42577
44681
  }
42578
- t14 = t15;
42579
- const windowedTimecodeId = t14;
44682
+ t13 = t14;
44683
+ const windowedTimecodeId = t13;
44684
+ let t15;
42580
44685
  let t16;
42581
- let t17;
42582
44686
  if ($[26] !== assignToOutput || $[27] !== assignToOutputCallback || $[28] !== dialogMode || $[29] !== info.license) {
42583
- t17 = windowedTimecodeId ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Layout, {
44687
+ t16 = windowedTimecodeId ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Layout, {
42584
44688
  modes: null,
42585
- children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(FullscreenTimecodeDisplay, {
44689
+ children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(FullscreenTimecodeDisplay, {
42586
44690
  id: windowedTimecodeId
42587
44691
  })
42588
- }) : /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, {
42589
- children: [/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Layout, {
44692
+ }) : /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, {
44693
+ children: [/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Layout, {
42590
44694
  footer: true,
42591
44695
  modes: {
42592
44696
  license: {
42593
- child: (setWindowMode) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(License, {
44697
+ child: (setWindowMode) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(License, {
42594
44698
  license: info.license,
42595
44699
  setWindowMode
42596
44700
  }),
@@ -42598,121 +44702,126 @@ Data Directory: ${system.dataDirectory}`
42598
44702
  title: STRINGS.license
42599
44703
  },
42600
44704
  settings: {
42601
- child: _temp5,
44705
+ child: _temp6,
42602
44706
  icon: "settings",
42603
44707
  title: STRINGS.settings.title
42604
44708
  },
42605
44709
  debug: {
42606
- child: _temp24,
44710
+ child: _temp25,
42607
44711
  icon: "bug_report",
42608
44712
  title: STRINGS.debugger
42609
44713
  }
42610
44714
  },
42611
44715
  licenseMode: "license",
42612
- children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, {
42613
- children: [/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(UpdateBanner, {}), /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", {
44716
+ children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, {
44717
+ children: [/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(UpdateBanner, {}), /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", {
42614
44718
  className: "\n flex h-0 grow flex-col gap-px overflow-y-auto bg-sigil-border\n scrollbar-sigil\n ",
42615
- children: [/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(InputsSection, {
44719
+ children: [/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(InputsSection, {
42616
44720
  setDialogMode,
42617
44721
  assignToOutput: assignToOutputCallback
42618
- }), /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(GeneratorsSection, {
44722
+ }), /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(GeneratorsSection, {
42619
44723
  setDialogMode,
42620
44724
  assignToOutput: assignToOutputCallback
42621
- }), /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(OutputsSection, {
44725
+ }), /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(OutputsSection, {
42622
44726
  setDialogMode,
42623
44727
  assignToOutput,
42624
44728
  setAssignToOutput
42625
44729
  })]
42626
44730
  })]
42627
44731
  })
42628
- }), dialogMode?.section.type === "inputs" && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(InputSettingsDialog, {
42629
- close: closeDialog,
42630
- input: dialogMode.section.input,
42631
- target: dialogMode.target
42632
- }), dialogMode?.section.type === "generators" && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(GeneratorSettingsDialog, {
42633
- close: closeDialog,
42634
- generator: dialogMode.section.generator,
42635
- target: dialogMode.target
42636
- }), dialogMode?.section.type === "outputs" && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(OutputSettingsDialog, {
42637
- close: closeDialog,
42638
- output: dialogMode.section.output,
42639
- target: dialogMode.target
44732
+ }), isDeleteDialogMode(dialogMode) ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(DeleteConfirmationDialog, {
44733
+ dialogMode,
44734
+ setDialogMode
44735
+ }) : /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, {
44736
+ children: [dialogMode?.section.type === "inputs" && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(InputSettingsDialog, {
44737
+ setDialogMode,
44738
+ input: dialogMode.section.input,
44739
+ target: dialogMode.target
44740
+ }), dialogMode?.section.type === "generators" && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(GeneratorSettingsDialog, {
44741
+ setDialogMode,
44742
+ generator: dialogMode.section.generator,
44743
+ target: dialogMode.target
44744
+ }), dialogMode?.section.type === "outputs" && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(OutputSettingsDialog, {
44745
+ setDialogMode,
44746
+ output: dialogMode.section.output,
44747
+ target: dialogMode.target
44748
+ })]
42640
44749
  })]
42641
44750
  });
42642
44751
  $[26] = assignToOutput;
42643
44752
  $[27] = assignToOutputCallback;
42644
44753
  $[28] = dialogMode;
42645
44754
  $[29] = info.license;
42646
- $[30] = t17;
44755
+ $[30] = t16;
42647
44756
  } else {
42648
- t17 = $[30];
44757
+ t16 = $[30];
42649
44758
  }
42650
- t16 = t17;
42651
- const root = t16;
42652
- let t18;
44759
+ t15 = t16;
44760
+ const root = t15;
44761
+ let t17;
42653
44762
  if ($[31] !== handlers || $[32] !== root) {
42654
- t18 = /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ApplicationHandlersContext.Provider, {
44763
+ t17 = /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(ApplicationHandlersContext.Provider, {
42655
44764
  value: handlers,
42656
44765
  children: root
42657
44766
  });
42658
44767
  $[31] = handlers;
42659
44768
  $[32] = root;
42660
- $[33] = t18;
44769
+ $[33] = t17;
42661
44770
  } else {
42662
- t18 = $[33];
44771
+ t17 = $[33];
42663
44772
  }
42664
- let t19;
42665
- if ($[34] !== info.state || $[35] !== t18) {
42666
- t19 = /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ApplicationStateContext.Provider, {
44773
+ let t18;
44774
+ if ($[34] !== info.state || $[35] !== t17) {
44775
+ t18 = /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(ApplicationStateContext.Provider, {
42667
44776
  value: info.state,
42668
- children: t18
44777
+ children: t17
42669
44778
  });
42670
44779
  $[34] = info.state;
42671
- $[35] = t18;
42672
- $[36] = t19;
44780
+ $[35] = t17;
44781
+ $[36] = t18;
42673
44782
  } else {
42674
- t19 = $[36];
44783
+ t18 = $[36];
42675
44784
  }
42676
- let t20;
42677
- if ($[37] !== networkContextValue || $[38] !== t19) {
42678
- t20 = /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(NetworkContext.Provider, {
44785
+ let t19;
44786
+ if ($[37] !== networkContextValue || $[38] !== t18) {
44787
+ t19 = /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(NetworkContext.Provider, {
42679
44788
  value: networkContextValue,
42680
- children: t19
44789
+ children: t18
42681
44790
  });
42682
44791
  $[37] = networkContextValue;
42683
- $[38] = t19;
42684
- $[39] = t20;
44792
+ $[38] = t18;
44793
+ $[39] = t19;
42685
44794
  } else {
42686
- t20 = $[39];
44795
+ t19 = $[39];
42687
44796
  }
42688
- let t21;
42689
- if ($[40] !== configContext || $[41] !== t20) {
42690
- t21 = /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ConfigContext.Provider, {
44797
+ let t20;
44798
+ if ($[40] !== configContext || $[41] !== t19) {
44799
+ t20 = /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(ConfigContext.Provider, {
42691
44800
  value: configContext,
42692
- children: t20
44801
+ children: t19
42693
44802
  });
42694
44803
  $[40] = configContext;
42695
- $[41] = t20;
42696
- $[42] = t21;
44804
+ $[41] = t19;
44805
+ $[42] = t20;
42697
44806
  } else {
42698
- t21 = $[42];
44807
+ t20 = $[42];
42699
44808
  }
42700
- return t21;
44809
+ return t20;
42701
44810
  };
42702
- function _temp5(setWindowMode_0) {
42703
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Settings, {
44811
+ function _temp6(setWindowMode_0) {
44812
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Settings, {
42704
44813
  setWindowMode: setWindowMode_0
42705
44814
  });
42706
44815
  }
42707
- function _temp24() {
42708
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Debugger, {
44816
+ function _temp25() {
44817
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Debugger, {
42709
44818
  title: STRINGS.debugger,
42710
44819
  className: "size-full"
42711
44820
  });
42712
44821
  }
42713
44822
 
42714
44823
  // src/components/frontend/index.tsx
42715
- var import_jsx_runtime56 = __toESM(require_jsx_runtime());
44824
+ var import_jsx_runtime63 = __toESM(require_jsx_runtime());
42716
44825
  var timecodeToolboxFrontendComponents = () => ({
42717
44826
  namespace: NAMESPACE,
42718
44827
  render: (info) => {
@@ -42721,11 +44830,11 @@ Data Directory: ${system.dataDirectory}`
42721
44830
  }
42722
44831
  switch (info.component) {
42723
44832
  case "toolbox-root":
42724
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(ToolboxRoot, {
44833
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(ToolboxRoot, {
42725
44834
  info
42726
44835
  });
42727
44836
  case "license-gate":
42728
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(LicenseGate, {
44837
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(LicenseGate, {
42729
44838
  info
42730
44839
  });
42731
44840
  }
@@ -42735,7 +44844,7 @@ Data Directory: ${system.dataDirectory}`
42735
44844
  startSigilFrontend({
42736
44845
  browser,
42737
44846
  appRenderers: [timecodeToolboxFrontendComponents()],
42738
- loadingState: () => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", {
44847
+ loadingState: () => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", {
42739
44848
  style: {
42740
44849
  width: "100%",
42741
44850
  textAlign: "center",
@@ -42746,6 +44855,7 @@ Data Directory: ${system.dataDirectory}`
42746
44855
  });
42747
44856
  };
42748
44857
  window.startTimecodeToolboxServerFrontend = startTimecodeToolboxServerFrontend;
44858
+ window.createBrowserMediaSession = createBrowserMediaSession;
42749
44859
  })();
42750
44860
  /*! Bundled license information:
42751
44861