@netless/app-slide 0.2.96 → 0.2.98

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.es.js CHANGED
@@ -10713,9 +10713,9 @@ var Slide = function(t) {
10713
10713
  }, function(t, e) {
10714
10714
  t.exports = "precision mediump float;\nvarying vec2 vTextureCoord;\nvarying vec2 filterCoord;\nuniform vec4 uShapeFilterArea;\nuniform sampler2D uSampler;\nuniform sampler2D uSdfSampler;\nuniform float uSdfIsReady;\nuniform float uSdfMaxDis;\nuniform float uRad;\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\nvoid main() {\n vec4 texColor = texture2D(uSampler, vTextureCoord);\n float alpha = max(texColor.a, 0.00001);\n texColor /= alpha;\n if (uSdfIsReady > 0.5) {\n float dx = uShapeFilterArea.x < 0.0 ? -uShapeFilterArea.x : 0.0;\n float dy = uShapeFilterArea.y < 0.0 ? -uShapeFilterArea.y : 0.0;\n vec2 cod = vec2((filterCoord.x + dx) / uShapeFilterArea.z, (filterCoord.y + dy) / uShapeFilterArea.w);\n vec4 sdfColor = texture2D(uSdfSampler, cod);\n float dis = sdfColor.a * uSdfMaxDis;\n if (texColor.a > 0.0392156862745098) {\n if (dis <= (uRad / 2.0)) {\n float a = smoothstep(0.0, uRad / 2.0, dis) * 0.1;\n texColor.rgb *= a;\n texColor.a = a;\n }\n else if ((dis > (uRad / 2.0)) && (dis < (uRad * 1.2))) {\n float a = (smoothstep(uRad / 2.0, uRad * 1.2, dis) * 0.9) + 0.1;\n texColor.rgb *= a;\n texColor.a = a;\n }\n }\n else {\n texColor.rgba *= 0.0;\n }\n }\n texColor *= alpha;\n gl_FragColor = texColor;\n}\n";
10715
10715
  }, function(t, e) {
10716
- t.exports = "varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 uColor;\nvoid main() {\n vec4 sourceColor = texture2D(uSampler, vTextureCoord);\n if (sourceColor.a == 0.0) {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\n }\n else {\n gl_FragColor = uColor * sourceColor.a;\n }\n}\n";
10716
+ t.exports = "precision mediump float;\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 uColor;\nvoid main() {\n vec4 sourceColor = texture2D(uSampler, vTextureCoord);\n if (sourceColor.a == 0.0) {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\n }\n else {\n gl_FragColor = uColor * sourceColor.a;\n }\n}\n";
10717
10717
  }, function(t, e) {
10718
- t.exports = "varying vec2 vTextureCoord;\nuniform vec4 inputSize;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\nuniform float uStartAlpha;\nuniform float uEndAlpha;\nuniform float uStartPos;\nuniform float uEndPos;\nuniform float uHeight;\nvoid main() {\n vec4 sourceColor = texture2D(uSampler, vTextureCoord);\n vec2 cod = vTextureCoord * inputSize.xy;\n float startY = uStartPos * uHeight;\n float endY = uEndPos * uHeight;\n if ((cod.y >= startY) && (cod.y <= endY)) {\n float alpha = uStartAlpha - (((cod.y - startY) / (endY - startY)) * (uStartAlpha - uEndAlpha));\n gl_FragColor = sourceColor * alpha;\n }\n else {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\n }\n}\n";
10718
+ t.exports = "precision mediump float;\nvarying vec2 vTextureCoord;\nuniform vec4 inputSize;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\nuniform float uStartAlpha;\nuniform float uEndAlpha;\nuniform float uStartPos;\nuniform float uEndPos;\nuniform float uHeight;\nvoid main() {\n vec4 sourceColor = texture2D(uSampler, vTextureCoord);\n vec2 cod = vTextureCoord * inputSize.xy;\n float startY = uStartPos * uHeight;\n float endY = uEndPos * uHeight;\n if ((cod.y >= startY) && (cod.y <= endY)) {\n float alpha = uStartAlpha - (((cod.y - startY) / (endY - startY)) * (uStartAlpha - uEndAlpha));\n gl_FragColor = sourceColor * alpha;\n }\n else {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\n }\n}\n";
10719
10719
  }, function(t, e) {
10720
10720
  t.exports = "precision mediump float;\nvarying vec2 vTextureCoord;\nuniform vec4 inputSize;\nvarying vec2 filterCoord;\nuniform vec4 uShapeFilterArea;\nuniform sampler2D uSampler;\nvoid main() {\n vec4 texColor = texture2D(uSampler, vTextureCoord);\n if (texColor.r > 0.0) {\n vec2 translateCoord = vec2(filterCoord.x + 10.0, filterCoord.y);\n vec4 translateColor = texture2D(uSampler, translateCoord * inputSize.zw);\n if (translateColor.a > 0.0) {\n gl_FragColor = texColor;\n }\n else {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n else {\n gl_FragColor = texColor;\n }\n}\n";
10721
10721
  }, function(t, e, i) {
@@ -28577,12 +28577,49 @@ void main() {
28577
28577
  });
