@nice2dev/ui-video 1.0.28 → 1.0.29

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.
Files changed (3) hide show
  1. package/dist/index.cjs +2 -2
  2. package/dist/index.mjs +1354 -1290
  3. package/package.json +3 -2
package/dist/index.mjs CHANGED
@@ -1,18 +1,88 @@
1
- import { jsx as e, jsxs as r, Fragment as ie } from "react/jsx-runtime";
2
- import { useContext as ye, createContext as $, memo as Se, useState as v, useEffect as ne, useRef as F, useCallback as me } from "react";
3
- const He = (l, m) => m, Te = $(He);
4
- function Ie() {
5
- return { t: ye(Te) };
1
+ import { jsxs as a, jsx as e, Fragment as le } from "react/jsx-runtime";
2
+ import { forwardRef as He, useContext as ye, createContext as $, memo as Te, useState as w, useEffect as re, useRef as L, useCallback as me } from "react";
3
+ const he = He(
4
+ ({
5
+ menubar: d,
6
+ toolbar: f,
7
+ sidebar: l,
8
+ sidebarWidth: C = 220,
9
+ rightSidebar: H,
10
+ rightSidebarWidth: I = 280,
11
+ children: p,
12
+ bottomPanel: n,
13
+ bottomPanelHeight: R,
14
+ statusBar: b,
15
+ height: D = "100%",
16
+ flush: y = !1,
17
+ className: x,
18
+ style: S,
19
+ id: A,
20
+ "data-testid": _
21
+ }, O) => {
22
+ const F = `nice-app-shell__sidebar${y ? " nice-app-shell__sidebar--flush" : ""}`;
23
+ return /* @__PURE__ */ a(
24
+ "div",
25
+ {
26
+ ref: O,
27
+ id: A,
28
+ "data-testid": _,
29
+ className: `nice-app-shell${x ? ` ${x}` : ""}`,
30
+ style: { height: D, ...S },
31
+ children: [
32
+ d != null && /* @__PURE__ */ e(
33
+ "div",
34
+ {
35
+ className: `nice-app-shell__menubar${y ? " nice-app-shell__chrome--flush" : ""}`,
36
+ children: d
37
+ }
38
+ ),
39
+ f != null && /* @__PURE__ */ e(
40
+ "div",
41
+ {
42
+ className: `nice-app-shell__toolbar${y ? " nice-app-shell__chrome--flush" : ""}`,
43
+ children: f
44
+ }
45
+ ),
46
+ /* @__PURE__ */ a("div", { className: "nice-app-shell__body", children: [
47
+ l != null && /* @__PURE__ */ e("aside", { className: F, style: y ? void 0 : { width: C }, children: l }),
48
+ /* @__PURE__ */ e("main", { className: "nice-app-shell__content", children: p }),
49
+ H != null && /* @__PURE__ */ e(
50
+ "aside",
51
+ {
52
+ className: `${F} nice-app-shell__sidebar--right`,
53
+ style: y ? void 0 : { width: I },
54
+ children: H
55
+ }
56
+ )
57
+ ] }),
58
+ n != null && /* @__PURE__ */ e(
59
+ "div",
60
+ {
61
+ className: `nice-app-shell__bottom${y ? " nice-app-shell__bottom--flush" : ""}`,
62
+ style: R != null ? { height: R } : void 0,
63
+ children: n
64
+ }
65
+ ),
66
+ b != null && /* @__PURE__ */ e("div", { className: "nice-app-shell__status", children: b })
67
+ ]
68
+ }
69
+ );
70
+ }
71
+ );
72
+ he.displayName = "NiceAppShell";
73
+ const Ie = (d, f) => f, _e = $(Ie);
74
+ function Re() {
75
+ return { t: ye(_e) };
6
76
  }
7
77
  $({
8
78
  dir: "ltr",
9
79
  isRTL: !1,
10
- flip: (l) => l,
11
- value: (l) => l.ltr
80
+ flip: (d) => d,
81
+ value: (d) => d.ltr
12
82
  });
13
83
  $(null);
14
84
  $(null);
15
- const Re = {
85
+ const Me = {
16
86
  radius: "md",
17
87
  shadow: "md",
18
88
  fill: "solid",
@@ -31,7 +101,7 @@ const Re = {
31
101
  };
32
102
  $({
33
103
  displayStyle: "default",
34
- variantConfig: Re,
104
+ variantConfig: Me,
35
105
  setDisplayStyle: () => {
36
106
  }
37
107
  });
@@ -39,103 +109,103 @@ $({});
39
109
  $({
40
110
  direction: "ltr",
41
111
  isRTL: !1,
42
- flip: (l) => l,
43
- flipStyle: (l, m) => ({ [l]: m })
112
+ flip: (d) => d,
113
+ flipStyle: (d, f) => ({ [d]: f })
44
114
  });
45
115
  $({
46
116
  permissions: {},
47
117
  getAccessMode: () => "full"
48
118
  });
49
119
  $(null);
50
- const Me = process.env.NODE_ENV === "development";
51
- let he = {
52
- enabled: Me,
120
+ const $e = process.env.NODE_ENV === "development";
121
+ let be = {
122
+ enabled: $e,
53
123
  slowRenderThreshold: 16
54
124
  };
55
- const be = [], pe = /* @__PURE__ */ new Map(), ve = /* @__PURE__ */ new Map();
125
+ const ve = [], pe = /* @__PURE__ */ new Map(), ge = /* @__PURE__ */ new Map();
56
126
  function De() {
57
- be.length = 0, pe.clear(), ve.clear();
127
+ ve.length = 0, pe.clear(), ge.clear();
58
128
  }
59
- function _e(l) {
60
- const m = he.slowRenderThreshold;
61
- return be.filter((f) => f.actualDuration > m);
129
+ function Ae(d) {
130
+ const f = be.slowRenderThreshold;
131
+ return ve.filter((l) => l.actualDuration > f);
62
132
  }
63
- function ae(l) {
64
- return l < 1 ? `${(l * 1e3).toFixed(0)}μs` : l < 1e3 ? `${l.toFixed(2)}ms` : `${(l / 1e3).toFixed(2)}s`;
133
+ function Q(d) {
134
+ return d < 1 ? `${(d * 1e3).toFixed(0)}μs` : d < 1e3 ? `${d.toFixed(2)}ms` : `${(d / 1e3).toFixed(2)}s`;
65
135
  }
66
- function $e() {
67
- const l = Array.from(pe.values()), m = _e(), f = l.reduce((I, p) => I + p.renderCount, 0), C = l.length > 0 ? l.reduce((I, p) => I + p.avgRenderTime, 0) / l.length : 0, T = Array.from(ve.values());
68
- return { stats: l, slowRenders: m, totalRenders: f, avgRenderTime: C, marks: T };
136
+ function Ee() {
137
+ const d = Array.from(pe.values()), f = Ae(), l = d.reduce((I, p) => I + p.renderCount, 0), C = d.length > 0 ? d.reduce((I, p) => I + p.avgRenderTime, 0) / d.length : 0, H = Array.from(ge.values());
138
+ return { stats: d, slowRenders: f, totalRenders: l, avgRenderTime: C, marks: H };
69
139
  }
70
- function Ae() {
71
- const l = $e();
140
+ function ze() {
141
+ const d = Ee();
72
142
  console.group(
73
143
  "%c[Nice2Dev Performance Report]",
74
144
  "color: var(--nice-info, #6366f1); font-weight: bold; font-size: 14px"
75
- ), console.log(`Total renders: ${l.totalRenders}`), console.log(`Average render time: ${ae(l.avgRenderTime)}`), console.log(`Slow renders: ${l.slowRenders.length}`), console.group("Component Stats"), console.table(
76
- l.stats.sort((m, f) => f.totalRenderTime - m.totalRenderTime).map((m) => ({
77
- Name: m.componentName,
78
- Renders: m.renderCount,
79
- "Avg Time": ae(m.avgRenderTime),
80
- "Max Time": ae(m.maxRenderTime),
81
- "Total Time": ae(m.totalRenderTime),
82
- "Slow Renders": m.slowRenderCount
145
+ ), console.log(`Total renders: ${d.totalRenders}`), console.log(`Average render time: ${Q(d.avgRenderTime)}`), console.log(`Slow renders: ${d.slowRenders.length}`), console.group("Component Stats"), console.table(
146
+ d.stats.sort((f, l) => l.totalRenderTime - f.totalRenderTime).map((f) => ({
147
+ Name: f.componentName,
148
+ Renders: f.renderCount,
149
+ "Avg Time": Q(f.avgRenderTime),
150
+ "Max Time": Q(f.maxRenderTime),
151
+ "Total Time": Q(f.totalRenderTime),
152
+ "Slow Renders": f.slowRenderCount
83
153
  }))
84
- ), console.groupEnd(), l.slowRenders.length > 0 && (console.group("Slow Renders (last 10)"), console.table(
85
- l.slowRenders.slice(-10).map((m) => ({
86
- Component: m.componentName,
87
- Phase: m.phase,
88
- Duration: ae(m.actualDuration),
89
- Time: new Date(m.timestamp).toLocaleTimeString()
154
+ ), console.groupEnd(), d.slowRenders.length > 0 && (console.group("Slow Renders (last 10)"), console.table(
155
+ d.slowRenders.slice(-10).map((f) => ({
156
+ Component: f.componentName,
157
+ Phase: f.phase,
158
+ Duration: Q(f.actualDuration),
159
+ Time: new Date(f.timestamp).toLocaleTimeString()
90
160
  }))
91
- ), console.groupEnd()), l.marks.length > 0 && (console.group("Custom Marks"), console.table(
92
- l.marks.filter((m) => m.duration).map((m) => ({
93
- Name: m.name,
94
- Duration: ae(m.duration)
161
+ ), console.groupEnd()), d.marks.length > 0 && (console.group("Custom Marks"), console.table(
162
+ d.marks.filter((f) => f.duration).map((f) => ({
163
+ Name: f.name,
164
+ Duration: Q(f.duration)
95
165
  }))
96
166
  ), console.groupEnd()), console.groupEnd();
97
167
  }
98
- const Ee = Se(
99
- ({ position: l = "bottom-right", defaultCollapsed: m = !0 }) => {
100
- const [f, C] = v(m), [T, I] = v([]), [p, i] = v({ used: 0, total: 0 });
101
- if (ne(() => {
168
+ const Pe = Te(
169
+ ({ position: d = "bottom-right", defaultCollapsed: f = !0 }) => {
170
+ const [l, C] = w(f), [H, I] = w([]), [p, n] = w({ used: 0, total: 0 });
171
+ if (re(() => {
102
172
  const b = () => {
103
173
  const y = Array.from(pe.values());
104
- I(y.sort((S, z) => z.totalRenderTime - S.totalRenderTime).slice(0, 10));
105
- const k = window.performance;
106
- k.memory && i({
107
- used: k.memory.usedJSHeapSize / 1024 / 1024,
108
- total: k.memory.totalJSHeapSize / 1024 / 1024
174
+ I(y.sort((S, A) => A.totalRenderTime - S.totalRenderTime).slice(0, 10));
175
+ const x = window.performance;
176
+ x.memory && n({
177
+ used: x.memory.usedJSHeapSize / 1024 / 1024,
178
+ total: x.memory.totalJSHeapSize / 1024 / 1024
109
179
  });
110
180
  };
111
181
  b();
112
- const E = setInterval(b, 2e3);
113
- return () => clearInterval(E);
114
- }, []), !he.enabled)
182
+ const D = setInterval(b, 2e3);
183
+ return () => clearInterval(D);
184
+ }, []), !be.enabled)
115
185
  return null;
116
- const D = {
186
+ const R = {
117
187
  position: "fixed",
118
188
  zIndex: 99999,
119
- ...l.includes("top") ? { top: 8 } : { bottom: 8 },
120
- ...l.includes("left") ? { left: 8 } : { right: 8 }
189
+ ...d.includes("top") ? { top: 8 } : { bottom: 8 },
190
+ ...d.includes("left") ? { left: 8 } : { right: 8 }
121
191
  };
122
- return /* @__PURE__ */ r(
192
+ return /* @__PURE__ */ a(
123
193
  "div",
124
194
  {
125
195
  style: {
126
- ...D,
196
+ ...R,
127
197
  background: "var(--nice-overlay-85, rgba(0, 0, 0, 0.85))",
128
198
  color: "var(--bg-primary, #fff)",
129
199
  borderRadius: 8,
130
200
  fontSize: 11,
131
201
  fontFamily: "Monaco, Consolas, monospace",
132
- padding: f ? "4px 8px" : 8,
133
- maxWidth: f ? "auto" : 300,
134
- maxHeight: f ? "auto" : 400,
202
+ padding: l ? "4px 8px" : 8,
203
+ maxWidth: l ? "auto" : 300,
204
+ maxHeight: l ? "auto" : 400,
135
205
  overflow: "auto"
136
206
  },
137
207
  children: [
138
- /* @__PURE__ */ r(
208
+ /* @__PURE__ */ a(
139
209
  "div",
140
210
  {
141
211
  style: { cursor: "pointer", display: "flex", alignItems: "center", gap: 8 },
@@ -143,7 +213,7 @@ const Ee = Se(
143
213
  children: [
144
214
  /* @__PURE__ */ e("span", { style: { color: "var(--color-success, #22c55e)" }, children: "●" }),
145
215
  /* @__PURE__ */ e("span", { children: "Profiler" }),
146
- p.used > 0 && /* @__PURE__ */ r(
216
+ p.used > 0 && /* @__PURE__ */ a(
147
217
  "span",
148
218
  {
149
219
  style: {
@@ -155,11 +225,11 @@ const Ee = Se(
155
225
  ]
156
226
  }
157
227
  ),
158
- /* @__PURE__ */ e("span", { style: { marginLeft: "auto", opacity: 0.5 }, children: f ? "▼" : "▲" })
228
+ /* @__PURE__ */ e("span", { style: { marginLeft: "auto", opacity: 0.5 }, children: l ? "▼" : "▲" })
159
229
  ]
160
230
  }
161
231
  ),
162
- !f && /* @__PURE__ */ r("div", { style: { marginTop: 8 }, children: [
232
+ !l && /* @__PURE__ */ a("div", { style: { marginTop: 8 }, children: [
163
233
  /* @__PURE__ */ e(
164
234
  "div",
165
235
  {
@@ -171,7 +241,7 @@ const Ee = Se(
171
241
  children: /* @__PURE__ */ e("strong", { children: "Top Components" })
172
242
  }
173
243
  ),
174
- T.map((b) => /* @__PURE__ */ r("div", { style: { marginBottom: 4, display: "flex", gap: 8 }, children: [
244
+ H.map((b) => /* @__PURE__ */ a("div", { style: { marginBottom: 4, display: "flex", gap: 8 }, children: [
175
245
  /* @__PURE__ */ e("span", { style: { flex: 1, overflow: "hidden", textOverflow: "ellipsis" }, children: b.componentName }),
176
246
  /* @__PURE__ */ e(
177
247
  "span",
@@ -179,10 +249,10 @@ const Ee = Se(
179
249
  style: {
180
250
  color: b.avgRenderTime > 16 ? "var(--color-warning, #f59e0b)" : "var(--color-success, #22c55e)"
181
251
  },
182
- children: ae(b.avgRenderTime)
252
+ children: Q(b.avgRenderTime)
183
253
  }
184
254
  ),
185
- /* @__PURE__ */ r(
255
+ /* @__PURE__ */ a(
186
256
  "span",
187
257
  {
188
258
  style: { color: "var(--text-muted, #64748b)", minWidth: 30, textAlign: "right" },
@@ -193,11 +263,11 @@ const Ee = Se(
193
263
  }
194
264
  )
195
265
  ] }, b.componentName)),
196
- /* @__PURE__ */ r("div", { style: { marginTop: 8, display: "flex", gap: 8 }, children: [
266
+ /* @__PURE__ */ a("div", { style: { marginTop: 8, display: "flex", gap: 8 }, children: [
197
267
  /* @__PURE__ */ e(
198
268
  "button",
199
269
  {
200
- onClick: Ae,
270
+ onClick: ze,
201
271
  style: {
202
272
  flex: 1,
203
273
  padding: "4px 8px",
@@ -235,70 +305,70 @@ const Ee = Se(
235
305
  );
236
306
  }
237
307
  );
238
- Ee.displayName = "ProfilerOverlay";
308
+ Pe.displayName = "ProfilerOverlay";
239
309
  process.env.NODE_ENV;
240
310
  $(null);
241
- const ze = $({
311
+ const Ue = $({
242
312
  enabled: !0,
243
313
  active: !1,
244
314
  run: () => {
245
315
  }
246
316
  });
247
- function Pe() {
248
- return ye(ze);
317
+ function Fe() {
318
+ return ye(Ue);
249
319
  }
250
- function Ue(l, m) {
251
- if (!l)
320
+ function Le(d, f) {
321
+ if (!d)
252
322
  return null;
253
- if (l === !0)
254
- return m && m.length > 0 ? m : null;
255
- if (Array.isArray(l))
256
- return l.length > 0 ? l : null;
257
- const f = l.steps ?? m;
258
- return f && f.length > 0 ? f : null;
323
+ if (d === !0)
324
+ return f && f.length > 0 ? f : null;
325
+ if (Array.isArray(d))
326
+ return d.length > 0 ? d : null;
327
+ const l = d.steps ?? f;
328
+ return l && l.length > 0 ? l : null;
259
329
  }
260
- function Fe(l, m) {
261
- return l.map((f) => ({
262
- target: f.target,
263
- title: f.titleKey ? m(f.titleKey, f.title ?? "") : f.title ?? "",
264
- content: f.contentKey ? m(f.contentKey, f.content ?? "") : f.content ?? "",
265
- placement: f.placement,
266
- highlightPadding: f.highlightPadding,
267
- showArrow: f.showArrow,
268
- scrollIntoView: f.scrollIntoView,
269
- disableInteraction: f.disableInteraction
330
+ function Ve(d, f) {
331
+ return d.map((l) => ({
332
+ target: l.target,
333
+ title: l.titleKey ? f(l.titleKey, l.title ?? "") : l.title ?? "",
334
+ content: l.contentKey ? f(l.contentKey, l.content ?? "") : l.content ?? "",
335
+ placement: l.placement,
336
+ highlightPadding: l.highlightPadding,
337
+ showArrow: l.showArrow,
338
+ scrollIntoView: l.scrollIntoView,
339
+ disableInteraction: l.disableInteraction
270
340
  }));
271
341
  }
272
- const Le = ({
273
- steps: l,
274
- autoStart: m,
275
- label: f,
342
+ const Oe = ({
343
+ steps: d,
344
+ autoStart: f,
345
+ label: l,
276
346
  size: C = "md",
277
- className: T,
347
+ className: H,
278
348
  style: I,
279
349
  "data-testid": p
280
350
  }) => {
281
- const { enabled: i, run: D } = Pe(), { t: b } = Ie();
282
- if (!i || !l || l.length === 0)
351
+ const { enabled: n, run: R } = Fe(), { t: b } = Re();
352
+ if (!n || !d || d.length === 0)
283
353
  return null;
284
- const E = f ?? b("tutorial.startAria", "Start tutorial");
354
+ const D = l ?? b("tutorial.startAria", "Start tutorial");
285
355
  return /* @__PURE__ */ e(
286
356
  "button",
287
357
  {
288
358
  type: "button",
289
- className: `nice-tutorial-button nice-tutorial-button--${C}` + (T ? ` ${T}` : ""),
359
+ className: `nice-tutorial-button nice-tutorial-button--${C}` + (H ? ` ${H}` : ""),
290
360
  style: I,
291
361
  "data-testid": p,
292
- "aria-label": E,
293
- title: E,
294
- onClick: () => D(Fe(l, b), { autoStart: m }),
362
+ "aria-label": D,
363
+ title: D,
364
+ onClick: () => R(Ve(d, b), { autoStart: f }),
295
365
  children: "?"
296
366
  }
297
367
  );
298
368
  }, ue = "nice-tutorial-button-styles";
299
369
  if (typeof document < "u" && !document.getElementById(ue)) {
300
- const l = document.createElement("style");
301
- l.id = ue, l.textContent = `
370
+ const d = document.createElement("style");
371
+ d.id = ue, d.textContent = `
302
372
  .nice-tutorial-button {
303
373
  display: inline-flex;
304
374
  align-items: center;
@@ -324,12 +394,12 @@ if (typeof document < "u" && !document.getElementById(ue)) {
324
394
  }
325
395
  .nice-tutorial-button--sm { width: 16px; height: 16px; font-size: 11px; }
326
396
  .nice-tutorial-button--md { width: 20px; height: 20px; font-size: 12px; }
327
- `, document.head.appendChild(l);
397
+ `, document.head.appendChild(d);
328
398
  }
329
399
  $(null);
330
400
  $(null);
331
401
  $(null);
332
- const ge = {
402
+ const we = {
333
403
  space1: "4px",
334
404
  space2: "8px",
335
405
  space3: "12px",
@@ -337,7 +407,7 @@ const ge = {
337
407
  space5: "20px",
338
408
  space6: "24px",
339
409
  space8: "32px"
340
- }, we = {
410
+ }, Ne = {
341
411
  fontFamily: "'Inter', system-ui, -apple-system, sans-serif",
342
412
  fontSizeXs: "0.75rem",
343
413
  fontSizeSm: "0.8125rem",
@@ -349,71 +419,71 @@ const ge = {
349
419
  fontWeightSemibold: 600,
350
420
  fontWeightBold: 700,
351
421
  lineHeight: 1.5
352
- }, Ne = { fast: "120ms ease", normal: "200ms ease", slow: "300ms ease" }, ke = (l) => ({
353
- color: l,
422
+ }, ke = { fast: "120ms ease", normal: "200ms ease", slow: "300ms ease" }, xe = (d) => ({
423
+ color: d,
354
424
  radiusSm: "4px",
355
425
  radiusMd: "6px",
356
426
  radiusLg: "8px",
357
427
  radiusXl: "12px",
358
428
  radiusFull: "9999px"
359
- }), Ve = {
429
+ }), Be = {
360
430
  sm: "0 1px 2px rgba(0,0,0,0.05)",
361
431
  md: "0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",
362
432
  lg: "0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",
363
433
  xl: "0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)"
364
- }, Oe = {
434
+ }, We = {
365
435
  sm: "0 1px 2px rgba(0,0,0,0.3)",
366
436
  md: "0 4px 6px -1px rgba(0,0,0,0.4)",
367
437
  lg: "0 10px 15px -3px rgba(0,0,0,0.4)",
368
438
  xl: "0 20px 25px -5px rgba(0,0,0,0.4)"
369
439
  };
370
- function d(l, m, f, C, T) {
440
+ function c(d, f, l, C, H) {
371
441
  return {
372
- name: l,
442
+ name: d,
373
443
  darkMode: "light",
374
444
  colors: {
375
- ...m,
376
- surface: m.surface ?? f.primary,
377
- surfaceHover: m.surfaceHover ?? f.secondary
445
+ ...f,
446
+ surface: f.surface ?? l.primary,
447
+ surfaceHover: f.surfaceHover ?? l.secondary
378
448
  },
379
449
  backgrounds: {
380
- ...f,
381
- elevated: f.elevated ?? f.primary,
382
- inset: f.inset ?? f.tertiary,
383
- canvas: f.canvas ?? f.primary
450
+ ...l,
451
+ elevated: l.elevated ?? l.primary,
452
+ inset: l.inset ?? l.tertiary,
453
+ canvas: l.canvas ?? l.primary
384
454
  },
385
455
  text: { ...C, inverse: C.inverse ?? "#ffffff" },
386
- borders: ke(T),
387
- shadows: Ve,
388
- spacing: ge,
389
- typography: we,
390
- transitions: Ne
456
+ borders: xe(H),
457
+ shadows: Be,
458
+ spacing: we,
459
+ typography: Ne,
460
+ transitions: ke
391
461
  };
392
462
  }
393
- function x(l, m, f, C, T) {
463
+ function T(d, f, l, C, H) {
394
464
  return {
395
- name: l,
465
+ name: d,
396
466
  darkMode: "dark",
397
467
  colors: {
398
- ...m,
399
- surface: m.surface ?? f.secondary,
400
- surfaceHover: m.surfaceHover ?? f.tertiary
468
+ ...f,
469
+ surface: f.surface ?? l.secondary,
470
+ surfaceHover: f.surfaceHover ?? l.tertiary
401
471
  },
402
472
  backgrounds: {
403
- ...f,
404
- elevated: f.elevated ?? f.secondary,
405
- inset: f.inset ?? f.primary,
406
- canvas: f.canvas ?? f.primary
473
+ ...l,
474
+ elevated: l.elevated ?? l.secondary,
475
+ inset: l.inset ?? l.primary,
476
+ canvas: l.canvas ?? l.primary
407
477
  },
408
478
  text: { ...C, inverse: C.inverse ?? "#0f172a" },
409
- borders: ke(T),
410
- shadows: Oe,
411
- spacing: ge,
412
- typography: we,
413
- transitions: Ne
479
+ borders: xe(H),
480
+ shadows: We,
481
+ spacing: we,
482
+ typography: Ne,
483
+ transitions: ke
414
484
  };
415
485
  }
416
- d(
486
+ c(
417
487
  "Slate",
418
488
  {
419
489
  primary: "#64748b",
@@ -427,7 +497,7 @@ d(
427
497
  { primary: "#1e293b", secondary: "#475569", muted: "#94a3b8" },
428
498
  "#cbd5e1"
429
499
  );
430
- d(
500
+ c(
431
501
  "Zinc",
432
502
  {
433
503
  primary: "#71717a",
@@ -441,7 +511,7 @@ d(
441
511
  { primary: "#18181b", secondary: "#3f3f46", muted: "#a1a1aa" },
442
512
  "#d4d4d8"
443
513
  );
444
- d(
514
+ c(
445
515
  "Stone",
446
516
  {
447
517
  primary: "#78716c",
@@ -455,7 +525,7 @@ d(
455
525
  { primary: "#1c1917", secondary: "#44403c", muted: "#a8a29e" },
456
526
  "#d6d3d1"
457
527
  );
458
- d(
528
+ c(
459
529
  "Cool Gray",
460
530
  {
461
531
  primary: "#6b7280",
@@ -469,7 +539,7 @@ d(
469
539
  { primary: "#111827", secondary: "#374151", muted: "#9ca3af" },
470
540
  "#d1d5db"
471
541
  );
472
- d(
542
+ c(
473
543
  "Warm Gray",
474
544
  {
475
545
  primary: "#7c7568",
@@ -483,7 +553,7 @@ d(
483
553
  { primary: "#1f1d19", secondary: "#4a463d", muted: "#a09888" },
484
554
  "#d4d0c8"
485
555
  );
486
- d(
556
+ c(
487
557
  "Silver",
488
558
  {
489
559
  primary: "#94a3b8",
@@ -497,7 +567,7 @@ d(
497
567
  { primary: "#334155", secondary: "#64748b", muted: "#94a3b8" },
498
568
  "#cbd5e1"
499
569
  );
500
- d(
570
+ c(
501
571
  "Charcoal",
502
572
  {
503
573
  primary: "#374151",
@@ -511,7 +581,7 @@ d(
511
581
  { primary: "#111827", secondary: "#374151", muted: "#6b7280" },
512
582
  "#d1d5db"
513
583
  );
514
- d(
584
+ c(
515
585
  "Ivory",
516
586
  {
517
587
  primary: "#92876d",
@@ -525,7 +595,7 @@ d(
525
595
  { primary: "#2b2517", secondary: "#5c5340", muted: "#9c9280" },
526
596
  "#ddd8c4"
527
597
  );
528
- d(
598
+ c(
529
599
  "Rose",
530
600
  {
531
601
  primary: "#e11d48",
@@ -539,7 +609,7 @@ d(
539
609
  { primary: "#4c0519", secondary: "#881337", muted: "#f43f5e" },
540
610
  "#fda4af"
541
611
  );
542
- d(
612
+ c(
543
613
  "Emerald",
544
614
  {
545
615
  primary: "#059669",
@@ -553,7 +623,7 @@ d(
553
623
  { primary: "#064e3b", secondary: "#065f46", muted: "#34d399" },
554
624
  "#6ee7b7"
555
625
  );
556
- d(
626
+ c(
557
627
  "Amber",
558
628
  {
559
629
  primary: "#d97706",
@@ -567,7 +637,7 @@ d(
567
637
  { primary: "#451a03", secondary: "#78350f", muted: "#f59e0b" },
568
638
  "#fcd34d"
569
639
  );
570
- d(
640
+ c(
571
641
  "Violet",
572
642
  {
573
643
  primary: "#7c3aed",
@@ -581,7 +651,7 @@ d(
581
651
  { primary: "#2e1065", secondary: "#4c1d95", muted: "#a78bfa" },
582
652
  "#c4b5fd"
583
653
  );
584
- d(
654
+ c(
585
655
  "Teal",
586
656
  {
587
657
  primary: "#0d9488",
@@ -595,7 +665,7 @@ d(
595
665
  { primary: "#134e4a", secondary: "#115e59", muted: "#2dd4bf" },
596
666
  "#5eead4"
597
667
  );
598
- d(
668
+ c(
599
669
  "Indigo",
600
670
  {
601
671
  primary: "#4f46e5",
@@ -609,7 +679,7 @@ d(
609
679
  { primary: "#1e1b4b", secondary: "#312e81", muted: "#818cf8" },
610
680
  "#a5b4fc"
611
681
  );
612
- d(
682
+ c(
613
683
  "Cyan",
614
684
  {
615
685
  primary: "#0891b2",
@@ -623,7 +693,7 @@ d(
623
693
  { primary: "#164e63", secondary: "#155e75", muted: "#22d3ee" },
624
694
  "#67e8f9"
625
695
  );
626
- d(
696
+ c(
627
697
  "Lime",
628
698
  {
629
699
  primary: "#65a30d",
@@ -637,7 +707,7 @@ d(
637
707
  { primary: "#1a2e05", secondary: "#365314", muted: "#84cc16" },
638
708
  "#bef264"
639
709
  );
640
- d(
710
+ c(
641
711
  "Pink",
642
712
  {
643
713
  primary: "#db2777",
@@ -651,7 +721,7 @@ d(
651
721
  { primary: "#500724", secondary: "#831843", muted: "#f472b6" },
652
722
  "#f9a8d4"
653
723
  );
654
- d(
724
+ c(
655
725
  "Orange",
656
726
  {
657
727
  primary: "#ea580c",
@@ -665,7 +735,7 @@ d(
665
735
  { primary: "#431407", secondary: "#7c2d12", muted: "#fb923c" },
666
736
  "#fdba74"
667
737
  );
668
- d(
738
+ c(
669
739
  "Fuchsia",
670
740
  {
671
741
  primary: "#c026d3",
@@ -679,7 +749,7 @@ d(
679
749
  { primary: "#4a044e", secondary: "#701a75", muted: "#d946ef" },
680
750
  "#e879f9"
681
751
  );
682
- d(
752
+ c(
683
753
  "Sky",
684
754
  {
685
755
  primary: "#0284c7",
@@ -693,7 +763,7 @@ d(
693
763
  { primary: "#0c4a6e", secondary: "#075985", muted: "#38bdf8" },
694
764
  "#7dd3fc"
695
765
  );
696
- d(
766
+ c(
697
767
  "Ruby",
698
768
  {
699
769
  primary: "#be123c",
@@ -707,7 +777,7 @@ d(
707
777
  { primary: "#4c0519", secondary: "#881337", muted: "#fb7185" },
708
778
  "#fda4af"
709
779
  );
710
- d(
780
+ c(
711
781
  "Coral",
712
782
  {
713
783
  primary: "#f97316",
@@ -721,7 +791,7 @@ d(
721
791
  { primary: "#431407", secondary: "#9a3412", muted: "#fb923c" },
722
792
  "#fdba74"
723
793
  );
724
- x(
794
+ T(
725
795
  "Midnight",
726
796
  {
727
797
  primary: "#818cf8",
@@ -735,7 +805,7 @@ x(
735
805
  { primary: "#f1f5f9", secondary: "#94a3b8", muted: "#475569" },
736
806
  "#1e293b"
737
807
  );
738
- x(
808
+ T(
739
809
  "Obsidian",
740
810
  {
741
811
  primary: "#a78bfa",
@@ -749,7 +819,7 @@ x(
749
819
  { primary: "#fafafa", secondary: "#a1a1aa", muted: "#52525b" },
750
820
  "#3f3f46"
751
821
  );
752
- x(
822
+ T(
753
823
  "Eclipse",
754
824
  {
755
825
  primary: "#c084fc",
@@ -763,7 +833,7 @@ x(
763
833
  { primary: "#f5f3ff", secondary: "#a78bfa", muted: "#6d5eac" },
764
834
  "#3b3266"
765
835
  );
766
- x(
836
+ T(
767
837
  "Onyx",
768
838
  {
769
839
  primary: "#60a5fa",
@@ -777,7 +847,7 @@ x(
777
847
  { primary: "#ffffff", secondary: "#a3a3a3", muted: "#525252" },
778
848
  "#262626"
779
849
  );
780
- x(
850
+ T(
781
851
  "Carbon",
782
852
  {
783
853
  primary: "#38bdf8",
@@ -791,7 +861,7 @@ x(
791
861
  { primary: "#f4f4f4", secondary: "#c6c6c6", muted: "#6f6f6f" },
792
862
  "#525252"
793
863
  );
794
- x(
864
+ T(
795
865
  "Cosmos",
796
866
  {
797
867
  primary: "#6366f1",
@@ -805,7 +875,7 @@ x(
805
875
  { primary: "#e5e7eb", secondary: "#9ca3af", muted: "#4b5563" },
806
876
  "#374151"
807
877
  );
808
- x(
878
+ T(
809
879
  "Nebula",
810
880
  {
811
881
  primary: "#e879f9",
@@ -819,7 +889,7 @@ x(
819
889
  { primary: "#fae8ff", secondary: "#d8b4fe", muted: "#7c3aed" },
820
890
  "#581c87"
821
891
  );
822
- x(
892
+ T(
823
893
  "Abyss",
824
894
  {
825
895
  primary: "#22d3ee",
@@ -833,7 +903,7 @@ x(
833
903
  { primary: "#e0f2fe", secondary: "#7dd3fc", muted: "#0369a1" },
834
904
  "#075985"
835
905
  );
836
- x(
906
+ T(
837
907
  "Shadow",
838
908
  {
839
909
  primary: "#a3a3a3",
@@ -847,7 +917,7 @@ x(
847
917
  { primary: "#e5e5e5", secondary: "#a3a3a3", muted: "#525252" },
848
918
  "#404040"
849
919
  );
850
- x(
920
+ T(
851
921
  "Emerald Dark",
852
922
  {
853
923
  primary: "#34d399",
@@ -861,7 +931,7 @@ x(
861
931
  { primary: "#ecfdf5", secondary: "#6ee7b7", muted: "#047857" },
862
932
  "#047857"
863
933
  );
864
- d(
934
+ c(
865
935
  "Forest",
866
936
  {
867
937
  primary: "#166534",
@@ -875,7 +945,7 @@ d(
875
945
  { primary: "#052e16", secondary: "#166534", muted: "#4ade80" },
876
946
  "#86efac"
877
947
  );
878
- d(
948
+ c(
879
949
  "Ocean",
880
950
  {
881
951
  primary: "#0369a1",
@@ -889,7 +959,7 @@ d(
889
959
  { primary: "#0c4a6e", secondary: "#0369a1", muted: "#38bdf8" },
890
960
  "#7dd3fc"
891
961
  );
892
- d(
962
+ c(
893
963
  "Desert",
894
964
  {
895
965
  primary: "#b45309",
@@ -903,7 +973,7 @@ d(
903
973
  { primary: "#422006", secondary: "#713f12", muted: "#ca8a04" },
904
974
  "#fde047"
905
975
  );
906
- d(
976
+ c(
907
977
  "Sunset",
908
978
  {
909
979
  primary: "#ea580c",
@@ -917,7 +987,7 @@ d(
917
987
  { primary: "#431407", secondary: "#9a3412", muted: "#f97316" },
918
988
  "#fdba74"
919
989
  );
920
- d(
990
+ c(
921
991
  "Aurora",
922
992
  {
923
993
  primary: "#0d9488",
@@ -931,7 +1001,7 @@ d(
931
1001
  { primary: "#134e4a", secondary: "#115e59", muted: "#2dd4bf" },
932
1002
  "#5eead4"
933
1003
  );
934
- d(
1004
+ c(
935
1005
  "Lavender",
936
1006
  {
937
1007
  primary: "#7e22ce",
@@ -945,7 +1015,7 @@ d(
945
1015
  { primary: "#3b0764", secondary: "#581c87", muted: "#a855f7" },
946
1016
  "#d8b4fe"
947
1017
  );
948
- d(
1018
+ c(
949
1019
  "Autumn",
950
1020
  {
951
1021
  primary: "#c2410c",
@@ -959,7 +1029,7 @@ d(
959
1029
  { primary: "#450a0a", secondary: "#7f1d1d", muted: "#f87171" },
960
1030
  "#fca5a5"
961
1031
  );
962
- d(
1032
+ c(
963
1033
  "Spring",
964
1034
  {
965
1035
  primary: "#16a34a",
@@ -973,7 +1043,7 @@ d(
973
1043
  { primary: "#14532d", secondary: "#166534", muted: "#4ade80" },
974
1044
  "#86efac"
975
1045
  );
976
- d(
1046
+ c(
977
1047
  "Arctic",
978
1048
  {
979
1049
  primary: "#0ea5e9",
@@ -987,7 +1057,7 @@ d(
987
1057
  { primary: "#0c4a6e", secondary: "#0369a1", muted: "#7dd3fc" },
988
1058
  "#bae6fd"
989
1059
  );
990
- d(
1060
+ c(
991
1061
  "Tropical",
992
1062
  {
993
1063
  primary: "#0d9488",
@@ -1001,7 +1071,7 @@ d(
1001
1071
  { primary: "#064e3b", secondary: "#065f46", muted: "#6ee7b7" },
1002
1072
  "#a7f3d0"
1003
1073
  );
1004
- d(
1074
+ c(
1005
1075
  "Pastel Rose",
1006
1076
  {
1007
1077
  primary: "#f472b6",
@@ -1015,7 +1085,7 @@ d(
1015
1085
  { primary: "#831843", secondary: "#9d174d", muted: "#f9a8d4" },
1016
1086
  "#f9a8d4"
1017
1087
  );
1018
- d(
1088
+ c(
1019
1089
  "Pastel Sky",
1020
1090
  {
1021
1091
  primary: "#38bdf8",
@@ -1029,7 +1099,7 @@ d(
1029
1099
  { primary: "#075985", secondary: "#0369a1", muted: "#7dd3fc" },
1030
1100
  "#bae6fd"
1031
1101
  );
1032
- d(
1102
+ c(
1033
1103
  "Pastel Mint",
1034
1104
  {
1035
1105
  primary: "#34d399",
@@ -1043,7 +1113,7 @@ d(
1043
1113
  { primary: "#065f46", secondary: "#047857", muted: "#6ee7b7" },
1044
1114
  "#a7f3d0"
1045
1115
  );
1046
- d(
1116
+ c(
1047
1117
  "Pastel Peach",
1048
1118
  {
1049
1119
  primary: "#fb923c",
@@ -1057,7 +1127,7 @@ d(
1057
1127
  { primary: "#7c2d12", secondary: "#9a3412", muted: "#fdba74" },
1058
1128
  "#fed7aa"
1059
1129
  );
1060
- d(
1130
+ c(
1061
1131
  "Pastel Lavender",
1062
1132
  {
1063
1133
  primary: "#a78bfa",
@@ -1071,7 +1141,7 @@ d(
1071
1141
  { primary: "#4c1d95", secondary: "#5b21b6", muted: "#c4b5fd" },
1072
1142
  "#ddd6fe"
1073
1143
  );
1074
- d(
1144
+ c(
1075
1145
  "Pastel Lemon",
1076
1146
  {
1077
1147
  primary: "#facc15",
@@ -1085,7 +1155,7 @@ d(
1085
1155
  { primary: "#713f12", secondary: "#854d0e", muted: "#fde047" },
1086
1156
  "#fef08a"
1087
1157
  );
1088
- d(
1158
+ c(
1089
1159
  "Pastel Sage",
1090
1160
  {
1091
1161
  primary: "#86efac",
@@ -1099,7 +1169,7 @@ d(
1099
1169
  { primary: "#166534", secondary: "#15803d", muted: "#86efac" },
1100
1170
  "#bbf7d0"
1101
1171
  );
1102
- d(
1172
+ c(
1103
1173
  "Pastel Coral",
1104
1174
  {
1105
1175
  primary: "#fb7185",
@@ -1113,7 +1183,7 @@ d(
1113
1183
  { primary: "#881337", secondary: "#9f1239", muted: "#fda4af" },
1114
1184
  "#fecdd3"
1115
1185
  );
1116
- d(
1186
+ c(
1117
1187
  "Banking",
1118
1188
  {
1119
1189
  primary: "#1e3a5f",
@@ -1127,7 +1197,7 @@ d(
1127
1197
  { primary: "#0f172a", secondary: "#334155", muted: "#94a3b8" },
1128
1198
  "#cbd5e1"
1129
1199
  );
1130
- d(
1200
+ c(
1131
1201
  "Healthcare",
1132
1202
  {
1133
1203
  primary: "#0891b2",
@@ -1141,7 +1211,7 @@ d(
1141
1211
  { primary: "#134e4a", secondary: "#1a6b6a", muted: "#80cbc4" },
1142
1212
  "#b2dfdb"
1143
1213
  );
1144
- d(
1214
+ c(
1145
1215
  "Legal",
1146
1216
  {
1147
1217
  primary: "#1e293b",
@@ -1155,7 +1225,7 @@ d(
1155
1225
  { primary: "#0f172a", secondary: "#44403c", muted: "#a8a29e" },
1156
1226
  "#d6d3d1"
1157
1227
  );
1158
- d(
1228
+ c(
1159
1229
  "Tech Startup",
1160
1230
  {
1161
1231
  primary: "#7c3aed",
@@ -1169,7 +1239,7 @@ d(
1169
1239
  { primary: "#1e1b4b", secondary: "#4c1d95", muted: "#a78bfa" },
1170
1240
  "#c4b5fd"
1171
1241
  );
1172
- d(
1242
+ c(
1173
1243
  "Enterprise",
1174
1244
  {
1175
1245
  primary: "#1e40af",
@@ -1183,7 +1253,7 @@ d(
1183
1253
  { primary: "#1e3a5f", secondary: "#1e40af", muted: "#60a5fa" },
1184
1254
  "#93c5fd"
1185
1255
  );
1186
- d(
1256
+ c(
1187
1257
  "Government",
1188
1258
  {
1189
1259
  primary: "#1d4ed8",
@@ -1197,7 +1267,7 @@ d(
1197
1267
  { primary: "#0f172a", secondary: "#1e293b", muted: "#64748b" },
1198
1268
  "#cbd5e1"
1199
1269
  );
1200
- d(
1270
+ c(
1201
1271
  "Education",
1202
1272
  {
1203
1273
  primary: "#059669",
@@ -1211,7 +1281,7 @@ d(
1211
1281
  { primary: "#064e3b", secondary: "#065f46", muted: "#6ee7b7" },
1212
1282
  "#a7f3d0"
1213
1283
  );
1214
- d(
1284
+ c(
1215
1285
  "Real Estate",
1216
1286
  {
1217
1287
  primary: "#92400e",
@@ -1225,7 +1295,7 @@ d(
1225
1295
  { primary: "#422006", secondary: "#713f12", muted: "#d97706" },
1226
1296
  "#fcd34d"
1227
1297
  );
1228
- d(
1298
+ c(
1229
1299
  "Nord",
1230
1300
  {
1231
1301
  primary: "#5e81ac",
@@ -1239,7 +1309,7 @@ d(
1239
1309
  { primary: "#2e3440", secondary: "#3b4252", muted: "#4c566a" },
1240
1310
  "#d8dee9"
1241
1311
  );
1242
- x(
1312
+ T(
1243
1313
  "Dracula",
1244
1314
  {
1245
1315
  primary: "#bd93f9",
@@ -1253,7 +1323,7 @@ x(
1253
1323
  { primary: "#f8f8f2", secondary: "#c0c0c0", muted: "#6272a4" },
1254
1324
  "#44475a"
1255
1325
  );
1256
- d(
1326
+ c(
1257
1327
  "Solarized Light",
1258
1328
  {
1259
1329
  primary: "#268bd2",
@@ -1267,7 +1337,7 @@ d(
1267
1337
  { primary: "#073642", secondary: "#586e75", muted: "#93a1a1" },
1268
1338
  "#eee8d5"
1269
1339
  );
1270
- x(
1340
+ T(
1271
1341
  "Solarized Dark",
1272
1342
  {
1273
1343
  primary: "#268bd2",
@@ -1281,7 +1351,7 @@ x(
1281
1351
  { primary: "#eee8d5", secondary: "#93a1a1", muted: "#586e75" },
1282
1352
  "#073642"
1283
1353
  );
1284
- x(
1354
+ T(
1285
1355
  "Monokai",
1286
1356
  {
1287
1357
  primary: "#66d9ef",
@@ -1295,7 +1365,7 @@ x(
1295
1365
  { primary: "#f8f8f2", secondary: "#cfcfc2", muted: "#75715e" },
1296
1366
  "#3e3d32"
1297
1367
  );
1298
- x(
1368
+ T(
1299
1369
  "One Dark",
1300
1370
  {
1301
1371
  primary: "#61afef",
@@ -1309,7 +1379,7 @@ x(
1309
1379
  { primary: "#abb2bf", secondary: "#828997", muted: "#545862" },
1310
1380
  "#3e4452"
1311
1381
  );
1312
- x(
1382
+ T(
1313
1383
  "Synthwave",
1314
1384
  {
1315
1385
  primary: "#ff7edb",
@@ -1323,7 +1393,7 @@ x(
1323
1393
  { primary: "#f0e4fc", secondary: "#b4a0cc", muted: "#6c5c84" },
1324
1394
  "#4a3866"
1325
1395
  );
1326
- d(
1396
+ c(
1327
1397
  "Vaporwave",
1328
1398
  {
1329
1399
  primary: "#ff71ce",
@@ -1337,7 +1407,7 @@ d(
1337
1407
  { primary: "#4a1a4e", secondary: "#7b3f7d", muted: "#c080c0" },
1338
1408
  "#d8a8e8"
1339
1409
  );
1340
- x(
1410
+ T(
1341
1411
  "Terminal Green",
1342
1412
  {
1343
1413
  primary: "#00ff41",
@@ -1351,7 +1421,7 @@ x(
1351
1421
  { primary: "#00ff41", secondary: "#00cc33", muted: "#008822" },
1352
1422
  "#003300"
1353
1423
  );
1354
- d(
1424
+ c(
1355
1425
  "Sepia",
1356
1426
  {
1357
1427
  primary: "#8b6914",
@@ -1365,7 +1435,7 @@ d(
1365
1435
  { primary: "#3e2723", secondary: "#5d4037", muted: "#a1887f" },
1366
1436
  "#d7ccc8"
1367
1437
  );
1368
- d(
1438
+ c(
1369
1439
  "Vintage",
1370
1440
  {
1371
1441
  primary: "#8d6e63",
@@ -1379,7 +1449,7 @@ d(
1379
1449
  { primary: "#3e2723", secondary: "#5d4037", muted: "#a1887f" },
1380
1450
  "#bcaaa4"
1381
1451
  );
1382
- x(
1452
+ T(
1383
1453
  "Cyberpunk",
1384
1454
  {
1385
1455
  primary: "#00f0ff",
@@ -1393,7 +1463,7 @@ x(
1393
1463
  { primary: "#e0fbfc", secondary: "#80d4dd", muted: "#3a6b72" },
1394
1464
  "#1c3a44"
1395
1465
  );
1396
- x(
1466
+ T(
1397
1467
  "Neon",
1398
1468
  {
1399
1469
  primary: "#ff00ff",
@@ -1407,7 +1477,7 @@ x(
1407
1477
  { primary: "#ffffff", secondary: "#cccccc", muted: "#666666" },
1408
1478
  "#333333"
1409
1479
  );
1410
- x(
1480
+ T(
1411
1481
  "Retrowave",
1412
1482
  {
1413
1483
  primary: "#f77fbe",
@@ -1421,7 +1491,7 @@ x(
1421
1491
  { primary: "#ffe6f7", secondary: "#c9a0c9", muted: "#6b4c7a" },
1422
1492
  "#4a2d66"
1423
1493
  );
1424
- d(
1494
+ c(
1425
1495
  "Christmas",
1426
1496
  {
1427
1497
  primary: "#c41e3a",
@@ -1435,7 +1505,7 @@ d(
1435
1505
  { primary: "#3b0a0a", secondary: "#7f1d1d", muted: "#dc6868" },
1436
1506
  "#e8a0a0"
1437
1507
  );
1438
- x(
1508
+ T(
1439
1509
  "Halloween",
1440
1510
  {
1441
1511
  primary: "#ff6600",
@@ -1449,7 +1519,7 @@ x(
1449
1519
  { primary: "#ffedd5", secondary: "#fdba74", muted: "#9a5c28" },
1450
1520
  "#5c3400"
1451
1521
  );
1452
- d(
1522
+ c(
1453
1523
  "Valentine",
1454
1524
  {
1455
1525
  primary: "#e11d48",
@@ -1463,7 +1533,7 @@ d(
1463
1533
  { primary: "#4c0519", secondary: "#881337", muted: "#f9a8d4" },
1464
1534
  "#fda4af"
1465
1535
  );
1466
- d(
1536
+ c(
1467
1537
  "Easter",
1468
1538
  {
1469
1539
  primary: "#a78bfa",
@@ -1477,7 +1547,7 @@ d(
1477
1547
  { primary: "#581c87", secondary: "#6d28d9", muted: "#c4b5fd" },
1478
1548
  "#ddd6fe"
1479
1549
  );
1480
- d(
1550
+ c(
1481
1551
  "Summer Beach",
1482
1552
  {
1483
1553
  primary: "#0ea5e9",
@@ -1491,7 +1561,7 @@ d(
1491
1561
  { primary: "#0c4a6e", secondary: "#0369a1", muted: "#7dd3fc" },
1492
1562
  "#fcd34d"
1493
1563
  );
1494
- d(
1564
+ c(
1495
1565
  "Winter Frost",
1496
1566
  {
1497
1567
  primary: "#3b82f6",
@@ -1505,7 +1575,7 @@ d(
1505
1575
  { primary: "#1e3a5f", secondary: "#1e40af", muted: "#93c5fd" },
1506
1576
  "#bfdbfe"
1507
1577
  );
1508
- d(
1578
+ c(
1509
1579
  "Cherry Blossom",
1510
1580
  {
1511
1581
  primary: "#ec4899",
@@ -1519,7 +1589,7 @@ d(
1519
1589
  { primary: "#831843", secondary: "#9d174d", muted: "#f9a8d4" },
1520
1590
  "#fbcfe8"
1521
1591
  );
1522
- d(
1592
+ c(
1523
1593
  "Harvest",
1524
1594
  {
1525
1595
  primary: "#b45309",
@@ -1533,7 +1603,7 @@ d(
1533
1603
  { primary: "#451a03", secondary: "#78350f", muted: "#d97706" },
1534
1604
  "#fcd34d"
1535
1605
  );
1536
- d(
1606
+ c(
1537
1607
  "Japanese Zen",
1538
1608
  {
1539
1609
  primary: "#6b7280",
@@ -1547,7 +1617,7 @@ d(
1547
1617
  { primary: "#2c2c2c", secondary: "#5c5c5c", muted: "#a0998a" },
1548
1618
  "#d5cec0"
1549
1619
  );
1550
- d(
1620
+ c(
1551
1621
  "Moroccan",
1552
1622
  {
1553
1623
  primary: "#c2410c",
@@ -1561,7 +1631,7 @@ d(
1561
1631
  { primary: "#3a1a00", secondary: "#7c2d12", muted: "#d97706" },
1562
1632
  "#f5d0a0"
1563
1633
  );
1564
- d(
1634
+ c(
1565
1635
  "Scandinavian",
1566
1636
  {
1567
1637
  primary: "#4b5563",
@@ -1575,7 +1645,7 @@ d(
1575
1645
  { primary: "#111827", secondary: "#374151", muted: "#9ca3af" },
1576
1646
  "#e5e7eb"
1577
1647
  );
1578
- d(
1648
+ c(
1579
1649
  "Mediterranean",
1580
1650
  {
1581
1651
  primary: "#1e40af",
@@ -1589,7 +1659,7 @@ d(
1589
1659
  { primary: "#1e3a5f", secondary: "#2563eb", muted: "#93c5fd" },
1590
1660
  "#bfdbfe"
1591
1661
  );
1592
- d(
1662
+ c(
1593
1663
  "Chinese New Year",
1594
1664
  {
1595
1665
  primary: "#dc2626",
@@ -1603,7 +1673,7 @@ d(
1603
1673
  { primary: "#450a0a", secondary: "#991b1b", muted: "#f87171" },
1604
1674
  "#fca5a5"
1605
1675
  );
1606
- d(
1676
+ c(
1607
1677
  "Indian Festive",
1608
1678
  {
1609
1679
  primary: "#d97706",
@@ -1617,7 +1687,7 @@ d(
1617
1687
  { primary: "#451a03", secondary: "#92400e", muted: "#f59e0b" },
1618
1688
  "#fcd34d"
1619
1689
  );
1620
- d(
1690
+ c(
1621
1691
  "Brazilian Carnival",
1622
1692
  {
1623
1693
  primary: "#16a34a",
@@ -1631,7 +1701,7 @@ d(
1631
1701
  { primary: "#052e16", secondary: "#166534", muted: "#4ade80" },
1632
1702
  "#86efac"
1633
1703
  );
1634
- d(
1704
+ c(
1635
1705
  "African Earth",
1636
1706
  {
1637
1707
  primary: "#92400e",
@@ -1645,7 +1715,7 @@ d(
1645
1715
  { primary: "#2b1a0e", secondary: "#5c3d1e", muted: "#a08060" },
1646
1716
  "#d4b896"
1647
1717
  );
1648
- x(
1718
+ T(
1649
1719
  "High Contrast Dark",
1650
1720
  {
1651
1721
  primary: "#ffff00",
@@ -1659,7 +1729,7 @@ x(
1659
1729
  { primary: "#ffffff", secondary: "#ffffff", muted: "#cccccc" },
1660
1730
  "#ffffff"
1661
1731
  );
1662
- d(
1732
+ c(
1663
1733
  "Monochrome",
1664
1734
  {
1665
1735
  primary: "#404040",
@@ -1673,7 +1743,7 @@ d(
1673
1743
  { primary: "#1a1a1a", secondary: "#404040", muted: "#808080" },
1674
1744
  "#c0c0c0"
1675
1745
  );
1676
- d(
1746
+ c(
1677
1747
  "Enhanced Contrast",
1678
1748
  {
1679
1749
  primary: "#0050b3",
@@ -1687,7 +1757,7 @@ d(
1687
1757
  { primary: "#000000", secondary: "#1a1a1a", muted: "#595959" },
1688
1758
  "#8c8c8c"
1689
1759
  );
1690
- d(
1760
+ c(
1691
1761
  "Minimalist",
1692
1762
  {
1693
1763
  primary: "#18181b",
@@ -1701,7 +1771,7 @@ d(
1701
1771
  { primary: "#0a0a0a", secondary: "#404040", muted: "#a3a3a3" },
1702
1772
  "#e5e5e5"
1703
1773
  );
1704
- x(
1774
+ T(
1705
1775
  "Warm Dark",
1706
1776
  {
1707
1777
  primary: "#f59e0b",
@@ -1715,7 +1785,7 @@ x(
1715
1785
  { primary: "#fafaf9", secondary: "#d6d3d1", muted: "#78716c" },
1716
1786
  "#57534e"
1717
1787
  );
1718
- x(
1788
+ T(
1719
1789
  "Soft Dark",
1720
1790
  {
1721
1791
  primary: "#a78bfa",
@@ -1729,7 +1799,7 @@ x(
1729
1799
  { primary: "#e8e8f0", secondary: "#a0a0b8", muted: "#5c5c74" },
1730
1800
  "#3e3e58"
1731
1801
  );
1732
- d(
1802
+ c(
1733
1803
  "Coffee",
1734
1804
  {
1735
1805
  primary: "#6f4e37",
@@ -1743,7 +1813,7 @@ d(
1743
1813
  { primary: "#2c1a0e", secondary: "#5c3d28", muted: "#a08868" },
1744
1814
  "#d4c4a8"
1745
1815
  );
1746
- d(
1816
+ c(
1747
1817
  "Wine",
1748
1818
  {
1749
1819
  primary: "#7f1d1d",
@@ -1758,7 +1828,8 @@ d(
1758
1828
  "#e8a0a0"
1759
1829
  );
1760
1830
  $(null);
1761
- const Be = {
1831
+ $(null);
1832
+ const Ke = {
1762
1833
  id: crypto.randomUUID(),
1763
1834
  name: "Untitled Project",
1764
1835
  resolution: { width: 1920, height: 1080, label: "1080p" },
@@ -1790,7 +1861,7 @@ const Be = {
1790
1861
  audio: { sampleRate: 48e3, channels: 2, bitrate: 320 },
1791
1862
  video: { codec: "h264", bitrate: 8e3, profile: "high" }
1792
1863
  }
1793
- }, Ke = [
1864
+ }, Ge = [
1794
1865
  { type: "blur", name: "Blur", icon: "🔵" },
1795
1866
  { type: "brightness", name: "Brightness", icon: "☀️" },
1796
1867
  { type: "contrast", name: "Contrast", icon: "◐" },
@@ -1800,14 +1871,14 @@ const Be = {
1800
1871
  { type: "chromaKey", name: "Chroma Key", icon: "🟢" },
1801
1872
  { type: "crop", name: "Crop", icon: "✂️" },
1802
1873
  { type: "zoom", name: "Zoom", icon: "🔍" }
1803
- ], We = [
1874
+ ], je = [
1804
1875
  { type: "fade", name: "Fade" },
1805
1876
  { type: "dissolve", name: "Dissolve" },
1806
1877
  { type: "wipe", name: "Wipe" },
1807
1878
  { type: "slide", name: "Slide" },
1808
1879
  { type: "zoom", name: "Zoom" },
1809
1880
  { type: "push", name: "Push" }
1810
- ], Ge = [
1881
+ ], Ze = [
1811
1882
  {
1812
1883
  target: ".nice-video-editor",
1813
1884
  titleKey: "tutorial.videoEditorPro.intro.title",
@@ -1816,72 +1887,72 @@ const Be = {
1816
1887
  content: "Add media to the timeline, arrange and trim clips, apply effects and transitions, then configure and run the export.",
1817
1888
  placement: "auto"
1818
1889
  }
1819
- ], Ye = ({
1820
- project: l,
1821
- onProjectChange: m,
1822
- onExport: f,
1890
+ ], Qe = ({
1891
+ project: d,
1892
+ onProjectChange: f,
1893
+ onExport: l,
1823
1894
  onAssetUpload: C,
1824
- className: T = "",
1895
+ className: H = "",
1825
1896
  tutorial: I
1826
1897
  }) => {
1827
- const [p, i] = v(l || Be), [D, b] = v(
1898
+ const [p, n] = w(d || Ke), [R, b] = w(
1828
1899
  "timeline"
1829
- ), [E, y] = v(null), [k, S] = v(null), [z, R] = v(0), [q, K] = v(!1), [M, J] = v(1), [W, P] = v(!0), [U, O] = v(null), oe = F(null), se = F(null), A = F(null);
1830
- ne(() => {
1831
- l && i(l);
1832
- }, [l]), ne(() => () => {
1833
- A.current && clearInterval(A.current);
1900
+ ), [D, y] = w(null), [x, S] = w(null), [A, _] = w(0), [O, F] = w(!1), [M, Z] = w(1), [K, P] = w(!0), [U, B] = w(null), ie = L(null), te = L(null), z = L(null);
1901
+ re(() => {
1902
+ d && n(d);
1903
+ }, [d]), re(() => () => {
1904
+ z.current && clearInterval(z.current);
1834
1905
  }, []);
1835
- const w = me(
1836
- (n) => {
1837
- const o = { ...p, ...n };
1838
- i(o), m == null || m(o);
1906
+ const k = me(
1907
+ (t) => {
1908
+ const o = { ...p, ...t };
1909
+ n(o), f == null || f(o);
1839
1910
  },
1840
- [p, m]
1841
- ), g = async (n) => {
1911
+ [p, f]
1912
+ ), N = async (t) => {
1842
1913
  const o = [];
1843
- for (const a of Array.from(n)) {
1844
- const t = a.type.startsWith("video/") ? "video" : a.type.startsWith("audio/") ? "audio" : "image";
1845
- let c;
1846
- C ? c = await C(a) : c = {
1914
+ for (const i of Array.from(t)) {
1915
+ const u = i.type.startsWith("video/") ? "video" : i.type.startsWith("audio/") ? "audio" : "image";
1916
+ let h;
1917
+ C ? h = await C(i) : h = {
1847
1918
  id: crypto.randomUUID(),
1848
- type: t,
1849
- name: a.name,
1850
- url: URL.createObjectURL(a),
1851
- size: a.size
1852
- }, o.push(c);
1919
+ type: u,
1920
+ name: i.name,
1921
+ url: URL.createObjectURL(i),
1922
+ size: i.size
1923
+ }, o.push(h);
1853
1924
  }
1854
- w({ assets: [...p.assets, ...o] });
1855
- }, B = (n) => {
1925
+ k({ assets: [...p.assets, ...o] });
1926
+ }, W = (t) => {
1856
1927
  const o = {
1857
1928
  id: crypto.randomUUID(),
1858
- type: n,
1859
- name: `${n.charAt(0).toUpperCase() + n.slice(1)} ${p.tracks.filter((a) => a.type === n).length + 1}`,
1929
+ type: t,
1930
+ name: `${t.charAt(0).toUpperCase() + t.slice(1)} ${p.tracks.filter((i) => i.type === t).length + 1}`,
1860
1931
  items: [],
1861
1932
  muted: !1,
1862
1933
  locked: !1,
1863
1934
  visible: !0
1864
1935
  };
1865
- w({ tracks: [...p.tracks, o] });
1866
- }, Y = (n) => {
1867
- w({ tracks: p.tracks.filter((o) => o.id !== n) }), E === n && y(null);
1868
- }, G = (n) => {
1869
- w({
1870
- tracks: p.tracks.map((o) => o.id === n ? { ...o, muted: !o.muted } : o)
1936
+ k({ tracks: [...p.tracks, o] });
1937
+ }, q = (t) => {
1938
+ k({ tracks: p.tracks.filter((o) => o.id !== t) }), D === t && y(null);
1939
+ }, G = (t) => {
1940
+ k({
1941
+ tracks: p.tracks.map((o) => o.id === t ? { ...o, muted: !o.muted } : o)
1871
1942
  });
1872
- }, re = (n) => {
1873
- w({
1874
- tracks: p.tracks.map((o) => o.id === n ? { ...o, locked: !o.locked } : o)
1943
+ }, ee = (t) => {
1944
+ k({
1945
+ tracks: p.tracks.map((o) => o.id === t ? { ...o, locked: !o.locked } : o)
1875
1946
  });
1876
- }, _ = (n, o) => {
1877
- const a = p.tracks.find((h) => h.id === n);
1878
- if (!a || a.locked)
1947
+ }, E = (t, o) => {
1948
+ const i = p.tracks.find((g) => g.id === t);
1949
+ if (!i || i.locked)
1879
1950
  return;
1880
- const t = a.items[a.items.length - 1], c = t ? t.startTime + t.duration : 0, u = {
1951
+ const u = i.items[i.items.length - 1], h = u ? u.startTime + u.duration : 0, v = {
1881
1952
  id: crypto.randomUUID(),
1882
1953
  assetId: o.id,
1883
1954
  type: o.type,
1884
- startTime: c,
1955
+ startTime: h,
1885
1956
  duration: o.duration || 5,
1886
1957
  offset: 0,
1887
1958
  properties: {
@@ -1894,47 +1965,47 @@ const Be = {
1894
1965
  effects: [],
1895
1966
  transitions: []
1896
1967
  };
1897
- w({
1968
+ k({
1898
1969
  tracks: p.tracks.map(
1899
- (h) => h.id === n ? { ...h, items: [...h.items, u] } : h
1970
+ (g) => g.id === t ? { ...g, items: [...g.items, v] } : g
1900
1971
  )
1901
1972
  });
1902
- }, X = (n, o, a) => {
1903
- const t = {
1973
+ }, J = (t, o, i) => {
1974
+ const u = {
1904
1975
  id: crypto.randomUUID(),
1905
- type: a,
1906
- name: a.charAt(0).toUpperCase() + a.slice(1),
1907
- parameters: ce(a)
1976
+ type: i,
1977
+ name: i.charAt(0).toUpperCase() + i.slice(1),
1978
+ parameters: ne(i)
1908
1979
  };
1909
- w({
1980
+ k({
1910
1981
  tracks: p.tracks.map(
1911
- (c) => c.id === n ? {
1912
- ...c,
1913
- items: c.items.map(
1914
- (u) => u.id === o ? { ...u, effects: [...u.effects, t] } : u
1982
+ (h) => h.id === t ? {
1983
+ ...h,
1984
+ items: h.items.map(
1985
+ (v) => v.id === o ? { ...v, effects: [...v.effects, u] } : v
1915
1986
  )
1916
- } : c
1987
+ } : h
1917
1988
  )
1918
1989
  });
1919
- }, L = (n, o, a, t) => {
1920
- const c = {
1990
+ }, V = (t, o, i, u) => {
1991
+ const h = {
1921
1992
  id: crypto.randomUUID(),
1922
- type: a,
1993
+ type: i,
1923
1994
  duration: 0.5,
1924
- position: t
1995
+ position: u
1925
1996
  };
1926
- w({
1997
+ k({
1927
1998
  tracks: p.tracks.map(
1928
- (u) => u.id === n ? {
1929
- ...u,
1930
- items: u.items.map(
1931
- (h) => h.id === o ? { ...h, transitions: [...h.transitions, c] } : h
1999
+ (v) => v.id === t ? {
2000
+ ...v,
2001
+ items: v.items.map(
2002
+ (g) => g.id === o ? { ...g, transitions: [...g.transitions, h] } : g
1932
2003
  )
1933
- } : u
2004
+ } : v
1934
2005
  )
1935
2006
  });
1936
- }, ce = (n) => {
1937
- switch (n) {
2007
+ }, ne = (t) => {
2008
+ switch (t) {
1938
2009
  case "blur":
1939
2010
  return { radius: 5 };
1940
2011
  case "brightness":
@@ -1956,494 +2027,487 @@ const Be = {
1956
2027
  default:
1957
2028
  return {};
1958
2029
  }
1959
- }, de = () => {
1960
- q ? (A.current && clearInterval(A.current), K(!1)) : (A.current = setInterval(() => {
1961
- R((n) => {
2030
+ }, se = () => {
2031
+ O ? (z.current && clearInterval(z.current), F(!1)) : (z.current = setInterval(() => {
2032
+ _((t) => {
1962
2033
  const o = Math.max(
1963
- ...p.tracks.flatMap((a) => a.items.map((t) => t.startTime + t.duration)),
2034
+ ...p.tracks.flatMap((i) => i.items.map((u) => u.startTime + u.duration)),
1964
2035
  0
1965
2036
  );
1966
- return n >= o ? (clearInterval(A.current), K(!1), 0) : n + 1 / p.frameRate;
2037
+ return t >= o ? (clearInterval(z.current), F(!1), 0) : t + 1 / p.frameRate;
1967
2038
  });
1968
- }, 1e3 / p.frameRate), K(!0));
1969
- }, Q = (n) => {
1970
- R(Math.max(0, n));
1971
- }, ee = async () => {
1972
- if (f) {
1973
- O(0);
2039
+ }, 1e3 / p.frameRate), F(!0));
2040
+ }, Y = (t) => {
2041
+ _(Math.max(0, t));
2042
+ }, X = async () => {
2043
+ if (l) {
2044
+ B(0);
1974
2045
  try {
1975
- const n = setInterval(() => {
1976
- O((o) => o !== null && o < 90 ? o + Math.random() * 10 : o);
2046
+ const t = setInterval(() => {
2047
+ B((o) => o !== null && o < 90 ? o + Math.random() * 10 : o);
1977
2048
  }, 500);
1978
- await f(p, p.settings.video.codec), clearInterval(n), O(100), setTimeout(() => O(null), 2e3);
1979
- } catch (n) {
1980
- O(null), console.error("Export failed:", n);
2049
+ await l(p, p.settings.video.codec), clearInterval(t), B(100), setTimeout(() => B(null), 2e3);
2050
+ } catch (t) {
2051
+ B(null), console.error("Export failed:", t);
1981
2052
  }
1982
2053
  }
1983
- }, te = (n) => {
1984
- const o = Math.floor(n / 60), a = Math.floor(n % 60), t = Math.floor(n % 1 * p.frameRate);
1985
- return `${o.toString().padStart(2, "0")}:${a.toString().padStart(2, "0")}:${t.toString().padStart(2, "0")}`;
1986
- }, Z = () => {
1987
- for (const n of p.tracks) {
1988
- const o = n.items.find((a) => a.id === k);
2054
+ }, ae = (t) => {
2055
+ const o = Math.floor(t / 60), i = Math.floor(t % 60), u = Math.floor(t % 1 * p.frameRate);
2056
+ return `${o.toString().padStart(2, "0")}:${i.toString().padStart(2, "0")}:${u.toString().padStart(2, "0")}`;
2057
+ }, j = () => {
2058
+ for (const t of p.tracks) {
2059
+ const o = t.items.find((i) => i.id === x);
1989
2060
  if (o)
1990
- return { track: n, item: o };
2061
+ return { track: t, item: o };
1991
2062
  }
1992
2063
  return null;
1993
- };
1994
- return /* @__PURE__ */ r("div", { className: `nice-video-editor ${T}`, style: { position: "relative" }, children: [
1995
- /* @__PURE__ */ e("span", { style: { position: "absolute", top: 6, right: 6, zIndex: 30 }, children: /* @__PURE__ */ e(Le, { steps: Ue(I, Ge) }) }),
1996
- /* @__PURE__ */ r("header", { className: "video-editor__header", children: [
1997
- /* @__PURE__ */ r("div", { className: "header__project-info", children: [
1998
- /* @__PURE__ */ e(
1999
- "input",
2000
- {
2001
- type: "text",
2002
- value: p.name,
2003
- onChange: (n) => w({ name: n.target.value }),
2004
- className: "project-name-input"
2005
- }
2006
- ),
2007
- /* @__PURE__ */ r("span", { className: "project-settings", children: [
2008
- p.resolution.width,
2009
- "x",
2010
- p.resolution.height,
2011
- " • ",
2012
- p.frameRate,
2013
- "fps"
2014
- ] })
2015
- ] }),
2016
- /* @__PURE__ */ e("div", { className: "header__tabs", children: ["timeline", "effects", "transitions", "export"].map((n) => /* @__PURE__ */ e(
2017
- "button",
2064
+ }, oe = /* @__PURE__ */ a("header", { className: "video-editor__header", children: [
2065
+ /* @__PURE__ */ a("div", { className: "header__project-info", children: [
2066
+ /* @__PURE__ */ e(
2067
+ "input",
2018
2068
  {
2019
- className: `tab-button ${D === n ? "tab-button--active" : ""}`,
2020
- onClick: () => b(n),
2021
- children: n.charAt(0).toUpperCase() + n.slice(1)
2022
- },
2023
- n
2024
- )) }),
2025
- /* @__PURE__ */ e("div", { className: "header__actions", children: /* @__PURE__ */ e(
2026
- "button",
2027
- {
2028
- className: "action-button action-button--primary",
2029
- onClick: ee,
2030
- disabled: U !== null,
2031
- children: U !== null ? `Exporting ${Math.round(U)}%` : "Export"
2069
+ type: "text",
2070
+ value: p.name,
2071
+ onChange: (t) => k({ name: t.target.value }),
2072
+ className: "project-name-input"
2032
2073
  }
2033
- ) })
2074
+ ),
2075
+ /* @__PURE__ */ a("span", { className: "project-settings", children: [
2076
+ p.resolution.width,
2077
+ "x",
2078
+ p.resolution.height,
2079
+ " • ",
2080
+ p.frameRate,
2081
+ "fps"
2082
+ ] })
2034
2083
  ] }),
2035
- /* @__PURE__ */ r("div", { className: "video-editor__main", children: [
2036
- W && /* @__PURE__ */ r("aside", { className: "video-editor__asset-library", children: [
2037
- /* @__PURE__ */ r("div", { className: "asset-library__header", children: [
2038
- /* @__PURE__ */ e("h3", { children: "Assets" }),
2039
- /* @__PURE__ */ e("button", { className: "close-button", onClick: () => P(!1), children: "×" })
2084
+ /* @__PURE__ */ e("div", { className: "header__tabs", children: ["timeline", "effects", "transitions", "export"].map((t) => /* @__PURE__ */ e(
2085
+ "button",
2086
+ {
2087
+ className: `tab-button ${R === t ? "tab-button--active" : ""}`,
2088
+ onClick: () => b(t),
2089
+ children: t.charAt(0).toUpperCase() + t.slice(1)
2090
+ },
2091
+ t
2092
+ )) }),
2093
+ /* @__PURE__ */ e("div", { className: "header__actions", children: /* @__PURE__ */ e(
2094
+ "button",
2095
+ {
2096
+ className: "action-button action-button--primary",
2097
+ onClick: X,
2098
+ disabled: U !== null,
2099
+ children: U !== null ? `Exporting ${Math.round(U)}%` : "Export"
2100
+ }
2101
+ ) })
2102
+ ] }), ce = x && R !== "export" ? (() => {
2103
+ const t = j();
2104
+ if (!t)
2105
+ return null;
2106
+ const { track: o, item: i } = t;
2107
+ return /* @__PURE__ */ a("div", { className: "item-inspector", children: [
2108
+ /* @__PURE__ */ e("h4", { children: "Item Properties" }),
2109
+ /* @__PURE__ */ a("div", { className: "inspector-section", children: [
2110
+ /* @__PURE__ */ a("label", { children: [
2111
+ "Start Time",
2112
+ /* @__PURE__ */ e(
2113
+ "input",
2114
+ {
2115
+ type: "number",
2116
+ step: "0.1",
2117
+ value: i.startTime,
2118
+ onChange: (u) => {
2119
+ const h = parseFloat(u.target.value);
2120
+ k({
2121
+ tracks: p.tracks.map(
2122
+ (v) => v.id === o.id ? {
2123
+ ...v,
2124
+ items: v.items.map(
2125
+ (g) => g.id === i.id ? { ...g, startTime: h } : g
2126
+ )
2127
+ } : v
2128
+ )
2129
+ });
2130
+ }
2131
+ }
2132
+ )
2040
2133
  ] }),
2041
- /* @__PURE__ */ e("div", { className: "asset-library__upload", children: /* @__PURE__ */ r("label", { className: "upload-zone", children: [
2134
+ /* @__PURE__ */ a("label", { children: [
2135
+ "Duration",
2042
2136
  /* @__PURE__ */ e(
2043
2137
  "input",
2044
2138
  {
2045
- type: "file",
2046
- multiple: !0,
2047
- accept: "video/*,audio/*,image/*",
2048
- onChange: (n) => n.target.files && g(n.target.files),
2049
- hidden: !0
2139
+ type: "number",
2140
+ step: "0.1",
2141
+ value: i.duration,
2142
+ onChange: (u) => {
2143
+ const h = parseFloat(u.target.value);
2144
+ k({
2145
+ tracks: p.tracks.map(
2146
+ (v) => v.id === o.id ? {
2147
+ ...v,
2148
+ items: v.items.map(
2149
+ (g) => g.id === i.id ? { ...g, duration: h } : g
2150
+ )
2151
+ } : v
2152
+ )
2153
+ });
2154
+ }
2050
2155
  }
2051
- ),
2052
- /* @__PURE__ */ e("span", { className: "upload-icon", children: "+" }),
2053
- /* @__PURE__ */ e("span", { children: "Drop files or click to upload" })
2054
- ] }) }),
2055
- /* @__PURE__ */ e("div", { className: "asset-library__list", children: p.assets.map((n) => /* @__PURE__ */ r(
2156
+ )
2157
+ ] }),
2158
+ /* @__PURE__ */ a("label", { children: [
2159
+ "Opacity",
2160
+ /* @__PURE__ */ e(
2161
+ "input",
2162
+ {
2163
+ type: "range",
2164
+ min: "0",
2165
+ max: "1",
2166
+ step: "0.1",
2167
+ value: i.properties.opacity ?? 1,
2168
+ onChange: (u) => {
2169
+ const h = parseFloat(u.target.value);
2170
+ k({
2171
+ tracks: p.tracks.map(
2172
+ (v) => v.id === o.id ? {
2173
+ ...v,
2174
+ items: v.items.map(
2175
+ (g) => g.id === i.id ? {
2176
+ ...g,
2177
+ properties: { ...g.properties, opacity: h }
2178
+ } : g
2179
+ )
2180
+ } : v
2181
+ )
2182
+ });
2183
+ }
2184
+ }
2185
+ )
2186
+ ] })
2187
+ ] }),
2188
+ /* @__PURE__ */ a("h4", { children: [
2189
+ "Effects (",
2190
+ i.effects.length,
2191
+ ")"
2192
+ ] }),
2193
+ /* @__PURE__ */ e("div", { className: "effects-list", children: i.effects.map((u) => /* @__PURE__ */ e("div", { className: "effect-badge", children: u.name }, u.id)) })
2194
+ ] });
2195
+ })() : null, r = K ? /* @__PURE__ */ a("aside", { className: "video-editor__asset-library", children: [
2196
+ /* @__PURE__ */ a("div", { className: "asset-library__header", children: [
2197
+ /* @__PURE__ */ e("h3", { children: "Assets" }),
2198
+ /* @__PURE__ */ e("button", { className: "close-button", onClick: () => P(!1), children: "×" })
2199
+ ] }),
2200
+ /* @__PURE__ */ e("div", { className: "asset-library__upload", children: /* @__PURE__ */ a("label", { className: "upload-zone", children: [
2201
+ /* @__PURE__ */ e(
2202
+ "input",
2203
+ {
2204
+ type: "file",
2205
+ multiple: !0,
2206
+ accept: "video/*,audio/*,image/*",
2207
+ onChange: (t) => t.target.files && N(t.target.files),
2208
+ hidden: !0
2209
+ }
2210
+ ),
2211
+ /* @__PURE__ */ e("span", { className: "upload-icon", children: "+" }),
2212
+ /* @__PURE__ */ e("span", { children: "Drop files or click to upload" })
2213
+ ] }) }),
2214
+ /* @__PURE__ */ e("div", { className: "asset-library__list", children: p.assets.map((t) => /* @__PURE__ */ a(
2215
+ "div",
2216
+ {
2217
+ className: "asset-item",
2218
+ draggable: !0,
2219
+ onDragStart: (o) => o.dataTransfer.setData("assetId", t.id),
2220
+ children: [
2221
+ /* @__PURE__ */ e("div", { className: "asset-thumbnail", children: t.thumbnail ? /* @__PURE__ */ e("img", { src: t.thumbnail, alt: t.name }) : /* @__PURE__ */ e("span", { className: "asset-type-icon", children: t.type === "video" ? "🎬" : t.type === "audio" ? "🎵" : "🖼️" }) }),
2222
+ /* @__PURE__ */ a("div", { className: "asset-info", children: [
2223
+ /* @__PURE__ */ e("span", { className: "asset-name", children: t.name }),
2224
+ /* @__PURE__ */ a("span", { className: "asset-meta", children: [
2225
+ (t.size / 1024 / 1024).toFixed(1),
2226
+ "MB"
2227
+ ] })
2228
+ ] })
2229
+ ]
2230
+ },
2231
+ t.id
2232
+ )) })
2233
+ ] }) : void 0, s = /* @__PURE__ */ e("div", { className: "video-editor__preview-area", children: /* @__PURE__ */ a("div", { className: "preview-container", children: [
2234
+ /* @__PURE__ */ a(
2235
+ "div",
2236
+ {
2237
+ className: "preview-canvas",
2238
+ style: { aspectRatio: `${p.resolution.width}/${p.resolution.height}` },
2239
+ children: [
2240
+ /* @__PURE__ */ e("video", { ref: te, className: "preview-video" }),
2241
+ /* @__PURE__ */ e("div", { className: "preview-overlay", children: !K && /* @__PURE__ */ e("button", { className: "toggle-library-button", onClick: () => P(!0), children: "📁" }) })
2242
+ ]
2243
+ }
2244
+ ),
2245
+ /* @__PURE__ */ a("div", { className: "playback-controls", children: [
2246
+ /* @__PURE__ */ e("button", { onClick: () => Y(0), children: "⏮️" }),
2247
+ /* @__PURE__ */ e("button", { onClick: () => Y(A - 1 / p.frameRate), children: "⏪" }),
2248
+ /* @__PURE__ */ e("button", { onClick: se, className: "play-button", children: O ? "⏸️" : "▶️" }),
2249
+ /* @__PURE__ */ e("button", { onClick: () => Y(A + 1 / p.frameRate), children: "⏩" }),
2250
+ /* @__PURE__ */ e("span", { className: "time-display", children: ae(A) })
2251
+ ] })
2252
+ ] }) }), m = /* @__PURE__ */ a("div", { className: "video-editor__panel", children: [
2253
+ R === "timeline" && /* @__PURE__ */ a("div", { className: "timeline-panel", children: [
2254
+ /* @__PURE__ */ a("div", { className: "timeline-toolbar", children: [
2255
+ /* @__PURE__ */ a("div", { className: "track-buttons", children: [
2256
+ /* @__PURE__ */ e("button", { onClick: () => W("video"), children: "+ Video Track" }),
2257
+ /* @__PURE__ */ e("button", { onClick: () => W("audio"), children: "+ Audio Track" }),
2258
+ /* @__PURE__ */ e("button", { onClick: () => W("text"), children: "+ Text Track" })
2259
+ ] }),
2260
+ /* @__PURE__ */ a("div", { className: "zoom-controls", children: [
2261
+ /* @__PURE__ */ e("button", { onClick: () => Z(Math.max(0.25, M - 0.25)), children: "-" }),
2262
+ /* @__PURE__ */ a("span", { children: [
2263
+ Math.round(M * 100),
2264
+ "%"
2265
+ ] }),
2266
+ /* @__PURE__ */ e("button", { onClick: () => Z(Math.min(4, M + 0.25)), children: "+" })
2267
+ ] })
2268
+ ] }),
2269
+ /* @__PURE__ */ a("div", { className: "timeline-container", ref: ie, children: [
2270
+ /* @__PURE__ */ e("div", { className: "timeline-ruler", children: Array.from({ length: Math.ceil(30 / M) }).map((t, o) => /* @__PURE__ */ e("div", { className: "ruler-mark", style: { left: `${o * 50 * M}px` }, children: ae(o) }, o)) }),
2271
+ /* @__PURE__ */ e("div", { className: "timeline-playhead", style: { left: `${A * 50 * M}px` } }),
2272
+ /* @__PURE__ */ e("div", { className: "timeline-tracks", children: p.tracks.map((t) => /* @__PURE__ */ a(
2056
2273
  "div",
2057
2274
  {
2058
- className: "asset-item",
2059
- draggable: !0,
2060
- onDragStart: (o) => o.dataTransfer.setData("assetId", n.id),
2275
+ className: `timeline-track ${D === t.id ? "timeline-track--selected" : ""} ${t.locked ? "timeline-track--locked" : ""}`,
2276
+ onClick: () => y(t.id),
2277
+ onDrop: (o) => {
2278
+ o.preventDefault();
2279
+ const i = o.dataTransfer.getData("assetId"), u = p.assets.find((h) => h.id === i);
2280
+ u && E(t.id, u);
2281
+ },
2282
+ onDragOver: (o) => o.preventDefault(),
2061
2283
  children: [
2062
- /* @__PURE__ */ e("div", { className: "asset-thumbnail", children: n.thumbnail ? /* @__PURE__ */ e("img", { src: n.thumbnail, alt: n.name }) : /* @__PURE__ */ e("span", { className: "asset-type-icon", children: n.type === "video" ? "🎬" : n.type === "audio" ? "🎵" : "🖼️" }) }),
2063
- /* @__PURE__ */ r("div", { className: "asset-info", children: [
2064
- /* @__PURE__ */ e("span", { className: "asset-name", children: n.name }),
2065
- /* @__PURE__ */ r("span", { className: "asset-meta", children: [
2066
- (n.size / 1024 / 1024).toFixed(1),
2067
- "MB"
2284
+ /* @__PURE__ */ a("div", { className: "track-header", children: [
2285
+ /* @__PURE__ */ e("span", { className: "track-name", children: t.name }),
2286
+ /* @__PURE__ */ a("div", { className: "track-controls", children: [
2287
+ /* @__PURE__ */ e(
2288
+ "button",
2289
+ {
2290
+ className: t.muted ? "active" : "",
2291
+ onClick: (o) => {
2292
+ o.stopPropagation(), G(t.id);
2293
+ },
2294
+ children: t.muted ? "🔇" : "🔊"
2295
+ }
2296
+ ),
2297
+ /* @__PURE__ */ e(
2298
+ "button",
2299
+ {
2300
+ className: t.locked ? "active" : "",
2301
+ onClick: (o) => {
2302
+ o.stopPropagation(), ee(t.id);
2303
+ },
2304
+ children: t.locked ? "🔒" : "🔓"
2305
+ }
2306
+ ),
2307
+ /* @__PURE__ */ e(
2308
+ "button",
2309
+ {
2310
+ onClick: (o) => {
2311
+ o.stopPropagation(), q(t.id);
2312
+ },
2313
+ children: "🗑️"
2314
+ }
2315
+ )
2068
2316
  ] })
2069
- ] })
2317
+ ] }),
2318
+ /* @__PURE__ */ e("div", { className: "track-items", children: t.items.map((o) => {
2319
+ const i = p.assets.find((u) => u.id === o.assetId);
2320
+ return /* @__PURE__ */ a(
2321
+ "div",
2322
+ {
2323
+ className: `track-item track-item--${o.type} ${x === o.id ? "track-item--selected" : ""}`,
2324
+ style: {
2325
+ left: `${o.startTime * 50 * M}px`,
2326
+ width: `${o.duration * 50 * M}px`
2327
+ },
2328
+ onClick: (u) => {
2329
+ u.stopPropagation(), S(o.id);
2330
+ },
2331
+ children: [
2332
+ /* @__PURE__ */ e("span", { className: "item-name", children: (i == null ? void 0 : i.name) || "Untitled" }),
2333
+ o.transitions.length > 0 && /* @__PURE__ */ e("span", { className: "item-transitions", children: "✨" }),
2334
+ o.effects.length > 0 && /* @__PURE__ */ e("span", { className: "item-effects", children: "🎨" })
2335
+ ]
2336
+ },
2337
+ o.id
2338
+ );
2339
+ }) })
2070
2340
  ]
2071
2341
  },
2072
- n.id
2342
+ t.id
2073
2343
  )) })
2074
- ] }),
2075
- /* @__PURE__ */ r("div", { className: "video-editor__preview-area", children: [
2076
- /* @__PURE__ */ r("div", { className: "preview-container", children: [
2077
- /* @__PURE__ */ r(
2078
- "div",
2344
+ ] })
2345
+ ] }),
2346
+ R === "effects" && /* @__PURE__ */ a("div", { className: "effects-panel", children: [
2347
+ /* @__PURE__ */ e("h3", { children: "Video Effects" }),
2348
+ /* @__PURE__ */ e("p", { className: "panel-hint", children: "Select a clip to apply effects" }),
2349
+ /* @__PURE__ */ e("div", { className: "effects-grid", children: Ge.map((t) => /* @__PURE__ */ a(
2350
+ "button",
2351
+ {
2352
+ className: "effect-preset",
2353
+ disabled: !x,
2354
+ onClick: () => {
2355
+ const o = j();
2356
+ o && J(o.track.id, o.item.id, t.type);
2357
+ },
2358
+ children: [
2359
+ /* @__PURE__ */ e("span", { className: "effect-icon", children: t.icon }),
2360
+ /* @__PURE__ */ e("span", { className: "effect-name", children: t.name })
2361
+ ]
2362
+ },
2363
+ t.type
2364
+ )) })
2365
+ ] }),
2366
+ R === "transitions" && /* @__PURE__ */ a("div", { className: "transitions-panel", children: [
2367
+ /* @__PURE__ */ e("h3", { children: "Transitions" }),
2368
+ /* @__PURE__ */ e("p", { className: "panel-hint", children: "Select a clip and add transitions between clips" }),
2369
+ /* @__PURE__ */ e("div", { className: "transitions-grid", children: je.map((t) => /* @__PURE__ */ a("div", { className: "transition-preset", children: [
2370
+ /* @__PURE__ */ e("span", { className: "transition-name", children: t.name }),
2371
+ /* @__PURE__ */ a("div", { className: "transition-buttons", children: [
2372
+ /* @__PURE__ */ e(
2373
+ "button",
2079
2374
  {
2080
- className: "preview-canvas",
2081
- style: { aspectRatio: `${p.resolution.width}/${p.resolution.height}` },
2375
+ disabled: !x,
2376
+ onClick: () => {
2377
+ const o = j();
2378
+ o && V(o.track.id, o.item.id, t.type, "start");
2379
+ },
2380
+ children: "In"
2381
+ }
2382
+ ),
2383
+ /* @__PURE__ */ e(
2384
+ "button",
2385
+ {
2386
+ disabled: !x,
2387
+ onClick: () => {
2388
+ const o = j();
2389
+ o && V(o.track.id, o.item.id, t.type, "end");
2390
+ },
2391
+ children: "Out"
2392
+ }
2393
+ )
2394
+ ] })
2395
+ ] }, t.type)) })
2396
+ ] }),
2397
+ R === "export" && /* @__PURE__ */ a("div", { className: "export-panel", children: [
2398
+ /* @__PURE__ */ e("h3", { children: "Export Settings" }),
2399
+ /* @__PURE__ */ a("div", { className: "export-settings", children: [
2400
+ /* @__PURE__ */ a("div", { className: "setting-group", children: [
2401
+ /* @__PURE__ */ e("label", { children: "Resolution" }),
2402
+ /* @__PURE__ */ a(
2403
+ "select",
2404
+ {
2405
+ value: `${p.resolution.width}x${p.resolution.height}`,
2406
+ onChange: (t) => {
2407
+ const [o, i] = t.target.value.split("x").map(Number);
2408
+ k({ resolution: { width: o, height: i } });
2409
+ },
2082
2410
  children: [
2083
- /* @__PURE__ */ e("video", { ref: se, className: "preview-video" }),
2084
- /* @__PURE__ */ e("div", { className: "preview-overlay", children: !W && /* @__PURE__ */ e(
2085
- "button",
2086
- {
2087
- className: "toggle-library-button",
2088
- onClick: () => P(!0),
2089
- children: "📁"
2090
- }
2091
- ) })
2411
+ /* @__PURE__ */ e("option", { value: "1920x1080", children: "1080p (1920x1080)" }),
2412
+ /* @__PURE__ */ e("option", { value: "2560x1440", children: "1440p (2560x1440)" }),
2413
+ /* @__PURE__ */ e("option", { value: "3840x2160", children: "4K (3840x2160)" }),
2414
+ /* @__PURE__ */ e("option", { value: "1280x720", children: "720p (1280x720)" })
2092
2415
  ]
2093
2416
  }
2094
- ),
2095
- /* @__PURE__ */ r("div", { className: "playback-controls", children: [
2096
- /* @__PURE__ */ e("button", { onClick: () => Q(0), children: "⏮️" }),
2097
- /* @__PURE__ */ e("button", { onClick: () => Q(z - 1 / p.frameRate), children: "⏪" }),
2098
- /* @__PURE__ */ e("button", { onClick: de, className: "play-button", children: q ? "⏸️" : "▶️" }),
2099
- /* @__PURE__ */ e("button", { onClick: () => Q(z + 1 / p.frameRate), children: "⏩" }),
2100
- /* @__PURE__ */ e("span", { className: "time-display", children: te(z) })
2101
- ] })
2417
+ )
2102
2418
  ] }),
2103
- k && D !== "export" && /* @__PURE__ */ e("div", { className: "item-inspector", children: (() => {
2104
- const n = Z();
2105
- if (!n)
2106
- return null;
2107
- const { track: o, item: a } = n;
2108
- return /* @__PURE__ */ r(ie, { children: [
2109
- /* @__PURE__ */ e("h4", { children: "Item Properties" }),
2110
- /* @__PURE__ */ r("div", { className: "inspector-section", children: [
2111
- /* @__PURE__ */ r("label", { children: [
2112
- "Start Time",
2113
- /* @__PURE__ */ e(
2114
- "input",
2115
- {
2116
- type: "number",
2117
- step: "0.1",
2118
- value: a.startTime,
2119
- onChange: (t) => {
2120
- const c = parseFloat(t.target.value);
2121
- w({
2122
- tracks: p.tracks.map(
2123
- (u) => u.id === o.id ? {
2124
- ...u,
2125
- items: u.items.map(
2126
- (h) => h.id === a.id ? { ...h, startTime: c } : h
2127
- )
2128
- } : u
2129
- )
2130
- });
2131
- }
2132
- }
2133
- )
2134
- ] }),
2135
- /* @__PURE__ */ r("label", { children: [
2136
- "Duration",
2137
- /* @__PURE__ */ e(
2138
- "input",
2139
- {
2140
- type: "number",
2141
- step: "0.1",
2142
- value: a.duration,
2143
- onChange: (t) => {
2144
- const c = parseFloat(t.target.value);
2145
- w({
2146
- tracks: p.tracks.map(
2147
- (u) => u.id === o.id ? {
2148
- ...u,
2149
- items: u.items.map(
2150
- (h) => h.id === a.id ? { ...h, duration: c } : h
2151
- )
2152
- } : u
2153
- )
2154
- });
2155
- }
2156
- }
2157
- )
2158
- ] }),
2159
- /* @__PURE__ */ r("label", { children: [
2160
- "Opacity",
2161
- /* @__PURE__ */ e(
2162
- "input",
2163
- {
2164
- type: "range",
2165
- min: "0",
2166
- max: "1",
2167
- step: "0.1",
2168
- value: a.properties.opacity ?? 1,
2169
- onChange: (t) => {
2170
- const c = parseFloat(t.target.value);
2171
- w({
2172
- tracks: p.tracks.map(
2173
- (u) => u.id === o.id ? {
2174
- ...u,
2175
- items: u.items.map(
2176
- (h) => h.id === a.id ? {
2177
- ...h,
2178
- properties: { ...h.properties, opacity: c }
2179
- } : h
2180
- )
2181
- } : u
2182
- )
2183
- });
2184
- }
2185
- }
2186
- )
2187
- ] })
2188
- ] }),
2189
- /* @__PURE__ */ r("h4", { children: [
2190
- "Effects (",
2191
- a.effects.length,
2192
- ")"
2193
- ] }),
2194
- /* @__PURE__ */ e("div", { className: "effects-list", children: a.effects.map((t) => /* @__PURE__ */ e("div", { className: "effect-badge", children: t.name }, t.id)) })
2195
- ] });
2196
- })() })
2197
- ] })
2198
- ] }),
2199
- /* @__PURE__ */ r("div", { className: "video-editor__panel", children: [
2200
- D === "timeline" && /* @__PURE__ */ r("div", { className: "timeline-panel", children: [
2201
- /* @__PURE__ */ r("div", { className: "timeline-toolbar", children: [
2202
- /* @__PURE__ */ r("div", { className: "track-buttons", children: [
2203
- /* @__PURE__ */ e("button", { onClick: () => B("video"), children: "+ Video Track" }),
2204
- /* @__PURE__ */ e("button", { onClick: () => B("audio"), children: "+ Audio Track" }),
2205
- /* @__PURE__ */ e("button", { onClick: () => B("text"), children: "+ Text Track" })
2206
- ] }),
2207
- /* @__PURE__ */ r("div", { className: "zoom-controls", children: [
2208
- /* @__PURE__ */ e("button", { onClick: () => J(Math.max(0.25, M - 0.25)), children: "-" }),
2209
- /* @__PURE__ */ r("span", { children: [
2210
- Math.round(M * 100),
2211
- "%"
2212
- ] }),
2213
- /* @__PURE__ */ e("button", { onClick: () => J(Math.min(4, M + 0.25)), children: "+" })
2214
- ] })
2419
+ /* @__PURE__ */ a("div", { className: "setting-group", children: [
2420
+ /* @__PURE__ */ e("label", { children: "Frame Rate" }),
2421
+ /* @__PURE__ */ a(
2422
+ "select",
2423
+ {
2424
+ value: p.frameRate,
2425
+ onChange: (t) => k({ frameRate: parseInt(t.target.value) }),
2426
+ children: [
2427
+ /* @__PURE__ */ e("option", { value: "24", children: "24 fps" }),
2428
+ /* @__PURE__ */ e("option", { value: "30", children: "30 fps" }),
2429
+ /* @__PURE__ */ e("option", { value: "60", children: "60 fps" }),
2430
+ /* @__PURE__ */ e("option", { value: "120", children: "120 fps" })
2431
+ ]
2432
+ }
2433
+ )
2215
2434
  ] }),
2216
- /* @__PURE__ */ r("div", { className: "timeline-container", ref: oe, children: [
2217
- /* @__PURE__ */ e("div", { className: "timeline-ruler", children: Array.from({ length: Math.ceil(30 / M) }).map((n, o) => /* @__PURE__ */ e("div", { className: "ruler-mark", style: { left: `${o * 50 * M}px` }, children: te(o) }, o)) }),
2218
- /* @__PURE__ */ e("div", { className: "timeline-playhead", style: { left: `${z * 50 * M}px` } }),
2219
- /* @__PURE__ */ e("div", { className: "timeline-tracks", children: p.tracks.map((n) => /* @__PURE__ */ r(
2220
- "div",
2435
+ /* @__PURE__ */ a("div", { className: "setting-group", children: [
2436
+ /* @__PURE__ */ e("label", { children: "Video Codec" }),
2437
+ /* @__PURE__ */ a(
2438
+ "select",
2221
2439
  {
2222
- className: `timeline-track ${E === n.id ? "timeline-track--selected" : ""} ${n.locked ? "timeline-track--locked" : ""}`,
2223
- onClick: () => y(n.id),
2224
- onDrop: (o) => {
2225
- o.preventDefault();
2226
- const a = o.dataTransfer.getData("assetId"), t = p.assets.find((c) => c.id === a);
2227
- t && _(n.id, t);
2228
- },
2229
- onDragOver: (o) => o.preventDefault(),
2440
+ value: p.settings.video.codec,
2441
+ onChange: (t) => k({
2442
+ settings: {
2443
+ ...p.settings,
2444
+ video: {
2445
+ ...p.settings.video,
2446
+ codec: t.target.value
2447
+ }
2448
+ }
2449
+ }),
2230
2450
  children: [
2231
- /* @__PURE__ */ r("div", { className: "track-header", children: [
2232
- /* @__PURE__ */ e("span", { className: "track-name", children: n.name }),
2233
- /* @__PURE__ */ r("div", { className: "track-controls", children: [
2234
- /* @__PURE__ */ e(
2235
- "button",
2236
- {
2237
- className: n.muted ? "active" : "",
2238
- onClick: (o) => {
2239
- o.stopPropagation(), G(n.id);
2240
- },
2241
- children: n.muted ? "🔇" : "🔊"
2242
- }
2243
- ),
2244
- /* @__PURE__ */ e(
2245
- "button",
2246
- {
2247
- className: n.locked ? "active" : "",
2248
- onClick: (o) => {
2249
- o.stopPropagation(), re(n.id);
2250
- },
2251
- children: n.locked ? "🔒" : "🔓"
2252
- }
2253
- ),
2254
- /* @__PURE__ */ e(
2255
- "button",
2256
- {
2257
- onClick: (o) => {
2258
- o.stopPropagation(), Y(n.id);
2259
- },
2260
- children: "🗑️"
2261
- }
2262
- )
2263
- ] })
2264
- ] }),
2265
- /* @__PURE__ */ e("div", { className: "track-items", children: n.items.map((o) => {
2266
- const a = p.assets.find((t) => t.id === o.assetId);
2267
- return /* @__PURE__ */ r(
2268
- "div",
2269
- {
2270
- className: `track-item track-item--${o.type} ${k === o.id ? "track-item--selected" : ""}`,
2271
- style: {
2272
- left: `${o.startTime * 50 * M}px`,
2273
- width: `${o.duration * 50 * M}px`
2274
- },
2275
- onClick: (t) => {
2276
- t.stopPropagation(), S(o.id);
2277
- },
2278
- children: [
2279
- /* @__PURE__ */ e("span", { className: "item-name", children: (a == null ? void 0 : a.name) || "Untitled" }),
2280
- o.transitions.length > 0 && /* @__PURE__ */ e("span", { className: "item-transitions", children: "✨" }),
2281
- o.effects.length > 0 && /* @__PURE__ */ e("span", { className: "item-effects", children: "🎨" })
2282
- ]
2283
- },
2284
- o.id
2285
- );
2286
- }) })
2451
+ /* @__PURE__ */ e("option", { value: "h264", children: "H.264 (Best Compatibility)" }),
2452
+ /* @__PURE__ */ e("option", { value: "h265", children: "H.265/HEVC (Smaller Size)" }),
2453
+ /* @__PURE__ */ e("option", { value: "vp9", children: "VP9 (Web Optimized)" }),
2454
+ /* @__PURE__ */ e("option", { value: "av1", children: "AV1 (Future Standard)" })
2287
2455
  ]
2288
- },
2289
- n.id
2290
- )) })
2456
+ }
2457
+ )
2458
+ ] }),
2459
+ /* @__PURE__ */ a("div", { className: "setting-group", children: [
2460
+ /* @__PURE__ */ e("label", { children: "Video Bitrate (Mbps)" }),
2461
+ /* @__PURE__ */ e(
2462
+ "input",
2463
+ {
2464
+ type: "number",
2465
+ value: p.settings.video.bitrate / 1e3,
2466
+ onChange: (t) => k({
2467
+ settings: {
2468
+ ...p.settings,
2469
+ video: {
2470
+ ...p.settings.video,
2471
+ bitrate: parseFloat(t.target.value) * 1e3
2472
+ }
2473
+ }
2474
+ }),
2475
+ min: "1",
2476
+ max: "100"
2477
+ }
2478
+ )
2291
2479
  ] })
2292
2480
  ] }),
2293
- D === "effects" && /* @__PURE__ */ r("div", { className: "effects-panel", children: [
2294
- /* @__PURE__ */ e("h3", { children: "Video Effects" }),
2295
- /* @__PURE__ */ e("p", { className: "panel-hint", children: "Select a clip to apply effects" }),
2296
- /* @__PURE__ */ e("div", { className: "effects-grid", children: Ke.map((n) => /* @__PURE__ */ r(
2297
- "button",
2298
- {
2299
- className: "effect-preset",
2300
- disabled: !k,
2301
- onClick: () => {
2302
- const o = Z();
2303
- o && X(o.track.id, o.item.id, n.type);
2304
- },
2305
- children: [
2306
- /* @__PURE__ */ e("span", { className: "effect-icon", children: n.icon }),
2307
- /* @__PURE__ */ e("span", { className: "effect-name", children: n.name })
2308
- ]
2309
- },
2310
- n.type
2311
- )) })
2312
- ] }),
2313
- D === "transitions" && /* @__PURE__ */ r("div", { className: "transitions-panel", children: [
2314
- /* @__PURE__ */ e("h3", { children: "Transitions" }),
2315
- /* @__PURE__ */ e("p", { className: "panel-hint", children: "Select a clip and add transitions between clips" }),
2316
- /* @__PURE__ */ e("div", { className: "transitions-grid", children: We.map((n) => /* @__PURE__ */ r("div", { className: "transition-preset", children: [
2317
- /* @__PURE__ */ e("span", { className: "transition-name", children: n.name }),
2318
- /* @__PURE__ */ r("div", { className: "transition-buttons", children: [
2319
- /* @__PURE__ */ e(
2320
- "button",
2321
- {
2322
- disabled: !k,
2323
- onClick: () => {
2324
- const o = Z();
2325
- o && L(
2326
- o.track.id,
2327
- o.item.id,
2328
- n.type,
2329
- "start"
2330
- );
2331
- },
2332
- children: "In"
2333
- }
2334
- ),
2335
- /* @__PURE__ */ e(
2336
- "button",
2337
- {
2338
- disabled: !k,
2339
- onClick: () => {
2340
- const o = Z();
2341
- o && L(o.track.id, o.item.id, n.type, "end");
2342
- },
2343
- children: "Out"
2344
- }
2345
- )
2346
- ] })
2347
- ] }, n.type)) })
2348
- ] }),
2349
- D === "export" && /* @__PURE__ */ r("div", { className: "export-panel", children: [
2350
- /* @__PURE__ */ e("h3", { children: "Export Settings" }),
2351
- /* @__PURE__ */ r("div", { className: "export-settings", children: [
2352
- /* @__PURE__ */ r("div", { className: "setting-group", children: [
2353
- /* @__PURE__ */ e("label", { children: "Resolution" }),
2354
- /* @__PURE__ */ r(
2355
- "select",
2356
- {
2357
- value: `${p.resolution.width}x${p.resolution.height}`,
2358
- onChange: (n) => {
2359
- const [o, a] = n.target.value.split("x").map(Number);
2360
- w({ resolution: { width: o, height: a } });
2361
- },
2362
- children: [
2363
- /* @__PURE__ */ e("option", { value: "1920x1080", children: "1080p (1920x1080)" }),
2364
- /* @__PURE__ */ e("option", { value: "2560x1440", children: "1440p (2560x1440)" }),
2365
- /* @__PURE__ */ e("option", { value: "3840x2160", children: "4K (3840x2160)" }),
2366
- /* @__PURE__ */ e("option", { value: "1280x720", children: "720p (1280x720)" })
2367
- ]
2368
- }
2369
- )
2370
- ] }),
2371
- /* @__PURE__ */ r("div", { className: "setting-group", children: [
2372
- /* @__PURE__ */ e("label", { children: "Frame Rate" }),
2373
- /* @__PURE__ */ r(
2374
- "select",
2375
- {
2376
- value: p.frameRate,
2377
- onChange: (n) => w({ frameRate: parseInt(n.target.value) }),
2378
- children: [
2379
- /* @__PURE__ */ e("option", { value: "24", children: "24 fps" }),
2380
- /* @__PURE__ */ e("option", { value: "30", children: "30 fps" }),
2381
- /* @__PURE__ */ e("option", { value: "60", children: "60 fps" }),
2382
- /* @__PURE__ */ e("option", { value: "120", children: "120 fps" })
2383
- ]
2384
- }
2385
- )
2386
- ] }),
2387
- /* @__PURE__ */ r("div", { className: "setting-group", children: [
2388
- /* @__PURE__ */ e("label", { children: "Video Codec" }),
2389
- /* @__PURE__ */ r(
2390
- "select",
2391
- {
2392
- value: p.settings.video.codec,
2393
- onChange: (n) => w({
2394
- settings: {
2395
- ...p.settings,
2396
- video: {
2397
- ...p.settings.video,
2398
- codec: n.target.value
2399
- }
2400
- }
2401
- }),
2402
- children: [
2403
- /* @__PURE__ */ e("option", { value: "h264", children: "H.264 (Best Compatibility)" }),
2404
- /* @__PURE__ */ e("option", { value: "h265", children: "H.265/HEVC (Smaller Size)" }),
2405
- /* @__PURE__ */ e("option", { value: "vp9", children: "VP9 (Web Optimized)" }),
2406
- /* @__PURE__ */ e("option", { value: "av1", children: "AV1 (Future Standard)" })
2407
- ]
2408
- }
2409
- )
2410
- ] }),
2411
- /* @__PURE__ */ r("div", { className: "setting-group", children: [
2412
- /* @__PURE__ */ e("label", { children: "Video Bitrate (Mbps)" }),
2413
- /* @__PURE__ */ e(
2414
- "input",
2415
- {
2416
- type: "number",
2417
- value: p.settings.video.bitrate / 1e3,
2418
- onChange: (n) => w({
2419
- settings: {
2420
- ...p.settings,
2421
- video: {
2422
- ...p.settings.video,
2423
- bitrate: parseFloat(n.target.value) * 1e3
2424
- }
2425
- }
2426
- }),
2427
- min: "1",
2428
- max: "100"
2429
- }
2430
- )
2431
- ] })
2432
- ] }),
2433
- /* @__PURE__ */ e(
2434
- "button",
2435
- {
2436
- className: "export-button",
2437
- onClick: ee,
2438
- disabled: U !== null,
2439
- children: U !== null ? `Exporting... ${Math.round(U)}%` : "Export Video"
2440
- }
2441
- ),
2442
- U !== null && /* @__PURE__ */ e("div", { className: "export-progress", children: /* @__PURE__ */ e("div", { className: "export-progress-bar", style: { width: `${U}%` } }) })
2443
- ] })
2481
+ /* @__PURE__ */ e(
2482
+ "button",
2483
+ {
2484
+ className: "export-button",
2485
+ onClick: X,
2486
+ disabled: U !== null,
2487
+ children: U !== null ? `Exporting... ${Math.round(U)}%` : "Export Video"
2488
+ }
2489
+ ),
2490
+ U !== null && /* @__PURE__ */ e("div", { className: "export-progress", children: /* @__PURE__ */ e("div", { className: "export-progress-bar", style: { width: `${U}%` } }) })
2444
2491
  ] })
2445
2492
  ] });
2446
- }, je = {
2493
+ return /* @__PURE__ */ a(
2494
+ he,
2495
+ {
2496
+ flush: !0,
2497
+ className: `nice-video-editor ${H}`,
2498
+ height: "100%",
2499
+ style: { position: "relative", minHeight: 600 },
2500
+ toolbar: oe,
2501
+ sidebar: r,
2502
+ rightSidebar: ce ?? void 0,
2503
+ bottomPanel: m,
2504
+ children: [
2505
+ /* @__PURE__ */ e("span", { style: { position: "absolute", top: 6, right: 6, zIndex: 30 }, children: /* @__PURE__ */ e(Oe, { steps: Le(I, Ze) }) }),
2506
+ s
2507
+ ]
2508
+ }
2509
+ );
2510
+ }, qe = {
2447
2511
  video: {
2448
2512
  source: "screen",
2449
2513
  showCursor: !0,
@@ -2460,121 +2524,121 @@ const Be = {
2460
2524
  format: "webm",
2461
2525
  quality: "high"
2462
2526
  }
2463
- }, Xe = ({
2464
- options: l,
2465
- onRecordingStart: m,
2466
- onRecordingStop: f,
2527
+ }, ea = ({
2528
+ options: d,
2529
+ onRecordingStart: f,
2530
+ onRecordingStop: l,
2467
2531
  onRecordingPause: C,
2468
- onRecordingResume: T,
2532
+ onRecordingResume: H,
2469
2533
  onError: I,
2470
2534
  className: p = ""
2471
2535
  }) => {
2472
- var u, h;
2473
- const [i, D] = v({
2474
- ...je,
2475
- ...l
2476
- }), [b, E] = v(null), [y, k] = v("idle"), [S, z] = v([]), [R, q] = v(null), [K, M] = v(null), [J, W] = v(!1), [P, U] = v(!1), [O, oe] = v(
2536
+ var t, o;
2537
+ const [n, R] = w({
2538
+ ...qe,
2539
+ ...d
2540
+ }), [b, D] = w(null), [y, x] = w("idle"), [S, A] = w([]), [_, O] = w(null), [F, M] = w(null), [Z, K] = w(!1), [P, U] = w(!1), [B, ie] = w(
2477
2541
  "pen"
2478
- ), [se, A] = v("var(--nice-danger, #ff0000)"), w = F(null), g = F([]), B = F(null), Y = F(null), G = F(null), re = F(0);
2479
- ne(() => () => {
2480
- R && R.getTracks().forEach((s) => s.stop()), G.current && clearInterval(G.current);
2481
- }, [R]);
2482
- const _ = (s) => {
2483
- D((N) => ({
2484
- ...N,
2485
- ...s,
2486
- video: { ...N.video, ...s.video },
2487
- audio: { ...N.audio, ...s.audio },
2488
- output: { ...N.output, ...s.output }
2542
+ ), [te, z] = w("var(--nice-danger, #ff0000)"), k = L(null), N = L([]), W = L(null), q = L(null), G = L(null), ee = L(0);
2543
+ re(() => () => {
2544
+ _ && _.getTracks().forEach((i) => i.stop()), G.current && clearInterval(G.current);
2545
+ }, [_]);
2546
+ const E = (i) => {
2547
+ R((u) => ({
2548
+ ...u,
2549
+ ...i,
2550
+ video: { ...u.video, ...i.video },
2551
+ audio: { ...u.audio, ...i.audio },
2552
+ output: { ...u.output, ...i.output }
2489
2553
  }));
2490
- }, X = async () => {
2554
+ }, J = async () => {
2491
2555
  try {
2492
- k("preparing");
2493
- const s = {
2556
+ x("preparing");
2557
+ const i = {
2494
2558
  video: {
2495
- cursor: i.video.showCursor ? "always" : "never",
2496
- frameRate: i.video.frameRate
2559
+ cursor: n.video.showCursor ? "always" : "never",
2560
+ frameRate: n.video.frameRate
2497
2561
  },
2498
- audio: i.audio.source === "system" || i.audio.source === "both"
2499
- }, N = await navigator.mediaDevices.getDisplayMedia(s);
2500
- if (i.audio.enabled && (i.audio.source === "microphone" || i.audio.source === "both"))
2562
+ audio: n.audio.source === "system" || n.audio.source === "both"
2563
+ }, u = await navigator.mediaDevices.getDisplayMedia(i);
2564
+ if (n.audio.enabled && (n.audio.source === "microphone" || n.audio.source === "both"))
2501
2565
  try {
2502
2566
  (await navigator.mediaDevices.getUserMedia({
2503
2567
  audio: {
2504
- echoCancellation: i.audio.echoCancellation,
2505
- noiseSuppression: i.audio.noiseSuppression
2568
+ echoCancellation: n.audio.echoCancellation,
2569
+ noiseSuppression: n.audio.noiseSuppression
2506
2570
  }
2507
- })).getAudioTracks().forEach((V) => N.addTrack(V));
2508
- } catch (H) {
2509
- console.warn("Could not access microphone:", H);
2571
+ })).getAudioTracks().forEach((v) => u.addTrack(v));
2572
+ } catch (h) {
2573
+ console.warn("Could not access microphone:", h);
2510
2574
  }
2511
- q(N), B.current && (B.current.srcObject = N, B.current.play()), k("idle");
2512
- } catch (s) {
2513
- k("error"), I == null || I(s instanceof Error ? s : new Error("Failed to start preview"));
2575
+ O(u), W.current && (W.current.srcObject = u, W.current.play()), x("idle");
2576
+ } catch (i) {
2577
+ x("error"), I == null || I(i instanceof Error ? i : new Error("Failed to start preview"));
2514
2578
  }
2515
- }, L = async () => {
2516
- R || await X();
2517
- for (let s = 3; s > 0; s--)
2518
- M(s), await new Promise((N) => setTimeout(N, 1e3));
2579
+ }, V = async () => {
2580
+ _ || await J();
2581
+ for (let i = 3; i > 0; i--)
2582
+ M(i), await new Promise((u) => setTimeout(u, 1e3));
2519
2583
  M(null);
2520
2584
  try {
2521
- const s = R || await ce();
2522
- if (!s)
2585
+ const i = _ || await ne();
2586
+ if (!i)
2523
2587
  throw new Error("No stream available");
2524
- const N = n(i.output.format), H = new MediaRecorder(s, {
2525
- mimeType: N,
2526
- videoBitsPerSecond: o(i.output.quality)
2588
+ const u = oe(n.output.format), h = new MediaRecorder(i, {
2589
+ mimeType: u,
2590
+ videoBitsPerSecond: ce(n.output.quality)
2527
2591
  });
2528
- g.current = [], H.ondataavailable = (j) => {
2529
- j.data.size > 0 && g.current.push(j.data);
2530
- }, H.onstop = () => {
2531
- const j = new Blob(g.current, { type: N });
2532
- b && (f == null || f({ ...b, status: "stopped" }, j));
2533
- }, w.current = H, H.start(1e3), re.current = Date.now();
2534
- const V = {
2592
+ N.current = [], h.ondataavailable = (g) => {
2593
+ g.data.size > 0 && N.current.push(g.data);
2594
+ }, h.onstop = () => {
2595
+ const g = new Blob(N.current, { type: u });
2596
+ b && (l == null || l({ ...b, status: "stopped" }, g));
2597
+ }, k.current = h, h.start(1e3), ee.current = Date.now();
2598
+ const v = {
2535
2599
  id: crypto.randomUUID(),
2536
2600
  status: "recording",
2537
2601
  startTime: /* @__PURE__ */ new Date(),
2538
2602
  duration: 0,
2539
2603
  size: 0,
2540
- options: i,
2604
+ options: n,
2541
2605
  chunks: []
2542
2606
  };
2543
- E(V), k("recording"), m == null || m(V), G.current = setInterval(() => {
2544
- E(
2545
- (j) => j ? {
2546
- ...j,
2547
- duration: (Date.now() - re.current) / 1e3,
2548
- size: g.current.reduce((xe, Ce) => xe + Ce.size, 0)
2607
+ D(v), x("recording"), f == null || f(v), G.current = setInterval(() => {
2608
+ D(
2609
+ (g) => g ? {
2610
+ ...g,
2611
+ duration: (Date.now() - ee.current) / 1e3,
2612
+ size: N.current.reduce((Ce, Se) => Ce + Se.size, 0)
2549
2613
  } : null
2550
2614
  );
2551
2615
  }, 100);
2552
- } catch (s) {
2553
- k("error"), I == null || I(s instanceof Error ? s : new Error("Failed to start recording"));
2616
+ } catch (i) {
2617
+ x("error"), I == null || I(i instanceof Error ? i : new Error("Failed to start recording"));
2554
2618
  }
2555
- }, ce = async () => (await X(), R), de = () => {
2556
- w.current && y === "recording" && (w.current.pause(), k("paused"), C == null || C());
2557
- }, Q = () => {
2558
- w.current && y === "paused" && (w.current.resume(), k("recording"), T == null || T());
2559
- }, ee = () => {
2560
- G.current && clearInterval(G.current), w.current && (y === "recording" || y === "paused") && (w.current.stop(), k("stopped")), R && (R.getTracks().forEach((s) => s.stop()), q(null));
2561
- }, te = me(
2562
- (s) => {
2619
+ }, ne = async () => (await J(), _), se = () => {
2620
+ k.current && y === "recording" && (k.current.pause(), x("paused"), C == null || C());
2621
+ }, Y = () => {
2622
+ k.current && y === "paused" && (k.current.resume(), x("recording"), H == null || H());
2623
+ }, X = () => {
2624
+ G.current && clearInterval(G.current), k.current && (y === "recording" || y === "paused") && (k.current.stop(), x("stopped")), _ && (_.getTracks().forEach((i) => i.stop()), O(null));
2625
+ }, ae = me(
2626
+ (i) => {
2563
2627
  if (y !== "recording")
2564
2628
  return;
2565
- const N = {
2629
+ const u = {
2566
2630
  id: crypto.randomUUID(),
2567
2631
  time: (b == null ? void 0 : b.duration) || 0,
2568
- label: s || `Marker ${S.length + 1}`,
2569
- color: a()
2632
+ label: i || `Marker ${S.length + 1}`,
2633
+ color: r()
2570
2634
  };
2571
- z((H) => [...H, N]);
2635
+ A((h) => [...h, u]);
2572
2636
  },
2573
2637
  [y, b == null ? void 0 : b.duration, S.length]
2574
- ), Z = (s) => {
2575
- z((N) => N.filter((H) => H.id !== s));
2576
- }, n = (s) => {
2577
- switch (s) {
2638
+ ), j = (i) => {
2639
+ A((u) => u.filter((h) => h.id !== i));
2640
+ }, oe = (i) => {
2641
+ switch (i) {
2578
2642
  case "mp4":
2579
2643
  return "video/mp4";
2580
2644
  case "mkv":
@@ -2582,8 +2646,8 @@ const Be = {
2582
2646
  default:
2583
2647
  return "video/webm;codecs=vp9";
2584
2648
  }
2585
- }, o = (s) => {
2586
- switch (s) {
2649
+ }, ce = (i) => {
2650
+ switch (i) {
2587
2651
  case "low":
2588
2652
  return 25e5;
2589
2653
  case "medium":
@@ -2593,67 +2657,67 @@ const Be = {
2593
2657
  default:
2594
2658
  return 8e6;
2595
2659
  }
2596
- }, a = () => {
2597
- const s = ["var(--nice-danger, #ff4444)", "#44ff44", "#4444ff", "#ffff44", "#ff44ff", "#44ffff"];
2598
- return s[Math.floor(Math.random() * s.length)];
2599
- }, t = (s) => {
2600
- const N = Math.floor(s / 3600), H = Math.floor(s % 3600 / 60), V = Math.floor(s % 60), j = Math.floor(s % 1 * 100);
2601
- return N > 0 ? `${N}:${H.toString().padStart(2, "0")}:${V.toString().padStart(2, "0")}` : `${H.toString().padStart(2, "0")}:${V.toString().padStart(2, "0")}.${j.toString().padStart(2, "0")}`;
2602
- }, c = (s) => s < 1024 ? `${s} B` : s < 1024 * 1024 ? `${(s / 1024).toFixed(1)} KB` : `${(s / 1024 / 1024).toFixed(1)} MB`;
2603
- return /* @__PURE__ */ r("div", { className: `nice-screen-recorder ${p}`, children: [
2604
- /* @__PURE__ */ r("div", { className: "recorder__preview", children: [
2605
- K !== null && /* @__PURE__ */ e("div", { className: "countdown-overlay", children: /* @__PURE__ */ e("span", { className: "countdown-number", children: K }) }),
2606
- /* @__PURE__ */ e("video", { ref: B, className: "preview-video", muted: !0, playsInline: !0 }),
2607
- P && /* @__PURE__ */ e("canvas", { ref: Y, className: "annotation-canvas" }),
2608
- !R && y === "idle" && /* @__PURE__ */ e("div", { className: "preview-placeholder", children: /* @__PURE__ */ r("button", { className: "start-preview-button", onClick: X, children: [
2660
+ }, r = () => {
2661
+ const i = ["var(--nice-danger, #ff4444)", "#44ff44", "#4444ff", "#ffff44", "#ff44ff", "#44ffff"];
2662
+ return i[Math.floor(Math.random() * i.length)];
2663
+ }, s = (i) => {
2664
+ const u = Math.floor(i / 3600), h = Math.floor(i % 3600 / 60), v = Math.floor(i % 60), g = Math.floor(i % 1 * 100);
2665
+ return u > 0 ? `${u}:${h.toString().padStart(2, "0")}:${v.toString().padStart(2, "0")}` : `${h.toString().padStart(2, "0")}:${v.toString().padStart(2, "0")}.${g.toString().padStart(2, "0")}`;
2666
+ }, m = (i) => i < 1024 ? `${i} B` : i < 1024 * 1024 ? `${(i / 1024).toFixed(1)} KB` : `${(i / 1024 / 1024).toFixed(1)} MB`;
2667
+ return /* @__PURE__ */ a("div", { className: `nice-screen-recorder ${p}`, children: [
2668
+ /* @__PURE__ */ a("div", { className: "recorder__preview", children: [
2669
+ F !== null && /* @__PURE__ */ e("div", { className: "countdown-overlay", children: /* @__PURE__ */ e("span", { className: "countdown-number", children: F }) }),
2670
+ /* @__PURE__ */ e("video", { ref: W, className: "preview-video", muted: !0, playsInline: !0 }),
2671
+ P && /* @__PURE__ */ e("canvas", { ref: q, className: "annotation-canvas" }),
2672
+ !_ && y === "idle" && /* @__PURE__ */ e("div", { className: "preview-placeholder", children: /* @__PURE__ */ a("button", { className: "start-preview-button", onClick: J, children: [
2609
2673
  /* @__PURE__ */ e("span", { className: "icon", children: "🖥️" }),
2610
2674
  /* @__PURE__ */ e("span", { children: "Select Screen to Record" })
2611
2675
  ] }) }),
2612
- y === "recording" && /* @__PURE__ */ r("div", { className: "recording-indicator", children: [
2676
+ y === "recording" && /* @__PURE__ */ a("div", { className: "recording-indicator", children: [
2613
2677
  /* @__PURE__ */ e("span", { className: "recording-dot" }),
2614
2678
  /* @__PURE__ */ e("span", { children: "REC" })
2615
2679
  ] })
2616
2680
  ] }),
2617
- /* @__PURE__ */ r("div", { className: "recorder__controls", children: [
2618
- /* @__PURE__ */ r("div", { className: "controls__main", children: [
2619
- y === "idle" && /* @__PURE__ */ r(
2681
+ /* @__PURE__ */ a("div", { className: "recorder__controls", children: [
2682
+ /* @__PURE__ */ a("div", { className: "controls__main", children: [
2683
+ y === "idle" && /* @__PURE__ */ a(
2620
2684
  "button",
2621
2685
  {
2622
2686
  className: "control-button control-button--record",
2623
- onClick: L,
2624
- disabled: !!K,
2687
+ onClick: V,
2688
+ disabled: !!F,
2625
2689
  children: [
2626
2690
  /* @__PURE__ */ e("span", { className: "icon", children: "⏺️" }),
2627
2691
  /* @__PURE__ */ e("span", { children: "Start Recording" })
2628
2692
  ]
2629
2693
  }
2630
2694
  ),
2631
- y === "recording" && /* @__PURE__ */ r(ie, { children: [
2632
- /* @__PURE__ */ r("button", { className: "control-button control-button--pause", onClick: de, children: [
2695
+ y === "recording" && /* @__PURE__ */ a(le, { children: [
2696
+ /* @__PURE__ */ a("button", { className: "control-button control-button--pause", onClick: se, children: [
2633
2697
  /* @__PURE__ */ e("span", { className: "icon", children: "⏸️" }),
2634
2698
  /* @__PURE__ */ e("span", { children: "Pause" })
2635
2699
  ] }),
2636
- /* @__PURE__ */ r("button", { className: "control-button control-button--stop", onClick: ee, children: [
2700
+ /* @__PURE__ */ a("button", { className: "control-button control-button--stop", onClick: X, children: [
2637
2701
  /* @__PURE__ */ e("span", { className: "icon", children: "⏹️" }),
2638
2702
  /* @__PURE__ */ e("span", { children: "Stop" })
2639
2703
  ] })
2640
2704
  ] }),
2641
- y === "paused" && /* @__PURE__ */ r(ie, { children: [
2642
- /* @__PURE__ */ r("button", { className: "control-button control-button--resume", onClick: Q, children: [
2705
+ y === "paused" && /* @__PURE__ */ a(le, { children: [
2706
+ /* @__PURE__ */ a("button", { className: "control-button control-button--resume", onClick: Y, children: [
2643
2707
  /* @__PURE__ */ e("span", { className: "icon", children: "▶️" }),
2644
2708
  /* @__PURE__ */ e("span", { children: "Resume" })
2645
2709
  ] }),
2646
- /* @__PURE__ */ r("button", { className: "control-button control-button--stop", onClick: ee, children: [
2710
+ /* @__PURE__ */ a("button", { className: "control-button control-button--stop", onClick: X, children: [
2647
2711
  /* @__PURE__ */ e("span", { className: "icon", children: "⏹️" }),
2648
2712
  /* @__PURE__ */ e("span", { children: "Stop" })
2649
2713
  ] })
2650
2714
  ] }),
2651
- y === "stopped" && /* @__PURE__ */ r(
2715
+ y === "stopped" && /* @__PURE__ */ a(
2652
2716
  "button",
2653
2717
  {
2654
2718
  className: "control-button control-button--new",
2655
2719
  onClick: () => {
2656
- k("idle"), E(null), z([]);
2720
+ x("idle"), D(null), A([]);
2657
2721
  },
2658
2722
  children: [
2659
2723
  /* @__PURE__ */ e("span", { className: "icon", children: "🔄" }),
@@ -2662,12 +2726,12 @@ const Be = {
2662
2726
  }
2663
2727
  )
2664
2728
  ] }),
2665
- /* @__PURE__ */ r("div", { className: "controls__secondary", children: [
2666
- (y === "recording" || y === "paused") && /* @__PURE__ */ r("button", { className: "control-button control-button--marker", onClick: () => te(), children: [
2729
+ /* @__PURE__ */ a("div", { className: "controls__secondary", children: [
2730
+ (y === "recording" || y === "paused") && /* @__PURE__ */ a("button", { className: "control-button control-button--marker", onClick: () => ae(), children: [
2667
2731
  /* @__PURE__ */ e("span", { className: "icon", children: "🚩" }),
2668
2732
  /* @__PURE__ */ e("span", { children: "Add Marker" })
2669
2733
  ] }),
2670
- /* @__PURE__ */ r(
2734
+ /* @__PURE__ */ a(
2671
2735
  "button",
2672
2736
  {
2673
2737
  className: `control-button ${P ? "control-button--active" : ""}`,
@@ -2683,114 +2747,114 @@ const Be = {
2683
2747
  "button",
2684
2748
  {
2685
2749
  className: "control-button control-button--settings",
2686
- onClick: () => W(!J),
2750
+ onClick: () => K(!Z),
2687
2751
  disabled: y === "recording",
2688
2752
  children: /* @__PURE__ */ e("span", { className: "icon", children: "⚙️" })
2689
2753
  }
2690
2754
  )
2691
2755
  ] })
2692
2756
  ] }),
2693
- /* @__PURE__ */ r("div", { className: "recorder__status", children: [
2694
- /* @__PURE__ */ r("div", { className: "status__info", children: [
2695
- /* @__PURE__ */ r("span", { className: "status-item", children: [
2757
+ /* @__PURE__ */ a("div", { className: "recorder__status", children: [
2758
+ /* @__PURE__ */ a("div", { className: "status__info", children: [
2759
+ /* @__PURE__ */ a("span", { className: "status-item", children: [
2696
2760
  /* @__PURE__ */ e("strong", { children: "Duration:" }),
2697
2761
  " ",
2698
- t((b == null ? void 0 : b.duration) || 0)
2762
+ s((b == null ? void 0 : b.duration) || 0)
2699
2763
  ] }),
2700
- /* @__PURE__ */ r("span", { className: "status-item", children: [
2764
+ /* @__PURE__ */ a("span", { className: "status-item", children: [
2701
2765
  /* @__PURE__ */ e("strong", { children: "Size:" }),
2702
2766
  " ",
2703
- c((b == null ? void 0 : b.size) || 0)
2767
+ m((b == null ? void 0 : b.size) || 0)
2704
2768
  ] }),
2705
- /* @__PURE__ */ r("span", { className: "status-item", children: [
2769
+ /* @__PURE__ */ a("span", { className: "status-item", children: [
2706
2770
  /* @__PURE__ */ e("strong", { children: "Markers:" }),
2707
2771
  " ",
2708
2772
  S.length
2709
2773
  ] })
2710
2774
  ] }),
2711
- /* @__PURE__ */ r("div", { className: "status__quality", children: [
2712
- i.video.resolution && /* @__PURE__ */ r("span", { children: [
2713
- i.video.resolution.width,
2775
+ /* @__PURE__ */ a("div", { className: "status__quality", children: [
2776
+ n.video.resolution && /* @__PURE__ */ a("span", { children: [
2777
+ n.video.resolution.width,
2714
2778
  "x",
2715
- i.video.resolution.height
2779
+ n.video.resolution.height
2716
2780
  ] }),
2717
- /* @__PURE__ */ r("span", { children: [
2718
- i.video.frameRate,
2781
+ /* @__PURE__ */ a("span", { children: [
2782
+ n.video.frameRate,
2719
2783
  "fps"
2720
2784
  ] }),
2721
- /* @__PURE__ */ e("span", { className: i.audio.enabled ? "audio-on" : "audio-off", children: i.audio.enabled ? "🔊" : "🔇" })
2785
+ /* @__PURE__ */ e("span", { className: n.audio.enabled ? "audio-on" : "audio-off", children: n.audio.enabled ? "🔊" : "🔇" })
2722
2786
  ] })
2723
2787
  ] }),
2724
- P && y === "recording" && /* @__PURE__ */ r("div", { className: "recorder__annotation-tools", children: [
2725
- /* @__PURE__ */ e("div", { className: "tool-group", children: ["pen", "arrow", "rectangle", "text"].map((s) => /* @__PURE__ */ r(
2788
+ P && y === "recording" && /* @__PURE__ */ a("div", { className: "recorder__annotation-tools", children: [
2789
+ /* @__PURE__ */ e("div", { className: "tool-group", children: ["pen", "arrow", "rectangle", "text"].map((i) => /* @__PURE__ */ a(
2726
2790
  "button",
2727
2791
  {
2728
- className: `tool-button ${O === s ? "tool-button--active" : ""}`,
2729
- onClick: () => oe(s),
2792
+ className: `tool-button ${B === i ? "tool-button--active" : ""}`,
2793
+ onClick: () => ie(i),
2730
2794
  children: [
2731
- s === "pen" && "✏️",
2732
- s === "arrow" && "➡️",
2733
- s === "rectangle" && "⬜",
2734
- s === "text" && "T"
2795
+ i === "pen" && "✏️",
2796
+ i === "arrow" && "➡️",
2797
+ i === "rectangle" && "⬜",
2798
+ i === "text" && "T"
2735
2799
  ]
2736
2800
  },
2737
- s
2801
+ i
2738
2802
  )) }),
2739
- /* @__PURE__ */ e("div", { className: "color-group", children: ["var(--nice-danger, #ff0000)", "var(--nice-success, #00ff00)", "var(--nice-primary, #0000ff)", "var(--nice-warning, #ffff00)", "var(--nice-bg, #fff)", "var(--nice-text, #000000)"].map((s) => /* @__PURE__ */ e(
2803
+ /* @__PURE__ */ e("div", { className: "color-group", children: ["var(--nice-danger, #ff0000)", "var(--nice-success, #00ff00)", "var(--nice-primary, #0000ff)", "var(--nice-warning, #ffff00)", "var(--nice-bg, #fff)", "var(--nice-text, #000000)"].map((i) => /* @__PURE__ */ e(
2740
2804
  "button",
2741
2805
  {
2742
- className: `color-button ${se === s ? "color-button--active" : ""}`,
2743
- style: { backgroundColor: s },
2744
- onClick: () => A(s)
2806
+ className: `color-button ${te === i ? "color-button--active" : ""}`,
2807
+ style: { backgroundColor: i },
2808
+ onClick: () => z(i)
2745
2809
  },
2746
- s
2810
+ i
2747
2811
  )) })
2748
2812
  ] }),
2749
- S.length > 0 && /* @__PURE__ */ r("div", { className: "recorder__markers", children: [
2813
+ S.length > 0 && /* @__PURE__ */ a("div", { className: "recorder__markers", children: [
2750
2814
  /* @__PURE__ */ e("h4", { children: "Markers" }),
2751
- /* @__PURE__ */ e("div", { className: "markers-list", children: S.map((s) => /* @__PURE__ */ r(
2815
+ /* @__PURE__ */ e("div", { className: "markers-list", children: S.map((i) => /* @__PURE__ */ a(
2752
2816
  "div",
2753
2817
  {
2754
2818
  className: "marker-item",
2755
- style: { borderLeftColor: s.color },
2819
+ style: { borderLeftColor: i.color },
2756
2820
  children: [
2757
- /* @__PURE__ */ e("span", { className: "marker-time", children: t(s.time) }),
2821
+ /* @__PURE__ */ e("span", { className: "marker-time", children: s(i.time) }),
2758
2822
  /* @__PURE__ */ e(
2759
2823
  "input",
2760
2824
  {
2761
2825
  type: "text",
2762
- value: s.label,
2763
- onChange: (N) => {
2764
- z(
2765
- (H) => H.map((V) => V.id === s.id ? { ...V, label: N.target.value } : V)
2826
+ value: i.label,
2827
+ onChange: (u) => {
2828
+ A(
2829
+ (h) => h.map((v) => v.id === i.id ? { ...v, label: u.target.value } : v)
2766
2830
  );
2767
2831
  },
2768
2832
  className: "marker-label"
2769
2833
  }
2770
2834
  ),
2771
- /* @__PURE__ */ e("button", { className: "marker-remove", onClick: () => Z(s.id), children: "×" })
2835
+ /* @__PURE__ */ e("button", { className: "marker-remove", onClick: () => j(i.id), children: "×" })
2772
2836
  ]
2773
2837
  },
2774
- s.id
2838
+ i.id
2775
2839
  )) })
2776
2840
  ] }),
2777
- J && /* @__PURE__ */ r("div", { className: "recorder__settings", children: [
2778
- /* @__PURE__ */ r("div", { className: "settings-header", children: [
2841
+ Z && /* @__PURE__ */ a("div", { className: "recorder__settings", children: [
2842
+ /* @__PURE__ */ a("div", { className: "settings-header", children: [
2779
2843
  /* @__PURE__ */ e("h3", { children: "Recording Settings" }),
2780
- /* @__PURE__ */ e("button", { className: "close-button", onClick: () => W(!1), children: "×" })
2844
+ /* @__PURE__ */ e("button", { className: "close-button", onClick: () => K(!1), children: "×" })
2781
2845
  ] }),
2782
- /* @__PURE__ */ r("div", { className: "settings-section", children: [
2846
+ /* @__PURE__ */ a("div", { className: "settings-section", children: [
2783
2847
  /* @__PURE__ */ e("h4", { children: "Video" }),
2784
- /* @__PURE__ */ r("label", { children: [
2848
+ /* @__PURE__ */ a("label", { children: [
2785
2849
  "Source",
2786
- /* @__PURE__ */ r(
2850
+ /* @__PURE__ */ a(
2787
2851
  "select",
2788
2852
  {
2789
- value: i.video.source,
2790
- onChange: (s) => _({
2853
+ value: n.video.source,
2854
+ onChange: (i) => E({
2791
2855
  video: {
2792
- ...i.video,
2793
- source: s.target.value
2856
+ ...n.video,
2857
+ source: i.target.value
2794
2858
  }
2795
2859
  }),
2796
2860
  children: [
@@ -2802,16 +2866,16 @@ const Be = {
2802
2866
  }
2803
2867
  )
2804
2868
  ] }),
2805
- /* @__PURE__ */ r("label", { children: [
2869
+ /* @__PURE__ */ a("label", { children: [
2806
2870
  "Resolution",
2807
- /* @__PURE__ */ r(
2871
+ /* @__PURE__ */ a(
2808
2872
  "select",
2809
2873
  {
2810
- value: `${(u = i.video.resolution) == null ? void 0 : u.width}x${(h = i.video.resolution) == null ? void 0 : h.height}`,
2811
- onChange: (s) => {
2812
- const [N, H] = s.target.value.split("x").map(Number);
2813
- _({
2814
- video: { ...i.video, resolution: { width: N, height: H } }
2874
+ value: `${(t = n.video.resolution) == null ? void 0 : t.width}x${(o = n.video.resolution) == null ? void 0 : o.height}`,
2875
+ onChange: (i) => {
2876
+ const [u, h] = i.target.value.split("x").map(Number);
2877
+ E({
2878
+ video: { ...n.video, resolution: { width: u, height: h } }
2815
2879
  });
2816
2880
  },
2817
2881
  children: [
@@ -2823,14 +2887,14 @@ const Be = {
2823
2887
  }
2824
2888
  )
2825
2889
  ] }),
2826
- /* @__PURE__ */ r("label", { children: [
2890
+ /* @__PURE__ */ a("label", { children: [
2827
2891
  "Frame Rate",
2828
- /* @__PURE__ */ r(
2892
+ /* @__PURE__ */ a(
2829
2893
  "select",
2830
2894
  {
2831
- value: i.video.frameRate,
2832
- onChange: (s) => _({
2833
- video: { ...i.video, frameRate: parseInt(s.target.value) }
2895
+ value: n.video.frameRate,
2896
+ onChange: (i) => E({
2897
+ video: { ...n.video, frameRate: parseInt(i.target.value) }
2834
2898
  }),
2835
2899
  children: [
2836
2900
  /* @__PURE__ */ e("option", { value: "15", children: "15 fps" }),
@@ -2841,46 +2905,46 @@ const Be = {
2841
2905
  }
2842
2906
  )
2843
2907
  ] }),
2844
- /* @__PURE__ */ r("label", { className: "checkbox-label", children: [
2908
+ /* @__PURE__ */ a("label", { className: "checkbox-label", children: [
2845
2909
  /* @__PURE__ */ e(
2846
2910
  "input",
2847
2911
  {
2848
2912
  type: "checkbox",
2849
- checked: i.video.showCursor,
2850
- onChange: (s) => _({
2851
- video: { ...i.video, showCursor: s.target.checked }
2913
+ checked: n.video.showCursor,
2914
+ onChange: (i) => E({
2915
+ video: { ...n.video, showCursor: i.target.checked }
2852
2916
  })
2853
2917
  }
2854
2918
  ),
2855
2919
  "Show Cursor"
2856
2920
  ] })
2857
2921
  ] }),
2858
- /* @__PURE__ */ r("div", { className: "settings-section", children: [
2922
+ /* @__PURE__ */ a("div", { className: "settings-section", children: [
2859
2923
  /* @__PURE__ */ e("h4", { children: "Audio" }),
2860
- /* @__PURE__ */ r("label", { className: "checkbox-label", children: [
2924
+ /* @__PURE__ */ a("label", { className: "checkbox-label", children: [
2861
2925
  /* @__PURE__ */ e(
2862
2926
  "input",
2863
2927
  {
2864
2928
  type: "checkbox",
2865
- checked: i.audio.enabled,
2866
- onChange: (s) => _({
2867
- audio: { ...i.audio, enabled: s.target.checked }
2929
+ checked: n.audio.enabled,
2930
+ onChange: (i) => E({
2931
+ audio: { ...n.audio, enabled: i.target.checked }
2868
2932
  })
2869
2933
  }
2870
2934
  ),
2871
2935
  "Enable Audio"
2872
2936
  ] }),
2873
- i.audio.enabled && /* @__PURE__ */ r(ie, { children: [
2874
- /* @__PURE__ */ r("label", { children: [
2937
+ n.audio.enabled && /* @__PURE__ */ a(le, { children: [
2938
+ /* @__PURE__ */ a("label", { children: [
2875
2939
  "Source",
2876
- /* @__PURE__ */ r(
2940
+ /* @__PURE__ */ a(
2877
2941
  "select",
2878
2942
  {
2879
- value: i.audio.source,
2880
- onChange: (s) => _({
2943
+ value: n.audio.source,
2944
+ onChange: (i) => E({
2881
2945
  audio: {
2882
- ...i.audio,
2883
- source: s.target.value
2946
+ ...n.audio,
2947
+ source: i.target.value
2884
2948
  }
2885
2949
  }),
2886
2950
  children: [
@@ -2891,27 +2955,27 @@ const Be = {
2891
2955
  }
2892
2956
  )
2893
2957
  ] }),
2894
- /* @__PURE__ */ r("label", { className: "checkbox-label", children: [
2958
+ /* @__PURE__ */ a("label", { className: "checkbox-label", children: [
2895
2959
  /* @__PURE__ */ e(
2896
2960
  "input",
2897
2961
  {
2898
2962
  type: "checkbox",
2899
- checked: i.audio.echoCancellation,
2900
- onChange: (s) => _({
2901
- audio: { ...i.audio, echoCancellation: s.target.checked }
2963
+ checked: n.audio.echoCancellation,
2964
+ onChange: (i) => E({
2965
+ audio: { ...n.audio, echoCancellation: i.target.checked }
2902
2966
  })
2903
2967
  }
2904
2968
  ),
2905
2969
  "Echo Cancellation"
2906
2970
  ] }),
2907
- /* @__PURE__ */ r("label", { className: "checkbox-label", children: [
2971
+ /* @__PURE__ */ a("label", { className: "checkbox-label", children: [
2908
2972
  /* @__PURE__ */ e(
2909
2973
  "input",
2910
2974
  {
2911
2975
  type: "checkbox",
2912
- checked: i.audio.noiseSuppression,
2913
- onChange: (s) => _({
2914
- audio: { ...i.audio, noiseSuppression: s.target.checked }
2976
+ checked: n.audio.noiseSuppression,
2977
+ onChange: (i) => E({
2978
+ audio: { ...n.audio, noiseSuppression: i.target.checked }
2915
2979
  })
2916
2980
  }
2917
2981
  ),
@@ -2919,16 +2983,16 @@ const Be = {
2919
2983
  ] })
2920
2984
  ] })
2921
2985
  ] }),
2922
- /* @__PURE__ */ r("div", { className: "settings-section", children: [
2986
+ /* @__PURE__ */ a("div", { className: "settings-section", children: [
2923
2987
  /* @__PURE__ */ e("h4", { children: "Output" }),
2924
- /* @__PURE__ */ r("label", { children: [
2988
+ /* @__PURE__ */ a("label", { children: [
2925
2989
  "Format",
2926
- /* @__PURE__ */ r(
2990
+ /* @__PURE__ */ a(
2927
2991
  "select",
2928
2992
  {
2929
- value: i.output.format,
2930
- onChange: (s) => _({
2931
- output: { ...i.output, format: s.target.value }
2993
+ value: n.output.format,
2994
+ onChange: (i) => E({
2995
+ output: { ...n.output, format: i.target.value }
2932
2996
  }),
2933
2997
  children: [
2934
2998
  /* @__PURE__ */ e("option", { value: "webm", children: "WebM (Best Web)" }),
@@ -2938,16 +3002,16 @@ const Be = {
2938
3002
  }
2939
3003
  )
2940
3004
  ] }),
2941
- /* @__PURE__ */ r("label", { children: [
3005
+ /* @__PURE__ */ a("label", { children: [
2942
3006
  "Quality",
2943
- /* @__PURE__ */ r(
3007
+ /* @__PURE__ */ a(
2944
3008
  "select",
2945
3009
  {
2946
- value: i.output.quality,
2947
- onChange: (s) => _({
3010
+ value: n.output.quality,
3011
+ onChange: (i) => E({
2948
3012
  output: {
2949
- ...i.output,
2950
- quality: s.target.value
3013
+ ...n.output,
3014
+ quality: i.target.value
2951
3015
  }
2952
3016
  }),
2953
3017
  children: [
@@ -2962,7 +3026,7 @@ const Be = {
2962
3026
  ] })
2963
3027
  ] })
2964
3028
  ] });
2965
- }, qe = {
3029
+ }, Je = {
2966
3030
  id: crypto.randomUUID(),
2967
3031
  name: "My Stream",
2968
3032
  protocol: "rtmp",
@@ -3005,7 +3069,7 @@ const Be = {
3005
3069
  },
3006
3070
  { platform: "custom-rtmp", name: "Custom RTMP", icon: "🔗", defaultUrl: "" },
3007
3071
  { platform: "custom-srt", name: "Custom SRT", icon: "🔒", defaultUrl: "" }
3008
- ], le = [
3072
+ ], de = [
3009
3073
  { type: "camera", name: "Camera", icon: "📷" },
3010
3074
  { type: "screen", name: "Screen Capture", icon: "🖥️" },
3011
3075
  { type: "window", name: "Window Capture", icon: "🪟" },
@@ -3014,18 +3078,18 @@ const Be = {
3014
3078
  { type: "video", name: "Video", icon: "🎬" },
3015
3079
  { type: "microphone", name: "Microphone", icon: "🎤" },
3016
3080
  { type: "system-audio", name: "System Audio", icon: "🔊" }
3017
- ], Qe = ({
3018
- config: l,
3019
- onConfigChange: m,
3020
- onStreamStart: f,
3081
+ ], aa = ({
3082
+ config: d,
3083
+ onConfigChange: f,
3084
+ onStreamStart: l,
3021
3085
  onStreamStop: C,
3022
- onStatsUpdate: T,
3086
+ onStatsUpdate: H,
3023
3087
  onError: I,
3024
3088
  className: p = ""
3025
3089
  }) => {
3026
- const [i, D] = v(l || qe), [b, E] = v(
3090
+ const [n, R] = w(d || Je), [b, D] = w(
3027
3091
  "sources"
3028
- ), [y, k] = v(!1), [S, z] = v({
3092
+ ), [y, x] = w(!1), [S, A] = w({
3029
3093
  duration: 0,
3030
3094
  viewers: 0,
3031
3095
  peakViewers: 0,
@@ -3034,155 +3098,155 @@ const Be = {
3034
3098
  droppedFrames: 0,
3035
3099
  cpuUsage: 0,
3036
3100
  memoryUsage: 0
3037
- }), [R, q] = v(null), [K, M] = v(!1), [J, W] = v(!1), [P, U] = v([i.layout]), [O, oe] = v(0), se = F(null), A = F(null), w = F(0);
3038
- ne(() => {
3039
- l && D(l);
3040
- }, [l]), ne(() => () => {
3041
- A.current && clearInterval(A.current);
3101
+ }), [_, O] = w(null), [F, M] = w(!1), [Z, K] = w(!1), [P, U] = w([n.layout]), [B, ie] = w(0), te = L(null), z = L(null), k = L(0);
3102
+ re(() => {
3103
+ d && R(d);
3104
+ }, [d]), re(() => () => {
3105
+ z.current && clearInterval(z.current);
3042
3106
  }, []);
3043
- const g = me(
3044
- (a) => {
3045
- const t = { ...i, ...a };
3046
- D(t), m == null || m(t);
3107
+ const N = me(
3108
+ (r) => {
3109
+ const s = { ...n, ...r };
3110
+ R(s), f == null || f(s);
3047
3111
  },
3048
- [i, m]
3049
- ), B = (a) => {
3050
- const t = fe.find((u) => u.platform === a), c = {
3112
+ [n, f]
3113
+ ), W = (r) => {
3114
+ const s = fe.find((t) => t.platform === r), m = {
3051
3115
  id: crypto.randomUUID(),
3052
- name: (t == null ? void 0 : t.name) || "Custom",
3053
- platform: a,
3054
- url: (t == null ? void 0 : t.defaultUrl) || "",
3116
+ name: (s == null ? void 0 : s.name) || "Custom",
3117
+ platform: r,
3118
+ url: (s == null ? void 0 : s.defaultUrl) || "",
3055
3119
  streamKey: "",
3056
3120
  enabled: !0,
3057
3121
  status: "idle"
3058
3122
  };
3059
- g({ destinations: [...i.destinations, c] }), W(!1);
3060
- }, Y = (a, t) => {
3061
- g({
3062
- destinations: i.destinations.map((c) => c.id === a ? { ...c, ...t } : c)
3123
+ N({ destinations: [...n.destinations, m] }), K(!1);
3124
+ }, q = (r, s) => {
3125
+ N({
3126
+ destinations: n.destinations.map((m) => m.id === r ? { ...m, ...s } : m)
3063
3127
  });
3064
- }, G = (a) => {
3065
- g({ destinations: i.destinations.filter((t) => t.id !== a) });
3066
- }, re = async (a) => {
3067
- const t = le.find((h) => h.type === a), c = {
3128
+ }, G = (r) => {
3129
+ N({ destinations: n.destinations.filter((s) => s.id !== r) });
3130
+ }, ee = async (r) => {
3131
+ const s = de.find((o) => o.type === r), m = {
3068
3132
  id: crypto.randomUUID(),
3069
- type: a,
3070
- name: `${(t == null ? void 0 : t.name) || a} ${i.sources.filter((h) => h.type === a).length + 1}`,
3133
+ type: r,
3134
+ name: `${(s == null ? void 0 : s.name) || r} ${n.sources.filter((o) => o.type === r).length + 1}`,
3071
3135
  settings: {},
3072
3136
  volume: 1,
3073
3137
  muted: !1
3074
3138
  };
3075
3139
  try {
3076
- if (a === "camera" || a === "microphone") {
3077
- const h = a === "camera" ? { video: !0 } : { audio: !0 }, N = (await navigator.mediaDevices.enumerateDevices()).filter(
3078
- (H) => a === "camera" ? H.kind === "videoinput" : H.kind === "audioinput"
3140
+ if (r === "camera" || r === "microphone") {
3141
+ const o = r === "camera" ? { video: !0 } : { audio: !0 }, u = (await navigator.mediaDevices.enumerateDevices()).filter(
3142
+ (h) => r === "camera" ? h.kind === "videoinput" : h.kind === "audioinput"
3079
3143
  );
3080
- N.length > 0 && (c.settings.deviceId = N[0].deviceId);
3081
- } else (a === "screen" || a === "window") && await navigator.mediaDevices.getDisplayMedia({ video: !0 });
3082
- } catch (h) {
3083
- console.warn(`Could not access ${a}:`, h);
3144
+ u.length > 0 && (m.settings.deviceId = u[0].deviceId);
3145
+ } else (r === "screen" || r === "window") && await navigator.mediaDevices.getDisplayMedia({ video: !0 });
3146
+ } catch (o) {
3147
+ console.warn(`Could not access ${r}:`, o);
3084
3148
  }
3085
- g({ sources: [...i.sources, c] });
3086
- const u = {
3149
+ N({ sources: [...n.sources, m] });
3150
+ const t = {
3087
3151
  id: crypto.randomUUID(),
3088
- sourceId: c.id,
3152
+ sourceId: m.id,
3089
3153
  position: { x: 0, y: 0 },
3090
- size: { width: i.layout.canvas.width, height: i.layout.canvas.height },
3154
+ size: { width: n.layout.canvas.width, height: n.layout.canvas.height },
3091
3155
  visible: !0,
3092
3156
  opacity: 1,
3093
- zIndex: i.layout.layers.length
3157
+ zIndex: n.layout.layers.length
3094
3158
  };
3095
- g({
3159
+ N({
3096
3160
  layout: {
3097
- ...i.layout,
3098
- layers: [...i.layout.layers, u]
3161
+ ...n.layout,
3162
+ layers: [...n.layout.layers, t]
3099
3163
  }
3100
3164
  }), M(!1);
3101
- }, _ = (a, t) => {
3102
- g({
3103
- sources: i.sources.map((c) => c.id === a ? { ...c, ...t } : c)
3165
+ }, E = (r, s) => {
3166
+ N({
3167
+ sources: n.sources.map((m) => m.id === r ? { ...m, ...s } : m)
3104
3168
  });
3105
- }, X = (a) => {
3106
- g({
3107
- sources: i.sources.filter((t) => t.id !== a),
3169
+ }, J = (r) => {
3170
+ N({
3171
+ sources: n.sources.filter((s) => s.id !== r),
3108
3172
  layout: {
3109
- ...i.layout,
3110
- layers: i.layout.layers.filter((t) => t.sourceId !== a)
3173
+ ...n.layout,
3174
+ layers: n.layout.layers.filter((s) => s.sourceId !== r)
3111
3175
  }
3112
3176
  });
3113
- }, L = (a, t) => {
3114
- g({
3177
+ }, V = (r, s) => {
3178
+ N({
3115
3179
  layout: {
3116
- ...i.layout,
3117
- layers: i.layout.layers.map((c) => c.id === a ? { ...c, ...t } : c)
3180
+ ...n.layout,
3181
+ layers: n.layout.layers.map((m) => m.id === r ? { ...m, ...s } : m)
3118
3182
  }
3119
3183
  });
3120
- }, ce = (a) => {
3121
- const t = i.layout.layers.findIndex((c) => c.id === a);
3122
- if (t < i.layout.layers.length - 1) {
3123
- const c = [...i.layout.layers];
3124
- [c[t], c[t + 1]] = [c[t + 1], c[t]], c.forEach((u, h) => {
3125
- u.zIndex = h;
3126
- }), g({ layout: { ...i.layout, layers: c } });
3184
+ }, ne = (r) => {
3185
+ const s = n.layout.layers.findIndex((m) => m.id === r);
3186
+ if (s < n.layout.layers.length - 1) {
3187
+ const m = [...n.layout.layers];
3188
+ [m[s], m[s + 1]] = [m[s + 1], m[s]], m.forEach((t, o) => {
3189
+ t.zIndex = o;
3190
+ }), N({ layout: { ...n.layout, layers: m } });
3127
3191
  }
3128
- }, de = (a) => {
3129
- const t = i.layout.layers.findIndex((c) => c.id === a);
3130
- if (t > 0) {
3131
- const c = [...i.layout.layers];
3132
- [c[t], c[t - 1]] = [c[t - 1], c[t]], c.forEach((u, h) => {
3133
- u.zIndex = h;
3134
- }), g({ layout: { ...i.layout, layers: c } });
3192
+ }, se = (r) => {
3193
+ const s = n.layout.layers.findIndex((m) => m.id === r);
3194
+ if (s > 0) {
3195
+ const m = [...n.layout.layers];
3196
+ [m[s], m[s - 1]] = [m[s - 1], m[s]], m.forEach((t, o) => {
3197
+ t.zIndex = o;
3198
+ }), N({ layout: { ...n.layout, layers: m } });
3135
3199
  }
3136
- }, Q = () => {
3137
- const a = {
3200
+ }, Y = () => {
3201
+ const r = {
3138
3202
  name: `Scene ${P.length + 1}`,
3139
- canvas: { ...i.layout.canvas },
3203
+ canvas: { ...n.layout.canvas },
3140
3204
  layers: []
3141
3205
  };
3142
- U([...P, a]);
3143
- }, ee = (a) => {
3144
- const t = [...P];
3145
- t[O] = i.layout, U(t), oe(a), g({ layout: P[a] });
3146
- }, te = async () => {
3206
+ U([...P, r]);
3207
+ }, X = (r) => {
3208
+ const s = [...P];
3209
+ s[B] = n.layout, U(s), ie(r), N({ layout: P[r] });
3210
+ }, ae = async () => {
3147
3211
  try {
3148
- g({
3149
- destinations: i.destinations.map(
3150
- (a) => a.enabled ? { ...a, status: "connecting" } : a
3212
+ N({
3213
+ destinations: n.destinations.map(
3214
+ (r) => r.enabled ? { ...r, status: "connecting" } : r
3151
3215
  )
3152
- }), await new Promise((a) => setTimeout(a, 2e3)), g({
3153
- destinations: i.destinations.map(
3154
- (a) => a.enabled ? { ...a, status: "live" } : a
3216
+ }), await new Promise((r) => setTimeout(r, 2e3)), N({
3217
+ destinations: n.destinations.map(
3218
+ (r) => r.enabled ? { ...r, status: "live" } : r
3155
3219
  )
3156
- }), k(!0), w.current = Date.now(), f == null || f(), A.current = setInterval(() => {
3157
- const a = {
3158
- duration: (Date.now() - w.current) / 1e3,
3220
+ }), x(!0), k.current = Date.now(), l == null || l(), z.current = setInterval(() => {
3221
+ const r = {
3222
+ duration: (Date.now() - k.current) / 1e3,
3159
3223
  viewers: Math.floor(Math.random() * 100) + S.viewers,
3160
3224
  peakViewers: Math.max(S.peakViewers, S.viewers),
3161
- bitrate: i.settings.video.bitrate + Math.floor(Math.random() * 500 - 250),
3162
- fps: i.settings.video.frameRate - Math.random() * 2,
3225
+ bitrate: n.settings.video.bitrate + Math.floor(Math.random() * 500 - 250),
3226
+ fps: n.settings.video.frameRate - Math.random() * 2,
3163
3227
  droppedFrames: S.droppedFrames + (Math.random() > 0.95 ? 1 : 0),
3164
3228
  cpuUsage: 15 + Math.random() * 30,
3165
3229
  memoryUsage: 40 + Math.random() * 20
3166
3230
  };
3167
- z(a), T == null || T(a);
3231
+ A(r), H == null || H(r);
3168
3232
  }, 1e3);
3169
- } catch (a) {
3170
- I == null || I(a instanceof Error ? a : new Error("Failed to start stream")), g({
3171
- destinations: i.destinations.map((t) => ({
3172
- ...t,
3233
+ } catch (r) {
3234
+ I == null || I(r instanceof Error ? r : new Error("Failed to start stream")), N({
3235
+ destinations: n.destinations.map((s) => ({
3236
+ ...s,
3173
3237
  status: "error"
3174
3238
  }))
3175
3239
  });
3176
3240
  }
3177
- }, Z = () => {
3178
- A.current && clearInterval(A.current), g({
3179
- destinations: i.destinations.map((a) => ({ ...a, status: "idle" }))
3180
- }), k(!1), C == null || C();
3181
- }, n = (a) => {
3182
- const t = Math.floor(a / 3600), c = Math.floor(a % 3600 / 60), u = Math.floor(a % 60);
3183
- return `${t.toString().padStart(2, "0")}:${c.toString().padStart(2, "0")}:${u.toString().padStart(2, "0")}`;
3184
- }, o = (a) => {
3185
- switch (a) {
3241
+ }, j = () => {
3242
+ z.current && clearInterval(z.current), N({
3243
+ destinations: n.destinations.map((r) => ({ ...r, status: "idle" }))
3244
+ }), x(!1), C == null || C();
3245
+ }, oe = (r) => {
3246
+ const s = Math.floor(r / 3600), m = Math.floor(r % 3600 / 60), t = Math.floor(r % 60);
3247
+ return `${s.toString().padStart(2, "0")}:${m.toString().padStart(2, "0")}:${t.toString().padStart(2, "0")}`;
3248
+ }, ce = (r) => {
3249
+ switch (r) {
3186
3250
  case "live":
3187
3251
  return "var(--nice-success, #00ff00)";
3188
3252
  case "connecting":
@@ -3193,116 +3257,116 @@ const Be = {
3193
3257
  return "var(--nice-text-secondary, #888888)";
3194
3258
  }
3195
3259
  };
3196
- return /* @__PURE__ */ r("div", { className: `nice-live-streaming ${p}`, children: [
3197
- /* @__PURE__ */ r("header", { className: "streaming__header", children: [
3198
- /* @__PURE__ */ r("div", { className: "header__title", children: [
3260
+ return /* @__PURE__ */ a("div", { className: `nice-live-streaming ${p}`, children: [
3261
+ /* @__PURE__ */ a("header", { className: "streaming__header", children: [
3262
+ /* @__PURE__ */ a("div", { className: "header__title", children: [
3199
3263
  /* @__PURE__ */ e(
3200
3264
  "input",
3201
3265
  {
3202
3266
  type: "text",
3203
- value: i.name,
3204
- onChange: (a) => g({ name: a.target.value }),
3267
+ value: n.name,
3268
+ onChange: (r) => N({ name: r.target.value }),
3205
3269
  className: "stream-name-input"
3206
3270
  }
3207
3271
  ),
3208
- y && /* @__PURE__ */ r("span", { className: "live-badge", children: [
3272
+ y && /* @__PURE__ */ a("span", { className: "live-badge", children: [
3209
3273
  /* @__PURE__ */ e("span", { className: "live-dot" }),
3210
3274
  " LIVE"
3211
3275
  ] })
3212
3276
  ] }),
3213
- /* @__PURE__ */ e("div", { className: "header__stats", children: y && /* @__PURE__ */ r(ie, { children: [
3214
- /* @__PURE__ */ r("span", { className: "stat-item", children: [
3277
+ /* @__PURE__ */ e("div", { className: "header__stats", children: y && /* @__PURE__ */ a(le, { children: [
3278
+ /* @__PURE__ */ a("span", { className: "stat-item", children: [
3215
3279
  "⏱️ ",
3216
- n(S.duration)
3280
+ oe(S.duration)
3217
3281
  ] }),
3218
- /* @__PURE__ */ r("span", { className: "stat-item", children: [
3282
+ /* @__PURE__ */ a("span", { className: "stat-item", children: [
3219
3283
  "👥 ",
3220
3284
  S.viewers
3221
3285
  ] }),
3222
- /* @__PURE__ */ r("span", { className: "stat-item", children: [
3286
+ /* @__PURE__ */ a("span", { className: "stat-item", children: [
3223
3287
  "📊 ",
3224
3288
  Math.round(S.bitrate),
3225
3289
  " kbps"
3226
3290
  ] }),
3227
- /* @__PURE__ */ r("span", { className: "stat-item", children: [
3291
+ /* @__PURE__ */ a("span", { className: "stat-item", children: [
3228
3292
  "🎬 ",
3229
3293
  S.fps.toFixed(1),
3230
3294
  " fps"
3231
3295
  ] })
3232
3296
  ] }) }),
3233
- /* @__PURE__ */ e("div", { className: "header__actions", children: y ? /* @__PURE__ */ e("button", { className: "action-button action-button--stop", onClick: Z, children: "End Stream" }) : /* @__PURE__ */ e(
3297
+ /* @__PURE__ */ e("div", { className: "header__actions", children: y ? /* @__PURE__ */ e("button", { className: "action-button action-button--stop", onClick: j, children: "End Stream" }) : /* @__PURE__ */ e(
3234
3298
  "button",
3235
3299
  {
3236
3300
  className: "action-button action-button--go-live",
3237
- onClick: te,
3238
- disabled: i.destinations.filter((a) => a.enabled).length === 0,
3301
+ onClick: ae,
3302
+ disabled: n.destinations.filter((r) => r.enabled).length === 0,
3239
3303
  children: "Go Live"
3240
3304
  }
3241
3305
  ) })
3242
3306
  ] }),
3243
- /* @__PURE__ */ r("div", { className: "streaming__main", children: [
3244
- /* @__PURE__ */ r("div", { className: "streaming__preview", children: [
3245
- /* @__PURE__ */ r("div", { className: "scenes-bar", children: [
3246
- P.map((a, t) => /* @__PURE__ */ e(
3307
+ /* @__PURE__ */ a("div", { className: "streaming__main", children: [
3308
+ /* @__PURE__ */ a("div", { className: "streaming__preview", children: [
3309
+ /* @__PURE__ */ a("div", { className: "scenes-bar", children: [
3310
+ P.map((r, s) => /* @__PURE__ */ e(
3247
3311
  "button",
3248
3312
  {
3249
- className: `scene-button ${O === t ? "scene-button--active" : ""}`,
3250
- onClick: () => ee(t),
3251
- children: a.name
3313
+ className: `scene-button ${B === s ? "scene-button--active" : ""}`,
3314
+ onClick: () => X(s),
3315
+ children: r.name
3252
3316
  },
3253
- t
3317
+ s
3254
3318
  )),
3255
- /* @__PURE__ */ e("button", { className: "scene-button scene-button--add", onClick: Q, children: "+" })
3319
+ /* @__PURE__ */ e("button", { className: "scene-button scene-button--add", onClick: Y, children: "+" })
3256
3320
  ] }),
3257
3321
  /* @__PURE__ */ e(
3258
3322
  "div",
3259
3323
  {
3260
- ref: se,
3324
+ ref: te,
3261
3325
  className: "preview-canvas",
3262
3326
  style: {
3263
- aspectRatio: `${i.layout.canvas.width}/${i.layout.canvas.height}`,
3264
- backgroundColor: i.layout.canvas.backgroundColor
3327
+ aspectRatio: `${n.layout.canvas.width}/${n.layout.canvas.height}`,
3328
+ backgroundColor: n.layout.canvas.backgroundColor
3265
3329
  },
3266
- children: i.layout.layers.sort((a, t) => a.zIndex - t.zIndex).map((a) => {
3267
- var c;
3268
- const t = i.sources.find((u) => u.id === a.sourceId);
3269
- return !a.visible || !t ? null : /* @__PURE__ */ e(
3330
+ children: n.layout.layers.sort((r, s) => r.zIndex - s.zIndex).map((r) => {
3331
+ var m;
3332
+ const s = n.sources.find((t) => t.id === r.sourceId);
3333
+ return !r.visible || !s ? null : /* @__PURE__ */ e(
3270
3334
  "div",
3271
3335
  {
3272
- className: `canvas-layer ${R === a.id ? "canvas-layer--selected" : ""}`,
3336
+ className: `canvas-layer ${_ === r.id ? "canvas-layer--selected" : ""}`,
3273
3337
  style: {
3274
- left: `${a.position.x / i.layout.canvas.width * 100}%`,
3275
- top: `${a.position.y / i.layout.canvas.height * 100}%`,
3276
- width: `${a.size.width / i.layout.canvas.width * 100}%`,
3277
- height: `${a.size.height / i.layout.canvas.height * 100}%`,
3278
- opacity: a.opacity,
3279
- zIndex: a.zIndex
3338
+ left: `${r.position.x / n.layout.canvas.width * 100}%`,
3339
+ top: `${r.position.y / n.layout.canvas.height * 100}%`,
3340
+ width: `${r.size.width / n.layout.canvas.width * 100}%`,
3341
+ height: `${r.size.height / n.layout.canvas.height * 100}%`,
3342
+ opacity: r.opacity,
3343
+ zIndex: r.zIndex
3280
3344
  },
3281
- onClick: () => q(a.id),
3282
- children: /* @__PURE__ */ r("div", { className: "layer-content", children: [
3283
- /* @__PURE__ */ e("span", { className: "layer-icon", children: ((c = le.find((u) => u.type === t.type)) == null ? void 0 : c.icon) || "📦" }),
3284
- /* @__PURE__ */ e("span", { className: "layer-name", children: t.name })
3345
+ onClick: () => O(r.id),
3346
+ children: /* @__PURE__ */ a("div", { className: "layer-content", children: [
3347
+ /* @__PURE__ */ e("span", { className: "layer-icon", children: ((m = de.find((t) => t.type === s.type)) == null ? void 0 : m.icon) || "📦" }),
3348
+ /* @__PURE__ */ e("span", { className: "layer-name", children: s.name })
3285
3349
  ] })
3286
3350
  },
3287
- a.id
3351
+ r.id
3288
3352
  );
3289
3353
  })
3290
3354
  }
3291
3355
  )
3292
3356
  ] }),
3293
- /* @__PURE__ */ r("aside", { className: "streaming__panel", children: [
3294
- /* @__PURE__ */ e("div", { className: "panel-tabs", children: ["sources", "audio", "destinations", "settings"].map((a) => /* @__PURE__ */ e(
3357
+ /* @__PURE__ */ a("aside", { className: "streaming__panel", children: [
3358
+ /* @__PURE__ */ e("div", { className: "panel-tabs", children: ["sources", "audio", "destinations", "settings"].map((r) => /* @__PURE__ */ e(
3295
3359
  "button",
3296
3360
  {
3297
- className: `panel-tab ${b === a ? "panel-tab--active" : ""}`,
3298
- onClick: () => E(a),
3299
- children: a.charAt(0).toUpperCase() + a.slice(1)
3361
+ className: `panel-tab ${b === r ? "panel-tab--active" : ""}`,
3362
+ onClick: () => D(r),
3363
+ children: r.charAt(0).toUpperCase() + r.slice(1)
3300
3364
  },
3301
- a
3365
+ r
3302
3366
  )) }),
3303
- /* @__PURE__ */ r("div", { className: "panel-content", children: [
3304
- b === "sources" && /* @__PURE__ */ r("div", { className: "sources-panel", children: [
3305
- /* @__PURE__ */ r("div", { className: "panel-header", children: [
3367
+ /* @__PURE__ */ a("div", { className: "panel-content", children: [
3368
+ b === "sources" && /* @__PURE__ */ a("div", { className: "sources-panel", children: [
3369
+ /* @__PURE__ */ a("div", { className: "panel-header", children: [
3306
3370
  /* @__PURE__ */ e("h3", { children: "Sources" }),
3307
3371
  /* @__PURE__ */ e(
3308
3372
  "button",
@@ -3314,33 +3378,33 @@ const Be = {
3314
3378
  }
3315
3379
  )
3316
3380
  ] }),
3317
- /* @__PURE__ */ e("div", { className: "sources-list", children: i.sources.filter((a) => a.type !== "microphone" && a.type !== "system-audio").map((a) => {
3318
- var c;
3319
- const t = i.layout.layers.find((u) => u.sourceId === a.id);
3320
- return /* @__PURE__ */ r(
3381
+ /* @__PURE__ */ e("div", { className: "sources-list", children: n.sources.filter((r) => r.type !== "microphone" && r.type !== "system-audio").map((r) => {
3382
+ var m;
3383
+ const s = n.layout.layers.find((t) => t.sourceId === r.id);
3384
+ return /* @__PURE__ */ a(
3321
3385
  "div",
3322
3386
  {
3323
- className: `source-item ${R === (t == null ? void 0 : t.id) ? "source-item--selected" : ""}`,
3324
- onClick: () => t && q(t.id),
3387
+ className: `source-item ${_ === (s == null ? void 0 : s.id) ? "source-item--selected" : ""}`,
3388
+ onClick: () => s && O(s.id),
3325
3389
  children: [
3326
- /* @__PURE__ */ e("span", { className: "source-icon", children: (c = le.find((u) => u.type === a.type)) == null ? void 0 : c.icon }),
3327
- /* @__PURE__ */ e("span", { className: "source-name", children: a.name }),
3328
- /* @__PURE__ */ r("div", { className: "source-controls", children: [
3390
+ /* @__PURE__ */ e("span", { className: "source-icon", children: (m = de.find((t) => t.type === r.type)) == null ? void 0 : m.icon }),
3391
+ /* @__PURE__ */ e("span", { className: "source-name", children: r.name }),
3392
+ /* @__PURE__ */ a("div", { className: "source-controls", children: [
3329
3393
  /* @__PURE__ */ e(
3330
3394
  "button",
3331
3395
  {
3332
- className: t != null && t.visible ? "" : "inactive",
3333
- onClick: (u) => {
3334
- u.stopPropagation(), t && L(t.id, { visible: !t.visible });
3396
+ className: s != null && s.visible ? "" : "inactive",
3397
+ onClick: (t) => {
3398
+ t.stopPropagation(), s && V(s.id, { visible: !s.visible });
3335
3399
  },
3336
- children: t != null && t.visible ? "👁️" : "👁️‍🗨️"
3400
+ children: s != null && s.visible ? "👁️" : "👁️‍🗨️"
3337
3401
  }
3338
3402
  ),
3339
3403
  /* @__PURE__ */ e(
3340
3404
  "button",
3341
3405
  {
3342
- onClick: (u) => {
3343
- u.stopPropagation(), t && ce(t.id);
3406
+ onClick: (t) => {
3407
+ t.stopPropagation(), s && ne(s.id);
3344
3408
  },
3345
3409
  children: "⬆️"
3346
3410
  }
@@ -3348,8 +3412,8 @@ const Be = {
3348
3412
  /* @__PURE__ */ e(
3349
3413
  "button",
3350
3414
  {
3351
- onClick: (u) => {
3352
- u.stopPropagation(), t && de(t.id);
3415
+ onClick: (t) => {
3416
+ t.stopPropagation(), s && se(s.id);
3353
3417
  },
3354
3418
  children: "⬇️"
3355
3419
  }
@@ -3357,8 +3421,8 @@ const Be = {
3357
3421
  /* @__PURE__ */ e(
3358
3422
  "button",
3359
3423
  {
3360
- onClick: (u) => {
3361
- u.stopPropagation(), X(a.id);
3424
+ onClick: (t) => {
3425
+ t.stopPropagation(), J(r.id);
3362
3426
  },
3363
3427
  disabled: y,
3364
3428
  children: "🗑️"
@@ -3367,67 +3431,67 @@ const Be = {
3367
3431
  ] })
3368
3432
  ]
3369
3433
  },
3370
- a.id
3434
+ r.id
3371
3435
  );
3372
3436
  }) }),
3373
- R && /* @__PURE__ */ r("div", { className: "layer-properties", children: [
3437
+ _ && /* @__PURE__ */ a("div", { className: "layer-properties", children: [
3374
3438
  /* @__PURE__ */ e("h4", { children: "Properties" }),
3375
3439
  (() => {
3376
- const a = i.layout.layers.find((t) => t.id === R);
3377
- return a ? /* @__PURE__ */ r(ie, { children: [
3378
- /* @__PURE__ */ r("label", { children: [
3440
+ const r = n.layout.layers.find((s) => s.id === _);
3441
+ return r ? /* @__PURE__ */ a(le, { children: [
3442
+ /* @__PURE__ */ a("label", { children: [
3379
3443
  "X Position",
3380
3444
  /* @__PURE__ */ e(
3381
3445
  "input",
3382
3446
  {
3383
3447
  type: "number",
3384
- value: a.position.x,
3385
- onChange: (t) => L(a.id, {
3386
- position: { ...a.position, x: parseInt(t.target.value) || 0 }
3448
+ value: r.position.x,
3449
+ onChange: (s) => V(r.id, {
3450
+ position: { ...r.position, x: parseInt(s.target.value) || 0 }
3387
3451
  })
3388
3452
  }
3389
3453
  )
3390
3454
  ] }),
3391
- /* @__PURE__ */ r("label", { children: [
3455
+ /* @__PURE__ */ a("label", { children: [
3392
3456
  "Y Position",
3393
3457
  /* @__PURE__ */ e(
3394
3458
  "input",
3395
3459
  {
3396
3460
  type: "number",
3397
- value: a.position.y,
3398
- onChange: (t) => L(a.id, {
3399
- position: { ...a.position, y: parseInt(t.target.value) || 0 }
3461
+ value: r.position.y,
3462
+ onChange: (s) => V(r.id, {
3463
+ position: { ...r.position, y: parseInt(s.target.value) || 0 }
3400
3464
  })
3401
3465
  }
3402
3466
  )
3403
3467
  ] }),
3404
- /* @__PURE__ */ r("label", { children: [
3468
+ /* @__PURE__ */ a("label", { children: [
3405
3469
  "Width",
3406
3470
  /* @__PURE__ */ e(
3407
3471
  "input",
3408
3472
  {
3409
3473
  type: "number",
3410
- value: a.size.width,
3411
- onChange: (t) => L(a.id, {
3412
- size: { ...a.size, width: parseInt(t.target.value) || 100 }
3474
+ value: r.size.width,
3475
+ onChange: (s) => V(r.id, {
3476
+ size: { ...r.size, width: parseInt(s.target.value) || 100 }
3413
3477
  })
3414
3478
  }
3415
3479
  )
3416
3480
  ] }),
3417
- /* @__PURE__ */ r("label", { children: [
3481
+ /* @__PURE__ */ a("label", { children: [
3418
3482
  "Height",
3419
3483
  /* @__PURE__ */ e(
3420
3484
  "input",
3421
3485
  {
3422
3486
  type: "number",
3423
- value: a.size.height,
3424
- onChange: (t) => L(a.id, {
3425
- size: { ...a.size, height: parseInt(t.target.value) || 100 }
3487
+ value: r.size.height,
3488
+ onChange: (s) => V(r.id, {
3489
+ size: { ...r.size, height: parseInt(s.target.value) || 100 }
3426
3490
  })
3427
3491
  }
3428
3492
  )
3429
3493
  ] }),
3430
- /* @__PURE__ */ r("label", { children: [
3494
+ /* @__PURE__ */ a("label", { children: [
3431
3495
  "Opacity",
3432
3496
  /* @__PURE__ */ e(
3433
3497
  "input",
@@ -3436,9 +3500,9 @@ const Be = {
3436
3500
  min: "0",
3437
3501
  max: "1",
3438
3502
  step: "0.1",
3439
- value: a.opacity,
3440
- onChange: (t) => L(a.id, {
3441
- opacity: parseFloat(t.target.value)
3503
+ value: r.opacity,
3504
+ onChange: (s) => V(r.id, {
3505
+ opacity: parseFloat(s.target.value)
3442
3506
  })
3443
3507
  }
3444
3508
  )
@@ -3447,8 +3511,8 @@ const Be = {
3447
3511
  })()
3448
3512
  ] })
3449
3513
  ] }),
3450
- b === "audio" && /* @__PURE__ */ r("div", { className: "audio-panel", children: [
3451
- /* @__PURE__ */ r("div", { className: "panel-header", children: [
3514
+ b === "audio" && /* @__PURE__ */ a("div", { className: "audio-panel", children: [
3515
+ /* @__PURE__ */ a("div", { className: "panel-header", children: [
3452
3516
  /* @__PURE__ */ e("h3", { children: "Audio Mixer" }),
3453
3517
  /* @__PURE__ */ e(
3454
3518
  "button",
@@ -3462,25 +3526,25 @@ const Be = {
3462
3526
  }
3463
3527
  )
3464
3528
  ] }),
3465
- /* @__PURE__ */ r("div", { className: "audio-sources", children: [
3466
- i.sources.filter(
3467
- (a) => a.type === "microphone" || a.type === "system-audio" || a.type === "video"
3468
- ).map((a) => {
3469
- var t;
3470
- return /* @__PURE__ */ r("div", { className: "audio-source", children: [
3471
- /* @__PURE__ */ r("div", { className: "audio-header", children: [
3472
- /* @__PURE__ */ e("span", { className: "audio-icon", children: (t = le.find((c) => c.type === a.type)) == null ? void 0 : t.icon }),
3473
- /* @__PURE__ */ e("span", { className: "audio-name", children: a.name }),
3529
+ /* @__PURE__ */ a("div", { className: "audio-sources", children: [
3530
+ n.sources.filter(
3531
+ (r) => r.type === "microphone" || r.type === "system-audio" || r.type === "video"
3532
+ ).map((r) => {
3533
+ var s;
3534
+ return /* @__PURE__ */ a("div", { className: "audio-source", children: [
3535
+ /* @__PURE__ */ a("div", { className: "audio-header", children: [
3536
+ /* @__PURE__ */ e("span", { className: "audio-icon", children: (s = de.find((m) => m.type === r.type)) == null ? void 0 : s.icon }),
3537
+ /* @__PURE__ */ e("span", { className: "audio-name", children: r.name }),
3474
3538
  /* @__PURE__ */ e(
3475
3539
  "button",
3476
3540
  {
3477
- className: a.muted ? "muted" : "",
3478
- onClick: () => _(a.id, { muted: !a.muted }),
3479
- children: a.muted ? "🔇" : "🔊"
3541
+ className: r.muted ? "muted" : "",
3542
+ onClick: () => E(r.id, { muted: !r.muted }),
3543
+ children: r.muted ? "🔇" : "🔊"
3480
3544
  }
3481
3545
  )
3482
3546
  ] }),
3483
- /* @__PURE__ */ r("div", { className: "audio-slider", children: [
3547
+ /* @__PURE__ */ a("div", { className: "audio-slider", children: [
3484
3548
  /* @__PURE__ */ e(
3485
3549
  "input",
3486
3550
  {
@@ -3488,13 +3552,13 @@ const Be = {
3488
3552
  min: "0",
3489
3553
  max: "1",
3490
3554
  step: "0.01",
3491
- value: a.volume ?? 1,
3492
- onChange: (c) => _(a.id, { volume: parseFloat(c.target.value) }),
3493
- disabled: a.muted
3555
+ value: r.volume ?? 1,
3556
+ onChange: (m) => E(r.id, { volume: parseFloat(m.target.value) }),
3557
+ disabled: r.muted
3494
3558
  }
3495
3559
  ),
3496
- /* @__PURE__ */ r("span", { className: "volume-value", children: [
3497
- Math.round((a.volume ?? 1) * 100),
3560
+ /* @__PURE__ */ a("span", { className: "volume-value", children: [
3561
+ Math.round((r.volume ?? 1) * 100),
3498
3562
  "%"
3499
3563
  ] })
3500
3564
  ] }),
@@ -3502,78 +3566,78 @@ const Be = {
3502
3566
  "div",
3503
3567
  {
3504
3568
  className: "meter-fill",
3505
- style: { width: `${(a.volume ?? 1) * 70 + Math.random() * 30}%` }
3569
+ style: { width: `${(r.volume ?? 1) * 70 + Math.random() * 30}%` }
3506
3570
  }
3507
3571
  ) })
3508
- ] }, a.id);
3572
+ ] }, r.id);
3509
3573
  }),
3510
- i.sources.filter(
3511
- (a) => a.type === "microphone" || a.type === "system-audio"
3574
+ n.sources.filter(
3575
+ (r) => r.type === "microphone" || r.type === "system-audio"
3512
3576
  ).length === 0 && /* @__PURE__ */ e("p", { className: "empty-message", children: "No audio sources added" })
3513
3577
  ] })
3514
3578
  ] }),
3515
- b === "destinations" && /* @__PURE__ */ r("div", { className: "destinations-panel", children: [
3516
- /* @__PURE__ */ r("div", { className: "panel-header", children: [
3579
+ b === "destinations" && /* @__PURE__ */ a("div", { className: "destinations-panel", children: [
3580
+ /* @__PURE__ */ a("div", { className: "panel-header", children: [
3517
3581
  /* @__PURE__ */ e("h3", { children: "Destinations" }),
3518
3582
  /* @__PURE__ */ e(
3519
3583
  "button",
3520
3584
  {
3521
3585
  className: "add-button",
3522
- onClick: () => W(!0),
3586
+ onClick: () => K(!0),
3523
3587
  disabled: y,
3524
3588
  children: "+ Add"
3525
3589
  }
3526
3590
  )
3527
3591
  ] }),
3528
- /* @__PURE__ */ r("div", { className: "destinations-list", children: [
3529
- i.destinations.map((a) => {
3530
- var t;
3531
- return /* @__PURE__ */ r("div", { className: "destination-item", children: [
3532
- /* @__PURE__ */ r("div", { className: "destination-header", children: [
3592
+ /* @__PURE__ */ a("div", { className: "destinations-list", children: [
3593
+ n.destinations.map((r) => {
3594
+ var s;
3595
+ return /* @__PURE__ */ a("div", { className: "destination-item", children: [
3596
+ /* @__PURE__ */ a("div", { className: "destination-header", children: [
3533
3597
  /* @__PURE__ */ e(
3534
3598
  "span",
3535
3599
  {
3536
3600
  className: "status-indicator",
3537
- style: { backgroundColor: o(a.status) }
3601
+ style: { backgroundColor: ce(r.status) }
3538
3602
  }
3539
3603
  ),
3540
- /* @__PURE__ */ e("span", { className: "destination-icon", children: (t = fe.find((c) => c.platform === a.platform)) == null ? void 0 : t.icon }),
3541
- /* @__PURE__ */ e("span", { className: "destination-name", children: a.name }),
3542
- /* @__PURE__ */ r("label", { className: "toggle", children: [
3604
+ /* @__PURE__ */ e("span", { className: "destination-icon", children: (s = fe.find((m) => m.platform === r.platform)) == null ? void 0 : s.icon }),
3605
+ /* @__PURE__ */ e("span", { className: "destination-name", children: r.name }),
3606
+ /* @__PURE__ */ a("label", { className: "toggle", children: [
3543
3607
  /* @__PURE__ */ e(
3544
3608
  "input",
3545
3609
  {
3546
3610
  type: "checkbox",
3547
- checked: a.enabled,
3548
- onChange: (c) => Y(a.id, { enabled: c.target.checked }),
3611
+ checked: r.enabled,
3612
+ onChange: (m) => q(r.id, { enabled: m.target.checked }),
3549
3613
  disabled: y
3550
3614
  }
3551
3615
  ),
3552
3616
  /* @__PURE__ */ e("span", { className: "toggle-slider" })
3553
3617
  ] })
3554
3618
  ] }),
3555
- /* @__PURE__ */ r("div", { className: "destination-config", children: [
3556
- /* @__PURE__ */ r("label", { children: [
3619
+ /* @__PURE__ */ a("div", { className: "destination-config", children: [
3620
+ /* @__PURE__ */ a("label", { children: [
3557
3621
  "Server URL",
3558
3622
  /* @__PURE__ */ e(
3559
3623
  "input",
3560
3624
  {
3561
3625
  type: "text",
3562
- value: a.url,
3563
- onChange: (c) => Y(a.id, { url: c.target.value }),
3626
+ value: r.url,
3627
+ onChange: (m) => q(r.id, { url: m.target.value }),
3564
3628
  placeholder: "rtmp://...",
3565
3629
  disabled: y
3566
3630
  }
3567
3631
  )
3568
3632
  ] }),
3569
- /* @__PURE__ */ r("label", { children: [
3633
+ /* @__PURE__ */ a("label", { children: [
3570
3634
  "Stream Key",
3571
3635
  /* @__PURE__ */ e(
3572
3636
  "input",
3573
3637
  {
3574
3638
  type: "password",
3575
- value: a.streamKey || "",
3576
- onChange: (c) => Y(a.id, { streamKey: c.target.value }),
3639
+ value: r.streamKey || "",
3640
+ onChange: (m) => q(r.id, { streamKey: m.target.value }),
3577
3641
  placeholder: "Enter stream key",
3578
3642
  disabled: y
3579
3643
  }
@@ -3584,35 +3648,35 @@ const Be = {
3584
3648
  "button",
3585
3649
  {
3586
3650
  className: "remove-button",
3587
- onClick: () => G(a.id),
3651
+ onClick: () => G(r.id),
3588
3652
  disabled: y,
3589
3653
  children: "Remove"
3590
3654
  }
3591
3655
  )
3592
- ] }, a.id);
3656
+ ] }, r.id);
3593
3657
  }),
3594
- i.destinations.length === 0 && /* @__PURE__ */ e("p", { className: "empty-message", children: "No destinations configured" })
3658
+ n.destinations.length === 0 && /* @__PURE__ */ e("p", { className: "empty-message", children: "No destinations configured" })
3595
3659
  ] })
3596
3660
  ] }),
3597
- b === "settings" && /* @__PURE__ */ r("div", { className: "settings-panel", children: [
3598
- /* @__PURE__ */ r("div", { className: "setting-section", children: [
3661
+ b === "settings" && /* @__PURE__ */ a("div", { className: "settings-panel", children: [
3662
+ /* @__PURE__ */ a("div", { className: "setting-section", children: [
3599
3663
  /* @__PURE__ */ e("h4", { children: "Video" }),
3600
- /* @__PURE__ */ r("label", { children: [
3664
+ /* @__PURE__ */ a("label", { children: [
3601
3665
  "Resolution",
3602
- /* @__PURE__ */ r(
3666
+ /* @__PURE__ */ a(
3603
3667
  "select",
3604
3668
  {
3605
- value: `${i.settings.video.resolution.width}x${i.settings.video.resolution.height}`,
3606
- onChange: (a) => {
3607
- const [t, c] = a.target.value.split("x").map(Number);
3608
- g({
3669
+ value: `${n.settings.video.resolution.width}x${n.settings.video.resolution.height}`,
3670
+ onChange: (r) => {
3671
+ const [s, m] = r.target.value.split("x").map(Number);
3672
+ N({
3609
3673
  settings: {
3610
- ...i.settings,
3611
- video: { ...i.settings.video, resolution: { width: t, height: c } }
3674
+ ...n.settings,
3675
+ video: { ...n.settings.video, resolution: { width: s, height: m } }
3612
3676
  },
3613
3677
  layout: {
3614
- ...i.layout,
3615
- canvas: { ...i.layout.canvas, width: t, height: c }
3678
+ ...n.layout,
3679
+ canvas: { ...n.layout.canvas, width: s, height: m }
3616
3680
  }
3617
3681
  });
3618
3682
  },
@@ -3625,18 +3689,18 @@ const Be = {
3625
3689
  }
3626
3690
  )
3627
3691
  ] }),
3628
- /* @__PURE__ */ r("label", { children: [
3692
+ /* @__PURE__ */ a("label", { children: [
3629
3693
  "Frame Rate",
3630
- /* @__PURE__ */ r(
3694
+ /* @__PURE__ */ a(
3631
3695
  "select",
3632
3696
  {
3633
- value: i.settings.video.frameRate,
3634
- onChange: (a) => g({
3697
+ value: n.settings.video.frameRate,
3698
+ onChange: (r) => N({
3635
3699
  settings: {
3636
- ...i.settings,
3700
+ ...n.settings,
3637
3701
  video: {
3638
- ...i.settings.video,
3639
- frameRate: parseInt(a.target.value)
3702
+ ...n.settings.video,
3703
+ frameRate: parseInt(r.target.value)
3640
3704
  }
3641
3705
  }
3642
3706
  }),
@@ -3649,19 +3713,19 @@ const Be = {
3649
3713
  }
3650
3714
  )
3651
3715
  ] }),
3652
- /* @__PURE__ */ r("label", { children: [
3716
+ /* @__PURE__ */ a("label", { children: [
3653
3717
  "Bitrate (kbps)",
3654
3718
  /* @__PURE__ */ e(
3655
3719
  "input",
3656
3720
  {
3657
3721
  type: "number",
3658
- value: i.settings.video.bitrate,
3659
- onChange: (a) => g({
3722
+ value: n.settings.video.bitrate,
3723
+ onChange: (r) => N({
3660
3724
  settings: {
3661
- ...i.settings,
3725
+ ...n.settings,
3662
3726
  video: {
3663
- ...i.settings.video,
3664
- bitrate: parseInt(a.target.value) || 6e3
3727
+ ...n.settings.video,
3728
+ bitrate: parseInt(r.target.value) || 6e3
3665
3729
  }
3666
3730
  }
3667
3731
  }),
@@ -3671,19 +3735,19 @@ const Be = {
3671
3735
  }
3672
3736
  )
3673
3737
  ] }),
3674
- /* @__PURE__ */ r("label", { children: [
3738
+ /* @__PURE__ */ a("label", { children: [
3675
3739
  "Keyframe Interval (sec)",
3676
3740
  /* @__PURE__ */ e(
3677
3741
  "input",
3678
3742
  {
3679
3743
  type: "number",
3680
- value: i.settings.video.keyframe,
3681
- onChange: (a) => g({
3744
+ value: n.settings.video.keyframe,
3745
+ onChange: (r) => N({
3682
3746
  settings: {
3683
- ...i.settings,
3747
+ ...n.settings,
3684
3748
  video: {
3685
- ...i.settings.video,
3686
- keyframe: parseInt(a.target.value) || 2
3749
+ ...n.settings.video,
3750
+ keyframe: parseInt(r.target.value) || 2
3687
3751
  }
3688
3752
  }
3689
3753
  }),
@@ -3694,20 +3758,20 @@ const Be = {
3694
3758
  )
3695
3759
  ] })
3696
3760
  ] }),
3697
- /* @__PURE__ */ r("div", { className: "setting-section", children: [
3761
+ /* @__PURE__ */ a("div", { className: "setting-section", children: [
3698
3762
  /* @__PURE__ */ e("h4", { children: "Audio" }),
3699
- /* @__PURE__ */ r("label", { children: [
3763
+ /* @__PURE__ */ a("label", { children: [
3700
3764
  "Sample Rate",
3701
- /* @__PURE__ */ r(
3765
+ /* @__PURE__ */ a(
3702
3766
  "select",
3703
3767
  {
3704
- value: i.settings.audio.sampleRate,
3705
- onChange: (a) => g({
3768
+ value: n.settings.audio.sampleRate,
3769
+ onChange: (r) => N({
3706
3770
  settings: {
3707
- ...i.settings,
3771
+ ...n.settings,
3708
3772
  audio: {
3709
- ...i.settings.audio,
3710
- sampleRate: parseInt(a.target.value)
3773
+ ...n.settings.audio,
3774
+ sampleRate: parseInt(r.target.value)
3711
3775
  }
3712
3776
  }
3713
3777
  }),
@@ -3719,16 +3783,16 @@ const Be = {
3719
3783
  }
3720
3784
  )
3721
3785
  ] }),
3722
- /* @__PURE__ */ r("label", { children: [
3786
+ /* @__PURE__ */ a("label", { children: [
3723
3787
  "Audio Bitrate (kbps)",
3724
- /* @__PURE__ */ r(
3788
+ /* @__PURE__ */ a(
3725
3789
  "select",
3726
3790
  {
3727
- value: i.settings.audio.bitrate,
3728
- onChange: (a) => g({
3791
+ value: n.settings.audio.bitrate,
3792
+ onChange: (r) => N({
3729
3793
  settings: {
3730
- ...i.settings,
3731
- audio: { ...i.settings.audio, bitrate: parseInt(a.target.value) }
3794
+ ...n.settings,
3795
+ audio: { ...n.settings.audio, bitrate: parseInt(r.target.value) }
3732
3796
  }
3733
3797
  }),
3734
3798
  disabled: y,
@@ -3746,70 +3810,70 @@ const Be = {
3746
3810
  ] })
3747
3811
  ] })
3748
3812
  ] }),
3749
- y && /* @__PURE__ */ e("footer", { className: "streaming__footer", children: /* @__PURE__ */ r("div", { className: "footer-stats", children: [
3750
- /* @__PURE__ */ r("span", { className: "stat", children: [
3813
+ y && /* @__PURE__ */ e("footer", { className: "streaming__footer", children: /* @__PURE__ */ a("div", { className: "footer-stats", children: [
3814
+ /* @__PURE__ */ a("span", { className: "stat", children: [
3751
3815
  /* @__PURE__ */ e("label", { children: "CPU" }),
3752
- /* @__PURE__ */ r("span", { className: "value", children: [
3816
+ /* @__PURE__ */ a("span", { className: "value", children: [
3753
3817
  S.cpuUsage.toFixed(1),
3754
3818
  "%"
3755
3819
  ] })
3756
3820
  ] }),
3757
- /* @__PURE__ */ r("span", { className: "stat", children: [
3821
+ /* @__PURE__ */ a("span", { className: "stat", children: [
3758
3822
  /* @__PURE__ */ e("label", { children: "Memory" }),
3759
- /* @__PURE__ */ r("span", { className: "value", children: [
3823
+ /* @__PURE__ */ a("span", { className: "value", children: [
3760
3824
  S.memoryUsage.toFixed(1),
3761
3825
  "%"
3762
3826
  ] })
3763
3827
  ] }),
3764
- /* @__PURE__ */ r("span", { className: "stat", children: [
3828
+ /* @__PURE__ */ a("span", { className: "stat", children: [
3765
3829
  /* @__PURE__ */ e("label", { children: "Dropped" }),
3766
3830
  /* @__PURE__ */ e("span", { className: "value", children: S.droppedFrames })
3767
3831
  ] }),
3768
- /* @__PURE__ */ r("span", { className: "stat", children: [
3832
+ /* @__PURE__ */ a("span", { className: "stat", children: [
3769
3833
  /* @__PURE__ */ e("label", { children: "Peak Viewers" }),
3770
3834
  /* @__PURE__ */ e("span", { className: "value", children: S.peakViewers })
3771
3835
  ] })
3772
3836
  ] }) }),
3773
- K && /* @__PURE__ */ e("div", { className: "modal-overlay", children: /* @__PURE__ */ r("div", { className: "modal", children: [
3774
- /* @__PURE__ */ r("div", { className: "modal-header", children: [
3837
+ F && /* @__PURE__ */ e("div", { className: "modal-overlay", children: /* @__PURE__ */ a("div", { className: "modal", children: [
3838
+ /* @__PURE__ */ a("div", { className: "modal-header", children: [
3775
3839
  /* @__PURE__ */ e("h3", { children: "Add Source" }),
3776
3840
  /* @__PURE__ */ e("button", { className: "close-button", onClick: () => M(!1), children: "×" })
3777
3841
  ] }),
3778
- /* @__PURE__ */ e("div", { className: "modal-content", children: /* @__PURE__ */ e("div", { className: "source-type-grid", children: le.map((a) => /* @__PURE__ */ r(
3842
+ /* @__PURE__ */ e("div", { className: "modal-content", children: /* @__PURE__ */ e("div", { className: "source-type-grid", children: de.map((r) => /* @__PURE__ */ a(
3779
3843
  "button",
3780
3844
  {
3781
3845
  className: "source-type-button",
3782
- onClick: () => re(a.type),
3846
+ onClick: () => ee(r.type),
3783
3847
  children: [
3784
- /* @__PURE__ */ e("span", { className: "icon", children: a.icon }),
3785
- /* @__PURE__ */ e("span", { className: "name", children: a.name })
3848
+ /* @__PURE__ */ e("span", { className: "icon", children: r.icon }),
3849
+ /* @__PURE__ */ e("span", { className: "name", children: r.name })
3786
3850
  ]
3787
3851
  },
3788
- a.type
3852
+ r.type
3789
3853
  )) }) })
3790
3854
  ] }) }),
3791
- J && /* @__PURE__ */ e("div", { className: "modal-overlay", children: /* @__PURE__ */ r("div", { className: "modal", children: [
3792
- /* @__PURE__ */ r("div", { className: "modal-header", children: [
3855
+ Z && /* @__PURE__ */ e("div", { className: "modal-overlay", children: /* @__PURE__ */ a("div", { className: "modal", children: [
3856
+ /* @__PURE__ */ a("div", { className: "modal-header", children: [
3793
3857
  /* @__PURE__ */ e("h3", { children: "Add Destination" }),
3794
- /* @__PURE__ */ e("button", { className: "close-button", onClick: () => W(!1), children: "×" })
3858
+ /* @__PURE__ */ e("button", { className: "close-button", onClick: () => K(!1), children: "×" })
3795
3859
  ] }),
3796
- /* @__PURE__ */ e("div", { className: "modal-content", children: /* @__PURE__ */ e("div", { className: "platform-grid", children: fe.map((a) => /* @__PURE__ */ r(
3860
+ /* @__PURE__ */ e("div", { className: "modal-content", children: /* @__PURE__ */ e("div", { className: "platform-grid", children: fe.map((r) => /* @__PURE__ */ a(
3797
3861
  "button",
3798
3862
  {
3799
3863
  className: "platform-button",
3800
- onClick: () => B(a.platform),
3864
+ onClick: () => W(r.platform),
3801
3865
  children: [
3802
- /* @__PURE__ */ e("span", { className: "icon", children: a.icon }),
3803
- /* @__PURE__ */ e("span", { className: "name", children: a.name })
3866
+ /* @__PURE__ */ e("span", { className: "icon", children: r.icon }),
3867
+ /* @__PURE__ */ e("span", { className: "name", children: r.name })
3804
3868
  ]
3805
3869
  },
3806
- a.platform
3870
+ r.platform
3807
3871
  )) }) })
3808
3872
  ] }) })
3809
3873
  ] });
3810
3874
  };
3811
3875
  export {
3812
- Qe as NiceLiveStreaming,
3813
- Xe as NiceScreenRecorder,
3814
- Ye as NiceVideoEditor
3876
+ aa as NiceLiveStreaming,
3877
+ ea as NiceScreenRecorder,
3878
+ Qe as NiceVideoEditor
3815
3879
  };