@nice2dev/ui-video 1.1.10 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,9 +1,9 @@
1
- import { jsxs as t, jsx as e, Fragment as re } from "react/jsx-runtime";
2
- import { NiceAppShell as me } from "@nice2dev/ui";
3
- import { NiceIcon as u, NiceTutorialButton as he, resolveTutorial as pe } from "@nice2dev/ui-core";
4
- import { useState as b, useRef as M, useEffect as oe, useCallback as ce } from "react";
5
- const ve = {
6
- id: crypto.randomUUID(),
1
+ import { jsxs as t, jsx as e, Fragment as oe } from "react/jsx-runtime";
2
+ import { NiceAppShell as pe } from "@nice2dev/ui";
3
+ import { useNiceTranslation as me, NiceIcon as m, NiceTutorialButton as _e, resolveTutorial as ge, createId as $ } from "@nice2dev/ui-core";
4
+ import { useState as g, useRef as M, useEffect as le, useCallback as ue } from "react";
5
+ const fe = {
6
+ id: $(),
7
7
  name: "Untitled Project",
8
8
  resolution: { width: 1920, height: 1080, label: "1080p" },
9
9
  frameRate: 30,
@@ -35,7 +35,7 @@ const ve = {
35
35
  audio: { sampleRate: 48e3, channels: 2, bitrate: 320 },
36
36
  video: { codec: "h264", bitrate: 8e3, profile: "high" }
37
37
  }
38
- }, fe = [
38
+ }, be = [
39
39
  { type: "blur", name: "Blur", icon: "droplet" },
40
40
  { type: "brightness", name: "Brightness", icon: "sun" },
41
41
  { type: "contrast", name: "Contrast", icon: "moon" },
@@ -45,14 +45,14 @@ const ve = {
45
45
  { type: "chromaKey", name: "Chroma Key", icon: "layers" },
46
46
  { type: "crop", name: "Crop", icon: "crop" },
47
47
  { type: "zoom", name: "Zoom", icon: "search" }
48
- ], be = [
48
+ ], ye = [
49
49
  { type: "fade", name: "Fade" },
50
50
  { type: "dissolve", name: "Dissolve" },
51
51
  { type: "wipe", name: "Wipe" },
52
52
  { type: "slide", name: "Slide" },
53
53
  { type: "zoom", name: "Zoom" },
54
54
  { type: "push", name: "Push" }
55
- ], ge = [
55
+ ], Ne = [
56
56
  {
57
57
  target: ".nice-video-editor",
58
58
  titleKey: "tutorial.videoEditorPro.intro.title",
@@ -61,72 +61,72 @@ const ve = {
61
61
  content: "Add media to the timeline, arrange and trim clips, apply effects and transitions, then configure and run the export.",
62
62
  placement: "auto"
63
63
  }
64
- ], Se = ({
65
- project: $,
66
- onProjectChange: I,
67
- onExport: A,
68
- onAssetUpload: E,
69
- className: L = "",
70
- tutorial: T
64
+ ], ze = ({
65
+ project: E,
66
+ onProjectChange: R,
67
+ onExport: F,
68
+ onAssetUpload: L,
69
+ className: O = "",
70
+ tutorial: I
71
71
  }) => {
72
- const [d, s] = b($ || ve), [D, y] = b(
72
+ const { t: b } = me(), [r, s] = g(E || fe), [A, y] = g(
73
73
  "timeline"
74
- ), [W, h] = b(null), [k, N] = b(null), [R, w] = b(0), [V, O] = b(!1), [C, q] = b(1), [B, z] = b(!0), [_, P] = b(null), X = M(null), ee = M(null), S = M(null);
75
- oe(() => {
76
- $ && s($);
77
- }, [$]), oe(() => () => {
78
- S.current && clearInterval(S.current);
74
+ ), [H, v] = g(null), [k, N] = g(null), [D, w] = g(0), [B, K] = g(!1), [C, G] = g(1), [W, z] = g(!0), [T, U] = g(null), ie = M(null), te = M(null), x = M(null);
75
+ le(() => {
76
+ E && s(E);
77
+ }, [E]), le(() => () => {
78
+ x.current && clearInterval(x.current);
79
79
  }, []);
80
- const g = ce(
81
- (n) => {
82
- const o = { ...d, ...n };
83
- s(o), I == null || I(o);
80
+ const f = ue(
81
+ (a) => {
82
+ const o = { ...r, ...a };
83
+ s(o), R == null || R(o);
84
84
  },
85
- [d, I]
86
- ), f = async (n) => {
85
+ [r, R]
86
+ ), _ = async (a) => {
87
87
  const o = [];
88
- for (const i of Array.from(n)) {
89
- const c = i.type.startsWith("video/") ? "video" : i.type.startsWith("audio/") ? "audio" : "image";
90
- let m;
91
- E ? m = await E(i) : m = {
92
- id: crypto.randomUUID(),
93
- type: c,
94
- name: i.name,
95
- url: URL.createObjectURL(i),
96
- size: i.size
97
- }, o.push(m);
88
+ for (const n of Array.from(a)) {
89
+ const d = n.type.startsWith("video/") ? "video" : n.type.startsWith("audio/") ? "audio" : "image";
90
+ let u;
91
+ L ? u = await L(n) : u = {
92
+ id: $(),
93
+ type: d,
94
+ name: n.name,
95
+ url: URL.createObjectURL(n),
96
+ size: n.size
97
+ }, o.push(u);
98
98
  }
99
- g({ assets: [...d.assets, ...o] });
100
- }, F = (n) => {
99
+ f({ assets: [...r.assets, ...o] });
100
+ }, V = (a) => {
101
101
  const o = {
102
- id: crypto.randomUUID(),
103
- type: n,
104
- name: `${n.charAt(0).toUpperCase() + n.slice(1)} ${d.tracks.filter((i) => i.type === n).length + 1}`,
102
+ id: $(),
103
+ type: a,
104
+ name: `${a.charAt(0).toUpperCase() + a.slice(1)} ${r.tracks.filter((n) => n.type === a).length + 1}`,
105
105
  items: [],
106
106
  muted: !1,
107
107
  locked: !1,
108
108
  visible: !0
109
109
  };
110
- g({ tracks: [...d.tracks, o] });
111
- }, j = (n) => {
112
- g({ tracks: d.tracks.filter((o) => o.id !== n) }), W === n && h(null);
113
- }, K = (n) => {
114
- g({
115
- tracks: d.tracks.map((o) => o.id === n ? { ...o, muted: !o.muted } : o)
110
+ f({ tracks: [...r.tracks, o] });
111
+ }, Y = (a) => {
112
+ f({ tracks: r.tracks.filter((o) => o.id !== a) }), H === a && v(null);
113
+ }, q = (a) => {
114
+ f({
115
+ tracks: r.tracks.map((o) => o.id === a ? { ...o, muted: !o.muted } : o)
116
116
  });
117
- }, J = (n) => {
118
- g({
119
- tracks: d.tracks.map((o) => o.id === n ? { ...o, locked: !o.locked } : o)
117
+ }, X = (a) => {
118
+ f({
119
+ tracks: r.tracks.map((o) => o.id === a ? { ...o, locked: !o.locked } : o)
120
120
  });
121
- }, x = (n, o) => {
122
- const i = d.tracks.find((v) => v.id === n);
123
- if (!i || i.locked)
121
+ }, S = (a, o) => {
122
+ const n = r.tracks.find((p) => p.id === a);
123
+ if (!n || n.locked)
124
124
  return;
125
- const c = i.items[i.items.length - 1], m = c ? c.startTime + c.duration : 0, p = {
126
- id: crypto.randomUUID(),
125
+ const d = n.items[n.items.length - 1], u = d ? d.startTime + d.duration : 0, h = {
126
+ id: $(),
127
127
  assetId: o.id,
128
128
  type: o.type,
129
- startTime: m,
129
+ startTime: u,
130
130
  duration: o.duration || 5,
131
131
  offset: 0,
132
132
  properties: {
@@ -139,47 +139,47 @@ const ve = {
139
139
  effects: [],
140
140
  transitions: []
141
141
  };
142
- g({
143
- tracks: d.tracks.map(
144
- (v) => v.id === n ? { ...v, items: [...v.items, p] } : v
142
+ f({
143
+ tracks: r.tracks.map(
144
+ (p) => p.id === a ? { ...p, items: [...p.items, h] } : p
145
145
  )
146
146
  });
147
- }, G = (n, o, i) => {
148
- const c = {
149
- id: crypto.randomUUID(),
150
- type: i,
151
- name: i.charAt(0).toUpperCase() + i.slice(1),
152
- parameters: ae(i)
147
+ }, Z = (a, o, n) => {
148
+ const d = {
149
+ id: $(),
150
+ type: n,
151
+ name: n.charAt(0).toUpperCase() + n.slice(1),
152
+ parameters: ne(n)
153
153
  };
154
- g({
155
- tracks: d.tracks.map(
156
- (m) => m.id === n ? {
157
- ...m,
158
- items: m.items.map(
159
- (p) => p.id === o ? { ...p, effects: [...p.effects, c] } : p
154
+ f({
155
+ tracks: r.tracks.map(
156
+ (u) => u.id === a ? {
157
+ ...u,
158
+ items: u.items.map(
159
+ (h) => h.id === o ? { ...h, effects: [...h.effects, d] } : h
160
160
  )
161
- } : m
161
+ } : u
162
162
  )
163
163
  });
164
- }, U = (n, o, i, c) => {
165
- const m = {
166
- id: crypto.randomUUID(),
167
- type: i,
164
+ }, P = (a, o, n, d) => {
165
+ const u = {
166
+ id: $(),
167
+ type: n,
168
168
  duration: 0.5,
169
- position: c
169
+ position: d
170
170
  };
171
- g({
172
- tracks: d.tracks.map(
173
- (p) => p.id === n ? {
174
- ...p,
175
- items: p.items.map(
176
- (v) => v.id === o ? { ...v, transitions: [...v.transitions, m] } : v
171
+ f({
172
+ tracks: r.tracks.map(
173
+ (h) => h.id === a ? {
174
+ ...h,
175
+ items: h.items.map(
176
+ (p) => p.id === o ? { ...p, transitions: [...p.transitions, u] } : p
177
177
  )
178
- } : p
178
+ } : h
179
179
  )
180
180
  });
181
- }, ae = (n) => {
182
- switch (n) {
181
+ }, ne = (a) => {
182
+ switch (a) {
183
183
  case "blur":
184
184
  return { radius: 5 };
185
185
  case "brightness":
@@ -201,104 +201,104 @@ const ve = {
201
201
  default:
202
202
  return {};
203
203
  }
204
- }, te = () => {
205
- V ? (S.current && clearInterval(S.current), O(!1)) : (S.current = setInterval(() => {
206
- w((n) => {
204
+ }, ae = () => {
205
+ B ? (x.current && clearInterval(x.current), K(!1)) : (x.current = setInterval(() => {
206
+ w((a) => {
207
207
  const o = Math.max(
208
- ...d.tracks.flatMap((i) => i.items.map((c) => c.startTime + c.duration)),
208
+ ...r.tracks.flatMap((n) => n.items.map((d) => d.startTime + d.duration)),
209
209
  0
210
210
  );
211
- return n >= o ? (clearInterval(S.current), O(!1), 0) : n + 1 / d.frameRate;
211
+ return a >= o ? (clearInterval(x.current), K(!1), 0) : a + 1 / r.frameRate;
212
212
  });
213
- }, 1e3 / d.frameRate), O(!0));
214
- }, Y = (n) => {
215
- w(Math.max(0, n));
216
- }, Z = async () => {
217
- if (A) {
218
- P(0);
213
+ }, 1e3 / r.frameRate), K(!0));
214
+ }, J = (a) => {
215
+ w(Math.max(0, a));
216
+ }, Q = async () => {
217
+ if (F) {
218
+ U(0);
219
219
  try {
220
- const n = setInterval(() => {
221
- P((o) => o !== null && o < 90 ? o + Math.random() * 10 : o);
220
+ const a = setInterval(() => {
221
+ U((o) => o !== null && o < 90 ? o + Math.random() * 10 : o);
222
222
  }, 500);
223
- await A(d, d.settings.video.codec), clearInterval(n), P(100), setTimeout(() => P(null), 2e3);
224
- } catch (n) {
225
- P(null), console.error("Export failed:", n);
223
+ await F(r, r.settings.video.codec), clearInterval(a), U(100), setTimeout(() => U(null), 2e3);
224
+ } catch (a) {
225
+ U(null), console.error("Export failed:", a);
226
226
  }
227
227
  }
228
- }, Q = (n) => {
229
- const o = Math.floor(n / 60), i = Math.floor(n % 60), c = Math.floor(n % 1 * d.frameRate);
230
- return `${o.toString().padStart(2, "0")}:${i.toString().padStart(2, "0")}:${c.toString().padStart(2, "0")}`;
231
- }, H = () => {
232
- for (const n of d.tracks) {
233
- const o = n.items.find((i) => i.id === k);
228
+ }, ee = (a) => {
229
+ const o = Math.floor(a / 60), n = Math.floor(a % 60), d = Math.floor(a % 1 * r.frameRate);
230
+ return `${o.toString().padStart(2, "0")}:${n.toString().padStart(2, "0")}:${d.toString().padStart(2, "0")}`;
231
+ }, j = () => {
232
+ for (const a of r.tracks) {
233
+ const o = a.items.find((n) => n.id === k);
234
234
  if (o)
235
- return { track: n, item: o };
235
+ return { track: a, item: o };
236
236
  }
237
237
  return null;
238
- }, ie = /* @__PURE__ */ t("header", { className: "video-editor__header", children: [
239
- /* @__PURE__ */ t("div", { className: "header__project-info", children: [
238
+ }, se = /* @__PURE__ */ t("header", { className: "nice-video-studio__header", children: [
239
+ /* @__PURE__ */ t("div", { className: "nice-video-studio__header-project-info", children: [
240
240
  /* @__PURE__ */ e(
241
241
  "input",
242
242
  {
243
243
  type: "text",
244
- value: d.name,
245
- onChange: (n) => g({ name: n.target.value }),
246
- className: "project-name-input"
244
+ value: r.name,
245
+ onChange: (a) => f({ name: a.target.value }),
246
+ className: "nice-video-studio__project-name-input"
247
247
  }
248
248
  ),
249
- /* @__PURE__ */ t("span", { className: "project-settings", children: [
250
- d.resolution.width,
249
+ /* @__PURE__ */ t("span", { className: "nice-video-studio__project-settings", children: [
250
+ r.resolution.width,
251
251
  "x",
252
- d.resolution.height,
252
+ r.resolution.height,
253
253
  " • ",
254
- d.frameRate,
254
+ r.frameRate,
255
255
  "fps"
256
256
  ] })
257
257
  ] }),
258
- /* @__PURE__ */ e("div", { className: "header__tabs", children: ["timeline", "effects", "transitions", "export"].map((n) => /* @__PURE__ */ e(
258
+ /* @__PURE__ */ e("div", { className: "nice-video-studio__header-tabs", children: ["timeline", "effects", "transitions", "export"].map((a) => /* @__PURE__ */ e(
259
259
  "button",
260
260
  {
261
- className: `tab-button ${D === n ? "tab-button--active" : ""}`,
262
- onClick: () => y(n),
263
- children: n.charAt(0).toUpperCase() + n.slice(1)
261
+ className: `nice-video-studio__tab-button ${A === a ? "nice-video-studio__tab-button--active" : ""}`,
262
+ onClick: () => y(a),
263
+ children: a.charAt(0).toUpperCase() + a.slice(1)
264
264
  },
265
- n
265
+ a
266
266
  )) }),
267
- /* @__PURE__ */ e("div", { className: "header__actions", children: /* @__PURE__ */ e(
267
+ /* @__PURE__ */ e("div", { className: "nice-video-studio__header-actions", children: /* @__PURE__ */ e(
268
268
  "button",
269
269
  {
270
- className: "action-button action-button--primary",
271
- onClick: Z,
272
- disabled: _ !== null,
273
- children: _ !== null ? `Exporting ${Math.round(_)}%` : "Export"
270
+ className: "nice-video-studio__action-button nice-video-studio__action-button--primary",
271
+ onClick: Q,
272
+ disabled: T !== null,
273
+ children: T !== null ? `Exporting ${Math.round(T)}%` : "Export"
274
274
  }
275
275
  ) })
276
- ] }), ne = k && D !== "export" ? (() => {
277
- const n = H();
278
- if (!n)
276
+ ] }), re = k && A !== "export" ? (() => {
277
+ const a = j();
278
+ if (!a)
279
279
  return null;
280
- const { track: o, item: i } = n;
281
- return /* @__PURE__ */ t("div", { className: "item-inspector", children: [
282
- /* @__PURE__ */ e("h4", { children: "Item Properties" }),
283
- /* @__PURE__ */ t("div", { className: "inspector-section", children: [
280
+ const { track: o, item: n } = a;
281
+ return /* @__PURE__ */ t("div", { className: "nice-video-studio__item-inspector", children: [
282
+ /* @__PURE__ */ e("h4", { children: b("videoEditor.itemProperties", "Item Properties") }),
283
+ /* @__PURE__ */ t("div", { className: "nice-video-studio__inspector-section", children: [
284
284
  /* @__PURE__ */ t("label", { children: [
285
- "Start Time",
285
+ b("videoEditor.startTime", "Start Time"),
286
286
  /* @__PURE__ */ e(
287
287
  "input",
288
288
  {
289
289
  type: "number",
290
290
  step: "0.1",
291
- value: i.startTime,
292
- onChange: (c) => {
293
- const m = parseFloat(c.target.value);
294
- g({
295
- tracks: d.tracks.map(
296
- (p) => p.id === o.id ? {
297
- ...p,
298
- items: p.items.map(
299
- (v) => v.id === i.id ? { ...v, startTime: m } : v
291
+ value: n.startTime,
292
+ onChange: (d) => {
293
+ const u = parseFloat(d.target.value);
294
+ f({
295
+ tracks: r.tracks.map(
296
+ (h) => h.id === o.id ? {
297
+ ...h,
298
+ items: h.items.map(
299
+ (p) => p.id === n.id ? { ...p, startTime: u } : p
300
300
  )
301
- } : p
301
+ } : h
302
302
  )
303
303
  });
304
304
  }
@@ -306,23 +306,23 @@ const ve = {
306
306
  )
307
307
  ] }),
308
308
  /* @__PURE__ */ t("label", { children: [
309
- "Duration",
309
+ b("videoEditor.duration", "Duration"),
310
310
  /* @__PURE__ */ e(
311
311
  "input",
312
312
  {
313
313
  type: "number",
314
314
  step: "0.1",
315
- value: i.duration,
316
- onChange: (c) => {
317
- const m = parseFloat(c.target.value);
318
- g({
319
- tracks: d.tracks.map(
320
- (p) => p.id === o.id ? {
321
- ...p,
322
- items: p.items.map(
323
- (v) => v.id === i.id ? { ...v, duration: m } : v
315
+ value: n.duration,
316
+ onChange: (d) => {
317
+ const u = parseFloat(d.target.value);
318
+ f({
319
+ tracks: r.tracks.map(
320
+ (h) => h.id === o.id ? {
321
+ ...h,
322
+ items: h.items.map(
323
+ (p) => p.id === n.id ? { ...p, duration: u } : p
324
324
  )
325
- } : p
325
+ } : h
326
326
  )
327
327
  });
328
328
  }
@@ -330,7 +330,7 @@ const ve = {
330
330
  )
331
331
  ] }),
332
332
  /* @__PURE__ */ t("label", { children: [
333
- "Opacity",
333
+ b("videoEditor.opacity", "Opacity"),
334
334
  /* @__PURE__ */ e(
335
335
  "input",
336
336
  {
@@ -338,20 +338,20 @@ const ve = {
338
338
  min: "0",
339
339
  max: "1",
340
340
  step: "0.1",
341
- value: i.properties.opacity ?? 1,
342
- onChange: (c) => {
343
- const m = parseFloat(c.target.value);
344
- g({
345
- tracks: d.tracks.map(
346
- (p) => p.id === o.id ? {
347
- ...p,
348
- items: p.items.map(
349
- (v) => v.id === i.id ? {
350
- ...v,
351
- properties: { ...v.properties, opacity: m }
352
- } : v
341
+ value: n.properties.opacity ?? 1,
342
+ onChange: (d) => {
343
+ const u = parseFloat(d.target.value);
344
+ f({
345
+ tracks: r.tracks.map(
346
+ (h) => h.id === o.id ? {
347
+ ...h,
348
+ items: h.items.map(
349
+ (p) => p.id === n.id ? {
350
+ ...p,
351
+ properties: { ...p.properties, opacity: u }
352
+ } : p
353
353
  )
354
- } : p
354
+ } : h
355
355
  )
356
356
  });
357
357
  }
@@ -361,196 +361,217 @@ const ve = {
361
361
  ] }),
362
362
  /* @__PURE__ */ t("h4", { children: [
363
363
  "Effects (",
364
- i.effects.length,
364
+ n.effects.length,
365
365
  ")"
366
366
  ] }),
367
- /* @__PURE__ */ e("div", { className: "effects-list", children: i.effects.map((c) => /* @__PURE__ */ e("div", { className: "effect-badge", children: c.name }, c.id)) })
367
+ /* @__PURE__ */ e("div", { className: "nice-video-studio__effects-list", children: n.effects.map((d) => /* @__PURE__ */ e("div", { className: "nice-video-studio__effect-badge", children: d.name }, d.id)) })
368
368
  ] });
369
- })() : null, a = B ? /* @__PURE__ */ t("aside", { className: "video-editor__asset-library", children: [
370
- /* @__PURE__ */ t("div", { className: "asset-library__header", children: [
371
- /* @__PURE__ */ e("h3", { children: "Assets" }),
369
+ })() : null, i = W ? /* @__PURE__ */ t("aside", { className: "nice-video-studio__asset-library", children: [
370
+ /* @__PURE__ */ t("div", { className: "nice-video-studio__asset-library-header", children: [
371
+ /* @__PURE__ */ e("h3", { children: b("videoEditor.assets", "Assets") }),
372
372
  /* @__PURE__ */ e(
373
373
  "button",
374
374
  {
375
- "aria-label": "Close",
376
- className: "close-button",
375
+ "aria-label": b("videoEditor.close", "Close"),
376
+ className: "nice-video-studio__close-button",
377
377
  onClick: () => z(!1),
378
- children: /* @__PURE__ */ e(u, { name: "close", size: 16 })
378
+ children: /* @__PURE__ */ e(m, { name: "close", size: 16 })
379
379
  }
380
380
  )
381
381
  ] }),
382
- /* @__PURE__ */ e("div", { className: "asset-library__upload", children: /* @__PURE__ */ t("label", { className: "upload-zone", children: [
382
+ /* @__PURE__ */ e("div", { className: "nice-video-studio__asset-library-upload", children: /* @__PURE__ */ t("label", { className: "nice-video-studio__upload-zone", children: [
383
383
  /* @__PURE__ */ e(
384
384
  "input",
385
385
  {
386
386
  type: "file",
387
387
  multiple: !0,
388
388
  accept: "video/*,audio/*,image/*",
389
- onChange: (n) => n.target.files && f(n.target.files),
389
+ onChange: (a) => a.target.files && _(a.target.files),
390
390
  hidden: !0
391
391
  }
392
392
  ),
393
- /* @__PURE__ */ e("span", { className: "upload-icon", children: "+" }),
394
- /* @__PURE__ */ e("span", { children: "Drop files or click to upload" })
393
+ /* @__PURE__ */ e("span", { className: "nice-video-studio__upload-icon", children: "+" }),
394
+ /* @__PURE__ */ e("span", { children: b("videoEditor.dropFilesOrClickTo", "Drop files or click to upload") })
395
395
  ] }) }),
396
- /* @__PURE__ */ e("div", { className: "asset-library__list", children: d.assets.map((n) => /* @__PURE__ */ t(
396
+ /* @__PURE__ */ e("div", { className: "nice-video-studio__asset-library-list", children: r.assets.map((a) => /* @__PURE__ */ t(
397
397
  "div",
398
398
  {
399
- className: "asset-item",
399
+ className: "nice-video-studio__asset-item",
400
400
  draggable: !0,
401
- onDragStart: (o) => o.dataTransfer.setData("assetId", n.id),
401
+ onDragStart: (o) => o.dataTransfer.setData("assetId", a.id),
402
402
  children: [
403
- /* @__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: /* @__PURE__ */ e(
404
- u,
403
+ /* @__PURE__ */ e("div", { className: "nice-video-studio__asset-thumbnail", children: a.thumbnail ? /* @__PURE__ */ e("img", { src: a.thumbnail, alt: a.name }) : /* @__PURE__ */ e("span", { className: "nice-video-studio__asset-type-icon", children: /* @__PURE__ */ e(
404
+ m,
405
405
  {
406
- name: n.type === "video" ? "video" : n.type === "audio" ? "music" : "image",
406
+ name: a.type === "video" ? "video" : a.type === "audio" ? "music" : "image",
407
407
  size: 24
408
408
  }
409
409
  ) }) }),
410
- /* @__PURE__ */ t("div", { className: "asset-info", children: [
411
- /* @__PURE__ */ e("span", { className: "asset-name", children: n.name }),
412
- /* @__PURE__ */ t("span", { className: "asset-meta", children: [
413
- (n.size / 1024 / 1024).toFixed(1),
410
+ /* @__PURE__ */ t("div", { className: "nice-video-studio__asset-info", children: [
411
+ /* @__PURE__ */ e("span", { className: "nice-video-studio__asset-name", children: a.name }),
412
+ /* @__PURE__ */ t("span", { className: "nice-video-studio__asset-meta", children: [
413
+ (a.size / 1024 / 1024).toFixed(1),
414
414
  "MB"
415
415
  ] })
416
416
  ] })
417
417
  ]
418
418
  },
419
- n.id
419
+ a.id
420
420
  )) })
421
- ] }) : void 0, r = /* @__PURE__ */ e("div", { className: "video-editor__preview-area", children: /* @__PURE__ */ t("div", { className: "preview-container", children: [
421
+ ] }) : void 0, c = /* @__PURE__ */ e("div", { className: "nice-video-studio__preview-area", children: /* @__PURE__ */ t("div", { className: "nice-video-studio__preview-container", children: [
422
422
  /* @__PURE__ */ t(
423
423
  "div",
424
424
  {
425
- className: "preview-canvas",
426
- style: { aspectRatio: `${d.resolution.width}/${d.resolution.height}` },
425
+ className: "nice-video-studio__preview-canvas",
426
+ style: { aspectRatio: `${r.resolution.width}/${r.resolution.height}` },
427
427
  children: [
428
- /* @__PURE__ */ e("video", { ref: ee, className: "preview-video" }),
429
- /* @__PURE__ */ e("div", { className: "preview-overlay", children: !B && /* @__PURE__ */ e(
428
+ /* @__PURE__ */ e("video", { ref: te, className: "nice-video-studio__preview-video" }),
429
+ /* @__PURE__ */ e("div", { className: "nice-video-studio__preview-overlay", children: !W && /* @__PURE__ */ e(
430
430
  "button",
431
431
  {
432
- className: "toggle-library-button",
432
+ className: "nice-video-studio__toggle-library-button",
433
433
  onClick: () => z(!0),
434
- "aria-label": "Show asset library",
435
- children: /* @__PURE__ */ e(u, { name: "folder", size: 16 })
434
+ "aria-label": b("videoEditor.showAssetLibrary", "Show asset library"),
435
+ children: /* @__PURE__ */ e(m, { name: "folder", size: 16 })
436
436
  }
437
437
  ) })
438
438
  ]
439
439
  }
440
440
  ),
441
- /* @__PURE__ */ t("div", { className: "playback-controls", children: [
442
- /* @__PURE__ */ e("button", { onClick: () => Y(0), "aria-label": "Go to start", children: /* @__PURE__ */ e(u, { name: "skip-back", size: 16 }) }),
441
+ /* @__PURE__ */ t("div", { className: "nice-video-studio__playback-controls", children: [
442
+ /* @__PURE__ */ e(
443
+ "button",
444
+ {
445
+ onClick: () => J(0),
446
+ "aria-label": b("videoEditor.goToStart", "Go to start"),
447
+ children: /* @__PURE__ */ e(m, { name: "skip-back", size: 16 })
448
+ }
449
+ ),
443
450
  /* @__PURE__ */ e(
444
451
  "button",
445
452
  {
446
- onClick: () => Y(R - 1 / d.frameRate),
447
- "aria-label": "Previous frame",
448
- children: /* @__PURE__ */ e(u, { name: "chevron-left", size: 16 })
453
+ onClick: () => J(D - 1 / r.frameRate),
454
+ "aria-label": b("videoEditor.previousFrame", "Previous frame"),
455
+ children: /* @__PURE__ */ e(m, { name: "chevron-left", size: 16 })
449
456
  }
450
457
  ),
451
458
  /* @__PURE__ */ e(
452
459
  "button",
453
460
  {
454
- onClick: te,
455
- className: "play-button",
456
- "aria-label": V ? "Pause" : "Play",
457
- children: /* @__PURE__ */ e(u, { name: V ? "pause" : "play", size: 18 })
461
+ onClick: ae,
462
+ className: "nice-video-studio__play-button",
463
+ "aria-label": B ? "Pause" : "Play",
464
+ children: /* @__PURE__ */ e(m, { name: B ? "pause" : "play", size: 18 })
458
465
  }
459
466
  ),
460
467
  /* @__PURE__ */ e(
461
468
  "button",
462
469
  {
463
- onClick: () => Y(R + 1 / d.frameRate),
464
- "aria-label": "Next frame",
465
- children: /* @__PURE__ */ e(u, { name: "chevron-right", size: 16 })
470
+ onClick: () => J(D + 1 / r.frameRate),
471
+ "aria-label": b("videoEditor.nextFrame", "Next frame"),
472
+ children: /* @__PURE__ */ e(m, { name: "chevron-right", size: 16 })
466
473
  }
467
474
  ),
468
- /* @__PURE__ */ e("span", { className: "time-display", children: Q(R) })
475
+ /* @__PURE__ */ e("span", { className: "nice-video-studio__time-display", children: ee(D) })
469
476
  ] })
470
- ] }) }), l = /* @__PURE__ */ t("div", { className: "video-editor__panel", children: [
471
- D === "timeline" && /* @__PURE__ */ t("div", { className: "timeline-panel", children: [
472
- /* @__PURE__ */ t("div", { className: "timeline-toolbar", children: [
473
- /* @__PURE__ */ t("div", { className: "track-buttons", children: [
474
- /* @__PURE__ */ e("button", { onClick: () => F("video"), children: "+ Video Track" }),
475
- /* @__PURE__ */ e("button", { onClick: () => F("audio"), children: "+ Audio Track" }),
476
- /* @__PURE__ */ e("button", { onClick: () => F("text"), children: "+ Text Track" })
477
+ ] }) }), l = /* @__PURE__ */ t("div", { className: "nice-video-studio__panel", children: [
478
+ A === "timeline" && /* @__PURE__ */ t("div", { className: "nice-video-studio__timeline-panel", children: [
479
+ /* @__PURE__ */ t("div", { className: "nice-video-studio__timeline-toolbar", children: [
480
+ /* @__PURE__ */ t("div", { className: "nice-video-studio__track-buttons", children: [
481
+ /* @__PURE__ */ e("button", { onClick: () => V("video"), children: "+ Video Track" }),
482
+ /* @__PURE__ */ e("button", { onClick: () => V("audio"), children: "+ Audio Track" }),
483
+ /* @__PURE__ */ e("button", { onClick: () => V("text"), children: "+ Text Track" })
477
484
  ] }),
478
- /* @__PURE__ */ t("div", { className: "zoom-controls", children: [
479
- /* @__PURE__ */ e("button", { onClick: () => q(Math.max(0.25, C - 0.25)), children: "-" }),
485
+ /* @__PURE__ */ t("div", { className: "nice-video-studio__zoom-controls", children: [
486
+ /* @__PURE__ */ e("button", { onClick: () => G(Math.max(0.25, C - 0.25)), children: "-" }),
480
487
  /* @__PURE__ */ t("span", { children: [
481
488
  Math.round(C * 100),
482
489
  "%"
483
490
  ] }),
484
- /* @__PURE__ */ e("button", { onClick: () => q(Math.min(4, C + 0.25)), children: "+" })
491
+ /* @__PURE__ */ e("button", { onClick: () => G(Math.min(4, C + 0.25)), children: "+" })
485
492
  ] })
486
493
  ] }),
487
- /* @__PURE__ */ t("div", { className: "timeline-container", ref: X, children: [
488
- /* @__PURE__ */ e("div", { className: "timeline-ruler", children: Array.from({ length: Math.ceil(30 / C) }).map((n, o) => /* @__PURE__ */ e("div", { className: "ruler-mark", style: { left: `${o * 50 * C}px` }, children: Q(o) }, o)) }),
489
- /* @__PURE__ */ e("div", { className: "timeline-playhead", style: { left: `${R * 50 * C}px` } }),
490
- /* @__PURE__ */ e("div", { className: "timeline-tracks", children: d.tracks.map((n) => /* @__PURE__ */ t(
494
+ /* @__PURE__ */ t("div", { className: "nice-video-studio__timeline-container", ref: ie, children: [
495
+ /* @__PURE__ */ e("div", { className: "nice-video-studio__timeline-ruler", children: Array.from({ length: Math.ceil(30 / C) }).map((a, o) => /* @__PURE__ */ e(
496
+ "div",
497
+ {
498
+ className: "nice-video-studio__ruler-mark",
499
+ style: { left: `${o * 50 * C}px` },
500
+ children: ee(o)
501
+ },
502
+ o
503
+ )) }),
504
+ /* @__PURE__ */ e(
505
+ "div",
506
+ {
507
+ className: "nice-video-studio__timeline-playhead",
508
+ style: { left: `${D * 50 * C}px` }
509
+ }
510
+ ),
511
+ /* @__PURE__ */ e("div", { className: "nice-video-studio__timeline-tracks", children: r.tracks.map((a) => /* @__PURE__ */ t(
491
512
  "div",
492
513
  {
493
- className: `timeline-track ${W === n.id ? "timeline-track--selected" : ""} ${n.locked ? "timeline-track--locked" : ""}`,
494
- onClick: () => h(n.id),
514
+ className: `nice-video-studio__timeline-track ${H === a.id ? "nice-video-studio__timeline-track--selected" : ""} ${a.locked ? "nice-video-studio__timeline-track--locked" : ""}`,
515
+ onClick: () => v(a.id),
495
516
  onDrop: (o) => {
496
517
  o.preventDefault();
497
- const i = o.dataTransfer.getData("assetId"), c = d.assets.find((m) => m.id === i);
498
- c && x(n.id, c);
518
+ const n = o.dataTransfer.getData("assetId"), d = r.assets.find((u) => u.id === n);
519
+ d && S(a.id, d);
499
520
  },
500
521
  onDragOver: (o) => o.preventDefault(),
501
522
  children: [
502
- /* @__PURE__ */ t("div", { className: "track-header", children: [
503
- /* @__PURE__ */ e("span", { className: "track-name", children: n.name }),
504
- /* @__PURE__ */ t("div", { className: "track-controls", children: [
523
+ /* @__PURE__ */ t("div", { className: "nice-video-studio__track-header", children: [
524
+ /* @__PURE__ */ e("span", { className: "nice-video-studio__track-name", children: a.name }),
525
+ /* @__PURE__ */ t("div", { className: "nice-video-studio__track-controls", children: [
505
526
  /* @__PURE__ */ e(
506
527
  "button",
507
528
  {
508
- className: n.muted ? "active" : "",
529
+ className: `nice-video-studio__track-toggle ${a.muted ? "nice-video-studio__track-toggle--active" : ""}`,
509
530
  onClick: (o) => {
510
- o.stopPropagation(), K(n.id);
531
+ o.stopPropagation(), q(a.id);
511
532
  },
512
- children: /* @__PURE__ */ e(u, { name: n.muted ? "volume-off" : "volume", size: 14 })
533
+ children: /* @__PURE__ */ e(m, { name: a.muted ? "volume-off" : "volume", size: 14 })
513
534
  }
514
535
  ),
515
536
  /* @__PURE__ */ e(
516
537
  "button",
517
538
  {
518
- className: n.locked ? "active" : "",
539
+ className: `nice-video-studio__track-toggle ${a.locked ? "nice-video-studio__track-toggle--active" : ""}`,
519
540
  onClick: (o) => {
520
- o.stopPropagation(), J(n.id);
541
+ o.stopPropagation(), X(a.id);
521
542
  },
522
- children: /* @__PURE__ */ e(u, { name: n.locked ? "lock" : "unlock", size: 14 })
543
+ children: /* @__PURE__ */ e(m, { name: a.locked ? "lock" : "unlock", size: 14 })
523
544
  }
524
545
  ),
525
546
  /* @__PURE__ */ e(
526
547
  "button",
527
548
  {
528
549
  onClick: (o) => {
529
- o.stopPropagation(), j(n.id);
550
+ o.stopPropagation(), Y(a.id);
530
551
  },
531
- "aria-label": "Remove track",
532
- children: /* @__PURE__ */ e(u, { name: "trash", size: 14 })
552
+ "aria-label": b("videoEditor.removeTrack", "Remove track"),
553
+ children: /* @__PURE__ */ e(m, { name: "trash", size: 14 })
533
554
  }
534
555
  )
535
556
  ] })
536
557
  ] }),
537
- /* @__PURE__ */ e("div", { className: "track-items", children: n.items.map((o) => {
538
- const i = d.assets.find((c) => c.id === o.assetId);
558
+ /* @__PURE__ */ e("div", { className: "nice-video-studio__track-items", children: a.items.map((o) => {
559
+ const n = r.assets.find((d) => d.id === o.assetId);
539
560
  return /* @__PURE__ */ t(
540
561
  "div",
541
562
  {
542
- className: `track-item track-item--${o.type} ${k === o.id ? "track-item--selected" : ""}`,
563
+ className: `nice-video-studio__track-item nice-video-studio__track-item--${o.type} ${k === o.id ? "nice-video-studio__track-item--selected" : ""}`,
543
564
  style: {
544
565
  left: `${o.startTime * 50 * C}px`,
545
566
  width: `${o.duration * 50 * C}px`
546
567
  },
547
- onClick: (c) => {
548
- c.stopPropagation(), N(o.id);
568
+ onClick: (d) => {
569
+ d.stopPropagation(), N(o.id);
549
570
  },
550
571
  children: [
551
- /* @__PURE__ */ e("span", { className: "item-name", children: (i == null ? void 0 : i.name) || "Untitled" }),
552
- o.transitions.length > 0 && /* @__PURE__ */ e("span", { className: "item-transitions", children: /* @__PURE__ */ e(u, { name: "wand", size: 12 }) }),
553
- o.effects.length > 0 && /* @__PURE__ */ e("span", { className: "item-effects", children: /* @__PURE__ */ e(u, { name: "palette", size: 12 }) })
572
+ /* @__PURE__ */ e("span", { className: "nice-video-studio__item-name", children: (n == null ? void 0 : n.name) || "Untitled" }),
573
+ o.transitions.length > 0 && /* @__PURE__ */ e("span", { className: "nice-video-studio__item-transitions", children: /* @__PURE__ */ e(m, { name: "wand", size: 12 }) }),
574
+ o.effects.length > 0 && /* @__PURE__ */ e("span", { className: "nice-video-studio__item-effects", children: /* @__PURE__ */ e(m, { name: "palette", size: 12 }) })
554
575
  ]
555
576
  },
556
577
  o.id
@@ -558,43 +579,43 @@ const ve = {
558
579
  }) })
559
580
  ]
560
581
  },
561
- n.id
582
+ a.id
562
583
  )) })
563
584
  ] })
564
585
  ] }),
565
- D === "effects" && /* @__PURE__ */ t("div", { className: "effects-panel", children: [
566
- /* @__PURE__ */ e("h3", { children: "Video Effects" }),
567
- /* @__PURE__ */ e("p", { className: "panel-hint", children: "Select a clip to apply effects" }),
568
- /* @__PURE__ */ e("div", { className: "effects-grid", children: fe.map((n) => /* @__PURE__ */ t(
586
+ A === "effects" && /* @__PURE__ */ t("div", { className: "nice-video-studio__effects-panel", children: [
587
+ /* @__PURE__ */ e("h3", { children: b("videoEditor.videoEffects", "Video Effects") }),
588
+ /* @__PURE__ */ e("p", { className: "nice-video-studio__panel-hint", children: b("videoEditor.selectAClipToApply", "Select a clip to apply effects") }),
589
+ /* @__PURE__ */ e("div", { className: "nice-video-studio__effects-grid", children: be.map((a) => /* @__PURE__ */ t(
569
590
  "button",
570
591
  {
571
- className: "effect-preset",
592
+ className: "nice-video-studio__effect-preset",
572
593
  disabled: !k,
573
594
  onClick: () => {
574
- const o = H();
575
- o && G(o.track.id, o.item.id, n.type);
595
+ const o = j();
596
+ o && Z(o.track.id, o.item.id, a.type);
576
597
  },
577
598
  children: [
578
- /* @__PURE__ */ e("span", { className: "effect-icon", children: /* @__PURE__ */ e(u, { name: n.icon, size: 16 }) }),
579
- /* @__PURE__ */ e("span", { className: "effect-name", children: n.name })
599
+ /* @__PURE__ */ e("span", { className: "nice-video-studio__effect-icon", children: /* @__PURE__ */ e(m, { name: a.icon, size: 16 }) }),
600
+ /* @__PURE__ */ e("span", { className: "nice-video-studio__effect-name", children: a.name })
580
601
  ]
581
602
  },
582
- n.type
603
+ a.type
583
604
  )) })
584
605
  ] }),
585
- D === "transitions" && /* @__PURE__ */ t("div", { className: "transitions-panel", children: [
586
- /* @__PURE__ */ e("h3", { children: "Transitions" }),
587
- /* @__PURE__ */ e("p", { className: "panel-hint", children: "Select a clip and add transitions between clips" }),
588
- /* @__PURE__ */ e("div", { className: "transitions-grid", children: be.map((n) => /* @__PURE__ */ t("div", { className: "transition-preset", children: [
589
- /* @__PURE__ */ e("span", { className: "transition-name", children: n.name }),
590
- /* @__PURE__ */ t("div", { className: "transition-buttons", children: [
606
+ A === "transitions" && /* @__PURE__ */ t("div", { className: "nice-video-studio__transitions-panel", children: [
607
+ /* @__PURE__ */ e("h3", { children: b("videoEditor.transitions", "Transitions") }),
608
+ /* @__PURE__ */ e("p", { className: "nice-video-studio__panel-hint", children: b("videoEditor.selectAClipAndAdd", "Select a clip and add transitions between clips") }),
609
+ /* @__PURE__ */ e("div", { className: "nice-video-studio__transitions-grid", children: ye.map((a) => /* @__PURE__ */ t("div", { className: "nice-video-studio__transition-preset", children: [
610
+ /* @__PURE__ */ e("span", { className: "nice-video-studio__transition-name", children: a.name }),
611
+ /* @__PURE__ */ t("div", { className: "nice-video-studio__transition-buttons", children: [
591
612
  /* @__PURE__ */ e(
592
613
  "button",
593
614
  {
594
615
  disabled: !k,
595
616
  onClick: () => {
596
- const o = H();
597
- o && U(o.track.id, o.item.id, n.type, "start");
617
+ const o = j();
618
+ o && P(o.track.id, o.item.id, a.type, "start");
598
619
  },
599
620
  children: "In"
600
621
  }
@@ -604,27 +625,27 @@ const ve = {
604
625
  {
605
626
  disabled: !k,
606
627
  onClick: () => {
607
- const o = H();
608
- o && U(o.track.id, o.item.id, n.type, "end");
628
+ const o = j();
629
+ o && P(o.track.id, o.item.id, a.type, "end");
609
630
  },
610
631
  children: "Out"
611
632
  }
612
633
  )
613
634
  ] })
614
- ] }, n.type)) })
635
+ ] }, a.type)) })
615
636
  ] }),
616
- D === "export" && /* @__PURE__ */ t("div", { className: "export-panel", children: [
617
- /* @__PURE__ */ e("h3", { children: "Export Settings" }),
618
- /* @__PURE__ */ t("div", { className: "export-settings", children: [
619
- /* @__PURE__ */ t("div", { className: "setting-group", children: [
620
- /* @__PURE__ */ e("label", { children: "Resolution" }),
637
+ A === "export" && /* @__PURE__ */ t("div", { className: "nice-video-studio__export-panel", children: [
638
+ /* @__PURE__ */ e("h3", { children: b("videoEditor.exportSettings", "Export Settings") }),
639
+ /* @__PURE__ */ t("div", { className: "nice-video-studio__export-settings", children: [
640
+ /* @__PURE__ */ t("div", { className: "nice-video-studio__setting-group", children: [
641
+ /* @__PURE__ */ e("label", { children: b("videoEditor.resolution", "Resolution") }),
621
642
  /* @__PURE__ */ t(
622
643
  "select",
623
644
  {
624
- value: `${d.resolution.width}x${d.resolution.height}`,
625
- onChange: (n) => {
626
- const [o, i] = n.target.value.split("x").map(Number);
627
- g({ resolution: { width: o, height: i } });
645
+ value: `${r.resolution.width}x${r.resolution.height}`,
646
+ onChange: (a) => {
647
+ const [o, n] = a.target.value.split("x").map(Number);
648
+ f({ resolution: { width: o, height: n } });
628
649
  },
629
650
  children: [
630
651
  /* @__PURE__ */ e("option", { value: "1920x1080", children: "1080p (1920x1080)" }),
@@ -635,13 +656,13 @@ const ve = {
635
656
  }
636
657
  )
637
658
  ] }),
638
- /* @__PURE__ */ t("div", { className: "setting-group", children: [
639
- /* @__PURE__ */ e("label", { children: "Frame Rate" }),
659
+ /* @__PURE__ */ t("div", { className: "nice-video-studio__setting-group", children: [
660
+ /* @__PURE__ */ e("label", { children: b("videoEditor.frameRate", "Frame Rate") }),
640
661
  /* @__PURE__ */ t(
641
662
  "select",
642
663
  {
643
- value: d.frameRate,
644
- onChange: (n) => g({ frameRate: parseInt(n.target.value) }),
664
+ value: r.frameRate,
665
+ onChange: (a) => f({ frameRate: parseInt(a.target.value) }),
645
666
  children: [
646
667
  /* @__PURE__ */ e("option", { value: "24", children: "24 fps" }),
647
668
  /* @__PURE__ */ e("option", { value: "30", children: "30 fps" }),
@@ -651,18 +672,18 @@ const ve = {
651
672
  }
652
673
  )
653
674
  ] }),
654
- /* @__PURE__ */ t("div", { className: "setting-group", children: [
655
- /* @__PURE__ */ e("label", { children: "Video Codec" }),
675
+ /* @__PURE__ */ t("div", { className: "nice-video-studio__setting-group", children: [
676
+ /* @__PURE__ */ e("label", { children: b("videoEditor.videoCodec", "Video Codec") }),
656
677
  /* @__PURE__ */ t(
657
678
  "select",
658
679
  {
659
- value: d.settings.video.codec,
660
- onChange: (n) => g({
680
+ value: r.settings.video.codec,
681
+ onChange: (a) => f({
661
682
  settings: {
662
- ...d.settings,
683
+ ...r.settings,
663
684
  video: {
664
- ...d.settings.video,
665
- codec: n.target.value
685
+ ...r.settings.video,
686
+ codec: a.target.value
666
687
  }
667
688
  }
668
689
  }),
@@ -675,19 +696,19 @@ const ve = {
675
696
  }
676
697
  )
677
698
  ] }),
678
- /* @__PURE__ */ t("div", { className: "setting-group", children: [
699
+ /* @__PURE__ */ t("div", { className: "nice-video-studio__setting-group", children: [
679
700
  /* @__PURE__ */ e("label", { children: "Video Bitrate (Mbps)" }),
680
701
  /* @__PURE__ */ e(
681
702
  "input",
682
703
  {
683
704
  type: "number",
684
- value: d.settings.video.bitrate / 1e3,
685
- onChange: (n) => g({
705
+ value: r.settings.video.bitrate / 1e3,
706
+ onChange: (a) => f({
686
707
  settings: {
687
- ...d.settings,
708
+ ...r.settings,
688
709
  video: {
689
- ...d.settings.video,
690
- bitrate: parseFloat(n.target.value) * 1e3
710
+ ...r.settings.video,
711
+ bitrate: parseFloat(a.target.value) * 1e3
691
712
  }
692
713
  }
693
714
  }),
@@ -700,33 +721,39 @@ const ve = {
700
721
  /* @__PURE__ */ e(
701
722
  "button",
702
723
  {
703
- className: "export-button",
704
- onClick: Z,
705
- disabled: _ !== null,
706
- children: _ !== null ? `Exporting... ${Math.round(_)}%` : "Export Video"
724
+ className: "nice-video-studio__export-button",
725
+ onClick: Q,
726
+ disabled: T !== null,
727
+ children: T !== null ? `Exporting... ${Math.round(T)}%` : "Export Video"
707
728
  }
708
729
  ),
709
- _ !== null && /* @__PURE__ */ e("div", { className: "export-progress", children: /* @__PURE__ */ e("div", { className: "export-progress-bar", style: { width: `${_}%` } }) })
730
+ T !== null && /* @__PURE__ */ e("div", { className: "nice-video-studio__export-progress", children: /* @__PURE__ */ e(
731
+ "div",
732
+ {
733
+ className: "nice-video-studio__export-progress-bar",
734
+ style: { width: `${T}%` }
735
+ }
736
+ ) })
710
737
  ] })
711
738
  ] });
712
739
  return /* @__PURE__ */ t(
713
- me,
740
+ pe,
714
741
  {
715
742
  flush: !0,
716
- className: `nice-video-editor ${L}`,
743
+ className: `nice-video-editor nice-video-studio ${O}`,
717
744
  height: "100%",
718
745
  style: { position: "relative", minHeight: 600 },
719
- toolbar: ie,
720
- sidebar: a,
721
- rightSidebar: ne ?? void 0,
746
+ toolbar: se,
747
+ sidebar: i,
748
+ rightSidebar: re ?? void 0,
722
749
  bottomPanel: l,
723
750
  children: [
724
- /* @__PURE__ */ e("span", { style: { position: "absolute", top: 6, right: 6, zIndex: 30 }, children: /* @__PURE__ */ e(he, { steps: pe(T, ge) }) }),
725
- r
751
+ /* @__PURE__ */ e("span", { style: { position: "absolute", top: 6, right: 6, zIndex: 30 }, children: /* @__PURE__ */ e(_e, { steps: ge(I, Ne) }) }),
752
+ c
726
753
  ]
727
754
  }
728
755
  );
729
- }, ye = {
756
+ }, ke = {
730
757
  video: {
731
758
  source: "screen",
732
759
  showCursor: !0,
@@ -743,43 +770,43 @@ const ve = {
743
770
  format: "webm",
744
771
  quality: "high"
745
772
  }
746
- }, Ie = ({
747
- options: $,
748
- onRecordingStart: I,
749
- onRecordingStop: A,
750
- onRecordingPause: E,
751
- onRecordingResume: L,
752
- onError: T,
753
- className: d = ""
773
+ }, Te = ({
774
+ options: E,
775
+ onRecordingStart: R,
776
+ onRecordingStop: F,
777
+ onRecordingPause: L,
778
+ onRecordingResume: O,
779
+ onError: I,
780
+ className: b = ""
754
781
  }) => {
755
- var n, o;
756
- const [s, D] = b({
757
- ...ye,
758
- ...$
759
- }), [y, W] = b(null), [h, k] = b("idle"), [N, R] = b([]), [w, V] = b(null), [O, C] = b(null), [q, B] = b(!1), [z, _] = b(!1), [P, X] = b(
782
+ var a, o;
783
+ const { t: r } = me(), [s, A] = g({
784
+ ...ke,
785
+ ...E
786
+ }), [y, H] = g(null), [v, k] = g("idle"), [N, D] = g([]), [w, B] = g(null), [K, C] = g(null), [G, W] = g(!1), [z, T] = g(!1), [U, ie] = g(
760
787
  "pen"
761
- ), [ee, S] = b("var(--nice-danger, #ff0000)"), g = M(null), f = M([]), F = M(null), j = M(null), K = M(null), J = M(0);
762
- oe(() => () => {
763
- w && w.getTracks().forEach((i) => i.stop()), K.current && clearInterval(K.current);
788
+ ), [te, x] = g("var(--nice-danger, #ff0000)"), f = M(null), _ = M([]), V = M(null), Y = M(null), q = M(null), X = M(0);
789
+ le(() => () => {
790
+ w && w.getTracks().forEach((n) => n.stop()), q.current && clearInterval(q.current);
764
791
  }, [w]);
765
- const x = (i) => {
766
- D((c) => ({
767
- ...c,
768
- ...i,
769
- video: { ...c.video, ...i.video },
770
- audio: { ...c.audio, ...i.audio },
771
- output: { ...c.output, ...i.output }
792
+ const S = (n) => {
793
+ A((d) => ({
794
+ ...d,
795
+ ...n,
796
+ video: { ...d.video, ...n.video },
797
+ audio: { ...d.audio, ...n.audio },
798
+ output: { ...d.output, ...n.output }
772
799
  }));
773
- }, G = async () => {
800
+ }, Z = async () => {
774
801
  try {
775
802
  k("preparing");
776
- const i = {
803
+ const n = {
777
804
  video: {
778
805
  cursor: s.video.showCursor ? "always" : "never",
779
806
  frameRate: s.video.frameRate
780
807
  },
781
808
  audio: s.audio.source === "system" || s.audio.source === "both"
782
- }, c = await navigator.mediaDevices.getDisplayMedia(i);
809
+ }, d = await navigator.mediaDevices.getDisplayMedia(n);
783
810
  if (s.audio.enabled && (s.audio.source === "microphone" || s.audio.source === "both"))
784
811
  try {
785
812
  (await navigator.mediaDevices.getUserMedia({
@@ -787,35 +814,35 @@ const ve = {
787
814
  echoCancellation: s.audio.echoCancellation,
788
815
  noiseSuppression: s.audio.noiseSuppression
789
816
  }
790
- })).getAudioTracks().forEach((p) => c.addTrack(p));
791
- } catch (m) {
792
- console.warn("Could not access microphone:", m);
817
+ })).getAudioTracks().forEach((h) => d.addTrack(h));
818
+ } catch (u) {
819
+ console.warn("Could not access microphone:", u);
793
820
  }
794
- V(c), F.current && (F.current.srcObject = c, F.current.play()), k("idle");
795
- } catch (i) {
796
- k("error"), T == null || T(i instanceof Error ? i : new Error("Failed to start preview"));
821
+ B(d), V.current && (V.current.srcObject = d, V.current.play()), k("idle");
822
+ } catch (n) {
823
+ k("error"), I == null || I(n instanceof Error ? n : new Error("Failed to start preview"));
797
824
  }
798
- }, U = async () => {
799
- w || await G();
800
- for (let i = 3; i > 0; i--)
801
- C(i), await new Promise((c) => setTimeout(c, 1e3));
825
+ }, P = async () => {
826
+ w || await Z();
827
+ for (let n = 3; n > 0; n--)
828
+ C(n), await new Promise((d) => setTimeout(d, 1e3));
802
829
  C(null);
803
830
  try {
804
- const i = w || await ae();
805
- if (!i)
831
+ const n = w || await ne();
832
+ if (!n)
806
833
  throw new Error("No stream available");
807
- const c = ie(s.output.format), m = new MediaRecorder(i, {
808
- mimeType: c,
809
- videoBitsPerSecond: ne(s.output.quality)
834
+ const d = se(s.output.format), u = new MediaRecorder(n, {
835
+ mimeType: d,
836
+ videoBitsPerSecond: re(s.output.quality)
810
837
  });
811
- f.current = [], m.ondataavailable = (v) => {
812
- v.data.size > 0 && f.current.push(v.data);
813
- }, m.onstop = () => {
814
- const v = new Blob(f.current, { type: c });
815
- y && (A == null || A({ ...y, status: "stopped" }, v));
816
- }, g.current = m, m.start(1e3), J.current = Date.now();
817
- const p = {
818
- id: crypto.randomUUID(),
838
+ _.current = [], u.ondataavailable = (p) => {
839
+ p.data.size > 0 && _.current.push(p.data);
840
+ }, u.onstop = () => {
841
+ const p = new Blob(_.current, { type: d });
842
+ y && (F == null || F({ ...y, status: "stopped" }, p));
843
+ }, f.current = u, u.start(1e3), X.current = Date.now();
844
+ const h = {
845
+ id: $(),
819
846
  status: "recording",
820
847
  startTime: /* @__PURE__ */ new Date(),
821
848
  duration: 0,
@@ -823,41 +850,41 @@ const ve = {
823
850
  options: s,
824
851
  chunks: []
825
852
  };
826
- W(p), k("recording"), I == null || I(p), K.current = setInterval(() => {
827
- W(
828
- (v) => v ? {
829
- ...v,
830
- duration: (Date.now() - J.current) / 1e3,
831
- size: f.current.reduce((de, ue) => de + ue.size, 0)
853
+ H(h), k("recording"), R == null || R(h), q.current = setInterval(() => {
854
+ H(
855
+ (p) => p ? {
856
+ ...p,
857
+ duration: (Date.now() - X.current) / 1e3,
858
+ size: _.current.reduce((ve, he) => ve + he.size, 0)
832
859
  } : null
833
860
  );
834
861
  }, 100);
835
- } catch (i) {
836
- k("error"), T == null || T(i instanceof Error ? i : new Error("Failed to start recording"));
862
+ } catch (n) {
863
+ k("error"), I == null || I(n instanceof Error ? n : new Error("Failed to start recording"));
837
864
  }
838
- }, ae = async () => (await G(), w), te = () => {
839
- g.current && h === "recording" && (g.current.pause(), k("paused"), E == null || E());
840
- }, Y = () => {
841
- g.current && h === "paused" && (g.current.resume(), k("recording"), L == null || L());
842
- }, Z = () => {
843
- K.current && clearInterval(K.current), g.current && (h === "recording" || h === "paused") && (g.current.stop(), k("stopped")), w && (w.getTracks().forEach((i) => i.stop()), V(null));
844
- }, Q = ce(
845
- (i) => {
846
- if (h !== "recording")
865
+ }, ne = async () => (await Z(), w), ae = () => {
866
+ f.current && v === "recording" && (f.current.pause(), k("paused"), L == null || L());
867
+ }, J = () => {
868
+ f.current && v === "paused" && (f.current.resume(), k("recording"), O == null || O());
869
+ }, Q = () => {
870
+ q.current && clearInterval(q.current), f.current && (v === "recording" || v === "paused") && (f.current.stop(), k("stopped")), w && (w.getTracks().forEach((n) => n.stop()), B(null));
871
+ }, ee = ue(
872
+ (n) => {
873
+ if (v !== "recording")
847
874
  return;
848
- const c = {
849
- id: crypto.randomUUID(),
875
+ const d = {
876
+ id: $(),
850
877
  time: (y == null ? void 0 : y.duration) || 0,
851
- label: i || `Marker ${N.length + 1}`,
852
- color: a()
878
+ label: n || `Marker ${N.length + 1}`,
879
+ color: i()
853
880
  };
854
- R((m) => [...m, c]);
881
+ D((u) => [...u, d]);
855
882
  },
856
- [h, y == null ? void 0 : y.duration, N.length]
857
- ), H = (i) => {
858
- R((c) => c.filter((m) => m.id !== i));
859
- }, ie = (i) => {
860
- switch (i) {
883
+ [v, y == null ? void 0 : y.duration, N.length]
884
+ ), j = (n) => {
885
+ D((d) => d.filter((u) => u.id !== n));
886
+ }, se = (n) => {
887
+ switch (n) {
861
888
  case "mp4":
862
889
  return "video/mp4";
863
890
  case "mkv":
@@ -865,8 +892,8 @@ const ve = {
865
892
  default:
866
893
  return "video/webm;codecs=vp9";
867
894
  }
868
- }, ne = (i) => {
869
- switch (i) {
895
+ }, re = (n) => {
896
+ switch (n) {
870
897
  case "low":
871
898
  return 25e5;
872
899
  case "medium":
@@ -876,130 +903,174 @@ const ve = {
876
903
  default:
877
904
  return 8e6;
878
905
  }
879
- }, a = () => {
880
- const i = [
906
+ }, i = () => {
907
+ const n = [
881
908
  "var(--nice-danger, #ff4444)",
909
+ // audit-allow: literal-color +5 — annotation pens drawn into the recording
882
910
  "#44ff44",
883
911
  "#4444ff",
884
912
  "#ffff44",
885
913
  "#ff44ff",
886
914
  "#44ffff"
887
915
  ];
888
- return i[Math.floor(Math.random() * i.length)];
889
- }, r = (i) => {
890
- const c = Math.floor(i / 3600), m = Math.floor(i % 3600 / 60), p = Math.floor(i % 60), v = Math.floor(i % 1 * 100);
891
- return c > 0 ? `${c}:${m.toString().padStart(2, "0")}:${p.toString().padStart(2, "0")}` : `${m.toString().padStart(2, "0")}:${p.toString().padStart(2, "0")}.${v.toString().padStart(2, "0")}`;
892
- }, l = (i) => i < 1024 ? `${i} B` : i < 1024 * 1024 ? `${(i / 1024).toFixed(1)} KB` : `${(i / 1024 / 1024).toFixed(1)} MB`;
893
- return /* @__PURE__ */ t("div", { className: `nice-screen-recorder ${d}`, children: [
894
- /* @__PURE__ */ t("div", { className: "recorder__preview", children: [
895
- O !== null && /* @__PURE__ */ e("div", { className: "countdown-overlay", children: /* @__PURE__ */ e("span", { className: "countdown-number", children: O }) }),
896
- /* @__PURE__ */ e("video", { ref: F, className: "preview-video", muted: !0, playsInline: !0 }),
897
- z && /* @__PURE__ */ e("canvas", { ref: j, className: "annotation-canvas" }),
898
- !w && h === "idle" && /* @__PURE__ */ e("div", { className: "preview-placeholder", children: /* @__PURE__ */ t("button", { className: "start-preview-button", onClick: G, children: [
899
- /* @__PURE__ */ e("span", { className: "icon", children: /* @__PURE__ */ e(u, { name: "monitor", size: 18 }) }),
900
- /* @__PURE__ */ e("span", { children: "Select Screen to Record" })
916
+ return n[Math.floor(Math.random() * n.length)];
917
+ }, c = (n) => {
918
+ const d = Math.floor(n / 3600), u = Math.floor(n % 3600 / 60), h = Math.floor(n % 60), p = Math.floor(n % 1 * 100);
919
+ return d > 0 ? `${d}:${u.toString().padStart(2, "0")}:${h.toString().padStart(2, "0")}` : `${u.toString().padStart(2, "0")}:${h.toString().padStart(2, "0")}.${p.toString().padStart(2, "0")}`;
920
+ }, l = (n) => n < 1024 ? `${n} B` : n < 1024 * 1024 ? `${(n / 1024).toFixed(1)} KB` : `${(n / 1024 / 1024).toFixed(1)} MB`;
921
+ return /* @__PURE__ */ t("div", { className: `nice-screen-recorder ${b}`, children: [
922
+ /* @__PURE__ */ t("div", { className: "nice-screen-recorder__preview", children: [
923
+ K !== null && /* @__PURE__ */ e("div", { className: "nice-screen-recorder__countdown-overlay", children: /* @__PURE__ */ e("span", { className: "nice-screen-recorder__countdown-number", children: K }) }),
924
+ /* @__PURE__ */ e(
925
+ "video",
926
+ {
927
+ ref: V,
928
+ className: "nice-screen-recorder__preview-video",
929
+ muted: !0,
930
+ playsInline: !0
931
+ }
932
+ ),
933
+ z && /* @__PURE__ */ e("canvas", { ref: Y, className: "nice-screen-recorder__annotation-canvas" }),
934
+ !w && v === "idle" && /* @__PURE__ */ e("div", { className: "nice-screen-recorder__preview-placeholder", children: /* @__PURE__ */ t("button", { className: "nice-screen-recorder__start-preview-button", onClick: Z, children: [
935
+ /* @__PURE__ */ e("span", { className: "nice-screen-recorder__icon", children: /* @__PURE__ */ e(m, { name: "monitor", size: 18 }) }),
936
+ /* @__PURE__ */ e("span", { children: r("screenRecorder.selectScreenToRecord", "Select Screen to Record") })
901
937
  ] }) }),
902
- h === "recording" && /* @__PURE__ */ t("div", { className: "recording-indicator", children: [
903
- /* @__PURE__ */ e("span", { className: "recording-dot" }),
938
+ v === "recording" && /* @__PURE__ */ t("div", { className: "nice-screen-recorder__recording-indicator", children: [
939
+ /* @__PURE__ */ e("span", { className: "nice-screen-recorder__recording-dot" }),
904
940
  /* @__PURE__ */ e("span", { children: "REC" })
905
941
  ] })
906
942
  ] }),
907
- /* @__PURE__ */ t("div", { className: "recorder__controls", children: [
908
- /* @__PURE__ */ t("div", { className: "controls__main", children: [
909
- h === "idle" && /* @__PURE__ */ t(
943
+ /* @__PURE__ */ t("div", { className: "nice-screen-recorder__controls", children: [
944
+ /* @__PURE__ */ t("div", { className: "nice-screen-recorder__controls-main", children: [
945
+ v === "idle" && /* @__PURE__ */ t(
910
946
  "button",
911
947
  {
912
- className: "control-button control-button--record",
913
- onClick: U,
914
- disabled: !!O,
948
+ className: "nice-screen-recorder__control-button nice-screen-recorder__control-button--record",
949
+ onClick: P,
950
+ disabled: !!K,
915
951
  children: [
916
- /* @__PURE__ */ e("span", { className: "icon", children: /* @__PURE__ */ e(u, { name: "circle", size: 18 }) }),
917
- /* @__PURE__ */ e("span", { children: "Start Recording" })
952
+ /* @__PURE__ */ e("span", { className: "nice-screen-recorder__icon", children: /* @__PURE__ */ e(m, { name: "circle", size: 18 }) }),
953
+ /* @__PURE__ */ e("span", { children: r("screenRecorder.startRecording", "Start Recording") })
918
954
  ]
919
955
  }
920
956
  ),
921
- h === "recording" && /* @__PURE__ */ t(re, { children: [
922
- /* @__PURE__ */ t("button", { className: "control-button control-button--pause", onClick: te, children: [
923
- /* @__PURE__ */ e("span", { className: "icon", children: /* @__PURE__ */ e(u, { name: "pause", size: 18 }) }),
924
- /* @__PURE__ */ e("span", { children: "Pause" })
925
- ] }),
926
- /* @__PURE__ */ t("button", { className: "control-button control-button--stop", onClick: Z, children: [
927
- /* @__PURE__ */ e("span", { className: "icon", children: /* @__PURE__ */ e(u, { name: "stop", size: 18 }) }),
928
- /* @__PURE__ */ e("span", { children: "Stop" })
929
- ] })
957
+ v === "recording" && /* @__PURE__ */ t(oe, { children: [
958
+ /* @__PURE__ */ t(
959
+ "button",
960
+ {
961
+ className: "nice-screen-recorder__control-button nice-screen-recorder__control-button--pause",
962
+ onClick: ae,
963
+ children: [
964
+ /* @__PURE__ */ e("span", { className: "nice-screen-recorder__icon", children: /* @__PURE__ */ e(m, { name: "pause", size: 18 }) }),
965
+ /* @__PURE__ */ e("span", { children: r("screenRecorder.pause", "Pause") })
966
+ ]
967
+ }
968
+ ),
969
+ /* @__PURE__ */ t(
970
+ "button",
971
+ {
972
+ className: "nice-screen-recorder__control-button nice-screen-recorder__control-button--stop",
973
+ onClick: Q,
974
+ children: [
975
+ /* @__PURE__ */ e("span", { className: "nice-screen-recorder__icon", children: /* @__PURE__ */ e(m, { name: "stop", size: 18 }) }),
976
+ /* @__PURE__ */ e("span", { children: r("screenRecorder.stop", "Stop") })
977
+ ]
978
+ }
979
+ )
930
980
  ] }),
931
- h === "paused" && /* @__PURE__ */ t(re, { children: [
932
- /* @__PURE__ */ t("button", { className: "control-button control-button--resume", onClick: Y, children: [
933
- /* @__PURE__ */ e("span", { className: "icon", children: /* @__PURE__ */ e(u, { name: "play", size: 18 }) }),
934
- /* @__PURE__ */ e("span", { children: "Resume" })
935
- ] }),
936
- /* @__PURE__ */ t("button", { className: "control-button control-button--stop", onClick: Z, children: [
937
- /* @__PURE__ */ e("span", { className: "icon", children: /* @__PURE__ */ e(u, { name: "stop", size: 18 }) }),
938
- /* @__PURE__ */ e("span", { children: "Stop" })
939
- ] })
981
+ v === "paused" && /* @__PURE__ */ t(oe, { children: [
982
+ /* @__PURE__ */ t(
983
+ "button",
984
+ {
985
+ className: "nice-screen-recorder__control-button nice-screen-recorder__control-button--resume",
986
+ onClick: J,
987
+ children: [
988
+ /* @__PURE__ */ e("span", { className: "nice-screen-recorder__icon", children: /* @__PURE__ */ e(m, { name: "play", size: 18 }) }),
989
+ /* @__PURE__ */ e("span", { children: r("screenRecorder.resume", "Resume") })
990
+ ]
991
+ }
992
+ ),
993
+ /* @__PURE__ */ t(
994
+ "button",
995
+ {
996
+ className: "nice-screen-recorder__control-button nice-screen-recorder__control-button--stop",
997
+ onClick: Q,
998
+ children: [
999
+ /* @__PURE__ */ e("span", { className: "nice-screen-recorder__icon", children: /* @__PURE__ */ e(m, { name: "stop", size: 18 }) }),
1000
+ /* @__PURE__ */ e("span", { children: r("screenRecorder.stop", "Stop") })
1001
+ ]
1002
+ }
1003
+ )
940
1004
  ] }),
941
- h === "stopped" && /* @__PURE__ */ t(
1005
+ v === "stopped" && /* @__PURE__ */ t(
942
1006
  "button",
943
1007
  {
944
- className: "control-button control-button--new",
1008
+ className: "nice-screen-recorder__control-button nice-screen-recorder__control-button--new",
945
1009
  onClick: () => {
946
- k("idle"), W(null), R([]);
1010
+ k("idle"), H(null), D([]);
947
1011
  },
948
1012
  children: [
949
- /* @__PURE__ */ e("span", { className: "icon", children: /* @__PURE__ */ e(u, { name: "refresh", size: 18 }) }),
950
- /* @__PURE__ */ e("span", { children: "New Recording" })
1013
+ /* @__PURE__ */ e("span", { className: "nice-screen-recorder__icon", children: /* @__PURE__ */ e(m, { name: "refresh", size: 18 }) }),
1014
+ /* @__PURE__ */ e("span", { children: r("screenRecorder.newRecording", "New Recording") })
951
1015
  ]
952
1016
  }
953
1017
  )
954
1018
  ] }),
955
- /* @__PURE__ */ t("div", { className: "controls__secondary", children: [
956
- (h === "recording" || h === "paused") && /* @__PURE__ */ t("button", { className: "control-button control-button--marker", onClick: () => Q(), children: [
957
- /* @__PURE__ */ e("span", { className: "icon", children: /* @__PURE__ */ e(u, { name: "tag", size: 18 }) }),
958
- /* @__PURE__ */ e("span", { children: "Add Marker" })
959
- ] }),
1019
+ /* @__PURE__ */ t("div", { className: "nice-screen-recorder__controls-secondary", children: [
1020
+ (v === "recording" || v === "paused") && /* @__PURE__ */ t(
1021
+ "button",
1022
+ {
1023
+ className: "nice-screen-recorder__control-button nice-screen-recorder__control-button--marker",
1024
+ onClick: () => ee(),
1025
+ children: [
1026
+ /* @__PURE__ */ e("span", { className: "nice-screen-recorder__icon", children: /* @__PURE__ */ e(m, { name: "tag", size: 18 }) }),
1027
+ /* @__PURE__ */ e("span", { children: r("screenRecorder.addMarker", "Add Marker") })
1028
+ ]
1029
+ }
1030
+ ),
960
1031
  /* @__PURE__ */ t(
961
1032
  "button",
962
1033
  {
963
- className: `control-button ${z ? "control-button--active" : ""}`,
964
- onClick: () => _(!z),
965
- disabled: h !== "recording",
1034
+ className: `nice-screen-recorder__control-button ${z ? "nice-screen-recorder__control-button--active" : ""}`,
1035
+ onClick: () => T(!z),
1036
+ disabled: v !== "recording",
966
1037
  children: [
967
- /* @__PURE__ */ e("span", { className: "icon", children: /* @__PURE__ */ e(u, { name: "pen", size: 18 }) }),
968
- /* @__PURE__ */ e("span", { children: "Annotate" })
1038
+ /* @__PURE__ */ e("span", { className: "nice-screen-recorder__icon", children: /* @__PURE__ */ e(m, { name: "pen", size: 18 }) }),
1039
+ /* @__PURE__ */ e("span", { children: r("screenRecorder.annotate", "Annotate") })
969
1040
  ]
970
1041
  }
971
1042
  ),
972
1043
  /* @__PURE__ */ e(
973
1044
  "button",
974
1045
  {
975
- className: "control-button control-button--settings",
976
- onClick: () => B(!q),
977
- disabled: h === "recording",
978
- "aria-label": "Settings",
979
- children: /* @__PURE__ */ e("span", { className: "icon", children: /* @__PURE__ */ e(u, { name: "settings", size: 18 }) })
1046
+ className: "nice-screen-recorder__control-button nice-screen-recorder__control-button--settings",
1047
+ onClick: () => W(!G),
1048
+ disabled: v === "recording",
1049
+ "aria-label": r("screenRecorder.settings", "Settings"),
1050
+ children: /* @__PURE__ */ e("span", { className: "nice-screen-recorder__icon", children: /* @__PURE__ */ e(m, { name: "settings", size: 18 }) })
980
1051
  }
981
1052
  )
982
1053
  ] })
983
1054
  ] }),
984
- /* @__PURE__ */ t("div", { className: "recorder__status", children: [
985
- /* @__PURE__ */ t("div", { className: "status__info", children: [
986
- /* @__PURE__ */ t("span", { className: "status-item", children: [
1055
+ /* @__PURE__ */ t("div", { className: "nice-screen-recorder__status", children: [
1056
+ /* @__PURE__ */ t("div", { className: "nice-screen-recorder__status-info", children: [
1057
+ /* @__PURE__ */ t("span", { className: "nice-screen-recorder__status-item", children: [
987
1058
  /* @__PURE__ */ e("strong", { children: "Duration:" }),
988
1059
  " ",
989
- r((y == null ? void 0 : y.duration) || 0)
1060
+ c((y == null ? void 0 : y.duration) || 0)
990
1061
  ] }),
991
- /* @__PURE__ */ t("span", { className: "status-item", children: [
1062
+ /* @__PURE__ */ t("span", { className: "nice-screen-recorder__status-item", children: [
992
1063
  /* @__PURE__ */ e("strong", { children: "Size:" }),
993
1064
  " ",
994
1065
  l((y == null ? void 0 : y.size) || 0)
995
1066
  ] }),
996
- /* @__PURE__ */ t("span", { className: "status-item", children: [
1067
+ /* @__PURE__ */ t("span", { className: "nice-screen-recorder__status-item", children: [
997
1068
  /* @__PURE__ */ e("strong", { children: "Markers:" }),
998
1069
  " ",
999
1070
  N.length
1000
1071
  ] })
1001
1072
  ] }),
1002
- /* @__PURE__ */ t("div", { className: "status__quality", children: [
1073
+ /* @__PURE__ */ t("div", { className: "nice-screen-recorder__status-quality", children: [
1003
1074
  s.video.resolution && /* @__PURE__ */ t("span", { children: [
1004
1075
  s.video.resolution.width,
1005
1076
  "x",
@@ -1009,125 +1080,131 @@ const ve = {
1009
1080
  s.video.frameRate,
1010
1081
  "fps"
1011
1082
  ] }),
1012
- /* @__PURE__ */ e("span", { className: s.audio.enabled ? "audio-on" : "audio-off", children: /* @__PURE__ */ e(u, { name: s.audio.enabled ? "volume" : "volume-off", size: 14 }) })
1083
+ /* @__PURE__ */ e(
1084
+ "span",
1085
+ {
1086
+ className: `nice-screen-recorder__audio-status nice-screen-recorder__audio-status--${s.audio.enabled ? "on" : "off"}`,
1087
+ children: /* @__PURE__ */ e(m, { name: s.audio.enabled ? "volume" : "volume-off", size: 14 })
1088
+ }
1089
+ )
1013
1090
  ] })
1014
1091
  ] }),
1015
- z && h === "recording" && /* @__PURE__ */ t("div", { className: "recorder__annotation-tools", children: [
1016
- /* @__PURE__ */ e("div", { className: "tool-group", children: ["pen", "arrow", "rectangle", "text"].map((i) => /* @__PURE__ */ e(
1092
+ z && v === "recording" && /* @__PURE__ */ t("div", { className: "nice-screen-recorder__annotation-tools", children: [
1093
+ /* @__PURE__ */ e("div", { className: "nice-screen-recorder__tool-group", children: ["pen", "arrow", "rectangle", "text"].map((n) => /* @__PURE__ */ e(
1017
1094
  "button",
1018
1095
  {
1019
- className: `tool-button ${P === i ? "tool-button--active" : ""}`,
1020
- onClick: () => X(i),
1021
- "aria-label": i,
1096
+ className: `nice-screen-recorder__tool-button ${U === n ? "nice-screen-recorder__tool-button--active" : ""}`,
1097
+ onClick: () => ie(n),
1098
+ "aria-label": n,
1022
1099
  children: /* @__PURE__ */ e(
1023
- u,
1100
+ m,
1024
1101
  {
1025
- name: i === "pen" ? "pen" : i === "arrow" ? "arrow-right" : i === "rectangle" ? "square" : "type",
1102
+ name: n === "pen" ? "pen" : n === "arrow" ? "arrow-right" : n === "rectangle" ? "square" : "type",
1026
1103
  size: 16
1027
1104
  }
1028
1105
  )
1029
1106
  },
1030
- i
1107
+ n
1031
1108
  )) }),
1032
- /* @__PURE__ */ e("div", { className: "color-group", children: [
1109
+ /* @__PURE__ */ e("div", { className: "nice-screen-recorder__color-group", children: [
1033
1110
  "var(--nice-danger, #ff0000)",
1034
1111
  "var(--nice-success, #00ff00)",
1035
1112
  "var(--nice-primary, #0000ff)",
1036
1113
  "var(--nice-warning, #ffff00)",
1037
1114
  "var(--nice-bg, #fff)",
1038
1115
  "var(--nice-text, #000000)"
1039
- ].map((i) => /* @__PURE__ */ e(
1116
+ ].map((n) => /* @__PURE__ */ e(
1040
1117
  "button",
1041
1118
  {
1042
- className: `color-button ${ee === i ? "color-button--active" : ""}`,
1043
- style: { backgroundColor: i },
1044
- onClick: () => S(i)
1119
+ className: `nice-screen-recorder__color-button ${te === n ? "nice-screen-recorder__color-button--active" : ""}`,
1120
+ style: { backgroundColor: n },
1121
+ onClick: () => x(n)
1045
1122
  },
1046
- i
1123
+ n
1047
1124
  )) })
1048
1125
  ] }),
1049
- N.length > 0 && /* @__PURE__ */ t("div", { className: "recorder__markers", children: [
1050
- /* @__PURE__ */ e("h4", { children: "Markers" }),
1051
- /* @__PURE__ */ e("div", { className: "markers-list", children: N.map((i) => /* @__PURE__ */ t(
1126
+ N.length > 0 && /* @__PURE__ */ t("div", { className: "nice-screen-recorder__markers", children: [
1127
+ /* @__PURE__ */ e("h4", { children: r("screenRecorder.markers", "Markers") }),
1128
+ /* @__PURE__ */ e("div", { className: "nice-screen-recorder__markers-list", children: N.map((n) => /* @__PURE__ */ t(
1052
1129
  "div",
1053
1130
  {
1054
- className: "marker-item",
1055
- style: { borderLeftColor: i.color },
1131
+ className: "nice-screen-recorder__marker-item",
1132
+ style: { borderLeftColor: n.color },
1056
1133
  children: [
1057
- /* @__PURE__ */ e("span", { className: "marker-time", children: r(i.time) }),
1134
+ /* @__PURE__ */ e("span", { className: "nice-screen-recorder__marker-time", children: c(n.time) }),
1058
1135
  /* @__PURE__ */ e(
1059
1136
  "input",
1060
1137
  {
1061
1138
  type: "text",
1062
- value: i.label,
1063
- onChange: (c) => {
1064
- R(
1065
- (m) => m.map((p) => p.id === i.id ? { ...p, label: c.target.value } : p)
1139
+ value: n.label,
1140
+ onChange: (d) => {
1141
+ D(
1142
+ (u) => u.map((h) => h.id === n.id ? { ...h, label: d.target.value } : h)
1066
1143
  );
1067
1144
  },
1068
- className: "marker-label"
1145
+ className: "nice-screen-recorder__marker-label"
1069
1146
  }
1070
1147
  ),
1071
1148
  /* @__PURE__ */ e(
1072
1149
  "button",
1073
1150
  {
1074
- "aria-label": "Close",
1075
- className: "marker-remove",
1076
- onClick: () => H(i.id),
1077
- children: /* @__PURE__ */ e(u, { name: "close", size: 16 })
1151
+ "aria-label": r("screenRecorder.close", "Close"),
1152
+ className: "nice-screen-recorder__marker-remove",
1153
+ onClick: () => j(n.id),
1154
+ children: /* @__PURE__ */ e(m, { name: "close", size: 16 })
1078
1155
  }
1079
1156
  )
1080
1157
  ]
1081
1158
  },
1082
- i.id
1159
+ n.id
1083
1160
  )) })
1084
1161
  ] }),
1085
- q && /* @__PURE__ */ t("div", { className: "recorder__settings", children: [
1086
- /* @__PURE__ */ t("div", { className: "settings-header", children: [
1087
- /* @__PURE__ */ e("h3", { children: "Recording Settings" }),
1162
+ G && /* @__PURE__ */ t("div", { className: "nice-screen-recorder__settings", children: [
1163
+ /* @__PURE__ */ t("div", { className: "nice-screen-recorder__settings-header", children: [
1164
+ /* @__PURE__ */ e("h3", { children: r("screenRecorder.recordingSettings", "Recording Settings") }),
1088
1165
  /* @__PURE__ */ e(
1089
1166
  "button",
1090
1167
  {
1091
- "aria-label": "Close",
1092
- className: "close-button",
1093
- onClick: () => B(!1),
1094
- children: /* @__PURE__ */ e(u, { name: "close", size: 16 })
1168
+ "aria-label": r("screenRecorder.close", "Close"),
1169
+ className: "nice-screen-recorder__close-button",
1170
+ onClick: () => W(!1),
1171
+ children: /* @__PURE__ */ e(m, { name: "close", size: 16 })
1095
1172
  }
1096
1173
  )
1097
1174
  ] }),
1098
- /* @__PURE__ */ t("div", { className: "settings-section", children: [
1099
- /* @__PURE__ */ e("h4", { children: "Video" }),
1175
+ /* @__PURE__ */ t("div", { className: "nice-screen-recorder__settings-section", children: [
1176
+ /* @__PURE__ */ e("h4", { children: r("screenRecorder.video", "Video") }),
1100
1177
  /* @__PURE__ */ t("label", { children: [
1101
- "Source",
1178
+ r("screenRecorder.source", "Source"),
1102
1179
  /* @__PURE__ */ t(
1103
1180
  "select",
1104
1181
  {
1105
1182
  value: s.video.source,
1106
- onChange: (i) => x({
1183
+ onChange: (n) => S({
1107
1184
  video: {
1108
1185
  ...s.video,
1109
- source: i.target.value
1186
+ source: n.target.value
1110
1187
  }
1111
1188
  }),
1112
1189
  children: [
1113
- /* @__PURE__ */ e("option", { value: "screen", children: "Entire Screen" }),
1114
- /* @__PURE__ */ e("option", { value: "window", children: "Application Window" }),
1115
- /* @__PURE__ */ e("option", { value: "tab", children: "Browser Tab" }),
1116
- /* @__PURE__ */ e("option", { value: "camera", children: "Camera" })
1190
+ /* @__PURE__ */ e("option", { value: "screen", children: r("screenRecorder.entireScreen", "Entire Screen") }),
1191
+ /* @__PURE__ */ e("option", { value: "window", children: r("screenRecorder.applicationWindow", "Application Window") }),
1192
+ /* @__PURE__ */ e("option", { value: "tab", children: r("screenRecorder.browserTab", "Browser Tab") }),
1193
+ /* @__PURE__ */ e("option", { value: "camera", children: r("screenRecorder.camera", "Camera") })
1117
1194
  ]
1118
1195
  }
1119
1196
  )
1120
1197
  ] }),
1121
1198
  /* @__PURE__ */ t("label", { children: [
1122
- "Resolution",
1199
+ r("screenRecorder.resolution", "Resolution"),
1123
1200
  /* @__PURE__ */ t(
1124
1201
  "select",
1125
1202
  {
1126
- value: `${(n = s.video.resolution) == null ? void 0 : n.width}x${(o = s.video.resolution) == null ? void 0 : o.height}`,
1127
- onChange: (i) => {
1128
- const [c, m] = i.target.value.split("x").map(Number);
1129
- x({
1130
- video: { ...s.video, resolution: { width: c, height: m } }
1203
+ value: `${(a = s.video.resolution) == null ? void 0 : a.width}x${(o = s.video.resolution) == null ? void 0 : o.height}`,
1204
+ onChange: (n) => {
1205
+ const [d, u] = n.target.value.split("x").map(Number);
1206
+ S({
1207
+ video: { ...s.video, resolution: { width: d, height: u } }
1131
1208
  });
1132
1209
  },
1133
1210
  children: [
@@ -1140,13 +1217,13 @@ const ve = {
1140
1217
  )
1141
1218
  ] }),
1142
1219
  /* @__PURE__ */ t("label", { children: [
1143
- "Frame Rate",
1220
+ r("screenRecorder.frameRate", "Frame Rate"),
1144
1221
  /* @__PURE__ */ t(
1145
1222
  "select",
1146
1223
  {
1147
1224
  value: s.video.frameRate,
1148
- onChange: (i) => x({
1149
- video: { ...s.video, frameRate: parseInt(i.target.value) }
1225
+ onChange: (n) => S({
1226
+ video: { ...s.video, frameRate: parseInt(n.target.value) }
1150
1227
  }),
1151
1228
  children: [
1152
1229
  /* @__PURE__ */ e("option", { value: "15", children: "15 fps" }),
@@ -1157,94 +1234,94 @@ const ve = {
1157
1234
  }
1158
1235
  )
1159
1236
  ] }),
1160
- /* @__PURE__ */ t("label", { className: "checkbox-label", children: [
1237
+ /* @__PURE__ */ t("label", { className: "nice-screen-recorder__checkbox-label", children: [
1161
1238
  /* @__PURE__ */ e(
1162
1239
  "input",
1163
1240
  {
1164
1241
  type: "checkbox",
1165
1242
  checked: s.video.showCursor,
1166
- onChange: (i) => x({
1167
- video: { ...s.video, showCursor: i.target.checked }
1243
+ onChange: (n) => S({
1244
+ video: { ...s.video, showCursor: n.target.checked }
1168
1245
  })
1169
1246
  }
1170
1247
  ),
1171
- "Show Cursor"
1248
+ r("screenRecorder.showCursor", "Show Cursor")
1172
1249
  ] })
1173
1250
  ] }),
1174
- /* @__PURE__ */ t("div", { className: "settings-section", children: [
1175
- /* @__PURE__ */ e("h4", { children: "Audio" }),
1176
- /* @__PURE__ */ t("label", { className: "checkbox-label", children: [
1251
+ /* @__PURE__ */ t("div", { className: "nice-screen-recorder__settings-section", children: [
1252
+ /* @__PURE__ */ e("h4", { children: r("screenRecorder.audio", "Audio") }),
1253
+ /* @__PURE__ */ t("label", { className: "nice-screen-recorder__checkbox-label", children: [
1177
1254
  /* @__PURE__ */ e(
1178
1255
  "input",
1179
1256
  {
1180
1257
  type: "checkbox",
1181
1258
  checked: s.audio.enabled,
1182
- onChange: (i) => x({
1183
- audio: { ...s.audio, enabled: i.target.checked }
1259
+ onChange: (n) => S({
1260
+ audio: { ...s.audio, enabled: n.target.checked }
1184
1261
  })
1185
1262
  }
1186
1263
  ),
1187
- "Enable Audio"
1264
+ r("screenRecorder.enableAudio", "Enable Audio")
1188
1265
  ] }),
1189
- s.audio.enabled && /* @__PURE__ */ t(re, { children: [
1266
+ s.audio.enabled && /* @__PURE__ */ t(oe, { children: [
1190
1267
  /* @__PURE__ */ t("label", { children: [
1191
- "Source",
1268
+ r("screenRecorder.source", "Source"),
1192
1269
  /* @__PURE__ */ t(
1193
1270
  "select",
1194
1271
  {
1195
1272
  value: s.audio.source,
1196
- onChange: (i) => x({
1273
+ onChange: (n) => S({
1197
1274
  audio: {
1198
1275
  ...s.audio,
1199
- source: i.target.value
1276
+ source: n.target.value
1200
1277
  }
1201
1278
  }),
1202
1279
  children: [
1203
- /* @__PURE__ */ e("option", { value: "system", children: "System Audio" }),
1204
- /* @__PURE__ */ e("option", { value: "microphone", children: "Microphone" }),
1205
- /* @__PURE__ */ e("option", { value: "both", children: "Both" })
1280
+ /* @__PURE__ */ e("option", { value: "system", children: r("screenRecorder.systemAudio", "System Audio") }),
1281
+ /* @__PURE__ */ e("option", { value: "microphone", children: r("screenRecorder.microphone", "Microphone") }),
1282
+ /* @__PURE__ */ e("option", { value: "both", children: r("screenRecorder.both", "Both") })
1206
1283
  ]
1207
1284
  }
1208
1285
  )
1209
1286
  ] }),
1210
- /* @__PURE__ */ t("label", { className: "checkbox-label", children: [
1287
+ /* @__PURE__ */ t("label", { className: "nice-screen-recorder__checkbox-label", children: [
1211
1288
  /* @__PURE__ */ e(
1212
1289
  "input",
1213
1290
  {
1214
1291
  type: "checkbox",
1215
1292
  checked: s.audio.echoCancellation,
1216
- onChange: (i) => x({
1217
- audio: { ...s.audio, echoCancellation: i.target.checked }
1293
+ onChange: (n) => S({
1294
+ audio: { ...s.audio, echoCancellation: n.target.checked }
1218
1295
  })
1219
1296
  }
1220
1297
  ),
1221
- "Echo Cancellation"
1298
+ r("screenRecorder.echoCancellation", "Echo Cancellation")
1222
1299
  ] }),
1223
- /* @__PURE__ */ t("label", { className: "checkbox-label", children: [
1300
+ /* @__PURE__ */ t("label", { className: "nice-screen-recorder__checkbox-label", children: [
1224
1301
  /* @__PURE__ */ e(
1225
1302
  "input",
1226
1303
  {
1227
1304
  type: "checkbox",
1228
1305
  checked: s.audio.noiseSuppression,
1229
- onChange: (i) => x({
1230
- audio: { ...s.audio, noiseSuppression: i.target.checked }
1306
+ onChange: (n) => S({
1307
+ audio: { ...s.audio, noiseSuppression: n.target.checked }
1231
1308
  })
1232
1309
  }
1233
1310
  ),
1234
- "Noise Suppression"
1311
+ r("screenRecorder.noiseSuppression", "Noise Suppression")
1235
1312
  ] })
1236
1313
  ] })
1237
1314
  ] }),
1238
- /* @__PURE__ */ t("div", { className: "settings-section", children: [
1239
- /* @__PURE__ */ e("h4", { children: "Output" }),
1315
+ /* @__PURE__ */ t("div", { className: "nice-screen-recorder__settings-section", children: [
1316
+ /* @__PURE__ */ e("h4", { children: r("screenRecorder.output", "Output") }),
1240
1317
  /* @__PURE__ */ t("label", { children: [
1241
- "Format",
1318
+ r("screenRecorder.format", "Format"),
1242
1319
  /* @__PURE__ */ t(
1243
1320
  "select",
1244
1321
  {
1245
1322
  value: s.output.format,
1246
- onChange: (i) => x({
1247
- output: { ...s.output, format: i.target.value }
1323
+ onChange: (n) => S({
1324
+ output: { ...s.output, format: n.target.value }
1248
1325
  }),
1249
1326
  children: [
1250
1327
  /* @__PURE__ */ e("option", { value: "webm", children: "WebM (Best Web)" }),
@@ -1255,20 +1332,20 @@ const ve = {
1255
1332
  )
1256
1333
  ] }),
1257
1334
  /* @__PURE__ */ t("label", { children: [
1258
- "Quality",
1335
+ r("screenRecorder.quality", "Quality"),
1259
1336
  /* @__PURE__ */ t(
1260
1337
  "select",
1261
1338
  {
1262
1339
  value: s.output.quality,
1263
- onChange: (i) => x({
1340
+ onChange: (n) => S({
1264
1341
  output: {
1265
1342
  ...s.output,
1266
- quality: i.target.value
1343
+ quality: n.target.value
1267
1344
  }
1268
1345
  }),
1269
1346
  children: [
1270
1347
  /* @__PURE__ */ e("option", { value: "low", children: "Low (Smaller file)" }),
1271
- /* @__PURE__ */ e("option", { value: "medium", children: "Medium" }),
1348
+ /* @__PURE__ */ e("option", { value: "medium", children: r("screenRecorder.medium", "Medium") }),
1272
1349
  /* @__PURE__ */ e("option", { value: "high", children: "High (Recommended)" }),
1273
1350
  /* @__PURE__ */ e("option", { value: "lossless", children: "Lossless (Largest file)" })
1274
1351
  ]
@@ -1278,8 +1355,8 @@ const ve = {
1278
1355
  ] })
1279
1356
  ] })
1280
1357
  ] });
1281
- }, Ne = {
1282
- id: crypto.randomUUID(),
1358
+ }, we = {
1359
+ id: $(),
1283
1360
  name: "My Stream",
1284
1361
  protocol: "rtmp",
1285
1362
  destinations: [],
@@ -1306,7 +1383,7 @@ const ve = {
1306
1383
  codec: "aac"
1307
1384
  }
1308
1385
  }
1309
- }, le = [
1386
+ }, de = [
1310
1387
  {
1311
1388
  platform: "youtube",
1312
1389
  name: "YouTube",
@@ -1322,7 +1399,7 @@ const ve = {
1322
1399
  },
1323
1400
  { platform: "custom-rtmp", name: "Custom RTMP", icon: "link", defaultUrl: "" },
1324
1401
  { platform: "custom-srt", name: "Custom SRT", icon: "lock", defaultUrl: "" }
1325
- ], se = [
1402
+ ], ce = [
1326
1403
  { type: "camera", name: "Camera", icon: "camera" },
1327
1404
  { type: "screen", name: "Screen Capture", icon: "monitor" },
1328
1405
  { type: "window", name: "Window Capture", icon: "window" },
@@ -1331,18 +1408,18 @@ const ve = {
1331
1408
  { type: "video", name: "Video", icon: "video" },
1332
1409
  { type: "microphone", name: "Microphone", icon: "mic" },
1333
1410
  { type: "system-audio", name: "System Audio", icon: "volume" }
1334
- ], ze = ({
1335
- config: $,
1336
- onConfigChange: I,
1337
- onStreamStart: A,
1338
- onStreamStop: E,
1339
- onStatsUpdate: L,
1340
- onError: T,
1341
- className: d = ""
1411
+ ], Ie = ({
1412
+ config: E,
1413
+ onConfigChange: R,
1414
+ onStreamStart: F,
1415
+ onStreamStop: L,
1416
+ onStatsUpdate: O,
1417
+ onError: I,
1418
+ className: b = ""
1342
1419
  }) => {
1343
- const [s, D] = b($ || Ne), [y, W] = b(
1420
+ const { t: r } = me(), [s, A] = g(E || we), [y, H] = g(
1344
1421
  "sources"
1345
- ), [h, k] = b(!1), [N, R] = b({
1422
+ ), [v, k] = g(!1), [N, D] = g({
1346
1423
  duration: 0,
1347
1424
  viewers: 0,
1348
1425
  peakViewers: 0,
@@ -1351,57 +1428,57 @@ const ve = {
1351
1428
  droppedFrames: 0,
1352
1429
  cpuUsage: 0,
1353
1430
  memoryUsage: 0
1354
- }), [w, V] = b(null), [O, C] = b(!1), [q, B] = b(!1), [z, _] = b([s.layout]), [P, X] = b(0), ee = M(null), S = M(null), g = M(0);
1355
- oe(() => {
1356
- $ && D($);
1357
- }, [$]), oe(() => () => {
1358
- S.current && clearInterval(S.current);
1431
+ }), [w, B] = g(null), [K, C] = g(!1), [G, W] = g(!1), [z, T] = g([s.layout]), [U, ie] = g(0), te = M(null), x = M(null), f = M(0);
1432
+ le(() => {
1433
+ E && A(E);
1434
+ }, [E]), le(() => () => {
1435
+ x.current && clearInterval(x.current);
1359
1436
  }, []);
1360
- const f = ce(
1361
- (a) => {
1362
- const r = { ...s, ...a };
1363
- D(r), I == null || I(r);
1437
+ const _ = ue(
1438
+ (i) => {
1439
+ const c = { ...s, ...i };
1440
+ A(c), R == null || R(c);
1364
1441
  },
1365
- [s, I]
1366
- ), F = (a) => {
1367
- const r = le.find((n) => n.platform === a), l = {
1368
- id: crypto.randomUUID(),
1369
- name: (r == null ? void 0 : r.name) || "Custom",
1370
- platform: a,
1371
- url: (r == null ? void 0 : r.defaultUrl) || "",
1442
+ [s, R]
1443
+ ), V = (i) => {
1444
+ const c = de.find((a) => a.platform === i), l = {
1445
+ id: $(),
1446
+ name: (c == null ? void 0 : c.name) || "Custom",
1447
+ platform: i,
1448
+ url: (c == null ? void 0 : c.defaultUrl) || "",
1372
1449
  streamKey: "",
1373
1450
  enabled: !0,
1374
1451
  status: "idle"
1375
1452
  };
1376
- f({ destinations: [...s.destinations, l] }), B(!1);
1377
- }, j = (a, r) => {
1378
- f({
1379
- destinations: s.destinations.map((l) => l.id === a ? { ...l, ...r } : l)
1453
+ _({ destinations: [...s.destinations, l] }), W(!1);
1454
+ }, Y = (i, c) => {
1455
+ _({
1456
+ destinations: s.destinations.map((l) => l.id === i ? { ...l, ...c } : l)
1380
1457
  });
1381
- }, K = (a) => {
1382
- f({ destinations: s.destinations.filter((r) => r.id !== a) });
1383
- }, J = async (a) => {
1384
- const r = se.find((o) => o.type === a), l = {
1385
- id: crypto.randomUUID(),
1386
- type: a,
1387
- name: `${(r == null ? void 0 : r.name) || a} ${s.sources.filter((o) => o.type === a).length + 1}`,
1458
+ }, q = (i) => {
1459
+ _({ destinations: s.destinations.filter((c) => c.id !== i) });
1460
+ }, X = async (i) => {
1461
+ const c = ce.find((o) => o.type === i), l = {
1462
+ id: $(),
1463
+ type: i,
1464
+ name: `${(c == null ? void 0 : c.name) || i} ${s.sources.filter((o) => o.type === i).length + 1}`,
1388
1465
  settings: {},
1389
1466
  volume: 1,
1390
1467
  muted: !1
1391
1468
  };
1392
1469
  try {
1393
- if (a === "camera" || a === "microphone") {
1394
- const o = a === "camera" ? { video: !0 } : { audio: !0 }, c = (await navigator.mediaDevices.enumerateDevices()).filter(
1395
- (m) => a === "camera" ? m.kind === "videoinput" : m.kind === "audioinput"
1470
+ if (i === "camera" || i === "microphone") {
1471
+ const o = i === "camera" ? { video: !0 } : { audio: !0 }, d = (await navigator.mediaDevices.enumerateDevices()).filter(
1472
+ (u) => i === "camera" ? u.kind === "videoinput" : u.kind === "audioinput"
1396
1473
  );
1397
- c.length > 0 && (l.settings.deviceId = c[0].deviceId);
1398
- } else (a === "screen" || a === "window") && await navigator.mediaDevices.getDisplayMedia({ video: !0 });
1474
+ d.length > 0 && (l.settings.deviceId = d[0].deviceId);
1475
+ } else (i === "screen" || i === "window") && await navigator.mediaDevices.getDisplayMedia({ video: !0 });
1399
1476
  } catch (o) {
1400
- console.warn(`Could not access ${a}:`, o);
1477
+ console.warn(`Could not access ${i}:`, o);
1401
1478
  }
1402
- f({ sources: [...s.sources, l] });
1403
- const n = {
1404
- id: crypto.randomUUID(),
1479
+ _({ sources: [...s.sources, l] });
1480
+ const a = {
1481
+ id: $(),
1405
1482
  sourceId: l.id,
1406
1483
  position: { x: 0, y: 0 },
1407
1484
  size: { width: s.layout.canvas.width, height: s.layout.canvas.height },
@@ -1409,70 +1486,70 @@ const ve = {
1409
1486
  opacity: 1,
1410
1487
  zIndex: s.layout.layers.length
1411
1488
  };
1412
- f({
1489
+ _({
1413
1490
  layout: {
1414
1491
  ...s.layout,
1415
- layers: [...s.layout.layers, n]
1492
+ layers: [...s.layout.layers, a]
1416
1493
  }
1417
1494
  }), C(!1);
1418
- }, x = (a, r) => {
1419
- f({
1420
- sources: s.sources.map((l) => l.id === a ? { ...l, ...r } : l)
1495
+ }, S = (i, c) => {
1496
+ _({
1497
+ sources: s.sources.map((l) => l.id === i ? { ...l, ...c } : l)
1421
1498
  });
1422
- }, G = (a) => {
1423
- f({
1424
- sources: s.sources.filter((r) => r.id !== a),
1499
+ }, Z = (i) => {
1500
+ _({
1501
+ sources: s.sources.filter((c) => c.id !== i),
1425
1502
  layout: {
1426
1503
  ...s.layout,
1427
- layers: s.layout.layers.filter((r) => r.sourceId !== a)
1504
+ layers: s.layout.layers.filter((c) => c.sourceId !== i)
1428
1505
  }
1429
1506
  });
1430
- }, U = (a, r) => {
1431
- f({
1507
+ }, P = (i, c) => {
1508
+ _({
1432
1509
  layout: {
1433
1510
  ...s.layout,
1434
- layers: s.layout.layers.map((l) => l.id === a ? { ...l, ...r } : l)
1511
+ layers: s.layout.layers.map((l) => l.id === i ? { ...l, ...c } : l)
1435
1512
  }
1436
1513
  });
1437
- }, ae = (a) => {
1438
- const r = s.layout.layers.findIndex((l) => l.id === a);
1439
- if (r < s.layout.layers.length - 1) {
1514
+ }, ne = (i) => {
1515
+ const c = s.layout.layers.findIndex((l) => l.id === i);
1516
+ if (c < s.layout.layers.length - 1) {
1440
1517
  const l = [...s.layout.layers];
1441
- [l[r], l[r + 1]] = [l[r + 1], l[r]], l.forEach((n, o) => {
1442
- n.zIndex = o;
1443
- }), f({ layout: { ...s.layout, layers: l } });
1518
+ [l[c], l[c + 1]] = [l[c + 1], l[c]], l.forEach((a, o) => {
1519
+ a.zIndex = o;
1520
+ }), _({ layout: { ...s.layout, layers: l } });
1444
1521
  }
1445
- }, te = (a) => {
1446
- const r = s.layout.layers.findIndex((l) => l.id === a);
1447
- if (r > 0) {
1522
+ }, ae = (i) => {
1523
+ const c = s.layout.layers.findIndex((l) => l.id === i);
1524
+ if (c > 0) {
1448
1525
  const l = [...s.layout.layers];
1449
- [l[r], l[r - 1]] = [l[r - 1], l[r]], l.forEach((n, o) => {
1450
- n.zIndex = o;
1451
- }), f({ layout: { ...s.layout, layers: l } });
1526
+ [l[c], l[c - 1]] = [l[c - 1], l[c]], l.forEach((a, o) => {
1527
+ a.zIndex = o;
1528
+ }), _({ layout: { ...s.layout, layers: l } });
1452
1529
  }
1453
- }, Y = () => {
1454
- const a = {
1530
+ }, J = () => {
1531
+ const i = {
1455
1532
  name: `Scene ${z.length + 1}`,
1456
1533
  canvas: { ...s.layout.canvas },
1457
1534
  layers: []
1458
1535
  };
1459
- _([...z, a]);
1460
- }, Z = (a) => {
1461
- const r = [...z];
1462
- r[P] = s.layout, _(r), X(a), f({ layout: z[a] });
1463
- }, Q = async () => {
1536
+ T([...z, i]);
1537
+ }, Q = (i) => {
1538
+ const c = [...z];
1539
+ c[U] = s.layout, T(c), ie(i), _({ layout: z[i] });
1540
+ }, ee = async () => {
1464
1541
  try {
1465
- f({
1542
+ _({
1466
1543
  destinations: s.destinations.map(
1467
- (a) => a.enabled ? { ...a, status: "connecting" } : a
1544
+ (i) => i.enabled ? { ...i, status: "connecting" } : i
1468
1545
  )
1469
- }), await new Promise((a) => setTimeout(a, 2e3)), f({
1546
+ }), await new Promise((i) => setTimeout(i, 2e3)), _({
1470
1547
  destinations: s.destinations.map(
1471
- (a) => a.enabled ? { ...a, status: "live" } : a
1548
+ (i) => i.enabled ? { ...i, status: "live" } : i
1472
1549
  )
1473
- }), k(!0), g.current = Date.now(), A == null || A(), S.current = setInterval(() => {
1474
- const a = {
1475
- duration: (Date.now() - g.current) / 1e3,
1550
+ }), k(!0), f.current = Date.now(), F == null || F(), x.current = setInterval(() => {
1551
+ const i = {
1552
+ duration: (Date.now() - f.current) / 1e3,
1476
1553
  viewers: Math.floor(Math.random() * 100) + N.viewers,
1477
1554
  peakViewers: Math.max(N.peakViewers, N.viewers),
1478
1555
  bitrate: s.settings.video.bitrate + Math.floor(Math.random() * 500 - 250),
@@ -1481,25 +1558,25 @@ const ve = {
1481
1558
  cpuUsage: 15 + Math.random() * 30,
1482
1559
  memoryUsage: 40 + Math.random() * 20
1483
1560
  };
1484
- R(a), L == null || L(a);
1561
+ D(i), O == null || O(i);
1485
1562
  }, 1e3);
1486
- } catch (a) {
1487
- T == null || T(a instanceof Error ? a : new Error("Failed to start stream")), f({
1488
- destinations: s.destinations.map((r) => ({
1489
- ...r,
1563
+ } catch (i) {
1564
+ I == null || I(i instanceof Error ? i : new Error("Failed to start stream")), _({
1565
+ destinations: s.destinations.map((c) => ({
1566
+ ...c,
1490
1567
  status: "error"
1491
1568
  }))
1492
1569
  });
1493
1570
  }
1494
- }, H = () => {
1495
- S.current && clearInterval(S.current), f({
1496
- destinations: s.destinations.map((a) => ({ ...a, status: "idle" }))
1497
- }), k(!1), E == null || E();
1498
- }, ie = (a) => {
1499
- const r = Math.floor(a / 3600), l = Math.floor(a % 3600 / 60), n = Math.floor(a % 60);
1500
- return `${r.toString().padStart(2, "0")}:${l.toString().padStart(2, "0")}:${n.toString().padStart(2, "0")}`;
1501
- }, ne = (a) => {
1502
- switch (a) {
1571
+ }, j = () => {
1572
+ x.current && clearInterval(x.current), _({
1573
+ destinations: s.destinations.map((i) => ({ ...i, status: "idle" }))
1574
+ }), k(!1), L == null || L();
1575
+ }, se = (i) => {
1576
+ const c = Math.floor(i / 3600), l = Math.floor(i % 3600 / 60), a = Math.floor(i % 60);
1577
+ return `${c.toString().padStart(2, "0")}:${l.toString().padStart(2, "0")}:${a.toString().padStart(2, "0")}`;
1578
+ }, re = (i) => {
1579
+ switch (i) {
1503
1580
  case "live":
1504
1581
  return "var(--nice-success, #00ff00)";
1505
1582
  case "connecting":
@@ -1510,258 +1587,273 @@ const ve = {
1510
1587
  return "var(--nice-text-secondary, #888888)";
1511
1588
  }
1512
1589
  };
1513
- return /* @__PURE__ */ t("div", { className: `nice-live-streaming ${d}`, children: [
1514
- /* @__PURE__ */ t("header", { className: "streaming__header", children: [
1515
- /* @__PURE__ */ t("div", { className: "header__title", children: [
1590
+ return /* @__PURE__ */ t("div", { className: `nice-live-streaming ${b}`, children: [
1591
+ /* @__PURE__ */ t("header", { className: "nice-live-streaming__header", children: [
1592
+ /* @__PURE__ */ t("div", { className: "nice-live-streaming__header-title", children: [
1516
1593
  /* @__PURE__ */ e(
1517
1594
  "input",
1518
1595
  {
1519
1596
  type: "text",
1520
1597
  value: s.name,
1521
- onChange: (a) => f({ name: a.target.value }),
1522
- className: "stream-name-input"
1598
+ onChange: (i) => _({ name: i.target.value }),
1599
+ className: "nice-live-streaming__stream-name-input"
1523
1600
  }
1524
1601
  ),
1525
- h && /* @__PURE__ */ t("span", { className: "live-badge", children: [
1526
- /* @__PURE__ */ e("span", { className: "live-dot" }),
1527
- " LIVE"
1602
+ v && /* @__PURE__ */ t("span", { className: "nice-live-streaming__live-badge", children: [
1603
+ /* @__PURE__ */ e("span", { className: "nice-live-streaming__live-dot" }),
1604
+ " ",
1605
+ r("liveStreaming.live", "LIVE")
1528
1606
  ] })
1529
1607
  ] }),
1530
- /* @__PURE__ */ e("div", { className: "header__stats", children: h && /* @__PURE__ */ t(re, { children: [
1531
- /* @__PURE__ */ t("span", { className: "stat-item", children: [
1532
- /* @__PURE__ */ e(u, { name: "clock", size: 14 }),
1608
+ /* @__PURE__ */ e("div", { className: "nice-live-streaming__header-stats", children: v && /* @__PURE__ */ t(oe, { children: [
1609
+ /* @__PURE__ */ t("span", { className: "nice-live-streaming__stat-item", children: [
1610
+ /* @__PURE__ */ e(m, { name: "clock", size: 14 }),
1533
1611
  " ",
1534
- ie(N.duration)
1612
+ se(N.duration)
1535
1613
  ] }),
1536
- /* @__PURE__ */ t("span", { className: "stat-item", children: [
1537
- /* @__PURE__ */ e(u, { name: "users", size: 14 }),
1614
+ /* @__PURE__ */ t("span", { className: "nice-live-streaming__stat-item", children: [
1615
+ /* @__PURE__ */ e(m, { name: "users", size: 14 }),
1538
1616
  " ",
1539
1617
  N.viewers
1540
1618
  ] }),
1541
- /* @__PURE__ */ t("span", { className: "stat-item", children: [
1542
- /* @__PURE__ */ e(u, { name: "bar-chart", size: 14 }),
1619
+ /* @__PURE__ */ t("span", { className: "nice-live-streaming__stat-item", children: [
1620
+ /* @__PURE__ */ e(m, { name: "bar-chart", size: 14 }),
1543
1621
  " ",
1544
1622
  Math.round(N.bitrate),
1545
1623
  " kbps"
1546
1624
  ] }),
1547
- /* @__PURE__ */ t("span", { className: "stat-item", children: [
1548
- /* @__PURE__ */ e(u, { name: "video", size: 14 }),
1625
+ /* @__PURE__ */ t("span", { className: "nice-live-streaming__stat-item", children: [
1626
+ /* @__PURE__ */ e(m, { name: "video", size: 14 }),
1549
1627
  " ",
1550
1628
  N.fps.toFixed(1),
1551
1629
  " fps"
1552
1630
  ] })
1553
1631
  ] }) }),
1554
- /* @__PURE__ */ e("div", { className: "header__actions", children: h ? /* @__PURE__ */ e("button", { className: "action-button action-button--stop", onClick: H, children: "End Stream" }) : /* @__PURE__ */ e(
1632
+ /* @__PURE__ */ e("div", { className: "nice-live-streaming__header-actions", children: v ? /* @__PURE__ */ e(
1555
1633
  "button",
1556
1634
  {
1557
- className: "action-button action-button--go-live",
1558
- onClick: Q,
1559
- disabled: s.destinations.filter((a) => a.enabled).length === 0,
1560
- children: "Go Live"
1635
+ className: "nice-live-streaming__action-button nice-live-streaming__action-button--stop",
1636
+ onClick: j,
1637
+ children: r("liveStreaming.endStream", "End Stream")
1638
+ }
1639
+ ) : /* @__PURE__ */ e(
1640
+ "button",
1641
+ {
1642
+ className: "nice-live-streaming__action-button nice-live-streaming__action-button--go-live",
1643
+ onClick: ee,
1644
+ disabled: s.destinations.filter((i) => i.enabled).length === 0,
1645
+ children: r("liveStreaming.goLive", "Go Live")
1561
1646
  }
1562
1647
  ) })
1563
1648
  ] }),
1564
- /* @__PURE__ */ t("div", { className: "streaming__main", children: [
1565
- /* @__PURE__ */ t("div", { className: "streaming__preview", children: [
1566
- /* @__PURE__ */ t("div", { className: "scenes-bar", children: [
1567
- z.map((a, r) => /* @__PURE__ */ e(
1649
+ /* @__PURE__ */ t("div", { className: "nice-live-streaming__main", children: [
1650
+ /* @__PURE__ */ t("div", { className: "nice-live-streaming__preview", children: [
1651
+ /* @__PURE__ */ t("div", { className: "nice-live-streaming__scenes-bar", children: [
1652
+ z.map((i, c) => /* @__PURE__ */ e(
1568
1653
  "button",
1569
1654
  {
1570
- className: `scene-button ${P === r ? "scene-button--active" : ""}`,
1571
- onClick: () => Z(r),
1572
- children: a.name
1655
+ className: `nice-live-streaming__scene-button ${U === c ? "nice-live-streaming__scene-button--active" : ""}`,
1656
+ onClick: () => Q(c),
1657
+ children: i.name
1573
1658
  },
1574
- r
1659
+ c
1575
1660
  )),
1576
- /* @__PURE__ */ e("button", { className: "scene-button scene-button--add", onClick: Y, children: "+" })
1661
+ /* @__PURE__ */ e(
1662
+ "button",
1663
+ {
1664
+ className: "nice-live-streaming__scene-button nice-live-streaming__scene-button--add",
1665
+ onClick: J,
1666
+ children: "+"
1667
+ }
1668
+ )
1577
1669
  ] }),
1578
1670
  /* @__PURE__ */ e(
1579
1671
  "div",
1580
1672
  {
1581
- ref: ee,
1582
- className: "preview-canvas",
1673
+ ref: te,
1674
+ className: "nice-live-streaming__preview-canvas",
1583
1675
  style: {
1584
1676
  aspectRatio: `${s.layout.canvas.width}/${s.layout.canvas.height}`,
1585
1677
  backgroundColor: s.layout.canvas.backgroundColor
1586
1678
  },
1587
- children: s.layout.layers.sort((a, r) => a.zIndex - r.zIndex).map((a) => {
1679
+ children: s.layout.layers.sort((i, c) => i.zIndex - c.zIndex).map((i) => {
1588
1680
  var l;
1589
- const r = s.sources.find((n) => n.id === a.sourceId);
1590
- return !a.visible || !r ? null : /* @__PURE__ */ e(
1681
+ const c = s.sources.find((a) => a.id === i.sourceId);
1682
+ return !i.visible || !c ? null : /* @__PURE__ */ e(
1591
1683
  "div",
1592
1684
  {
1593
- className: `canvas-layer ${w === a.id ? "canvas-layer--selected" : ""}`,
1685
+ className: `nice-live-streaming__canvas-layer ${w === i.id ? "nice-live-streaming__canvas-layer--selected" : ""}`,
1594
1686
  style: {
1595
- left: `${a.position.x / s.layout.canvas.width * 100}%`,
1596
- top: `${a.position.y / s.layout.canvas.height * 100}%`,
1597
- width: `${a.size.width / s.layout.canvas.width * 100}%`,
1598
- height: `${a.size.height / s.layout.canvas.height * 100}%`,
1599
- opacity: a.opacity,
1600
- zIndex: a.zIndex
1687
+ left: `${i.position.x / s.layout.canvas.width * 100}%`,
1688
+ top: `${i.position.y / s.layout.canvas.height * 100}%`,
1689
+ width: `${i.size.width / s.layout.canvas.width * 100}%`,
1690
+ height: `${i.size.height / s.layout.canvas.height * 100}%`,
1691
+ opacity: i.opacity,
1692
+ zIndex: i.zIndex
1601
1693
  },
1602
- onClick: () => V(a.id),
1603
- children: /* @__PURE__ */ t("div", { className: "layer-content", children: [
1604
- /* @__PURE__ */ e("span", { className: "layer-icon", children: /* @__PURE__ */ e(
1605
- u,
1694
+ onClick: () => B(i.id),
1695
+ children: /* @__PURE__ */ t("div", { className: "nice-live-streaming__layer-content", children: [
1696
+ /* @__PURE__ */ e("span", { className: "nice-live-streaming__layer-icon", children: /* @__PURE__ */ e(
1697
+ m,
1606
1698
  {
1607
- name: ((l = se.find((n) => n.type === r.type)) == null ? void 0 : l.icon) ?? "box",
1699
+ name: ((l = ce.find((a) => a.type === c.type)) == null ? void 0 : l.icon) ?? "box",
1608
1700
  size: 16
1609
1701
  }
1610
1702
  ) }),
1611
- /* @__PURE__ */ e("span", { className: "layer-name", children: r.name })
1703
+ /* @__PURE__ */ e("span", { className: "nice-live-streaming__layer-name", children: c.name })
1612
1704
  ] })
1613
1705
  },
1614
- a.id
1706
+ i.id
1615
1707
  );
1616
1708
  })
1617
1709
  }
1618
1710
  )
1619
1711
  ] }),
1620
- /* @__PURE__ */ t("aside", { className: "streaming__panel", children: [
1621
- /* @__PURE__ */ e("div", { className: "panel-tabs", children: ["sources", "audio", "destinations", "settings"].map((a) => /* @__PURE__ */ e(
1712
+ /* @__PURE__ */ t("aside", { className: "nice-live-streaming__panel", children: [
1713
+ /* @__PURE__ */ e("div", { className: "nice-live-streaming__panel-tabs", children: ["sources", "audio", "destinations", "settings"].map((i) => /* @__PURE__ */ e(
1622
1714
  "button",
1623
1715
  {
1624
- className: `panel-tab ${y === a ? "panel-tab--active" : ""}`,
1625
- onClick: () => W(a),
1626
- children: a.charAt(0).toUpperCase() + a.slice(1)
1716
+ className: `nice-live-streaming__panel-tab ${y === i ? "nice-live-streaming__panel-tab--active" : ""}`,
1717
+ onClick: () => H(i),
1718
+ children: i.charAt(0).toUpperCase() + i.slice(1)
1627
1719
  },
1628
- a
1720
+ i
1629
1721
  )) }),
1630
- /* @__PURE__ */ t("div", { className: "panel-content", children: [
1631
- y === "sources" && /* @__PURE__ */ t("div", { className: "sources-panel", children: [
1632
- /* @__PURE__ */ t("div", { className: "panel-header", children: [
1633
- /* @__PURE__ */ e("h3", { children: "Sources" }),
1722
+ /* @__PURE__ */ t("div", { className: "nice-live-streaming__panel-content", children: [
1723
+ y === "sources" && /* @__PURE__ */ t("div", { className: "nice-live-streaming__sources-panel", children: [
1724
+ /* @__PURE__ */ t("div", { className: "nice-live-streaming__panel-header", children: [
1725
+ /* @__PURE__ */ e("h3", { children: r("liveStreaming.sources", "Sources") }),
1634
1726
  /* @__PURE__ */ e(
1635
1727
  "button",
1636
1728
  {
1637
- className: "add-button",
1729
+ className: "nice-live-streaming__add-button",
1638
1730
  onClick: () => C(!0),
1639
- disabled: h,
1731
+ disabled: v,
1640
1732
  children: "+ Add"
1641
1733
  }
1642
1734
  )
1643
1735
  ] }),
1644
- /* @__PURE__ */ e("div", { className: "sources-list", children: s.sources.filter((a) => a.type !== "microphone" && a.type !== "system-audio").map((a) => {
1736
+ /* @__PURE__ */ e("div", { className: "nice-live-streaming__sources-list", children: s.sources.filter((i) => i.type !== "microphone" && i.type !== "system-audio").map((i) => {
1645
1737
  var l;
1646
- const r = s.layout.layers.find((n) => n.sourceId === a.id);
1738
+ const c = s.layout.layers.find((a) => a.sourceId === i.id);
1647
1739
  return /* @__PURE__ */ t(
1648
1740
  "div",
1649
1741
  {
1650
- className: `source-item ${w === (r == null ? void 0 : r.id) ? "source-item--selected" : ""}`,
1651
- onClick: () => r && V(r.id),
1742
+ className: `nice-live-streaming__source-item ${w === (c == null ? void 0 : c.id) ? "nice-live-streaming__source-item--selected" : ""}`,
1743
+ onClick: () => c && B(c.id),
1652
1744
  children: [
1653
- /* @__PURE__ */ e("span", { className: "source-icon", children: /* @__PURE__ */ e(
1654
- u,
1745
+ /* @__PURE__ */ e("span", { className: "nice-live-streaming__source-icon", children: /* @__PURE__ */ e(
1746
+ m,
1655
1747
  {
1656
- name: ((l = se.find((n) => n.type === a.type)) == null ? void 0 : l.icon) ?? "box",
1748
+ name: ((l = ce.find((a) => a.type === i.type)) == null ? void 0 : l.icon) ?? "box",
1657
1749
  size: 16
1658
1750
  }
1659
1751
  ) }),
1660
- /* @__PURE__ */ e("span", { className: "source-name", children: a.name }),
1661
- /* @__PURE__ */ t("div", { className: "source-controls", children: [
1752
+ /* @__PURE__ */ e("span", { className: "nice-live-streaming__source-name", children: i.name }),
1753
+ /* @__PURE__ */ t("div", { className: "nice-live-streaming__source-controls", children: [
1662
1754
  /* @__PURE__ */ e(
1663
1755
  "button",
1664
1756
  {
1665
- className: r != null && r.visible ? "" : "inactive",
1666
- onClick: (n) => {
1667
- n.stopPropagation(), r && U(r.id, { visible: !r.visible });
1757
+ className: `nice-live-streaming__visibility-toggle ${c != null && c.visible ? "" : "nice-live-streaming__visibility-toggle--hidden"}`,
1758
+ onClick: (a) => {
1759
+ a.stopPropagation(), c && P(c.id, { visible: !c.visible });
1668
1760
  },
1669
- children: /* @__PURE__ */ e(u, { name: r != null && r.visible ? "eye" : "eye-off", size: 14 })
1761
+ children: /* @__PURE__ */ e(m, { name: c != null && c.visible ? "eye" : "eye-off", size: 14 })
1670
1762
  }
1671
1763
  ),
1672
1764
  /* @__PURE__ */ e(
1673
1765
  "button",
1674
1766
  {
1675
- onClick: (n) => {
1676
- n.stopPropagation(), r && ae(r.id);
1767
+ onClick: (a) => {
1768
+ a.stopPropagation(), c && ne(c.id);
1677
1769
  },
1678
- children: /* @__PURE__ */ e(u, { name: "arrow-up", size: 14 })
1770
+ children: /* @__PURE__ */ e(m, { name: "arrow-up", size: 14 })
1679
1771
  }
1680
1772
  ),
1681
1773
  /* @__PURE__ */ e(
1682
1774
  "button",
1683
1775
  {
1684
- onClick: (n) => {
1685
- n.stopPropagation(), r && te(r.id);
1776
+ onClick: (a) => {
1777
+ a.stopPropagation(), c && ae(c.id);
1686
1778
  },
1687
- children: /* @__PURE__ */ e(u, { name: "arrow-down", size: 14 })
1779
+ children: /* @__PURE__ */ e(m, { name: "arrow-down", size: 14 })
1688
1780
  }
1689
1781
  ),
1690
1782
  /* @__PURE__ */ e(
1691
1783
  "button",
1692
1784
  {
1693
- onClick: (n) => {
1694
- n.stopPropagation(), G(a.id);
1785
+ onClick: (a) => {
1786
+ a.stopPropagation(), Z(i.id);
1695
1787
  },
1696
- disabled: h,
1697
- children: /* @__PURE__ */ e(u, { name: "trash", size: 14 })
1788
+ disabled: v,
1789
+ children: /* @__PURE__ */ e(m, { name: "trash", size: 14 })
1698
1790
  }
1699
1791
  )
1700
1792
  ] })
1701
1793
  ]
1702
1794
  },
1703
- a.id
1795
+ i.id
1704
1796
  );
1705
1797
  }) }),
1706
- w && /* @__PURE__ */ t("div", { className: "layer-properties", children: [
1707
- /* @__PURE__ */ e("h4", { children: "Properties" }),
1798
+ w && /* @__PURE__ */ t("div", { className: "nice-live-streaming__layer-properties", children: [
1799
+ /* @__PURE__ */ e("h4", { children: r("liveStreaming.properties", "Properties") }),
1708
1800
  (() => {
1709
- const a = s.layout.layers.find((r) => r.id === w);
1710
- return a ? /* @__PURE__ */ t(re, { children: [
1801
+ const i = s.layout.layers.find((c) => c.id === w);
1802
+ return i ? /* @__PURE__ */ t(oe, { children: [
1711
1803
  /* @__PURE__ */ t("label", { children: [
1712
- "X Position",
1804
+ r("liveStreaming.xPosition", "X Position"),
1713
1805
  /* @__PURE__ */ e(
1714
1806
  "input",
1715
1807
  {
1716
1808
  type: "number",
1717
- value: a.position.x,
1718
- onChange: (r) => U(a.id, {
1719
- position: { ...a.position, x: parseInt(r.target.value) || 0 }
1809
+ value: i.position.x,
1810
+ onChange: (c) => P(i.id, {
1811
+ position: { ...i.position, x: parseInt(c.target.value) || 0 }
1720
1812
  })
1721
1813
  }
1722
1814
  )
1723
1815
  ] }),
1724
1816
  /* @__PURE__ */ t("label", { children: [
1725
- "Y Position",
1817
+ r("liveStreaming.yPosition", "Y Position"),
1726
1818
  /* @__PURE__ */ e(
1727
1819
  "input",
1728
1820
  {
1729
1821
  type: "number",
1730
- value: a.position.y,
1731
- onChange: (r) => U(a.id, {
1732
- position: { ...a.position, y: parseInt(r.target.value) || 0 }
1822
+ value: i.position.y,
1823
+ onChange: (c) => P(i.id, {
1824
+ position: { ...i.position, y: parseInt(c.target.value) || 0 }
1733
1825
  })
1734
1826
  }
1735
1827
  )
1736
1828
  ] }),
1737
1829
  /* @__PURE__ */ t("label", { children: [
1738
- "Width",
1830
+ r("liveStreaming.width", "Width"),
1739
1831
  /* @__PURE__ */ e(
1740
1832
  "input",
1741
1833
  {
1742
1834
  type: "number",
1743
- value: a.size.width,
1744
- onChange: (r) => U(a.id, {
1745
- size: { ...a.size, width: parseInt(r.target.value) || 100 }
1835
+ value: i.size.width,
1836
+ onChange: (c) => P(i.id, {
1837
+ size: { ...i.size, width: parseInt(c.target.value) || 100 }
1746
1838
  })
1747
1839
  }
1748
1840
  )
1749
1841
  ] }),
1750
1842
  /* @__PURE__ */ t("label", { children: [
1751
- "Height",
1843
+ r("liveStreaming.height", "Height"),
1752
1844
  /* @__PURE__ */ e(
1753
1845
  "input",
1754
1846
  {
1755
1847
  type: "number",
1756
- value: a.size.height,
1757
- onChange: (r) => U(a.id, {
1758
- size: { ...a.size, height: parseInt(r.target.value) || 100 }
1848
+ value: i.size.height,
1849
+ onChange: (c) => P(i.id, {
1850
+ size: { ...i.size, height: parseInt(c.target.value) || 100 }
1759
1851
  })
1760
1852
  }
1761
1853
  )
1762
1854
  ] }),
1763
1855
  /* @__PURE__ */ t("label", { children: [
1764
- "Opacity",
1856
+ r("liveStreaming.opacity", "Opacity"),
1765
1857
  /* @__PURE__ */ e(
1766
1858
  "input",
1767
1859
  {
@@ -1769,9 +1861,9 @@ const ve = {
1769
1861
  min: "0",
1770
1862
  max: "1",
1771
1863
  step: "0.1",
1772
- value: a.opacity,
1773
- onChange: (r) => U(a.id, {
1774
- opacity: parseFloat(r.target.value)
1864
+ value: i.opacity,
1865
+ onChange: (c) => P(i.id, {
1866
+ opacity: parseFloat(c.target.value)
1775
1867
  })
1776
1868
  }
1777
1869
  )
@@ -1780,46 +1872,46 @@ const ve = {
1780
1872
  })()
1781
1873
  ] })
1782
1874
  ] }),
1783
- y === "audio" && /* @__PURE__ */ t("div", { className: "audio-panel", children: [
1784
- /* @__PURE__ */ t("div", { className: "panel-header", children: [
1785
- /* @__PURE__ */ e("h3", { children: "Audio Mixer" }),
1875
+ y === "audio" && /* @__PURE__ */ t("div", { className: "nice-live-streaming__audio-panel", children: [
1876
+ /* @__PURE__ */ t("div", { className: "nice-live-streaming__panel-header", children: [
1877
+ /* @__PURE__ */ e("h3", { children: r("liveStreaming.audioMixer", "Audio Mixer") }),
1786
1878
  /* @__PURE__ */ e(
1787
1879
  "button",
1788
1880
  {
1789
- className: "add-button",
1881
+ className: "nice-live-streaming__add-button",
1790
1882
  onClick: () => {
1791
1883
  C(!0);
1792
1884
  },
1793
- disabled: h,
1885
+ disabled: v,
1794
1886
  children: "+ Add"
1795
1887
  }
1796
1888
  )
1797
1889
  ] }),
1798
- /* @__PURE__ */ t("div", { className: "audio-sources", children: [
1890
+ /* @__PURE__ */ t("div", { className: "nice-live-streaming__audio-sources", children: [
1799
1891
  s.sources.filter(
1800
- (a) => a.type === "microphone" || a.type === "system-audio" || a.type === "video"
1801
- ).map((a) => {
1802
- var r;
1803
- return /* @__PURE__ */ t("div", { className: "audio-source", children: [
1804
- /* @__PURE__ */ t("div", { className: "audio-header", children: [
1805
- /* @__PURE__ */ e("span", { className: "audio-icon", children: /* @__PURE__ */ e(
1806
- u,
1892
+ (i) => i.type === "microphone" || i.type === "system-audio" || i.type === "video"
1893
+ ).map((i) => {
1894
+ var c;
1895
+ return /* @__PURE__ */ t("div", { className: "nice-live-streaming__audio-source", children: [
1896
+ /* @__PURE__ */ t("div", { className: "nice-live-streaming__audio-header", children: [
1897
+ /* @__PURE__ */ e("span", { className: "nice-live-streaming__audio-icon", children: /* @__PURE__ */ e(
1898
+ m,
1807
1899
  {
1808
- name: ((r = se.find((l) => l.type === a.type)) == null ? void 0 : r.icon) ?? "box",
1900
+ name: ((c = ce.find((l) => l.type === i.type)) == null ? void 0 : c.icon) ?? "box",
1809
1901
  size: 16
1810
1902
  }
1811
1903
  ) }),
1812
- /* @__PURE__ */ e("span", { className: "audio-name", children: a.name }),
1904
+ /* @__PURE__ */ e("span", { className: "nice-live-streaming__audio-name", children: i.name }),
1813
1905
  /* @__PURE__ */ e(
1814
1906
  "button",
1815
1907
  {
1816
- className: a.muted ? "muted" : "",
1817
- onClick: () => x(a.id, { muted: !a.muted }),
1818
- children: /* @__PURE__ */ e(u, { name: a.muted ? "volume-off" : "volume", size: 14 })
1908
+ className: `nice-live-streaming__mute-toggle ${i.muted ? "nice-live-streaming__mute-toggle--muted" : ""}`,
1909
+ onClick: () => S(i.id, { muted: !i.muted }),
1910
+ children: /* @__PURE__ */ e(m, { name: i.muted ? "volume-off" : "volume", size: 14 })
1819
1911
  }
1820
1912
  )
1821
1913
  ] }),
1822
- /* @__PURE__ */ t("div", { className: "audio-slider", children: [
1914
+ /* @__PURE__ */ t("div", { className: "nice-live-streaming__audio-slider", children: [
1823
1915
  /* @__PURE__ */ e(
1824
1916
  "input",
1825
1917
  {
@@ -1827,100 +1919,100 @@ const ve = {
1827
1919
  min: "0",
1828
1920
  max: "1",
1829
1921
  step: "0.01",
1830
- value: a.volume ?? 1,
1831
- onChange: (l) => x(a.id, { volume: parseFloat(l.target.value) }),
1832
- disabled: a.muted
1922
+ value: i.volume ?? 1,
1923
+ onChange: (l) => S(i.id, { volume: parseFloat(l.target.value) }),
1924
+ disabled: i.muted
1833
1925
  }
1834
1926
  ),
1835
- /* @__PURE__ */ t("span", { className: "volume-value", children: [
1836
- Math.round((a.volume ?? 1) * 100),
1927
+ /* @__PURE__ */ t("span", { className: "nice-live-streaming__volume-value", children: [
1928
+ Math.round((i.volume ?? 1) * 100),
1837
1929
  "%"
1838
1930
  ] })
1839
1931
  ] }),
1840
- /* @__PURE__ */ e("div", { className: "audio-meter", children: /* @__PURE__ */ e(
1932
+ /* @__PURE__ */ e("div", { className: "nice-live-streaming__audio-meter", children: /* @__PURE__ */ e(
1841
1933
  "div",
1842
1934
  {
1843
- className: "meter-fill",
1844
- style: { width: `${(a.volume ?? 1) * 70 + Math.random() * 30}%` }
1935
+ className: "nice-live-streaming__meter-fill",
1936
+ style: { width: `${(i.volume ?? 1) * 70 + Math.random() * 30}%` }
1845
1937
  }
1846
1938
  ) })
1847
- ] }, a.id);
1939
+ ] }, i.id);
1848
1940
  }),
1849
1941
  s.sources.filter(
1850
- (a) => a.type === "microphone" || a.type === "system-audio"
1851
- ).length === 0 && /* @__PURE__ */ e("p", { className: "empty-message", children: "No audio sources added" })
1942
+ (i) => i.type === "microphone" || i.type === "system-audio"
1943
+ ).length === 0 && /* @__PURE__ */ e("p", { className: "nice-live-streaming__empty-message", children: r("liveStreaming.noAudioSourcesAdded", "No audio sources added") })
1852
1944
  ] })
1853
1945
  ] }),
1854
- y === "destinations" && /* @__PURE__ */ t("div", { className: "destinations-panel", children: [
1855
- /* @__PURE__ */ t("div", { className: "panel-header", children: [
1856
- /* @__PURE__ */ e("h3", { children: "Destinations" }),
1946
+ y === "destinations" && /* @__PURE__ */ t("div", { className: "nice-live-streaming__destinations-panel", children: [
1947
+ /* @__PURE__ */ t("div", { className: "nice-live-streaming__panel-header", children: [
1948
+ /* @__PURE__ */ e("h3", { children: r("liveStreaming.destinations", "Destinations") }),
1857
1949
  /* @__PURE__ */ e(
1858
1950
  "button",
1859
1951
  {
1860
- className: "add-button",
1861
- onClick: () => B(!0),
1862
- disabled: h,
1952
+ className: "nice-live-streaming__add-button",
1953
+ onClick: () => W(!0),
1954
+ disabled: v,
1863
1955
  children: "+ Add"
1864
1956
  }
1865
1957
  )
1866
1958
  ] }),
1867
- /* @__PURE__ */ t("div", { className: "destinations-list", children: [
1868
- s.destinations.map((a) => {
1869
- var r;
1870
- return /* @__PURE__ */ t("div", { className: "destination-item", children: [
1871
- /* @__PURE__ */ t("div", { className: "destination-header", children: [
1959
+ /* @__PURE__ */ t("div", { className: "nice-live-streaming__destinations-list", children: [
1960
+ s.destinations.map((i) => {
1961
+ var c;
1962
+ return /* @__PURE__ */ t("div", { className: "nice-live-streaming__destination-item", children: [
1963
+ /* @__PURE__ */ t("div", { className: "nice-live-streaming__destination-header", children: [
1872
1964
  /* @__PURE__ */ e(
1873
1965
  "span",
1874
1966
  {
1875
- className: "status-indicator",
1876
- style: { backgroundColor: ne(a.status) }
1967
+ className: "nice-live-streaming__status-indicator",
1968
+ style: { backgroundColor: re(i.status) }
1877
1969
  }
1878
1970
  ),
1879
- /* @__PURE__ */ e("span", { className: "destination-icon", children: /* @__PURE__ */ e(
1880
- u,
1971
+ /* @__PURE__ */ e("span", { className: "nice-live-streaming__destination-icon", children: /* @__PURE__ */ e(
1972
+ m,
1881
1973
  {
1882
- name: ((r = le.find((l) => l.platform === a.platform)) == null ? void 0 : r.icon) ?? "link",
1974
+ name: ((c = de.find((l) => l.platform === i.platform)) == null ? void 0 : c.icon) ?? "link",
1883
1975
  size: 16
1884
1976
  }
1885
1977
  ) }),
1886
- /* @__PURE__ */ e("span", { className: "destination-name", children: a.name }),
1887
- /* @__PURE__ */ t("label", { className: "toggle", children: [
1978
+ /* @__PURE__ */ e("span", { className: "nice-live-streaming__destination-name", children: i.name }),
1979
+ /* @__PURE__ */ t("label", { className: "nice-live-streaming__toggle", children: [
1888
1980
  /* @__PURE__ */ e(
1889
1981
  "input",
1890
1982
  {
1891
1983
  type: "checkbox",
1892
- checked: a.enabled,
1893
- onChange: (l) => j(a.id, { enabled: l.target.checked }),
1894
- disabled: h
1984
+ checked: i.enabled,
1985
+ onChange: (l) => Y(i.id, { enabled: l.target.checked }),
1986
+ disabled: v
1895
1987
  }
1896
1988
  ),
1897
- /* @__PURE__ */ e("span", { className: "toggle-slider" })
1989
+ /* @__PURE__ */ e("span", { className: "nice-live-streaming__toggle-slider" })
1898
1990
  ] })
1899
1991
  ] }),
1900
- /* @__PURE__ */ t("div", { className: "destination-config", children: [
1992
+ /* @__PURE__ */ t("div", { className: "nice-live-streaming__destination-config", children: [
1901
1993
  /* @__PURE__ */ t("label", { children: [
1902
- "Server URL",
1994
+ r("liveStreaming.serverUrl", "Server URL"),
1903
1995
  /* @__PURE__ */ e(
1904
1996
  "input",
1905
1997
  {
1906
1998
  type: "text",
1907
- value: a.url,
1908
- onChange: (l) => j(a.id, { url: l.target.value }),
1909
- placeholder: "rtmp://...",
1910
- disabled: h
1999
+ value: i.url,
2000
+ onChange: (l) => Y(i.id, { url: l.target.value }),
2001
+ placeholder: r("liveStreaming.rtmp", "rtmp://..."),
2002
+ disabled: v
1911
2003
  }
1912
2004
  )
1913
2005
  ] }),
1914
2006
  /* @__PURE__ */ t("label", { children: [
1915
- "Stream Key",
2007
+ r("liveStreaming.streamKey", "Stream Key"),
1916
2008
  /* @__PURE__ */ e(
1917
2009
  "input",
1918
2010
  {
1919
2011
  type: "password",
1920
- value: a.streamKey || "",
1921
- onChange: (l) => j(a.id, { streamKey: l.target.value }),
1922
- placeholder: "Enter stream key",
1923
- disabled: h
2012
+ value: i.streamKey || "",
2013
+ onChange: (l) => Y(i.id, { streamKey: l.target.value }),
2014
+ placeholder: r("liveStreaming.enterStreamKey", "Enter stream key"),
2015
+ disabled: v
1924
2016
  }
1925
2017
  )
1926
2018
  ] })
@@ -1928,40 +2020,40 @@ const ve = {
1928
2020
  /* @__PURE__ */ e(
1929
2021
  "button",
1930
2022
  {
1931
- className: "remove-button",
1932
- onClick: () => K(a.id),
1933
- disabled: h,
1934
- children: "Remove"
2023
+ className: "nice-live-streaming__remove-button",
2024
+ onClick: () => q(i.id),
2025
+ disabled: v,
2026
+ children: r("liveStreaming.remove", "Remove")
1935
2027
  }
1936
2028
  )
1937
- ] }, a.id);
2029
+ ] }, i.id);
1938
2030
  }),
1939
- s.destinations.length === 0 && /* @__PURE__ */ e("p", { className: "empty-message", children: "No destinations configured" })
2031
+ s.destinations.length === 0 && /* @__PURE__ */ e("p", { className: "nice-live-streaming__empty-message", children: r("liveStreaming.noDestinationsConfigured", "No destinations configured") })
1940
2032
  ] })
1941
2033
  ] }),
1942
- y === "settings" && /* @__PURE__ */ t("div", { className: "settings-panel", children: [
1943
- /* @__PURE__ */ t("div", { className: "setting-section", children: [
1944
- /* @__PURE__ */ e("h4", { children: "Video" }),
2034
+ y === "settings" && /* @__PURE__ */ t("div", { className: "nice-live-streaming__settings-panel", children: [
2035
+ /* @__PURE__ */ t("div", { className: "nice-live-streaming__setting-section", children: [
2036
+ /* @__PURE__ */ e("h4", { children: r("liveStreaming.video", "Video") }),
1945
2037
  /* @__PURE__ */ t("label", { children: [
1946
- "Resolution",
2038
+ r("liveStreaming.resolution", "Resolution"),
1947
2039
  /* @__PURE__ */ t(
1948
2040
  "select",
1949
2041
  {
1950
2042
  value: `${s.settings.video.resolution.width}x${s.settings.video.resolution.height}`,
1951
- onChange: (a) => {
1952
- const [r, l] = a.target.value.split("x").map(Number);
1953
- f({
2043
+ onChange: (i) => {
2044
+ const [c, l] = i.target.value.split("x").map(Number);
2045
+ _({
1954
2046
  settings: {
1955
2047
  ...s.settings,
1956
- video: { ...s.settings.video, resolution: { width: r, height: l } }
2048
+ video: { ...s.settings.video, resolution: { width: c, height: l } }
1957
2049
  },
1958
2050
  layout: {
1959
2051
  ...s.layout,
1960
- canvas: { ...s.layout.canvas, width: r, height: l }
2052
+ canvas: { ...s.layout.canvas, width: c, height: l }
1961
2053
  }
1962
2054
  });
1963
2055
  },
1964
- disabled: h,
2056
+ disabled: v,
1965
2057
  children: [
1966
2058
  /* @__PURE__ */ e("option", { value: "1920x1080", children: "1080p (1920x1080)" }),
1967
2059
  /* @__PURE__ */ e("option", { value: "1280x720", children: "720p (1280x720)" }),
@@ -1971,21 +2063,21 @@ const ve = {
1971
2063
  )
1972
2064
  ] }),
1973
2065
  /* @__PURE__ */ t("label", { children: [
1974
- "Frame Rate",
2066
+ r("liveStreaming.frameRate", "Frame Rate"),
1975
2067
  /* @__PURE__ */ t(
1976
2068
  "select",
1977
2069
  {
1978
2070
  value: s.settings.video.frameRate,
1979
- onChange: (a) => f({
2071
+ onChange: (i) => _({
1980
2072
  settings: {
1981
2073
  ...s.settings,
1982
2074
  video: {
1983
2075
  ...s.settings.video,
1984
- frameRate: parseInt(a.target.value)
2076
+ frameRate: parseInt(i.target.value)
1985
2077
  }
1986
2078
  }
1987
2079
  }),
1988
- disabled: h,
2080
+ disabled: v,
1989
2081
  children: [
1990
2082
  /* @__PURE__ */ e("option", { value: "24", children: "24 fps" }),
1991
2083
  /* @__PURE__ */ e("option", { value: "30", children: "30 fps" }),
@@ -2001,18 +2093,18 @@ const ve = {
2001
2093
  {
2002
2094
  type: "number",
2003
2095
  value: s.settings.video.bitrate,
2004
- onChange: (a) => f({
2096
+ onChange: (i) => _({
2005
2097
  settings: {
2006
2098
  ...s.settings,
2007
2099
  video: {
2008
2100
  ...s.settings.video,
2009
- bitrate: parseInt(a.target.value) || 6e3
2101
+ bitrate: parseInt(i.target.value) || 6e3
2010
2102
  }
2011
2103
  }
2012
2104
  }),
2013
2105
  min: "1000",
2014
2106
  max: "50000",
2015
- disabled: h
2107
+ disabled: v
2016
2108
  }
2017
2109
  )
2018
2110
  ] }),
@@ -2023,40 +2115,40 @@ const ve = {
2023
2115
  {
2024
2116
  type: "number",
2025
2117
  value: s.settings.video.keyframe,
2026
- onChange: (a) => f({
2118
+ onChange: (i) => _({
2027
2119
  settings: {
2028
2120
  ...s.settings,
2029
2121
  video: {
2030
2122
  ...s.settings.video,
2031
- keyframe: parseInt(a.target.value) || 2
2123
+ keyframe: parseInt(i.target.value) || 2
2032
2124
  }
2033
2125
  }
2034
2126
  }),
2035
2127
  min: "1",
2036
2128
  max: "10",
2037
- disabled: h
2129
+ disabled: v
2038
2130
  }
2039
2131
  )
2040
2132
  ] })
2041
2133
  ] }),
2042
- /* @__PURE__ */ t("div", { className: "setting-section", children: [
2043
- /* @__PURE__ */ e("h4", { children: "Audio" }),
2134
+ /* @__PURE__ */ t("div", { className: "nice-live-streaming__setting-section", children: [
2135
+ /* @__PURE__ */ e("h4", { children: r("liveStreaming.audio", "Audio") }),
2044
2136
  /* @__PURE__ */ t("label", { children: [
2045
- "Sample Rate",
2137
+ r("liveStreaming.sampleRate", "Sample Rate"),
2046
2138
  /* @__PURE__ */ t(
2047
2139
  "select",
2048
2140
  {
2049
2141
  value: s.settings.audio.sampleRate,
2050
- onChange: (a) => f({
2142
+ onChange: (i) => _({
2051
2143
  settings: {
2052
2144
  ...s.settings,
2053
2145
  audio: {
2054
2146
  ...s.settings.audio,
2055
- sampleRate: parseInt(a.target.value)
2147
+ sampleRate: parseInt(i.target.value)
2056
2148
  }
2057
2149
  }
2058
2150
  }),
2059
- disabled: h,
2151
+ disabled: v,
2060
2152
  children: [
2061
2153
  /* @__PURE__ */ e("option", { value: "44100", children: "44.1 kHz" }),
2062
2154
  /* @__PURE__ */ e("option", { value: "48000", children: "48 kHz" })
@@ -2070,13 +2162,13 @@ const ve = {
2070
2162
  "select",
2071
2163
  {
2072
2164
  value: s.settings.audio.bitrate,
2073
- onChange: (a) => f({
2165
+ onChange: (i) => _({
2074
2166
  settings: {
2075
2167
  ...s.settings,
2076
- audio: { ...s.settings.audio, bitrate: parseInt(a.target.value) }
2168
+ audio: { ...s.settings.audio, bitrate: parseInt(i.target.value) }
2077
2169
  }
2078
2170
  }),
2079
- disabled: h,
2171
+ disabled: v,
2080
2172
  children: [
2081
2173
  /* @__PURE__ */ e("option", { value: "96", children: "96 kbps" }),
2082
2174
  /* @__PURE__ */ e("option", { value: "128", children: "128 kbps" }),
@@ -2091,86 +2183,86 @@ const ve = {
2091
2183
  ] })
2092
2184
  ] })
2093
2185
  ] }),
2094
- h && /* @__PURE__ */ e("footer", { className: "streaming__footer", children: /* @__PURE__ */ t("div", { className: "footer-stats", children: [
2095
- /* @__PURE__ */ t("span", { className: "stat", children: [
2186
+ v && /* @__PURE__ */ e("footer", { className: "nice-live-streaming__footer", children: /* @__PURE__ */ t("div", { className: "nice-live-streaming__footer-stats", children: [
2187
+ /* @__PURE__ */ t("span", { className: "nice-live-streaming__stat", children: [
2096
2188
  /* @__PURE__ */ e("label", { children: "CPU" }),
2097
- /* @__PURE__ */ t("span", { className: "value", children: [
2189
+ /* @__PURE__ */ t("span", { className: "nice-live-streaming__value", children: [
2098
2190
  N.cpuUsage.toFixed(1),
2099
2191
  "%"
2100
2192
  ] })
2101
2193
  ] }),
2102
- /* @__PURE__ */ t("span", { className: "stat", children: [
2103
- /* @__PURE__ */ e("label", { children: "Memory" }),
2104
- /* @__PURE__ */ t("span", { className: "value", children: [
2194
+ /* @__PURE__ */ t("span", { className: "nice-live-streaming__stat", children: [
2195
+ /* @__PURE__ */ e("label", { children: r("liveStreaming.memory", "Memory") }),
2196
+ /* @__PURE__ */ t("span", { className: "nice-live-streaming__value", children: [
2105
2197
  N.memoryUsage.toFixed(1),
2106
2198
  "%"
2107
2199
  ] })
2108
2200
  ] }),
2109
- /* @__PURE__ */ t("span", { className: "stat", children: [
2110
- /* @__PURE__ */ e("label", { children: "Dropped" }),
2111
- /* @__PURE__ */ e("span", { className: "value", children: N.droppedFrames })
2201
+ /* @__PURE__ */ t("span", { className: "nice-live-streaming__stat", children: [
2202
+ /* @__PURE__ */ e("label", { children: r("liveStreaming.dropped", "Dropped") }),
2203
+ /* @__PURE__ */ e("span", { className: "nice-live-streaming__value", children: N.droppedFrames })
2112
2204
  ] }),
2113
- /* @__PURE__ */ t("span", { className: "stat", children: [
2114
- /* @__PURE__ */ e("label", { children: "Peak Viewers" }),
2115
- /* @__PURE__ */ e("span", { className: "value", children: N.peakViewers })
2205
+ /* @__PURE__ */ t("span", { className: "nice-live-streaming__stat", children: [
2206
+ /* @__PURE__ */ e("label", { children: r("liveStreaming.peakViewers", "Peak Viewers") }),
2207
+ /* @__PURE__ */ e("span", { className: "nice-live-streaming__value", children: N.peakViewers })
2116
2208
  ] })
2117
2209
  ] }) }),
2118
- O && /* @__PURE__ */ e("div", { className: "modal-overlay", children: /* @__PURE__ */ t("div", { className: "modal", children: [
2119
- /* @__PURE__ */ t("div", { className: "modal-header", children: [
2120
- /* @__PURE__ */ e("h3", { children: "Add Source" }),
2210
+ K && /* @__PURE__ */ e("div", { className: "nice-live-streaming__modal-overlay", children: /* @__PURE__ */ t("div", { className: "nice-live-streaming__modal", children: [
2211
+ /* @__PURE__ */ t("div", { className: "nice-live-streaming__modal-header", children: [
2212
+ /* @__PURE__ */ e("h3", { children: r("liveStreaming.addSource", "Add Source") }),
2121
2213
  /* @__PURE__ */ e(
2122
2214
  "button",
2123
2215
  {
2124
- "aria-label": "Close",
2125
- className: "close-button",
2216
+ "aria-label": r("liveStreaming.close", "Close"),
2217
+ className: "nice-live-streaming__close-button",
2126
2218
  onClick: () => C(!1),
2127
- children: /* @__PURE__ */ e(u, { name: "close", size: 16 })
2219
+ children: /* @__PURE__ */ e(m, { name: "close", size: 16 })
2128
2220
  }
2129
2221
  )
2130
2222
  ] }),
2131
- /* @__PURE__ */ e("div", { className: "modal-content", children: /* @__PURE__ */ e("div", { className: "source-type-grid", children: se.map((a) => /* @__PURE__ */ t(
2223
+ /* @__PURE__ */ e("div", { className: "nice-live-streaming__modal-content", children: /* @__PURE__ */ e("div", { className: "nice-live-streaming__source-type-grid", children: ce.map((i) => /* @__PURE__ */ t(
2132
2224
  "button",
2133
2225
  {
2134
- className: "source-type-button",
2135
- onClick: () => J(a.type),
2226
+ className: "nice-live-streaming__source-type-button",
2227
+ onClick: () => X(i.type),
2136
2228
  children: [
2137
- /* @__PURE__ */ e("span", { className: "icon", children: /* @__PURE__ */ e(u, { name: a.icon, size: 24 }) }),
2138
- /* @__PURE__ */ e("span", { className: "name", children: a.name })
2229
+ /* @__PURE__ */ e("span", { className: "nice-live-streaming__icon", children: /* @__PURE__ */ e(m, { name: i.icon, size: 24 }) }),
2230
+ /* @__PURE__ */ e("span", { className: "nice-live-streaming__name", children: i.name })
2139
2231
  ]
2140
2232
  },
2141
- a.type
2233
+ i.type
2142
2234
  )) }) })
2143
2235
  ] }) }),
2144
- q && /* @__PURE__ */ e("div", { className: "modal-overlay", children: /* @__PURE__ */ t("div", { className: "modal", children: [
2145
- /* @__PURE__ */ t("div", { className: "modal-header", children: [
2146
- /* @__PURE__ */ e("h3", { children: "Add Destination" }),
2236
+ G && /* @__PURE__ */ e("div", { className: "nice-live-streaming__modal-overlay", children: /* @__PURE__ */ t("div", { className: "nice-live-streaming__modal", children: [
2237
+ /* @__PURE__ */ t("div", { className: "nice-live-streaming__modal-header", children: [
2238
+ /* @__PURE__ */ e("h3", { children: r("liveStreaming.addDestination", "Add Destination") }),
2147
2239
  /* @__PURE__ */ e(
2148
2240
  "button",
2149
2241
  {
2150
- "aria-label": "Close",
2151
- className: "close-button",
2152
- onClick: () => B(!1),
2153
- children: /* @__PURE__ */ e(u, { name: "close", size: 16 })
2242
+ "aria-label": r("liveStreaming.close", "Close"),
2243
+ className: "nice-live-streaming__close-button",
2244
+ onClick: () => W(!1),
2245
+ children: /* @__PURE__ */ e(m, { name: "close", size: 16 })
2154
2246
  }
2155
2247
  )
2156
2248
  ] }),
2157
- /* @__PURE__ */ e("div", { className: "modal-content", children: /* @__PURE__ */ e("div", { className: "platform-grid", children: le.map((a) => /* @__PURE__ */ t(
2249
+ /* @__PURE__ */ e("div", { className: "nice-live-streaming__modal-content", children: /* @__PURE__ */ e("div", { className: "nice-live-streaming__platform-grid", children: de.map((i) => /* @__PURE__ */ t(
2158
2250
  "button",
2159
2251
  {
2160
- className: "platform-button",
2161
- onClick: () => F(a.platform),
2252
+ className: "nice-live-streaming__platform-button",
2253
+ onClick: () => V(i.platform),
2162
2254
  children: [
2163
- /* @__PURE__ */ e("span", { className: "icon", children: /* @__PURE__ */ e(u, { name: a.icon, size: 24 }) }),
2164
- /* @__PURE__ */ e("span", { className: "name", children: a.name })
2255
+ /* @__PURE__ */ e("span", { className: "nice-live-streaming__icon", children: /* @__PURE__ */ e(m, { name: i.icon, size: 24 }) }),
2256
+ /* @__PURE__ */ e("span", { className: "nice-live-streaming__name", children: i.name })
2165
2257
  ]
2166
2258
  },
2167
- a.platform
2259
+ i.platform
2168
2260
  )) }) })
2169
2261
  ] }) })
2170
2262
  ] });
2171
2263
  };
2172
2264
  export {
2173
- ze as NiceLiveStreaming,
2174
- Ie as NiceScreenRecorder,
2175
- Se as NiceVideoEditor
2265
+ Ie as NiceLiveStreaming,
2266
+ Te as NiceScreenRecorder,
2267
+ ze as NiceVideoEditor
2176
2268
  };