textmode.js 0.2.0 → 0.2.1-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/textmode.esm.js +1566 -1294
  2. package/dist/textmode.esm.min.js +1662 -1390
  3. package/dist/textmode.umd.js +10 -26
  4. package/dist/textmode.umd.min.js +9 -25
  5. package/dist/types/assets/shaders-minified/frag/ascii.d.ts +14 -0
  6. package/dist/types/assets/shaders-minified/frag/copy-mrt.d.ts +14 -0
  7. package/dist/types/assets/shaders-minified/frag/instanced-ascii-mrt.d.ts +14 -0
  8. package/dist/types/assets/shaders-minified/index.d.ts +5 -0
  9. package/dist/types/assets/shaders-minified/vert/instanced-ascii-mrt.d.ts +14 -0
  10. package/dist/types/assets/shaders-minified/vert/shader.d.ts +14 -0
  11. package/dist/types/export/svg/SVGContentGenerator.d.ts +0 -6
  12. package/dist/types/index.d.ts +2 -0
  13. package/dist/types/rendering/index.d.ts +2 -0
  14. package/dist/types/rendering/webgl/Framebuffer.d.ts +8 -8
  15. package/dist/types/rendering/webgl/InstanceData.d.ts +1 -1
  16. package/dist/types/rendering/webgl/RenderPipeline.d.ts +10 -3
  17. package/dist/types/rendering/webgl/RenderState.d.ts +11 -11
  18. package/dist/types/rendering/webgl/Renderer.d.ts +26 -2
  19. package/dist/types/rendering/webgl/Shader.d.ts +6 -7
  20. package/dist/types/rendering/webgl/ShaderManager.d.ts +65 -1
  21. package/dist/types/rendering/webgl/index.d.ts +1 -0
  22. package/dist/types/rendering/webgl/types/GeometryTypes.d.ts +7 -7
  23. package/dist/types/rendering/webgl/types/ShaderTypes.d.ts +35 -0
  24. package/dist/types/textmode/Textmodifier.d.ts +8 -2
  25. package/dist/types/textmode/managers/KeyboardManager.d.ts +123 -0
  26. package/dist/types/textmode/managers/MouseManager.d.ts +130 -0
  27. package/dist/types/textmode/managers/index.d.ts +4 -0
  28. package/dist/types/textmode/mixins/KeyboardMixin.d.ts +39 -0
  29. package/dist/types/textmode/mixins/MouseMixin.d.ts +27 -0
  30. package/dist/types/textmode/mixins/RenderingMixin.d.ts +104 -0
  31. package/dist/types/textmode/mixins/TextmodifierMixin.d.ts +6 -0
  32. package/dist/types/textmode/mixins/index.d.ts +4 -0
  33. package/package.json +3 -2
