@nice2dev/ui-video 1.2.0 → 1.2.2

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