@famibee/skynovel 1.64.8 → 1.64.10

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 (219) hide show
  1. package/README.md +1 -1
  2. package/dist/Button.js +162 -0
  3. package/dist/Button.js.map +1 -0
  4. package/dist/CallStack.js.map +1 -1
  5. package/dist/CmnTween.js +201 -0
  6. package/dist/CmnTween.js.map +1 -0
  7. package/dist/DebugMng.js +105 -0
  8. package/dist/DebugMng.js.map +1 -0
  9. package/dist/EventMng.js +40 -39
  10. package/dist/EventMng.js.map +1 -1
  11. package/dist/GrpLayer.js +192 -0
  12. package/dist/GrpLayer.js.map +1 -0
  13. package/dist/LayerMng.js +483 -2422
  14. package/dist/LayerMng.js.map +1 -1
  15. package/dist/Main.js +394 -0
  16. package/dist/Main.js.map +1 -0
  17. package/dist/PropParser.js +1 -1
  18. package/dist/PropParser.js.map +1 -1
  19. package/dist/Reading.js +11 -11
  20. package/dist/Reading.js.map +1 -1
  21. package/dist/RubySpliter.js +90 -0
  22. package/dist/RubySpliter.js.map +1 -0
  23. package/dist/ScriptIterator.js +263 -353
  24. package/dist/ScriptIterator.js.map +1 -1
  25. package/dist/SndBuf.js +746 -949
  26. package/dist/SndBuf.js.map +1 -1
  27. package/dist/SoundMng.js +1 -1
  28. package/dist/SoundMng.js.map +1 -1
  29. package/dist/SpritesMng.js +229 -0
  30. package/dist/SpritesMng.js.map +1 -0
  31. package/dist/TxtLayer.js +1402 -0
  32. package/dist/TxtLayer.js.map +1 -0
  33. package/dist/Variable.js +157 -164
  34. package/dist/Variable.js.map +1 -1
  35. package/dist/app.d.ts +4 -4
  36. package/dist/app.d.ts.map +1 -1
  37. package/dist/appMain.d.ts.map +1 -1
  38. package/dist/appMain_cmn.d.ts.map +1 -1
  39. package/dist/index.d.ts +0 -1
  40. package/dist/index.d.ts.map +1 -1
  41. package/dist/platform.js +369 -0
  42. package/dist/platform.js.map +1 -0
  43. package/dist/sn/Button.d.ts +2 -2
  44. package/dist/sn/CallStack.d.ts +2 -2
  45. package/dist/sn/CmnInterface.d.ts +39 -41
  46. package/dist/sn/CmnInterface.d.ts.map +1 -1
  47. package/dist/sn/CmnLib.d.ts +11 -7
  48. package/dist/sn/CmnLib.d.ts.map +1 -1
  49. package/dist/sn/CmnTween.d.ts +9 -9
  50. package/dist/sn/Config.d.ts.map +1 -1
  51. package/dist/sn/ConfigBase.d.ts +16 -17
  52. package/dist/sn/ConfigBase.d.ts.map +1 -1
  53. package/dist/sn/DebugMng.d.ts +2 -2
  54. package/dist/sn/DebugMng.d.ts.map +1 -1
  55. package/dist/sn/DesignCast.d.ts +9 -9
  56. package/dist/sn/DesignCast.d.ts.map +1 -1
  57. package/dist/sn/EventMng.d.ts +4 -4
  58. package/dist/sn/EventMng.d.ts.map +1 -1
  59. package/dist/sn/FrameMng.d.ts +5 -5
  60. package/dist/sn/FrameMng.d.ts.map +1 -1
  61. package/dist/sn/Grammar.d.ts +124 -124
  62. package/dist/sn/Grammar.d.ts.map +1 -1
  63. package/dist/sn/GrpLayer.d.ts +7 -7
  64. package/dist/sn/GrpLayer.d.ts.map +1 -1
  65. package/dist/sn/Hyphenation.d.ts +2 -2
  66. package/dist/sn/Layer.d.ts +10 -10
  67. package/dist/sn/LayerMng.d.ts +7 -8
  68. package/dist/sn/LayerMng.d.ts.map +1 -1
  69. package/dist/sn/Log.d.ts +3 -3
  70. package/dist/sn/Log.d.ts.map +1 -1
  71. package/dist/sn/Main.d.ts +6 -5
  72. package/dist/sn/Main.d.ts.map +1 -1
  73. package/dist/sn/Pages.d.ts +8 -8
  74. package/dist/sn/Pages.d.ts.map +1 -1
  75. package/dist/sn/PropParser.d.ts +3 -3
  76. package/dist/sn/PropParser.d.ts.map +1 -1
  77. package/dist/sn/Reading.d.ts +12 -12
  78. package/dist/sn/Reading.d.ts.map +1 -1
  79. package/dist/sn/RubySpliter.d.ts +4 -4
  80. package/dist/sn/RubySpliter.d.ts.map +1 -1
  81. package/dist/sn/ScriptIterator.d.ts +5 -6
  82. package/dist/sn/ScriptIterator.d.ts.map +1 -1
  83. package/dist/sn/SndBuf.d.ts +12 -12
  84. package/dist/sn/SndBuf.d.ts.map +1 -1
  85. package/dist/sn/SoundMng.d.ts +4 -4
  86. package/dist/sn/SoundMng.d.ts.map +1 -1
  87. package/dist/sn/SpritesMng.d.ts +5 -5
  88. package/dist/sn/SpritesMng.d.ts.map +1 -1
  89. package/dist/sn/SysApp.d.ts +13 -10
  90. package/dist/sn/SysApp.d.ts.map +1 -1
  91. package/dist/sn/SysBase.d.ts +33 -32
  92. package/dist/sn/SysBase.d.ts.map +1 -1
  93. package/dist/sn/SysWeb.d.ts +7 -11
  94. package/dist/sn/SysWeb.d.ts.map +1 -1
  95. package/dist/sn/TxtLayer.d.ts +10 -8
  96. package/dist/sn/TxtLayer.d.ts.map +1 -1
  97. package/dist/sn/TxtStage.d.ts +5 -5
  98. package/dist/sn/TxtStage.d.ts.map +1 -1
  99. package/dist/sn/Variable.d.ts +9 -8
  100. package/dist/sn/Variable.d.ts.map +1 -1
  101. package/dist/test/SysTest.d.ts +2 -2
  102. package/dist/test/ValTest.d.ts +4 -4
  103. package/dist/test/ValTest.d.ts.map +1 -1
  104. package/dist/web.d.ts +4 -4
  105. package/dist/web.d.ts.map +1 -1
  106. package/dist/web.js +3 -3
  107. package/dist/web2.js +6959 -8339
  108. package/dist/web2.js.map +1 -1
  109. package/dist_app/Button.js +162 -0
  110. package/dist_app/Button.js.map +1 -0
  111. package/dist_app/CallStack.js.map +1 -1
  112. package/dist_app/CmnTween.js +201 -0
  113. package/dist_app/CmnTween.js.map +1 -0
  114. package/dist_app/EventMng.js +40 -39
  115. package/dist_app/EventMng.js.map +1 -1
  116. package/dist_app/GrpLayer.js +192 -0
  117. package/dist_app/GrpLayer.js.map +1 -0
  118. package/dist_app/LayerMng.js +483 -2422
  119. package/dist_app/LayerMng.js.map +1 -1
  120. package/dist_app/Main.js +393 -0
  121. package/dist_app/Main.js.map +1 -0
  122. package/dist_app/PropParser.js.map +1 -1
  123. package/dist_app/Reading.js +19 -19
  124. package/dist_app/Reading.js.map +1 -1
  125. package/dist_app/RubySpliter.js +90 -0
  126. package/dist_app/RubySpliter.js.map +1 -0
  127. package/dist_app/ScriptIterator.js +216 -307
  128. package/dist_app/ScriptIterator.js.map +1 -1
  129. package/dist_app/SndBuf.js +746 -949
  130. package/dist_app/SndBuf.js.map +1 -1
  131. package/dist_app/SoundMng.js +1 -1
  132. package/dist_app/SoundMng.js.map +1 -1
  133. package/dist_app/SpritesMng.js +228 -0
  134. package/dist_app/SpritesMng.js.map +1 -0
  135. package/dist_app/TxtLayer.js +1401 -0
  136. package/dist_app/TxtLayer.js.map +1 -0
  137. package/dist_app/Variable.js +157 -164
  138. package/dist_app/Variable.js.map +1 -1
  139. package/dist_app/app.d.ts +4 -4
  140. package/dist_app/app.d.ts.map +1 -1
  141. package/dist_app/app.js +2 -2
  142. package/dist_app/app2.js +3075 -4351
  143. package/dist_app/app2.js.map +1 -1
  144. package/dist_app/appMain.d.ts.map +1 -1
  145. package/dist_app/appMain.js +18 -18
  146. package/dist_app/appMain.js.map +1 -1
  147. package/dist_app/appMain_cmn.d.ts.map +1 -1
  148. package/dist_app/index.d.ts +0 -1
  149. package/dist_app/index.d.ts.map +1 -1
  150. package/dist_app/platform.js +369 -0
  151. package/dist_app/platform.js.map +1 -0
  152. package/dist_app/sn/Button.d.ts +2 -2
  153. package/dist_app/sn/CallStack.d.ts +2 -2
  154. package/dist_app/sn/CmnInterface.d.ts +39 -41
  155. package/dist_app/sn/CmnInterface.d.ts.map +1 -1
  156. package/dist_app/sn/CmnLib.d.ts +11 -7
  157. package/dist_app/sn/CmnLib.d.ts.map +1 -1
  158. package/dist_app/sn/CmnTween.d.ts +9 -9
  159. package/dist_app/sn/Config.d.ts.map +1 -1
  160. package/dist_app/sn/ConfigBase.d.ts +16 -17
  161. package/dist_app/sn/ConfigBase.d.ts.map +1 -1
  162. package/dist_app/sn/DebugMng.d.ts +2 -2
  163. package/dist_app/sn/DebugMng.d.ts.map +1 -1
  164. package/dist_app/sn/DesignCast.d.ts +9 -9
  165. package/dist_app/sn/DesignCast.d.ts.map +1 -1
  166. package/dist_app/sn/EventMng.d.ts +4 -4
  167. package/dist_app/sn/EventMng.d.ts.map +1 -1
  168. package/dist_app/sn/FrameMng.d.ts +5 -5
  169. package/dist_app/sn/FrameMng.d.ts.map +1 -1
  170. package/dist_app/sn/Grammar.d.ts +124 -124
  171. package/dist_app/sn/Grammar.d.ts.map +1 -1
  172. package/dist_app/sn/GrpLayer.d.ts +7 -7
  173. package/dist_app/sn/GrpLayer.d.ts.map +1 -1
  174. package/dist_app/sn/Hyphenation.d.ts +2 -2
  175. package/dist_app/sn/Layer.d.ts +10 -10
  176. package/dist_app/sn/LayerMng.d.ts +7 -8
  177. package/dist_app/sn/LayerMng.d.ts.map +1 -1
  178. package/dist_app/sn/Log.d.ts +3 -3
  179. package/dist_app/sn/Log.d.ts.map +1 -1
  180. package/dist_app/sn/Main.d.ts +6 -5
  181. package/dist_app/sn/Main.d.ts.map +1 -1
  182. package/dist_app/sn/Pages.d.ts +8 -8
  183. package/dist_app/sn/Pages.d.ts.map +1 -1
  184. package/dist_app/sn/PropParser.d.ts +3 -3
  185. package/dist_app/sn/PropParser.d.ts.map +1 -1
  186. package/dist_app/sn/Reading.d.ts +12 -12
  187. package/dist_app/sn/Reading.d.ts.map +1 -1
  188. package/dist_app/sn/RubySpliter.d.ts +4 -4
  189. package/dist_app/sn/RubySpliter.d.ts.map +1 -1
  190. package/dist_app/sn/ScriptIterator.d.ts +5 -6
  191. package/dist_app/sn/ScriptIterator.d.ts.map +1 -1
  192. package/dist_app/sn/SndBuf.d.ts +12 -12
  193. package/dist_app/sn/SndBuf.d.ts.map +1 -1
  194. package/dist_app/sn/SoundMng.d.ts +4 -4
  195. package/dist_app/sn/SoundMng.d.ts.map +1 -1
  196. package/dist_app/sn/SpritesMng.d.ts +5 -5
  197. package/dist_app/sn/SpritesMng.d.ts.map +1 -1
  198. package/dist_app/sn/SysApp.d.ts +13 -10
  199. package/dist_app/sn/SysApp.d.ts.map +1 -1
  200. package/dist_app/sn/SysBase.d.ts +33 -32
  201. package/dist_app/sn/SysBase.d.ts.map +1 -1
  202. package/dist_app/sn/SysWeb.d.ts +7 -11
  203. package/dist_app/sn/SysWeb.d.ts.map +1 -1
  204. package/dist_app/sn/TxtLayer.d.ts +10 -8
  205. package/dist_app/sn/TxtLayer.d.ts.map +1 -1
  206. package/dist_app/sn/TxtStage.d.ts +5 -5
  207. package/dist_app/sn/TxtStage.d.ts.map +1 -1
  208. package/dist_app/sn/Variable.d.ts +9 -8
  209. package/dist_app/sn/Variable.d.ts.map +1 -1
  210. package/dist_app/test/SysTest.d.ts +2 -2
  211. package/dist_app/test/ValTest.d.ts +4 -4
  212. package/dist_app/test/ValTest.d.ts.map +1 -1
  213. package/dist_app/web.d.ts +4 -4
  214. package/dist_app/web.d.ts.map +1 -1
  215. package/package.json +7 -7
  216. package/dist/sn/SysNode.d.ts +0 -15
  217. package/dist/sn/SysNode.d.ts.map +0 -1
  218. package/dist_app/sn/SysNode.d.ts +0 -15
  219. package/dist_app/sn/SysNode.d.ts.map +0 -1
