presenter 0.8.1 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/presenter.mjs
CHANGED
|
@@ -411,7 +411,7 @@ var Vt = Object.defineProperty, _ = (n, e) => Vt(n, "name", { value: e, configur
|
|
|
411
411
|
const e = (n && n.length > 0 ? n : "M0,0").match(Kt);
|
|
412
412
|
if (!e) throw new Error(`No path elements found in string ${n}`);
|
|
413
413
|
return e.reduce((t, o) => {
|
|
414
|
-
let i = o.charAt(0), a = i.toLowerCase(), s =
|
|
414
|
+
let i = o.charAt(0), a = i.toLowerCase(), s = te(o.substring(1));
|
|
415
415
|
if (a === "m" && s.length > 2 && (t.push([i, ...s.splice(0, 2)]), a = "l", i = i === "m" ? "l" : "L"), a.toLowerCase() === "a" && (s.length === 5 || s.length === 6)) {
|
|
416
416
|
const r = o.substring(1).trim().split(" ");
|
|
417
417
|
s = [Number(r[0]), Number(r[1]), Number(r[2]), Number(r[3].charAt(0)), Number(r[3].charAt(1)), Number(r[3].substring(2)), Number(r[4])];
|
|
@@ -426,7 +426,7 @@ var Vt = Object.defineProperty, _ = (n, e) => Vt(n, "name", { value: e, configur
|
|
|
426
426
|
}
|
|
427
427
|
return t;
|
|
428
428
|
}, []);
|
|
429
|
-
}, "default"),
|
|
429
|
+
}, "default"), te = _((n) => {
|
|
430
430
|
const e = n.match(Qt);
|
|
431
431
|
return e ? e.map(Number) : [];
|
|
432
432
|
}, "parseValues"), w0, J = (w0 = class {
|
|
@@ -483,14 +483,14 @@ var Vt = Object.defineProperty, _ = (n, e) => Vt(n, "name", { value: e, configur
|
|
|
483
483
|
return { x: o.x, y: o.y, tangentX: t.x, tangentY: t.y };
|
|
484
484
|
}, "getPropertiesAtLength"));
|
|
485
485
|
this.x0 = e, this.y0 = t, this.rx = o, this.ry = i, this.xAxisRotate = a, this.LargeArcFlag = s, this.SweepFlag = r, this.x1 = h, this.y1 = c;
|
|
486
|
-
const f =
|
|
486
|
+
const f = ee(300, function(d) {
|
|
487
487
|
return ht({ x: e, y: t }, o, i, a, s, r, { x: h, y: c }, d);
|
|
488
488
|
});
|
|
489
489
|
this.length = f.arcLength;
|
|
490
490
|
}
|
|
491
491
|
}, _(m0, "Arc"), m0), ht = _((n, e, t, o, i, a, s, r) => {
|
|
492
|
-
e = Math.abs(e), t = Math.abs(t), o =
|
|
493
|
-
const h =
|
|
492
|
+
e = Math.abs(e), t = Math.abs(t), o = ne(o, 360);
|
|
493
|
+
const h = re(o);
|
|
494
494
|
if (n.x === s.x && n.y === s.y) return { x: n.x, y: n.y, ellipticalArcAngle: 0 };
|
|
495
495
|
if (e === 0 || t === 0) return { x: 0, y: 0, ellipticalArcAngle: 0 };
|
|
496
496
|
const c = (n.x - s.x) / 2, f = (n.y - s.y) / 2, d = { x: Math.cos(h) * c + Math.sin(h) * f, y: -Math.sin(h) * c + Math.cos(h) * f }, l = Math.pow(d.x, 2) / Math.pow(e, 2) + Math.pow(d.y, 2) / Math.pow(t, 2);
|
|
@@ -502,32 +502,32 @@ var Vt = Object.defineProperty, _ = (n, e) => Vt(n, "name", { value: e, configur
|
|
|
502
502
|
!a && E > 0 ? E -= 2 * Math.PI : a && E < 0 && (E += 2 * Math.PI), E %= 2 * Math.PI;
|
|
503
503
|
const C = P + E * r, O = e * Math.cos(C), R = t * Math.sin(C);
|
|
504
504
|
return { x: Math.cos(h) * O - Math.sin(h) * R + T.x, y: Math.sin(h) * O + Math.cos(h) * R + T.y, ellipticalArcStartAngle: P, ellipticalArcEndAngle: P + E, ellipticalArcAngle: C, ellipticalArcCenter: T, resultantRx: e, resultantRy: t };
|
|
505
|
-
}, "pointOnEllipticalArc"),
|
|
505
|
+
}, "pointOnEllipticalArc"), ee = _((n, e) => {
|
|
506
506
|
n = n ?? 500;
|
|
507
507
|
let t = 0;
|
|
508
508
|
const o = [], i = [];
|
|
509
509
|
let a, s = e(0);
|
|
510
510
|
for (let r = 0; r < n; r++) {
|
|
511
|
-
const h =
|
|
511
|
+
const h = ie(r * (1 / n), 0, 1);
|
|
512
512
|
a = e(h), t += lt(s, a), i.push([s, a]), o.push({ t: h, arcLength: t }), s = a;
|
|
513
513
|
}
|
|
514
514
|
return a = e(1), i.push([s, a]), t += lt(s, a), o.push({ t: 1, arcLength: t }), { arcLength: t, arcLengthMap: o, approximationLines: i };
|
|
515
|
-
}, "approximateArcLengthOfCurve"),
|
|
515
|
+
}, "approximateArcLengthOfCurve"), ne = _((n, e) => (n % e + e) % e, "mod"), re = _((n) => n * (Math.PI / 180), "toRadians"), lt = _((n, e) => Math.sqrt(Math.pow(e.x - n.x, 2) + Math.pow(e.y - n.y, 2)), "distance"), ie = _((n, e, t) => Math.min(Math.max(n, e), t), "clamp"), ct = _((n, e) => {
|
|
516
516
|
const t = n.x * e.x + n.y * e.y, o = Math.sqrt((Math.pow(n.x, 2) + Math.pow(n.y, 2)) * (Math.pow(e.x, 2) + Math.pow(e.y, 2)));
|
|
517
517
|
return (n.x * e.y - n.y * e.x < 0 ? -1 : 1) * Math.acos(t / o);
|
|
518
|
-
}, "angleBetween"), o1 = [[], [], [-0.5773502691896257, 0.5773502691896258], [0, -0.7745966692414833, 0.7745966692414833], [-0.33998104358485626, 0.33998104358485626, -0.8611363115940526, 0.8611363115940526], [0, -0.5384693101056831, 0.5384693101056831, -0.906179845938664, 0.906179845938664], [0.6612093864662645, -0.6612093864662645, -0.2386191860831969, 0.2386191860831969, -0.932469514203152, 0.932469514203152], [0, 0.4058451513773972, -0.4058451513773972, -0.7415311855993945, 0.7415311855993945, -0.9491079123427585, 0.9491079123427585], [-0.1834346424956498, 0.1834346424956498, -0.525532409916329, 0.525532409916329, -0.7966664774136267, 0.7966664774136267, -0.9602898564975363, 0.9602898564975363], [0, -0.8360311073266358, 0.8360311073266358, -0.9681602395076261, 0.9681602395076261, -0.3242534234038089, 0.3242534234038089, -0.6133714327005904, 0.6133714327005904], [-0.14887433898163122, 0.14887433898163122, -0.4333953941292472, 0.4333953941292472, -0.6794095682990244, 0.6794095682990244, -0.8650633666889845, 0.8650633666889845, -0.9739065285171717, 0.9739065285171717], [0, -0.26954315595234496, 0.26954315595234496, -0.5190961292068118, 0.5190961292068118, -0.7301520055740494, 0.7301520055740494, -0.8870625997680953, 0.8870625997680953, -0.978228658146057, 0.978228658146057], [-0.1252334085114689, 0.1252334085114689, -0.3678314989981802, 0.3678314989981802, -0.5873179542866175, 0.5873179542866175, -0.7699026741943047, 0.7699026741943047, -0.9041172563704749, 0.9041172563704749, -0.9815606342467192, 0.9815606342467192], [0, -0.2304583159551348, 0.2304583159551348, -0.44849275103644687, 0.44849275103644687, -0.6423493394403402, 0.6423493394403402, -0.8015780907333099, 0.8015780907333099, -0.9175983992229779, 0.9175983992229779, -0.9841830547185881, 0.9841830547185881], [-0.10805494870734367, 0.10805494870734367, -0.31911236892788974, 0.31911236892788974, -0.5152486363581541, 0.5152486363581541, -0.6872929048116855, 0.6872929048116855, -0.827201315069765, 0.827201315069765, -0.9284348836635735, 0.9284348836635735, -0.9862838086968123, 0.9862838086968123], [0, -0.20119409399743451, 0.20119409399743451, -0.3941513470775634, 0.3941513470775634, -0.5709721726085388, 0.5709721726085388, -0.7244177313601701, 0.7244177313601701, -0.8482065834104272, 0.8482065834104272, -0.937273392400706, 0.937273392400706, -0.9879925180204854, 0.9879925180204854], [-0.09501250983763744, 0.09501250983763744, -0.2816035507792589, 0.2816035507792589, -0.45801677765722737, 0.45801677765722737, -0.6178762444026438, 0.6178762444026438, -0.755404408355003, 0.755404408355003, -0.8656312023878318, 0.8656312023878318, -0.9445750230732326, 0.9445750230732326, -0.9894009349916499, 0.9894009349916499], [0, -0.17848418149584785, 0.17848418149584785, -0.3512317634538763, 0.3512317634538763, -0.5126905370864769, 0.5126905370864769, -0.6576711592166907, 0.6576711592166907, -0.7815140038968014, 0.7815140038968014, -0.8802391537269859, 0.8802391537269859, -0.9506755217687678, 0.9506755217687678, -0.9905754753144174, 0.9905754753144174], [-0.0847750130417353, 0.0847750130417353, -0.2518862256915055, 0.2518862256915055, -0.41175116146284263, 0.41175116146284263, -0.5597708310739475, 0.5597708310739475, -0.6916870430603532, 0.6916870430603532, -0.8037049589725231, 0.8037049589725231, -0.8926024664975557, 0.8926024664975557, -0.9558239495713977, 0.9558239495713977, -0.9915651684209309, 0.9915651684209309], [0, -0.16035864564022537, 0.16035864564022537, -0.31656409996362983, 0.31656409996362983, -0.46457074137596094, 0.46457074137596094, -0.600545304661681, 0.600545304661681, -0.7209661773352294, 0.7209661773352294, -0.8227146565371428, 0.8227146565371428, -0.9031559036148179, 0.9031559036148179, -0.96020815213483, 0.96020815213483, -0.9924068438435844, 0.9924068438435844], [-0.07652652113349734, 0.07652652113349734, -0.22778585114164507, 0.22778585114164507, -0.37370608871541955, 0.37370608871541955, -0.5108670019508271, 0.5108670019508271, -0.636053680726515, 0.636053680726515, -0.7463319064601508, 0.7463319064601508, -0.8391169718222188, 0.8391169718222188, -0.912234428251326, 0.912234428251326, -0.9639719272779138, 0.9639719272779138, -0.9931285991850949, 0.9931285991850949], [0, -0.1455618541608951, 0.1455618541608951, -0.2880213168024011, 0.2880213168024011, -0.4243421202074388, 0.4243421202074388, -0.5516188358872198, 0.5516188358872198, -0.6671388041974123, 0.6671388041974123, -0.7684399634756779, 0.7684399634756779, -0.8533633645833173, 0.8533633645833173, -0.9200993341504008, 0.9200993341504008, -0.9672268385663063, 0.9672268385663063, -0.9937521706203895, 0.9937521706203895], [-0.06973927331972223, 0.06973927331972223, -0.20786042668822127, 0.20786042668822127, -0.34193582089208424, 0.34193582089208424, -0.469355837986757, 0.469355837986757, -0.5876404035069116, 0.5876404035069116, -0.6944872631866827, 0.6944872631866827, -0.7878168059792081, 0.7878168059792081, -0.8658125777203002, 0.8658125777203002, -0.926956772187174, 0.926956772187174, -0.9700604978354287, 0.9700604978354287, -0.9942945854823992, 0.9942945854823992], [0, -0.1332568242984661, 0.1332568242984661, -0.26413568097034495, 0.26413568097034495, -0.3903010380302908, 0.3903010380302908, -0.5095014778460075, 0.5095014778460075, -0.6196098757636461, 0.6196098757636461, -0.7186613631319502, 0.7186613631319502, -0.8048884016188399, 0.8048884016188399, -0.8767523582704416, 0.8767523582704416, -0.9329710868260161, 0.9329710868260161, -0.9725424712181152, 0.9725424712181152, -0.9947693349975522, 0.9947693349975522], [-0.06405689286260563, 0.06405689286260563, -0.1911188674736163, 0.1911188674736163, -0.3150426796961634, 0.3150426796961634, -0.4337935076260451, 0.4337935076260451, -0.5454214713888396, 0.5454214713888396, -0.6480936519369755, 0.6480936519369755, -0.7401241915785544, 0.7401241915785544, -0.820001985973903, 0.820001985973903, -0.8864155270044011, 0.8864155270044011, -0.9382745520027328, 0.9382745520027328, -0.9747285559713095, 0.9747285559713095, -0.9951872199970213, 0.9951872199970213]], s1 = [[], [], [1, 1], [0.8888888888888888, 0.5555555555555556, 0.5555555555555556], [0.6521451548625461, 0.6521451548625461, 0.34785484513745385, 0.34785484513745385], [0.5688888888888889, 0.47862867049936647, 0.47862867049936647, 0.23692688505618908, 0.23692688505618908], [0.3607615730481386, 0.3607615730481386, 0.46791393457269104, 0.46791393457269104, 0.17132449237917036, 0.17132449237917036], [0.4179591836734694, 0.3818300505051189, 0.3818300505051189, 0.27970539148927664, 0.27970539148927664, 0.1294849661688697, 0.1294849661688697], [0.362683783378362, 0.362683783378362, 0.31370664587788727, 0.31370664587788727, 0.22238103445337448, 0.22238103445337448, 0.10122853629037626, 0.10122853629037626], [0.3302393550012598, 0.1806481606948574, 0.1806481606948574, 0.08127438836157441, 0.08127438836157441, 0.31234707704000286, 0.31234707704000286, 0.26061069640293544, 0.26061069640293544], [0.29552422471475287, 0.29552422471475287, 0.26926671930999635, 0.26926671930999635, 0.21908636251598204, 0.21908636251598204, 0.1494513491505806, 0.1494513491505806, 0.06667134430868814, 0.06667134430868814], [0.2729250867779006, 0.26280454451024665, 0.26280454451024665, 0.23319376459199048, 0.23319376459199048, 0.18629021092773426, 0.18629021092773426, 0.1255803694649046, 0.1255803694649046, 0.05566856711617366, 0.05566856711617366], [0.24914704581340277, 0.24914704581340277, 0.2334925365383548, 0.2334925365383548, 0.20316742672306592, 0.20316742672306592, 0.16007832854334622, 0.16007832854334622, 0.10693932599531843, 0.10693932599531843, 0.04717533638651183, 0.04717533638651183], [0.2325515532308739, 0.22628318026289723, 0.22628318026289723, 0.2078160475368885, 0.2078160475368885, 0.17814598076194574, 0.17814598076194574, 0.13887351021978725, 0.13887351021978725, 0.09212149983772845, 0.09212149983772845, 0.04048400476531588, 0.04048400476531588], [0.2152638534631578, 0.2152638534631578, 0.2051984637212956, 0.2051984637212956, 0.18553839747793782, 0.18553839747793782, 0.15720316715819355, 0.15720316715819355, 0.12151857068790319, 0.12151857068790319, 0.08015808715976021, 0.08015808715976021, 0.03511946033175186, 0.03511946033175186], [0.2025782419255613, 0.19843148532711158, 0.19843148532711158, 0.1861610000155622, 0.1861610000155622, 0.16626920581699392, 0.16626920581699392, 0.13957067792615432, 0.13957067792615432, 0.10715922046717194, 0.10715922046717194, 0.07036604748810812, 0.07036604748810812, 0.03075324199611727, 0.03075324199611727], [0.1894506104550685, 0.1894506104550685, 0.18260341504492358, 0.18260341504492358, 0.16915651939500254, 0.16915651939500254, 0.14959598881657674, 0.14959598881657674, 0.12462897125553388, 0.12462897125553388, 0.09515851168249279, 0.09515851168249279, 0.062253523938647894, 0.062253523938647894, 0.027152459411754096, 0.027152459411754096], [0.17944647035620653, 0.17656270536699264, 0.17656270536699264, 0.16800410215645004, 0.16800410215645004, 0.15404576107681028, 0.15404576107681028, 0.13513636846852548, 0.13513636846852548, 0.11188384719340397, 0.11188384719340397, 0.08503614831717918, 0.08503614831717918, 0.0554595293739872, 0.0554595293739872, 0.02414830286854793, 0.02414830286854793], [0.1691423829631436, 0.1691423829631436, 0.16427648374583273, 0.16427648374583273, 0.15468467512626524, 0.15468467512626524, 0.14064291467065065, 0.14064291467065065, 0.12255520671147846, 0.12255520671147846, 0.10094204410628717, 0.10094204410628717, 0.07642573025488905, 0.07642573025488905, 0.0497145488949698, 0.0497145488949698, 0.02161601352648331, 0.02161601352648331], [0.1610544498487837, 0.15896884339395434, 0.15896884339395434, 0.15276604206585967, 0.15276604206585967, 0.1426067021736066, 0.1426067021736066, 0.12875396253933621, 0.12875396253933621, 0.11156664554733399, 0.11156664554733399, 0.09149002162245, 0.09149002162245, 0.06904454273764123, 0.06904454273764123, 0.0448142267656996, 0.0448142267656996, 0.019461788229726478, 0.019461788229726478], [0.15275338713072584, 0.15275338713072584, 0.14917298647260374, 0.14917298647260374, 0.14209610931838204, 0.14209610931838204, 0.13168863844917664, 0.13168863844917664, 0.11819453196151841, 0.11819453196151841, 0.10193011981724044, 0.10193011981724044, 0.08327674157670475, 0.08327674157670475, 0.06267204833410907, 0.06267204833410907, 0.04060142980038694, 0.04060142980038694, 0.017614007139152118, 0.017614007139152118], [0.14608113364969041, 0.14452440398997005, 0.14452440398997005, 0.13988739479107315, 0.13988739479107315, 0.13226893863333747, 0.13226893863333747, 0.12183141605372853, 0.12183141605372853, 0.10879729916714838, 0.10879729916714838, 0.09344442345603386, 0.09344442345603386, 0.0761001136283793, 0.0761001136283793, 0.057134425426857205, 0.057134425426857205, 0.036953789770852494, 0.036953789770852494, 0.016017228257774335, 0.016017228257774335], [0.13925187285563198, 0.13925187285563198, 0.13654149834601517, 0.13654149834601517, 0.13117350478706238, 0.13117350478706238, 0.12325237681051242, 0.12325237681051242, 0.11293229608053922, 0.11293229608053922, 0.10041414444288096, 0.10041414444288096, 0.08594160621706773, 0.08594160621706773, 0.06979646842452049, 0.06979646842452049, 0.052293335152683286, 0.052293335152683286, 0.03377490158481415, 0.03377490158481415, 0.0146279952982722, 0.0146279952982722], [0.13365457218610619, 0.1324620394046966, 0.1324620394046966, 0.12890572218808216, 0.12890572218808216, 0.12304908430672953, 0.12304908430672953, 0.11499664022241136, 0.11499664022241136, 0.10489209146454141, 0.10489209146454141, 0.09291576606003515, 0.09291576606003515, 0.07928141177671895, 0.07928141177671895, 0.06423242140852585, 0.06423242140852585, 0.04803767173108467, 0.04803767173108467, 0.030988005856979445, 0.030988005856979445, 0.013411859487141771, 0.013411859487141771], [0.12793819534675216, 0.12793819534675216, 0.1258374563468283, 0.1258374563468283, 0.12167047292780339, 0.12167047292780339, 0.1155056680537256, 0.1155056680537256, 0.10744427011596563, 0.10744427011596563, 0.09761865210411388, 0.09761865210411388, 0.08619016153195327, 0.08619016153195327, 0.0733464814110803, 0.0733464814110803, 0.05929858491543678, 0.05929858491543678, 0.04427743881741981, 0.04427743881741981, 0.028531388628933663, 0.028531388628933663, 0.0123412297999872, 0.0123412297999872]], a1 = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]], h1 = _((n, e, t) => ({ x: (1 - t) * (1 - t) * (1 - t) * n[0] + 3 * (1 - t) * (1 - t) * t * n[1] + 3 * (1 - t) * t * t * n[2] + t * t * t * n[3], y: (1 - t) * (1 - t) * (1 - t) * e[0] + 3 * (1 - t) * (1 - t) * t * e[1] + 3 * (1 - t) * t * t * e[2] + t * t * t * e[3] }), "cubicPoint"), l1 = _((n, e, t) => kt([3 * (n[1] - n[0]), 3 * (n[2] - n[1]), 3 * (n[3] - n[2])], [3 * (e[1] - e[0]), 3 * (e[2] - e[1]), 3 * (e[3] - e[2])], t), "cubicDerivative"), c1 = _((n, e, t) => {
|
|
518
|
+
}, "angleBetween"), oe = [[], [], [-0.5773502691896257, 0.5773502691896258], [0, -0.7745966692414833, 0.7745966692414833], [-0.33998104358485626, 0.33998104358485626, -0.8611363115940526, 0.8611363115940526], [0, -0.5384693101056831, 0.5384693101056831, -0.906179845938664, 0.906179845938664], [0.6612093864662645, -0.6612093864662645, -0.2386191860831969, 0.2386191860831969, -0.932469514203152, 0.932469514203152], [0, 0.4058451513773972, -0.4058451513773972, -0.7415311855993945, 0.7415311855993945, -0.9491079123427585, 0.9491079123427585], [-0.1834346424956498, 0.1834346424956498, -0.525532409916329, 0.525532409916329, -0.7966664774136267, 0.7966664774136267, -0.9602898564975363, 0.9602898564975363], [0, -0.8360311073266358, 0.8360311073266358, -0.9681602395076261, 0.9681602395076261, -0.3242534234038089, 0.3242534234038089, -0.6133714327005904, 0.6133714327005904], [-0.14887433898163122, 0.14887433898163122, -0.4333953941292472, 0.4333953941292472, -0.6794095682990244, 0.6794095682990244, -0.8650633666889845, 0.8650633666889845, -0.9739065285171717, 0.9739065285171717], [0, -0.26954315595234496, 0.26954315595234496, -0.5190961292068118, 0.5190961292068118, -0.7301520055740494, 0.7301520055740494, -0.8870625997680953, 0.8870625997680953, -0.978228658146057, 0.978228658146057], [-0.1252334085114689, 0.1252334085114689, -0.3678314989981802, 0.3678314989981802, -0.5873179542866175, 0.5873179542866175, -0.7699026741943047, 0.7699026741943047, -0.9041172563704749, 0.9041172563704749, -0.9815606342467192, 0.9815606342467192], [0, -0.2304583159551348, 0.2304583159551348, -0.44849275103644687, 0.44849275103644687, -0.6423493394403402, 0.6423493394403402, -0.8015780907333099, 0.8015780907333099, -0.9175983992229779, 0.9175983992229779, -0.9841830547185881, 0.9841830547185881], [-0.10805494870734367, 0.10805494870734367, -0.31911236892788974, 0.31911236892788974, -0.5152486363581541, 0.5152486363581541, -0.6872929048116855, 0.6872929048116855, -0.827201315069765, 0.827201315069765, -0.9284348836635735, 0.9284348836635735, -0.9862838086968123, 0.9862838086968123], [0, -0.20119409399743451, 0.20119409399743451, -0.3941513470775634, 0.3941513470775634, -0.5709721726085388, 0.5709721726085388, -0.7244177313601701, 0.7244177313601701, -0.8482065834104272, 0.8482065834104272, -0.937273392400706, 0.937273392400706, -0.9879925180204854, 0.9879925180204854], [-0.09501250983763744, 0.09501250983763744, -0.2816035507792589, 0.2816035507792589, -0.45801677765722737, 0.45801677765722737, -0.6178762444026438, 0.6178762444026438, -0.755404408355003, 0.755404408355003, -0.8656312023878318, 0.8656312023878318, -0.9445750230732326, 0.9445750230732326, -0.9894009349916499, 0.9894009349916499], [0, -0.17848418149584785, 0.17848418149584785, -0.3512317634538763, 0.3512317634538763, -0.5126905370864769, 0.5126905370864769, -0.6576711592166907, 0.6576711592166907, -0.7815140038968014, 0.7815140038968014, -0.8802391537269859, 0.8802391537269859, -0.9506755217687678, 0.9506755217687678, -0.9905754753144174, 0.9905754753144174], [-0.0847750130417353, 0.0847750130417353, -0.2518862256915055, 0.2518862256915055, -0.41175116146284263, 0.41175116146284263, -0.5597708310739475, 0.5597708310739475, -0.6916870430603532, 0.6916870430603532, -0.8037049589725231, 0.8037049589725231, -0.8926024664975557, 0.8926024664975557, -0.9558239495713977, 0.9558239495713977, -0.9915651684209309, 0.9915651684209309], [0, -0.16035864564022537, 0.16035864564022537, -0.31656409996362983, 0.31656409996362983, -0.46457074137596094, 0.46457074137596094, -0.600545304661681, 0.600545304661681, -0.7209661773352294, 0.7209661773352294, -0.8227146565371428, 0.8227146565371428, -0.9031559036148179, 0.9031559036148179, -0.96020815213483, 0.96020815213483, -0.9924068438435844, 0.9924068438435844], [-0.07652652113349734, 0.07652652113349734, -0.22778585114164507, 0.22778585114164507, -0.37370608871541955, 0.37370608871541955, -0.5108670019508271, 0.5108670019508271, -0.636053680726515, 0.636053680726515, -0.7463319064601508, 0.7463319064601508, -0.8391169718222188, 0.8391169718222188, -0.912234428251326, 0.912234428251326, -0.9639719272779138, 0.9639719272779138, -0.9931285991850949, 0.9931285991850949], [0, -0.1455618541608951, 0.1455618541608951, -0.2880213168024011, 0.2880213168024011, -0.4243421202074388, 0.4243421202074388, -0.5516188358872198, 0.5516188358872198, -0.6671388041974123, 0.6671388041974123, -0.7684399634756779, 0.7684399634756779, -0.8533633645833173, 0.8533633645833173, -0.9200993341504008, 0.9200993341504008, -0.9672268385663063, 0.9672268385663063, -0.9937521706203895, 0.9937521706203895], [-0.06973927331972223, 0.06973927331972223, -0.20786042668822127, 0.20786042668822127, -0.34193582089208424, 0.34193582089208424, -0.469355837986757, 0.469355837986757, -0.5876404035069116, 0.5876404035069116, -0.6944872631866827, 0.6944872631866827, -0.7878168059792081, 0.7878168059792081, -0.8658125777203002, 0.8658125777203002, -0.926956772187174, 0.926956772187174, -0.9700604978354287, 0.9700604978354287, -0.9942945854823992, 0.9942945854823992], [0, -0.1332568242984661, 0.1332568242984661, -0.26413568097034495, 0.26413568097034495, -0.3903010380302908, 0.3903010380302908, -0.5095014778460075, 0.5095014778460075, -0.6196098757636461, 0.6196098757636461, -0.7186613631319502, 0.7186613631319502, -0.8048884016188399, 0.8048884016188399, -0.8767523582704416, 0.8767523582704416, -0.9329710868260161, 0.9329710868260161, -0.9725424712181152, 0.9725424712181152, -0.9947693349975522, 0.9947693349975522], [-0.06405689286260563, 0.06405689286260563, -0.1911188674736163, 0.1911188674736163, -0.3150426796961634, 0.3150426796961634, -0.4337935076260451, 0.4337935076260451, -0.5454214713888396, 0.5454214713888396, -0.6480936519369755, 0.6480936519369755, -0.7401241915785544, 0.7401241915785544, -0.820001985973903, 0.820001985973903, -0.8864155270044011, 0.8864155270044011, -0.9382745520027328, 0.9382745520027328, -0.9747285559713095, 0.9747285559713095, -0.9951872199970213, 0.9951872199970213]], se = [[], [], [1, 1], [0.8888888888888888, 0.5555555555555556, 0.5555555555555556], [0.6521451548625461, 0.6521451548625461, 0.34785484513745385, 0.34785484513745385], [0.5688888888888889, 0.47862867049936647, 0.47862867049936647, 0.23692688505618908, 0.23692688505618908], [0.3607615730481386, 0.3607615730481386, 0.46791393457269104, 0.46791393457269104, 0.17132449237917036, 0.17132449237917036], [0.4179591836734694, 0.3818300505051189, 0.3818300505051189, 0.27970539148927664, 0.27970539148927664, 0.1294849661688697, 0.1294849661688697], [0.362683783378362, 0.362683783378362, 0.31370664587788727, 0.31370664587788727, 0.22238103445337448, 0.22238103445337448, 0.10122853629037626, 0.10122853629037626], [0.3302393550012598, 0.1806481606948574, 0.1806481606948574, 0.08127438836157441, 0.08127438836157441, 0.31234707704000286, 0.31234707704000286, 0.26061069640293544, 0.26061069640293544], [0.29552422471475287, 0.29552422471475287, 0.26926671930999635, 0.26926671930999635, 0.21908636251598204, 0.21908636251598204, 0.1494513491505806, 0.1494513491505806, 0.06667134430868814, 0.06667134430868814], [0.2729250867779006, 0.26280454451024665, 0.26280454451024665, 0.23319376459199048, 0.23319376459199048, 0.18629021092773426, 0.18629021092773426, 0.1255803694649046, 0.1255803694649046, 0.05566856711617366, 0.05566856711617366], [0.24914704581340277, 0.24914704581340277, 0.2334925365383548, 0.2334925365383548, 0.20316742672306592, 0.20316742672306592, 0.16007832854334622, 0.16007832854334622, 0.10693932599531843, 0.10693932599531843, 0.04717533638651183, 0.04717533638651183], [0.2325515532308739, 0.22628318026289723, 0.22628318026289723, 0.2078160475368885, 0.2078160475368885, 0.17814598076194574, 0.17814598076194574, 0.13887351021978725, 0.13887351021978725, 0.09212149983772845, 0.09212149983772845, 0.04048400476531588, 0.04048400476531588], [0.2152638534631578, 0.2152638534631578, 0.2051984637212956, 0.2051984637212956, 0.18553839747793782, 0.18553839747793782, 0.15720316715819355, 0.15720316715819355, 0.12151857068790319, 0.12151857068790319, 0.08015808715976021, 0.08015808715976021, 0.03511946033175186, 0.03511946033175186], [0.2025782419255613, 0.19843148532711158, 0.19843148532711158, 0.1861610000155622, 0.1861610000155622, 0.16626920581699392, 0.16626920581699392, 0.13957067792615432, 0.13957067792615432, 0.10715922046717194, 0.10715922046717194, 0.07036604748810812, 0.07036604748810812, 0.03075324199611727, 0.03075324199611727], [0.1894506104550685, 0.1894506104550685, 0.18260341504492358, 0.18260341504492358, 0.16915651939500254, 0.16915651939500254, 0.14959598881657674, 0.14959598881657674, 0.12462897125553388, 0.12462897125553388, 0.09515851168249279, 0.09515851168249279, 0.062253523938647894, 0.062253523938647894, 0.027152459411754096, 0.027152459411754096], [0.17944647035620653, 0.17656270536699264, 0.17656270536699264, 0.16800410215645004, 0.16800410215645004, 0.15404576107681028, 0.15404576107681028, 0.13513636846852548, 0.13513636846852548, 0.11188384719340397, 0.11188384719340397, 0.08503614831717918, 0.08503614831717918, 0.0554595293739872, 0.0554595293739872, 0.02414830286854793, 0.02414830286854793], [0.1691423829631436, 0.1691423829631436, 0.16427648374583273, 0.16427648374583273, 0.15468467512626524, 0.15468467512626524, 0.14064291467065065, 0.14064291467065065, 0.12255520671147846, 0.12255520671147846, 0.10094204410628717, 0.10094204410628717, 0.07642573025488905, 0.07642573025488905, 0.0497145488949698, 0.0497145488949698, 0.02161601352648331, 0.02161601352648331], [0.1610544498487837, 0.15896884339395434, 0.15896884339395434, 0.15276604206585967, 0.15276604206585967, 0.1426067021736066, 0.1426067021736066, 0.12875396253933621, 0.12875396253933621, 0.11156664554733399, 0.11156664554733399, 0.09149002162245, 0.09149002162245, 0.06904454273764123, 0.06904454273764123, 0.0448142267656996, 0.0448142267656996, 0.019461788229726478, 0.019461788229726478], [0.15275338713072584, 0.15275338713072584, 0.14917298647260374, 0.14917298647260374, 0.14209610931838204, 0.14209610931838204, 0.13168863844917664, 0.13168863844917664, 0.11819453196151841, 0.11819453196151841, 0.10193011981724044, 0.10193011981724044, 0.08327674157670475, 0.08327674157670475, 0.06267204833410907, 0.06267204833410907, 0.04060142980038694, 0.04060142980038694, 0.017614007139152118, 0.017614007139152118], [0.14608113364969041, 0.14452440398997005, 0.14452440398997005, 0.13988739479107315, 0.13988739479107315, 0.13226893863333747, 0.13226893863333747, 0.12183141605372853, 0.12183141605372853, 0.10879729916714838, 0.10879729916714838, 0.09344442345603386, 0.09344442345603386, 0.0761001136283793, 0.0761001136283793, 0.057134425426857205, 0.057134425426857205, 0.036953789770852494, 0.036953789770852494, 0.016017228257774335, 0.016017228257774335], [0.13925187285563198, 0.13925187285563198, 0.13654149834601517, 0.13654149834601517, 0.13117350478706238, 0.13117350478706238, 0.12325237681051242, 0.12325237681051242, 0.11293229608053922, 0.11293229608053922, 0.10041414444288096, 0.10041414444288096, 0.08594160621706773, 0.08594160621706773, 0.06979646842452049, 0.06979646842452049, 0.052293335152683286, 0.052293335152683286, 0.03377490158481415, 0.03377490158481415, 0.0146279952982722, 0.0146279952982722], [0.13365457218610619, 0.1324620394046966, 0.1324620394046966, 0.12890572218808216, 0.12890572218808216, 0.12304908430672953, 0.12304908430672953, 0.11499664022241136, 0.11499664022241136, 0.10489209146454141, 0.10489209146454141, 0.09291576606003515, 0.09291576606003515, 0.07928141177671895, 0.07928141177671895, 0.06423242140852585, 0.06423242140852585, 0.04803767173108467, 0.04803767173108467, 0.030988005856979445, 0.030988005856979445, 0.013411859487141771, 0.013411859487141771], [0.12793819534675216, 0.12793819534675216, 0.1258374563468283, 0.1258374563468283, 0.12167047292780339, 0.12167047292780339, 0.1155056680537256, 0.1155056680537256, 0.10744427011596563, 0.10744427011596563, 0.09761865210411388, 0.09761865210411388, 0.08619016153195327, 0.08619016153195327, 0.0733464814110803, 0.0733464814110803, 0.05929858491543678, 0.05929858491543678, 0.04427743881741981, 0.04427743881741981, 0.028531388628933663, 0.028531388628933663, 0.0123412297999872, 0.0123412297999872]], ae = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]], he = _((n, e, t) => ({ x: (1 - t) * (1 - t) * (1 - t) * n[0] + 3 * (1 - t) * (1 - t) * t * n[1] + 3 * (1 - t) * t * t * n[2] + t * t * t * n[3], y: (1 - t) * (1 - t) * (1 - t) * e[0] + 3 * (1 - t) * (1 - t) * t * e[1] + 3 * (1 - t) * t * t * e[2] + t * t * t * e[3] }), "cubicPoint"), le = _((n, e, t) => kt([3 * (n[1] - n[0]), 3 * (n[2] - n[1]), 3 * (n[3] - n[2])], [3 * (e[1] - e[0]), 3 * (e[2] - e[1]), 3 * (e[3] - e[2])], t), "cubicDerivative"), ce = _((n, e, t) => {
|
|
519
519
|
let o, i;
|
|
520
520
|
const a = t / 2;
|
|
521
521
|
o = 0;
|
|
522
|
-
for (let s = 0; s < 20; s++) i = a *
|
|
522
|
+
for (let s = 0; s < 20; s++) i = a * oe[20][s] + a, o += se[20][s] * It(n, e, i);
|
|
523
523
|
return a * o;
|
|
524
|
-
}, "getCubicArcLength"), kt = _((n, e, t) => ({ x: (1 - t) * (1 - t) * n[0] + 2 * (1 - t) * t * n[1] + t * t * n[2], y: (1 - t) * (1 - t) * e[0] + 2 * (1 - t) * t * e[1] + t * t * e[2] }), "quadraticPoint"),
|
|
524
|
+
}, "getCubicArcLength"), kt = _((n, e, t) => ({ x: (1 - t) * (1 - t) * n[0] + 2 * (1 - t) * t * n[1] + t * t * n[2], y: (1 - t) * (1 - t) * e[0] + 2 * (1 - t) * t * e[1] + t * t * e[2] }), "quadraticPoint"), ue = _((n, e, t) => {
|
|
525
525
|
t === void 0 && (t = 1);
|
|
526
526
|
const o = n[0] - 2 * n[1] + n[2], i = e[0] - 2 * e[1] + e[2], a = 2 * n[1] - 2 * n[0], s = 2 * e[1] - 2 * e[0], r = 4 * (o * o + i * i), h = 4 * (o * a + i * s), c = a * a + s * s;
|
|
527
527
|
if (r === 0) return t * Math.sqrt(Math.pow(n[2] - n[0], 2) + Math.pow(e[2] - e[0], 2));
|
|
528
528
|
const f = h / (2 * r), d = t + f, l = c / r - f * f, u = d * d + l > 0 ? Math.sqrt(d * d + l) : 0, m = f * f + l > 0 ? Math.sqrt(f * f + l) : 0, y = f + Math.sqrt(f * f + l) !== 0 && (d + u) / (f + m) !== 0 ? l * Math.log(Math.abs((d + u) / (f + m))) : 0;
|
|
529
529
|
return Math.sqrt(r) / 2 * (d * u - f * m + y);
|
|
530
|
-
}, "getQuadraticArcLength"),
|
|
530
|
+
}, "getQuadraticArcLength"), fe = _((n, e, t) => ({ x: 2 * (1 - t) * (n[1] - n[0]) + 2 * t * (n[2] - n[1]), y: 2 * (1 - t) * (e[1] - e[0]) + 2 * t * (e[2] - e[1]) }), "quadraticDerivative");
|
|
531
531
|
function It(n, e, t) {
|
|
532
532
|
const o = G0(1, t, n), i = G0(1, t, e), a = o * o + i * i;
|
|
533
533
|
return Math.sqrt(a);
|
|
@@ -539,7 +539,7 @@ var G0 = _((n, e, t) => {
|
|
|
539
539
|
if (o === 0) return 0;
|
|
540
540
|
if (n === 0) {
|
|
541
541
|
a = 0;
|
|
542
|
-
for (let s = 0; s <= o; s++) a +=
|
|
542
|
+
for (let s = 0; s <= o; s++) a += ae[o][s] * Math.pow(1 - e, o - s) * Math.pow(e, s) * t[s];
|
|
543
543
|
return a;
|
|
544
544
|
}
|
|
545
545
|
i = new Array(o);
|
|
@@ -586,9 +586,9 @@ var G0 = _((n, e, t) => {
|
|
|
586
586
|
}, "getPropertiesAtLength"));
|
|
587
587
|
k(this, "getC", _(() => this.c, "getC"));
|
|
588
588
|
k(this, "getD", _(() => this.d, "getD"));
|
|
589
|
-
this.a = { x: e, y: t }, this.b = { x: o, y: i }, this.c = { x: a, y: s }, r !== void 0 && h !== void 0 ? (this.getArcLength =
|
|
589
|
+
this.a = { x: e, y: t }, this.b = { x: o, y: i }, this.c = { x: a, y: s }, r !== void 0 && h !== void 0 ? (this.getArcLength = ce, this.getPoint = he, this.getDerivative = le, this.d = { x: r, y: h }) : (this.getArcLength = ue, this.getPoint = kt, this.getDerivative = fe, this.d = { x: 0, y: 0 }), this.length = this.getArcLength([this.a.x, this.b.x, this.c.x, this.d.x], [this.a.y, this.b.y, this.c.y, this.d.y], 1);
|
|
590
590
|
}
|
|
591
|
-
}, _(A0, "Bezier"), A0), b0,
|
|
591
|
+
}, _(A0, "Bezier"), A0), b0, ge = (b0 = class {
|
|
592
592
|
constructor(e) {
|
|
593
593
|
k(this, "length", 0);
|
|
594
594
|
k(this, "partial_lengths", []);
|
|
@@ -703,10 +703,10 @@ var G0 = _((n, e, t) => {
|
|
|
703
703
|
k(this, "getTangentAtLength", _((e) => this.inst.getTangentAtLength(e), "getTangentAtLength"));
|
|
704
704
|
k(this, "getPropertiesAtLength", _((e) => this.inst.getPropertiesAtLength(e), "getPropertiesAtLength"));
|
|
705
705
|
k(this, "getParts", _(() => this.inst.getParts(), "getParts"));
|
|
706
|
-
if (this.inst = new
|
|
706
|
+
if (this.inst = new ge(e), !(this instanceof W0)) return new W0(e);
|
|
707
707
|
}
|
|
708
708
|
}, _(M0, "_svgPathProperties"), M0);
|
|
709
|
-
function
|
|
709
|
+
function pe(n = $.BLACK) {
|
|
710
710
|
return { ...n, alpha: 0 };
|
|
711
711
|
}
|
|
712
712
|
function Pn(n = null) {
|
|
@@ -716,7 +716,7 @@ function Pn(n = null) {
|
|
|
716
716
|
anchor: h0,
|
|
717
717
|
strokeColor: Q,
|
|
718
718
|
drawn: 1,
|
|
719
|
-
fillColor:
|
|
719
|
+
fillColor: pe(),
|
|
720
720
|
isRounded: !1,
|
|
721
721
|
height: t,
|
|
722
722
|
path: r,
|
|
@@ -773,11 +773,11 @@ function En(n = null) {
|
|
|
773
773
|
...n
|
|
774
774
|
});
|
|
775
775
|
}
|
|
776
|
-
const
|
|
776
|
+
const de = {
|
|
777
777
|
NORMAL: "normal",
|
|
778
778
|
ITALIC: "italic",
|
|
779
779
|
OBLIQUE: "oblique"
|
|
780
|
-
},
|
|
780
|
+
}, xe = de.NORMAL, ye = {
|
|
781
781
|
THIN: 100,
|
|
782
782
|
EXTRA_LIGHT: 200,
|
|
783
783
|
LIGHT: 300,
|
|
@@ -787,12 +787,12 @@ const d1 = {
|
|
|
787
787
|
BOLD: 700,
|
|
788
788
|
EXTRA_BOLD: 800,
|
|
789
789
|
BLACK: 900
|
|
790
|
-
},
|
|
790
|
+
}, ve = ye.NORMAL, we = {
|
|
791
791
|
color: Q,
|
|
792
792
|
fontFamily: "sans-serif",
|
|
793
793
|
fontSize: 100,
|
|
794
|
-
fontStyle:
|
|
795
|
-
fontWeight:
|
|
794
|
+
fontStyle: xe,
|
|
795
|
+
fontWeight: ve,
|
|
796
796
|
ligatures: !1,
|
|
797
797
|
subscript: !1,
|
|
798
798
|
superscript: !1
|
|
@@ -800,13 +800,13 @@ const d1 = {
|
|
|
800
800
|
function _t(n) {
|
|
801
801
|
return typeof n == "string" ? [[{ text: n }]] : n.map((e) => e.map((t) => typeof t == "string" ? { text: t } : t));
|
|
802
802
|
}
|
|
803
|
-
function
|
|
803
|
+
function me(n) {
|
|
804
804
|
return _t(n).reduce(
|
|
805
805
|
(t, o) => t + o.reduce((i, a) => i + a.text.length, 0),
|
|
806
806
|
0
|
|
807
807
|
);
|
|
808
808
|
}
|
|
809
|
-
function
|
|
809
|
+
function Ae(n = "", e = null) {
|
|
810
810
|
return l0({
|
|
811
811
|
objectType: U.TEXT,
|
|
812
812
|
alignment: Wt,
|
|
@@ -816,19 +816,19 @@ function A1(n = "", e = null) {
|
|
|
816
816
|
text: n,
|
|
817
817
|
x: 0,
|
|
818
818
|
y: 0,
|
|
819
|
-
...
|
|
819
|
+
...we,
|
|
820
820
|
...e
|
|
821
821
|
});
|
|
822
822
|
}
|
|
823
|
-
|
|
823
|
+
Ae.writeOn = (n, e = {}) => et(
|
|
824
824
|
n,
|
|
825
825
|
{
|
|
826
|
-
length:
|
|
826
|
+
length: me(n.text)
|
|
827
827
|
},
|
|
828
828
|
e
|
|
829
829
|
);
|
|
830
830
|
let Z = null;
|
|
831
|
-
function
|
|
831
|
+
function be({ presentation: n, onNavigateToSlide: e }) {
|
|
832
832
|
if (Z !== null && !Z.closed) {
|
|
833
833
|
Z.focus();
|
|
834
834
|
return;
|
|
@@ -837,21 +837,21 @@ function b1({ presentation: n, onNavigateToSlide: e }) {
|
|
|
837
837
|
console.error("Failed to open navigator window.");
|
|
838
838
|
return;
|
|
839
839
|
}
|
|
840
|
-
const t =
|
|
840
|
+
const t = Me(n, e);
|
|
841
841
|
Z.document.title = n.title, Z.document.body.appendChild(t), Z.addEventListener("keyup", (o) => {
|
|
842
842
|
(o.key === "Escape" || o.key === "`") && (Z == null || Z.close(), Z = null);
|
|
843
843
|
});
|
|
844
844
|
}
|
|
845
|
-
function
|
|
845
|
+
function Me(n, e) {
|
|
846
846
|
const t = document.createElement("div");
|
|
847
847
|
return t.style.fontFamily = "Arial, sans-serif", n.slides.forEach((o, i) => {
|
|
848
|
-
const a =
|
|
848
|
+
const a = Le(o, i);
|
|
849
849
|
a.style.cursor = "pointer", a.addEventListener("click", (s) => {
|
|
850
850
|
s.shiftKey && (Z == null || Z.close()), e(i);
|
|
851
851
|
}), t.appendChild(a);
|
|
852
852
|
}), t;
|
|
853
853
|
}
|
|
854
|
-
function
|
|
854
|
+
function Le(n, e) {
|
|
855
855
|
const t = document.createElement("div");
|
|
856
856
|
return t.style.marginBottom = "8px", t.style.padding = "8px", t.style.backgroundColor = "#eceed7", t.style.borderRadius = "4px", t.style.userSelect = "none", t.innerHTML = `${e + 1}: ` + (n.title.length > 0 ? n.title : `Slide ${e + 1}`), t;
|
|
857
857
|
}
|
|
@@ -862,8 +862,8 @@ function a0(n = null) {
|
|
|
862
862
|
...n
|
|
863
863
|
};
|
|
864
864
|
}
|
|
865
|
-
const
|
|
866
|
-
function
|
|
865
|
+
const Te = a0({ width: 0, height: 0 });
|
|
866
|
+
function Pe(n = null) {
|
|
867
867
|
return {
|
|
868
868
|
backgroundColor: $.WHITE,
|
|
869
869
|
slides: [],
|
|
@@ -875,7 +875,7 @@ function P1(n = null) {
|
|
|
875
875
|
...n
|
|
876
876
|
};
|
|
877
877
|
}
|
|
878
|
-
function
|
|
878
|
+
function Ce(n) {
|
|
879
879
|
const e = Array.isArray(n) ? n : [n];
|
|
880
880
|
let t = 0, o = 0;
|
|
881
881
|
for (const i of e)
|
|
@@ -897,13 +897,13 @@ function nt(n, e = null) {
|
|
|
897
897
|
const { red: t, green: o, blue: i } = n, a = Et(n, e);
|
|
898
898
|
return `rgba(${t}, ${o}, ${i}, ${a})`;
|
|
899
899
|
}
|
|
900
|
-
function
|
|
900
|
+
function Se(n) {
|
|
901
901
|
return n === document.body;
|
|
902
902
|
}
|
|
903
|
-
function
|
|
903
|
+
function Ee(n, e) {
|
|
904
904
|
const t = document.createElement("div");
|
|
905
|
-
if (t.style.width = "100%", t.style.aspectRatio = `${n.size.width} / ${n.size.height}`, t.style.position = "relative",
|
|
906
|
-
t.style.overflowY = "clip", document.title = n.title, document.documentElement.style.height = "100%", document.body.style.margin = "0", document.body.style.height = "100%", document.body.style.width = "100%", document.body.style.backgroundColor = "#000000";
|
|
905
|
+
if (t.style.width = "100%", t.style.aspectRatio = `${n.size.width} / ${n.size.height}`, t.style.position = "relative", Se(e)) {
|
|
906
|
+
t.style.top = "50%", t.style.transform = "translateY(-50%)", t.style.marginLeft = "auto", t.style.marginRight = "auto", t.style.overflowY = "clip", document.title = n.title, document.documentElement.style.height = "100%", document.body.style.margin = "0", document.body.style.height = "100%", document.body.style.width = "100%", document.body.style.backgroundColor = "#000000";
|
|
907
907
|
const o = n.size.height / n.size.width;
|
|
908
908
|
ut(t, o), window.matchMedia(`(min-aspect-ratio: ${n.size.width} / ${n.size.height})`).addEventListener("change", () => ut(t, o));
|
|
909
909
|
}
|
|
@@ -912,7 +912,7 @@ function E1(n, e) {
|
|
|
912
912
|
function ut(n, e) {
|
|
913
913
|
window.innerHeight / window.innerWidth > e ? (n.style.width = "100%", n.style.height = "auto") : (n.style.width = "auto", n.style.height = "100%");
|
|
914
914
|
}
|
|
915
|
-
const
|
|
915
|
+
const ke = {
|
|
916
916
|
check: (n) => typeof n == "object" && n !== null && typeof n.red == "number" && typeof n.green == "number" && typeof n.blue == "number" && typeof n.alpha == "number",
|
|
917
917
|
interpolate: (n, e, t) => ({
|
|
918
918
|
red: Math.round(n.red + (e.red - n.red) * t),
|
|
@@ -920,18 +920,18 @@ const k1 = {
|
|
|
920
920
|
blue: Math.round(n.blue + (e.blue - n.blue) * t),
|
|
921
921
|
alpha: n.alpha + (e.alpha - n.alpha) * t
|
|
922
922
|
})
|
|
923
|
-
},
|
|
923
|
+
}, Ie = {
|
|
924
924
|
check: (n) => !0,
|
|
925
925
|
interpolate: (n, e) => e
|
|
926
|
-
},
|
|
926
|
+
}, _e = {
|
|
927
927
|
check: (n) => typeof n == "number",
|
|
928
928
|
interpolate: (n, e, t) => n + (e - n) * t
|
|
929
929
|
}, ft = [
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
930
|
+
_e,
|
|
931
|
+
ke,
|
|
932
|
+
Ie
|
|
933
933
|
];
|
|
934
|
-
function
|
|
934
|
+
function Oe(n, e, t, o = null) {
|
|
935
935
|
if (t === 0)
|
|
936
936
|
return n;
|
|
937
937
|
if (t === 1)
|
|
@@ -973,7 +973,7 @@ function gt(n, e, t = null) {
|
|
|
973
973
|
);
|
|
974
974
|
n.set(a.object, {
|
|
975
975
|
...s,
|
|
976
|
-
...
|
|
976
|
+
...Oe(
|
|
977
977
|
s,
|
|
978
978
|
a.props,
|
|
979
979
|
a.easing(h),
|
|
@@ -1003,7 +1003,7 @@ function gt(n, e, t = null) {
|
|
|
1003
1003
|
function Ot(n) {
|
|
1004
1004
|
return "objects" in n ? n.objects.filter((e) => "objectType" in e) : [];
|
|
1005
1005
|
}
|
|
1006
|
-
function
|
|
1006
|
+
function Fe({
|
|
1007
1007
|
slide: n,
|
|
1008
1008
|
buildIndex: e,
|
|
1009
1009
|
buildTime: t
|
|
@@ -1027,7 +1027,7 @@ function F1({
|
|
|
1027
1027
|
}
|
|
1028
1028
|
return o;
|
|
1029
1029
|
}
|
|
1030
|
-
function
|
|
1030
|
+
function Re(n) {
|
|
1031
1031
|
const e = {};
|
|
1032
1032
|
function t(o) {
|
|
1033
1033
|
if (o.objectType === U.SVG) {
|
|
@@ -1043,7 +1043,7 @@ function R1(n) {
|
|
|
1043
1043
|
t(i);
|
|
1044
1044
|
return e;
|
|
1045
1045
|
}
|
|
1046
|
-
function
|
|
1046
|
+
function Ne(n) {
|
|
1047
1047
|
var o;
|
|
1048
1048
|
const { slides: e } = n, t = {
|
|
1049
1049
|
// First build of first slide
|
|
@@ -1082,8 +1082,8 @@ function N0(n, e, t, o) {
|
|
|
1082
1082
|
else
|
|
1083
1083
|
n[e] = { slideIndex: t, buildIndex: o };
|
|
1084
1084
|
}
|
|
1085
|
-
function
|
|
1086
|
-
t.shortcuts =
|
|
1085
|
+
function Be(n, e, t, { onNext: o, onPrevious: i, onRenderSlide: a, onShowNavigator: s }) {
|
|
1086
|
+
t.shortcuts = Ne(n), e.addEventListener("mousemove", () => {
|
|
1087
1087
|
e.style.cursor = "auto";
|
|
1088
1088
|
}), e.addEventListener("keyup", (r) => {
|
|
1089
1089
|
if (r.code === "Escape") {
|
|
@@ -1119,7 +1119,7 @@ function B1(n, e, t, { onNext: o, onPrevious: i, onRenderSlide: a, onShowNavigat
|
|
|
1119
1119
|
});
|
|
1120
1120
|
}
|
|
1121
1121
|
const d0 = "presenterState";
|
|
1122
|
-
function
|
|
1122
|
+
function qe(n, e) {
|
|
1123
1123
|
const t = localStorage.getItem(d0);
|
|
1124
1124
|
if (t === null)
|
|
1125
1125
|
return null;
|
|
@@ -1143,7 +1143,7 @@ function q1(n, e) {
|
|
|
1143
1143
|
buildIndex: r
|
|
1144
1144
|
});
|
|
1145
1145
|
}
|
|
1146
|
-
function
|
|
1146
|
+
function De({ title: n, slideIndex: e, buildIndex: t }) {
|
|
1147
1147
|
localStorage.setItem(
|
|
1148
1148
|
d0,
|
|
1149
1149
|
JSON.stringify({ title: n, slideIndex: e, buildIndex: t, timestamp: Date.now() })
|
|
@@ -1166,10 +1166,10 @@ const pt = Object.freeze({
|
|
|
1166
1166
|
Browser: "browser",
|
|
1167
1167
|
Node: "node"
|
|
1168
1168
|
};
|
|
1169
|
-
function
|
|
1169
|
+
function je(n, e) {
|
|
1170
1170
|
e.context.clearRect(0, 0, n.width, n.height);
|
|
1171
1171
|
}
|
|
1172
|
-
function
|
|
1172
|
+
function ze(n) {
|
|
1173
1173
|
const e = document.createElement("canvas");
|
|
1174
1174
|
return e.setAttribute("width", n.width.toString()), e.setAttribute("height", n.height.toString()), e.style.position = "absolute", e.style.width = "100%", e;
|
|
1175
1175
|
}
|
|
@@ -1177,14 +1177,14 @@ const g0 = {
|
|
|
1177
1177
|
Browser: "browser",
|
|
1178
1178
|
Node: "node"
|
|
1179
1179
|
};
|
|
1180
|
-
function
|
|
1180
|
+
function Ue(n) {
|
|
1181
1181
|
const e = new Path2D(n);
|
|
1182
1182
|
return {
|
|
1183
1183
|
type: g0.Browser,
|
|
1184
1184
|
path: e
|
|
1185
1185
|
};
|
|
1186
1186
|
}
|
|
1187
|
-
function
|
|
1187
|
+
function Ye(n) {
|
|
1188
1188
|
const { drawn: e, startX: t, startY: o, endX: i, endY: a, arrowheadSize: s, isArrowheadFilled: r, isDrawnFromCenter: h } = n, c = { x: t, y: o }, f = { x: i, y: a }, d = Math.atan2(f.y - c.y, f.x - c.x), l = { x: c.x + (f.x - c.x) / 2, y: c.y + (f.y - c.y) / 2 }, u = f.x - c.x, m = f.y - c.y, M = Math.hypot(u, m) * e, T = Math.cos(d), S = Math.sin(d), P = h ? { x: l.x - T * M / 2, y: l.y - S * M / 2 } : c, E = h ? { x: l.x + T * M / 2, y: l.y + S * M / 2 } : { x: c.x + T * M, y: c.y + S * M }, C = r ? Math.PI / 6 : Math.PI / 4.5, O = M < s * 2 ? M / 2 : s, R = {
|
|
1189
1189
|
x: E.x - O * Math.cos(d - C),
|
|
1190
1190
|
y: E.y - O * Math.sin(d - C)
|
|
@@ -1273,7 +1273,7 @@ function B0(n, e) {
|
|
|
1273
1273
|
}
|
|
1274
1274
|
return { path: t, length: i };
|
|
1275
1275
|
}
|
|
1276
|
-
const
|
|
1276
|
+
const He = ({
|
|
1277
1277
|
ctx: n,
|
|
1278
1278
|
object: e,
|
|
1279
1279
|
opacity: t,
|
|
@@ -1282,7 +1282,7 @@ const H1 = ({
|
|
|
1282
1282
|
const i = e.opacity * t;
|
|
1283
1283
|
if (i === 0 || e.drawn === 0)
|
|
1284
1284
|
return;
|
|
1285
|
-
const { arrowPoints: a, arrowheadPoints: s, doubledArrowheadPoints: r } =
|
|
1285
|
+
const { arrowPoints: a, arrowheadPoints: s, doubledArrowheadPoints: r } = Ye(e), { path: h } = B0(a, o), { path: c } = B0(s, o);
|
|
1286
1286
|
if (y0({
|
|
1287
1287
|
color: e.color,
|
|
1288
1288
|
ctx: n,
|
|
@@ -1319,14 +1319,14 @@ const H1 = ({
|
|
|
1319
1319
|
});
|
|
1320
1320
|
}
|
|
1321
1321
|
};
|
|
1322
|
-
function
|
|
1322
|
+
function Xe(n, e) {
|
|
1323
1323
|
const t = n.radius - n.strokeWidth / 2;
|
|
1324
1324
|
if (t <= 0)
|
|
1325
1325
|
return;
|
|
1326
1326
|
const o = e(), i = -Math.PI / 2;
|
|
1327
1327
|
return o.path.arc(n.x, n.y, t, i, i + 2 * Math.PI), o;
|
|
1328
1328
|
}
|
|
1329
|
-
function $
|
|
1329
|
+
function $e(n, e) {
|
|
1330
1330
|
const t = e(), o = -Math.PI / 2;
|
|
1331
1331
|
t.path.arc(n.x, n.y, n.radius, o, o + 2 * Math.PI);
|
|
1332
1332
|
const i = 2 * Math.PI * n.radius;
|
|
@@ -1344,7 +1344,7 @@ function Ft(n, e) {
|
|
|
1344
1344
|
s0(n);
|
|
1345
1345
|
}
|
|
1346
1346
|
}
|
|
1347
|
-
const
|
|
1347
|
+
const Ge = ({
|
|
1348
1348
|
ctx: n,
|
|
1349
1349
|
object: e,
|
|
1350
1350
|
opacity: t,
|
|
@@ -1353,9 +1353,9 @@ const G1 = ({
|
|
|
1353
1353
|
const i = e.opacity * t;
|
|
1354
1354
|
if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
|
|
1355
1355
|
return;
|
|
1356
|
-
const { path: a, length: s } = $
|
|
1356
|
+
const { path: a, length: s } = $e(e, o);
|
|
1357
1357
|
if (i < 1 && e.strokeWidth > 0) {
|
|
1358
|
-
const r =
|
|
1358
|
+
const r = Xe(e, o);
|
|
1359
1359
|
r !== void 0 && (n.context.save(), Ft(n, r), v0({ ctx: n, path: a, color: e.fillColor, opacity: i }), n.context.restore());
|
|
1360
1360
|
} else
|
|
1361
1361
|
v0({ ctx: n, path: a, color: e.fillColor, opacity: i });
|
|
@@ -1376,11 +1376,11 @@ function X(n = null) {
|
|
|
1376
1376
|
...n
|
|
1377
1377
|
};
|
|
1378
1378
|
}
|
|
1379
|
-
const
|
|
1379
|
+
const We = X();
|
|
1380
1380
|
function u0(n = null) {
|
|
1381
1381
|
return {
|
|
1382
|
-
origin:
|
|
1383
|
-
size:
|
|
1382
|
+
origin: We,
|
|
1383
|
+
size: Te,
|
|
1384
1384
|
...n
|
|
1385
1385
|
};
|
|
1386
1386
|
}
|
|
@@ -1437,7 +1437,7 @@ function p0(n, e, t) {
|
|
|
1437
1437
|
s0(e);
|
|
1438
1438
|
}
|
|
1439
1439
|
}
|
|
1440
|
-
const
|
|
1440
|
+
const Ze = ({
|
|
1441
1441
|
ctx: n,
|
|
1442
1442
|
object: e,
|
|
1443
1443
|
renderObject: t,
|
|
@@ -1492,7 +1492,7 @@ function rt(n, e, t, o, i = 0) {
|
|
|
1492
1492
|
const E0 = {
|
|
1493
1493
|
Browser: "browser",
|
|
1494
1494
|
Node: "node"
|
|
1495
|
-
},
|
|
1495
|
+
}, Ve = ({
|
|
1496
1496
|
ctx: n,
|
|
1497
1497
|
imageById: e,
|
|
1498
1498
|
object: t,
|
|
@@ -1548,13 +1548,13 @@ const E0 = {
|
|
|
1548
1548
|
n.context.restore();
|
|
1549
1549
|
}
|
|
1550
1550
|
};
|
|
1551
|
-
function
|
|
1551
|
+
function Ke(n, e) {
|
|
1552
1552
|
const t = e();
|
|
1553
1553
|
t.path.moveTo(n.startX, n.startY), t.path.lineTo(n.endX, n.endY);
|
|
1554
1554
|
const o = Math.hypot(n.endX - n.startX, n.endY - n.startY);
|
|
1555
1555
|
return { path: t, length: o };
|
|
1556
1556
|
}
|
|
1557
|
-
const
|
|
1557
|
+
const Qe = ({
|
|
1558
1558
|
ctx: n,
|
|
1559
1559
|
object: e,
|
|
1560
1560
|
opacity: t,
|
|
@@ -1563,7 +1563,7 @@ const Q1 = ({
|
|
|
1563
1563
|
const i = e.opacity * t;
|
|
1564
1564
|
if (i === 0 || e.drawn === 0)
|
|
1565
1565
|
return;
|
|
1566
|
-
const { path: a, length: s } =
|
|
1566
|
+
const { path: a, length: s } = Ke(e, o);
|
|
1567
1567
|
y0({
|
|
1568
1568
|
color: e.color,
|
|
1569
1569
|
ctx: n,
|
|
@@ -1575,7 +1575,7 @@ const Q1 = ({
|
|
|
1575
1575
|
opacity: i,
|
|
1576
1576
|
width: e.width
|
|
1577
1577
|
});
|
|
1578
|
-
},
|
|
1578
|
+
}, Je = ({
|
|
1579
1579
|
ctx: n,
|
|
1580
1580
|
object: e,
|
|
1581
1581
|
opacity: t,
|
|
@@ -1591,7 +1591,7 @@ const Q1 = ({
|
|
|
1591
1591
|
for (const a of e.objects)
|
|
1592
1592
|
o(a, t * e.opacity);
|
|
1593
1593
|
n.context.restore();
|
|
1594
|
-
},
|
|
1594
|
+
}, t1 = ({
|
|
1595
1595
|
ctx: n,
|
|
1596
1596
|
object: e,
|
|
1597
1597
|
opacity: t,
|
|
@@ -1621,7 +1621,7 @@ const Q1 = ({
|
|
|
1621
1621
|
width: e.strokeWidth
|
|
1622
1622
|
}), n.context.restore();
|
|
1623
1623
|
};
|
|
1624
|
-
function
|
|
1624
|
+
function e1(n, e) {
|
|
1625
1625
|
const t = e(), o = n.points, i = o[0];
|
|
1626
1626
|
if (i === void 0)
|
|
1627
1627
|
return { path: t, length: 0 };
|
|
@@ -1642,7 +1642,7 @@ function ee(n, e) {
|
|
|
1642
1642
|
);
|
|
1643
1643
|
return a += r, { path: t, length: a };
|
|
1644
1644
|
}
|
|
1645
|
-
const
|
|
1645
|
+
const n1 = ({
|
|
1646
1646
|
ctx: n,
|
|
1647
1647
|
object: e,
|
|
1648
1648
|
opacity: t,
|
|
@@ -1651,7 +1651,7 @@ const ne = ({
|
|
|
1651
1651
|
const i = e.opacity * t;
|
|
1652
1652
|
if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
|
|
1653
1653
|
return;
|
|
1654
|
-
const { path: a, length: s } =
|
|
1654
|
+
const { path: a, length: s } = e1(e, o);
|
|
1655
1655
|
v0({
|
|
1656
1656
|
ctx: n,
|
|
1657
1657
|
path: a,
|
|
@@ -1667,7 +1667,7 @@ const ne = ({
|
|
|
1667
1667
|
width: e.strokeWidth
|
|
1668
1668
|
});
|
|
1669
1669
|
};
|
|
1670
|
-
function
|
|
1670
|
+
function r1(n, e) {
|
|
1671
1671
|
const t = n.strokeWidth / 2, { origin: o, size: i } = p0(
|
|
1672
1672
|
X({ x: n.x, y: n.y }),
|
|
1673
1673
|
n.anchor,
|
|
@@ -1684,7 +1684,7 @@ function re(n, e) {
|
|
|
1684
1684
|
const f = e();
|
|
1685
1685
|
return f.path.moveTo(r.x, r.y), f.path.lineTo(r.x + a, r.y), f.path.lineTo(r.x + a, r.y + s), f.path.lineTo(r.x, r.y + s), f.path.closePath(), f;
|
|
1686
1686
|
}
|
|
1687
|
-
function
|
|
1687
|
+
function i1(n, e) {
|
|
1688
1688
|
const { origin: t, size: o } = p0(
|
|
1689
1689
|
X({ x: n.x, y: n.y }),
|
|
1690
1690
|
n.anchor,
|
|
@@ -1702,7 +1702,7 @@ function ie(n, e) {
|
|
|
1702
1702
|
return { path: s, length: r };
|
|
1703
1703
|
}
|
|
1704
1704
|
}
|
|
1705
|
-
const
|
|
1705
|
+
const o1 = ({
|
|
1706
1706
|
ctx: n,
|
|
1707
1707
|
object: e,
|
|
1708
1708
|
opacity: t,
|
|
@@ -1711,9 +1711,9 @@ const oe = ({
|
|
|
1711
1711
|
const i = e.opacity * t;
|
|
1712
1712
|
if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
|
|
1713
1713
|
return;
|
|
1714
|
-
const { path: a, length: s } =
|
|
1714
|
+
const { path: a, length: s } = i1(e, o);
|
|
1715
1715
|
if (i < 1 && e.strokeWidth > 0) {
|
|
1716
|
-
const r =
|
|
1716
|
+
const r = r1(e, o);
|
|
1717
1717
|
r !== void 0 && (n.context.save(), Ft(n, r), v0({ ctx: n, path: a, color: e.fillColor, opacity: i }), n.context.restore());
|
|
1718
1718
|
} else
|
|
1719
1719
|
v0({ ctx: n, path: a, color: e.fillColor, opacity: i });
|
|
@@ -1726,7 +1726,7 @@ const oe = ({
|
|
|
1726
1726
|
opacity: i,
|
|
1727
1727
|
width: e.strokeWidth
|
|
1728
1728
|
});
|
|
1729
|
-
},
|
|
1729
|
+
}, s1 = ({
|
|
1730
1730
|
ctx: n,
|
|
1731
1731
|
imageById: e,
|
|
1732
1732
|
object: t,
|
|
@@ -1767,7 +1767,7 @@ const oe = ({
|
|
|
1767
1767
|
}
|
|
1768
1768
|
n.context.restore();
|
|
1769
1769
|
};
|
|
1770
|
-
function
|
|
1770
|
+
function a1(n) {
|
|
1771
1771
|
return {
|
|
1772
1772
|
color: n.color,
|
|
1773
1773
|
fontFamily: n.fontFamily,
|
|
@@ -1779,7 +1779,7 @@ function ae(n) {
|
|
|
1779
1779
|
superscript: n.superscript
|
|
1780
1780
|
};
|
|
1781
1781
|
}
|
|
1782
|
-
function
|
|
1782
|
+
function h1(n, e = 1) {
|
|
1783
1783
|
const t = Math.max(...n.map((a) => a.reduce((s, r) => s + r.width, 0)));
|
|
1784
1784
|
let o = 0, i = 0;
|
|
1785
1785
|
for (let a = 0; a < n.length; a++) {
|
|
@@ -1794,7 +1794,7 @@ function he(n, e = 1) {
|
|
|
1794
1794
|
width: t
|
|
1795
1795
|
};
|
|
1796
1796
|
}
|
|
1797
|
-
const
|
|
1797
|
+
const l1 = 0.7, c1 = 0.3;
|
|
1798
1798
|
function Rt(n) {
|
|
1799
1799
|
const e = n.superscript, t = n.subscript && !e;
|
|
1800
1800
|
return !e && !t ? {
|
|
@@ -1803,13 +1803,13 @@ function Rt(n) {
|
|
|
1803
1803
|
isSubscript: !1,
|
|
1804
1804
|
isSuperscript: !1
|
|
1805
1805
|
} : {
|
|
1806
|
-
baselineShift: n.fontSize *
|
|
1807
|
-
fontSize: n.fontSize *
|
|
1806
|
+
baselineShift: n.fontSize * c1 * (e ? -1 : 1),
|
|
1807
|
+
fontSize: n.fontSize * l1,
|
|
1808
1808
|
isSubscript: t,
|
|
1809
1809
|
isSuperscript: e
|
|
1810
1810
|
};
|
|
1811
1811
|
}
|
|
1812
|
-
function
|
|
1812
|
+
function u1(n) {
|
|
1813
1813
|
return {
|
|
1814
1814
|
width: n.width,
|
|
1815
1815
|
height: n.fontBoundingBoxAscent
|
|
@@ -1819,14 +1819,14 @@ function Nt(n, e, t = 1) {
|
|
|
1819
1819
|
const o = Rt(e);
|
|
1820
1820
|
n.context.fillStyle = nt(e.color, t), n.context.font = `${e.fontStyle} ${e.fontWeight} ${o.fontSize}px ${e.fontFamily}`, n.type === V.Browser ? n.context.textRendering = e.ligatures ? "optimizeLegibility" : "optimizeSpeed" : n.context.fontVariant = e.ligatures ? "common-ligatures" : "no-common-ligatures";
|
|
1821
1821
|
}
|
|
1822
|
-
function
|
|
1822
|
+
function f1(n, e, t) {
|
|
1823
1823
|
const o = [];
|
|
1824
1824
|
for (const i of n) {
|
|
1825
1825
|
const a = [];
|
|
1826
1826
|
for (const s of i) {
|
|
1827
1827
|
const { text: r, ...h } = s, c = { ...e, ...h };
|
|
1828
1828
|
Nt(t, c);
|
|
1829
|
-
const f = t.context.measureText(r), d =
|
|
1829
|
+
const f = t.context.measureText(r), d = u1(f), { baselineShift: l } = Rt(c), u = d.height + Math.max(0, -l), m = Math.max(0, l);
|
|
1830
1830
|
a.push({
|
|
1831
1831
|
...d,
|
|
1832
1832
|
baselineShift: l,
|
|
@@ -1839,11 +1839,11 @@ function fe(n, e, t) {
|
|
|
1839
1839
|
}
|
|
1840
1840
|
return o;
|
|
1841
1841
|
}
|
|
1842
|
-
const
|
|
1842
|
+
const g1 = ({ ctx: n, object: e, opacity: t }) => {
|
|
1843
1843
|
const o = e.opacity * t;
|
|
1844
1844
|
if (o === 0)
|
|
1845
1845
|
return;
|
|
1846
|
-
const { length: i } = e, a = _t(e.text), s =
|
|
1846
|
+
const { length: i } = e, a = _t(e.text), s = a1(e), r = f1(a, s, n), h = h1(r, e.lineSpacing), c = p0(X({ x: e.x, y: e.y }), e.anchor, h);
|
|
1847
1847
|
let f = c.origin.x, d = c.origin.y, l = 0, u = 0;
|
|
1848
1848
|
for (let m = 0; m < a.length; m++) {
|
|
1849
1849
|
const y = a[m], M = r[m];
|
|
@@ -1888,26 +1888,26 @@ const ge = ({ ctx: n, object: e, opacity: t }) => {
|
|
|
1888
1888
|
}
|
|
1889
1889
|
d += E;
|
|
1890
1890
|
}
|
|
1891
|
-
},
|
|
1892
|
-
[U.ARROW]:
|
|
1893
|
-
[U.CIRCLE]:
|
|
1894
|
-
[U.GROUP]:
|
|
1895
|
-
[U.IMAGE]:
|
|
1896
|
-
[U.LINE]:
|
|
1897
|
-
[U.MASK]:
|
|
1898
|
-
[U.PATH]:
|
|
1899
|
-
[U.POLYGON]:
|
|
1900
|
-
[U.RECTANGLE]:
|
|
1891
|
+
}, p1 = {
|
|
1892
|
+
[U.ARROW]: He,
|
|
1893
|
+
[U.CIRCLE]: Ge,
|
|
1894
|
+
[U.GROUP]: Ze,
|
|
1895
|
+
[U.IMAGE]: Ve,
|
|
1896
|
+
[U.LINE]: Qe,
|
|
1897
|
+
[U.MASK]: Je,
|
|
1898
|
+
[U.PATH]: t1,
|
|
1899
|
+
[U.POLYGON]: n1,
|
|
1900
|
+
[U.RECTANGLE]: o1,
|
|
1901
1901
|
[U.SLIDE_OBJECT]: () => {
|
|
1902
1902
|
},
|
|
1903
|
-
[U.SVG]:
|
|
1904
|
-
[U.TEXT]:
|
|
1903
|
+
[U.SVG]: s1,
|
|
1904
|
+
[U.TEXT]: g1
|
|
1905
1905
|
};
|
|
1906
|
-
function
|
|
1906
|
+
function d1(n) {
|
|
1907
1907
|
const e = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
1908
1908
|
return e.setAttribute("viewBox", `0 0 ${n.width} ${n.height}`), e.style.backgroundColor = "transparent", e.style.position = "absolute", e.style.width = "100%", e;
|
|
1909
1909
|
}
|
|
1910
|
-
function
|
|
1910
|
+
function x1(n, e) {
|
|
1911
1911
|
if (n === null)
|
|
1912
1912
|
return null;
|
|
1913
1913
|
const t = p0(
|
|
@@ -1927,7 +1927,7 @@ function xe(n, e) {
|
|
|
1927
1927
|
a !== null && a(), n.removeChild(o);
|
|
1928
1928
|
};
|
|
1929
1929
|
}
|
|
1930
|
-
async function
|
|
1930
|
+
async function y1(n) {
|
|
1931
1931
|
if (Object.keys(n).length === 0)
|
|
1932
1932
|
return {};
|
|
1933
1933
|
const e = {}, t = (i) => new Promise((a, s) => {
|
|
@@ -1955,31 +1955,31 @@ class kn {
|
|
|
1955
1955
|
constructor(e) {
|
|
1956
1956
|
const { objectRenderers: t, scale: o = 1, ...i } = e;
|
|
1957
1957
|
this.props = {
|
|
1958
|
-
presentation:
|
|
1958
|
+
presentation: Pe(),
|
|
1959
1959
|
element: document.body,
|
|
1960
1960
|
objectRenderers: {
|
|
1961
|
-
...
|
|
1961
|
+
...p1,
|
|
1962
1962
|
...t
|
|
1963
1963
|
},
|
|
1964
1964
|
cacheDurationMinutes: 15,
|
|
1965
|
-
scale:
|
|
1965
|
+
scale: v1(o),
|
|
1966
1966
|
...i
|
|
1967
1967
|
}, this.state = { ...pt };
|
|
1968
1968
|
}
|
|
1969
1969
|
/** Starts the presentation. */
|
|
1970
1970
|
async present() {
|
|
1971
|
-
const { presentation: e, element: t, scale: o } = this.props, i =
|
|
1971
|
+
const { presentation: e, element: t, scale: o } = this.props, i = ze(e.size), a = d1(e.size);
|
|
1972
1972
|
a.style.transformOrigin = "center center", a.style.transform = `scale(${o})`, this.state = {
|
|
1973
1973
|
...pt,
|
|
1974
|
-
imageById: await
|
|
1974
|
+
imageById: await y1({
|
|
1975
1975
|
...e.resources.images,
|
|
1976
|
-
...
|
|
1976
|
+
...Re(e)
|
|
1977
1977
|
}),
|
|
1978
1978
|
canvas: i,
|
|
1979
1979
|
extrasContainer: a
|
|
1980
1980
|
};
|
|
1981
|
-
const s =
|
|
1982
|
-
|
|
1981
|
+
const s = Ee(e, t);
|
|
1982
|
+
Be(e, t, this.state.shortcutState, {
|
|
1983
1983
|
onNext: (h) => this.next(h),
|
|
1984
1984
|
onPrevious: (h) => this.previous(h),
|
|
1985
1985
|
onRenderSlide: (h, c) => {
|
|
@@ -1988,17 +1988,17 @@ class kn {
|
|
|
1988
1988
|
buildIndex: this.state.buildIndex
|
|
1989
1989
|
}, this.renderSlide(h ?? this.state.slideIndex, c);
|
|
1990
1990
|
},
|
|
1991
|
-
onShowNavigator: () =>
|
|
1991
|
+
onShowNavigator: () => be({
|
|
1992
1992
|
presentation: e,
|
|
1993
1993
|
onNavigateToSlide: (h) => this.renderSlide(h)
|
|
1994
1994
|
})
|
|
1995
1995
|
}), t.replaceChildren(), s.appendChild(i), s.appendChild(a), t.appendChild(s);
|
|
1996
|
-
const r =
|
|
1996
|
+
const r = qe(e, this.props.cacheDurationMinutes);
|
|
1997
1997
|
r !== null ? this.renderSlide(r.slideIndex, r.buildIndex) : this.renderSlide(0);
|
|
1998
1998
|
}
|
|
1999
1999
|
renderSlide(e, t = 0, o = null) {
|
|
2000
2000
|
const { objectRenderers: i, presentation: a, scale: s } = this.props, { canvas: r, imageById: h } = this.state, c = this.state.slideIndex !== e;
|
|
2001
|
-
this.state.slideIndex = e, this.state.buildIndex = t, o === null &&
|
|
2001
|
+
this.state.slideIndex = e, this.state.buildIndex = t, o === null && De({ title: a.title, slideIndex: e, buildIndex: t });
|
|
2002
2002
|
const f = a.slides[e];
|
|
2003
2003
|
if (f === void 0 || r === null)
|
|
2004
2004
|
return;
|
|
@@ -2007,7 +2007,7 @@ class kn {
|
|
|
2007
2007
|
M();
|
|
2008
2008
|
this.state.mountedExtrasCleanups = [];
|
|
2009
2009
|
for (const M of f.extras) {
|
|
2010
|
-
const T =
|
|
2010
|
+
const T = x1(this.state.extrasContainer, M);
|
|
2011
2011
|
T !== null && this.state.mountedExtrasCleanups.push(T);
|
|
2012
2012
|
}
|
|
2013
2013
|
}
|
|
@@ -2018,8 +2018,8 @@ class kn {
|
|
|
2018
2018
|
type: V.Browser,
|
|
2019
2019
|
context: d
|
|
2020
2020
|
};
|
|
2021
|
-
|
|
2022
|
-
const u =
|
|
2021
|
+
je(r, l);
|
|
2022
|
+
const u = Fe({
|
|
2023
2023
|
slide: f,
|
|
2024
2024
|
buildIndex: t,
|
|
2025
2025
|
buildTime: o
|
|
@@ -2033,7 +2033,7 @@ class kn {
|
|
|
2033
2033
|
object: P,
|
|
2034
2034
|
opacity: T,
|
|
2035
2035
|
renderObject: m,
|
|
2036
|
-
createPath2D:
|
|
2036
|
+
createPath2D: Ue
|
|
2037
2037
|
});
|
|
2038
2038
|
}
|
|
2039
2039
|
const y = s !== 1;
|
|
@@ -2053,7 +2053,7 @@ class kn {
|
|
|
2053
2053
|
return;
|
|
2054
2054
|
const r = s.animations[a];
|
|
2055
2055
|
if (r !== void 0 && !e) {
|
|
2056
|
-
const h = performance.now(), c =
|
|
2056
|
+
const h = performance.now(), c = Ce(r), f = (d) => {
|
|
2057
2057
|
const l = d - h;
|
|
2058
2058
|
l < c ? (this.renderSlide(i, a + 1, l), this.state.currentAnimationId = requestAnimationFrame(f)) : this.renderSlide(i, a + 1, null);
|
|
2059
2059
|
};
|
|
@@ -2070,8 +2070,16 @@ class kn {
|
|
|
2070
2070
|
} else
|
|
2071
2071
|
this.renderSlide(0, 0);
|
|
2072
2072
|
}
|
|
2073
|
+
hasNext() {
|
|
2074
|
+
const { presentation: e } = this.props, { slideIndex: t, buildIndex: o } = this.state, i = e.slides[t];
|
|
2075
|
+
return i === void 0 ? !1 : i.animations[o] !== void 0 ? !0 : t + 1 < e.slides.length;
|
|
2076
|
+
}
|
|
2077
|
+
hasPrevious() {
|
|
2078
|
+
const { slideIndex: e, buildIndex: t } = this.state;
|
|
2079
|
+
return t > 0 || e > 0;
|
|
2080
|
+
}
|
|
2073
2081
|
}
|
|
2074
|
-
function
|
|
2082
|
+
function v1(n) {
|
|
2075
2083
|
return n <= 0 || n > 1 ? (console.warn(
|
|
2076
2084
|
`BrowserCanvasRenderer scale must be positive and no greater than 1. Received ${n}; using 1 instead.`
|
|
2077
2085
|
), 1) : n;
|
|
@@ -2106,21 +2114,21 @@ function On(n, e = {}) {
|
|
|
2106
2114
|
function Fn(n = $.BLACK) {
|
|
2107
2115
|
return { ...n, alpha: 1 };
|
|
2108
2116
|
}
|
|
2109
|
-
function
|
|
2117
|
+
function w1(n) {
|
|
2110
2118
|
for (var e = -1, t = n.length, o, i = n[t - 1], a = 0; ++e < t; )
|
|
2111
2119
|
o = i, i = n[e], a += o[1] * i[0] - o[0] * i[1];
|
|
2112
2120
|
return a / 2;
|
|
2113
2121
|
}
|
|
2114
|
-
function
|
|
2122
|
+
function m1(n) {
|
|
2115
2123
|
for (var e = -1, t = n.length, o = n[t - 1], i, a, s = o[0], r = o[1], h = 0; ++e < t; )
|
|
2116
2124
|
i = s, a = r, o = n[e], s = o[0], r = o[1], i -= s, a -= r, h += Math.sqrt(i * i + a * a);
|
|
2117
2125
|
return h;
|
|
2118
2126
|
}
|
|
2119
|
-
function
|
|
2127
|
+
function A1(n) {
|
|
2120
2128
|
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
2121
2129
|
}
|
|
2122
2130
|
var q0, dt;
|
|
2123
|
-
function
|
|
2131
|
+
function b1() {
|
|
2124
2132
|
if (dt) return q0;
|
|
2125
2133
|
dt = 1;
|
|
2126
2134
|
var n = { a: 7, c: 6, h: 1, l: 2, m: 2, r: 4, q: 4, s: 4, t: 2, v: 1, z: 0 }, e = [
|
|
@@ -2328,7 +2336,7 @@ function Bt() {
|
|
|
2328
2336
|
}, D0 = e, D0;
|
|
2329
2337
|
}
|
|
2330
2338
|
var j0, yt;
|
|
2331
|
-
function
|
|
2339
|
+
function M1() {
|
|
2332
2340
|
if (yt) return j0;
|
|
2333
2341
|
yt = 1;
|
|
2334
2342
|
var n = Bt(), e = {
|
|
@@ -2374,7 +2382,7 @@ function Me() {
|
|
|
2374
2382
|
}, j0;
|
|
2375
2383
|
}
|
|
2376
2384
|
var z0, vt;
|
|
2377
|
-
function
|
|
2385
|
+
function L1() {
|
|
2378
2386
|
if (vt) return z0;
|
|
2379
2387
|
vt = 1;
|
|
2380
2388
|
var n = Math.PI * 2;
|
|
@@ -2417,7 +2425,7 @@ function Le() {
|
|
|
2417
2425
|
}, z0;
|
|
2418
2426
|
}
|
|
2419
2427
|
var U0, wt;
|
|
2420
|
-
function
|
|
2428
|
+
function T1() {
|
|
2421
2429
|
if (wt) return U0;
|
|
2422
2430
|
wt = 1;
|
|
2423
2431
|
var n = 1e-10, e = Math.PI / 180;
|
|
@@ -2446,10 +2454,10 @@ function Te() {
|
|
|
2446
2454
|
}, U0 = t, U0;
|
|
2447
2455
|
}
|
|
2448
2456
|
var Y0, mt;
|
|
2449
|
-
function
|
|
2457
|
+
function P1() {
|
|
2450
2458
|
if (mt) return Y0;
|
|
2451
2459
|
mt = 1;
|
|
2452
|
-
var n =
|
|
2460
|
+
var n = b1(), e = M1(), t = Bt(), o = L1(), i = T1();
|
|
2453
2461
|
function a(s) {
|
|
2454
2462
|
if (!(this instanceof a))
|
|
2455
2463
|
return new a(s);
|
|
@@ -2670,17 +2678,17 @@ function Pe() {
|
|
|
2670
2678
|
}, Y0 = a, Y0;
|
|
2671
2679
|
}
|
|
2672
2680
|
var H0, At;
|
|
2673
|
-
function
|
|
2674
|
-
return At || (At = 1, H0 =
|
|
2681
|
+
function C1() {
|
|
2682
|
+
return At || (At = 1, H0 = P1()), H0;
|
|
2675
2683
|
}
|
|
2676
|
-
var
|
|
2677
|
-
const
|
|
2678
|
-
var X0 = { a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0 },
|
|
2679
|
-
function
|
|
2684
|
+
var S1 = C1();
|
|
2685
|
+
const E1 = /* @__PURE__ */ A1(S1);
|
|
2686
|
+
var X0 = { a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0 }, k1 = /([astvzqmhlc])([^astvzqmhlc]*)/ig;
|
|
2687
|
+
function I1(n) {
|
|
2680
2688
|
var e = [];
|
|
2681
|
-
return n.replace(
|
|
2689
|
+
return n.replace(k1, function(t, o, i) {
|
|
2682
2690
|
var a = o.toLowerCase();
|
|
2683
|
-
for (i =
|
|
2691
|
+
for (i = O1(i), a === "m" && i.length > 2 && (e.push([o].concat(i.splice(0, 2))), a = "l", o = o === "m" ? "l" : "L"); i.length >= 0; ) {
|
|
2684
2692
|
if (i.length === X0[a])
|
|
2685
2693
|
return i.unshift(o), e.push(i);
|
|
2686
2694
|
if (i.length < X0[a])
|
|
@@ -2689,16 +2697,16 @@ function Ie(n) {
|
|
|
2689
2697
|
}
|
|
2690
2698
|
}), e;
|
|
2691
2699
|
}
|
|
2692
|
-
var
|
|
2693
|
-
function
|
|
2694
|
-
var e = n.match(
|
|
2700
|
+
var _1 = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;
|
|
2701
|
+
function O1(n) {
|
|
2702
|
+
var e = n.match(_1);
|
|
2695
2703
|
return e ? e.map(Number) : [];
|
|
2696
2704
|
}
|
|
2697
2705
|
function i0(n, e, t, o, i, a, s, r) {
|
|
2698
2706
|
return new Z0(n, e, t, o, i, a, s, r);
|
|
2699
2707
|
}
|
|
2700
2708
|
function Z0(n, e, t, o, i, a, s, r) {
|
|
2701
|
-
this.a = { x: n, y: e }, this.b = { x: t, y: o }, this.c = { x: i, y: a }, this.d = { x: s, y: r }, s != null && r !== null && r !== void 0 ? (this.getArcLength =
|
|
2709
|
+
this.a = { x: n, y: e }, this.b = { x: t, y: o }, this.c = { x: i, y: a }, this.d = { x: s, y: r }, s != null && r !== null && r !== void 0 ? (this.getArcLength = Y1, this.getPoint = N1, this.getDerivative = R1) : (this.getArcLength = B1, this.getPoint = qt, this.getDerivative = F1), this.init();
|
|
2702
2710
|
}
|
|
2703
2711
|
Z0.prototype = {
|
|
2704
2712
|
constructor: Z0,
|
|
@@ -2760,13 +2768,13 @@ Z0.prototype = {
|
|
|
2760
2768
|
return { x: a.x, y: a.y, tangentX: i.x, tangentY: i.y };
|
|
2761
2769
|
}
|
|
2762
2770
|
};
|
|
2763
|
-
function
|
|
2771
|
+
function F1(n, e, t) {
|
|
2764
2772
|
return {
|
|
2765
2773
|
x: (1 - t) * 2 * (n[1] - n[0]) + t * 2 * (n[2] - n[1]),
|
|
2766
2774
|
y: (1 - t) * 2 * (e[1] - e[0]) + t * 2 * (e[2] - e[1])
|
|
2767
2775
|
};
|
|
2768
2776
|
}
|
|
2769
|
-
function
|
|
2777
|
+
function R1(n, e, t) {
|
|
2770
2778
|
var o = qt(
|
|
2771
2779
|
[3 * (n[1] - n[0]), 3 * (n[2] - n[1]), 3 * (n[3] - n[2])],
|
|
2772
2780
|
[3 * (e[1] - e[0]), 3 * (e[2] - e[1]), 3 * (e[3] - e[2])],
|
|
@@ -2785,11 +2793,11 @@ function qt(n, e, t) {
|
|
|
2785
2793
|
var o = (1 - t) * (1 - t) * n[0] + 2 * (1 - t) * t * n[1] + t * t * n[2], i = (1 - t) * (1 - t) * e[0] + 2 * (1 - t) * t * e[1] + t * t * e[2];
|
|
2786
2794
|
return { x: o, y: i };
|
|
2787
2795
|
}
|
|
2788
|
-
function
|
|
2796
|
+
function N1(n, e, t) {
|
|
2789
2797
|
var o = (1 - t) * (1 - t) * (1 - t) * n[0] + 3 * (1 - t) * (1 - t) * t * n[1] + 3 * (1 - t) * t * t * n[2] + t * t * t * n[3], i = (1 - t) * (1 - t) * (1 - t) * e[0] + 3 * (1 - t) * (1 - t) * t * e[1] + 3 * (1 - t) * t * t * e[2] + t * t * t * e[3];
|
|
2790
2798
|
return { x: o, y: i };
|
|
2791
2799
|
}
|
|
2792
|
-
function
|
|
2800
|
+
function B1(n, e, t) {
|
|
2793
2801
|
t === void 0 && (t = 1);
|
|
2794
2802
|
var o = n[0] - 2 * n[1] + n[2], i = e[0] - 2 * e[1] + e[2], a = 2 * n[1] - 2 * n[0], s = 2 * e[1] - 2 * e[0], r = 4 * (o * o + i * i), h = 4 * (o * a + i * s), c = a * a + s * s;
|
|
2795
2803
|
if (r === 0)
|
|
@@ -2799,7 +2807,7 @@ function Be(n, e, t) {
|
|
|
2799
2807
|
(l + Math.sqrt(l * l + u)) / (f + Math.sqrt(f * f + u))
|
|
2800
2808
|
)));
|
|
2801
2809
|
}
|
|
2802
|
-
var
|
|
2810
|
+
var q1 = [
|
|
2803
2811
|
[],
|
|
2804
2812
|
[],
|
|
2805
2813
|
[-0.5773502691896257, 0.5773502691896257],
|
|
@@ -2825,7 +2833,7 @@ var qe = [
|
|
|
2825
2833
|
[-0.06973927331972223, 0.06973927331972223, -0.20786042668822127, 0.20786042668822127, -0.34193582089208424, 0.34193582089208424, -0.469355837986757, 0.469355837986757, -0.5876404035069116, 0.5876404035069116, -0.6944872631866827, 0.6944872631866827, -0.7878168059792081, 0.7878168059792081, -0.8658125777203002, 0.8658125777203002, -0.926956772187174, 0.926956772187174, -0.9700604978354287, 0.9700604978354287, -0.9942945854823992, 0.9942945854823992],
|
|
2826
2834
|
[0, -0.1332568242984661, 0.1332568242984661, -0.26413568097034495, 0.26413568097034495, -0.3903010380302908, 0.3903010380302908, -0.5095014778460075, 0.5095014778460075, -0.6196098757636461, 0.6196098757636461, -0.7186613631319502, 0.7186613631319502, -0.8048884016188399, 0.8048884016188399, -0.8767523582704416, 0.8767523582704416, -0.9329710868260161, 0.9329710868260161, -0.9725424712181152, 0.9725424712181152, -0.9947693349975522, 0.9947693349975522],
|
|
2827
2835
|
[-0.06405689286260563, 0.06405689286260563, -0.1911188674736163, 0.1911188674736163, -0.3150426796961634, 0.3150426796961634, -0.4337935076260451, 0.4337935076260451, -0.5454214713888396, 0.5454214713888396, -0.6480936519369755, 0.6480936519369755, -0.7401241915785544, 0.7401241915785544, -0.820001985973903, 0.820001985973903, -0.8864155270044011, 0.8864155270044011, -0.9382745520027328, 0.9382745520027328, -0.9747285559713095, 0.9747285559713095, -0.9951872199970213, 0.9951872199970213]
|
|
2828
|
-
],
|
|
2836
|
+
], D1 = [
|
|
2829
2837
|
[],
|
|
2830
2838
|
[],
|
|
2831
2839
|
[1, 1],
|
|
@@ -2851,9 +2859,9 @@ var qe = [
|
|
|
2851
2859
|
[0.13925187285563198, 0.13925187285563198, 0.13654149834601517, 0.13654149834601517, 0.13117350478706238, 0.13117350478706238, 0.12325237681051242, 0.12325237681051242, 0.11293229608053922, 0.11293229608053922, 0.10041414444288096, 0.10041414444288096, 0.08594160621706773, 0.08594160621706773, 0.06979646842452049, 0.06979646842452049, 0.052293335152683286, 0.052293335152683286, 0.03377490158481415, 0.03377490158481415, 0.0146279952982722, 0.0146279952982722],
|
|
2852
2860
|
[0.13365457218610619, 0.1324620394046966, 0.1324620394046966, 0.12890572218808216, 0.12890572218808216, 0.12304908430672953, 0.12304908430672953, 0.11499664022241136, 0.11499664022241136, 0.10489209146454141, 0.10489209146454141, 0.09291576606003515, 0.09291576606003515, 0.07928141177671895, 0.07928141177671895, 0.06423242140852585, 0.06423242140852585, 0.04803767173108467, 0.04803767173108467, 0.030988005856979445, 0.030988005856979445, 0.013411859487141771, 0.013411859487141771],
|
|
2853
2861
|
[0.12793819534675216, 0.12793819534675216, 0.1258374563468283, 0.1258374563468283, 0.12167047292780339, 0.12167047292780339, 0.1155056680537256, 0.1155056680537256, 0.10744427011596563, 0.10744427011596563, 0.09761865210411388, 0.09761865210411388, 0.08619016153195327, 0.08619016153195327, 0.0733464814110803, 0.0733464814110803, 0.05929858491543678, 0.05929858491543678, 0.04427743881741981, 0.04427743881741981, 0.028531388628933663, 0.028531388628933663, 0.0123412297999872, 0.0123412297999872]
|
|
2854
|
-
],
|
|
2855
|
-
function
|
|
2856
|
-
return
|
|
2862
|
+
], j1 = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]];
|
|
2863
|
+
function z1(n, e) {
|
|
2864
|
+
return j1[n][e];
|
|
2857
2865
|
}
|
|
2858
2866
|
function V0(n, e, t) {
|
|
2859
2867
|
var o = t.length - 1, i, a, s;
|
|
@@ -2861,7 +2869,7 @@ function V0(n, e, t) {
|
|
|
2861
2869
|
return 0;
|
|
2862
2870
|
if (n === 0) {
|
|
2863
2871
|
for (a = 0, s = 0; s <= o; s++)
|
|
2864
|
-
a +=
|
|
2872
|
+
a += z1(o, s) * Math.pow(1 - e, o - s) * Math.pow(e, s) * t[s];
|
|
2865
2873
|
return a;
|
|
2866
2874
|
} else {
|
|
2867
2875
|
for (i = new Array(o), s = 0; s < o; s++)
|
|
@@ -2869,16 +2877,16 @@ function V0(n, e, t) {
|
|
|
2869
2877
|
return V0(n - 1, e, i);
|
|
2870
2878
|
}
|
|
2871
2879
|
}
|
|
2872
|
-
function
|
|
2880
|
+
function U1(n, e, t) {
|
|
2873
2881
|
var o = V0(1, t, n), i = V0(1, t, e), a = o * o + i * i;
|
|
2874
2882
|
return Math.sqrt(a);
|
|
2875
2883
|
}
|
|
2876
|
-
function
|
|
2884
|
+
function Y1(n, e, t) {
|
|
2877
2885
|
var o, i, a, s;
|
|
2878
2886
|
t === void 0 && (t = 1);
|
|
2879
2887
|
var r = 20;
|
|
2880
2888
|
for (o = t / 2, i = 0, a = 0; a < r; a++)
|
|
2881
|
-
s = o *
|
|
2889
|
+
s = o * q1[r][a] + o, i += D1[r][a] * U1(n, e, s);
|
|
2882
2890
|
return o * i;
|
|
2883
2891
|
}
|
|
2884
2892
|
var C0 = Math.PI * 2;
|
|
@@ -2886,17 +2894,17 @@ function bt(n, e, t, o) {
|
|
|
2886
2894
|
var i = n * o - e * t < 0 ? -1 : 1, a = n * t + e * o;
|
|
2887
2895
|
return a > 1 && (a = 1), a < -1 && (a = -1), i * Math.acos(a);
|
|
2888
2896
|
}
|
|
2889
|
-
function
|
|
2897
|
+
function H1(n, e, t, o, i, a, s, r, h, c) {
|
|
2890
2898
|
var f = c * (n - t) / 2 + h * (e - o) / 2, d = -h * (n - t) / 2 + c * (e - o) / 2, l = s * s, u = r * r, m = f * f, y = d * d, M = l * u - l * y - u * m;
|
|
2891
2899
|
M < 0 && (M = 0), M /= l * y + u * m, M = Math.sqrt(M) * (i === a ? -1 : 1);
|
|
2892
2900
|
var T = M * s / r * d, S = M * -r / s * f, P = c * T - h * S + (n + t) / 2, E = h * T + c * S + (e + o) / 2, C = (f - T) / s, O = (d - S) / r, R = (-f - T) / s, G = (-d - S) / r, z = bt(1, 0, C, O), H = bt(C, O, R, G);
|
|
2893
2901
|
return a === 0 && H > 0 && (H -= C0), a === 1 && H < 0 && (H += C0), [P, E, z, H];
|
|
2894
2902
|
}
|
|
2895
|
-
function
|
|
2903
|
+
function X1(n, e) {
|
|
2896
2904
|
var t = 1.3333333333333333 * Math.tan(e / 4), o = Math.cos(n), i = Math.sin(n), a = Math.cos(n + e), s = Math.sin(n + e);
|
|
2897
2905
|
return [o, i, o - i * t, i + o * t, a + s * t, s - a * t, a, s];
|
|
2898
2906
|
}
|
|
2899
|
-
function $
|
|
2907
|
+
function $1(n, e, t, o, i, a, s, r, h) {
|
|
2900
2908
|
var c = Math.sin(i * C0 / 360), f = Math.cos(i * C0 / 360), d = f * (n - r) / 2 + c * (e - h) / 2, l = -c * (n - r) / 2 + f * (e - h) / 2;
|
|
2901
2909
|
if (d === 0 && l === 0)
|
|
2902
2910
|
return [];
|
|
@@ -2905,10 +2913,10 @@ function $e(n, e, t, o, i, a, s, r, h) {
|
|
|
2905
2913
|
t = Math.abs(t), o = Math.abs(o);
|
|
2906
2914
|
var u = d * d / (t * t) + l * l / (o * o);
|
|
2907
2915
|
u > 1 && (t *= Math.sqrt(u), o *= Math.sqrt(u));
|
|
2908
|
-
var m =
|
|
2916
|
+
var m = H1(n, e, r, h, a, s, t, o, c, f), y = [], M = m[2], T = m[3], S = Math.max(Math.ceil(Math.abs(T) / (C0 / 4)), 1);
|
|
2909
2917
|
T /= S;
|
|
2910
2918
|
for (var P = 0; P < S; P++)
|
|
2911
|
-
y.push(
|
|
2919
|
+
y.push(X1(M, T)), M += T;
|
|
2912
2920
|
return y.map(function(E) {
|
|
2913
2921
|
for (var C = 0; C < E.length; C += 2) {
|
|
2914
2922
|
var O = E[C + 0], R = E[C + 1];
|
|
@@ -2923,7 +2931,7 @@ function Mt(n, e, t, o, i, a, s, r, h) {
|
|
|
2923
2931
|
return new K0(n, e, t, o, i, a, s, r, h);
|
|
2924
2932
|
}
|
|
2925
2933
|
function K0(n, e, t, o, i, a, s, r, h) {
|
|
2926
|
-
var c = 0, f = [], d = [], l = $
|
|
2934
|
+
var c = 0, f = [], d = [], l = $1(n, e, t, o, i, a, s, r, h);
|
|
2927
2935
|
l.forEach(function(u) {
|
|
2928
2936
|
var m = new i0(u[0], u[1], u[2], u[3], u[4], u[5], u[6], u[7]), y = m.getTotalLength();
|
|
2929
2937
|
c += y, f.push(y), d.push(m);
|
|
@@ -2980,12 +2988,12 @@ k0.prototype.getPropertiesAtLength = function(n) {
|
|
|
2980
2988
|
var e = this.getPointAtLength(n), t = this.getTangentAtLength();
|
|
2981
2989
|
return { x: e.x, y: e.y, tangentX: t.x, tangentY: t.y };
|
|
2982
2990
|
};
|
|
2983
|
-
function
|
|
2991
|
+
function G1(n) {
|
|
2984
2992
|
var e = 0, t = [], o = [];
|
|
2985
2993
|
function i(s) {
|
|
2986
2994
|
if (!s)
|
|
2987
2995
|
return null;
|
|
2988
|
-
for (var r =
|
|
2996
|
+
for (var r = I1(s), h = [0, 0], c = [0, 0], f, d, l = 0; l < r.length; l++)
|
|
2989
2997
|
r[l][0] === "M" ? (h = [r[l][1], r[l][2]], d = [h[0], h[1]], o.push(null)) : r[l][0] === "m" ? (h = [r[l][1] + h[0], r[l][2] + h[1]], d = [h[0], h[1]], o.push(null)) : r[l][0] === "L" ? (e = e + Math.sqrt(Math.pow(h[0] - r[l][1], 2) + Math.pow(h[1] - r[l][2], 2)), o.push(new r0(h[0], r[l][1], h[1], r[l][2])), h = [r[l][1], r[l][2]]) : r[l][0] === "l" ? (e = e + Math.sqrt(Math.pow(r[l][1], 2) + Math.pow(r[l][2], 2)), o.push(new r0(h[0], r[l][1] + h[0], h[1], r[l][2] + h[1])), h = [r[l][1] + h[0], r[l][2] + h[1]]) : r[l][0] === "H" ? (e = e + Math.abs(h[0] - r[l][1]), o.push(new r0(h[0], r[l][1], h[1], h[1])), h[0] = r[l][1]) : r[l][0] === "h" ? (e = e + Math.abs(r[l][1]), o.push(new r0(h[0], h[0] + r[l][1], h[1], h[1])), h[0] = r[l][1] + h[0]) : r[l][0] === "V" ? (e = e + Math.abs(h[1] - r[l][1]), o.push(new r0(h[0], h[0], h[1], r[l][1])), h[1] = r[l][1]) : r[l][0] === "v" ? (e = e + Math.abs(r[l][1]), o.push(new r0(h[0], h[0], h[1], h[1] + r[l][1])), h[1] = r[l][1] + h[1]) : r[l][0] === "z" || r[l][0] === "Z" ? (e = e + Math.sqrt(Math.pow(d[0] - h[0], 2) + Math.pow(d[1] - h[1], 2)), o.push(new r0(h[0], d[0], h[1], d[1])), h = [d[0], d[1]]) : r[l][0] === "C" ? (f = new i0(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4], r[l][5], r[l][6]), e = e + f.getTotalLength(), h = [r[l][5], r[l][6]], o.push(f)) : r[l][0] === "c" ? (f = new i0(h[0], h[1], h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4], h[0] + r[l][5], h[1] + r[l][6]), e = e + f.getTotalLength(), h = [r[l][5] + h[0], r[l][6] + h[1]], o.push(f)) : r[l][0] === "S" ? (l > 0 && ["C", "c", "S", "s"].indexOf(r[l - 1][0]) > -1 ? f = new i0(h[0], h[1], 2 * h[0] - r[l - 1][r[l - 1].length - 4], 2 * h[1] - r[l - 1][r[l - 1].length - 3], r[l][1], r[l][2], r[l][3], r[l][4]) : f = new i0(h[0], h[1], h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4]), e = e + f.getTotalLength(), h = [r[l][3], r[l][4]], o.push(f)) : r[l][0] === "s" ? (l > 0 && ["C", "c", "S", "s"].indexOf(r[l - 1][0]) > -1 ? f = new i0(h[0], h[1], h[0] + f.d.x - f.c.x, h[1] + f.d.y - f.c.y, h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4]) : f = new i0(h[0], h[1], h[0], h[1], h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4]), e = e + f.getTotalLength(), h = [r[l][3] + h[0], r[l][4] + h[1]], o.push(f)) : r[l][0] === "Q" ? (h[0] != r[l][1] && h[1] != r[l][2] ? f = new i0(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4]) : f = new r0(r[l][1], r[l][3], r[l][2], r[l][4]), e = e + f.getTotalLength(), o.push(f), h = [r[l][3], r[l][4]], c = [r[l][1], r[l][2]]) : r[l][0] === "q" ? (r[l][1] == 0 && r[l][2] == 0 ? f = new r0(h[0] + r[l][1], h[0] + r[l][3], h[1] + r[l][2], h[1] + r[l][4]) : f = new i0(h[0], h[1], h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4]), e = e + f.getTotalLength(), c = [h[0] + r[l][1], h[1] + r[l][2]], h = [r[l][3] + h[0], r[l][4] + h[1]], o.push(f)) : r[l][0] === "T" ? (l > 0 && ["Q", "q", "T", "t"].indexOf(r[l - 1][0]) > -1 ? f = new i0(h[0], h[1], 2 * h[0] - c[0], 2 * h[1] - c[1], r[l][1], r[l][2]) : f = new r0(h[0], r[l][1], h[1], r[l][2]), o.push(f), e = e + f.getTotalLength(), c = [2 * h[0] - c[0], 2 * h[1] - c[1]], h = [r[l][1], r[l][2]]) : r[l][0] === "t" ? (l > 0 && ["Q", "q", "T", "t"].indexOf(r[l - 1][0]) > -1 ? f = new i0(h[0], h[1], 2 * h[0] - c[0], 2 * h[1] - c[1], h[0] + r[l][1], h[1] + r[l][2]) : f = new r0(h[0], h[0] + r[l][1], h[1], h[1] + r[l][2]), e = e + f.getTotalLength(), c = [2 * h[0] - c[0], 2 * h[1] - c[1]], h = [r[l][1] + h[0], r[l][2] + h[0]], o.push(f)) : r[l][0] === "A" ? (f = new Mt(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4], r[l][5], r[l][6], r[l][7]), e = e + f.getTotalLength(), h = [r[l][6], r[l][7]], o.push(f)) : r[l][0] === "a" && (f = new Mt(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4], r[l][5], h[0] + r[l][6], h[1] + r[l][7]), e = e + f.getTotalLength(), h = [h[0] + r[l][6], h[1] + r[l][7]], o.push(f)), t.push(e);
|
|
2990
2998
|
return i;
|
|
2991
2999
|
}
|
|
@@ -3015,17 +3023,17 @@ function O0(n, e) {
|
|
|
3015
3023
|
function Dt(n, e, t) {
|
|
3016
3024
|
return [n[0] + (e[0] - n[0]) * t, n[1] + (e[1] - n[1]) * t];
|
|
3017
3025
|
}
|
|
3018
|
-
function
|
|
3026
|
+
function W1(n, e) {
|
|
3019
3027
|
return O0(n, e) < 1e-9;
|
|
3020
3028
|
}
|
|
3021
|
-
function
|
|
3022
|
-
let o = n.map((i, a) =>
|
|
3029
|
+
function Z1(n, e, t) {
|
|
3030
|
+
let o = n.map((i, a) => V1(i, e[a]));
|
|
3023
3031
|
return function(i) {
|
|
3024
3032
|
let a = o.map((s) => s(i));
|
|
3025
|
-
return t ?
|
|
3033
|
+
return t ? J1(a) : a;
|
|
3026
3034
|
};
|
|
3027
3035
|
}
|
|
3028
|
-
function
|
|
3036
|
+
function V1(n, e) {
|
|
3029
3037
|
return function(t) {
|
|
3030
3038
|
return n.map((o, i) => o + t * (e[i] - o));
|
|
3031
3039
|
};
|
|
@@ -3038,17 +3046,17 @@ Example valid ways of supplying a shape would be:
|
|
|
3038
3046
|
[[0, 0], [10, 0], [10, 10]]
|
|
3039
3047
|
"M0,0 L10,0 L10,10Z"
|
|
3040
3048
|
`;
|
|
3041
|
-
function
|
|
3042
|
-
return new
|
|
3049
|
+
function K1(n) {
|
|
3050
|
+
return new E1(n).abs();
|
|
3043
3051
|
}
|
|
3044
|
-
function
|
|
3052
|
+
function Q1(n) {
|
|
3045
3053
|
return n.toString().split("M").map((e, t) => (e = e.trim(), t && e ? "M" + e : e)).filter((e) => e);
|
|
3046
3054
|
}
|
|
3047
|
-
function
|
|
3055
|
+
function J1(n) {
|
|
3048
3056
|
return "M" + n.join("L") + "Z";
|
|
3049
3057
|
}
|
|
3050
3058
|
function tn(n, e) {
|
|
3051
|
-
let t =
|
|
3059
|
+
let t = K1(n);
|
|
3052
3060
|
return en(t) || nn(t, e);
|
|
3053
3061
|
}
|
|
3054
3062
|
function en(n) {
|
|
@@ -3071,7 +3079,7 @@ function en(n) {
|
|
|
3071
3079
|
return t.length ? { ring: t } : !1;
|
|
3072
3080
|
}
|
|
3073
3081
|
function nn(n, e) {
|
|
3074
|
-
let t =
|
|
3082
|
+
let t = Q1(n)[0], o = [], i, a, s = 3;
|
|
3075
3083
|
if (!t)
|
|
3076
3084
|
throw new TypeError(Q0);
|
|
3077
3085
|
a = rn(t), i = a.getTotalLength(), e && _0(e) && e > 0 && (s = Math.max(s, Math.ceil(i / e)));
|
|
@@ -3091,10 +3099,10 @@ function rn(n) {
|
|
|
3091
3099
|
return e.setAttributeNS(null, "d", n), e;
|
|
3092
3100
|
} catch {
|
|
3093
3101
|
}
|
|
3094
|
-
return
|
|
3102
|
+
return G1(n);
|
|
3095
3103
|
}
|
|
3096
3104
|
function Lt(n, e) {
|
|
3097
|
-
const t = n.length + e, o =
|
|
3105
|
+
const t = n.length + e, o = m1(n) / e;
|
|
3098
3106
|
let i = 0, a = 0, s = o / 2;
|
|
3099
3107
|
for (; n.length < t; ) {
|
|
3100
3108
|
let r = n[i], h = n[(i + 1) % n.length], c = O0(r, h);
|
|
@@ -3121,7 +3129,7 @@ function Tt(n, e) {
|
|
|
3121
3129
|
throw new TypeError(Q0);
|
|
3122
3130
|
if (t = n.slice(0), !sn(t))
|
|
3123
3131
|
throw new TypeError(Q0);
|
|
3124
|
-
return t.length > 1 &&
|
|
3132
|
+
return t.length > 1 && W1(t[0], t[t.length - 1]) && t.pop(), o = w1(t), o > 0 && t.reverse(), !i && e && _0(e) && e > 0 && on(t, e), t;
|
|
3125
3133
|
}
|
|
3126
3134
|
function sn(n) {
|
|
3127
3135
|
return n.every(function(e) {
|
|
@@ -3143,7 +3151,7 @@ function hn(n, e, { maxSegmentLength: t = 10, string: o = !0 } = {}) {
|
|
|
3143
3151
|
}
|
|
3144
3152
|
function ln(n, e, t) {
|
|
3145
3153
|
let o;
|
|
3146
|
-
return o = n.length - e.length, Lt(n, o < 0 ? o * -1 : 0), Lt(e, o > 0 ? o : 0), an(n, e),
|
|
3154
|
+
return o = n.length - e.length, Lt(n, o < 0 ? o * -1 : 0), Lt(e, o > 0 ? o : 0), an(n, e), Z1(n, e, t);
|
|
3147
3155
|
}
|
|
3148
3156
|
var I0 = { exports: {} }, Pt;
|
|
3149
3157
|
function cn() {
|
|
@@ -3471,8 +3479,8 @@ export {
|
|
|
3471
3479
|
tt as Easing,
|
|
3472
3480
|
pn as FadeIn,
|
|
3473
3481
|
dn as FadeOut,
|
|
3474
|
-
|
|
3475
|
-
|
|
3482
|
+
de as FontStyle,
|
|
3483
|
+
ye as FontWeight,
|
|
3476
3484
|
bn as Grid,
|
|
3477
3485
|
st as Group,
|
|
3478
3486
|
xn as Hide,
|
|
@@ -3486,7 +3494,7 @@ export {
|
|
|
3486
3494
|
In as Pause,
|
|
3487
3495
|
Cn as Polygon,
|
|
3488
3496
|
X as Position,
|
|
3489
|
-
|
|
3497
|
+
Pe as Presentation,
|
|
3490
3498
|
Sn as Rectangle,
|
|
3491
3499
|
En as SVG,
|
|
3492
3500
|
wn as ScreenCapture,
|
|
@@ -3495,15 +3503,15 @@ export {
|
|
|
3495
3503
|
_n as Slide,
|
|
3496
3504
|
l0 as SlideObject,
|
|
3497
3505
|
St as SlideWebExtra,
|
|
3498
|
-
|
|
3506
|
+
Ae as Text,
|
|
3499
3507
|
On as TextUnit,
|
|
3500
|
-
|
|
3508
|
+
pe as Transparent,
|
|
3501
3509
|
Ct as Update,
|
|
3502
3510
|
Bn as getKeySlideBuildIndices,
|
|
3503
3511
|
Nn as getSizingFunctions,
|
|
3504
3512
|
Rn as getSmoothPathInterpolator,
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3513
|
+
me as getTextContentLength,
|
|
3514
|
+
ke as interpolateColor,
|
|
3515
|
+
_e as interpolateNumber
|
|
3508
3516
|
};
|
|
3509
3517
|
//# sourceMappingURL=presenter.mjs.map
|