xvai-loi 0.1.36 → 0.1.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/co.txt +1 -1
  2. package/package.json +1 -1
  3. package/xvai-loi.js +189 -21
package/co.txt CHANGED
@@ -1 +1 @@
1
- xvaiLoi100025
1
+ xvaiLoi100118
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xvai-loi",
3
- "version": "0.1.36",
3
+ "version": "0.1.38",
4
4
  "description": "Loi dung video (Edit Video Tu Dong) nap vao tool Google Flow qua o cam engine/oCam.ts",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
package/xvai-loi.js CHANGED
@@ -9586,6 +9586,11 @@ function phongK(g, im, W4, H2, F, s) {
9586
9586
  g.drawImage(im, 0, 0, W4, H2);
9587
9587
  g.restore();
9588
9588
  }
9589
+ function tfE(g, W4, H2, F, s, yDau, k, zk = 1) {
9590
+ const cx = F ? (F[0] + F[2]) / 2 : 0.5, top = F ? F[1] : 0.2, se = (1 + (s - 1) * k) * zk, cxe = 0.5 + (cx - 0.5) * k, ye = top + (yDau - top) * k;
9591
+ g.translate(W4 / 2 - cxe * W4 * se, ye * H2 - top * H2 * se);
9592
+ g.scale(se, se);
9593
+ }
9589
9594
  function tf(g, W4, H2, F, s, yDau) {
9590
9595
  const cx = F ? (F[0] + F[2]) / 2 : 0.5, top = F ? F[1] : 0.2;
9591
9596
  g.translate(W4 / 2 - cx * W4 * s, yDau * H2 - top * H2 * s);
@@ -9824,9 +9829,10 @@ dangKy("cmNen", (g, d, tuoi, W4, H2, nen2, _s, dai2) => {
9824
9829
  if (a <= 0) return;
9825
9830
  g.save();
9826
9831
  g.globalAlpha = a;
9832
+ const kS = 1;
9827
9833
  const p = (d.bo === "card" || d.bo === "depth" || d.bo === "cut" && !d.anNguoi) && nen2 ? nguoi(nen2, W4, H2) : null;
9828
9834
  const hv = d.huong ?? -1, kv = 1 - Math.pow(1 - Math.min(1, tuoi / 0.35), 3), ox = hv === 0 ? -(1 - kv) * 0.3 * W4 : hv === 1 ? (1 - kv) * 0.3 * W4 : 0, oy = hv === 2 ? (1 - kv) * 0.1 * H2 : 0;
9829
- const zk = d.z && nen2 ? 1 + (d.z - 1) * (1 - eOut(Math.min(1, tuoi / 0.6))) : d.phong && nen2 ? 1 + (d.phong - 1) * (tuoi < 0.12 ? eOut(tuoi / 0.12) : 1 - eOut((tuoi - 0.42) / 0.33)) : 1;
9835
+ const zk = d.z && nen2 ? 1 + (d.z - 1) * (1 - eOut(Math.min(1, tuoi / 0.6))) : d.phong && nen2 ? 1 + (d.phong - 1) * (tuoi < 0.42 ? 1 : 1 - eOut((tuoi - 0.42) / 0.33)) : 1;
9830
9836
  if (d.bo === "card" || d.bo === "cut" || d.bo === "toi") {
9831
9837
  g.drawImage(nenCam(W4, H2, d.bo === "toi" || !!d.toiNen), 0, 0);
9832
9838
  if (d.bo === "card" && nen2) {
@@ -9844,7 +9850,7 @@ dangKy("cmNen", (g, d, tuoi, W4, H2, nen2, _s, dai2) => {
9844
9850
  g.save();
9845
9851
  bo(g, x, y, w, h, r);
9846
9852
  g.clip();
9847
- tf(g, W4, H2, F, s, d.yDau ?? 0.42);
9853
+ tfE(g, W4, H2, F, s, d.yDau ?? 0.42, kS);
9848
9854
  g.drawImage(nen2, 0, 0, W4, H2);
9849
9855
  g.restore();
9850
9856
  g.save();
@@ -9855,7 +9861,7 @@ dangKy("cmNen", (g, d, tuoi, W4, H2, nen2, _s, dai2) => {
9855
9861
  g.restore();
9856
9862
  if (p) {
9857
9863
  g.save();
9858
- tf(g, W4, H2, F, s, d.yDau ?? 0.42);
9864
+ tfE(g, W4, H2, F, s, d.yDau ?? 0.42, kS);
9859
9865
  g.drawImage(p, 0, 0, W4, H2);
9860
9866
  g.restore();
9861
9867
  }
@@ -9863,7 +9869,17 @@ dangKy("cmNen", (g, d, tuoi, W4, H2, nen2, _s, dai2) => {
9863
9869
  } else if (d.bo === "cut" && p && !d.anNguoi) {
9864
9870
  g.save();
9865
9871
  g.translate(ox, oy);
9866
- tf(g, W4, H2, F, (d.s || 1) * zk, d.yDau ?? 0.36);
9872
+ tfE(
9873
+ g,
9874
+ W4,
9875
+ H2,
9876
+ F,
9877
+ d.s || 1,
9878
+ d.yDau ?? 0.36,
9879
+ kS,
9880
+ zk
9881
+ /* 09/10 lát 2 ⑧: phóng chồng */
9882
+ );
9867
9883
  g.drawImage(p, 0, 0, W4, H2);
9868
9884
  g.restore();
9869
9885
  }
@@ -9883,8 +9899,8 @@ dangKy("cmNen", (g, d, tuoi, W4, H2, nen2, _s, dai2) => {
9883
9899
  tf(c, W4, H2, F, sb * 1.15, 0.45);
9884
9900
  c.drawImage(nen2, 0, 0, W4, H2);
9885
9901
  }, Math.round(0.012 * W4), "brightness(0.8)");
9886
- const kz = eOut(Math.min(1, tuoi / 0.3));
9887
- tf(g, W4, H2, F, (d.s || 1.05) * (1 - 0.3 * kz), 0.5 + 0.015 * kz);
9902
+ const kz = eOut(Math.min(1, tuoi / 0.5));
9903
+ tfE(g, W4, H2, F, (d.s || 1.05) * (1 - 0.3 * kz), 0.5 + 0.015 * kz, kS);
9888
9904
  g.drawImage(nen2, 0, 0, W4, H2);
9889
9905
  }
9890
9906
  g.restore();
@@ -9951,12 +9967,12 @@ dangKy("cmNen", (g, d, tuoi, W4, H2, nen2, _s, dai2) => {
9951
9967
  g.restore();
9952
9968
  }
9953
9969
  if (d.bo === "depth") {
9954
- chu2(g, d.giant, W4 / 2, (d.yChu ?? 0.24) * H2 + (d.z ? 0 : (1 - ka) * 70 * H2 / 1920), 190 * H2 / 1920, "giant", d.z ? 1 : kep12(tuoi / 0.2), 0.84 * W4);
9970
+ chu2(g, d.giant, W4 / 2, (d.yChu ?? 0.24) * H2 + (d.z ? 0 : (1 - ka) * 70 * H2 / 1920), 190 * (d.coChu || 1) * H2 / 1920, "giant", d.z ? 1 : kep12(tuoi / 0.2), 0.84 * W4);
9955
9971
  if (p) {
9956
9972
  if (zk > 1.001) phongK(g, p, W4, H2, F, zk);
9957
9973
  else g.drawImage(p, 0, 0, W4, H2);
9958
9974
  }
9959
- } else if (d.giant) chu2(g, d.giant, W4 / 2, (d.v3 ? 0.145 : d.bo === "toi" ? 0.4 : d.bo === "tron" ? 0.25 : 0.2) * H2 + (1 - ka) * 70 * H2 / 1920, (d.cam ? 190 : d.v3 ? 112 : 150) * H2 / 1920, d.cam ? "cam" : d.do ? "do" : "kw", kep12(tuoi / 0.06), 0.9 * W4);
9975
+ } else if (d.giant) chu2(g, d.giant, W4 / 2, (d.yChu ?? (d.v3 ? 0.145 : d.bo === "toi" ? 0.4 : d.bo === "tron" ? 0.25 : 0.2)) * H2 + (1 - ka) * 70 * H2 / 1920, (d.cam ? 190 : d.v3 ? 112 : 150) * (d.coChu || 1) * H2 / 1920, d.cam ? "cam" : d.do ? "do" : "kw", kep12(tuoi / 0.06), 0.9 * W4);
9960
9976
  if (d.chu2 && !(d.bo === "depth" && /\n/.test(String(d.giant || "")))) chu2(g, d.chu2, W4 / 2, (d.bo === "toi" ? 0.4 : d.bo === "depth" ? (d.yChu ?? 0.24) + 0.02 : d.bo === "tron" ? 0.25 : 0.2) * H2 + (/\n/.test(String(d.giant || "")) ? 290 : 150) * H2 / 1920, 96 * H2 / 1920 * (d.z ? 1 + 0.7 * (1 - eOut((tuoi - 0.35) / 0.35)) : 1), d.do2 ? "do" : d.bo === "cut" || d.bo === "tron" || d.bo === "toi" ? "kw" : "vang", kep12((tuoi - 0.35) / 0.15), 0.88 * W4);
9961
9977
  const vt = d.v3 && taiSan(d.v3), dl = String(d.giant || "").indexOf(String.fromCharCode(10)) >= 0;
9962
9978
  if (vt) {
@@ -10617,6 +10633,14 @@ function lapCuongMe(o) {
10617
10633
  const sp = [];
10618
10634
  let ctxSt = "";
10619
10635
  const IC = { tien: "xu", dongho: "dongho", canhbao: "canh", tich: "tich", bieudo: "bieu", tim: "tim", khong: "none" };
10636
+ const kTram = () => {
10637
+ try {
10638
+ const v = +(localStorage.getItem("xvaiTramDai") || 1);
10639
+ return v >= 1 && v <= 1.6 ? v : 1;
10640
+ } catch (e) {
10641
+ return 1;
10642
+ }
10643
+ };
10620
10644
  const UT = { moc: 100, card: 100, cta: 90, so: 80, ds: 70, anh: 60, chu: 50, vat: 50, bang: 40, test: 40, nhac: 20, phong: 10 };
10621
10645
  const ung = [], thuB = [], DOI_CHU = 2, minD = (d0) => Math.max(1.2, 0.6 * d0);
10622
10646
  const de = (f0, d0, x, doi = 0, ham) => {
@@ -10825,7 +10849,7 @@ function lapCuongMe(o) {
10825
10849
  if (x.kieu === "anh" && dV) {
10826
10850
  de(f2, dV, { uuTien: UT.anh, bo: "anh", ten: ten2, chu: chuK, chu2: chu22, keu: "whoosh", video: 1 }, 3, datAnh);
10827
10851
  ghiL("video", { bo: "anh", f: f2, d: dV }, "kho video: ung vien clip " + dV.toFixed(1) + " s thay anh: " + String(x.tu || ""));
10828
- } else if (x.kieu === "anh") de(f2, f2 < f1 ? 2 : 2.4, { uuTien: UT.anh, ...co ? [{ bo: "anh", ten: ten2, chu: chuK, chu2: chu22, keu: "whoosh" }, { bo: "chia", ten: ten2, chu: chuK, keu: "whoosh" }, { bo: "anh", ten: ten2, chu: chuK, chu2: chu22, pip: 1, keu: "whoosh" }][nAnh++ % 3] : { bo: "kinh", dong: [chuK, chu22].filter(Boolean), keu: "whoosh" } }, 3, datAnh);
10852
+ } else if (x.kieu === "anh") de(f2, (f2 < f1 ? 2 : 2.4) * kTram(), { uuTien: UT.anh, ...co ? [{ bo: "anh", ten: ten2, chu: chuK, chu2: chu22, keu: "whoosh" }, { bo: "chia", ten: ten2, chu: chuK, keu: "whoosh" }, { bo: "anh", ten: ten2, chu: chuK, chu2: chu22, pip: 1, keu: "whoosh" }][nAnh++ % 3] : { bo: "kinh", dong: [chuK, chu22].filter(Boolean), keu: "whoosh" } }, 3, datAnh);
10829
10853
  else if (x.kieu === "vat") {
10830
10854
  const LG = timLogo(suaChu(chuK + " " + sach2(String(x.tu || ""))))[0];
10831
10855
  if (LG) napHinhLogo(LG.slug);
@@ -11337,7 +11361,7 @@ function lapCuongMe(o) {
11337
11361
  }
11338
11362
  return t1 - t0;
11339
11363
  };
11340
- for (const dd of [2.2, 1.8]) for (let f2 = f0; f2 <= m.b - dd - 0.5 + 1e-6; f2 += 0.25) {
11364
+ for (const dd of [2.2 * kTram(), 1.8]) for (let f2 = f0; f2 <= m.b - dd - 0.5 + 1e-6; f2 += 0.25) {
11341
11365
  const fr = +f2.toFixed(2);
11342
11366
  if (gioLogo(fr - 0.1, fr + dd) >= 0 || lien(fr, fr + dd) > 6) continue;
11343
11367
  if (dat(fr, dd, { uuTien: UT.anh, bo: "chia", ten: tk, keu: "whoosh-nhanh" }, 0, 0.01)) {
@@ -11519,6 +11543,16 @@ function lapCuongMe(o) {
11519
11543
  s.dSua = 1;
11520
11544
  nS++;
11521
11545
  }
11546
+ if (typeof e.yChu === "number" && e.yChu >= 0.05 && e.yChu <= 0.6) {
11547
+ s.yChu = e.yChu;
11548
+ s.khoa = 1;
11549
+ nS++;
11550
+ }
11551
+ if (typeof e.coChu === "number" && e.coChu >= 0.5 && e.coChu <= 1.6) {
11552
+ s.coChu = e.coChu;
11553
+ s.khoa = 1;
11554
+ nS++;
11555
+ }
11522
11556
  if (typeof e.f === "number" && e.f >= 0) {
11523
11557
  s.f = e.f;
11524
11558
  nS++;
@@ -11540,7 +11574,7 @@ function lapCuongMe(o) {
11540
11574
  G2.__lichSuaDaAp = nS;
11541
11575
  ghiL("bo", { bo: "sua-tay" }, "sua tay: " + nS + " truong");
11542
11576
  }
11543
- G2.__lichSp = sp.map((s, i) => ({ i, id: s.id, f: +s.f.toFixed(2), d: +s.d.toFixed(2), bo: s.bo, giant: s.giant || "", chu: s.chu || "", chu2: s.chu2 || "", st: s.st || "", ten: s.ten || "", tieu: s.tieu || "", khoa: s.khoa ? 1 : 0 }));
11577
+ G2.__lichSp = sp.map((s, i) => ({ i, id: s.id, yChu: s.yChu, coChu: s.coChu, f: +s.f.toFixed(2), d: +s.d.toFixed(2), bo: s.bo, giant: s.giant || "", chu: s.chu || "", chu2: s.chu2 || "", st: s.st || "", ten: s.ten || "", tieu: s.tieu || "", khoa: s.khoa ? 1 : 0 }));
11544
11578
  }
11545
11579
  bc = "B7 phat the";
11546
11580
  const stTr = { n: 0 }, keuTr = {};
@@ -11565,7 +11599,7 @@ function lapCuongMe(o) {
11565
11599
  bo: s.bo,
11566
11600
  F: Fs,
11567
11601
  s: s.bo === "card" ? sF(Fs, 0.38) : sF(Fs, 0.36),
11568
- yDau: s.bo === "card" ? s.doc || s.tieuDoc ? 0.56 : 0.46 : s.hang || s.vat ? 0.5 : 0.36,
11602
+ yDau: s.bo === "card" ? s.doc || s.tieuDoc ? 0.61 : 0.46 : s.hang || s.vat ? 0.5 : 0.36,
11569
11603
  giant: s.giant,
11570
11604
  tieu: s.tieu,
11571
11605
  so: s.so,
@@ -11588,6 +11622,7 @@ function lapCuongMe(o) {
11588
11622
  toiNen: s.toiNen,
11589
11623
  do2: s.chu2 && /tốn|mất|mỏi|khổ|oan|sai|lỗi|đau|chậm|còng|dừng|đừng|cực/.test((String(s.giant || "") + " " + String(s.chu2)).toLocaleLowerCase("vi")) ? 1 : 0,
11590
11624
  z: s.z,
11625
+ coChu: s.coChu,
11591
11626
  phong: s.phong,
11592
11627
  ra: s.ra,
11593
11628
  chu2: s.chu2,
@@ -11782,7 +11817,29 @@ var mau6 = (HO2) => {
11782
11817
  vao: { dich: "trang", kieu: "hienNgay", kieuNhan: "hienNgay", ms: 0, msNhan: 0 },
11783
11818
  viTri: { x: 0.5, y: 0.72 },
11784
11819
  ghiChu: "\u{1F7E1} 06/10 \u0111\xEAm: port template CUONGME (phi\xEAn m\xE1y kh\xE1c) \u2014 ch\u1EDD \u0111o + T\xFA xem.",
11785
- doan: { khungTheoNguon: true, khoi: { mo: { ve: "cmNen", lap: (o) => lapCuongMe(o) } }, lich: {}, taiSan: {}, nhac: ["vui", 0.2], nang: [], nhe: [], xeBao: false, am: false, nap, tieuDe: { phong: "Be Vietnam Pro", dam: 900 }, phong: "Be Vietnam Pro", dam: 900 }
11820
+ doan: {
11821
+ khungTheoNguon: true,
11822
+ khoi: { mo: { ve: "cmNen", lap: (o) => lapCuongMe(o) } },
11823
+ lich: {},
11824
+ taiSan: {},
11825
+ nhac: [(() => {
11826
+ try {
11827
+ const v = localStorage.getItem("xvaiNhac");
11828
+ return v && ["vui", "tincay", "camxuc", "sangtrong", "dondap", "nhe"].includes(v) ? v : "vui";
11829
+ } catch (e) {
11830
+ return "vui";
11831
+ }
11832
+ })(), 0.2],
11833
+ /* 10/10 K2: tuỳ chọn xvaiNhac (mặc định giữ 'vui' 112 BPM; đối thủ ~81 BPM → thử 'nhe' 84 / 'sangtrong' 88) */
11834
+ nang: [],
11835
+ nhe: [],
11836
+ xeBao: false,
11837
+ am: false,
11838
+ nap,
11839
+ tieuDe: { phong: "Be Vietnam Pro", dam: 900 },
11840
+ phong: "Be Vietnam Pro",
11841
+ dam: 900
11842
+ }
11786
11843
  }];
11787
11844
  };
11788
11845
 
@@ -12884,7 +12941,13 @@ async function renderNhanh(ff, clips, files, audio, cards, nen2, options, paint,
12884
12941
  gn.scale(m, m);
12885
12942
  gn.translate(-X, -Y);
12886
12943
  }
12887
- gn.drawImage(fr.canvas, ox, oy, sw * kz, sh * kz);
12944
+ {
12945
+ const mau7 = fx0.mau || {}, sg = +mau7.sang || +fx0.sang || 1, tp = +mau7.tuongPhan || 1, bh = +mau7.baoHoa || 1, am = +mau7.am || 0;
12946
+ const fS = (sg !== 1 ? "brightness(" + sg.toFixed(2) + ") " : "") + (tp !== 1 ? "contrast(" + tp.toFixed(2) + ") " : "") + (bh !== 1 ? "saturate(" + bh.toFixed(2) + ") " : "") + (am ? "sepia(" + Math.min(0.6, Math.abs(am)).toFixed(2) + ") " : "");
12947
+ if (fS) gn.filter = fS.trim();
12948
+ gn.drawImage(fr.canvas, ox, oy, sw * kz, sh * kz);
12949
+ if (fS) gn.filter = "none";
12950
+ }
12888
12951
  if (xo) gn.restore();
12889
12952
  if (dep && rang) {
12890
12953
  const ts2 = c.trimStart + u;
@@ -16008,6 +16071,35 @@ function qcBaoCao(project, seconds) {
16008
16071
  return "Phim " + dur.toFixed(1) + " s \xB7 xu\u1EA5t " + Math.round(seconds) + " s \xB7 " + subs.length + " trang ch\u1EEF (t\u1ED1i \u0111a " + maxWords + " t\u1EEB) \xB7 " + pills.length + " th\u1EBB nh\u1EA5n \xB7 " + ills.length + " \u1EA3nh (" + (dur ? Math.round(illSec / dur * 100) : 0) + " % th\u1EDDi l\u01B0\u1EE3ng) \xB7 ch\u1EEF n\xE9 m\u1EB7t " + placed + "/" + (subs.length + pills.length) + " \xB7 hook 3 s: " + (hook ? "c\xF3" : "kh\xF4ng") + " \xB7 ch\u1ED1ng rung " + (fx.stabilize ?? 1) + " \xB7 l\xE0m \u0111\u1EB9p " + (fx.beauty ?? 2) + " \xB7 s\u1EA1ch ti\u1EBFng " + (fx.voice ?? 1) + " \xB7 r\u0103ng " + (fx.teeth ?? 1 ? "b\u1EADt" : "t\u1EAFt") + " \xB7 r\xFAt l\u1EB7ng " + rut.toFixed(1) + " s" + mau7;
16009
16072
  }
16010
16073
 
16074
+ // flow-src/engine/lichV2.ts
16075
+ var idCanh = (f2, bo4) => Math.round(f2 * 10) + "-" + bo4;
16076
+ function tuSp(duAn, sp, sua, daiS) {
16077
+ const canh = (sp || []).map((s) => ({ id: s.id || idCanh(s.f, s.bo), f: +(+s.f).toFixed(2), d: +(+s.d).toFixed(2), bo: s.bo, giant: s.giant || "", chu: s.chu || "", chu2: s.chu2 || "", st: s.st || "", ten: s.ten || "", tieu: s.tieu || "", aiTao: s.khoa ? 0 : 1, khoa: s.khoa ? 1 : 0 }));
16078
+ for (const t of sua && Array.isArray(sua.them) ? sua.them : []) if (t && typeof t.f === "number") canh.push({ id: idCanh(t.f, t.bo || "depth"), f: +(+t.f).toFixed(2), d: +(+t.d).toFixed(2), bo: t.bo || "depth", giant: t.giant || "", chu: t.chu || "", ten: t.ten || "", aiTao: 0, khoa: 1, moi: 1 });
16079
+ canh.sort((a, b) => a.f - b.f);
16080
+ const ts2 = /* @__PURE__ */ new Map();
16081
+ for (const c of canh) if (c.ten) ts2.set(c.ten, { ten: c.ten, loai: "anh" });
16082
+ return { v: 2, duAn, luc: Date.now(), nguon: { daiS: +daiS.toFixed(2) }, quyetDinh: { canh }, taiSan: [...ts2.values()] };
16083
+ }
16084
+ function veSua(l) {
16085
+ const sua = {};
16086
+ const them = [];
16087
+ for (const c of l.quyetDinh.canh) {
16088
+ if (!c.khoa) continue;
16089
+ if (c.moi) {
16090
+ them.push({ f: c.f, d: c.d, bo: c.bo, giant: c.giant, chu: c.chu, ten: c.ten });
16091
+ continue;
16092
+ }
16093
+ const e = {};
16094
+ for (const k of ["giant", "chu", "chu2", "st", "ten", "tieu"]) if (c[k]) e[k] = c[k];
16095
+ e.d = c.d;
16096
+ e.f = c.f;
16097
+ sua[c.id] = e;
16098
+ }
16099
+ if (them.length) sua.them = them;
16100
+ return sua;
16101
+ }
16102
+
16011
16103
  // flow-src/utils.ts
16012
16104
  var sanitizeFilename = (name) => {
16013
16105
  const str = name.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/[đĐ]/g, "d").replace(/([^0-9a-z-\s])/g, "").replace(/(\s+)/g, "-").replace(/-+/g, "-").replace(/^-+|-+$/g, "");
@@ -17375,7 +17467,18 @@ async function handleExport(currentProject, setExporting, setExportedBlob, addLo
17375
17467
  async function handleExportProject(currentProject, showToast) {
17376
17468
  if (!currentProject) return;
17377
17469
  try {
17378
- const data = JSON.stringify(currentProject, null, 2);
17470
+ const G = globalThis;
17471
+ let lichV2 = void 0;
17472
+ try {
17473
+ if (Array.isArray(G.__lichSp) && G.__lichSp.length) {
17474
+ const tl = currentProject.timeline || [];
17475
+ const dai2 = tl.reduce((a, c) => a + Math.max(0, (+c.trimEnd || 0) - (+c.trimStart || 0)), 0);
17476
+ lichV2 = tuSp(currentProject.name || currentProject.id, G.__lichSp, G.__lichSua, dai2);
17477
+ G.__lichV2 = lichV2;
17478
+ }
17479
+ } catch (e) {
17480
+ }
17481
+ const data = JSON.stringify(lichV2 ? { ...currentProject, lichV2 } : currentProject, null, 2);
17379
17482
  const base64 = btoa(unescape(encodeURIComponent(data)));
17380
17483
  const filename = `project-${currentProject.id.slice(0, 8)}.json`;
17381
17484
  await Flow.download({ base64, mimeType: "application/json", filename });
@@ -18653,7 +18756,7 @@ var StudioEdit = ({ project, setProject, exporting, blob, onExport, onDownload,
18653
18756
  W3.__mauPhuDe = mau7 ? sua ? mau7 + "-sua" : mau7 : "";
18654
18757
  W3.__theoMauKhoi = !!(mau7 && layMau(mau7)?.doan?.khoi);
18655
18758
  W3.__xuatNhanh = nhanh;
18656
- setProject((c) => c ? { ...c, studioFx: { stabilize: fx.rung ? 3 : 0, beauty: fx.dep ? 2 : 0, voice: fx.tieng ? 1 : 0, teeth: fx.rang ? 1 : 0 } } : c);
18759
+ setProject((c) => c ? { ...c, studioFx: { ...c.studioFx || {}, stabilize: fx.rung ? 3 : 0, beauty: fx.dep ? 2 : 0, voice: fx.tieng ? 1 : 0, teeth: fx.rang ? 1 : 0 } } : c);
18657
18760
  };
18658
18761
  const lamPro = async () => {
18659
18762
  let a = W3.__proApi;
@@ -18967,7 +19070,7 @@ async function napLoi(d) {
18967
19070
  return "LOI: " + String(e && e.message || e).slice(0, 300);
18968
19071
  }
18969
19072
  }
18970
- var LOI_URL = "https://cdn.jsdelivr.net/npm/xvai-loi@0.1.35/nap.js";
19073
+ var LOI_URL = "https://cdn.jsdelivr.net/npm/xvai-loi@0.1.37/nap.js";
18971
19074
  var TRONG_LOI = !!globalThis.__xvaiReact;
18972
19075
  try {
18973
19076
  if (!TRONG_LOI) setTimeout(() => {
@@ -18997,7 +19100,7 @@ function datCauLenh(a) {
18997
19100
  on2 = true;
18998
19101
  window.addEventListener("message", async (ev) => {
18999
19102
  const d = ev.data;
19000
- if (!d || d.xvaiLoi100025 !== true) return;
19103
+ if (!d || d.xvaiLoi100118 !== true) return;
19001
19104
  const o = String(ev.origin || "");
19002
19105
  if (!(o.indexOf("https://flow.google.com") === 0 || o.indexOf("https://labs.google") === 0)) return;
19003
19106
  const tra = (kq) => {
@@ -19152,6 +19255,67 @@ var SuaLich = ({ ten, onDong }) => {
19152
19255
  setBao("\u0110\xE3 n\u1EA1p b\u1EA3n " + new Date(t).toTimeString().slice(0, 5) + " \xB7 b\u1EA5m V\u1EBD l\u1EA1i \u0111\u1EC3 \xE1p");
19153
19256
  }
19154
19257
  };
19258
+ const moDuAn = async (f2) => {
19259
+ if (!f2) return;
19260
+ try {
19261
+ const j = JSON.parse(await f2.text());
19262
+ const l = j && (j.lichV2 || (j.v === 2 && j.quyetDinh ? j : null));
19263
+ if (!l) {
19264
+ setBao("T\u1EC7p kh\xF4ng c\xF3 lichV2 (l\u01B0u b\u1EB1ng n\xFAt L\u01B0u d\u1EF1 \xE1n t\u1EEB 0.1.37)");
19265
+ return;
19266
+ }
19267
+ const n = veSua(l);
19268
+ setSua(n);
19269
+ G.__lichSua = n;
19270
+ await ghiDem("lichSua:" + ten, { sua: n });
19271
+ setBao("\u0110\xE3 m\u1EDF " + l.quyetDinh.canh.filter((c) => c.khoa).length + " c\u1EA3nh s\u1EEDa tay t\u1EEB " + f2.name + " \xB7 b\u1EA5m V\u1EBD l\u1EA1i \u0111\u1EC3 \xE1p");
19272
+ } catch (e) {
19273
+ setBao("Kh\xF4ng \u0111\u1ECDc \u0111\u01B0\u1EE3c t\u1EC7p: " + String(e && e.message || e).slice(0, 80));
19274
+ }
19275
+ };
19276
+ const taiTep = async (ten2, text2, mime) => {
19277
+ const base64 = btoa(unescape(encodeURIComponent(text2)));
19278
+ try {
19279
+ await Flow.download({ base64, mimeType: mime, filename: ten2 });
19280
+ setBao("\u0110\xE3 t\u1EA3i " + ten2 + " (" + Math.round(text2.length / 1024) + " KB)");
19281
+ } catch (e) {
19282
+ setBao("Kh\xF4ng t\u1EA3i \u0111\u01B0\u1EE3c: " + String(e && e.message || e).slice(0, 80));
19283
+ }
19284
+ };
19285
+ const taiLich = () => {
19286
+ const p = G.__loiApp && G.__loiApp.p;
19287
+ const tl = p && p.timeline || [];
19288
+ const dai2 = tl.reduce((a, c) => a + Math.max(0, (+c.trimEnd || 0) - (+c.trimStart || 0)), 0);
19289
+ const l = tuSp(ten, G.__lichSp || [], sua, dai2);
19290
+ taiTep("lich-" + ten.replace(/[^\w-]+/g, "_").slice(0, 40) + ".json", JSON.stringify(l, null, 1), "application/json");
19291
+ };
19292
+ const taiSrt = () => {
19293
+ const p = G.__loiApp && G.__loiApp.p;
19294
+ const cues = [];
19295
+ for (const sc of p && p.timeline || []) for (const m of sc.text_moments || []) if (m && m.kind === "sub" && m.text) cues.push({ t0: +m.t0 - (+sc.trimStart || 0), t1: +m.t1 - (+sc.trimStart || 0), text: String(m.text) });
19296
+ cues.sort((a, b) => a.t0 - b.t0);
19297
+ const hh = (t) => {
19298
+ t = Math.max(0, t);
19299
+ const h = Math.floor(t / 3600), m = Math.floor(t % 3600 / 60), s2 = Math.floor(t % 60), ms = Math.round((t - Math.floor(t)) * 1e3);
19300
+ return String(h).padStart(2, "0") + ":" + String(m).padStart(2, "0") + ":" + String(s2).padStart(2, "0") + "," + String(ms).padStart(3, "0");
19301
+ };
19302
+ if (!cues.length) {
19303
+ setBao("Ch\u01B0a c\xF3 ph\u1EE5 \u0111\u1EC1 (ch\u1EA1y L\xE0m pro tr\u01B0\u1EDBc)");
19304
+ return;
19305
+ }
19306
+ taiTep("phu-de-" + ten.replace(/[^\w-]+/g, "_").slice(0, 40) + ".srt", cues.map((c, i) => i + 1 + "\n" + hh(c.t0) + " --> " + hh(c.t1) + "\n" + c.text + "\n").join("\n"), "text/plain");
19307
+ };
19308
+ const fx0 = G.__loiApp && G.__loiApp.p && G.__loiApp.p.studioFx || {};
19309
+ const m0 = fx0.mau || {};
19310
+ const [fx, setFx] = useState({ sang: +m0.sang || +fx0.sang || 1, tuongPhan: +m0.tuongPhan || 1, baoHoa: +m0.baoHoa || 1, am: +m0.am || 0 });
19311
+ const datFx = (k, v) => {
19312
+ const n = { ...fx, [k]: v };
19313
+ setFx(n);
19314
+ if (typeof G.__loiSetP === "function") {
19315
+ G.__loiSetP((c) => c ? { ...c, studioFx: { ...c.studioFx || {}, mau: n } } : c);
19316
+ setBao("M\xE0u c\u1EA3 b\xE0i: s\xE1ng " + (+n.sang).toFixed(2) + " \xB7 t\u01B0\u01A1ng ph\u1EA3n " + (+n.tuongPhan).toFixed(2) + " \xB7 t\u01B0\u01A1i " + (+n.baoHoa).toFixed(2) + " \xB7 \u1EA5m " + (+n.am).toFixed(2) + " \u2192 b\u1EA5m Xu\u1EA5t l\u1EA1i");
19317
+ }
19318
+ };
19155
19319
  const themCanh = () => {
19156
19320
  if (!(them.d > 0.3)) return;
19157
19321
  const n = { ...sua, them: [...sua.them || [], { ...them, f: +them.f, d: +them.d }] };
@@ -19179,15 +19343,18 @@ var SuaLich = ({ ten, onDong }) => {
19179
19343
  setDs(G.__lichSp || []);
19180
19344
  } }, "N\u1EA1p l\u1EA1i"), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: onDong }, "\u0110\xF3ng"), ls.length ? /* @__PURE__ */ shim_react_default.createElement("select", { className: "bg-[#0B1A2D] border border-[#2C4A73] rounded px-1 text-[11px]", value: "", onChange: (ev) => {
19181
19345
  if (ev.target.value) napBan(+ev.target.value);
19182
- } }, /* @__PURE__ */ shim_react_default.createElement("option", { value: "" }, "b\u1EA3n c\u0169\u2026"), ls.map((t) => /* @__PURE__ */ shim_react_default.createElement("option", { key: t, value: t }, new Date(t).toLocaleString("vi")))) : null), /* @__PURE__ */ shim_react_default.createElement("div", { className: "flex items-center gap-1 mb-2 text-[11px] flex-wrap" }, /* @__PURE__ */ shim_react_default.createElement("span", { className: "text-[#A2B2C9]" }, "Th\xEAm c\u1EA3nh:"), /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-12 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", type: "number", step: "0.1", value: them.f, onChange: (ev) => setThem({ ...them, f: ev.target.value }), title: "gi\xE2y \u0111\u1EA7u" }), /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-12 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", type: "number", step: "0.1", value: them.d, onChange: (ev) => setThem({ ...them, d: ev.target.value }), title: "d\xE0i (s)" }), /* @__PURE__ */ shim_react_default.createElement("select", { className: "bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: them.bo, onChange: (ev) => setThem({ ...them, bo: ev.target.value }) }, /* @__PURE__ */ shim_react_default.createElement("option", { value: "depth" }, "ch\u1EEF nh\u1EA5n"), /* @__PURE__ */ shim_react_default.createElement("option", { value: "anh" }, "\u1EA3nh to\xE0n khung"), /* @__PURE__ */ shim_react_default.createElement("option", { value: "cut" }, "c\u1EAFt ch\u1EEF"), /* @__PURE__ */ shim_react_default.createElement("option", { value: "tron" }, "\xF4 tr\xF2n")), /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-28 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", placeholder: "ch\u1EEF nh\u1EA5n", value: them.giant, onChange: (ev) => setThem({ ...them, giant: ev.target.value }) }), /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-24 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", placeholder: "\u1EA3nh: trang:\u2026", value: them.ten, onChange: (ev) => setThem({ ...them, ten: ev.target.value }) }), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: themCanh }, "+ Th\xEAm"), (sua.them || []).length ? /* @__PURE__ */ shim_react_default.createElement("span", { className: "text-[#F6D178]" }, (sua.them || []).length, " c\u1EA3nh th\xEAm") : null), /* @__PURE__ */ shim_react_default.createElement("div", { className: "max-h-[60vh] overflow-auto" }, /* @__PURE__ */ shim_react_default.createElement("table", { className: "w-full text-[11px]" }, /* @__PURE__ */ shim_react_default.createElement("thead", null, /* @__PURE__ */ shim_react_default.createElement("tr", { className: "text-[#A2B2C9]" }, /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "#"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "gi\xE2y"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "b\u1ED1 c\u1EE5c"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "\u0111\u1EA7u/d\xE0i (s)"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "ch\u1EEF nh\u1EA5n"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "ch\u1EEF ph\u1EE5"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "icon"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "\u1EA3nh (t\xEAn kho)"), /* @__PURE__ */ shim_react_default.createElement("th", null, "xo\xE1"))), /* @__PURE__ */ shim_react_default.createElement("tbody", null, ds2.map((s) => {
19346
+ } }, /* @__PURE__ */ shim_react_default.createElement("option", { value: "" }, "b\u1EA3n c\u0169\u2026"), ls.map((t) => /* @__PURE__ */ shim_react_default.createElement("option", { key: t, value: t }, new Date(t).toLocaleString("vi")))) : null), /* @__PURE__ */ shim_react_default.createElement("div", { className: "flex items-center gap-2 mb-2 text-[11px] flex-wrap" }, /* @__PURE__ */ shim_react_default.createElement("span", { className: "text-[#A2B2C9]" }, "M\xE0u c\u1EA3 b\xE0i:"), /* @__PURE__ */ shim_react_default.createElement("label", { className: "flex items-center gap-1" }, "s\xE1ng ", /* @__PURE__ */ shim_react_default.createElement("input", { type: "range", min: "0.7", max: "1.4", step: "0.05", value: fx.sang, onChange: (ev) => datFx("sang", +ev.target.value), className: "w-20" }), " ", (+fx.sang).toFixed(2)), /* @__PURE__ */ shim_react_default.createElement("label", { className: "flex items-center gap-1" }, "t\u01B0\u01A1ng ph\u1EA3n ", /* @__PURE__ */ shim_react_default.createElement("input", { type: "range", min: "0.7", max: "1.4", step: "0.05", value: fx.tuongPhan, onChange: (ev) => datFx("tuongPhan", +ev.target.value), className: "w-20" }), " ", (+fx.tuongPhan).toFixed(2)), /* @__PURE__ */ shim_react_default.createElement("label", { className: "flex items-center gap-1" }, "t\u01B0\u01A1i ", /* @__PURE__ */ shim_react_default.createElement("input", { type: "range", min: "0.5", max: "1.6", step: "0.05", value: fx.baoHoa, onChange: (ev) => datFx("baoHoa", +ev.target.value), className: "w-20" }), " ", (+fx.baoHoa).toFixed(2)), /* @__PURE__ */ shim_react_default.createElement("label", { className: "flex items-center gap-1" }, "\u1EA5m ", /* @__PURE__ */ shim_react_default.createElement("input", { type: "range", min: "0", max: "0.4", step: "0.05", value: fx.am, onChange: (ev) => datFx("am", +ev.target.value), className: "w-20" }), " ", (+fx.am).toFixed(2)), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: () => {
19347
+ setFx({ sang: 1, tuongPhan: 1, baoHoa: 1, am: 0 });
19348
+ datFx("sang", 1);
19349
+ } }, "V\u1EC1 g\u1ED1c"), /* @__PURE__ */ shim_react_default.createElement("span", { className: "text-[#A2B2C9]" }, "(ch\u1ED1ng rung \xB7 l\xE0m \u0111\u1EB9p \xB7 ti\u1EBFng \xB7 r\u0103ng: 4 c\xF4ng t\u1EAFc \u1EDF b\u1EA3ng L\xE0m pro)")), /* @__PURE__ */ shim_react_default.createElement("div", { className: "flex items-center gap-1 mb-2 text-[11px] flex-wrap" }, /* @__PURE__ */ shim_react_default.createElement("span", { className: "text-[#A2B2C9]" }, "Th\xEAm c\u1EA3nh:"), /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-12 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", type: "number", step: "0.1", value: them.f, onChange: (ev) => setThem({ ...them, f: ev.target.value }), title: "gi\xE2y \u0111\u1EA7u" }), /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-12 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", type: "number", step: "0.1", value: them.d, onChange: (ev) => setThem({ ...them, d: ev.target.value }), title: "d\xE0i (s)" }), /* @__PURE__ */ shim_react_default.createElement("select", { className: "bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: them.bo, onChange: (ev) => setThem({ ...them, bo: ev.target.value }) }, /* @__PURE__ */ shim_react_default.createElement("option", { value: "depth" }, "ch\u1EEF nh\u1EA5n"), /* @__PURE__ */ shim_react_default.createElement("option", { value: "anh" }, "\u1EA3nh to\xE0n khung"), /* @__PURE__ */ shim_react_default.createElement("option", { value: "cut" }, "c\u1EAFt ch\u1EEF"), /* @__PURE__ */ shim_react_default.createElement("option", { value: "tron" }, "\xF4 tr\xF2n")), /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-28 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", placeholder: "ch\u1EEF nh\u1EA5n", value: them.giant, onChange: (ev) => setThem({ ...them, giant: ev.target.value }) }), /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-24 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", placeholder: "\u1EA3nh: trang:\u2026", value: them.ten, onChange: (ev) => setThem({ ...them, ten: ev.target.value }) }), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: themCanh }, "+ Th\xEAm"), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: taiLich }, "T\u1EA3i l\u1ECBch .json"), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: taiSrt, title: "b\u1EA3n \u0111\u1EA7u: ch\u01B0a tr\u1EEB \u0111o\u1EA1n l\u1EB7ng b\u1ECB c\u1EAFt" }, "T\u1EA3i SRT"), /* @__PURE__ */ shim_react_default.createElement("label", { className: nut3 + " cursor-pointer" }, "M\u1EDF d\u1EF1 \xE1n .json", /* @__PURE__ */ shim_react_default.createElement("input", { type: "file", accept: ".json,application/json", className: "hidden", onChange: (ev) => moDuAn(ev.target.files && ev.target.files[0]) })), (sua.them || []).length ? /* @__PURE__ */ shim_react_default.createElement("span", { className: "text-[#F6D178]" }, (sua.them || []).length, " c\u1EA3nh th\xEAm") : null), /* @__PURE__ */ shim_react_default.createElement("div", { className: "max-h-[60vh] overflow-auto" }, /* @__PURE__ */ shim_react_default.createElement("table", { className: "w-full text-[11px]" }, /* @__PURE__ */ shim_react_default.createElement("thead", null, /* @__PURE__ */ shim_react_default.createElement("tr", { className: "text-[#A2B2C9]" }, /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "#"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "gi\xE2y"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "b\u1ED1 c\u1EE5c"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "\u0111\u1EA7u/d\xE0i (s)"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "ch\u1EEF nh\u1EA5n"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "y / c\u1EE1"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "ch\u1EEF ph\u1EE5"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "icon"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "\u1EA3nh (t\xEAn kho)"), /* @__PURE__ */ shim_react_default.createElement("th", null, "xo\xE1"))), /* @__PURE__ */ shim_react_default.createElement("tbody", null, ds2.map((s) => {
19183
19350
  const e = sua[s.id] || sua[s.i] || {};
19184
19351
  const v = (k) => (typeof e[k] === "string" ? e[k] : s[k]) || "";
19185
- return /* @__PURE__ */ shim_react_default.createElement("tr", { key: s.id || s.i, className: e.xoa ? "opacity-40" : s.khoa ? "bg-[#1E3A5F]/40" : "" }, /* @__PURE__ */ shim_react_default.createElement("td", null, s.i), /* @__PURE__ */ shim_react_default.createElement("td", null, s.f.toFixed(1), "\u2013", (s.f + s.d).toFixed(1)), /* @__PURE__ */ shim_react_default.createElement("td", null, s.bo), /* @__PURE__ */ shim_react_default.createElement("td", { className: "whitespace-nowrap" }, /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-12 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: typeof e.f === "number" ? e.f : s.f, onChange: (ev) => dat(s.id || String(s.i), "f", +ev.target.value), type: "number", step: "0.1" }), " ", /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-12 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: typeof e.d === "number" ? e.d : s.d, onChange: (ev) => dat(s.id || String(s.i), "d", +ev.target.value), type: "number", step: "0.1", min: "0.4" })), /* @__PURE__ */ shim_react_default.createElement("td", null, /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-full bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: v("giant"), onChange: (ev) => dat(s.id || String(s.i), "giant", ev.target.value) })), /* @__PURE__ */ shim_react_default.createElement("td", null, /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-full bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: v("chu2") || v("chu"), onChange: (ev) => dat(s.id || String(s.i), s.chu2 || !s.chu ? "chu2" : "chu", ev.target.value) })), /* @__PURE__ */ shim_react_default.createElement("td", null, /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-20 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: v("st"), onChange: (ev) => dat(s.id || String(s.i), "st", ev.target.value), placeholder: "tich/luu\u2026" })), /* @__PURE__ */ shim_react_default.createElement("td", null, /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-24 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: v("ten"), onChange: (ev) => dat(s.id || String(s.i), "ten", ev.target.value), placeholder: "trang:\u2026 / anh:\u2026" })), /* @__PURE__ */ shim_react_default.createElement("td", { className: "text-center" }, /* @__PURE__ */ shim_react_default.createElement("input", { type: "checkbox", checked: !!e.xoa, onChange: (ev) => dat(s.id || String(s.i), "xoa", ev.target.checked ? 1 : 0) })));
19352
+ return /* @__PURE__ */ shim_react_default.createElement("tr", { key: s.id || s.i, className: e.xoa ? "opacity-40" : s.khoa ? "bg-[#1E3A5F]/40" : "" }, /* @__PURE__ */ shim_react_default.createElement("td", null, s.i), /* @__PURE__ */ shim_react_default.createElement("td", null, s.f.toFixed(1), "\u2013", (s.f + s.d).toFixed(1)), /* @__PURE__ */ shim_react_default.createElement("td", null, s.bo), /* @__PURE__ */ shim_react_default.createElement("td", { className: "whitespace-nowrap" }, /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-12 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: typeof e.f === "number" ? e.f : s.f, onChange: (ev) => dat(s.id || String(s.i), "f", +ev.target.value), type: "number", step: "0.1" }), " ", /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-12 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: typeof e.d === "number" ? e.d : s.d, onChange: (ev) => dat(s.id || String(s.i), "d", +ev.target.value), type: "number", step: "0.1", min: "0.4" })), /* @__PURE__ */ shim_react_default.createElement("td", null, /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-full bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: v("giant"), onChange: (ev) => dat(s.id || String(s.i), "giant", ev.target.value) })), /* @__PURE__ */ shim_react_default.createElement("td", { className: "whitespace-nowrap" }, /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-12 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", type: "number", step: "0.02", min: "0.05", max: "0.6", placeholder: "y", value: typeof e.yChu === "number" ? e.yChu : s.yChu ?? "", onChange: (ev) => dat(s.id || String(s.i), "yChu", +ev.target.value), title: "v\u1ECB tr\xED ch\u1EEF nh\u1EA5n (0,05 tr\xEAn \u2013 0,6 d\u01B0\u1EDBi)" }), " ", /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-12 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", type: "number", step: "0.1", min: "0.5", max: "1.6", placeholder: "\xD71", value: typeof e.coChu === "number" ? e.coChu : s.coChu ?? "", onChange: (ev) => dat(s.id || String(s.i), "coChu", +ev.target.value), title: "c\u1EE1 ch\u1EEF nh\u1EA5n \xD70,5\u20131,6" })), /* @__PURE__ */ shim_react_default.createElement("td", null, /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-full bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: v("chu2") || v("chu"), onChange: (ev) => dat(s.id || String(s.i), s.chu2 || !s.chu ? "chu2" : "chu", ev.target.value) })), /* @__PURE__ */ shim_react_default.createElement("td", null, /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-20 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: v("st"), onChange: (ev) => dat(s.id || String(s.i), "st", ev.target.value), placeholder: "tich/luu\u2026" })), /* @__PURE__ */ shim_react_default.createElement("td", null, /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-24 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: v("ten"), onChange: (ev) => dat(s.id || String(s.i), "ten", ev.target.value), placeholder: "trang:\u2026 / anh:\u2026" })), /* @__PURE__ */ shim_react_default.createElement("td", { className: "text-center" }, /* @__PURE__ */ shim_react_default.createElement("input", { type: "checkbox", checked: !!e.xoa, onChange: (ev) => dat(s.id || String(s.i), "xoa", ev.target.checked ? 1 : 0) })));
19186
19353
  })))), /* @__PURE__ */ shim_react_default.createElement("div", { className: "text-[#A2B2C9] mt-2" }, "Ch\u1EEF nh\u1EA5n xu\u1ED1ng d\xF2ng: g\xF5 \\n. Icon: tich, luu, chuot, sao, tim, dong-ho\u2026 (t\xEAn trong veSticker). S\u1EEDa xong b\u1EA5m V\u1EBD l\u1EA1i (~2\u20135 ph\xFAt)."));
19187
19354
  };
19188
19355
 
19189
19356
  // loi/vo-flow.tsx
19190
- var PHIEN_BAN = "loi-0910N";
19357
+ var PHIEN_BAN = "loi-1010H";
19191
19358
  var TRONG = () => migrateProject({ id: crypto.randomUUID(), name: "D\u1EF1 \xE1n m\u1EDBi", scenes: [], timeline: [], images: [null, null, null] });
19192
19359
  var nut4 = "px-3 py-1.5 rounded-lg border border-[#2C4A73] text-[11px] font-bold text-[#A2B2C9] hover:text-[#F6D178] hover:border-[#F6D178]/60";
19193
19360
  var Vo = () => {
@@ -19205,6 +19372,7 @@ var Vo = () => {
19205
19372
  setP(moi);
19206
19373
  };
19207
19374
  useEffect(() => {
19375
+ window.__loiSetP = setP;
19208
19376
  datCauLenh({ project: p, setProject: setP, exporting: ex, blob: b, xuat, dongXuat: () => setEx(null), tai, luuJson: () => handleExportProject(p, toast) });
19209
19377
  });
19210
19378
  window.__loiApp = { p, ex, b, phienBan: PHIEN_BAN };