xvai-loi 0.1.40 → 0.1.41

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 +22 -7
package/co.txt CHANGED
@@ -1 +1 @@
1
- xvaiLoi100153
1
+ xvaiLoi100208
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xvai-loi",
3
- "version": "0.1.40",
3
+ "version": "0.1.41",
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
@@ -10648,6 +10648,13 @@ function lapCuongMe(o) {
10648
10648
  const sp = [];
10649
10649
  let ctxSt = "";
10650
10650
  const IC = { tien: "xu", dongho: "dongho", canhbao: "canh", tich: "tich", bieudo: "bieu", tim: "tim", khong: "none" };
10651
+ const boTrang = () => {
10652
+ try {
10653
+ return localStorage.getItem("xvaiToanKhung") === "1" ? "anh" : "chia";
10654
+ } catch (e) {
10655
+ return "chia";
10656
+ }
10657
+ };
10651
10658
  const kTram = () => {
10652
10659
  try {
10653
10660
  const v = +(localStorage.getItem("xvaiTramDai") || 1);
@@ -11379,7 +11386,7 @@ function lapCuongMe(o) {
11379
11386
  for (const dd of [2.2 * kTram(), 1.8]) for (let f2 = f0; f2 <= m.b - dd - 0.5 + 1e-6; f2 += 0.25) {
11380
11387
  const fr = +f2.toFixed(2);
11381
11388
  if (gioLogo(fr - 0.1, fr + dd) >= 0 || lien(fr, fr + dd) > 6) continue;
11382
- if (dat(fr, dd, { uuTien: UT.anh, bo: "chia", ten: tk, keu: "whoosh-nhanh" }, 0, 0.01)) {
11389
+ if (dat(fr, dd, { uuTien: UT.anh, bo: boTrang(), ten: tk, chu: boTrang() === "anh" ? hoa3(String(m.ten)).slice(0, 24) : void 0, keu: "whoosh-nhanh" }, 0, 0.01)) {
11383
11390
  ghiL("them", { bo: "chia", f: fr, d: dd }, "chia trang " + m.ten + (fr > f0 + 0.01 ? " (doi " + (fr - f0).toFixed(2) + " s sau the)" : " ngay sau the"));
11384
11391
  return;
11385
11392
  }
@@ -11549,7 +11556,7 @@ function lapCuongMe(o) {
11549
11556
  continue;
11550
11557
  }
11551
11558
  for (const t of ["giant", "chu", "chu2", "st", "ten", "tieu"]) if (typeof e[t] === "string") {
11552
- s[t] = e[t];
11559
+ s[t] = e[t].split("\n").join(String.fromCharCode(10));
11553
11560
  s.khoa = 1;
11554
11561
  nS++;
11555
11562
  }
@@ -11575,7 +11582,7 @@ function lapCuongMe(o) {
11575
11582
  }
11576
11583
  if (Array.isArray(sua.them)) for (const t of sua.them) {
11577
11584
  if (!t || typeof t.f !== "number" || !(t.d > 0.3)) continue;
11578
- sp.push({ id: idC({ f: +t.f, bo: ["depth", "anh", "cut", "tron"].includes(t.bo) ? t.bo : "depth" }), f: +t.f, d: +t.d, bo: ["depth", "anh", "cut", "tron"].includes(t.bo) ? t.bo : "depth", giant: String(t.giant || ""), chu: String(t.chu || ""), chu2: String(t.chu2 || ""), ten: String(t.ten || ""), st: String(t.st || ""), khoa: 1, dSua: 1, moi: 1, keu: 1 });
11585
+ sp.push({ id: idC({ f: +t.f, bo: ["depth", "anh", "cut", "tron"].includes(t.bo) ? t.bo : "depth" }), f: +t.f, d: +t.d, bo: ["depth", "anh", "cut", "tron"].includes(t.bo) ? t.bo : "depth", giant: String(t.giant || "").split("\n").join(String.fromCharCode(10)), chu: String(t.chu || ""), chu2: String(t.chu2 || ""), ten: String(t.ten || ""), st: String(t.st || ""), khoa: 1, dSua: 1, moi: 1, keu: 1 });
11579
11586
  nS++;
11580
11587
  }
11581
11588
  const sp2 = sp.filter((s) => !s.xoa);
@@ -11844,7 +11851,15 @@ var mau6 = (HO2) => {
11844
11851
  } catch (e) {
11845
11852
  return "vui";
11846
11853
  }
11847
- })(), 0.2],
11854
+ })(), (() => {
11855
+ try {
11856
+ const m = +(localStorage.getItem("xvaiNhacMuc") || 0.2);
11857
+ return m >= 0.05 && m <= 0.6 ? m : 0.2;
11858
+ } catch (e) {
11859
+ return 0.2;
11860
+ }
11861
+ })()],
11862
+ /* K2b: xvaiNhacMuc mức nhạc nền 0,05–0,6 (ADN bass 0,05–0,35; đo 0,003 vì nhạc 0,2 chìm) — mặc định giữ 0,2 */
11848
11863
  /* 10/10 K2: tuỳ chọn xvaiNhac (mặc định giữ 'vui' 112 BPM; đối thủ ~81 BPM → thử 'nhe' 84 / 'sangtrong' 88) */
11849
11864
  nang: [],
11850
11865
  nhe: [],
@@ -19085,7 +19100,7 @@ async function napLoi(d) {
19085
19100
  return "LOI: " + String(e && e.message || e).slice(0, 300);
19086
19101
  }
19087
19102
  }
19088
- var LOI_URL = "https://cdn.jsdelivr.net/npm/xvai-loi@0.1.39/nap.js";
19103
+ var LOI_URL = "https://cdn.jsdelivr.net/npm/xvai-loi@0.1.40/nap.js";
19089
19104
  var TRONG_LOI = !!globalThis.__xvaiReact;
19090
19105
  try {
19091
19106
  if (!TRONG_LOI) setTimeout(() => {
@@ -19115,7 +19130,7 @@ function datCauLenh(a) {
19115
19130
  on2 = true;
19116
19131
  window.addEventListener("message", async (ev) => {
19117
19132
  const d = ev.data;
19118
- if (!d || d.xvaiLoi100153 !== true) return;
19133
+ if (!d || d.xvaiLoi100208 !== true) return;
19119
19134
  const o = String(ev.origin || "");
19120
19135
  if (!(o.indexOf("https://flow.google.com") === 0 || o.indexOf("https://labs.google") === 0)) return;
19121
19136
  const tra = (kq) => {
@@ -19413,7 +19428,7 @@ var SuaLich = ({ ten, onDong }) => {
19413
19428
  };
19414
19429
 
19415
19430
  // loi/vo-flow.tsx
19416
- var PHIEN_BAN = "loi-1010P";
19431
+ var PHIEN_BAN = "loi-1010Q";
19417
19432
  var TRONG = () => migrateProject({ id: crypto.randomUUID(), name: "D\u1EF1 \xE1n m\u1EDBi", scenes: [], timeline: [], images: [null, null, null] });
19418
19433
  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";
19419
19434
  var Vo = () => {