xvai-loi 0.1.57 → 0.1.59

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 +4 -4
package/co.txt CHANGED
@@ -1 +1 @@
1
- xvaiLoi111021
1
+ xvaiLoi111128
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xvai-loi",
3
- "version": "0.1.57",
3
+ "version": "0.1.59",
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
@@ -13293,7 +13293,7 @@ function veTrangTu(g, c, T, W4, H2, nen2, mo4) {
13293
13293
  if (coPip) vat.push([O2.b[0] - e, O2.b[1] - e, O2.b[2] + e, O2.b[3] + e, 3]);
13294
13294
  if (D && D[3] > D[1]) {
13295
13295
  const hh = D[3] - D[1];
13296
- vat.push([D[0] * W4, (D[1] + 0.3 * hh) * H2, D[2] * W4, (D[1] + 0.8 * hh) * H2, 3], [D[0] * W4, (D[1] - 0.05) * H2, D[2] * W4, (D[1] + 0.3 * hh) * H2, 2], [D[0] * W4, (D[1] + 0.8 * hh) * H2, D[2] * W4, (D[3] + 0.025) * H2, 1.2]);
13296
+ vat.push([D[0] * W4, (D[1] + 0.3 * hh) * H2, D[2] * W4, (D[1] + 0.8 * hh) * H2, 3], [D[0] * W4, (D[1] - 0.35 * hh) * H2, D[2] * W4, (D[1] + 0.3 * hh) * H2, 2], [D[0] * W4, (D[1] + 0.8 * hh) * H2, D[2] * W4, (D[3] + 0.025) * H2, 1.2]);
13297
13297
  }
13298
13298
  const phat = (y0) => vat.reduce((t, b) => t + b[4] * Math.max(0, Math.min(S[2], b[2]) - Math.max(S[0], b[0])) * Math.max(0, Math.min(S[3] + y0, b[3]) - Math.max(S[1] + y0, b[1])), 0);
13299
13299
  if (phat(0) > 0) {
@@ -18726,7 +18726,7 @@ async function handleExport(currentProject, setExporting, setExportedBlob, addLo
18726
18726
  const kb = await kichBanDoan(window.__wsGocKB || currentProject.speechDraft?.analysis?.words || []);
18727
18727
  try {
18728
18728
  (kb?.muc || []).forEach((m) => {
18729
- if (m && /^\s*(bước|mẹo|mục|cách|phần|điều|thói quen|lưu ý|việc)\s*(số\s*)?\d+\s*$/i.test(String(m.ten || "")) && String(m.mo || "").trim()) {
18729
+ if (m && /^\s*(bước|mẹo|mục|cách|phần|điều|thói quen|lưu ý|việc)\s*(số\s*)?(\d+|một|hai|ba|bốn|tư|năm|sáu|bảy|tám|chín|mười|cuối)\s*$/i.test(String(m.ten || "")) && String(m.mo || "").trim()) {
18730
18730
  const mo4 = String(m.mo).trim();
18731
18731
  m.ten = mo4.charAt(0).toLocaleUpperCase("vi") + mo4.slice(1);
18732
18732
  }
@@ -20480,7 +20480,7 @@ async function napLoi(d) {
20480
20480
  return "LOI: " + String(e && e.message || e).slice(0, 300);
20481
20481
  }
20482
20482
  }
20483
- var LOI_URL = "https://cdn.jsdelivr.net/npm/xvai-loi@0.1.56/nap.js";
20483
+ var LOI_URL = "https://cdn.jsdelivr.net/npm/xvai-loi@0.1.58/nap.js";
20484
20484
  var TRONG_LOI = !!globalThis.__xvaiReact;
20485
20485
  try {
20486
20486
  if (!TRONG_LOI) setTimeout(() => {
@@ -20510,7 +20510,7 @@ function datCauLenh(a) {
20510
20510
  on2 = true;
20511
20511
  window.addEventListener("message", async (ev) => {
20512
20512
  const d = ev.data;
20513
- if (!d || d.xvaiLoi111021 !== true) return;
20513
+ if (!d || d.xvaiLoi111128 !== true) return;
20514
20514
  const o = String(ev.origin || "");
20515
20515
  if (!(o.indexOf("https://flow.google.com") === 0 || o.indexOf("https://labs.google") === 0)) return;
20516
20516
  const tra = (kq) => {