@@ -1,466 +1,483 @@
1
- var Z = Object.defineProperty;
2
- var K = (E, A, t) => A in E ? Z(E, A, { enumerable: !0, configurable: !0, writable: !0, value: t }) : E[A] = t;
3
- var n = (E, A, t) => K(E, typeof A != "symbol" ? A + "" : A, t);
4
- class m extends Error {
1
+ var q = Object.defineProperty;
2
+ var AA = (E, A, t) => A in E ? q(E, A, { enumerable: !0, configurable: !0, writable: !0, value: t }) : E[A] = t;
3
+ var Q = (E, A, t) => AA(E, typeof A != "symbol" ? A + "" : A, t);
4
+ class I extends Error {
5
5
  constructor(A, t = {}) {
6
- super(m.A(A, t)), this.name = "TextmodeError";
6
+ super(I.A(A, t)), this.name = "TextmodeError";
7
7
  }
8
8
  static A(A, t) {
9
- let e = A;
10
- if (t && Object.keys(t).length > 0) {
11
- e += `
9
+ return `${A}${t && Object.keys(t).length > 0 ? `
12
10
 
13
- 📋 Context:`;
14
- for (const [s, r] of Object.entries(t))
15
- e += `
16
- - ${s}: ${m.i(r)}`;
17
- }
18
- return e += `
11
+ 📋 Context:` + Object.entries(t).map(([e, s]) => `
12
+ - ${e}: ${I.C(s)}`).join("") : ""}
19
13
 
20
- `, e += "↓".repeat(24) + `
21
- `, e;
14
+ ${"↓".repeat(24)}
15
+ `;
22
16
  }
23
- static i(A) {
17
+ static C(A) {
24
18
  if (A === null) return "null";
25
19
  if (A === void 0) return "undefined";
26
20
  if (typeof A == "string") return `"${A}"`;
27
21
  if (typeof A == "number" || typeof A == "boolean") return A + "";
28
- if (Array.isArray(A)) return A.length === 0 ? "[]" : A.length <= 5 ? `[${A.map((t) => m.i(t)).join(", ")}]` : `[${A.slice(0, 3).map((t) => m.i(t)).join(", ")}, ... +${A.length - 3} more]`;
22
+ if (Array.isArray(A)) return A.length === 0 ? "[]" : A.length <= 5 ? `[${A.map((t) => I.C(t)).join(", ")}]` : `[${A.slice(0, 3).map((t) => I.C(t)).join(", ")}, ... +${A.length - 3} more]`;
29
23
  if (typeof A == "object") {
30
24
  const t = Object.keys(A);
31
- return t.length === 0 ? "{}" : t.length <= 3 ? `{ ${t.map((e) => `${e}: ${m.i(A[e])}`).join(", ")} }` : `{ ${t.slice(0, 2).map((e) => `${e}: ${m.i(A[e])}`).join(", ")}, ... +${t.length - 2} more }`;
25
+ return t.length === 0 ? "{}" : t.length <= 3 ? `{ ${t.map((e) => `${e}: ${I.C(A[e])}`).join(", ")} }` : `{ ${t.slice(0, 2).map((e) => `${e}: ${I.C(A[e])}`).join(", ")}, ... +${t.length - 2} more }`;
32
26
  }
33
27
  return A + "";
34
28
  }
35
29
  }
36
- var q = ((E) => (E[E.SILENT = 0] = "SILENT", E[E.WARNING = 1] = "WARNING", E[E.ERROR = 2] = "ERROR", E[E.THROW = 3] = "THROW", E))(q || {});
30
+ var tA = ((E) => (E[E.SILENT = 0] = "SILENT", E[E.WARNING = 1] = "WARNING", E[E.ERROR = 2] = "ERROR", E[E.THROW = 3] = "THROW", E))(tA || {});
37
31
  const v = class v {
38
32
  constructor() {
39
- n(this, "C", { globalLevel: 3 });
33
+ Q(this, "P", { globalLevel: 3 });
40
34
  }
41
- static D() {
42
- return v.o || (v.o = new v()), v.o;
35
+ static u() {
36
+ return v.D || (v.D = new v()), v.D;
43
37
  }
44
- l(A, t) {
38
+ I(A, t) {
45
39
  const e = "%c[textmode.js] Oops! (╯°□°)╯︵ Something went wrong in your code.", s = "color: #f44336; font-weight: bold; background: #ffebee; padding: 2px 6px; border-radius: 3px;";
46
- switch (this.C.globalLevel) {
40
+ switch (this.P.globalLevel) {
47
41
  case 0:
48
42
  return !1;
49
43
  case 1:
50
- return console.group(e, s), console.warn(m.A(A, t)), console.groupEnd(), !1;
44
+ return console.group(e, s), console.warn(I.A(A, t)), console.groupEnd(), !1;
51
45
  case 2:
52
- return console.group(e, s), console.error(m.A(A, t)), console.groupEnd(), !1;
46
+ return console.group(e, s), console.error(I.A(A, t)), console.groupEnd(), !1;
53
47
  default:
54
- throw new m(A, t);
48
+ throw new I(A, t);
55
49
  }
56
50
  }
57
- P(A, t, e) {
58
- return !!A || (this.l(t, e), !1);
51
+ _(A, t, e) {
52
+ return !!A || (this.I(t, e), !1);
59
53
  }
60
- u(A) {
61
- this.C.globalLevel = A;
54
+ v(A) {
55
+ this.P.globalLevel = A;
62
56
  }
63
57
  };
64
- n(v, "o", null);
65
- let S = v;
66
- const _ = S.D(), V = /* @__PURE__ */ new WeakMap();
67
- function G(E, A) {
68
- V.set(E, A);
58
+ Q(v, "D", null);
59
+ let L = v;
60
+ const M = L.u(), X = /* @__PURE__ */ new WeakMap();
61
+ function F(E, A) {
62
+ X.set(E, A);
69
63
  }
70
- function R(E) {
71
- return V.get(E);
64
+ function G(E) {
65
+ return X.get(E);
66
+ }
67
+ class V {
68
+ constructor() {
69
+ Q(this, "G", 1);
70
+ Q(this, "M", 0);
71
+ Q(this, "$", 0);
72
+ Q(this, "Y", 0);
73
+ Q(this, "F", [0, 0, 0]);
74
+ Q(this, "R", [1, 1, 1, 1]);
75
+ Q(this, "S", [0, 0, 0, 1]);
76
+ Q(this, "O", !1);
77
+ Q(this, "L", !1);
78
+ Q(this, "U", !1);
79
+ Q(this, "H", [0, 0]);
80
+ Q(this, "W", [0, 0, 0, 1]);
81
+ Q(this, "K", []);
82
+ }
83
+ J() {
84
+ this.K.push({ V: this.G, Z: this.M, N: this.$, X: this.Y, H: [...this.H], O: this.O, L: this.L, U: this.U, AA: [...this.F], tA: [...this.R], eA: [...this.S] });
85
+ }
86
+ sA() {
87
+ const A = this.K.pop();
88
+ A ? (this.G = A.V, this.M = A.Z, this.$ = A.N, this.Y = A.X, this.H = A.H, this.O = A.O, this.L = A.L, this.U = A.U, this.F = A.AA, this.R = A.tA, this.S = A.eA) : console.warn("pop() called without matching push()");
89
+ }
90
+ iA() {
91
+ this.K = [], this.M = 0, this.$ = 0, this.Y = 0;
92
+ }
93
+ BA(A) {
94
+ A.lineWeight = this.G, A.rotationX = this.M, A.rotationY = this.$, A.rotationZ = this.Y, A.character[0] = this.F[0], A.character[1] = this.F[1], A.character[2] = this.F[2], A.charColor[0] = this.R[0], A.charColor[1] = this.R[1], A.charColor[2] = this.R[2], A.charColor[3] = this.R[3], A.bgColor[0] = this.S[0], A.bgColor[1] = this.S[1], A.bgColor[2] = this.S[2], A.bgColor[3] = this.S[3], A.flipHorizontally = this.O, A.flipVertically = this.L, A.invert = this.U, A.charRotation[0] = this.H[0], A.charRotation[1] = this.H[1];
95
+ }
96
+ get lineWeight() {
97
+ return this.G;
98
+ }
99
+ get canvasBackgroundColor() {
100
+ return this.W;
101
+ }
102
+ QA(A) {
103
+ this.G = Math.abs(A);
104
+ }
105
+ EA(A) {
106
+ this.M = A;
107
+ }
108
+ rA(A) {
109
+ this.$ = A;
110
+ }
111
+ nA(A) {
112
+ this.Y = A;
113
+ }
114
+ gA(A) {
115
+ this.F = A;
116
+ }
117
+ oA(A, t, e, s = 255) {
118
+ this.R = [A / 255, t / 255, e / 255, s / 255];
119
+ }
120
+ aA(A, t, e, s = 255) {
121
+ this.S = [A / 255, t / 255, e / 255, s / 255];
122
+ }
123
+ hA(A) {
124
+ this.O = A;
125
+ }
126
+ cA(A) {
127
+ this.L = A;
128
+ }
129
+ CA(A) {
130
+ this.U = A;
131
+ }
132
+ lA(A) {
133
+ const t = 255 * A / 360, e = Math.floor(t) / 255, s = Math.round(t - Math.floor(t));
134
+ this.H = [e, s];
135
+ }
136
+ DA(A, t, e, s) {
137
+ this.W = [A / 255, t / 255, e / 255, s / 255];
138
+ }
72
139
  }
73
140
  class U {
74
- constructor(A, t, e = t, s = 1, r = {}) {
75
- n(this, "I");
76
- n(this, "p");
77
- n(this, "C");
78
- n(this, "_", null);
79
- n(this, "m");
80
- n(this, "v");
81
- n(this, "G", []);
82
- n(this, "$");
83
- n(this, "M", null);
84
- n(this, "Y", []);
85
- this.I = t, this.p = e, this.C = { filter: "nearest", wrap: "clamp", format: "rgba", type: "unsigned_byte", ...r }, this.m = A, this.$ = Math.min(Math.max(1, s), 8);
86
- const i = A.getParameter(A.MAX_DRAW_BUFFERS), B = A.getParameter(A.MAX_COLOR_ATTACHMENTS);
87
- this.$ = Math.min(this.$, i, B), this.v = A.createFramebuffer(), this.R(), this.S(), this.Y = Array(this.$).fill(null);
88
- }
89
- R() {
90
- const A = this.m, t = this.C.filter === "linear" ? A.LINEAR : A.NEAREST, e = this.C.wrap === "repeat" ? A.REPEAT : A.CLAMP_TO_EDGE, s = this.C.type === "float" ? A.FLOAT : A.UNSIGNED_BYTE;
91
- for (let r = 0; r < this.$; r++) {
92
- const i = A.createTexture();
93
- A.bindTexture(A.TEXTURE_2D, i), A.texParameteri(A.TEXTURE_2D, A.TEXTURE_MIN_FILTER, t), A.texParameteri(A.TEXTURE_2D, A.TEXTURE_MAG_FILTER, t), A.texParameteri(A.TEXTURE_2D, A.TEXTURE_WRAP_S, e), A.texParameteri(A.TEXTURE_2D, A.TEXTURE_WRAP_T, e), A.texImage2D(A.TEXTURE_2D, 0, A.RGBA, this.I, this.p, 0, A.RGBA, s, null), this.G.push(i);
141
+ constructor(A, t, e = t, s = 1, i = {}, B = null, r = !1) {
142
+ Q(this, "PA");
143
+ Q(this, "uA");
144
+ Q(this, "P");
145
+ Q(this, "IA", null);
146
+ Q(this, "wA");
147
+ Q(this, "fA");
148
+ Q(this, "dA", []);
149
+ Q(this, "_A");
150
+ Q(this, "pA", null);
151
+ Q(this, "mA", []);
152
+ Q(this, "vA", null);
153
+ Q(this, "yA", !1);
154
+ Q(this, "bA", null);
155
+ this.PA = t, this.uA = e, this.P = { filter: "nearest", wrap: "clamp", format: "rgba", type: "unsigned_byte", ...i }, this.wA = A, this._A = Math.min(Math.max(1, s), 8), this.vA = B, this.yA = !!r, this.bA = this.yA ? new V() : null;
156
+ const n = A.getParameter(A.MAX_DRAW_BUFFERS), o = A.getParameter(A.MAX_COLOR_ATTACHMENTS);
157
+ this._A = Math.min(this._A, n, o), this.fA = A.createFramebuffer(), this.GA(), this.MA(), this.mA = Array(this._A).fill(null);
158
+ }
159
+ GA() {
160
+ const A = this.wA, t = this.P.filter === "linear" ? A.LINEAR : A.NEAREST, e = this.P.wrap === "repeat" ? A.REPEAT : A.CLAMP_TO_EDGE, s = this.P.type === "float" ? A.FLOAT : A.UNSIGNED_BYTE;
161
+ for (let i = 0; i < this._A; i++) {
162
+ const B = A.createTexture();
163
+ A.bindTexture(A.TEXTURE_2D, B), A.texParameteri(A.TEXTURE_2D, A.TEXTURE_MIN_FILTER, t), A.texParameteri(A.TEXTURE_2D, A.TEXTURE_MAG_FILTER, t), A.texParameteri(A.TEXTURE_2D, A.TEXTURE_WRAP_S, e), A.texParameteri(A.TEXTURE_2D, A.TEXTURE_WRAP_T, e), A.texImage2D(A.TEXTURE_2D, 0, A.RGBA, this.PA, this.uA, 0, A.RGBA, s, null), this.dA.push(B);
94
164
  }
95
165
  A.bindTexture(A.TEXTURE_2D, null);
96
166
  }
97
- S() {
98
- const A = this.m;
99
- if (A.bindFramebuffer(A.FRAMEBUFFER, this.v), this.$ === 1) A.framebufferTexture2D(A.FRAMEBUFFER, A.COLOR_ATTACHMENT0, A.TEXTURE_2D, this.G[0], 0);
167
+ MA() {
168
+ const A = this.wA;
169
+ if (A.bindFramebuffer(A.FRAMEBUFFER, this.fA), this._A === 1) A.framebufferTexture2D(A.FRAMEBUFFER, A.COLOR_ATTACHMENT0, A.TEXTURE_2D, this.dA[0], 0);
100
170
  else {
101
171
  const e = [];
102
- for (let s = 0; s < this.$; s++) {
103
- const r = A.COLOR_ATTACHMENT0 + s;
104
- A.framebufferTexture2D(A.FRAMEBUFFER, r, A.TEXTURE_2D, this.G[s], 0), e.push(r);
172
+ for (let s = 0; s < this._A; s++) {
173
+ const i = A.COLOR_ATTACHMENT0 + s;
174
+ A.framebufferTexture2D(A.FRAMEBUFFER, i, A.TEXTURE_2D, this.dA[s], 0), e.push(i);
105
175
  }
106
176
  A.drawBuffers(e);
107
177
  }
108
178
  const t = A.checkFramebufferStatus(A.FRAMEBUFFER);
109
179
  t !== A.FRAMEBUFFER_COMPLETE && console.error("GLFramebuffer is not complete:", t), A.bindFramebuffer(A.FRAMEBUFFER, null);
110
180
  }
111
- F(A) {
112
- const t = this.m;
113
- t.bindTexture(t.TEXTURE_2D, this.G[0]), t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL, 1), t.texImage2D(t.TEXTURE_2D, 0, t.RGBA, t.RGBA, t.UNSIGNED_BYTE, A), t.bindTexture(t.TEXTURE_2D, null);
181
+ $A(A) {
182
+ const t = this.wA;
183
+ t.bindTexture(t.TEXTURE_2D, this.dA[0]), t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL, 1), t.texImage2D(t.TEXTURE_2D, 0, t.RGBA, t.RGBA, t.UNSIGNED_BYTE, A), t.bindTexture(t.TEXTURE_2D, null);
114
184
  }
115
- O(A, t) {
116
- this.I = A, this.p = t, this._ = null, this.Y = Array(this.$).fill(null);
117
- const e = this.m, s = this.C.type === "float" ? e.FLOAT : e.UNSIGNED_BYTE;
118
- for (const r of this.G) e.bindTexture(e.TEXTURE_2D, r), e.texImage2D(e.TEXTURE_2D, 0, e.RGBA, this.I, this.p, 0, e.RGBA, s, null);
185
+ resize(A, t) {
186
+ this.PA = A, this.uA = t, this.IA = null, this.mA = Array(this._A).fill(null);
187
+ const e = this.wA, s = this.P.type === "float" ? e.FLOAT : e.UNSIGNED_BYTE;
188
+ for (const i of this.dA) e.bindTexture(e.TEXTURE_2D, i), e.texImage2D(e.TEXTURE_2D, 0, e.RGBA, this.PA, this.uA, 0, e.RGBA, s, null);
119
189
  e.bindTexture(e.TEXTURE_2D, null);
120
190
  }
121
- U(A) {
122
- const t = this.m;
123
- if (A < 0 || A >= this.$) throw Error(`GLFramebuffer: attachment index ${A} out of range (count=${this.$})`);
124
- const e = this.Y[A];
191
+ xA(A) {
192
+ const t = this.wA, e = this.mA[A];
125
193
  if (e) return e;
126
- const s = this.I, r = this.p, i = new Uint8Array(s * r * 4), B = t.getParameter(t.READ_FRAMEBUFFER_BINDING);
127
- t.bindFramebuffer(t.READ_FRAMEBUFFER, this.v), t.readBuffer(t.COLOR_ATTACHMENT0 + A), t.readPixels(0, 0, s, r, t.RGBA, t.UNSIGNED_BYTE, i), t.bindFramebuffer(t.READ_FRAMEBUFFER, B);
128
- const Q = 4 * s, o = new Uint8Array(i.length);
129
- for (let h = 0; h < r; h++) {
130
- const a = (r - 1 - h) * Q, g = h * Q;
131
- o.set(i.subarray(a, a + Q), g);
194
+ const s = this.PA, i = this.uA, B = new Uint8Array(s * i * 4), r = t.getParameter(t.READ_FRAMEBUFFER_BINDING);
195
+ t.bindFramebuffer(t.READ_FRAMEBUFFER, this.fA), t.readBuffer(t.COLOR_ATTACHMENT0 + A), t.readPixels(0, 0, s, i, t.RGBA, t.UNSIGNED_BYTE, B), t.bindFramebuffer(t.READ_FRAMEBUFFER, r);
196
+ const n = 4 * s, o = new Uint8Array(B.length);
197
+ for (let a = 0; a < i; a++) {
198
+ const g = (i - 1 - a) * n, h = a * n;
199
+ o.set(B.subarray(g, g + n), h);
132
200
  }
133
- return this.Y[A] = o, o;
134
- }
135
- L() {
136
- for (let A = 0; A < this.$; A++) this.U(A);
137
- }
138
- k() {
139
- const A = this.m;
140
- this.M = { framebuffer: A.getParameter(A.FRAMEBUFFER_BINDING), viewport: A.getParameter(A.VIEWPORT) }, A.bindFramebuffer(A.FRAMEBUFFER, this.v), this.Y = Array(this.$).fill(null);
141
- for (let t = 0; t < this.$; t++) A.clearBufferfv(A.COLOR, t, new Float32Array([0, 0, 0, 0]));
142
- A.viewport(0, 0, this.I, this.p), G(A, [0, 0, this.I, this.p]);
143
- }
144
- H() {
145
- if (!this.M) return;
146
- const A = this.m;
147
- A.bindFramebuffer(A.FRAMEBUFFER, this.M.framebuffer), A.viewport(...this.M.viewport), G(A, this.M.viewport), this.M = null;
201
+ return this.mA[A] = o, o;
202
+ }
203
+ begin() {
204
+ var t, e, s, i;
205
+ const A = this.wA;
206
+ if (this.vA) {
207
+ const B = ((e = (t = this.vA).YA) == null ? void 0 : e.call(t)) ?? null;
208
+ B && this.vA.FA(B), this.yA && this.bA && ((i = (s = this.vA).RA) == null || i.call(s, this.bA));
209
+ }
210
+ this.pA = { framebuffer: A.getParameter(A.FRAMEBUFFER_BINDING), viewport: A.getParameter(A.VIEWPORT) }, A.bindFramebuffer(A.FRAMEBUFFER, this.fA), this.mA = Array(this._A).fill(null);
211
+ for (let B = 0; B < this._A; B++) A.clearBufferfv(A.COLOR, B, new Float32Array([0, 0, 0, 0]));
212
+ A.viewport(0, 0, this.PA, this.uA), F(A, [0, 0, this.PA, this.uA]);
213
+ }
214
+ end() {
215
+ var t, e, s, i;
216
+ if (!this.pA) return;
217
+ const A = this.wA;
218
+ if (this.vA) {
219
+ const B = ((e = (t = this.vA).YA) == null ? void 0 : e.call(t)) ?? null;
220
+ B && this.vA.FA(B);
221
+ }
222
+ A.bindFramebuffer(A.FRAMEBUFFER, this.pA.framebuffer), A.viewport(...this.pA.viewport), F(A, this.pA.viewport), this.pA = null, this.vA && this.yA && this.bA && ((i = (s = this.vA).SA) == null || i.call(s));
148
223
  }
149
- W() {
150
- const A = this.m;
151
- this.v && A.deleteFramebuffer(this.v);
152
- for (const t of this.G) A.deleteTexture(t);
153
- this.G = [], this.Y = [];
224
+ zA() {
225
+ const A = this.wA;
226
+ A.deleteFramebuffer(this.fA);
227
+ for (const t of this.dA) A.deleteTexture(t);
154
228
  }
155
229
  get width() {
156
- return this.I;
230
+ return this.PA;
157
231
  }
158
232
  get height() {
159
- return this.p;
233
+ return this.uA;
160
234
  }
161
235
  get pixels() {
162
- return this._;
236
+ return this.IA;
163
237
  }
164
238
  get options() {
165
- return { ...this.C };
239
+ return { ...this.P };
166
240
  }
167
241
  get framebuffer() {
168
- return this.v;
242
+ return this.fA;
169
243
  }
170
244
  get texture() {
171
- return this.G[0];
245
+ return this.dA[0];
172
246
  }
173
247
  get textures() {
174
- return [...this.G];
248
+ return [...this.dA];
175
249
  }
176
250
  get attachmentCount() {
177
- return this.$;
178
- }
179
- getAttachmentPixels(A) {
180
- return this.Y[A] ?? null;
251
+ return this._A;
181
252
  }
182
253
  }
183
- class z {
254
+ function N(E) {
255
+ return typeof E == "string" ? E : E.sourceCode;
256
+ }
257
+ class T {
184
258
  constructor(A, t, e) {
185
- n(this, "m");
186
- n(this, "J");
187
- n(this, "V", /* @__PURE__ */ new Map());
188
- n(this, "K", /* @__PURE__ */ new Map());
189
- n(this, "Z", 0);
190
- n(this, "j");
191
- this.m = A, this.J = this.X(t, e), this.j = A.getParameter(A.MAX_TEXTURE_IMAGE_UNITS), this.N();
192
- }
193
- N() {
194
- const A = this.m.getProgramParameter(this.J, this.m.ACTIVE_UNIFORMS);
259
+ Q(this, "wA");
260
+ Q(this, "kA");
261
+ Q(this, "OA", /* @__PURE__ */ new Map());
262
+ Q(this, "LA", 0);
263
+ this.wA = A, this.kA = this.UA(N(t), N(e)), this.TA();
264
+ }
265
+ TA() {
266
+ const A = this.wA.getProgramParameter(this.kA, this.wA.ACTIVE_UNIFORMS);
195
267
  for (let t = 0; t < A; t++) {
196
- const e = this.m.getActiveUniform(this.J, t);
268
+ const e = this.wA.getActiveUniform(this.kA, t);
197
269
  if (e) {
198
- const s = this.m.getUniformLocation(this.J, e.name);
199
- s && (this.V.set(e.name, s), this.K.set(e.name, e.type));
270
+ const s = this.wA.getUniformLocation(this.kA, e.name);
271
+ s && this.OA.set(e.name, s);
200
272
  }
201
273
  }
202
274
  }
203
- X(A, t) {
204
- const e = this.q(this.m.VERTEX_SHADER, A), s = this.q(this.m.FRAGMENT_SHADER, t), r = this.m.createProgram();
205
- if (this.m.attachShader(r, e), this.m.attachShader(r, s), this.m.linkProgram(r), !this.m.getProgramParameter(r, this.m.LINK_STATUS)) {
206
- const i = this.m.getProgramInfoLog(r);
207
- throw Error("Shader program link error: " + i);
275
+ UA(A, t) {
276
+ const e = this.HA(this.wA.VERTEX_SHADER, A), s = this.HA(this.wA.FRAGMENT_SHADER, t), i = this.wA.createProgram();
277
+ if (this.wA.attachShader(i, e), this.wA.attachShader(i, s), this.wA.linkProgram(i), !this.wA.getProgramParameter(i, this.wA.LINK_STATUS)) {
278
+ const B = this.wA.getProgramInfoLog(i);
279
+ throw Error("Shader program link error: " + B);
208
280
  }
209
- return this.m.deleteShader(e), this.m.deleteShader(s), r;
281
+ return this.wA.deleteShader(e), this.wA.deleteShader(s), i;
210
282
  }
211
- q(A, t) {
212
- const e = this.m.createShader(A);
213
- if (this.m.shaderSource(e, t), this.m.compileShader(e), !this.m.getShaderParameter(e, this.m.COMPILE_STATUS)) {
214
- const s = this.m.getShaderInfoLog(e);
215
- throw this.m.deleteShader(e), Error("Shader compilation error: " + s);
283
+ HA(A, t) {
284
+ const e = this.wA.createShader(A);
285
+ if (this.wA.shaderSource(e, t), this.wA.compileShader(e), !this.wA.getShaderParameter(e, this.wA.COMPILE_STATUS)) {
286
+ const s = this.wA.getShaderInfoLog(e);
287
+ throw this.wA.deleteShader(e), Error("Shader compilation error: " + s);
216
288
  }
217
289
  return e;
218
290
  }
219
- AA() {
220
- this.m.useProgram(this.J), this.tA();
291
+ WA() {
292
+ this.wA.useProgram(this.kA), this.KA();
221
293
  }
222
- tA() {
223
- this.Z = 0;
294
+ KA() {
295
+ this.LA = 0;
224
296
  }
225
- eA(A) {
226
- for (const [t, e] of Object.entries(A)) this.BA(t, e);
297
+ JA(A) {
298
+ for (const [t, e] of Object.entries(A)) this.VA(t, e);
227
299
  }
228
- sA(A) {
229
- return this.V.has(A);
300
+ ZA(A) {
301
+ return this.OA.has(A);
230
302
  }
231
- BA(A, t) {
232
- if (this.m.getParameter(this.m.CURRENT_PROGRAM) !== this.J) return void console.warn(`Attempting to set uniform '${A}' on shader that is not currently bound`);
233
- const e = this.V.get(A);
234
- if (e) if (typeof t == "number") this.m.uniform1f(e, t);
235
- else if (typeof t == "boolean") this.m.uniform1i(e, t ? 1 : 0);
303
+ VA(A, t) {
304
+ const e = this.OA.get(A);
305
+ if (e) if (typeof t == "number") this.wA.uniform1f(e, t);
306
+ else if (typeof t == "boolean") this.wA.uniform1i(e, t ? 1 : 0);
236
307
  else if (Array.isArray(t)) switch (t.length) {
237
308
  case 2:
238
- this.m.uniform2f(e, t[0], t[1]);
309
+ this.wA.uniform2f(e, t[0], t[1]);
239
310
  break;
240
311
  case 3:
241
- this.m.uniform3f(e, t[0], t[1], t[2]);
312
+ this.wA.uniform3f(e, t[0], t[1], t[2]);
242
313
  break;
243
314
  case 4:
244
- this.m.uniform4f(e, t[0], t[1], t[2], t[3]);
315
+ this.wA.uniform4f(e, t[0], t[1], t[2], t[3]);
245
316
  break;
246
317
  default:
247
- console.warn(`Unsupported array length ${t.length} for uniform '${A}'`);
318
+ return;
248
319
  }
249
320
  else if (t instanceof WebGLTexture) {
250
- const s = this.iA();
251
- this.m.uniform1i(e, s), this.m.activeTexture(this.m.TEXTURE0 + s), this.m.bindTexture(this.m.TEXTURE_2D, t);
321
+ const s = this.NA();
322
+ this.wA.uniform1i(e, s), this.wA.activeTexture(this.wA.TEXTURE0 + s), this.wA.bindTexture(this.wA.TEXTURE_2D, t);
252
323
  } else if (t instanceof U) {
253
- const s = this.iA();
254
- this.m.uniform1i(e, s), this.m.activeTexture(this.m.TEXTURE0 + s), this.m.bindTexture(this.m.TEXTURE_2D, t.texture);
324
+ const s = this.NA();
325
+ this.wA.uniform1i(e, s), this.wA.activeTexture(this.wA.TEXTURE0 + s), this.wA.bindTexture(this.wA.TEXTURE_2D, t.texture);
255
326
  } else if (typeof t == "object" && "texture" in t) {
256
- const s = this.iA();
257
- this.m.uniform1i(e, s), this.m.activeTexture(this.m.TEXTURE0 + s), this.m.bindTexture(this.m.TEXTURE_2D, t.texture);
327
+ const s = this.NA();
328
+ this.wA.uniform1i(e, s), this.wA.activeTexture(this.wA.TEXTURE0 + s), this.wA.bindTexture(this.wA.TEXTURE_2D, t.texture);
258
329
  } else console.warn(`Unsupported uniform type for '${A}':`, typeof t);
259
330
  }
260
- iA() {
261
- return this.Z >= this.j && console.warn(`Exceeded maximum texture units (${this.j}). Texture may not render correctly.`), this.Z++;
331
+ NA() {
332
+ return this.LA++;
262
333
  }
263
- get QA() {
264
- return this.J;
334
+ get XA() {
335
+ return this.kA;
265
336
  }
266
- W() {
267
- this.m.deleteProgram(this.J);
337
+ zA() {
338
+ this.wA.deleteProgram(this.kA);
268
339
  }
269
340
  }
270
- class AA {
271
- constructor() {
272
- n(this, "rA", 1);
273
- n(this, "EA", 0);
274
- n(this, "nA", 0);
275
- n(this, "oA", 0);
276
- n(this, "gA", [0, 0, 0]);
277
- n(this, "aA", [1, 1, 1, 1]);
278
- n(this, "hA", [0, 0, 0, 1]);
279
- n(this, "cA", !1);
280
- n(this, "CA", !1);
281
- n(this, "DA", !1);
282
- n(this, "lA", [0, 0]);
283
- n(this, "PA", [0, 0, 0, 1]);
284
- n(this, "uA", []);
285
- }
286
- IA() {
287
- this.uA.push({ lineWeight: this.rA, rotationX: this.EA, rotationY: this.nA, rotationZ: this.oA, charRotation: [...this.lA], flipHorizontally: this.cA, flipVertically: this.CA, invert: this.DA, character: [...this.gA], charColor: [...this.aA], cellColor: [...this.hA] });
288
- }
289
- wA() {
290
- const A = this.uA.pop();
291
- A ? (this.rA = A.lineWeight, this.EA = A.rotationX, this.nA = A.rotationY, this.oA = A.rotationZ, this.lA = A.charRotation, this.cA = A.flipHorizontally, this.CA = A.flipVertically, this.DA = A.invert, this.gA = A.character, this.aA = A.charColor, this.hA = A.cellColor) : console.warn("pop() called without matching push()");
292
- }
293
- fA() {
294
- this.uA = [], this.EA = 0, this.nA = 0, this.oA = 0;
295
- }
296
- dA(A) {
297
- A.lineWeight = this.rA, A.rotationX = this.EA, A.rotationY = this.nA, A.rotationZ = this.oA, A.character[0] = this.gA[0], A.character[1] = this.gA[1], A.character[2] = this.gA[2], A.charColor[0] = this.aA[0], A.charColor[1] = this.aA[1], A.charColor[2] = this.aA[2], A.charColor[3] = this.aA[3], A.bgColor[0] = this.hA[0], A.bgColor[1] = this.hA[1], A.bgColor[2] = this.hA[2], A.bgColor[3] = this.hA[3], A.flipHorizontally = this.cA, A.flipVertically = this.CA, A.invert = this.DA, A.charRotation[0] = this.lA[0], A.charRotation[1] = this.lA[1];
298
- }
299
- get lineWeight() {
300
- return this.rA;
301
- }
302
- get canvasBackgroundColor() {
303
- return this.PA;
304
- }
305
- pA(A) {
306
- this.rA = Math.abs(A);
307
- }
308
- _A(A) {
309
- this.EA = A;
310
- }
311
- mA(A) {
312
- this.nA = A;
313
- }
314
- vA(A) {
315
- this.oA = A;
316
- }
317
- xA(A) {
318
- this.gA = A;
319
- }
320
- yA(A, t, e, s = 255) {
321
- this.aA = [A / 255, t / 255, e / 255, s / 255];
341
+ const S = `#version 300 es
342
+ in vec2 a_position;in vec2 a_texCoord;in vec2 a_instancePosition;in vec2 a_instanceSize;in vec3 a_instanceCharacter;in vec4 a_instancePrimaryColor;in vec4 a_instanceSecondaryColor;in vec2 a_instanceRotation;in vec3 a_instanceTransform;in vec3 a_instanceGlobalRotation;in vec2 a_instanceRotationCenter;in vec2 a_instanceBezierCP1;in vec2 a_instanceBezierCP2;in vec2 a_instanceBezierStart;in vec2 a_instanceBezierEnd;in vec2 a_instanceArcAngles;uniform float k;uniform vec2 r;out vec2 v_uv;out vec3 v_character;out vec4 v_primaryColor;out vec4 v_secondaryColor;out vec2 v_rotation;out vec3 v_transform;mat3 A(float B){float C=sin(B),D=cos(B);return mat3(1,0,0,0,D,-C,0,C,D);}mat3 E(float B){float C=sin(B),D=cos(B);return mat3(D,0,C,0,1,0,-C,0,D);}mat3 F(float B){float C=sin(B),D=cos(B);return mat3(D,-C,0,C,D,0,0,0,1);}vec2 G(float H,vec2 I,vec2 J,vec2 K,vec2 L){float M=1.-H,N=M*M,O=H*H;return N*M*I+3.*N*H*J+3.*M*O*K+O*H*L;}vec2 P(float H,vec2 I,vec2 J,vec2 K,vec2 L){float M=1.-H,N=M*M,O=H*H;return-3.*N*I+3.*N*J-6.*M*H*J+6.*M*H*K-3.*O*K+3.*O*L;}void main(){v_uv=a_texCoord;v_character=a_instanceCharacter;v_primaryColor=a_instancePrimaryColor;v_secondaryColor=a_instanceSecondaryColor;v_rotation=a_instanceRotation;v_transform=a_instanceTransform;vec2 Q;bool R=length(a_instanceBezierCP1)+length(a_instanceBezierCP2)+length(a_instanceBezierStart)+length(a_instanceBezierEnd)>0.;bool S=a_instanceArcAngles.x!=0.||a_instanceArcAngles.y!=0.;if(R){float H=a_position.x;vec2 T=G(H,a_instanceBezierStart,a_instanceBezierCP1,a_instanceBezierCP2,a_instanceBezierEnd);vec2 U=P(H,a_instanceBezierStart,a_instanceBezierCP1,a_instanceBezierCP2,a_instanceBezierEnd);float V=length(U);U=V>0.?U/V:vec2(1,0);Q=T+vec2(-U.y,U.x)*a_position.y*a_instanceSize.y;}else if(S){float C=a_instanceArcAngles.x,W=a_instanceArcAngles.y;C=mod(C,6.28318530718);if(C<0.)C+=6.28318530718;W=mod(W,6.28318530718);if(W<0.)W+=6.28318530718;float X=C-W;if(X<=0.)X+=6.28318530718;float Y=C-a_position.x*X;vec2 Z=vec2(cos(Y),sin(Y))*a_position.y;Q=Z*a_instanceSize*.5+a_instanceSize*.5+a_instancePosition;}else{Q=a_position*a_instanceSize+a_instancePosition;}vec2 a=(Q/r)*2.-1.;a.y=-a.y;if(length(a_instanceGlobalRotation)>0.){vec3 b=vec3(a-a_instanceRotationCenter,0);b.x*=k;if(a_instanceGlobalRotation.x!=0.)b=A(-a_instanceGlobalRotation.x)*b;if(a_instanceGlobalRotation.y!=0.)b=E(-a_instanceGlobalRotation.y)*b;if(a_instanceGlobalRotation.z!=0.)b=F(-a_instanceGlobalRotation.z)*b;b.x/=k;a=b.xy+a_instanceRotationCenter;}gl_Position=vec4(a,0,1);}`;
343
+ class eA {
344
+ constructor(A) {
345
+ Q(this, "jA", /* @__PURE__ */ new Map());
346
+ Q(this, "wA");
347
+ this.wA = A;
348
+ }
349
+ qA(A, t) {
350
+ if (!this.jA.has(A)) {
351
+ const e = t();
352
+ this.jA.set(A, e);
353
+ }
354
+ return this.jA.get(A);
322
355
  }
323
- bA(A, t, e, s = 255) {
324
- this.hA = [A / 255, t / 255, e / 255, s / 255];
356
+ At() {
357
+ return this.qA("mrt-copy", () => new T(this.wA, S, `#version 300 es
358
+ precision highp float;in vec2 v_uv;uniform sampler2D l;uniform sampler2D m;uniform sampler2D n;uniform sampler2D o;uniform sampler2D p;uniform vec2 q;layout(location=0)out vec4 o_character;layout(location=1)out vec4 o_primaryColor;layout(location=2)out vec4 o_secondaryColor;layout(location=3)out vec4 o_rotation;layout(location=4)out vec4 o_transform;void main(){vec2 A=vec2(v_uv.x,1.-v_uv.y);vec2 B=A*q;vec2 C=(floor(B)+0.5f)/q;vec4 D=texture(l,C);vec4 E=texture(m,C);if(E.a==0.){discard;}vec4 F=texture(n,C);vec4 G=texture(o,C);vec4 H=texture(p,C);o_character=D;o_primaryColor=E;o_secondaryColor=F;o_rotation=G;o_transform=H;}`));
325
359
  }
326
- GA(A) {
327
- this.cA = A;
360
+ YA() {
361
+ return this.qA("mrt-draw", () => new T(this.wA, S, `#version 300 es
362
+ precision highp float;in vec2 v_uv;in vec3 v_character;in vec4 v_primaryColor;in vec4 v_secondaryColor;in vec2 v_rotation;in vec3 v_transform;layout(location=0)out vec4 o_character;layout(location=1)out vec4 o_primaryColor;layout(location=2)out vec4 o_secondaryColor;layout(location=3)out vec4 o_rotation;layout(location=4)out vec4 o_transform;void main(){o_character=vec4(v_character,1.);o_primaryColor=v_primaryColor;o_secondaryColor=v_secondaryColor;o_rotation=vec4(v_rotation,0.,1.);o_transform=vec4(v_transform,1.);}`));
328
363
  }
329
- $A(A) {
330
- this.CA = A;
364
+ tt() {
365
+ return this.qA("ascii-conversion", () => new T(this.wA, "attribute vec2 a_position;attribute vec2 a_texCoord;varying vec2 v_uv;void main(){v_uv=a_texCoord;gl_Position=vec4(a_position,0.,1.);}", "precision mediump float;uniform sampler2D a;uniform vec2 b;uniform sampler2D d;uniform sampler2D e;uniform sampler2D f;uniform sampler2D c;uniform sampler2D g;uniform vec2 h;uniform vec2 i;uniform vec2 j;mat2 A(float B){float C=sin(B);float c=cos(B);return mat2(c,-C,C,c);}void main(){vec2 D=(gl_FragCoord.xy-j)/i;vec2 E=D*h;vec2 F=floor(E);vec2 G=(F+0.5)/h;vec4 H=texture2D(d,G);vec4 I=texture2D(e,G);vec4 J=texture2D(f,G);bool K=J.r>0.5;bool L=J.g>0.5;bool M=J.b>0.5;vec4 N=texture2D(c,G);int O=int(N.r*255.+0.5)+int(N.g*255.+0.5)*256;int P=int(mod(float(O),b.x));int Q=O/int(b.x);float R=(b.y-1.)-float(Q);vec2 S=vec2(float(P),R)/b;vec4 T=texture2D(g,G);float U=T.r*255.+T.g;float V=-(U*360./255.)*0.017453292;vec2 W=fract(E)-0.5;if(L)W.x=-W.x;if(M)W.y=-W.y;W=A(V)*W+0.5;vec2 X=1./b;vec2 Y=S+W*X;vec2 Z=S+X;if(any(lessThan(Y,S))||any(greaterThan(Y,Z))){gl_FragColor=K?H:I;return;}vec4 a=texture2D(a,Y);if(K)a.rgb=1.-a.rgb;gl_FragColor=mix(I,H,a);}"));
331
366
  }
332
- MA(A) {
333
- this.DA = A;
367
+ et(A) {
368
+ return new T(this.wA, S, A);
334
369
  }
335
- YA(A) {
336
- const t = 255 * A / 360, e = Math.floor(t) / 255, s = Math.round(t - Math.floor(t));
337
- this.lA = [e, s];
370
+ st(A, t) {
371
+ return new T(this.wA, A, t);
338
372
  }
339
- zA(A, t, e, s) {
340
- this.PA = [A / 255, t / 255, e / 255, s / 255];
373
+ zA() {
374
+ for (const A of this.jA.values()) A.zA();
375
+ this.jA.clear();
341
376
  }
342
377
  }
343
- var L = `#version 300 es
344
- in vec2 a_position;in vec2 a_texCoord;in vec2 a_instancePosition;in vec2 a_instanceSize;in vec3 a_instanceCharacter;in vec4 a_instancePrimaryColor;in vec4 a_instanceSecondaryColor;in vec2 a_instanceRotation;in vec3 a_instanceTransform;in vec3 a_instanceGlobalRotation;in vec2 a_instanceRotationCenter;in vec2 a_instanceBezierCP1;in vec2 a_instanceBezierCP2;in vec2 a_instanceBezierStart;in vec2 a_instanceBezierEnd;in vec2 a_instanceArcAngles;uniform float u_aspectRatio;uniform vec2 u_viewportSize;out vec2 v_uv;out vec3 v_character;out vec4 v_primaryColor;out vec4 v_secondaryColor;out vec2 v_rotation;out vec3 v_transform;mat3 rotateX(float a){float s=sin(a),c=cos(a);return mat3(1,0,0,0,c,-s,0,s,c);}mat3 rotateY(float a){float s=sin(a),c=cos(a);return mat3(c,0,s,0,1,0,-s,0,c);}mat3 rotateZ(float a){float s=sin(a),c=cos(a);return mat3(c,-s,0,s,c,0,0,0,1);}vec2 evaluateBezier(float t,vec2 p0,vec2 p1,vec2 p2,vec2 p3){float u=1.-t,u2=u*u,t2=t*t;return u2*u*p0+3.*u2*t*p1+3.*u*t2*p2+t2*t*p3;}vec2 evaluateBezierDerivative(float t,vec2 p0,vec2 p1,vec2 p2,vec2 p3){float u=1.-t,u2=u*u,t2=t*t;return-3.*u2*p0+3.*u2*p1-6.*u*t*p1+6.*u*t*p2-3.*t2*p2+3.*t2*p3;}void main(){v_uv=a_texCoord;v_character=a_instanceCharacter;v_primaryColor=a_instancePrimaryColor;v_secondaryColor=a_instanceSecondaryColor;v_rotation=a_instanceRotation;v_transform=a_instanceTransform;vec2 worldPosition;bool isBezier=length(a_instanceBezierCP1)+length(a_instanceBezierCP2)+length(a_instanceBezierStart)+length(a_instanceBezierEnd)>0.;bool isArc=a_instanceArcAngles.x!=0.||a_instanceArcAngles.y!=0.;if(isBezier){float t=a_position.x;vec2 curvePoint=evaluateBezier(t,a_instanceBezierStart,a_instanceBezierCP1,a_instanceBezierCP2,a_instanceBezierEnd);vec2 tangent=evaluateBezierDerivative(t,a_instanceBezierStart,a_instanceBezierCP1,a_instanceBezierCP2,a_instanceBezierEnd);float tLen=length(tangent);tangent=tLen>0.?tangent/tLen:vec2(1,0);worldPosition=curvePoint+vec2(-tangent.y,tangent.x)*a_position.y*a_instanceSize.y;}else if(isArc){float s=a_instanceArcAngles.x,e=a_instanceArcAngles.y;s=mod(s,6.28318530718);if(s<0.)s+=6.28318530718;e=mod(e,6.28318530718);if(e<0.)e+=6.28318530718;float d=s-e;if(d<=0.)d+=6.28318530718;float angle=s-a_position.x*d;vec2 local=vec2(cos(angle),sin(angle))*a_position.y;worldPosition=local*a_instanceSize*.5+a_instanceSize*.5+a_instancePosition;}else{worldPosition=a_position*a_instanceSize+a_instancePosition;}vec2 ndc=(worldPosition/u_viewportSize)*2.-1.;ndc.y=-ndc.y;if(length(a_instanceGlobalRotation)>0.){vec3 pos3D=vec3(ndc-a_instanceRotationCenter,0);pos3D.x*=u_aspectRatio;if(a_instanceGlobalRotation.x!=0.)pos3D=rotateX(-a_instanceGlobalRotation.x)*pos3D;if(a_instanceGlobalRotation.y!=0.)pos3D=rotateY(-a_instanceGlobalRotation.y)*pos3D;if(a_instanceGlobalRotation.z!=0.)pos3D=rotateZ(-a_instanceGlobalRotation.z)*pos3D;pos3D.x/=u_aspectRatio;ndc=pos3D.xy+a_instanceRotationCenter;}gl_Position=vec4(ndc,0,1);}`, D = ((E) => (E.RECTANGLE = "rectangle", E.LINE = "line", E.ELLIPSE = "ellipse", E.ARC = "arc", E.TRIANGLE = "triangle", E.BEZIER_CURVE = "bezier_curve", E.CUSTOM = "custom", E))(D || {});
345
- class tA {
378
+ var D = ((E) => (E.RECTANGLE = "rectangle", E.LINE = "line", E.ELLIPSE = "ellipse", E.ARC = "arc", E.TRIANGLE = "triangle", E.BEZIER_CURVE = "bezier_curve", E.CUSTOM = "custom", E))(D || {});
379
+ class sA {
346
380
  constructor(A) {
347
- n(this, "m");
348
- n(this, "RA", /* @__PURE__ */ new Map());
349
- this.m = A;
350
- }
351
- SA(A, t, e, s) {
352
- const r = this.m;
353
- let i = this.RA.get(A);
354
- i || (i = /* @__PURE__ */ new Map(), this.RA.set(A, i));
355
- let B = i.get(t) || null;
356
- if (!B) {
357
- B = r.createVertexArray(), i.set(t, B), r.bindVertexArray(B), r.bindBuffer(r.ARRAY_BUFFER, s);
358
- const Q = r.getAttribLocation(A, "a_position");
359
- Q !== -1 && (r.enableVertexAttribArray(Q), r.vertexAttribPointer(Q, e.attributes.position.size, r.FLOAT, !1, e.stride, e.attributes.position.offset), r.vertexAttribDivisor(Q, 0));
360
- const o = r.getAttribLocation(A, "a_texCoord");
361
- o !== -1 && (r.enableVertexAttribArray(o), r.vertexAttribPointer(o, e.attributes.texCoord.size, r.FLOAT, !1, e.stride, e.attributes.texCoord.offset), r.vertexAttribDivisor(o, 0));
381
+ Q(this, "wA");
382
+ Q(this, "it", /* @__PURE__ */ new Map());
383
+ this.wA = A;
384
+ }
385
+ Bt(A, t, e, s) {
386
+ const i = this.wA;
387
+ let B = this.it.get(A);
388
+ B || (B = /* @__PURE__ */ new Map(), this.it.set(A, B));
389
+ let r = B.get(t) || null;
390
+ if (!r) {
391
+ r = i.createVertexArray(), B.set(t, r), i.bindVertexArray(r), i.bindBuffer(i.ARRAY_BUFFER, s);
392
+ const n = i.getAttribLocation(A, "a_position");
393
+ n !== -1 && (i.enableVertexAttribArray(n), i.vertexAttribPointer(n, e.Et.Qt.size, i.FLOAT, !1, e.rt, e.Et.Qt.offset), i.vertexAttribDivisor(n, 0));
394
+ const o = i.getAttribLocation(A, "a_texCoord");
395
+ o !== -1 && (i.enableVertexAttribArray(o), i.vertexAttribPointer(o, e.Et.nt.size, i.FLOAT, !1, e.rt, e.Et.nt.offset), i.vertexAttribDivisor(o, 0));
362
396
  }
363
- r.bindVertexArray(B);
397
+ i.bindVertexArray(r);
364
398
  }
365
- TA() {
366
- this.m.bindVertexArray(null);
399
+ gt() {
400
+ this.wA.bindVertexArray(null);
367
401
  }
368
- W() {
369
- const A = this.m;
370
- for (const [, t] of this.RA) for (const [, e] of t) e && A.deleteVertexArray(e);
371
- this.RA.clear();
402
+ zA() {
403
+ const A = this.wA;
404
+ for (const [, t] of this.it) for (const [, e] of t) e && A.deleteVertexArray(e);
405
+ this.it.clear();
372
406
  }
373
407
  }
374
- class eA {
375
- constructor(A) {
376
- n(this, "FA");
377
- n(this, "m");
378
- n(this, "OA", null);
379
- n(this, "UA", null);
380
- n(this, "LA", null);
381
- this.m = A, this.FA = new tA(A);
382
- }
383
- kA(A, t, e) {
384
- const { shader: s } = A, r = R(this.m) || this.m.getParameter(this.m.VIEWPORT), i = { u_aspectRatio: r[2] / r[3], u_viewportSize: [r[2], r[3]] }, B = {};
385
- for (const [a, g] of Object.entries(i)) s.sA(a) && (B[a] = g);
386
- Object.keys(B).length > 0 && s.eA(B);
387
- const Q = (a) => {
388
- if (!a || !a.HA()) return;
389
- const g = a.unitGeometry, l = a.unitBuffer;
408
+ class iA {
409
+ constructor(A, t) {
410
+ Q(this, "ot");
411
+ Q(this, "wA");
412
+ Q(this, "vA");
413
+ Q(this, "ht", null);
414
+ Q(this, "ct", null);
415
+ this.wA = A, this.ot = new sA(A), this.vA = t;
416
+ }
417
+ Ct(A, t, e) {
418
+ const { shader: s } = A, i = G(this.wA) || this.wA.getParameter(this.wA.VIEWPORT);
419
+ s.JA({ k: i[2] / i[3], r: [i[2], i[3]] });
420
+ const B = (o) => {
421
+ if (!o || !o.lt()) return;
422
+ const a = o.unitGeometry, g = o.unitBuffer;
390
423
  try {
391
- this.FA.SA(s.QA, a.type + "", g, l), a.batch.WA(s), a.batch.JA(g.primitiveType, g.vertexCount);
424
+ this.ot.Bt(s.XA, o.type + "", a, g), o.batch.Dt(s), o.batch.Pt(a.ut, a.It);
392
425
  } finally {
393
- a.batch.VA(s), this.FA.TA(), a.KA();
426
+ o.batch.wt(s), this.ot.gt(), o.ft();
394
427
  }
395
428
  };
396
- let o = null, h = null;
397
- for (const a of t) {
398
- if (a.type === D.CUSTOM) {
399
- h && (Q(h), o = null, h = null), this.ZA(A, a.params, a.state, e.get(D.RECTANGLE) || null);
429
+ let r = null, n = null;
430
+ for (const o of t) {
431
+ if (o.type === D.CUSTOM) {
432
+ n && (B(n), r = null, n = null), this.dt(A, o.params, o.state, e.get(D.RECTANGLE));
400
433
  continue;
401
434
  }
402
- o !== null && a.type !== o && (Q(h), o = null, h = null);
403
- let g = h;
404
- g && a.type === o || (g = e.get(a.type) || null, h = g, o = a.type), g && g.jA(a.params, a.state);
435
+ r !== null && o.type !== r && (B(n), r = null, n = null);
436
+ let a = n;
437
+ a && o.type === r || (a = e.get(o.type) || null, n = a, r = o.type), a && a._t(o.params, o.state);
405
438
  }
406
- Q(h);
407
- }
408
- ZA(A, t, e, s) {
409
- if (!s) return;
410
- const { x: r, y: i, width: B, height: Q, shader: o, uniforms: h } = t, a = this.m;
411
- o.AA(), s.KA();
412
- const g = this.XA(Math.max(1, Math.floor(B)), Math.max(1, Math.floor(Q)));
413
- g.k(), o.AA(), h && Object.keys(h).length && o.eA(h);
414
- {
415
- const u = R(a) || a.getParameter(a.VIEWPORT);
416
- o.sA("u_aspectRatio") && o.BA("u_aspectRatio", u[2] / u[3]), o.sA("u_viewportSize") && o.BA("u_viewportSize", [u[2], u[3]]);
417
- }
418
- const l = { ...e, rotationX: 0, rotationY: 0, rotationZ: 0 };
419
- if (s.jA({ x: 0, y: 0, width: g.width, height: g.height }, l), s.HA()) {
420
- const u = s.unitGeometry, M = s.unitBuffer;
439
+ B(n);
440
+ }
441
+ dt(A, t, e, s) {
442
+ const { x: i, y: B, width: r, height: n, shader: o, uniforms: a } = t;
443
+ if (o === this.vt()) return this.yt(s, o, a, Math.floor(i), Math.floor(B), Math.max(1, Math.floor(r)), Math.max(1, Math.floor(n)), e), void A.shader.WA();
444
+ const g = this.bt(Math.max(1, Math.floor(r)), Math.max(1, Math.floor(n)));
445
+ g.begin(), this.yt(s, o, a, 0, 0, g.width, g.height, {}), g.end();
446
+ const h = this.vt(), c = { l: g.textures[0], m: g.textures[1], n: g.textures[2], o: g.textures[3], p: g.textures[4], q: [g.width, g.height] };
447
+ this.yt(s, h, c, Math.floor(i), Math.floor(B), Math.max(1, Math.floor(r)), Math.max(1, Math.floor(n)), e), A.shader.WA();
448
+ }
449
+ yt(A, t, e, s, i, B, r, n) {
450
+ t.WA(), t.JA(e);
451
+ const o = this.wA.getParameter(this.wA.VIEWPORT);
452
+ if (t.JA({ k: o[2] / o[3], r: [o[2], o[3]] }), A.ft(), A._t({ x: s, y: i, width: B, height: r }, n), A.lt()) {
453
+ const a = A.unitGeometry, g = A.unitBuffer;
421
454
  try {
422
- this.FA.SA(o.QA, s.type + "", u, M), s.batch.WA(o), s.batch.JA(u.primitiveType, u.vertexCount);
455
+ this.ot.Bt(t.XA, A.type + "", a, g), A.batch.Dt(t), A.batch.Pt(a.ut, a.It);
423
456
  } finally {
424
- s.batch.VA(o), this.FA.TA(), s.KA();
457
+ A.batch.wt(t), this.ot.gt(), A.ft();
425
458
  }
426
459
  }
427
- g.H();
428
- const c = this.NA();
429
- c.AA(), c.eA({ u_src0: g.textures[0], u_src1: g.textures[1], u_src2: g.textures[2], u_src3: g.textures[3], u_src4: g.textures[4], u_srcSize: [g.width, g.height] });
430
- const C = R(a) || a.getParameter(a.VIEWPORT);
431
- c.sA("u_aspectRatio") && c.BA("u_aspectRatio", C[2] / C[3]), c.sA("u_viewportSize") && c.BA("u_viewportSize", [C[2], C[3]]);
432
- const d = Math.floor(r), I = Math.floor(i), w = Math.max(1, Math.floor(B)), p = Math.max(1, Math.floor(Q));
433
- if (s.jA({ x: d, y: I, width: w, height: p }, e), s.HA()) {
434
- const u = s.unitGeometry, M = s.unitBuffer;
435
- try {
436
- this.FA.SA(c.QA, s.type + "", u, M), s.batch.WA(c), s.batch.JA(u.primitiveType, u.vertexCount);
437
- } finally {
438
- s.batch.VA(c), this.FA.TA(), s.KA();
439
- }
440
- }
441
- A.shader.AA();
442
460
  }
443
- NA() {
444
- return this.OA || (this.OA = new z(this.m, L, `#version 300 es
445
- precision highp float;in vec2 v_uv;uniform sampler2D u_src0;uniform sampler2D u_src1;uniform sampler2D u_src2;uniform sampler2D u_src3;uniform sampler2D u_src4;uniform vec2 u_srcSize;layout(location=0)out vec4 o_character;layout(location=1)out vec4 o_primaryColor;layout(location=2)out vec4 o_secondaryColor;layout(location=3)out vec4 o_rotation;layout(location=4)out vec4 o_transform;void main(){vec2 uvTex=v_uv*u_srcSize;vec2 uvQ=(floor(uvTex)+0.5f)/u_srcSize;o_character=texture(u_src0,uvQ);o_primaryColor=texture(u_src1,uvQ);o_secondaryColor=texture(u_src2,uvQ);o_rotation=texture(u_src3,uvQ);o_transform=texture(u_src4,uvQ);}`)), this.OA;
461
+ vt() {
462
+ return this.vA.At();
446
463
  }
447
- XA(A, t) {
448
- return this.UA && this.LA && this.LA.w === A && this.LA.h === t || (this.UA && this.UA.W(), this.UA = new U(this.m, A, t, 5), this.LA = { w: A, h: t }), this.UA;
464
+ bt(A, t) {
465
+ return this.ht && this.ct && this.ct.w === A && this.ct.h === t || (this.ht && this.ht.zA(), this.ht = new U(this.wA, A, t, 5), this.ct = { w: A, h: t }), this.ht;
449
466
  }
450
467
  }
451
- class sA {
468
+ class BA {
452
469
  constructor() {
453
- n(this, "qA", []);
454
- n(this, "At", 1);
455
- n(this, "tt", 0);
456
- }
457
- et(A) {
458
- if (this.tt >= this.qA.length) {
459
- const e = { id: this.At++, type: A, params: {}, state: { lineWeight: 1, rotationX: 0, rotationY: 0, rotationZ: 0, character: [0, 0, 0], charColor: [1, 1, 1, 1], bgColor: [0, 0, 0, 1], flipHorizontally: !1, flipVertically: !1, invert: !1, charRotation: [0, 0] } };
460
- this.qA.push(e);
470
+ Q(this, "Gt", []);
471
+ Q(this, "Mt", 1);
472
+ Q(this, "$t", 0);
473
+ }
474
+ xt(A) {
475
+ if (this.$t >= this.Gt.length) {
476
+ const e = { id: this.Mt++, type: A, params: {}, state: { V: 1, Z: 0, N: 0, X: 0, character: [0, 0, 0], charColor: [1, 1, 1, 1], bgColor: [0, 0, 0, 1], flipHorizontally: !1, flipVertically: !1, invert: !1, charRotation: [0, 0] } };
477
+ this.Gt.push(e);
461
478
  }
462
- const t = this.qA[this.tt];
463
- switch (t.id = this.At++, t.type = A, A) {
479
+ const t = this.Gt[this.$t];
480
+ switch (t.id = this.Mt++, t.type = A, A) {
464
481
  case D.RECTANGLE:
465
482
  case D.ELLIPSE:
466
483
  t.params && "width" in t.params || (t.params = { x: 0, y: 0, width: 0, height: 0 });
@@ -483,389 +500,412 @@ class sA {
483
500
  default:
484
501
  t.params || (t.params = {});
485
502
  }
486
- return this.tt++, t;
503
+ return this.$t++, t;
487
504
  }
488
- Bt(A, t, e, s, r) {
489
- const i = this.et(D.RECTANGLE);
490
- return i.params.x = A, i.params.y = t, i.params.width = e, i.params.height = s, r.dA(i.state), i.id;
505
+ Yt(A, t, e, s, i) {
506
+ const B = this.xt(D.RECTANGLE);
507
+ return B.params.x = A, B.params.y = t, B.params.width = e, B.params.height = s, i.BA(B.state), B.id;
491
508
  }
492
- st(A, t, e, s, r, i, B) {
493
- const Q = this.et(D.CUSTOM);
494
- return Q.params.x = A, Q.params.y = t, Q.params.width = e, Q.params.height = s, Q.params.shader = r, Q.params.uniforms = i, B.dA(Q.state), Q.id;
509
+ Ft(A, t, e, s, i, B, r) {
510
+ const n = this.xt(D.CUSTOM);
511
+ return n.params.x = A, n.params.y = t, n.params.width = e, n.params.height = s, n.params.shader = i, n.params.uniforms = B, r.BA(n.state), n.id;
495
512
  }
496
- it(A, t, e, s, r, i) {
497
- const B = this.et(D.LINE);
498
- return B.params.x1 = A, B.params.y1 = t, B.params.x2 = e, B.params.y2 = s, B.params.thickness = r, i.dA(B.state), B.id;
513
+ Rt(A, t, e, s, i, B) {
514
+ const r = this.xt(D.LINE);
515
+ return r.params.x1 = A, r.params.y1 = t, r.params.x2 = e, r.params.y2 = s, r.params.thickness = i, B.BA(r.state), r.id;
499
516
  }
500
- Qt(A, t, e, s, r) {
501
- const i = this.et(D.ELLIPSE);
502
- return i.params.x = A, i.params.y = t, i.params.width = e, i.params.height = s, r.dA(i.state), i.id;
517
+ St(A, t, e, s, i) {
518
+ const B = this.xt(D.ELLIPSE);
519
+ return B.params.x = A, B.params.y = t, B.params.width = e, B.params.height = s, i.BA(B.state), B.id;
503
520
  }
504
- rt(A, t, e, s, r, i, B) {
505
- const Q = this.et(D.ARC);
506
- return Q.params.x = A, Q.params.y = t, Q.params.width = e, Q.params.height = s, Q.params.start = r, Q.params.stop = i, B.dA(Q.state), Q.id;
521
+ zt(A, t, e, s, i, B, r) {
522
+ const n = this.xt(D.ARC);
523
+ return n.params.x = A, n.params.y = t, n.params.width = e, n.params.height = s, n.params.start = i, n.params.stop = B, r.BA(n.state), n.id;
507
524
  }
508
- Et(A, t, e, s, r, i, B) {
509
- const Q = this.et(D.TRIANGLE);
510
- return Q.params.x1 = A, Q.params.y1 = t, Q.params.x2 = e, Q.params.y2 = s, Q.params.x3 = r, Q.params.y3 = i, B.dA(Q.state), Q.id;
525
+ kt(A, t, e, s, i, B, r) {
526
+ const n = this.xt(D.TRIANGLE);
527
+ return n.params.x1 = A, n.params.y1 = t, n.params.x2 = e, n.params.y2 = s, n.params.x3 = i, n.params.y3 = B, r.BA(n.state), n.id;
511
528
  }
512
- nt(A, t, e, s, r, i, B, Q, o, h) {
513
- const a = this.et(D.BEZIER_CURVE);
514
- return a.params.x1 = A, a.params.y1 = t, a.params.cp1x = e, a.params.cp1y = s, a.params.cp2x = r, a.params.cp2y = i, a.params.x2 = B, a.params.y2 = Q, a.params.thickness = o, h.dA(a.state), a.id;
529
+ Ot(A, t, e, s, i, B, r, n, o, a) {
530
+ const g = this.xt(D.BEZIER_CURVE);
531
+ return g.params.x1 = A, g.params.y1 = t, g.params.cp1x = e, g.params.cp1y = s, g.params.cp2x = i, g.params.cp2y = B, g.params.x2 = r, g.params.y2 = n, g.params.thickness = o, a.BA(g.state), g.id;
515
532
  }
516
533
  get length() {
517
- return this.tt;
534
+ return this.$t;
518
535
  }
519
536
  get isEmpty() {
520
- return this.tt === 0;
537
+ return this.$t === 0;
521
538
  }
522
- ot() {
523
- this.tt = 0;
539
+ Lt() {
540
+ this.$t = 0;
524
541
  }
525
542
  [Symbol.iterator]() {
526
543
  let A = 0;
527
- const t = this.tt, e = this.qA;
544
+ const t = this.$t, e = this.Gt;
528
545
  return { next: () => A < t ? { value: e[A++], done: !1 } : { value: void 0, done: !0 } };
529
546
  }
530
547
  }
531
- const x = class x {
532
- static gt(A, t, e = 0) {
533
- var i, B, Q, o, h, a, g, l, c, C;
534
- const s = t || new Float32Array(x.FLOATS_PER_INSTANCE);
535
- let r = e;
536
- return s[r++] = A.position[0], s[r++] = A.position[1], s[r++] = A.size[0], s[r++] = A.size[1], s[r++] = A.character[0], s[r++] = A.character[1], s[r++] = A.character[2], s[r++] = A.primaryColor[0], s[r++] = A.primaryColor[1], s[r++] = A.primaryColor[2], s[r++] = A.primaryColor[3], s[r++] = A.secondaryColor[0], s[r++] = A.secondaryColor[1], s[r++] = A.secondaryColor[2], s[r++] = A.secondaryColor[3], s[r++] = A.rotation[0], s[r++] = A.rotation[1], s[r++] = A.transform[0], s[r++] = A.transform[1], s[r++] = A.transform[2], s[r++] = A.globalRotationX, s[r++] = A.globalRotationY, s[r++] = A.globalRotationZ, s[r++] = A.rotationCenter[0], s[r++] = A.rotationCenter[1], s[r++] = ((i = A.arcAngles) == null ? void 0 : i[0]) || 0, s[r++] = ((B = A.arcAngles) == null ? void 0 : B[1]) || 0, s[r++] = ((Q = A.bezierControlPoint1) == null ? void 0 : Q[0]) || 0, s[r++] = ((o = A.bezierControlPoint1) == null ? void 0 : o[1]) || 0, s[r++] = ((h = A.bezierControlPoint2) == null ? void 0 : h[0]) || 0, s[r++] = ((a = A.bezierControlPoint2) == null ? void 0 : a[1]) || 0, s[r++] = ((g = A.bezierStartPoint) == null ? void 0 : g[0]) || 0, s[r++] = ((l = A.bezierStartPoint) == null ? void 0 : l[1]) || 0, s[r++] = ((c = A.bezierEndPoint) == null ? void 0 : c[0]) || 0, s[r++] = ((C = A.bezierEndPoint) == null ? void 0 : C[1]) || 0, s;
537
- }
538
- static ht(A) {
539
- const t = A.length * x.FLOATS_PER_INSTANCE, e = new Float32Array(t);
548
+ const y = class y {
549
+ static Ut(A, t, e = 0) {
550
+ var B, r, n, o, a, g, h, c, l, C;
551
+ const s = t || new Float32Array(y.FLOATS_PER_INSTANCE);
552
+ let i = e;
553
+ return s[i++] = A.position[0], s[i++] = A.position[1], s[i++] = A.size[0], s[i++] = A.size[1], s[i++] = A.AA[0], s[i++] = A.AA[1], s[i++] = A.AA[2], s[i++] = A.primaryColor[0], s[i++] = A.primaryColor[1], s[i++] = A.primaryColor[2], s[i++] = A.primaryColor[3], s[i++] = A.secondaryColor[0], s[i++] = A.secondaryColor[1], s[i++] = A.secondaryColor[2], s[i++] = A.secondaryColor[3], s[i++] = A.rotation[0], s[i++] = A.rotation[1], s[i++] = A.transform[0], s[i++] = A.transform[1], s[i++] = A.transform[2], s[i++] = A.globalRotationX, s[i++] = A.globalRotationY, s[i++] = A.globalRotationZ, s[i++] = A.rotationCenter[0], s[i++] = A.rotationCenter[1], s[i++] = ((B = A.arcAngles) == null ? void 0 : B[0]) || 0, s[i++] = ((r = A.arcAngles) == null ? void 0 : r[1]) || 0, s[i++] = ((n = A.bezierControlPoint1) == null ? void 0 : n[0]) || 0, s[i++] = ((o = A.bezierControlPoint1) == null ? void 0 : o[1]) || 0, s[i++] = ((a = A.bezierControlPoint2) == null ? void 0 : a[0]) || 0, s[i++] = ((g = A.bezierControlPoint2) == null ? void 0 : g[1]) || 0, s[i++] = ((h = A.bezierStartPoint) == null ? void 0 : h[0]) || 0, s[i++] = ((c = A.bezierStartPoint) == null ? void 0 : c[1]) || 0, s[i++] = ((l = A.bezierEndPoint) == null ? void 0 : l[0]) || 0, s[i++] = ((C = A.bezierEndPoint) == null ? void 0 : C[1]) || 0, s;
554
+ }
555
+ static Tt(A) {
556
+ const t = A.length * y.FLOATS_PER_INSTANCE, e = new Float32Array(t);
540
557
  for (let s = 0; s < A.length; s++) {
541
- const r = s * x.FLOATS_PER_INSTANCE;
542
- x.gt(A[s], e, r);
558
+ const i = s * y.FLOATS_PER_INSTANCE;
559
+ y.Ut(A[s], e, i);
543
560
  }
544
561
  return e;
545
562
  }
546
563
  };
547
- n(x, "BYTES_PER_INSTANCE", 140), n(x, "FLOATS_PER_INSTANCE", 35);
548
- let b = x;
564
+ Q(y, "BYTES_PER_INSTANCE", 140), Q(y, "FLOATS_PER_INSTANCE", 35);
565
+ let x = y;
549
566
  const P = class P {
550
567
  };
551
- n(P, "STRIDE", b.BYTES_PER_INSTANCE), n(P, "ATTRIBUTES", { a_instancePosition: { location: -1, size: 2, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 0, divisor: 1 }, a_instanceSize: { location: -1, size: 2, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 8, divisor: 1 }, a_instanceCharacter: { location: -1, size: 3, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 16, divisor: 1 }, a_instancePrimaryColor: { location: -1, size: 4, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 28, divisor: 1 }, a_instanceSecondaryColor: { location: -1, size: 4, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 44, divisor: 1 }, a_instanceRotation: { location: -1, size: 2, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 60, divisor: 1 }, a_instanceTransform: { location: -1, size: 3, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 68, divisor: 1 }, a_instanceGlobalRotation: { location: -1, size: 3, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 80, divisor: 1 }, a_instanceRotationCenter: { location: -1, size: 2, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 92, divisor: 1 }, a_instanceArcAngles: { location: -1, size: 2, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 100, divisor: 1 }, a_instanceBezierCP1: { location: -1, size: 2, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 108, divisor: 1 }, a_instanceBezierCP2: { location: -1, size: 2, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 116, divisor: 1 }, a_instanceBezierStart: { location: -1, size: 2, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 124, divisor: 1 }, a_instanceBezierEnd: { location: -1, size: 2, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 132, divisor: 1 } });
568
+ Q(P, "STRIDE", x.BYTES_PER_INSTANCE), Q(P, "ATTRIBUTES", { a_instancePosition: { location: -1, size: 2, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 0, divisor: 1 }, a_instanceSize: { location: -1, size: 2, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 8, divisor: 1 }, a_instanceCharacter: { location: -1, size: 3, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 16, divisor: 1 }, a_instancePrimaryColor: { location: -1, size: 4, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 28, divisor: 1 }, a_instanceSecondaryColor: { location: -1, size: 4, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 44, divisor: 1 }, a_instanceRotation: { location: -1, size: 2, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 60, divisor: 1 }, a_instanceTransform: { location: -1, size: 3, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 68, divisor: 1 }, a_instanceGlobalRotation: { location: -1, size: 3, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 80, divisor: 1 }, a_instanceRotationCenter: { location: -1, size: 2, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 92, divisor: 1 }, a_instanceArcAngles: { location: -1, size: 2, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 100, divisor: 1 }, a_instanceBezierCP1: { location: -1, size: 2, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 108, divisor: 1 }, a_instanceBezierCP2: { location: -1, size: 2, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 116, divisor: 1 }, a_instanceBezierStart: { location: -1, size: 2, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 124, divisor: 1 }, a_instanceBezierEnd: { location: -1, size: 2, type: WebGL2RenderingContext.FLOAT, normalized: !1, stride: P.STRIDE, offset: 132, divisor: 1 } });
552
569
  let Y = P;
553
570
  class rA {
554
571
  constructor(A, t = 1e3, e = 1.5) {
555
- n(this, "m");
556
- n(this, "ct", []);
557
- n(this, "Ct");
558
- n(this, "Dt");
559
- n(this, "lt", null);
560
- n(this, "Pt", !0);
561
- n(this, "ut", 0);
562
- n(this, "It", /* @__PURE__ */ new Map());
563
- n(this, "wt", null);
564
- this.m = A, this.Ct = t, this.Dt = e, this.ft();
565
- }
566
- jA(A) {
567
- const t = this.ct.length;
568
- return this.ct.push(A), this.Pt = !0, t;
572
+ Q(this, "wA");
573
+ Q(this, "Ht", []);
574
+ Q(this, "Wt");
575
+ Q(this, "Kt");
576
+ Q(this, "Jt", null);
577
+ Q(this, "Vt", !0);
578
+ Q(this, "Zt", 0);
579
+ Q(this, "Nt", /* @__PURE__ */ new Map());
580
+ Q(this, "Xt", null);
581
+ this.wA = A, this.Wt = t, this.Kt = e, this.jt();
582
+ }
583
+ _t(A) {
584
+ const t = this.Ht.length;
585
+ return this.Ht.push(A), this.Vt = !0, t;
569
586
  }
570
587
  get count() {
571
- return this.ct.length;
588
+ return this.Ht.length;
572
589
  }
573
590
  get isEmpty() {
574
- return this.ct.length === 0;
591
+ return this.Ht.length === 0;
575
592
  }
576
593
  clear() {
577
- this.ct.length = 0, this.Pt = !0;
578
- }
579
- dt(A) {
580
- if (A <= this.Ct) return;
581
- const t = Math.ceil(A * this.Dt);
582
- this.Ct = t, this.ft();
583
- }
584
- ft() {
585
- const A = this.m;
586
- this.lt && A.deleteBuffer(this.lt), this.lt = A.createBuffer();
587
- const t = this.Ct * b.BYTES_PER_INSTANCE;
588
- A.bindBuffer(A.ARRAY_BUFFER, this.lt), A.bufferData(A.ARRAY_BUFFER, t, A.DYNAMIC_DRAW), A.bindBuffer(A.ARRAY_BUFFER, null), this.Pt = !0, this.ut = 0;
589
- }
590
- _t() {
591
- if (!this.Pt || this.ct.length === 0) return;
592
- const A = this.m, t = this.ct.length;
593
- this.dt(t), (!this.wt || this.wt.length < t * b.FLOATS_PER_INSTANCE) && (this.wt = new Float32Array(t * b.FLOATS_PER_INSTANCE));
594
- const e = b.ht(this.ct);
595
- A.bindBuffer(A.ARRAY_BUFFER, this.lt), t <= this.ut ? A.bufferSubData(A.ARRAY_BUFFER, 0, e) : A.bufferData(A.ARRAY_BUFFER, e, A.DYNAMIC_DRAW), A.bindBuffer(A.ARRAY_BUFFER, null), this.Pt = !1, this.ut = t;
596
- }
597
- vt(A) {
598
- let t = this.It.get(A);
594
+ this.Ht.length = 0, this.Vt = !0;
595
+ }
596
+ qt(A) {
597
+ if (A <= this.Wt) return;
598
+ const t = Math.ceil(A * this.Kt);
599
+ this.Wt = t, this.jt();
600
+ }
601
+ jt() {
602
+ const A = this.wA;
603
+ this.Jt && A.deleteBuffer(this.Jt), this.Jt = A.createBuffer();
604
+ const t = this.Wt * x.BYTES_PER_INSTANCE;
605
+ A.bindBuffer(A.ARRAY_BUFFER, this.Jt), A.bufferData(A.ARRAY_BUFFER, t, A.DYNAMIC_DRAW), A.bindBuffer(A.ARRAY_BUFFER, null), this.Vt = !0, this.Zt = 0;
606
+ }
607
+ Ae() {
608
+ if (!this.Vt || this.Ht.length === 0) return;
609
+ const A = this.wA, t = this.Ht.length;
610
+ this.qt(t), (!this.Xt || this.Xt.length < t * x.FLOATS_PER_INSTANCE) && (this.Xt = new Float32Array(t * x.FLOATS_PER_INSTANCE));
611
+ const e = x.Tt(this.Ht);
612
+ A.bindBuffer(A.ARRAY_BUFFER, this.Jt), t <= this.Zt ? A.bufferSubData(A.ARRAY_BUFFER, 0, e) : A.bufferData(A.ARRAY_BUFFER, e, A.DYNAMIC_DRAW), A.bindBuffer(A.ARRAY_BUFFER, null), this.Vt = !1, this.Zt = t;
613
+ }
614
+ te(A) {
615
+ let t = this.Nt.get(A);
599
616
  if (!t) {
600
617
  t = /* @__PURE__ */ new Map();
601
- const e = this.m;
618
+ const e = this.wA;
602
619
  for (const s in Y.ATTRIBUTES) {
603
- const r = e.getAttribLocation(A, s);
604
- r !== -1 && t.set(s, r);
620
+ const i = e.getAttribLocation(A, s);
621
+ i !== -1 && t.set(s, i);
605
622
  }
606
- this.It.set(A, t);
623
+ this.Nt.set(A, t);
607
624
  }
608
625
  return t;
609
626
  }
610
- WA(A) {
611
- if (!this.lt || this.ct.length === 0) return;
612
- const t = this.m, e = A.QA;
613
- this._t();
614
- const s = this.vt(e);
615
- t.bindBuffer(t.ARRAY_BUFFER, this.lt);
616
- for (const [r, i] of s) {
617
- const B = Y.ATTRIBUTES[r];
618
- B && (t.enableVertexAttribArray(i), t.vertexAttribPointer(i, B.size, B.type, B.normalized, B.stride, B.offset), t.vertexAttribDivisor(i, B.divisor));
627
+ Dt(A) {
628
+ if (!this.Jt || this.Ht.length === 0) return;
629
+ const t = this.wA, e = A.XA;
630
+ this.Ae();
631
+ const s = this.te(e);
632
+ t.bindBuffer(t.ARRAY_BUFFER, this.Jt);
633
+ for (const [i, B] of s) {
634
+ const r = Y.ATTRIBUTES[i];
635
+ r && (t.enableVertexAttribArray(B), t.vertexAttribPointer(B, r.size, r.type, r.normalized, r.stride, r.offset), t.vertexAttribDivisor(B, r.divisor));
619
636
  }
620
637
  }
621
- VA(A) {
622
- const t = this.m, e = this.vt(A.QA);
638
+ wt(A) {
639
+ const t = this.wA, e = this.te(A.XA);
623
640
  for (const [, s] of e) t.disableVertexAttribArray(s), t.vertexAttribDivisor(s, 0);
624
641
  }
625
- JA(A, t) {
626
- this.ct.length !== 0 && this.m.drawArraysInstanced(A, 0, t, this.ct.length);
642
+ Pt(A, t) {
643
+ this.Ht.length !== 0 && this.wA.drawArraysInstanced(A, 0, t, this.Ht.length);
627
644
  }
628
- W() {
629
- const A = this.m;
630
- this.lt && (A.deleteBuffer(this.lt), this.lt = null), this.ct.length = 0, this.It.clear(), this.wt = null;
645
+ zA() {
646
+ const A = this.wA;
647
+ this.Jt && (A.deleteBuffer(this.Jt), this.Jt = null), this.Ht.length = 0, this.Nt.clear(), this.Xt = null;
631
648
  }
632
649
  }
633
- class T {
650
+ class b {
634
651
  constructor(A, t, e, s) {
635
- n(this, "m");
636
- n(this, "xt");
637
- n(this, "yt");
638
- n(this, "bt");
639
- n(this, "Gt", null);
640
- this.m = A, this.xt = t, this.yt = e, this.bt = s;
641
- const r = this.m.createBuffer();
642
- if (!r) throw Error("Failed to create unit geometry buffer");
643
- this.m.bindBuffer(this.m.ARRAY_BUFFER, r), this.m.bufferData(this.m.ARRAY_BUFFER, this.bt.vertices, this.m.STATIC_DRAW), this.m.bindBuffer(this.m.ARRAY_BUFFER, null), this.Gt = r;
652
+ Q(this, "wA");
653
+ Q(this, "ee");
654
+ Q(this, "se");
655
+ Q(this, "ie");
656
+ Q(this, "Be", null);
657
+ this.wA = A, this.ee = t, this.se = e, this.ie = s;
658
+ const i = this.wA.createBuffer();
659
+ if (!i) throw Error("Failed to create unit geometry buffer");
660
+ this.wA.bindBuffer(this.wA.ARRAY_BUFFER, i), this.wA.bufferData(this.wA.ARRAY_BUFFER, this.ie.Qe, this.wA.STATIC_DRAW), this.wA.bindBuffer(this.wA.ARRAY_BUFFER, null), this.Be = i;
644
661
  }
645
662
  get type() {
646
- return this.yt;
663
+ return this.se;
647
664
  }
648
665
  get unitGeometry() {
649
- return this.bt;
666
+ return this.ie;
650
667
  }
651
668
  get unitBuffer() {
652
- return this.Gt;
669
+ return this.Be;
653
670
  }
654
671
  get batch() {
655
- return this.xt;
672
+ return this.ee;
656
673
  }
657
- KA() {
658
- this.xt.clear();
674
+ ft() {
675
+ this.ee.clear();
659
676
  }
660
- HA() {
661
- return !this.xt.isEmpty;
677
+ lt() {
678
+ return !this.ee.isEmpty;
662
679
  }
663
- W() {
664
- this.xt.W(), this.Gt && (this.m.deleteBuffer(this.Gt), this.Gt = null);
680
+ zA() {
681
+ this.ee.zA(), this.Be && (this.wA.deleteBuffer(this.Be), this.Be = null);
665
682
  }
666
- $t(A, t, e, s, r) {
667
- const i = this.Mt(A, t, e, s, r.rotationX || 0, r.rotationY || 0, r.rotationZ || 0);
668
- return { position: [A, t], size: [e, s], character: r.character || [0, 0, 0], primaryColor: r.charColor || [1, 1, 1, 1], secondaryColor: r.bgColor || [0, 0, 0, 1], rotation: r.charRotation || [0, 0], transform: [r.invert ? 1 : 0, r.flipHorizontally ? 1 : 0, r.flipVertically ? 1 : 0], globalRotationX: i.radiansX, globalRotationY: i.radiansY, globalRotationZ: i.radiansZ, rotationCenter: [i.centerX, i.centerY] };
683
+ Ee(A, t, e, s, i) {
684
+ const B = this.re(A, t, e, s, i.rotationX || 0, i.rotationY || 0, i.rotationZ || 0);
685
+ return { position: [A, t], size: [e, s], AA: i.character || [0, 0, 0], primaryColor: i.charColor || [1, 1, 1, 1], secondaryColor: i.bgColor || [0, 0, 0, 1], rotation: i.charRotation || [0, 0], transform: [i.invert ? 1 : 0, i.flipHorizontally ? 1 : 0, i.flipVertically ? 1 : 0], globalRotationX: B.radiansX, globalRotationY: B.radiansY, globalRotationZ: B.radiansZ, rotationCenter: [B.centerX, B.centerY] };
669
686
  }
670
- Yt(A, t) {
671
- const e = R(this.m) || [0, 0, this.m.canvas.width, this.m.canvas.height];
687
+ ne(A, t) {
688
+ const e = G(this.wA) || [0, 0, this.wA.canvas.width, this.wA.canvas.height];
672
689
  return { nx: A / e[2] * 2 - 1, ny: 1 - t / e[3] * 2 };
673
690
  }
674
- zt(A, t, e) {
675
- const s = this.Yt(t, e);
691
+ ge(A, t, e) {
692
+ const s = this.ne(t, e);
676
693
  A.rotationCenter = [s.nx, s.ny];
677
694
  }
678
- Mt(A, t, e, s, r, i, B) {
679
- const Q = R(this.m) || [0, 0, this.m.canvas.width, this.m.canvas.height], o = Q[2], h = Q[3];
680
- return { centerX: (A + e / 2) / o * 2 - 1, centerY: 1 - (t + s / 2) / h * 2, radiansX: -r * Math.PI / 180, radiansY: -i * Math.PI / 180, radiansZ: -B * Math.PI / 180, aspectRatio: o / h };
695
+ re(A, t, e, s, i, B, r) {
696
+ const n = G(this.wA) || [0, 0, this.wA.canvas.width, this.wA.canvas.height], o = n[2], a = n[3];
697
+ return { centerX: (A + e / 2) / o * 2 - 1, centerY: 1 - (t + s / 2) / a * 2, radiansX: -i * Math.PI / 180, radiansY: -B * Math.PI / 180, radiansZ: -r * Math.PI / 180, aspectRatio: o / a };
681
698
  }
682
699
  }
683
- const iA = { vertices: new Float32Array([0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1]), vertexCount: 6, primitiveType: WebGL2RenderingContext.TRIANGLES, stride: 16, attributes: { position: { size: 2, offset: 0 }, texCoord: { size: 2, offset: 8 } } };
684
- class BA extends T {
700
+ const EA = { Qe: new Float32Array([0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1]), It: 6, ut: WebGL2RenderingContext.TRIANGLES, rt: 16, Et: { Qt: { size: 2, offset: 0 }, nt: { size: 2, offset: 8 } } };
701
+ class QA extends b {
685
702
  constructor(A, t) {
686
- super(A, t, D.RECTANGLE, iA);
703
+ super(A, t, D.RECTANGLE, EA);
687
704
  }
688
- jA(A, t) {
689
- const e = this.$t(A.x, A.y, A.width, A.height, t);
690
- return this.xt.jA(e);
705
+ _t(A, t) {
706
+ const e = this.Ee(A.x, A.y, A.width, A.height, t);
707
+ return this.ee._t(e);
691
708
  }
692
709
  }
693
- const EA = { vertices: new Float32Array([0, -0.5, 0, 0, 1, -0.5, 1, 0, 0, 0.5, 0, 1, 0, 0.5, 0, 1, 1, -0.5, 1, 0, 1, 0.5, 1, 1]), vertexCount: 6, primitiveType: WebGL2RenderingContext.TRIANGLES, stride: 16, attributes: { position: { size: 2, offset: 0 }, texCoord: { size: 2, offset: 8 } } };
694
- class QA extends T {
710
+ const nA = { Qe: new Float32Array([0, -0.5, 0, 0, 1, -0.5, 1, 0, 0, 0.5, 0, 1, 0, 0.5, 0, 1, 1, -0.5, 1, 0, 1, 0.5, 1, 1]), It: 6, ut: WebGL2RenderingContext.TRIANGLES, rt: 16, Et: { Qt: { size: 2, offset: 0 }, nt: { size: 2, offset: 8 } } };
711
+ class oA extends b {
695
712
  constructor(A, t) {
696
- super(A, t, D.LINE, EA);
713
+ super(A, t, D.LINE, nA);
697
714
  }
698
- jA(A, t) {
699
- const e = A.x2 - A.x1, s = A.y2 - A.y1, r = Math.hypot(e, s), i = Math.atan2(s, e), B = A.thickness || t.lineWeight || 1, Q = A.x1 + e / 2, o = A.y1 + s / 2, h = Q - r / 2, a = o, g = { character: t.character, charColor: t.charColor, bgColor: t.bgColor, charRotation: t.charRotation, flipHorizontally: t.flipHorizontally, flipVertically: t.flipVertically, invert: t.invert, rotationX: t.rotationX || 0, rotationY: t.rotationY || 0, rotationZ: (t.rotationZ || 0) + 180 * i / Math.PI, lineWeight: B }, l = this.$t(h, a, r, B, g);
700
- return this.zt(l, Q, o), this.xt.jA(l);
715
+ _t(A, t) {
716
+ const e = A.x2 - A.x1, s = A.y2 - A.y1, i = Math.hypot(e, s), B = Math.atan2(s, e), r = A.thickness || t.lineWeight || 1, n = A.x1 + e / 2, o = A.y1 + s / 2, a = n - i / 2, g = o, h = { character: t.character, charColor: t.charColor, bgColor: t.bgColor, charRotation: t.charRotation, flipHorizontally: t.flipHorizontally, flipVertically: t.flipVertically, invert: t.invert, rotationX: t.rotationX || 0, rotationY: t.rotationY || 0, rotationZ: (t.rotationZ || 0) + 180 * B / Math.PI, lineWeight: r }, c = this.Ee(a, g, i, r, h);
717
+ return this.ge(c, n, o), this.ee._t(c);
701
718
  }
702
719
  }
703
- const nA = { vertices: function(E = 32) {
720
+ const gA = { Qe: function(E = 32) {
704
721
  const A = [], t = 2 * Math.PI / E;
705
722
  for (let e = 0; e < E; e++) {
706
- const s = e * t, r = (e + 1) % E * t, i = Math.cos(s), B = Math.sin(s), Q = 0.5 * (i + 1), o = 0.5 * (B + 1), h = Math.cos(r), a = Math.sin(r), g = 0.5 * (h + 1), l = 0.5 * (a + 1);
707
- A.push(0, 0, 0.5, 0.5, i, B, Q, o, h, a, g, l);
723
+ const s = e * t, i = (e + 1) % E * t, B = Math.cos(s), r = Math.sin(s), n = 0.5 * (B + 1), o = 0.5 * (r + 1), a = Math.cos(i), g = Math.sin(i), h = 0.5 * (a + 1), c = 0.5 * (g + 1);
724
+ A.push(0, 0, 0.5, 0.5, B, r, n, o, a, g, h, c);
708
725
  }
709
726
  return new Float32Array(A);
710
- }(32), vertexCount: 96, primitiveType: WebGL2RenderingContext.TRIANGLES, stride: 16, attributes: { position: { size: 2, offset: 0 }, texCoord: { size: 2, offset: 8 } } };
711
- class oA extends T {
727
+ }(32), It: 96, ut: WebGL2RenderingContext.TRIANGLES, rt: 16, Et: { Qt: { size: 2, offset: 0 }, nt: { size: 2, offset: 8 } } };
728
+ class aA extends b {
712
729
  constructor(A, t) {
713
- super(A, t, D.ELLIPSE, nA);
730
+ super(A, t, D.ELLIPSE, gA);
714
731
  }
715
- jA(A, t) {
716
- const e = this.$t(A.x, A.y, A.width, A.height, t);
717
- return this.zt(e, A.x, A.y), this.xt.jA(e);
732
+ _t(A, t) {
733
+ const e = this.Ee(A.x, A.y, A.width, A.height, t);
734
+ return this.ge(e, A.x, A.y), this.ee._t(e);
718
735
  }
719
736
  }
720
- let aA = { vertices: function(E) {
737
+ let hA = { Qe: function(E) {
721
738
  const A = [];
722
739
  for (let t = 0; t < E; t++) {
723
740
  const e = t / E, s = (t + 1) / E;
724
741
  A.push(e, 0, e, 0, e, 1, e, 1, s, 1, s, 1);
725
742
  }
726
743
  return new Float32Array(A);
727
- }(32), vertexCount: 96, primitiveType: WebGL2RenderingContext.TRIANGLES, stride: 16, attributes: { position: { size: 2, offset: 0 }, texCoord: { size: 2, offset: 8 } } };
728
- class gA extends T {
744
+ }(32), It: 96, ut: WebGL2RenderingContext.TRIANGLES, rt: 16, Et: { Qt: { size: 2, offset: 0 }, nt: { size: 2, offset: 8 } } };
745
+ class cA extends b {
729
746
  constructor(A, t) {
730
- super(A, t, D.ARC, aA);
747
+ super(A, t, D.ARC, hA);
731
748
  }
732
- jA(A, t) {
733
- const e = A.x - A.width / 2, s = A.y - A.height / 2, r = A.start * Math.PI / 180, i = A.stop * Math.PI / 180, B = this.$t(e, s, A.width, A.height, t);
734
- return this.zt(B, A.x, A.y), B.arcAngles = [r, i], this.xt.jA(B);
749
+ _t(A, t) {
750
+ const e = A.x - A.width / 2, s = A.y - A.height / 2, i = A.start * Math.PI / 180, B = A.stop * Math.PI / 180, r = this.Ee(e, s, A.width, A.height, t);
751
+ return this.ge(r, A.x, A.y), r.arcAngles = [i, B], this.ee._t(r);
735
752
  }
736
753
  }
737
- const hA = { vertices: new Float32Array([0, 0, 0, 0, 1, 0, 1, 0, 0.5, 1, 0.5, 1]), vertexCount: 3, primitiveType: WebGL2RenderingContext.TRIANGLES, stride: 16, attributes: { position: { size: 2, offset: 0 }, texCoord: { size: 2, offset: 8 } } };
738
- class cA extends T {
754
+ const lA = { Qe: new Float32Array([0, 0, 0, 0, 1, 0, 1, 0, 0.5, 1, 0.5, 1]), It: 3, ut: WebGL2RenderingContext.TRIANGLES, rt: 16, Et: { Qt: { size: 2, offset: 0 }, nt: { size: 2, offset: 8 } } };
755
+ class CA extends b {
739
756
  constructor(A, t) {
740
- super(A, t, D.TRIANGLE, hA);
757
+ super(A, t, D.TRIANGLE, lA);
741
758
  }
742
- jA(A, t) {
743
- const e = Math.min(A.x1, A.x2, A.x3), s = Math.max(A.x1, A.x2, A.x3), r = Math.min(A.y1, A.y2, A.y3), i = s - e, B = Math.max(A.y1, A.y2, A.y3) - r, Q = this.$t(e, r, i, B, t), o = e + 0.5 * i, h = r + B * (1 / 3);
744
- return this.zt(Q, o, h), this.xt.jA(Q);
759
+ _t(A, t) {
760
+ const e = Math.min(A.x1, A.x2, A.x3), s = Math.max(A.x1, A.x2, A.x3), i = Math.min(A.y1, A.y2, A.y3), B = s - e, r = Math.max(A.y1, A.y2, A.y3) - i, n = this.Ee(e, i, B, r, t), o = e + 0.5 * B, a = i + r * (1 / 3);
761
+ return this.ge(n, o, a), this.ee._t(n);
745
762
  }
746
763
  }
747
- function k(E, A, t, e, s) {
748
- const r = 1 - E, i = r * r, B = E * E;
749
- return i * r * A + 3 * i * E * t + 3 * r * B * e + B * E * s;
764
+ function H(E, A, t, e, s) {
765
+ const i = 1 - E, B = i * i, r = E * E;
766
+ return B * i * A + 3 * B * E * t + 3 * i * r * e + r * E * s;
750
767
  }
751
- const lA = { vertices: function(E = 16) {
768
+ const DA = { Qe: function(E = 16) {
752
769
  const A = [];
753
770
  for (let t = 0; t < E; t++) {
754
771
  const e = t / E, s = (t + 1) / E;
755
772
  A.push(e, -0.5, e, 0), A.push(s, -0.5, s, 0), A.push(e, 0.5, e, 1), A.push(e, 0.5, e, 1), A.push(s, -0.5, s, 0), A.push(s, 0.5, s, 1);
756
773
  }
757
774
  return new Float32Array(A);
758
- }(16), vertexCount: 96, primitiveType: WebGL2RenderingContext.TRIANGLES, stride: 16, attributes: { position: { size: 2, offset: 0 }, texCoord: { size: 2, offset: 8 } } };
759
- class CA extends T {
775
+ }(16), It: 96, ut: WebGL2RenderingContext.TRIANGLES, rt: 16, Et: { Qt: { size: 2, offset: 0 }, nt: { size: 2, offset: 8 } } };
776
+ class PA extends b {
760
777
  constructor(A, t) {
761
- super(A, t, D.BEZIER_CURVE, lA);
778
+ super(A, t, D.BEZIER_CURVE, DA);
762
779
  }
763
- jA(A, t) {
764
- const e = t.lineWeight || 1, s = k(0.5, A.x1, A.cp1x, A.cp2x, A.x2), r = k(0.5, A.y1, A.cp1y, A.cp2y, A.y2), i = { character: t.character, charColor: t.charColor, bgColor: t.bgColor, charRotation: t.charRotation, flipHorizontally: t.flipHorizontally, flipVertically: t.flipVertically, invert: t.invert, rotationX: t.rotationX || 0, rotationY: t.rotationY || 0, rotationZ: t.rotationZ || 0, lineWeight: e }, B = this.$t(0, 0, 1, e, i);
765
- return this.zt(B, s, r), B.bezierStartPoint = [A.x1, A.y1], B.bezierControlPoint1 = [A.cp1x, A.cp1y], B.bezierControlPoint2 = [A.cp2x, A.cp2y], B.bezierEndPoint = [A.x2, A.y2], this.xt.jA(B);
780
+ _t(A, t) {
781
+ const e = t.lineWeight || 1, s = H(0.5, A.x1, A.cp1x, A.cp2x, A.x2), i = H(0.5, A.y1, A.cp1y, A.cp2y, A.y2), B = { character: t.character, charColor: t.charColor, bgColor: t.bgColor, charRotation: t.charRotation, flipHorizontally: t.flipHorizontally, flipVertically: t.flipVertically, invert: t.invert, rotationX: t.rotationX || 0, rotationY: t.rotationY || 0, rotationZ: t.rotationZ || 0, lineWeight: e }, r = this.Ee(0, 0, 1, e, B);
782
+ return this.ge(r, s, i), r.bezierStartPoint = [A.x1, A.y1], r.bezierControlPoint1 = [A.cp1x, A.cp1y], r.bezierControlPoint2 = [A.cp2x, A.cp2y], r.bezierEndPoint = [A.x2, A.y2], this.ee._t(r);
766
783
  }
767
784
  }
768
- class DA {
785
+ class uA {
769
786
  constructor(A) {
770
- n(this, "m");
771
- n(this, "Rt", null);
772
- n(this, "St", null);
773
- n(this, "Tt", {});
774
- n(this, "Ft", null);
775
- n(this, "Ot", /* @__PURE__ */ new Map());
776
- n(this, "Ut");
777
- n(this, "Lt");
778
- n(this, "kt");
779
- this.m = A, this.kt = new AA(), this.Ut = new eA(A), this.Lt = new sA(), this.Ft = A.createBuffer(), G(this.m, [0, 0, this.m.canvas.width, this.m.canvas.height]);
780
- }
781
- Ht(A) {
782
- let t = this.Ot.get(A);
787
+ Q(this, "wA");
788
+ Q(this, "oe", null);
789
+ Q(this, "ae");
790
+ Q(this, "he", null);
791
+ Q(this, "ce", {});
792
+ Q(this, "Ce", null);
793
+ Q(this, "le", /* @__PURE__ */ new Map());
794
+ Q(this, "De");
795
+ Q(this, "Pe");
796
+ Q(this, "ue");
797
+ Q(this, "K", []);
798
+ this.wA = A, this.ae = new eA(A), this.ue = new V(), this.De = new iA(A, this), this.Pe = new BA(), this.Ce = A.createBuffer(), F(this.wA, [0, 0, this.wA.canvas.width, this.wA.canvas.height]);
799
+ }
800
+ Ie(A) {
801
+ let t = this.le.get(A);
783
802
  if (t) return t;
784
- const e = new rA(this.m);
785
- return t = (0, { [D.RECTANGLE]: () => new BA(this.m, e), [D.LINE]: () => new QA(this.m, e), [D.ELLIPSE]: () => new oA(this.m, e), [D.ARC]: () => new gA(this.m, e), [D.TRIANGLE]: () => new cA(this.m, e), [D.BEZIER_CURVE]: () => new CA(this.m, e) }[A])(), this.Ot.set(A, t), t;
803
+ const e = new rA(this.wA);
804
+ return t = (0, { [D.RECTANGLE]: () => new QA(this.wA, e), [D.LINE]: () => new oA(this.wA, e), [D.ELLIPSE]: () => new aA(this.wA, e), [D.ARC]: () => new cA(this.wA, e), [D.TRIANGLE]: () => new CA(this.wA, e), [D.BEZIER_CURVE]: () => new PA(this.wA, e) }[A])(), this.le.set(A, t), t;
786
805
  }
787
- Wt(A) {
788
- this.Rt !== A && (this.Rt = A, A.AA());
806
+ we(A) {
807
+ this.oe !== A && (this.oe = A, A.WA());
789
808
  }
790
- Jt(A, t) {
791
- return new z(this.m, A, t);
809
+ fe(A, t) {
810
+ return this.ae.st(A, t);
792
811
  }
793
- Vt(A) {
794
- this.St = A, A && (this.Tt = {});
812
+ At() {
813
+ return this.ae.At();
795
814
  }
796
- Kt(A, t) {
797
- this.Tt[A] = t;
815
+ YA() {
816
+ return this.ae.YA();
798
817
  }
799
- Zt(A) {
800
- Object.assign(this.Tt, A);
818
+ tt() {
819
+ return this.ae.tt();
801
820
  }
802
- jt(A) {
803
- return new z(this.m, L, A);
821
+ de(A) {
822
+ this.he = A, A && (this.ce = {});
823
+ }
824
+ VA(A, t) {
825
+ this.ce[A] = t;
826
+ }
827
+ _e(A) {
828
+ Object.assign(this.ce, A);
829
+ }
830
+ et(A) {
831
+ return this.ae.et(A);
832
+ }
833
+ pe(A, t, e, s, i) {
834
+ const B = this.At(), r = { l: A.textures[0], m: A.textures[1], n: A.textures[2], o: A.textures[3], p: A.textures[4], q: [A.width, A.height] };
835
+ this.Pe.Ft(t, e, s, i, B, r, this.ue);
804
836
  }
805
- Xt(A, t, e, s) {
837
+ me(A, t, e, s) {
806
838
  var C;
807
- const r = this.m, i = r.canvas.width, B = r.canvas.height, Q = A / i * 2 - 1, o = (A + e) / i * 2 - 1, h = 1 - t / B * 2, a = 1 - (t + s) / B * 2, g = new Float32Array([Q, a, o, a, Q, h, o, a, o, h, Q, h]);
808
- r.bindBuffer(r.ARRAY_BUFFER, this.Ft), r.bufferData(r.ARRAY_BUFFER, g, r.DYNAMIC_DRAW);
809
- const l = ((C = this.Rt) == null ? void 0 : C.QA) || r.getParameter(r.CURRENT_PROGRAM), c = l ? r.getAttribLocation(l, "a_position") : -1;
810
- c !== -1 && (r.enableVertexAttribArray(c), r.vertexAttribPointer(c, 2, r.FLOAT, !1, 8, 0)), r.drawArrays(r.TRIANGLES, 0, 6), c !== -1 && r.disableVertexAttribArray(c);
839
+ const i = this.wA, B = i.canvas.width, r = i.canvas.height, n = A / B * 2 - 1, o = (A + e) / B * 2 - 1, a = 1 - t / r * 2, g = 1 - (t + s) / r * 2, h = new Float32Array([n, g, o, g, n, a, o, g, o, a, n, a]);
840
+ i.bindBuffer(i.ARRAY_BUFFER, this.Ce), i.bufferData(i.ARRAY_BUFFER, h, i.DYNAMIC_DRAW);
841
+ const c = ((C = this.oe) == null ? void 0 : C.XA) || i.getParameter(i.CURRENT_PROGRAM), l = c ? i.getAttribLocation(c, "a_position") : -1;
842
+ l !== -1 && (i.enableVertexAttribArray(l), i.vertexAttribPointer(l, 2, i.FLOAT, !1, 8, 0)), i.drawArrays(i.TRIANGLES, 0, 6), l !== -1 && i.disableVertexAttribArray(l);
811
843
  }
812
- Nt(A, t, e, s) {
813
- this.St ? (this.Lt.st(A, t, e, s, this.St, { ...this.Tt }, this.kt), this.St = null, this.Tt = {}) : this.Lt.Bt(A, t, e, s, this.kt);
844
+ ve(A, t, e, s) {
845
+ this.he ? (this.Pe.Ft(A, t, e, s, this.he, { ...this.ce }, this.ue), this.he = null, this.ce = {}) : this.Pe.Yt(A, t, e, s, this.ue);
814
846
  }
815
- qt(A, t, e, s) {
816
- this.Lt.it(A, t, e, s, this.kt.lineWeight, this.kt);
847
+ ye(A, t, e, s) {
848
+ this.Pe.Rt(A, t, e, s, this.ue.lineWeight, this.ue);
817
849
  }
818
- Ae(A, t, e, s) {
819
- this.Lt.Qt(A, t, e, s, this.kt);
850
+ be(A, t, e, s) {
851
+ this.Pe.St(A, t, e, s, this.ue);
820
852
  }
821
- te(A, t, e, s, r, i) {
822
- this.Lt.Et(A, t, e, s, r, i, this.kt);
853
+ Ge(A, t, e, s, i, B) {
854
+ this.Pe.kt(A, t, e, s, i, B, this.ue);
823
855
  }
824
- ee(A, t, e, s, r, i, B, Q) {
825
- const o = this.kt.lineWeight;
826
- this.Lt.nt(A, t, e, s, r, i, B, Q, o, this.kt);
856
+ Me(A, t, e, s, i, B, r, n) {
857
+ const o = this.ue.lineWeight;
858
+ this.Pe.Ot(A, t, e, s, i, B, r, n, o, this.ue);
827
859
  }
828
- Be(A, t, e = 1, s = {}) {
829
- return new U(this.m, A, t, e, s);
860
+ $e(A, t, e = 1, s = {}) {
861
+ return new U(this.wA, A, t, e, s, this, !0);
830
862
  }
831
- se(A, t, e, s, r, i) {
832
- this.Lt.rt(A, t, e, s, r, i, this.kt);
863
+ xe(A, t, e, s, i, B) {
864
+ this.Pe.zt(A, t, e, s, i, B, this.ue);
833
865
  }
834
- ie(A, t = A, e = A, s = 255) {
835
- this.state.zA(A, t, e, s), this.ot(A / 255, t / 255, e / 255, s / 255);
866
+ Ye(A, t = A, e = A, s = 255) {
867
+ this.state.DA(A, t, e, s), this.Lt(A / 255, t / 255, e / 255, s / 255);
836
868
  }
837
- ot(A = 0, t = 0, e = 0, s = 0) {
838
- this.m.clearColor(A, t, e, s), this.m.clear(this.m.COLOR_BUFFER_BIT);
869
+ Lt(A = 0, t = 0, e = 0, s = 0) {
870
+ this.wA.clearColor(A, t, e, s), this.wA.clear(this.wA.COLOR_BUFFER_BIT);
839
871
  }
840
- Qe() {
841
- this.m.viewport(0, 0, this.m.canvas.width, this.m.canvas.height), G(this.m, [0, 0, this.m.canvas.width, this.m.canvas.height]);
872
+ Fe() {
873
+ this.wA.viewport(0, 0, this.wA.canvas.width, this.wA.canvas.height), F(this.wA, [0, 0, this.wA.canvas.width, this.wA.canvas.height]);
842
874
  }
843
875
  get context() {
844
- return this.m;
876
+ return this.wA;
845
877
  }
846
878
  get state() {
847
- return this.kt;
879
+ return this.ue;
848
880
  }
849
- re(A) {
850
- const t = A, e = R(this.m) ?? this.m.getParameter(this.m.VIEWPORT), s = { shader: t, gl: this.m, viewport: e };
851
- this.Wt(t);
852
- const r = /* @__PURE__ */ new Set();
853
- for (const i of this.Lt) i.type === D.CUSTOM ? r.add(D.RECTANGLE) : r.add(i.type);
854
- for (const i of r) i !== D.CUSTOM && this.Ht(i);
855
- this.Ut.kA(s, this.Lt, this.Ot), this.Lt.ot();
881
+ RA(A) {
882
+ this.K.push(this.ue), this.ue = A;
856
883
  }
857
- W() {
858
- this.m.deleteBuffer(this.Ft), this.Lt.ot();
859
- for (const A of this.Ot.values()) A.W();
884
+ SA() {
885
+ const A = this.K.pop();
886
+ A && (this.ue = A);
887
+ }
888
+ FA(A) {
889
+ const t = A, e = G(this.wA) ?? this.wA.getParameter(this.wA.VIEWPORT), s = { shader: t, gl: this.wA, viewport: e };
890
+ this.we(t);
891
+ const i = /* @__PURE__ */ new Set();
892
+ for (const B of this.Pe) B.type === D.CUSTOM ? i.add(D.RECTANGLE) : i.add(B.type);
893
+ for (const B of i) B !== D.CUSTOM && this.Ie(B);
894
+ this.De.Ct(s, this.Pe, this.le), this.Pe.Lt();
895
+ }
896
+ zA() {
897
+ this.wA.deleteBuffer(this.Ce), this.Pe.Lt();
898
+ for (const A of this.le.values()) A.zA();
899
+ this.ae.zA();
860
900
  }
861
901
  }
862
- const f = { readShort: (E, A) => (f.t.uint16[0] = E[A] << 8 | E[A + 1], f.t.int16[0]), readUshort: (E, A) => E[A] << 8 | E[A + 1], readUshorts(E, A, t) {
902
+ const u = { readShort: (E, A) => (u.t.uint16[0] = E[A] << 8 | E[A + 1], u.t.int16[0]), readUshort: (E, A) => E[A] << 8 | E[A + 1], readUshorts(E, A, t) {
863
903
  const e = [];
864
- for (let s = 0; s < t; s++) e.push(f.readUshort(E, A + 2 * s));
904
+ for (let s = 0; s < t; s++) e.push(u.readUshort(E, A + 2 * s));
865
905
  return e;
866
906
  }, readUint(E, A) {
867
- const t = f.t.uint8;
868
- return t[3] = E[A], t[2] = E[A + 1], t[1] = E[A + 2], t[0] = E[A + 3], f.t.uint32[0];
907
+ const t = u.t.uint8;
908
+ return t[3] = E[A], t[2] = E[A + 1], t[1] = E[A + 2], t[0] = E[A + 3], u.t.uint32[0];
869
909
  }, readASCII(E, A, t) {
870
910
  let e = "";
871
911
  for (let s = 0; s < t; s++) e += String.fromCharCode(E[A + s]);
@@ -873,1006 +913,1184 @@ const f = { readShort: (E, A) => (f.t.uint16[0] = E[A] << 8 | E[A + 1], f.t.int1
873
913
  }, t: (() => {
874
914
  const E = new ArrayBuffer(8);
875
915
  return { uint8: new Uint8Array(E), int16: new Int16Array(E), uint16: new Uint16Array(E), uint32: new Uint32Array(E) };
876
- })() }, uA = { parseTab(E, A, t) {
916
+ })() }, wA = { parseTab(E, A, t) {
877
917
  const e = { tables: [], ids: {}, off: A };
878
918
  E = new Uint8Array(E.buffer, A, t), A = 0;
879
- const s = f, r = s.readUshort, i = r(E, A += 2);
919
+ const s = u, i = s.readUshort, B = i(E, A += 2);
880
920
  A += 2;
881
- const B = [];
882
- for (let Q = 0; Q < i; Q++) {
883
- const o = r(E, A), h = r(E, A += 2);
921
+ const r = [];
922
+ for (let n = 0; n < B; n++) {
923
+ const o = i(E, A), a = i(E, A += 2);
884
924
  A += 2;
885
- const a = s.readUint(E, A);
925
+ const g = s.readUint(E, A);
886
926
  A += 4;
887
- const g = `p${o}e${h}`;
888
- let l = B.indexOf(a);
889
- if (l === -1) {
890
- let c;
891
- l = e.tables.length, B.push(a);
892
- const C = r(E, a);
893
- c = C === 4 ? this.parse4(E, a) : C === 12 ? this.parse12(E, a) : { format: C }, e.tables.push(c);
927
+ const h = `p${o}e${a}`;
928
+ let c = r.indexOf(g);
929
+ if (c === -1) {
930
+ let l;
931
+ c = e.tables.length, r.push(g);
932
+ const C = i(E, g);
933
+ l = C === 4 ? this.parse4(E, g) : C === 12 ? this.parse12(E, g) : { format: C }, e.tables.push(l);
894
934
  }
895
- e.ids[g] != null && console.warn("Multiple tables for one platform+encoding: " + g), e.ids[g] = l;
935
+ e.ids[h] = c;
896
936
  }
897
937
  return e;
898
938
  }, parse4(E, A) {
899
- const t = f, e = t.readUshort, s = t.readUshorts, r = A, i = e(E, A += 2);
939
+ const t = u, e = t.readUshort, s = t.readUshorts, i = A, B = e(E, A += 2);
900
940
  A += 2;
901
- const B = e(E, A += 2) >>> 1, Q = { format: 4, searchRange: e(E, A += 2), entrySelector: 0, rangeShift: 0, endCount: [], startCount: [], idDelta: [], idRangeOffset: [], glyphIdArray: [] };
902
- A += 2, Q.entrySelector = e(E, A), A += 2, Q.rangeShift = e(E, A), A += 2, Q.endCount = s(E, A, B), A += 2 * B, A += 2, Q.startCount = s(E, A, B), A += 2 * B;
903
- for (let o = 0; o < B; o++) Q.idDelta.push(t.readShort(E, A)), A += 2;
904
- return Q.idRangeOffset = s(E, A, B), A += 2 * B, Q.glyphIdArray = s(E, A, r + i - A >> 1), Q;
941
+ const r = e(E, A += 2) >>> 1, n = { format: 4, searchRange: e(E, A += 2), entrySelector: 0, rangeShift: 0, endCount: [], startCount: [], idDelta: [], idRangeOffset: [], glyphIdArray: [] };
942
+ A += 2, n.entrySelector = e(E, A), A += 2, n.rangeShift = e(E, A), A += 2, n.endCount = s(E, A, r), A += 2 * r, A += 2, n.startCount = s(E, A, r), A += 2 * r;
943
+ for (let o = 0; o < r; o++) n.idDelta.push(t.readShort(E, A)), A += 2;
944
+ return n.idRangeOffset = s(E, A, r), A += 2 * r, n.glyphIdArray = s(E, A, i + B - A >> 1), n;
905
945
  }, parse12(E, A) {
906
- const t = f.readUint;
946
+ const t = u.readUint;
907
947
  t(E, A += 4), t(E, A += 4);
908
948
  const e = t(E, A += 4);
909
949
  A += 4;
910
950
  const s = new Uint32Array(3 * e);
911
- for (let r = 0; r < 3 * e; r += 3) s[r] = t(E, A + (r << 2)), s[r + 1] = t(E, A + (r << 2) + 4), s[r + 2] = t(E, A + (r << 2) + 8);
951
+ for (let i = 0; i < 3 * e; i += 3) s[i] = t(E, A + (i << 2)), s[i + 1] = t(E, A + (i << 2) + 4), s[i + 2] = t(E, A + (i << 2) + 8);
912
952
  return { format: 12, groups: s };
913
- } }, PA = { parseTab(E, A, t) {
914
- const e = f;
953
+ } }, IA = { parseTab(E, A, t) {
954
+ const e = u;
915
955
  A += 18;
916
956
  const s = e.readUshort(E, A);
917
957
  A += 2, A += 16;
918
- const r = e.readShort(E, A);
919
- A += 2;
920
958
  const i = e.readShort(E, A);
921
959
  A += 2;
922
960
  const B = e.readShort(E, A);
923
961
  A += 2;
924
- const Q = e.readShort(E, A);
925
- return A += 2, A += 6, { unitsPerEm: s, xMin: r, yMin: i, xMax: B, yMax: Q, indexToLocFormat: e.readShort(E, A) };
926
- } }, IA = { parseTab(E, A, t) {
927
- const e = f;
962
+ const r = e.readShort(E, A);
963
+ A += 2;
964
+ const n = e.readShort(E, A);
965
+ return A += 2, A += 6, { unitsPerEm: s, xMin: i, yMin: B, xMax: r, yMax: n, indexToLocFormat: e.readShort(E, A) };
966
+ } }, fA = { parseTab(E, A, t) {
967
+ const e = u;
928
968
  A += 4;
929
- const s = ["ascender", "descender", "lineGap", "advanceWidthMax", "minLeftSideBearing", "minRightSideBearing", "xMaxExtent", "caretSlopeRise", "caretSlopeRun", "caretOffset", "res0", "res1", "res2", "res3", "metricDataFormat", "numberOfHMetrics"], r = {};
930
- for (let i = 0; i < s.length; i++) {
931
- const B = s[i], Q = B === "advanceWidthMax" || B === "numberOfHMetrics" ? e.readUshort : e.readShort;
932
- r[B] = Q(E, A + 2 * i);
969
+ const s = ["ascender", "descender", "lineGap", "advanceWidthMax", "minLeftSideBearing", "minRightSideBearing", "xMaxExtent", "caretSlopeRise", "caretSlopeRun", "caretOffset", "res0", "res1", "res2", "res3", "metricDataFormat", "numberOfHMetrics"], i = {};
970
+ for (let B = 0; B < s.length; B++) {
971
+ const r = s[B], n = r === "advanceWidthMax" || r === "numberOfHMetrics" ? e.readUshort : e.readShort;
972
+ i[r] = n(E, A + 2 * B);
933
973
  }
934
- return r;
935
- } }, fA = { parseTab(E, A, t, e) {
936
- const s = f, r = [], i = [], B = e.maxp.numGlyphs, Q = e.hhea.numberOfHMetrics;
937
- let o = 0, h = 0, a = 0;
938
- for (; a < Q; ) o = s.readUshort(E, A + (a << 2)), h = s.readShort(E, A + (a << 2) + 2), r.push(o), i.push(h), a++;
939
- for (; a < B; ) r.push(o), i.push(h), a++;
940
- return { aWidth: r, lsBearing: i };
941
- } }, N = { cmap: uA, head: PA, hhea: IA, maxp: { parseTab(E, A, t) {
942
- const e = f;
974
+ return i;
975
+ } }, dA = { parseTab(E, A, t, e) {
976
+ const s = u, i = [], B = [], r = e.maxp.numGlyphs, n = e.hhea.numberOfHMetrics;
977
+ let o = 0, a = 0, g = 0;
978
+ for (; g < n; ) o = s.readUshort(E, A + (g << 2)), a = s.readShort(E, A + (g << 2) + 2), i.push(o), B.push(a), g++;
979
+ for (; g < r; ) i.push(o), B.push(a), g++;
980
+ return { aWidth: i, lsBearing: B };
981
+ } }, k = { cmap: wA, head: IA, hhea: fA, maxp: { parseTab(E, A, t) {
982
+ const e = u;
943
983
  return e.readUint(E, A), A += 4, { numGlyphs: e.readUshort(E, A) };
944
- } }, hmtx: fA, loca: { parseTab(E, A, t, e) {
945
- const s = f, r = [], i = e.head.indexToLocFormat, B = e.maxp.numGlyphs + 1;
946
- if (i === 0) for (let Q = 0; Q < B; Q++) r.push(s.readUshort(E, A + (Q << 1)) << 1);
947
- else if (i === 1) for (let Q = 0; Q < B; Q++) r.push(s.readUint(E, A + (Q << 2)));
948
- return r;
984
+ } }, hmtx: dA, loca: { parseTab(E, A, t, e) {
985
+ const s = u, i = [], B = e.head.indexToLocFormat, r = e.maxp.numGlyphs + 1;
986
+ if (B === 0) for (let n = 0; n < r; n++) i.push(s.readUshort(E, A + (n << 1)) << 1);
987
+ else if (B === 1) for (let n = 0; n < r; n++) i.push(s.readUint(E, A + (n << 2)));
988
+ return i;
949
989
  } }, glyf: { parseTab(E, A, t, e) {
950
- const s = [], r = e.maxp.numGlyphs;
951
- for (let i = 0; i < r; i++) s.push(null);
990
+ const s = [], i = e.maxp.numGlyphs;
991
+ for (let B = 0; B < i; B++) s.push(null);
952
992
  return s;
953
- }, Ee(E, A) {
954
- const t = f, e = E.ne, s = E.loca;
993
+ }, Re(E, A) {
994
+ const t = u, e = E.Se, s = E.loca;
955
995
  if (s[A] === s[A + 1]) return null;
956
- const r = y.findTable(e, "glyf", E.oe);
957
- if (!r) return null;
958
- let i = r[0] + s[A];
959
- const B = {};
960
- if (B.noc = t.readShort(e, i), i += 2, B.xMin = t.readShort(e, i), i += 2, B.yMin = t.readShort(e, i), i += 2, B.xMax = t.readShort(e, i), i += 2, B.yMax = t.readShort(e, i), i += 2, B.xMin >= B.xMax || B.yMin >= B.yMax) return null;
961
- if (B.noc > 0) {
962
- B.endPts = [];
963
- for (let g = 0; g < B.noc; g++) B.endPts.push(t.readUshort(e, i)), i += 2;
964
- const Q = t.readUshort(e, i);
965
- if (i += 2, e.length - i < Q) return null;
966
- i += Q;
967
- const o = B.endPts[B.noc - 1] + 1;
968
- B.flags = [];
969
- for (let g = 0; g < o; g++) {
970
- const l = e[i];
971
- if (i++, B.flags.push(l), 8 & l) {
972
- const c = e[i];
973
- i++;
974
- for (let C = 0; C < c; C++) B.flags.push(l), g++;
996
+ const i = m.findTable(e, "glyf", E.ze);
997
+ if (!i) return null;
998
+ let B = i[0] + s[A];
999
+ const r = {};
1000
+ if (r.noc = t.readShort(e, B), B += 2, r.xMin = t.readShort(e, B), B += 2, r.yMin = t.readShort(e, B), B += 2, r.xMax = t.readShort(e, B), B += 2, r.yMax = t.readShort(e, B), B += 2, r.xMin >= r.xMax || r.yMin >= r.yMax) return null;
1001
+ if (r.noc > 0) {
1002
+ r.endPts = [];
1003
+ for (let h = 0; h < r.noc; h++) r.endPts.push(t.readUshort(e, B)), B += 2;
1004
+ const n = t.readUshort(e, B);
1005
+ if (B += 2, e.length - B < n) return null;
1006
+ B += n;
1007
+ const o = r.endPts[r.noc - 1] + 1;
1008
+ r.flags = [];
1009
+ for (let h = 0; h < o; h++) {
1010
+ const c = e[B];
1011
+ if (B++, r.flags.push(c), 8 & c) {
1012
+ const l = e[B];
1013
+ B++;
1014
+ for (let C = 0; C < l; C++) r.flags.push(c), h++;
975
1015
  }
976
1016
  }
977
- B.xs = [];
978
- for (let g = 0; g < o; g++) {
979
- const l = B.flags[g], c = !!(16 & l);
980
- 2 & l ? (B.xs.push(c ? e[i] : -e[i]), i++) : c ? B.xs.push(0) : (B.xs.push(t.readShort(e, i)), i += 2);
1017
+ r.xs = [];
1018
+ for (let h = 0; h < o; h++) {
1019
+ const c = r.flags[h], l = !!(16 & c);
1020
+ 2 & c ? (r.xs.push(l ? e[B] : -e[B]), B++) : l ? r.xs.push(0) : (r.xs.push(t.readShort(e, B)), B += 2);
981
1021
  }
982
- B.ys = [];
983
- for (let g = 0; g < o; g++) {
984
- const l = B.flags[g], c = !!(32 & l);
985
- 4 & l ? (B.ys.push(c ? e[i] : -e[i]), i++) : c ? B.ys.push(0) : (B.ys.push(t.readShort(e, i)), i += 2);
1022
+ r.ys = [];
1023
+ for (let h = 0; h < o; h++) {
1024
+ const c = r.flags[h], l = !!(32 & c);
1025
+ 4 & c ? (r.ys.push(l ? e[B] : -e[B]), B++) : l ? r.ys.push(0) : (r.ys.push(t.readShort(e, B)), B += 2);
986
1026
  }
987
- let h = 0, a = 0;
988
- for (let g = 0; g < o; g++) h += B.xs[g], a += B.ys[g], B.xs[g] = h, B.ys[g] = a;
989
- } else B.parts = [], B.endPts = [], B.flags = [], B.xs = [], B.ys = [];
990
- return B;
991
- } } }, y = { parse: (E) => [((A, t, e, s) => {
992
- const r = N, i = { ne: A, ge: t, oe: e };
993
- for (const B in r) {
994
- const Q = B, o = y.findTable(A, Q, e);
1027
+ let a = 0, g = 0;
1028
+ for (let h = 0; h < o; h++) a += r.xs[h], g += r.ys[h], r.xs[h] = a, r.ys[h] = g;
1029
+ } else r.parts = [], r.endPts = [], r.flags = [], r.xs = [], r.ys = [];
1030
+ return r;
1031
+ } } }, m = { parse: (E) => [((A, t, e, s) => {
1032
+ const i = k, B = { Se: A, ke: t, ze: e };
1033
+ for (const r in i) {
1034
+ const n = r, o = m.findTable(A, n, e);
995
1035
  if (o) {
996
- const [h, a] = o;
997
- let g = s[h];
998
- g == null && (g = r[Q].parseTab(A, h, a, i), s[h] = g), i[Q] = g;
1036
+ const [a, g] = o;
1037
+ let h = s[a];
1038
+ h == null && (h = i[n].parseTab(A, a, g, B), s[a] = h), B[n] = h;
999
1039
  }
1000
1040
  }
1001
- return i;
1041
+ return B;
1002
1042
  })(new Uint8Array(E), 0, 0, {})], findTable(E, A, t) {
1003
- const e = f, s = e.readUshort(E, t + 4);
1004
- let r = t + 12;
1005
- for (let i = 0; i < s; i++) {
1006
- const B = e.readASCII(E, r, 4);
1007
- e.readUint(E, r + 4);
1008
- const Q = e.readUint(E, r + 8), o = e.readUint(E, r + 12);
1009
- if (B === A) return [Q, o];
1010
- r += 16;
1043
+ const e = u, s = e.readUshort(E, t + 4);
1044
+ let i = t + 12;
1045
+ for (let B = 0; B < s; B++) {
1046
+ const r = e.readASCII(E, i, 4);
1047
+ e.readUint(E, i + 4);
1048
+ const n = e.readUint(E, i + 8), o = e.readUint(E, i + 12);
1049
+ if (r === A) return [n, o];
1050
+ i += 16;
1011
1051
  }
1012
1052
  return null;
1013
- }, T: N, B: f };
1014
- class F {
1053
+ }, T: k, B: u };
1054
+ class _ {
1015
1055
  constructor() {
1016
- n(this, "ae", /* @__PURE__ */ new Map());
1017
- n(this, "he", /* @__PURE__ */ new Map());
1056
+ Q(this, "Oe", /* @__PURE__ */ new Map());
1057
+ Q(this, "Le", /* @__PURE__ */ new Map());
1018
1058
  }
1019
- ce(A, t) {
1020
- const e = `${this.Ce(A)}_${t}`;
1021
- if (this.ae.has(e)) return this.ae.get(e);
1059
+ Ue(A, t) {
1060
+ const e = `${this.Te(A)}_${t}`;
1061
+ if (this.Oe.has(e)) return this.Oe.get(e);
1022
1062
  const s = A.cmap;
1023
- if (!s || !s.tables) return this.ae.set(e, 0), 0;
1024
- let r = 0;
1025
- for (const i of s.tables) if (i.format === 4 ? r = this.De(t, i) : i.format === 12 && (r = this.le(t, i)), r > 0) break;
1026
- return this.ae.set(e, r), r;
1063
+ if (!s || !s.tables) return this.Oe.set(e, 0), 0;
1064
+ let i = 0;
1065
+ for (const B of s.tables) if (B.format === 4 ? i = this.He(t, B) : B.format === 12 && (i = this.We(t, B)), i > 0) break;
1066
+ return this.Oe.set(e, i), i;
1027
1067
  }
1028
- Pe(A, t) {
1068
+ Ke(A, t) {
1029
1069
  const e = t.codePointAt(0);
1030
- return e === void 0 ? 0 : this.ce(A, e);
1070
+ return e === void 0 ? 0 : this.Ue(A, e);
1031
1071
  }
1032
- ue(A, t) {
1072
+ Je(A, t) {
1033
1073
  const e = A.hmtx;
1034
1074
  return e && e.aWidth && e.aWidth.length !== 0 ? t < e.aWidth.length ? e.aWidth[t] : e.aWidth[e.aWidth.length - 1] : 0;
1035
1075
  }
1036
- Ie(A, t) {
1037
- const e = t / A.head.unitsPerEm, s = A.hhea.ascender * e, r = A.hhea.descender * e, i = A.hhea.lineGap * e;
1038
- return { ascender: s, descender: r, lineGap: i, lineHeight: s - r + i, unitsPerEm: A.head.unitsPerEm, scale: e };
1076
+ Ve(A, t) {
1077
+ const e = t / A.head.unitsPerEm, s = A.hhea.ascender * e, i = A.hhea.descender * e, B = A.hhea.lineGap * e;
1078
+ return { ascender: s, descender: i, lineGap: B, lineHeight: s - i + B, unitsPerEm: A.head.unitsPerEm, scale: e };
1039
1079
  }
1040
- we() {
1041
- this.ae.clear(), this.he.clear();
1080
+ Ze() {
1081
+ this.Oe.clear(), this.Le.clear();
1042
1082
  }
1043
- Ce(A) {
1044
- return `${A.oe}_${A.ne.length}`;
1083
+ Te(A) {
1084
+ return `${A.ze}_${A.Se.length}`;
1045
1085
  }
1046
- De(A, t) {
1086
+ He(A, t) {
1047
1087
  const e = t.endCount.length;
1048
1088
  let s = -1;
1049
- for (let r = 0; r < e; r++) if (A <= t.endCount[r]) {
1050
- s = r;
1089
+ for (let i = 0; i < e; i++) if (A <= t.endCount[i]) {
1090
+ s = i;
1051
1091
  break;
1052
1092
  }
1053
1093
  if (s === -1 || A < t.startCount[s]) return 0;
1054
1094
  if (t.idRangeOffset[s] === 0) return A + t.idDelta[s] & 65535;
1055
1095
  {
1056
- const r = t.idRangeOffset[s] / 2 + (A - t.startCount[s]) - (e - s);
1057
- if (r >= 0 && r < t.glyphIdArray.length) {
1058
- const i = t.glyphIdArray[r];
1059
- return i === 0 ? 0 : i + t.idDelta[s] & 65535;
1096
+ const i = t.idRangeOffset[s] / 2 + (A - t.startCount[s]) - (e - s);
1097
+ if (i >= 0 && i < t.glyphIdArray.length) {
1098
+ const B = t.glyphIdArray[i];
1099
+ return B === 0 ? 0 : B + t.idDelta[s] & 65535;
1060
1100
  }
1061
1101
  }
1062
1102
  return 0;
1063
1103
  }
1064
- le(A, t) {
1104
+ We(A, t) {
1065
1105
  const e = t.groups.length / 3;
1066
1106
  for (let s = 0; s < e; s++) {
1067
- const r = t.groups[3 * s], i = t.groups[3 * s + 1], B = t.groups[3 * s + 2];
1068
- if (A >= r && A <= i) return B + (A - r);
1107
+ const i = t.groups[3 * s], B = t.groups[3 * s + 1], r = t.groups[3 * s + 2];
1108
+ if (A >= i && A <= B) return r + (A - i);
1069
1109
  }
1070
1110
  return 0;
1071
1111
  }
1072
1112
  }
1073
- class dA {
1113
+ class pA {
1074
1114
  constructor(A) {
1075
- n(this, "fe");
1076
- this.fe = A;
1115
+ Q(this, "Ne");
1116
+ this.Ne = A;
1077
1117
  }
1078
- de(A) {
1118
+ Xe(A) {
1079
1119
  var e;
1080
1120
  const t = [];
1081
1121
  return (e = A.cmap) != null && e.tables ? (A.cmap.tables.forEach((s) => {
1082
1122
  if (s.format === 4) {
1083
- const r = this.pe(s);
1084
- t.push(...r);
1123
+ const i = this.je(s);
1124
+ t.push(...i);
1085
1125
  } else if (s.format === 12) {
1086
- const r = this._e(s);
1087
- t.push(...r);
1126
+ const i = this.qe(s);
1127
+ t.push(...i);
1088
1128
  }
1089
1129
  }), [...new Set(t)]) : [];
1090
1130
  }
1091
- me(A, t) {
1092
- return this.fe.Pe(A, t) > 0;
1131
+ As(A, t) {
1132
+ return this.Ne.Ke(A, t) > 0;
1093
1133
  }
1094
- ve(A, t) {
1095
- for (const e of t) if (!this.me(A, e)) return !1;
1134
+ ts(A, t) {
1135
+ for (const e of t) if (!this.As(A, e)) return !1;
1096
1136
  return !0;
1097
1137
  }
1098
- xe(A, t) {
1099
- return t.filter((e) => this.me(A, e));
1138
+ es(A, t) {
1139
+ return t.filter((e) => this.As(A, e));
1100
1140
  }
1101
- ye(A) {
1102
- return A.filter((t) => this.be(t));
1141
+ ss(A) {
1142
+ return A.filter((t) => this.Bs(t));
1103
1143
  }
1104
- pe(A) {
1144
+ je(A) {
1105
1145
  const t = [];
1106
1146
  if (!(A.startCount && A.endCount && A.idRangeOffset && A.idDelta)) return t;
1107
1147
  for (let e = 0; e < A.startCount.length; e++) {
1108
- const s = A.startCount[e], r = A.endCount[e];
1109
- if (s !== 65535 || r !== 65535) {
1110
- for (let i = s; i <= r; i++)
1111
- if (this.Ge(A, i, e) > 0) try {
1112
- const B = String.fromCodePoint(i);
1113
- t.push(B);
1148
+ const s = A.startCount[e], i = A.endCount[e];
1149
+ if (s !== 65535 || i !== 65535) {
1150
+ for (let B = s; B <= i; B++)
1151
+ if (this.Qs(A, B, e) > 0) try {
1152
+ const r = String.fromCodePoint(B);
1153
+ t.push(r);
1114
1154
  } catch {
1115
1155
  }
1116
1156
  }
1117
1157
  }
1118
1158
  return t;
1119
1159
  }
1120
- _e(A) {
1160
+ qe(A) {
1121
1161
  const t = [];
1122
1162
  if (!A.groups) return t;
1123
1163
  for (let e = 0; e < A.groups.length; e += 3) {
1124
- const s = A.groups[e], r = A.groups[e + 1], i = A.groups[e + 2];
1125
- for (let B = s; B <= r; B++)
1126
- if (i + (B - s) > 0) try {
1127
- const Q = String.fromCodePoint(B);
1128
- t.push(Q);
1164
+ const s = A.groups[e], i = A.groups[e + 1], B = A.groups[e + 2];
1165
+ for (let r = s; r <= i; r++)
1166
+ if (B + (r - s) > 0) try {
1167
+ const n = String.fromCodePoint(r);
1168
+ t.push(n);
1129
1169
  } catch {
1130
1170
  }
1131
1171
  }
1132
1172
  return t;
1133
1173
  }
1134
- Ge(A, t, e) {
1174
+ Qs(A, t, e) {
1135
1175
  if (A.idRangeOffset[e] === 0) return t + A.idDelta[e] & 65535;
1136
1176
  {
1137
1177
  const s = A.idRangeOffset[e] / 2 + (t - A.startCount[e]) - (A.startCount.length - e);
1138
1178
  if (s >= 0 && A.glyphIdArray && s < A.glyphIdArray.length) {
1139
- const r = A.glyphIdArray[s];
1140
- if (r !== 0) return r + A.idDelta[e] & 65535;
1179
+ const i = A.glyphIdArray[s];
1180
+ if (i !== 0) return i + A.idDelta[e] & 65535;
1141
1181
  }
1142
1182
  }
1143
1183
  return 0;
1144
1184
  }
1145
- be(A) {
1185
+ Bs(A) {
1146
1186
  const t = A.codePointAt(0) || 0;
1147
1187
  return !(t >= 0 && t <= 31 && t !== 9 && t !== 10 && t !== 13 || t >= 127 && t <= 159);
1148
1188
  }
1149
1189
  }
1150
- class wA {
1190
+ class mA {
1151
1191
  constructor() {
1152
- n(this, "$e");
1153
- const A = new F();
1154
- this.$e = new dA(A);
1192
+ Q(this, "Es");
1193
+ const A = new _();
1194
+ this.Es = new pA(A);
1155
1195
  }
1156
1196
  extractCharacters(A) {
1157
- return this.$e.de(A);
1197
+ return this.Es.Xe(A);
1158
1198
  }
1159
1199
  filterProblematicCharacters(A) {
1160
- return this.$e.ye(A);
1200
+ return this.Es.ss(A);
1161
1201
  }
1162
1202
  characterExists(A, t) {
1163
- return this.$e.me(A, t);
1203
+ return this.Es.As(A, t);
1164
1204
  }
1165
1205
  allCharactersExist(A, t) {
1166
- return this.$e.ve(A, t);
1206
+ return this.Es.ts(A, t);
1167
1207
  }
1168
1208
  }
1169
- class mA {
1209
+ class yA {
1170
1210
  constructor(A) {
1171
- n(this, "Me");
1172
- n(this, "Ye");
1173
- n(this, "ze");
1174
- n(this, "Re");
1175
- this.ze = A, this.Re = new F(), this.Me = document.createElement("canvas"), this.Ye = this.Me.getContext("2d", { willReadFrequently: !0, alpha: !1 });
1211
+ Q(this, "rs");
1212
+ Q(this, "ns");
1213
+ Q(this, "vA");
1214
+ Q(this, "gs");
1215
+ this.vA = A, this.gs = new _(), this.rs = document.createElement("canvas"), this.ns = this.rs.getContext("2d", { willReadFrequently: !0, alpha: !1 });
1176
1216
  }
1177
1217
  createTextureAtlas(A, t, e, s) {
1178
- const r = A.length, i = Math.ceil(Math.sqrt(r)), B = Math.ceil(r / i), Q = t.width * i, o = t.height * B, h = typeof s == "object" ? s : null;
1179
- this.Se(Q, o), this.Te(A, t, i, e, h);
1180
- const a = this.ze.Be(Q, o, 1, { filter: "nearest" });
1181
- return a.F(this.Me), { framebuffer: a, columns: i, rows: B };
1182
- }
1183
- Se(A, t) {
1184
- this.Me.width = A, this.Me.height = t, this.Me.style.width = A + "px", this.Me.style.height = A + "px", this.Ye.imageSmoothingEnabled = !1, this.Me.style.imageRendering = "pixelated", this.Ye.fillStyle = "black", this.Ye.fillRect(0, 0, A, t), this.Ye.textBaseline = "top", this.Ye.textAlign = "left", this.Ye.fillStyle = "white";
1185
- }
1186
- Te(A, t, e, s, r) {
1187
- const i = s / r.head.unitsPerEm;
1188
- for (let B = 0; B < A.length; B++) {
1189
- const Q = B % e, o = Math.floor(B / e), h = A[B].character, a = this.Fe(r, h);
1190
- if (!a) continue;
1191
- const g = h.codePointAt(0) || 0, l = this.Re.ce(r, g), c = this.Oe(r, l) * i, C = Q * t.width, d = o * t.height, I = C + 0.5 * t.width, w = d + 0.5 * t.height, p = Math.round(I - 0.5 * t.width), u = Math.round(w - 0.5 * s), M = p + 0.5 * (t.width - c), j = u + r.hhea.ascender * i;
1192
- this.Ue(a, M, j, i);
1218
+ const i = A.length, B = Math.ceil(Math.sqrt(i)), r = Math.ceil(i / B), n = t.width * B, o = t.height * r, a = typeof s == "object" ? s : null;
1219
+ this.hs(n, o), this.cs(A, t, B, e, a);
1220
+ const g = this.vA.$e(n, o, 1, { filter: "nearest" });
1221
+ return g.$A(this.rs), { framebuffer: g, columns: B, rows: r };
1222
+ }
1223
+ hs(A, t) {
1224
+ this.rs.width = A, this.rs.height = t, this.rs.style.width = A + "px", this.rs.style.height = A + "px", this.ns.imageSmoothingEnabled = !1, this.rs.style.imageRendering = "pixelated", this.ns.fillStyle = "black", this.ns.fillRect(0, 0, A, t), this.ns.textBaseline = "top", this.ns.textAlign = "left", this.ns.fillStyle = "white";
1225
+ }
1226
+ cs(A, t, e, s, i) {
1227
+ const B = s / i.head.unitsPerEm;
1228
+ for (let r = 0; r < A.length; r++) {
1229
+ const n = r % e, o = Math.floor(r / e), a = A[r].character, g = this.Cs(i, a);
1230
+ if (!g) continue;
1231
+ const h = a.codePointAt(0) || 0, c = this.gs.Ue(i, h), l = this.ls(i, c) * B, C = n * t.width, f = o * t.height, w = C + 0.5 * t.width, d = f + 0.5 * t.height, p = Math.round(w - 0.5 * t.width), R = Math.round(d - 0.5 * s), Z = p + 0.5 * (t.width - l), j = R + i.hhea.ascender * B;
1232
+ this.Ds(g, Z, j, B);
1193
1233
  }
1194
1234
  }
1195
- Fe(A, t) {
1196
- const e = t.codePointAt(0) || 0, s = this.Re.ce(A, e);
1235
+ Cs(A, t) {
1236
+ const e = t.codePointAt(0) || 0, s = this.gs.Ue(A, e);
1197
1237
  if (s === 0) return null;
1198
1238
  if (A.glyf && A.glyf[s] !== null) return A.glyf[s];
1199
- if (y && y.T && y.T.glyf) {
1200
- const r = y.T.glyf.Ee(A, s);
1201
- return A.glyf && r && (A.glyf[s] = r), r;
1239
+ if (m && m.T && m.T.glyf) {
1240
+ const i = m.T.glyf.Re(A, s);
1241
+ return A.glyf && i && (A.glyf[s] = i), i;
1202
1242
  }
1203
1243
  return null;
1204
1244
  }
1205
- Oe(A, t) {
1245
+ ls(A, t) {
1206
1246
  const e = A.hmtx;
1207
1247
  return e && e.aWidth ? t < e.aWidth.length ? e.aWidth[t] : e.aWidth[e.aWidth.length - 1] : 0;
1208
1248
  }
1209
- Ue(A, t, e, s) {
1249
+ Ds(A, t, e, s) {
1210
1250
  if (!A || !A.xs || A.noc === 0) return;
1211
- const { xs: r, ys: i, endPts: B, flags: Q } = A;
1212
- if (!(r && i && B && Q)) return;
1213
- this.Ye.beginPath();
1251
+ const { xs: i, ys: B, endPts: r, flags: n } = A;
1252
+ if (!(i && B && r && n)) return;
1253
+ this.ns.beginPath();
1214
1254
  let o = 0;
1215
- for (let h = 0; h < B.length; h++) {
1216
- const a = B[h];
1217
- if (!(a < o)) {
1218
- if (a >= o) {
1219
- const g = t + r[o] * s, l = e - i[o] * s;
1220
- this.Ye.moveTo(g, l);
1221
- let c = o + 1;
1222
- for (; c <= a; )
1223
- if (1 & Q[c]) {
1224
- const C = t + r[c] * s, d = e - i[c] * s;
1225
- this.Ye.lineTo(C, d), c++;
1255
+ for (let a = 0; a < r.length; a++) {
1256
+ const g = r[a];
1257
+ if (!(g < o)) {
1258
+ if (g >= o) {
1259
+ const h = t + i[o] * s, c = e - B[o] * s;
1260
+ this.ns.moveTo(h, c);
1261
+ let l = o + 1;
1262
+ for (; l <= g; )
1263
+ if (1 & n[l]) {
1264
+ const C = t + i[l] * s, f = e - B[l] * s;
1265
+ this.ns.lineTo(C, f), l++;
1226
1266
  } else {
1227
- const C = t + r[c] * s, d = e - i[c] * s;
1228
- let I = c + 1 > a ? o : c + 1;
1229
- if (1 & Q[I]) {
1230
- const w = t + r[I] * s, p = e - i[I] * s;
1231
- this.Ye.quadraticCurveTo(C, d, w, p), c = I + 1;
1267
+ const C = t + i[l] * s, f = e - B[l] * s;
1268
+ let w = l + 1 > g ? o : l + 1;
1269
+ if (1 & n[w]) {
1270
+ const d = t + i[w] * s, p = e - B[w] * s;
1271
+ this.ns.quadraticCurveTo(C, f, d, p), l = w + 1;
1232
1272
  } else {
1233
- const w = (C + (t + r[I] * s)) / 2, p = (d + (e - i[I] * s)) / 2;
1234
- this.Ye.quadraticCurveTo(C, d, w, p), c = I;
1273
+ const d = (C + (t + i[w] * s)) / 2, p = (f + (e - B[w] * s)) / 2;
1274
+ this.ns.quadraticCurveTo(C, f, d, p), l = w;
1235
1275
  }
1236
1276
  }
1237
- this.Ye.closePath();
1277
+ this.ns.closePath();
1238
1278
  }
1239
- o = a + 1;
1279
+ o = g + 1;
1240
1280
  }
1241
1281
  }
1242
- this.Ye.fill();
1282
+ this.ns.fill();
1243
1283
  }
1244
1284
  }
1245
- class pA {
1285
+ class vA {
1246
1286
  constructor() {
1247
- n(this, "fe");
1248
- this.fe = new F();
1287
+ Q(this, "Ne");
1288
+ this.Ne = new _();
1249
1289
  }
1250
1290
  calculateMaxGlyphDimensions(A, t, e) {
1251
1291
  let s = 0;
1252
- const r = this.fe.Ie(e, t), i = r.lineHeight;
1253
- for (const B of A) {
1254
- const Q = this.fe.Pe(e, B);
1255
- if (Q === 0) continue;
1256
- const o = this.fe.ue(e, Q) * r.scale;
1292
+ const i = this.Ne.Ve(e, t), B = i.lineHeight;
1293
+ for (const r of A) {
1294
+ const n = this.Ne.Ke(e, r);
1295
+ if (n === 0) continue;
1296
+ const o = this.Ne.Je(e, n) * i.scale;
1257
1297
  s = Math.max(s, o);
1258
1298
  }
1259
- return { width: Math.ceil(s), height: Math.ceil(i) };
1299
+ return { width: Math.ceil(s), height: Math.ceil(B) };
1260
1300
  }
1261
1301
  getCharacterAdvanceWidth(A, t, e) {
1262
- const s = this.fe.Ie(e, t), r = this.fe.Pe(e, A);
1263
- return this.fe.ue(e, r) * s.scale;
1302
+ const s = this.Ne.Ve(e, t), i = this.Ne.Ke(e, A);
1303
+ return this.Ne.Je(e, i) * s.scale;
1264
1304
  }
1265
1305
  getFontMetrics(A, t) {
1266
- return this.fe.Ie(t, A);
1306
+ return this.Ne.Ve(t, A);
1267
1307
  }
1268
- we() {
1269
- this.fe.we();
1308
+ Ze() {
1309
+ this.Ne.Ze();
1270
1310
  }
1271
1311
  }
1272
- class yA {
1312
+ class xA {
1273
1313
  constructor() {
1274
- n(this, "Re");
1275
- this.Re = new F();
1314
+ Q(this, "gs");
1315
+ this.gs = new _();
1276
1316
  }
1277
1317
  createCharacterObjects(A, t) {
1278
1318
  return A.map((e, s) => {
1279
- const r = e.codePointAt(0) || 0, i = this.Le(s);
1280
- let B = 0;
1319
+ const i = e.codePointAt(0) || 0, B = this.Ps(s);
1320
+ let r = 0;
1281
1321
  if (t.hmtx && t.hmtx.aWidth) {
1282
- const Q = this.Re.ce(t, r);
1283
- Q > 0 && t.hmtx.aWidth[Q] !== void 0 && (B = t.hmtx.aWidth[Q]);
1322
+ const n = this.gs.Ue(t, i);
1323
+ n > 0 && t.hmtx.aWidth[n] !== void 0 && (r = t.hmtx.aWidth[n]);
1284
1324
  }
1285
- return { character: e, unicode: r, color: i, advanceWidth: B };
1325
+ return { character: e, unicode: i, color: B, advanceWidth: r };
1286
1326
  });
1287
1327
  }
1288
- Le(A) {
1328
+ Ps(A) {
1289
1329
  return [A % 256 / 255, Math.floor(A / 256) % 256 / 255, Math.floor(A / 65536) % 256 / 255];
1290
1330
  }
1291
- ke(A, t) {
1292
- if (!_.P(typeof A == "string", "Character must be a string.", { method: "getCharacterColor", providedValue: A })) return [0, 0, 0];
1331
+ us(A, t) {
1332
+ if (!M._(typeof A == "string", "Character must be a string.", { method: "getCharacterColor", providedValue: A })) return [0, 0, 0];
1293
1333
  const e = t.find((s) => s.character === A);
1294
1334
  return e ? e.color : [0, 0, 0];
1295
1335
  }
1296
- He(A, t) {
1297
- return _.P(typeof A == "string" && A.length > 0, "Characters must be a string with at least one character.", { method: "getCharacterColors", providedValue: A }) ? Array.from(A).map((e) => this.ke(e, t) || [0, 0, 0]) : [[0, 0, 0]];
1336
+ Is(A, t) {
1337
+ return M._(typeof A == "string" && A.length > 0, "Characters must be a string with at least one character.", { method: "getCharacterColors", providedValue: A }) ? Array.from(A).map((e) => this.us(e, t) || [0, 0, 0]) : [[0, 0, 0]];
1298
1338
  }
1299
1339
  }
1300
- class xA {
1340
+ class bA {
1301
1341
  constructor(A, t = 16) {
1302
- n(this, "We");
1303
- n(this, "Je", []);
1304
- n(this, "Ve");
1305
- n(this, "Ke", 16);
1306
- n(this, "Ze", 0);
1307
- n(this, "je", 0);
1308
- n(this, "Xe", { width: 0, height: 0 });
1309
- n(this, "Ne");
1310
- n(this, "qe");
1311
- n(this, "AB");
1312
- n(this, "tB");
1313
- n(this, "eB");
1314
- this.Ke = t, this.qe = new wA(), this.AB = new mA(A), this.tB = new pA(), this.eB = new yA();
1315
- }
1316
- async BB(A) {
1342
+ Q(this, "ws");
1343
+ Q(this, "fs", []);
1344
+ Q(this, "ds");
1345
+ Q(this, "_s", 16);
1346
+ Q(this, "ps", 0);
1347
+ Q(this, "vs", 0);
1348
+ Q(this, "bs", { width: 0, height: 0 });
1349
+ Q(this, "Gs");
1350
+ Q(this, "Ms");
1351
+ Q(this, "$s");
1352
+ Q(this, "Ys");
1353
+ Q(this, "Fs");
1354
+ this._s = t, this.Ms = new mA(), this.$s = new yA(A), this.Ys = new vA(), this.Fs = new xA();
1355
+ }
1356
+ async Rs(A) {
1317
1357
  let t;
1318
1358
  if (A) {
1319
1359
  const e = await fetch(A);
1320
- if (!e.ok) throw new m(`Failed to load font file: ${e.status} ${e.statusText}`);
1360
+ if (!e.ok) throw new I(`Failed to load font file: ${e.status} ${e.statusText}`);
1321
1361
  t = await e.arrayBuffer();
1322
1362
  } else
1323
1363
  t = await (await fetch(`data:font/truetype;charset=utf-8;base64,AAEAAAAKAIAAAwAgT1MvMs+QEyQAAAEoAAAAYGNtYXAg7yVJAAAFjAAACSBnbHlmuHLTdAAAErQAAGi0aGVhZFvXdUwAAACsAAAANmhoZWELAQUCAAAA5AAAACRobXR4BACDgAAAAYgAAAQEbG9jYQAy54AAAA6sAAAECG1heHABIgCCAAABCAAAACBuYW1lVs/OSgAAe2gAAAOicG9zdABpADQAAH8MAAAAIAABAAAAAQAAzOWHqV8PPPUAAAQAAAAAAHxiGCcAAAAAfGIYJwAAAAAEAAQAAAAACAACAAEAAAAAAAEAAAQAAAAAAAQAAAAAAAcAAAEAAAAAAAAAAAAAAAAAAAEBAAEAAAEBAIAAIAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAgQAAZAABQAEAgACAAAAAAACAAIAAAACAAAzAMwAAAAABAAAAAAAAACAAACLAABw4wAAAAAAAAAAWUFMLgBAACAmawQAAAAAAAQAAAAAAAFRAAAAAAMABAAAAAAgAAAEAAAABAAAAAQAAAAEAAGABAABAAQAAIAEAACABAAAgAQAAIAEAAGABAABAAQAAQAEAACABAABAAQAAIAEAACABAABAAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAABAAQAAIAEAAEABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAABAAQAAIAEAAEABAAAgAQAAIAEAAEABAAAgAQAAIAEAACABAAAgAQAAIAEAAEABAAAgAQAAIAEAAGABAAAgAQAAIAEAAGABAAAgAQAAIAEAACABAAAgAQAAIAEAAEABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAABgAQAAQAEAACABAAAAAQAAgAEAACABAAAgAQAAIAEAACABAACAAQAAAAEAAIABAABgAQAAgAEAACABAAAgAQAAAAEAACABAAAAAQAAAAEAAAABAAAAAQAAAAEAAIABAADAAQAAAAEAAAABAAAgAQAAYAEAAAABAAAAAQAAIAEAAAABAAAgAQAAIAEAACABAAAAAQAAIAEAAAABAAAAAQAAIAEAAGABAAAAAQAAAAEAAAABAAAAAQAAIAEAACABAAAAAQAAIAEAACABAAAAAQAAIAEAACABAAAgAQAAAAEAACABAAAAAQAAAAEAAEABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAACAAQAAIAEAAAABAAAAAQAAAAEAACABAABAAQAAQAEAAEABAABAAQAAIAEAACABAAAAAQAAAAEAAAABAABAAQAAAAEAACABAAAAAQAAAAEAAIABAAAgAQAAAAEAAAABAAAAAQAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==\r
1324
1364
  `)).arrayBuffer();
1325
- await this.sB(t), this.We = y.parse(t)[0], await this.iB();
1365
+ await this.Ss(t), this.ws = m.parse(t)[0], await this.zs();
1326
1366
  }
1327
- QB(A) {
1328
- if (A === void 0) return this.Ke;
1329
- this.Ke = A, this.Xe = this.tB.calculateMaxGlyphDimensions(this.Je.map((e) => e.character), this.Ke, this.We);
1330
- const t = this.AB.createTextureAtlas(this.Je, this.Xe, this.Ke, this.We);
1331
- this.Ve = t.framebuffer, this.Ze = t.columns, this.je = t.rows;
1367
+ ks(A) {
1368
+ if (A === void 0) return this._s;
1369
+ this._s = A, this.bs = this.Ys.calculateMaxGlyphDimensions(this.fs.map((e) => e.character), this._s, this.ws);
1370
+ const t = this.$s.createTextureAtlas(this.fs, this.bs, this._s, this.ws);
1371
+ this.ds = t.framebuffer, this.ps = t.columns, this.vs = t.rows;
1332
1372
  }
1333
- async rB(A) {
1373
+ async Os(A) {
1334
1374
  try {
1335
1375
  const t = await fetch(A);
1336
- if (!t.ok) throw new m(`Failed to load font file: ${t.status} ${t.statusText}`);
1376
+ if (!t.ok) throw new I(`Failed to load font file: ${t.status} ${t.statusText}`);
1337
1377
  const e = await t.arrayBuffer();
1338
- await this.sB(e);
1339
- const s = y.parse(e);
1378
+ await this.Ss(e);
1379
+ const s = m.parse(e);
1340
1380
  if (!s || s.length === 0) throw Error("Failed to parse font file");
1341
- this.We = s[0], await this.iB();
1381
+ this.ws = s[0], await this.zs();
1342
1382
  } catch (t) {
1343
- throw new m("Failed to load font: " + (t instanceof Error ? t.message : "Unknown error"), t);
1383
+ throw new I("Failed to load font: " + (t instanceof Error ? t.message : "Unknown error"), t);
1344
1384
  }
1345
1385
  }
1346
- async sB(A) {
1386
+ async Ss(A) {
1347
1387
  const t = Date.now();
1348
- this.Ne = new FontFace("CustomFont_" + t, A), await this.Ne.load(), document.fonts.add(this.Ne);
1388
+ this.Gs = new FontFace("CustomFont_" + t, A), await this.Gs.load(), document.fonts.add(this.Gs);
1349
1389
  }
1350
- async iB() {
1351
- const A = this.qe.extractCharacters(this.We), t = this.qe.filterProblematicCharacters(A);
1352
- this.Je = this.eB.createCharacterObjects(t, this.We), this.Xe = this.tB.calculateMaxGlyphDimensions(t, this.Ke, this.We);
1353
- const e = this.AB.createTextureAtlas(this.Je, this.Xe, this.Ke, this.We);
1354
- this.Ve = e.framebuffer, this.Ze = e.columns, this.je = e.rows;
1390
+ async zs() {
1391
+ const A = this.Ms.extractCharacters(this.ws), t = this.Ms.filterProblematicCharacters(A);
1392
+ this.fs = this.Fs.createCharacterObjects(t, this.ws), this.bs = this.Ys.calculateMaxGlyphDimensions(t, this._s, this.ws);
1393
+ const e = this.$s.createTextureAtlas(this.fs, this.bs, this._s, this.ws);
1394
+ this.ds = e.framebuffer, this.ps = e.columns, this.vs = e.rows;
1355
1395
  }
1356
- ke(A) {
1357
- return this.eB.ke(A, this.Je);
1396
+ us(A) {
1397
+ return this.Fs.us(A, this.fs);
1358
1398
  }
1359
- He(A) {
1360
- return this.eB.He(A, this.Je);
1399
+ Is(A) {
1400
+ return this.Fs.Is(A, this.fs);
1361
1401
  }
1362
- W() {
1363
- this.Ve.W(), document.fonts.delete(this.Ne);
1402
+ zA() {
1403
+ this.ds.zA(), document.fonts.delete(this.Gs);
1364
1404
  }
1365
1405
  get fontFramebuffer() {
1366
- return this.Ve;
1406
+ return this.ds;
1367
1407
  }
1368
1408
  get characters() {
1369
- return this.Je;
1409
+ return this.fs;
1370
1410
  }
1371
1411
  get textureColumns() {
1372
- return this.Ze;
1412
+ return this.ps;
1373
1413
  }
1374
1414
  get textureRows() {
1375
- return this.je;
1415
+ return this.vs;
1376
1416
  }
1377
1417
  get maxGlyphDimensions() {
1378
- return this.Xe;
1418
+ return this.bs;
1379
1419
  }
1380
1420
  get fontSize() {
1381
- return this.Ke;
1421
+ return this._s;
1382
1422
  }
1383
1423
  get font() {
1384
- return this.We;
1424
+ return this.ws;
1385
1425
  }
1386
1426
  }
1387
- class vA {
1427
+ class RA {
1388
1428
  constructor(A, t, e) {
1389
- n(this, "EB");
1390
- n(this, "nB");
1391
- n(this, "I");
1392
- n(this, "p");
1393
- n(this, "oB");
1394
- n(this, "gB");
1395
- n(this, "aB");
1396
- n(this, "hB");
1397
- n(this, "cB");
1398
- this.aB = A, this.hB = t, this.cB = e, this.fA();
1399
- }
1400
- fA() {
1401
- this.EB = Math.floor(this.aB.width / this.hB), this.nB = Math.floor(this.aB.height / this.cB), this.I = this.EB * this.hB, this.p = this.nB * this.cB, this.oB = Math.floor((this.aB.width - this.I) / 2), this.gB = Math.floor((this.aB.height - this.p) / 2);
1402
- }
1403
- CB(A, t) {
1404
- this.hB = A, this.cB = t, this.fA();
1429
+ Q(this, "Ls");
1430
+ Q(this, "Us");
1431
+ Q(this, "PA");
1432
+ Q(this, "uA");
1433
+ Q(this, "Ts");
1434
+ Q(this, "Hs");
1435
+ Q(this, "Ws");
1436
+ Q(this, "Ks");
1437
+ Q(this, "Js");
1438
+ this.Ws = A, this.Ks = t, this.Js = e, this.iA();
1439
+ }
1440
+ iA() {
1441
+ this.Ls = Math.floor(this.Ws.width / this.Ks), this.Us = Math.floor(this.Ws.height / this.Js), this.PA = this.Ls * this.Ks, this.uA = this.Us * this.Js, this.Ts = Math.floor((this.Ws.width - this.PA) / 2), this.Hs = Math.floor((this.Ws.height - this.uA) / 2);
1442
+ }
1443
+ Vs(A, t) {
1444
+ this.Ks = A, this.Js = t, this.iA();
1405
1445
  }
1406
1446
  get cellWidth() {
1407
- return this.hB;
1447
+ return this.Ks;
1408
1448
  }
1409
1449
  get cellHeight() {
1410
- return this.cB;
1450
+ return this.Js;
1411
1451
  }
1412
1452
  get cols() {
1413
- return this.EB;
1453
+ return this.Ls;
1414
1454
  }
1415
1455
  get rows() {
1416
- return this.nB;
1456
+ return this.Us;
1417
1457
  }
1418
1458
  get width() {
1419
- return this.I;
1459
+ return this.PA;
1420
1460
  }
1421
1461
  get height() {
1422
- return this.p;
1462
+ return this.uA;
1423
1463
  }
1424
1464
  get offsetX() {
1425
- return this.oB;
1465
+ return this.Ts;
1426
1466
  }
1427
1467
  get offsetY() {
1428
- return this.gB;
1468
+ return this.Hs;
1429
1469
  }
1430
1470
  }
1431
- class bA {
1471
+ class TA {
1432
1472
  constructor(A = {}) {
1433
- n(this, "aB");
1434
- n(this, "DB");
1435
- n(this, "lB");
1436
- A.canvas ? (this.aB = A.canvas, this.lB = !1) : (this.aB = this.PB(A.width, A.height), this.lB = !0), this.aB.style.imageRendering = "pixelated";
1473
+ Q(this, "Ws");
1474
+ Q(this, "Zs");
1475
+ Q(this, "Ns");
1476
+ A.canvas ? (this.Ws = A.canvas, this.Ns = !1) : (this.Ws = this.Xs(A.width, A.height), this.Ns = !0), this.Ws.style.imageRendering = "pixelated";
1437
1477
  }
1438
- PB(A, t) {
1478
+ Xs(A, t) {
1439
1479
  const e = document.createElement("canvas");
1440
1480
  return e.className = "textmodeCanvas", e.style.imageRendering = "pixelated", e.width = A || 800, e.height = t || 600, document.body.appendChild(e), e;
1441
1481
  }
1442
- O(A, t) {
1443
- this.aB.width = A ?? this.aB.width, this.aB.height = t ?? this.aB.height;
1482
+ js(A, t) {
1483
+ this.Ws.width = A ?? this.Ws.width, this.Ws.height = t ?? this.Ws.height;
1444
1484
  }
1445
- uB() {
1446
- const A = this.aB.getContext("webgl2", { alpha: !0, premultipliedAlpha: !1, preserveDrawingBuffer: !0, antialias: !1, depth: !1, stencil: !1, powerPreference: "high-performance" });
1447
- if (!A) throw new m("`textmode.js` requires WebGL2 support.");
1485
+ qs() {
1486
+ const A = this.Ws.getContext("webgl2", { alpha: !0, premultipliedAlpha: !1, preserveDrawingBuffer: !0, antialias: !1, depth: !1, stencil: !1, powerPreference: "high-performance" });
1487
+ if (!A) throw new I("`textmode.js` requires WebGL2 support.");
1448
1488
  return A;
1449
1489
  }
1450
- W() {
1451
- this.DB && this.DB.disconnect();
1452
- const A = this.aB.getContext("webgl") || this.aB.getContext("webgl2");
1490
+ zA() {
1491
+ this.Zs && this.Zs.disconnect();
1492
+ const A = this.Ws.getContext("webgl") || this.Ws.getContext("webgl2");
1453
1493
  if (A) {
1454
1494
  const t = A.getExtension("WEBGL_lose_context");
1455
1495
  t && t.loseContext();
1456
1496
  }
1457
- this.lB && this.aB.parentNode && this.aB.parentNode.removeChild(this.aB);
1497
+ this.Ns && this.Ws.parentNode && this.Ws.parentNode.removeChild(this.Ws);
1458
1498
  }
1459
1499
  get canvas() {
1460
- return this.aB;
1500
+ return this.Ws;
1461
1501
  }
1462
1502
  get width() {
1463
- return this.aB.width;
1503
+ return this.Ws.width;
1464
1504
  }
1465
1505
  get height() {
1466
- return this.aB.height;
1506
+ return this.Ws.height;
1467
1507
  }
1468
1508
  }
1469
- class RA {
1509
+ class MA {
1470
1510
  constructor(A = 60) {
1471
- n(this, "IB");
1472
- n(this, "wB");
1473
- n(this, "fB", null);
1474
- n(this, "dB", 0);
1475
- n(this, "pB", !0);
1476
- n(this, "_B", 0);
1477
- n(this, "mB", 0);
1478
- n(this, "vB", []);
1479
- n(this, "xB", 10);
1480
- n(this, "yB", 0);
1481
- this.IB = A, this.wB = 1e3 / A;
1511
+ Q(this, "Ai");
1512
+ Q(this, "ti");
1513
+ Q(this, "ei", null);
1514
+ Q(this, "si", 0);
1515
+ Q(this, "ii", !0);
1516
+ Q(this, "Bi", 0);
1517
+ Q(this, "Qi", 0);
1518
+ Q(this, "Ei", []);
1519
+ Q(this, "ri", 10);
1520
+ Q(this, "ni", 0);
1521
+ this.Ai = A, this.ti = 1e3 / A;
1482
1522
  }
1483
1523
  start(A) {
1484
- if (!this.pB) return;
1485
- this.dB = performance.now();
1524
+ if (!this.ii) return;
1525
+ this.si = performance.now();
1486
1526
  const t = (e) => {
1487
- if (!this.pB) return void (this.fB = null);
1488
- const s = e - this.dB;
1489
- s >= this.wB && (A(), this.dB = e - s % this.wB), this.pB && (this.fB = requestAnimationFrame(t));
1527
+ if (!this.ii) return void (this.ei = null);
1528
+ const s = e - this.si;
1529
+ s >= this.ti && (A(), this.si = e - s % this.ti), this.ii && (this.ei = requestAnimationFrame(t));
1490
1530
  };
1491
- this.fB = requestAnimationFrame(t);
1531
+ this.ei = requestAnimationFrame(t);
1492
1532
  }
1493
1533
  stop() {
1494
- this.fB && (cancelAnimationFrame(this.fB), this.fB = null);
1534
+ this.ei && (cancelAnimationFrame(this.ei), this.ei = null);
1495
1535
  }
1496
1536
  pause() {
1497
- this.pB && (this.pB = !1, this.stop());
1537
+ this.ii && (this.ii = !1, this.stop());
1498
1538
  }
1499
1539
  resume(A) {
1500
- this.pB || (this.pB = !0, this.start(A));
1540
+ this.ii || (this.ii = !0, this.start(A));
1501
1541
  }
1502
1542
  frameRate(A, t) {
1503
- if (A === void 0) return this._B;
1504
- this.IB = A, this.wB = 1e3 / A, this.pB && t && (this.stop(), this.start(t));
1543
+ if (A === void 0) return this.Bi;
1544
+ this.Ai = A, this.ti = 1e3 / A, this.ii && t && (this.stop(), this.start(t));
1505
1545
  }
1506
1546
  measureFrameRate() {
1507
1547
  const A = performance.now();
1508
- if (this.mB > 0) {
1509
- const t = A - this.mB;
1510
- this.vB.push(t), this.vB.length > this.xB && this.vB.shift();
1511
- const e = this.vB.reduce((s, r) => s + r, 0) / this.vB.length;
1512
- this._B = 1e3 / e;
1548
+ if (this.Qi > 0) {
1549
+ const t = A - this.Qi;
1550
+ this.Ei.push(t), this.Ei.length > this.ri && this.Ei.shift();
1551
+ const e = this.Ei.reduce((s, i) => s + i, 0) / this.Ei.length;
1552
+ this.Bi = 1e3 / e;
1513
1553
  }
1514
- this.mB = A;
1554
+ this.Qi = A;
1515
1555
  }
1516
1556
  get isLooping() {
1517
- return this.pB;
1557
+ return this.ii;
1518
1558
  }
1519
1559
  get frameRateLimit() {
1520
- return this.IB;
1560
+ return this.Ai;
1521
1561
  }
1522
1562
  get currentFrameRate() {
1523
- return this._B;
1563
+ return this.Bi;
1524
1564
  }
1525
1565
  get frameCount() {
1526
- return this.yB;
1566
+ return this.ni;
1527
1567
  }
1528
1568
  set frameCount(A) {
1529
- this.yB = A;
1569
+ this.ni = A;
1530
1570
  }
1531
1571
  incrementFrame() {
1532
- this.yB++;
1572
+ this.ni++;
1533
1573
  }
1534
1574
  resetFrameCount() {
1535
- this.yB = 0;
1575
+ this.ni = 0;
1576
+ }
1577
+ }
1578
+ class FA {
1579
+ constructor() {
1580
+ Q(this, "gi", /* @__PURE__ */ new Map());
1581
+ Q(this, "oi", null);
1582
+ Q(this, "ai", null);
1583
+ Q(this, "hi");
1584
+ Q(this, "ci");
1585
+ Q(this, "Ci", !1);
1586
+ Q(this, "li");
1587
+ Q(this, "Di");
1588
+ Q(this, "Pi", { ArrowUp: "UP_ARROW", ArrowDown: "DOWN_ARROW", ArrowLeft: "LEFT_ARROW", ArrowRight: "RIGHT_ARROW", F1: "F1", F2: "F2", F3: "F3", F4: "F4", F5: "F5", F6: "F6", F7: "F7", F8: "F8", F9: "F9", F10: "F10", F11: "F11", F12: "F12", Enter: "ENTER", Return: "RETURN", Tab: "TAB", Escape: "ESCAPE", Backspace: "BACKSPACE", Delete: "DELETE", Insert: "INSERT", Home: "HOME", End: "END", PageUp: "PAGE_UP", PageDown: "PAGE_DOWN", Shift: "SHIFT", Control: "CONTROL", Alt: "ALT", Meta: "META", " ": "SPACE" });
1589
+ }
1590
+ ui() {
1591
+ this.Ci || (this.hi = (A) => {
1592
+ this.Ii(A);
1593
+ }, this.ci = (A) => {
1594
+ this.wi(A);
1595
+ }, window.addEventListener("keydown", this.hi, { passive: !1 }), window.addEventListener("keyup", this.ci, { passive: !1 }), this.Ci = !0);
1596
+ }
1597
+ fi() {
1598
+ this.Ci && (window.removeEventListener("keydown", this.hi), window.removeEventListener("keyup", this.ci), this.Ci = !1, this.gi.clear(), this.oi = null, this.ai = null);
1599
+ }
1600
+ di(A) {
1601
+ this.li = A;
1602
+ }
1603
+ _i(A) {
1604
+ this.Di = A;
1605
+ }
1606
+ pi(A) {
1607
+ const t = this.mi(A), e = this.gi.get(A) || this.gi.get(t);
1608
+ return (e == null ? void 0 : e.isPressed) || !1;
1609
+ }
1610
+ yi() {
1611
+ return this.oi;
1612
+ }
1613
+ bi() {
1614
+ return this.ai;
1615
+ }
1616
+ Gi() {
1617
+ const A = [];
1618
+ for (const [t, e] of this.gi) e.isPressed && A.push(t);
1619
+ return A;
1620
+ }
1621
+ Mi() {
1622
+ return { ctrl: this.pi("Control"), shift: this.pi("Shift"), alt: this.pi("Alt"), meta: this.pi("Meta") };
1623
+ }
1624
+ $i() {
1625
+ this.gi.clear(), this.oi = null, this.ai = null;
1626
+ }
1627
+ Ii(A) {
1628
+ const t = A.key, e = Date.now();
1629
+ this.gi.has(t) || this.gi.set(t, { isPressed: !1, lastPressTime: 0, lastReleaseTime: 0 });
1630
+ const s = this.gi.get(t);
1631
+ if (!s.isPressed && (s.isPressed = !0, s.lastPressTime = e, this.oi = t, this.li)) {
1632
+ const i = { key: t, keyCode: A.keyCode, ctrlKey: A.ctrlKey, shiftKey: A.shiftKey, altKey: A.altKey, metaKey: A.metaKey, isPressed: !0, originalEvent: A };
1633
+ this.li(i);
1634
+ }
1635
+ }
1636
+ wi(A) {
1637
+ const t = A.key, e = Date.now();
1638
+ this.gi.has(t) || this.gi.set(t, { isPressed: !1, lastPressTime: 0, lastReleaseTime: 0 });
1639
+ const s = this.gi.get(t);
1640
+ if (s.isPressed = !1, s.lastReleaseTime = e, this.ai = t, this.Di) {
1641
+ const i = { key: t, keyCode: A.keyCode, ctrlKey: A.ctrlKey, shiftKey: A.shiftKey, altKey: A.altKey, metaKey: A.metaKey, isPressed: !1, originalEvent: A };
1642
+ this.Di(i);
1643
+ }
1644
+ }
1645
+ mi(A) {
1646
+ return this.Pi[A] || A.toLowerCase();
1647
+ }
1648
+ }
1649
+ class GA {
1650
+ constructor(A) {
1651
+ Q(this, "Ws");
1652
+ Q(this, "xi");
1653
+ Q(this, "Yi", { x: -1, y: -1 });
1654
+ Q(this, "Fi", { x: -1, y: -1 });
1655
+ Q(this, "Ri", null);
1656
+ Q(this, "Si");
1657
+ Q(this, "zi");
1658
+ Q(this, "ki");
1659
+ Q(this, "Oi");
1660
+ Q(this, "Li");
1661
+ Q(this, "Ui");
1662
+ Q(this, "Ci", !1);
1663
+ Q(this, "Ti");
1664
+ Q(this, "Hi");
1665
+ Q(this, "Wi");
1666
+ Q(this, "Ki");
1667
+ Q(this, "Ji");
1668
+ this.Ws = A;
1669
+ }
1670
+ Rs(A) {
1671
+ this.xi = A, this.Vi();
1672
+ }
1673
+ ui() {
1674
+ if (this.Ci) return;
1675
+ const A = this.Ws.canvas;
1676
+ this.Si = (t) => {
1677
+ this.Zi(t), this.Ni(t);
1678
+ }, this.zi = () => {
1679
+ this.Fi = { ...this.Yi }, this.Yi.x = -1, this.Yi.y = -1, this.Ri = null;
1680
+ }, this.ki = (t) => {
1681
+ this.Zi(t), this.Xi(t);
1682
+ }, this.Oi = (t) => {
1683
+ this.Zi(t), this.ji(t);
1684
+ }, this.Li = (t) => {
1685
+ this.Zi(t), this.qi(t);
1686
+ }, this.Ui = (t) => {
1687
+ this.Zi(t), this.AB(t);
1688
+ }, A.addEventListener("mousemove", this.Si, { passive: !0 }), A.addEventListener("mouseleave", this.zi, { passive: !0 }), A.addEventListener("mousedown", this.ki, { passive: !0 }), A.addEventListener("mouseup", this.Oi, { passive: !0 }), A.addEventListener("click", this.Li, { passive: !0 }), A.addEventListener("wheel", this.Ui, { passive: !1 }), this.Ci = !0;
1689
+ }
1690
+ fi() {
1691
+ if (!this.Ci) return;
1692
+ const A = this.Ws.canvas;
1693
+ A.removeEventListener("mousemove", this.Si), A.removeEventListener("mouseleave", this.zi), A.removeEventListener("mousedown", this.ki), A.removeEventListener("mouseup", this.Oi), A.removeEventListener("click", this.Li), A.removeEventListener("wheel", this.Ui), this.Ci = !1;
1694
+ }
1695
+ Vi() {
1696
+ if (this.Ci) try {
1697
+ if (this.Ri) {
1698
+ const A = new MouseEvent("mousemove", { clientX: this.Ri.x, clientY: this.Ri.y, bubbles: !1, cancelable: !1 });
1699
+ this.Zi(A);
1700
+ } else this.Yi.x !== -1 && this.Yi.y !== -1 && (this.Yi.x >= this.xi.cols || this.Yi.y >= this.xi.rows) && (this.Yi.x = -1, this.Yi.y = -1);
1701
+ } catch {
1702
+ this.Yi.x = -1, this.Yi.y = -1;
1703
+ }
1704
+ }
1705
+ tB(A) {
1706
+ this.Ti = A;
1707
+ }
1708
+ di(A) {
1709
+ this.Hi = A;
1710
+ }
1711
+ _i(A) {
1712
+ this.Wi = A;
1713
+ }
1714
+ eB(A) {
1715
+ this.Ki = A;
1716
+ }
1717
+ sB(A) {
1718
+ this.Ji = A;
1719
+ }
1720
+ iB() {
1721
+ return { x: this.Yi.x, y: this.Yi.y };
1722
+ }
1723
+ Ni(A) {
1724
+ if (this.Ki) {
1725
+ const t = { position: { ...this.Yi }, previousPosition: { ...this.Fi }, originalEvent: A };
1726
+ this.Ki(t);
1727
+ }
1728
+ }
1729
+ Xi(A) {
1730
+ if (this.Hi) {
1731
+ const t = { position: { ...this.Yi }, previousPosition: { ...this.Fi }, button: A.button, originalEvent: A };
1732
+ this.Hi(t);
1733
+ }
1734
+ }
1735
+ ji(A) {
1736
+ if (this.Wi) {
1737
+ const t = { position: { ...this.Yi }, previousPosition: { ...this.Fi }, button: A.button, originalEvent: A };
1738
+ this.Wi(t);
1739
+ }
1740
+ }
1741
+ qi(A) {
1742
+ if (this.Ti) {
1743
+ const t = { position: { ...this.Yi }, previousPosition: { ...this.Fi }, button: A.button, originalEvent: A };
1744
+ this.Ti(t);
1745
+ }
1746
+ }
1747
+ AB(A) {
1748
+ if (this.Ji) {
1749
+ const t = { position: { ...this.Yi }, previousPosition: { ...this.Fi }, delta: { x: A.deltaX, y: A.deltaY }, originalEvent: A };
1750
+ this.Ji(t);
1751
+ }
1752
+ }
1753
+ Zi(A) {
1754
+ const t = this.Ws.canvas;
1755
+ this.Fi = { ...this.Yi }, this.Ri = { x: A.clientX, y: A.clientY };
1756
+ const e = t.getBoundingClientRect(), s = A.clientX - e.left, i = A.clientY - e.top, B = t.width / e.width, r = i * (t.height / e.height), n = s * B - this.xi.offsetX, o = r - this.xi.offsetY, a = Math.floor(n / this.xi.cellWidth), g = Math.floor(o / this.xi.cellHeight);
1757
+ a >= 0 && a < this.xi.cols && g >= 0 && g < this.xi.rows ? (this.Yi.x = a, this.Yi.y = g) : (this.Yi.x = -1, this.Yi.y = -1);
1536
1758
  }
1537
1759
  }
1538
- const TA = (E) => class extends E {
1760
+ const YA = (E) => class extends E {
1539
1761
  rotate(A = 0, t = 0, e = 0) {
1540
- this.ze.state._A(A), this.ze.state.mA(t), this.ze.state.vA(e);
1762
+ this.vA.state.EA(A), this.vA.state.rA(t), this.vA.state.nA(e);
1541
1763
  }
1542
1764
  rotateX(A) {
1543
- this.ze.state._A(A);
1765
+ this.vA.state.EA(A);
1544
1766
  }
1545
1767
  rotateY(A) {
1546
- this.ze.state.mA(A);
1768
+ this.vA.state.rA(A);
1547
1769
  }
1548
1770
  rotateZ(A) {
1549
- this.ze.state.vA(A);
1771
+ this.vA.state.nA(A);
1550
1772
  }
1551
1773
  push() {
1552
- this.ze.state.IA();
1774
+ this.vA.state.J();
1553
1775
  }
1554
1776
  pop() {
1555
- this.ze.state.wA();
1777
+ this.vA.state.sA();
1556
1778
  }
1557
1779
  rect(A, t, e = 1, s = 1) {
1558
- this.ze.Nt(A, t, e, s);
1780
+ this.vA.ve(A, t, e, s);
1781
+ }
1782
+ point(A, t) {
1783
+ this.vA.ve(A, t, 1, 1);
1559
1784
  }
1560
1785
  line(A, t, e, s) {
1561
- this.ze.qt(A, t, e, s);
1786
+ this.vA.ye(A, t, e, s);
1562
1787
  }
1563
1788
  lineWeight(A) {
1564
- this.ze.state.pA(A);
1789
+ this.vA.state.QA(A);
1565
1790
  }
1566
1791
  background(A, t = A, e = A, s = 255) {
1567
- this.ze.ie(A, t, e, s);
1792
+ this.vA.Ye(A, t, e, s);
1568
1793
  }
1569
1794
  char(A) {
1570
- this.ze.state.xA(this.We.ke(A));
1795
+ this.vA.state.gA(this.ws.us(A));
1571
1796
  }
1572
1797
  charColor(A, t, e) {
1573
- this.ze.state.yA(A, t, e);
1798
+ this.vA.state.oA(A, t, e);
1574
1799
  }
1575
1800
  cellColor(A, t, e) {
1576
- this.ze.state.bA(A, t, e);
1801
+ this.vA.state.aA(A, t, e);
1577
1802
  }
1578
1803
  flipX(A) {
1579
- this.ze.state.GA(A);
1804
+ this.vA.state.hA(A);
1580
1805
  }
1581
1806
  flipY(A) {
1582
- this.ze.state.$A(A);
1807
+ this.vA.state.cA(A);
1583
1808
  }
1584
1809
  charRotation(A) {
1585
- this.ze.state.YA(A);
1810
+ this.vA.state.lA(A);
1586
1811
  }
1587
1812
  invert(A) {
1588
- this.ze.state.MA(A);
1813
+ this.vA.state.CA(A);
1589
1814
  }
1590
1815
  clear() {
1591
- this.ze.ie(0, 0, 0, 0);
1816
+ this.vA.Ye(0, 0, 0, 0);
1592
1817
  }
1593
1818
  ellipse(A, t, e, s) {
1594
- this.ze.Ae(A, t, e / 2, s / 2);
1819
+ this.vA.be(A, t, e / 2, s / 2);
1595
1820
  }
1596
- triangle(A, t, e, s, r, i) {
1597
- this.ze.te(A, t, e, s, r, i);
1821
+ triangle(A, t, e, s, i, B) {
1822
+ this.vA.Ge(A, t, e, s, i, B);
1598
1823
  }
1599
- bezierCurve(A, t, e, s, r, i, B, Q) {
1600
- this.ze.ee(A, t, e, s, r, i, B, Q);
1824
+ bezierCurve(A, t, e, s, i, B, r, n) {
1825
+ this.vA.Me(A, t, e, s, i, B, r, n);
1601
1826
  }
1602
- arc(A, t, e, s, r, i) {
1603
- this.ze.se(A, t, e, s, r, i);
1827
+ arc(A, t, e, s, i, B) {
1828
+ this.vA.xe(A, t, e, s, i, B);
1604
1829
  }
1605
1830
  shader(A) {
1606
- this.ze.Vt(A);
1831
+ this.vA.de(A);
1607
1832
  }
1608
1833
  setUniform(A, t) {
1609
- this.ze.Kt(A, t);
1834
+ this.vA.VA(A, t);
1610
1835
  }
1611
1836
  setUniforms(A) {
1612
- this.ze.Zt(A);
1837
+ this.vA._e(A);
1613
1838
  }
1614
1839
  createFilterShader(A) {
1615
- return this.ze.jt(A);
1840
+ return this.vA.et(A);
1841
+ }
1842
+ createFramebuffer(A) {
1843
+ return this.vA.$e(A.width, A.height, 5, { filter: "nearest", wrap: "clamp", format: "rgba", type: "unsigned_byte" });
1844
+ }
1845
+ image(A, t, e, s, i) {
1846
+ this.vA.pe(A, t, e, s ?? A.width, i ?? A.height);
1616
1847
  }
1617
1848
  };
1618
1849
  class O {
1619
- bB(A) {
1620
- const t = A.U(0), e = A.U(1), s = A.U(2), r = A.U(3);
1621
- return { characterPixels: t, primaryColorPixels: e, secondaryColorPixels: s, transformPixels: A.U(4), rotationPixels: r };
1850
+ BB(A) {
1851
+ const t = A.xA(0), e = A.xA(1), s = A.xA(2), i = A.xA(3);
1852
+ return { characterPixels: t, primaryColorPixels: e, secondaryColorPixels: s, transformPixels: A.xA(4), rotationPixels: i };
1622
1853
  }
1623
- GB(A, t) {
1854
+ QB(A, t) {
1624
1855
  return A[t] + (A[t + 1] << 8);
1625
1856
  }
1626
- $B(A, t) {
1857
+ EB(A, t) {
1627
1858
  return { r: A[t], g: A[t + 1], b: A[t + 2], a: A[t + 3] };
1628
1859
  }
1629
1860
  }
1630
1861
  class W {
1631
- MB(A, t) {
1862
+ rB(A, t) {
1632
1863
  return new Blob([A], { type: t });
1633
1864
  }
1634
- YB(A, t, e) {
1865
+ nB(A, t, e) {
1635
1866
  try {
1636
- const s = this.MB(A, e), r = URL.createObjectURL(s), i = document.createElement("a");
1637
- i.href = r, i.download = t, i.style.display = "none", i.rel = "noopener", document.body.appendChild(i), i.click(), document.body.removeChild(i), URL.revokeObjectURL(r);
1867
+ const s = this.rB(A, e), i = URL.createObjectURL(s), B = document.createElement("a");
1868
+ B.href = i, B.download = t, B.style.display = "none", B.rel = "noopener", document.body.appendChild(B), B.click(), document.body.removeChild(B), URL.revokeObjectURL(i);
1638
1869
  } catch (s) {
1639
1870
  throw console.error("Failed to download file:", s), Error("File download failed: " + (s instanceof Error ? s.message : "Unknown error"));
1640
1871
  }
1641
1872
  }
1642
- zB() {
1873
+ gB() {
1643
1874
  return (/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace(/:/g, "-");
1644
1875
  }
1645
- RB() {
1876
+ oB() {
1646
1877
  const A = /* @__PURE__ */ new Date();
1647
1878
  return { date: A.toISOString().split("T")[0], time: A.toTimeString().split(" ")[0].replace(/:/g, "-") };
1648
1879
  }
1649
- SB(A) {
1880
+ aB(A) {
1650
1881
  return A.replace(/[<>:"/\\|?*]/g, "_").replace(/\s+/g, "_").replace(/_{2,}/g, "_").replace(/^_+|_+$/g, "").substring(0, 255);
1651
1882
  }
1652
- TB() {
1653
- return "textmode-export-" + this.zB();
1883
+ hB() {
1884
+ return "textmode-export-" + this.gB();
1654
1885
  }
1655
1886
  }
1656
- class MA extends O {
1657
- FB(A, t, e) {
1658
- const s = A[e] === 255, r = A[e + 1] === 255, i = A[e + 2] === 255, B = t[e], Q = t[e + 1];
1659
- return { isInverted: s, flipHorizontal: r, flipVertical: i, rotation: Math.round(360 * (B + Q / 255) / 255 * 100) / 100 };
1887
+ class _A extends O {
1888
+ cB(A, t, e) {
1889
+ const s = A[e] === 255, i = A[e + 1] === 255, B = A[e + 2] === 255, r = t[e], n = t[e + 1];
1890
+ return { isInverted: s, flipHorizontal: i, flipVertical: B, rotation: Math.round(360 * (r + n / 255) / 255 * 100) / 100 };
1660
1891
  }
1661
- OB(A, t, e) {
1892
+ CB(A, t, e) {
1662
1893
  return { x: A, y: t, cellX: A * e.cellWidth, cellY: t * e.cellHeight };
1663
1894
  }
1664
- UB(A, t) {
1895
+ lB(A, t) {
1665
1896
  const e = [];
1666
1897
  let s = 0;
1667
- for (let r = 0; r < t.rows; r++) for (let i = 0; i < t.cols; i++) {
1668
- const B = 4 * s, Q = this.GB(A.characterPixels, B);
1669
- let o = this.$B(A.primaryColorPixels, B), h = this.$B(A.secondaryColorPixels, B);
1670
- const a = this.FB(A.transformPixels, A.rotationPixels, B);
1671
- if (a.isInverted) {
1672
- const l = o;
1673
- o = h, h = l;
1898
+ for (let i = 0; i < t.rows; i++) for (let B = 0; B < t.cols; B++) {
1899
+ const r = 4 * s, n = this.QB(A.characterPixels, r);
1900
+ let o = this.EB(A.primaryColorPixels, r), a = this.EB(A.secondaryColorPixels, r);
1901
+ const g = this.cB(A.transformPixels, A.rotationPixels, r);
1902
+ if (g.isInverted) {
1903
+ const c = o;
1904
+ o = a, a = c;
1674
1905
  }
1675
- const g = this.OB(i, r, t);
1676
- e.push({ charIndex: Q, primaryColor: o, secondaryColor: h, transform: a, position: g }), s++;
1906
+ const h = this.CB(B, i, t);
1907
+ e.push({ charIndex: n, primaryColor: o, secondaryColor: a, transform: g, position: h }), s++;
1677
1908
  }
1678
1909
  return e;
1679
1910
  }
1680
1911
  }
1681
- class _A {
1682
- LB(A, t) {
1912
+ class SA {
1913
+ DB(A, t) {
1683
1914
  const e = A.cmap;
1684
1915
  for (const s of e.tables) if (s.format === 4) {
1685
- const r = s;
1686
- for (let i = 0; i < r.startCount.length; i++) if (t >= r.startCount[i] && t <= r.endCount[i]) {
1687
- if (r.idRangeOffset[i] === 0) return t + r.idDelta[i] & 65535;
1916
+ const i = s;
1917
+ for (let B = 0; B < i.startCount.length; B++) if (t >= i.startCount[B] && t <= i.endCount[B]) {
1918
+ if (i.idRangeOffset[B] === 0) return t + i.idDelta[B] & 65535;
1688
1919
  {
1689
- const B = r.idRangeOffset[i] / 2 + (t - r.startCount[i]) - (r.startCount.length - i);
1690
- if (B >= 0 && B < r.glyphIdArray.length) {
1691
- const Q = r.glyphIdArray[B];
1692
- if (Q !== 0) return Q + r.idDelta[i] & 65535;
1920
+ const r = i.idRangeOffset[B] / 2 + (t - i.startCount[B]) - (i.startCount.length - B);
1921
+ if (r >= 0 && r < i.glyphIdArray.length) {
1922
+ const n = i.glyphIdArray[r];
1923
+ if (n !== 0) return n + i.idDelta[B] & 65535;
1693
1924
  }
1694
1925
  }
1695
1926
  }
1696
1927
  } else if (s.format === 12) {
1697
- const r = s;
1698
- for (let i = 0; i < r.groups.length; i += 3) {
1699
- const B = r.groups[i], Q = r.groups[i + 1], o = r.groups[i + 2];
1700
- if (t >= B && t <= Q) return o + (t - B);
1928
+ const i = s;
1929
+ for (let B = 0; B < i.groups.length; B += 3) {
1930
+ const r = i.groups[B], n = i.groups[B + 1], o = i.groups[B + 2];
1931
+ if (t >= r && t <= n) return o + (t - r);
1701
1932
  }
1702
1933
  }
1703
1934
  return 0;
1704
1935
  }
1705
- kB(A, t, e, s, r) {
1706
- const i = r / A.head.unitsPerEm;
1707
- return { getBoundingBox: () => ({ x1: e + t.xMin * i, y1: s + -t.yMax * i, x2: e + t.xMax * i, y2: s + -t.yMin * i }), toSVG: () => this.HB(t, e, s, i) };
1936
+ PB(A, t, e, s, i) {
1937
+ const B = i / A.head.unitsPerEm;
1938
+ return { getBoundingBox: () => ({ x1: e + t.xMin * B, y1: s + -t.yMax * B, x2: e + t.xMax * B, y2: s + -t.yMin * B }), toSVG: () => this.uB(t, e, s, B) };
1708
1939
  }
1709
- HB(A, t, e, s) {
1940
+ uB(A, t, e, s) {
1710
1941
  if (!A || !A.xs) return "";
1711
- const { xs: r, ys: i, endPts: B, flags: Q } = A;
1712
- if (!(r && i && B && Q)) return "";
1713
- let o = "", h = 0;
1714
- for (let a = 0; a < B.length; a++) {
1715
- const g = B[a];
1716
- if (!(g < h)) {
1717
- if (g >= h) {
1718
- const l = t + r[h] * s, c = e - i[h] * s;
1719
- o += `M${l.toFixed(2)},${c.toFixed(2)}`;
1720
- let C = h + 1;
1721
- for (; C <= g; )
1722
- if (1 & Q[C]) {
1723
- const d = t + r[C] * s, I = e - i[C] * s;
1724
- o += `L${d.toFixed(2)},${I.toFixed(2)}`, C++;
1942
+ const { xs: i, ys: B, endPts: r, flags: n } = A;
1943
+ if (!(i && B && r && n)) return "";
1944
+ let o = "", a = 0;
1945
+ for (let g = 0; g < r.length; g++) {
1946
+ const h = r[g];
1947
+ if (!(h < a)) {
1948
+ if (h >= a) {
1949
+ const c = t + i[a] * s, l = e - B[a] * s;
1950
+ o += `M${c.toFixed(2)},${l.toFixed(2)}`;
1951
+ let C = a + 1;
1952
+ for (; C <= h; )
1953
+ if (1 & n[C]) {
1954
+ const f = t + i[C] * s, w = e - B[C] * s;
1955
+ o += `L${f.toFixed(2)},${w.toFixed(2)}`, C++;
1725
1956
  } else {
1726
- const d = t + r[C] * s, I = e - i[C] * s;
1727
- let w = C + 1 > g ? h : C + 1;
1728
- if (1 & Q[w]) {
1729
- const p = t + r[w] * s, u = e - i[w] * s;
1730
- o += `Q${d.toFixed(2)},${I.toFixed(2)} ${p.toFixed(2)},${u.toFixed(2)}`, C = w + 1;
1957
+ const f = t + i[C] * s, w = e - B[C] * s;
1958
+ let d = C + 1 > h ? a : C + 1;
1959
+ if (1 & n[d]) {
1960
+ const p = t + i[d] * s, R = e - B[d] * s;
1961
+ o += `Q${f.toFixed(2)},${w.toFixed(2)} ${p.toFixed(2)},${R.toFixed(2)}`, C = d + 1;
1731
1962
  } else {
1732
- const p = (d + (t + r[w] * s)) / 2, u = (I + (e - i[w] * s)) / 2;
1733
- o += `Q${d.toFixed(2)},${I.toFixed(2)} ${p.toFixed(2)},${u.toFixed(2)}`, C = w;
1963
+ const p = (f + (t + i[d] * s)) / 2, R = (w + (e - B[d] * s)) / 2;
1964
+ o += `Q${f.toFixed(2)},${w.toFixed(2)} ${p.toFixed(2)},${R.toFixed(2)}`, C = d;
1734
1965
  }
1735
1966
  }
1736
1967
  o += "Z";
1737
1968
  }
1738
- h = g + 1;
1969
+ a = h + 1;
1739
1970
  }
1740
1971
  }
1741
1972
  return o;
1742
1973
  }
1743
- WB(A, t, e, s, r) {
1744
- const i = A.codePointAt(0) || 0, B = this.LB(t, i);
1745
- let Q = null;
1746
- return t.glyf && t.glyf[B] !== null ? Q = t.glyf[B] : (Q = y.T.glyf.Ee(t, B), t.glyf[B] = Q), this.kB(t, Q, e, s, r);
1974
+ IB(A, t, e, s, i) {
1975
+ const B = A.codePointAt(0) || 0, r = this.DB(t, B);
1976
+ let n = null;
1977
+ return t.glyf && t.glyf[r] !== null ? n = t.glyf[r] : (n = m.T.glyf.Re(t, r), t.glyf[r] = n), this.PB(t, n, e, s, i);
1747
1978
  }
1748
- JB(A, t, e, s, r, i, B, Q) {
1749
- const o = e + (r - Q * (B / t.head.unitsPerEm)) / 2, h = s + (i + 0.7 * B) / 2;
1750
- return this.WB(A, t, o, h, B).toSVG() || null;
1979
+ wB(A, t, e, s, i, B, r, n) {
1980
+ const o = e + (i - n * (r / t.head.unitsPerEm)) / 2, a = s + (B + 0.7 * r) / 2;
1981
+ return this.IB(A, t, o, a, r).toSVG() || null;
1751
1982
  }
1752
1983
  }
1753
- class GA {
1984
+ class LA {
1754
1985
  constructor() {
1755
- n(this, "VB");
1756
- this.VB = new _A();
1986
+ Q(this, "fB");
1987
+ this.fB = new SA();
1757
1988
  }
1758
- KB(A) {
1759
- return `<?xml version="1.0" encoding="UTF-8" standalone="no"?>
1760
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
1761
- <svg width="${A.width}" height="${A.height}" viewBox="0 0 ${A.width} ${A.height}"
1762
- xmlns="http://www.w3.org/2000/svg" version="1.1">
1763
- <title>textmode art generated via textmode.js</title>
1764
- <desc>textmode art visualization generated by textmode.js library</desc>`;
1765
- }
1766
- ZB() {
1767
- return `
1768
- </g>
1769
- </svg>`;
1770
- }
1771
- jB(A, t) {
1772
- if (!t.includeBackgroundRectangles) return "";
1773
- const e = t.backgroundColor, s = `rgba(${e[0]},${e[1]},${e[2]},${e[3] / 255})`;
1774
- return `
1775
- <rect width="${A.width}" height="${A.height}" fill="${s}" />`;
1989
+ dB(A) {
1990
+ const { width: t, height: e } = A;
1991
+ return `<?xml version="1.0" encoding="UTF-8"?><svg width="${t}" height="${e}" viewBox="0 0 ${t} ${e}" xmlns="http://www.w3.org/2000/svg"><title>textmode.js sketch</title>`;
1776
1992
  }
1777
- XB(A) {
1778
- return `rgba(${A.r},${A.g},${A.b},${A.a / 255})`;
1993
+ _B() {
1994
+ return "</g></svg>";
1779
1995
  }
1780
- NB(A, t) {
1781
- const { transform: e, position: s } = A, r = s.cellX + t.cellWidth / 2, i = s.cellY + t.cellHeight / 2, B = [];
1996
+ pB(A, t) {
1997
+ if (!t.includeBackgroundRectangles) return "";
1998
+ const [e, s, i, B] = t.backgroundColor;
1999
+ return `<rect width="${A.width}" height="${A.height}" fill="rgba(${e},${s},${i},${B / 255})"/>`;
2000
+ }
2001
+ mB(A, t) {
2002
+ const { transform: e, position: s } = A;
2003
+ if (!e.flipHorizontal && !e.flipVertical && !e.rotation) return "";
2004
+ const i = s.cellX + t.cellWidth / 2, B = s.cellY + t.cellHeight / 2, r = [];
1782
2005
  if (e.flipHorizontal || e.flipVertical) {
1783
- const Q = e.flipHorizontal ? -1 : 1, o = e.flipVertical ? -1 : 1;
1784
- B.push(`translate(${r} ${i})`), B.push(`scale(${Q} ${o})`), B.push(`translate(${-r} ${-i})`);
2006
+ const n = e.flipHorizontal ? -1 : 1, o = e.flipVertical ? -1 : 1;
2007
+ r.push(`translate(${i} ${B})scale(${n} ${o})translate(${-i} ${-B})`);
1785
2008
  }
1786
- return e.rotation && B.push(`rotate(${e.rotation} ${r} ${i})`), B.length ? ` transform="${B.join(" ")}"` : "";
2009
+ return e.rotation && r.push(`rotate(${e.rotation} ${i} ${B})`), ` transform="${r.join(" ")}"`;
1787
2010
  }
1788
- qB(A, t, e) {
2011
+ vB(A, t, e) {
1789
2012
  if (!e.includeBackgroundRectangles || A.secondaryColor.a === 0) return "";
1790
- const { position: s } = A, r = this.XB(A.secondaryColor);
1791
- return e.drawMode === "stroke" ? `
1792
- <rect x="${s.cellX}" y="${s.cellY}" width="${t.cellWidth}" height="${t.cellHeight}" stroke="${r}" fill="none" stroke-width="${e.strokeWidth}" />` : `
1793
- <rect x="${s.cellX}" y="${s.cellY}" width="${t.cellWidth}" height="${t.cellHeight}" fill="${r}" />`;
1794
- }
1795
- WB(A, t, e, s) {
1796
- const r = e.characters[A.charIndex];
1797
- if (!r) return "";
1798
- const i = this.VB.JB(r.character, e.font, A.position.cellX, A.position.cellY, t.cellWidth, t.cellHeight, e.fontSize, r.advanceWidth);
2013
+ const { position: s } = A, { r: i, g: B, b: r, a: n } = A.secondaryColor, o = `rgba(${i},${B},${r},${n / 255})`;
2014
+ return e.drawMode === "stroke" ? `<rect x="${s.cellX}" y="${s.cellY}" width="${t.cellWidth}" height="${t.cellHeight}" stroke="${o}" fill="none" stroke-width="${e.strokeWidth}"/>` : `<rect x="${s.cellX}" y="${s.cellY}" width="${t.cellWidth}" height="${t.cellHeight}" fill="${o}"/>`;
2015
+ }
2016
+ IB(A, t, e, s) {
2017
+ const i = e.characters[A.charIndex];
1799
2018
  if (!i) return "";
1800
- const B = this.XB(A.primaryColor);
1801
- return s.drawMode === "stroke" ? `
1802
- <path id="${`path-${A.charIndex}-${A.position.cellX}-${A.position.cellY}`.replace(/\./g, "-")}" d="${i}" stroke="${B}" stroke-width="${s.strokeWidth}" fill="none" />` : `
1803
- <path d="${i}" fill="${B}" />`;
1804
- }
1805
- As(A, t, e, s) {
1806
- let r = "";
1807
- r += this.qB(A, t, s);
1808
- const i = this.NB(A, t), B = this.WB(A, t, e, s);
1809
- return B && (i ? (r += `
1810
- <g${i}>`, r += B, r += `
1811
- </g>`) : r += B), r;
1812
- }
1813
- ts(A, t, e, s) {
1814
- let r = this.KB(t);
1815
- r += this.jB(t, s), r += `
1816
- <g id="ascii-cells">`;
1817
- for (const i of A) r += this.As(i, t, e, s);
1818
- return r += this.ZB(), r;
1819
- }
1820
- es(A) {
1821
- return A.replace(/<path[^>]*d=""[^>]*\/>/g, "").replace(/\n\s*\n/g, `
1822
- `).replace(/[ \t]+$/gm, "");
2019
+ const B = this.fB.wB(i.character, e.font, A.position.cellX, A.position.cellY, t.cellWidth, t.cellHeight, e.fontSize, i.advanceWidth);
2020
+ if (!B) return "";
2021
+ const { r, g: n, b: o, a } = A.primaryColor, g = `rgba(${r},${n},${o},${a / 255})`;
2022
+ return s.drawMode === "stroke" ? `<path d="${B}" stroke="${g}" stroke-width="${s.strokeWidth}" fill="none"/>` : `<path d="${B}" fill="${g}"/>`;
2023
+ }
2024
+ yB(A, t, e, s) {
2025
+ const i = [], B = this.vB(A, t, s);
2026
+ B && i.push(B);
2027
+ const r = this.IB(A, t, e, s);
2028
+ if (r) {
2029
+ const n = this.mB(A, t);
2030
+ i.push(n ? `<g${n}>${r}</g>` : r);
2031
+ }
2032
+ return i.join("");
2033
+ }
2034
+ bB(A, t, e, s) {
2035
+ const i = [this.dB(t), this.pB(t, s), '<g id="ascii-cells">'];
2036
+ for (const B of A) i.push(this.yB(B, t, e, s));
2037
+ return i.push(this._B()), i.join("");
2038
+ }
2039
+ GB(A) {
2040
+ return A.replace(/<path[^>]*d=""[^>]*\/>/g, "").replace(/\s+/g, " ").replace(/> </g, "><");
1823
2041
  }
1824
2042
  }
1825
- class YA extends W {
1826
- Bs(A) {
1827
- return this.MB(A, "image/svg+xml;charset=utf-8");
2043
+ class UA extends W {
2044
+ MB(A) {
2045
+ return this.rB(A, "image/svg+xml;charset=utf-8");
1828
2046
  }
1829
- ss(A, t) {
1830
- this.YB(A, this.SB(t) + ".svg", "image/svg+xml;charset=utf-8");
2047
+ $B(A, t) {
2048
+ this.nB(A, this.aB(t) + ".svg", "image/svg+xml;charset=utf-8");
1831
2049
  }
1832
- Qs(A, t) {
1833
- this.ss(A, t || this.TB());
2050
+ xB(A, t) {
2051
+ this.$B(A, t || this.hB());
1834
2052
  }
1835
2053
  }
1836
- class H {
2054
+ class J {
1837
2055
  constructor() {
1838
- n(this, "rs");
1839
- n(this, "Es");
1840
- n(this, "ns");
1841
- this.rs = new MA(), this.Es = new GA(), this.ns = new YA();
2056
+ Q(this, "YB");
2057
+ Q(this, "FB");
2058
+ Q(this, "RB");
2059
+ this.YB = new _A(), this.FB = new LA(), this.RB = new UA();
1842
2060
  }
1843
- gs(A) {
1844
- return { includeBackgroundRectangles: A.includeBackgroundRectangles ?? !0, drawMode: A.drawMode ?? "fill", strokeWidth: A.strokeWidth ?? 1, backgroundColor: A.backgroundColor ?? [0, 0, 0, 0], filename: A.filename || this.ns.TB() };
2061
+ SB(A) {
2062
+ return { includeBackgroundRectangles: A.includeBackgroundRectangles ?? !0, drawMode: A.drawMode ?? "fill", strokeWidth: A.strokeWidth ?? 1, backgroundColor: A.backgroundColor ?? [0, 0, 0, 0], filename: A.filename || this.RB.hB() };
1845
2063
  }
1846
- hs(A, t = {}) {
1847
- const e = this.rs.UB(this.rs.bB(A.pipeline), A.grid), s = this.Es.ts(e, A.grid, A.font, this.gs(t));
1848
- return this.Es.es(s);
2064
+ zB(A, t = {}) {
2065
+ const e = this.YB.lB(this.YB.BB(A.pipeline), A.grid), s = this.FB.bB(e, A.grid, A.font, this.SB(t));
2066
+ return this.FB.GB(s);
1849
2067
  }
1850
- Qs(A, t = {}) {
1851
- this.ns.Qs(this.hs(A, t), t.filename);
2068
+ xB(A, t = {}) {
2069
+ this.RB.xB(this.zB(A, t), t.filename);
1852
2070
  }
1853
2071
  }
1854
- class FA extends O {
1855
- cs(A, t, e, s = " ") {
1856
- var B;
1857
- const r = [];
1858
- let i = 0;
1859
- for (let Q = 0; Q < t.rows; Q++) {
2072
+ class OA extends O {
2073
+ kB(A, t, e, s = " ") {
2074
+ var r;
2075
+ const i = [];
2076
+ let B = 0;
2077
+ for (let n = 0; n < t.rows; n++) {
1860
2078
  const o = [];
1861
- for (let h = 0; h < t.cols; h++) {
1862
- const a = 4 * i, g = this.GB(A.characterPixels, a), l = ((B = e.characters[g]) == null ? void 0 : B.character) || s;
1863
- o.push(l), i++;
2079
+ for (let a = 0; a < t.cols; a++) {
2080
+ const g = 4 * B, h = this.QB(A.characterPixels, g), c = ((r = e.characters[h]) == null ? void 0 : r.character) || s;
2081
+ o.push(c), B++;
1864
2082
  }
1865
- r.push(o);
2083
+ i.push(o);
1866
2084
  }
1867
- return r;
2085
+ return i;
1868
2086
  }
1869
2087
  }
1870
- class SA {
1871
- Cs(A, t) {
2088
+ class WA {
2089
+ OB(A, t) {
1872
2090
  const e = [];
1873
- for (const r of A) {
1874
- let i = r.join("");
1875
- t.preserveTrailingSpaces || (i = i.replace(/\s+$/, "")), e.push(i);
2091
+ for (const i of A) {
2092
+ let B = i.join("");
2093
+ t.preserveTrailingSpaces || (B = B.replace(/\s+$/, "")), e.push(B);
1876
2094
  }
1877
2095
  const s = t.lineEnding === "crlf" ? `\r
1878
2096
  ` : `
@@ -1881,55 +2099,55 @@ class SA {
1881
2099
  }
1882
2100
  }
1883
2101
  class zA extends W {
1884
- Ds(A, t) {
1885
- const e = this.ls(t);
1886
- this.YB(A, e, "text/plain;charset=utf-8");
2102
+ LB(A, t) {
2103
+ const e = this.UB(t);
2104
+ this.nB(A, e, "text/plain;charset=utf-8");
1887
2105
  }
1888
- ls(A) {
1889
- let t = this.SB(A);
1890
- return t === ".txt" || t.length <= 4 ? this.TB() : t;
2106
+ UB(A) {
2107
+ let t = this.aB(A);
2108
+ return t === ".txt" || t.length <= 4 ? this.hB() : t;
1891
2109
  }
1892
2110
  }
1893
- class X {
2111
+ class K {
1894
2112
  constructor() {
1895
- n(this, "rs");
1896
- n(this, "Es");
1897
- n(this, "ns");
1898
- this.rs = new FA(), this.Es = new SA(), this.ns = new zA();
2113
+ Q(this, "YB");
2114
+ Q(this, "FB");
2115
+ Q(this, "RB");
2116
+ this.YB = new OA(), this.FB = new WA(), this.RB = new zA();
1899
2117
  }
1900
- gs(A) {
1901
- return { preserveTrailingSpaces: A.preserveTrailingSpaces ?? !1, lineEnding: A.lineEnding ?? "lf", emptyCharacter: A.emptyCharacter ?? " ", filename: A.filename || this.ns.TB() };
2118
+ SB(A) {
2119
+ return { preserveTrailingSpaces: A.preserveTrailingSpaces ?? !1, lineEnding: A.lineEnding ?? "lf", emptyCharacter: A.emptyCharacter ?? " ", filename: A.filename || this.RB.hB() };
1902
2120
  }
1903
- Ps(A, t = {}) {
1904
- const e = this.gs(t), s = this.rs.cs(this.rs.bB(A.pipeline), A.grid, A.font, e.emptyCharacter);
1905
- return this.Es.Cs(s, e);
2121
+ TB(A, t = {}) {
2122
+ const e = this.SB(t), s = this.YB.kB(this.YB.BB(A.pipeline), A.grid, A.font, e.emptyCharacter);
2123
+ return this.FB.OB(s, e);
1906
2124
  }
1907
- Ds(A, t = {}) {
1908
- this.ns.Ds(this.Ps(A, t), t.filename);
2125
+ LB(A, t = {}) {
2126
+ this.RB.LB(this.TB(A, t), t.filename);
1909
2127
  }
1910
2128
  }
1911
- class UA extends O {
1912
- us(A, t = 1, e = "transparent") {
2129
+ class NA extends O {
2130
+ HB(A, t = 1, e = "transparent") {
1913
2131
  const s = A.canvas;
1914
2132
  if (t === 1 && e === "transparent") return s;
1915
- const r = document.createElement("canvas"), i = r.getContext("2d"), B = Math.round(s.width * t), Q = Math.round(s.height * t);
1916
- return r.width = B, r.height = Q, e !== "transparent" && (i.fillStyle = e, i.fillRect(0, 0, B, Q)), i.imageSmoothingEnabled = !1, i.drawImage(s, 0, 0, s.width, s.height, 0, 0, B, Q), r;
2133
+ const i = document.createElement("canvas"), B = i.getContext("2d"), r = Math.round(s.width * t), n = Math.round(s.height * t);
2134
+ return i.width = r, i.height = n, e !== "transparent" && (B.fillStyle = e, B.fillRect(0, 0, r, n)), B.imageSmoothingEnabled = !1, B.drawImage(s, 0, 0, s.width, s.height, 0, 0, r, n), i;
1917
2135
  }
1918
2136
  }
1919
- class LA {
1920
- Is(A, t) {
1921
- const e = this.ws(t.format);
2137
+ class HA {
2138
+ WB(A, t) {
2139
+ const e = this.KB(t.format);
1922
2140
  return t.format === "png" ? A.toDataURL(e) : A.toDataURL(e, t.quality);
1923
2141
  }
1924
- async fs(A, t) {
2142
+ async JB(A, t) {
1925
2143
  return new Promise((e, s) => {
1926
- const r = this.ws(t.format), i = (B) => {
1927
- B ? e(B) : s(Error(`Failed to generate ${t.format.toUpperCase()} blob`));
2144
+ const i = this.KB(t.format), B = (r) => {
2145
+ r ? e(r) : s(Error(`Failed to generate ${t.format.toUpperCase()} blob`));
1928
2146
  };
1929
- t.format === "png" ? A.toBlob(i, r) : A.toBlob(i, r, t.quality);
2147
+ t.format === "png" ? A.toBlob(B, i) : A.toBlob(B, i, t.quality);
1930
2148
  });
1931
2149
  }
1932
- ws(A) {
2150
+ KB(A) {
1933
2151
  switch (A) {
1934
2152
  case "png":
1935
2153
  return "image/png";
@@ -1942,12 +2160,12 @@ class LA {
1942
2160
  }
1943
2161
  }
1944
2162
  }
1945
- const OA = { png: "image/png", jpg: "image/jpeg", webp: "image/webp" }, J = { png: ".png", jpg: ".jpg", webp: ".webp" };
1946
- class WA extends W {
1947
- ds(A, t, e) {
1948
- this.ps(A, this.SB(t) + J[e]);
2163
+ const kA = { png: "image/png", jpg: "image/jpeg", webp: "image/webp" }, $ = { png: ".png", jpg: ".jpg", webp: ".webp" };
2164
+ class JA extends W {
2165
+ VB(A, t, e) {
2166
+ this.ZB(A, this.aB(t) + $[e]);
1949
2167
  }
1950
- ps(A, t) {
2168
+ ZB(A, t) {
1951
2169
  const e = URL.createObjectURL(A);
1952
2170
  try {
1953
2171
  const s = document.createElement("a");
@@ -1956,199 +2174,253 @@ class WA extends W {
1956
2174
  URL.revokeObjectURL(e);
1957
2175
  }
1958
2176
  }
1959
- _s(A) {
1960
- return A in OA && A in J;
2177
+ NB(A) {
2178
+ return A in kA && A in $;
1961
2179
  }
1962
2180
  }
1963
- class $A {
2181
+ class KA {
1964
2182
  constructor() {
1965
- n(this, "rs");
1966
- n(this, "Es");
1967
- n(this, "ns");
1968
- this.rs = new UA(), this.Es = new LA(), this.ns = new WA();
2183
+ Q(this, "YB");
2184
+ Q(this, "FB");
2185
+ Q(this, "RB");
2186
+ this.YB = new NA(), this.FB = new HA(), this.RB = new JA();
1969
2187
  }
1970
- gs(A) {
1971
- return { format: A.format ?? "png", quality: A.quality ?? 1, scale: A.scale ?? 1, backgroundColor: A.backgroundColor ?? "transparent", filename: A.filename || this.ns.TB() };
2188
+ SB(A) {
2189
+ return { format: A.format ?? "png", quality: A.quality ?? 1, scale: A.scale ?? 1, backgroundColor: A.backgroundColor ?? "transparent", filename: A.filename || this.RB.hB() };
1972
2190
  }
1973
- vs(A) {
1974
- if (!this.ns._s(A.format)) throw Error(`Saving '${A.format}' files is not supported`);
2191
+ XB(A) {
2192
+ if (!this.RB.NB(A.format)) throw Error(`Saving '${A.format}' files is not supported`);
1975
2193
  if (A.quality < 0 || A.quality > 1) throw Error("Image quality must be between 0.0 and 1.0");
1976
2194
  if (A.scale <= 0) throw Error("Scale factor must be greater than 0");
1977
2195
  A.format === "jpg" && A.backgroundColor === "transparent" && (A.backgroundColor = "black");
1978
2196
  }
1979
- async fs(A, t) {
1980
- if (t.scale === 1 && t.backgroundColor === "transparent") return await this.Es.fs(A.canvas, t);
1981
- const e = this.rs.us(A, t.scale, t.backgroundColor);
1982
- return await this.Es.fs(e, t);
2197
+ async JB(A, t) {
2198
+ if (t.scale === 1 && t.backgroundColor === "transparent") return await this.FB.JB(A.canvas, t);
2199
+ const e = this.YB.HB(A, t.scale, t.backgroundColor);
2200
+ return await this.FB.JB(e, t);
1983
2201
  }
1984
- async ds(A, t = {}) {
1985
- const e = this.gs(t);
1986
- this.vs(e);
1987
- const s = await this.fs(A, e);
1988
- this.ns.ds(s, e.filename, e.format);
2202
+ async VB(A, t = {}) {
2203
+ const e = this.SB(t);
2204
+ this.XB(e);
2205
+ const s = await this.JB(A, e);
2206
+ this.RB.VB(s, e.filename, e.format);
1989
2207
  }
1990
2208
  }
1991
- const kA = (E) => class extends E {
1992
- bs() {
1993
- this.ze.re(this.Gs);
2209
+ const $A = (E) => class extends E {
2210
+ jB() {
2211
+ this.vA.FA(this.qB);
1994
2212
  }
1995
2213
  toString(A = {}) {
1996
- return this.bs(), new X().Ps({ pipeline: this.$s, grid: this.Ms, font: this.We }, A);
2214
+ return this.jB(), new K().TB({ pipeline: this.AQ, grid: this.xi, font: this.ws }, A);
1997
2215
  }
1998
2216
  saveStrings(A = {}) {
1999
- this.bs(), new X().Ds({ pipeline: this.$s, grid: this.Ms, font: this.We }, A);
2217
+ this.jB(), new K().LB({ pipeline: this.AQ, grid: this.xi, font: this.ws }, A);
2000
2218
  }
2001
2219
  toSVG(A = {}) {
2002
- return this.bs(), new H().hs({ pipeline: this.$s, grid: this.Ms, font: this.We }, A);
2220
+ return this.jB(), new J().zB({ pipeline: this.AQ, grid: this.xi, font: this.ws }, A);
2003
2221
  }
2004
2222
  saveSVG(A = {}) {
2005
- this.bs(), new H().Qs({ pipeline: this.$s, grid: this.Ms, font: this.We }, A);
2223
+ this.jB(), new J().xB({ pipeline: this.AQ, grid: this.xi, font: this.ws }, A);
2006
2224
  }
2007
2225
  async saveCanvas(A = {}) {
2008
- await new $A().ds(this.aB, A);
2226
+ await new KA().VB(this.Ws, A);
2009
2227
  }
2010
- }, NA = (E) => class extends E {
2228
+ }, XA = (E) => class extends E {
2011
2229
  async loadFont(A) {
2012
- return this.We.rB(A).then(() => {
2013
- const t = this.We.maxGlyphDimensions;
2014
- this.Ms.CB(t.width, t.height), this.$s.O(this.Ms.cols, this.Ms.rows), this.ze.Qe();
2230
+ return this.ws.Os(A).then(() => {
2231
+ const t = this.ws.maxGlyphDimensions;
2232
+ this.xi.Vs(t.width, t.height), this.AQ.resize(this.xi.cols, this.xi.rows), this.vA.Fe(), this.tQ.Vi();
2015
2233
  });
2016
2234
  }
2017
2235
  fontSize(A) {
2018
- if (!_.P(typeof A == "number" && A > 0, "Font size must be a positive number greater than 0.", { method: "fontSize", providedValue: A }) || this.We.fontSize === A) return;
2019
- this.We.QB(A);
2020
- const t = this.We.maxGlyphDimensions;
2021
- this.Ms.CB(t.width, t.height), this.$s.O(this.Ms.cols, this.Ms.rows), this.ze.Qe();
2236
+ if (!M._(typeof A == "number" && A > 0, "Font size must be a positive number greater than 0.", { method: "fontSize", providedValue: A }) || this.ws.fontSize === A) return;
2237
+ this.ws.ks(A);
2238
+ const t = this.ws.maxGlyphDimensions;
2239
+ this.xi.Vs(t.width, t.height), this.AQ.resize(this.xi.cols, this.xi.rows), this.vA.Fe(), this.tQ.Vi();
2022
2240
  }
2023
- }, HA = (E) => class extends E {
2241
+ }, VA = (E) => class extends E {
2024
2242
  get frameCount() {
2025
- return this.Ys.frameCount;
2243
+ return this.eQ.frameCount;
2026
2244
  }
2027
2245
  set frameCount(A) {
2028
- this.Ys.frameCount = A;
2246
+ this.eQ.frameCount = A;
2029
2247
  }
2030
2248
  frameRate(A) {
2031
- return A === void 0 ? this.Ys.currentFrameRate : this.Ys.frameRate(A, () => this.zs());
2249
+ return A === void 0 ? this.eQ.currentFrameRate : this.eQ.frameRate(A, () => this.sQ());
2032
2250
  }
2033
2251
  noLoop() {
2034
- this.Ys.pause();
2252
+ this.eQ.pause();
2035
2253
  }
2036
2254
  loop() {
2037
- this.Ys.resume(() => this.zs());
2255
+ this.eQ.resume(() => this.sQ());
2038
2256
  }
2039
2257
  redraw(A = 1) {
2040
- if (_.P(typeof A == "number" && A > 0 && Number.isInteger(A), "Redraw count must be a positive integer.", { method: "redraw", providedValue: A })) for (let t = 0; t < A; t++) this.zs();
2258
+ if (M._(typeof A == "number" && A > 0 && Number.isInteger(A), "Redraw count must be a positive integer.", { method: "redraw", providedValue: A })) for (let t = 0; t < A; t++) this.sQ();
2041
2259
  }
2042
2260
  isLooping() {
2043
- return this.Ys.isLooping;
2261
+ return this.eQ.isLooping;
2262
+ }
2263
+ }, ZA = (E) => class extends E {
2264
+ constructor(...A) {
2265
+ super(...A);
2266
+ }
2267
+ mouseClicked(A) {
2268
+ this.tQ.tB(A);
2269
+ }
2270
+ mousePressed(A) {
2271
+ this.tQ.di(A);
2272
+ }
2273
+ mouseReleased(A) {
2274
+ this.tQ._i(A);
2275
+ }
2276
+ mouseMoved(A) {
2277
+ this.tQ.eB(A);
2278
+ }
2279
+ mouseScrolled(A) {
2280
+ this.tQ.sB(A);
2281
+ }
2282
+ get mouse() {
2283
+ return this.tQ.iB();
2284
+ }
2285
+ }, jA = (E) => class extends E {
2286
+ constructor(...A) {
2287
+ super(...A);
2288
+ }
2289
+ keyPressed(A) {
2290
+ this.iQ.di(A);
2291
+ }
2292
+ keyReleased(A) {
2293
+ this.iQ._i(A);
2294
+ }
2295
+ isKeyPressed(A) {
2296
+ return this.iQ.pi(A);
2297
+ }
2298
+ clearKeyStates() {
2299
+ this.iQ.$i();
2300
+ }
2301
+ get lastKeyPressed() {
2302
+ return this.iQ.yi();
2303
+ }
2304
+ get lastKeyReleased() {
2305
+ return this.iQ.bi();
2306
+ }
2307
+ get pressedKeys() {
2308
+ return this.iQ.Gi();
2309
+ }
2310
+ get modifierState() {
2311
+ return this.iQ.Mi();
2044
2312
  }
2045
2313
  };
2046
- class XA {
2314
+ class qA {
2047
2315
  constructor() {
2048
- n(this, "ze");
2049
- n(this, "We");
2050
- n(this, "aB");
2051
- n(this, "Ms");
2052
- n(this, "Ys");
2053
- n(this, "Gs");
2054
- n(this, "$s");
2055
- n(this, "Rs");
2056
- }
2057
- zs() {
2316
+ Q(this, "vA");
2317
+ Q(this, "ws");
2318
+ Q(this, "Ws");
2319
+ Q(this, "xi");
2320
+ Q(this, "eQ");
2321
+ Q(this, "tQ");
2322
+ Q(this, "iQ");
2323
+ Q(this, "qB");
2324
+ Q(this, "AQ");
2325
+ Q(this, "BQ");
2326
+ }
2327
+ sQ() {
2058
2328
  }
2059
2329
  }
2060
- class JA extends function(t, ...e) {
2061
- return e.reduce((s, r) => r(s), t);
2062
- }(XA, TA, kA, NA, HA) {
2330
+ class At extends function(t, ...e) {
2331
+ return e.reduce((s, i) => i(s), t);
2332
+ }(qA, YA, $A, XA, VA, ZA, jA) {
2063
2333
  constructor(t = {}) {
2064
2334
  super();
2065
- n(this, "Ss", !1);
2066
- n(this, "Ts", () => {
2335
+ Q(this, "QQ", !1);
2336
+ Q(this, "EQ", () => {
2067
2337
  });
2068
- n(this, "Fs", () => {
2338
+ Q(this, "rQ", () => {
2069
2339
  });
2070
- n(this, "Os", () => {
2340
+ Q(this, "nQ", () => {
2071
2341
  });
2072
- n(this, "Us");
2073
- this.aB = new bA(t), this.ze = new DA(this.aB.uB()), this.We = new xA(this.ze, t.fontSize ?? 16), this.Ys = new RA(t.frameRate ?? 60), this.Gs = this.ze.Jt(L, `#version 300 es
2074
- precision highp float;in vec2 v_uv;in vec3 v_character;in vec4 v_primaryColor;in vec4 v_secondaryColor;in vec2 v_rotation;in vec3 v_transform;layout(location=0)out vec4 o_character;layout(location=1)out vec4 o_primaryColor;layout(location=2)out vec4 o_secondaryColor;layout(location=3)out vec4 o_rotation;layout(location=4)out vec4 o_transform;void main(){o_character=vec4(v_character,1.0);o_primaryColor=v_primaryColor;o_secondaryColor=v_secondaryColor;o_rotation=vec4(v_rotation,0.0,1.0);o_transform=vec4(v_transform,1.0);}`), this.Rs = this.ze.Jt("attribute vec2 a_position;attribute vec2 a_texCoord;varying vec2 v_uv;void main(){v_uv=a_texCoord;gl_Position=vec4(a_position,0.0,1.0);}", "precision mediump float;uniform sampler2D u_characterTexture;uniform vec2 u_charsetDimensions;uniform sampler2D u_primaryColorTexture;uniform sampler2D u_secondaryColorTexture;uniform sampler2D u_transformTexture;uniform sampler2D u_asciiCharacterTexture;uniform sampler2D u_rotationTexture;uniform vec2 u_gridCellDimensions;uniform vec2 u_gridPixelDimensions;uniform vec2 u_gridOffsetPixels;mat2 rotate2D(float angle){float s=sin(angle);float c=cos(angle);return mat2(c,-s,s,c);}void main(){vec2 adjustedCoord=(gl_FragCoord.xy-u_gridOffsetPixels)/u_gridPixelDimensions;vec2 gridCoord=adjustedCoord*u_gridCellDimensions;vec2 cellCoord=floor(gridCoord);vec2 charIndexTexCoord=(cellCoord+0.5)/u_gridCellDimensions;vec4 primaryColor=texture2D(u_primaryColorTexture,charIndexTexCoord);vec4 secondaryColor=texture2D(u_secondaryColorTexture,charIndexTexCoord);vec4 transformColor=texture2D(u_transformTexture,charIndexTexCoord);bool isInverted=transformColor.r>0.5;bool flipHorizontal=transformColor.g>0.5;bool flipVertical=transformColor.b>0.5;vec4 encodedIndexVec=texture2D(u_asciiCharacterTexture,charIndexTexCoord);int charIndex=int(encodedIndexVec.r*255.0+0.5)+int(encodedIndexVec.g*255.0+0.5)*256;int charCol=int(mod(float(charIndex),u_charsetDimensions.x));int charRow=charIndex/int(u_charsetDimensions.x);float flippedRow=(u_charsetDimensions.y-1.0)-float(charRow);vec2 charCoord=vec2(float(charCol),flippedRow)/u_charsetDimensions;vec4 rotationColor=texture2D(u_rotationTexture,charIndexTexCoord);float scaledAngle=rotationColor.r*255.0+rotationColor.g;float rotationAngle=-(scaledAngle*360.0/255.0)*0.017453292;vec2 fractionalPart=fract(gridCoord)-0.5;if(flipHorizontal)fractionalPart.x=-fractionalPart.x;if(flipVertical)fractionalPart.y=-fractionalPart.y;fractionalPart=rotate2D(rotationAngle)*fractionalPart+0.5;vec2 cellSize=1.0/u_charsetDimensions;vec2 texCoord=charCoord+fractionalPart*cellSize;vec2 cellMax=charCoord+cellSize;if(any(lessThan(texCoord,charCoord))||any(greaterThan(texCoord,cellMax))){gl_FragColor=isInverted ? primaryColor : secondaryColor;return;}vec4 charTexel=texture2D(u_characterTexture,texCoord);if(isInverted)charTexel.rgb=1.0-charTexel.rgb;gl_FragColor=mix(secondaryColor,primaryColor,charTexel);}"), this.Ls(t);
2075
- }
2076
- async Ls(t) {
2077
- await this.We.BB(t.fontSource);
2078
- const e = this.We.maxGlyphDimensions;
2079
- this.Ms = new vA(this.aB.canvas, e.width, e.height), this.$s = this.ze.Be(this.Ms.cols, this.Ms.rows, 5), this.ks(), this.Ts(), this.Ys.start(() => this.zs());
2080
- }
2081
- ks() {
2082
- this.Us = () => {
2083
- this.Os();
2084
- }, window.addEventListener("resize", this.Us);
2085
- }
2086
- zs() {
2087
- if (this.Ys.measureFrameRate(), this.Ys.incrementFrame(), this.Ss) return;
2088
- this.$s.k(), this.ze.Wt(this.Gs), this.Fs(), this.ze.re(this.Gs), this.$s.H();
2089
- const t = this.ze.state.canvasBackgroundColor;
2090
- this.ze.ot(t[0], t[1], t[2], t[3]), this.ze.Wt(this.Rs), this.Rs.eA({ u_characterTexture: this.We.fontFramebuffer, u_charsetDimensions: [this.We.textureColumns, this.We.textureRows], u_asciiCharacterTexture: this.$s.textures[0], u_primaryColorTexture: this.$s.textures[1], u_secondaryColorTexture: this.$s.textures[2], u_transformTexture: this.$s.textures[4], u_rotationTexture: this.$s.textures[3], u_gridCellDimensions: [this.Ms.cols, this.Ms.rows], u_gridPixelDimensions: [this.Ms.width, this.Ms.height], u_gridOffsetPixels: [this.Ms.offsetX, this.Ms.offsetY], u_aspectRatio: this.Ms.width / this.Ms.height }), this.ze.Xt(this.Ms.offsetX, this.Ms.offsetY, this.Ms.width, this.Ms.height);
2342
+ Q(this, "gQ");
2343
+ this.Ws = new TA(t), this.vA = new uA(this.Ws.qs()), this.ws = new bA(this.vA, t.fontSize ?? 16), this.eQ = new MA(t.frameRate ?? 60), this.tQ = new GA(this.Ws), this.iQ = new FA(), this.qB = this.vA.YA(), this.BQ = this.vA.tt(), this.oQ(t);
2344
+ }
2345
+ async oQ(t) {
2346
+ await this.ws.Rs(t.fontSource);
2347
+ const e = this.ws.maxGlyphDimensions;
2348
+ this.xi = new RA(this.Ws.canvas, e.width, e.height), this.tQ.Rs(this.xi), this.AQ = this.vA.$e(this.xi.cols, this.xi.rows, 5), this.aQ(), this.EQ(), this.eQ.start(() => this.sQ());
2349
+ }
2350
+ aQ() {
2351
+ this.gQ = () => {
2352
+ this.nQ();
2353
+ }, window.addEventListener("resize", this.gQ), this.tQ.ui(), this.iQ.ui(), window.addEventListener("blur", () => {
2354
+ this.iQ.$i();
2355
+ });
2356
+ }
2357
+ sQ() {
2358
+ if (this.eQ.measureFrameRate(), this.eQ.incrementFrame(), this.QQ) return;
2359
+ this.AQ.begin(), this.vA.we(this.qB), this.rQ(), this.vA.FA(this.qB), this.AQ.end();
2360
+ const t = this.vA.state.canvasBackgroundColor;
2361
+ this.vA.Lt(t[0], t[1], t[2], t[3]), this.vA.we(this.BQ), this.BQ.JA({ a: this.ws.fontFramebuffer, b: [this.ws.textureColumns, this.ws.textureRows], c: this.AQ.textures[0], d: this.AQ.textures[1], e: this.AQ.textures[2], f: this.AQ.textures[4], g: this.AQ.textures[3], h: [this.xi.cols, this.xi.rows], i: [this.xi.width, this.xi.height], j: [this.xi.offsetX, this.xi.offsetY], k: this.xi.width / this.xi.height }), this.vA.me(this.xi.offsetX, this.xi.offsetY, this.xi.width, this.xi.height);
2091
2362
  }
2092
2363
  setup(t) {
2093
- this.Ts = t;
2364
+ this.EQ = t;
2094
2365
  }
2095
2366
  draw(t) {
2096
- this.Fs = t;
2367
+ this.rQ = t;
2097
2368
  }
2098
2369
  windowResized(t) {
2099
- this.Os = t;
2370
+ this.nQ = t;
2100
2371
  }
2101
2372
  resizeCanvas(t, e) {
2102
- this.aB.O(t, e), this.Ms.fA(), this.$s.O(this.Ms.cols, this.Ms.rows), this.ze.Qe(), this.zs();
2373
+ this.Ws.js(t, e), this.xi.iA(), this.AQ.resize(this.xi.cols, this.xi.rows), this.vA.Fe(), this.tQ.Vi(), this.sQ();
2103
2374
  }
2104
2375
  destroy() {
2105
- this.Ss || (this.Ys.stop(), window.removeEventListener("resize", this.Us), this.We.W(), this.ze.W(), this.Ss = !0);
2376
+ this.QQ || (this.eQ.stop(), window.removeEventListener("resize", this.gQ), this.tQ.fi(), this.iQ.fi(), this.ws.zA(), this.vA.zA(), this.QQ = !0);
2106
2377
  }
2107
2378
  get grid() {
2108
- return this.Ms;
2379
+ return this.xi;
2109
2380
  }
2110
2381
  get font() {
2111
- return this.We;
2382
+ return this.ws;
2112
2383
  }
2113
2384
  get width() {
2114
- return this.aB.width;
2385
+ return this.Ws.width;
2115
2386
  }
2116
2387
  get height() {
2117
- return this.aB.height;
2388
+ return this.Ws.height;
2118
2389
  }
2119
2390
  get canvas() {
2120
- return this.aB.canvas;
2391
+ return this.Ws.canvas;
2121
2392
  }
2122
2393
  get isDisposed() {
2123
- return this.Ss;
2394
+ return this.QQ;
2124
2395
  }
2125
2396
  get drawFramebuffer() {
2126
- return this.$s;
2397
+ return this.AQ;
2127
2398
  }
2128
2399
  }
2129
- class $ {
2400
+ class z {
2130
2401
  constructor() {
2131
2402
  }
2132
2403
  static create(A = {}) {
2133
- return new JA(A);
2404
+ return new At(A);
2134
2405
  }
2135
2406
  static setErrorLevel(A) {
2136
- _.u(A);
2407
+ M.v(A);
2137
2408
  }
2138
2409
  static get version() {
2139
- return "0.2.0";
2410
+ return "0.2.1-beta.2";
2140
2411
  }
2141
2412
  }
2142
- const jA = Object.freeze(Object.defineProperty({ __proto__: null }, Symbol.toStringTag, { value: "Module" })), ZA = $.create, KA = $.setErrorLevel, qA = $.version;
2413
+ const et = Object.freeze(Object.defineProperty({ __proto__: null }, Symbol.toStringTag, { value: "Module" })), st = z.create, it = z.setErrorLevel, Bt = z.version;
2143
2414
  export {
2144
- bA as TextmodeCanvas,
2145
- q as TextmodeErrorLevel,
2146
- xA as TextmodeFont,
2147
- vA as TextmodeGrid,
2148
- JA as Textmodifier,
2149
- ZA as create,
2150
- jA as export,
2151
- KA as setErrorLevel,
2152
- $ as textmode,
2153
- qA as version
2415
+ U as GLFramebuffer,
2416
+ TA as TextmodeCanvas,
2417
+ tA as TextmodeErrorLevel,
2418
+ bA as TextmodeFont,
2419
+ RA as TextmodeGrid,
2420
+ At as Textmodifier,
2421
+ st as create,
2422
+ et as export,
2423
+ it as setErrorLevel,
2424
+ z as textmode,
2425
+ Bt as version
2154
2426
  };