@netless/app-slide 0.0.55 → 0.0.56
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/main.cjs.js +109 -113
- package/dist/main.cjs.js.map +1 -1
- package/dist/main.es.js +221 -133
- package/dist/main.es.js.map +1 -1
- package/dist/main.iife.js +138 -142
- package/dist/main.iife.js.map +1 -1
- package/package.json +2 -2
- package/src/DocsViewer/index.ts +3 -0
- package/src/DocsViewer/style.scss +1 -1
- package/src/index.ts +9 -1
package/dist/main.es.js
CHANGED
|
@@ -30399,7 +30399,7 @@ void main() {
|
|
|
30399
30399
|
if (n2 && !n2.applied) {
|
|
30400
30400
|
if (!(n2.triggerTime <= this.timestamp))
|
|
30401
30401
|
break;
|
|
30402
|
-
n2.fn(), n2.applied = true, t5 = this.callbackList.length;
|
|
30402
|
+
n2.running = true, n2.fn(), n2.applied = true, t5 = this.callbackList.length;
|
|
30403
30403
|
}
|
|
30404
30404
|
}
|
|
30405
30405
|
}
|
|
@@ -30407,11 +30407,11 @@ void main() {
|
|
|
30407
30407
|
}
|
|
30408
30408
|
setTimeout(t3, e3) {
|
|
30409
30409
|
const n2 = iM(), i2 = this.timestamp + Math.max(e3 || 16, 16);
|
|
30410
|
-
return this.callbackList.push({ fn: t3, triggerTime: i2, id: n2, applied: false }), this.callbackList.sort((t4, e4) => t4.triggerTime - e4.triggerTime), n2;
|
|
30410
|
+
return this.callbackList.push({ fn: t3, triggerTime: i2, id: n2, applied: false, running: false }), this.callbackList.sort((t4, e4) => t4.triggerTime - e4.triggerTime), n2;
|
|
30411
30411
|
}
|
|
30412
30412
|
clearTimeout(t3) {
|
|
30413
30413
|
const e3 = this.callbackList.findIndex((e4) => e4.id === t3);
|
|
30414
|
-
e3 >= 0 && this.callbackList.splice(e3, 1);
|
|
30414
|
+
e3 >= 0 && !this.callbackList[e3].running && this.callbackList.splice(e3, 1);
|
|
30415
30415
|
}
|
|
30416
30416
|
delay(t3) {
|
|
30417
30417
|
return new Promise((e3) => {
|
|
@@ -30708,6 +30708,9 @@ void main() {
|
|
|
30708
30708
|
constructor(t3) {
|
|
30709
30709
|
this.eventHub = t3, this.targets = Object.create(null);
|
|
30710
30710
|
}
|
|
30711
|
+
getTargets() {
|
|
30712
|
+
return Object.keys(this.targets).map((t3) => this.targets[t3]);
|
|
30713
|
+
}
|
|
30711
30714
|
addTarget(t3, e3) {
|
|
30712
30715
|
this.targets[t3] = e3;
|
|
30713
30716
|
}
|
|
@@ -30717,7 +30720,7 @@ void main() {
|
|
|
30717
30720
|
getTarget(t3, e3, n2 = { type: "el", index: 0, id: "" }) {
|
|
30718
30721
|
var i2, r3;
|
|
30719
30722
|
let o3 = this.targets[t3.id];
|
|
30720
|
-
return t3.type !== "shape" ? o3 : (t3.type === "shape" && t3.txEl && (o3 = (i2 = o3 == null ? void 0 : o3.getTextElement(t3.txEl.type, t3.txEl.range)) !== null && i2 !== void 0 ? i2 : null), t3.type === "shape" && t3.bg && n2.index === 0 && (e3 = false, o3 = (r3 = o3 == null ? void 0 : o3.getBgElement()) !== null && r3 !== void 0 ? r3 : null, this.eventHub.emit("IterateTimeNodeEnd", n2.id)), e3 && o3 ? o3.getIterateEntry(n2.type, n2.index, n2.id) : o3);
|
|
30723
|
+
return t3.type !== "shape" ? o3 : (t3.type === "shape" && t3.txEl && (o3 = (i2 = o3 == null ? void 0 : o3.getTextElement(t3.txEl.type, t3.txEl.range)) !== null && i2 !== void 0 ? i2 : null), t3.type === "shape" && t3.bg && n2.index === 0 && (e3 = false, o3 = (r3 = o3 == null ? void 0 : o3.getBgElement()) !== null && r3 !== void 0 ? r3 : null, this.eventHub.emit("IterateTimeNodeEnd", n2.id)), e3 && o3 ? o3.getIterateEntry(n2.type, n2.index, n2.id) : (o3 || this.eventHub.emit("IterateTimeNodeEnd", n2.id), o3));
|
|
30721
30724
|
}
|
|
30722
30725
|
clearTargets() {
|
|
30723
30726
|
this.targets = Object.create(null);
|
|
@@ -30841,10 +30844,28 @@ void main() {
|
|
|
30841
30844
|
class SM {
|
|
30842
30845
|
constructor(t3, e3, n2) {
|
|
30843
30846
|
var i2, r3, o3, s3, a2, l2;
|
|
30844
|
-
this.scaleExt = { x: 1, y: 1 }, this.scaleOrigin = { x: 1, y: 1 }, this.designScale = { x: 1, y: 1 }, this.bound = new d_(0, 0, 1, 1), this.pptX = 0, this.pptY = 0, this.presetSubType = 0, this.designWidth = 0, this.designHeight = 0, this.designX = 0, this.designY = 0, this.hasPreset = false, this.container = new ty(), this.ctx = e3, this.style = new wM(this.container, t3.hardHidden), this.designGlobalPosition = { x: n2.x + ((r3 = (i2 = t3.position) === null || i2 === void 0 ? void 0 : i2.x) !== null && r3 !== void 0 ? r3 : 0), y: n2.y + ((s3 = (o3 = t3.position) === null || o3 === void 0 ? void 0 : o3.y) !== null && s3 !== void 0 ? s3 : 0) }, (t3.hlinkClick || t3.hlinkHover) && (this.hyperlink = new TM(this.container, this.ctx), t3.hlinkHover && ((a2 = this.hyperlink) === null || a2 === void 0 || a2.addAction(t3.hlinkHover, "hover")), t3.hlinkClick && ((l2 = this.hyperlink) === null || l2 === void 0 || l2.addAction(t3.hlinkClick, "click"))), this.ctx.clock.waitUntil(() =>
|
|
30845
|
-
|
|
30846
|
-
|
|
30847
|
-
|
|
30847
|
+
this.scaleExt = { x: 1, y: 1 }, this.scaleOrigin = { x: 1, y: 1 }, this.designScale = { x: 1, y: 1 }, this.bound = new d_(0, 0, 1, 1), this.pptX = 0, this.pptY = 0, this.presetSubType = 0, this.designWidth = 0, this.designHeight = 0, this.designX = 0, this.designY = 0, this.hasPreset = false, this.container = new ty(), this.ctx = e3, this.style = new wM(this.container, t3.hardHidden), this.designGlobalPosition = { x: n2.x + ((r3 = (i2 = t3.position) === null || i2 === void 0 ? void 0 : i2.x) !== null && r3 !== void 0 ? r3 : 0), y: n2.y + ((s3 = (o3 = t3.position) === null || o3 === void 0 ? void 0 : o3.y) !== null && s3 !== void 0 ? s3 : 0) }, (t3.hlinkClick || t3.hlinkHover) && (this.hyperlink = new TM(this.container, this.ctx), t3.hlinkHover && ((a2 = this.hyperlink) === null || a2 === void 0 || a2.addAction(t3.hlinkHover, "hover")), t3.hlinkClick && ((l2 = this.hyperlink) === null || l2 === void 0 || l2.addAction(t3.hlinkClick, "click"))), this.ctx.clock.waitUntil(() => {
|
|
30848
|
+
try {
|
|
30849
|
+
return !!this.container.width;
|
|
30850
|
+
} catch (t4) {
|
|
30851
|
+
return false;
|
|
30852
|
+
}
|
|
30853
|
+
}, 3e3).then(() => {
|
|
30854
|
+
try {
|
|
30855
|
+
this.designWidth = this.designWidth || this.container.width;
|
|
30856
|
+
} catch (t4) {
|
|
30857
|
+
}
|
|
30858
|
+
}), this.ctx.clock.waitUntil(() => {
|
|
30859
|
+
try {
|
|
30860
|
+
return !!this.container.height;
|
|
30861
|
+
} catch (t4) {
|
|
30862
|
+
return false;
|
|
30863
|
+
}
|
|
30864
|
+
}, 3e3).then(() => {
|
|
30865
|
+
try {
|
|
30866
|
+
this.designHeight = this.designHeight || this.container.height;
|
|
30867
|
+
} catch (t4) {
|
|
30868
|
+
}
|
|
30848
30869
|
});
|
|
30849
30870
|
}
|
|
30850
30871
|
updateScale() {
|
|
@@ -31038,6 +31059,8 @@ void main() {
|
|
|
31038
31059
|
}
|
|
31039
31060
|
clearOnSlideChange() {
|
|
31040
31061
|
}
|
|
31062
|
+
initOnReuse() {
|
|
31063
|
+
}
|
|
31041
31064
|
getTextElement() {
|
|
31042
31065
|
return null;
|
|
31043
31066
|
}
|
|
@@ -31066,28 +31089,33 @@ void main() {
|
|
|
31066
31089
|
}
|
|
31067
31090
|
}
|
|
31068
31091
|
class UM {
|
|
31069
|
-
constructor(t3, e3, n2, i2, r3, o3, s3, a2, l2) {
|
|
31070
|
-
this.ctx = t3, this.type = e3, this.lineWidth = n2, this.width = i2, this.
|
|
31092
|
+
constructor(t3, e3, n2, i2, r3, o3, s3, a2, l2, u2, h2) {
|
|
31093
|
+
this.ctx = t3, this.type = e3, this.lineWidth = n2, this.width = i2, this.height = r3, this.fillColor = o3, this.isHorz = s3, this.renderContainer = new ty(), this.ghcTextureId = `${a2}-text-p${l2}-l${u2}-u${h2}-underLine`;
|
|
31071
31094
|
}
|
|
31072
31095
|
createPaths() {
|
|
31073
31096
|
if (this.type === "ww")
|
|
31074
31097
|
return null;
|
|
31075
31098
|
{
|
|
31076
|
-
|
|
31077
|
-
|
|
31099
|
+
console.log("line width", this.lineWidth);
|
|
31100
|
+
let t3 = `M 0,0 L ${9525 * this.width},0`, [e3, n2] = [this.width, this.lineWidth];
|
|
31101
|
+
return this.isHorz || (t3 = "M 0,0 L 0," + 9525 * this.height, [e3, n2] = [this.lineWidth, this.height]), { paths: [{ id: iM(), path: t3, fill: "norm", hasStroke: true, scale: { x: 1, y: 1 }, hash: uM()(t3) }], width: e3, height: n2 };
|
|
31078
31102
|
}
|
|
31079
31103
|
}
|
|
31104
|
+
getLineStyle() {
|
|
31105
|
+
const t3 = { width: this.lineWidth };
|
|
31106
|
+
return this.type === "dotted" && (t3.dash = "" + this.lineWidth), t3;
|
|
31107
|
+
}
|
|
31080
31108
|
preRender() {
|
|
31081
31109
|
const t3 = this.createPaths();
|
|
31082
31110
|
if (t3) {
|
|
31083
31111
|
const { paths: e3, width: n2, height: i2 } = t3, r3 = e3.reduce((t4, e4) => t4 + e4.hash, "");
|
|
31084
|
-
this.ctx.graphicsTexture.addGraphics(this.ghcTextureId, e3, r3, { x: 0, y: 0 }, n2, i2,
|
|
31112
|
+
this.ctx.graphicsTexture.addGraphics(this.ghcTextureId, e3, r3, { x: 0, y: 0 }, n2, i2, this.getLineStyle(), this.ctx.objectPoolGroup, false, null, this.fillColor);
|
|
31085
31113
|
}
|
|
31086
31114
|
}
|
|
31087
31115
|
render() {
|
|
31088
31116
|
if (this.ghcTextureId) {
|
|
31089
31117
|
const t3 = this.ctx.graphicsTexture.getGraphicsData(this.ghcTextureId);
|
|
31090
|
-
t3 && (this.sprite = new OT(), this.sprite.texture = t3.texture, this.sprite.pivot.x = t3.pivot.x
|
|
31118
|
+
t3 && (this.sprite = new OT(), this.sprite.texture = t3.texture, this.sprite.pivot.x = t3.pivot.x);
|
|
31091
31119
|
}
|
|
31092
31120
|
}
|
|
31093
31121
|
destroy() {
|
|
@@ -31477,7 +31505,7 @@ void main(void){
|
|
|
31477
31505
|
`), { arg: e3 });
|
|
31478
31506
|
}
|
|
31479
31507
|
}
|
|
31480
|
-
const cA = [aA], dA = { clrChange: "\nvec4 transform(vec4 texColor, vec4 arg1, vec4 arg2) {\n float epsilon = 0.001;\n vec3 colorDiff = arg1.rgb - (texColor.rgb / max(texColor.a, 0.0000000001));\n float colorDistance = length(colorDiff);\n if (colorDistance < epsilon) {\n arg2.rgb *= arg2.a;\n return arg2;\n } else {\n return texColor;\n }\n}\n", changeBulletColor: "\nvec4 transform(vec4 texColor, vec4 arg1, vec4 arg2) {\n
|
|
31508
|
+
const cA = [aA], dA = { clrChange: "\nvec4 transform(vec4 texColor, vec4 arg1, vec4 arg2) {\n float epsilon = 0.001;\n vec3 colorDiff = arg1.rgb - (texColor.rgb / max(texColor.a, 0.0000000001));\n float colorDistance = length(colorDiff);\n if (colorDistance < epsilon) {\n arg2.rgb *= arg2.a;\n return arg2;\n } else {\n return texColor;\n }\n}\n", changeBulletColor: "\nvec4 transform(vec4 texColor, vec4 arg1, vec4 arg2) {\n if (texColor.a == 0.0) {\n return texColor;\n } else {\n return arg2;\n }\n}\n" };
|
|
31481
31509
|
class pA extends Gx {
|
|
31482
31510
|
constructor(t3, e3, n2) {
|
|
31483
31511
|
var i2;
|
|
@@ -31523,10 +31551,10 @@ void main(void){
|
|
|
31523
31551
|
}
|
|
31524
31552
|
class vA {
|
|
31525
31553
|
constructor(t3, e3, n2, i2, r3) {
|
|
31526
|
-
this.ctx = t3, this.fillStyle = e3, this.width = n2, this.height = i2, this.config = r3, this.clonedObjects = [], this._displayObject = null
|
|
31554
|
+
this.ctx = t3, this.fillStyle = e3, this.width = n2, this.height = i2, this.config = r3, this.clonedObjects = [], this._displayObject = null;
|
|
31527
31555
|
}
|
|
31528
31556
|
get displayObject() {
|
|
31529
|
-
return this._displayObject;
|
|
31557
|
+
return this._displayObject || (this._displayObject = this.createDisplayObject()), this._displayObject;
|
|
31530
31558
|
}
|
|
31531
31559
|
set displayObject(t3) {
|
|
31532
31560
|
this._displayObject && this._displayObject.destroy({ children: true, texture: true }), this._displayObject = t3;
|
|
@@ -31621,8 +31649,12 @@ void main(void){
|
|
|
31621
31649
|
constructor(t3, e3, n2) {
|
|
31622
31650
|
var i2;
|
|
31623
31651
|
super(t3, e3, n2), this.textureContainer = new ty(), this.underline = null, this.cacheSprite = new OT();
|
|
31624
|
-
const { shapeId: r3, paragraphIndex: o3, lineIndex: s3, unitIndex: a2, lineHeight: l2, width: u2, underLine: h2, fill: c2 } = t3,
|
|
31625
|
-
|
|
31652
|
+
const { shapeId: r3, paragraphIndex: o3, lineIndex: s3, unitIndex: a2, lineHeight: l2, width: u2, underLine: h2, fill: c2, height: d2, isHorz: p2, lineWidth: f2 } = t3, m2 = ((i2 = c2 == null ? void 0 : c2.fill) === null || i2 === void 0 ? void 0 : i2.fillType) === "solidFill" ? c2.fill.color : null;
|
|
31653
|
+
if (h2) {
|
|
31654
|
+
const t4 = p2 ? l2 / 16 : f2 / 16;
|
|
31655
|
+
this.underline = new UM(e3, h2.type, t4, u2, d2, m2, p2, r3, o3, s3, a2);
|
|
31656
|
+
}
|
|
31657
|
+
this.textGraphics = this.createTextGraphics(), this.textFill = this.createTextFill(), this.strokeGraphics = this.createStrokeGraphics(), this.strokeFill = this.createStrokeFill();
|
|
31626
31658
|
}
|
|
31627
31659
|
createStrokeFill() {
|
|
31628
31660
|
const { stroke: t3, lineWidth: e3, lineHeight: n2 } = this.json;
|
|
@@ -31637,8 +31669,12 @@ void main(void){
|
|
|
31637
31669
|
return t3 ? new vA(this.ctx, e3 == null ? void 0 : e3.fill, n2, Math.max(r3, i2), { useFilter: false, useSlideBackgroundFill: false }) : new vA(this.ctx, e3 == null ? void 0 : e3.fill, r3, i2, { useFilter: false, useSlideBackgroundFill: false });
|
|
31638
31670
|
}
|
|
31639
31671
|
createTextGraphics() {
|
|
31640
|
-
|
|
31641
|
-
|
|
31672
|
+
var t3;
|
|
31673
|
+
const { fill: e3, content: n2 } = this.json;
|
|
31674
|
+
let i2 = "#000000";
|
|
31675
|
+
((t3 = e3 == null ? void 0 : e3.fill) === null || t3 === void 0 ? void 0 : t3.fillType) === "solidFill" && (i2 = e3.fill.color);
|
|
31676
|
+
const r3 = (e3 == null ? void 0 : e3.key) ? { fillType: "blipFill", src: e3.key, filters: [{ type: "changeBulletColor", args: ["#000000", i2] }] } : void 0;
|
|
31677
|
+
return new vA(this.ctx, r3, (e3 == null ? void 0 : e3.width) || 0, (e3 == null ? void 0 : e3.height) || 0, { useFilter: n2 === "\u25FE", useSlideBackgroundFill: false });
|
|
31642
31678
|
}
|
|
31643
31679
|
getIterateEntry() {
|
|
31644
31680
|
return null;
|
|
@@ -31670,7 +31706,7 @@ void main(void){
|
|
|
31670
31706
|
}
|
|
31671
31707
|
if (this.textGraphics.displayObject) {
|
|
31672
31708
|
const e4 = this.textGraphics.displayObject;
|
|
31673
|
-
if (e4.scale.x = 0.5, e4.scale.y = 0.5, r3
|
|
31709
|
+
if (e4.scale.x = 0.5, e4.scale.y = 0.5, r3 && (e4.position.y = h2 > 0 ? h2 : 0), f2) {
|
|
31674
31710
|
const n3 = this.textFill.displayObject;
|
|
31675
31711
|
if (n3)
|
|
31676
31712
|
n3.mask = e4, n3.addChild(e4), n3.position.x = -u2, e4.position.x += u2, t3 = true, this.textureContainer.addChild(n3);
|
|
@@ -31696,7 +31732,7 @@ void main(void){
|
|
|
31696
31732
|
r3 ? e4.position.y = h2 > 0 ? h2 : 0 : e4.position.x = u2, this.textureContainer.addChild(e4);
|
|
31697
31733
|
}
|
|
31698
31734
|
if (this.underline && (this.underline.render(), this.underline.sprite)) {
|
|
31699
|
-
this.underline.sprite.position.y = o3 ? o3 - n2 / 16 : i2, this.underline.sprite.position.x = 0;
|
|
31735
|
+
r3 ? (this.underline.sprite.position.y = o3 ? o3 - n2 / 16 : i2, this.underline.sprite.position.x = 0) : (this.underline.sprite.position.x = 0, this.underline.sprite.position.y = 0), document.body.appendChild(this.ctx.renderer.plugins.extract.image(this.underline.sprite));
|
|
31700
31736
|
const t4 = this.textFill.getClonedDisplayObject();
|
|
31701
31737
|
t4 ? (t4.mask = this.underline.sprite, t4.addChild(this.underline.sprite), this.textureContainer.addChild(t4)) : this.textureContainer.addChild(this.underline.sprite);
|
|
31702
31738
|
}
|
|
@@ -32015,6 +32051,11 @@ void main(void){
|
|
|
32015
32051
|
}
|
|
32016
32052
|
if (n2.join("") !== "MLLLC")
|
|
32017
32053
|
return false;
|
|
32054
|
+
for (let t4 = 0; t4 < 3; t4++) {
|
|
32055
|
+
const e4 = i2[t4], n3 = i2[t4 + 1];
|
|
32056
|
+
if (e4.x !== n3.x && e4.y !== n3.y)
|
|
32057
|
+
return false;
|
|
32058
|
+
}
|
|
32018
32059
|
const r3 = i2.slice(0, 4).reduce((t4, e4) => t4 + e4.x, 0) / 4, o3 = i2.slice(0, 4).reduce((t4, e4) => t4 + e4.y, 0) / 4;
|
|
32019
32060
|
if (Number.isNaN(r3) || Number.isNaN(o3))
|
|
32020
32061
|
return false;
|
|
@@ -32089,7 +32130,7 @@ void main(void){
|
|
|
32089
32130
|
});
|
|
32090
32131
|
}, this.json = t3, this.json.fillStyle && this.json.fillStyle.fillType === "groupFill" && i2 && (this.json.fillStyle = i2), this.id = t3.id;
|
|
32091
32132
|
const { fillStyle: o3, lineStyle: s3 } = this.json;
|
|
32092
|
-
this.container.name = t3.id, this.renderContainer.name = t3.id + "-render-container", this.backgroundFill = this.createBackgroundFill(), this.backgroundGraphics = this.createBackgroundGraphics(), this.strokeFill = this.createStrokeFill(), this.strokeGraphics = this.createStrokeGraphics(), this.ctx.timingTargets.addTarget(this.id, this), (o3 == null ? void 0 : o3.fillType) === "solidFill" && (this.fillColorFilter.currentColor = o3.color, this.fillColorFilter.designColor = o3.color), ((r3 = s3 == null ? void 0 : s3.fill) === null || r3 === void 0 ? void 0 : r3.fillType) === "solidFill" && (this.strokeColorFilter.currentColor = s3.fill.color, this.strokeColorFilter.designColor = s3.fill.color), this.updateTransform(this.json), t3.textBody && (this.text = new EA(t3.textBody, this.ctx, t3.textBody.iterateType, { x: this.designGlobalPosition.x, y: this.designGlobalPosition.y })), this.container.hitArea = new g_(1, 1, this.json.width, this.json.height);
|
|
32133
|
+
this.container.name = t3.id, this.renderContainer.name = t3.id + "-render-container", this.generateArrowList(), this.backgroundFill = this.createBackgroundFill(), this.backgroundGraphics = this.createBackgroundGraphics(), this.strokeFill = this.createStrokeFill(), this.strokeGraphics = this.createStrokeGraphics(), this.ctx.timingTargets.addTarget(this.id, this), (o3 == null ? void 0 : o3.fillType) === "solidFill" && (this.fillColorFilter.currentColor = o3.color, this.fillColorFilter.designColor = o3.color), ((r3 = s3 == null ? void 0 : s3.fill) === null || r3 === void 0 ? void 0 : r3.fillType) === "solidFill" && (this.strokeColorFilter.currentColor = s3.fill.color, this.strokeColorFilter.designColor = s3.fill.color), this.updateTransform(this.json), t3.textBody && (this.text = new EA(t3.textBody, this.ctx, t3.textBody.iterateType, { x: this.designGlobalPosition.x, y: this.designGlobalPosition.y })), this.container.hitArea = new g_(1, 1, this.json.width, this.json.height);
|
|
32093
32134
|
}
|
|
32094
32135
|
get interactiveContainer() {
|
|
32095
32136
|
return this.renderContainer;
|
|
@@ -32119,7 +32160,7 @@ void main(void){
|
|
|
32119
32160
|
return this;
|
|
32120
32161
|
}
|
|
32121
32162
|
getIterateEntry(t3, e3, n2) {
|
|
32122
|
-
return t3 === "el"
|
|
32163
|
+
return t3 === "el" ? e3 === 0 ? this : (this.ctx.eventHub.emit("IterateTimeNodeEnd", n2), null) : this.text ? this.text.getIterateEntry(e3 - 1, n2) || null : (this.ctx.eventHub.emit("IterateTimeNodeEnd", n2), null);
|
|
32123
32164
|
}
|
|
32124
32165
|
createStrokeGraphics() {
|
|
32125
32166
|
var t3, e3, n2, i2;
|
|
@@ -32127,8 +32168,8 @@ void main(void){
|
|
|
32127
32168
|
return s3 && ((e3 = s3.fill) === null || e3 === void 0 ? void 0 : e3.fillType) !== "noFill" ? new OA(r3 + "-path-graphics", this.ctx, (n2 = o3 == null ? void 0 : o3.paths) !== null && n2 !== void 0 ? n2 : [], (i2 = o3 == null ? void 0 : o3.hash) !== null && i2 !== void 0 ? i2 : "", u2 || { x: 0, y: 0 }, h2, c2, s3, false, null, d2) : null;
|
|
32128
32169
|
}
|
|
32129
32170
|
createStrokeFill() {
|
|
32130
|
-
const { geometry:
|
|
32131
|
-
return new vA(this.ctx,
|
|
32171
|
+
const [t3, e3] = this.calculateFillObjectOffset(), { geometry: n2, lineStyle: i2, width: r3, height: o3 } = this.json, s3 = (n2 == null ? void 0 : n2.lineTransform) || NA, a2 = Object(l.isNumber)(i2 == null ? void 0 : i2.width) ? i2.width : 1;
|
|
32172
|
+
return new vA(this.ctx, i2 == null ? void 0 : i2.fill, (s3.width || r3) + a2 + t3, Math.max((s3.height || o3) + a2, e3), { useFilter: false, useSlideBackgroundFill: false });
|
|
32132
32173
|
}
|
|
32133
32174
|
createBackgroundGraphics() {
|
|
32134
32175
|
var t3;
|
|
@@ -32141,14 +32182,14 @@ void main(void){
|
|
|
32141
32182
|
return new vA(this.ctx, n2, (a2.width || i2) + ((t3 = o3 == null ? void 0 : o3.width) !== null && t3 !== void 0 ? t3 : 0), (a2.height || r3) + ((e3 = o3 == null ? void 0 : o3.width) !== null && e3 !== void 0 ? e3 : 0), { useFilter: false, useSlideBackgroundFill: this.json.useBgFill });
|
|
32142
32183
|
}
|
|
32143
32184
|
createBackground() {
|
|
32144
|
-
var t3, e3, n2, i2, r3, o3, s3;
|
|
32145
|
-
const { pivot:
|
|
32146
|
-
|
|
32185
|
+
var t3, e3, n2, i2, r3, o3, s3, a2;
|
|
32186
|
+
const { pivot: l2, width: u2, height: h2 } = ((t3 = this.json.geometry) === null || t3 === void 0 ? void 0 : t3.fillTransform) || NA, { displayObject: c2 } = this.backgroundFill;
|
|
32187
|
+
c2 ? (this.json.useBgFill && ((n2 = this.backgroundGraphics) === null || n2 === void 0 ? void 0 : n2.displayObject) ? (this.needCacheAsBitMap = true, c2.mask = this.backgroundGraphics.displayObject, c2.pivot.x = ((i2 = this.json.position) === null || i2 === void 0 ? void 0 : i2.x) || 0, c2.pivot.y = ((r3 = this.json.position) === null || r3 === void 0 ? void 0 : r3.y) || 0, this.container.addChild(this.backgroundGraphics.displayObject)) : ((o3 = this.json.fillStyle) === null || o3 === void 0 ? void 0 : o3.fillType) === "gifFill" ? (c2.height = h2 || this.designHeight, c2.width = u2 || this.designWidth, c2 instanceof jE && c2.play(), ((s3 = this.backgroundGraphics) === null || s3 === void 0 ? void 0 : s3.isNeedMask(c2.width, c2.height)) && (c2.mask = this.backgroundGraphics.displayObject, this.backgroundGraphics.displayObject && this.container.addChild(this.backgroundGraphics.displayObject))) : ((a2 = this.backgroundGraphics) === null || a2 === void 0 ? void 0 : a2.isNeedMask(c2.width, c2.height)) && (this.needCacheAsBitMap = true, c2.mask = this.backgroundGraphics.displayObject, this.backgroundGraphics.displayObject && this.container.addChild(this.backgroundGraphics.displayObject)), c2.x = l2.x, c2.y = l2.y, this.container.addChild(c2)) : this.backgroundFill.hasFill && ((e3 = this.backgroundGraphics) === null || e3 === void 0 ? void 0 : e3.displayObject) && this.container.addChild(this.backgroundGraphics.displayObject);
|
|
32147
32188
|
}
|
|
32148
32189
|
createPathFill() {
|
|
32149
32190
|
var t3, e3, n2;
|
|
32150
|
-
const { displayObject: i2 } = this.strokeFill, r3 = (t3 = this.strokeGraphics) === null || t3 === void 0 ? void 0 : t3.displayObject;
|
|
32151
|
-
i2 ? (((e3 = this.strokeGraphics) === null || e3 === void 0 ? void 0 : e3.isNeedMask(i2.width, i2.height)) && r3 && (this.needCacheAsBitMap = true, i2.pivot.x = r3.pivot.x, i2.pivot.y = r3.pivot.y, r3.pivot.x = 0, r3.pivot.y = 0, i2.mask = r3, i2.addChild(r3)), this.container.addChild(i2)) : this.strokeFill.hasFill && ((n2 = this.strokeGraphics) === null || n2 === void 0 ? void 0 : n2.displayObject) && this.container.addChild(this.strokeGraphics.displayObject);
|
|
32191
|
+
const { displayObject: i2 } = this.strokeFill, r3 = (t3 = this.strokeGraphics) === null || t3 === void 0 ? void 0 : t3.displayObject, [o3, s3] = this.calculateFillObjectOffset();
|
|
32192
|
+
i2 ? (((e3 = this.strokeGraphics) === null || e3 === void 0 ? void 0 : e3.isNeedMask(i2.width, i2.height)) && r3 && (this.needCacheAsBitMap = true, i2.pivot.x = r3.pivot.x, i2.pivot.y = r3.pivot.y, r3.pivot.x = 0, r3.pivot.y = 0, i2.mask = r3, i2.addChild(r3), i2.position.x = -o3 / 2, i2.position.y = -s3 / 2, r3.position.x = o3 / 2, r3.position.y = s3 / 2), this.container.addChild(i2)) : this.strokeFill.hasFill && ((n2 = this.strokeGraphics) === null || n2 === void 0 ? void 0 : n2.displayObject) && this.container.addChild(this.strokeGraphics.displayObject);
|
|
32152
32193
|
}
|
|
32153
32194
|
createFilledPathMask() {
|
|
32154
32195
|
var t3, e3, n2;
|
|
@@ -32164,27 +32205,38 @@ void main(void){
|
|
|
32164
32205
|
}
|
|
32165
32206
|
}
|
|
32166
32207
|
createArrow() {
|
|
32167
|
-
this.arrowList.
|
|
32168
|
-
|
|
32169
|
-
|
|
32170
|
-
|
|
32171
|
-
|
|
32172
|
-
|
|
32208
|
+
if (!this.arrowList.length)
|
|
32209
|
+
return;
|
|
32210
|
+
const t3 = new ty(), e3 = this.strokeFill.getClonedDisplayObject(), [n2, i2] = this.calculateFillObjectOffset();
|
|
32211
|
+
this.arrowList.forEach((e4) => {
|
|
32212
|
+
const n3 = this.ctx.graphicsTexture.getGraphicsData(e4.graphicsId);
|
|
32213
|
+
if (n3) {
|
|
32214
|
+
const { texture: i3 } = n3, r4 = new OT(i3);
|
|
32215
|
+
r4.pivot.x = e4.pivot.x, r4.pivot.y = e4.pivot.y, r4.position.x = e4.position.x + e4.pivot.x, r4.position.y = e4.position.y + e4.pivot.y, r4.rotation = e4.rotate / 180 * Math.PI, t3.addChild(r4);
|
|
32216
|
+
}
|
|
32217
|
+
}), this.arrowRenderTexture = Hy.create({ width: t3.width, height: t3.height, resolution: 1 }), this.ctx.renderer.render(t3, { renderTexture: this.arrowRenderTexture });
|
|
32218
|
+
const r3 = new OT();
|
|
32219
|
+
r3.texture = this.arrowRenderTexture, e3 && (e3.mask = r3, e3.position.x = -n2 / 2, e3.position.y = -i2 / 2, r3.position.x = -n2 / 2, r3.position.y = -i2 / 2, this.container.addChild(e3), this.container.addChild(r3));
|
|
32220
|
+
}
|
|
32221
|
+
generateArrowList() {
|
|
32222
|
+
var t3, e3;
|
|
32223
|
+
const { lineArrowList: n2, lineStyle: i2, id: r3 } = this.json, o3 = ((t3 = i2 == null ? void 0 : i2.fill) === null || t3 === void 0 ? void 0 : t3.fillType) === "solidFill" ? i2.fill.color : null;
|
|
32224
|
+
(e3 = n2 || []) === null || e3 === void 0 || e3.forEach((t4, e4) => {
|
|
32225
|
+
var n3, s3;
|
|
32226
|
+
const a2 = new IA(Object.assign(Object.assign({}, t4), { fillStyle: i2 == null ? void 0 : i2.fill, lineWidth: (n3 = i2 == null ? void 0 : i2.width) !== null && n3 !== void 0 ? n3 : 0 }));
|
|
32227
|
+
a2.graphicsId = `${r3}-arrow-${e4}-graphics`, a2.textureId = `${r3}-arrow-${e4}-fill`, this.ctx.graphicsTexture.addGraphics(a2.graphicsId, (s3 = a2.paths) !== null && s3 !== void 0 ? s3 : [], a2.hash, { x: 0, y: 0 }, a2.width, a2.height, void 0, this.ctx.objectPoolGroup, true, o3, null), this.arrowList.push(a2);
|
|
32173
32228
|
});
|
|
32174
32229
|
}
|
|
32230
|
+
calculateFillObjectOffset() {
|
|
32231
|
+
let [t3, e3] = [0, 0];
|
|
32232
|
+
return this.arrowList.length && (t3 = this.arrowList.reduce((t4, e4) => Math.max(t4, e4.width), 0), e3 = this.arrowList.reduce((t4, e4) => Math.max(t4, e4.height), 0)), [t3, e3];
|
|
32233
|
+
}
|
|
32175
32234
|
preRender(t3) {
|
|
32176
32235
|
var e3, n2, i2;
|
|
32177
|
-
const {
|
|
32236
|
+
const { lineStyle: r3, geometry: o3 } = this.json, { width: s3, height: a2 } = (o3 == null ? void 0 : o3.lineTransform) || NA, l2 = s3 || this.json.width, u2 = a2 || this.json.height, h2 = ((e3 = o3 == null ? void 0 : o3.paths) === null || e3 === void 0 ? void 0 : e3.filter((t4) => t4.fill !== "none" && t4.fill !== "norm")) || [], c2 = ((n2 = r3 == null ? void 0 : r3.fill) === null || n2 === void 0 ? void 0 : n2.fillType) === "solidFill" ? r3.fill.color : null;
|
|
32178
32237
|
t3.addSubMTask(() => LA(this, void 0, void 0, function* () {
|
|
32179
|
-
for (const t4 of
|
|
32180
|
-
this.ctx.graphicsTexture.addGraphics(t4.id, [t4], t4.hash, ((
|
|
32181
|
-
})), t3.addSubMTask(() => LA(this, void 0, void 0, function* () {
|
|
32182
|
-
var t4;
|
|
32183
|
-
(t4 = r3 || []) === null || t4 === void 0 || t4.forEach((t5, e4) => {
|
|
32184
|
-
var n3, i3;
|
|
32185
|
-
const r4 = new IA(Object.assign(Object.assign({}, t5), { fillStyle: o3 == null ? void 0 : o3.fill, lineWidth: (n3 = o3 == null ? void 0 : o3.width) !== null && n3 !== void 0 ? n3 : 0 }));
|
|
32186
|
-
r4.graphicsId = `${s3}-arrow-${e4}-graphics`, r4.textureId = `${s3}-arrow-${e4}-fill`, this.ctx.graphicsTexture.addGraphics(r4.graphicsId, (i3 = r4.paths) !== null && i3 !== void 0 ? i3 : [], r4.hash, r4.pivot || { x: 0, y: 0 }, r4.width, r4.height, void 0, this.ctx.objectPoolGroup, true, p2, null), this.arrowList.push(r4);
|
|
32187
|
-
});
|
|
32238
|
+
for (const t4 of h2)
|
|
32239
|
+
this.ctx.graphicsTexture.addGraphics(t4.id, [t4], t4.hash, ((o3 == null ? void 0 : o3.lineTransform) || NA).pivot, l2, u2, r3, this.ctx.objectPoolGroup, true, null, c2);
|
|
32188
32240
|
})), (i2 = this.text) === null || i2 === void 0 || i2.createParagraphs(this.json.id, t3);
|
|
32189
32241
|
}
|
|
32190
32242
|
subClassRender() {
|
|
@@ -32219,7 +32271,7 @@ void main(void){
|
|
|
32219
32271
|
}
|
|
32220
32272
|
this.renderContainer.addChild(this.container);
|
|
32221
32273
|
}
|
|
32222
|
-
if (this.needCacheAsBitMap
|
|
32274
|
+
if (this.needCacheAsBitMap, this.json.id === "background" && this.ctx.hasBackgroundFillShape) {
|
|
32223
32275
|
const t5 = Hy.create({ width: this.json.width, height: this.json.height, resolution: Math.ceil(this.ctx.renderer.resolution) });
|
|
32224
32276
|
this.ctx.renderer.render(this.renderContainer, { renderTexture: t5 }), this.ctx.bgTexture = t5;
|
|
32225
32277
|
}
|
|
@@ -32227,9 +32279,11 @@ void main(void){
|
|
|
32227
32279
|
}
|
|
32228
32280
|
clearOnSlideChange() {
|
|
32229
32281
|
}
|
|
32282
|
+
initOnReuse() {
|
|
32283
|
+
}
|
|
32230
32284
|
destroy() {
|
|
32231
|
-
var t3, e3, n2;
|
|
32232
|
-
(t3 = this.text) === null || t3 === void 0 || t3.destroy(), this.fillColorFilter.destroy(), this.strokeColorFilter.destroy(), this.backgroundFill.destroy(), (e3 = this.backgroundGraphics) === null || e3 === void 0 || e3.destroy(), this.strokeFill.destroy(), (n2 = this.strokeGraphics) === null || n2 === void 0 || n2.destroy(), this.renderContainer.destroy(), this.arrowList = [];
|
|
32285
|
+
var t3, e3, n2, i2;
|
|
32286
|
+
(t3 = this.text) === null || t3 === void 0 || t3.destroy(), this.fillColorFilter.destroy(), this.strokeColorFilter.destroy(), this.backgroundFill.destroy(), (e3 = this.backgroundGraphics) === null || e3 === void 0 || e3.destroy(), this.strokeFill.destroy(), (n2 = this.strokeGraphics) === null || n2 === void 0 || n2.destroy(), this.renderContainer.destroy(), (i2 = this.arrowRenderTexture) === null || i2 === void 0 || i2.destroy(true), this.arrowList = [];
|
|
32233
32287
|
}
|
|
32234
32288
|
}
|
|
32235
32289
|
var FA = function(t3, e3, n2, i2) {
|
|
@@ -32335,8 +32389,8 @@ void main(void){
|
|
|
32335
32389
|
}
|
|
32336
32390
|
setControllerPosition() {
|
|
32337
32391
|
var t3;
|
|
32338
|
-
const { target: e3 } = this, { stageWidth: n2, stageHeight: i2 } = this.ctx, r3 = e3.getGlobalPosition(), o3 =
|
|
32339
|
-
r3.y = r3.y + this.height - 50, r3.x = Math.max(r3.x, 0), r3.x = Math.min(r3.x, n2 - 300 *
|
|
32392
|
+
const { target: e3 } = this, { stageWidth: n2, stageHeight: i2 } = this.ctx, r3 = e3.getGlobalPosition(), o3 = Number((t3 = this.container) === null || t3 === void 0 ? void 0 : t3.getAttribute("data-scale")), s3 = n2 * o3, a2 = 1 / o3 * (300 > s3 ? s3 / 300 : 1);
|
|
32393
|
+
r3.y = r3.y + this.height - 50, r3.x = Math.max(r3.x, 0), r3.x = Math.min(r3.x, n2 - 300 * a2), r3.y = Math.max(r3.y, 0), r3.y = Math.min(r3.y, i2 - 50), BA(this.mediaController, { height: "50px", borderRadius: "25px", width: "300px", flexDirection: "row", alignItems: "center", position: "absolute", left: r3.x + "px", top: r3.y + "px", display: "none", background: "#fff", zIndex: "2", border: "1px solid #ccc", transform: `scale(${a2})`, transformOrigin: "0 100%" });
|
|
32340
32394
|
}
|
|
32341
32395
|
createMediaController() {
|
|
32342
32396
|
this.setControllerPosition(), this.createButton();
|
|
@@ -32550,7 +32604,7 @@ void main(void){
|
|
|
32550
32604
|
}
|
|
32551
32605
|
class jA extends DA {
|
|
32552
32606
|
constructor(t3, e3, n2, i2) {
|
|
32553
|
-
super(Object.assign(Object.assign({}, t3), { type: "Shape", useBgFill: false, textRotateWithShape: true, isPicture: true }), e3, n2, i2), this.cmd = new xM(this), this.media = t3 == null ? void 0 : t3.media, this.picFill = new vA(this.ctx, t3.picFill, t3.width, t3.height, { useFilter: false, useSlideBackgroundFill: false });
|
|
32607
|
+
super(Object.assign(Object.assign({}, t3), { type: "Shape", useBgFill: false, textRotateWithShape: true, isPicture: true }), e3, n2, i2), this.isInteractiveOutside = false, this.cmd = new xM(this), this.media = t3 == null ? void 0 : t3.media, this.picFill = new vA(this.ctx, t3.picFill, t3.width, t3.height, { useFilter: false, useSlideBackgroundFill: false });
|
|
32554
32608
|
}
|
|
32555
32609
|
applyCommand(t3, e3) {
|
|
32556
32610
|
var n2, i2, r3, o3, s3;
|
|
@@ -32569,9 +32623,11 @@ void main(void){
|
|
|
32569
32623
|
const { displayObject: o3 } = this.picFill;
|
|
32570
32624
|
if (o3) {
|
|
32571
32625
|
const s3 = (t3 = this.backgroundGraphics) === null || t3 === void 0 ? void 0 : t3.getClonedDisplayObject();
|
|
32572
|
-
((e3 = this.backgroundGraphics) === null || e3 === void 0 ? void 0 : e3.isNeedMask(o3.width, o3.height)) && s3 && (o3.mask = s3, this.container.addChild(s3)), o3.width = this.designWidth, o3.height = this.designHeight, o3 instanceof jE &&
|
|
32626
|
+
((e3 = this.backgroundGraphics) === null || e3 === void 0 ? void 0 : e3.isNeedMask(o3.width, o3.height)) && s3 && (o3.mask = s3, this.container.addChild(s3)), o3.width = this.designWidth, o3.height = this.designHeight, o3 instanceof jE && this.ctx.slideScopeEventHub.once("slide-render", (t4) => {
|
|
32627
|
+
this.ctx.slideIndex === t4 && o3.play();
|
|
32628
|
+
}), this.container.addChild(o3), ((n2 = this.media) === null || n2 === void 0 ? void 0 : n2.type) === "video" && this.media.src ? (this.mediaPlayer = new GA({ id: this.json.id + "-video", ctx: this.ctx, video: this.media, height: this.designHeight, width: this.designWidth, target: o3, container: this.container, canvasElement: this.ctx.view }), (i2 = this.mediaPlayer) === null || i2 === void 0 || i2.sprite) : ((r3 = this.media) === null || r3 === void 0 ? void 0 : r3.type) === "audio" && this.media.src && (this.mediaPlayer = new zA({ id: this.json.id + "-audio", ctx: this.ctx, audio: this.media, height: this.designHeight, width: this.designWidth, target: o3, canvasElement: this.ctx.view })), this.mediaPlayer && (this.isInteractiveOutside = this.container.interactive, this.container.interactive = true, this.container.on("mouseover", () => {
|
|
32573
32629
|
this.mediaPlayer.showController();
|
|
32574
|
-
}),
|
|
32630
|
+
}), this.container.on("mouseout", () => {
|
|
32575
32631
|
this.mediaPlayer.hideController();
|
|
32576
32632
|
}, false));
|
|
32577
32633
|
}
|
|
@@ -32583,10 +32639,13 @@ void main(void){
|
|
|
32583
32639
|
this.renderPic();
|
|
32584
32640
|
}
|
|
32585
32641
|
clearOnSlideChange() {
|
|
32586
|
-
super.clearOnSlideChange(), this.mediaPlayer && (this.
|
|
32642
|
+
super.clearOnSlideChange(), this.mediaPlayer && (this.container.interactive = false, this.mediaPlayer.stop(), this.mediaPlayer.hideController());
|
|
32643
|
+
}
|
|
32644
|
+
initOnReuse() {
|
|
32645
|
+
super.initOnReuse(), this.mediaPlayer && (this.container.interactive = true);
|
|
32587
32646
|
}
|
|
32588
32647
|
destroy() {
|
|
32589
|
-
this.mediaPlayer && (this.picFill.displayObject && (this.
|
|
32648
|
+
this.mediaPlayer && (this.picFill.displayObject && !this.isInteractiveOutside && (this.container.interactive = false), this.mediaPlayer.destroy(), this.mediaPlayer = void 0), this.picFill.destroy();
|
|
32590
32649
|
}
|
|
32591
32650
|
}
|
|
32592
32651
|
var VA = function(t3, e3, n2, i2) {
|
|
@@ -32660,6 +32719,9 @@ void main(void){
|
|
|
32660
32719
|
clearOnSlideChange() {
|
|
32661
32720
|
this.children.forEach((t3) => t3.clearOnSlideChange());
|
|
32662
32721
|
}
|
|
32722
|
+
initOnReuse() {
|
|
32723
|
+
this.children.forEach((t3) => t3.initOnReuse());
|
|
32724
|
+
}
|
|
32663
32725
|
destroy() {
|
|
32664
32726
|
this.cacheSprite && this.cacheSprite.destroy({ texture: true }), this.children.forEach((t3) => t3.destroy()), this.container.destroy({ children: true, texture: true, baseTexture: true }), this.cacheContainer.destroy({ children: true, texture: true, baseTexture: true });
|
|
32665
32727
|
}
|
|
@@ -33055,9 +33117,7 @@ void main(void){
|
|
|
33055
33117
|
const i2 = e3 / t4, r3 = (n2 = this.path) === null || n2 === void 0 ? void 0 : n2.getPoint(i2);
|
|
33056
33118
|
this.timingTarget && r3 && (this.timingTarget.ppt_x = r3.x + this.timingTarget.design_ppt_x, this.timingTarget.ppt_y = r3.y + +this.timingTarget.design_ppt_y);
|
|
33057
33119
|
}, this.onSeekToStart = () => {
|
|
33058
|
-
|
|
33059
|
-
const i2 = (e3 = (t4 = this.commonTimeNode.json) === null || t4 === void 0 ? void 0 : t4.spd) !== null && e3 !== void 0 ? e3 : 1, r3 = (n2 = this.path) === null || n2 === void 0 ? void 0 : n2.getPoint(i2 > 0 ? 0 : 1);
|
|
33060
|
-
this.timingTarget && r3 && (this.timingTarget.ppt_x = r3.x + this.timingTarget.design_ppt_x, this.timingTarget.ppt_y = r3.y + this.timingTarget.design_ppt_y);
|
|
33120
|
+
this.timingTarget && (this.timingTarget.ppt_x = this.timingTarget.design_ppt_x, this.timingTarget.ppt_y = this.timingTarget.design_ppt_y);
|
|
33061
33121
|
}, this.onSeekToEnd = () => {
|
|
33062
33122
|
var t4, e3, n2;
|
|
33063
33123
|
const i2 = (e3 = (t4 = this.commonTimeNode.json) === null || t4 === void 0 ? void 0 : t4.spd) !== null && e3 !== void 0 ? e3 : 1, r3 = (n2 = this.path) === null || n2 === void 0 ? void 0 : n2.getPoint(i2 > 0 ? 1 : 0);
|
|
@@ -33132,8 +33192,10 @@ void main(void){
|
|
|
33132
33192
|
}
|
|
33133
33193
|
class mR extends JA {
|
|
33134
33194
|
constructor(t3) {
|
|
33135
|
-
super(t3), this.isConflict = false, this.activeWhenConflict = "next", this.startColorString = null, this.currentColorString = "#FFFFFFFF", this.onTimelineStart = (t4) => {
|
|
33136
|
-
|
|
33195
|
+
super(t3), this.isConflict = false, this.activeWhenConflict = "next", this.isTimelineStart = false, this.startColorString = null, this.currentColorString = "#FFFFFFFF", this.onTimelineStart = (t4) => {
|
|
33196
|
+
if (this.isTimelineStart)
|
|
33197
|
+
return;
|
|
33198
|
+
this.isTimelineStart = true, t4.isReverse || this.updateCurrentValue(), this.from.isInit() || this.from.fromHexString(this.currentColorString), this.to.isInit() || this.from.by(this.by, this.to);
|
|
33137
33199
|
const [e3] = this.json.cBhvr.attrList[0].split(".");
|
|
33138
33200
|
YA(this.timingTarget, e3 + ".on", "true");
|
|
33139
33201
|
}, this.onTimeNodeEnd = () => {
|
|
@@ -33141,6 +33203,7 @@ void main(void){
|
|
|
33141
33203
|
const [t4] = this.json.cBhvr.attrList[0].split(".");
|
|
33142
33204
|
YA(this.timingTarget, t4 + ".on", "false");
|
|
33143
33205
|
}
|
|
33206
|
+
this.isTimelineStart = false;
|
|
33144
33207
|
}, this.onSeekToStart = () => {
|
|
33145
33208
|
var t4;
|
|
33146
33209
|
if (this.timingTarget && (this.onTimeUpdate({ duration: 1, delta: 0 }), ((t4 = this.timingTarget.fill) === null || t4 === void 0 ? void 0 : t4.designColor.toUpperCase()) === this.from.toHexString().toUpperCase())) {
|
|
@@ -33156,7 +33219,7 @@ void main(void){
|
|
|
33156
33219
|
const n2 = t4 / e3;
|
|
33157
33220
|
this.to.interpolationFrom(this.from, n2, this.target), this.timingTarget && YA(this.timingTarget, this.json.cBhvr.attrList[0], this.target.toHexString());
|
|
33158
33221
|
}, this.onSeekToEnd = () => {
|
|
33159
|
-
this.onTimeUpdate({ duration: 1, delta: 1 });
|
|
33222
|
+
this.isTimelineStart || this.onTimelineStart({ isReverse: false, activeCount: 0, id: "" }), this.onTimeUpdate({ duration: 1, delta: 1 });
|
|
33160
33223
|
}, this.json.clrSpc === "rgb" ? (this.from = new MM(this.json.from), this.to = new MM(this.json.to), this.by = new MM(this.json.by), this.target = new MM()) : (this.from = new EM(this.json.from), this.to = new EM(this.json.to), this.by = new EM(this.json.by), this.target = new EM()), this.commonTimeNode.on("timeNodeStart", this.onTimeNodeStart), this.commonTimeNode.on("timeNodeCreate", this.onTimeNodeStart), this.commonTimeNode.on("timelineStart", this.onTimelineStart), this.commonTimeNode.on("timeNodeEnd", this.onTimeNodeEnd), this.commonTimeNode.on("timeUpdate", this.onTimeUpdate);
|
|
33161
33224
|
}
|
|
33162
33225
|
get modifyAttrKey() {
|
|
@@ -33216,7 +33279,7 @@ void main(void){
|
|
|
33216
33279
|
this.isApplied = false;
|
|
33217
33280
|
}), this.commonTimeNode.on("timeNodeEnd", () => {
|
|
33218
33281
|
this.isApplied = false;
|
|
33219
|
-
}), this.commonTimeNode.on("timeUpdate", this.onTimeUpdate);
|
|
33282
|
+
}), this.commonTimeNode.on("timeUpdate", this.onTimeUpdate), this.commonTimeNode.on("seekToStart", this.onSeekToStart), this.commonTimeNode.on("seekToEnd", this.onSeekToEnd);
|
|
33220
33283
|
}
|
|
33221
33284
|
get modifyAttrKey() {
|
|
33222
33285
|
var t3, e3, n2, i2;
|
|
@@ -33288,7 +33351,7 @@ void main(void){
|
|
|
33288
33351
|
constructor(t3) {
|
|
33289
33352
|
var e3, n2;
|
|
33290
33353
|
super(), this.uuid = Date.now().toString(32) + Math.random().toString(32).substring(2), this.isSub = false, this.isShadow = false, this.startCount = 0, this.applyCount = 0, this.isReverse = false, this.isConflictDispose = false, this.isIterateEnd = false, this.parentTimeNode = null, this.isActive = false, this.isDestroy = false, this.shouldSeekOnStart = false, this.repeatTimeoutId = "", this.iterateShadows = [], this.isEndEventsEmitted = false, this.tmFilter = [], this.timeDelta = 0, this.isIterate = false, this.iterateType = "el", this.iterateIndex = 0, this.children = [], this.subList = [], this.duration = 0, this.isNegativeSpeed = false, this.handleEndCond = () => {
|
|
33291
|
-
this.isActive && (this.isActive = false, this.
|
|
33354
|
+
this.isActive && (this.isActive = false, this.seekToEnd(false, true));
|
|
33292
33355
|
}, this.handleActive = (t4 = true) => {
|
|
33293
33356
|
if (this.isActive = true, this.applyCount += 1, this.json.iterate || this.emit("timeNodeStart", { id: this.uuid, activeCount: this.applyCount, isReverse: this.isReverse }), this.startCount > 0 && this.json.restart) {
|
|
33294
33357
|
if (this.json.restart === "never")
|
|
@@ -33441,25 +33504,26 @@ void main(void){
|
|
|
33441
33504
|
isNatureTimeEnd() {
|
|
33442
33505
|
return this.duration >= 0 && this.timeDelta >= this.duration;
|
|
33443
33506
|
}
|
|
33444
|
-
|
|
33445
|
-
if (!this.json.presetClass)
|
|
33446
|
-
return;
|
|
33507
|
+
findTargets() {
|
|
33447
33508
|
const t3 = [], e3 = (n2) => {
|
|
33448
33509
|
n2.forEach((n3) => {
|
|
33449
33510
|
var i2, r3, o3;
|
|
33450
33511
|
n3.cBhvr && n3.cBhvr.target && t3.findIndex((t4) => t4.id === n3.cBhvr.target.id) < 0 && t3.push(n3.cBhvr.target), ((r3 = (i2 = n3 == null ? void 0 : n3.cBhvr) === null || i2 === void 0 ? void 0 : i2.ctn) === null || r3 === void 0 ? void 0 : r3.childTnLst) && n3.cBhvr.ctn.childTnLst.length > 0 && e3(n3.cBhvr.ctn.childTnLst), ((o3 = n3 == null ? void 0 : n3.ctn) === null || o3 === void 0 ? void 0 : o3.childTnLst) && n3.ctn.childTnLst.length > 0 && e3(n3.ctn.childTnLst);
|
|
33451
33512
|
});
|
|
33452
33513
|
};
|
|
33453
|
-
e3(this.json.childTnLst || []), t3
|
|
33514
|
+
return e3(this.json.childTnLst || []), t3;
|
|
33515
|
+
}
|
|
33516
|
+
setPreStyle() {
|
|
33517
|
+
this.json.presetClass && this.findTargets().forEach((t3) => {
|
|
33454
33518
|
if (this.json.iterate) {
|
|
33455
|
-
let
|
|
33519
|
+
let e3 = 0, n2 = true;
|
|
33456
33520
|
for (; n2; ) {
|
|
33457
|
-
const i2 = this.ctx.timingTargets.getTarget(
|
|
33458
|
-
i2 && (this.setPreStyleForTarget(i2),
|
|
33521
|
+
const i2 = this.ctx.timingTargets.getTarget(t3, true, { type: this.json.iterate.type, index: e3, id: "" });
|
|
33522
|
+
i2 && (this.setPreStyleForTarget(i2), e3 += 1), n2 = !!i2;
|
|
33459
33523
|
}
|
|
33460
33524
|
} else {
|
|
33461
|
-
const
|
|
33462
|
-
|
|
33525
|
+
const e3 = this.ctx.timingTargets.getTarget(t3, false);
|
|
33526
|
+
e3 && this.setPreStyleForTarget(e3);
|
|
33463
33527
|
}
|
|
33464
33528
|
});
|
|
33465
33529
|
}
|
|
@@ -33643,10 +33707,10 @@ void main(void){
|
|
|
33643
33707
|
}
|
|
33644
33708
|
resetAllInteractiveSeq() {
|
|
33645
33709
|
var t3;
|
|
33646
|
-
((t3 = this.tmRoot) === null || t3 === void 0 ? void 0 : t3.commonTimeNode.children.filter((t4) => {
|
|
33710
|
+
(((t3 = this.tmRoot) === null || t3 === void 0 ? void 0 : t3.commonTimeNode.children.filter((t4) => {
|
|
33647
33711
|
var e3, n2, i2;
|
|
33648
33712
|
return ((e3 = t4.json) === null || e3 === void 0 ? void 0 : e3.type) === "seq" && ((i2 = (n2 = t4.json) === null || n2 === void 0 ? void 0 : n2.ctn) === null || i2 === void 0 ? void 0 : i2.nodeType) === "interactiveSeq";
|
|
33649
|
-
})).forEach((t4) => {
|
|
33713
|
+
})) || []).forEach((t4) => {
|
|
33650
33714
|
t4.setCurrentStep(0, "start");
|
|
33651
33715
|
});
|
|
33652
33716
|
}
|
|
@@ -33689,7 +33753,7 @@ void main(void){
|
|
|
33689
33753
|
return !!t3 && (t3.type === "Picture" || t3.type === "Shape" ? t3.useBgFill : !(!t3.children || !Object(l.isArray)(t3.children)) && t3.children.some((t4) => this.detectUseBackgroundFill(t4)));
|
|
33690
33754
|
}
|
|
33691
33755
|
initOnReuse() {
|
|
33692
|
-
this.globalEventHub.on("c:prev slide", () => {
|
|
33756
|
+
super.initOnReuse(), this.globalEventHub.on("c:prev slide", () => {
|
|
33693
33757
|
this.ctx.eventHub.emit(zR.requestPrevSlide);
|
|
33694
33758
|
}), this.globalEventHub.on("c:next slide", () => {
|
|
33695
33759
|
this.ctx.eventHub.emit(zR.requestNextSlide);
|
|
@@ -33730,7 +33794,9 @@ void main(void){
|
|
|
33730
33794
|
}
|
|
33731
33795
|
clearOnTransactionEnd() {
|
|
33732
33796
|
var t3, e3;
|
|
33733
|
-
|
|
33797
|
+
this.ctx.timingTargets.getTargets().forEach((t4) => {
|
|
33798
|
+
t4.hasPreset = false;
|
|
33799
|
+
}), (t3 = this.timing) === null || t3 === void 0 || t3.resetAllInteractiveSeq(), (e3 = this.timing) === null || e3 === void 0 || e3.destroy(), this.timing = void 0;
|
|
33734
33800
|
}
|
|
33735
33801
|
destroy() {
|
|
33736
33802
|
var t3, e3;
|
|
@@ -33757,11 +33823,11 @@ void main(void){
|
|
|
33757
33823
|
}
|
|
33758
33824
|
nextStep() {
|
|
33759
33825
|
var t3;
|
|
33760
|
-
this.hasTiming() && ((t3 = this.timing) === null || t3 === void 0 ? void 0 : t3.hasMainSeq()) ? this.globalEventHub.emit("shape slide onNext") : this.ctx.eventHub.emit(zR.requestNextSlide);
|
|
33826
|
+
this.hasTiming() && ((t3 = this.timing) === null || t3 === void 0 ? void 0 : t3.hasMainSeq()) ? (this.globalEventHub.emit("shape slide onStopAudio"), this.globalEventHub.emit("shape slide onNext")) : this.ctx.eventHub.emit(zR.requestNextSlide);
|
|
33761
33827
|
}
|
|
33762
33828
|
prevStep() {
|
|
33763
33829
|
var t3;
|
|
33764
|
-
this.hasTiming() && ((t3 = this.timing) === null || t3 === void 0 ? void 0 : t3.hasMainSeq()) ? this.globalEventHub.emit("shape slide onPrev") : this.ctx.eventHub.emit(zR.requestPrevSlide);
|
|
33830
|
+
this.hasTiming() && ((t3 = this.timing) === null || t3 === void 0 ? void 0 : t3.hasMainSeq()) ? (this.globalEventHub.emit("shape slide onStopAudio"), this.globalEventHub.emit("shape slide onPrev")) : this.ctx.eventHub.emit(zR.requestPrevSlide);
|
|
33765
33831
|
}
|
|
33766
33832
|
applyInteractiveAction(t3) {
|
|
33767
33833
|
var e3;
|
|
@@ -33949,7 +34015,7 @@ void main(void){
|
|
|
33949
34015
|
createCtx(t3) {
|
|
33950
34016
|
const { task: e3 } = this.stageStates[t3];
|
|
33951
34017
|
e3.addMTask(() => {
|
|
33952
|
-
const e4 = new aM(this.loader), n2 = new a.a(), i2 = { mode: this.mode, renderer: this.renderer, graphicsTexture: new gM(), stageWidth: 0, stageHeight: 0, ticker: this.ticker, timingTargets: new _M(n2), eventHub: n2, view: this.view, medias: Object.create(null), lastViewedIndex: 0, conflictTimeNodeManager: new vM(), clock: this.clock, spriteTexture: e4, slideIndex: t3, objectPoolGroup: this.objPoolGroup, hasBackgroundFillShape: false };
|
|
34018
|
+
const e4 = new aM(this.loader), n2 = new a.a(), i2 = { mode: this.mode, renderer: this.renderer, graphicsTexture: new gM(), stageWidth: 0, stageHeight: 0, ticker: this.ticker, timingTargets: new _M(n2), eventHub: n2, view: this.view, medias: Object.create(null), lastViewedIndex: 0, conflictTimeNodeManager: new vM(), clock: this.clock, spriteTexture: e4, slideIndex: t3, objectPoolGroup: this.objPoolGroup, hasBackgroundFillShape: false, slideScopeEventHub: new a.a() };
|
|
33953
34019
|
return this.stageCtxs[t3] = i2, Promise.resolve();
|
|
33954
34020
|
});
|
|
33955
34021
|
}
|
|
@@ -34152,12 +34218,16 @@ void main(void){
|
|
|
34152
34218
|
const n3 = t3.toString() + (this.isForward || e3 ? "-start" : "-end"), r4 = yield (i2 = this.snapshotCache) === null || i2 === void 0 ? void 0 : i2.getItem(n3);
|
|
34153
34219
|
u2 = r4 || this.getBase64(this.currentStage);
|
|
34154
34220
|
}
|
|
34155
|
-
r3.container.visible = false, this.app.stage.addChild(r3.container)
|
|
34221
|
+
r3.container.visible = false, this.app.stage.addChild(r3.container);
|
|
34222
|
+
let { transition: h2 } = r3.json;
|
|
34223
|
+
!this.isForward && (l2 == null ? void 0 : l2.json.transition) && (h2 = l2.json.transition), this.prevSlideBase64 && u2 && h2 && h2.type && l2 && r3 && (yield this.playTransaction(this.prevSlideBase64, u2, h2, l2, r3), this.prevSlideBase64 = null), this.isForward ? yield r3.startTiming() : r3.setMainSeqApplied(), this.updateResolution(this.config.resolution * this.scale), r3.container.visible = true, l2 && (l2.setMainSeqStep(0, "start"), l2.clearOnTransactionEnd(), this.app.stage.removeChild(l2.container)), r3.ctx.slideScopeEventHub.emit("slide-render", r3.ctx.slideIndex), this.emit(zR.renderEnd, t3), this.emit(zR.slideChange, t3), this.preload(t3 + 1).catch(() => {
|
|
34156
34224
|
}), this.preload(t3 - 1).catch(() => {
|
|
34157
34225
|
});
|
|
34158
34226
|
});
|
|
34159
34227
|
}
|
|
34160
34228
|
getBase64(t3) {
|
|
34229
|
+
if (!t3.container.transform)
|
|
34230
|
+
return null;
|
|
34161
34231
|
const e3 = Hy.create({ width: this.designWidth, height: this.designHeight, resolution: 1 });
|
|
34162
34232
|
this.app.renderer.render(t3.container, { renderTexture: e3 });
|
|
34163
34233
|
const n2 = this.app.renderer.plugins.extract.base64(e3, "image/jpeg");
|
|
@@ -34191,7 +34261,9 @@ void main(void){
|
|
|
34191
34261
|
}
|
|
34192
34262
|
updateResolution(t3) {
|
|
34193
34263
|
this.app.ticker.addOnce(() => {
|
|
34194
|
-
|
|
34264
|
+
let e3 = BR.isDesktop() ? t3 : 1;
|
|
34265
|
+
for (; e3 * this.designWidth > 2560 || e3 * this.designHeight > 2560; )
|
|
34266
|
+
e3 -= 0.1;
|
|
34195
34267
|
this.app.renderer.resolution = e3, this.app.renderer.plugins.interaction.resolution = this.app.renderer.resolution, this.app.renderer.resize(this.designWidth, this.designHeight);
|
|
34196
34268
|
});
|
|
34197
34269
|
}
|
|
@@ -34261,7 +34333,7 @@ void main(void){
|
|
|
34261
34333
|
this.app.ticker.start();
|
|
34262
34334
|
}
|
|
34263
34335
|
getSnapshot() {
|
|
34264
|
-
return this.currentStage
|
|
34336
|
+
return this.currentStage && this.getBase64(this.currentStage) || "";
|
|
34265
34337
|
}
|
|
34266
34338
|
createSnapshotForNextSlide(t3) {
|
|
34267
34339
|
var e3, n2;
|
|
@@ -35823,25 +35895,30 @@ void main(void){
|
|
|
35823
35895
|
}
|
|
35824
35896
|
var $C = { syncDispatch: "syncDispatch", syncReceive: "syncReceive", renderStart: "renderStart", renderEnd: "renderEnd", renderError: "renderError", slideChange: "slideChange", mainSeqStepStart: "mainSeqStepStart", mainSeqStepEnd: "mainSeqStepEnd", animateStart: "animateStart", animateEnd: "animateEnd", stateChange: "stateChange" }, QC = { taskId: "", url: "", currentSlideIndex: -1, mainSeqStep: -1, mainSeqState: null, mediaState: Object.create(null), interactiveSeqState: Object.create(null) }, tI = "";
|
|
35825
35897
|
try {
|
|
35826
|
-
tI = "0.2.
|
|
35898
|
+
tI = "0.2.2";
|
|
35827
35899
|
} catch (t3) {
|
|
35828
35900
|
tI = "dev";
|
|
35829
35901
|
}
|
|
35830
35902
|
var eI = function(t3) {
|
|
35831
35903
|
function e3(e4) {
|
|
35832
35904
|
var n2 = t3.call(this) || this;
|
|
35833
|
-
return n2.iosResetCache = [], n2.needClearCacheImage = false, n2.version = tI, n2.__slideState = Object(l.cloneDeep)(QC), n2.
|
|
35905
|
+
return n2.iosResetCache = [], n2.needClearCacheImage = false, n2.version = tI, n2.__slideState = Object(l.cloneDeep)(QC), n2.userInputTime = 0, n2.isSyncingSlideState = false, n2.resize = false, n2.isAnimating = false, n2.renderingTaskManager = new LP(), n2.isLoading = false, n2.interactive = true, n2.frameWidth = 1, n2.frameHeight = 1, n2.frame = document.createElement("div"), n2.medianController = document.createElement("div"), n2.frameResizeObserver = new ZC(function() {
|
|
35834
35906
|
return n2.frameResizeHandler();
|
|
35835
35907
|
}), n2.timestamp = function() {
|
|
35836
35908
|
return Date.now();
|
|
35837
|
-
}, n2.mode = "local", n2.enableGlobalClick = false, n2.log = "", n2.logId = "", n2.lastEmitedState = null, n2.playerController = null, n2.lock = new jC(), n2.isInitResized = false, n2.cacheImage = document.createElement("img"), n2.isFrowning = false, n2.isReleasing = false, n2.designWidth = 0, n2.designHeight = 0, n2._slideCount = 0, n2.userInputHandle = function() {
|
|
35838
|
-
n2.
|
|
35839
|
-
|
|
35840
|
-
}, 100);
|
|
35841
|
-
}, n2.handleViewClick = function(t4) {
|
|
35909
|
+
}, n2.mode = "local", n2.enableGlobalClick = false, n2.log = "", n2.logId = "", n2.lastEmitedState = null, n2.playerController = null, n2.lock = new jC(), n2.isInitResized = false, n2.cacheImage = document.createElement("img"), n2.isFrowning = false, n2.isReleasing = false, n2.isTouchStart = false, n2.touchStartId = void 0, n2.designWidth = 0, n2.designHeight = 0, n2._slideCount = 0, n2.userInputHandle = function() {
|
|
35910
|
+
n2.userInputTime = Date.now();
|
|
35911
|
+
}, n2.handleViewClick = function() {
|
|
35842
35912
|
setTimeout(function() {
|
|
35843
|
-
|
|
35913
|
+
var t4 = Date.now();
|
|
35914
|
+
Math.abs(t4 - n2.userInputTime) > 500 && n2.enableGlobalClick && n2.nextStep();
|
|
35844
35915
|
});
|
|
35916
|
+
}, n2.handleViewTouchStart = function() {
|
|
35917
|
+
window.clearTimeout(n2.touchStartId), n2.isTouchStart = true, n2.touchStartId = setTimeout(function() {
|
|
35918
|
+
n2.isTouchStart = false;
|
|
35919
|
+
}, 350);
|
|
35920
|
+
}, n2.handleViewTouchEnd = function() {
|
|
35921
|
+
n2.isTouchStart && (n2.isTouchStart = false, n2.handleViewClick());
|
|
35845
35922
|
}, n2.persistLog = function() {
|
|
35846
35923
|
return XC(n2, void 0, void 0, function() {
|
|
35847
35924
|
var t4, e5;
|
|
@@ -35943,44 +36020,44 @@ void main(void){
|
|
|
35943
36020
|
}), n2.renderingTaskManager.eventHub.on("task-error", function(t4) {
|
|
35944
36021
|
var e5 = t4.error, i2 = t4.task;
|
|
35945
36022
|
n2.emit($C.renderError, { error: e5, index: i2.slideIndex });
|
|
35946
|
-
}), window.addEventListener("__slide_log__", n2.handleLogDownload), window.addEventListener("__slide_state__", n2.handleSlideStateLog), window.addEventListener("__slide_ref__", n2.handleSlideRef), n2.persistLogId = window.setInterval(n2.persistLog, 5e3), n2.resizeView = Object(l.debounce)(n2.resizeView.bind(n2), 50), n2.player = n2.initPlayer(e4), n2.player.view && n2.frame.appendChild(n2.player.view), n2;
|
|
36023
|
+
}), window.addEventListener("__slide_log__", n2.handleLogDownload), window.addEventListener("__slide_state__", n2.handleSlideStateLog), window.addEventListener("__slide_ref__", n2.handleSlideRef), n2.persistLogId = window.setInterval(n2.persistLog, 5e3), n2.resizeView = Object(l.debounce)(n2.resizeView.bind(n2), 50), n2.player = n2.initPlayer(e4), n2.player.view && n2.frame.appendChild(n2.player.view), n2.handleViewClick = Object(l.debounce)(n2.handleViewClick, 300), n2;
|
|
35947
36024
|
}
|
|
35948
36025
|
return VC(e3, t3), e3.prototype.initPlayer = function(t4) {
|
|
35949
|
-
var e4, n2 = this,
|
|
35950
|
-
return
|
|
35951
|
-
|
|
35952
|
-
}),
|
|
35953
|
-
|
|
35954
|
-
}),
|
|
35955
|
-
|
|
35956
|
-
}),
|
|
35957
|
-
|
|
35958
|
-
}),
|
|
35959
|
-
|
|
35960
|
-
}),
|
|
35961
|
-
var e5 = t5.id,
|
|
35962
|
-
|
|
35963
|
-
}),
|
|
35964
|
-
|
|
35965
|
-
}),
|
|
35966
|
-
|
|
35967
|
-
}),
|
|
35968
|
-
var e5 = t5.action,
|
|
35969
|
-
|
|
35970
|
-
}),
|
|
35971
|
-
|
|
35972
|
-
}),
|
|
35973
|
-
|
|
35974
|
-
}),
|
|
35975
|
-
var e5 = { type: "play", time:
|
|
35976
|
-
|
|
35977
|
-
}),
|
|
36026
|
+
var e4, n2, i2, r3 = this, o3 = new jR(this.mode);
|
|
36027
|
+
return o3.setInteractive(this.interactive), o3.updateConfig(t4.renderOptions || {}), o3.on(zR.renderStart, function(t5) {
|
|
36028
|
+
r3.isLoading = true, r3.emit($C.renderStart, t5);
|
|
36029
|
+
}), o3.on(zR.renderEnd, function(t5) {
|
|
36030
|
+
r3.isLoading = false, r3.player && (r3.designHeight = r3.player.designHeight, r3.designWidth = r3.player.designWidth, r3.cacheImage.style.width = r3.player.designWidth + "px", r3.cacheImage.style.height = r3.player.designHeight + "px", r3._slideCount = r3.player.slideCount), r3.emit($C.renderEnd, t5);
|
|
36031
|
+
}), o3.on(zR.slideChange, function(t5) {
|
|
36032
|
+
r3.__slideState.currentSlideIndex = t5, r3.emit($C.slideChange, t5);
|
|
36033
|
+
}), o3.on(zR.mainSeqStateChange, function(t5) {
|
|
36034
|
+
r3.__slideState.mainSeqState = t5, r3.emitStateChange();
|
|
36035
|
+
}), o3.on(zR.mainSeqStepChange, function(t5) {
|
|
36036
|
+
r3.__slideState.mainSeqStep = t5, r3.emitStateChange();
|
|
36037
|
+
}), o3.on(zR.interactiveSeqStateChange, function(t5) {
|
|
36038
|
+
var e5 = t5.id, n3 = t5.state;
|
|
36039
|
+
r3.__slideState.interactiveSeqState[e5] = n3, r3.emitStateChange();
|
|
36040
|
+
}), o3.on(zR.animateStart, function() {
|
|
36041
|
+
r3.isAnimating !== true && (r3.isAnimating = true, r3.emit($C.animateStart));
|
|
36042
|
+
}), o3.on(zR.animateEnd, function() {
|
|
36043
|
+
r3.isAnimating !== false && (r3.isAnimating = false, r3.emit($C.animateEnd));
|
|
36044
|
+
}), o3.on(zR.interactiveSeqAction, function(t5) {
|
|
36045
|
+
var e5 = t5.action, n3 = t5.seqId;
|
|
36046
|
+
r3.emitSyncDispatch({ slideIndex: r3.__slideState.currentSlideIndex, type: "interactiveAnim", action: e5, seqId: n3 }), r3.emitStateChange();
|
|
36047
|
+
}), o3.on(zR.mainSeqStepStart, function(t5) {
|
|
36048
|
+
r3.emit($C.mainSeqStepStart, t5);
|
|
36049
|
+
}), o3.on(zR.mainSeqStepEnd, function(t5) {
|
|
36050
|
+
r3.emit($C.mainSeqStepEnd, t5);
|
|
36051
|
+
}), o3.on(zR.mediaPlay, function(t5) {
|
|
36052
|
+
var e5 = { type: "play", time: r3.timestamp() - 1e3 * t5.time };
|
|
36053
|
+
r3.__slideState.mediaState[t5.id] = e5, r3.emitSyncDispatch({ slideIndex: r3.__slideState.currentSlideIndex, type: "mediaPlay", id: t5.id, state: e5 }), r3.emitStateChange();
|
|
36054
|
+
}), o3.on(zR.mediaPause, function(t5) {
|
|
35978
36055
|
var e5 = { type: "pause", time: t5.time };
|
|
35979
|
-
|
|
35980
|
-
}),
|
|
36056
|
+
r3.__slideState.mediaState[t5.id] = e5, r3.emitSyncDispatch({ slideIndex: r3.__slideState.currentSlideIndex, type: "mediaPause", id: t5.id, state: e5 }), r3.emitStateChange();
|
|
36057
|
+
}), o3.on(zR.mediaSeek, function(t5) {
|
|
35981
36058
|
var e5 = { type: "pause", time: 0 };
|
|
35982
|
-
t5.isPlaying ? (e5.type = "play",
|
|
35983
|
-
}),
|
|
36059
|
+
t5.isPlaying ? (e5.type = "play", r3.__slideState.mediaState[t5.id] ? e5.time = r3.__slideState.mediaState[t5.id].time - 1e3 * t5.time : e5.time = r3.timestamp() - 1e3 * t5.time, r3.__slideState.mediaState[t5.id] = e5) : (e5.type = "pause", e5.time = t5.time, r3.__slideState.mediaState[t5.id] = e5), r3.emitSyncDispatch({ slideIndex: r3.__slideState.currentSlideIndex, type: "mediaSeek", id: t5.id, time: t5.time, state: e5 }), r3.emitStateChange();
|
|
36060
|
+
}), o3.on(zR.requestPrevSlide, this.handlePrevSlide), o3.on(zR.requestNextSlide, this.handleNextSlide), o3.on(zR.requestGotoSlide, this.handleGotoSlide), (e4 = o3.view) === null || e4 === void 0 || e4.addEventListener("touchend", this.handleViewTouchEnd), (n2 = o3.view) === null || n2 === void 0 || n2.addEventListener("touchstart", this.handleViewTouchStart), (i2 = o3.view) === null || i2 === void 0 || i2.addEventListener("click", this.handleViewClick), o3.on(zR.userInput, this.userInputHandle), (t4 == null ? void 0 : t4.controller) && this.createController(), o3;
|
|
35984
36061
|
}, e3.prototype.createController = function() {
|
|
35985
36062
|
this.player && (this.playerController = new HC({ player: this.player, params: this.player.config || {}, target: this.frame }));
|
|
35986
36063
|
}, e3.prototype.setMedianControllerAttribute = function() {
|
|
@@ -36003,7 +36080,7 @@ void main(void){
|
|
|
36003
36080
|
return qC(this, function(s3) {
|
|
36004
36081
|
switch (s3.label) {
|
|
36005
36082
|
case 0:
|
|
36006
|
-
return this.log += "=== stateChange receive [" + new Date().toISOString() + "] ===\n", this.log += JSON.stringify(t4, null, 2), this.log += "\n\n", t4.taskId && t4.taskId !== this.__slideState.taskId && (this.__slideState.taskId = t4.taskId, (e4 = this.player) === null || e4 === void 0 || e4.setResourceData(t4.taskId, this.__slideState.url)), t4.url && t4.url !== this.__slideState.url && (this.__slideState.url = t4.url, (n2 = this.player) === null || n2 === void 0 || n2.setResourceData(this.__slideState.taskId, t4.url)), Number.isInteger(t4.currentSlideIndex) && t4.currentSlideIndex !== this.__slideState.currentSlideIndex ? (this.__slideState.currentSlideIndex = t4.currentSlideIndex, [4, this.doRenderSlide(t4.currentSlideIndex)]) : [3, 2];
|
|
36083
|
+
return this.isSyncingSlideState = true, this.log += "=== stateChange receive [" + new Date().toISOString() + "] ===\n", this.log += JSON.stringify(t4, null, 2), this.log += "\n\n", t4.taskId && t4.taskId !== this.__slideState.taskId && (this.__slideState.taskId = t4.taskId, (e4 = this.player) === null || e4 === void 0 || e4.setResourceData(t4.taskId, this.__slideState.url)), t4.url && t4.url !== this.__slideState.url && (this.__slideState.url = t4.url, (n2 = this.player) === null || n2 === void 0 || n2.setResourceData(this.__slideState.taskId, t4.url)), Number.isInteger(t4.currentSlideIndex) && t4.currentSlideIndex !== this.__slideState.currentSlideIndex ? (this.__slideState.currentSlideIndex = t4.currentSlideIndex, [4, this.doRenderSlide(t4.currentSlideIndex)]) : [3, 2];
|
|
36007
36084
|
case 1:
|
|
36008
36085
|
s3.sent(), s3.label = 2;
|
|
36009
36086
|
case 2:
|
|
@@ -36012,7 +36089,7 @@ void main(void){
|
|
|
36012
36089
|
return ((e5 = o3.player) === null || e5 === void 0 ? void 0 : e5.currentIndex) === t4.currentSlideIndex && ((n3 = o3.player) === null || n3 === void 0 ? void 0 : n3.currentStage);
|
|
36013
36090
|
}, 3e3)];
|
|
36014
36091
|
case 3:
|
|
36015
|
-
return s3.sent(), r3 = false, Number.isInteger(t4.mainSeqStep) && t4.mainSeqStep !== this.__slideState.mainSeqStep && (r3 = true, this.__slideState.mainSeqStep = t4.mainSeqStep), t4.mainSeqState && t4.mainSeqState !== this.__slideState.mainSeqState && (r3 = true, this.__slideState.mainSeqState = t4.mainSeqState), r3 && this.setMainSeqStep(this.__slideState.mainSeqStep, this.__slideState.mainSeqState === "idle" ? "start" : "end"), t4.mediaState && (this.initMedia(t4), this.__slideState.mediaState = t4.mediaState), t4.interactiveSeqState && (this.initInteractiveSeq(t4), this.__slideState.interactiveSeqState = t4.interactiveSeqState), [2];
|
|
36092
|
+
return s3.sent(), r3 = false, Number.isInteger(t4.mainSeqStep) && t4.mainSeqStep !== this.__slideState.mainSeqStep && (r3 = true, this.__slideState.mainSeqStep = t4.mainSeqStep), t4.mainSeqState && t4.mainSeqState !== this.__slideState.mainSeqState && (r3 = true, this.__slideState.mainSeqState = t4.mainSeqState), r3 && this.setMainSeqStep(this.__slideState.mainSeqStep, this.__slideState.mainSeqState === "idle" ? "start" : "end"), t4.mediaState && (this.initMedia(t4), this.__slideState.mediaState = t4.mediaState), t4.interactiveSeqState && (this.initInteractiveSeq(t4), this.__slideState.interactiveSeqState = t4.interactiveSeqState), this.isSyncingSlideState = false, [2];
|
|
36016
36093
|
}
|
|
36017
36094
|
});
|
|
36018
36095
|
});
|
|
@@ -36137,7 +36214,7 @@ void main(void){
|
|
|
36137
36214
|
}, e3.prototype.isSlideStateReady = function(t4) {
|
|
36138
36215
|
return t4.taskId.length > 0 && t4.url.length > 0 && t4.currentSlideIndex > 0;
|
|
36139
36216
|
}, e3.prototype.emitStateChange = function() {
|
|
36140
|
-
if (this.mode !== "local") {
|
|
36217
|
+
if (this.mode !== "local" && !this.isSyncingSlideState) {
|
|
36141
36218
|
var t4 = this.slideState;
|
|
36142
36219
|
!Object(l.isEqual)(this.lastEmitedState, t4) && this.isSlideStateReady(t4) && (this.lastEmitedState = t4, this.emit($C.stateChange, t4), this.log += "=== stateChange dispatch [" + new Date().toISOString() + "] ===\n", this.log += JSON.stringify(this.slideState, null, 2), this.log += "\n\n");
|
|
36143
36220
|
}
|
|
@@ -37794,6 +37871,9 @@ class DocsViewer {
|
|
|
37794
37871
|
$pageNumberInput.disabled = true;
|
|
37795
37872
|
}
|
|
37796
37873
|
this.$pageNumberInput = $pageNumberInput;
|
|
37874
|
+
this.sideEffect.addEventListener($pageNumberInput, "focus", () => {
|
|
37875
|
+
$pageNumberInput.select();
|
|
37876
|
+
});
|
|
37797
37877
|
this.sideEffect.addEventListener($pageNumberInput, "change", () => {
|
|
37798
37878
|
if (this.readonly) {
|
|
37799
37879
|
return;
|
|
@@ -37980,7 +38060,7 @@ class SlideDocsViewer {
|
|
|
37980
38060
|
return `${this.namespace}-${className}`;
|
|
37981
38061
|
}
|
|
37982
38062
|
}
|
|
37983
|
-
var styles = ".netless-app-slide-content{position:relative;height:100%;overflow:hidden}.netless-app-slide-preview-mask{display:none;position:absolute;z-index:200;top:0;left:0;width:100%;height:100%}.netless-app-slide-preview{display:flex;flex-direction:column;align-items:center;position:absolute;z-index:300;top:0;left:0;width:33%;max-width:200px;height:100%;padding-top:10px;transform:translate(-100%);background:rgba(237,237,240,.9);box-shadow:inset -1px 0 #0000001c;transition:transform .4s}.netless-app-slide-preview-active .netless-app-slide-preview-mask{display:block}.netless-app-slide-preview-active .netless-app-slide-preview{transform:translate(0)}.netless-app-slide-preview-page{position:relative;display:block;width:55%;margin-bottom:10px;font-size:0;color:transparent;outline:none;border:7px solid transparent;border-radius:4px;transition:border-color .3s;user-select:none}.netless-app-slide-preview-page:hover,.netless-app-slide-preview-page.netless-app-slide-preview-page-active{border-color:#444e601a}.netless-app-slide-preview-page>img{width:100%;height:auto;box-sizing:border-box;border:1px solid rgba(0,0,0,.5);border-radius:1px;background-color:#fff;box-shadow:0 2px 8px #0000004d}.netless-app-slide-preview-page-name{position:absolute;top:1px;left:-10px;transform:translate(-100%);text-align:right;font-size:12px;color:#5f5f5f;user-select:none}.netless-app-slide-footer{box-sizing:border-box;height:26px;display:flex;align-items:center;padding:0 16px;border-top:1px solid #eeeef7;color:#191919}.netless-app-slide-float-footer{width:100%;min-height:26px;position:absolute;left:0;bottom:0;z-index:2000;background:rgba(249,249,252,.9);transition:opacity .4s}.netless-app-slide-footer-btn{box-sizing:border-box;width:26px;height:26px;font-size:0;margin:0;padding:3px;border:none;border-radius:1px;outline:none;color:currentColor;background:transparent;transition:background .4s;cursor:pointer;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.netless-app-slide-footer-btn:hover{background:rgba(237,237,240,.9)}@media (hover: none){.netless-app-slide-footer-btn:hover{background:transparent!important}}.netless-app-slide-footer-btn>svg{width:100%;height:100%}.netless-app-slide-footer-btn>svg:nth-of-type(2){display:none}.netless-app-slide-footer-btn.netless-app-slide-footer-btn-playing>svg:nth-of-type(1){display:none}.netless-app-slide-footer-btn.netless-app-slide-footer-btn-playing>svg:nth-of-type(2){display:initial}.netless-app-slide-footer-btn~.netless-app-slide-footer-btn{margin-left:15px}.netless-app-slide-page-jumps{flex:1;display:flex;justify-content:center;align-items:center}.netless-app-slide-page-number{margin-left:auto;font-size:13px;user-select:none;white-space:nowrap;word-break:keep-all}.netless-app-slide-page-number-input{border:none;outline:none;width:
|
|
38063
|
+
var styles = ".netless-app-slide-content{position:relative;height:100%;overflow:hidden}.netless-app-slide-preview-mask{display:none;position:absolute;z-index:200;top:0;left:0;width:100%;height:100%}.netless-app-slide-preview{display:flex;flex-direction:column;align-items:center;position:absolute;z-index:300;top:0;left:0;width:33%;max-width:200px;height:100%;padding-top:10px;transform:translate(-100%);background:rgba(237,237,240,.9);box-shadow:inset -1px 0 #0000001c;transition:transform .4s}.netless-app-slide-preview-active .netless-app-slide-preview-mask{display:block}.netless-app-slide-preview-active .netless-app-slide-preview{transform:translate(0)}.netless-app-slide-preview-page{position:relative;display:block;width:55%;margin-bottom:10px;font-size:0;color:transparent;outline:none;border:7px solid transparent;border-radius:4px;transition:border-color .3s;user-select:none}.netless-app-slide-preview-page:hover,.netless-app-slide-preview-page.netless-app-slide-preview-page-active{border-color:#444e601a}.netless-app-slide-preview-page>img{width:100%;height:auto;box-sizing:border-box;border:1px solid rgba(0,0,0,.5);border-radius:1px;background-color:#fff;box-shadow:0 2px 8px #0000004d}.netless-app-slide-preview-page-name{position:absolute;top:1px;left:-10px;transform:translate(-100%);text-align:right;font-size:12px;color:#5f5f5f;user-select:none}.netless-app-slide-footer{box-sizing:border-box;height:26px;display:flex;align-items:center;padding:0 16px;border-top:1px solid #eeeef7;color:#191919}.netless-app-slide-float-footer{width:100%;min-height:26px;position:absolute;left:0;bottom:0;z-index:2000;background:rgba(249,249,252,.9);transition:opacity .4s}.netless-app-slide-footer-btn{box-sizing:border-box;width:26px;height:26px;font-size:0;margin:0;padding:3px;border:none;border-radius:1px;outline:none;color:currentColor;background:transparent;transition:background .4s;cursor:pointer;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.netless-app-slide-footer-btn:hover{background:rgba(237,237,240,.9)}@media (hover: none){.netless-app-slide-footer-btn:hover{background:transparent!important}}.netless-app-slide-footer-btn>svg{width:100%;height:100%}.netless-app-slide-footer-btn>svg:nth-of-type(2){display:none}.netless-app-slide-footer-btn.netless-app-slide-footer-btn-playing>svg:nth-of-type(1){display:none}.netless-app-slide-footer-btn.netless-app-slide-footer-btn-playing>svg:nth-of-type(2){display:initial}.netless-app-slide-footer-btn~.netless-app-slide-footer-btn{margin-left:15px}.netless-app-slide-page-jumps{flex:1;display:flex;justify-content:center;align-items:center}.netless-app-slide-page-number{margin-left:auto;font-size:13px;user-select:none;white-space:nowrap;word-break:keep-all}.netless-app-slide-page-number-input{border:none;outline:none;width:3em;margin:0;padding:0 2px;text-align:right;font-size:13px;line-height:1;font-weight:400;font-family:inherit;border-radius:2px;color:currentColor;background:transparent;transition:background .4s;user-select:text;-webkit-tap-highlight-color:rgba(0,0,0,0)}.netless-app-slide-page-number-input:hover,.netless-app-slide-page-number-input:focus,.netless-app-slide-page-number-input:active{background:#fff;box-shadow:#63636333 0 2px 8px}.netless-app-slide-readonly.netless-app-slide-footer{display:none}.telebox-color-scheme-dark .netless-app-slide-page-number-input{color:#a6a6a8}.telebox-color-scheme-dark .netless-app-slide-page-number-input:active,.telebox-color-scheme-dark .netless-app-slide-page-number-input:focus,.telebox-color-scheme-dark .netless-app-slide-page-number-input:hover{color:#222}.telebox-color-scheme-dark .netless-app-slide-footer{color:#a6a6a8;background:#2d2d33;border-top:none}.telebox-color-scheme-dark .netless-app-slide-footer-btn:hover{background:#212126}.telebox-color-scheme-dark .netless-app-slide-preview{background:rgba(50,50,50,.9)}.netless-app-slide-wb-view{position:absolute;top:0;left:0;width:100%;height:100%;z-index:100;overflow:hidden}.netless-app-slide-slide{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.netless-app-slide-slide canvas{transform:scale(var(--netless-app-slide-scale, 1))}\n";
|
|
37984
38064
|
function previewSlide({
|
|
37985
38065
|
container,
|
|
37986
38066
|
taskId,
|
|
@@ -38137,7 +38217,7 @@ class SlidePreviewer {
|
|
|
38137
38217
|
return `${this.namespace}-${className}`;
|
|
38138
38218
|
}
|
|
38139
38219
|
}
|
|
38140
|
-
const version = "0.0.
|
|
38220
|
+
const version = "0.0.56";
|
|
38141
38221
|
const SlideApp = {
|
|
38142
38222
|
kind: "Slide",
|
|
38143
38223
|
setup(context) {
|
|
@@ -38184,7 +38264,15 @@ const SlideApp = {
|
|
|
38184
38264
|
if (useFreezer)
|
|
38185
38265
|
apps.set(context.appId, slideController);
|
|
38186
38266
|
((_a = logger.apps)[_b = context.appId] || (_a[_b] = {})).controller = slideController;
|
|
38187
|
-
slideController.readyPromise.then(options.onReady)
|
|
38267
|
+
slideController.readyPromise.then(options.onReady).then(() => {
|
|
38268
|
+
const room2 = context.getRoom();
|
|
38269
|
+
let synced = false;
|
|
38270
|
+
if (room2 && context.getIsWritable()) {
|
|
38271
|
+
syncSceneWithSlide(room2, context, slideController.slide, baseScenePath);
|
|
38272
|
+
synced = true;
|
|
38273
|
+
}
|
|
38274
|
+
log("[Slide] page to", slideController.slide.slideState.currentSlideIndex, synced);
|
|
38275
|
+
});
|
|
38188
38276
|
return slideController;
|
|
38189
38277
|
};
|
|
38190
38278
|
docsViewer = new SlideDocsViewer({
|