@@ -1,282 +1,82 @@
1
- import { d as S, e as V, g as Y, Q as U, o as j, U as B, V as dt, m as _t, L as yt } from "./app2.js";
2
- import { u as mt, E as f, r as gt, T as Z, a as k, b as bt } from "./Reading.js";
3
- const $ = `trans
4
- `, Q = "tsy nm:";
5
- class vt {
6
- static #t = {};
7
- static #s;
8
- static #e;
9
- static init(t, e) {
10
- this.#t = {}, this.#s = t, this.#e = e, this.#e.ticker.add(this.#n);
11
- }
12
- static #n = () => mt();
13
- static destroy() {
14
- this.stopAllTw(), this.#e.ticker.remove(this.#n);
15
- }
16
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
17
- static setTwProp(t, e) {
18
- const s = S(e, "repeat", 1);
19
- return t.delay(S(e, "delay", 0)).easing(this.ease(e.ease)).repeat(s > 0 ? s - 1 : 1 / 0).yoyo(V(e, "yoyo", !1));
20
- }
21
- static #o = {
22
- "Back.In": (t) => f.Back.In(t),
23
- "Back.InOut": (t) => f.Back.InOut(t),
24
- "Back.Out": (t) => f.Back.Out(t),
25
- "Bounce.In": (t) => f.Bounce.In(t),
26
- "Bounce.InOut": (t) => f.Bounce.InOut(t),
27
- "Bounce.Out": (t) => f.Bounce.Out(t),
28
- "Circular.In": (t) => f.Circular.In(t),
29
- "Circular.InOut": (t) => f.Circular.InOut(t),
30
- "Circular.Out": (t) => f.Circular.Out(t),
31
- "Cubic.In": (t) => f.Cubic.In(t),
32
- "Cubic.InOut": (t) => f.Cubic.InOut(t),
33
- "Cubic.Out": (t) => f.Cubic.Out(t),
34
- "Elastic.In": (t) => f.Elastic.In(t),
35
- "Elastic.InOut": (t) => f.Elastic.InOut(t),
36
- "Elastic.Out": (t) => f.Elastic.Out(t),
37
- "Exponential.In": (t) => f.Exponential.In(t),
38
- "Exponential.InOut": (t) => f.Exponential.InOut(t),
39
- "Exponential.Out": (t) => f.Exponential.Out(t),
40
- "Linear.None": (t) => f.Linear.None(t),
41
- "Quadratic.In": (t) => f.Quadratic.In(t),
42
- "Quadratic.InOut": (t) => f.Quadratic.InOut(t),
43
- "Quadratic.Out": (t) => f.Quadratic.Out(t),
44
- "Quartic.In": (t) => f.Quartic.In(t),
45
- "Quartic.InOut": (t) => f.Quartic.InOut(t),
46
- "Quartic.Out": (t) => f.Quartic.Out(t),
47
- "Quintic.In": (t) => f.Quintic.In(t),
48
- "Quintic.InOut": (t) => f.Quintic.InOut(t),
49
- "Quintic.Out": (t) => f.Quintic.Out(t),
50
- "Sinusoidal.In": (t) => f.Sinusoidal.In(t),
51
- "Sinusoidal.InOut": (t) => f.Sinusoidal.InOut(t),
52
- "Sinusoidal.Out": (t) => f.Sinusoidal.Out(t)
53
- };
54
- static ease(t) {
55
- if (!t) return (s) => f.Linear.None(s);
56
- const e = this.#o[t];
57
- if (!e) throw "異常なease指定です";
58
- return e;
59
- }
60
- static hMemberCnt = {
61
- alpha: 0,
62
- height: 0,
63
- rotation: 0,
64
- // rotationX〜Z、scaleZ、zは設定すると
65
- scale_x: 0,
66
- // 三次元方向の拡大縮小ルーチンが働き画像がぼやけるので
67
- scale_y: 0,
68
- // backlayで設定しない方針
69
- pivot_x: 0,
70
- pivot_y: 0,
71
- width: 0,
72
- x: 0,
73
- y: 0
74
- };
75
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
76
- static cnvTweenArg(t, e) {
77
- const s = {};
78
- for (const o of Object.keys(this.hMemberCnt)) {
79
- const i = t[o];
80
- if (!i) continue;
81
- const r = String(i), a = r.startsWith("="), u = a ? r.slice(1) : r;
82
- if (!u) continue;
83
- const [c, l] = u.split(","), _ = s[o] = parseFloat(c);
84
- l && (s[o] += Math.round(
85
- Math.random() * (parseFloat(l) - _ + 1)
86
- )), a && (s[o] += parseFloat(e[o]));
87
- }
88
- return s;
89
- }
90
- // トゥイーン全停止
91
- static stopAllTw() {
92
- this.#t = {}, gt();
93
- }
94
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
95
- static tween(t, e, s, o, i, r, a, u = !0) {
96
- const c = this.#s.isSkipping ? 0 : S(e, "time", NaN), l = new Z(s).to(o, c).onUpdate(i);
97
- this.setTwProp(l, e), this.#t[t] = { tw: l, onEnd: a };
98
- const { path: _ } = e;
99
- let m = l;
100
- if (_) {
101
- Y.debugLog && console.group(`🍝 [${e[":タグ名"]}] path=${_}= start(${s.x},${s.y},${s.alpha})`);
102
- for (const { groups: h } of _.matchAll(this.#a)) {
103
- const { x: v, x2: T, y: p, y2: P, o: F, o2: O, json: L } = h;
104
- let E = {};
105
- if (L) try {
106
- E = JSON.parse(L);
107
- } catch (ft) {
108
- console.error(`🍝 json=${L} ` + String(ft));
109
- continue;
110
- }
111
- else
112
- (v ?? T) && (E.x = v ?? T), (p ?? P) && (E.y = p ?? P), (F ?? O) && (E.alpha = Number(F ?? O));
113
- const K = this.cnvTweenArg(E, s);
114
- Y.debugLog && console.info(`🍝 ${// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
115
- L ?? `{x:${v} y:${p} o:${F}}`} => hTo:${JSON.stringify(K)}`);
116
- const W = new Z(s).to(K, c);
117
- this.setTwProp(W, e), m.chain(W), m = W;
118
- }
119
- Y.debugLog && console.groupEnd();
120
- }
121
- m.onComplete(() => {
122
- const h = this.#t[t];
123
- h?.tw && (delete this.#t[t], h.tw = void 0, l.stop(), h.onEnd?.(), r(), k.notifyEndProc(Q + t));
124
- });
125
- const { chain: b } = e;
126
- if (b) {
127
- const h = this.#t[b];
128
- if (!h?.tw) throw `${b}は存在しない・または終了したトゥイーンです`;
129
- delete h.onEnd, h.tw.chain(l);
130
- } else u && l.start();
131
- return l;
132
- }
133
- // 11 match 301 step (0.1ms) PCRE2 https://regex101.com/r/reinpq/1
134
- // List ${x}${x2}/${y}${y2}/${o}${o2}=${json}\n
135
- /*
136
- \(\s*
137
- (?: (?<x>[-=\d\.]+) | (['"]) (?<x2>.*?) \2 )?
138
- (?:
139
- \s*,\s*
140
- (?: (?<y>[-=\d\.]+) | (['"]) (?<y2>.*?) \5 )?
141
- (?:
142
- \s*,\s*
143
- (?: (?<o>[-=\d\.]+) | (['"]) (?<o2>.*?) \8 )
144
-
145
- )?
146
- )?
147
- |
148
- (?<json>\{[^{}]*})
149
- */
150
- static #a = /\(\s*(?:(?<x>[-=\d.]+)|(['"])(?<x2>.*?)\2)?(?:\s*,\s*(?:(?<y>[-=\d.]+)|(['"])(?<y2>.*?)\5)?(?:\s*,\s*(?:(?<o>[-=\d.]+)|(['"])(?<o2>.*?)\8))?)?|(?<json>\{[^{}]*})/g;
151
- // トランス終了待ち
152
- static wt(t) {
153
- if (!this.#t[$]?.tw) return !1;
154
- const s = () => this.#r();
155
- return k.beginProc(Q + $, s, !0, s), !0;
156
- }
157
- // レイヤのトランジションの停止
158
- static #r() {
159
- this.#t[$]?.tw?.stop().end();
160
- }
161
- // stop()とend()は別
162
- static async closeTrans() {
163
- if (!this.#t[$]?.tw) return;
164
- const { promise: e, resolve: s } = Promise.withResolvers();
165
- k.beginProc(Q + $, s, !1, s), this.#r(), await e;
166
- }
167
- // トゥイーン終了待ち
168
- static wait_tsy(t) {
169
- const e = this.#i(t), s = this.#t[e];
170
- if (!s?.tw) return !1;
171
- const o = () => s.tw?.end();
172
- return k.beginProc(Q + e, o, !0, o), !0;
173
- }
174
- static #i(t) {
175
- const { layer: e = "", id: s, name: o } = t, i = s ? `frm
176
- ${s}` : o ?? e;
177
- if (!i) throw "トゥイーンが指定されていません";
178
- return i;
179
- }
180
- // トゥイーン中断
181
- static stop_tsy(t) {
182
- const e = this.#i(t);
183
- return this.#t[e]?.tw?.stop().end(), !1;
184
- }
185
- // 一時停止
186
- static pause_tsy(t) {
187
- const e = this.#i(t);
188
- return this.#t[e]?.tw?.pause(), !1;
189
- }
190
- // 一時停止再開
191
- static resume_tsy(t) {
192
- const e = this.#i(t);
193
- return this.#t[e]?.tw?.resume(), !1;
194
- }
195
- }
196
- /*!
197
- * @pixi/sound - v4.4.1
198
- * https://github.com/pixijs/pixi-sound
199
- * Compiled Tue, 15 Aug 2023 19:22:13 UTC
200
- *
201
- * @pixi/sound is licensed under the MIT license.
202
- * http://www.opensource.org/licenses/mit-license
203
- */
204
- var at;
205
- function g() {
206
- return at;
1
+ import { l as R, m as w, T as M, n as ue, k as F, e as A, S as ae, L as le } from "./app2.js";
2
+ import { C as ce } from "./CmnTween.js";
3
+ import { a as L, T as pe, r as he } from "./Reading.js";
4
+ var ee;
5
+ function _() {
6
+ return ee;
207
7
  }
208
- var ut = function(n, t) {
209
- return (ut = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, s) {
210
- e.__proto__ = s;
211
- } || function(e, s) {
212
- for (var o in s) Object.prototype.hasOwnProperty.call(s, o) && (e[o] = s[o]);
213
- })(n, t);
8
+ var te = function(n, e) {
9
+ return (te = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, s) {
10
+ t.__proto__ = s;
11
+ } || function(t, s) {
12
+ for (var o in s) Object.prototype.hasOwnProperty.call(s, o) && (t[o] = s[o]);
13
+ })(n, e);
214
14
  };
215
- function x(n, t) {
216
- if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
217
- function e() {
15
+ function b(n, e) {
16
+ if (typeof e != "function" && e !== null) throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
17
+ function t() {
218
18
  this.constructor = n;
219
19
  }
220
- ut(n, t), n.prototype = t === null ? Object.create(t) : (e.prototype = t.prototype, new e());
20
+ te(n, e), n.prototype = e === null ? Object.create(e) : (t.prototype = e.prototype, new t());
221
21
  }
222
- var N = function() {
223
- return (N = Object.assign || function(n) {
224
- for (var t, e = 1, s = arguments.length; e < s; e++) for (var o in t = arguments[e]) Object.prototype.hasOwnProperty.call(t, o) && (n[o] = t[o]);
22
+ var V = function() {
23
+ return (V = Object.assign || function(n) {
24
+ 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]);
225
25
  return n;
226
26
  }).apply(this, arguments);
227
- }, ct = ["mp3", "ogg", "oga", "opus", "mpeg", "wav", "m4a", "aiff", "wma", "mid", "caf"], X = {};
228
- function Pt(n) {
229
- var t = N({ m4a: "audio/mp4", oga: "audio/ogg", opus: 'audio/ogg; codecs="opus"', caf: 'audio/x-caf; codecs="opus"' }, n || {}), e = document.createElement("audio"), s = {}, o = /^no$/;
230
- ct.forEach(function(i) {
231
- var r = e.canPlayType("audio/".concat(i)).replace(o, ""), a = t[i] ? e.canPlayType(t[i]).replace(o, "") : "";
232
- s[i] = !!r || !!a;
233
- }), Object.assign(X, s);
27
+ }, se = ["mp3", "ogg", "oga", "opus", "mpeg", "wav", "m4a", "aiff", "wma", "mid", "caf"], U = {};
28
+ function fe(n) {
29
+ 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(r) {
31
+ var i = t.canPlayType("audio/".concat(r)).replace(o, ""), u = e[r] ? t.canPlayType(e[r]).replace(o, "") : "";
32
+ s[r] = !!i || !!u;
33
+ }), Object.assign(U, s);
234
34
  }
235
- Pt();
236
- var xt = /\.(\{([^\}]+)\})(\?.*)?$/;
237
- function lt(n) {
238
- var t = xt, e = typeof n == "string" ? n : n.url;
239
- if (!t.test(e)) return e;
240
- for (var s = t.exec(e), o = s[2].split(","), i = o[o.length - 1], r = 0, a = o.length; r < a; r++) {
241
- var u = o[r];
242
- if (X[u]) {
243
- i = u;
35
+ fe();
36
+ var de = /\.(\{([^\}]+)\})(\?.*)?$/;
37
+ function ne(n) {
38
+ var e = de, t = typeof n == "string" ? n : n.url;
39
+ if (!e.test(t)) return t;
40
+ for (var s = e.exec(t), o = s[2].split(","), r = o[o.length - 1], i = 0, u = o.length; i < u; i++) {
41
+ var a = o[i];
42
+ if (U[a]) {
43
+ r = a;
244
44
  break;
245
45
  }
246
46
  }
247
- var c = e.replace(s[1], i);
47
+ var l = t.replace(s[1], r);
248
48
  if (typeof n != "string") {
249
- var l = n;
250
- l.extension = i, l.url = c;
49
+ var h = n;
50
+ h.extension = r, h.url = l;
251
51
  }
252
- return c;
52
+ return l;
253
53
  }
254
- var J = ct.filter(function(n) {
255
- return X[n];
256
- }), pt = function() {
54
+ var q = se.filter(function(n) {
55
+ return U[n];
56
+ }), oe = function() {
257
57
  function n() {
258
58
  }
259
59
  return n.add = function() {
260
- n.setLegacy(g().useLegacy);
261
- }, n.setLegacy = function(t) {
262
- t ? J.forEach(function(e) {
263
- j.setExtensionXhrType(e, j.XHR_RESPONSE_TYPE.DEFAULT), j.setExtensionLoadType(e, j.LOAD_TYPE.AUDIO);
264
- }) : J.forEach(function(e) {
265
- j.setExtensionXhrType(e, j.XHR_RESPONSE_TYPE.BUFFER), j.setExtensionLoadType(e, j.LOAD_TYPE.XHR);
60
+ n.setLegacy(_().useLegacy);
61
+ }, n.setLegacy = function(e) {
62
+ e ? q.forEach(function(t) {
63
+ w.setExtensionXhrType(t, w.XHR_RESPONSE_TYPE.DEFAULT), w.setExtensionLoadType(t, w.LOAD_TYPE.AUDIO);
64
+ }) : q.forEach(function(t) {
65
+ w.setExtensionXhrType(t, w.XHR_RESPONSE_TYPE.BUFFER), w.setExtensionLoadType(t, w.LOAD_TYPE.XHR);
266
66
  });
267
- }, n.pre = function(t, e) {
268
- lt(t), e();
269
- }, n.use = function(t, e) {
270
- t.data && J.indexOf(t.extension) > -1 ? t.sound = g().add(t.name, { loaded: e, preload: !0, url: t.url, source: t.data }) : e();
67
+ }, n.pre = function(e, t) {
68
+ ne(e), t();
69
+ }, n.use = function(e, t) {
70
+ e.data && q.indexOf(e.extension) > -1 ? e.sound = _().add(e.name, { loaded: t, preload: !0, url: e.url, source: e.data }) : t();
271
71
  }, n.extension = "loader", n;
272
- }(), wt = 0, Ot = function(n) {
273
- function t(e) {
72
+ }(), _e = 0, ye = function(n) {
73
+ function e(t) {
274
74
  var s = n.call(this) || this;
275
- return s.id = wt++, s.init(e), s;
75
+ return s.id = _e++, s.init(t), s;
276
76
  }
277
- return x(t, n), t.prototype.set = function(e, s) {
278
- if (this[e] === void 0) throw new Error("Property with name ".concat(e, " does not exist."));
279
- switch (e) {
77
+ return b(e, n), e.prototype.set = function(t, s) {
78
+ if (this[t] === void 0) throw new Error("Property with name ".concat(t, " does not exist."));
79
+ switch (t) {
280
80
  case "speed":
281
81
  this.speed = s;
282
82
  break;
@@ -293,142 +93,142 @@ var J = ct.filter(function(n) {
293
93
  this.muted = s;
294
94
  }
295
95
  return this;
296
- }, Object.defineProperty(t.prototype, "progress", { get: function() {
96
+ }, Object.defineProperty(e.prototype, "progress", { get: function() {
297
97
  return this._source.currentTime / this._duration;
298
- }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "paused", { get: function() {
98
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "paused", { get: function() {
299
99
  return this._paused;
300
- }, set: function(e) {
301
- this._paused = e, this.refreshPaused();
302
- }, enumerable: !1, configurable: !0 }), t.prototype._onPlay = function() {
100
+ }, set: function(t) {
101
+ this._paused = t, this.refreshPaused();
102
+ }, enumerable: !1, configurable: !0 }), e.prototype._onPlay = function() {
303
103
  this._playing = !0;
304
- }, t.prototype._onPause = function() {
104
+ }, e.prototype._onPause = function() {
305
105
  this._playing = !1;
306
- }, t.prototype.init = function(e) {
307
- this._playing = !1, this._duration = e.source.duration;
308
- var s = this._source = e.source.cloneNode(!1);
309
- s.src = e.parent.url, s.onplay = this._onPlay.bind(this), s.onpause = this._onPause.bind(this), e.context.on("refresh", this.refresh, this), e.context.on("refreshPaused", this.refreshPaused, this), this._media = e;
310
- }, t.prototype._internalStop = function() {
106
+ }, e.prototype.init = function(t) {
107
+ this._playing = !1, this._duration = t.source.duration;
108
+ var s = this._source = t.source.cloneNode(!1);
109
+ s.src = t.parent.url, s.onplay = this._onPlay.bind(this), s.onpause = this._onPause.bind(this), t.context.on("refresh", this.refresh, this), t.context.on("refreshPaused", this.refreshPaused, this), this._media = t;
110
+ }, e.prototype._internalStop = function() {
311
111
  this._source && this._playing && (this._source.onended = null, this._source.pause());
312
- }, t.prototype.stop = function() {
112
+ }, e.prototype.stop = function() {
313
113
  this._internalStop(), this._source && this.emit("stop");
314
- }, Object.defineProperty(t.prototype, "speed", { get: function() {
114
+ }, Object.defineProperty(e.prototype, "speed", { get: function() {
315
115
  return this._speed;
316
- }, set: function(e) {
317
- this._speed = e, this.refresh();
318
- }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "volume", { get: function() {
116
+ }, set: function(t) {
117
+ this._speed = t, this.refresh();
118
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "volume", { get: function() {
319
119
  return this._volume;
320
- }, set: function(e) {
321
- this._volume = e, this.refresh();
322
- }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "loop", { get: function() {
120
+ }, set: function(t) {
121
+ this._volume = t, this.refresh();
122
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "loop", { get: function() {
323
123
  return this._loop;
324
- }, set: function(e) {
325
- this._loop = e, this.refresh();
326
- }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "muted", { get: function() {
124
+ }, set: function(t) {
125
+ this._loop = t, this.refresh();
126
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "muted", { get: function() {
327
127
  return this._muted;
328
- }, set: function(e) {
329
- this._muted = e, this.refresh();
330
- }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "filters", { get: function() {
128
+ }, set: function(t) {
129
+ this._muted = t, this.refresh();
130
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "filters", { get: function() {
331
131
  return null;
332
- }, set: function(e) {
333
- }, enumerable: !1, configurable: !0 }), t.prototype.refresh = function() {
334
- var e = this._media.context, s = this._media.parent;
132
+ }, set: function(t) {
133
+ }, enumerable: !1, configurable: !0 }), e.prototype.refresh = function() {
134
+ var t = this._media.context, s = this._media.parent;
335
135
  this._source.loop = this._loop || s.loop;
336
- var o = e.volume * (e.muted ? 0 : 1), i = s.volume * (s.muted ? 0 : 1), r = this._volume * (this._muted ? 0 : 1);
337
- this._source.volume = r * o * i, this._source.playbackRate = this._speed * e.speed * s.speed;
338
- }, t.prototype.refreshPaused = function() {
339
- var e = this._media.context, s = this._media.parent, o = this._paused || s.paused || e.paused;
136
+ var o = t.volume * (t.muted ? 0 : 1), r = s.volume * (s.muted ? 0 : 1), i = this._volume * (this._muted ? 0 : 1);
137
+ this._source.volume = i * o * r, this._source.playbackRate = this._speed * t.speed * s.speed;
138
+ }, e.prototype.refreshPaused = function() {
139
+ var t = this._media.context, s = this._media.parent, o = this._paused || s.paused || t.paused;
340
140
  o !== this._pausedReal && (this._pausedReal = o, o ? (this._internalStop(), this.emit("paused")) : (this.emit("resumed"), this.play({ start: this._source.currentTime, end: this._end, volume: this._volume, speed: this._speed, loop: this._loop })), this.emit("pause", o));
341
- }, t.prototype.play = function(e) {
342
- var s = this, o = e.start, i = e.end, r = e.speed, a = e.loop, u = e.volume, c = e.muted;
343
- this._speed = r, this._volume = u, this._loop = !!a, this._muted = c, this.refresh(), this.loop && i !== null && (this.loop = !1), this._start = o, this._end = i || this._duration, this._start = Math.max(0, this._start - t.PADDING), this._end = Math.min(this._end + t.PADDING, this._duration), this._source.onloadedmetadata = function() {
344
- s._source && (s._source.currentTime = o, s._source.onloadedmetadata = null, s.emit("progress", o, s._duration), B.shared.add(s._onUpdate, s));
141
+ }, e.prototype.play = function(t) {
142
+ var s = this, o = t.start, r = t.end, i = t.speed, u = t.loop, a = t.volume, l = t.muted;
143
+ this._speed = i, this._volume = a, this._loop = !!u, this._muted = l, this.refresh(), this.loop && r !== null && (this.loop = !1), this._start = o, this._end = r || this._duration, this._start = Math.max(0, this._start - e.PADDING), this._end = Math.min(this._end + e.PADDING, this._duration), this._source.onloadedmetadata = function() {
144
+ s._source && (s._source.currentTime = o, s._source.onloadedmetadata = null, s.emit("progress", o, s._duration), M.shared.add(s._onUpdate, s));
345
145
  }, this._source.onended = this._onComplete.bind(this), this._source.play(), this.emit("start");
346
- }, t.prototype._onUpdate = function() {
146
+ }, e.prototype._onUpdate = function() {
347
147
  this.emit("progress", this.progress, this._duration), this._source.currentTime >= this._end && !this._source.loop && this._onComplete();
348
- }, t.prototype._onComplete = function() {
349
- B.shared.remove(this._onUpdate, this), this._internalStop(), this.emit("progress", 1, this._duration), this.emit("end", this);
350
- }, t.prototype.destroy = function() {
351
- B.shared.remove(this._onUpdate, this), this.removeAllListeners();
352
- var e = this._source;
353
- e && (e.onended = null, e.onplay = null, e.onpause = null, this._internalStop()), this._source = null, this._speed = 1, this._volume = 1, this._loop = !1, this._end = null, this._start = 0, this._duration = 0, this._playing = !1, this._pausedReal = !1, this._paused = !1, this._muted = !1, this._media && (this._media.context.off("refresh", this.refresh, this), this._media.context.off("refreshPaused", this.refreshPaused, this), this._media = null);
354
- }, t.prototype.toString = function() {
148
+ }, e.prototype._onComplete = function() {
149
+ M.shared.remove(this._onUpdate, this), this._internalStop(), this.emit("progress", 1, this._duration), this.emit("end", this);
150
+ }, e.prototype.destroy = function() {
151
+ M.shared.remove(this._onUpdate, this), this.removeAllListeners();
152
+ var t = this._source;
153
+ t && (t.onended = null, t.onplay = null, t.onpause = null, this._internalStop()), this._source = null, this._speed = 1, this._volume = 1, this._loop = !1, this._end = null, this._start = 0, this._duration = 0, this._playing = !1, this._pausedReal = !1, this._paused = !1, this._muted = !1, this._media && (this._media.context.off("refresh", this.refresh, this), this._media.context.off("refreshPaused", this.refreshPaused, this), this._media = null);
154
+ }, e.prototype.toString = function() {
355
155
  return "[HTMLAudioInstance id=".concat(this.id, "]");
356
- }, t.PADDING = 0.1, t;
357
- }(U), Et = function(n) {
358
- function t() {
156
+ }, e.PADDING = 0.1, e;
157
+ }(R), me = function(n) {
158
+ function e() {
359
159
  return n !== null && n.apply(this, arguments) || this;
360
160
  }
361
- return x(t, n), t.prototype.init = function(e) {
362
- this.parent = e, this._source = e.options.source || new Audio(), e.url && (this._source.src = e.url);
363
- }, t.prototype.create = function() {
364
- return new Ot(this);
365
- }, Object.defineProperty(t.prototype, "isPlayable", { get: function() {
161
+ return b(e, n), e.prototype.init = function(t) {
162
+ this.parent = t, this._source = t.options.source || new Audio(), t.url && (this._source.src = t.url);
163
+ }, e.prototype.create = function() {
164
+ return new ye(this);
165
+ }, Object.defineProperty(e.prototype, "isPlayable", { get: function() {
366
166
  return !!this._source && this._source.readyState === 4;
367
- }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "duration", { get: function() {
167
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "duration", { get: function() {
368
168
  return this._source.duration;
369
- }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "context", { get: function() {
169
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "context", { get: function() {
370
170
  return this.parent.context;
371
- }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "filters", { get: function() {
171
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "filters", { get: function() {
372
172
  return null;
373
- }, set: function(e) {
374
- }, enumerable: !1, configurable: !0 }), t.prototype.destroy = function() {
173
+ }, set: function(t) {
174
+ }, enumerable: !1, configurable: !0 }), e.prototype.destroy = function() {
375
175
  this.removeAllListeners(), this.parent = null, this._source && (this._source.src = "", this._source.load(), this._source = null);
376
- }, Object.defineProperty(t.prototype, "source", { get: function() {
176
+ }, Object.defineProperty(e.prototype, "source", { get: function() {
377
177
  return this._source;
378
- }, enumerable: !1, configurable: !0 }), t.prototype.load = function(e) {
178
+ }, enumerable: !1, configurable: !0 }), e.prototype.load = function(t) {
379
179
  var s = this._source, o = this.parent;
380
180
  if (s.readyState !== 4) if (o.url) {
381
181
  s.src = o.url;
382
- var i = function() {
383
- u(), o.isLoaded = !0;
384
- var l = o.autoPlayStart();
385
- e && e(null, o, l);
386
- }, r = function() {
387
- u(), e && e(new Error("Sound loading has been aborted"));
388
- }, a = function() {
389
- u();
390
- var l = "Failed to load audio element (code: ".concat(s.error.code, ")");
391
- e && e(new Error(l));
182
+ var r = function() {
183
+ a(), o.isLoaded = !0;
184
+ var h = o.autoPlayStart();
185
+ t && t(null, o, h);
186
+ }, i = function() {
187
+ a(), t && t(new Error("Sound loading has been aborted"));
392
188
  }, u = function() {
393
- s.removeEventListener("canplaythrough", i), s.removeEventListener("load", i), s.removeEventListener("abort", r), s.removeEventListener("error", a);
189
+ a();
190
+ var h = "Failed to load audio element (code: ".concat(s.error.code, ")");
191
+ t && t(new Error(h));
192
+ }, a = function() {
193
+ s.removeEventListener("canplaythrough", r), s.removeEventListener("load", r), s.removeEventListener("abort", i), s.removeEventListener("error", u);
394
194
  };
395
- s.addEventListener("canplaythrough", i, !1), s.addEventListener("load", i, !1), s.addEventListener("abort", r, !1), s.addEventListener("error", a, !1), s.load();
396
- } else e(new Error("sound.url or sound.source must be set"));
195
+ s.addEventListener("canplaythrough", r, !1), s.addEventListener("load", r, !1), s.addEventListener("abort", i, !1), s.addEventListener("error", u, !1), s.load();
196
+ } else t(new Error("sound.url or sound.source must be set"));
397
197
  else {
398
198
  o.isLoaded = !0;
399
- var c = o.autoPlayStart();
400
- e && setTimeout(function() {
401
- e(null, o, c);
199
+ var l = o.autoPlayStart();
200
+ t && setTimeout(function() {
201
+ t(null, o, l);
402
202
  }, 0);
403
203
  }
404
- }, t;
405
- }(U), St = function() {
406
- function n(t, e) {
407
- this.parent = t, Object.assign(this, e), this.duration = this.end - this.start;
204
+ }, e;
205
+ }(R), ge = function() {
206
+ function n(e, t) {
207
+ this.parent = e, Object.assign(this, t), this.duration = this.end - this.start;
408
208
  }
409
- return n.prototype.play = function(t) {
410
- return this.parent.play({ complete: t, speed: this.speed || this.parent.speed, end: this.end, start: this.start, loop: this.loop });
209
+ return n.prototype.play = function(e) {
210
+ return this.parent.play({ complete: e, speed: this.speed || this.parent.speed, end: this.end, start: this.start, loop: this.loop });
411
211
  }, n.prototype.destroy = function() {
412
212
  this.parent = null;
413
213
  }, n;
414
- }(), w = function() {
214
+ }(), v = function() {
415
215
  function n() {
416
216
  }
417
- return n.setParamValue = function(t, e) {
418
- if (t.setValueAtTime) {
419
- var s = g().context;
420
- t.setValueAtTime(e, s.audioContext.currentTime);
421
- } else t.value = e;
422
- return e;
217
+ return n.setParamValue = function(e, t) {
218
+ if (e.setValueAtTime) {
219
+ var s = _().context;
220
+ e.setValueAtTime(t, s.audioContext.currentTime);
221
+ } else e.value = t;
222
+ return t;
423
223
  }, n;
424
- }(), kt = 0, Ft = function(n) {
425
- function t(e) {
224
+ }(), be = 0, ve = function(n) {
225
+ function e(t) {
426
226
  var s = n.call(this) || this;
427
- return s.id = kt++, s._media = null, s._paused = !1, s._muted = !1, s._elapsed = 0, s.init(e), s;
227
+ return s.id = be++, s._media = null, s._paused = !1, s._muted = !1, s._elapsed = 0, s.init(t), s;
428
228
  }
429
- return x(t, n), t.prototype.set = function(e, s) {
430
- if (this[e] === void 0) throw new Error("Property with name ".concat(e, " does not exist."));
431
- switch (e) {
229
+ return b(e, n), e.prototype.set = function(t, s) {
230
+ if (this[t] === void 0) throw new Error("Property with name ".concat(t, " does not exist."));
231
+ switch (t) {
432
232
  case "speed":
433
233
  this.speed = s;
434
234
  break;
@@ -445,95 +245,95 @@ var J = ct.filter(function(n) {
445
245
  this.paused = s;
446
246
  }
447
247
  return this;
448
- }, t.prototype.stop = function() {
248
+ }, e.prototype.stop = function() {
449
249
  this._source && (this._internalStop(), this.emit("stop"));
450
- }, Object.defineProperty(t.prototype, "speed", { get: function() {
250
+ }, Object.defineProperty(e.prototype, "speed", { get: function() {
451
251
  return this._speed;
452
- }, set: function(e) {
453
- this._speed = e, this.refresh(), this._update(!0);
454
- }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "volume", { get: function() {
252
+ }, set: function(t) {
253
+ this._speed = t, this.refresh(), this._update(!0);
254
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "volume", { get: function() {
455
255
  return this._volume;
456
- }, set: function(e) {
457
- this._volume = e, this.refresh();
458
- }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "muted", { get: function() {
256
+ }, set: function(t) {
257
+ this._volume = t, this.refresh();
258
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "muted", { get: function() {
459
259
  return this._muted;
460
- }, set: function(e) {
461
- this._muted = e, this.refresh();
462
- }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "loop", { get: function() {
260
+ }, set: function(t) {
261
+ this._muted = t, this.refresh();
262
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "loop", { get: function() {
463
263
  return this._loop;
464
- }, set: function(e) {
465
- this._loop = e, this.refresh();
466
- }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "filters", { get: function() {
264
+ }, set: function(t) {
265
+ this._loop = t, this.refresh();
266
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "filters", { get: function() {
467
267
  return this._filters;
468
- }, set: function(e) {
268
+ }, set: function(t) {
469
269
  var s;
470
270
  this._filters && ((s = this._filters) === null || s === void 0 || s.filter(function(o) {
471
271
  return o;
472
272
  }).forEach(function(o) {
473
273
  return o.disconnect();
474
- }), this._filters = null, this._source.connect(this._gain)), this._filters = e?.length ? e.slice(0) : null, this.refresh();
475
- }, enumerable: !1, configurable: !0 }), t.prototype.refresh = function() {
274
+ }), this._filters = null, this._source.connect(this._gain)), this._filters = t?.length ? t.slice(0) : null, this.refresh();
275
+ }, enumerable: !1, configurable: !0 }), e.prototype.refresh = function() {
476
276
  if (this._source) {
477
- var e = this._media.context, s = this._media.parent;
277
+ var t = this._media.context, s = this._media.parent;
478
278
  this._source.loop = this._loop || s.loop;
479
- var o = e.volume * (e.muted ? 0 : 1), i = s.volume * (s.muted ? 0 : 1), r = this._volume * (this._muted ? 0 : 1);
480
- w.setParamValue(this._gain.gain, r * i * o), w.setParamValue(this._source.playbackRate, this._speed * s.speed * e.speed), this.applyFilters();
279
+ var o = t.volume * (t.muted ? 0 : 1), r = s.volume * (s.muted ? 0 : 1), i = this._volume * (this._muted ? 0 : 1);
280
+ v.setParamValue(this._gain.gain, i * r * o), v.setParamValue(this._source.playbackRate, this._speed * s.speed * t.speed), this.applyFilters();
481
281
  }
482
- }, t.prototype.applyFilters = function() {
483
- var e;
484
- if (!((e = this._filters) === null || e === void 0) && e.length) {
282
+ }, e.prototype.applyFilters = function() {
283
+ var t;
284
+ if (!((t = this._filters) === null || t === void 0) && t.length) {
485
285
  this._source.disconnect();
486
286
  var s = this._source;
487
287
  this._filters.forEach(function(o) {
488
288
  s.connect(o.destination), s = o;
489
289
  }), s.connect(this._gain);
490
290
  }
491
- }, t.prototype.refreshPaused = function() {
492
- var e = this._media.context, s = this._media.parent, o = this._paused || s.paused || e.paused;
291
+ }, e.prototype.refreshPaused = function() {
292
+ var t = this._media.context, s = this._media.parent, o = this._paused || s.paused || t.paused;
493
293
  o !== this._pausedReal && (this._pausedReal = o, o ? (this._internalStop(), this.emit("paused")) : (this.emit("resumed"), this.play({ start: this._elapsed % this._duration, end: this._end, speed: this._speed, loop: this._loop, volume: this._volume })), this.emit("pause", o));
494
- }, t.prototype.play = function(e) {
495
- var s = e.start, o = e.end, i = e.speed, r = e.loop, a = e.volume, u = e.muted, c = e.filters;
294
+ }, e.prototype.play = function(t) {
295
+ var s = t.start, o = t.end, r = t.speed, i = t.loop, u = t.volume, a = t.muted, l = t.filters;
496
296
  this._paused = !1;
497
- var l = this._media.nodes.cloneBufferSource(), _ = l.source, m = l.gain;
498
- this._source = _, this._gain = m, this._speed = i, this._volume = a, this._loop = !!r, this._muted = u, this._filters = c, this.refresh();
499
- var b = this._source.buffer.duration;
500
- this._duration = b, this._end = o, this._lastUpdate = this._now(), this._elapsed = s, this._source.onended = this._onComplete.bind(this), this._loop ? (this._source.loopEnd = o, this._source.loopStart = s, this._source.start(0, s)) : o ? this._source.start(0, s, o - s) : this._source.start(0, s), this.emit("start"), this._update(!0), this.enableTicker(!0);
501
- }, t.prototype.enableTicker = function(e) {
502
- B.shared.remove(this._updateListener, this), e && B.shared.add(this._updateListener, this);
503
- }, Object.defineProperty(t.prototype, "progress", { get: function() {
297
+ var h = this._media.nodes.cloneBufferSource(), m = h.source, y = h.gain;
298
+ this._source = m, this._gain = y, this._speed = r, this._volume = u, this._loop = !!i, this._muted = a, this._filters = l, this.refresh();
299
+ var g = this._source.buffer.duration;
300
+ this._duration = g, this._end = o, this._lastUpdate = this._now(), this._elapsed = s, this._source.onended = this._onComplete.bind(this), this._loop ? (this._source.loopEnd = o, this._source.loopStart = s, this._source.start(0, s)) : o ? this._source.start(0, s, o - s) : this._source.start(0, s), this.emit("start"), this._update(!0), this.enableTicker(!0);
301
+ }, e.prototype.enableTicker = function(t) {
302
+ M.shared.remove(this._updateListener, this), t && M.shared.add(this._updateListener, this);
303
+ }, Object.defineProperty(e.prototype, "progress", { get: function() {
504
304
  return this._progress;
505
- }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "paused", { get: function() {
305
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "paused", { get: function() {
506
306
  return this._paused;
507
- }, set: function(e) {
508
- this._paused = e, this.refreshPaused();
509
- }, enumerable: !1, configurable: !0 }), t.prototype.destroy = function() {
510
- var e;
511
- this.removeAllListeners(), this._internalStop(), this._gain && (this._gain.disconnect(), this._gain = null), this._media && (this._media.context.events.off("refresh", this.refresh, this), this._media.context.events.off("refreshPaused", this.refreshPaused, this), this._media = null), (e = this._filters) === null || e === void 0 || e.forEach(function(s) {
307
+ }, set: function(t) {
308
+ this._paused = t, this.refreshPaused();
309
+ }, enumerable: !1, configurable: !0 }), e.prototype.destroy = function() {
310
+ var t;
311
+ this.removeAllListeners(), this._internalStop(), this._gain && (this._gain.disconnect(), this._gain = null), this._media && (this._media.context.events.off("refresh", this.refresh, this), this._media.context.events.off("refreshPaused", this.refreshPaused, this), this._media = null), (t = this._filters) === null || t === void 0 || t.forEach(function(s) {
512
312
  return s.disconnect();
513
313
  }), this._filters = null, this._end = null, this._speed = 1, this._volume = 1, this._loop = !1, this._elapsed = 0, this._duration = 0, this._paused = !1, this._muted = !1, this._pausedReal = !1;
514
- }, t.prototype.toString = function() {
314
+ }, e.prototype.toString = function() {
515
315
  return "[WebAudioInstance id=".concat(this.id, "]");
516
- }, t.prototype._now = function() {
316
+ }, e.prototype._now = function() {
517
317
  return this._media.context.audioContext.currentTime;
518
- }, t.prototype._updateListener = function() {
318
+ }, e.prototype._updateListener = function() {
519
319
  this._update();
520
- }, t.prototype._update = function(e) {
521
- if (e === void 0 && (e = !1), this._source) {
320
+ }, e.prototype._update = function(t) {
321
+ if (t === void 0 && (t = !1), this._source) {
522
322
  var s = this._now(), o = s - this._lastUpdate;
523
- if (o > 0 || e) {
524
- var i = this._source.playbackRate.value;
525
- this._elapsed += o * i, this._lastUpdate = s;
526
- var r = this._duration, a = void 0;
323
+ if (o > 0 || t) {
324
+ var r = this._source.playbackRate.value;
325
+ this._elapsed += o * r, this._lastUpdate = s;
326
+ var i = this._duration, u = void 0;
527
327
  if (this._source.loopStart) {
528
- var u = this._source.loopEnd - this._source.loopStart;
529
- a = (this._source.loopStart + this._elapsed % u) / r;
530
- } else a = this._elapsed % r / r;
531
- this._progress = a, this.emit("progress", this._progress, r);
328
+ var a = this._source.loopEnd - this._source.loopStart;
329
+ u = (this._source.loopStart + this._elapsed % a) / i;
330
+ } else u = this._elapsed % i / i;
331
+ this._progress = u, this.emit("progress", this._progress, i);
532
332
  }
533
333
  }
534
- }, t.prototype.init = function(e) {
535
- this._media = e, e.context.events.on("refresh", this.refresh, this), e.context.events.on("refreshPaused", this.refreshPaused, this);
536
- }, t.prototype._internalStop = function() {
334
+ }, e.prototype.init = function(t) {
335
+ this._media = t, t.context.events.on("refresh", this.refresh, this), t.context.events.on("refreshPaused", this.refreshPaused, this);
336
+ }, e.prototype._internalStop = function() {
537
337
  if (this._source) {
538
338
  this.enableTicker(!1), this._source.onended = null, this._source.stop(0), this._source.disconnect();
539
339
  try {
@@ -542,7 +342,7 @@ var J = ct.filter(function(n) {
542
342
  }
543
343
  this._source = null;
544
344
  }
545
- }, t.prototype._onComplete = function() {
345
+ }, e.prototype._onComplete = function() {
546
346
  if (this._source) {
547
347
  this.enableTicker(!1), this._source.onended = null, this._source.disconnect();
548
348
  try {
@@ -551,51 +351,51 @@ var J = ct.filter(function(n) {
551
351
  }
552
352
  }
553
353
  this._source = null, this._progress = 1, this.emit("progress", 1, this._duration), this.emit("end", this);
554
- }, t;
555
- }(U), ht = function() {
556
- function n(t, e) {
557
- this._output = e, this._input = t;
354
+ }, e;
355
+ }(R), re = function() {
356
+ function n(e, t) {
357
+ this._output = t, this._input = e;
558
358
  }
559
359
  return Object.defineProperty(n.prototype, "destination", { get: function() {
560
360
  return this._input;
561
361
  }, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "filters", { get: function() {
562
362
  return this._filters;
563
- }, set: function(t) {
564
- var e = this;
363
+ }, set: function(e) {
364
+ var t = this;
565
365
  if (this._filters && (this._filters.forEach(function(o) {
566
366
  o && o.disconnect();
567
- }), this._filters = null, this._input.connect(this._output)), t && t.length) {
568
- this._filters = t.slice(0), this._input.disconnect();
367
+ }), this._filters = null, this._input.connect(this._output)), e && e.length) {
368
+ this._filters = e.slice(0), this._input.disconnect();
569
369
  var s = null;
570
- t.forEach(function(o) {
571
- s === null ? e._input.connect(o.destination) : s.connect(o.destination), s = o;
370
+ e.forEach(function(o) {
371
+ s === null ? t._input.connect(o.destination) : s.connect(o.destination), s = o;
572
372
  }), s.connect(this._output);
573
373
  }
574
374
  }, enumerable: !1, configurable: !0 }), n.prototype.destroy = function() {
575
375
  this.filters = null, this._input = null, this._output = null;
576
376
  }, n;
577
- }(), Lt = function(n) {
578
- function t(e) {
579
- var s = this, o = e.audioContext, i = o.createBufferSource(), r = o.createGain(), a = o.createAnalyser();
580
- return i.connect(a), a.connect(r), r.connect(e.destination), (s = n.call(this, a, r) || this).context = e, s.bufferSource = i, s.gain = r, s.analyser = a, s;
581
- }
582
- return x(t, n), Object.defineProperty(t.prototype, "script", { get: function() {
583
- return this._script || (this._script = this.context.audioContext.createScriptProcessor(t.BUFFER_SIZE), this._script.connect(this.context.destination)), this._script;
584
- }, enumerable: !1, configurable: !0 }), t.prototype.destroy = function() {
377
+ }(), Pe = function(n) {
378
+ function e(t) {
379
+ var s = this, o = t.audioContext, r = o.createBufferSource(), i = o.createGain(), u = o.createAnalyser();
380
+ return r.connect(u), u.connect(i), i.connect(t.destination), (s = n.call(this, u, i) || this).context = t, s.bufferSource = r, s.gain = i, s.analyser = u, s;
381
+ }
382
+ return b(e, n), Object.defineProperty(e.prototype, "script", { get: function() {
383
+ return this._script || (this._script = this.context.audioContext.createScriptProcessor(e.BUFFER_SIZE), this._script.connect(this.context.destination)), this._script;
384
+ }, enumerable: !1, configurable: !0 }), e.prototype.destroy = function() {
585
385
  n.prototype.destroy.call(this), this.bufferSource.disconnect(), this._script && this._script.disconnect(), this.gain.disconnect(), this.analyser.disconnect(), this.bufferSource = null, this._script = null, this.gain = null, this.analyser = null, this.context = null;
586
- }, t.prototype.cloneBufferSource = function() {
587
- var e = this.bufferSource, s = this.context.audioContext.createBufferSource();
588
- s.buffer = e.buffer, w.setParamValue(s.playbackRate, e.playbackRate.value), s.loop = e.loop;
386
+ }, e.prototype.cloneBufferSource = function() {
387
+ var t = this.bufferSource, s = this.context.audioContext.createBufferSource();
388
+ s.buffer = t.buffer, v.setParamValue(s.playbackRate, t.playbackRate.value), s.loop = t.loop;
589
389
  var o = this.context.audioContext.createGain();
590
390
  return s.connect(o), o.connect(this.destination), { source: s, gain: o };
591
- }, Object.defineProperty(t.prototype, "bufferSize", { get: function() {
391
+ }, Object.defineProperty(e.prototype, "bufferSize", { get: function() {
592
392
  return this.script.bufferSize;
593
- }, enumerable: !1, configurable: !0 }), t.BUFFER_SIZE = 0, t;
594
- }(ht), jt = function() {
393
+ }, enumerable: !1, configurable: !0 }), e.BUFFER_SIZE = 0, e;
394
+ }(re), xe = function() {
595
395
  function n() {
596
396
  }
597
- return n.prototype.init = function(t) {
598
- this.parent = t, this._nodes = new Lt(this.context), this._source = this._nodes.bufferSource, this.source = t.options.source;
397
+ return n.prototype.init = function(e) {
398
+ this.parent = e, this._nodes = new Pe(this.context), this._source = this._nodes.bufferSource, this.source = e.options.source;
599
399
  }, n.prototype.destroy = function() {
600
400
  this.parent = null, this._nodes.destroy(), this._nodes = null;
601
401
  try {
@@ -604,82 +404,82 @@ var J = ct.filter(function(n) {
604
404
  }
605
405
  this._source = null, this.source = null;
606
406
  }, n.prototype.create = function() {
607
- return new Ft(this);
407
+ return new ve(this);
608
408
  }, Object.defineProperty(n.prototype, "context", { get: function() {
609
409
  return this.parent.context;
610
410
  }, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "isPlayable", { get: function() {
611
411
  return !!this._source && !!this._source.buffer;
612
412
  }, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "filters", { get: function() {
613
413
  return this._nodes.filters;
614
- }, set: function(t) {
615
- this._nodes.filters = t;
414
+ }, set: function(e) {
415
+ this._nodes.filters = e;
616
416
  }, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "duration", { get: function() {
617
417
  return this._source.buffer.duration;
618
418
  }, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "buffer", { get: function() {
619
419
  return this._source.buffer;
620
- }, set: function(t) {
621
- this._source.buffer = t;
420
+ }, set: function(e) {
421
+ this._source.buffer = e;
622
422
  }, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "nodes", { get: function() {
623
423
  return this._nodes;
624
- }, enumerable: !1, configurable: !0 }), n.prototype.load = function(t) {
625
- this.source ? this._decode(this.source, t) : this.parent.url ? this._loadUrl(t) : t && t(new Error("sound.url or sound.source must be set"));
626
- }, n.prototype._loadUrl = function(t) {
627
- var e = this, s = new XMLHttpRequest(), o = this.parent.url;
424
+ }, enumerable: !1, configurable: !0 }), n.prototype.load = function(e) {
425
+ this.source ? this._decode(this.source, e) : this.parent.url ? this._loadUrl(e) : e && e(new Error("sound.url or sound.source must be set"));
426
+ }, n.prototype._loadUrl = function(e) {
427
+ var t = this, s = new XMLHttpRequest(), o = this.parent.url;
628
428
  s.open("GET", o, !0), s.responseType = "arraybuffer", s.onload = function() {
629
- e.source = s.response, e._decode(s.response, t);
429
+ t.source = s.response, t._decode(s.response, e);
630
430
  }, s.send();
631
- }, n.prototype._decode = function(t, e) {
632
- var s = this, o = function(i, r) {
633
- if (i) e && e(i);
431
+ }, n.prototype._decode = function(e, t) {
432
+ var s = this, o = function(r, i) {
433
+ if (r) t && t(r);
634
434
  else {
635
- s.parent.isLoaded = !0, s.buffer = r;
636
- var a = s.parent.autoPlayStart();
637
- e && e(null, s.parent, a);
435
+ s.parent.isLoaded = !0, s.buffer = i;
436
+ var u = s.parent.autoPlayStart();
437
+ t && t(null, s.parent, u);
638
438
  }
639
439
  };
640
- t instanceof AudioBuffer ? o(null, t) : this.parent.context.decode(t, o);
440
+ e instanceof AudioBuffer ? o(null, e) : this.parent.context.decode(e, o);
641
441
  }, n;
642
- }(), D = function() {
643
- function n(t, e) {
644
- this.media = t, this.options = e, this._instances = [], this._sprites = {}, this.media.init(this);
645
- var s = e.complete;
646
- this._autoPlayOptions = s ? { complete: s } : null, this.isLoaded = !1, this.isPlaying = !1, this.autoPlay = e.autoPlay, this.singleInstance = e.singleInstance, this.preload = e.preload || this.autoPlay, this.url = e.url, this.speed = e.speed, this.volume = e.volume, this.loop = e.loop, e.sprites && this.addSprites(e.sprites), this.preload && this._preload(e.loaded);
647
- }
648
- return n.from = function(t) {
649
- var e = {};
650
- return typeof t == "string" ? e.url = t : t instanceof ArrayBuffer || t instanceof AudioBuffer || t instanceof HTMLAudioElement ? e.source = t : e = t, (e = N({ autoPlay: !1, singleInstance: !1, url: null, source: null, preload: !1, volume: 1, speed: 1, complete: null, loaded: null, loop: !1 }, e)).url && (e.url = lt(e.url)), Object.freeze(e), new n(g().useLegacy ? new Et() : new jt(), e);
442
+ }(), N = function() {
443
+ function n(e, t) {
444
+ this.media = e, this.options = t, this._instances = [], this._sprites = {}, this.media.init(this);
445
+ var s = t.complete;
446
+ this._autoPlayOptions = s ? { complete: s } : null, this.isLoaded = !1, this.isPlaying = !1, this.autoPlay = t.autoPlay, this.singleInstance = t.singleInstance, this.preload = t.preload || this.autoPlay, this.url = t.url, this.speed = t.speed, this.volume = t.volume, this.loop = t.loop, t.sprites && this.addSprites(t.sprites), this.preload && this._preload(t.loaded);
447
+ }
448
+ return n.from = function(e) {
449
+ 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 me() : new xe(), t);
651
451
  }, Object.defineProperty(n.prototype, "context", { get: function() {
652
- return g().context;
452
+ return _().context;
653
453
  }, enumerable: !1, configurable: !0 }), n.prototype.pause = function() {
654
454
  return this.isPlaying = !1, this.paused = !0, this;
655
455
  }, n.prototype.resume = function() {
656
456
  return this.isPlaying = this._instances.length > 0, this.paused = !1, this;
657
457
  }, Object.defineProperty(n.prototype, "paused", { get: function() {
658
458
  return this._paused;
659
- }, set: function(t) {
660
- this._paused = t, this.refreshPaused();
459
+ }, set: function(e) {
460
+ this._paused = e, this.refreshPaused();
661
461
  }, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "speed", { get: function() {
662
462
  return this._speed;
663
- }, set: function(t) {
664
- this._speed = t, this.refresh();
463
+ }, set: function(e) {
464
+ this._speed = e, this.refresh();
665
465
  }, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "filters", { get: function() {
666
466
  return this.media.filters;
667
- }, set: function(t) {
668
- this.media.filters = t;
669
- }, enumerable: !1, configurable: !0 }), n.prototype.addSprites = function(t, e) {
670
- if (typeof t == "object") {
467
+ }, set: function(e) {
468
+ this.media.filters = e;
469
+ }, enumerable: !1, configurable: !0 }), n.prototype.addSprites = function(e, t) {
470
+ if (typeof e == "object") {
671
471
  var s = {};
672
- for (var o in t) s[o] = this.addSprites(o, t[o]);
472
+ for (var o in e) s[o] = this.addSprites(o, e[o]);
673
473
  return s;
674
474
  }
675
- var i = new St(this, e);
676
- return this._sprites[t] = i, i;
475
+ var r = new ge(this, t);
476
+ return this._sprites[e] = r, r;
677
477
  }, n.prototype.destroy = function() {
678
478
  this._removeInstances(), this.removeSprites(), this.media.destroy(), this.media = null, this._sprites = null, this._instances = null;
679
- }, n.prototype.removeSprites = function(t) {
680
- if (t) {
681
- var e = this._sprites[t];
682
- e !== void 0 && (e.destroy(), delete this._sprites[t]);
479
+ }, n.prototype.removeSprites = function(e) {
480
+ if (e) {
481
+ var t = this._sprites[e];
482
+ t !== void 0 && (t.destroy(), delete this._sprites[e]);
683
483
  } else for (var s in this._sprites) this.removeSprites(s);
684
484
  return this;
685
485
  }, Object.defineProperty(n.prototype, "isPlayable", { get: function() {
@@ -687,44 +487,44 @@ var J = ct.filter(function(n) {
687
487
  }, enumerable: !1, configurable: !0 }), n.prototype.stop = function() {
688
488
  if (!this.isPlayable) return this.autoPlay = !1, this._autoPlayOptions = null, this;
689
489
  this.isPlaying = !1;
690
- for (var t = this._instances.length - 1; t >= 0; t--) this._instances[t].stop();
490
+ for (var e = this._instances.length - 1; e >= 0; e--) this._instances[e].stop();
691
491
  return this;
692
- }, n.prototype.play = function(t, e) {
492
+ }, n.prototype.play = function(e, t) {
693
493
  var s, o = this;
694
- if (typeof t == "string" ? s = { sprite: r = t, loop: this.loop, complete: e } : typeof t == "function" ? (s = {}).complete = t : s = t, (s = N({ complete: null, loaded: null, sprite: null, end: null, start: 0, volume: 1, speed: 1, muted: !1, loop: !1 }, s || {})).sprite) {
695
- var i = s.sprite, r = this._sprites[i];
696
- s.start = r.start + (s.start || 0), s.end = r.end, s.speed = r.speed || 1, s.loop = r.loop || s.loop, delete s.sprite;
494
+ if (typeof e == "string" ? s = { sprite: i = e, loop: this.loop, complete: t } : typeof e == "function" ? (s = {}).complete = e : s = e, (s = V({ complete: null, loaded: null, sprite: null, end: null, start: 0, volume: 1, speed: 1, muted: !1, loop: !1 }, s || {})).sprite) {
495
+ var r = s.sprite, i = this._sprites[r];
496
+ s.start = i.start + (s.start || 0), s.end = i.end, s.speed = i.speed || 1, s.loop = i.loop || s.loop, delete s.sprite;
697
497
  }
698
- if (s.offset && (s.start = s.offset), !this.isLoaded) return new Promise(function(u, c) {
699
- o.autoPlay = !0, o._autoPlayOptions = s, o._preload(function(l, _, m) {
700
- l ? c(l) : (s.loaded && s.loaded(l, _, m), u(m));
498
+ if (s.offset && (s.start = s.offset), !this.isLoaded) return new Promise(function(a, l) {
499
+ o.autoPlay = !0, o._autoPlayOptions = s, o._preload(function(h, m, y) {
500
+ h ? l(h) : (s.loaded && s.loaded(h, m, y), a(y));
701
501
  });
702
502
  });
703
503
  (this.singleInstance || s.singleInstance) && this._removeInstances();
704
- var a = this._createInstance();
705
- return this._instances.push(a), this.isPlaying = !0, a.once("end", function() {
706
- s.complete && s.complete(o), o._onComplete(a);
707
- }), a.once("stop", function() {
708
- o._onComplete(a);
709
- }), a.play(s), a;
504
+ var u = this._createInstance();
505
+ return this._instances.push(u), this.isPlaying = !0, u.once("end", function() {
506
+ s.complete && s.complete(o), o._onComplete(u);
507
+ }), u.once("stop", function() {
508
+ o._onComplete(u);
509
+ }), u.play(s), u;
710
510
  }, n.prototype.refresh = function() {
711
- for (var t = this._instances.length, e = 0; e < t; e++) this._instances[e].refresh();
511
+ for (var e = this._instances.length, t = 0; t < e; t++) this._instances[t].refresh();
712
512
  }, n.prototype.refreshPaused = function() {
713
- for (var t = this._instances.length, e = 0; e < t; e++) this._instances[e].refreshPaused();
513
+ for (var e = this._instances.length, t = 0; t < e; t++) this._instances[t].refreshPaused();
714
514
  }, Object.defineProperty(n.prototype, "volume", { get: function() {
715
515
  return this._volume;
716
- }, set: function(t) {
717
- this._volume = t, this.refresh();
516
+ }, set: function(e) {
517
+ this._volume = e, this.refresh();
718
518
  }, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "muted", { get: function() {
719
519
  return this._muted;
720
- }, set: function(t) {
721
- this._muted = t, this.refresh();
520
+ }, set: function(e) {
521
+ this._muted = e, this.refresh();
722
522
  }, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "loop", { get: function() {
723
523
  return this._loop;
724
- }, set: function(t) {
725
- this._loop = t, this.refresh();
726
- }, enumerable: !1, configurable: !0 }), n.prototype._preload = function(t) {
727
- this.media.load(t);
524
+ }, set: function(e) {
525
+ this._loop = e, this.refresh();
526
+ }, enumerable: !1, configurable: !0 }), n.prototype._preload = function(e) {
527
+ this.media.load(e);
728
528
  }, Object.defineProperty(n.prototype, "instances", { get: function() {
729
529
  return this._instances;
730
530
  }, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "sprites", { get: function() {
@@ -732,147 +532,147 @@ var J = ct.filter(function(n) {
732
532
  }, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "duration", { get: function() {
733
533
  return this.media.duration;
734
534
  }, enumerable: !1, configurable: !0 }), n.prototype.autoPlayStart = function() {
735
- var t;
736
- return this.autoPlay && (t = this.play(this._autoPlayOptions)), t;
535
+ var e;
536
+ return this.autoPlay && (e = this.play(this._autoPlayOptions)), e;
737
537
  }, n.prototype._removeInstances = function() {
738
- for (var t = this._instances.length - 1; t >= 0; t--) this._poolInstance(this._instances[t]);
538
+ for (var e = this._instances.length - 1; e >= 0; e--) this._poolInstance(this._instances[e]);
739
539
  this._instances.length = 0;
740
- }, n.prototype._onComplete = function(t) {
540
+ }, n.prototype._onComplete = function(e) {
741
541
  if (this._instances) {
742
- var e = this._instances.indexOf(t);
743
- e > -1 && this._instances.splice(e, 1), this.isPlaying = this._instances.length > 0;
542
+ var t = this._instances.indexOf(e);
543
+ t > -1 && this._instances.splice(t, 1), this.isPlaying = this._instances.length > 0;
744
544
  }
745
- this._poolInstance(t);
545
+ this._poolInstance(e);
746
546
  }, n.prototype._createInstance = function() {
747
547
  if (n._pool.length > 0) {
748
- var t = n._pool.pop();
749
- return t.init(this.media), t;
548
+ var e = n._pool.pop();
549
+ return e.init(this.media), e;
750
550
  }
751
551
  return this.media.create();
752
- }, n.prototype._poolInstance = function(t) {
753
- t.destroy(), n._pool.indexOf(t) < 0 && n._pool.push(t);
552
+ }, n.prototype._poolInstance = function(e) {
553
+ e.destroy(), n._pool.indexOf(e) < 0 && n._pool.push(e);
754
554
  }, n._pool = [], n;
755
- }(), Ct = function(n) {
756
- function t() {
757
- var e = n !== null && n.apply(this, arguments) || this;
758
- return e.speed = 1, e.muted = !1, e.volume = 1, e.paused = !1, e;
555
+ }(), we = function(n) {
556
+ function e() {
557
+ var t = n !== null && n.apply(this, arguments) || this;
558
+ return t.speed = 1, t.muted = !1, t.volume = 1, t.paused = !1, t;
759
559
  }
760
- return x(t, n), t.prototype.refresh = function() {
560
+ return b(e, n), e.prototype.refresh = function() {
761
561
  this.emit("refresh");
762
- }, t.prototype.refreshPaused = function() {
562
+ }, e.prototype.refreshPaused = function() {
763
563
  this.emit("refreshPaused");
764
- }, Object.defineProperty(t.prototype, "filters", { get: function() {
564
+ }, Object.defineProperty(e.prototype, "filters", { get: function() {
765
565
  return null;
766
- }, set: function(e) {
767
- }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "audioContext", { get: function() {
566
+ }, set: function(t) {
567
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "audioContext", { get: function() {
768
568
  return null;
769
- }, enumerable: !1, configurable: !0 }), t.prototype.toggleMute = function() {
569
+ }, enumerable: !1, configurable: !0 }), e.prototype.toggleMute = function() {
770
570
  return this.muted = !this.muted, this.refresh(), this.muted;
771
- }, t.prototype.togglePause = function() {
571
+ }, e.prototype.togglePause = function() {
772
572
  return this.paused = !this.paused, this.refreshPaused(), this.paused;
773
- }, t.prototype.destroy = function() {
573
+ }, e.prototype.destroy = function() {
774
574
  this.removeAllListeners();
775
- }, t;
776
- }(U), st = function(n) {
777
- function t() {
778
- var e = n.call(this, null, null) || this;
779
- e.autoPause = !0;
780
- var s = window, o = new t.AudioContext(), i = o.createDynamicsCompressor(), r = o.createAnalyser();
781
- return r.connect(i), i.connect(o.destination), e._input = r, e._output = o.destination, e._ctx = o, e._offlineCtx = new t.OfflineAudioContext(1, 2, s.OfflineAudioContext ? Math.max(8e3, Math.min(96e3, o.sampleRate)) : 44100), e.compressor = i, e.analyser = r, e.events = new U(), e.volume = 1, e.speed = 1, e.muted = !1, e.paused = !1, e._locked = o.state === "suspended" && ("ontouchstart" in globalThis || "onclick" in globalThis), e._locked && (e._unlock(), e._unlock = e._unlock.bind(e), document.addEventListener("mousedown", e._unlock, !0), document.addEventListener("touchstart", e._unlock, !0), document.addEventListener("touchend", e._unlock, !0)), e.onFocus = e.onFocus.bind(e), e.onBlur = e.onBlur.bind(e), globalThis.addEventListener("focus", e.onFocus), globalThis.addEventListener("blur", e.onBlur), e;
575
+ }, e;
576
+ }(R), Y = function(n) {
577
+ function e() {
578
+ var t = n.call(this, null, null) || this;
579
+ t.autoPause = !0;
580
+ var s = window, o = new e.AudioContext(), r = o.createDynamicsCompressor(), i = o.createAnalyser();
581
+ return i.connect(r), r.connect(o.destination), t._input = i, t._output = o.destination, t._ctx = o, t._offlineCtx = new e.OfflineAudioContext(1, 2, s.OfflineAudioContext ? Math.max(8e3, Math.min(96e3, o.sampleRate)) : 44100), t.compressor = r, t.analyser = i, t.events = new R(), t.volume = 1, t.speed = 1, t.muted = !1, t.paused = !1, t._locked = o.state === "suspended" && ("ontouchstart" in globalThis || "onclick" in globalThis), t._locked && (t._unlock(), t._unlock = t._unlock.bind(t), document.addEventListener("mousedown", t._unlock, !0), document.addEventListener("touchstart", t._unlock, !0), document.addEventListener("touchend", t._unlock, !0)), t.onFocus = t.onFocus.bind(t), t.onBlur = t.onBlur.bind(t), globalThis.addEventListener("focus", t.onFocus), globalThis.addEventListener("blur", t.onBlur), t;
782
582
  }
783
- return x(t, n), t.prototype.onFocus = function() {
583
+ return b(e, n), e.prototype.onFocus = function() {
784
584
  if (this.autoPause) {
785
- var e = this._ctx.state;
786
- e !== "suspended" && e !== "interrupted" && this._locked || (this.paused = this._pausedOnBlur, this.refreshPaused());
585
+ var t = this._ctx.state;
586
+ t !== "suspended" && t !== "interrupted" && this._locked || (this.paused = this._pausedOnBlur, this.refreshPaused());
787
587
  }
788
- }, t.prototype.onBlur = function() {
588
+ }, e.prototype.onBlur = function() {
789
589
  this.autoPause && (this._locked || (this._pausedOnBlur = this._paused, this.paused = !0, this.refreshPaused()));
790
- }, t.prototype._unlock = function() {
590
+ }, e.prototype._unlock = function() {
791
591
  this._locked && (this.playEmptySound(), this._ctx.state === "running" && (document.removeEventListener("mousedown", this._unlock, !0), document.removeEventListener("touchend", this._unlock, !0), document.removeEventListener("touchstart", this._unlock, !0), this._locked = !1));
792
- }, t.prototype.playEmptySound = function() {
793
- var e = this._ctx.createBufferSource();
794
- e.buffer = this._ctx.createBuffer(1, 1, 22050), e.connect(this._ctx.destination), e.start(0, 0, 0), e.context.state === "suspended" && e.context.resume();
795
- }, Object.defineProperty(t, "AudioContext", { get: function() {
796
- var e = window;
797
- return e.AudioContext || e.webkitAudioContext || null;
798
- }, enumerable: !1, configurable: !0 }), Object.defineProperty(t, "OfflineAudioContext", { get: function() {
799
- var e = window;
800
- return e.OfflineAudioContext || e.webkitOfflineAudioContext || null;
801
- }, enumerable: !1, configurable: !0 }), t.prototype.destroy = function() {
592
+ }, e.prototype.playEmptySound = function() {
593
+ var t = this._ctx.createBufferSource();
594
+ t.buffer = this._ctx.createBuffer(1, 1, 22050), t.connect(this._ctx.destination), t.start(0, 0, 0), t.context.state === "suspended" && t.context.resume();
595
+ }, Object.defineProperty(e, "AudioContext", { get: function() {
596
+ var t = window;
597
+ return t.AudioContext || t.webkitAudioContext || null;
598
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(e, "OfflineAudioContext", { get: function() {
599
+ var t = window;
600
+ return t.OfflineAudioContext || t.webkitOfflineAudioContext || null;
601
+ }, enumerable: !1, configurable: !0 }), e.prototype.destroy = function() {
802
602
  n.prototype.destroy.call(this);
803
- var e = this._ctx;
804
- e.close !== void 0 && e.close(), globalThis.removeEventListener("focus", this.onFocus), globalThis.removeEventListener("blur", this.onBlur), this.events.removeAllListeners(), this.analyser.disconnect(), this.compressor.disconnect(), this.analyser = null, this.compressor = null, this.events = null, this._offlineCtx = null, this._ctx = null;
805
- }, Object.defineProperty(t.prototype, "audioContext", { get: function() {
603
+ var t = this._ctx;
604
+ t.close !== void 0 && t.close(), globalThis.removeEventListener("focus", this.onFocus), globalThis.removeEventListener("blur", this.onBlur), this.events.removeAllListeners(), this.analyser.disconnect(), this.compressor.disconnect(), this.analyser = null, this.compressor = null, this.events = null, this._offlineCtx = null, this._ctx = null;
605
+ }, Object.defineProperty(e.prototype, "audioContext", { get: function() {
806
606
  return this._ctx;
807
- }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "offlineContext", { get: function() {
607
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "offlineContext", { get: function() {
808
608
  return this._offlineCtx;
809
- }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "paused", { get: function() {
609
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "paused", { get: function() {
810
610
  return this._paused;
811
- }, set: function(e) {
812
- e && this._ctx.state === "running" ? this._ctx.suspend() : e || this._ctx.state !== "suspended" || this._ctx.resume(), this._paused = e;
813
- }, enumerable: !1, configurable: !0 }), t.prototype.refresh = function() {
611
+ }, set: function(t) {
612
+ t && this._ctx.state === "running" ? this._ctx.suspend() : t || this._ctx.state !== "suspended" || this._ctx.resume(), this._paused = t;
613
+ }, enumerable: !1, configurable: !0 }), e.prototype.refresh = function() {
814
614
  this.events.emit("refresh");
815
- }, t.prototype.refreshPaused = function() {
615
+ }, e.prototype.refreshPaused = function() {
816
616
  this.events.emit("refreshPaused");
817
- }, t.prototype.toggleMute = function() {
617
+ }, e.prototype.toggleMute = function() {
818
618
  return this.muted = !this.muted, this.refresh(), this.muted;
819
- }, t.prototype.togglePause = function() {
619
+ }, e.prototype.togglePause = function() {
820
620
  return this.paused = !this.paused, this.refreshPaused(), this._paused;
821
- }, t.prototype.decode = function(e, s) {
822
- var o = function(r) {
823
- s(new Error(r?.message || "Unable to decode file"));
824
- }, i = this._offlineCtx.decodeAudioData(e, function(r) {
825
- s(null, r);
621
+ }, e.prototype.decode = function(t, s) {
622
+ var o = function(i) {
623
+ s(new Error(i?.message || "Unable to decode file"));
624
+ }, r = this._offlineCtx.decodeAudioData(t, function(i) {
625
+ s(null, i);
826
626
  }, o);
827
- i && i.catch(o);
828
- }, t;
829
- }(ht), It = function() {
627
+ r && r.catch(o);
628
+ }, e;
629
+ }(re), Oe = function() {
830
630
  function n() {
831
631
  this.init();
832
632
  }
833
633
  return n.prototype.init = function() {
834
- return this.supported && (this._webAudioContext = new st()), this._htmlAudioContext = new Ct(), this._sounds = {}, this.useLegacy = !this.supported, this;
634
+ return this.supported && (this._webAudioContext = new Y()), this._htmlAudioContext = new we(), this._sounds = {}, this.useLegacy = !this.supported, this;
835
635
  }, Object.defineProperty(n.prototype, "context", { get: function() {
836
636
  return this._context;
837
637
  }, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "filtersAll", { get: function() {
838
638
  return this.useLegacy ? [] : this._context.filters;
839
- }, set: function(t) {
840
- this.useLegacy || (this._context.filters = t);
639
+ }, set: function(e) {
640
+ this.useLegacy || (this._context.filters = e);
841
641
  }, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "supported", { get: function() {
842
- return st.AudioContext !== null;
843
- }, enumerable: !1, configurable: !0 }), n.prototype.add = function(t, e) {
844
- if (typeof t == "object") {
642
+ return Y.AudioContext !== null;
643
+ }, enumerable: !1, configurable: !0 }), n.prototype.add = function(e, t) {
644
+ if (typeof e == "object") {
845
645
  var s = {};
846
- for (var o in t) {
847
- var i = this._getOptions(t[o], e);
848
- s[o] = this.add(o, i);
646
+ for (var o in e) {
647
+ var r = this._getOptions(e[o], t);
648
+ s[o] = this.add(o, r);
849
649
  }
850
650
  return s;
851
651
  }
852
- if (e instanceof D) return this._sounds[t] = e, e;
853
- var r = this._getOptions(e), a = D.from(r);
854
- return this._sounds[t] = a, a;
855
- }, n.prototype._getOptions = function(t, e) {
652
+ if (t instanceof N) return this._sounds[e] = t, t;
653
+ var i = this._getOptions(t), u = N.from(i);
654
+ return this._sounds[e] = u, u;
655
+ }, n.prototype._getOptions = function(e, t) {
856
656
  var s;
857
- return s = typeof t == "string" ? { url: t } : t instanceof ArrayBuffer || t instanceof AudioBuffer || t instanceof HTMLAudioElement ? { source: t } : t, s = N(N({}, s), e || {});
657
+ return s = typeof e == "string" ? { url: e } : e instanceof ArrayBuffer || e instanceof AudioBuffer || e instanceof HTMLAudioElement ? { source: e } : e, s = V(V({}, s), t || {});
858
658
  }, Object.defineProperty(n.prototype, "useLegacy", { get: function() {
859
659
  return this._useLegacy;
860
- }, set: function(t) {
861
- pt.setLegacy(t), this._useLegacy = t, this._context = !t && this.supported ? this._webAudioContext : this._htmlAudioContext;
660
+ }, set: function(e) {
661
+ oe.setLegacy(e), this._useLegacy = e, this._context = !e && this.supported ? this._webAudioContext : this._htmlAudioContext;
862
662
  }, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "disableAutoPause", { get: function() {
863
663
  return !this._webAudioContext.autoPause;
864
- }, set: function(t) {
865
- this._webAudioContext.autoPause = !t;
866
- }, enumerable: !1, configurable: !0 }), n.prototype.remove = function(t) {
867
- return this.exists(t, !0), this._sounds[t].destroy(), delete this._sounds[t], this;
664
+ }, set: function(e) {
665
+ this._webAudioContext.autoPause = !e;
666
+ }, enumerable: !1, configurable: !0 }), n.prototype.remove = function(e) {
667
+ return this.exists(e, !0), this._sounds[e].destroy(), delete this._sounds[e], this;
868
668
  }, Object.defineProperty(n.prototype, "volumeAll", { get: function() {
869
669
  return this._context.volume;
870
- }, set: function(t) {
871
- this._context.volume = t, this._context.refresh();
670
+ }, set: function(e) {
671
+ this._context.volume = e, this._context.refresh();
872
672
  }, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "speedAll", { get: function() {
873
673
  return this._context.speed;
874
- }, set: function(t) {
875
- this._context.speed = t, this._context.refresh();
674
+ }, set: function(e) {
675
+ this._context.speed = e, this._context.refresh();
876
676
  }, enumerable: !1, configurable: !0 }), n.prototype.togglePauseAll = function() {
877
677
  return this._context.togglePause();
878
678
  }, n.prototype.pauseAll = function() {
@@ -886,224 +686,224 @@ var J = ct.filter(function(n) {
886
686
  }, n.prototype.unmuteAll = function() {
887
687
  return this._context.muted = !1, this._context.refresh(), this;
888
688
  }, n.prototype.removeAll = function() {
889
- for (var t in this._sounds) this._sounds[t].destroy(), delete this._sounds[t];
689
+ for (var e in this._sounds) this._sounds[e].destroy(), delete this._sounds[e];
890
690
  return this;
891
691
  }, n.prototype.stopAll = function() {
892
- for (var t in this._sounds) this._sounds[t].stop();
692
+ for (var e in this._sounds) this._sounds[e].stop();
893
693
  return this;
894
- }, n.prototype.exists = function(t, e) {
895
- return !!this._sounds[t];
896
- }, n.prototype.find = function(t) {
897
- return this.exists(t, !0), this._sounds[t];
898
- }, n.prototype.play = function(t, e) {
899
- return this.find(t).play(e);
900
- }, n.prototype.stop = function(t) {
901
- return this.find(t).stop();
902
- }, n.prototype.pause = function(t) {
903
- return this.find(t).pause();
904
- }, n.prototype.resume = function(t) {
905
- return this.find(t).resume();
906
- }, n.prototype.volume = function(t, e) {
907
- var s = this.find(t);
908
- return e !== void 0 && (s.volume = e), s.volume;
909
- }, n.prototype.speed = function(t, e) {
910
- var s = this.find(t);
911
- return e !== void 0 && (s.speed = e), s.speed;
912
- }, n.prototype.duration = function(t) {
913
- return this.find(t).duration;
694
+ }, n.prototype.exists = function(e, t) {
695
+ return !!this._sounds[e];
696
+ }, n.prototype.find = function(e) {
697
+ return this.exists(e, !0), this._sounds[e];
698
+ }, n.prototype.play = function(e, t) {
699
+ return this.find(e).play(t);
700
+ }, n.prototype.stop = function(e) {
701
+ return this.find(e).stop();
702
+ }, n.prototype.pause = function(e) {
703
+ return this.find(e).pause();
704
+ }, n.prototype.resume = function(e) {
705
+ return this.find(e).resume();
706
+ }, n.prototype.volume = function(e, t) {
707
+ var s = this.find(e);
708
+ return t !== void 0 && (s.volume = t), s.volume;
709
+ }, n.prototype.speed = function(e, t) {
710
+ var s = this.find(e);
711
+ return t !== void 0 && (s.speed = t), s.speed;
712
+ }, n.prototype.duration = function(e) {
713
+ return this.find(e).duration;
914
714
  }, n.prototype.close = function() {
915
715
  return this.removeAll(), this._sounds = null, this._webAudioContext && (this._webAudioContext.destroy(), this._webAudioContext = null), this._htmlAudioContext && (this._htmlAudioContext.destroy(), this._htmlAudioContext = null), this._context = null, this;
916
716
  }, n;
917
- }(), A = function() {
918
- function n(t, e) {
919
- this.init(t, e);
920
- }
921
- return n.prototype.init = function(t, e) {
922
- this.destination = t, this.source = e || t;
923
- }, n.prototype.connect = function(t) {
924
- this.source.connect(t);
717
+ }(), S = function() {
718
+ function n(e, t) {
719
+ this.init(e, t);
720
+ }
721
+ return n.prototype.init = function(e, t) {
722
+ this.destination = e, this.source = t || e;
723
+ }, n.prototype.connect = function(e) {
724
+ this.source.connect(e);
925
725
  }, n.prototype.disconnect = function() {
926
726
  this.source.disconnect();
927
727
  }, n.prototype.destroy = function() {
928
728
  this.disconnect(), this.destination = null, this.source = null;
929
729
  }, n;
930
- }(), q = { __proto__: null, EqualizerFilter: function(n) {
931
- function t(e, s, o, i, r, a, u, c, l, _) {
932
- e === void 0 && (e = 0), s === void 0 && (s = 0), o === void 0 && (o = 0), i === void 0 && (i = 0), r === void 0 && (r = 0), a === void 0 && (a = 0), u === void 0 && (u = 0), c === void 0 && (c = 0), l === void 0 && (l = 0), _ === void 0 && (_ = 0);
933
- var m = this;
934
- if (!g().useLegacy) {
935
- var b = [{ f: t.F32, type: "lowshelf", gain: e }, { f: t.F64, type: "peaking", gain: s }, { f: t.F125, type: "peaking", gain: o }, { f: t.F250, type: "peaking", gain: i }, { f: t.F500, type: "peaking", gain: r }, { f: t.F1K, type: "peaking", gain: a }, { f: t.F2K, type: "peaking", gain: u }, { f: t.F4K, type: "peaking", gain: c }, { f: t.F8K, type: "peaking", gain: l }, { f: t.F16K, type: "highshelf", gain: _ }].map(function(T) {
936
- var p = g().context.audioContext.createBiquadFilter();
937
- return p.type = T.type, w.setParamValue(p.Q, 1), p.frequency.value = T.f, w.setParamValue(p.gain, T.gain), p;
730
+ }(), B = { __proto__: null, EqualizerFilter: function(n) {
731
+ function e(t, s, o, r, i, u, a, l, h, m) {
732
+ t === void 0 && (t = 0), s === void 0 && (s = 0), o === void 0 && (o = 0), r === void 0 && (r = 0), i === void 0 && (i = 0), u === void 0 && (u = 0), a === void 0 && (a = 0), l === void 0 && (l = 0), h === void 0 && (h = 0), m === void 0 && (m = 0);
733
+ var y = this;
734
+ if (!_().useLegacy) {
735
+ var g = [{ f: e.F32, type: "lowshelf", gain: t }, { f: e.F64, type: "peaking", gain: s }, { f: e.F125, type: "peaking", gain: o }, { f: e.F250, type: "peaking", gain: r }, { f: e.F500, type: "peaking", gain: i }, { f: e.F1K, type: "peaking", gain: u }, { f: e.F2K, type: "peaking", gain: a }, { f: e.F4K, type: "peaking", gain: l }, { f: e.F8K, type: "peaking", gain: h }, { f: e.F16K, type: "highshelf", gain: m }].map(function($) {
736
+ var p = _().context.audioContext.createBiquadFilter();
737
+ return p.type = $.type, v.setParamValue(p.Q, 1), p.frequency.value = $.f, v.setParamValue(p.gain, $.gain), p;
938
738
  });
939
- (m = n.call(this, b[0], b[b.length - 1]) || this).bands = b, m.bandsMap = {};
940
- for (var h = 0; h < m.bands.length; h++) {
941
- var v = m.bands[h];
942
- h > 0 && m.bands[h - 1].connect(v), m.bandsMap[v.frequency.value] = v;
739
+ (y = n.call(this, g[0], g[g.length - 1]) || this).bands = g, y.bandsMap = {};
740
+ for (var f = 0; f < y.bands.length; f++) {
741
+ var x = y.bands[f];
742
+ f > 0 && y.bands[f - 1].connect(x), y.bandsMap[x.frequency.value] = x;
943
743
  }
944
- return m;
744
+ return y;
945
745
  }
946
- m = n.call(this, null) || this;
947
- }
948
- return x(t, n), t.prototype.setGain = function(e, s) {
949
- if (s === void 0 && (s = 0), !this.bandsMap[e]) throw new Error("No band found for frequency ".concat(e));
950
- w.setParamValue(this.bandsMap[e].gain, s);
951
- }, t.prototype.getGain = function(e) {
952
- if (!this.bandsMap[e]) throw new Error("No band found for frequency ".concat(e));
953
- return this.bandsMap[e].gain.value;
954
- }, Object.defineProperty(t.prototype, "f32", { get: function() {
955
- return this.getGain(t.F32);
956
- }, set: function(e) {
957
- this.setGain(t.F32, e);
958
- }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "f64", { get: function() {
959
- return this.getGain(t.F64);
960
- }, set: function(e) {
961
- this.setGain(t.F64, e);
962
- }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "f125", { get: function() {
963
- return this.getGain(t.F125);
964
- }, set: function(e) {
965
- this.setGain(t.F125, e);
966
- }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "f250", { get: function() {
967
- return this.getGain(t.F250);
968
- }, set: function(e) {
969
- this.setGain(t.F250, e);
970
- }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "f500", { get: function() {
971
- return this.getGain(t.F500);
972
- }, set: function(e) {
973
- this.setGain(t.F500, e);
974
- }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "f1k", { get: function() {
975
- return this.getGain(t.F1K);
976
- }, set: function(e) {
977
- this.setGain(t.F1K, e);
978
- }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "f2k", { get: function() {
979
- return this.getGain(t.F2K);
980
- }, set: function(e) {
981
- this.setGain(t.F2K, e);
982
- }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "f4k", { get: function() {
983
- return this.getGain(t.F4K);
984
- }, set: function(e) {
985
- this.setGain(t.F4K, e);
986
- }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "f8k", { get: function() {
987
- return this.getGain(t.F8K);
988
- }, set: function(e) {
989
- this.setGain(t.F8K, e);
990
- }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "f16k", { get: function() {
991
- return this.getGain(t.F16K);
992
- }, set: function(e) {
993
- this.setGain(t.F16K, e);
994
- }, enumerable: !1, configurable: !0 }), t.prototype.reset = function() {
995
- this.bands.forEach(function(e) {
996
- w.setParamValue(e.gain, 0);
746
+ y = n.call(this, null) || this;
747
+ }
748
+ return b(e, n), e.prototype.setGain = function(t, s) {
749
+ if (s === void 0 && (s = 0), !this.bandsMap[t]) throw new Error("No band found for frequency ".concat(t));
750
+ v.setParamValue(this.bandsMap[t].gain, s);
751
+ }, e.prototype.getGain = function(t) {
752
+ if (!this.bandsMap[t]) throw new Error("No band found for frequency ".concat(t));
753
+ return this.bandsMap[t].gain.value;
754
+ }, Object.defineProperty(e.prototype, "f32", { get: function() {
755
+ return this.getGain(e.F32);
756
+ }, set: function(t) {
757
+ this.setGain(e.F32, t);
758
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "f64", { get: function() {
759
+ return this.getGain(e.F64);
760
+ }, set: function(t) {
761
+ this.setGain(e.F64, t);
762
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "f125", { get: function() {
763
+ return this.getGain(e.F125);
764
+ }, set: function(t) {
765
+ this.setGain(e.F125, t);
766
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "f250", { get: function() {
767
+ return this.getGain(e.F250);
768
+ }, set: function(t) {
769
+ this.setGain(e.F250, t);
770
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "f500", { get: function() {
771
+ return this.getGain(e.F500);
772
+ }, set: function(t) {
773
+ this.setGain(e.F500, t);
774
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "f1k", { get: function() {
775
+ return this.getGain(e.F1K);
776
+ }, set: function(t) {
777
+ this.setGain(e.F1K, t);
778
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "f2k", { get: function() {
779
+ return this.getGain(e.F2K);
780
+ }, set: function(t) {
781
+ this.setGain(e.F2K, t);
782
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "f4k", { get: function() {
783
+ return this.getGain(e.F4K);
784
+ }, set: function(t) {
785
+ this.setGain(e.F4K, t);
786
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "f8k", { get: function() {
787
+ return this.getGain(e.F8K);
788
+ }, set: function(t) {
789
+ this.setGain(e.F8K, t);
790
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "f16k", { get: function() {
791
+ return this.getGain(e.F16K);
792
+ }, set: function(t) {
793
+ this.setGain(e.F16K, t);
794
+ }, enumerable: !1, configurable: !0 }), e.prototype.reset = function() {
795
+ this.bands.forEach(function(t) {
796
+ v.setParamValue(t.gain, 0);
997
797
  });
998
- }, t.prototype.destroy = function() {
999
- this.bands.forEach(function(e) {
1000
- e.disconnect();
798
+ }, e.prototype.destroy = function() {
799
+ this.bands.forEach(function(t) {
800
+ t.disconnect();
1001
801
  }), this.bands = null, this.bandsMap = null;
1002
- }, t.F32 = 32, t.F64 = 64, t.F125 = 125, t.F250 = 250, t.F500 = 500, t.F1K = 1e3, t.F2K = 2e3, t.F4K = 4e3, t.F8K = 8e3, t.F16K = 16e3, t;
1003
- }(A), DistortionFilter: function(n) {
1004
- function t(e) {
1005
- e === void 0 && (e = 0);
802
+ }, e.F32 = 32, e.F64 = 64, e.F125 = 125, e.F250 = 250, e.F500 = 500, e.F1K = 1e3, e.F2K = 2e3, e.F4K = 4e3, e.F8K = 8e3, e.F16K = 16e3, e;
803
+ }(S), DistortionFilter: function(n) {
804
+ function e(t) {
805
+ t === void 0 && (t = 0);
1006
806
  var s = this;
1007
- if (!g().useLegacy) {
1008
- var o = g().context.audioContext.createWaveShaper();
1009
- return (s = n.call(this, o) || this)._distortion = o, s.amount = e, s;
807
+ if (!_().useLegacy) {
808
+ var o = _().context.audioContext.createWaveShaper();
809
+ return (s = n.call(this, o) || this)._distortion = o, s.amount = t, s;
1010
810
  }
1011
811
  s = n.call(this, null) || this;
1012
812
  }
1013
- return x(t, n), Object.defineProperty(t.prototype, "amount", { get: function() {
813
+ return b(e, n), Object.defineProperty(e.prototype, "amount", { get: function() {
1014
814
  return this._amount;
1015
- }, set: function(e) {
1016
- this._amount = e;
1017
- for (var s, o = 1e3 * e, i = 44100, r = new Float32Array(i), a = Math.PI / 180, u = 0; u < i; ++u) s = 2 * u / i - 1, r[u] = (3 + o) * s * 20 * a / (Math.PI + o * Math.abs(s));
1018
- this._distortion.curve = r, this._distortion.oversample = "4x";
1019
- }, enumerable: !1, configurable: !0 }), t.prototype.destroy = function() {
815
+ }, set: function(t) {
816
+ this._amount = t;
817
+ for (var s, o = 1e3 * t, r = 44100, i = new Float32Array(r), u = Math.PI / 180, a = 0; a < r; ++a) s = 2 * a / r - 1, i[a] = (3 + o) * s * 20 * u / (Math.PI + o * Math.abs(s));
818
+ this._distortion.curve = i, this._distortion.oversample = "4x";
819
+ }, enumerable: !1, configurable: !0 }), e.prototype.destroy = function() {
1020
820
  this._distortion = null, n.prototype.destroy.call(this);
1021
- }, t;
1022
- }(A), StereoFilter: function(n) {
1023
- function t(e) {
1024
- e === void 0 && (e = 0);
821
+ }, e;
822
+ }(S), StereoFilter: function(n) {
823
+ function e(t) {
824
+ t === void 0 && (t = 0);
1025
825
  var s = this;
1026
- if (!g().useLegacy) {
1027
- var o, i, r, a = g().context.audioContext;
1028
- return a.createStereoPanner ? r = o = a.createStereoPanner() : ((i = a.createPanner()).panningModel = "equalpower", r = i), (s = n.call(this, r) || this)._stereo = o, s._panner = i, s.pan = e, s;
826
+ if (!_().useLegacy) {
827
+ var o, r, i, u = _().context.audioContext;
828
+ return u.createStereoPanner ? i = o = u.createStereoPanner() : ((r = u.createPanner()).panningModel = "equalpower", i = r), (s = n.call(this, i) || this)._stereo = o, s._panner = r, s.pan = t, s;
1029
829
  }
1030
830
  s = n.call(this, null) || this;
1031
831
  }
1032
- return x(t, n), Object.defineProperty(t.prototype, "pan", { get: function() {
832
+ return b(e, n), Object.defineProperty(e.prototype, "pan", { get: function() {
1033
833
  return this._pan;
1034
- }, set: function(e) {
1035
- this._pan = e, this._stereo ? w.setParamValue(this._stereo.pan, e) : this._panner.setPosition(e, 0, 1 - Math.abs(e));
1036
- }, enumerable: !1, configurable: !0 }), t.prototype.destroy = function() {
834
+ }, set: function(t) {
835
+ this._pan = t, this._stereo ? v.setParamValue(this._stereo.pan, t) : this._panner.setPosition(t, 0, 1 - Math.abs(t));
836
+ }, enumerable: !1, configurable: !0 }), e.prototype.destroy = function() {
1037
837
  n.prototype.destroy.call(this), this._stereo = null, this._panner = null;
1038
- }, t;
1039
- }(A), ReverbFilter: function(n) {
1040
- function t(e, s, o) {
1041
- e === void 0 && (e = 3), s === void 0 && (s = 2), o === void 0 && (o = !1);
1042
- var i = this;
1043
- if (!g().useLegacy) return (i = n.call(this, null) || this)._seconds = i._clamp(e, 1, 50), i._decay = i._clamp(s, 0, 100), i._reverse = o, i._rebuild(), i;
1044
- i = n.call(this, null) || this;
1045
- }
1046
- return x(t, n), t.prototype._clamp = function(e, s, o) {
1047
- return Math.min(o, Math.max(s, e));
1048
- }, Object.defineProperty(t.prototype, "seconds", { get: function() {
838
+ }, e;
839
+ }(S), ReverbFilter: function(n) {
840
+ function e(t, s, o) {
841
+ t === void 0 && (t = 3), s === void 0 && (s = 2), o === void 0 && (o = !1);
842
+ var r = this;
843
+ if (!_().useLegacy) return (r = n.call(this, null) || this)._seconds = r._clamp(t, 1, 50), r._decay = r._clamp(s, 0, 100), r._reverse = o, r._rebuild(), r;
844
+ r = n.call(this, null) || this;
845
+ }
846
+ return b(e, n), e.prototype._clamp = function(t, s, o) {
847
+ return Math.min(o, Math.max(s, t));
848
+ }, Object.defineProperty(e.prototype, "seconds", { get: function() {
1049
849
  return this._seconds;
1050
- }, set: function(e) {
1051
- this._seconds = this._clamp(e, 1, 50), this._rebuild();
1052
- }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "decay", { get: function() {
850
+ }, set: function(t) {
851
+ this._seconds = this._clamp(t, 1, 50), this._rebuild();
852
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "decay", { get: function() {
1053
853
  return this._decay;
1054
- }, set: function(e) {
1055
- this._decay = this._clamp(e, 0, 100), this._rebuild();
1056
- }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "reverse", { get: function() {
854
+ }, set: function(t) {
855
+ this._decay = this._clamp(t, 0, 100), this._rebuild();
856
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "reverse", { get: function() {
1057
857
  return this._reverse;
1058
- }, set: function(e) {
1059
- this._reverse = e, this._rebuild();
1060
- }, enumerable: !1, configurable: !0 }), t.prototype._rebuild = function() {
1061
- for (var e, s = g().context.audioContext, o = s.sampleRate, i = o * this._seconds, r = s.createBuffer(2, i, o), a = r.getChannelData(0), u = r.getChannelData(1), c = 0; c < i; c++) e = this._reverse ? i - c : c, a[c] = (2 * Math.random() - 1) * Math.pow(1 - e / i, this._decay), u[c] = (2 * Math.random() - 1) * Math.pow(1 - e / i, this._decay);
1062
- var l = g().context.audioContext.createConvolver();
1063
- l.buffer = r, this.init(l);
1064
- }, t;
1065
- }(A), MonoFilter: function(n) {
1066
- function t() {
1067
- var e = this;
1068
- if (!g().useLegacy) {
1069
- var s = g().context.audioContext, o = s.createChannelSplitter(), i = s.createChannelMerger();
1070
- return i.connect(o), (e = n.call(this, i, o) || this)._merger = i, e;
858
+ }, set: function(t) {
859
+ this._reverse = t, this._rebuild();
860
+ }, enumerable: !1, configurable: !0 }), e.prototype._rebuild = function() {
861
+ for (var t, s = _().context.audioContext, o = s.sampleRate, r = o * this._seconds, i = s.createBuffer(2, r, o), u = i.getChannelData(0), a = i.getChannelData(1), l = 0; l < r; l++) t = this._reverse ? r - l : l, u[l] = (2 * Math.random() - 1) * Math.pow(1 - t / r, this._decay), a[l] = (2 * Math.random() - 1) * Math.pow(1 - t / r, this._decay);
862
+ var h = _().context.audioContext.createConvolver();
863
+ h.buffer = i, this.init(h);
864
+ }, e;
865
+ }(S), MonoFilter: function(n) {
866
+ function e() {
867
+ var t = this;
868
+ if (!_().useLegacy) {
869
+ var s = _().context.audioContext, o = s.createChannelSplitter(), r = s.createChannelMerger();
870
+ return r.connect(o), (t = n.call(this, r, o) || this)._merger = r, t;
1071
871
  }
1072
- e = n.call(this, null) || this;
872
+ t = n.call(this, null) || this;
1073
873
  }
1074
- return x(t, n), t.prototype.destroy = function() {
874
+ return b(e, n), e.prototype.destroy = function() {
1075
875
  this._merger.disconnect(), this._merger = null, n.prototype.destroy.call(this);
1076
- }, t;
1077
- }(A), StreamFilter: function(n) {
1078
- function t() {
1079
- var e = this;
1080
- if (!g().useLegacy) {
1081
- var s = g().context.audioContext, o = s.createMediaStreamDestination(), i = s.createMediaStreamSource(o.stream);
1082
- return (e = n.call(this, o, i) || this)._stream = o.stream, e;
876
+ }, e;
877
+ }(S), StreamFilter: function(n) {
878
+ function e() {
879
+ var t = this;
880
+ if (!_().useLegacy) {
881
+ var s = _().context.audioContext, o = s.createMediaStreamDestination(), r = s.createMediaStreamSource(o.stream);
882
+ return (t = n.call(this, o, r) || this)._stream = o.stream, t;
1083
883
  }
1084
- e = n.call(this, null) || this;
884
+ t = n.call(this, null) || this;
1085
885
  }
1086
- return x(t, n), Object.defineProperty(t.prototype, "stream", { get: function() {
886
+ return b(e, n), Object.defineProperty(e.prototype, "stream", { get: function() {
1087
887
  return this._stream;
1088
- }, enumerable: !1, configurable: !0 }), t.prototype.destroy = function() {
888
+ }, enumerable: !1, configurable: !0 }), e.prototype.destroy = function() {
1089
889
  this._stream = null, n.prototype.destroy.call(this);
1090
- }, t;
1091
- }(A), TelephoneFilter: function(n) {
1092
- function t() {
1093
- if (!g().useLegacy) {
1094
- var e = g().context.audioContext, s = e.createBiquadFilter(), o = e.createBiquadFilter(), i = e.createBiquadFilter(), r = e.createBiquadFilter();
1095
- return s.type = "lowpass", w.setParamValue(s.frequency, 2e3), o.type = "lowpass", w.setParamValue(o.frequency, 2e3), i.type = "highpass", w.setParamValue(i.frequency, 500), r.type = "highpass", w.setParamValue(r.frequency, 500), s.connect(o), o.connect(i), i.connect(r), n.call(this, s, r) || this;
890
+ }, e;
891
+ }(S), TelephoneFilter: function(n) {
892
+ function e() {
893
+ if (!_().useLegacy) {
894
+ var t = _().context.audioContext, s = t.createBiquadFilter(), o = t.createBiquadFilter(), r = t.createBiquadFilter(), i = t.createBiquadFilter();
895
+ return s.type = "lowpass", v.setParamValue(s.frequency, 2e3), o.type = "lowpass", v.setParamValue(o.frequency, 2e3), r.type = "highpass", v.setParamValue(r.frequency, 500), i.type = "highpass", v.setParamValue(i.frequency, 500), s.connect(o), o.connect(r), r.connect(i), n.call(this, s, i) || this;
1096
896
  }
1097
897
  n.call(this, null);
1098
898
  }
1099
- return x(t, n), t;
1100
- }(A) }, Bt = { __proto__: null, supported: X }, nt = function(n) {
1101
- return at = n, n;
1102
- }(new It());
1103
- dt.add(pt);
1104
- class I {
1105
- constructor(t, e, s, o, i, r, a, u) {
1106
- this.fn = t, this.buf = e, this.start_ms = s, this.end_ms = o, this.ret_ms = i, this.volume = r, this.pan = a, this.snd = u, this.stt = u ? new G(this) : new Tt(), this.#s = k.procID, u && this.addSnd(u);
899
+ return b(e, n), e;
900
+ }(S) }, Ae = { __proto__: null, supported: U }, z = function(n) {
901
+ return ee = n, n;
902
+ }(new Oe());
903
+ ue.add(oe);
904
+ class j {
905
+ constructor(e, t, s, o, r, i, u, a) {
906
+ this.fn = e, this.buf = t, this.start_ms = s, this.end_ms = o, this.ret_ms = r, this.volume = i, this.pan = u, this.snd = a, this.stt = a ? new G(this) : new Ee(), this.#s = L.procID, a && this.addSnd(a);
1107
907
  }
1108
908
  static #t = 1;
1109
909
  stt;
@@ -1112,37 +912,37 @@ class I {
1112
912
  get procID() {
1113
913
  return this.#s;
1114
914
  }
1115
- addSnd(t) {
1116
- switch (this.loop = t.loop, this.stt.onLoad(this), this.pan !== 0 && (t.filters = [new q.StereoFilter(this.pan)]), this.setVol = (e) => {
1117
- t.volume = e;
1118
- }, this.tw = () => new Z(t), this.onPlayEnd = () => {
915
+ addSnd(e) {
916
+ switch (this.loop = e.loop, this.stt.onLoad(this), this.pan !== 0 && (e.filters = [new B.StereoFilter(this.pan)]), this.setVol = (t) => {
917
+ e.volume = t;
918
+ }, this.tw = () => new pe(e), this.onPlayEnd = () => {
1119
919
  this.stt.onPlayEnd(this.buf), this.#e();
1120
920
  }, this.stop = () => {
1121
- t.stop(), this.#e();
1122
- }, this.destroy = () => t.destroy(), this.buf) {
921
+ e.stop(), this.#e();
922
+ }, this.destroy = () => e.destroy(), this.buf) {
1123
923
  // セリフ再生中はBGM音量を絞る
1124
- case rt:
924
+ case Q:
1125
925
  {
1126
- const e = Number(d.getVal("sys:sn.sound.BGM.vol_mul_talking") ?? 1);
1127
- if (e === 1) break;
1128
- I.#t = e;
1129
- const s = tt[z];
1130
- s && s.setVol(this.volume * I.#t);
926
+ const t = Number(c.getVal("sys:sn.sound.BGM.vol_mul_talking") ?? 1);
927
+ if (t === 1) break;
928
+ j.#t = t;
929
+ const s = X[H];
930
+ s && s.setVol(this.volume * j.#t);
1131
931
  }
1132
932
  break;
1133
- case z:
1134
- t.volume = this.volume * I.#t;
933
+ case H:
934
+ e.volume = this.volume * j.#t;
1135
935
  break;
1136
936
  }
1137
937
  }
1138
938
  #e = () => {
1139
939
  if (this.#e = () => {
1140
- }, I.#t === 1 || this.buf !== rt) return;
1141
- I.#t = 1;
1142
- const t = tt[z];
1143
- t && t.setVol(this.volume * I.#t);
940
+ }, j.#t === 1 || this.buf !== Q) return;
941
+ j.#t = 1;
942
+ const e = X[H];
943
+ e && e.setVol(this.volume * j.#t);
1144
944
  };
1145
- setVol(t) {
945
+ setVol(e) {
1146
946
  }
1147
947
  tw() {
1148
948
  }
@@ -1153,174 +953,174 @@ class I {
1153
953
  destroy() {
1154
954
  }
1155
955
  }
1156
- let ot, d, C, it, tt, H;
1157
- const z = "BGM", R = "SE", rt = "VOICE";
1158
- class y {
1159
- constructor(t, e, s) {
1160
- this.hArg = t, this.buf = e, this.fn = s;
1161
- const o = S(t, "start_ms", 0), i = S(t, "end_ms", y.#s), r = S(t, "ret_ms", 0), a = S(t, "pan", 0), u = S(t, "speed", 1);
956
+ let J, c, E, Z, X, K;
957
+ const H = "BGM", D = "SE", Q = "VOICE";
958
+ class d {
959
+ constructor(e, t, s) {
960
+ this.hArg = e, this.buf = t, this.fn = s;
961
+ const o = F(e, "start_ms", 0), r = F(e, "end_ms", d.#s), i = F(e, "ret_ms", 0), u = F(e, "pan", 0), a = F(e, "speed", 1);
1162
962
  if (o < 0) throw `[playse] start_ms:${o} が負の値です`;
1163
- if (r < 0) throw `[playse] ret_ms:${r} が負の値です`;
1164
- if (0 < i) {
1165
- if (i <= o) throw `[playse] start_ms:${o} >= end_ms:${i} は異常値です`;
1166
- if (i <= r) throw `[playse] ret_ms:${r} >= end_ms:${i} は異常値です`;
963
+ if (i < 0) throw `[playse] ret_ms:${i} が負の値です`;
964
+ if (0 < r) {
965
+ if (r <= o) throw `[playse] start_ms:${o} >= end_ms:${r} は異常値です`;
966
+ if (r <= i) throw `[playse] ret_ms:${i} >= end_ms:${r} は異常値です`;
1167
967
  }
1168
- const c = "const.sn.sound." + e + ".";
1169
- d.setVal_Nochk("save", c + "fn", s);
1170
- const l = y.getVol(t, 1);
1171
- d.setVal_Nochk("save", c + "volume", l);
1172
- const _ = l * Number(d.getVal("sys:" + c + "volume", 1, !0)), m = V(t, "loop", !1);
1173
- m ? (y.#t[e] = s, d.setVal_Nochk("save", "const.sn.loopPlaying", JSON.stringify(y.#t))) : y.delLoopPlay(e), d.setVal_Nochk("save", c + "start_ms", o), d.setVal_Nochk("save", c + "end_ms", i), d.setVal_Nochk("save", c + "ret_ms", r), d.setVal_Nochk("tmp", c + "playing", !0), d.flush();
1174
- const b = nt.find(s);
1175
- this.#e = new I(
968
+ const l = "const.sn.sound." + t + ".";
969
+ c.setVal_Nochk("save", l + "fn", s);
970
+ const h = d.getVol(e, 1);
971
+ c.setVal_Nochk("save", l + "volume", h);
972
+ const m = h * Number(c.getVal("sys:" + l + "volume", 1, !0)), y = A(e, "loop", !1);
973
+ y ? (d.#t[t] = s, c.setVal_Nochk("save", "const.sn.loopPlaying", JSON.stringify(d.#t))) : d.delLoopPlay(t), c.setVal_Nochk("save", l + "start_ms", o), c.setVal_Nochk("save", l + "end_ms", r), c.setVal_Nochk("save", l + "ret_ms", i), c.setVal_Nochk("tmp", l + "playing", !0), c.flush();
974
+ const g = z.find(s);
975
+ this.#e = new j(
1176
976
  s,
1177
- e,
977
+ t,
1178
978
  o,
1179
- i,
1180
979
  r,
1181
- _,
1182
- a,
1183
- b
980
+ i,
981
+ m,
982
+ u,
983
+ g
1184
984
  );
1185
- const h = {
1186
- loop: m,
1187
- speed: u,
1188
- volume: _,
985
+ const f = {
986
+ loop: y,
987
+ speed: a,
988
+ volume: m,
1189
989
  loaded: (p, P) => {
1190
990
  if (!this.#e.stt.isDestroy) {
1191
991
  if (p) {
1192
- C.errScript(`ロード失敗です SndBuf fn:${s} ${String(p)}`, !1);
992
+ E.errScript(`ロード失敗です SndBuf fn:${s} ${String(p)}`, !1);
1193
993
  return;
1194
994
  }
1195
- P && (this.#e.addSnd(P), a !== 0 && (P.filters = [new q.StereoFilter(a)]), t.fnc?.());
995
+ P && (this.#e.addSnd(P), u !== 0 && (P.filters = [new B.StereoFilter(u)]), e.fnc?.());
1196
996
  }
1197
997
  }
1198
998
  };
1199
- let v = "";
1200
- if (0 < o || i < y.#s) {
1201
- v = `${s};${o};${i};${r}`;
1202
- const p = (h.sprites ??= {})[v] = {
999
+ let x = "";
1000
+ if (0 < o || r < d.#s) {
1001
+ x = `${s};${o};${r};${i}`;
1002
+ const p = (f.sprites ??= {})[x] = {
1203
1003
  start: o / 1e3,
1204
- end: i / 1e3
1004
+ end: r / 1e3
1205
1005
  };
1206
- h.preload = !0;
1207
- const P = h.loaded;
1208
- h.loaded = (F, O) => {
1006
+ f.preload = !0;
1007
+ const P = f.loaded;
1008
+ f.loaded = (C, O) => {
1209
1009
  if (this.#e.stt.isDestroy) return;
1210
- P(F, O);
1211
- const L = O, E = L.duration;
1212
- p.end < 0 && (p.end += E, L.removeSprites(v), L.addSprites(v, p)), p.end <= p.start && C.errScript(`[playse] end_ms:${i}(${p.end * 1e3}) >= start_ms:${o} は異常値です`), p.end * 1e3 <= r && C.errScript(`[playse] end_ms:${i}(${p.end * 1e3}) <= ret_ms:${r} は異常値です`), E <= p.start && C.errScript(`[playse] 音声ファイル再生時間:${E * 1e3} <= start_ms:${o} は異常値です`), i !== y.#s && E <= p.end && C.errScript(`[playse] 音声ファイル再生時間:${E * 1e3} <= end_ms:${i} は異常値です`), L.play(v, (K) => h.complete?.(K));
1010
+ P(C, O);
1011
+ const I = O, T = I.duration;
1012
+ p.end < 0 && (p.end += T, I.removeSprites(x), I.addSprites(x, p)), p.end <= p.start && E.errScript(`[playse] end_ms:${r}(${p.end * 1e3}) >= start_ms:${o} は異常値です`), p.end * 1e3 <= i && E.errScript(`[playse] end_ms:${r}(${p.end * 1e3}) <= ret_ms:${i} は異常値です`), T <= p.start && E.errScript(`[playse] 音声ファイル再生時間:${T * 1e3} <= start_ms:${o} は異常値です`), r !== d.#s && T <= p.end && E.errScript(`[playse] 音声ファイル再生時間:${T * 1e3} <= end_ms:${r} は異常値です`), I.play(x, (ie) => f.complete?.(ie));
1213
1013
  };
1214
- } else h.autoPlay = !0;
1215
- if (m ? r !== 0 && (h.loop = !1, h.complete = (p) => {
1216
- const P = p.duration, F = r / 1e3, O = i / 1e3;
1217
- P <= F && C.errScript(`[playse] 音声ファイル再生時間:${P * 1e3} <= ret_ms:${r} は異常値です`), p.play({
1014
+ } else f.autoPlay = !0;
1015
+ if (y ? i !== 0 && (f.loop = !1, f.complete = (p) => {
1016
+ const P = p.duration, C = i / 1e3, O = r / 1e3;
1017
+ P <= C && E.errScript(`[playse] 音声ファイル再生時間:${P * 1e3} <= ret_ms:${i} は異常値です`), p.play({
1218
1018
  // 一周目はループなし、なのでキャッシュされてる
1219
- ...h,
1220
- start: F,
1019
+ ...f,
1020
+ start: C,
1221
1021
  end: O < 0 ? O + P : O,
1222
1022
  // 負の値は末尾から
1223
1023
  // speed, // 重複
1224
1024
  loop: !0,
1225
1025
  // volume, // 重複
1226
1026
  //- muted?: boolean;
1227
- filters: a !== 0 ? [new q.StereoFilter(a)] : []
1027
+ filters: u !== 0 ? [new B.StereoFilter(u)] : []
1228
1028
  //- complete?: CompleteCallback;
1229
1029
  //- loaded?: LoadedCallback;
1230
1030
  //- singleInstance?: boolean;
1231
1031
  });
1232
- }) : h.complete = () => {
1233
- et(this.#e, e), this.#e.onPlayEnd();
1234
- }, this.#n(), b) {
1235
- if (b.volume = _, v) this.#o(s, h);
1236
- else if (b.isPlayable) {
1237
- const p = b.options.source;
1238
- !(p instanceof ArrayBuffer) || p.byteLength === 0 ? b.play(h) : this.#e.addSnd(D.from({
1239
- ...h,
1240
- url: b.options.url,
1032
+ }) : f.complete = () => {
1033
+ W(this.#e, t), this.#e.onPlayEnd();
1034
+ }, this.#n(), g) {
1035
+ if (g.volume = m, x) this.#o(s, f);
1036
+ else if (g.isPlayable) {
1037
+ const p = g.options.source;
1038
+ !(p instanceof ArrayBuffer) || p.byteLength === 0 ? g.play(f) : this.#e.addSnd(N.from({
1039
+ ...f,
1040
+ url: g.options.url,
1241
1041
  source: p
1242
1042
  }));
1243
1043
  }
1244
- a !== 0 && (b.filters = [new q.StereoFilter(a)]), this.needLoad = !1;
1044
+ u !== 0 && (g.filters = [new B.StereoFilter(u)]), this.needLoad = !1;
1245
1045
  return;
1246
1046
  }
1247
- if (this.needLoad = V(t, "join", !0)) {
1248
- const p = this.#e.procID + `loaded buf:${e} fn:${s}`;
1249
- k.beginProc(p);
1250
- const P = h.loaded;
1251
- h.loaded = (F, O) => {
1252
- P(F, O), k.endProc(p);
1047
+ if (this.needLoad = A(e, "join", !0)) {
1048
+ const p = this.#e.procID + `loaded buf:${t} fn:${s}`;
1049
+ L.beginProc(p);
1050
+ const P = f.loaded;
1051
+ f.loaded = (C, O) => {
1052
+ P(C, O), L.endProc(p);
1253
1053
  };
1254
1054
  }
1255
- this.#o(s, h);
1055
+ this.#o(s, f);
1256
1056
  }
1257
1057
  static #t = {};
1258
- static init(t, e, s, o, i) {
1259
- y.#t = {}, ot = t, d = e, C = s, it = o, tt = i;
1058
+ static init(e, t, s, o, r) {
1059
+ d.#t = {}, J = e, c = t, E = s, Z = o, X = r;
1260
1060
  }
1261
- static setEvtMng(t) {
1262
- H = t;
1061
+ static setEvtMng(e) {
1062
+ K = e;
1263
1063
  }
1264
- static delLoopPlay(t) {
1265
- delete y.#t[t];
1266
- const e = "const.sn.sound." + t + ".";
1267
- d.setVal_Nochk("save", e + "fn", ""), d.setVal_Nochk("save", "const.sn.loopPlaying", JSON.stringify(y.#t)), d.flush();
1064
+ static delLoopPlay(e) {
1065
+ delete d.#t[e];
1066
+ const t = "const.sn.sound." + e + ".";
1067
+ c.setVal_Nochk("save", t + "fn", ""), c.setVal_Nochk("save", "const.sn.loopPlaying", JSON.stringify(d.#t)), c.flush();
1268
1068
  }
1269
- static getVol(t, e) {
1270
- const s = S(t, "volume", e);
1069
+ static getVol(e, t) {
1070
+ const s = F(e, "volume", t);
1271
1071
  return s < 0 ? 0 : s > 1 ? 1 : s;
1272
1072
  }
1273
- static xchgbuf({ buf: t = R, buf2: e = R }) {
1274
- if (t === e) throw `[xchgbuf] buf:${t} が同じ値です`;
1275
- const s = "const.sn.sound." + t + ".", o = Number(d.getVal("save:" + s + "volume")), i = String(d.getVal("save:" + s + "fn")), r = "const.sn.sound." + e + ".", a = Number(d.getVal("save:" + r + "volume")), u = String(d.getVal("save:" + r + "fn"));
1276
- d.setVal_Nochk("save", s + "volume", a), d.setVal_Nochk("save", r + "volume", o), d.setVal_Nochk("save", s + "fn", u), d.setVal_Nochk("save", r + "fn", i), t in y.#t != e in y.#t && (t in y.#t ? (delete y.#t[t], y.#t[e] = i) : (delete y.#t[e], y.#t[t] = u), d.setVal_Nochk("save", "const.sn.loopPlaying", JSON.stringify(y.#t))), d.flush();
1073
+ static xchgbuf({ buf: e = D, buf2: t = D }) {
1074
+ if (e === t) throw `[xchgbuf] buf:${e} が同じ値です`;
1075
+ const s = "const.sn.sound." + e + ".", o = Number(c.getVal("save:" + s + "volume")), r = String(c.getVal("save:" + s + "fn")), i = "const.sn.sound." + t + ".", u = Number(c.getVal("save:" + i + "volume")), a = String(c.getVal("save:" + i + "fn"));
1076
+ c.setVal_Nochk("save", s + "volume", u), c.setVal_Nochk("save", i + "volume", o), c.setVal_Nochk("save", s + "fn", a), c.setVal_Nochk("save", i + "fn", r), e in d.#t != t in d.#t && (e in d.#t ? (delete d.#t[e], d.#t[t] = r) : (delete d.#t[t], d.#t[e] = a), c.setVal_Nochk("save", "const.sn.loopPlaying", JSON.stringify(d.#t))), c.flush();
1277
1077
  }
1278
1078
  static #s = 999e3;
1279
1079
  #e;
1280
1080
  needLoad;
1281
1081
  #n = () => {
1282
- nt.volumeAll = Number(d.getVal("sys:sn.sound.global_volume", 1)), this.#n = () => {
1082
+ z.volumeAll = Number(c.getVal("sys:sn.sound.global_volume", 1)), this.#n = () => {
1283
1083
  };
1284
1084
  };
1285
- #o(t, e) {
1286
- const s = ot.searchPath(t, _t.SOUND);
1085
+ #o(e, t) {
1086
+ const s = J.searchPath(e, ae.SOUND);
1287
1087
  if (!s.endsWith(".bin")) {
1288
- e.url = s, D.from(e);
1088
+ t.url = s, N.from(t);
1289
1089
  return;
1290
1090
  }
1291
- new yt().add({ name: t, url: s, xhrType: j.XHR_RESPONSE_TYPE.BUFFER }).use((o, i) => {
1292
- it.decAB(o.data).then((r) => {
1293
- o.data = r;
1294
- }).catch((r) => C.errScript(`Sound ロード失敗ですc fn:${o.name} ${r}`, !1)).finally(() => i());
1295
- }).load((o, i) => {
1296
- e.source = i[t]?.data, D.from(e);
1091
+ new le().add({ name: e, url: s, xhrType: w.XHR_RESPONSE_TYPE.BUFFER }).use((o, r) => {
1092
+ Z.decAB(o.data).then((i) => {
1093
+ o.data = i;
1094
+ }).catch((i) => E.errScript(`Sound ロード失敗ですc fn:${o.name} ${i}`, !1)).finally(() => r());
1095
+ }).load((o, r) => {
1096
+ t.source = r[e]?.data, N.from(t);
1297
1097
  });
1298
1098
  }
1299
- setVol(t) {
1300
- this.#e.setVol(t);
1099
+ setVol(e) {
1100
+ this.#e.setVol(e);
1301
1101
  }
1302
- ws = (t) => this.#e.stt.ws(this.#e, t);
1303
- stopse({ buf: t = R }) {
1304
- et(this.#e, t), this.#e.stt.stopse(this.#e);
1102
+ ws = (e) => this.#e.stt.ws(this.#e, e);
1103
+ stopse({ buf: e = D }) {
1104
+ W(this.#e, e), this.#e.stt.stopse(this.#e);
1305
1105
  }
1306
- fade = (t) => this.#e.stt.fade(this.#e, t);
1307
- wf = (t) => this.#e.stt.wf(this.#e, t);
1308
- stopfadese = (t) => this.#e.stt.stopfadese(this.#e, t);
1106
+ fade = (e) => this.#e.stt.fade(this.#e, e);
1107
+ wf = (e) => this.#e.stt.wf(this.#e, e);
1108
+ stopfadese = (e) => this.#e.stt.stopfadese(this.#e, e);
1309
1109
  }
1310
- function et({ loop: n }, t) {
1110
+ function W({ loop: n }, e) {
1311
1111
  if (n) {
1312
- y.delLoopPlay(t);
1112
+ d.delLoopPlay(e);
1313
1113
  return;
1314
1114
  }
1315
- const e = "const.sn.sound." + t + ".";
1316
- d.setVal_Nochk("tmp", e + "playing", !1), d.flush();
1115
+ const t = "const.sn.sound." + e + ".";
1116
+ c.setVal_Nochk("tmp", t + "playing", !1), c.flush();
1317
1117
  }
1318
- class Tt {
1319
- onLoad(t) {
1320
- t.stt = new G(t);
1118
+ class Ee {
1119
+ onLoad(e) {
1120
+ e.stt = new G(e);
1321
1121
  }
1322
- stopse(t) {
1323
- t.stt = new M(t, !1);
1122
+ stopse(e) {
1123
+ e.stt = new k(e, !1);
1324
1124
  }
1325
1125
  ws = () => !1;
1326
1126
  onPlayEnd() {
@@ -1340,45 +1140,45 @@ class Tt {
1340
1140
  isDestroy = !1;
1341
1141
  }
1342
1142
  class G {
1343
- constructor(t) {
1344
- this.si = t;
1143
+ constructor(e) {
1144
+ this.si = e;
1345
1145
  }
1346
1146
  onLoad() {
1347
1147
  }
1348
1148
  // ok
1349
- stopse(t) {
1350
- t.stt = new M(t);
1351
- }
1352
- ws(t, e) {
1353
- if (t.loop) return !1;
1354
- t.stt = new At(t);
1355
- const s = V(e, "canskip", !1), o = V(e, "stop", !0);
1356
- if (s && H.isSkipping)
1357
- return o ? t.stt.stopse(t) : t.stt.onPlayEnd = () => {
1149
+ stopse(e) {
1150
+ e.stt = new k(e);
1151
+ }
1152
+ ws(e, t) {
1153
+ if (e.loop) return !1;
1154
+ e.stt = new Fe(e);
1155
+ const s = A(t, "canskip", !1), o = A(t, "stop", !0);
1156
+ if (s && K.isSkipping)
1157
+ return o ? e.stt.stopse(e) : e.stt.onPlayEnd = () => {
1358
1158
  }, !1;
1359
- const { buf: i = R } = e, r = () => {
1360
- et(t, i), t.onPlayEnd(), o ? t.stt.stopse(t) : t.stt.onPlayEnd = () => {
1159
+ const { buf: r = D } = t, i = () => {
1160
+ W(e, r), e.onPlayEnd(), o ? e.stt.stopse(e) : e.stt.onPlayEnd = () => {
1361
1161
  };
1362
1162
  };
1363
- return k.beginProc(t.procID + "ws", r, !0, s ? r : void 0), !0;
1163
+ return L.beginProc(e.procID + "ws", i, !0, s ? i : void 0), !0;
1364
1164
  }
1365
1165
  onPlayEnd() {
1366
1166
  }
1367
1167
  // ok
1368
- fade(t, e) {
1369
- const { buf: s = R } = e, i = "const.sn.sound." + s + "." + "volume", r = y.getVol(e, NaN);
1370
- d.setVal_Nochk("save", i, r);
1371
- const a = r * Number(d.getVal("sys:" + i, 1)), u = V(e, "stop", r === 0);
1372
- u && y.delLoopPlay(s), d.flush();
1373
- const c = S(e, "time", NaN), l = S(e, "delay", 0);
1374
- if (c === 0 && l === 0 || H.isSkipping) {
1375
- t.setVol(a), t.stt = u ? new M(t) : new G(t);
1168
+ fade(e, t) {
1169
+ const { buf: s = D } = t, r = "const.sn.sound." + s + "." + "volume", i = d.getVol(t, NaN);
1170
+ c.setVal_Nochk("save", r, i);
1171
+ const u = i * Number(c.getVal("sys:" + r, 1)), a = A(t, "stop", i === 0);
1172
+ a && d.delLoopPlay(s), c.flush();
1173
+ const l = F(t, "time", NaN), h = F(t, "delay", 0);
1174
+ if (l === 0 && h === 0 || K.isSkipping) {
1175
+ e.setVol(u), e.stt = a ? new k(e) : new G(e);
1376
1176
  return;
1377
1177
  }
1378
- const _ = t.tw();
1379
- _ && (vt.setTwProp(_, e).to({ volume: a }, c).onComplete(() => {
1380
- bt(_), t.stt.compFade(s), t.stt = u ? new M(t) : new G(t);
1381
- }).start(), t.stt = new Vt(_, t));
1178
+ const m = e.tw();
1179
+ m && (ce.setTwProp(m, t).to({ volume: u }, l).onComplete(() => {
1180
+ he(m), e.stt.compFade(s), e.stt = a ? new k(e) : new G(e);
1181
+ }).start(), e.stt = new je(m, e));
1382
1182
  }
1383
1183
  wf = () => !1;
1384
1184
  // ok
@@ -1390,20 +1190,20 @@ class G {
1390
1190
  // ok
1391
1191
  isDestroy = !1;
1392
1192
  }
1393
- class At {
1394
- constructor(t) {
1395
- this.si = t;
1193
+ class Fe {
1194
+ constructor(e) {
1195
+ this.si = e;
1396
1196
  }
1397
1197
  onLoad() {
1398
1198
  }
1399
1199
  // ok
1400
- stopse(t) {
1401
- t.stt = new M(t);
1200
+ stopse(e) {
1201
+ e.stt = new k(e);
1402
1202
  }
1403
1203
  ws = () => !1;
1404
1204
  // ok
1405
1205
  onPlayEnd() {
1406
- k.notifyEndProc(this.si.procID + "ws");
1206
+ L.notifyEndProc(this.si.procID + "ws");
1407
1207
  }
1408
1208
  fade() {
1409
1209
  }
@@ -1418,15 +1218,15 @@ class At {
1418
1218
  // ok
1419
1219
  isDestroy = !1;
1420
1220
  }
1421
- class Vt {
1422
- constructor(t, e) {
1423
- this.tw = t, this.si = e;
1221
+ class je {
1222
+ constructor(e, t) {
1223
+ this.tw = e, this.si = t;
1424
1224
  }
1425
1225
  onLoad() {
1426
1226
  }
1427
1227
  // ok
1428
- stopse(t) {
1429
- this.stopfadese(), t.stt = new M(t);
1228
+ stopse(e) {
1229
+ this.stopfadese(), e.stt = new k(e);
1430
1230
  }
1431
1231
  // 順番厳守
1432
1232
  ws = () => !1;
@@ -1437,13 +1237,13 @@ class Vt {
1437
1237
  fade() {
1438
1238
  }
1439
1239
  // ok
1440
- wf(t, e) {
1441
- t.stt = new Mt(t);
1442
- const s = V(e, "canskip", !1);
1443
- if (s && H.isSkipping)
1240
+ wf(e, t) {
1241
+ e.stt = new Se(e);
1242
+ const s = A(t, "canskip", !1);
1243
+ if (s && K.isSkipping)
1444
1244
  return this.stopfadese(), !1;
1445
1245
  const o = () => this.stopfadese();
1446
- return k.beginProc(t.procID + "wf", o, !0, s ? o : void 0), !0;
1246
+ return L.beginProc(e.procID + "wf", o, !0, s ? o : void 0), !0;
1447
1247
  }
1448
1248
  compFade() {
1449
1249
  }
@@ -1451,15 +1251,15 @@ class Vt {
1451
1251
  stopfadese = () => this.si.stop();
1452
1252
  isDestroy = !1;
1453
1253
  }
1454
- class Mt {
1455
- constructor(t) {
1456
- this.si = t;
1254
+ class Se {
1255
+ constructor(e) {
1256
+ this.si = e;
1457
1257
  }
1458
1258
  onLoad() {
1459
1259
  }
1460
1260
  // ok
1461
- stopse(t) {
1462
- this.stopfadese(), t.stt = new M(t);
1261
+ stopse(e) {
1262
+ this.stopfadese(), e.stt = new k(e);
1463
1263
  }
1464
1264
  ws = () => !1;
1465
1265
  // ok
@@ -1472,14 +1272,14 @@ class Mt {
1472
1272
  wf = () => !1;
1473
1273
  // ok
1474
1274
  compFade() {
1475
- k.notifyEndProc(this.si.procID + "wf");
1275
+ L.notifyEndProc(this.si.procID + "wf");
1476
1276
  }
1477
1277
  stopfadese = () => this.si.stop();
1478
1278
  isDestroy = !1;
1479
1279
  }
1480
- class M {
1481
- constructor(t, e = !0) {
1482
- this.si = t, this.stop = e, e && (t.stop(), t.loop && (t.destroy(), t.destroy = () => {
1280
+ class k {
1281
+ constructor(e, t = !0) {
1282
+ this.si = e, this.stop = t, t && (e.stop(), e.loop && (e.destroy(), e.destroy = () => {
1483
1283
  }));
1484
1284
  }
1485
1285
  onLoad() {
@@ -1507,13 +1307,10 @@ class M {
1507
1307
  isDestroy = !0;
1508
1308
  }
1509
1309
  export {
1510
- R as B,
1511
- vt as C,
1512
- Bt as I,
1513
- nt as R,
1514
- y as S,
1515
- Q as T,
1516
- z as a,
1517
- $ as b
1310
+ D as B,
1311
+ Ae as I,
1312
+ z as R,
1313
+ d as S,
1314
+ H as a
1518
1315
  };
1519
1316
  //# sourceMappingURL=SndBuf.js.map