@famibee/skynovel 1.64.21 → 1.65.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/dist/Button.js +59 -57
  2. package/dist/Button.js.map +1 -1
  3. package/dist/CmnTween.js +921 -109
  4. package/dist/CmnTween.js.map +1 -1
  5. package/dist/EventMng.js +1 -1
  6. package/dist/EventMng.js.map +1 -1
  7. package/dist/GrpLayer.js +10 -11
  8. package/dist/GrpLayer.js.map +1 -1
  9. package/dist/LayerMng.js +43 -44
  10. package/dist/LayerMng.js.map +1 -1
  11. package/dist/Main.js.map +1 -1
  12. package/dist/RubySpliter.js +18 -15
  13. package/dist/RubySpliter.js.map +1 -1
  14. package/dist/ScriptIterator.js +1 -2
  15. package/dist/ScriptIterator.js.map +1 -1
  16. package/dist/SndBuf.js +83 -77
  17. package/dist/SndBuf.js.map +1 -1
  18. package/dist/SpritesMng.js +50 -46
  19. package/dist/SpritesMng.js.map +1 -1
  20. package/dist/TxtLayer.js +435 -420
  21. package/dist/TxtLayer.js.map +1 -1
  22. package/dist/Variable.js +1 -1
  23. package/dist/sn/Button.d.ts.map +1 -1
  24. package/dist/sn/CmnTween.d.ts +4 -4
  25. package/dist/sn/CmnTween.d.ts.map +1 -1
  26. package/dist/sn/FocusMng.d.ts +2 -2
  27. package/dist/sn/FocusMng.d.ts.map +1 -1
  28. package/dist/sn/FrameMng.d.ts.map +1 -1
  29. package/dist/sn/GrpLayer.d.ts.map +1 -1
  30. package/dist/sn/Log.d.ts.map +1 -1
  31. package/dist/sn/Main.d.ts.map +1 -1
  32. package/dist/sn/Pages.d.ts.map +1 -1
  33. package/dist/sn/Reading.d.ts +1 -0
  34. package/dist/sn/Reading.d.ts.map +1 -1
  35. package/dist/sn/RubySpliter.d.ts.map +1 -1
  36. package/dist/sn/SndBuf.d.ts.map +1 -1
  37. package/dist/sn/SpritesMng.d.ts.map +1 -1
  38. package/dist/sn/SysBase.d.ts.map +1 -1
  39. package/dist/sn/TxtLayer.d.ts.map +1 -1
  40. package/dist/sn/TxtStage.d.ts +2 -0
  41. package/dist/sn/TxtStage.d.ts.map +1 -1
  42. package/dist/web2.js.map +1 -1
  43. package/dist_app/Button.js +59 -57
  44. package/dist_app/Button.js.map +1 -1
  45. package/dist_app/CmnTween.js +921 -109
  46. package/dist_app/CmnTween.js.map +1 -1
  47. package/dist_app/EventMng.js +1 -1
  48. package/dist_app/EventMng.js.map +1 -1
  49. package/dist_app/GrpLayer.js +10 -11
  50. package/dist_app/GrpLayer.js.map +1 -1
  51. package/dist_app/LayerMng.js +2 -3
  52. package/dist_app/LayerMng.js.map +1 -1
  53. package/dist_app/Main.js.map +1 -1
  54. package/dist_app/RubySpliter.js +18 -15
  55. package/dist_app/RubySpliter.js.map +1 -1
  56. package/dist_app/ScriptIterator.js +1 -2
  57. package/dist_app/ScriptIterator.js.map +1 -1
  58. package/dist_app/SndBuf.js +83 -77
  59. package/dist_app/SndBuf.js.map +1 -1
  60. package/dist_app/SpritesMng.js +46 -42
  61. package/dist_app/SpritesMng.js.map +1 -1
  62. package/dist_app/TxtLayer.js +435 -420
  63. package/dist_app/TxtLayer.js.map +1 -1
  64. package/dist_app/Variable.js +1 -1
  65. package/dist_app/app2.js.map +1 -1
  66. package/dist_app/sn/Button.d.ts.map +1 -1
  67. package/dist_app/sn/CmnTween.d.ts +4 -4
  68. package/dist_app/sn/CmnTween.d.ts.map +1 -1
  69. package/dist_app/sn/FocusMng.d.ts.map +1 -1
  70. package/dist_app/sn/FrameMng.d.ts.map +1 -1
  71. package/dist_app/sn/GrpLayer.d.ts.map +1 -1
  72. package/dist_app/sn/Log.d.ts.map +1 -1
  73. package/dist_app/sn/Main.d.ts.map +1 -1
  74. package/dist_app/sn/Pages.d.ts.map +1 -1
  75. package/dist_app/sn/Reading.d.ts +1 -0
  76. package/dist_app/sn/Reading.d.ts.map +1 -1
  77. package/dist_app/sn/RubySpliter.d.ts.map +1 -1
  78. package/dist_app/sn/SndBuf.d.ts.map +1 -1
  79. package/dist_app/sn/SpritesMng.d.ts.map +1 -1
  80. package/dist_app/sn/SysBase.d.ts.map +1 -1
  81. package/dist_app/sn/TxtLayer.d.ts.map +1 -1
  82. package/dist_app/sn/TxtStage.d.ts +2 -0
  83. package/dist_app/sn/TxtStage.d.ts.map +1 -1
  84. package/package.json +4 -4