28578
28578
  }
28579
28579
  class Lm {
28580
- constructor(t2, e2, i2, n2, r2, o2, s2) {
28581
- this.timeout = 15e3, this.useCache = false, this.taskId = "", this.delegate = null, this.urlInterrupter = null, this.useCache = e2, this.localStorage = t2, this.logger = i2, this.tracker = n2, this.timeout = r2, this.delegate = o2 || null, this.urlInterrupter = s2 || null;
28580
+ constructor(t2, e2, i2, n2, r2, o2, s2, a2, l2) {
28581
+ this.timeout = 15e3, this.useCache = false, this.taskId = "", this.delegate = null, this.urlInterrupter = null, this.resourceMaxRetries = 3, this.retryBaseDelay = 1e3, this.useCache = e2, this.localStorage = t2, this.logger = i2, this.tracker = n2, this.timeout = r2, this.delegate = o2 || null, this.urlInterrupter = s2 || null, "number" == typeof a2 && Number.isFinite(a2) && (this.resourceMaxRetries = Math.max(0, Math.floor(a2))), this.onResourceMaxRetries = l2;
28582
28582
  }
28583
28583
  attachTaskId(t2) {
28584
28584
  this.taskId = t2;
28585
28585
  }
28586
+ normalizeError(t2) {
28587
+ return t2 instanceof Error ? t2 : new Error(String(t2));
28588
+ }
28589
+ delay(t2) {
28590
+ return Om(this, void 0, void 0, function* () {
28591
+ yield new Promise((e2) => setTimeout(e2, t2));
28592
+ });
28593
+ }
28594
+ fetchWithRetry(t2, e2) {
28595
+ return Om(this, void 0, void 0, function* () {
28596
+ const i2 = this.resourceMaxRetries, n2 = i2 + 1, r2 = Date.now();
28597
+ let o2 = new Tm(gm.ResourceError, `"${t2}" loaded failed"`);
28598
+ for (let i3 = 0; i3 < n2; i3++) {
28599
+ const s3 = Date.now();
28600
+ try {
28601
+ return yield e2();
28602
+ } catch (e3) {
28603
+ o2 = this.normalizeError(e3);
28604
+ const a2 = i3 + 1, l2 = Date.now() - s3, h2 = Date.now() - r2;
28605
+ if (a2 >= n2)
28606
+ break;
28607
+ const u2 = this.retryBaseDelay * a2;
28608
+ this.logger.warn(`load resource failed, request ${a2}/${n2},
28609
+ attemptTime: ${l2}ms, totalElapsed: ${h2}ms,
28610
+ retry in ${u2}ms. ${t2}, error: ${o2}`, this.taskId || ""), yield this.delay(u2);
28611
+ }
28612
+ }
28613
+ const s2 = Date.now() - r2;
28614
+ if (this.logger.error(`load resource failed after ${i2} retries (${n2} requests), totalElapsed: ${s2}ms. ${t2}, error: ${o2}`, this.taskId || ""), this.onResourceMaxRetries)
28615
+ try {
28616
+ this.onResourceMaxRetries(t2, o2);
28617
+ } catch (e3) {
28618
+ this.logger.warn(`onResourceMaxRetries callback error. ${t2}, error: ${this.normalizeError(e3)}`, this.taskId || "");
28619
+ }
28620
+ throw o2;
28621
+ });
28622
+ }
28586
28623
  fetchJson(t2) {
28587
28624
  return Om(this, void 0, void 0, function* () {
28588
28625
  const e2 = Date.now();
@@ -28606,13 +28643,15 @@ void main() {
28606
28643
  throw new Tm(gm.ResourceError, `"${n2}" loaded timeout"`);
28607
28644
  t3 = JSON.parse(o2), this.tracker({ name: "slideResourceLoad", result: "success", reason: "", payload: { duration: Date.now() - e2, url: i2, type: "json", channel: "delegate" } });
28608
28645
  } catch (t4) {
28609
- throw this.tracker({ name: "slideResourceLoad", result: "fail", reason: t4 + "", payload: { duration: Date.now() - e2, url: i2, type: "json", channel: "delegate" } }), new Tm(gm.ResourceError, `"${n2}" loaded timeout"`);
28646
+ throw this.tracker({ name: "slideResourceLoad", result: "fail", reason: t4 + "", payload: { duration: Date.now() - e2, url: i2, type: "json", channel: "delegate" } }), t4;
28610
28647
  }
28611
28648
  } else {
28612
28649
  this.logger.info("load resource from server. " + n2, this.taskId || "");
28613
28650
  const r3 = Date.now();
28614
28651
  try {
28615
- t3 = yield (yield Nm("" + i2, this.timeout)).json();
28652
+ t3 = yield this.fetchWithRetry(i2, () => Om(this, void 0, void 0, function* () {
28653
+ return (yield Nm("" + i2, this.timeout)).json();
28654
+ }));
28616
28655
  } catch (t4) {
28617
28656
  throw this.tracker({ name: "slideResourceLoad", result: "fail", reason: t4 + "", payload: { duration: Date.now() - e2, url: i2, type: "json", channel: "fetch" } }), t4;
28618
28657
  }
@@ -28649,16 +28688,20 @@ void main() {
28649
28688
  throw new Tm(gm.ResourceError, `"${r2}" loaded timeout"`);
28650
28689
  this.tracker({ name: "slideResourceLoad", result: "success", reason: "", payload: { duration: Date.now() - i2, url: n2, type: "image", channel: "delegate" } });
28651
28690
  } catch (t4) {
28652
- this.tracker({ name: "slideResourceLoad", result: "fail", reason: t4 + "", payload: { duration: Date.now() - i2, url: n2, type: "image", channel: "delegate" } });
28691
+ throw this.tracker({ name: "slideResourceLoad", result: "fail", reason: t4 + "", payload: { duration: Date.now() - i2, url: n2, type: "image", channel: "delegate" } }), t4;
28653
28692
  }
28654
28693
  else
28655
28694
  try {
28656
28695
  this.logger.info("load resource from server. " + r2, this.taskId || "");
28657
- const e3 = Date.now(), o3 = yield Nm(n2, this.timeout);
28658
- this.logger.info(`load resource from server end. ${r2}, time: ${Date.now() - e3}`, this.taskId || ""), t3 = yield o3.blob(), this.tracker({ name: "slideResourceLoad", result: "success", reason: "", payload: { duration: Date.now() - i2, url: n2, type: "image", channel: "fetch" } });
28696
+ const e3 = Date.now();
28697
+ t3 = yield this.fetchWithRetry(n2, () => Om(this, void 0, void 0, function* () {
28698
+ return (yield Nm(n2, this.timeout)).blob();
28699
+ })), this.logger.info(`load resource from server end. ${r2}, time: ${Date.now() - e3}`, this.taskId || ""), this.tracker({ name: "slideResourceLoad", result: "success", reason: "", payload: { duration: Date.now() - i2, url: n2, type: "image", channel: "fetch" } });
28659
28700
  } catch (t4) {
28660
- this.tracker({ name: "slideResourceLoad", result: "fail", reason: t4 + "", payload: { duration: Date.now() - i2, url: n2, type: "image", channel: "fetch" } });
28701
+ throw this.tracker({ name: "slideResourceLoad", result: "fail", reason: t4 + "", payload: { duration: Date.now() - i2, url: n2, type: "image", channel: "fetch" } }), t4;
28661
28702
  }
28703
+ if (!(t3 instanceof Blob))
28704
+ throw new Tm(gm.ResourceError, `"${r2}" loaded failed with invalid blob response"`);
28662
28705
  o2 = yield function(t4) {
28663
28706
  return new Promise((e3, i3) => {
28664
28707
  const n3 = new FileReader();
@@ -29906,7 +29949,7 @@ void main() {
29906
29949
  p2[t3].point.x += n2, p2[t3].point.y = -p2[t3].point.y + r2;
29907
29950
  return { points: p2, position: { x: 0, y: 0 } };
29908
29951
  }
29909
- const qg = "\nvec3 rgb2hsl(vec3 rgb) {\n float cMax = max(max(rgb.r, rgb.g), rgb.b);\n float cMin = min(min(rgb.r, rgb.g), rgb.b);\n float delta = cMax - cMin;\n \n float h = 0.0;\n if (delta == 0.0) {\n h = 0.0;\n } else if (cMax == rgb.r) {\n h = 60.0 * mod(((rgb.g - rgb.b) / delta), 6.0);\n } else if (cMax == rgb.g ) {\n h = 60.0 * ((rgb.b - rgb.r) / delta + 2.0);\n } else if (cMax == rgb.b) {\n h = 60.0 * ((rgb.r - rgb.g) / delta + 4.0);\n }\n \n float l = (cMax + cMin) / 2.0;\n \n float s = 0.0;\n if (delta == 0.0) {\n s = 0.0;\n } else {\n s = delta / (1.0 - abs(2.0 * l - 1.0));\n }\n \n return vec3(h, s, l);\n}\n", Zg = [qg], Jg = { biLevel: "\nvec4 transform(vec4 texColor, float arg) {\n mat3 rgb2yuv = mat3(\n 0.2126, 0.7152, 0.0722,\n -0.09991, -0.33609, 0.43600,\n 0.615, -0.5586, -0.05639\n );\n vec3 yuv = texColor.rgb * rgb2yuv;\n if (yuv.x >= arg || texColor.a < 0.9) {\n return vec4(1.0, 1.0, 1.0, 1.0) * texColor.a;\n } else {\n return vec4(0.0, 0.0, 0.0, 1.0) * texColor.a;\n }\n}\n", alphaModFix: "\nvec4 transform(vec4 texColor, float arg) {\n return texColor * arg;\n}\n", alphaBiLevel: "\nvec4 transform(vec4 texColor, float arg) {\n vec4 result = vec4(texColor);\n result.rgb = result.rgb / texColor.a;\n if (texColor.a < arg) {\n result.a = 0.0;\n } else {\n result.a = 1.0;\n }\n return result;\n}\n", alphaCeiling: "\nvec4 transform(vec4 texColor, float arg) {\n vec4 result = vec4(texColor);\n result.rgb = result.rgb / texColor.a;\n if (texColor.a > 0.0) {\n result.a = 1.0;\n }\n return result;\n}\n", alphaFloor: "\nvec4 transform(vec4 texColor, float arg) {\n vec4 result = vec4(texColor);\n result.rgb = result.rgb / texColor.a;\n if (texColor.a < 1.0) {\n result.a = 0.0;\n }\n return result;\n}\n", grayscl: "\nvec4 transform(vec4 texColor, float arg) {\n float avg = (texColor.r + texColor.g + texColor.b) / 3.0;\n return vec4(avg, avg, avg, texColor.a);\n}\n" };
29952
+ const qg = "\nvec3 rgb2hsl(vec3 rgb) {\n float cMax = max(max(rgb.r, rgb.g), rgb.b);\n float cMin = min(min(rgb.r, rgb.g), rgb.b);\n float delta = cMax - cMin;\n \n float h = 0.0;\n if (delta == 0.0) {\n h = 0.0;\n } else if (cMax == rgb.r) {\n h = 60.0 * mod(((rgb.g - rgb.b) / delta), 6.0);\n } else if (cMax == rgb.g ) {\n h = 60.0 * ((rgb.b - rgb.r) / delta + 2.0);\n } else if (cMax == rgb.b) {\n h = 60.0 * ((rgb.r - rgb.g) / delta + 4.0);\n }\n \n float l = (cMax + cMin) / 2.0;\n \n float s = 0.0;\n if (delta == 0.0) {\n s = 0.0;\n } else {\n s = delta / (1.0 - abs(2.0 * l - 1.0));\n }\n \n return vec3(h, s, l);\n}\n", Zg = [qg], Jg = { biLevel: "\nvec4 transform(vec4 texColor, float arg) {\n mat3 rgb2yuv = mat3(\n 0.2126, 0.7152, 0.0722,\n -0.09991, -0.33609, 0.43600,\n 0.615, -0.5586, -0.05639\n );\n vec3 yuv = texColor.rgb * rgb2yuv;\n if (yuv.x >= arg || texColor.a < 0.9) {\n return vec4(1.0, 1.0, 1.0, 1.0) * texColor.a;\n } else {\n return vec4(0.0, 0.0, 0.0, 1.0) * texColor.a;\n }\n}\n", alphaModFix: "\nvec4 transform(vec4 texColor, float arg) {\n return texColor * arg;\n}\n", alphaBiLevel: "\nvec4 transform(vec4 texColor, float arg) {\n if (texColor.a <= 0.0) {\n return vec4(0.0);\n }\n vec4 result = vec4(texColor);\n result.rgb = result.rgb / texColor.a;\n if (texColor.a < arg) {\n result.a = 0.0;\n } else {\n result.a = 1.0;\n }\n return result;\n}\n", alphaCeiling: "\nvec4 transform(vec4 texColor, float arg) {\n if (texColor.a <= 0.0) {\n return vec4(0.0);\n }\n vec4 result = vec4(texColor);\n result.rgb = result.rgb / texColor.a;\n result.a = 1.0;\n return result;\n}\n", alphaFloor: "\nvec4 transform(vec4 texColor, float arg) {\n if (texColor.a <= 0.0) {\n return vec4(0.0);\n }\n vec4 result = vec4(texColor);\n result.rgb = result.rgb / texColor.a;\n if (texColor.a < 1.0) {\n result.a = 0.0;\n }\n return result;\n}\n", grayscl: "\nvec4 transform(vec4 texColor, float arg) {\n float avg = (texColor.r + texColor.g + texColor.b) / 3.0;\n return vec4(avg, avg, avg, texColor.a);\n}\n" };
29910
29953
  class Kg extends Vh.k {
29911
29954
  constructor(t2, e2) {
29912
29955
  var i2;
@@ -29949,7 +29992,7 @@ void main(void){
29949
29992
  `), { arg1: Float32Array.from(e2), arg2: Float32Array.from(i2) });
29950
29993
  }
29951
29994
  }
29952
- const ev = [qg], iv = { lum: "\nvec4 transform(vec4 texColor, float arg1, float arg2) {\n vec3 rgb = texColor.rgb / texColor.a;\n\n // \u5BF9\u6BD4\u5EA6\n highp float C = arg2 * 255.0;\n highp float F = (259.0 * (255.0 + C)) / (255.0 * (259.0 - C));\n rgb.rgb = F * (rgb.rgb - 0.5) + 0.5;\n\n // \u4EAE\u5EA6\n rgb.rgb += arg1 * rgb.rgb;\n\n rgb.rgb *= texColor.a;\n return vec4(rgb, texColor.a);\n}\n" };
29995
+ const ev = [qg], iv = { lum: "\nvec4 transform(vec4 texColor, float arg1, float arg2) {\n // \u9632\u6B62 alpha=0 \u65F6\u9664\u4EE5\u96F6\uFF0C\u5728 iPad GPU \u4E0A\u4F1A\u5BFC\u81F4\u82B1\u5C4F\n if (texColor.a <= 0.0) {\n return vec4(0.0);\n }\n vec3 rgb = texColor.rgb / texColor.a;\n\n // \u5BF9\u6BD4\u5EA6\uFF08\u907F\u514D\u4F7F\u7528 highp\uFF0Cfragment shader \u4E2D highp \u5728 iOS WebGL1 \u4E3A optional\uFF09\n float C = arg2 * 255.0;\n float F = (259.0 * (255.0 + C)) / (255.0 * (259.0 - C));\n rgb.rgb = F * (rgb.rgb - 0.5) + 0.5;\n\n // \u4EAE\u5EA6\n rgb.rgb += arg1 * rgb.rgb;\n\n rgb.rgb *= texColor.a;\n return vec4(rgb, texColor.a);\n}\n" };
29953
29996
  class nv extends Vh.k {
29954
29997
  constructor(t2, e2, i2) {
29955
29998
  var n2;
@@ -32148,7 +32191,7 @@ void main(void){
32148
32191
  const t4 = { result: null };
32149
32192
  this.findChildInfiniteRepeat(this.commonTimeNode, t4), 1 === this.commonTimeNode.children.length && t4.result && (t4.result.json.subTnLst || []).length > 0 && 0 === this.currentSeqIndex && "running" === this.currentSeqState && this.commonTimeNode.allChildrenEndHandle();
32150
32193
  }
32151
- "idle" === this.currentSeqState ? null === (i3 = this.commonTimeNode.children[this.currentSeqIndex]) || void 0 === i3 || i3.commonTimeNode.startTimeNodeForce() : "running" === this.currentSeqState ? (null === (n3 = this.commonTimeNode.children[this.currentSeqIndex]) || void 0 === n3 || n3.commonTimeNode.seekToEnd(false, true), this.currentSeqState = "end", this.incrSeqIndex(), null === (r3 = this.commonTimeNode.children[this.currentSeqIndex]) || void 0 === r3 || r3.commonTimeNode.startTimeNodeForce()) : "end" === this.currentSeqState && (this.incrSeqIndex(), null === (o3 = this.commonTimeNode.children[this.currentSeqIndex]) || void 0 === o3 || o3.commonTimeNode.startTimeNodeForce());
32194
+ "idle" === this.currentSeqState ? null === (i3 = this.commonTimeNode.children[this.currentSeqIndex]) || void 0 === i3 || i3.commonTimeNode.startTimeNodeForce() : "running" === this.currentSeqState ? (null === (n3 = this.commonTimeNode.children[this.currentSeqIndex]) || void 0 === n3 || n3.commonTimeNode.seekToEnd(false, true), this.currentSeqState = "end", this.incrSeqIndex() && (null === (r3 = this.commonTimeNode.children[this.currentSeqIndex]) || void 0 === r3 || r3.commonTimeNode.startTimeNodeForce())) : "end" === this.currentSeqState && this.incrSeqIndex() && (null === (o3 = this.commonTimeNode.children[this.currentSeqIndex]) || void 0 === o3 || o3.commonTimeNode.startTimeNodeForce());
32152
32195
  }
32153
32196
  };
32154
32197
  const { json: e2, iterateType: i2, isIterate: n2, isSub: r2, parent: o2, ctx: s2, eventHub: a2, iterateIndex: l2, iterateId: h2, isInInteractiveSeq: u2 } = t2;
@@ -32199,7 +32242,7 @@ void main(void){
32199
32242
  this.autoPlay = true, this.commonTimeNode.children[0].commonTimeNode.startTimeNodeForce();
32200
32243
  }
32201
32244
  incrSeqIndex() {
32202
- this.currentSeqIndex + 1 < this.commonTimeNode.children.length && (this.currentSeqIndex += 1);
32245
+ return this.currentSeqIndex + 1 < this.commonTimeNode.children.length && (this.currentSeqIndex += 1, true);
32203
32246
  }
32204
32247
  decrSeqIndex() {
32205
32248
  this.currentSeqIndex - 1 >= -1 && (this.currentSeqIndex -= 1);
@@ -34072,7 +34115,7 @@ void main(void){
34072
34115
  this.logger.error("removeChild error: PPTPlayer:1062", this.taskId);
34073
34116
  }
34074
34117
  this.globalEventHub.emit("onFullscreenChange", { status: false, slideIndex: this.currentIndex, targetId: null === (e3 = this.currentStage) || void 0 === e3 ? void 0 : e3.ctx.latestChangeFullscreenTargetId }), this.clearFullscreenEventListenersWithAppView(), t3 && this.emit(Xy.changeLocalFullscreenState, { status: false, slideIndex: this.currentIndex, targetId: null === (i3 = this.currentStage) || void 0 === i3 ? void 0 : i3.ctx.latestChangeFullscreenTargetId });
34075
- }, this.logger = t2.logger, this.tracker = t2.tracker, this.mode = t2.mode, this.volumeAdjuster = t2.volumeAdjuster, this.localStorage = new Gy(this.logger), this.cachedExtract = new jy(this.localStorage), this.enableWebAudio = !!$a()(t2.enableWebAudio) || t2.enableWebAudio, this.enableAutoForward = !$a()(t2.enableAutoForward) && t2.enableAutoForward, this.config = { minFPS: $a()(e2.minFPS) ? 30 : e2.minFPS, maxFPS: $a()(e2.maxFPS) ? 40 : e2.maxFPS, resolution: $a()(e2.resolution) ? 1 : e2.resolution, autoFPS: !$a()(e2.autoFPS) && e2.autoFPS, autoResolution: !$a()(e2.autoResolution) && e2.autoResolution, transactionBgColor: $a()(e2.transactionBgColor) ? 0 : e2.transactionBgColor, maxResolutionLevel: this.getMaxResolution(e2.maxResolutionLevel), forceCanvas: !$a()(e2.forceCanvas) && e2.forceCanvas, enableNvidiaDetect: !$a()(e2.enableNvidiaDetect) && e2.enableNvidiaDetect, transitionResolutionLevel: this.getMaxResolution(e2.transitionResolutionLevel), antialias: !!$a()(e2.antialias) || e2.antialias }, this.updateMaxResolutionLevel(this.config.maxResolutionLevel), this.updateTransitionResolutionLevel(this.config.transitionResolutionLevel), this.loader = new Lm(this.localStorage, t2.useLocalCache, this.logger, this.tracker, t2.resourceTimeout, t2.loadDelegate, t2.urlInterrupter);
34118
+ }, this.logger = t2.logger, this.tracker = t2.tracker, this.mode = t2.mode, this.volumeAdjuster = t2.volumeAdjuster, this.localStorage = new Gy(this.logger), this.cachedExtract = new jy(this.localStorage), this.enableWebAudio = !!$a()(t2.enableWebAudio) || t2.enableWebAudio, this.enableAutoForward = !$a()(t2.enableAutoForward) && t2.enableAutoForward, this.config = { minFPS: $a()(e2.minFPS) ? 30 : e2.minFPS, maxFPS: $a()(e2.maxFPS) ? 40 : e2.maxFPS, resolution: $a()(e2.resolution) ? 1 : e2.resolution, autoFPS: !$a()(e2.autoFPS) && e2.autoFPS, autoResolution: !$a()(e2.autoResolution) && e2.autoResolution, transactionBgColor: $a()(e2.transactionBgColor) ? 0 : e2.transactionBgColor, maxResolutionLevel: this.getMaxResolution(e2.maxResolutionLevel), forceCanvas: !$a()(e2.forceCanvas) && e2.forceCanvas, enableNvidiaDetect: !$a()(e2.enableNvidiaDetect) && e2.enableNvidiaDetect, transitionResolutionLevel: this.getMaxResolution(e2.transitionResolutionLevel), antialias: !!$a()(e2.antialias) || e2.antialias }, this.updateMaxResolutionLevel(this.config.maxResolutionLevel), this.updateTransitionResolutionLevel(this.config.transitionResolutionLevel), this.loader = new Lm(this.localStorage, t2.useLocalCache, this.logger, this.tracker, t2.resourceTimeout, t2.loadDelegate, t2.urlInterrupter, t2.resourceMaxRetries, t2.onResourceMaxRetries);
34076
34119
  const i2 = Ph.isWebGLSupported();
34077
34120
  this.app = new Wh({ antialias: this.config.antialias, autoDensity: false, backgroundColor: 16777215, forceCanvas: this.config.forceCanvas || !i2 }), globalThis.__PIXI_APP__ = this.app, this.tracker({ name: "slidePlayerCreate", result: "", reason: "", payload: { webgl: i2, resolution: this.config.resolution, minFPS: this.config.minFPS, maxFPS: this.config.maxFPS, maxResolutionLevel: this.config.maxResolutionLevel, forceCanvas: this.config.forceCanvas } }), this.updateConfig(this.config), this.app.ticker.maxFPS = 60, this.app.ticker.minFPS = this.config.minFPS, this.app.ticker.maxFPS = this.config.maxFPS, this.app.view.style.zIndex = "1", this.app.stage.sortableChildren = true;
34078
34121
  const n2 = this.app.renderer;
@@ -36531,7 +36574,7 @@ void main(void){
36531
36574
  }
36532
36575
  var _T = { syncDispatch: "syncDispatch", syncReceive: "syncReceive", syncEventLag: "syncEventLag", renderStart: "renderStart", renderEnd: "renderEnd", renderError: "renderError", slideChange: "slideChange", mainSeqStepStart: "mainSeqStepStart", mainSeqStepEnd: "mainSeqStepEnd", animateStart: "animateStart", animateEnd: "animateEnd", stateChange: "stateChange", slideStepEnd: "slideEnd", slideStepStart: "slideStart", useraddLink: "useraddLink" }, yT = { taskId: "", url: "", currentSlideIndex: -1, mainSeqStep: -1, mainSeqState: null, mediaState: /* @__PURE__ */ Object.create(null), interactiveSeqState: /* @__PURE__ */ Object.create(null) }, xT = "";
36533
36576
  try {
36534
- xT = "1.4.51-alpha.0";
36577
+ xT = "1.4.52";
36535
36578
  } catch (t2) {
36536
36579
  xT = "-dev-";
36537
36580
  }
@@ -36740,7 +36783,7 @@ void main(void){
36740
36783
  }, e2.prototype.initSlideConfig = function(t3) {
36741
36784
  return t3.timestamp && (this.timestamp = t3.timestamp), t3.rtcAudio && (Yy.RtcAudioClazz = t3.rtcAudio), false !== t3.enableWebAudio && (t3.enableWebAudio = true), this.mode = t3.mode, this.anchor = t3.anchor, this.anchor.appendChild(this.frame), this.enableGlobalClick = !$a()(t3.enableGlobalClick) && t3.enableGlobalClick, this.resize = t3.resize || false, this.interactive = t3.interactive, this.frame.style.cssText = t3.fixedFrameSize ? "width:" + t3.fixedFrameSize.width + "px;height:" + t3.fixedFrameSize.height + "px;" : "width:100%;height:100%", this.frame.style.cssText += "display:flex;justify-content:center;align-items:center;visibility:hidden;position:relative;z-index:1;", t3.fixedFrameSize && (this.frameWidth = t3.fixedFrameSize.width, this.frameHeight = t3.fixedFrameSize.height), t3.disableClickDebounce = t3.disableClickDebounce || false, t3;
36742
36785
  }, e2.prototype.initPlayer = function(t3) {
36743
- var e3, i3, n3, r2 = this, o2 = new Yy({ mode: this.mode, useLocalCache: !!$a()(this.config.useLocalCache) || this.config.useLocalCache, logger: this.logger, resourceTimeout: $a()(this.config.resourceTimeout) ? 15e3 : this.config.resourceTimeout, loadDelegate: this.config.loaderDelegate, volumeAdjuster: this.volumeAdjuster, urlInterrupter: this.urlInterrupter, tracker: this.tracker, enableWebAudio: this.config.enableWebAudio, enableAutoForward: this.config.enableAutoForward, customLinks: this.config.customLinks }, t3.renderOptions);
36786
+ var e3, i3, n3, r2 = this, o2 = new Yy({ mode: this.mode, useLocalCache: !!$a()(this.config.useLocalCache) || this.config.useLocalCache, logger: this.logger, resourceTimeout: $a()(this.config.resourceTimeout) ? 15e3 : this.config.resourceTimeout, loadDelegate: this.config.loaderDelegate, volumeAdjuster: this.volumeAdjuster, urlInterrupter: this.urlInterrupter, tracker: this.tracker, enableWebAudio: this.config.enableWebAudio, enableAutoForward: this.config.enableAutoForward, customLinks: this.config.customLinks, resourceMaxRetries: this.config.resourceMaxRetries, onResourceMaxRetries: this.config.onResourceMaxRetries }, t3.renderOptions);
36744
36787
  return o2.setInteractive(this.interactive), o2.updateConfig(t3.renderOptions || {}), o2.on(Xy.renderStart, function(t4) {
36745
36788
  r2.isLoading = true, r2.emit(_T.renderStart, t4), window.postMessage({ type: "@slide/_render_start_", taskId: r2.taskId, index: t4 }, "*");
36746
36789
  }), o2.on(Xy.renderEnd, function(t4) {
@@ -38277,7 +38320,9 @@ class SlideControllerBase {
38277
38320
  whiteTracker: defaults.whiteTracker,
38278
38321
  timestamp: this.timestamp,
38279
38322
  customLinks: attribute.customLinks,
38280
- skipActionWhenFrozen: (_d = options.skipActionWhenFrozen) != null ? _d : true
38323
+ skipActionWhenFrozen: (_d = options.skipActionWhenFrozen) != null ? _d : true,
38324
+ resourceMaxRetries: options.resourceMaxRetries,
38325
+ onResourceMaxRetries: options.onResourceMaxRetries
38281
38326
  });
38282
38327
  return slide;
38283
38328
  }
@@ -40355,7 +40400,7 @@ class SlidePreviewer {
40355
40400
  }
40356
40401
  }
40357
40402
  const usePlugin = /* @__PURE__ */ Slide.Slide.usePlugin.bind(Slide.Slide);
40358
- const version = "0.2.96";
40403
+ const version = "0.2.98";
40359
40404
  const SlideApp = {
40360
40405
  kind: "Slide",
40361
40406
  setup(context) {