@shotstack/shotstack-studio 2.0.0-beta.12 → 2.0.0-beta.13
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.d.ts +11 -0
- package/dist/internal.es.js +236 -208
- package/dist/internal.umd.js +14 -14
- package/dist/schema/index.d.ts +11 -0
- package/dist/shotstack-studio.es.js +359 -331
- package/dist/shotstack-studio.umd.js +19 -19
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import * as ie from "pixi.js";
|
|
|
2
2
|
import { Filter as mm, deprecation as ym, GpuProgram as bm, GlProgram as wm, Color as vm } from "pixi.js";
|
|
3
3
|
import * as xm from "howler";
|
|
4
4
|
import * as Yl from "opentype.js";
|
|
5
|
-
const km = "2.0.0-beta.
|
|
5
|
+
const km = "2.0.0-beta.13", Cm = {
|
|
6
6
|
version: km
|
|
7
7
|
};
|
|
8
8
|
class Sm {
|
|
@@ -16755,7 +16755,7 @@ const Hn = [
|
|
|
16755
16755
|
ExtraBold: 800,
|
|
16756
16756
|
Black: 900
|
|
16757
16757
|
};
|
|
16758
|
-
function
|
|
16758
|
+
function ki(t) {
|
|
16759
16759
|
const e = t.toLowerCase();
|
|
16760
16760
|
for (const [i, s] of Object.entries(Hm)) {
|
|
16761
16761
|
const a = ` ${i.toLowerCase()}`;
|
|
@@ -16773,7 +16773,7 @@ function Fc(t) {
|
|
|
16773
16773
|
return e.url;
|
|
16774
16774
|
if (fn[t])
|
|
16775
16775
|
return fn[t];
|
|
16776
|
-
const { baseFontFamily: i } =
|
|
16776
|
+
const { baseFontFamily: i } = ki(t), s = Zm[i] ?? i;
|
|
16777
16777
|
if (fn[s])
|
|
16778
16778
|
return fn[s];
|
|
16779
16779
|
const a = _c.get(t);
|
|
@@ -17204,7 +17204,7 @@ class Gn extends hi {
|
|
|
17204
17204
|
}
|
|
17205
17205
|
}
|
|
17206
17206
|
createTextStyle(e) {
|
|
17207
|
-
const i = e.font?.family ?? "Open Sans", { baseFontFamily: s, fontWeight: a } =
|
|
17207
|
+
const i = e.font?.family ?? "Open Sans", { baseFontFamily: s, fontWeight: a } = ki(i), r = e.font?.size ?? 32, { width: n } = this.getSize();
|
|
17208
17208
|
return new ie.TextStyle({
|
|
17209
17209
|
fontFamily: s,
|
|
17210
17210
|
fontSize: r,
|
|
@@ -17250,7 +17250,7 @@ class Gn extends hi {
|
|
|
17250
17250
|
}, a > 0 ? this.background.roundRect(r, n, o, l, a) : this.background.rect(r, n, o, l), this.background.fill();
|
|
17251
17251
|
}
|
|
17252
17252
|
async loadFont(e) {
|
|
17253
|
-
const { baseFontFamily: i, fontWeight: s } =
|
|
17253
|
+
const { baseFontFamily: i, fontWeight: s } = ki(e), a = `${i}-${s}`;
|
|
17254
17254
|
if (Gn.loadedFonts.has(a))
|
|
17255
17255
|
return;
|
|
17256
17256
|
const r = Fc(e);
|
|
@@ -27984,7 +27984,7 @@ const ST = new ra(16, "BE"), AT = ST;
|
|
|
27984
27984
|
new ra(16, "LE");
|
|
27985
27985
|
const TT = new ra(32, "BE"), Tt = TT;
|
|
27986
27986
|
new ra(32, "LE");
|
|
27987
|
-
function
|
|
27987
|
+
function Di(t, e, i) {
|
|
27988
27988
|
let s;
|
|
27989
27989
|
if (typeof t == "number" ? s = t : typeof t == "function" ? s = t.call(i, i) : i && typeof t == "string" ? s = i[t] : e && t instanceof Ye && (s = t.decode(e)), isNaN(s))
|
|
27990
27990
|
throw new Error("Not a fixed size");
|
|
@@ -28007,7 +28007,7 @@ class P extends ns {
|
|
|
28007
28007
|
let s;
|
|
28008
28008
|
const { pos: a } = e, r = [];
|
|
28009
28009
|
let n = i;
|
|
28010
|
-
if (this.length != null && (s =
|
|
28010
|
+
if (this.length != null && (s = Di(this.length, e, i)), this.length instanceof Ye && (Object.defineProperties(r, {
|
|
28011
28011
|
parent: { value: i },
|
|
28012
28012
|
_startOffset: { value: a },
|
|
28013
28013
|
_currentOffset: { value: 0, writable: !0 },
|
|
@@ -28023,7 +28023,7 @@ class P extends ns {
|
|
|
28023
28023
|
}
|
|
28024
28024
|
size(e, i, s = !0) {
|
|
28025
28025
|
if (!e)
|
|
28026
|
-
return this.type.size(null, i) *
|
|
28026
|
+
return this.type.size(null, i) * Di(this.length, null, i);
|
|
28027
28027
|
let a = 0;
|
|
28028
28028
|
this.length instanceof Ye && (a += this.length.size(), i = { parent: i, pointerSize: 0 });
|
|
28029
28029
|
for (let r of e)
|
|
@@ -28050,7 +28050,7 @@ class P extends ns {
|
|
|
28050
28050
|
}
|
|
28051
28051
|
class st extends P {
|
|
28052
28052
|
decode(e, i) {
|
|
28053
|
-
const { pos: s } = e, a =
|
|
28053
|
+
const { pos: s } = e, a = Di(this.length, e, i);
|
|
28054
28054
|
this.length instanceof Ye && (i = {
|
|
28055
28055
|
parent: i,
|
|
28056
28056
|
_startOffset: s,
|
|
@@ -28087,7 +28087,7 @@ class ll {
|
|
|
28087
28087
|
return e;
|
|
28088
28088
|
}
|
|
28089
28089
|
}
|
|
28090
|
-
class
|
|
28090
|
+
class Ci extends ns {
|
|
28091
28091
|
constructor(e, i = []) {
|
|
28092
28092
|
super(), this.type = e, this.flags = i;
|
|
28093
28093
|
}
|
|
@@ -28111,17 +28111,17 @@ class ki extends ns {
|
|
|
28111
28111
|
return this.type.encode(e, s);
|
|
28112
28112
|
}
|
|
28113
28113
|
}
|
|
28114
|
-
class
|
|
28114
|
+
class Ri extends ns {
|
|
28115
28115
|
constructor(e) {
|
|
28116
28116
|
super(), this.length = e;
|
|
28117
28117
|
}
|
|
28118
28118
|
decode(e, i) {
|
|
28119
|
-
const s =
|
|
28119
|
+
const s = Di(this.length, e, i);
|
|
28120
28120
|
return e.readBuffer(s);
|
|
28121
28121
|
}
|
|
28122
28122
|
size(e, i) {
|
|
28123
28123
|
if (!e)
|
|
28124
|
-
return
|
|
28124
|
+
return Di(this.length, null, i);
|
|
28125
28125
|
let s = e.length;
|
|
28126
28126
|
return this.length instanceof Ye && (s += this.length.size()), s;
|
|
28127
28127
|
}
|
|
@@ -28156,7 +28156,7 @@ class ut extends ns {
|
|
|
28156
28156
|
e.pos += this.size(null, i);
|
|
28157
28157
|
}
|
|
28158
28158
|
size(e, i) {
|
|
28159
|
-
const s =
|
|
28159
|
+
const s = Di(this.count, null, i);
|
|
28160
28160
|
return this.type.size() * s;
|
|
28161
28161
|
}
|
|
28162
28162
|
encode(e, i, s) {
|
|
@@ -28172,7 +28172,7 @@ class Qe extends ns {
|
|
|
28172
28172
|
typeof r == "function" && (r = r.call(i, i) || "ascii");
|
|
28173
28173
|
let n = cl(r);
|
|
28174
28174
|
if (this.length != null)
|
|
28175
|
-
s =
|
|
28175
|
+
s = Di(this.length, e, i);
|
|
28176
28176
|
else {
|
|
28177
28177
|
let l;
|
|
28178
28178
|
for ({ buffer: l, length: s, pos: a } = e; a < s - n + 1 && (l[a] !== 0 || n === 2 && l[a + 1] !== 0); )
|
|
@@ -28184,7 +28184,7 @@ class Qe extends ns {
|
|
|
28184
28184
|
}
|
|
28185
28185
|
size(e, i) {
|
|
28186
28186
|
if (e == null)
|
|
28187
|
-
return
|
|
28187
|
+
return Di(this.length, null, i);
|
|
28188
28188
|
let { encoding: s } = this;
|
|
28189
28189
|
typeof s == "function" && (s = s.call(i?.val, i?.val) || "ascii"), s === "utf16be" && (s = "utf16le");
|
|
28190
28190
|
let a = xf(e, s);
|
|
@@ -28505,9 +28505,9 @@ var Yr = {};
|
|
|
28505
28505
|
Yr.byteLength = _T;
|
|
28506
28506
|
Yr.toByteArray = VT;
|
|
28507
28507
|
Yr.fromByteArray = LT;
|
|
28508
|
-
var
|
|
28508
|
+
var Oi = [], di = [], ET = typeof Uint8Array < "u" ? Uint8Array : Array, ul = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
28509
28509
|
for (var ga = 0, PT = ul.length; ga < PT; ++ga)
|
|
28510
|
-
|
|
28510
|
+
Oi[ga] = ul[ga], di[ul.charCodeAt(ga)] = ga;
|
|
28511
28511
|
di[45] = 62;
|
|
28512
28512
|
di[95] = 63;
|
|
28513
28513
|
function T0(t) {
|
|
@@ -28533,7 +28533,7 @@ function VT(t) {
|
|
|
28533
28533
|
return a === 2 && (e = di[t.charCodeAt(l)] << 2 | di[t.charCodeAt(l + 1)] >> 4, r[n++] = e & 255), a === 1 && (e = di[t.charCodeAt(l)] << 10 | di[t.charCodeAt(l + 1)] << 4 | di[t.charCodeAt(l + 2)] >> 2, r[n++] = e >> 8 & 255, r[n++] = e & 255), r;
|
|
28534
28534
|
}
|
|
28535
28535
|
function MT(t) {
|
|
28536
|
-
return
|
|
28536
|
+
return Oi[t >> 18 & 63] + Oi[t >> 12 & 63] + Oi[t >> 6 & 63] + Oi[t & 63];
|
|
28537
28537
|
}
|
|
28538
28538
|
function OT(t, e, i) {
|
|
28539
28539
|
for (var s, a = [], r = e; r < i; r += 3)
|
|
@@ -28544,9 +28544,9 @@ function LT(t) {
|
|
|
28544
28544
|
for (var e, i = t.length, s = i % 3, a = [], r = 16383, n = 0, o = i - s; n < o; n += r)
|
|
28545
28545
|
a.push(OT(t, n, n + r > o ? o : n + r));
|
|
28546
28546
|
return s === 1 ? (e = t[i - 1], a.push(
|
|
28547
|
-
|
|
28547
|
+
Oi[e >> 2] + Oi[e << 4 & 63] + "=="
|
|
28548
28548
|
)) : s === 2 && (e = (t[i - 2] << 8) + t[i - 1], a.push(
|
|
28549
|
-
|
|
28549
|
+
Oi[e >> 10] + Oi[e >> 4 & 63] + Oi[e << 2 & 63] + "="
|
|
28550
28550
|
)), a.join("");
|
|
28551
28551
|
}
|
|
28552
28552
|
var Qc = 0, N0 = -3;
|
|
@@ -28576,7 +28576,7 @@ var I0 = new zr(), E0 = new zr(), $c = new Uint8Array(30), eu = new Uint16Array(
|
|
|
28576
28576
|
14,
|
|
28577
28577
|
1,
|
|
28578
28578
|
15
|
|
28579
|
-
]), Cf = new zr(),
|
|
28579
|
+
]), Cf = new zr(), Ai = new Uint8Array(320);
|
|
28580
28580
|
function F0(t, e, i, s) {
|
|
28581
28581
|
var a, r;
|
|
28582
28582
|
for (a = 0; a < i; ++a) t[a] = 0;
|
|
@@ -28609,7 +28609,7 @@ function DT(t) {
|
|
|
28609
28609
|
var e = t.tag & 1;
|
|
28610
28610
|
return t.tag >>>= 1, e;
|
|
28611
28611
|
}
|
|
28612
|
-
function
|
|
28612
|
+
function Vi(t, e, i) {
|
|
28613
28613
|
if (!e)
|
|
28614
28614
|
return i;
|
|
28615
28615
|
for (; t.bitcount < 24; )
|
|
@@ -28628,33 +28628,33 @@ function oc(t, e) {
|
|
|
28628
28628
|
}
|
|
28629
28629
|
function UT(t, e, i) {
|
|
28630
28630
|
var s, a, r, n, o, l;
|
|
28631
|
-
for (s =
|
|
28631
|
+
for (s = Vi(t, 5, 257), a = Vi(t, 5, 1), r = Vi(t, 4, 4), n = 0; n < 19; ++n) Ai[n] = 0;
|
|
28632
28632
|
for (n = 0; n < r; ++n) {
|
|
28633
|
-
var c =
|
|
28634
|
-
|
|
28633
|
+
var c = Vi(t, 3, 0);
|
|
28634
|
+
Ai[zT[n]] = c;
|
|
28635
28635
|
}
|
|
28636
|
-
for (fl(Cf,
|
|
28636
|
+
for (fl(Cf, Ai, 0, 19), o = 0; o < s + a; ) {
|
|
28637
28637
|
var u = oc(t, Cf);
|
|
28638
28638
|
switch (u) {
|
|
28639
28639
|
case 16:
|
|
28640
|
-
var f =
|
|
28641
|
-
for (l =
|
|
28642
|
-
|
|
28640
|
+
var f = Ai[o - 1];
|
|
28641
|
+
for (l = Vi(t, 2, 3); l; --l)
|
|
28642
|
+
Ai[o++] = f;
|
|
28643
28643
|
break;
|
|
28644
28644
|
case 17:
|
|
28645
|
-
for (l =
|
|
28646
|
-
|
|
28645
|
+
for (l = Vi(t, 3, 3); l; --l)
|
|
28646
|
+
Ai[o++] = 0;
|
|
28647
28647
|
break;
|
|
28648
28648
|
case 18:
|
|
28649
|
-
for (l =
|
|
28650
|
-
|
|
28649
|
+
for (l = Vi(t, 7, 11); l; --l)
|
|
28650
|
+
Ai[o++] = 0;
|
|
28651
28651
|
break;
|
|
28652
28652
|
default:
|
|
28653
|
-
|
|
28653
|
+
Ai[o++] = u;
|
|
28654
28654
|
break;
|
|
28655
28655
|
}
|
|
28656
28656
|
}
|
|
28657
|
-
fl(e,
|
|
28657
|
+
fl(e, Ai, 0, s), fl(i, Ai, s, a);
|
|
28658
28658
|
}
|
|
28659
28659
|
function Af(t, e, i) {
|
|
28660
28660
|
for (; ; ) {
|
|
@@ -28665,7 +28665,7 @@ function Af(t, e, i) {
|
|
|
28665
28665
|
t.dest[t.destLen++] = s;
|
|
28666
28666
|
else {
|
|
28667
28667
|
var a, r, n, o;
|
|
28668
|
-
for (s -= 257, a =
|
|
28668
|
+
for (s -= 257, a = Vi(t, $c[s], eu[s]), r = oc(t, i), n = t.destLen - Vi(t, P0[r], _0[r]), o = n; o < n + a; ++o)
|
|
28669
28669
|
t.dest[t.destLen++] = t.dest[o];
|
|
28670
28670
|
}
|
|
28671
28671
|
}
|
|
@@ -28682,7 +28682,7 @@ function WT(t) {
|
|
|
28682
28682
|
function ZT(t, e) {
|
|
28683
28683
|
var i = new BT(t, e), s, a, r;
|
|
28684
28684
|
do {
|
|
28685
|
-
switch (s = DT(i), a =
|
|
28685
|
+
switch (s = DT(i), a = Vi(i, 2, 0), a) {
|
|
28686
28686
|
case 0:
|
|
28687
28687
|
r = WT(i);
|
|
28688
28688
|
break;
|
|
@@ -31539,7 +31539,7 @@ function H0() {
|
|
|
31539
31539
|
for (var ca = 0; ca < 3 * A; ca++)
|
|
31540
31540
|
Gt[ca] = new a(0, 0), ei[ca] = new a(0, 0);
|
|
31541
31541
|
for (; !ue; ) {
|
|
31542
|
-
var Vt = 0, $a, fi = [1 << 28, 1 << 28, 1 << 28], mi = [0], li = [1, 1, 1],
|
|
31542
|
+
var Vt = 0, $a, fi = [1 << 28, 1 << 28, 1 << 28], mi = [0], li = [1, 1, 1], Hi = [0, 1, 0, 1, 0, 1], Os = [0], ls, ci, tn, ua, sn = null, cs = null, an, rn = null, er, nn = 0, fa = null, yi = 0, da = 0, tr = null, E = 0, fe = 0, Ue = 0, Ke, it;
|
|
31543
31543
|
for (D = 0; D < 3; ++D)
|
|
31544
31544
|
Et[D].codes = null, Et[D].htrees = null;
|
|
31545
31545
|
Oe.readMoreInput();
|
|
@@ -31575,13 +31575,13 @@ function H0() {
|
|
|
31575
31575
|
for (er = Jo.num_htrees, rn = Jo.context_map, Et[0] = new J(f, an), Et[1] = new J(h, li[1]), Et[2] = new J(ua, er), D = 0; D < 3; ++D)
|
|
31576
31576
|
Et[D].decode(Oe);
|
|
31577
31577
|
for (fa = 0, tr = 0, Ke = cs[mi[0]], fe = n.lookupOffsets[Ke], Ue = n.lookupOffsets[Ke + 1], it = Et[1].htrees[0]; Vt > 0; ) {
|
|
31578
|
-
var ln, ir, Qo, $o, el, ti, ui,
|
|
31578
|
+
var ln, ir, Qo, $o, el, ti, ui, Gi, sr, pa, ar;
|
|
31579
31579
|
for (Oe.readMoreInput(), fi[1] === 0 && (Te(
|
|
31580
31580
|
li[1],
|
|
31581
31581
|
Gt,
|
|
31582
31582
|
1,
|
|
31583
31583
|
mi,
|
|
31584
|
-
|
|
31584
|
+
Hi,
|
|
31585
31585
|
Os,
|
|
31586
31586
|
Oe
|
|
31587
31587
|
), fi[1] = Xe(ei, A, Oe), it = Et[1].htrees[mi[1]]), --fi[1], ln = Ie(Et[1].codes, it, Oe), ir = ln >> 6, ir >= 2 ? (ir -= 2, ui = -1) : ui = 0, Qo = o.kInsertRangeLut[ir] + (ln >> 3 & 7), $o = o.kCopyRangeLut[ir] + (ln & 7), el = o.kInsertLengthPrefixCode[Qo].offset + Oe.readBits(o.kInsertLengthPrefixCode[Qo].nbits), ti = o.kCopyLengthPrefixCode[$o].offset + Oe.readBits(o.kCopyLengthPrefixCode[$o].nbits), nt = le[R - 1 & pe], It = le[R - 2 & pe], pa = 0; pa < el; ++pa)
|
|
@@ -31590,7 +31590,7 @@ function H0() {
|
|
|
31590
31590
|
Gt,
|
|
31591
31591
|
0,
|
|
31592
31592
|
mi,
|
|
31593
|
-
|
|
31593
|
+
Hi,
|
|
31594
31594
|
Os,
|
|
31595
31595
|
Oe
|
|
31596
31596
|
), fi[0] = Xe(ei, 0, Oe), nn = mi[0] << y, fa = nn, Ke = cs[mi[0]], fe = n.lookupOffsets[Ke], Ue = n.lookupOffsets[Ke + 1]), sr = n.lookup[fe + nt] | n.lookup[Ue + It], yi = sn[fa + sr], --fi[0], It = nt, nt = Ie(Et[0].codes, Et[0].htrees[yi], Oe), le[R & pe] = nt, (R & pe) === pe && W.write(le, Pe), ++R;
|
|
@@ -31602,7 +31602,7 @@ function H0() {
|
|
|
31602
31602
|
Gt,
|
|
31603
31603
|
2,
|
|
31604
31604
|
mi,
|
|
31605
|
-
|
|
31605
|
+
Hi,
|
|
31606
31606
|
Os,
|
|
31607
31607
|
Oe
|
|
31608
31608
|
), fi[2] = Xe(ei, 2 * A, Oe), da = mi[2] << w, tr = da), --fi[2], sr = (ti > 4 ? 3 : ti - 2) & 255, E = rn[tr + sr], ui = Ie(Et[2].codes, Et[2].htrees[E], Oe), ui >= ci) {
|
|
@@ -31610,11 +31610,11 @@ function H0() {
|
|
|
31610
31610
|
ui -= ci, Tu = ui & tn, ui >>= ls, tl = (ui >> 1) + 1, rr = (2 + (ui & 1) << tl) - 4, ui = ci + (rr + Oe.readBits(tl) << ls) + Tu;
|
|
31611
31611
|
}
|
|
31612
31612
|
}
|
|
31613
|
-
if (
|
|
31613
|
+
if (Gi = _e(ui, dt, Rt), Gi < 0)
|
|
31614
31614
|
throw new Error("[BrotliDecompress] invalid distance");
|
|
31615
|
-
if (R < de && ge !== de ? ge = R : ge = de, ar = R & pe,
|
|
31615
|
+
if (R < de && ge !== de ? ge = R : ge = de, ar = R & pe, Gi > ge)
|
|
31616
31616
|
if (ti >= s.minDictionaryWordLength && ti <= s.maxDictionaryWordLength) {
|
|
31617
|
-
var rr = s.offsetsByLength[ti], Nu =
|
|
31617
|
+
var rr = s.offsetsByLength[ti], Nu = Gi - ge - 1, Iu = s.sizeBitsByLength[ti], pm = (1 << Iu) - 1, gm = Nu & pm, Eu = Nu >> Iu;
|
|
31618
31618
|
if (rr += gm * ti, Eu < l.kNumTransforms) {
|
|
31619
31619
|
var il = l.transformDictionaryWord(le, ar, rr, ti, Eu);
|
|
31620
31620
|
if (ar += il, R += il, Vt -= il, ar >= Me) {
|
|
@@ -31623,14 +31623,14 @@ function H0() {
|
|
|
31623
31623
|
le[cn] = le[Me + cn];
|
|
31624
31624
|
}
|
|
31625
31625
|
} else
|
|
31626
|
-
throw new Error("Invalid backward reference. pos: " + R + " distance: " +
|
|
31626
|
+
throw new Error("Invalid backward reference. pos: " + R + " distance: " + Gi + " len: " + ti + " bytes left: " + Vt);
|
|
31627
31627
|
} else
|
|
31628
|
-
throw new Error("Invalid backward reference. pos: " + R + " distance: " +
|
|
31628
|
+
throw new Error("Invalid backward reference. pos: " + R + " distance: " + Gi + " len: " + ti + " bytes left: " + Vt);
|
|
31629
31629
|
else {
|
|
31630
|
-
if (ui > 0 && (dt[Rt & 3] =
|
|
31631
|
-
throw new Error("Invalid backward reference. pos: " + R + " distance: " +
|
|
31630
|
+
if (ui > 0 && (dt[Rt & 3] = Gi, ++Rt), ti > Vt)
|
|
31631
|
+
throw new Error("Invalid backward reference. pos: " + R + " distance: " + Gi + " len: " + ti + " bytes left: " + Vt);
|
|
31632
31632
|
for (pa = 0; pa < ti; ++pa)
|
|
31633
|
-
le[R & pe] = le[R -
|
|
31633
|
+
le[R & pe] = le[R - Gi & pe], (R & pe) === pe && W.write(le, Pe), ++R, --Vt;
|
|
31634
31634
|
}
|
|
31635
31635
|
nt = le[R - 1 & pe], It = le[R - 2 & pe];
|
|
31636
31636
|
}
|
|
@@ -31819,7 +31819,7 @@ var DN = new B({
|
|
|
31819
31819
|
yMin: Y,
|
|
31820
31820
|
xMax: Y,
|
|
31821
31821
|
yMax: Y,
|
|
31822
|
-
macStyle: new
|
|
31822
|
+
macStyle: new Ci(d, [
|
|
31823
31823
|
"bold",
|
|
31824
31824
|
"italic",
|
|
31825
31825
|
"underline",
|
|
@@ -32443,7 +32443,7 @@ var q0 = new Be(d, {
|
|
|
32443
32443
|
xAvgCharWidth: Y,
|
|
32444
32444
|
usWeightClass: d,
|
|
32445
32445
|
usWidthClass: d,
|
|
32446
|
-
fsType: new
|
|
32446
|
+
fsType: new Ci(d, [
|
|
32447
32447
|
null,
|
|
32448
32448
|
"noEmbedding",
|
|
32449
32449
|
"viewOnly",
|
|
@@ -32469,7 +32469,7 @@ var q0 = new Be(d, {
|
|
|
32469
32469
|
panose: new P(ne, 10),
|
|
32470
32470
|
ulCharRange: new P(F, 4),
|
|
32471
32471
|
vendorID: new Qe(4),
|
|
32472
|
-
fsSelection: new
|
|
32472
|
+
fsSelection: new Ci(d, [
|
|
32473
32473
|
"italic",
|
|
32474
32474
|
"underscore",
|
|
32475
32475
|
"negative",
|
|
@@ -32580,8 +32580,8 @@ ou.preEncode = function() {
|
|
|
32580
32580
|
};
|
|
32581
32581
|
var s6 = ou, a6 = new B({
|
|
32582
32582
|
controlValueProgram: new P(ne)
|
|
32583
|
-
}), r6 = new P(new
|
|
32584
|
-
class
|
|
32583
|
+
}), r6 = new P(new Ri());
|
|
32584
|
+
class Li {
|
|
32585
32585
|
getCFFVersion(e) {
|
|
32586
32586
|
for (; e && !e.hdrSize; ) e = e.parent;
|
|
32587
32587
|
return e ? e.version : -1;
|
|
@@ -32612,7 +32612,7 @@ class Oi {
|
|
|
32612
32612
|
size(e, i) {
|
|
32613
32613
|
let s = 2;
|
|
32614
32614
|
if (e.length === 0) return s;
|
|
32615
|
-
let a = this.type || new
|
|
32615
|
+
let a = this.type || new Ri(), r = 1;
|
|
32616
32616
|
for (let o = 0; o < e.length; o++) {
|
|
32617
32617
|
let l = e[o];
|
|
32618
32618
|
r += a.size(l, i);
|
|
@@ -32627,7 +32627,7 @@ class Oi {
|
|
|
32627
32627
|
}
|
|
32628
32628
|
encode(e, i, s) {
|
|
32629
32629
|
if (e.writeUInt16BE(i.length), i.length === 0) return;
|
|
32630
|
-
let a = this.type || new
|
|
32630
|
+
let a = this.type || new Ri(), r = [], n = 1;
|
|
32631
32631
|
for (let l of i) {
|
|
32632
32632
|
let c = a.size(l, s);
|
|
32633
32633
|
r.push(c), n += c;
|
|
@@ -33004,7 +33004,7 @@ var uc = new Ro([
|
|
|
33004
33004
|
[
|
|
33005
33005
|
19,
|
|
33006
33006
|
"Subrs",
|
|
33007
|
-
new xi(new
|
|
33007
|
+
new xi(new Li(), {
|
|
33008
33008
|
type: "local"
|
|
33009
33009
|
}),
|
|
33010
33010
|
null
|
|
@@ -34429,7 +34429,7 @@ let Y0 = [
|
|
|
34429
34429
|
})
|
|
34430
34430
|
}), $0 = new P(p6, d), g6 = new B({
|
|
34431
34431
|
markAttachmentType: ne,
|
|
34432
|
-
flags: new
|
|
34432
|
+
flags: new Ci(ne, [
|
|
34433
34433
|
"rightToLeft",
|
|
34434
34434
|
"ignoreBaseGlyphs",
|
|
34435
34435
|
"ignoreLigatures",
|
|
@@ -34643,7 +34643,7 @@ let ag = new B({
|
|
|
34643
34643
|
}));
|
|
34644
34644
|
class Wf extends P {
|
|
34645
34645
|
decode(e, i) {
|
|
34646
|
-
let s =
|
|
34646
|
+
let s = Di(this.length, e, i), a = 0, r = [];
|
|
34647
34647
|
for (; a < s; ) {
|
|
34648
34648
|
let n = this.type.decode(e, i);
|
|
34649
34649
|
n.offset = a, a += n.nLeft + 1, r.push(n);
|
|
@@ -34920,7 +34920,7 @@ let og = new Ro([
|
|
|
34920
34920
|
[
|
|
34921
34921
|
17,
|
|
34922
34922
|
"CharStrings",
|
|
34923
|
-
new xi(new
|
|
34923
|
+
new xi(new Li()),
|
|
34924
34924
|
null
|
|
34925
34925
|
],
|
|
34926
34926
|
[
|
|
@@ -35026,7 +35026,7 @@ let og = new Ro([
|
|
|
35026
35026
|
36
|
|
35027
35027
|
],
|
|
35028
35028
|
"FDArray",
|
|
35029
|
-
new xi(new
|
|
35029
|
+
new xi(new Li(og)),
|
|
35030
35030
|
null
|
|
35031
35031
|
],
|
|
35032
35032
|
[
|
|
@@ -35061,7 +35061,7 @@ let og = new Ro([
|
|
|
35061
35061
|
[
|
|
35062
35062
|
17,
|
|
35063
35063
|
"CharStrings",
|
|
35064
|
-
new xi(new
|
|
35064
|
+
new xi(new Li()),
|
|
35065
35065
|
null
|
|
35066
35066
|
],
|
|
35067
35067
|
[
|
|
@@ -35079,7 +35079,7 @@ let og = new Ro([
|
|
|
35079
35079
|
36
|
|
35080
35080
|
],
|
|
35081
35081
|
"FDArray",
|
|
35082
|
-
new xi(new
|
|
35082
|
+
new xi(new Li(og)),
|
|
35083
35083
|
null
|
|
35084
35084
|
],
|
|
35085
35085
|
[
|
|
@@ -35098,16 +35098,16 @@ let og = new Ro([
|
|
|
35098
35098
|
1: {
|
|
35099
35099
|
hdrSize: ne,
|
|
35100
35100
|
offSize: ne,
|
|
35101
|
-
nameIndex: new
|
|
35102
|
-
topDictIndex: new
|
|
35103
|
-
stringIndex: new
|
|
35104
|
-
globalSubrIndex: new
|
|
35101
|
+
nameIndex: new Li(new Qe("length")),
|
|
35102
|
+
topDictIndex: new Li(D6),
|
|
35103
|
+
stringIndex: new Li(new Qe("length")),
|
|
35104
|
+
globalSubrIndex: new Li()
|
|
35105
35105
|
},
|
|
35106
35106
|
2: {
|
|
35107
35107
|
hdrSize: ne,
|
|
35108
35108
|
length: d,
|
|
35109
35109
|
topDict: W6,
|
|
35110
|
-
globalSubrIndex: new
|
|
35110
|
+
globalSubrIndex: new Li()
|
|
35111
35111
|
}
|
|
35112
35112
|
});
|
|
35113
35113
|
var lg = Z6;
|
|
@@ -35263,16 +35263,16 @@ new Be("version", {
|
|
|
35263
35263
|
17: {
|
|
35264
35264
|
metrics: bn,
|
|
35265
35265
|
dataLen: F,
|
|
35266
|
-
data: new
|
|
35266
|
+
data: new Ri("dataLen")
|
|
35267
35267
|
},
|
|
35268
35268
|
18: {
|
|
35269
35269
|
metrics: Na,
|
|
35270
35270
|
dataLen: F,
|
|
35271
|
-
data: new
|
|
35271
|
+
data: new Ri("dataLen")
|
|
35272
35272
|
},
|
|
35273
35273
|
19: {
|
|
35274
35274
|
dataLen: F,
|
|
35275
|
-
data: new
|
|
35275
|
+
data: new Ri("dataLen")
|
|
35276
35276
|
}
|
|
35277
35277
|
});
|
|
35278
35278
|
let Gf = new B({
|
|
@@ -35333,7 +35333,7 @@ let Gf = new B({
|
|
|
35333
35333
|
ppemX: ne,
|
|
35334
35334
|
ppemY: ne,
|
|
35335
35335
|
bitDepth: ne,
|
|
35336
|
-
flags: new
|
|
35336
|
+
flags: new Ci(ne, [
|
|
35337
35337
|
"horizontal",
|
|
35338
35338
|
"vertical"
|
|
35339
35339
|
])
|
|
@@ -35350,7 +35350,7 @@ let J6 = new B({
|
|
|
35350
35350
|
});
|
|
35351
35351
|
var Q6 = new B({
|
|
35352
35352
|
version: d,
|
|
35353
|
-
flags: new
|
|
35353
|
+
flags: new Ci(d, [
|
|
35354
35354
|
"renderOutlines"
|
|
35355
35355
|
]),
|
|
35356
35356
|
numImgTables: F,
|
|
@@ -35503,7 +35503,7 @@ var yI = new Be(F, {
|
|
|
35503
35503
|
itemVariationStore: new _(F, Do)
|
|
35504
35504
|
}
|
|
35505
35505
|
});
|
|
35506
|
-
let ma = new
|
|
35506
|
+
let ma = new Ci(d, [
|
|
35507
35507
|
"xPlacement",
|
|
35508
35508
|
"yPlacement",
|
|
35509
35509
|
"xAdvance",
|
|
@@ -35781,7 +35781,7 @@ class zI {
|
|
|
35781
35781
|
}
|
|
35782
35782
|
}
|
|
35783
35783
|
size(e, i) {
|
|
35784
|
-
return
|
|
35784
|
+
return Di(this._size, null, i);
|
|
35785
35785
|
}
|
|
35786
35786
|
constructor(e) {
|
|
35787
35787
|
this._size = e;
|
|
@@ -35811,7 +35811,7 @@ let UI = new B({
|
|
|
35811
35811
|
}), WI = new B({
|
|
35812
35812
|
reserved: new ut(d, 2),
|
|
35813
35813
|
cbSignature: F,
|
|
35814
|
-
signature: new
|
|
35814
|
+
signature: new Ri("cbSignature")
|
|
35815
35815
|
});
|
|
35816
35816
|
var ZI = new B({
|
|
35817
35817
|
ulVersion: F,
|
|
@@ -35822,7 +35822,7 @@ var ZI = new B({
|
|
|
35822
35822
|
});
|
|
35823
35823
|
let HI = new B({
|
|
35824
35824
|
rangeMaxPPEM: d,
|
|
35825
|
-
rangeGaspBehavior: new
|
|
35825
|
+
rangeGaspBehavior: new Ci(d, [
|
|
35826
35826
|
"grayscale",
|
|
35827
35827
|
"gridfit",
|
|
35828
35828
|
"symmetricSmoothing",
|
|
@@ -35896,7 +35896,7 @@ let YI = new B({
|
|
|
35896
35896
|
subVersion: d,
|
|
35897
35897
|
length: d,
|
|
35898
35898
|
format: ne,
|
|
35899
|
-
coverage: new
|
|
35899
|
+
coverage: new Ci(ne, [
|
|
35900
35900
|
"horizontal",
|
|
35901
35901
|
"minimum",
|
|
35902
35902
|
"crossStream",
|
|
@@ -35908,7 +35908,7 @@ let YI = new B({
|
|
|
35908
35908
|
},
|
|
35909
35909
|
1: {
|
|
35910
35910
|
length: F,
|
|
35911
|
-
coverage: new
|
|
35911
|
+
coverage: new Ci(ne, [
|
|
35912
35912
|
null,
|
|
35913
35913
|
null,
|
|
35914
35914
|
null,
|
|
@@ -36035,7 +36035,7 @@ class c8 {
|
|
|
36035
36035
|
this.type = e, this.stream = i, this.parent = s, this.base = this.stream.pos, this._items = [];
|
|
36036
36036
|
}
|
|
36037
36037
|
}
|
|
36038
|
-
class
|
|
36038
|
+
class Bi extends P {
|
|
36039
36039
|
decode(e, i) {
|
|
36040
36040
|
return new c8(this.type, e, i);
|
|
36041
36041
|
}
|
|
@@ -36081,7 +36081,7 @@ let Is = function(t = d) {
|
|
|
36081
36081
|
});
|
|
36082
36082
|
return new Be(d, {
|
|
36083
36083
|
0: {
|
|
36084
|
-
values: new
|
|
36084
|
+
values: new Bi(t)
|
|
36085
36085
|
// length == number of glyphs maybe?
|
|
36086
36086
|
},
|
|
36087
36087
|
2: {
|
|
@@ -36107,12 +36107,12 @@ function wn(t = {}, e = d) {
|
|
|
36107
36107
|
let i = Object.assign({
|
|
36108
36108
|
newState: d,
|
|
36109
36109
|
flags: d
|
|
36110
|
-
}, t), s = new B(i), a = new
|
|
36110
|
+
}, t), s = new B(i), a = new Bi(new P(d, (n) => n.nClasses));
|
|
36111
36111
|
return new B({
|
|
36112
36112
|
nClasses: F,
|
|
36113
36113
|
classTable: new _(F, new Is(e)),
|
|
36114
36114
|
stateArray: new _(F, a),
|
|
36115
|
-
entryTable: new _(F, new
|
|
36115
|
+
entryTable: new _(F, new Bi(s))
|
|
36116
36116
|
});
|
|
36117
36117
|
}
|
|
36118
36118
|
function u8(t = {}, e = d) {
|
|
@@ -36127,12 +36127,12 @@ function u8(t = {}, e = d) {
|
|
|
36127
36127
|
// convert offset to stateArray index
|
|
36128
36128
|
newState: (o) => (o.newStateOffset - (o.parent.stateArray.base - o.parent._startOffset)) / o.parent.nClasses,
|
|
36129
36129
|
flags: d
|
|
36130
|
-
}, t), a = new B(s), r = new
|
|
36130
|
+
}, t), a = new B(s), r = new Bi(new P(ne, (o) => o.nClasses));
|
|
36131
36131
|
return new B({
|
|
36132
36132
|
nClasses: d,
|
|
36133
36133
|
classTable: new _(d, i),
|
|
36134
36134
|
stateArray: new _(d, r),
|
|
36135
|
-
entryTable: new _(d, new
|
|
36135
|
+
entryTable: new _(d, new Bi(a))
|
|
36136
36136
|
});
|
|
36137
36137
|
}
|
|
36138
36138
|
let f8 = new Be("format", {
|
|
@@ -36169,7 +36169,7 @@ let h8 = new B({
|
|
|
36169
36169
|
settingTable: new _(F, new P(h8, "nSettings"), {
|
|
36170
36170
|
type: "parent"
|
|
36171
36171
|
}),
|
|
36172
|
-
featureFlags: new
|
|
36172
|
+
featureFlags: new Ci(ne, [
|
|
36173
36173
|
null,
|
|
36174
36174
|
null,
|
|
36175
36175
|
null,
|
|
@@ -36312,7 +36312,7 @@ let _8 = {
|
|
|
36312
36312
|
currentInsertIndex: d,
|
|
36313
36313
|
markedInsertIndex: d
|
|
36314
36314
|
}, M8 = new B({
|
|
36315
|
-
items: new
|
|
36315
|
+
items: new Bi(new _(F, new Is()))
|
|
36316
36316
|
}), O8 = new Be("type", {
|
|
36317
36317
|
0: {
|
|
36318
36318
|
stateTable: new wn()
|
|
@@ -36323,16 +36323,16 @@ let _8 = {
|
|
|
36323
36323
|
},
|
|
36324
36324
|
2: {
|
|
36325
36325
|
stateTable: new wn(_8),
|
|
36326
|
-
ligatureActions: new _(F, new
|
|
36327
|
-
components: new _(F, new
|
|
36328
|
-
ligatureList: new _(F, new
|
|
36326
|
+
ligatureActions: new _(F, new Bi(F)),
|
|
36327
|
+
components: new _(F, new Bi(d)),
|
|
36328
|
+
ligatureList: new _(F, new Bi(d))
|
|
36329
36329
|
},
|
|
36330
36330
|
4: {
|
|
36331
36331
|
lookupTable: new Is()
|
|
36332
36332
|
},
|
|
36333
36333
|
5: {
|
|
36334
36334
|
stateTable: new wn(V8),
|
|
36335
|
-
insertionActions: new _(F, new
|
|
36335
|
+
insertionActions: new _(F, new Bi(d))
|
|
36336
36336
|
}
|
|
36337
36337
|
}), L8 = new B({
|
|
36338
36338
|
length: F,
|
|
@@ -38681,7 +38681,7 @@ class oo {
|
|
|
38681
38681
|
this.font = e, this.table = i, this.script = null, this.scriptTag = null, this.language = null, this.languageTag = null, this.features = {}, this.lookups = {}, this.variationsIndex = e._variationProcessor ? this.findVariationsIndex(e._variationProcessor.normalizedCoords) : -1, this.selectScript(), this.glyphs = [], this.positions = [], this.ligatureID = 1, this.currentFeature = null;
|
|
38682
38682
|
}
|
|
38683
38683
|
}
|
|
38684
|
-
class
|
|
38684
|
+
class Si {
|
|
38685
38685
|
get id() {
|
|
38686
38686
|
return this._id;
|
|
38687
38687
|
}
|
|
@@ -38695,7 +38695,7 @@ class Ci {
|
|
|
38695
38695
|
this.isMark = this.codePoints.length > 0 && this.codePoints.every(B0), this.isBase = !this.isMark, this.isLigature = this.codePoints.length > 1, this.markAttachmentType = 0;
|
|
38696
38696
|
}
|
|
38697
38697
|
copy() {
|
|
38698
|
-
return new
|
|
38698
|
+
return new Si(this._font, this.id, this.codePoints, this.features);
|
|
38699
38699
|
}
|
|
38700
38700
|
constructor(e, i, s = [], a) {
|
|
38701
38701
|
if (this._font = e, this.codePoints = s, this.id = i, this.features = {}, Array.isArray(a)) for (let r = 0; r < a.length; r++) {
|
|
@@ -38719,7 +38719,7 @@ class mg extends Ps {
|
|
|
38719
38719
|
for (; a < i.length; ) {
|
|
38720
38720
|
let r, o = i[a].codePoints[0], l = fo(o);
|
|
38721
38721
|
switch ([r, s] = GE[s][l], r) {
|
|
38722
|
-
case
|
|
38722
|
+
case qi:
|
|
38723
38723
|
e.font.hasGlyphForCodePoint(o) || (a = wg(i, a, e.font));
|
|
38724
38724
|
break;
|
|
38725
38725
|
case pc:
|
|
@@ -38741,7 +38741,7 @@ const Wa = 44032, yg = 55204, IE = yg - Wa + 1, Wo = 4352, Zo = 4449, Ks = 4519,
|
|
|
38741
38741
|
function fo(t) {
|
|
38742
38742
|
return VE(t) ? ZE : ME(t) ? co : OE(t) ? du : zE(t) ? uo : BE(t) ? bg : LE(t) ? HE : WE;
|
|
38743
38743
|
}
|
|
38744
|
-
const ii = 0,
|
|
38744
|
+
const ii = 0, qi = 1, pc = 2, gc = 4, mc = 5, GE = [
|
|
38745
38745
|
// X L V T LV LVT M
|
|
38746
38746
|
// State 0: start state
|
|
38747
38747
|
[
|
|
@@ -38762,11 +38762,11 @@ const ii = 0, ji = 1, pc = 2, gc = 4, mc = 5, GE = [
|
|
|
38762
38762
|
0
|
|
38763
38763
|
],
|
|
38764
38764
|
[
|
|
38765
|
-
|
|
38765
|
+
qi,
|
|
38766
38766
|
2
|
|
38767
38767
|
],
|
|
38768
38768
|
[
|
|
38769
|
-
|
|
38769
|
+
qi,
|
|
38770
38770
|
3
|
|
38771
38771
|
],
|
|
38772
38772
|
[
|
|
@@ -38793,11 +38793,11 @@ const ii = 0, ji = 1, pc = 2, gc = 4, mc = 5, GE = [
|
|
|
38793
38793
|
0
|
|
38794
38794
|
],
|
|
38795
38795
|
[
|
|
38796
|
-
|
|
38796
|
+
qi,
|
|
38797
38797
|
2
|
|
38798
38798
|
],
|
|
38799
38799
|
[
|
|
38800
|
-
|
|
38800
|
+
qi,
|
|
38801
38801
|
3
|
|
38802
38802
|
],
|
|
38803
38803
|
[
|
|
@@ -38824,11 +38824,11 @@ const ii = 0, ji = 1, pc = 2, gc = 4, mc = 5, GE = [
|
|
|
38824
38824
|
3
|
|
38825
38825
|
],
|
|
38826
38826
|
[
|
|
38827
|
-
|
|
38827
|
+
qi,
|
|
38828
38828
|
2
|
|
38829
38829
|
],
|
|
38830
38830
|
[
|
|
38831
|
-
|
|
38831
|
+
qi,
|
|
38832
38832
|
3
|
|
38833
38833
|
],
|
|
38834
38834
|
[
|
|
@@ -38855,11 +38855,11 @@ const ii = 0, ji = 1, pc = 2, gc = 4, mc = 5, GE = [
|
|
|
38855
38855
|
0
|
|
38856
38856
|
],
|
|
38857
38857
|
[
|
|
38858
|
-
|
|
38858
|
+
qi,
|
|
38859
38859
|
2
|
|
38860
38860
|
],
|
|
38861
38861
|
[
|
|
38862
|
-
|
|
38862
|
+
qi,
|
|
38863
38863
|
3
|
|
38864
38864
|
],
|
|
38865
38865
|
[
|
|
@@ -38869,7 +38869,7 @@ const ii = 0, ji = 1, pc = 2, gc = 4, mc = 5, GE = [
|
|
|
38869
38869
|
]
|
|
38870
38870
|
];
|
|
38871
38871
|
function Sr(t, e, i) {
|
|
38872
|
-
return new
|
|
38872
|
+
return new Si(t, t.glyphForCodePoint(e).id, [
|
|
38873
38873
|
e
|
|
38874
38874
|
], i);
|
|
38875
38875
|
}
|
|
@@ -39122,7 +39122,7 @@ class Pt extends Ps {
|
|
|
39122
39122
|
if (r) {
|
|
39123
39123
|
let n = r.map((o) => {
|
|
39124
39124
|
let l = e.font.glyphForCodePoint(o);
|
|
39125
|
-
return new
|
|
39125
|
+
return new Si(e.font, l.id, [
|
|
39126
39126
|
o
|
|
39127
39127
|
], i[s].features);
|
|
39128
39128
|
});
|
|
@@ -39162,13 +39162,13 @@ function eP(t, e) {
|
|
|
39162
39162
|
function Ds(t) {
|
|
39163
39163
|
return t.shaperInfo.category & KE;
|
|
39164
39164
|
}
|
|
39165
|
-
function
|
|
39165
|
+
function Mi(t) {
|
|
39166
39166
|
return t.shaperInfo.category & xg;
|
|
39167
39167
|
}
|
|
39168
|
-
function
|
|
39168
|
+
function ji(t) {
|
|
39169
39169
|
return t.shaperInfo.category & Ar;
|
|
39170
39170
|
}
|
|
39171
|
-
function
|
|
39171
|
+
function Xi(t, e) {
|
|
39172
39172
|
for (let s of t) s.features = {
|
|
39173
39173
|
[e]: !0
|
|
39174
39174
|
};
|
|
@@ -39182,12 +39182,12 @@ function tP(t, e, i) {
|
|
|
39182
39182
|
e,
|
|
39183
39183
|
i
|
|
39184
39184
|
];
|
|
39185
|
-
return
|
|
39185
|
+
return Xi(s.slice(0, 2), "blwf") || Xi(s.slice(1, 3), "blwf") ? ke.Below_C : Xi(s.slice(0, 2), "pstf") || Xi(s.slice(1, 3), "pstf") || Xi(s.slice(0, 2), "pref") || Xi(s.slice(1, 3), "pref") ? ke.Post_C : ke.Base_C;
|
|
39186
39186
|
}
|
|
39187
39187
|
function iP(t, e, i) {
|
|
39188
39188
|
let s = i.indicConfig, a = t._layoutEngine.engine.GSUBProcessor.features, r = t.glyphForCodePoint(9676).id, n = t.glyphForCodePoint(s.virama).id;
|
|
39189
39189
|
if (n) {
|
|
39190
|
-
let o = new
|
|
39190
|
+
let o = new Si(t, n, [
|
|
39191
39191
|
s.virama
|
|
39192
39192
|
]);
|
|
39193
39193
|
for (let l = 0; l < e.length; l++) e[l].shaperInfo.position === ke.Base_C && (e[l].shaperInfo.position = tP(t, e[l].copy(), o));
|
|
@@ -39196,7 +39196,7 @@ function iP(t, e, i) {
|
|
|
39196
39196
|
let { category: c, syllableType: u } = e[o].shaperInfo;
|
|
39197
39197
|
if (u === "symbol_cluster" || u === "non_indic_cluster") continue;
|
|
39198
39198
|
if (u === "broken_cluster" && r) {
|
|
39199
|
-
let v = new
|
|
39199
|
+
let v = new Si(t, r, [
|
|
39200
39200
|
9676
|
|
39201
39201
|
]);
|
|
39202
39202
|
v.shaperInfo = new Bn(1 << yc(v), Cg(v), e[o].shaperInfo.syllableType, e[o].shaperInfo.syllable);
|
|
@@ -39205,18 +39205,18 @@ function iP(t, e, i) {
|
|
|
39205
39205
|
e.splice(I++, 0, v), l++;
|
|
39206
39206
|
}
|
|
39207
39207
|
let f = l, h = o, p = !1;
|
|
39208
|
-
if (s.rephPos !== ke.Ra_To_Become_Reph && a.rphf && o + 3 <= l && (s.rephMode === "Implicit" && !
|
|
39208
|
+
if (s.rephPos !== ke.Ra_To_Become_Reph && a.rphf && o + 3 <= l && (s.rephMode === "Implicit" && !Mi(e[o + 2]) || s.rephMode === "Explicit" && e[o + 2].shaperInfo.category === ze.ZWJ)) {
|
|
39209
39209
|
let v = [
|
|
39210
39210
|
e[o].copy(),
|
|
39211
39211
|
e[o + 1].copy(),
|
|
39212
39212
|
e[o + 2].copy()
|
|
39213
39213
|
];
|
|
39214
|
-
if (
|
|
39215
|
-
for (h += 2; h < l &&
|
|
39214
|
+
if (Xi(v.slice(0, 2), "rphf") || s.rephMode === "Explicit" && Xi(v, "rphf")) {
|
|
39215
|
+
for (h += 2; h < l && Mi(e[h]); ) h++;
|
|
39216
39216
|
f = o, p = !0;
|
|
39217
39217
|
}
|
|
39218
39218
|
} else if (s.rephMode === "Log_Repha" && e[o].shaperInfo.category === ze.Repha) {
|
|
39219
|
-
for (h++; h < l &&
|
|
39219
|
+
for (h++; h < l && Mi(e[h]); ) h++;
|
|
39220
39220
|
f = o, p = !0;
|
|
39221
39221
|
}
|
|
39222
39222
|
switch (s.basePos) {
|
|
@@ -39303,13 +39303,13 @@ function iP(t, e, i) {
|
|
|
39303
39303
|
e[v].copy(),
|
|
39304
39304
|
e[v + 1].copy()
|
|
39305
39305
|
];
|
|
39306
|
-
if (
|
|
39306
|
+
if (Xi(I, "pref")) {
|
|
39307
39307
|
for (let b = 0; b < A; b++) e[v++].features.pref = !0;
|
|
39308
39308
|
if (a.cfar) for (; v < l; v++) e[v].features.cfar = !0;
|
|
39309
39309
|
break;
|
|
39310
39310
|
}
|
|
39311
39311
|
}
|
|
39312
|
-
for (let v = o + 1; v < l; v++) if (
|
|
39312
|
+
for (let v = o + 1; v < l; v++) if (Mi(e[v])) {
|
|
39313
39313
|
let I = e[v].shaperInfo.category === ze.ZWNJ, b = v;
|
|
39314
39314
|
do
|
|
39315
39315
|
b--, I && delete e[b].features.half;
|
|
@@ -39325,16 +39325,16 @@ function sP(t, e, i) {
|
|
|
39325
39325
|
if (o && l + 1 < n) {
|
|
39326
39326
|
for (let c = l + 1; c < n; c++) if (e[c].features.pref) {
|
|
39327
39327
|
if (!(e[c].substituted && e[c].isLigated && !e[c].isMultiplied)) {
|
|
39328
|
-
for (l = c; l < n &&
|
|
39328
|
+
for (l = c; l < n && ji(e[l]); ) l++;
|
|
39329
39329
|
e[l].shaperInfo.position = ke.BASE_C, o = !1;
|
|
39330
39330
|
}
|
|
39331
39331
|
break;
|
|
39332
39332
|
}
|
|
39333
39333
|
}
|
|
39334
39334
|
if (i.unicodeScript === "Malayalam") for (let c = l + 1; c < n; c++) {
|
|
39335
|
-
for (; c < n &&
|
|
39336
|
-
if (c === n || !
|
|
39337
|
-
for (c++; c < n &&
|
|
39335
|
+
for (; c < n && Mi(e[c]); ) c++;
|
|
39336
|
+
if (c === n || !ji(e[c])) break;
|
|
39337
|
+
for (c++; c < n && Mi(e[c]); ) c++;
|
|
39338
39338
|
c < n && Ds(e[c]) && e[c].shaperInfo.position === ke.Below_C && (l = c, e[l].shaperInfo.position = ke.Base_C);
|
|
39339
39339
|
}
|
|
39340
39340
|
r < l && e[l].shaperInfo.position > ke.Base_C && l--;
|
|
@@ -39345,7 +39345,7 @@ function sP(t, e, i) {
|
|
|
39345
39345
|
let c = l === n ? l - 2 : l - 1;
|
|
39346
39346
|
if (i.unicodeScript !== "Malayalam" && i.unicodeScript !== "Tamil") {
|
|
39347
39347
|
for (; c > r && !(e[c].shaperInfo.category & (ze.M | Ar)); ) c--;
|
|
39348
|
-
|
|
39348
|
+
ji(e[c]) && e[c].shaperInfo.position !== ke.Pre_M ? c + 1 < n && Mi(e[c + 1]) && c++ : c = r;
|
|
39349
39349
|
}
|
|
39350
39350
|
if (r < c && e[c].shaperInfo.position !== ke.Pre_M) {
|
|
39351
39351
|
for (let u = c; u > r; u--) if (e[u - 1].shaperInfo.position === ke.Pre_M) {
|
|
@@ -39359,8 +39359,8 @@ function sP(t, e, i) {
|
|
|
39359
39359
|
if (r + 1 < n && e[r].shaperInfo.position === ke.Ra_To_Become_Reph && e[r].shaperInfo.category === ze.Repha !== (e[r].isLigated && !e[r].isMultiplied)) {
|
|
39360
39360
|
let c, u = s.rephPos, f = !1;
|
|
39361
39361
|
if (u !== ke.After_Post) {
|
|
39362
|
-
for (c = r + 1; c < l && !
|
|
39363
|
-
if (c < l &&
|
|
39362
|
+
for (c = r + 1; c < l && !ji(e[c]); ) c++;
|
|
39363
|
+
if (c < l && ji(e[c]) && (c + 1 < l && Mi(e[c + 1]) && c++, f = !0), !f && u === ke.After_Main) {
|
|
39364
39364
|
for (c = l; c + 1 < n && e[c + 1].shaperInfo.position <= ke.After_Main; ) c++;
|
|
39365
39365
|
f = c < n;
|
|
39366
39366
|
}
|
|
@@ -39370,12 +39370,12 @@ function sP(t, e, i) {
|
|
|
39370
39370
|
}
|
|
39371
39371
|
}
|
|
39372
39372
|
if (!f) {
|
|
39373
|
-
for (c = r + 1; c < l && !
|
|
39374
|
-
c < l &&
|
|
39373
|
+
for (c = r + 1; c < l && !ji(e[c]); ) c++;
|
|
39374
|
+
c < l && ji(e[c]) && (c + 1 < l && Mi(e[c + 1]) && c++, f = !0);
|
|
39375
39375
|
}
|
|
39376
39376
|
if (!f) {
|
|
39377
39377
|
for (c = n - 1; c > r && e[c].shaperInfo.position === ke.SMVD; ) c--;
|
|
39378
|
-
if (
|
|
39378
|
+
if (ji(e[c]))
|
|
39379
39379
|
for (let p = l + 1; p < c; p++) e[p].shaperInfo.category === ze.M && c--;
|
|
39380
39380
|
}
|
|
39381
39381
|
let h = e[r];
|
|
@@ -39395,7 +39395,7 @@ function sP(t, e, i) {
|
|
|
39395
39395
|
}
|
|
39396
39396
|
}
|
|
39397
39397
|
}
|
|
39398
|
-
u > r &&
|
|
39398
|
+
u > r && ji(e[u - 1]) && u < n && Mi(e[u]) && u++;
|
|
39399
39399
|
let f = c, h = e[f];
|
|
39400
39400
|
e.splice(u + 1, 0, ...e.splice(u, f - u)), e[u] = h, u <= l && l < f && l++;
|
|
39401
39401
|
}
|
|
@@ -39447,7 +39447,7 @@ class Le extends Ps {
|
|
|
39447
39447
|
if (ud[a]) {
|
|
39448
39448
|
let r = ud[a].map((n) => {
|
|
39449
39449
|
let o = e.font.glyphForCodePoint(n);
|
|
39450
|
-
return new
|
|
39450
|
+
return new Si(e.font, o.id, [
|
|
39451
39451
|
n
|
|
39452
39452
|
], i[s].features);
|
|
39453
39453
|
});
|
|
@@ -39489,7 +39489,7 @@ function fP(t, e) {
|
|
|
39489
39489
|
let r, n, o = e[s].shaperInfo, l = o.syllableType;
|
|
39490
39490
|
if (!(l !== "virama_terminated_cluster" && l !== "standard_cluster" && l !== "broken_cluster")) {
|
|
39491
39491
|
if (l === "broken_cluster" && i) {
|
|
39492
|
-
let c = new
|
|
39492
|
+
let c = new Si(t, i, [
|
|
39493
39493
|
9676
|
|
39494
39494
|
]);
|
|
39495
39495
|
for (c.shaperInfo = o, r = s; r < a && e[r].shaperInfo.category === "R"; r++) ;
|
|
@@ -39631,7 +39631,7 @@ class pP extends oo {
|
|
|
39631
39631
|
return this.glyphs.splice(this.glyphIterator.index, 1), !0;
|
|
39632
39632
|
this.glyphIterator.cur.id = r[0], this.glyphIterator.cur.ligatureComponent = 0;
|
|
39633
39633
|
let n = this.glyphIterator.cur.features, o = this.glyphIterator.cur, l = r.slice(1).map((c, u) => {
|
|
39634
|
-
let f = new
|
|
39634
|
+
let f = new Si(this.font, c, void 0, n);
|
|
39635
39635
|
return f.shaperInfo = o.shaperInfo, f.isLigated = o.isLigated, f.ligatureComponent = u + 1, f.substituted = !0, f.isMultiplied = !0, f;
|
|
39636
39636
|
});
|
|
39637
39637
|
return this.glyphs.splice(this.glyphIterator.index + 1, 0, ...l), !0;
|
|
@@ -39654,7 +39654,7 @@ class pP extends oo {
|
|
|
39654
39654
|
if (!n) continue;
|
|
39655
39655
|
let o = this.glyphIterator.cur, l = o.codePoints.slice();
|
|
39656
39656
|
for (let w of n) l.push(...this.glyphs[w].codePoints);
|
|
39657
|
-
let c = new
|
|
39657
|
+
let c = new Si(this.font, r.glyph, l, o.features);
|
|
39658
39658
|
c.shaperInfo = o.shaperInfo, c.isLigated = !0, c.substituted = !0;
|
|
39659
39659
|
let u = o.isMark;
|
|
39660
39660
|
for (let w = 0; w < n.length && u; w++) u = this.glyphs[n[w]].isMark;
|
|
@@ -39830,7 +39830,7 @@ class gP extends oo {
|
|
|
39830
39830
|
}
|
|
39831
39831
|
class mP {
|
|
39832
39832
|
setup(e) {
|
|
39833
|
-
this.glyphInfos = e.glyphs.map((s) => new
|
|
39833
|
+
this.glyphInfos = e.glyphs.map((s) => new Si(this.font, s.id, [
|
|
39834
39834
|
...s.codePoints
|
|
39835
39835
|
]));
|
|
39836
39836
|
let i = null;
|
|
@@ -40351,7 +40351,7 @@ var cr = [
|
|
|
40351
40351
|
"ccaron",
|
|
40352
40352
|
"dcroat"
|
|
40353
40353
|
];
|
|
40354
|
-
class
|
|
40354
|
+
class Ui {
|
|
40355
40355
|
_getPath() {
|
|
40356
40356
|
return new Ka();
|
|
40357
40357
|
}
|
|
@@ -40481,22 +40481,22 @@ class Di {
|
|
|
40481
40481
|
}
|
|
40482
40482
|
Zt([
|
|
40483
40483
|
Ht
|
|
40484
|
-
],
|
|
40484
|
+
], Ui.prototype, "cbox", null);
|
|
40485
40485
|
Zt([
|
|
40486
40486
|
Ht
|
|
40487
|
-
],
|
|
40487
|
+
], Ui.prototype, "bbox", null);
|
|
40488
40488
|
Zt([
|
|
40489
40489
|
Ht
|
|
40490
|
-
],
|
|
40490
|
+
], Ui.prototype, "path", null);
|
|
40491
40491
|
Zt([
|
|
40492
40492
|
Ht
|
|
40493
|
-
],
|
|
40493
|
+
], Ui.prototype, "advanceWidth", null);
|
|
40494
40494
|
Zt([
|
|
40495
40495
|
Ht
|
|
40496
|
-
],
|
|
40496
|
+
], Ui.prototype, "advanceHeight", null);
|
|
40497
40497
|
Zt([
|
|
40498
40498
|
Ht
|
|
40499
|
-
],
|
|
40499
|
+
], Ui.prototype, "name", null);
|
|
40500
40500
|
let gd = new B({
|
|
40501
40501
|
numberOfContours: Y,
|
|
40502
40502
|
xMin: Y,
|
|
@@ -40518,7 +40518,7 @@ class PP {
|
|
|
40518
40518
|
this.glyphID = e, this.dx = i, this.dy = s, this.pos = 0, this.scaleX = this.scaleY = 1, this.scale01 = this.scale10 = 0;
|
|
40519
40519
|
}
|
|
40520
40520
|
}
|
|
40521
|
-
class Go extends
|
|
40521
|
+
class Go extends Ui {
|
|
40522
40522
|
// Parses just the glyph header and returns the bounding box
|
|
40523
40523
|
_getCBox(e) {
|
|
40524
40524
|
if (this._font._variationProcessor && !e) return this.path.cbox;
|
|
@@ -40607,7 +40607,7 @@ class Go extends Di {
|
|
|
40607
40607
|
}
|
|
40608
40608
|
_getPhantomPoints(e) {
|
|
40609
40609
|
let i = this._getCBox(!0);
|
|
40610
|
-
this._metrics == null && (this._metrics =
|
|
40610
|
+
this._metrics == null && (this._metrics = Ui.prototype._getMetrics.call(this, i));
|
|
40611
40611
|
let { advanceWidth: s, advanceHeight: a, leftBearing: r, topBearing: n } = this._metrics;
|
|
40612
40612
|
return [
|
|
40613
40613
|
new wi(!1, !0, e.xMin - r, 0),
|
|
@@ -40680,7 +40680,7 @@ class Go extends Di {
|
|
|
40680
40680
|
super(...e), oi(this, "type", "TTF");
|
|
40681
40681
|
}
|
|
40682
40682
|
}
|
|
40683
|
-
class _P extends
|
|
40683
|
+
class _P extends Ui {
|
|
40684
40684
|
_getName() {
|
|
40685
40685
|
return this._font.CFF2 ? super._getName() : this._font["CFF "].getGlyphName(this.id);
|
|
40686
40686
|
}
|
|
@@ -40924,7 +40924,7 @@ let FP = new B({
|
|
|
40924
40924
|
originX: d,
|
|
40925
40925
|
originY: d,
|
|
40926
40926
|
type: new Qe(4),
|
|
40927
|
-
data: new
|
|
40927
|
+
data: new Ri((t) => t.parent.buflen - t._currentOffset)
|
|
40928
40928
|
});
|
|
40929
40929
|
class VP extends Go {
|
|
40930
40930
|
/**
|
|
@@ -40966,7 +40966,7 @@ class yd {
|
|
|
40966
40966
|
this.glyph = e, this.color = i;
|
|
40967
40967
|
}
|
|
40968
40968
|
}
|
|
40969
|
-
class MP extends
|
|
40969
|
+
class MP extends Ui {
|
|
40970
40970
|
_getBBox() {
|
|
40971
40971
|
let e = new Es();
|
|
40972
40972
|
for (let i = 0; i < this.layers.length; i++) {
|
|
@@ -42071,7 +42071,7 @@ class Bs {
|
|
|
42071
42071
|
return new Wt(this._buf.decode(e, i));
|
|
42072
42072
|
}
|
|
42073
42073
|
constructor(e) {
|
|
42074
|
-
this.length = e, this._buf = new
|
|
42074
|
+
this.length = e, this._buf = new Ri(e);
|
|
42075
42075
|
}
|
|
42076
42076
|
}
|
|
42077
42077
|
let n_ = new B({
|
|
@@ -42098,7 +42098,7 @@ function Nl(t) {
|
|
|
42098
42098
|
let e = t.readUInt8();
|
|
42099
42099
|
return e === o_ ? t.readUInt16BE() : e === c_ ? t.readUInt8() + Ad : e === l_ ? t.readUInt8() + Ad * 2 : e;
|
|
42100
42100
|
}
|
|
42101
|
-
function
|
|
42101
|
+
function Ti(t, e) {
|
|
42102
42102
|
return t & 1 ? e : -e;
|
|
42103
42103
|
}
|
|
42104
42104
|
function u_(t, e, i) {
|
|
@@ -42106,21 +42106,21 @@ function u_(t, e, i) {
|
|
|
42106
42106
|
for (let l = 0; l < i; l++) {
|
|
42107
42107
|
let c = 0, u = 0, f = t.readUInt8(), h = !(f >> 7);
|
|
42108
42108
|
if (f &= 127, f < 10)
|
|
42109
|
-
c = 0, u =
|
|
42109
|
+
c = 0, u = Ti(f, ((f & 14) << 7) + e.readUInt8());
|
|
42110
42110
|
else if (f < 20)
|
|
42111
|
-
c =
|
|
42111
|
+
c = Ti(f, ((f - 10 & 14) << 7) + e.readUInt8()), u = 0;
|
|
42112
42112
|
else if (f < 84) {
|
|
42113
42113
|
var n = f - 20, o = e.readUInt8();
|
|
42114
|
-
c =
|
|
42114
|
+
c = Ti(f, 1 + (n & 48) + (o >> 4)), u = Ti(f >> 1, 1 + ((n & 12) << 2) + (o & 15));
|
|
42115
42115
|
} else if (f < 120) {
|
|
42116
42116
|
var n = f - 84;
|
|
42117
|
-
c =
|
|
42117
|
+
c = Ti(f, 1 + (n / 12 << 8) + e.readUInt8()), u = Ti(f >> 1, 1 + (n % 12 >> 2 << 8) + e.readUInt8());
|
|
42118
42118
|
} else if (f < 124) {
|
|
42119
42119
|
var o = e.readUInt8();
|
|
42120
42120
|
let y = e.readUInt8();
|
|
42121
|
-
c =
|
|
42121
|
+
c = Ti(f, (o << 4) + (y >> 4)), u = Ti(f >> 1, ((y & 15) << 8) + e.readUInt8());
|
|
42122
42122
|
} else
|
|
42123
|
-
c =
|
|
42123
|
+
c = Ti(f, e.readUInt16BE()), u = Ti(f >> 1, e.readUInt16BE());
|
|
42124
42124
|
a += c, s += u, r.push(new wi(h, !1, a, s));
|
|
42125
42125
|
}
|
|
42126
42126
|
return r;
|
|
@@ -42167,7 +42167,7 @@ class d_ {
|
|
|
42167
42167
|
let h_ = new Qe(ne);
|
|
42168
42168
|
new B({
|
|
42169
42169
|
len: F,
|
|
42170
|
-
buf: new
|
|
42170
|
+
buf: new Ri("len")
|
|
42171
42171
|
});
|
|
42172
42172
|
let p_ = new B({
|
|
42173
42173
|
id: d,
|
|
@@ -44460,7 +44460,7 @@ class Ia extends hi {
|
|
|
44460
44460
|
super(e, s, at.RichText);
|
|
44461
44461
|
}
|
|
44462
44462
|
buildCanvasPayload(e, i) {
|
|
44463
|
-
const s = this.clipConfiguration.width || this.edit.size.width, a = this.clipConfiguration.height || this.edit.size.height, r = e.font?.family, { baseFontFamily: n, fontWeight: o } = i ?? (r ?
|
|
44463
|
+
const s = this.clipConfiguration.width || this.edit.size.width, a = this.clipConfiguration.height || this.edit.size.height, r = e.font?.family, { baseFontFamily: n, fontWeight: o } = i ?? (r ? ki(r) : { baseFontFamily: r, fontWeight: 400 }), l = e.font?.weight;
|
|
44464
44464
|
let c = o;
|
|
44465
44465
|
typeof l == "string" ? c = parseInt(l, 10) || o : typeof l == "number" && (c = l);
|
|
44466
44466
|
const u = this.edit.getTimelineFonts(), f = r ? u.find((p) => {
|
|
@@ -44501,14 +44501,17 @@ class Ia extends hi {
|
|
|
44501
44501
|
return this.fontSupportsBold;
|
|
44502
44502
|
}
|
|
44503
44503
|
resolveFont(e) {
|
|
44504
|
-
const { baseFontFamily: i, fontWeight: s } =
|
|
44505
|
-
|
|
44506
|
-
return
|
|
44504
|
+
const { baseFontFamily: i, fontWeight: s } = ki(e), a = this.edit.getFontUrlByFamilyAndWeight(i, s);
|
|
44505
|
+
if (a)
|
|
44506
|
+
return { url: a, baseFontFamily: i, fontWeight: s };
|
|
44507
|
+
const o = (this.edit.getEdit()?.timeline?.fonts || []).find((c) => {
|
|
44508
|
+
const { full: u, base: f } = Ld(c.src), h = e.toLowerCase();
|
|
44509
|
+
return u.toLowerCase() === h || f.toLowerCase() === h;
|
|
44507
44510
|
});
|
|
44508
|
-
if (
|
|
44509
|
-
return { url:
|
|
44510
|
-
const
|
|
44511
|
-
return
|
|
44511
|
+
if (o)
|
|
44512
|
+
return { url: o.src, baseFontFamily: i, fontWeight: s };
|
|
44513
|
+
const l = Fc(e);
|
|
44514
|
+
return l ? { url: l, baseFontFamily: i, fontWeight: s } : null;
|
|
44512
44515
|
}
|
|
44513
44516
|
reconfigureAfterRestore() {
|
|
44514
44517
|
super.reconfigureAfterRestore(), this.reconfigure(this.clipConfiguration.asset);
|
|
@@ -44542,7 +44545,7 @@ class Ia extends hi {
|
|
|
44542
44545
|
this.createFallbackText(e);
|
|
44543
44546
|
return;
|
|
44544
44547
|
}
|
|
44545
|
-
const s = e.font?.family, a = s ?
|
|
44548
|
+
const s = e.font?.family, a = s ? ki(s) : void 0, r = this.buildCanvasPayload(e, a);
|
|
44546
44549
|
this.textEngine = await TF({
|
|
44547
44550
|
width: r.width,
|
|
44548
44551
|
height: r.height,
|
|
@@ -44751,7 +44754,7 @@ class NF extends hi {
|
|
|
44751
44754
|
}
|
|
44752
44755
|
}
|
|
44753
44756
|
const IF = "https://unpkg.com/@resvg/resvg-wasm@2.6.2/index_bg.wasm";
|
|
44754
|
-
class
|
|
44757
|
+
class Yi extends hi {
|
|
44755
44758
|
static resvgInitialized = !1;
|
|
44756
44759
|
static resvgInitPromise = null;
|
|
44757
44760
|
texture = null;
|
|
@@ -44762,15 +44765,15 @@ class qi extends hi {
|
|
|
44762
44765
|
super(e, i, at.Svg);
|
|
44763
44766
|
}
|
|
44764
44767
|
static async initializeResvg() {
|
|
44765
|
-
if (!
|
|
44766
|
-
if (
|
|
44767
|
-
await
|
|
44768
|
+
if (!Yi.resvgInitialized) {
|
|
44769
|
+
if (Yi.resvgInitPromise) {
|
|
44770
|
+
await Yi.resvgInitPromise;
|
|
44768
44771
|
return;
|
|
44769
44772
|
}
|
|
44770
|
-
|
|
44773
|
+
Yi.resvgInitPromise = (async () => {
|
|
44771
44774
|
const i = await (await fetch(IF)).arrayBuffer();
|
|
44772
|
-
await lF(i),
|
|
44773
|
-
})(), await
|
|
44775
|
+
await lF(i), Yi.resvgInitialized = !0;
|
|
44776
|
+
})(), await Yi.resvgInitPromise;
|
|
44774
44777
|
}
|
|
44775
44778
|
}
|
|
44776
44779
|
async load() {
|
|
@@ -44782,7 +44785,7 @@ class qi extends hi {
|
|
|
44782
44785
|
console.error("SVG asset validation failed:", i.error), this.createFallbackGraphic();
|
|
44783
44786
|
return;
|
|
44784
44787
|
}
|
|
44785
|
-
await
|
|
44788
|
+
await Yi.initializeResvg();
|
|
44786
44789
|
const s = this.clipConfiguration.width || this.edit.size.width, a = this.clipConfiguration.height || this.edit.size.height, r = await SF(e, {
|
|
44787
44790
|
defaultWidth: s,
|
|
44788
44791
|
defaultHeight: a
|
|
@@ -45132,7 +45135,7 @@ class yo {
|
|
|
45132
45135
|
this.hiddenInput && this.hiddenInput.select();
|
|
45133
45136
|
}
|
|
45134
45137
|
}
|
|
45135
|
-
class
|
|
45138
|
+
class Pi {
|
|
45136
45139
|
static DOUBLE_CLICK_THRESHOLD_MS = 300;
|
|
45137
45140
|
static EDITING_BG_PADDING_PX = 5;
|
|
45138
45141
|
static EDITING_BG_ALPHA = 0.2;
|
|
@@ -45165,7 +45168,7 @@ class Ei {
|
|
|
45165
45168
|
}
|
|
45166
45169
|
checkForDoubleClick = (e) => {
|
|
45167
45170
|
const i = Date.now();
|
|
45168
|
-
i - this.lastClickTime <
|
|
45171
|
+
i - this.lastClickTime < Pi.DOUBLE_CLICK_THRESHOLD_MS && this.startEditing(), this.lastClickTime = i;
|
|
45169
45172
|
};
|
|
45170
45173
|
setupOutsideClickHandler(e) {
|
|
45171
45174
|
this.outsideClickHandler = (i) => {
|
|
@@ -45173,7 +45176,7 @@ class Ei {
|
|
|
45173
45176
|
(r < a.x || r > a.x + a.width || n < a.y || n > a.y + a.height) && (this.stopEditing(!0, e), this.outsideClickHandler && (window.removeEventListener("click", this.outsideClickHandler), this.outsideClickHandler = null));
|
|
45174
45177
|
}, setTimeout(() => {
|
|
45175
45178
|
this.outsideClickHandler && window.addEventListener("click", this.outsideClickHandler);
|
|
45176
|
-
},
|
|
45179
|
+
}, Pi.CLICK_HANDLER_DELAY_MS);
|
|
45177
45180
|
}
|
|
45178
45181
|
createEditingEnvironment() {
|
|
45179
45182
|
this.setupEditingContainer(), this.editingContainer && this.editableText && (this.textCursor = new Nr(this.editingContainer, this.editableText, this.clipConfig), this.textCursor.updatePosition(this.targetText.text.length), this.textCursor.startBlinking()), this.setupTextInputHandler(), this.updateTextAlignment();
|
|
@@ -45181,11 +45184,11 @@ class Ei {
|
|
|
45181
45184
|
setupEditingContainer() {
|
|
45182
45185
|
this.editingContainer = new ie.Container(), this.parent.getContainer().addChild(this.editingContainer);
|
|
45183
45186
|
const e = new ie.Graphics();
|
|
45184
|
-
e.fillStyle = { color: 0, alpha:
|
|
45187
|
+
e.fillStyle = { color: 0, alpha: Pi.EDITING_BG_ALPHA }, e.rect(
|
|
45185
45188
|
-5,
|
|
45186
45189
|
-5,
|
|
45187
|
-
this.targetText.width + 2 *
|
|
45188
|
-
this.targetText.height + 2 *
|
|
45190
|
+
this.targetText.width + 2 * Pi.EDITING_BG_PADDING_PX,
|
|
45191
|
+
this.targetText.height + 2 * Pi.EDITING_BG_PADDING_PX
|
|
45189
45192
|
), e.fill(), this.editingContainer.addChild(e), this.editableText = new ie.Text(this.targetText.text, this.targetText.style), this.editableText.eventMode = "static", this.editableText.cursor = "text", this.editingContainer.addChild(this.editableText);
|
|
45190
45193
|
}
|
|
45191
45194
|
setupTextInputHandler() {
|
|
@@ -45201,11 +45204,11 @@ class Ei {
|
|
|
45201
45204
|
const e = this.getContainerDimensions(), i = this.getAlignmentSettings(), s = this.calculateHorizontalPosition({ width: this.editableText.width }, e, i.horizontal), a = this.calculateVerticalPosition({ height: this.editableText.height }, e, i.vertical);
|
|
45202
45205
|
if (this.editingContainer.position.set(s, a), this.editingContainer.children.length > 0) {
|
|
45203
45206
|
const r = this.editingContainer.getChildAt(0);
|
|
45204
|
-
r instanceof ie.Graphics && (r.clear(), r.fillStyle = { color: 0, alpha:
|
|
45207
|
+
r instanceof ie.Graphics && (r.clear(), r.fillStyle = { color: 0, alpha: Pi.EDITING_BG_ALPHA }, r.rect(
|
|
45205
45208
|
-5,
|
|
45206
45209
|
-5,
|
|
45207
|
-
this.editableText.width + 2 *
|
|
45208
|
-
this.editableText.height + 2 *
|
|
45210
|
+
this.editableText.width + 2 * Pi.EDITING_BG_PADDING_PX,
|
|
45211
|
+
this.editableText.height + 2 * Pi.EDITING_BG_PADDING_PX
|
|
45209
45212
|
), r.fill());
|
|
45210
45213
|
}
|
|
45211
45214
|
}
|
|
@@ -45265,7 +45268,7 @@ class Va extends hi {
|
|
|
45265
45268
|
});
|
|
45266
45269
|
this.text.filters = [s];
|
|
45267
45270
|
}
|
|
45268
|
-
this.contentContainer.addChild(this.background), this.contentContainer.addChild(this.text), this.configureKeyframes(), this.textEditor = new
|
|
45271
|
+
this.contentContainer.addChild(this.background), this.contentContainer.addChild(this.text), this.configureKeyframes(), this.textEditor = new Pi(this, this.text, this.clipConfiguration);
|
|
45269
45272
|
}
|
|
45270
45273
|
update(e, i) {
|
|
45271
45274
|
super.update(e, i);
|
|
@@ -45316,7 +45319,7 @@ class Va extends hi {
|
|
|
45316
45319
|
applyFixedDimensions() {
|
|
45317
45320
|
}
|
|
45318
45321
|
createTextStyle(e) {
|
|
45319
|
-
const i = e.font?.family ?? "Open Sans", { baseFontFamily: s, fontWeight: a } =
|
|
45322
|
+
const i = e.font?.family ?? "Open Sans", { baseFontFamily: s, fontWeight: a } = ki(i), { width: r } = this.getSize();
|
|
45320
45323
|
return new ie.TextStyle({
|
|
45321
45324
|
fontFamily: s,
|
|
45322
45325
|
fontSize: e.font?.size ?? 32,
|
|
@@ -45347,7 +45350,7 @@ class Va extends hi {
|
|
|
45347
45350
|
this.edit.updateTextContent(this, e, i);
|
|
45348
45351
|
}
|
|
45349
45352
|
async loadFont(e) {
|
|
45350
|
-
const { baseFontFamily: i, fontWeight: s } =
|
|
45353
|
+
const { baseFontFamily: i, fontWeight: s } = ki(e), a = `${i}-${s}`;
|
|
45351
45354
|
if (Va.loadedFonts.has(a))
|
|
45352
45355
|
return;
|
|
45353
45356
|
const r = Fc(e);
|
|
@@ -46851,6 +46854,8 @@ class Ea extends ko {
|
|
|
46851
46854
|
lumaMaskController;
|
|
46852
46855
|
// Clip load errors - persisted so Timeline can query them after subscribing
|
|
46853
46856
|
clipErrors = /* @__PURE__ */ new Map();
|
|
46857
|
+
// Font metadata storage - maps URL to normalized base family + weight for rich-text font resolution
|
|
46858
|
+
fontMetadata = /* @__PURE__ */ new Map();
|
|
46854
46859
|
/**
|
|
46855
46860
|
* Create an Edit instance from a template configuration.
|
|
46856
46861
|
*
|
|
@@ -46890,8 +46895,12 @@ class Ea extends ko {
|
|
|
46890
46895
|
const a = this.detectMergeFieldBindings(i, s), r = s.length > 0 ? JF(i, s) : i, n = Ju.parse(r);
|
|
46891
46896
|
LF(n), this.edit = n, await Promise.all(
|
|
46892
46897
|
(this.edit.timeline.fonts ?? []).map(async (o) => {
|
|
46893
|
-
const l = o.src, c = { src: l, parser: Zr.Name };
|
|
46894
|
-
|
|
46898
|
+
const l = o.src, c = { src: l, parser: Zr.Name }, u = await this.assetLoader.load(l, c);
|
|
46899
|
+
if (u?.family) {
|
|
46900
|
+
const { baseFontFamily: f, fontWeight: h } = ki(u.family);
|
|
46901
|
+
this.fontMetadata.set(l, { baseFamilyName: f, weight: h });
|
|
46902
|
+
}
|
|
46903
|
+
return u;
|
|
46895
46904
|
})
|
|
46896
46905
|
), this.isLoadingEdit = !0;
|
|
46897
46906
|
for (const [o, l] of this.edit.timeline.tracks.entries())
|
|
@@ -47672,7 +47681,7 @@ class Ea extends ko {
|
|
|
47672
47681
|
break;
|
|
47673
47682
|
}
|
|
47674
47683
|
case "svg": {
|
|
47675
|
-
i = new
|
|
47684
|
+
i = new Yi(this, e);
|
|
47676
47685
|
break;
|
|
47677
47686
|
}
|
|
47678
47687
|
default:
|
|
@@ -47851,6 +47860,25 @@ class Ea extends ko {
|
|
|
47851
47860
|
getTimelineFonts() {
|
|
47852
47861
|
return this.edit?.timeline?.fonts ?? [];
|
|
47853
47862
|
}
|
|
47863
|
+
/**
|
|
47864
|
+
* Look up a font URL by family name and weight.
|
|
47865
|
+
* Uses normalized metadata extracted from TTF files during font loading.
|
|
47866
|
+
* This enables rich-text font resolution for template fonts with UUID-based URLs.
|
|
47867
|
+
*
|
|
47868
|
+
* @param familyName - The font family name (e.g., "Lato", "Lato Light")
|
|
47869
|
+
* @param weight - The font weight (e.g., 300 for Light, 900 for Black)
|
|
47870
|
+
* @returns The font URL if found, null otherwise
|
|
47871
|
+
*/
|
|
47872
|
+
getFontUrlByFamilyAndWeight(e, i) {
|
|
47873
|
+
const { baseFontFamily: s } = ki(e), a = s.toLowerCase();
|
|
47874
|
+
for (const [r, n] of this.fontMetadata)
|
|
47875
|
+
if (n.baseFamilyName.toLowerCase() === a && n.weight === i)
|
|
47876
|
+
return r;
|
|
47877
|
+
for (const [r, n] of this.fontMetadata)
|
|
47878
|
+
if (n.baseFamilyName.toLowerCase() === a)
|
|
47879
|
+
return r;
|
|
47880
|
+
return null;
|
|
47881
|
+
}
|
|
47854
47882
|
/**
|
|
47855
47883
|
* Remove any fonts from timeline.fonts that are no longer used by clips.
|
|
47856
47884
|
* Call this after changing a clip's font to clean up the old font.
|
|
@@ -48134,7 +48162,7 @@ function iV() {
|
|
|
48134
48162
|
return { supported: !1, reason: "webgl-error" };
|
|
48135
48163
|
}
|
|
48136
48164
|
}
|
|
48137
|
-
class
|
|
48165
|
+
class Ki {
|
|
48138
48166
|
/** @internal */
|
|
48139
48167
|
static CanvasSelector = "[data-shotstack-studio]";
|
|
48140
48168
|
static extensionsRegistered = !1;
|
|
@@ -48173,9 +48201,9 @@ class Xi {
|
|
|
48173
48201
|
this.uiController = e;
|
|
48174
48202
|
}
|
|
48175
48203
|
async load() {
|
|
48176
|
-
const e = document.querySelector(
|
|
48204
|
+
const e = document.querySelector(Ki.CanvasSelector);
|
|
48177
48205
|
if (!e)
|
|
48178
|
-
throw new Error(`Shotstack canvas root element '${
|
|
48206
|
+
throw new Error(`Shotstack canvas root element '${Ki.CanvasSelector}' not found.`);
|
|
48179
48207
|
if (!iV().supported) {
|
|
48180
48208
|
tV(e);
|
|
48181
48209
|
return;
|
|
@@ -48226,7 +48254,7 @@ class Xi {
|
|
|
48226
48254
|
o.scale.x = this.currentZoom, o.scale.y = this.currentZoom, this.centerEdit();
|
|
48227
48255
|
}
|
|
48228
48256
|
resize() {
|
|
48229
|
-
const e = document.querySelector(
|
|
48257
|
+
const e = document.querySelector(Ki.CanvasSelector);
|
|
48230
48258
|
if (!e) return;
|
|
48231
48259
|
const i = e.getBoundingClientRect();
|
|
48232
48260
|
i.width <= 0 || i.height <= 0 || (this.viewportSize = { width: i.width, height: i.height }, this.application.renderer.resize(i.width, i.height), this.background && (this.background.clear(), this.background.rect(0, 0, this.viewportSize.width, this.viewportSize.height), this.background.fill({ color: 15790581 })), this.application.stage.hitArea = new ie.Rectangle(0, 0, this.viewportSize.width, this.viewportSize.height), this.zoomToFit());
|
|
@@ -48264,7 +48292,7 @@ class Xi {
|
|
|
48264
48292
|
this.timeline = e;
|
|
48265
48293
|
}
|
|
48266
48294
|
registerExtensions() {
|
|
48267
|
-
|
|
48295
|
+
Ki.extensionsRegistered || (ie.extensions.add(new Fr()), ie.extensions.add(new Zr()), ie.extensions.add(new Oa()), Ki.extensionsRegistered = !0);
|
|
48268
48296
|
}
|
|
48269
48297
|
async configureApplication() {
|
|
48270
48298
|
const e = {
|
|
@@ -48293,7 +48321,7 @@ class Xi {
|
|
|
48293
48321
|
this.application.ticker.add(this.onTickBound);
|
|
48294
48322
|
}
|
|
48295
48323
|
dispose() {
|
|
48296
|
-
const e = document.querySelector(
|
|
48324
|
+
const e = document.querySelector(Ki.CanvasSelector);
|
|
48297
48325
|
e && e.contains(this.application.canvas) && e.removeChild(this.application.canvas), this.application.ticker.remove(this.onTickBound), this.background?.off("pointerdown", this.onBackgroundClickBound), this.background?.destroy(), this.overlayContainer.destroy(), this.container?.destroy(), this.uiController = null, this.application.destroy(!0, { children: !0, texture: !0 });
|
|
48298
48326
|
}
|
|
48299
48327
|
}
|
|
@@ -48505,10 +48533,10 @@ const he = (t) => {
|
|
|
48505
48533
|
if (e >= 32)
|
|
48506
48534
|
throw new Error("Invalid exponential-Golomb code.");
|
|
48507
48535
|
return (1 << e) - 1 + t.readBits(e);
|
|
48508
|
-
},
|
|
48536
|
+
}, ss = (t) => {
|
|
48509
48537
|
const e = he(t);
|
|
48510
48538
|
return e & 1 ? e + 1 >> 1 : -(e >> 1);
|
|
48511
|
-
}, as = (t) => t.constructor === Uint8Array ? t : ArrayBuffer.isView(t) ? new Uint8Array(t.buffer, t.byteOffset, t.byteLength) : new Uint8Array(t), kc = (t) => t.constructor === DataView ? t : ArrayBuffer.isView(t) ? new DataView(t.buffer, t.byteOffset, t.byteLength) : new DataView(t),
|
|
48539
|
+
}, as = (t) => t.constructor === Uint8Array ? t : ArrayBuffer.isView(t) ? new Uint8Array(t.buffer, t.byteOffset, t.byteLength) : new Uint8Array(t), kc = (t) => t.constructor === DataView ? t : ArrayBuffer.isView(t) ? new DataView(t.buffer, t.byteOffset, t.byteLength) : new DataView(t), zi = /* @__PURE__ */ new TextEncoder(), yu = {
|
|
48512
48540
|
bt709: 1,
|
|
48513
48541
|
// ITU-R BT.709
|
|
48514
48542
|
bt470bg: 5,
|
|
@@ -48711,7 +48739,7 @@ const ea = [
|
|
|
48711
48739
|
"vp9",
|
|
48712
48740
|
"av1",
|
|
48713
48741
|
"vp8"
|
|
48714
|
-
],
|
|
48742
|
+
], Wi = [
|
|
48715
48743
|
"pcm-s16",
|
|
48716
48744
|
// We don't prefix 'le' so we're compatible with the WebCodecs-registered PCM codec strings
|
|
48717
48745
|
"pcm-s16be",
|
|
@@ -48735,7 +48763,7 @@ const ea = [
|
|
|
48735
48763
|
"flac"
|
|
48736
48764
|
], Ha = [
|
|
48737
48765
|
...Bg,
|
|
48738
|
-
...
|
|
48766
|
+
...Wi
|
|
48739
48767
|
], xo = [
|
|
48740
48768
|
"webvtt"
|
|
48741
48769
|
], Zd = [
|
|
@@ -48931,7 +48959,7 @@ const ea = [
|
|
|
48931
48959
|
return "vorbis";
|
|
48932
48960
|
if (t === "flac")
|
|
48933
48961
|
return "flac";
|
|
48934
|
-
if (
|
|
48962
|
+
if (Wi.includes(t))
|
|
48935
48963
|
return t;
|
|
48936
48964
|
throw new TypeError(`Unhandled codec '${t}'.`);
|
|
48937
48965
|
}, Sc = [
|
|
@@ -48977,7 +49005,7 @@ const ea = [
|
|
|
48977
49005
|
const r = Math.ceil(a / 8), n = new Uint8Array(r), o = new $s(n);
|
|
48978
49006
|
return t.objectType < 32 ? o.writeBits(5, t.objectType) : (o.writeBits(5, 31), o.writeBits(6, t.objectType - 32)), o.writeBits(4, e), e === 15 && o.writeBits(24, i), o.writeBits(4, s), n;
|
|
48979
49007
|
}, Rg = /^pcm-([usf])(\d+)+(be)?$/, Ja = (t) => {
|
|
48980
|
-
if (oe(
|
|
49008
|
+
if (oe(Wi.includes(t)), t === "ulaw")
|
|
48981
49009
|
return { dataType: "ulaw", sampleSize: 1, littleEndian: !0, silentValue: 255 };
|
|
48982
49010
|
if (t === "alaw")
|
|
48983
49011
|
return { dataType: "alaw", sampleSize: 1, littleEndian: !0, silentValue: 213 };
|
|
@@ -49097,8 +49125,8 @@ const ea = [
|
|
|
49097
49125
|
throw new TypeError('Audio chunk metadata decoder configuration codec string for FLAC must be "flac".');
|
|
49098
49126
|
if (!t.decoderConfig.description || t.decoderConfig.description.byteLength < 42)
|
|
49099
49127
|
throw new TypeError("Audio chunk metadata decoder configuration for FLAC must include a description, which is expected to adhere to the format described in https://www.w3.org/TR/webcodecs-flac-codec-registration/.");
|
|
49100
|
-
} else if ((t.decoderConfig.codec.startsWith("pcm") || t.decoderConfig.codec.startsWith("ulaw") || t.decoderConfig.codec.startsWith("alaw")) && !
|
|
49101
|
-
throw new TypeError(`Audio chunk metadata decoder configuration codec string for PCM must be one of the supported PCM codecs (${
|
|
49128
|
+
} else if ((t.decoderConfig.codec.startsWith("pcm") || t.decoderConfig.codec.startsWith("ulaw") || t.decoderConfig.codec.startsWith("alaw")) && !Wi.includes(t.decoderConfig.codec))
|
|
49129
|
+
throw new TypeError(`Audio chunk metadata decoder configuration codec string for PCM must be one of the supported PCM codecs (${Wi.join(", ")}).`);
|
|
49102
49130
|
}, PV = (t) => {
|
|
49103
49131
|
if (!t)
|
|
49104
49132
|
throw new TypeError("Subtitle metadata must be provided.");
|
|
@@ -49154,10 +49182,10 @@ var Ir;
|
|
|
49154
49182
|
(function(t) {
|
|
49155
49183
|
t[t.IDR = 5] = "IDR", t[t.SEI = 6] = "SEI", t[t.SPS = 7] = "SPS", t[t.PPS = 8] = "PPS", t[t.SPS_EXT = 13] = "SPS_EXT";
|
|
49156
49184
|
})(Ir || (Ir = {}));
|
|
49157
|
-
var
|
|
49185
|
+
var _i;
|
|
49158
49186
|
(function(t) {
|
|
49159
49187
|
t[t.RASL_N = 8] = "RASL_N", t[t.RASL_R = 9] = "RASL_R", t[t.BLA_W_LP = 16] = "BLA_W_LP", t[t.RSV_IRAP_VCL23 = 23] = "RSV_IRAP_VCL23", t[t.VPS_NUT = 32] = "VPS_NUT", t[t.SPS_NUT = 33] = "SPS_NUT", t[t.PPS_NUT = 34] = "PPS_NUT", t[t.PREFIX_SEI_NUT = 39] = "PREFIX_SEI_NUT", t[t.SUFFIX_SEI_NUT = 40] = "SUFFIX_SEI_NUT";
|
|
49160
|
-
})(
|
|
49188
|
+
})(_i || (_i = {}));
|
|
49161
49189
|
const xu = (t) => {
|
|
49162
49190
|
const e = [];
|
|
49163
49191
|
let i = 0;
|
|
@@ -49271,7 +49299,7 @@ const xu = (t) => {
|
|
|
49271
49299
|
let w = 8, x = 8;
|
|
49272
49300
|
for (let S = 0; S < y; S++) {
|
|
49273
49301
|
if (x !== 0) {
|
|
49274
|
-
const A =
|
|
49302
|
+
const A = ss(e);
|
|
49275
49303
|
x = (w + A + 256) % 256;
|
|
49276
49304
|
}
|
|
49277
49305
|
w = x === 0 ? w : x;
|
|
@@ -49283,10 +49311,10 @@ const xu = (t) => {
|
|
|
49283
49311
|
if (c === 0)
|
|
49284
49312
|
he(e);
|
|
49285
49313
|
else if (c === 1) {
|
|
49286
|
-
e.skipBits(1),
|
|
49314
|
+
e.skipBits(1), ss(e), ss(e);
|
|
49287
49315
|
const f = he(e);
|
|
49288
49316
|
for (let h = 0; h < f; h++)
|
|
49289
|
-
|
|
49317
|
+
ss(e);
|
|
49290
49318
|
}
|
|
49291
49319
|
he(e), e.skipBits(1), he(e), he(e);
|
|
49292
49320
|
const u = e.readBits(1);
|
|
@@ -49304,7 +49332,7 @@ const xu = (t) => {
|
|
|
49304
49332
|
}
|
|
49305
49333
|
}, ya = (t) => t[0] >> 1 & 63, LV = (t) => {
|
|
49306
49334
|
try {
|
|
49307
|
-
const e = xu(t), i = e.filter((te) => ya(te) ===
|
|
49335
|
+
const e = xu(t), i = e.filter((te) => ya(te) === _i.VPS_NUT), s = e.filter((te) => ya(te) === _i.SPS_NUT), a = e.filter((te) => ya(te) === _i.PPS_NUT), r = e.filter((te) => ya(te) === _i.PREFIX_SEI_NUT || ya(te) === _i.SUFFIX_SEI_NUT);
|
|
49308
49336
|
if (s.length === 0 || a.length === 0)
|
|
49309
49337
|
return null;
|
|
49310
49338
|
const n = s[0], o = new $s(Ac(n));
|
|
@@ -49331,7 +49359,7 @@ const xu = (t) => {
|
|
|
49331
49359
|
let z = 0;
|
|
49332
49360
|
if (a.length > 0) {
|
|
49333
49361
|
const te = a[0], K = new $s(Ac(te));
|
|
49334
|
-
K.skipBits(16), he(K), he(K), K.skipBits(1), K.skipBits(1), K.skipBits(3), K.skipBits(1), K.skipBits(1), he(K), he(K),
|
|
49362
|
+
K.skipBits(16), he(K), he(K), K.skipBits(1), K.skipBits(1), K.skipBits(3), K.skipBits(1), K.skipBits(1), he(K), he(K), ss(K), K.skipBits(1), K.skipBits(1), K.readBits(1) && he(K), ss(K), ss(K), K.skipBits(1), K.skipBits(1), K.skipBits(1), K.skipBits(1);
|
|
49335
49363
|
const we = K.readBits(1), Ie = K.readBits(1);
|
|
49336
49364
|
!we && !Ie ? z = 0 : we && !Ie ? z = 2 : !we && Ie ? z = 3 : z = 0;
|
|
49337
49365
|
}
|
|
@@ -49339,21 +49367,21 @@ const xu = (t) => {
|
|
|
49339
49367
|
...i.length ? [
|
|
49340
49368
|
{
|
|
49341
49369
|
arrayCompleteness: 1,
|
|
49342
|
-
nalUnitType:
|
|
49370
|
+
nalUnitType: _i.VPS_NUT,
|
|
49343
49371
|
nalUnits: i
|
|
49344
49372
|
}
|
|
49345
49373
|
] : [],
|
|
49346
49374
|
...s.length ? [
|
|
49347
49375
|
{
|
|
49348
49376
|
arrayCompleteness: 1,
|
|
49349
|
-
nalUnitType:
|
|
49377
|
+
nalUnitType: _i.SPS_NUT,
|
|
49350
49378
|
nalUnits: s
|
|
49351
49379
|
}
|
|
49352
49380
|
] : [],
|
|
49353
49381
|
...a.length ? [
|
|
49354
49382
|
{
|
|
49355
49383
|
arrayCompleteness: 1,
|
|
49356
|
-
nalUnitType:
|
|
49384
|
+
nalUnitType: _i.PPS_NUT,
|
|
49357
49385
|
nalUnits: a
|
|
49358
49386
|
}
|
|
49359
49387
|
] : [],
|
|
@@ -49419,9 +49447,9 @@ const xu = (t) => {
|
|
|
49419
49447
|
he(t);
|
|
49420
49448
|
else {
|
|
49421
49449
|
const a = Math.min(64, 1 << 4 + (e << 1));
|
|
49422
|
-
e > 1 &&
|
|
49450
|
+
e > 1 && ss(t);
|
|
49423
49451
|
for (let r = 0; r < a; r++)
|
|
49424
|
-
|
|
49452
|
+
ss(t);
|
|
49425
49453
|
}
|
|
49426
49454
|
}, RV = (t, e) => {
|
|
49427
49455
|
const i = [];
|
|
@@ -50403,7 +50431,7 @@ class eh {
|
|
|
50403
50431
|
}
|
|
50404
50432
|
}
|
|
50405
50433
|
}
|
|
50406
|
-
const We = /* @__PURE__ */ new Uint8Array(8),
|
|
50434
|
+
const We = /* @__PURE__ */ new Uint8Array(8), Zi = /* @__PURE__ */ new DataView(We.buffer), At = (t) => [(t % 256 + 256) % 256], xe = (t) => (Zi.setUint16(0, t, !1), [We[0], We[1]]), Ug = (t) => (Zi.setInt16(0, t, !1), [We[0], We[1]]), Wg = (t) => (Zi.setUint32(0, t, !1), [We[1], We[2], We[3]]), ae = (t) => (Zi.setUint32(0, t, !1), [We[0], We[1], We[2], We[3]]), gs = (t) => (Zi.setInt32(0, t, !1), [We[0], We[1], We[2], We[3]]), ta = (t) => (Zi.setUint32(0, Math.floor(t / 2 ** 32), !1), Zi.setUint32(4, t, !1), [We[0], We[1], We[2], We[3], We[4], We[5], We[6], We[7]]), Zg = (t) => (Zi.setInt16(0, 2 ** 8 * t, !1), [We[0], We[1]]), Ji = (t) => (Zi.setInt32(0, 2 ** 16 * t, !1), [We[0], We[1], We[2], We[3]]), Ol = (t) => (Zi.setInt32(0, 2 ** 30 * t, !1), [We[0], We[1], We[2], We[3]]), Ll = (t, e) => {
|
|
50407
50435
|
const i = [];
|
|
50408
50436
|
let s = t;
|
|
50409
50437
|
do {
|
|
@@ -50433,14 +50461,14 @@ const We = /* @__PURE__ */ new Uint8Array(8), Wi = /* @__PURE__ */ new DataView(
|
|
|
50433
50461
|
1
|
|
50434
50462
|
];
|
|
50435
50463
|
}, Gg = /* @__PURE__ */ Hg(0), jg = (t) => [
|
|
50436
|
-
|
|
50437
|
-
|
|
50464
|
+
Ji(t[0]),
|
|
50465
|
+
Ji(t[1]),
|
|
50438
50466
|
Ol(t[2]),
|
|
50439
|
-
|
|
50440
|
-
|
|
50467
|
+
Ji(t[3]),
|
|
50468
|
+
Ji(t[4]),
|
|
50441
50469
|
Ol(t[5]),
|
|
50442
|
-
|
|
50443
|
-
|
|
50470
|
+
Ji(t[6]),
|
|
50471
|
+
Ji(t[7]),
|
|
50444
50472
|
Ol(t[8])
|
|
50445
50473
|
], Ce = (t, e, i) => ({
|
|
50446
50474
|
type: t,
|
|
@@ -50490,7 +50518,7 @@ const We = /* @__PURE__ */ new Uint8Array(8), Wi = /* @__PURE__ */ new DataView(
|
|
|
50490
50518
|
// Timescale
|
|
50491
50519
|
r(i),
|
|
50492
50520
|
// Duration
|
|
50493
|
-
|
|
50521
|
+
Ji(1),
|
|
50494
50522
|
// Preferred rate
|
|
50495
50523
|
Zg(1),
|
|
50496
50524
|
// Preferred volume
|
|
@@ -50510,7 +50538,7 @@ const We = /* @__PURE__ */ new Uint8Array(8), Wi = /* @__PURE__ */ new DataView(
|
|
|
50510
50538
|
o9(t, e),
|
|
50511
50539
|
i.name !== void 0 ? Ce("udta", void 0, [
|
|
50512
50540
|
Ce("name", [
|
|
50513
|
-
...
|
|
50541
|
+
...zi.encode(i.name)
|
|
50514
50542
|
])
|
|
50515
50543
|
]) : null
|
|
50516
50544
|
]);
|
|
@@ -50546,9 +50574,9 @@ const We = /* @__PURE__ */ new Uint8Array(8), Wi = /* @__PURE__ */ new DataView(
|
|
|
50546
50574
|
// Reserved
|
|
50547
50575
|
jg(n),
|
|
50548
50576
|
// Matrix
|
|
50549
|
-
|
|
50577
|
+
Ji(t.type === "video" ? t.info.width : 0),
|
|
50550
50578
|
// Track width
|
|
50551
|
-
|
|
50579
|
+
Ji(t.type === "video" ? t.info.height : 0)
|
|
50552
50580
|
// Track height
|
|
50553
50581
|
]);
|
|
50554
50582
|
}, o9 = (t, e) => Ce("mdia", void 0, [
|
|
@@ -50718,7 +50746,7 @@ const We = /* @__PURE__ */ new Uint8Array(8), Wi = /* @__PURE__ */ new DataView(
|
|
|
50718
50746
|
]);
|
|
50719
50747
|
}, A9 = (t) => Ce("av1C", mV(t.info.decoderConfig.codec)), T9 = (t, e) => {
|
|
50720
50748
|
let i = 0, s, a = 16;
|
|
50721
|
-
if (
|
|
50749
|
+
if (Wi.includes(e.track.source._codec)) {
|
|
50722
50750
|
const r = e.track.source._codec, { sampleSize: n } = Ja(r);
|
|
50723
50751
|
a = 8 * n, a > 16 && (i = 1);
|
|
50724
50752
|
}
|
|
@@ -50879,7 +50907,7 @@ const We = /* @__PURE__ */ new Uint8Array(8), Wi = /* @__PURE__ */ new DataView(
|
|
|
50879
50907
|
return je("dfLa", 0, 0, [
|
|
50880
50908
|
...i.subarray(4)
|
|
50881
50909
|
]);
|
|
50882
|
-
},
|
|
50910
|
+
}, Ni = (t) => {
|
|
50883
50911
|
const { littleEndian: e, sampleSize: i } = Ja(t.track.source._codec), s = +e;
|
|
50884
50912
|
return je("pcmC", 0, 0, [
|
|
50885
50913
|
At(s),
|
|
@@ -50893,7 +50921,7 @@ const We = /* @__PURE__ */ new Uint8Array(8), Wi = /* @__PURE__ */ new DataView(
|
|
|
50893
50921
|
], [
|
|
50894
50922
|
o7[e.track.source._codec](e)
|
|
50895
50923
|
]), F9 = (t) => Ce("vttC", [
|
|
50896
|
-
...
|
|
50924
|
+
...zi.encode(t.info.config.description)
|
|
50897
50925
|
]), V9 = (t) => je("stts", 0, 0, [
|
|
50898
50926
|
ae(t.timeToSampleTable.length),
|
|
50899
50927
|
// Number of entries
|
|
@@ -51081,11 +51109,11 @@ const We = /* @__PURE__ */ new Uint8Array(8), Wi = /* @__PURE__ */ new DataView(
|
|
|
51081
51109
|
// Size
|
|
51082
51110
|
]), K9 = () => Ce("vtte"), J9 = (t, e, i, s, a) => Ce("vttc", void 0, [
|
|
51083
51111
|
a !== null ? Ce("vsid", [gs(a)]) : null,
|
|
51084
|
-
i !== null ? Ce("iden", [...
|
|
51085
|
-
e !== null ? Ce("ctim", [...
|
|
51086
|
-
s !== null ? Ce("sttg", [...
|
|
51087
|
-
Ce("payl", [...
|
|
51088
|
-
]), Q9 = (t) => Ce("vtta", [...
|
|
51112
|
+
i !== null ? Ce("iden", [...zi.encode(i)]) : null,
|
|
51113
|
+
e !== null ? Ce("ctim", [...zi.encode(t9(e))]) : null,
|
|
51114
|
+
s !== null ? Ce("sttg", [...zi.encode(s)]) : null,
|
|
51115
|
+
Ce("payl", [...zi.encode(t)])
|
|
51116
|
+
]), Q9 = (t) => Ce("vtta", [...zi.encode(t)]), $9 = (t) => {
|
|
51089
51117
|
const e = [], i = t.format._options.metadataFormat ?? "auto", s = t.output._metadataTags;
|
|
51090
51118
|
if (i === "mdir" || i === "auto" && !t.isQuickTime) {
|
|
51091
51119
|
const a = t7(s);
|
|
@@ -51099,31 +51127,31 @@ const We = /* @__PURE__ */ new Uint8Array(8), Wi = /* @__PURE__ */ new DataView(
|
|
|
51099
51127
|
for (const { key: i, value: s } of Og(e))
|
|
51100
51128
|
switch (i) {
|
|
51101
51129
|
case "title":
|
|
51102
|
-
t.push(
|
|
51130
|
+
t.push(Ii("©nam", s));
|
|
51103
51131
|
break;
|
|
51104
51132
|
case "description":
|
|
51105
|
-
t.push(
|
|
51133
|
+
t.push(Ii("©des", s));
|
|
51106
51134
|
break;
|
|
51107
51135
|
case "artist":
|
|
51108
|
-
t.push(
|
|
51136
|
+
t.push(Ii("©ART", s));
|
|
51109
51137
|
break;
|
|
51110
51138
|
case "album":
|
|
51111
|
-
t.push(
|
|
51139
|
+
t.push(Ii("©alb", s));
|
|
51112
51140
|
break;
|
|
51113
51141
|
case "albumArtist":
|
|
51114
|
-
t.push(
|
|
51142
|
+
t.push(Ii("albr", s));
|
|
51115
51143
|
break;
|
|
51116
51144
|
case "genre":
|
|
51117
|
-
t.push(
|
|
51145
|
+
t.push(Ii("©gen", s));
|
|
51118
51146
|
break;
|
|
51119
51147
|
case "date":
|
|
51120
|
-
t.push(
|
|
51148
|
+
t.push(Ii("©day", s.toISOString().slice(0, 10)));
|
|
51121
51149
|
break;
|
|
51122
51150
|
case "comment":
|
|
51123
|
-
t.push(
|
|
51151
|
+
t.push(Ii("©cmt", s));
|
|
51124
51152
|
break;
|
|
51125
51153
|
case "lyrics":
|
|
51126
|
-
t.push(
|
|
51154
|
+
t.push(Ii("©lyr", s));
|
|
51127
51155
|
break;
|
|
51128
51156
|
case "raw":
|
|
51129
51157
|
break;
|
|
@@ -51139,10 +51167,10 @@ const We = /* @__PURE__ */ new Uint8Array(8), Wi = /* @__PURE__ */ new DataView(
|
|
|
51139
51167
|
if (e.raw)
|
|
51140
51168
|
for (const i in e.raw) {
|
|
51141
51169
|
const s = e.raw[i];
|
|
51142
|
-
s == null || i.length !== 4 || t.some((a) => a.type === i) || (typeof s == "string" ? t.push(
|
|
51170
|
+
s == null || i.length !== 4 || t.some((a) => a.type === i) || (typeof s == "string" ? t.push(Ii(i, s)) : s instanceof Uint8Array && t.push(Ce(i, Array.from(s))));
|
|
51143
51171
|
}
|
|
51144
|
-
},
|
|
51145
|
-
const i =
|
|
51172
|
+
}, Ii = (t, e) => {
|
|
51173
|
+
const i = zi.encode(e);
|
|
51146
51174
|
return Ce(t, [
|
|
51147
51175
|
xe(i.length),
|
|
51148
51176
|
xe(Kg("und")),
|
|
@@ -51270,7 +51298,7 @@ const We = /* @__PURE__ */ new Uint8Array(8), Wi = /* @__PURE__ */ new DataView(
|
|
|
51270
51298
|
je("keys", 0, 0, [
|
|
51271
51299
|
ae(e.length)
|
|
51272
51300
|
], e.map((i) => Ce("mdta", [
|
|
51273
|
-
...
|
|
51301
|
+
...zi.encode(i.key)
|
|
51274
51302
|
]))),
|
|
51275
51303
|
Ce("ilst", void 0, e.map((i, s) => {
|
|
51276
51304
|
const a = String.fromCharCode(...ae(s + 1));
|
|
@@ -51282,7 +51310,7 @@ const We = /* @__PURE__ */ new Uint8Array(8), Wi = /* @__PURE__ */ new DataView(
|
|
|
51282
51310
|
// Type indicator (UTF-8)
|
|
51283
51311
|
ae(0),
|
|
51284
51312
|
// Locale indicator
|
|
51285
|
-
...
|
|
51313
|
+
...zi.encode(t)
|
|
51286
51314
|
]), s7 = (t, e) => {
|
|
51287
51315
|
switch (t) {
|
|
51288
51316
|
case "avc":
|
|
@@ -51404,25 +51432,25 @@ const We = /* @__PURE__ */ new Uint8Array(8), Wi = /* @__PURE__ */ new DataView(
|
|
|
51404
51432
|
else
|
|
51405
51433
|
switch (t) {
|
|
51406
51434
|
case "pcm-s16":
|
|
51407
|
-
return
|
|
51435
|
+
return Ni;
|
|
51408
51436
|
case "pcm-s16be":
|
|
51409
|
-
return
|
|
51437
|
+
return Ni;
|
|
51410
51438
|
case "pcm-s24":
|
|
51411
|
-
return
|
|
51439
|
+
return Ni;
|
|
51412
51440
|
case "pcm-s24be":
|
|
51413
|
-
return
|
|
51441
|
+
return Ni;
|
|
51414
51442
|
case "pcm-s32":
|
|
51415
|
-
return
|
|
51443
|
+
return Ni;
|
|
51416
51444
|
case "pcm-s32be":
|
|
51417
|
-
return
|
|
51445
|
+
return Ni;
|
|
51418
51446
|
case "pcm-f32":
|
|
51419
|
-
return
|
|
51447
|
+
return Ni;
|
|
51420
51448
|
case "pcm-f32be":
|
|
51421
|
-
return
|
|
51449
|
+
return Ni;
|
|
51422
51450
|
case "pcm-f64":
|
|
51423
|
-
return
|
|
51451
|
+
return Ni;
|
|
51424
51452
|
case "pcm-f64be":
|
|
51425
|
-
return
|
|
51453
|
+
return Ni;
|
|
51426
51454
|
}
|
|
51427
51455
|
return null;
|
|
51428
51456
|
}, n7 = {
|
|
@@ -51662,7 +51690,7 @@ class f7 extends _V {
|
|
|
51662
51690
|
numberOfChannels: i.decoderConfig.numberOfChannels,
|
|
51663
51691
|
sampleRate: i.decoderConfig.sampleRate,
|
|
51664
51692
|
decoderConfig: i.decoderConfig,
|
|
51665
|
-
requiresPcmTransformation: !this.isFragmented &&
|
|
51693
|
+
requiresPcmTransformation: !this.isFragmented && Wi.includes(e.source._codec)
|
|
51666
51694
|
},
|
|
51667
51695
|
timescale: i.decoderConfig.sampleRate,
|
|
51668
51696
|
samples: [],
|
|
@@ -52269,7 +52297,7 @@ const d7 = (t) => {
|
|
|
52269
52297
|
throw new TypeError("Encoding config must be an object.");
|
|
52270
52298
|
if (!Ha.includes(t.codec))
|
|
52271
52299
|
throw new TypeError(`Invalid audio codec '${t.codec}'. Must be one of: ${Ha.join(", ")}.`);
|
|
52272
|
-
if (t.bitrate === void 0 && (!
|
|
52300
|
+
if (t.bitrate === void 0 && (!Wi.includes(t.codec) || t.codec === "flac"))
|
|
52273
52301
|
throw new TypeError("config.bitrate must be provided for compressed audio codecs.");
|
|
52274
52302
|
if (t.bitrate !== void 0 && !(t.bitrate instanceof Yo) && (!Number.isInteger(t.bitrate) || t.bitrate <= 0))
|
|
52275
52303
|
throw new TypeError("config.bitrate, when provided, must be a positive integer or a quality.");
|
|
@@ -52321,7 +52349,7 @@ class Yo {
|
|
|
52321
52349
|
}
|
|
52322
52350
|
/** @internal */
|
|
52323
52351
|
_toAudioBitrate(e) {
|
|
52324
|
-
if (
|
|
52352
|
+
if (Wi.includes(e) || e === "flac")
|
|
52325
52353
|
return;
|
|
52326
52354
|
const s = {
|
|
52327
52355
|
aac: 128e3,
|
|
@@ -52859,7 +52887,7 @@ class x7 {
|
|
|
52859
52887
|
this.error ??= c, this.errorNeedsNewStack = !1;
|
|
52860
52888
|
});
|
|
52861
52889
|
}, await this.customEncoder.init();
|
|
52862
|
-
else if (
|
|
52890
|
+
else if (Wi.includes(this.encodingConfig.codec))
|
|
52863
52891
|
this.initPcmEncoder();
|
|
52864
52892
|
else {
|
|
52865
52893
|
if (typeof AudioEncoder > "u")
|
|
@@ -53742,7 +53770,7 @@ const nh = {
|
|
|
53742
53770
|
svg: 72,
|
|
53743
53771
|
default: 48
|
|
53744
53772
|
};
|
|
53745
|
-
function
|
|
53773
|
+
function Qi(t) {
|
|
53746
53774
|
return nh[t] ?? nh.default;
|
|
53747
53775
|
}
|
|
53748
53776
|
const oh = ["mp4", "mov", "webm", "avi", "mkv", "m4v"], lh = ["jpg", "jpeg", "png", "gif", "webp", "bmp", "svg"], Wl = ["mp3", "wav", "aac", "ogg", "m4a", "flac"];
|
|
@@ -54010,7 +54038,7 @@ class L7 extends la {
|
|
|
54010
54038
|
updateTrack(e, i) {
|
|
54011
54039
|
const s = this.currentTrack?.primaryAssetType;
|
|
54012
54040
|
if (this.currentTrack = e, this.currentPixelsPerSecond = i, e.primaryAssetType !== s) {
|
|
54013
|
-
const a =
|
|
54041
|
+
const a = Qi(e.primaryAssetType);
|
|
54014
54042
|
this.element.style.height = `${a}px`, this.element.dataset.assetType = e.primaryAssetType;
|
|
54015
54043
|
}
|
|
54016
54044
|
this.needsUpdate = !0;
|
|
@@ -54109,7 +54137,7 @@ class B7 extends la {
|
|
|
54109
54137
|
const r = this.element.scrollTop, n = i + r;
|
|
54110
54138
|
let o = 0, l = -1;
|
|
54111
54139
|
for (let f = 0; f < this.trackComponents.length; f += 1) {
|
|
54112
|
-
const h = this.trackComponents[f].getCurrentTrack(), p =
|
|
54140
|
+
const h = this.trackComponents[f].getCurrentTrack(), p = Qi(h?.primaryAssetType ?? "default");
|
|
54113
54141
|
if (n >= o && n < o + p) {
|
|
54114
54142
|
l = f;
|
|
54115
54143
|
break;
|
|
@@ -54126,7 +54154,7 @@ class B7 extends la {
|
|
|
54126
54154
|
const i = this.element.scrollTop, s = e + i;
|
|
54127
54155
|
let a = 0;
|
|
54128
54156
|
for (let r = 0; r < this.trackComponents.length; r += 1) {
|
|
54129
|
-
const n = this.trackComponents[r].getCurrentTrack(), o =
|
|
54157
|
+
const n = this.trackComponents[r].getCurrentTrack(), o = Qi(n?.primaryAssetType ?? "default");
|
|
54130
54158
|
if (s >= a && s < a + o)
|
|
54131
54159
|
return r;
|
|
54132
54160
|
a += o;
|
|
@@ -54138,7 +54166,7 @@ class B7 extends la {
|
|
|
54138
54166
|
let i = 0;
|
|
54139
54167
|
for (let s = 0; s < e && s < this.trackComponents.length; s += 1) {
|
|
54140
54168
|
const a = this.trackComponents[s].getCurrentTrack();
|
|
54141
|
-
i +=
|
|
54169
|
+
i += Qi(a?.primaryAssetType ?? "default");
|
|
54142
54170
|
}
|
|
54143
54171
|
return i;
|
|
54144
54172
|
}
|
|
@@ -54336,7 +54364,7 @@ class z7 {
|
|
|
54336
54364
|
};
|
|
54337
54365
|
}
|
|
54338
54366
|
}
|
|
54339
|
-
class
|
|
54367
|
+
class Fi {
|
|
54340
54368
|
constructor(e, i, s, a) {
|
|
54341
54369
|
this.fromTrackIndex = e, this.fromClipIndex = i, this.toTrackIndex = s, this.newStart = a, this.originalTrackIndex = e, this.originalClipIndex = i;
|
|
54342
54370
|
}
|
|
@@ -54454,7 +54482,7 @@ class R7 {
|
|
|
54454
54482
|
constructor(e, i, s, a) {
|
|
54455
54483
|
this.insertionIndex = e, this.fromTrackIndex = i, this.fromClipIndex = s, this.newStart = a, this.addTrackCommand = new _g(e);
|
|
54456
54484
|
const r = i >= e ? i + 1 : i;
|
|
54457
|
-
this.moveClipCommand = new
|
|
54485
|
+
this.moveClipCommand = new Fi(r, s, e, a);
|
|
54458
54486
|
}
|
|
54459
54487
|
name = "createTrackAndMoveClip";
|
|
54460
54488
|
addTrackCommand;
|
|
@@ -54481,7 +54509,7 @@ class R7 {
|
|
|
54481
54509
|
}
|
|
54482
54510
|
class D7 {
|
|
54483
54511
|
constructor(e, i, s, a, r) {
|
|
54484
|
-
this.fromTrackIndex = e, this.fromClipIndex = i, this.toTrackIndex = s, this.newStart = a, this.pushOffset = r, this.moveCommand = new
|
|
54512
|
+
this.fromTrackIndex = e, this.fromClipIndex = i, this.toTrackIndex = s, this.newStart = a, this.pushOffset = r, this.moveCommand = new Fi(e, i, s, a);
|
|
54485
54513
|
}
|
|
54486
54514
|
name = "moveClipWithPush";
|
|
54487
54515
|
moveCommand;
|
|
@@ -54676,7 +54704,7 @@ class Au {
|
|
|
54676
54704
|
s.className = "ss-drag-ghost ss-clip";
|
|
54677
54705
|
const a = e.config.asset?.type || "unknown";
|
|
54678
54706
|
s.dataset.assetType = a;
|
|
54679
|
-
const r = this.stateManager.getViewport().pixelsPerSecond, n = e.config.length * r, l = this.stateManager.getTracks()[i]?.primaryAssetType ?? a, c =
|
|
54707
|
+
const r = this.stateManager.getViewport().pixelsPerSecond, n = e.config.length * r, l = this.stateManager.getTracks()[i]?.primaryAssetType ?? a, c = Qi(l);
|
|
54680
54708
|
return s.style.width = `${n}px`, s.style.height = `${c - 8}px`, s.style.position = "absolute", s.style.pointerEvents = "none", s.style.opacity = "0.8", s;
|
|
54681
54709
|
}
|
|
54682
54710
|
handleDragMove(e) {
|
|
@@ -54711,7 +54739,7 @@ class Au {
|
|
|
54711
54739
|
this.state.collisionResult = { newStartTime: c, pushOffset: 0 }, this.clearLumaDragFeedback();
|
|
54712
54740
|
if (u.type === "track") {
|
|
54713
54741
|
this.state.ghost.style.display = "block";
|
|
54714
|
-
const p = this.stateManager.getTracks(), y = this.getTrackYPosition(u.trackIndex) + 4, w = p[u.trackIndex], x =
|
|
54742
|
+
const p = this.stateManager.getTracks(), y = this.getTrackYPosition(u.trackIndex) + 4, w = p[u.trackIndex], x = Qi(w?.primaryAssetType ?? "default") - 8;
|
|
54715
54743
|
this.state.ghost.style.left = `${c * r}px`, this.state.ghost.style.top = `${y + h}px`, this.state.ghost.style.height = `${x}px`, this.showDragTimeTooltip(c, c * r, y + h), this.hideDropZone();
|
|
54716
54744
|
} else
|
|
54717
54745
|
this.state.ghost.style.display = "none", this.showDropZone(u.insertionIndex);
|
|
@@ -54759,7 +54787,7 @@ class Au {
|
|
|
54759
54787
|
const x = this.findContentClipAtPosition(o.trackIndex, p, i);
|
|
54760
54788
|
if ((h === "image" || h === "video") && x && y) {
|
|
54761
54789
|
if (o.trackIndex !== n) {
|
|
54762
|
-
const A = new
|
|
54790
|
+
const A = new Fi(n, i.clipIndex, o.trackIndex, x.config.start);
|
|
54763
54791
|
this.edit.executeEditCommand(A);
|
|
54764
54792
|
}
|
|
54765
54793
|
const S = o.trackIndex !== n ? this.findClipIndexAfterMove(o.trackIndex, x.config.start) : i.clipIndex;
|
|
@@ -54773,7 +54801,7 @@ class Au {
|
|
|
54773
54801
|
if (h === "luma") {
|
|
54774
54802
|
if (x && y) {
|
|
54775
54803
|
if (p = x.config.start, p !== r || o.trackIndex !== n) {
|
|
54776
|
-
const A = new
|
|
54804
|
+
const A = new Fi(n, i.clipIndex, o.trackIndex, p);
|
|
54777
54805
|
this.edit.executeEditCommand(A);
|
|
54778
54806
|
}
|
|
54779
54807
|
this.stateManager.attachLuma(x.trackIndex, x.clipIndex, o.trackIndex, i.clipIndex), a.remove(), this.hideSnapLine(), this.hideDropZone(), this.hideDragTimeTooltip(), this.clearLumaDragFeedback(), this.state = { type: "idle" };
|
|
@@ -54790,7 +54818,7 @@ class Au {
|
|
|
54790
54818
|
if (this.edit.executeEditCommand(x), w) {
|
|
54791
54819
|
const S = this.edit.findClipIndices(w);
|
|
54792
54820
|
if (S) {
|
|
54793
|
-
const A = new
|
|
54821
|
+
const A = new Fi(S.trackIndex, S.clipIndex, o.insertionIndex, p);
|
|
54794
54822
|
this.edit.executeEditCommand(A);
|
|
54795
54823
|
}
|
|
54796
54824
|
}
|
|
@@ -54805,16 +54833,16 @@ class Au {
|
|
|
54805
54833
|
if (this.edit.executeEditCommand(x), w) {
|
|
54806
54834
|
const S = this.edit.findClipIndices(w);
|
|
54807
54835
|
if (S) {
|
|
54808
|
-
const A = new
|
|
54836
|
+
const A = new Fi(S.trackIndex, S.clipIndex, o.trackIndex, p);
|
|
54809
54837
|
this.edit.executeEditCommand(A);
|
|
54810
54838
|
}
|
|
54811
54839
|
}
|
|
54812
54840
|
} else if (p !== r || o.trackIndex !== n) {
|
|
54813
|
-
const x = new
|
|
54841
|
+
const x = new Fi(n, i.clipIndex, o.trackIndex, p);
|
|
54814
54842
|
if (this.edit.executeEditCommand(x), w) {
|
|
54815
54843
|
const S = this.edit.findClipIndices(w);
|
|
54816
54844
|
if (S) {
|
|
54817
|
-
const A = new
|
|
54845
|
+
const A = new Fi(S.trackIndex, S.clipIndex, o.trackIndex, p);
|
|
54818
54846
|
this.edit.executeEditCommand(A);
|
|
54819
54847
|
}
|
|
54820
54848
|
}
|
|
@@ -54832,7 +54860,7 @@ class Au {
|
|
|
54832
54860
|
const p = a + r, y = Math.max(0, Math.min(u, p - 0.1)), w = p - y;
|
|
54833
54861
|
if (y !== a || w !== r) {
|
|
54834
54862
|
if (y !== a) {
|
|
54835
|
-
const x = new
|
|
54863
|
+
const x = new Fi(i.trackIndex, i.clipIndex, i.trackIndex, y);
|
|
54836
54864
|
this.edit.executeEditCommand(x);
|
|
54837
54865
|
}
|
|
54838
54866
|
if (w !== r) {
|
|
@@ -54843,7 +54871,7 @@ class Au {
|
|
|
54843
54871
|
const x = this.edit.findClipIndices(h);
|
|
54844
54872
|
if (x) {
|
|
54845
54873
|
if (y !== a) {
|
|
54846
|
-
const S = new
|
|
54874
|
+
const S = new Fi(x.trackIndex, x.clipIndex, x.trackIndex, y);
|
|
54847
54875
|
this.edit.executeEditCommand(S);
|
|
54848
54876
|
}
|
|
54849
54877
|
if (w !== r) {
|
|
@@ -55004,7 +55032,7 @@ class Au {
|
|
|
55004
55032
|
/** Show magnetic connection line between luma ghost and target clip */
|
|
55005
55033
|
showLumaConnectionLine(e, i, s) {
|
|
55006
55034
|
this.lumaConnectionLine || (this.lumaConnectionLine = document.createElement("div"), this.lumaConnectionLine.className = "ss-luma-connection-line", this.feedbackLayer.appendChild(this.lumaConnectionLine));
|
|
55007
|
-
const a = this.stateManager.getViewport().pixelsPerSecond, n = this.stateManager.getTracks()[i], o = this.getTrackYPosition(i), l =
|
|
55035
|
+
const a = this.stateManager.getViewport().pixelsPerSecond, n = this.stateManager.getTracks()[i], o = this.getTrackYPosition(i), l = Qi(n?.primaryAssetType ?? "default"), c = e.config.start * a;
|
|
55008
55036
|
this.lumaConnectionLine.style.left = `${c}px`, this.lumaConnectionLine.style.top = `${o + s}px`, this.lumaConnectionLine.style.height = `${l}px`, this.lumaConnectionLine.classList.add("active");
|
|
55009
55037
|
}
|
|
55010
55038
|
/** Hide luma connection line */
|
|
@@ -55024,7 +55052,7 @@ class Au {
|
|
|
55024
55052
|
if (e < s / 2)
|
|
55025
55053
|
return { type: "insert", insertionIndex: 0 };
|
|
55026
55054
|
for (let r = 0; r < i.length; r += 1) {
|
|
55027
|
-
const n =
|
|
55055
|
+
const n = Qi(i[r].primaryAssetType);
|
|
55028
55056
|
if (r > 0 && e >= a - s / 2 && e < a + s / 2)
|
|
55029
55057
|
return { type: "insert", insertionIndex: r };
|
|
55030
55058
|
if (e >= a + s / 2 && e < a + n - s / 2)
|
|
@@ -55038,7 +55066,7 @@ class Au {
|
|
|
55038
55066
|
const i = this.stateManager.getTracks();
|
|
55039
55067
|
let s = 0;
|
|
55040
55068
|
for (let a = 0; a < e && a < i.length; a += 1)
|
|
55041
|
-
s +=
|
|
55069
|
+
s += Qi(i[a].primaryAssetType);
|
|
55042
55070
|
return s;
|
|
55043
55071
|
}
|
|
55044
55072
|
dispose() {
|
|
@@ -55440,7 +55468,7 @@ function G7(t) {
|
|
|
55440
55468
|
return typeof t == "object" && t !== null && t.type === "text";
|
|
55441
55469
|
}
|
|
55442
55470
|
function j7(t) {
|
|
55443
|
-
const e = t.font?.family ?? "Open Sans", { fontWeight: i } =
|
|
55471
|
+
const e = t.font?.family ?? "Open Sans", { fontWeight: i } = ki(e), s = {
|
|
55444
55472
|
family: e,
|
|
55445
55473
|
size: t.font?.size ?? 32,
|
|
55446
55474
|
weight: t.font?.weight ?? i,
|
|
@@ -56631,7 +56659,7 @@ class sM extends Xo {
|
|
|
56631
56659
|
this.startControl?.dispose(), this.lengthControl?.dispose(), super.dispose(), this.startControl = null, this.lengthControl = null;
|
|
56632
56660
|
}
|
|
56633
56661
|
}
|
|
56634
|
-
class
|
|
56662
|
+
class $i extends Qa {
|
|
56635
56663
|
static EFFECT_TYPES = ["", "zoom", "slide"];
|
|
56636
56664
|
static DIRECTIONS = ["Left", "Right", "Up", "Down"];
|
|
56637
56665
|
static SPEEDS = [0.5, 1, 2];
|
|
@@ -56652,12 +56680,12 @@ class Qi extends Qa {
|
|
|
56652
56680
|
speedDecreaseBtn = null;
|
|
56653
56681
|
speedIncreaseBtn = null;
|
|
56654
56682
|
render() {
|
|
56655
|
-
const e =
|
|
56683
|
+
const e = $i.EFFECT_TYPES.map(
|
|
56656
56684
|
(a) => `<button class="ss-effect-type" data-effect-type="${a}">${a ? a.charAt(0).toUpperCase() + a.slice(1) : "None"}</button>`
|
|
56657
56685
|
).join(""), i = `
|
|
56658
56686
|
<button class="ss-effect-variant" data-variant="In">In</button>
|
|
56659
56687
|
<button class="ss-effect-variant" data-variant="Out">Out</button>
|
|
56660
|
-
`, s =
|
|
56688
|
+
`, s = $i.DIRECTIONS.map(
|
|
56661
56689
|
(a) => `<button class="ss-effect-dir" data-effect-dir="${a}">${this.directionIcon(a)}</button>`
|
|
56662
56690
|
).join("");
|
|
56663
56691
|
return `
|
|
@@ -56716,7 +56744,7 @@ class Qi extends Qa {
|
|
|
56716
56744
|
}
|
|
56717
56745
|
// ─── Private Methods ─────────────────────────────────────────────────────
|
|
56718
56746
|
stepSpeed(e) {
|
|
56719
|
-
const i =
|
|
56747
|
+
const i = $i.SPEEDS, s = i.indexOf(this.state.speed), a = Math.max(0, Math.min(i.length - 1, s + e));
|
|
56720
56748
|
this.state.speed = i[a], this.updateUI(), this.emit(this.state);
|
|
56721
56749
|
}
|
|
56722
56750
|
updateUI() {
|
|
@@ -56727,8 +56755,8 @@ class Qi extends Qa {
|
|
|
56727
56755
|
}), this.directionRow?.classList.toggle("visible", this.state.type === "slide"), this.directionButtons?.forEach((i) => {
|
|
56728
56756
|
i.classList.toggle("active", i.dataset.effectDir === this.state.direction);
|
|
56729
56757
|
}), this.speedRow?.classList.toggle("visible", this.state.type !== ""), this.speedLabel && (this.speedLabel.textContent = `${this.state.speed}s`);
|
|
56730
|
-
const e =
|
|
56731
|
-
this.speedDecreaseBtn && (this.speedDecreaseBtn.disabled = e <= 0), this.speedIncreaseBtn && (this.speedIncreaseBtn.disabled = e >=
|
|
56758
|
+
const e = $i.SPEEDS.indexOf(this.state.speed);
|
|
56759
|
+
this.speedDecreaseBtn && (this.speedDecreaseBtn.disabled = e <= 0), this.speedIncreaseBtn && (this.speedIncreaseBtn.disabled = e >= $i.SPEEDS.length - 1);
|
|
56732
56760
|
}
|
|
56733
56761
|
// ─── Effect Value Parsing/Building ───────────────────────────────────────
|
|
56734
56762
|
parseEffectValue(e) {
|
|
@@ -56755,7 +56783,7 @@ class Qi extends Qa {
|
|
|
56755
56783
|
return { Left: "←", Right: "→", Up: "↑", Down: "↓" }[e] ?? "";
|
|
56756
56784
|
}
|
|
56757
56785
|
}
|
|
56758
|
-
class
|
|
56786
|
+
class es extends Qa {
|
|
56759
56787
|
static EFFECTS = ["", "fade", "zoom", "slide", "wipe", "carousel"];
|
|
56760
56788
|
static DIRECTIONS = ["Left", "Right", "Up", "Down"];
|
|
56761
56789
|
static SPEEDS = [0.25, 0.5, 1, 2];
|
|
@@ -56777,9 +56805,9 @@ class $i extends Qa {
|
|
|
56777
56805
|
speedDecreaseBtn = null;
|
|
56778
56806
|
speedIncreaseBtn = null;
|
|
56779
56807
|
render() {
|
|
56780
|
-
const e =
|
|
56808
|
+
const e = es.EFFECTS.map((s) => `<button class="ss-transition-effect" data-effect="${s}">${s || "None"}</button>`).join(
|
|
56781
56809
|
""
|
|
56782
|
-
), i =
|
|
56810
|
+
), i = es.DIRECTIONS.map(
|
|
56783
56811
|
(s) => `<button class="ss-transition-dir" data-dir="${s}">${this.directionIcon(s)}</button>`
|
|
56784
56812
|
).join("");
|
|
56785
56813
|
return `
|
|
@@ -56851,7 +56879,7 @@ class $i extends Qa {
|
|
|
56851
56879
|
this.state.tab === "in" ? this.state.inDirection = e : this.state.outDirection = e;
|
|
56852
56880
|
}
|
|
56853
56881
|
stepSpeed(e) {
|
|
56854
|
-
const i =
|
|
56882
|
+
const i = es.SPEEDS, s = this.state.tab === "in" ? this.state.inSpeed : this.state.outSpeed;
|
|
56855
56883
|
let a = i.indexOf(s);
|
|
56856
56884
|
a === -1 && (a = i.findIndex((o) => o >= s), a === -1 && (a = i.length - 1));
|
|
56857
56885
|
const r = Math.max(0, Math.min(i.length - 1, a + e)), n = i[r];
|
|
@@ -56872,8 +56900,8 @@ class $i extends Qa {
|
|
|
56872
56900
|
const l = o.dataset.dir ?? "";
|
|
56873
56901
|
o.classList.toggle("hidden", i === "wipe" && (l === "Up" || l === "Down")), o.classList.toggle("active", l === s);
|
|
56874
56902
|
}), this.speedLabel && (this.speedLabel.textContent = `${a.toFixed(2)}s`);
|
|
56875
|
-
const n =
|
|
56876
|
-
this.speedDecreaseBtn && (this.speedDecreaseBtn.disabled = n <= 0), this.speedIncreaseBtn && (this.speedIncreaseBtn.disabled = n >=
|
|
56903
|
+
const n = es.SPEEDS.indexOf(a);
|
|
56904
|
+
this.speedDecreaseBtn && (this.speedDecreaseBtn.disabled = n <= 0), this.speedIncreaseBtn && (this.speedIncreaseBtn.disabled = n >= es.SPEEDS.length - 1);
|
|
56877
56905
|
}
|
|
56878
56906
|
// ─── Transition Value Parsing/Building ───────────────────────────────────
|
|
56879
56907
|
parseTransitionValue(e) {
|
|
@@ -57243,9 +57271,9 @@ class ph extends Xo {
|
|
|
57243
57271
|
formatValue: (r) => `${Math.round(r)}%`
|
|
57244
57272
|
}), this.scaleSlider.onChange((r) => this.handleScaleChange(r)), this.scaleSlider.mount(i));
|
|
57245
57273
|
const s = this.container?.querySelector("[data-transition-panel-mount]");
|
|
57246
|
-
s && (this.transitionPanel = new
|
|
57274
|
+
s && (this.transitionPanel = new es(), this.transitionPanel.onChange(() => this.applyTransitionUpdate()), this.transitionPanel.mount(s));
|
|
57247
57275
|
const a = this.container?.querySelector("[data-effect-panel-mount]");
|
|
57248
|
-
a && (this.effectPanel = new
|
|
57276
|
+
a && (this.effectPanel = new $i(), this.effectPanel.onChange(() => this.applyEffect()), this.effectPanel.mount(a));
|
|
57249
57277
|
}
|
|
57250
57278
|
setupEventListeners() {
|
|
57251
57279
|
this.fitBtn?.addEventListener("click", (e) => {
|
|
@@ -59168,10 +59196,10 @@ class Er extends Xo {
|
|
|
59168
59196
|
}), this.borderRadiusSlider?.addEventListener("input", (a) => {
|
|
59169
59197
|
const r = parseInt(a.target.value, 10);
|
|
59170
59198
|
this.borderRadiusValue && (this.borderRadiusValue.textContent = String(r)), this.updateBorderProperty({ radius: r });
|
|
59171
|
-
}), this.animationPopup = this.container.querySelector("[data-animation-popup]"), this.animationDurationSlider = this.container.querySelector("[data-animation-duration]"), this.animationDurationValue = this.container.querySelector("[data-animation-duration-value]"), this.animationStyleSection = this.container.querySelector("[data-animation-style-section]"), this.animationDirectionSection = this.container.querySelector("[data-animation-direction-section]"), this.transitionPopup = this.container.querySelector("[data-transition-popup]"), this.effectPopup = this.container.querySelector("[data-effect-popup]"), this.transitionPopup && (this.transitionPanel = new
|
|
59199
|
+
}), this.animationPopup = this.container.querySelector("[data-animation-popup]"), this.animationDurationSlider = this.container.querySelector("[data-animation-duration]"), this.animationDurationValue = this.container.querySelector("[data-animation-duration-value]"), this.animationStyleSection = this.container.querySelector("[data-animation-style-section]"), this.animationDirectionSection = this.container.querySelector("[data-animation-direction-section]"), this.transitionPopup = this.container.querySelector("[data-transition-popup]"), this.effectPopup = this.container.querySelector("[data-effect-popup]"), this.transitionPopup && (this.transitionPanel = new es(), this.transitionPanel.onChange(() => {
|
|
59172
59200
|
const a = this.transitionPanel?.getClipValue();
|
|
59173
59201
|
this.applyClipUpdate({ transition: a });
|
|
59174
|
-
}), this.transitionPanel.mount(this.transitionPopup)), this.effectPopup && (this.effectPanel = new
|
|
59202
|
+
}), this.transitionPanel.mount(this.transitionPopup)), this.effectPopup && (this.effectPanel = new $i(), this.effectPanel.onChange(() => {
|
|
59175
59203
|
const a = this.effectPanel?.getClipValue();
|
|
59176
59204
|
this.applyClipUpdate({ effect: a });
|
|
59177
59205
|
}), this.effectPanel.mount(this.effectPopup)), this.container.querySelectorAll("[data-preset]").forEach((a) => {
|
|
@@ -59791,7 +59819,7 @@ function xh(t, e) {
|
|
|
59791
59819
|
height: Math.max(Fn.MIN_DIMENSION, Math.min(e, Fn.MAX_DIMENSION))
|
|
59792
59820
|
};
|
|
59793
59821
|
}
|
|
59794
|
-
const
|
|
59822
|
+
const Ei = {
|
|
59795
59823
|
/** Radius of corner scale handles in pixels */
|
|
59796
59824
|
SCALE_HANDLE_RADIUS: 4,
|
|
59797
59825
|
/** Width of selection outline in pixels */
|
|
@@ -60028,12 +60056,12 @@ class OM {
|
|
|
60028
60056
|
}
|
|
60029
60057
|
drawOutline() {
|
|
60030
60058
|
if (!this.selectedPlayer) return;
|
|
60031
|
-
const e = this.selectedPlayer.getSize(), i = this.getUIScale(), s = this.isHovering || this.isDragging ?
|
|
60032
|
-
this.outline.clear(), this.outline.strokeStyle = { width:
|
|
60059
|
+
const e = this.selectedPlayer.getSize(), i = this.getUIScale(), s = this.isHovering || this.isDragging ? Ei.ACTIVE_COLOR : Ei.DEFAULT_COLOR;
|
|
60060
|
+
this.outline.clear(), this.outline.strokeStyle = { width: Ei.OUTLINE_WIDTH / i, color: s }, this.outline.rect(0, 0, e.width, e.height), this.outline.stroke();
|
|
60033
60061
|
}
|
|
60034
60062
|
drawHandles() {
|
|
60035
60063
|
if (!this.selectedPlayer) return;
|
|
60036
|
-
const e = this.selectedPlayer.getSize(), i = this.getUIScale(), s = this.isHovering || this.isDragging ?
|
|
60064
|
+
const e = this.selectedPlayer.getSize(), i = this.getUIScale(), s = this.isHovering || this.isDragging ? Ei.ACTIVE_COLOR : Ei.DEFAULT_COLOR, a = Ei.SCALE_HANDLE_RADIUS * 2 / i, r = {
|
|
60037
60065
|
topLeft: { x: 0, y: 0 },
|
|
60038
60066
|
topRight: { x: e.width, y: 0 },
|
|
60039
60067
|
bottomRight: { x: e.width, y: e.height },
|
|
@@ -60090,7 +60118,7 @@ class OM {
|
|
|
60090
60118
|
return;
|
|
60091
60119
|
}
|
|
60092
60120
|
if (s.x >= 0 && s.x <= a.width && s.y >= 0 && s.y <= a.height) {
|
|
60093
|
-
const n =
|
|
60121
|
+
const n = Ei.EDGE_HIT_ZONE / this.getUIScale(), o = vh(s, a, n);
|
|
60094
60122
|
if (o && this.selectedPlayer.supportsEdgeResize()) {
|
|
60095
60123
|
this.startEdgeResize(e, o);
|
|
60096
60124
|
return;
|
|
@@ -60225,7 +60253,7 @@ class OM {
|
|
|
60225
60253
|
getRotationCorner(e, i) {
|
|
60226
60254
|
if (e.x >= 0 && e.x <= i.width && e.y >= 0 && e.y <= i.height)
|
|
60227
60255
|
return null;
|
|
60228
|
-
const s = this.getUIScale(), a =
|
|
60256
|
+
const s = this.getUIScale(), a = Ei.SCALE_HANDLE_RADIUS / s, r = Ei.ROTATION_HIT_ZONE / s, n = [
|
|
60229
60257
|
{ x: 0, y: 0 },
|
|
60230
60258
|
{ x: i.width, y: 0 },
|
|
60231
60259
|
{ x: i.width, y: i.height },
|
|
@@ -60244,7 +60272,7 @@ class OM {
|
|
|
60244
60272
|
}
|
|
60245
60273
|
const i = this.selectedPlayer.getContainer(), s = e.getLocalPosition(i), a = this.selectedPlayer.getSize();
|
|
60246
60274
|
if (this.isHovering = s.x >= 0 && s.x <= a.width && s.y >= 0 && s.y <= a.height, this.selectedPlayer.supportsEdgeResize()) {
|
|
60247
|
-
const r =
|
|
60275
|
+
const r = Ei.EDGE_HIT_ZONE / this.getUIScale(), n = vh(s, a, r);
|
|
60248
60276
|
if (n) {
|
|
60249
60277
|
const o = this.selectedPlayer.getRotation() ?? 0, l = Gl[n] ?? 0;
|
|
60250
60278
|
this.outline.cursor = jl(l + o);
|
|
@@ -60522,10 +60550,10 @@ class LM extends Xo {
|
|
|
60522
60550
|
const e = this.container?.querySelector("[data-spacing-panel-container]");
|
|
60523
60551
|
e && (this.spacingPanel = new nm({ showLetterSpacing: !1 }), this.spacingPanel.onChange((i) => {
|
|
60524
60552
|
this.updateAssetProperty({ font: { ...this.getCurrentAsset()?.font, lineHeight: i.lineHeight } });
|
|
60525
|
-
}), this.spacingPanel.mount(e)), this.transitionPopup && (this.transitionPanel = new
|
|
60553
|
+
}), this.spacingPanel.mount(e)), this.transitionPopup && (this.transitionPanel = new es(), this.transitionPanel.onChange(() => {
|
|
60526
60554
|
const i = this.transitionPanel?.getClipValue();
|
|
60527
60555
|
this.applyClipUpdate({ transition: i });
|
|
60528
|
-
}), this.transitionPanel.mount(this.transitionPopup)), this.effectPopup && (this.effectPanel = new
|
|
60556
|
+
}), this.transitionPanel.mount(this.transitionPopup)), this.effectPopup && (this.effectPanel = new $i(), this.effectPanel.onChange(() => {
|
|
60529
60557
|
const i = this.effectPanel?.getClipValue();
|
|
60530
60558
|
this.applyClipUpdate({ effect: i });
|
|
60531
60559
|
}), this.effectPanel.mount(this.effectPopup));
|
|
@@ -60777,7 +60805,7 @@ class Nc {
|
|
|
60777
60805
|
static create(e, i, s = {}) {
|
|
60778
60806
|
const a = new Nc(e, i, s);
|
|
60779
60807
|
a.subscribeToEvents(), i.setUIController(a), a.registerStandardToolbars();
|
|
60780
|
-
const r = document.querySelector(
|
|
60808
|
+
const r = document.querySelector(Ki.CanvasSelector);
|
|
60781
60809
|
return r && r.querySelector("canvas") && a.mount(r), a;
|
|
60782
60810
|
}
|
|
60783
60811
|
/**
|
|
@@ -60862,7 +60890,7 @@ class Nc {
|
|
|
60862
60890
|
*/
|
|
60863
60891
|
mount(e) {
|
|
60864
60892
|
this.container = e;
|
|
60865
|
-
const i = document.querySelector(
|
|
60893
|
+
const i = document.querySelector(Ki.CanvasSelector) ?? e, s = /* @__PURE__ */ new Set();
|
|
60866
60894
|
for (const a of this.toolbars.values())
|
|
60867
60895
|
s.has(a) || (a.mount(i), s.add(a));
|
|
60868
60896
|
this.clipToolbar?.mount(i);
|
|
@@ -61389,7 +61417,7 @@ var BM = Pp({
|
|
|
61389
61417
|
}
|
|
61390
61418
|
async function Ze() {
|
|
61391
61419
|
function E(Mt, ha) {
|
|
61392
|
-
return yi = Mt.exports, n.wasmExports = yi, z = yi.memory, n.wasmMemory = z, te(),
|
|
61420
|
+
return yi = Mt.exports, n.wasmExports = yi, z = yi.memory, n.wasmMemory = z, te(), Hi = yi.__indirect_function_table, nn(yi), _e(), yi;
|
|
61393
61421
|
}
|
|
61394
61422
|
Xe();
|
|
61395
61423
|
function fe(Mt) {
|
|
@@ -61473,13 +61501,13 @@ var BM = Pp({
|
|
|
61473
61501
|
})), li = (E, fe) => {
|
|
61474
61502
|
var Ue = Uint8Array.of(0, 97, 115, 109, 1, 0, 0, 0, 1, ...$a([1, 96, ...mi(fe.slice(1)), ...mi(fe[0] === "v" ? "" : fe[0])]), 2, 7, 1, 1, 101, 1, 102, 0, 0, 7, 5, 1, 1, 102, 0, 0), Ke = new WebAssembly.Module(Ue), it = new WebAssembly.Instance(Ke, { e: { f: E } }), Mt = it.exports.f;
|
|
61475
61503
|
return Mt;
|
|
61476
|
-
},
|
|
61504
|
+
}, Hi, Os = (E) => Hi.get(E), ls = (E, fe) => {
|
|
61477
61505
|
if (ci)
|
|
61478
61506
|
for (var Ue = E; Ue < E + fe; Ue++) {
|
|
61479
61507
|
var Ke = Os(Ue);
|
|
61480
61508
|
Ke && ci.set(Ke, Ue);
|
|
61481
61509
|
}
|
|
61482
|
-
}, ci, tn = (E) => (ci || (ci = /* @__PURE__ */ new WeakMap(), ls(0,
|
|
61510
|
+
}, ci, tn = (E) => (ci || (ci = /* @__PURE__ */ new WeakMap(), ls(0, Hi.length)), ci.get(E) || 0), ua = [], sn = () => ua.length ? ua.pop() : Hi.grow(1), cs = (E, fe) => Hi.set(E, fe), an = (E, fe) => {
|
|
61483
61511
|
var Ue = tn(E);
|
|
61484
61512
|
if (Ue)
|
|
61485
61513
|
return Ue;
|
|
@@ -61902,21 +61930,21 @@ const UM = DM(), WM = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defin
|
|
|
61902
61930
|
__proto__: null,
|
|
61903
61931
|
default: UM
|
|
61904
61932
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
61905
|
-
var ve,
|
|
61906
|
-
|
|
61907
|
-
var Pr =
|
|
61933
|
+
var ve, ts = new Array(128).fill(void 0);
|
|
61934
|
+
ts.push(void 0, null, !0, !1);
|
|
61935
|
+
var Pr = ts.length;
|
|
61908
61936
|
function ai(t) {
|
|
61909
|
-
Pr ===
|
|
61937
|
+
Pr === ts.length && ts.push(ts.length + 1);
|
|
61910
61938
|
const e = Pr;
|
|
61911
|
-
return Pr =
|
|
61939
|
+
return Pr = ts[e], ts[e] = t, e;
|
|
61912
61940
|
}
|
|
61913
61941
|
function $t(t) {
|
|
61914
|
-
return
|
|
61942
|
+
return ts[t];
|
|
61915
61943
|
}
|
|
61916
61944
|
function ZM(t) {
|
|
61917
|
-
t < 132 || (
|
|
61945
|
+
t < 132 || (ts[t] = Pr, Pr = t);
|
|
61918
61946
|
}
|
|
61919
|
-
function
|
|
61947
|
+
function is(t) {
|
|
61920
61948
|
const e = $t(t);
|
|
61921
61949
|
return ZM(t), e;
|
|
61922
61950
|
}
|
|
@@ -62086,8 +62114,8 @@ var Sh = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
|
62086
62114
|
ve.renderedimage_asPng(a, this.__wbg_ptr);
|
|
62087
62115
|
var e = Dt()[a / 4 + 0], i = Dt()[a / 4 + 1], s = Dt()[a / 4 + 2];
|
|
62088
62116
|
if (s)
|
|
62089
|
-
throw
|
|
62090
|
-
return
|
|
62117
|
+
throw is(i);
|
|
62118
|
+
return is(e);
|
|
62091
62119
|
} finally {
|
|
62092
62120
|
ve.__wbindgen_add_to_stack_pointer(16);
|
|
62093
62121
|
}
|
|
@@ -62098,7 +62126,7 @@ var Sh = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
|
62098
62126
|
*/
|
|
62099
62127
|
get pixels() {
|
|
62100
62128
|
const e = ve.renderedimage_pixels(this.__wbg_ptr);
|
|
62101
|
-
return
|
|
62129
|
+
return is(e);
|
|
62102
62130
|
}
|
|
62103
62131
|
}, YM = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
62104
62132
|
}, unregister: () => {
|
|
@@ -62123,7 +62151,7 @@ var Sh = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
|
62123
62151
|
ve.resvg_new(l, ai(t), s, a, Ec(i) ? 0 : ai(i));
|
|
62124
62152
|
var r = Dt()[l / 4 + 0], n = Dt()[l / 4 + 1], o = Dt()[l / 4 + 2];
|
|
62125
62153
|
if (o)
|
|
62126
|
-
throw
|
|
62154
|
+
throw is(n);
|
|
62127
62155
|
return this.__wbg_ptr = r >>> 0, this;
|
|
62128
62156
|
} finally {
|
|
62129
62157
|
ve.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -62153,7 +62181,7 @@ var Sh = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
|
62153
62181
|
ve.resvg_render(s, this.__wbg_ptr);
|
|
62154
62182
|
var t = Dt()[s / 4 + 0], e = Dt()[s / 4 + 1], i = Dt()[s / 4 + 2];
|
|
62155
62183
|
if (i)
|
|
62156
|
-
throw
|
|
62184
|
+
throw is(e);
|
|
62157
62185
|
return qM.__wrap(t);
|
|
62158
62186
|
} finally {
|
|
62159
62187
|
ve.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -62211,8 +62239,8 @@ var Sh = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
|
62211
62239
|
ve.resvg_imagesToResolve(s, this.__wbg_ptr);
|
|
62212
62240
|
var t = Dt()[s / 4 + 0], e = Dt()[s / 4 + 1], i = Dt()[s / 4 + 2];
|
|
62213
62241
|
if (i)
|
|
62214
|
-
throw
|
|
62215
|
-
return
|
|
62242
|
+
throw is(e);
|
|
62243
|
+
return is(t);
|
|
62216
62244
|
} finally {
|
|
62217
62245
|
ve.__wbindgen_add_to_stack_pointer(16);
|
|
62218
62246
|
}
|
|
@@ -62227,7 +62255,7 @@ var Sh = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
|
62227
62255
|
ve.resvg_resolveImage(a, this.__wbg_ptr, r, n, ai(e));
|
|
62228
62256
|
var i = Dt()[a / 4 + 0], s = Dt()[a / 4 + 1];
|
|
62229
62257
|
if (s)
|
|
62230
|
-
throw
|
|
62258
|
+
throw is(i);
|
|
62231
62259
|
} finally {
|
|
62232
62260
|
ve.__wbindgen_add_to_stack_pointer(16);
|
|
62233
62261
|
}
|
|
@@ -62266,7 +62294,7 @@ function JM() {
|
|
|
62266
62294
|
const a = new Uint8Array($t(e), i >>> 0, s >>> 0);
|
|
62267
62295
|
return ai(a);
|
|
62268
62296
|
}, t.wbg.__wbindgen_object_drop_ref = function(e) {
|
|
62269
|
-
|
|
62297
|
+
is(e);
|
|
62270
62298
|
}, t.wbg.__wbg_new_63b92bc8671ed464 = function(e) {
|
|
62271
62299
|
const i = new Uint8Array($t(e));
|
|
62272
62300
|
return ai(i);
|
|
@@ -62361,7 +62389,7 @@ export {
|
|
|
62361
62389
|
kO as AssetSchema,
|
|
62362
62390
|
Y7 as AssetToolbar,
|
|
62363
62391
|
bO as AudioAssetSchema,
|
|
62364
|
-
|
|
62392
|
+
Ki as Canvas,
|
|
62365
62393
|
Q7 as CanvasToolbar,
|
|
62366
62394
|
cO as CaptionAssetSchema,
|
|
62367
62395
|
CO as ClipSchema,
|