package/dist/SndBuf.js CHANGED
@@ -1,12 +1,11 @@
1
- import { m as R, n as O, T, o as ue, l as F, e as A, S as ae, L as le, a as ce } from "./web2.js";
2
- import { C as pe } from "./CmnTween.js";
3
- import { a as L, T as he, r as fe } from "./Reading.js";
4
- var ee;
1
+ import { m as R, n as S, T, o as ae, l as j, e as A, S as le, L as ce, a as pe } from "./web2.js";
2
+ import { a as L, G as he, C as ee, T as fe } from "./CmnTween.js";
3
+ var te;
5
4
  function _() {
6
- return ee;
5
+ return te;
7
6
  }
8
- var te = function(n, e) {
9
- return (te = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, s) {
7
+ var se = function(n, e) {
8
+ return (se = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, s) {
10
9
  t.__proto__ = s;
11
10
  } || function(t, s) {
12
11
  for (var o in s) Object.prototype.hasOwnProperty.call(s, o) && (t[o] = s[o]);
@@ -17,24 +16,24 @@ function b(n, e) {
17
16
  function t() {
18
17
  this.constructor = n;
19
18
  }
20
- te(n, e), n.prototype = e === null ? Object.create(e) : (t.prototype = e.prototype, new t());
19
+ se(n, e), n.prototype = e === null ? Object.create(e) : (t.prototype = e.prototype, new t());
21
20
  }
22
21
  var V = function() {
23
22
  return (V = Object.assign || function(n) {
24
23
  for (var e, t = 1, s = arguments.length; t < s; t++) for (var o in e = arguments[t]) Object.prototype.hasOwnProperty.call(e, o) && (n[o] = e[o]);
25
24
  return n;
26
25
  }).apply(this, arguments);
27
- }, se = ["mp3", "ogg", "oga", "opus", "mpeg", "wav", "m4a", "aiff", "wma", "mid", "caf"], K = {};
26
+ }, ne = ["mp3", "ogg", "oga", "opus", "mpeg", "wav", "m4a", "aiff", "wma", "mid", "caf"], K = {};
28
27
  function de(n) {
29
28
  var e = V({ m4a: "audio/mp4", oga: "audio/ogg", opus: 'audio/ogg; codecs="opus"', caf: 'audio/x-caf; codecs="opus"' }, n || {}), t = document.createElement("audio"), s = {}, o = /^no$/;
30
- se.forEach(function(i) {
29
+ ne.forEach(function(i) {
31
30
  var r = t.canPlayType("audio/".concat(i)).replace(o, ""), u = e[i] ? t.canPlayType(e[i]).replace(o, "") : "";
32
31
  s[i] = !!r || !!u;
33
32
  }), Object.assign(K, s);
34
33
  }
35
34
  de();
36
35
  var _e = /\.(\{([^\}]+)\})(\?.*)?$/;
37
- function ne(n) {
36
+ function oe(n) {
38
37
  var e = _e, t = typeof n == "string" ? n : n.url;
39
38
  if (!e.test(t)) return t;
40
39
  for (var s = e.exec(t), o = s[2].split(","), i = o[o.length - 1], r = 0, u = o.length; r < u; r++) {
@@ -51,21 +50,21 @@ function ne(n) {
51
50
  }
52
51
  return l;
53
52
  }
54
- var q = se.filter(function(n) {
53
+ var q = ne.filter(function(n) {
55
54
  return K[n];
56
- }), oe = function() {
55
+ }), ie = function() {
57
56
  function n() {
58
57
  }
59
58
  return n.add = function() {
60
59
  n.setLegacy(_().useLegacy);
61
60
  }, n.setLegacy = function(e) {
62
61
  e ? q.forEach(function(t) {
63
- O.setExtensionXhrType(t, O.XHR_RESPONSE_TYPE.DEFAULT), O.setExtensionLoadType(t, O.LOAD_TYPE.AUDIO);
62
+ S.setExtensionXhrType(t, S.XHR_RESPONSE_TYPE.DEFAULT), S.setExtensionLoadType(t, S.LOAD_TYPE.AUDIO);
64
63
  }) : q.forEach(function(t) {
65
- O.setExtensionXhrType(t, O.XHR_RESPONSE_TYPE.BUFFER), O.setExtensionLoadType(t, O.LOAD_TYPE.XHR);
64
+ S.setExtensionXhrType(t, S.XHR_RESPONSE_TYPE.BUFFER), S.setExtensionLoadType(t, S.LOAD_TYPE.XHR);
66
65
  });
67
66
  }, n.pre = function(e, t) {
68
- ne(e), t();
67
+ oe(e), t();
69
68
  }, n.use = function(e, t) {
70
69
  e.data && q.indexOf(e.extension) > -1 ? e.sound = _().add(e.name, { loaded: t, preload: !0, url: e.url, source: e.data }) : t();
71
70
  }, n.extension = "loader", n;
@@ -352,7 +351,7 @@ var q = se.filter(function(n) {
352
351
  }
353
352
  this._source = null, this._progress = 1, this.emit("progress", 1, this._duration), this.emit("end", this);
354
353
  }, e;
355
- }(R), ie = function() {
354
+ }(R), re = function() {
356
355
  function n(e, t) {
357
356
  this._output = t, this._input = e;
358
357
  }
@@ -391,7 +390,7 @@ var q = se.filter(function(n) {
391
390
  }, Object.defineProperty(e.prototype, "bufferSize", { get: function() {
392
391
  return this.script.bufferSize;
393
392
  }, enumerable: !1, configurable: !0 }), e.BUFFER_SIZE = 0, e;
394
- }(ie), we = function() {
393
+ }(re), we = function() {
395
394
  function n() {
396
395
  }
397
396
  return n.prototype.init = function(e) {
@@ -447,7 +446,7 @@ var q = se.filter(function(n) {
447
446
  }
448
447
  return n.from = function(e) {
449
448
  var t = {};
450
- return typeof e == "string" ? t.url = e : e instanceof ArrayBuffer || e instanceof AudioBuffer || e instanceof HTMLAudioElement ? t.source = e : t = e, (t = V({ autoPlay: !1, singleInstance: !1, url: null, source: null, preload: !1, volume: 1, speed: 1, complete: null, loaded: null, loop: !1 }, t)).url && (t.url = ne(t.url)), Object.freeze(t), new n(_().useLegacy ? new ge() : new we(), t);
449
+ return typeof e == "string" ? t.url = e : e instanceof ArrayBuffer || e instanceof AudioBuffer || e instanceof HTMLAudioElement ? t.source = e : t = e, (t = V({ autoPlay: !1, singleInstance: !1, url: null, source: null, preload: !1, volume: 1, speed: 1, complete: null, loaded: null, loop: !1 }, t)).url && (t.url = oe(t.url)), Object.freeze(t), new n(_().useLegacy ? new ge() : new we(), t);
451
450
  }, Object.defineProperty(n.prototype, "context", { get: function() {
452
451
  return _().context;
453
452
  }, enumerable: !1, configurable: !0 }), n.prototype.pause = function() {
@@ -626,7 +625,7 @@ var q = se.filter(function(n) {
626
625
  }, o);
627
626
  i && i.catch(o);
628
627
  }, e;
629
- }(ie), Se = function() {
628
+ }(re), Se = function() {
630
629
  function n() {
631
630
  this.init();
632
631
  }
@@ -658,7 +657,7 @@ var q = se.filter(function(n) {
658
657
  }, Object.defineProperty(n.prototype, "useLegacy", { get: function() {
659
658
  return this._useLegacy;
660
659
  }, set: function(e) {
661
- oe.setLegacy(e), this._useLegacy = e, this._context = !e && this.supported ? this._webAudioContext : this._htmlAudioContext;
660
+ ie.setLegacy(e), this._useLegacy = e, this._context = !e && this.supported ? this._webAudioContext : this._htmlAudioContext;
662
661
  }, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "disableAutoPause", { get: function() {
663
662
  return !this._webAudioContext.autoPause;
664
663
  }, set: function(e) {
@@ -738,8 +737,8 @@ var q = se.filter(function(n) {
738
737
  });
739
738
  (y = n.call(this, g[0], g[g.length - 1]) || this).bands = g, y.bandsMap = {};
740
739
  for (var d = 0; d < y.bands.length; d++) {
741
- var w = y.bands[d];
742
- d > 0 && y.bands[d - 1].connect(w), y.bandsMap[w.frequency.value] = w;
740
+ var O = y.bands[d];
741
+ d > 0 && y.bands[d - 1].connect(O), y.bandsMap[O.frequency.value] = O;
743
742
  }
744
743
  return y;
745
744
  }
@@ -897,14 +896,18 @@ var q = se.filter(function(n) {
897
896
  n.call(this, null);
898
897
  }
899
898
  return b(e, n), e;
900
- }(k) }, Ve = { __proto__: null, supported: K }, z = function(n) {
901
- return ee = n, n;
899
+ }(k) }, Ae = { __proto__: null, supported: K }, z = function(n) {
900
+ return te = n, n;
902
901
  }(new Se());
903
- ue.add(oe);
904
- class j {
902
+ ae.add(ie);
903
+ class P {
905
904
  constructor(e, t, s, o, i, r, u, a) {
906
905
  this.fn = e, this.buf = t, this.start_ms = s, this.end_ms = o, this.ret_ms = i, this.volume = r, this.pan = u, this.snd = a, this.stt = a ? new G(this) : new Ee(this), this.#e = L.procID, a && this.addSnd(a);
907
906
  }
907
+ static grp = new he();
908
+ static init() {
909
+ ee.addGrp(P.grp);
910
+ }
908
911
  static #t = 1;
909
912
  stt;
910
913
  loop = !1;
@@ -915,32 +918,35 @@ class j {
915
918
  addSnd(e) {
916
919
  switch (this.snd = e, this.loop = e.loop, this.stt.onLoad(this), this.pan !== 0 && (e.filters = [new B.StereoFilter(this.pan)]), this.setVol = (t) => {
917
920
  e.volume = t;
918
- }, this.tw = () => new he(e), this.onPlayEnd = () => {
921
+ }, this.tw = () => {
922
+ const t = new fe(e);
923
+ return P.grp.add(t), t;
924
+ }, this.onPlayEnd = () => {
919
925
  this.stt.onPlayEnd(this.buf), this.#s();
920
926
  }, this.stop = () => {
921
927
  e.stop(), this.#s();
922
- }, this.destroy = () => e.destroy(), !this.loop && ce.needClick2Play() && setTimeout(() => this.onPlayEnd(), (e.duration - this.start_ms - (this.end_ms <= 0 ? this.end_ms : this.end_ms === f.MAX_END_MS ? 0 : e.duration - this.end_ms)) * 1e3), this.buf) {
928
+ }, this.destroy = () => e.destroy(), !this.loop && pe.needClick2Play() && setTimeout(() => this.onPlayEnd(), (e.duration - this.start_ms - (this.end_ms <= 0 ? this.end_ms : this.end_ms === f.MAX_END_MS ? 0 : e.duration - this.end_ms)) * 1e3), this.buf) {
923
929
  // セリフ再生中はBGM音量を絞る
924
930
  case Q:
925
931
  {
926
932
  const t = Number(c.getVal("sys:sn.sound.BGM.vol_mul_talking") ?? 1);
927
933
  if (t === 1) break;
928
- j.#t = t;
934
+ P.#t = t;
929
935
  const s = H[X];
930
- s && s.setVol(this.volume * j.#t);
936
+ s && s.setVol(this.volume * P.#t);
931
937
  }
932
938
  break;
933
939
  case X:
934
- e.volume = this.volume * j.#t;
940
+ e.volume = this.volume * P.#t;
935
941
  break;
936
942
  }
937
943
  }
938
944
  #s = () => {
939
945
  if (this.#s = () => {
940
- }, j.#t === 1 || this.buf !== Q) return;
941
- j.#t = 1;
946
+ }, P.#t === 1 || this.buf !== Q) return;
947
+ P.#t = 1;
942
948
  const e = H[X];
943
- e && e.setVol(this.volume * j.#t);
949
+ e && e.setVol(this.volume * P.#t);
944
950
  };
945
951
  setVol(e) {
946
952
  }
@@ -953,12 +959,12 @@ class j {
953
959
  destroy() {
954
960
  }
955
961
  }
956
- let J, c, E, Z, H, U;
962
+ let J, c, F, Z, H, U;
957
963
  const X = "BGM", D = "SE", Q = "VOICE";
958
964
  class f {
959
965
  constructor(e, t, s) {
960
966
  this.hArg = e, this.buf = t, this.fn = s;
961
- const o = F(e, "start_ms", 0), i = F(e, "end_ms", f.MAX_END_MS), r = F(e, "ret_ms", 0), u = F(e, "pan", 0), a = F(e, "speed", 1);
967
+ const o = j(e, "start_ms", 0), i = j(e, "end_ms", f.MAX_END_MS), r = j(e, "ret_ms", 0), u = j(e, "pan", 0), a = j(e, "speed", 1);
962
968
  if (o < 0) throw `[playse] start_ms:${String(o)} が負の値です`;
963
969
  if (r < 0) throw `[playse] ret_ms:${String(r)} が負の値です`;
964
970
  if (0 < i) {
@@ -972,7 +978,7 @@ class f {
972
978
  const m = h * Number(c.getVal("sys:" + l + "volume", 1, !0)), y = A(e, "loop", !1);
973
979
  y ? (f.#t[t] = s, c.setVal_Nochk("save", "const.sn.loopPlaying", JSON.stringify(f.#t))) : f.delLoopPlay(t), c.setVal_Nochk("save", l + "start_ms", o), c.setVal_Nochk("save", l + "end_ms", i), c.setVal_Nochk("save", l + "ret_ms", r), c.setVal_Nochk("tmp", l + "playing", !0), c.flush();
974
980
  const g = z.find(s);
975
- this.#e = new j(
981
+ this.#e = new P(
976
982
  s,
977
983
  t,
978
984
  o,
@@ -986,39 +992,39 @@ class f {
986
992
  loop: y,
987
993
  speed: a,
988
994
  volume: m,
989
- loaded: (p, x) => {
995
+ loaded: (p, w) => {
990
996
  if (!this.#e.stt.isDestroy) {
991
997
  if (p) {
992
- E.errScript(`ロード失敗です SndBuf fn:${s} ${String(p)}`, !1);
998
+ F.errScript(`ロード失敗です SndBuf fn:${s} ${String(p)}`, !1);
993
999
  return;
994
1000
  }
995
- x && (this.#e.addSnd(x), u !== 0 && (x.filters = [new B.StereoFilter(u)]), e.fnc?.());
1001
+ w && (this.#e.addSnd(w), u !== 0 && (w.filters = [new B.StereoFilter(u)]), e.fnc?.());
996
1002
  }
997
1003
  }
998
1004
  };
999
- let w = "";
1005
+ let O = "";
1000
1006
  if (0 < o || i < f.MAX_END_MS) {
1001
- w = `${s};${String(o)};${String(i)};${String(r)}`;
1002
- const p = (d.sprites ??= {})[w] = {
1007
+ O = `${s};${String(o)};${String(i)};${String(r)}`;
1008
+ const p = (d.sprites ??= {})[O] = {
1003
1009
  start: o / 1e3,
1004
1010
  end: i / 1e3
1005
1011
  };
1006
1012
  d.preload = !0;
1007
- const x = d.loaded;
1008
- d.loaded = (C, S) => {
1013
+ const w = d.loaded;
1014
+ d.loaded = (C, E) => {
1009
1015
  if (this.#e.stt.isDestroy) return;
1010
- x(C, S);
1011
- const I = S, M = I.duration;
1012
- p.end < 0 && (p.end += M, I.removeSprites(w), I.addSprites(w, p)), p.end <= p.start && E.errScript(`[playse] end_ms:${String(i)}(${String(p.end * 1e3)}) >= start_ms:${String(o)} は異常値です`), p.end * 1e3 <= r && E.errScript(`[playse] end_ms:${String(i)}(${String(p.end * 1e3)}) <= ret_ms:${String(r)} は異常値です`), M <= p.start && E.errScript(`[playse] 音声ファイル再生時間:${String(M * 1e3)} <= start_ms:${String(o)} は異常値です`), i !== f.MAX_END_MS && M <= p.end && E.errScript(`[playse] 音声ファイル再生時間:${String(M * 1e3)} <= end_ms:${String(i)} は異常値です`), I.play(w, (re) => d.complete?.(re));
1016
+ w(C, E);
1017
+ const I = E, M = I.duration;
1018
+ p.end < 0 && (p.end += M, I.removeSprites(O), I.addSprites(O, p)), p.end <= p.start && F.errScript(`[playse] end_ms:${String(i)}(${String(p.end * 1e3)}) >= start_ms:${String(o)} は異常値です`), p.end * 1e3 <= r && F.errScript(`[playse] end_ms:${String(i)}(${String(p.end * 1e3)}) <= ret_ms:${String(r)} は異常値です`), M <= p.start && F.errScript(`[playse] 音声ファイル再生時間:${String(M * 1e3)} <= start_ms:${String(o)} は異常値です`), i !== f.MAX_END_MS && M <= p.end && F.errScript(`[playse] 音声ファイル再生時間:${String(M * 1e3)} <= end_ms:${String(i)} は異常値です`), I.play(O, (ue) => d.complete?.(ue));
1013
1019
  };
1014
1020
  } else d.autoPlay = !0;
1015
1021
  if (y ? r !== 0 && (d.loop = !1, d.complete = (p) => {
1016
- const x = p.duration, C = r / 1e3, S = i / 1e3;
1017
- x <= C && E.errScript(`[playse] 音声ファイル再生時間:${String(x * 1e3)} <= ret_ms:${String(r)} は異常値です`), p.play({
1022
+ const w = p.duration, C = r / 1e3, E = i / 1e3;
1023
+ w <= C && F.errScript(`[playse] 音声ファイル再生時間:${String(w * 1e3)} <= ret_ms:${String(r)} は異常値です`), p.play({
1018
1024
  // 一周目はループなし、なのでキャッシュされてる
1019
1025
  ...d,
1020
1026
  start: C,
1021
- end: S < 0 ? S + x : S,
1027
+ end: E < 0 ? E + w : E,
1022
1028
  // 負の値は末尾から
1023
1029
  // speed, // 重複
1024
1030
  loop: !0,
@@ -1032,7 +1038,7 @@ class f {
1032
1038
  }) : d.complete = () => {
1033
1039
  W(this.#e, t), this.#e.onPlayEnd();
1034
1040
  }, this.#s(), g) {
1035
- if (g.volume = m, w) this.#n(s, d);
1041
+ if (g.volume = m, O) this.#n(s, d);
1036
1042
  else if (g.isPlayable) {
1037
1043
  const p = g.options.source;
1038
1044
  !(p instanceof ArrayBuffer) || p.byteLength === 0 ? g.play(d) : this.#e.addSnd(N.from({
@@ -1047,16 +1053,16 @@ class f {
1047
1053
  if (this.needLoad = A(e, "join", !0)) {
1048
1054
  const p = this.#e.procID + `loaded buf:${t} fn:${s}`;
1049
1055
  L.beginProc(p);
1050
- const x = d.loaded;
1051
- d.loaded = (C, S) => {
1052
- x(C, S), L.endProc(p);
1056
+ const w = d.loaded;
1057
+ d.loaded = (C, E) => {
1058
+ w(C, E), L.endProc(p);
1053
1059
  };
1054
1060
  }
1055
1061
  this.#n(s, d);
1056
1062
  }
1057
1063
  static #t = {};
1058
1064
  static init(e, t, s, o, i) {
1059
- f.#t = {}, J = e, c = t, E = s, Z = o, H = i;
1065
+ f.#t = {}, J = e, c = t, F = s, Z = o, H = i, P.init();
1060
1066
  }
1061
1067
  static setEvtMng(e) {
1062
1068
  U = e;
@@ -1067,7 +1073,7 @@ class f {
1067
1073
  c.setVal_Nochk("save", t + "fn", ""), c.setVal_Nochk("save", "const.sn.loopPlaying", JSON.stringify(f.#t)), c.flush();
1068
1074
  }
1069
1075
  static getVol(e, t) {
1070
- const s = F(e, "volume", t);
1076
+ const s = j(e, "volume", t);
1071
1077
  return s < 0 ? 0 : s > 1 ? 1 : s;
1072
1078
  }
1073
1079
  static xchgbuf({ buf: e = D, buf2: t = D }) {
@@ -1083,15 +1089,15 @@ class f {
1083
1089
  };
1084
1090
  };
1085
1091
  #n(e, t) {
1086
- const s = J.searchPath(e, ae.SOUND);
1092
+ const s = J.searchPath(e, le.SOUND);
1087
1093
  if (!s.endsWith(".bin")) {
1088
1094
  t.url = s, N.from(t);
1089
1095
  return;
1090
1096
  }
1091
- new le().add({ name: e, url: s, xhrType: O.XHR_RESPONSE_TYPE.BUFFER }).use((o, i) => {
1097
+ new ce().add({ name: e, url: s, xhrType: S.XHR_RESPONSE_TYPE.BUFFER }).use((o, i) => {
1092
1098
  Z.decAB(o.data).then((r) => {
1093
1099
  o.data = r;
1094
- }).catch((r) => E.errScript(`Sound ロード失敗ですc fn:${o.name} ${String(r)}`, !1)).finally(() => i());
1100
+ }).catch((r) => F.errScript(`Sound ロード失敗ですc fn:${o.name} ${String(r)}`, !1)).finally(() => i());
1095
1101
  }).load((o, i) => {
1096
1102
  t.source = i[e]?.data, N.from(t);
1097
1103
  });
@@ -1123,11 +1129,11 @@ class Ee {
1123
1129
  e.stt = new G(e);
1124
1130
  }
1125
1131
  stopse(e) {
1126
- e.stt = new P(e, !1);
1132
+ e.stt = new x(e, !1);
1127
1133
  }
1128
1134
  ws = () => !1;
1129
1135
  onPlayEnd() {
1130
- this.si.stt = new P(this.si, !1);
1136
+ this.si.stt = new x(this.si, !1);
1131
1137
  }
1132
1138
  // ok
1133
1139
  fade() {
@@ -1151,7 +1157,7 @@ class G {
1151
1157
  }
1152
1158
  // ok
1153
1159
  stopse(e) {
1154
- e.stt = new P(e);
1160
+ e.stt = new x(e);
1155
1161
  }
1156
1162
  ws(e, t) {
1157
1163
  if (e.loop) return !1;
@@ -1167,7 +1173,7 @@ class G {
1167
1173
  return L.beginProc(e.procID + "ws", r, !0, s ? r : void 0), !0;
1168
1174
  }
1169
1175
  onPlayEnd() {
1170
- this.si.stt = new P(this.si, !1);
1176
+ this.si.stt = new x(this.si, !1);
1171
1177
  }
1172
1178
  // ok
1173
1179
  fade(e, t) {
@@ -1175,21 +1181,21 @@ class G {
1175
1181
  c.setVal_Nochk("save", i, r);
1176
1182
  const u = r * Number(c.getVal("sys:" + i, 1)), a = A(t, "stop", r === 0);
1177
1183
  a && f.delLoopPlay(s), c.flush();
1178
- const l = F(t, "time", NaN), h = F(t, "delay", 0);
1184
+ const l = j(t, "time", NaN), h = j(t, "delay", 0);
1179
1185
  if (l === 0 && h === 0 || U.isSkipping) {
1180
- e.setVol(u), e.stt = a ? new P(e) : new G(e);
1186
+ e.setVol(u), e.stt = a ? new x(e) : new G(e);
1181
1187
  return;
1182
1188
  }
1183
1189
  if (!e.snd) return;
1184
1190
  const m = e.tw();
1185
- m && (pe.setTwProp(m, t).to({ volume: u }, l).onUpdate((y) => {
1191
+ m && (ee.setTwProp(m, t).to({ volume: u }, l).onUpdate((y) => {
1186
1192
  if (e.snd?.isPlaying) {
1187
1193
  e.snd.volume = y.volume;
1188
1194
  return;
1189
1195
  }
1190
1196
  m.stop(), m.onComplete();
1191
1197
  }).onComplete(() => {
1192
- fe(m), e.stt.compFade(s), e.stt = a ? new P(e) : new G(e);
1198
+ P.grp.remove(m), e.stt.compFade(s), e.stt = a ? new x(e) : new G(e);
1193
1199
  }).start(), e.stt = new je(m, e));
1194
1200
  }
1195
1201
  wf = () => !1;
@@ -1210,12 +1216,12 @@ class Fe {
1210
1216
  }
1211
1217
  // ok
1212
1218
  stopse(e) {
1213
- e.stt = new P(e);
1219
+ e.stt = new x(e);
1214
1220
  }
1215
1221
  ws = () => !1;
1216
1222
  // ok
1217
1223
  onPlayEnd() {
1218
- this.si.stt = new P(this.si, !1), L.notifyEndProc(this.si.procID + "ws");
1224
+ this.si.stt = new x(this.si, !1), L.notifyEndProc(this.si.procID + "ws");
1219
1225
  }
1220
1226
  fade() {
1221
1227
  }
@@ -1238,13 +1244,13 @@ class je {
1238
1244
  }
1239
1245
  // ok
1240
1246
  stopse(e) {
1241
- this.stopfadese(), e.stt = new P(e);
1247
+ this.stopfadese(), e.stt = new x(e);
1242
1248
  }
1243
1249
  // 順番厳守
1244
1250
  ws = () => !1;
1245
1251
  // ok ?
1246
1252
  onPlayEnd() {
1247
- this.stopfadese(), this.si.stt = new P(this.si, !1);
1253
+ this.stopfadese(), this.si.stt = new x(this.si, !1);
1248
1254
  }
1249
1255
  // ok
1250
1256
  fade() {
@@ -1272,12 +1278,12 @@ class ke {
1272
1278
  }
1273
1279
  // ok
1274
1280
  stopse(e) {
1275
- this.stopfadese(), e.stt = new P(e);
1281
+ this.stopfadese(), e.stt = new x(e);
1276
1282
  }
1277
1283
  ws = () => !1;
1278
1284
  // ok
1279
1285
  onPlayEnd() {
1280
- this.stopfadese(), this.si.stt = new P(this.si, !1);
1286
+ this.stopfadese(), this.si.stt = new x(this.si, !1);
1281
1287
  }
1282
1288
  // ok
1283
1289
  fade() {
@@ -1291,7 +1297,7 @@ class ke {
1291
1297
  stopfadese = () => this.si.stop();
1292
1298
  isDestroy = !1;
1293
1299
  }
1294
- class P {
1300
+ class x {
1295
1301
  constructor(e, t = !0) {
1296
1302
  this.si = e, this.stop = t, t && (e.stop(), e.loop && (e.destroy(), e.destroy = () => {
1297
1303
  }));
@@ -1322,7 +1328,7 @@ class P {
1322
1328
  }
1323
1329
  export {
1324
1330
  D as B,
1325
- Ve as I,
1331
+ Ae as I,
1326
1332
  z as R,
1327
1333
  f as S,
1328
1334
  X as a