textmode.js 0.1.9-beta.5 → 0.1.9

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 (32) hide show
  1. package/README.md +14 -13
  2. package/dist/textmode.esm.js +1032 -1006
  3. package/dist/textmode.esm.min.js +952 -926
  4. package/dist/textmode.umd.js +14 -14
  5. package/dist/textmode.umd.min.js +16 -16
  6. package/dist/types/ColorPalette.d.ts +2 -5
  7. package/dist/types/export/txt/TXTDataExtractor.d.ts +3 -3
  8. package/dist/types/export/txt/types.d.ts +5 -3
  9. package/dist/types/index.d.ts +2 -1
  10. package/dist/types/rendering/core/Framebuffer.d.ts +140 -0
  11. package/dist/types/rendering/core/Shader.d.ts +59 -0
  12. package/dist/types/rendering/core/index.d.ts +2 -0
  13. package/dist/types/rendering/index.d.ts +3 -2
  14. package/dist/types/rendering/webgl/Framebuffer.d.ts +5 -20
  15. package/dist/types/rendering/webgl/Renderer.d.ts +9 -7
  16. package/dist/types/rendering/webgl/Shader.d.ts +23 -7
  17. package/dist/types/textmode/ConversionPipeline.d.ts +1 -1
  18. package/dist/types/textmode/Textmodifier.d.ts +4 -4
  19. package/dist/types/textmode/converters/BrightnessConverter.d.ts +25 -25
  20. package/dist/types/textmode/converters/Converter.d.ts +12 -5
  21. package/dist/types/textmode/converters/FeatureConverter.d.ts +27 -5
  22. package/dist/types/textmode/converters/index.d.ts +3 -3
  23. package/dist/types/textmode/font/TextmodeFont.d.ts +2 -2
  24. package/dist/types/textmode/font/TextureAtlas.d.ts +2 -2
  25. package/dist/types/textmode/font/utils/FontTableReader.d.ts +2 -7
  26. package/dist/types/textmode/mixins/RenderingMixin.d.ts +3 -3
  27. package/package.json +1 -1
  28. package/dist/types/rendering/core/AbstractFramebuffer.d.ts +0 -1
  29. package/dist/types/rendering/core/AbstractGeometry.d.ts +0 -1
  30. package/dist/types/rendering/core/AbstractShader.d.ts +0 -1
  31. package/dist/types/rendering/core/AbstractTexture.d.ts +0 -1
  32. package/dist/types/rendering/core/GraphicsContext.d.ts +0 -1
@@ -1,6 +1,6 @@
1
- var AA = Object.defineProperty;
2
- var tA = (E, A, t) => A in E ? AA(E, A, { enumerable: !0, configurable: !0, writable: !0, value: t }) : E[A] = t;
3
- var o = (E, A, t) => tA(E, typeof A != "symbol" ? A + "" : A, t);
1
+ var sA = Object.defineProperty;
2
+ var rA = (o, A, t) => A in o ? sA(o, A, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[A] = t;
3
+ var E = (o, A, t) => rA(o, typeof A != "symbol" ? A + "" : A, t);
4
4
  class I extends Error {
5
5
  constructor(A, t = {}) {
6
6
  super(I.A(A, t)), this.name = "TextmodeError";
@@ -33,13 +33,13 @@ class I extends Error {
33
33
  return A + "";
34
34
  }
35
35
  }
36
- var eA = ((E) => (E[E.SILENT = 0] = "SILENT", E[E.WARNING = 1] = "WARNING", E[E.ERROR = 2] = "ERROR", E[E.THROW = 3] = "THROW", E))(eA || {});
37
- const b = class b {
36
+ var iA = ((o) => (o[o.SILENT = 0] = "SILENT", o[o.WARNING = 1] = "WARNING", o[o.ERROR = 2] = "ERROR", o[o.THROW = 3] = "THROW", o))(iA || {});
37
+ const v = class v {
38
38
  constructor() {
39
- o(this, "h", { globalLevel: 3 });
39
+ E(this, "h", { globalLevel: 3 });
40
40
  }
41
41
  static l() {
42
- return b.o || (b.o = new b()), b.o;
42
+ return v.o || (v.o = new v()), v.o;
43
43
  }
44
44
  D(A, t) {
45
45
  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;";
@@ -61,598 +61,620 @@ const b = class b {
61
61
  this.h.globalLevel = A;
62
62
  }
63
63
  };
64
- o(b, "o", null);
65
- let Y = b;
66
- const u = Y.l(), X = /* @__PURE__ */ new WeakMap();
67
- function G(E, A) {
68
- X.set(E, A);
64
+ E(v, "o", null);
65
+ let U = v;
66
+ const D = U.l(), j = /* @__PURE__ */ new WeakMap();
67
+ function F(o, A) {
68
+ j.set(o, A);
69
69
  }
70
- function j(E) {
71
- return X.get(E);
70
+ function J(o) {
71
+ return j.get(o);
72
72
  }
73
- class K {
74
- constructor(A, t, e = t, s = {}) {
75
- o(this, "P");
76
- o(this, "I");
77
- o(this, "m");
78
- o(this, "p");
79
- o(this, "_");
80
- o(this, "h");
81
- o(this, "v", null);
82
- o(this, "M", null);
83
- this.P = A, this.p = t, this._ = e, this.h = { filter: "nearest", wrap: "clamp", format: "rgba", type: "unsigned_byte", ...s }, this.m = this.G(), this.I = A.createFramebuffer(), this.F();
84
- }
85
- $(A) {
86
- const { P: t } = this, e = t.getParameter(t.FRAMEBUFFER_BINDING);
87
- t.bindFramebuffer(t.FRAMEBUFFER, this.I);
73
+ class X {
74
+ constructor(A, t = A, e = {}) {
75
+ E(this, "P");
76
+ E(this, "I");
77
+ E(this, "h");
78
+ E(this, "m", null);
79
+ this.P = A, this.I = t, this.h = { filter: "nearest", wrap: "clamp", format: "rgba", type: "unsigned_byte", ...e };
80
+ }
81
+ get width() {
82
+ return this.P;
83
+ }
84
+ get height() {
85
+ return this.I;
86
+ }
87
+ get pixels() {
88
+ return this.m;
89
+ }
90
+ get options() {
91
+ return { ...this.h };
92
+ }
93
+ validateCoordinates(A, t, e = !0) {
94
+ return (A < 0 || t < 0 || A >= this.P || t >= this.I) && e && console.warn("The x and y values passed to Framebuffer.get are outside of its range and will be clamped."), [Math.max(0, Math.min(A, this.P - 1)), Math.max(0, Math.min(t, this.I - 1))];
95
+ }
96
+ validateRegion(A, t, e, s) {
97
+ return [A = Math.max(0, Math.min(A, this.P - 1)), t = Math.max(0, Math.min(t, this.I - 1)), e = Math.max(1, Math.min(e, this.P - A)), s = Math.max(1, Math.min(s, this.I - t))];
98
+ }
99
+ updateDimensions(A, t) {
100
+ this.P = A, this.I = t, this.m = null;
101
+ }
102
+ }
103
+ class K extends X {
104
+ constructor(t, e, s = e, r = {}) {
105
+ super(e, s, r);
106
+ E(this, "p");
107
+ E(this, "_");
108
+ E(this, "v");
109
+ E(this, "M", null);
110
+ this.p = t, this.v = this.G(), this._ = t.createFramebuffer(), this.F();
111
+ }
112
+ $(t) {
113
+ const { p: e } = this, s = e.getParameter(e.FRAMEBUFFER_BINDING);
114
+ e.bindFramebuffer(e.FRAMEBUFFER, this._);
88
115
  try {
89
- return A();
116
+ return t();
90
117
  } finally {
91
- t.bindFramebuffer(t.FRAMEBUFFER, e);
118
+ e.bindFramebuffer(e.FRAMEBUFFER, s);
92
119
  }
93
120
  }
94
121
  G() {
95
- const { P: A } = this, t = A.createTexture();
96
- A.bindTexture(A.TEXTURE_2D, t);
97
- const e = this.h.filter === "linear" ? A.LINEAR : A.NEAREST, s = this.h.wrap === "repeat" ? A.REPEAT : A.CLAMP_TO_EDGE;
98
- return A.texParameteri(A.TEXTURE_2D, A.TEXTURE_MIN_FILTER, e), A.texParameteri(A.TEXTURE_2D, A.TEXTURE_MAG_FILTER, e), A.texParameteri(A.TEXTURE_2D, A.TEXTURE_WRAP_S, s), A.texParameteri(A.TEXTURE_2D, A.TEXTURE_WRAP_T, s), this.Y(), t;
122
+ const { p: t } = this, e = t.createTexture();
123
+ t.bindTexture(t.TEXTURE_2D, e);
124
+ const s = this.h.filter === "linear" ? t.LINEAR : t.NEAREST, r = this.h.wrap === "repeat" ? t.REPEAT : t.CLAMP_TO_EDGE;
125
+ return t.texParameteri(t.TEXTURE_2D, t.TEXTURE_MIN_FILTER, s), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_MAG_FILTER, s), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_WRAP_S, r), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_WRAP_T, r), this.Y(), e;
99
126
  }
100
127
  Y() {
101
- const { P: A } = this, t = this.h.type === "float" ? A.FLOAT : A.UNSIGNED_BYTE;
102
- A.texImage2D(A.TEXTURE_2D, 0, A.RGBA, this.p, this._, 0, A.RGBA, t, null);
128
+ const { p: t } = this, e = this.h.type === "float" ? t.FLOAT : t.UNSIGNED_BYTE;
129
+ t.texImage2D(t.TEXTURE_2D, 0, t.RGBA, this.P, this.I, 0, t.RGBA, e, null);
103
130
  }
104
131
  F() {
105
- const { P: A } = this;
106
- A.bindFramebuffer(A.FRAMEBUFFER, this.I), A.framebufferTexture2D(A.FRAMEBUFFER, A.COLOR_ATTACHMENT0, A.TEXTURE_2D, this.m, 0), A.bindFramebuffer(A.FRAMEBUFFER, null);
132
+ const { p: t } = this;
133
+ t.bindFramebuffer(t.FRAMEBUFFER, this._), t.framebufferTexture2D(t.FRAMEBUFFER, t.COLOR_ATTACHMENT0, t.TEXTURE_2D, this.v, 0), t.bindFramebuffer(t.FRAMEBUFFER, null);
107
134
  }
108
- update(A) {
109
- const { P: t } = this;
110
- t.bindTexture(t.TEXTURE_2D, this.m), 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);
135
+ S(t) {
136
+ const { p: e } = this;
137
+ e.bindTexture(e.TEXTURE_2D, this.v), e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL, 1), e.texImage2D(e.TEXTURE_2D, 0, e.RGBA, e.RGBA, e.UNSIGNED_BYTE, t), e.bindTexture(e.TEXTURE_2D, null);
111
138
  }
112
- updatePixels(A, t, e) {
113
- const { P: s } = this;
114
- s.bindTexture(s.TEXTURE_2D, this.m), s.texImage2D(s.TEXTURE_2D, 0, s.RGBA, t, e, 0, s.RGBA, s.UNSIGNED_BYTE, A), s.bindTexture(s.TEXTURE_2D, null);
139
+ updatePixels(t, e, s) {
140
+ const { p: r } = this;
141
+ r.bindTexture(r.TEXTURE_2D, this.v), r.texImage2D(r.TEXTURE_2D, 0, r.RGBA, e, s, 0, r.RGBA, r.UNSIGNED_BYTE, t), r.bindTexture(r.TEXTURE_2D, null);
115
142
  }
116
- resize(A, t) {
117
- const { P: e } = this;
118
- this.p = A, this._ = t, this.M = null, e.bindTexture(e.TEXTURE_2D, this.m), this.Y(), e.bindTexture(e.TEXTURE_2D, null);
143
+ resize(t, e) {
144
+ const { p: s } = this;
145
+ this.updateDimensions(t, e), s.bindTexture(s.TEXTURE_2D, this.v), this.Y(), s.bindTexture(s.TEXTURE_2D, null);
119
146
  }
120
147
  begin() {
121
- const { P: A } = this;
122
- this.v = { framebuffer: A.getParameter(A.FRAMEBUFFER_BINDING), viewport: A.getParameter(A.VIEWPORT) }, A.bindFramebuffer(A.FRAMEBUFFER, this.I), A.viewport(0, 0, this.p, this._), G(A, [0, 0, this.p, this._]);
148
+ const { p: t } = this;
149
+ this.M = { framebuffer: t.getParameter(t.FRAMEBUFFER_BINDING), viewport: t.getParameter(t.VIEWPORT) }, t.bindFramebuffer(t.FRAMEBUFFER, this._), t.viewport(0, 0, this.P, this.I), F(t, [0, 0, this.P, this.I]);
123
150
  }
124
151
  end() {
125
- if (!this.v) return;
126
- const { P: A } = this;
127
- A.bindFramebuffer(A.FRAMEBUFFER, this.v.framebuffer), A.viewport(...this.v.viewport), G(A, this.v.viewport), this.v = null;
152
+ if (!this.M) return;
153
+ const { p: t } = this;
154
+ t.bindFramebuffer(t.FRAMEBUFFER, this.M.framebuffer), t.viewport(...this.M.viewport), F(t, this.M.viewport), this.M = null;
128
155
  }
129
156
  loadPixels() {
130
- const { P: A } = this;
131
- this.M || (this.M = new Uint8Array(this.p * this._ * 4)), this.$(() => {
132
- A.readPixels(0, 0, this.p, this._, A.RGBA, A.UNSIGNED_BYTE, this.M);
157
+ const { p: t } = this;
158
+ this.m || (this.m = new Uint8Array(this.P * this.I * 4)), this.$(() => {
159
+ t.readPixels(0, 0, this.P, this.I, t.RGBA, t.UNSIGNED_BYTE, this.m);
133
160
  });
134
161
  }
135
- get(A, t, e, s) {
136
- const { P: r } = this;
137
- if (A === void 0 && t === void 0) {
138
- const i = new Uint8Array(this.p * this._ * 4);
139
- return this.$(() => (r.readPixels(0, 0, this.p, this._, r.RGBA, r.UNSIGNED_BYTE, i), i));
162
+ get(t, e, s, r) {
163
+ const { p: i } = this;
164
+ if (t === void 0 && e === void 0) {
165
+ const B = new Uint8Array(this.P * this.I * 4);
166
+ return this.$(() => (i.readPixels(0, 0, this.P, this.I, i.RGBA, i.UNSIGNED_BYTE, B), B));
140
167
  }
141
- if (e === void 0 && s === void 0) {
142
- (A < 0 || t < 0 || A >= this.p || t >= this._) && (console.warn("The x and y values passed to Framebuffer.get are outside of its range and will be clamped."), A = Math.max(0, Math.min(A, this.p - 1)), t = Math.max(0, Math.min(t, this._ - 1)));
143
- const i = new Uint8Array(4);
144
- return this.$(() => (r.readPixels(A, t, 1, 1, r.RGBA, r.UNSIGNED_BYTE, i), [i[0], i[1], i[2], i[3]]));
168
+ if (s === void 0 && r === void 0) {
169
+ const [B, Q] = this.validateCoordinates(t, e), n = new Uint8Array(4);
170
+ return this.$(() => (i.readPixels(B, Q, 1, 1, i.RGBA, i.UNSIGNED_BYTE, n), [n[0], n[1], n[2], n[3]]));
145
171
  }
146
172
  {
147
- A = Math.max(0, Math.min(A, this.p - 1)), t = Math.max(0, Math.min(t, this._ - 1)), e = Math.max(1, Math.min(e, this.p - A)), s = Math.max(1, Math.min(s, this._ - t));
148
- const i = new Uint8Array(e * s * 4);
149
- return this.$(() => (r.readPixels(A, t, e, s, r.RGBA, r.UNSIGNED_BYTE, i), i));
173
+ const [B, Q, n, g] = this.validateRegion(t, e, s, r), a = new Uint8Array(n * g * 4);
174
+ return this.$(() => (i.readPixels(B, Q, n, g, i.RGBA, i.UNSIGNED_BYTE, a), a));
150
175
  }
151
176
  }
152
- S() {
153
- this.I && this.P.deleteFramebuffer(this.I), this.m && this.P.deleteTexture(this.m);
177
+ O() {
178
+ this._ && this.p.deleteFramebuffer(this._), this.v && this.p.deleteTexture(this.v);
154
179
  }
155
180
  get framebuffer() {
156
- return this.I;
181
+ return this._;
157
182
  }
158
183
  get texture() {
159
- return this.m;
184
+ return this.v;
160
185
  }
161
- get width() {
162
- return this.p;
186
+ }
187
+ class q {
188
+ constructor() {
189
+ E(this, "U", !1);
163
190
  }
164
- get height() {
165
- return this._;
191
+ get isReady() {
192
+ return this.U;
166
193
  }
167
- get pixels() {
168
- return this.M;
194
+ setUniforms(A) {
195
+ for (const [t, e] of Object.entries(A)) this.setUniform(t, e);
169
196
  }
170
197
  }
171
- class x {
172
- constructor(A, t, e) {
173
- o(this, "P");
174
- o(this, "O");
175
- o(this, "U", /* @__PURE__ */ new Map());
176
- o(this, "k", /* @__PURE__ */ new Map());
177
- o(this, "R", 0);
178
- o(this, "V");
179
- this.P = A, this.O = this.H(t, e), this.V = A.getParameter(A.MAX_TEXTURE_IMAGE_UNITS), this.L();
180
- }
181
- L() {
182
- const A = this.P.getProgramParameter(this.O, this.P.ACTIVE_UNIFORMS);
183
- for (let t = 0; t < A; t++) {
184
- const e = this.P.getActiveUniform(this.O, t);
185
- if (e) {
186
- const s = this.P.getUniformLocation(this.O, e.name);
187
- s && (this.U.set(e.name, s), this.k.set(e.name, e.type));
198
+ class p extends q {
199
+ constructor(t, e, s) {
200
+ super();
201
+ E(this, "p");
202
+ E(this, "R");
203
+ E(this, "k", /* @__PURE__ */ new Map());
204
+ E(this, "V", /* @__PURE__ */ new Map());
205
+ E(this, "H", 0);
206
+ E(this, "L");
207
+ this.p = t, this.R = this.J(e, s), this.L = t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS), this.j(), this.U = !0;
208
+ }
209
+ static fromSource(t, e) {
210
+ return new p(t, e.vertex, e.fragment);
211
+ }
212
+ j() {
213
+ const t = this.p.getProgramParameter(this.R, this.p.ACTIVE_UNIFORMS);
214
+ for (let e = 0; e < t; e++) {
215
+ const s = this.p.getActiveUniform(this.R, e);
216
+ if (s) {
217
+ const r = this.p.getUniformLocation(this.R, s.name);
218
+ r && (this.k.set(s.name, r), this.V.set(s.name, s.type));
188
219
  }
189
220
  }
190
221
  }
191
- H(A, t) {
192
- const e = this.J(this.P.VERTEX_SHADER, A), s = this.J(this.P.FRAGMENT_SHADER, t), r = this.P.createProgram();
193
- if (this.P.attachShader(r, e), this.P.attachShader(r, s), this.P.linkProgram(r), !this.P.getProgramParameter(r, this.P.LINK_STATUS)) {
194
- const i = this.P.getProgramInfoLog(r);
195
- throw Error("Shader program link error: " + i);
222
+ J(t, e) {
223
+ const s = this.K(this.p.VERTEX_SHADER, t), r = this.K(this.p.FRAGMENT_SHADER, e), i = this.p.createProgram();
224
+ if (this.p.attachShader(i, s), this.p.attachShader(i, r), this.p.linkProgram(i), !this.p.getProgramParameter(i, this.p.LINK_STATUS)) {
225
+ const B = this.p.getProgramInfoLog(i);
226
+ throw Error("Shader program link error: " + B);
196
227
  }
197
- return this.P.deleteShader(e), this.P.deleteShader(s), r;
228
+ return this.p.deleteShader(s), this.p.deleteShader(r), i;
198
229
  }
199
- J(A, t) {
200
- const e = this.P.createShader(A);
201
- if (this.P.shaderSource(e, t), this.P.compileShader(e), !this.P.getShaderParameter(e, this.P.COMPILE_STATUS)) {
202
- const s = this.P.getShaderInfoLog(e);
203
- throw this.P.deleteShader(e), Error("Shader compilation error: " + s);
230
+ K(t, e) {
231
+ const s = this.p.createShader(t);
232
+ if (this.p.shaderSource(s, e), this.p.compileShader(s), !this.p.getShaderParameter(s, this.p.COMPILE_STATUS)) {
233
+ const r = this.p.getShaderInfoLog(s);
234
+ throw this.p.deleteShader(s), Error("Shader compilation error: " + r);
204
235
  }
205
- return e;
236
+ return s;
206
237
  }
207
- K() {
208
- this.P.useProgram(this.O), this.W();
238
+ W() {
239
+ this.p.useProgram(this.R), this.N();
209
240
  }
210
- setUniform(A, t) {
211
- const e = this.U.get(A);
212
- if (e) if (typeof t == "number")
213
- this.j(A) ? this.P.uniform1i(e, Math.floor(t)) : this.P.uniform1f(e, t);
214
- else if (typeof t == "boolean") this.P.uniform1i(e, t ? 1 : 0);
215
- else if (Array.isArray(t)) switch (t.length) {
241
+ N() {
242
+ this.H = 0;
243
+ }
244
+ setUniform(t, e) {
245
+ const s = this.k.get(t);
246
+ if (s) if (typeof e == "number")
247
+ this.Z(t) ? this.p.uniform1i(s, Math.floor(e)) : this.p.uniform1f(s, e);
248
+ else if (typeof e == "boolean") this.p.uniform1i(s, e ? 1 : 0);
249
+ else if (Array.isArray(e)) switch (e.length) {
216
250
  case 2:
217
- this.P.uniform2f(e, t[0], t[1]);
251
+ this.p.uniform2f(s, e[0], e[1]);
218
252
  break;
219
253
  case 3:
220
- this.P.uniform3f(e, t[0], t[1], t[2]);
254
+ this.p.uniform3f(s, e[0], e[1], e[2]);
221
255
  break;
222
256
  case 4:
223
- this.P.uniform4f(e, t[0], t[1], t[2], t[3]);
257
+ this.p.uniform4f(s, e[0], e[1], e[2], e[3]);
224
258
  break;
225
259
  default:
226
- console.warn(`Unsupported array length ${t.length} for uniform '${A}'`);
260
+ console.warn(`Unsupported array length ${e.length} for uniform '${t}'`);
227
261
  }
228
- else if (t instanceof WebGLTexture) {
229
- const s = this.N();
230
- this.P.uniform1i(e, s), this.P.activeTexture(this.P.TEXTURE0 + s), this.P.bindTexture(this.P.TEXTURE_2D, t);
231
- } else if (t instanceof K) {
232
- const s = this.N();
233
- this.P.uniform1i(e, s), this.P.activeTexture(this.P.TEXTURE0 + s), this.P.bindTexture(this.P.TEXTURE_2D, t.texture);
234
- } else console.warn(`Unsupported uniform type for '${A}':`, typeof t);
235
- }
236
- N() {
237
- return this.R >= this.V && console.warn(`Exceeded maximum texture units (${this.V}). Texture may not render correctly.`), this.R++;
238
- }
239
- j(A) {
240
- const t = this.k.get(A);
241
- return !!t && (t === this.P.INT || t === this.P.INT_VEC2 || t === this.P.INT_VEC3 || t === this.P.INT_VEC4 || t === this.P.SAMPLER_2D || t === this.P.SAMPLER_CUBE);
262
+ else if (e instanceof WebGLTexture) {
263
+ const r = this.X();
264
+ this.p.uniform1i(s, r), this.p.activeTexture(this.p.TEXTURE0 + r), this.p.bindTexture(this.p.TEXTURE_2D, e);
265
+ } else if (e instanceof K) {
266
+ const r = this.X();
267
+ this.p.uniform1i(s, r), this.p.activeTexture(this.p.TEXTURE0 + r), this.p.bindTexture(this.p.TEXTURE_2D, e.texture);
268
+ } else if (typeof e == "object" && "texture" in e) {
269
+ const r = this.X();
270
+ this.p.uniform1i(s, r), this.p.activeTexture(this.p.TEXTURE0 + r), this.p.bindTexture(this.p.TEXTURE_2D, e.texture);
271
+ } else console.warn(`Unsupported uniform type for '${t}':`, typeof e);
272
+ }
273
+ X() {
274
+ return this.H >= this.L && console.warn(`Exceeded maximum texture units (${this.L}). Texture may not render correctly.`), this.H++;
275
+ }
276
+ Z(t) {
277
+ const e = this.V.get(t);
278
+ return !!e && (e === this.p.INT || e === this.p.INT_VEC2 || e === this.p.INT_VEC3 || e === this.p.INT_VEC4 || e === this.p.SAMPLER_2D || e === this.p.SAMPLER_CUBE);
242
279
  }
243
280
  get glProgram() {
244
- return this.O;
281
+ return this.R;
245
282
  }
246
- S() {
247
- this.P.deleteProgram(this.O);
248
- }
249
- W() {
250
- this.R = 0;
283
+ O() {
284
+ this.p.deleteProgram(this.R);
251
285
  }
252
286
  }
253
- class Z {
287
+ class AA {
254
288
  constructor(A) {
255
- o(this, "P");
256
- o(this, "Z", null);
257
- o(this, "X", 16);
258
- o(this, "q", /* @__PURE__ */ new Map());
259
- this.P = A;
260
- }
261
- AA() {
262
- if (this.Z) return;
263
- const A = this.P;
264
- this.Z = A.createBuffer(), A.bindBuffer(A.ARRAY_BUFFER, this.Z);
265
- }
266
- tA() {
267
- const A = this.P, t = A.getParameter(A.CURRENT_PROGRAM);
268
- let e = this.q.get(t);
269
- return e || (e = { a_position: A.getAttribLocation(t, "a_position"), a_texCoord: A.getAttribLocation(t, "a_texCoord") }, this.q.set(t, e)), A.enableVertexAttribArray(e.a_position), A.vertexAttribPointer(e.a_position, 2, A.FLOAT, !1, this.X, 0), A.enableVertexAttribArray(e.a_texCoord), A.vertexAttribPointer(e.a_texCoord, 2, A.FLOAT, !1, this.X, 8), { positionLoc: e.a_position, texLoc: e.a_texCoord };
270
- }
271
- eA(A, t) {
272
- const e = this.P;
289
+ E(this, "p");
290
+ E(this, "q", null);
291
+ E(this, "AA", 16);
292
+ E(this, "tA", /* @__PURE__ */ new Map());
293
+ this.p = A;
294
+ }
295
+ eA() {
296
+ if (this.q) return;
297
+ const A = this.p;
298
+ this.q = A.createBuffer(), A.bindBuffer(A.ARRAY_BUFFER, this.q);
299
+ }
300
+ sA() {
301
+ const A = this.p, t = A.getParameter(A.CURRENT_PROGRAM);
302
+ let e = this.tA.get(t);
303
+ return e || (e = { a_position: A.getAttribLocation(t, "a_position"), a_texCoord: A.getAttribLocation(t, "a_texCoord") }, this.tA.set(t, e)), A.enableVertexAttribArray(e.a_position), A.vertexAttribPointer(e.a_position, 2, A.FLOAT, !1, this.AA, 0), A.enableVertexAttribArray(e.a_texCoord), A.vertexAttribPointer(e.a_texCoord, 2, A.FLOAT, !1, this.AA, 8), { positionLoc: e.a_position, texLoc: e.a_texCoord };
304
+ }
305
+ rA(A, t) {
306
+ const e = this.p;
273
307
  e.disableVertexAttribArray(A), e.disableVertexAttribArray(t);
274
308
  }
275
- sA(A, t) {
276
- const e = this.P, s = j(e) || [0, 0, e.canvas.width, e.canvas.height];
309
+ BA(A, t) {
310
+ const e = this.p, s = J(e) || [0, 0, e.canvas.width, e.canvas.height];
277
311
  return { nx: A / s[2] * 2 - 1, ny: 1 - t / s[3] * 2 };
278
312
  }
279
- rA(A, t, e, s) {
280
- const r = this.P;
281
- this.AA(), r.bindBuffer(r.ARRAY_BUFFER, this.Z);
313
+ iA(A, t, e, s) {
314
+ const r = this.p;
315
+ this.eA(), r.bindBuffer(r.ARRAY_BUFFER, this.q);
282
316
  const i = new Float32Array([A, s, 0, 0, e, s, 1, 0, A, t, 0, 1, A, t, 0, 1, e, s, 1, 0, e, t, 1, 1]);
283
317
  r.bufferData(r.ARRAY_BUFFER, i, r.DYNAMIC_DRAW);
284
318
  }
285
- S() {
286
- this.Z && this.P.deleteBuffer(this.Z);
319
+ O() {
320
+ this.q && this.p.deleteBuffer(this.q);
287
321
  }
288
322
  }
289
- class sA extends Z {
323
+ class BA extends AA {
290
324
  constructor(A) {
291
325
  super(A);
292
326
  }
293
- BA(A, t, e, s) {
294
- const r = this.sA(A, t), i = this.sA(A + e, t + s);
295
- this.rA(r.nx, r.ny, i.nx, i.ny);
296
- const B = this.tA();
297
- this.P.drawArrays(this.P.TRIANGLES, 0, 6), this.eA(B.positionLoc, B.texLoc);
327
+ QA(A, t, e, s) {
328
+ const r = this.BA(A, t), i = this.BA(A + e, t + s);
329
+ this.iA(r.nx, r.ny, i.nx, i.ny);
330
+ const B = this.sA();
331
+ this.p.drawArrays(this.p.TRIANGLES, 0, 6), this.rA(B.positionLoc, B.texLoc);
298
332
  }
299
- iA(A, t, e, s, r) {
300
- this.BA(A, t, e, r), this.BA(A + e - r, t, r, s), this.BA(A, t + s - r, e, r), this.BA(A, t, r, s);
333
+ EA(A, t, e, s, r) {
334
+ this.QA(A, t, e, r), this.QA(A + e - r, t, r, s), this.QA(A, t + s - r, e, r), this.QA(A, t, r, s);
301
335
  }
302
336
  }
303
- class rA extends Z {
337
+ class oA extends AA {
304
338
  constructor(A) {
305
339
  super(A);
306
340
  }
307
- QA(A, t, e, s, r) {
341
+ oA(A, t, e, s, r) {
308
342
  const i = e - A, B = s - t, Q = Math.hypot(i, B);
309
343
  if (Q === 0) {
310
- const g = r / 2, h = this.sA(A - g, t - g), a = this.sA(A + g, t + g);
311
- this.rA(h.nx, h.ny, a.nx, a.ny);
344
+ const g = r / 2, a = this.BA(A - g, t - g), h = this.BA(A + g, t + g);
345
+ this.iA(a.nx, a.ny, h.nx, h.ny);
312
346
  } else {
313
- const g = -B / Q, h = i / Q, a = r / 2, C = A + g * a, c = t + h * a, l = A - g * a, d = t - h * a, D = e + g * a, P = s + h * a, p = e - g * a, m = s - h * a, y = this.sA(C, c), v = this.sA(l, d), _ = this.sA(D, P), H = this.sA(p, m), M = this.P;
314
- this.AA(), M.bindBuffer(M.ARRAY_BUFFER, this.Z);
315
- const q = new Float32Array([y.nx, y.ny, 0, 0, v.nx, v.ny, 0, 1, _.nx, _.ny, 1, 0, v.nx, v.ny, 0, 1, H.nx, H.ny, 1, 1, _.nx, _.ny, 1, 0]);
316
- M.bufferData(M.ARRAY_BUFFER, q, M.DYNAMIC_DRAW);
347
+ const g = -B / Q, a = i / Q, h = r / 2, u = A + g * h, c = t + a * h, l = A - g * h, d = t - a * h, C = e + g * h, P = s + a * h, w = e - g * h, m = s - a * h, y = this.BA(u, c), x = this.BA(l, d), _ = this.BA(C, P), V = this.BA(w, m), T = this.p;
348
+ this.eA(), T.bindBuffer(T.ARRAY_BUFFER, this.q);
349
+ const eA = new Float32Array([y.nx, y.ny, 0, 0, x.nx, x.ny, 0, 1, _.nx, _.ny, 1, 0, x.nx, x.ny, 0, 1, V.nx, V.ny, 1, 1, _.nx, _.ny, 1, 0]);
350
+ T.bufferData(T.ARRAY_BUFFER, eA, T.DYNAMIC_DRAW);
317
351
  }
318
- const n = this.tA();
319
- this.P.drawArrays(this.P.TRIANGLES, 0, 6), this.eA(n.positionLoc, n.texLoc);
352
+ const n = this.sA();
353
+ this.p.drawArrays(this.p.TRIANGLES, 0, 6), this.rA(n.positionLoc, n.texLoc);
320
354
  }
321
355
  }
322
- var R = "attribute vec2 a_position;attribute vec2 a_texCoord;varying vec2 v_uv;uniform float u_rotation;uniform vec2 u_center;uniform float u_aspectRatio;mat2 rotate2D(float angle){float s=sin(angle);float c=cos(angle);return mat2(c,-s,s,c);}void main(){v_uv=a_texCoord;vec2 pos=a_position;pos-=u_center;pos.x*=u_aspectRatio;pos=rotate2D(-u_rotation)*pos;pos.x/=u_aspectRatio;pos+=u_center;gl_Position=vec4(pos,0.0,1.0);}";
323
- class iA {
356
+ var Y = "attribute vec2 a_position;attribute vec2 a_texCoord;varying vec2 v_uv;uniform float u_rotation;uniform vec2 u_center;uniform float u_aspectRatio;mat2 rotate2D(float angle){float s=sin(angle);float c=cos(angle);return mat2(c,-s,s,c);}void main(){v_uv=a_texCoord;vec2 pos=a_position;pos-=u_center;pos.x*=u_aspectRatio;pos=rotate2D(-u_rotation)*pos;pos.x/=u_aspectRatio;pos+=u_center;gl_Position=vec4(pos,0.0,1.0);}";
357
+ class EA {
324
358
  constructor(A) {
325
- o(this, "P");
326
- o(this, "EA");
327
- o(this, "oA");
328
- o(this, "gA", null);
329
- o(this, "nA");
330
- o(this, "aA");
331
- o(this, "hA", [1, 1, 1, 1]);
332
- o(this, "lA", !0);
333
- o(this, "cA", [0, 0, 0, 1]);
334
- o(this, "DA", 1);
335
- o(this, "CA", !0);
336
- o(this, "uA", 0);
337
- o(this, "PA", []);
338
- this.P = A, this.EA = new x(this.P, R, "precision lowp float;uniform sampler2D u_texture;varying vec2 v_uv;void main(){gl_FragColor=texture2D(u_texture,v_uv);}"), this.oA = new x(this.P, R, "precision lowp float;uniform vec4 u_color;void main(){gl_FragColor=u_color;}"), this.nA = new sA(this.P), this.aA = new rA(this.P), this.P.enable(this.P.BLEND), this.P.blendEquation(this.P.FUNC_ADD), this.P.blendFunc(this.P.ONE, this.P.ONE_MINUS_SRC_ALPHA), G(this.P, [0, 0, this.P.canvas.width, this.P.canvas.height]);
339
- }
340
- IA(A) {
341
- this.gA !== A && (this.gA = A, A.K());
342
- }
343
- wA(A, t, e, s) {
344
- if (this.lA = !0, t === void 0 && e === void 0 && s === void 0) {
359
+ E(this, "p");
360
+ E(this, "gA");
361
+ E(this, "nA");
362
+ E(this, "aA", null);
363
+ E(this, "hA");
364
+ E(this, "lA");
365
+ E(this, "cA", [1, 1, 1, 1]);
366
+ E(this, "DA", !0);
367
+ E(this, "CA", [0, 0, 0, 1]);
368
+ E(this, "uA", 1);
369
+ E(this, "PA", !0);
370
+ E(this, "IA", 0);
371
+ E(this, "wA", []);
372
+ this.p = A, this.gA = new p(this.p, Y, "precision lowp float;uniform sampler2D u_texture;varying vec2 v_uv;void main(){gl_FragColor=texture2D(u_texture,v_uv);}"), this.nA = new p(this.p, Y, "precision lowp float;uniform vec4 u_color;void main(){gl_FragColor=u_color;}"), this.hA = new BA(this.p), this.lA = new oA(this.p), this.p.enable(this.p.BLEND), this.p.blendEquation(this.p.FUNC_ADD), this.p.blendFunc(this.p.ONE, this.p.ONE_MINUS_SRC_ALPHA), F(this.p, [0, 0, this.p.canvas.width, this.p.canvas.height]);
373
+ }
374
+ fA(A) {
375
+ this.aA !== A && (this.aA = A, A.W());
376
+ }
377
+ dA(A, t, e, s) {
378
+ if (this.DA = !0, t === void 0 && e === void 0 && s === void 0) {
345
379
  const r = A / 255;
346
- this.hA = [r, r, r, 1];
347
- } else if (e !== void 0 && s === void 0) this.hA = [A / 255, t / 255, e / 255, 1];
380
+ this.cA = [r, r, r, 1];
381
+ } else if (e !== void 0 && s === void 0) this.cA = [A / 255, t / 255, e / 255, 1];
348
382
  else {
349
383
  if (e === void 0 || s === void 0) throw Error("Invalid fill parameters. Use fill(gray), fill(r,g,b), or fill(r,g,b,a)");
350
- this.hA = [A / 255, t / 255, e / 255, s / 255];
384
+ this.cA = [A / 255, t / 255, e / 255, s / 255];
351
385
  }
352
386
  }
353
- fA(A, t, e, s) {
354
- if (this.CA = !0, t === void 0 && e === void 0 && s === void 0) {
387
+ mA(A, t, e, s) {
388
+ if (this.PA = !0, t === void 0 && e === void 0 && s === void 0) {
355
389
  const r = A / 255;
356
- this.cA = [r, r, r, 1];
357
- } else if (e !== void 0 && s === void 0) this.cA = [A / 255, t / 255, e / 255, 1];
390
+ this.CA = [r, r, r, 1];
391
+ } else if (e !== void 0 && s === void 0) this.CA = [A / 255, t / 255, e / 255, 1];
358
392
  else {
359
393
  if (e === void 0 || s === void 0) throw Error("Invalid stroke parameters. Use stroke(gray), stroke(r,g,b), or stroke(r,g,b,a)");
360
- this.cA = [A / 255, t / 255, e / 255, s / 255];
394
+ this.CA = [A / 255, t / 255, e / 255, s / 255];
361
395
  }
362
396
  }
363
- dA(A) {
397
+ pA(A) {
364
398
  if (A < 0) throw Error("Stroke weight must be non-negative");
365
- this.DA = A;
366
- }
367
- mA() {
368
- this.CA = !1;
369
- }
370
- pA() {
371
- this.lA = !1;
372
- }
373
- _A(A) {
374
399
  this.uA = A;
375
400
  }
401
+ _A() {
402
+ this.PA = !1;
403
+ }
376
404
  vA() {
377
- this.PA.push({ fillColor: [...this.hA], fillMode: this.lA, strokeColor: [...this.cA], strokeWeight: this.DA, strokeMode: this.CA, rotation: this.uA });
405
+ this.DA = !1;
378
406
  }
379
- bA() {
380
- const A = this.PA.pop();
381
- A ? (this.hA = A.fillColor, this.lA = A.fillMode, this.cA = A.strokeColor, this.DA = A.strokeWeight, this.CA = A.strokeMode, this.uA = A.rotation) : console.warn("pop() called without matching push()");
407
+ bA(A) {
408
+ this.IA = A;
382
409
  }
383
410
  xA() {
384
- this.gA = null, this.PA = [], this.uA = 0;
411
+ this.wA.push({ fillColor: [...this.cA], fillMode: this.DA, strokeColor: [...this.CA], strokeWeight: this.uA, strokeMode: this.PA, rotation: this.IA });
385
412
  }
386
- yA(A) {
387
- const t = A.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\/\/.*$/gm, "").trim().match(/^#version\s+(\d+)\s+(es)?/i);
388
- return t ? parseInt(t[1], 10) >= 300 : !1;
413
+ yA() {
414
+ const A = this.wA.pop();
415
+ A ? (this.cA = A.fillColor, this.DA = A.fillMode, this.CA = A.strokeColor, this.uA = A.strokeWeight, this.PA = A.strokeMode, this.IA = A.rotation) : console.warn("pop() called without matching push()");
389
416
  }
390
- MA(A, t) {
391
- return new x(this.P, A, t);
417
+ MA() {
418
+ this.aA = null, this.wA = [], this.IA = 0;
392
419
  }
393
420
  GA(A) {
394
- const t = this.yA(A) ? `#version 300 es
395
- in vec2 a_position;in vec2 a_texCoord;out vec2 v_uv;uniform float u_rotation;uniform vec2 u_center;uniform float u_aspectRatio;mat2 rotate2D(float angle){float s=sin(angle);float c=cos(angle);return mat2(c,-s,s,c);}void main(){v_uv=a_texCoord;vec2 pos=a_position;pos-=u_center;pos.x*=u_aspectRatio;pos=rotate2D(-u_rotation)*pos;pos.x/=u_aspectRatio;pos+=u_center;gl_Position=vec4(pos,0.0,1.0);}` : R;
396
- return new x(this.P, t, A);
421
+ const t = A.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\/\/.*$/gm, "").trim().match(/^#version\s+(\d+)\s+(es)?/i);
422
+ return t ? parseInt(t[1], 10) >= 300 : !1;
397
423
  }
398
424
  FA(A, t) {
399
- this.gA.setUniform(A, t);
425
+ return new p(this.p, A, t);
400
426
  }
401
- $A(A, t, e, s) {
402
- if (this.gA !== null) {
403
- const { centerX: h, centerY: a, radians: C, aspectRatio: c } = this.YA(A, t, e, s);
404
- return this.FA("u_rotation", C), this.FA("u_center", [h, a]), this.FA("u_aspectRatio", c), this.nA.BA(A, t, e, s), void (this.gA = null);
405
- }
406
- const r = this.oA;
407
- let i = 0, B = 0, Q = 0, n = 1;
408
- const g = this.YA(A, t, e, s);
409
- i = g.centerX, B = g.centerY, Q = g.radians, n = g.aspectRatio, this.lA && (this.IA(r), this.FA("u_color", this.hA), this.FA("u_rotation", Q), this.FA("u_center", [i, B]), this.FA("u_aspectRatio", n), this.nA.BA(A, t, e, s)), this.CA && this.DA > 0 && (this.IA(r), this.FA("u_color", this.cA), this.FA("u_rotation", Q), this.FA("u_center", [i, B]), this.FA("u_aspectRatio", n), this.nA.iA(A, t, e, s, this.DA)), this.gA = null;
427
+ $A(A) {
428
+ const t = this.GA(A) ? `#version 300 es
429
+ in vec2 a_position;in vec2 a_texCoord;out vec2 v_uv;uniform float u_rotation;uniform vec2 u_center;uniform float u_aspectRatio;mat2 rotate2D(float angle){float s=sin(angle);float c=cos(angle);return mat2(c,-s,s,c);}void main(){v_uv=a_texCoord;vec2 pos=a_position;pos-=u_center;pos.x*=u_aspectRatio;pos=rotate2D(-u_rotation)*pos;pos.x/=u_aspectRatio;pos+=u_center;gl_Position=vec4(pos,0.0,1.0);}` : Y;
430
+ return new p(this.p, t, A);
431
+ }
432
+ YA(A, t) {
433
+ this.aA.setUniform(A, t);
410
434
  }
411
435
  TA(A, t, e, s) {
412
- if (this.gA !== null) {
413
- const l = (A + e) / 2, d = (t + s) / 2, D = Math.abs(e - A) || 1, P = Math.abs(s - t) || 1, { centerX: p, centerY: m, radians: y, aspectRatio: v } = this.YA(l - D / 2, d - P / 2, D, P);
414
- this.FA("u_rotation", y), this.FA("u_center", [p, m]), this.FA("u_aspectRatio", v);
415
- const _ = this.DA > 0 ? this.DA : 1;
416
- return this.aA.QA(A, t, e, s, _), void (this.gA = null);
436
+ if (this.aA !== null) {
437
+ const { centerX: a, centerY: h, radians: u, aspectRatio: c } = this.SA(A, t, e, s);
438
+ return this.YA("u_rotation", u), this.YA("u_center", [a, h]), this.YA("u_aspectRatio", c), this.hA.QA(A, t, e, s), void (this.aA = null);
417
439
  }
418
- if (!this.CA || this.DA <= 0) return;
419
- const r = this.oA, i = (A + e) / 2, B = (t + s) / 2, Q = Math.abs(e - A) || 1, n = Math.abs(s - t) || 1, g = this.uA !== 0;
420
- let h = 0, a = 0, C = 0, c = 1;
440
+ const r = this.nA;
441
+ let i = 0, B = 0, Q = 0, n = 1;
442
+ const g = this.SA(A, t, e, s);
443
+ i = g.centerX, B = g.centerY, Q = g.radians, n = g.aspectRatio, this.DA && (this.fA(r), this.YA("u_color", this.cA), this.YA("u_rotation", Q), this.YA("u_center", [i, B]), this.YA("u_aspectRatio", n), this.hA.QA(A, t, e, s)), this.PA && this.uA > 0 && (this.fA(r), this.YA("u_color", this.CA), this.YA("u_rotation", Q), this.YA("u_center", [i, B]), this.YA("u_aspectRatio", n), this.hA.EA(A, t, e, s, this.uA)), this.aA = null;
444
+ }
445
+ OA(A, t, e, s) {
446
+ if (this.aA !== null) {
447
+ const l = (A + e) / 2, d = (t + s) / 2, C = Math.abs(e - A) || 1, P = Math.abs(s - t) || 1, { centerX: w, centerY: m, radians: y, aspectRatio: x } = this.SA(l - C / 2, d - P / 2, C, P);
448
+ this.YA("u_rotation", y), this.YA("u_center", [w, m]), this.YA("u_aspectRatio", x);
449
+ const _ = this.uA > 0 ? this.uA : 1;
450
+ return this.lA.oA(A, t, e, s, _), void (this.aA = null);
451
+ }
452
+ if (!this.PA || this.uA <= 0) return;
453
+ const r = this.nA, i = (A + e) / 2, B = (t + s) / 2, Q = Math.abs(e - A) || 1, n = Math.abs(s - t) || 1, g = this.IA !== 0;
454
+ let a = 0, h = 0, u = 0, c = 1;
421
455
  if (g) {
422
- const l = this.YA(i - Q / 2, B - n / 2, Q, n);
423
- h = l.centerX, a = l.centerY, C = l.radians, c = l.aspectRatio;
456
+ const l = this.SA(i - Q / 2, B - n / 2, Q, n);
457
+ a = l.centerX, h = l.centerY, u = l.radians, c = l.aspectRatio;
424
458
  }
425
- this.IA(r), this.FA("u_color", this.cA), g && (this.FA("u_rotation", C), this.FA("u_center", [h, a]), this.FA("u_aspectRatio", c)), this.aA.QA(A, t, e, s, this.DA);
459
+ this.fA(r), this.YA("u_color", this.CA), g && (this.YA("u_rotation", u), this.YA("u_center", [a, h]), this.YA("u_aspectRatio", c)), this.lA.oA(A, t, e, s, this.uA);
426
460
  }
427
- YA(A, t, e, s) {
428
- const r = j(this.P) || [0, 0, this.P.canvas.width, this.P.canvas.height], i = r[2], B = r[3], Q = i / B;
429
- return { centerX: (A + e / 2) / i * 2 - 1, centerY: 1 - (t + s / 2) / B * 2, radians: this.uA * Math.PI / 180, aspectRatio: Q };
461
+ SA(A, t, e, s) {
462
+ const r = J(this.p) || [0, 0, this.p.canvas.width, this.p.canvas.height], i = r[2], B = r[3], Q = i / B;
463
+ return { centerX: (A + e / 2) / i * 2 - 1, centerY: 1 - (t + s / 2) / B * 2, radians: this.IA * Math.PI / 180, aspectRatio: Q };
430
464
  }
431
- SA(A, t, e = {}) {
432
- return new K(this.P, A, t, e);
465
+ UA(A, t, e = {}) {
466
+ return new K(this.p, A, t, e);
433
467
  }
434
- OA(A, t = A, e = A, s = 255) {
435
- this.UA(A / 255, t / 255, e / 255, s / 255);
468
+ RA(A, t = A, e = A, s = 255) {
469
+ this.kA(A / 255, t / 255, e / 255, s / 255);
436
470
  }
437
- UA(A = 0, t = 0, e = 0, s = 0) {
438
- this.P.clearColor(A, t, e, s), this.P.clear(this.P.COLOR_BUFFER_BIT);
471
+ kA(A = 0, t = 0, e = 0, s = 0) {
472
+ this.p.clearColor(A, t, e, s), this.p.clear(this.p.COLOR_BUFFER_BIT);
439
473
  }
440
- kA() {
441
- this.P.viewport(0, 0, this.P.canvas.width, this.P.canvas.height), G(this.P, [0, 0, this.P.canvas.width, this.P.canvas.height]);
474
+ VA() {
475
+ this.p.viewport(0, 0, this.p.canvas.width, this.p.canvas.height), F(this.p, [0, 0, this.p.canvas.width, this.p.canvas.height]);
442
476
  }
443
477
  get context() {
444
- return this.P;
478
+ return this.p;
445
479
  }
446
- S() {
447
- this.EA.S(), this.oA.S(), this.nA.S(), this.aA.S();
480
+ O() {
481
+ this.gA.O(), this.nA.O(), this.hA.O(), this.lA.O();
448
482
  }
449
- RA(A, t, e, s, r) {
450
- const i = this.P, B = s ?? A.width, Q = r ?? A.height;
451
- this.IA(this.EA), this.FA("u_texture", A.texture);
452
- const n = this.YA(t, e, B, Q);
453
- this.FA("u_rotation", n.radians), this.FA("u_center", [n.centerX, n.centerY]), this.FA("u_aspectRatio", n.aspectRatio), this.nA.BA(t, e, B, Q), i.bindTexture(i.TEXTURE_2D, null), this.gA = null;
483
+ HA(A, t, e, s, r) {
484
+ const i = this.p, B = s ?? A.width, Q = r ?? A.height;
485
+ this.fA(this.gA), this.YA("u_texture", A);
486
+ const n = this.SA(t, e, B, Q);
487
+ this.YA("u_rotation", n.radians), this.YA("u_center", [n.centerX, n.centerY]), this.YA("u_aspectRatio", n.aspectRatio), this.hA.QA(t, e, B, Q), i.bindTexture(i.TEXTURE_2D, null), this.aA = null;
454
488
  }
455
489
  }
456
- 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) {
490
+ const f = { readShort: (o, A) => (f.t.uint16[0] = o[A] << 8 | o[A + 1], f.t.int16[0]), readUshort: (o, A) => o[A] << 8 | o[A + 1], readUshorts(o, A, t) {
457
491
  const e = [];
458
- for (let s = 0; s < t; s++) e.push(f.readUshort(E, A + 2 * s));
492
+ for (let s = 0; s < t; s++) e.push(f.readUshort(o, A + 2 * s));
459
493
  return e;
460
- }, readUint(E, A) {
494
+ }, readUint(o, A) {
461
495
  const t = f.t.uint8;
462
- return t[3] = E[A], t[2] = E[A + 1], t[1] = E[A + 2], t[0] = E[A + 3], f.t.uint32[0];
463
- }, readASCII(E, A, t) {
496
+ return t[3] = o[A], t[2] = o[A + 1], t[1] = o[A + 2], t[0] = o[A + 3], f.t.uint32[0];
497
+ }, readASCII(o, A, t) {
464
498
  let e = "";
465
- for (let s = 0; s < t; s++) e += String.fromCharCode(E[A + s]);
499
+ for (let s = 0; s < t; s++) e += String.fromCharCode(o[A + s]);
466
500
  return e;
467
501
  }, t: (() => {
468
- const E = new ArrayBuffer(8);
469
- return { uint8: new Uint8Array(E), int16: new Int16Array(E), uint16: new Uint16Array(E), uint32: new Uint32Array(E) };
470
- })() }, BA = { parseTab(E, A, t) {
502
+ const o = new ArrayBuffer(8);
503
+ return { uint8: new Uint8Array(o), int16: new Int16Array(o), uint16: new Uint16Array(o), uint32: new Uint32Array(o) };
504
+ })() }, QA = { parseTab(o, A, t) {
471
505
  const e = { tables: [], ids: {}, off: A };
472
- E = new Uint8Array(E.buffer, A, t), A = 0;
473
- const s = f, r = s.readUshort, i = r(E, A += 2);
506
+ o = new Uint8Array(o.buffer, A, t), A = 0;
507
+ const s = f, r = s.readUshort, i = r(o, A += 2);
474
508
  A += 2;
475
509
  const B = [];
476
510
  for (let Q = 0; Q < i; Q++) {
477
- const n = r(E, A), g = r(E, A += 2);
511
+ const n = r(o, A), g = r(o, A += 2);
478
512
  A += 2;
479
- const h = s.readUint(E, A);
513
+ const a = s.readUint(o, A);
480
514
  A += 4;
481
- const a = `p${n}e${g}`;
482
- let C = B.indexOf(h);
483
- if (C === -1) {
515
+ const h = `p${n}e${g}`;
516
+ let u = B.indexOf(a);
517
+ if (u === -1) {
484
518
  let c;
485
- C = e.tables.length, B.push(h);
486
- const l = r(E, h);
487
- c = l === 4 ? this.parse4(E, h) : l === 12 ? this.parse12(E, h) : { format: l }, e.tables.push(c);
519
+ u = e.tables.length, B.push(a);
520
+ const l = r(o, a);
521
+ c = l === 4 ? this.parse4(o, a) : l === 12 ? this.parse12(o, a) : { format: l }, e.tables.push(c);
488
522
  }
489
- e.ids[a] != null && console.warn("Multiple tables for one platform+encoding: " + a), e.ids[a] = C;
523
+ e.ids[h] != null && console.warn("Multiple tables for one platform+encoding: " + h), e.ids[h] = u;
490
524
  }
491
525
  return e;
492
- }, parse4(E, A) {
493
- const t = f, e = t.readUshort, s = t.readUshorts, r = A, i = e(E, A += 2);
526
+ }, parse4(o, A) {
527
+ const t = f, e = t.readUshort, s = t.readUshorts, r = A, i = e(o, A += 2);
494
528
  A += 2;
495
- const B = e(E, A += 2) >>> 1, Q = { format: 4, searchRange: e(E, A += 2), entrySelector: 0, rangeShift: 0, endCount: [], startCount: [], idDelta: [], idRangeOffset: [], glyphIdArray: [] };
496
- 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;
497
- for (let n = 0; n < B; n++) Q.idDelta.push(t.readShort(E, A)), A += 2;
498
- return Q.idRangeOffset = s(E, A, B), A += 2 * B, Q.glyphIdArray = s(E, A, r + i - A >> 1), Q;
499
- }, parse12(E, A) {
529
+ const B = e(o, A += 2) >>> 1, Q = { format: 4, searchRange: e(o, A += 2), entrySelector: 0, rangeShift: 0, endCount: [], startCount: [], idDelta: [], idRangeOffset: [], glyphIdArray: [] };
530
+ A += 2, Q.entrySelector = e(o, A), A += 2, Q.rangeShift = e(o, A), A += 2, Q.endCount = s(o, A, B), A += 2 * B, A += 2, Q.startCount = s(o, A, B), A += 2 * B;
531
+ for (let n = 0; n < B; n++) Q.idDelta.push(t.readShort(o, A)), A += 2;
532
+ return Q.idRangeOffset = s(o, A, B), A += 2 * B, Q.glyphIdArray = s(o, A, r + i - A >> 1), Q;
533
+ }, parse12(o, A) {
500
534
  const t = f.readUint;
501
- t(E, A += 4), t(E, A += 4);
502
- const e = t(E, A += 4);
535
+ t(o, A += 4), t(o, A += 4);
536
+ const e = t(o, A += 4);
503
537
  A += 4;
504
538
  const s = new Uint32Array(3 * e);
505
- 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);
539
+ for (let r = 0; r < 3 * e; r += 3) s[r] = t(o, A + (r << 2)), s[r + 1] = t(o, A + (r << 2) + 4), s[r + 2] = t(o, A + (r << 2) + 8);
506
540
  return { format: 12, groups: s };
507
- } }, EA = { parseTab(E, A, t) {
541
+ } }, nA = { parseTab(o, A, t) {
508
542
  const e = f;
509
543
  A += 18;
510
- const s = e.readUshort(E, A);
544
+ const s = e.readUshort(o, A);
511
545
  A += 2, A += 16;
512
- const r = e.readShort(E, A);
546
+ const r = e.readShort(o, A);
513
547
  A += 2;
514
- const i = e.readShort(E, A);
548
+ const i = e.readShort(o, A);
515
549
  A += 2;
516
- const B = e.readShort(E, A);
550
+ const B = e.readShort(o, A);
517
551
  A += 2;
518
- const Q = e.readShort(E, A);
519
- return A += 2, A += 6, { unitsPerEm: s, xMin: r, yMin: i, xMax: B, yMax: Q, indexToLocFormat: e.readShort(E, A) };
520
- } }, oA = { parseTab(E, A, t) {
552
+ const Q = e.readShort(o, A);
553
+ return A += 2, A += 6, { unitsPerEm: s, xMin: r, yMin: i, xMax: B, yMax: Q, indexToLocFormat: e.readShort(o, A) };
554
+ } }, gA = { parseTab(o, A, t) {
521
555
  const e = f;
522
556
  A += 4;
523
557
  const s = ["ascender", "descender", "lineGap", "advanceWidthMax", "minLeftSideBearing", "minRightSideBearing", "xMaxExtent", "caretSlopeRise", "caretSlopeRun", "caretOffset", "res0", "res1", "res2", "res3", "metricDataFormat", "numberOfHMetrics"], r = {};
524
558
  for (let i = 0; i < s.length; i++) {
525
559
  const B = s[i], Q = B === "advanceWidthMax" || B === "numberOfHMetrics" ? e.readUshort : e.readShort;
526
- r[B] = Q(E, A + 2 * i);
560
+ r[B] = Q(o, A + 2 * i);
527
561
  }
528
562
  return r;
529
- } }, QA = { parseTab(E, A, t, e) {
563
+ } }, hA = { parseTab(o, A, t, e) {
530
564
  if (!e) throw Error("Font object required for hmtx parsing");
531
565
  const s = f, r = [], i = [], B = e.maxp.numGlyphs, Q = e.hhea.numberOfHMetrics;
532
- let n = 0, g = 0, h = 0;
533
- for (; h < Q; ) n = s.readUshort(E, A + (h << 2)), g = s.readShort(E, A + (h << 2) + 2), r.push(n), i.push(g), h++;
534
- for (; h < B; ) r.push(n), i.push(g), h++;
566
+ let n = 0, g = 0, a = 0;
567
+ for (; a < Q; ) n = s.readUshort(o, A + (a << 2)), g = s.readShort(o, A + (a << 2) + 2), r.push(n), i.push(g), a++;
568
+ for (; a < B; ) r.push(n), i.push(g), a++;
535
569
  return { aWidth: r, lsBearing: i };
536
- } }, V = { cmap: BA, head: EA, hhea: oA, maxp: { parseTab(E, A, t) {
570
+ } }, N = { cmap: QA, head: nA, hhea: gA, maxp: { parseTab(o, A, t) {
537
571
  const e = f;
538
- return e.readUint(E, A), A += 4, { numGlyphs: e.readUshort(E, A) };
539
- } }, hmtx: QA, loca: { parseTab(E, A, t, e) {
572
+ return e.readUint(o, A), A += 4, { numGlyphs: e.readUshort(o, A) };
573
+ } }, hmtx: hA, loca: { parseTab(o, A, t, e) {
540
574
  if (!e) throw Error("Font object required for loca parsing");
541
575
  const s = f, r = [], i = e.head.indexToLocFormat, B = e.maxp.numGlyphs + 1;
542
- if (i === 0) for (let Q = 0; Q < B; Q++) r.push(s.readUshort(E, A + (Q << 1)) << 1);
543
- else if (i === 1) for (let Q = 0; Q < B; Q++) r.push(s.readUint(E, A + (Q << 2)));
576
+ if (i === 0) for (let Q = 0; Q < B; Q++) r.push(s.readUshort(o, A + (Q << 1)) << 1);
577
+ else if (i === 1) for (let Q = 0; Q < B; Q++) r.push(s.readUint(o, A + (Q << 2)));
544
578
  return r;
545
- } }, glyf: { parseTab(E, A, t, e) {
579
+ } }, glyf: { parseTab(o, A, t, e) {
546
580
  if (!e) throw Error("Font object required for glyf parsing");
547
581
  const s = [], r = e.maxp.numGlyphs;
548
582
  for (let i = 0; i < r; i++) s.push(null);
549
583
  return s;
550
- }, VA(E, A) {
551
- const t = f, e = E.HA, s = E.loca;
584
+ }, zA(o, A) {
585
+ const t = f, e = o.LA, s = o.loca;
552
586
  if (s[A] === s[A + 1]) return null;
553
- const r = w.findTable(e, "glyf", E.zA);
587
+ const r = b.findTable(e, "glyf", o.JA);
554
588
  if (!r) return null;
555
589
  let i = r[0] + s[A];
556
590
  const B = {};
557
591
  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;
558
592
  if (B.noc > 0) {
559
593
  B.endPts = [];
560
- for (let a = 0; a < B.noc; a++) B.endPts.push(t.readUshort(e, i)), i += 2;
594
+ for (let h = 0; h < B.noc; h++) B.endPts.push(t.readUshort(e, i)), i += 2;
561
595
  const Q = t.readUshort(e, i);
562
596
  if (i += 2, e.length - i < Q) return null;
563
597
  i += Q;
564
598
  const n = B.endPts[B.noc - 1] + 1;
565
599
  B.flags = [];
566
- for (let a = 0; a < n; a++) {
567
- const C = e[i];
568
- if (i++, B.flags.push(C), 8 & C) {
600
+ for (let h = 0; h < n; h++) {
601
+ const u = e[i];
602
+ if (i++, B.flags.push(u), 8 & u) {
569
603
  const c = e[i];
570
604
  i++;
571
- for (let l = 0; l < c; l++) B.flags.push(C), a++;
605
+ for (let l = 0; l < c; l++) B.flags.push(u), h++;
572
606
  }
573
607
  }
574
608
  B.xs = [];
575
- for (let a = 0; a < n; a++) {
576
- const C = B.flags[a], c = !!(16 & C);
577
- 2 & C ? (B.xs.push(c ? e[i] : -e[i]), i++) : c ? B.xs.push(0) : (B.xs.push(t.readShort(e, i)), i += 2);
609
+ for (let h = 0; h < n; h++) {
610
+ const u = B.flags[h], c = !!(16 & u);
611
+ 2 & u ? (B.xs.push(c ? e[i] : -e[i]), i++) : c ? B.xs.push(0) : (B.xs.push(t.readShort(e, i)), i += 2);
578
612
  }
579
613
  B.ys = [];
580
- for (let a = 0; a < n; a++) {
581
- const C = B.flags[a], c = !!(32 & C);
582
- 4 & C ? (B.ys.push(c ? e[i] : -e[i]), i++) : c ? B.ys.push(0) : (B.ys.push(t.readShort(e, i)), i += 2);
614
+ for (let h = 0; h < n; h++) {
615
+ const u = B.flags[h], c = !!(32 & u);
616
+ 4 & u ? (B.ys.push(c ? e[i] : -e[i]), i++) : c ? B.ys.push(0) : (B.ys.push(t.readShort(e, i)), i += 2);
583
617
  }
584
- let g = 0, h = 0;
585
- for (let a = 0; a < n; a++) g += B.xs[a], h += B.ys[a], B.xs[a] = g, B.ys[a] = h;
618
+ let g = 0, a = 0;
619
+ for (let h = 0; h < n; h++) g += B.xs[h], a += B.ys[h], B.xs[h] = g, B.ys[h] = a;
586
620
  } else B.parts = [], B.endPts = [], B.flags = [], B.xs = [], B.ys = [];
587
621
  return B;
588
- } } }, w = { parse: (E) => [((A, t, e, s) => {
589
- const r = V, i = { HA: A, LA: t, zA: e };
622
+ } } }, b = { parse: (o) => [((A, t, e, s) => {
623
+ const r = N, i = { LA: A, jA: t, JA: e };
590
624
  for (const B in r) {
591
- const Q = B, n = w.findTable(A, Q, e);
625
+ const Q = B, n = b.findTable(A, Q, e);
592
626
  if (n) {
593
- const [g, h] = n;
594
- let a = s[g];
595
- a == null && (a = r[Q].parseTab(A, g, h, i), s[g] = a), i[Q] = a;
627
+ const [g, a] = n;
628
+ let h = s[g];
629
+ h == null && (h = r[Q].parseTab(A, g, a, i), s[g] = h), i[Q] = h;
596
630
  }
597
631
  }
598
632
  return i;
599
- })(new Uint8Array(E), 0, 0, {})], findTable(E, A, t) {
600
- const e = f, s = e.readUshort(E, t + 4);
633
+ })(new Uint8Array(o), 0, 0, {})], findTable(o, A, t) {
634
+ const e = f, s = e.readUshort(o, t + 4);
601
635
  let r = t + 12;
602
636
  for (let i = 0; i < s; i++) {
603
- const B = e.readASCII(E, r, 4);
604
- e.readUint(E, r + 4);
605
- const Q = e.readUint(E, r + 8), n = e.readUint(E, r + 12);
637
+ const B = e.readASCII(o, r, 4);
638
+ e.readUint(o, r + 4);
639
+ const Q = e.readUint(o, r + 8), n = e.readUint(o, r + 12);
606
640
  if (B === A) return [Q, n];
607
641
  r += 16;
608
642
  }
609
643
  return null;
610
- }, T: V, B: f };
611
- class U {
644
+ }, T: N, B: f };
645
+ class G {
612
646
  constructor() {
613
- o(this, "JA", /* @__PURE__ */ new Map());
614
- o(this, "KA", /* @__PURE__ */ new Map());
615
- }
616
- WA(A) {
617
- const t = this.jA(A);
618
- if (this.KA.has(t)) return this.KA.get(t);
619
- const e = A.cmap;
620
- if (!e || !e.tables) return this.KA.set(t, null), null;
621
- const s = ["p3e1", "p3e10", "p0e3", "p0e4"];
622
- for (const i of s) if (e.ids[i] !== void 0) {
623
- const B = e.tables[e.ids[i]];
624
- return this.KA.set(t, B), B;
625
- }
626
- const r = e.tables[0] || null;
627
- return this.KA.set(t, r), r;
647
+ E(this, "KA", /* @__PURE__ */ new Map());
648
+ E(this, "WA", /* @__PURE__ */ new Map());
628
649
  }
629
650
  NA(A, t) {
630
- const e = `${this.jA(A)}_${t}`;
631
- if (this.JA.has(e)) return this.JA.get(e);
632
- const s = this.WA(A);
633
- if (!s) return this.JA.set(e, 0), 0;
651
+ const e = `${this.ZA(A)}_${t}`;
652
+ if (this.KA.has(e)) return this.KA.get(e);
653
+ const s = A.cmap;
654
+ if (!s || !s.tables) return this.KA.set(e, 0), 0;
634
655
  let r = 0;
635
- return s.format === 4 ? r = this.ZA(t, s) : s.format === 12 && (r = this.XA(t, s)), this.JA.set(e, r), r;
656
+ for (const i of s.tables) if (i.format === 4 ? r = this.XA(t, i) : i.format === 12 && (r = this.qA(t, i)), r > 0) break;
657
+ return this.KA.set(e, r), r;
636
658
  }
637
- qA(A, t) {
659
+ At(A, t) {
638
660
  const e = t.codePointAt(0);
639
661
  return e === void 0 ? 0 : this.NA(A, e);
640
662
  }
641
- At(A, t) {
663
+ tt(A, t) {
642
664
  const e = A.hmtx;
643
665
  return e && e.aWidth && e.aWidth.length !== 0 ? t < e.aWidth.length ? e.aWidth[t] : e.aWidth[e.aWidth.length - 1] : 0;
644
666
  }
645
- tt(A, t) {
667
+ et(A, t) {
646
668
  const e = t / A.head.unitsPerEm, s = A.hhea.ascender * e, r = A.hhea.descender * e, i = A.hhea.lineGap * e;
647
669
  return { ascender: s, descender: r, lineGap: i, lineHeight: s - r + i, unitsPerEm: A.head.unitsPerEm, scale: e };
648
670
  }
649
- et() {
650
- this.JA.clear(), this.KA.clear();
671
+ st() {
672
+ this.KA.clear(), this.WA.clear();
651
673
  }
652
- jA(A) {
653
- return `${A.zA}_${A.HA.length}`;
674
+ ZA(A) {
675
+ return `${A.JA}_${A.LA.length}`;
654
676
  }
655
- ZA(A, t) {
677
+ XA(A, t) {
656
678
  const e = t.endCount.length;
657
679
  let s = -1;
658
680
  for (let r = 0; r < e; r++) if (A <= t.endCount[r]) {
@@ -670,7 +692,7 @@ class U {
670
692
  }
671
693
  return 0;
672
694
  }
673
- XA(A, t) {
695
+ qA(A, t) {
674
696
  const e = t.groups.length / 3;
675
697
  for (let s = 0; s < e; s++) {
676
698
  const r = t.groups[3 * s], i = t.groups[3 * s + 1], B = t.groups[3 * s + 2];
@@ -679,45 +701,45 @@ class U {
679
701
  return 0;
680
702
  }
681
703
  }
682
- class nA {
704
+ class aA {
683
705
  constructor(A) {
684
- o(this, "st");
685
- this.st = A;
706
+ E(this, "rt");
707
+ this.rt = A;
686
708
  }
687
- rt(A) {
709
+ Bt(A) {
688
710
  var e;
689
711
  const t = [];
690
712
  return (e = A == null ? void 0 : A.cmap) != null && e.tables ? (A.cmap.tables.forEach((s) => {
691
713
  if (s.format === 4) {
692
- const r = this.Bt(s);
714
+ const r = this.it(s);
693
715
  t.push(...r);
694
716
  } else if (s.format === 12) {
695
- const r = this.it(s);
717
+ const r = this.Qt(s);
696
718
  t.push(...r);
697
719
  }
698
720
  }), [...new Set(t)]) : [];
699
721
  }
700
- Qt(A, t) {
701
- return this.st.qA(A, t) > 0;
702
- }
703
722
  Et(A, t) {
704
- for (const e of t) if (!this.Qt(A, e)) return !1;
705
- return !0;
723
+ return this.rt.At(A, t) > 0;
706
724
  }
707
725
  ot(A, t) {
708
- return t.filter((e) => this.Qt(A, e));
726
+ for (const e of t) if (!this.Et(A, e)) return !1;
727
+ return !0;
709
728
  }
710
- gt(A) {
711
- return A.filter((t) => this.nt(t));
729
+ gt(A, t) {
730
+ return t.filter((e) => this.Et(A, e));
712
731
  }
713
- Bt(A) {
732
+ nt(A) {
733
+ return A.filter((t) => this.ht(t));
734
+ }
735
+ it(A) {
714
736
  const t = [];
715
737
  if (!(A.startCount && A.endCount && A.idRangeOffset && A.idDelta)) return t;
716
738
  for (let e = 0; e < A.startCount.length; e++) {
717
739
  const s = A.startCount[e], r = A.endCount[e];
718
740
  if (s !== 65535 || r !== 65535) {
719
741
  for (let i = s; i <= r; i++)
720
- if (this.ht(A, i, e) > 0) try {
742
+ if (this.lt(A, i, e) > 0) try {
721
743
  const B = String.fromCodePoint(i);
722
744
  t.push(B);
723
745
  } catch {
@@ -726,7 +748,7 @@ class nA {
726
748
  }
727
749
  return t;
728
750
  }
729
- it(A) {
751
+ Qt(A) {
730
752
  const t = [];
731
753
  if (!A.groups) return t;
732
754
  for (let e = 0; e < A.groups.length; e += 3) {
@@ -740,7 +762,7 @@ class nA {
740
762
  }
741
763
  return t;
742
764
  }
743
- ht(A, t, e) {
765
+ lt(A, t, e) {
744
766
  if (A.idRangeOffset[e] === 0) return t + A.idDelta[e] & 65535;
745
767
  {
746
768
  const s = A.idRangeOffset[e] / 2 + (t - A.startCount[e]) - (A.startCount.length - e);
@@ -751,177 +773,177 @@ class nA {
751
773
  }
752
774
  return 0;
753
775
  }
754
- nt(A) {
776
+ ht(A) {
755
777
  const t = A.codePointAt(0) || 0;
756
778
  return !(t >= 0 && t <= 31 && t !== 9 && t !== 10 && t !== 13 || t >= 127 && t <= 159);
757
779
  }
758
780
  }
759
- class gA {
781
+ class lA {
760
782
  constructor() {
761
- o(this, "lt");
762
- const A = new U();
763
- this.lt = new nA(A);
783
+ E(this, "ct");
784
+ const A = new G();
785
+ this.ct = new aA(A);
764
786
  }
765
787
  extractCharacters(A) {
766
- return this.lt.rt(A);
788
+ return this.ct.Bt(A);
767
789
  }
768
790
  filterProblematicCharacters(A) {
769
- return this.lt.gt(A);
791
+ return this.ct.nt(A);
770
792
  }
771
793
  characterExists(A, t) {
772
- return this.lt.Qt(A, t);
794
+ return this.ct.Et(A, t);
773
795
  }
774
796
  allCharactersExist(A, t) {
775
- return this.lt.Et(A, t);
797
+ return this.ct.ot(A, t);
776
798
  }
777
799
  }
778
- class aA {
800
+ class cA {
779
801
  constructor(A) {
780
- o(this, "ct");
781
- o(this, "Dt");
782
- o(this, "Ct");
783
- o(this, "ut");
784
- this.Ct = A, this.ut = new U(), this.ct = document.createElement("canvas"), this.Dt = this.ct.getContext("2d", { willReadFrequently: !0, alpha: !1 });
802
+ E(this, "Dt");
803
+ E(this, "Ct");
804
+ E(this, "ut");
805
+ E(this, "Pt");
806
+ this.ut = A, this.Pt = new G(), this.Dt = document.createElement("canvas"), this.Ct = this.Dt.getContext("2d", { willReadFrequently: !0, alpha: !1 });
785
807
  }
786
808
  createTextureAtlas(A, t, e, s) {
787
809
  const r = A.length, i = Math.ceil(Math.sqrt(r)), B = Math.ceil(r / i), Q = t.width * i, n = t.height * B, g = typeof s == "object" ? s : null;
788
- this.Pt(Q, n), this.It(A, t, i, e, g);
789
- const h = this.Ct.SA(Q, n, { filter: "nearest" });
790
- return h.update(this.ct), { framebuffer: h, columns: i, rows: B };
810
+ this.It(Q, n), this.wt(A, t, i, e, g);
811
+ const a = this.ut.UA(Q, n, { filter: "nearest" });
812
+ return a.S(this.Dt), { framebuffer: a, columns: i, rows: B };
791
813
  }
792
- Pt(A, t) {
793
- this.ct.width = A, this.ct.height = t, this.ct.style.width = A + "px", this.ct.style.height = A + "px", this.Dt.imageSmoothingEnabled = !1, this.ct.style.imageRendering = "pixelated", this.Dt.fillStyle = "black", this.Dt.fillRect(0, 0, A, t), this.Dt.textBaseline = "top", this.Dt.textAlign = "left", this.Dt.fillStyle = "white";
814
+ It(A, t) {
815
+ this.Dt.width = A, this.Dt.height = t, this.Dt.style.width = A + "px", this.Dt.style.height = A + "px", this.Ct.imageSmoothingEnabled = !1, this.Dt.style.imageRendering = "pixelated", this.Ct.fillStyle = "black", this.Ct.fillRect(0, 0, A, t), this.Ct.textBaseline = "top", this.Ct.textAlign = "left", this.Ct.fillStyle = "white";
794
816
  }
795
- It(A, t, e, s, r) {
817
+ wt(A, t, e, s, r) {
796
818
  const i = s / r.head.unitsPerEm;
797
819
  for (let B = 0; B < A.length; B++) {
798
- const Q = B % e, n = Math.floor(B / e), g = A[B].character, h = this.wt(r, g);
799
- if (!h) continue;
800
- const a = g.codePointAt(0) || 0, C = this.ut.NA(r, a), c = this.ft(r, C) * i, l = Q * t.width, d = n * t.height, D = l + 0.5 * t.width, P = d + 0.5 * t.height, p = Math.round(D - 0.5 * t.width), m = Math.round(P - 0.5 * s), y = p + 0.5 * (t.width - c), v = m + r.hhea.ascender * i;
801
- this.dt(h, y, v, i);
820
+ const Q = B % e, n = Math.floor(B / e), g = A[B].character, a = this.ft(r, g);
821
+ if (!a) continue;
822
+ const h = g.codePointAt(0) || 0, u = this.Pt.NA(r, h), c = this.dt(r, u) * i, l = Q * t.width, d = n * t.height, C = l + 0.5 * t.width, P = d + 0.5 * t.height, w = Math.round(C - 0.5 * t.width), m = Math.round(P - 0.5 * s), y = w + 0.5 * (t.width - c), x = m + r.hhea.ascender * i;
823
+ this._t(a, y, x, i);
802
824
  }
803
825
  }
804
- wt(A, t) {
805
- const e = t.codePointAt(0) || 0, s = this.ut.NA(A, e);
826
+ ft(A, t) {
827
+ const e = t.codePointAt(0) || 0, s = this.Pt.NA(A, e);
806
828
  if (s === 0) return null;
807
829
  if (A.glyf && A.glyf[s] !== null) return A.glyf[s];
808
- if (w && w.T && w.T.glyf && w.T.glyf.VA) {
809
- const r = w.T.glyf.VA(A, s);
830
+ if (b && b.T && b.T.glyf) {
831
+ const r = b.T.glyf.zA(A, s);
810
832
  return A.glyf && r && (A.glyf[s] = r), r;
811
833
  }
812
834
  return null;
813
835
  }
814
- ft(A, t) {
836
+ dt(A, t) {
815
837
  const e = A.hmtx;
816
838
  return e && e.aWidth ? t < e.aWidth.length ? e.aWidth[t] : e.aWidth[e.aWidth.length - 1] : 0;
817
839
  }
818
- dt(A, t, e, s) {
840
+ _t(A, t, e, s) {
819
841
  if (!A || !A.xs || A.noc === 0) return;
820
842
  const { xs: r, ys: i, endPts: B, flags: Q } = A;
821
843
  if (!(r && i && B && Q)) return;
822
- this.Dt.beginPath();
844
+ this.Ct.beginPath();
823
845
  let n = 0;
824
846
  for (let g = 0; g < B.length; g++) {
825
- const h = B[g];
826
- if (!(h < n)) {
827
- if (h >= n) {
828
- const a = t + r[n] * s, C = e - i[n] * s;
829
- this.Dt.moveTo(a, C);
847
+ const a = B[g];
848
+ if (!(a < n)) {
849
+ if (a >= n) {
850
+ const h = t + r[n] * s, u = e - i[n] * s;
851
+ this.Ct.moveTo(h, u);
830
852
  let c = n + 1;
831
- for (; c <= h; )
853
+ for (; c <= a; )
832
854
  if (1 & Q[c]) {
833
855
  const l = t + r[c] * s, d = e - i[c] * s;
834
- this.Dt.lineTo(l, d), c++;
856
+ this.Ct.lineTo(l, d), c++;
835
857
  } else {
836
858
  const l = t + r[c] * s, d = e - i[c] * s;
837
- let D = c + 1 > h ? n : c + 1;
838
- if (1 & Q[D]) {
839
- const P = t + r[D] * s, p = e - i[D] * s;
840
- this.Dt.quadraticCurveTo(l, d, P, p), c = D + 1;
859
+ let C = c + 1 > a ? n : c + 1;
860
+ if (1 & Q[C]) {
861
+ const P = t + r[C] * s, w = e - i[C] * s;
862
+ this.Ct.quadraticCurveTo(l, d, P, w), c = C + 1;
841
863
  } else {
842
- const P = (l + (t + r[D] * s)) / 2, p = (d + (e - i[D] * s)) / 2;
843
- this.Dt.quadraticCurveTo(l, d, P, p), c = D;
864
+ const P = (l + (t + r[C] * s)) / 2, w = (d + (e - i[C] * s)) / 2;
865
+ this.Ct.quadraticCurveTo(l, d, P, w), c = C;
844
866
  }
845
867
  }
846
- this.Dt.closePath();
868
+ this.Ct.closePath();
847
869
  }
848
- n = h + 1;
870
+ n = a + 1;
849
871
  }
850
872
  }
851
- this.Dt.fill();
873
+ this.Ct.fill();
852
874
  }
853
875
  }
854
- class hA {
876
+ class uA {
855
877
  constructor() {
856
- o(this, "st");
857
- this.st = new U();
878
+ E(this, "rt");
879
+ this.rt = new G();
858
880
  }
859
881
  calculateMaxGlyphDimensions(A, t, e) {
860
882
  let s = 0;
861
- const r = this.st.tt(e, t), i = r.lineHeight;
883
+ const r = this.rt.et(e, t), i = r.lineHeight;
862
884
  for (const B of A) {
863
- const Q = this.st.qA(e, B);
885
+ const Q = this.rt.At(e, B);
864
886
  if (Q === 0) continue;
865
- const n = this.st.At(e, Q) * r.scale;
887
+ const n = this.rt.tt(e, Q) * r.scale;
866
888
  s = Math.max(s, n);
867
889
  }
868
890
  return { width: Math.ceil(s), height: Math.ceil(i) };
869
891
  }
870
892
  getCharacterAdvanceWidth(A, t, e) {
871
- const s = this.st.tt(e, t), r = this.st.qA(e, A);
872
- return this.st.At(e, r) * s.scale;
893
+ const s = this.rt.et(e, t), r = this.rt.At(e, A);
894
+ return this.rt.tt(e, r) * s.scale;
873
895
  }
874
896
  getFontMetrics(A, t) {
875
- return this.st.tt(t, A);
897
+ return this.rt.et(t, A);
876
898
  }
877
- et() {
878
- this.st.et();
899
+ st() {
900
+ this.rt.st();
879
901
  }
880
902
  }
881
- class lA {
903
+ class CA {
882
904
  constructor() {
883
- o(this, "ut");
884
- this.ut = new U();
905
+ E(this, "Pt");
906
+ this.Pt = new G();
885
907
  }
886
908
  createCharacterObjects(A, t) {
887
909
  return A.map((e, s) => {
888
- const r = e.codePointAt(0) || 0, i = this._t(s);
910
+ const r = e.codePointAt(0) || 0, i = this.vt(s);
889
911
  let B = 0;
890
912
  if (t.hmtx && t.hmtx.aWidth) {
891
- const Q = this.ut.NA(t, r);
913
+ const Q = this.Pt.NA(t, r);
892
914
  Q > 0 && t.hmtx.aWidth[Q] !== void 0 && (B = t.hmtx.aWidth[Q]);
893
915
  }
894
916
  return { character: e, unicode: r, color: i, advanceWidth: B };
895
917
  });
896
918
  }
897
- _t(A) {
919
+ vt(A) {
898
920
  return [A % 256, Math.floor(A / 256) % 256, Math.floor(A / 65536) % 256];
899
921
  }
900
922
  getCharacterColor(A, t) {
901
- if (!u.C(typeof A == "string", "Character must be a string.", { method: "getCharacterColor", providedValue: A })) return [0, 0, 0];
923
+ if (!D.C(typeof A == "string", "Character must be a string.", { method: "getCharacterColor", providedValue: A })) return [0, 0, 0];
902
924
  const e = t.find((s) => s.character === A);
903
925
  return e ? e.color : [0, 0, 0];
904
926
  }
905
927
  getCharacterColors(A, t) {
906
- return u.C(typeof A == "string" && A.length > 0, "Characters must be a string with at least one character.", { method: "getCharacterColors", providedValue: A }) ? A.split("").map((e) => this.getCharacterColor(e, t) || [0, 0, 0]) : [[0, 0, 0]];
928
+ return D.C(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.getCharacterColor(e, t) || [0, 0, 0]) : [[0, 0, 0]];
907
929
  }
908
930
  }
909
- class cA {
931
+ class DA {
910
932
  constructor(A, t = 16) {
911
- o(this, "vt");
912
- o(this, "bt", []);
913
- o(this, "xt");
914
- o(this, "yt", 16);
915
- o(this, "Mt", 0);
916
- o(this, "Gt", 0);
917
- o(this, "Ft", { width: 0, height: 0 });
918
- o(this, "$t");
919
- o(this, "Yt", "UrsaFont");
920
- o(this, "Tt");
921
- o(this, "St");
922
- o(this, "Ot");
923
- o(this, "Ut");
924
- this.yt = t, this.Tt = new gA(), this.St = new aA(A), this.Ot = new hA(), this.Ut = new lA();
933
+ E(this, "bt");
934
+ E(this, "xt", []);
935
+ E(this, "yt");
936
+ E(this, "Mt", 16);
937
+ E(this, "Gt", 0);
938
+ E(this, "Ft", 0);
939
+ E(this, "$t", { width: 0, height: 0 });
940
+ E(this, "Yt");
941
+ E(this, "Tt", "UrsaFont");
942
+ E(this, "St");
943
+ E(this, "Ot");
944
+ E(this, "Ut");
945
+ E(this, "Rt");
946
+ this.Mt = t, this.St = new lA(), this.Ot = new cA(A), this.Ut = new uA(), this.Rt = new CA();
925
947
  }
926
948
  async kt(A) {
927
949
  let t;
@@ -932,127 +954,127 @@ class cA {
932
954
  } else
933
955
  t = await (await fetch(`data:font/truetype;charset=utf-8;base64,AAEAAAAKAIAAAwAgT1MvMs+QEyQAAAEoAAAAYGNtYXAg7yVJAAAFjAAACSBnbHlmuHLTdAAAErQAAGi0aGVhZFvXdUwAAACsAAAANmhoZWELAQUCAAAA5AAAACRobXR4BACDgAAAAYgAAAQEbG9jYQAy54AAAA6sAAAECG1heHABIgCCAAABCAAAACBuYW1lVs/OSgAAe2gAAAOicG9zdABpADQAAH8MAAAAIAABAAAAAQAAzOWHqV8PPPUAAAQAAAAAAHxiGCcAAAAAfGIYJwAAAAAEAAQAAAAACAACAAEAAAAAAAEAAAQAAAAAAAQAAAAAAAcAAAEAAAAAAAAAAAAAAAAAAAEBAAEAAAEBAIAAIAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAgQAAZAABQAEAgACAAAAAAACAAIAAAACAAAzAMwAAAAABAAAAAAAAACAAACLAABw4wAAAAAAAAAAWUFMLgBAACAmawQAAAAAAAQAAAAAAAFRAAAAAAMABAAAAAAgAAAEAAAABAAAAAQAAAAEAAGABAABAAQAAIAEAACABAAAgAQAAIAEAAGABAABAAQAAQAEAACABAABAAQAAIAEAACABAABAAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAABAAQAAIAEAAEABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAABAAQAAIAEAAEABAAAgAQAAIAEAAEABAAAgAQAAIAEAACABAAAgAQAAIAEAAEABAAAgAQAAIAEAAGABAAAgAQAAIAEAAGABAAAgAQAAIAEAACABAAAgAQAAIAEAAEABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAABgAQAAQAEAACABAAAAAQAAgAEAACABAAAgAQAAIAEAACABAACAAQAAAAEAAIABAABgAQAAgAEAACABAAAgAQAAAAEAACABAAAAAQAAAAEAAAABAAAAAQAAAAEAAIABAADAAQAAAAEAAAABAAAgAQAAYAEAAAABAAAAAQAAIAEAAAABAAAgAQAAIAEAACABAAAAAQAAIAEAAAABAAAAAQAAIAEAAGABAAAAAQAAAAEAAAABAAAAAQAAIAEAACABAAAAAQAAIAEAACABAAAAAQAAIAEAACABAAAgAQAAAAEAACABAAAAAQAAAAEAAEABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAACAAQAAIAEAAAABAAAAAQAAAAEAACABAABAAQAAQAEAAEABAABAAQAAIAEAACABAAAAAQAAAAEAAAABAABAAQAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==\r
934
956
  `)).arrayBuffer();
935
- await this.Rt(t), this.vt = w.parse(t)[0], await this.Vt();
957
+ await this.Vt(t), this.bt = b.parse(t)[0], await this.Ht();
936
958
  }
937
- Ht(A) {
938
- if (A === void 0) return this.yt;
939
- this.yt = A, this.Ft = this.Ot.calculateMaxGlyphDimensions(this.bt.map((e) => e.character), this.yt, this.vt);
940
- const t = this.St.createTextureAtlas(this.bt, this.Ft, this.yt, this.vt);
941
- this.xt = t.framebuffer, this.Mt = t.columns, this.Gt = t.rows;
959
+ zt(A) {
960
+ if (A === void 0) return this.Mt;
961
+ this.Mt = A, this.$t = this.Ut.calculateMaxGlyphDimensions(this.xt.map((e) => e.character), this.Mt, this.bt);
962
+ const t = this.Ot.createTextureAtlas(this.xt, this.$t, this.Mt, this.bt);
963
+ this.yt = t.framebuffer, this.Gt = t.columns, this.Ft = t.rows;
942
964
  }
943
- async zt(A) {
965
+ async Lt(A) {
944
966
  try {
945
967
  const t = await fetch(A);
946
968
  if (!t.ok) throw new I(`Failed to load font file: ${t.status} ${t.statusText}`);
947
969
  const e = await t.arrayBuffer();
948
- await this.Rt(e);
949
- const s = w.parse(e);
970
+ await this.Vt(e);
971
+ const s = b.parse(e);
950
972
  if (!s || s.length === 0) throw Error("Failed to parse font file");
951
- this.vt = s[0], await this.Vt();
973
+ this.bt = s[0], await this.Ht();
952
974
  } catch (t) {
953
975
  throw new I("Failed to load font: " + (t instanceof Error ? t.message : "Unknown error"), t);
954
976
  }
955
977
  }
956
- async Rt(A) {
978
+ async Vt(A) {
957
979
  const t = Date.now();
958
- this.Yt = this.Yt === "UrsaFont" ? "UrsaFont" : "CustomFont_" + t, this.$t = new FontFace(this.Yt, A), await this.$t.load(), document.fonts.add(this.$t);
980
+ this.Tt = this.Tt === "UrsaFont" ? "UrsaFont" : "CustomFont_" + t, this.Yt = new FontFace(this.Tt, A), await this.Yt.load(), document.fonts.add(this.Yt);
959
981
  }
960
- async Vt() {
961
- const A = this.Tt.extractCharacters(this.vt), t = this.Tt.filterProblematicCharacters(A);
962
- this.bt = this.Ut.createCharacterObjects(t, this.vt), this.Ft = this.Ot.calculateMaxGlyphDimensions(t, this.yt, this.vt);
963
- const e = this.St.createTextureAtlas(this.bt, this.Ft, this.yt, this.vt);
964
- this.xt = e.framebuffer, this.Mt = e.columns, this.Gt = e.rows;
982
+ async Ht() {
983
+ const A = this.St.extractCharacters(this.bt), t = this.St.filterProblematicCharacters(A);
984
+ this.xt = this.Rt.createCharacterObjects(t, this.bt), this.$t = this.Ut.calculateMaxGlyphDimensions(t, this.Mt, this.bt);
985
+ const e = this.Ot.createTextureAtlas(this.xt, this.$t, this.Mt, this.bt);
986
+ this.yt = e.framebuffer, this.Gt = e.columns, this.Ft = e.rows;
965
987
  }
966
988
  getCharacterColor(A) {
967
- return this.Ut.getCharacterColor(A, this.bt);
989
+ return this.Rt.getCharacterColor(A, this.xt);
968
990
  }
969
991
  getCharacterColors(A) {
970
- return this.Ut.getCharacterColors(A, this.bt);
992
+ return this.Rt.getCharacterColors(A, this.xt);
971
993
  }
972
994
  hasAllCharacters(A) {
973
995
  if (typeof A != "string" || A.length === 0) return !1;
974
- const t = new Set(this.bt.map((e) => e.character));
996
+ const t = new Set(this.xt.map((e) => e.character));
975
997
  for (const e of A) if (!t.has(e)) return !1;
976
998
  return !0;
977
999
  }
978
- S() {
979
- this.xt.S(), document.fonts.delete(this.$t);
1000
+ O() {
1001
+ this.yt.O(), document.fonts.delete(this.Yt);
980
1002
  }
981
1003
  get fontFramebuffer() {
982
- return this.xt;
1004
+ return this.yt;
983
1005
  }
984
1006
  get characters() {
985
- return this.bt;
1007
+ return this.xt;
986
1008
  }
987
1009
  get textureColumns() {
988
- return this.Mt;
1010
+ return this.Gt;
989
1011
  }
990
1012
  get textureRows() {
991
- return this.Gt;
1013
+ return this.Ft;
992
1014
  }
993
1015
  get maxGlyphDimensions() {
994
- return this.Ft;
1016
+ return this.$t;
995
1017
  }
996
1018
  get fontSize() {
997
- return this.yt;
1019
+ return this.Mt;
998
1020
  }
999
1021
  get font() {
1000
- return this.vt;
1022
+ return this.bt;
1001
1023
  }
1002
1024
  }
1003
- class CA {
1025
+ class PA {
1004
1026
  constructor(A, t, e) {
1005
- o(this, "Lt");
1006
- o(this, "Jt");
1007
- o(this, "p");
1008
- o(this, "_");
1009
- o(this, "Kt");
1010
- o(this, "Wt");
1011
- o(this, "jt", !1);
1012
- o(this, "Nt");
1013
- o(this, "Zt");
1014
- o(this, "Xt");
1015
- this.Nt = A, this.Zt = t, this.Xt = e, this.xA();
1016
- }
1017
- xA() {
1018
- this.jt || (this.Lt = Math.floor(this.Nt.width / this.Zt), this.Jt = Math.floor(this.Nt.height / this.Xt)), this.qt();
1019
- }
1020
- qt() {
1021
- this.p = this.Lt * this.Zt, this._ = this.Jt * this.Xt, this.Kt = Math.floor((this.Nt.width - this.p) / 2), this.Wt = Math.floor((this.Nt.height - this._) / 2);
1022
- }
1023
- Ae(A, t) {
1024
- this.Zt = A, this.Xt = t, this.xA();
1027
+ E(this, "Jt");
1028
+ E(this, "jt");
1029
+ E(this, "P");
1030
+ E(this, "I");
1031
+ E(this, "Kt");
1032
+ E(this, "Wt");
1033
+ E(this, "Nt", !1);
1034
+ E(this, "Zt");
1035
+ E(this, "Xt");
1036
+ E(this, "qt");
1037
+ this.Zt = A, this.Xt = t, this.qt = e, this.MA();
1038
+ }
1039
+ MA() {
1040
+ this.Nt || (this.Jt = Math.floor(this.Zt.width / this.Xt), this.jt = Math.floor(this.Zt.height / this.qt)), this.Ae();
1041
+ }
1042
+ Ae() {
1043
+ this.P = this.Jt * this.Xt, this.I = this.jt * this.qt, this.Kt = Math.floor((this.Zt.width - this.P) / 2), this.Wt = Math.floor((this.Zt.height - this.I) / 2);
1025
1044
  }
1026
1045
  te(A, t) {
1027
- this.jt = !0, this.Lt = A, this.Jt = t, this.qt();
1046
+ this.Xt = A, this.qt = t, this.MA();
1028
1047
  }
1029
- ee() {
1030
- this.jt = !1, this.xA();
1048
+ ee(A, t) {
1049
+ this.Nt = !0, this.Jt = A, this.jt = t, this.Ae();
1031
1050
  }
1032
1051
  se() {
1033
- this.jt ? this.qt() : this.xA();
1052
+ this.Nt = !1, this.MA();
1034
1053
  }
1035
- re(A) {
1036
- if (A === void 0) return this.jt;
1037
- this.jt = A;
1054
+ re() {
1055
+ this.Nt ? this.Ae() : this.MA();
1056
+ }
1057
+ Be(A) {
1058
+ if (A === void 0) return this.Nt;
1059
+ this.Nt = A;
1038
1060
  }
1039
1061
  get cellWidth() {
1040
- return this.Zt;
1062
+ return this.Xt;
1041
1063
  }
1042
1064
  get cellHeight() {
1043
- return this.Xt;
1065
+ return this.qt;
1044
1066
  }
1045
1067
  get cols() {
1046
- return this.Lt;
1068
+ return this.Jt;
1047
1069
  }
1048
1070
  get rows() {
1049
- return this.Jt;
1071
+ return this.jt;
1050
1072
  }
1051
1073
  get width() {
1052
- return this.p;
1074
+ return this.P;
1053
1075
  }
1054
1076
  get height() {
1055
- return this._;
1077
+ return this.I;
1056
1078
  }
1057
1079
  get offsetX() {
1058
1080
  return this.Kt;
@@ -1061,106 +1083,106 @@ class CA {
1061
1083
  return this.Wt;
1062
1084
  }
1063
1085
  }
1064
- class DA {
1086
+ class dA {
1065
1087
  constructor(A, t = !1, e = {}) {
1066
- o(this, "Nt");
1067
- o(this, "Be");
1068
- o(this, "ie");
1069
- o(this, "Qe");
1070
- o(this, "onTransformChange");
1071
- this.Be = A, this.ie = t, this.Nt = this.Ee(e.width, e.height), t && this.setupTransformObserver();
1072
- }
1073
- Ee(A, t) {
1088
+ E(this, "Zt");
1089
+ E(this, "ie");
1090
+ E(this, "Qe");
1091
+ E(this, "Ee");
1092
+ E(this, "onTransformChange");
1093
+ this.ie = A, this.Qe = t, this.Zt = this.oe(e.width, e.height), t && this.setupTransformObserver();
1094
+ }
1095
+ oe(A, t) {
1074
1096
  var s;
1075
1097
  const e = document.createElement("canvas");
1076
- if (e.className = "textmodeCanvas", e.style.imageRendering = "pixelated", this.ie) e.width = A || 800, e.height = t || 600, document.body.appendChild(e);
1098
+ if (e.className = "textmodeCanvas", e.style.imageRendering = "pixelated", this.Qe) e.width = A || 800, e.height = t || 600, document.body.appendChild(e);
1077
1099
  else {
1078
- const r = this.Be.getBoundingClientRect();
1100
+ const r = this.ie.getBoundingClientRect();
1079
1101
  let i = Math.round(r.width), B = Math.round(r.height);
1080
- if (this.Be instanceof HTMLVideoElement) {
1081
- const g = this.Be;
1102
+ if (this.ie instanceof HTMLVideoElement) {
1103
+ const g = this.ie;
1082
1104
  (i === 0 || B === 0) && g.videoWidth > 0 && g.videoHeight > 0 && (i = g.videoWidth, B = g.videoHeight);
1083
1105
  }
1084
1106
  e.width = i, e.height = B, e.style.position = "absolute", e.style.pointerEvents = "none";
1085
- const Q = window.getComputedStyle(this.Be);
1107
+ const Q = window.getComputedStyle(this.ie);
1086
1108
  let n = parseInt(Q.zIndex || "0", 10);
1087
- isNaN(n) && (n = 0), e.style.zIndex = "" + (n + 1), this.oe(e), (s = this.Be.parentNode) == null || s.insertBefore(e, this.Be.nextSibling);
1109
+ isNaN(n) && (n = 0), e.style.zIndex = "" + (n + 1), this.ge(e), (s = this.ie.parentNode) == null || s.insertBefore(e, this.ie.nextSibling);
1088
1110
  }
1089
1111
  return e;
1090
1112
  }
1091
- oe(A) {
1092
- const t = this.Be.getBoundingClientRect();
1093
- let e = this.Be.offsetParent;
1113
+ ge(A) {
1114
+ const t = this.ie.getBoundingClientRect();
1115
+ let e = this.ie.offsetParent;
1094
1116
  if (e && e !== document.body) {
1095
1117
  const s = e.getBoundingClientRect();
1096
1118
  A.style.top = t.top - s.top + "px", A.style.left = t.left - s.left + "px";
1097
1119
  } else A.style.top = t.top + window.scrollY + "px", A.style.left = t.left + window.scrollX + "px";
1098
1120
  }
1099
- se(A, t) {
1100
- if (this.ie) this.Nt.width = A ?? this.Nt.width, this.Nt.height = t ?? this.Nt.height;
1121
+ re(A, t) {
1122
+ if (this.Qe) this.Zt.width = A ?? this.Zt.width, this.Zt.height = t ?? this.Zt.height;
1101
1123
  else {
1102
- const e = this.Be.getBoundingClientRect();
1124
+ const e = this.ie.getBoundingClientRect();
1103
1125
  let s = Math.round(e.width), r = Math.round(e.height);
1104
- if (this.Be instanceof HTMLVideoElement) {
1105
- const i = this.Be;
1126
+ if (this.ie instanceof HTMLVideoElement) {
1127
+ const i = this.ie;
1106
1128
  (s === 0 || r === 0) && i.videoWidth > 0 && i.videoHeight > 0 && (s = i.videoWidth, r = i.videoHeight);
1107
1129
  }
1108
- this.Nt.width = s, this.Nt.height = r, this.oe(this.Nt);
1130
+ this.Zt.width = s, this.Zt.height = r, this.ge(this.Zt);
1109
1131
  }
1110
1132
  }
1111
- ge() {
1112
- const A = { alpha: !1, premultipliedAlpha: !1, preserveDrawingBuffer: !0, antialias: !1, depth: !1, stencil: !1, powerPreference: "high-performance" }, t = this.Nt.getContext("webgl2", A) || this.Nt.getContext("webgl", A);
1133
+ ne() {
1134
+ const A = { alpha: !1, premultipliedAlpha: !1, preserveDrawingBuffer: !0, antialias: !1, depth: !1, stencil: !1, powerPreference: "high-performance" }, t = this.Zt.getContext("webgl2", A) || this.Zt.getContext("webgl", A);
1113
1135
  if (!t) throw new I("WebGL context could not be created. Ensure your browser supports WebGL.");
1114
1136
  return t;
1115
1137
  }
1116
1138
  setupTransformObserver() {
1117
- this.Qe = new ResizeObserver((A) => {
1139
+ this.Ee = new ResizeObserver((A) => {
1118
1140
  for (const t of A) {
1119
1141
  const e = t.contentRect;
1120
- !this.onTransformChange || Math.round(e.width) === this.Nt.width && Math.round(e.height) === this.Nt.height || this.onTransformChange();
1142
+ !this.onTransformChange || Math.round(e.width) === this.Zt.width && Math.round(e.height) === this.Zt.height || this.onTransformChange();
1121
1143
  }
1122
- }), this.Qe.observe(this.Nt);
1144
+ }), this.Ee.observe(this.Zt);
1123
1145
  }
1124
- S() {
1125
- this.Qe && this.Qe.disconnect();
1126
- const A = this.Nt.getContext("webgl") || this.Nt.getContext("webgl2");
1146
+ O() {
1147
+ this.Ee && this.Ee.disconnect();
1148
+ const A = this.Zt.getContext("webgl") || this.Zt.getContext("webgl2");
1127
1149
  if (A) {
1128
1150
  const t = A.getExtension("WEBGL_lose_context");
1129
1151
  t && t.loseContext();
1130
1152
  }
1131
- this.Nt.parentNode && this.Nt.parentNode.removeChild(this.Nt);
1153
+ this.Zt.parentNode && this.Zt.parentNode.removeChild(this.Zt);
1132
1154
  }
1133
1155
  get canvas() {
1134
- return this.Nt;
1156
+ return this.Zt;
1135
1157
  }
1136
1158
  get width() {
1137
- return this.Nt.width;
1159
+ return this.Zt.width;
1138
1160
  }
1139
1161
  get height() {
1140
- return this.Nt.height;
1162
+ return this.Zt.height;
1141
1163
  }
1142
1164
  }
1143
- class F {
1165
+ class M {
1144
1166
  constructor(A, t, e, s = {}) {
1145
- o(this, "Ct");
1146
- o(this, "ne");
1147
- o(this, "ae");
1148
- o(this, "he");
1149
- o(this, "le");
1150
- o(this, "ce");
1151
- o(this, "De");
1152
- o(this, "Ce");
1153
- o(this, "h");
1154
- this.Ct = A, this.ne = t, this.ae = e, this.h = s;
1155
- const r = this.ae.cols, i = this.ae.rows;
1156
- this.he = this.Ct.SA(r, i), this.le = this.Ct.SA(r, i), this.ce = this.Ct.SA(r, i), this.De = this.Ct.SA(r, i), this.Ce = this.Ct.SA(r, i);
1157
- }
1158
- se() {
1159
- const A = this.ae.cols, t = this.ae.rows;
1160
- this.he.resize(A, t), this.le.resize(A, t), this.ce.resize(A, t), this.De.resize(A, t), this.Ce.resize(A, t);
1167
+ E(this, "ut");
1168
+ E(this, "ae");
1169
+ E(this, "he");
1170
+ E(this, "le");
1171
+ E(this, "ce");
1172
+ E(this, "De");
1173
+ E(this, "Ce");
1174
+ E(this, "ue");
1175
+ E(this, "h");
1176
+ this.ut = A, this.ae = t, this.he = e, this.h = { enabled: !0, ...s };
1177
+ const r = this.he.cols, i = this.he.rows;
1178
+ this.le = this.ut.UA(r, i), this.ce = this.ut.UA(r, i), this.De = this.ut.UA(r, i), this.Ce = this.ut.UA(r, i), this.ue = this.ut.UA(r, i);
1179
+ }
1180
+ re() {
1181
+ const A = this.he.cols, t = this.he.rows;
1182
+ this.le.resize(A, t), this.ce.resize(A, t), this.De.resize(A, t), this.Ce.resize(A, t), this.ue.resize(A, t);
1161
1183
  }
1162
1184
  enabled(A) {
1163
- u.C(typeof A == "boolean" || typeof A == "number" && Number.isInteger(A), "Enabled must be a boolean value or an integer (0 for false, any other number for true).", { method: "enabled", providedValue: A }) && (this.h.enabled = !!A);
1185
+ D.C(typeof A == "boolean" || typeof A == "number" && Number.isInteger(A), "Enabled must be a boolean value or an integer (0 for false, any other number for true).", { method: "enabled", providedValue: A }) && (this.h.enabled = !!A);
1164
1186
  }
1165
1187
  enable() {
1166
1188
  this.enabled(!0);
@@ -1168,118 +1190,115 @@ class F {
1168
1190
  disable() {
1169
1191
  this.enabled(!1);
1170
1192
  }
1171
- S() {
1172
- this.he.S(), this.le.S(), this.ce.S(), this.De.S(), this.Ce.S();
1193
+ O() {
1194
+ this.le.O(), this.ce.O(), this.De.O(), this.Ce.O(), this.ue.O();
1173
1195
  }
1174
1196
  get characterFramebuffer() {
1175
- return this.he;
1197
+ return this.le;
1176
1198
  }
1177
1199
  get primaryColorFramebuffer() {
1178
- return this.le;
1200
+ return this.ce;
1179
1201
  }
1180
1202
  get secondaryColorFramebuffer() {
1181
- return this.ce;
1203
+ return this.De;
1182
1204
  }
1183
1205
  get rotationFramebuffer() {
1184
- return this.De;
1206
+ return this.Ce;
1185
1207
  }
1186
1208
  get transformFramebuffer() {
1187
- return this.Ce;
1209
+ return this.ue;
1188
1210
  }
1189
1211
  get options() {
1190
1212
  return this.h;
1191
1213
  }
1192
1214
  }
1193
- class uA {
1215
+ class IA {
1194
1216
  constructor(A, t) {
1195
- o(this, "I");
1196
- o(this, "Ct");
1197
- o(this, "ue");
1198
- this.Ct = A, this.ue = t;
1199
- const e = Math.max(this.ue.length, 1);
1200
- this.I = this.Ct.SA(e, 1), this.Pe();
1201
- }
1202
- Pe() {
1203
- const A = this.ue.length;
1204
- this.I.width !== A && this.I.resize(A, 1);
1217
+ E(this, "_");
1218
+ E(this, "ut");
1219
+ E(this, "Pe");
1220
+ this.ut = A, this.Pe = t;
1221
+ const e = Math.max(this.Pe.length, 1);
1222
+ this._ = this.ut.UA(e, 1), this.Ie();
1223
+ }
1224
+ Ie() {
1225
+ const A = this.Pe.length;
1226
+ this._.width !== A && this._.resize(A, 1);
1205
1227
  const t = new Uint8Array(1 * A * 4);
1206
1228
  for (let e = 0; e < A; e++) {
1207
- const s = this.ue[e], r = 4 * e;
1229
+ const s = this.Pe[e], r = 4 * e;
1208
1230
  t[r] = s[0], t[r + 1] = s[1], t[r + 2] = s[2], t[r + 3] = 255;
1209
1231
  }
1210
- this.I.updatePixels(t, A, 1);
1232
+ this._.updatePixels(t, A, 1);
1211
1233
  }
1212
1234
  setColors(A) {
1213
- this.ue = A, this.Pe();
1235
+ this.Pe = A, this.Ie();
1214
1236
  }
1215
1237
  get colors() {
1216
- return this.ue;
1238
+ return this.Pe;
1217
1239
  }
1218
1240
  get framebuffer() {
1219
- return this.I;
1220
- }
1221
- get texture() {
1222
- return this.I.texture;
1241
+ return this._;
1223
1242
  }
1224
1243
  }
1225
- class O extends F {
1244
+ class S extends M {
1226
1245
  constructor(t, e, s, r = {}) {
1227
- super(t, e, s, r);
1228
- o(this, "Ie");
1229
- this.Ie = new uA(this.Ct, this.ne.getCharacterColors(" .:-=+*%@#"));
1246
+ super(t, e, s, { enabled: !0, characters: " .:-=+*%@#", characterColor: [1, 1, 1, 1], characterColorMode: "sampled", cellColor: [0, 0, 0, 1], cellColorMode: "fixed", invert: !1, rotation: [0, 0, 0, 1], flipHorizontally: !1, flipVertically: !1, ...r });
1247
+ E(this, "we");
1248
+ this.we = new IA(this.ut, this.ae.getCharacterColors(" .:-=+*%@#"));
1230
1249
  }
1231
1250
  characters(t) {
1232
- u.C(this.ne.hasAllCharacters(t), "One or more characters do not exist in the current font.", { method: "characters", providedValue: t }) && (this.h.characters = t, this.Ie.setColors(this.ne.getCharacterColors(t)));
1251
+ D.C(this.ae.hasAllCharacters(t), "One or more characters do not exist in the current font.", { method: "characters", providedValue: t }) && (this.h.characters = t, this.we.setColors(this.ae.getCharacterColors(t)));
1233
1252
  }
1234
1253
  characterColor(t, e, s, r = 255) {
1235
- const i = this.we(t, "characterColor", e, s, r);
1254
+ const i = this.fe(t, "characterColor", e, s, r);
1236
1255
  i && (this.h.characterColor = i);
1237
1256
  }
1238
1257
  characterColorMode(t) {
1239
- this.fe(t, "characterColorMode");
1258
+ this.de(t, "characterColorMode");
1240
1259
  }
1241
1260
  cellColor(t, e, s, r = 255) {
1242
- const i = this.we(t, "cellColor", e, s, r);
1261
+ const i = this.fe(t, "cellColor", e, s, r);
1243
1262
  i && (this.h.cellColor = i);
1244
1263
  }
1245
1264
  cellColorMode(t) {
1246
- this.fe(t, "cellColorMode");
1265
+ this.de(t, "cellColorMode");
1247
1266
  }
1248
1267
  invert(t) {
1249
- this.de(t, "invert", "Invert");
1268
+ this.me(t, "invert", "Invert");
1250
1269
  }
1251
1270
  rotation(t) {
1252
- if (!u.C(typeof t == "number", "Rotation angle must be a number.", { method: "rotation", providedValue: t })) return;
1271
+ if (!D.C(typeof t == "number", "Rotation angle must be a number.", { method: "rotation", providedValue: t })) return;
1253
1272
  (t %= 360) < 0 && (t += 360);
1254
1273
  const e = 255 * t / 360, s = Math.floor(e) / 255, r = Math.round(e - s);
1255
1274
  this.h.rotation = [s, r, 0, 1];
1256
1275
  }
1257
1276
  flipHorizontally(t) {
1258
- this.de(t, "flipHorizontally", "Flip horizontally");
1277
+ this.me(t, "flipHorizontally", "Flip horizontally");
1259
1278
  }
1260
1279
  flipVertically(t) {
1261
- this.de(t, "flipVertically", "Flip vertically");
1280
+ this.me(t, "flipVertically", "Flip vertically");
1262
1281
  }
1263
- we(t, e, s, r, i = 255) {
1282
+ fe(t, e, s, r, i = 255) {
1264
1283
  let B, Q, n, g;
1265
1284
  if (typeof t == "string") {
1266
- const h = this.me(t);
1267
- if (!h) return u.C(!1, "Invalid hex color format. Use '#FF0000', '#F00', 'FF0000', or 'F00'.", { method: e, providedValue: t }), null;
1268
- [B, Q, n, g] = h;
1269
- } else if (B = t, Q = s !== void 0 ? s : t, n = r !== void 0 ? r : t, g = i, !u.C([B, Q, n, g].every((h) => h >= 0 && h <= 255), e.charAt(0).toUpperCase() + e.slice(1) + " color values must be between 0 and 255", { method: e, providedValues: { r: B, g: Q, b: n, a: g } })) return null;
1285
+ const a = this.pe(t);
1286
+ if (!a) return D.C(!1, "Invalid hex color format. Use '#FF0000', '#F00', 'FF0000', or 'F00'.", { method: e, providedValue: t }), null;
1287
+ [B, Q, n, g] = a;
1288
+ } else if (B = t, Q = s !== void 0 ? s : t, n = r !== void 0 ? r : t, g = i, !D.C([B, Q, n, g].every((a) => a >= 0 && a <= 255), e.charAt(0).toUpperCase() + e.slice(1) + " color values must be between 0 and 255", { method: e, providedValues: { r: B, g: Q, b: n, a: g } })) return null;
1270
1289
  return [B / 255, Q / 255, n / 255, g / 255];
1271
1290
  }
1272
- fe(t, e) {
1273
- u.C(["sampled", "fixed"].includes(t), "Invalid color mode. Must be 'sampled' or 'fixed'.", { method: e, providedValue: t }) && (this.h[e] = t);
1291
+ de(t, e) {
1292
+ D.C(["sampled", "fixed"].includes(t), "Invalid color mode. Must be 'sampled' or 'fixed'.", { method: e, providedValue: t }) && (this.h[e] = t);
1274
1293
  }
1275
- de(t, e, s) {
1276
- u.C(typeof t == "boolean" || typeof t == "number" && Number.isInteger(t), s + " must be a boolean value or an integer (0 for false, any other number for true).", { method: e, providedValue: t }) && (this.h[e] = !!t);
1294
+ me(t, e, s) {
1295
+ D.C(typeof t == "boolean" || typeof t == "number" && Number.isInteger(t), s + " must be a boolean value or an integer (0 for false, any other number for true).", { method: e, providedValue: t }) && (this.h[e] = !!t);
1277
1296
  }
1278
- me(t) {
1297
+ pe(t) {
1279
1298
  return t = t.replace(/^#/, ""), /^[0-9A-Fa-f]{3}$|^[0-9A-Fa-f]{6}$/.test(t) ? (t.length === 3 && (t = t.split("").map((e) => e + e).join("")), [parseInt(t.slice(0, 2), 16), parseInt(t.slice(2, 4), 16), parseInt(t.slice(4, 6), 16), 255]) : null;
1280
1299
  }
1281
1300
  }
1282
- const T = `attribute vec2 a_position;\r
1301
+ const R = `attribute vec2 a_position;\r
1283
1302
  attribute vec2 a_texCoord;\r
1284
1303
  varying vec2 v_uv;\r
1285
1304
  \r
@@ -1317,218 +1336,218 @@ void main() {\r
1317
1336
  \r
1318
1337
  gl_Position = vec4(pos, 0.0, 1.0);\r
1319
1338
  }\r
1320
- `, PA = { enabled: !0, characters: " .:-=+*%@#", characterColor: [1, 1, 1, 1], characterColorMode: "sampled", cellColor: [0, 0, 0, 1], cellColorMode: "fixed", invert: !1, rotation: [0, 0, 0, 255], flipHorizontally: !1, flipVertically: !1, brightnessRange: [0, 255] };
1321
- class S extends O {
1339
+ `, tA = { enabled: !0, characters: " .:-=+*%@#", characterColor: [1, 1, 1, 1], characterColorMode: "sampled", cellColor: [0, 0, 0, 1], cellColorMode: "fixed", invert: !1, rotation: [0, 0, 0, 255], flipHorizontally: !1, flipVertically: !1, brightnessRange: [0, 255] };
1340
+ class O extends S {
1322
1341
  constructor(t, e, s) {
1323
- super(t, e, s, { ...PA });
1324
- o(this, "pe");
1325
- o(this, "_e");
1326
- o(this, "ve");
1327
- o(this, "be");
1328
- o(this, "xe");
1329
- o(this, "ye");
1330
- this.pe = new x(t.context, T, "precision lowp float;uniform sampler2D u_sketchTexture;uniform vec2 u_gridCellDimensions;uniform vec2 u_brightnessRange;varying vec2 v_uv;void main(){vec2 cellCenter=(floor(v_uv*u_gridCellDimensions)+vec2(0.5))/u_gridCellDimensions;vec4 color=texture2D(u_sketchTexture,cellCenter);float brightness=dot(color.rgb,vec3(0.299,0.587,0.114));float brightnessValue=brightness*255.0;if(brightnessValue>=u_brightnessRange.x&&brightnessValue<=u_brightnessRange.y){gl_FragColor=color;}else{gl_FragColor=vec4(0.0);}}"), this._e = new x(t.context, T, "precision lowp float;uniform sampler2D u_sampleTexture;uniform vec4 u_fillColor;uniform bool u_useFixedColor;varying vec2 v_uv;void main(){vec4 sampleColor=texture2D(u_sampleTexture,v_uv);if(sampleColor.a>0.0){if(u_useFixedColor){gl_FragColor=u_fillColor;}else{gl_FragColor=sampleColor;}}else{gl_FragColor=vec4(0.0);}}"), this.be = new x(t.context, T, "precision lowp float;uniform sampler2D u_sampleTexture;uniform bool u_invert;uniform bool u_flipHorizontally;uniform bool u_flipVertically;varying vec2 v_uv;void main(){vec4 sampleColor=texture2D(u_sampleTexture,v_uv);if(sampleColor.a>0.0){float invertValue=u_invert ? 1.0 : 0.0;float flipHValue=u_flipHorizontally ? 1.0 : 0.0;float flipVValue=u_flipVertically ? 1.0 : 0.0;gl_FragColor=vec4(invertValue,flipHValue,flipVValue,1.0);}else{gl_FragColor=vec4(0.0);}}"), this.xe = new x(t.context, T, "precision lowp float;uniform sampler2D u_sampleTexture;uniform vec4 u_rotationColor;varying vec2 v_uv;void main(){vec4 sampleColor=texture2D(u_sampleTexture,v_uv);if(sampleColor.a>0.0){gl_FragColor=u_rotationColor;}else{gl_FragColor=vec4(0.0);}}"), this.ve = new x(t.context, T, "precision lowp float;uniform sampler2D u_colorSampleFramebuffer;uniform sampler2D u_charPaletteTexture;uniform vec2 u_charPaletteSize;uniform vec2 u_brightnessRange;varying vec2 v_uv;void main(){vec4 color=texture2D(u_colorSampleFramebuffer,v_uv);if(color.a==0.0){gl_FragColor=vec4(0.0);return;}float brightness=dot(color.rgb,vec3(0.299,0.587,0.114))*255.0;vec2 range=u_brightnessRange;if(brightness<range.x||brightness>range.y){gl_FragColor=vec4(0.0);return;}float t=(brightness-range.x)/(range.y-range.x);float idx=clamp(floor(t*u_charPaletteSize.x),0.0,u_charPaletteSize.x-1.0);vec3 charColor=texture2D(u_charPaletteTexture,vec2((idx+0.5)/u_charPaletteSize.x,0.0)).rgb;gl_FragColor=vec4(charColor,1.0);}"), this.ye = this.Ct.SA(this.ae.cols, this.ae.rows);
1331
- }
1332
- Me(t) {
1333
- const e = this.ae.cols, s = this.ae.rows;
1334
- this.ye.begin(), this.Ct.UA(), this.Ct.IA(this.pe), this.Ct.FA("u_sketchTexture", t), this.Ct.FA("u_gridCellDimensions", [e, s]), this.Ct.FA("u_brightnessRange", this.h.brightnessRange), this.Ct.$A(0, 0, e, s), this.ye.end(), this.le.begin(), this.Ct.UA(), this.Ct.IA(this._e), this.Ct.FA("u_sampleTexture", this.ye), this.Ct.FA("u_fillColor", this.h.characterColor), this.Ct.FA("u_useFixedColor", this.h.characterColorMode === "fixed"), this.Ct.$A(0, 0, e, s), this.le.end(), this.ce.begin(), this.Ct.UA(), this.Ct.IA(this._e), this.Ct.FA("u_sampleTexture", this.ye), this.Ct.FA("u_fillColor", this.h.cellColor), this.Ct.FA("u_useFixedColor", this.h.cellColorMode === "fixed"), this.Ct.$A(0, 0, e, s), this.ce.end(), this.Ce.begin(), this.Ct.UA(), this.Ct.IA(this.be), this.Ct.FA("u_sampleTexture", this.ye), this.Ct.FA("u_invert", this.h.invert), this.Ct.FA("u_flipHorizontally", this.h.flipHorizontally), this.Ct.FA("u_flipVertically", this.h.flipVertically), this.Ct.$A(0, 0, e, s), this.Ce.end(), this.De.begin(), this.Ct.UA(), this.Ct.IA(this.xe), this.Ct.FA("u_sampleTexture", this.ye), this.Ct.FA("u_rotationColor", this.h.rotation), this.Ct.$A(0, 0, e, s), this.De.end(), this.he.begin(), this.Ct.UA(), this.Ct.IA(this.ve), this.Ct.FA("u_colorSampleFramebuffer", this.ye), this.Ct.FA("u_charPaletteTexture", this.Ie.texture), this.Ct.FA("u_charPaletteSize", [this.Ie.colors.length, 1]), this.Ct.FA("u_brightnessRange", this.h.brightnessRange), this.Ct.$A(0, 0, e, s), this.he.end();
1335
- }
1336
- se() {
1337
- super.se(), this.ye.resize(this.ae.cols, this.ae.rows);
1342
+ super(t, e, s, tA);
1343
+ E(this, "_e");
1344
+ E(this, "ve");
1345
+ E(this, "be");
1346
+ E(this, "xe");
1347
+ E(this, "ye");
1348
+ E(this, "Me");
1349
+ this._e = new p(t.context, R, "precision lowp float;uniform sampler2D u_sketchTexture;uniform vec2 u_gridCellDimensions;uniform vec2 u_brightnessRange;varying vec2 v_uv;void main(){vec2 cellCenter=(floor(v_uv*u_gridCellDimensions)+vec2(0.5))/u_gridCellDimensions;vec4 color=texture2D(u_sketchTexture,cellCenter);float brightness=dot(color.rgb,vec3(0.299,0.587,0.114));float brightnessValue=brightness*255.0;if(brightnessValue>=u_brightnessRange.x&&brightnessValue<=u_brightnessRange.y){gl_FragColor=color;}else{gl_FragColor=vec4(0.0);}}"), this.ve = new p(t.context, R, "precision lowp float;uniform sampler2D u_sampleTexture;uniform vec4 u_fillColor;uniform bool u_useFixedColor;varying vec2 v_uv;void main(){vec4 sampleColor=texture2D(u_sampleTexture,v_uv);if(sampleColor.a>0.0){if(u_useFixedColor){gl_FragColor=u_fillColor;}else{gl_FragColor=sampleColor;}}else{gl_FragColor=vec4(0.0);}}"), this.xe = new p(t.context, R, "precision lowp float;uniform sampler2D u_sampleTexture;uniform bool u_invert;uniform bool u_flipHorizontally;uniform bool u_flipVertically;varying vec2 v_uv;void main(){vec4 sampleColor=texture2D(u_sampleTexture,v_uv);if(sampleColor.a>0.0){float invertValue=u_invert ? 1.0 : 0.0;float flipHValue=u_flipHorizontally ? 1.0 : 0.0;float flipVValue=u_flipVertically ? 1.0 : 0.0;gl_FragColor=vec4(invertValue,flipHValue,flipVValue,1.0);}else{gl_FragColor=vec4(0.0);}}"), this.ye = new p(t.context, R, "precision lowp float;uniform sampler2D u_sampleTexture;uniform vec4 u_rotationColor;varying vec2 v_uv;void main(){vec4 sampleColor=texture2D(u_sampleTexture,v_uv);if(sampleColor.a>0.0){gl_FragColor=u_rotationColor;}else{gl_FragColor=vec4(0.0);}}"), this.be = new p(t.context, R, "precision lowp float;uniform sampler2D u_colorSampleFramebuffer;uniform sampler2D u_charPaletteTexture;uniform vec2 u_charPaletteSize;uniform vec2 u_brightnessRange;varying vec2 v_uv;void main(){vec4 color=texture2D(u_colorSampleFramebuffer,v_uv);if(color.a==0.0){gl_FragColor=vec4(0.0);return;}float brightness=dot(color.rgb,vec3(0.299,0.587,0.114))*255.0;vec2 range=u_brightnessRange;if(brightness<range.x||brightness>range.y){gl_FragColor=vec4(0.0);return;}float t=(brightness-range.x)/(range.y-range.x);float idx=clamp(floor(t*u_charPaletteSize.x),0.0,u_charPaletteSize.x-1.0);vec3 charColor=texture2D(u_charPaletteTexture,vec2((idx+0.5)/u_charPaletteSize.x,0.0)).rgb;gl_FragColor=vec4(charColor,1.0);}"), this.Me = this.ut.UA(this.he.cols, this.he.rows);
1350
+ }
1351
+ Ge(t) {
1352
+ const e = this.he.cols, s = this.he.rows;
1353
+ this.Me.begin(), this.ut.kA(), this.ut.fA(this._e), this.ut.YA("u_sketchTexture", t), this.ut.YA("u_gridCellDimensions", [e, s]), this.ut.YA("u_brightnessRange", this.h.brightnessRange), this.ut.TA(0, 0, e, s), this.Me.end(), this.ce.begin(), this.ut.kA(), this.ut.fA(this.ve), this.ut.YA("u_sampleTexture", this.Me), this.ut.YA("u_fillColor", this.h.characterColor), this.ut.YA("u_useFixedColor", this.h.characterColorMode === "fixed"), this.ut.TA(0, 0, e, s), this.ce.end(), this.De.begin(), this.ut.kA(), this.ut.fA(this.ve), this.ut.YA("u_sampleTexture", this.Me), this.ut.YA("u_fillColor", this.h.cellColor), this.ut.YA("u_useFixedColor", this.h.cellColorMode === "fixed"), this.ut.TA(0, 0, e, s), this.De.end(), this.ue.begin(), this.ut.kA(), this.ut.fA(this.xe), this.ut.YA("u_sampleTexture", this.Me), this.ut.YA("u_invert", this.h.invert), this.ut.YA("u_flipHorizontally", this.h.flipHorizontally), this.ut.YA("u_flipVertically", this.h.flipVertically), this.ut.TA(0, 0, e, s), this.ue.end(), this.Ce.begin(), this.ut.kA(), this.ut.fA(this.ye), this.ut.YA("u_sampleTexture", this.Me), this.ut.YA("u_rotationColor", this.h.rotation), this.ut.TA(0, 0, e, s), this.Ce.end(), this.le.begin(), this.ut.kA(), this.ut.fA(this.be), this.ut.YA("u_colorSampleFramebuffer", this.Me), this.ut.YA("u_charPaletteTexture", this.we.framebuffer), this.ut.YA("u_charPaletteSize", [this.we.colors.length, 1]), this.ut.YA("u_brightnessRange", this.h.brightnessRange), this.ut.TA(0, 0, e, s), this.le.end();
1354
+ }
1355
+ re() {
1356
+ super.re(), this.Me.resize(this.he.cols, this.he.rows);
1338
1357
  }
1339
1358
  brightnessRange(t) {
1340
- u.C(Array.isArray(t) && t.length === 2 && t.every((e) => typeof e == "number" && e >= 0 && e <= 255), "Brightness range must be an array of two numbers between 0 and 255.", { method: "brightnessRange", providedValue: t }) && (this.h.brightnessRange = t);
1359
+ D.C(Array.isArray(t) && t.length === 2 && t.every((e) => typeof e == "number" && e >= 0 && e <= 255), "Brightness range must be an array of two numbers between 0 and 255.", { method: "brightnessRange", providedValue: t }) && (this.h.brightnessRange = t);
1341
1360
  }
1342
1361
  }
1343
- const OA = Object.freeze(Object.defineProperty({ __proto__: null, TextmodeBrightnessConverter: S, TextmodeConverter: F, TextmodeFeatureConverter: O }, Symbol.toStringTag, { value: "Module" }));
1344
- class dA {
1362
+ const LA = Object.freeze(Object.defineProperty({ __proto__: null, BRIGHTNESS_DEFAULT_OPTIONS: tA, TextmodeBrightnessConverter: O, TextmodeConverter: M, TextmodeFeatureConverter: S }, Symbol.toStringTag, { value: "Module" }));
1363
+ class fA {
1345
1364
  constructor(A, t, e) {
1346
- o(this, "Ct");
1347
- o(this, "vt");
1348
- o(this, "ae");
1349
- o(this, "Ge");
1350
- o(this, "Fe");
1351
- o(this, "$e");
1352
- o(this, "Ye");
1353
- o(this, "Te");
1354
- o(this, "he");
1355
- o(this, "le");
1356
- o(this, "ce");
1357
- o(this, "De");
1358
- o(this, "Ce");
1359
- this.Ct = A, this.vt = t, this.ae = e, this.Te = this.Ct.MA(R, "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 sampler2D u_captureTexture;uniform vec2 u_captureDimensions;uniform int u_backgroundMode;uniform vec2 u_gridCellDimensions;uniform vec2 u_gridPixelDimensions;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_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);if(encodedIndexVec.a<0.01){gl_FragColor=(u_backgroundMode==0)? vec4(0.0):texture2D(u_captureTexture,gl_FragCoord.xy/u_captureDimensions);return;}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.Fe = new S(A, t, e), this.$e = new F(A, t, e), this.Ge = [this.Fe, this.$e], this.he = this.Ct.SA(e.cols, e.rows), this.le = this.Ct.SA(e.cols, e.rows), this.ce = this.Ct.SA(e.cols, e.rows), this.De = this.Ct.SA(e.cols, e.rows), this.Ce = this.Ct.SA(e.cols, e.rows), this.Ye = this.Ct.SA(this.ae.width, this.ae.height);
1360
- }
1361
- Se(A) {
1362
- for (const e of this.Ge) e.options.enabled && e instanceof O && e.Me(A);
1365
+ E(this, "ut");
1366
+ E(this, "bt");
1367
+ E(this, "he");
1368
+ E(this, "Fe");
1369
+ E(this, "$e");
1370
+ E(this, "Ye");
1371
+ E(this, "Te");
1372
+ E(this, "Se");
1373
+ E(this, "le");
1374
+ E(this, "ce");
1375
+ E(this, "De");
1376
+ E(this, "Ce");
1377
+ E(this, "ue");
1378
+ this.ut = A, this.bt = t, this.he = e, this.Se = this.ut.FA(Y, "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 sampler2D u_captureTexture;uniform vec2 u_captureDimensions;uniform int u_backgroundMode;uniform vec2 u_gridCellDimensions;uniform vec2 u_gridPixelDimensions;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_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);if(encodedIndexVec.a<0.01){gl_FragColor=(u_backgroundMode==0)? vec4(0.0):texture2D(u_captureTexture,gl_FragCoord.xy/u_captureDimensions);return;}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.$e = new O(A, t, e), this.Ye = new M(A, t, e), this.Fe = [this.$e, this.Ye], this.le = this.ut.UA(e.cols, e.rows), this.ce = this.ut.UA(e.cols, e.rows), this.De = this.ut.UA(e.cols, e.rows), this.Ce = this.ut.UA(e.cols, e.rows), this.ue = this.ut.UA(e.cols, e.rows), this.Te = this.ut.UA(this.he.width, this.he.height);
1379
+ }
1380
+ Oe(A) {
1381
+ for (const e of this.Fe) e.options.enabled && e instanceof S && e.Ge(A);
1363
1382
  const t = (e, s) => {
1364
- e.begin(), this.Ct.UA();
1365
- for (const r of this.Ge) r.options.enabled && this.Ct.RA(s(r), 0, 0);
1383
+ e.begin(), this.ut.kA();
1384
+ for (const r of this.Fe) r.options.enabled && this.ut.HA(s(r), 0, 0);
1366
1385
  e.end();
1367
1386
  };
1368
- t(this.he, (e) => e.characterFramebuffer), t(this.le, (e) => e.primaryColorFramebuffer), t(this.ce, (e) => e.secondaryColorFramebuffer), t(this.De, (e) => e.rotationFramebuffer), t(this.Ce, (e) => e.transformFramebuffer), this.Ye.begin(), this.Ct.UA(), this.Ct.IA(this.Te), this.Ct.FA("u_characterTexture", this.vt.fontFramebuffer), this.Ct.FA("u_charsetDimensions", [this.vt.textureColumns, this.vt.textureRows]), this.Ct.FA("u_asciiCharacterTexture", this.he.texture), this.Ct.FA("u_primaryColorTexture", this.le.texture), this.Ct.FA("u_secondaryColorTexture", this.ce.texture), this.Ct.FA("u_transformTexture", this.Ce.texture), this.Ct.FA("u_rotationTexture", this.De.texture), this.Ct.FA("u_captureTexture", A.texture), this.Ct.FA("u_backgroundMode", !1), this.Ct.FA("u_captureDimensions", [A.width, A.height]), this.Ct.FA("u_gridCellDimensions", [this.ae.cols, this.ae.rows]), this.Ct.FA("u_gridPixelDimensions", [this.ae.width, this.ae.height]), this.Ct.$A(0, 0, this.Ye.width, this.Ye.height), this.Ye.end();
1387
+ t(this.le, (e) => e.characterFramebuffer), t(this.ce, (e) => e.primaryColorFramebuffer), t(this.De, (e) => e.secondaryColorFramebuffer), t(this.Ce, (e) => e.rotationFramebuffer), t(this.ue, (e) => e.transformFramebuffer), this.Te.begin(), this.ut.kA(), this.ut.fA(this.Se), this.ut.YA("u_characterTexture", this.bt.fontFramebuffer), this.ut.YA("u_charsetDimensions", [this.bt.textureColumns, this.bt.textureRows]), this.ut.YA("u_asciiCharacterTexture", this.le), this.ut.YA("u_primaryColorTexture", this.ce), this.ut.YA("u_secondaryColorTexture", this.De), this.ut.YA("u_transformTexture", this.ue), this.ut.YA("u_rotationTexture", this.Ce), this.ut.YA("u_captureTexture", A), this.ut.YA("u_backgroundMode", !1), this.ut.YA("u_captureDimensions", [A.width, A.height]), this.ut.YA("u_gridCellDimensions", [this.he.cols, this.he.rows]), this.ut.YA("u_gridPixelDimensions", [this.he.width, this.he.height]), this.ut.TA(0, 0, this.Te.width, this.Te.height), this.Te.end();
1369
1388
  }
1370
1389
  add(A) {
1371
- if (!u.C(A === "brightness" || A === "custom", 'Converter type must be either "brightness" or "custom".', { method: "add", providedValue: A })) return;
1390
+ if (!D.C(A === "brightness" || A === "custom", 'Converter type must be either "brightness" or "custom".', { method: "add", providedValue: A })) return;
1372
1391
  let t;
1373
- return t = A === "brightness" ? new S(this.Ct, this.vt, this.ae) : new F(this.Ct, this.vt, this.ae), this.Ge.push(t), t;
1392
+ return t = A === "brightness" ? new O(this.ut, this.bt, this.he) : new M(this.ut, this.bt, this.he), this.Fe.push(t), t;
1374
1393
  }
1375
1394
  remove(A) {
1376
- if (!u.C(A instanceof F, "Parameter must be a TextmodeConverter instance.", { method: "remove", providedValue: A })) return;
1377
- const t = this.Ge.indexOf(A);
1378
- u.C(t !== -1, "Converter instance not found in pipeline.", { method: "remove", providedValue: A, convertersCount: this.Ge.length }) && this.Ge.splice(t, 1);
1395
+ if (!D.C(A instanceof M, "Parameter must be a TextmodeConverter instance.", { method: "remove", providedValue: A })) return;
1396
+ const t = this.Fe.indexOf(A);
1397
+ D.C(t !== -1, "Converter instance not found in pipeline.", { method: "remove", providedValue: A, convertersCount: this.Fe.length }) && this.Fe.splice(t, 1);
1379
1398
  }
1380
1399
  swap(A, t) {
1381
1400
  const e = (B, Q) => {
1382
- if (typeof B == "number") return u.C(Number.isInteger(B) && B >= 0 && B < this.Ge.length, Q + " index must be a valid integer within the converter array bounds.", { method: "swap", providedValue: B, convertersCount: this.Ge.length }) ? B : null;
1383
- if (B instanceof F) {
1384
- const n = this.Ge.indexOf(B);
1385
- return u.C(n !== -1, Q + " converter instance not found in pipeline.", { method: "swap", providedValue: B, convertersCount: this.Ge.length }) ? n : null;
1401
+ if (typeof B == "number") return D.C(Number.isInteger(B) && B >= 0 && B < this.Fe.length, Q + " index must be a valid integer within the converter array bounds.", { method: "swap", providedValue: B, convertersCount: this.Fe.length }) ? B : null;
1402
+ if (B instanceof M) {
1403
+ const n = this.Fe.indexOf(B);
1404
+ return D.C(n !== -1, Q + " converter instance not found in pipeline.", { method: "swap", providedValue: B, convertersCount: this.Fe.length }) ? n : null;
1386
1405
  }
1387
- return u.C(!1, Q + " parameter must be either an integer index or a TextmodeConverter instance.", { method: "swap", providedValue: B }), null;
1406
+ return D.C(!1, Q + " parameter must be either an integer index or a TextmodeConverter instance.", { method: "swap", providedValue: B }), null;
1388
1407
  }, s = e(A, "First"), r = e(t, "Second");
1389
- if (s === null || r === null || !u.C(s !== r, "Cannot swap a converter with itself.", { method: "swap", firstIndex: s, secondIndex: r })) return;
1390
- const i = this.Ge[s];
1391
- this.Ge[s] = this.Ge[r], this.Ge[r] = i;
1408
+ if (s === null || r === null || !D.C(s !== r, "Cannot swap a converter with itself.", { method: "swap", firstIndex: s, secondIndex: r })) return;
1409
+ const i = this.Fe[s];
1410
+ this.Fe[s] = this.Fe[r], this.Fe[r] = i;
1392
1411
  }
1393
- se() {
1394
- this.Ye.resize(this.ae.width, this.ae.height);
1395
- const A = this.ae.cols, t = this.ae.rows;
1396
- this.he.resize(A, t), this.le.resize(A, t), this.ce.resize(A, t), this.De.resize(A, t), this.Ce.resize(A, t);
1397
- for (const e of this.Ge) e.se();
1412
+ re() {
1413
+ this.Te.resize(this.he.width, this.he.height);
1414
+ const A = this.he.cols, t = this.he.rows;
1415
+ this.le.resize(A, t), this.ce.resize(A, t), this.De.resize(A, t), this.Ce.resize(A, t), this.ue.resize(A, t);
1416
+ for (const e of this.Fe) e.re();
1398
1417
  }
1399
1418
  hasEnabledConverters() {
1400
- return this.Ge.some((A) => A.options.enabled);
1419
+ return this.Fe.some((A) => A.options.enabled);
1401
1420
  }
1402
1421
  disable() {
1403
- for (const A of this.Ge) A.disable();
1422
+ for (const A of this.Fe) A.disable();
1404
1423
  }
1405
1424
  enable() {
1406
- for (const A of this.Ge) A.enable();
1425
+ for (const A of this.Fe) A.enable();
1407
1426
  }
1408
- S() {
1409
- for (const A of this.Ge) A.S();
1410
- this.he.S(), this.le.S(), this.ce.S(), this.De.S(), this.Ce.S(), this.Ye.S(), this.Te.S();
1427
+ O() {
1428
+ for (const A of this.Fe) A.O();
1429
+ this.le.O(), this.ce.O(), this.De.O(), this.Ce.O(), this.ue.O(), this.Te.O(), this.Se.O();
1411
1430
  }
1412
1431
  get texture() {
1413
- return this.Ye;
1432
+ return this.Te;
1414
1433
  }
1415
1434
  get characterFramebuffer() {
1416
- return this.he;
1435
+ return this.le;
1417
1436
  }
1418
1437
  get primaryColorFramebuffer() {
1419
- return this.le;
1438
+ return this.ce;
1420
1439
  }
1421
1440
  get secondaryColorFramebuffer() {
1422
- return this.ce;
1441
+ return this.De;
1423
1442
  }
1424
1443
  get rotationFramebuffer() {
1425
- return this.De;
1444
+ return this.Ce;
1426
1445
  }
1427
1446
  get transformFramebuffer() {
1428
- return this.Ce;
1447
+ return this.ue;
1429
1448
  }
1430
1449
  get brightness() {
1431
- return this.Fe;
1450
+ return this.$e;
1432
1451
  }
1433
1452
  get custom() {
1434
- return this.$e;
1453
+ return this.Ye;
1435
1454
  }
1436
1455
  }
1437
- const IA = (E) => class extends E {
1456
+ const wA = (o) => class extends o {
1438
1457
  fill(A, t, e, s) {
1439
- this.Ct.wA(A, t, e, s);
1458
+ this.ut.dA(A, t, e, s);
1440
1459
  }
1441
1460
  stroke(A, t, e, s) {
1442
- this.Ct.fA(A, t, e, s);
1461
+ this.ut.mA(A, t, e, s);
1443
1462
  }
1444
1463
  strokeWeight(A) {
1445
- this.Ct.dA(A);
1464
+ this.ut.pA(A);
1446
1465
  }
1447
1466
  noStroke() {
1448
- this.Ct.mA();
1467
+ this.ut._A();
1449
1468
  }
1450
1469
  noFill() {
1451
- this.Ct.pA();
1470
+ this.ut.vA();
1452
1471
  }
1453
1472
  rotate(A) {
1454
- this.Ct._A(A);
1473
+ this.ut.bA(A);
1455
1474
  }
1456
1475
  push() {
1457
- this.Ct.vA();
1476
+ this.ut.xA();
1458
1477
  }
1459
1478
  pop() {
1460
- this.Ct.bA();
1479
+ this.ut.yA();
1461
1480
  }
1462
1481
  rect(A, t, e = 1, s = 1) {
1463
- this.Ct.$A(A, t, e, s);
1482
+ this.ut.TA(A, t, e, s);
1464
1483
  }
1465
1484
  line(A, t, e, s) {
1466
- this.Ct.TA(A, t, e, s);
1485
+ this.ut.OA(A, t, e, s);
1467
1486
  }
1468
1487
  background(A, t = A, e = A, s = 255) {
1469
- this.Ct.OA(A, t, e, s);
1488
+ this.ut.RA(A, t, e, s);
1470
1489
  }
1471
1490
  createShader(A, t) {
1472
- return this.Ct.MA(A, t);
1491
+ return this.ut.FA(A, t);
1473
1492
  }
1474
1493
  createFilterShader(A) {
1475
- return this.Ct.GA(A);
1494
+ return this.ut.$A(A);
1476
1495
  }
1477
1496
  shader(A) {
1478
- this.Ct.IA(A);
1497
+ this.ut.fA(A);
1479
1498
  }
1480
1499
  setUniform(A, t) {
1481
- this.Ct.FA(A, t);
1500
+ this.ut.YA(A, t);
1482
1501
  }
1483
1502
  image(A, t, e, s, r) {
1484
- this.Ct.RA(A, t, e, s, r);
1503
+ this.ut.HA(A, t, e, s, r);
1485
1504
  }
1486
1505
  clear() {
1487
- this.Ct.UA();
1506
+ this.ut.kA();
1488
1507
  }
1489
1508
  createFramebuffer(A, t, e = {}) {
1490
- return this.Ct.SA(A, t, e);
1509
+ return this.ut.UA(A, t, e);
1491
1510
  }
1492
1511
  };
1493
- class N {
1494
- Oe(A) {
1512
+ class k {
1513
+ Ue(A) {
1495
1514
  const t = A.characterFramebuffer, e = A.primaryColorFramebuffer, s = A.secondaryColorFramebuffer, r = A.transformFramebuffer, i = A.rotationFramebuffer;
1496
1515
  return t == null || t.loadPixels(), e == null || e.loadPixels(), s == null || s.loadPixels(), r == null || r.loadPixels(), i == null || i.loadPixels(), { characterPixels: (t == null ? void 0 : t.pixels) || new Uint8Array(0), primaryColorPixels: (e == null ? void 0 : e.pixels) || new Uint8Array(0), secondaryColorPixels: (s == null ? void 0 : s.pixels) || new Uint8Array(0), transformPixels: (r == null ? void 0 : r.pixels) || new Uint8Array(0), rotationPixels: (i == null ? void 0 : i.pixels) || new Uint8Array(0) };
1497
1516
  }
1498
- Ue(A, t) {
1517
+ Re(A, t) {
1499
1518
  return A[t] + (A[t + 1] << 8);
1500
1519
  }
1501
1520
  ke(A, t) {
1502
1521
  return { r: A[t], g: A[t + 1], b: A[t + 2], a: A[t + 3] };
1503
1522
  }
1504
1523
  }
1505
- class k {
1506
- Re(A, t) {
1524
+ class L {
1525
+ Ve(A, t) {
1507
1526
  return new Blob([A], { type: t });
1508
1527
  }
1509
- Ve(A, t, e) {
1528
+ He(A, t, e) {
1510
1529
  try {
1511
- const s = this.Re(A, e), r = URL.createObjectURL(s), i = document.createElement("a");
1530
+ const s = this.Ve(A, e), r = URL.createObjectURL(s), i = document.createElement("a");
1512
1531
  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);
1513
1532
  } catch (s) {
1514
1533
  throw console.error("Failed to download file:", s), Error("File download failed: " + (s instanceof Error ? s.message : "Unknown error"));
1515
1534
  }
1516
1535
  }
1517
- He() {
1536
+ ze() {
1518
1537
  return (/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace(/:/g, "-");
1519
1538
  }
1520
- ze() {
1539
+ Le() {
1521
1540
  const A = /* @__PURE__ */ new Date();
1522
1541
  return { date: A.toISOString().split("T")[0], time: A.toTimeString().split(" ")[0].replace(/:/g, "-") };
1523
1542
  }
1524
- Le(A) {
1543
+ Je(A) {
1525
1544
  return A.replace(/[<>:"/\\|?*]/g, "_").replace(/\s+/g, "_").replace(/_{2,}/g, "_").replace(/^_+|_+$/g, "").substring(0, 255);
1526
1545
  }
1527
- Je() {
1528
- return "'textmode-export'-" + this.He();
1546
+ je() {
1547
+ return "'textmode-export'-" + this.ze();
1529
1548
  }
1530
1549
  }
1531
- class fA extends N {
1550
+ class pA extends k {
1532
1551
  Ke(A, t, e) {
1533
1552
  const s = A[e] === 255, r = A[e + 1] === 255, i = A[e + 2] === 255, B = t[e], Q = t[e + 1];
1534
1553
  return { isInverted: s, flipHorizontal: r, flipVertical: i, rotation: Math.round(360 * (B + Q / 255) / 255 * 100) / 100 };
@@ -1536,94 +1555,101 @@ class fA extends N {
1536
1555
  We(A, t, e) {
1537
1556
  return { x: A, y: t, cellX: A * e.cellWidth, cellY: t * e.cellHeight };
1538
1557
  }
1539
- je(A, t) {
1558
+ Ne(A, t) {
1540
1559
  const e = [];
1541
1560
  let s = 0;
1542
1561
  for (let r = 0; r < t.rows; r++) for (let i = 0; i < t.cols; i++) {
1543
- const B = 4 * s, Q = this.Ue(A.characterPixels, B);
1562
+ const B = 4 * s, Q = this.Re(A.characterPixels, B);
1544
1563
  let n = this.ke(A.primaryColorPixels, B), g = this.ke(A.secondaryColorPixels, B);
1545
- const h = this.Ke(A.transformPixels, A.rotationPixels, B);
1546
- if (h.isInverted) {
1547
- const C = n;
1548
- n = g, g = C;
1564
+ const a = this.Ke(A.transformPixels, A.rotationPixels, B);
1565
+ if (a.isInverted) {
1566
+ const u = n;
1567
+ n = g, g = u;
1549
1568
  }
1550
- const a = this.We(i, r, t);
1551
- e.push({ charIndex: Q, primaryColor: n, secondaryColor: g, transform: h, position: a }), s++;
1569
+ const h = this.We(i, r, t);
1570
+ e.push({ charIndex: Q, primaryColor: n, secondaryColor: g, transform: a, position: h }), s++;
1552
1571
  }
1553
1572
  return e;
1554
1573
  }
1555
1574
  }
1556
- class wA {
1557
- Ne(A, t) {
1575
+ class mA {
1576
+ Ze(A, t) {
1558
1577
  const e = A.cmap;
1559
1578
  for (const s of e.tables) if (s.format === 4) {
1560
- for (let r = 0; r < s.startCount.length; r++) if (t >= s.startCount[r] && t <= s.endCount[r]) {
1561
- if (s.idRangeOffset[r] === 0) return t + s.idDelta[r] & 65535;
1579
+ const r = s;
1580
+ for (let i = 0; i < r.startCount.length; i++) if (t >= r.startCount[i] && t <= r.endCount[i]) {
1581
+ if (r.idRangeOffset[i] === 0) return t + r.idDelta[i] & 65535;
1562
1582
  {
1563
- const i = s.idRangeOffset[r] / 2 + (t - s.startCount[r]) - (s.startCount.length - r);
1564
- if (i >= 0 && i < s.glyphIdArray.length) {
1565
- const B = s.glyphIdArray[i];
1566
- if (B !== 0) return B + s.idDelta[r] & 65535;
1583
+ const B = r.idRangeOffset[i] / 2 + (t - r.startCount[i]) - (r.startCount.length - i);
1584
+ if (B >= 0 && B < r.glyphIdArray.length) {
1585
+ const Q = r.glyphIdArray[B];
1586
+ if (Q !== 0) return Q + r.idDelta[i] & 65535;
1567
1587
  }
1568
1588
  }
1569
1589
  }
1590
+ } else if (s.format === 12) {
1591
+ const r = s;
1592
+ for (let i = 0; i < r.groups.length; i += 3) {
1593
+ const B = r.groups[i], Q = r.groups[i + 1], n = r.groups[i + 2];
1594
+ if (t >= B && t <= Q) return n + (t - B);
1595
+ }
1570
1596
  }
1571
1597
  return 0;
1572
1598
  }
1573
- Ze(A, t, e, s, r) {
1599
+ Xe(A, t, e, s, r) {
1574
1600
  const i = r / A.head.unitsPerEm;
1575
- return { getBoundingBox: () => ({ x1: e + t.xMin * i, y1: s + -t.yMax * i, x2: e + t.xMax * i, y2: s + -t.yMin * i }), toSVG: () => this.Xe(t, e, s, i) };
1601
+ return { getBoundingBox: () => ({ x1: e + t.xMin * i, y1: s + -t.yMax * i, x2: e + t.xMax * i, y2: s + -t.yMin * i }), toSVG: () => this.qe(t, e, s, i) };
1576
1602
  }
1577
- Xe(A, t, e, s) {
1603
+ qe(A, t, e, s) {
1578
1604
  if (!A || !A.xs) return "";
1579
1605
  const { xs: r, ys: i, endPts: B, flags: Q } = A;
1580
1606
  if (!(r && i && B && Q)) return "";
1581
1607
  let n = "", g = 0;
1582
- for (let h = 0; h < B.length; h++) {
1583
- const a = B[h];
1584
- if (!(a < g)) {
1585
- if (a >= g) {
1586
- const C = t + r[g] * s, c = e - i[g] * s;
1587
- n += `M${C.toFixed(2)},${c.toFixed(2)}`;
1608
+ for (let a = 0; a < B.length; a++) {
1609
+ const h = B[a];
1610
+ if (!(h < g)) {
1611
+ if (h >= g) {
1612
+ const u = t + r[g] * s, c = e - i[g] * s;
1613
+ n += `M${u.toFixed(2)},${c.toFixed(2)}`;
1588
1614
  let l = g + 1;
1589
- for (; l <= a; )
1615
+ for (; l <= h; )
1590
1616
  if (1 & Q[l]) {
1591
- const d = t + r[l] * s, D = e - i[l] * s;
1592
- n += `L${d.toFixed(2)},${D.toFixed(2)}`, l++;
1617
+ const d = t + r[l] * s, C = e - i[l] * s;
1618
+ n += `L${d.toFixed(2)},${C.toFixed(2)}`, l++;
1593
1619
  } else {
1594
- const d = t + r[l] * s, D = e - i[l] * s;
1595
- let P = l + 1 > a ? g : l + 1;
1620
+ const d = t + r[l] * s, C = e - i[l] * s;
1621
+ let P = l + 1 > h ? g : l + 1;
1596
1622
  if (1 & Q[P]) {
1597
- const p = t + r[P] * s, m = e - i[P] * s;
1598
- n += `Q${d.toFixed(2)},${D.toFixed(2)} ${p.toFixed(2)},${m.toFixed(2)}`, l = P + 1;
1623
+ const w = t + r[P] * s, m = e - i[P] * s;
1624
+ n += `Q${d.toFixed(2)},${C.toFixed(2)} ${w.toFixed(2)},${m.toFixed(2)}`, l = P + 1;
1599
1625
  } else {
1600
- const p = (d + (t + r[P] * s)) / 2, m = (D + (e - i[P] * s)) / 2;
1601
- n += `Q${d.toFixed(2)},${D.toFixed(2)} ${p.toFixed(2)},${m.toFixed(2)}`, l = P;
1626
+ const w = (d + (t + r[P] * s)) / 2, m = (C + (e - i[P] * s)) / 2;
1627
+ n += `Q${d.toFixed(2)},${C.toFixed(2)} ${w.toFixed(2)},${m.toFixed(2)}`, l = P;
1602
1628
  }
1603
1629
  }
1604
1630
  n += "Z";
1605
1631
  }
1606
- g = a + 1;
1632
+ g = h + 1;
1607
1633
  }
1608
1634
  }
1609
1635
  return n;
1610
1636
  }
1611
- qe(A, t, e, s, r) {
1612
- const i = A.codePointAt(0) || 0, B = this.Ne(t, i);
1637
+ As(A, t, e, s, r) {
1638
+ const i = A.codePointAt(0) || 0, B = this.Ze(t, i);
1613
1639
  let Q = null;
1614
- return t.glyf && t.glyf[B] !== null ? Q = t.glyf[B] : w && w.T && w.T.glyf && w.T.glyf.VA && (Q = w.T.glyf.VA(t, B), t.glyf && Q && (t.glyf[B] = Q)), this.Ze(t, Q, e, s, r);
1640
+ return t.glyf && t.glyf[B] !== null ? Q = t.glyf[B] : (Q = b.T.glyf.zA(t, B), t.glyf[B] = Q), this.Xe(t, Q, e, s, r);
1615
1641
  }
1616
- As(A, t, e, s, r, i, B, Q) {
1642
+ ts(A, t, e, s, r, i, B, Q) {
1617
1643
  const n = e + (r - Q * (B / t.head.unitsPerEm)) / 2, g = s + (i + 0.7 * B) / 2;
1618
- return this.qe(A, t, n, g, B).toSVG() || null;
1644
+ return this.As(A, t, n, g, B).toSVG() || null;
1619
1645
  }
1620
1646
  }
1621
- class pA {
1647
+ class bA {
1622
1648
  constructor() {
1623
- o(this, "ts");
1624
- this.ts = new wA();
1649
+ E(this, "es");
1650
+ this.es = new mA();
1625
1651
  }
1626
- es(A) {
1652
+ ss(A) {
1627
1653
  return `<?xml version="1.0" encoding="UTF-8" standalone="no"?>
1628
1654
  <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
1629
1655
  <svg width="${A.width}" height="${A.height}" viewBox="0 0 ${A.width} ${A.height}"
@@ -1631,21 +1657,21 @@ class pA {
1631
1657
  <title>textmode art generated via textmode.js</title>
1632
1658
  <desc>textmode art visualization generated by textmode.js library</desc>`;
1633
1659
  }
1634
- ss() {
1660
+ rs() {
1635
1661
  return `
1636
1662
  </g>
1637
1663
  </svg>`;
1638
1664
  }
1639
- rs(A, t) {
1665
+ Bs(A, t) {
1640
1666
  if (!t.includeBackgroundRectangles) return "";
1641
1667
  const e = t.backgroundColor, s = `rgba(${e[0]},${e[1]},${e[2]},${e[3] / 255})`;
1642
1668
  return `
1643
1669
  <rect width="${A.width}" height="${A.height}" fill="${s}" />`;
1644
1670
  }
1645
- Bs(A) {
1671
+ Qs(A) {
1646
1672
  return `rgba(${A.r},${A.g},${A.b},${A.a / 255})`;
1647
1673
  }
1648
- Qs(A, t) {
1674
+ Es(A, t) {
1649
1675
  const { transform: e, position: s } = A, r = s.cellX + t.cellWidth / 2, i = s.cellY + t.cellHeight / 2, B = [];
1650
1676
  if (e.flipHorizontal || e.flipVertical) {
1651
1677
  const Q = e.flipHorizontal ? -1 : 1, n = e.flipVertical ? -1 : 1;
@@ -1653,91 +1679,91 @@ class pA {
1653
1679
  }
1654
1680
  return e.rotation && B.push(`rotate(${e.rotation} ${r} ${i})`), B.length ? ` transform="${B.join(" ")}"` : "";
1655
1681
  }
1656
- Es(A, t, e) {
1682
+ gs(A, t, e) {
1657
1683
  if (!e.includeBackgroundRectangles || A.secondaryColor.a === 0) return "";
1658
- const { position: s } = A, r = this.Bs(A.secondaryColor);
1684
+ const { position: s } = A, r = this.Qs(A.secondaryColor);
1659
1685
  return e.drawMode === "stroke" ? `
1660
1686
  <rect x="${s.cellX}" y="${s.cellY}" width="${t.cellWidth}" height="${t.cellHeight}" stroke="${r}" fill="none" stroke-width="${e.strokeWidth}" />` : `
1661
1687
  <rect x="${s.cellX}" y="${s.cellY}" width="${t.cellWidth}" height="${t.cellHeight}" fill="${r}" />`;
1662
1688
  }
1663
- qe(A, t, e, s) {
1689
+ As(A, t, e, s) {
1664
1690
  const r = e.characters[A.charIndex];
1665
1691
  if (!r) return "";
1666
- const i = this.ts.As(r.character, e.font, A.position.cellX, A.position.cellY, t.cellWidth, t.cellHeight, e.fontSize, r.advanceWidth);
1692
+ const i = this.es.ts(r.character, e.font, A.position.cellX, A.position.cellY, t.cellWidth, t.cellHeight, e.fontSize, r.advanceWidth);
1667
1693
  if (!i) return "";
1668
- const B = this.Bs(A.primaryColor);
1694
+ const B = this.Qs(A.primaryColor);
1669
1695
  return s.drawMode === "stroke" ? `
1670
1696
  <path id="${`path-${A.charIndex}-${A.position.cellX}-${A.position.cellY}`.replace(/\./g, "-")}" d="${i}" stroke="${B}" stroke-width="${s.strokeWidth}" fill="none" />` : `
1671
1697
  <path d="${i}" fill="${B}" />`;
1672
1698
  }
1673
- gs(A, t, e, s) {
1699
+ ns(A, t, e, s) {
1674
1700
  let r = "";
1675
- r += this.Es(A, t, s);
1676
- const i = this.Qs(A, t), B = this.qe(A, t, e, s);
1701
+ r += this.gs(A, t, s);
1702
+ const i = this.Es(A, t), B = this.As(A, t, e, s);
1677
1703
  return B && (i ? (r += `
1678
1704
  <g${i}>`, r += B, r += `
1679
1705
  </g>`) : r += B), r;
1680
1706
  }
1681
- ns(A, t, e, s) {
1682
- let r = this.es(t);
1683
- r += this.rs(t, s), r += `
1707
+ hs(A, t, e, s) {
1708
+ let r = this.ss(t);
1709
+ r += this.Bs(t, s), r += `
1684
1710
  <g id="ascii-cells">`;
1685
- for (const i of A) r += this.gs(i, t, e, s);
1686
- return r += this.ss(), r;
1711
+ for (const i of A) r += this.ns(i, t, e, s);
1712
+ return r += this.rs(), r;
1687
1713
  }
1688
- hs(A) {
1714
+ ls(A) {
1689
1715
  return A.replace(/<path[^>]*d=""[^>]*\/>/g, "").replace(/\n\s*\n/g, `
1690
1716
  `).replace(/[ \t]+$/gm, "");
1691
1717
  }
1692
1718
  }
1693
- class mA extends k {
1694
- ls(A) {
1695
- return this.Re(A, "image/svg+xml;charset=utf-8");
1696
- }
1697
- cs(A, t) {
1698
- this.Ve(A, this.Le(t) + ".svg", "image/svg+xml;charset=utf-8");
1719
+ class xA extends L {
1720
+ cs(A) {
1721
+ return this.Ve(A, "image/svg+xml;charset=utf-8");
1699
1722
  }
1700
1723
  Ds(A, t) {
1701
- this.cs(A, t || this.Je());
1724
+ this.He(A, this.Je(t) + ".svg", "image/svg+xml;charset=utf-8");
1725
+ }
1726
+ Cs(A, t) {
1727
+ this.Ds(A, t || this.je());
1702
1728
  }
1703
1729
  }
1704
1730
  class $ {
1705
1731
  constructor() {
1706
- o(this, "Cs");
1707
- o(this, "us");
1708
- o(this, "Ps");
1709
- this.Cs = new fA(), this.us = new pA(), this.Ps = new mA();
1732
+ E(this, "us");
1733
+ E(this, "Ps");
1734
+ E(this, "Is");
1735
+ this.us = new pA(), this.Ps = new bA(), this.Is = new xA();
1710
1736
  }
1711
- Is(A) {
1737
+ ws(A) {
1712
1738
  return { includeBackgroundRectangles: A.includeBackgroundRectangles ?? !0, drawMode: A.drawMode ?? "fill", strokeWidth: A.strokeWidth ?? 1, backgroundColor: A.backgroundColor ?? [0, 0, 0, 0] };
1713
1739
  }
1714
- ws(A, t = {}) {
1715
- const e = this.Is(t), s = this.Cs.Oe(A.pipeline), r = this.Cs.je(s, A.grid), i = this.us.ns(r, A.grid, A.font, e);
1716
- return this.us.hs(i);
1740
+ fs(A, t = {}) {
1741
+ const e = this.ws(t), s = this.us.Ue(A.pipeline), r = this.us.Ne(s, A.grid), i = this.Ps.hs(r, A.grid, A.font, e);
1742
+ return this.Ps.ls(i);
1717
1743
  }
1718
- Ds(A, t = {}) {
1719
- const e = this.ws(A, t), s = t.filename || this.Ps.Je();
1720
- this.Ps.Ds(e, s);
1744
+ Cs(A, t = {}) {
1745
+ const e = this.fs(A, t), s = t.filename || this.Is.je();
1746
+ this.Is.Cs(e, s);
1721
1747
  }
1722
1748
  }
1723
- class xA extends N {
1724
- fs(A, t, e, s = " ") {
1749
+ class vA extends k {
1750
+ ds(A, t, e, s = " ") {
1725
1751
  var B;
1726
1752
  const r = [];
1727
1753
  let i = 0;
1728
1754
  for (let Q = 0; Q < t.rows; Q++) {
1729
1755
  const n = [];
1730
1756
  for (let g = 0; g < t.cols; g++) {
1731
- const h = 4 * i, a = this.Ue(A.characterPixels, h), C = ((B = e.characters[a]) == null ? void 0 : B.character) || s;
1732
- n.push(C), i++;
1757
+ const a = 4 * i, h = this.Re(A.characterPixels, a), u = ((B = e.characters[h]) == null ? void 0 : B.character) || s;
1758
+ n.push(u), i++;
1733
1759
  }
1734
1760
  r.push(n);
1735
1761
  }
1736
1762
  return r;
1737
1763
  }
1738
1764
  }
1739
- class vA {
1740
- ds(A, t) {
1765
+ class yA {
1766
+ ps(A, t) {
1741
1767
  const e = [];
1742
1768
  for (const r of A) {
1743
1769
  let i = r.join("");
@@ -1749,57 +1775,57 @@ class vA {
1749
1775
  return e.join(s);
1750
1776
  }
1751
1777
  }
1752
- class bA extends k {
1753
- ps(A, t) {
1754
- const e = this._s(t);
1755
- this.Ve(A, e, "text/plain;charset=utf-8");
1778
+ class _A extends L {
1779
+ _s(A, t) {
1780
+ const e = this.vs(t);
1781
+ this.He(A, e, "text/plain;charset=utf-8");
1756
1782
  }
1757
- _s(A) {
1758
- let t = this.Le(A);
1759
- return t === ".txt" || t.length <= 4 ? this.Je() : t;
1783
+ vs(A) {
1784
+ let t = this.Je(A);
1785
+ return t === ".txt" || t.length <= 4 ? this.je() : t;
1760
1786
  }
1761
1787
  }
1762
- class J {
1788
+ class z {
1763
1789
  constructor() {
1764
- o(this, "Cs");
1765
- o(this, "us");
1766
- o(this, "Ps");
1767
- this.Cs = new xA(), this.us = new vA(), this.Ps = new bA();
1790
+ E(this, "us");
1791
+ E(this, "Ps");
1792
+ E(this, "Is");
1793
+ this.us = new vA(), this.Ps = new yA(), this.Is = new _A();
1768
1794
  }
1769
- Is(A) {
1795
+ ws(A) {
1770
1796
  return { preserveTrailingSpaces: A.preserveTrailingSpaces ?? !1, lineEnding: A.lineEnding ?? "lf", emptyCharacter: A.emptyCharacter ?? " " };
1771
1797
  }
1772
- vs(A, t = {}) {
1773
- const e = this.Is(t), s = this.Cs.Oe(A.pipeline), r = this.Cs.fs(s, A.grid, A.font, e.emptyCharacter);
1774
- return this.us.ds(r, e);
1798
+ bs(A, t = {}) {
1799
+ const e = this.ws(t), s = this.us.Ue(A.pipeline), r = this.us.ds(s, A.grid, A.font, e.emptyCharacter);
1800
+ return this.Ps.ps(r, e);
1775
1801
  }
1776
- ps(A, t = {}) {
1777
- const e = this.vs(A, t), s = t.filename || this.Ps.Je();
1778
- this.Ps.ps(e, s);
1802
+ _s(A, t = {}) {
1803
+ const e = this.bs(A, t), s = t.filename || this.Is.je();
1804
+ this.Is._s(e, s);
1779
1805
  }
1780
1806
  }
1781
- class yA extends N {
1782
- bs(A, t = 1, e = "transparent") {
1807
+ class MA extends k {
1808
+ Ms(A, t = 1, e = "transparent") {
1783
1809
  const s = A.canvas;
1784
1810
  if (t === 1 && e === "transparent") return s;
1785
1811
  const r = document.createElement("canvas"), i = r.getContext("2d"), B = Math.round(s.width * t), Q = Math.round(s.height * t);
1786
1812
  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;
1787
1813
  }
1788
1814
  }
1789
- class _A {
1790
- Ms(A, t) {
1791
- const e = this.Gs(t.format);
1815
+ class TA {
1816
+ Gs(A, t) {
1817
+ const e = this.Fs(t.format);
1792
1818
  return t.format === "png" ? A.toDataURL(e) : A.toDataURL(e, t.quality);
1793
1819
  }
1794
- async Fs(A, t) {
1820
+ async $s(A, t) {
1795
1821
  return new Promise((e, s) => {
1796
- const r = this.Gs(t.format), i = (B) => {
1822
+ const r = this.Fs(t.format), i = (B) => {
1797
1823
  B ? e(B) : s(Error(`Failed to generate ${t.format.toUpperCase()} blob`));
1798
1824
  };
1799
1825
  t.format === "png" ? A.toBlob(i, r) : A.toBlob(i, r, t.quality);
1800
1826
  });
1801
1827
  }
1802
- Gs(A) {
1828
+ Fs(A) {
1803
1829
  switch (A) {
1804
1830
  case "png":
1805
1831
  return "image/png";
@@ -1812,12 +1838,12 @@ class _A {
1812
1838
  }
1813
1839
  }
1814
1840
  }
1815
- const FA = { png: "image/png", jpg: "image/jpeg", webp: "image/webp" }, W = { png: ".png", jpg: ".jpg", webp: ".webp" };
1816
- class MA extends k {
1817
- $s(A, t, e) {
1818
- this.Ys(A, this.Le(t) + W[e]);
1841
+ const RA = { png: "image/png", jpg: "image/jpeg", webp: "image/webp" }, Z = { png: ".png", jpg: ".jpg", webp: ".webp" };
1842
+ class YA extends L {
1843
+ Ys(A, t, e) {
1844
+ this.Ts(A, this.Je(t) + Z[e]);
1819
1845
  }
1820
- Ys(A, t) {
1846
+ Ts(A, t) {
1821
1847
  const e = URL.createObjectURL(A);
1822
1848
  try {
1823
1849
  const s = document.createElement("a");
@@ -1826,259 +1852,259 @@ class MA extends k {
1826
1852
  URL.revokeObjectURL(e);
1827
1853
  }
1828
1854
  }
1829
- Ts(A) {
1830
- return A in FA && A in W;
1855
+ Ss(A) {
1856
+ return A in RA && A in Z;
1831
1857
  }
1832
1858
  }
1833
- class TA {
1859
+ class FA {
1834
1860
  constructor() {
1835
- o(this, "Cs");
1836
- o(this, "us");
1837
- o(this, "Ps");
1838
- this.Cs = new yA(), this.us = new _A(), this.Ps = new MA();
1861
+ E(this, "us");
1862
+ E(this, "Ps");
1863
+ E(this, "Is");
1864
+ this.us = new MA(), this.Ps = new TA(), this.Is = new YA();
1839
1865
  }
1840
- Is(A) {
1866
+ ws(A) {
1841
1867
  return { format: A.format ?? "png", quality: A.quality ?? 1, scale: A.scale ?? 1, backgroundColor: A.backgroundColor ?? "transparent" };
1842
1868
  }
1843
- Ss(A) {
1844
- if (console.log("Validating image export options:", A), !this.Ps.Ts(A.format)) throw Error(`Saving '${A.format}' files is not supported`);
1869
+ Os(A) {
1870
+ if (console.log("Validating image export options:", A), !this.Is.Ss(A.format)) throw Error(`Saving '${A.format}' files is not supported`);
1845
1871
  if (A.quality < 0 || A.quality > 1) throw Error("Image quality must be between 0.0 and 1.0");
1846
1872
  if (A.scale <= 0) throw Error("Scale factor must be greater than 0");
1847
1873
  A.scale > 10 && console.warn("Large scale factors may result in very large files and slow performance"), A.format === "jpg" && A.backgroundColor === "transparent" && (A.backgroundColor = "black");
1848
1874
  }
1849
- Os(A, t = {}) {
1850
- const e = this.Is(t);
1851
- if (this.Ss(e), e.scale === 1 && e.backgroundColor === "transparent") return this.us.Ms(A.canvas, e);
1852
- const s = this.Cs.bs(A, e.scale, e.backgroundColor);
1853
- return this.us.Ms(s, e);
1854
- }
1855
- async Fs(A, t = {}) {
1856
- const e = this.Is(t);
1857
- if (this.Ss(e), e.scale === 1 && e.backgroundColor === "transparent") return await this.us.Fs(A.canvas, e);
1858
- const s = this.Cs.bs(A, e.scale, e.backgroundColor);
1859
- return await this.us.Fs(s, e);
1875
+ Us(A, t = {}) {
1876
+ const e = this.ws(t);
1877
+ if (this.Os(e), e.scale === 1 && e.backgroundColor === "transparent") return this.Ps.Gs(A.canvas, e);
1878
+ const s = this.us.Ms(A, e.scale, e.backgroundColor);
1879
+ return this.Ps.Gs(s, e);
1860
1880
  }
1861
1881
  async $s(A, t = {}) {
1862
- const e = await this.Fs(A, t), s = t.format ?? "png", r = t.filename || this.Ps.Je();
1863
- this.Ps.$s(e, r, s);
1882
+ const e = this.ws(t);
1883
+ if (this.Os(e), e.scale === 1 && e.backgroundColor === "transparent") return await this.Ps.$s(A.canvas, e);
1884
+ const s = this.us.Ms(A, e.scale, e.backgroundColor);
1885
+ return await this.Ps.$s(s, e);
1886
+ }
1887
+ async Ys(A, t = {}) {
1888
+ const e = await this.$s(A, t), s = t.format ?? "png", r = t.filename || this.Is.je();
1889
+ this.Is.Ys(e, r, s);
1864
1890
  }
1865
1891
  }
1866
- const RA = (E) => class extends E {
1892
+ const GA = (o) => class extends o {
1867
1893
  toString(A = {}) {
1868
- return new J().vs({ pipeline: this.Us, grid: this.ae, font: this.vt }, A);
1894
+ return new z().bs({ pipeline: this.Rs, grid: this.he, font: this.bt }, A);
1869
1895
  }
1870
1896
  saveStrings(A = {}) {
1871
- new J().ps({ pipeline: this.Us, grid: this.ae, font: this.vt }, A);
1897
+ new z()._s({ pipeline: this.Rs, grid: this.he, font: this.bt }, A);
1872
1898
  }
1873
1899
  toSVG(A = {}) {
1874
- return new $().ws(this, A);
1900
+ return new $().fs(this, A);
1875
1901
  }
1876
1902
  saveSVG(A = {}) {
1877
- new $().Ds(this, A);
1903
+ new $().Cs(this, A);
1878
1904
  }
1879
1905
  async saveCanvas(A, t = "png", e = {}) {
1880
- await new TA().$s(this.Nt, { ...e, filename: A, format: t });
1906
+ await new FA().Ys(this.Zt, { ...e, filename: A, format: t });
1881
1907
  }
1882
- }, GA = (E) => class extends E {
1908
+ }, UA = (o) => class extends o {
1883
1909
  async loadFont(A) {
1884
- return this.vt.zt(A).then(() => {
1885
- const t = this.vt.maxGlyphDimensions;
1886
- this.ae.Ae(t.width, t.height), this.Us.se();
1910
+ return this.bt.Lt(A).then(() => {
1911
+ const t = this.bt.maxGlyphDimensions;
1912
+ this.he.te(t.width, t.height), this.Rs.re();
1887
1913
  });
1888
1914
  }
1889
1915
  fontSize(A) {
1890
- if (!u.C(typeof A == "number" && A > 0, "Font size must be a positive number greater than 0.", { method: "fontSize", providedValue: A }) || this.vt.fontSize === A) return;
1891
- this.vt.Ht(A);
1892
- const t = this.vt.maxGlyphDimensions;
1893
- this.ae.Ae(t.width, t.height), this.Us.se(), this.Ct.kA();
1916
+ if (!D.C(typeof A == "number" && A > 0, "Font size must be a positive number greater than 0.", { method: "fontSize", providedValue: A }) || this.bt.fontSize === A) return;
1917
+ this.bt.zt(A);
1918
+ const t = this.bt.maxGlyphDimensions;
1919
+ this.he.te(t.width, t.height), this.Rs.re(), this.ut.VA();
1894
1920
  }
1895
- }, UA = (E) => class extends E {
1921
+ }, OA = (o) => class extends o {
1896
1922
  addConverter(A) {
1897
- return this.Us.add(A);
1923
+ return this.Rs.add(A);
1898
1924
  }
1899
1925
  removeConverter(A) {
1900
- this.Us.remove(A);
1926
+ this.Rs.remove(A);
1901
1927
  }
1902
1928
  };
1903
- class YA {
1929
+ class SA {
1904
1930
  constructor() {
1905
- o(this, "Ct");
1906
- o(this, "vt");
1907
- o(this, "Us");
1908
- o(this, "Nt");
1909
- o(this, "ae");
1931
+ E(this, "ut");
1932
+ E(this, "bt");
1933
+ E(this, "Rs");
1934
+ E(this, "Zt");
1935
+ E(this, "he");
1910
1936
  }
1911
1937
  }
1912
- class z extends function(t, ...e) {
1938
+ class W extends function(t, ...e) {
1913
1939
  return e.reduce((s, r) => r(s), t);
1914
- }(YA, IA, RA, GA, UA) {
1940
+ }(SA, wA, GA, UA, OA) {
1915
1941
  constructor(t = null, e = {}) {
1916
1942
  super();
1917
- o(this, "Be");
1918
- o(this, "ks");
1919
- o(this, "Qe");
1920
- o(this, "Rs");
1921
- o(this, "Vs");
1922
- o(this, "Hs", null);
1923
- o(this, "zs", 0);
1924
- o(this, "Ls");
1925
- o(this, "Js", !0);
1926
- o(this, "Ks", 0);
1927
- o(this, "Ws", 0);
1928
- o(this, "js", 0);
1929
- o(this, "Ns", []);
1930
- o(this, "Zs", 10);
1931
- o(this, "Xs", !1);
1932
- o(this, "qs", !1);
1933
- o(this, "Ar", () => {
1943
+ E(this, "ie");
1944
+ E(this, "ks");
1945
+ E(this, "Ee");
1946
+ E(this, "Vs");
1947
+ E(this, "Hs");
1948
+ E(this, "zs", null);
1949
+ E(this, "Ls", 0);
1950
+ E(this, "Js");
1951
+ E(this, "js", !0);
1952
+ E(this, "Ks", 0);
1953
+ E(this, "Ws", 0);
1954
+ E(this, "Ns", 0);
1955
+ E(this, "Zs", []);
1956
+ E(this, "Xs", 10);
1957
+ E(this, "qs", !1);
1958
+ E(this, "Ar", !1);
1959
+ E(this, "tr", () => {
1934
1960
  });
1935
- o(this, "tr", () => {
1961
+ E(this, "er", () => {
1936
1962
  });
1937
- o(this, "er");
1938
- this.Be = t, this.qs = t === null, this.Rs = e.renderMode ?? "auto", this.Vs = e.frameRate ?? 60, this.Ls = 1e3 / this.Vs;
1963
+ E(this, "sr");
1964
+ this.ie = t, this.Ar = t === null, this.Vs = e.renderMode ?? "auto", this.Hs = e.frameRate ?? 60, this.Js = 1e3 / this.Hs;
1939
1965
  }
1940
1966
  static async create(t = null, e = {}) {
1941
- const s = new this(t, e), r = s.qs ? e : void 0;
1967
+ const s = new this(t, e), r = s.Ar ? e : void 0;
1942
1968
  let i, B;
1943
- s.Nt = new DA(s.Be, s.qs, r), s.Ct = new iA(s.Nt.ge()), s.qs ? (i = e.width || 800, B = e.height || 600) : (i = s.Nt.width || 800, B = s.Nt.height || 600), s.ks = s.Ct.SA(i, B), s.vt = new cA(s.Ct, e.fontSize ?? 16), await s.vt.kt(e.fontSource);
1944
- const Q = s.vt.maxGlyphDimensions;
1945
- return s.ae = new CA(s.Nt.canvas, Q.width, Q.height), s.Us = new dA(s.Ct, s.vt, s.ae), s.sr(), s.rr(), s;
1969
+ s.Zt = new dA(s.ie, s.Ar, r), s.ut = new EA(s.Zt.ne()), s.Ar ? (i = e.width || 800, B = e.height || 600) : (i = s.Zt.width || 800, B = s.Zt.height || 600), s.ks = s.ut.UA(i, B), s.bt = new DA(s.ut, e.fontSize ?? 16), await s.bt.kt(e.fontSource);
1970
+ const Q = s.bt.maxGlyphDimensions;
1971
+ return s.he = new PA(s.Zt.canvas, Q.width, Q.height), s.Rs = new fA(s.ut, s.bt, s.he), s.rr(), s.Br(), s;
1946
1972
  }
1947
- sr() {
1948
- this.er = () => {
1949
- this.qs ? this.tr() : this.Br();
1950
- }, window.addEventListener("resize", this.er), window.ResizeObserver && this.Be && !this.qs && (this.Qe = new ResizeObserver(() => {
1951
- this.Br();
1952
- }), this.Qe.observe(this.Be));
1973
+ rr() {
1974
+ this.sr = () => {
1975
+ this.Ar ? this.er() : this.ir();
1976
+ }, window.addEventListener("resize", this.sr), window.ResizeObserver && this.ie && !this.Ar && (this.Ee = new ResizeObserver(() => {
1977
+ this.ir();
1978
+ }), this.Ee.observe(this.ie));
1953
1979
  }
1954
1980
  render() {
1955
- this.ir(), this.js++, this.Xs ? console.warn("Cannot render: Required resources have been disposed") : (this.qs ? (this.ks.begin(), this.Ar(), this.ks.end()) : this.ks.update(this.Be), this.Us.hasEnabledConverters() ? (this.Us.Se(this.ks), this.Ct.OA(0), this.Ct.RA(this.Us.texture, this.ae.offsetX, this.ae.offsetY, this.Us.texture.width, this.Us.texture.height)) : (this.Ct.UA(), this.Ct.RA(this.ks, this.ae.offsetX, this.ae.offsetY, this.ks.width, this.ks.height)));
1981
+ this.Qr(), this.Ns++, this.qs ? console.warn("Cannot render: Required resources have been disposed") : (this.Ar ? (this.ks.begin(), this.tr(), this.ks.end()) : this.ks.S(this.ie), this.Rs.hasEnabledConverters() ? (this.Rs.Oe(this.ks), this.ut.RA(0), this.ut.HA(this.Rs.texture, this.he.offsetX, this.he.offsetY, this.Rs.texture.width, this.Rs.texture.height)) : (this.ut.kA(), this.ut.HA(this.ks, this.he.offsetX, this.he.offsetY, this.ks.width, this.ks.height)));
1956
1982
  }
1957
- Br() {
1958
- this.Nt.se(), this.ks.resize(this.Nt.width, this.Nt.height), this.ae.se(), this.Us.se(), this.Ct.kA(), this.Rs !== "manual" && this.render();
1983
+ ir() {
1984
+ this.Zt.re(), this.ks.resize(this.Zt.width, this.Zt.height), this.he.re(), this.Rs.re(), this.ut.VA(), this.Vs !== "manual" && this.render();
1959
1985
  }
1960
- rr() {
1961
- if (this.Rs !== "auto" || !this.Js) return;
1962
- this.zs = performance.now();
1986
+ Br() {
1987
+ if (this.Vs !== "auto" || !this.js) return;
1988
+ this.Ls = performance.now();
1963
1989
  const t = (e) => {
1964
- if (!this.Js) return void (this.Hs = null);
1965
- const s = e - this.zs;
1966
- s >= this.Ls && (this.render(), this.zs = e - s % this.Ls), this.Js && (this.Hs = requestAnimationFrame(t));
1990
+ if (!this.js) return void (this.zs = null);
1991
+ const s = e - this.Ls;
1992
+ s >= this.Js && (this.render(), this.Ls = e - s % this.Js), this.js && (this.zs = requestAnimationFrame(t));
1967
1993
  };
1968
- this.Hs = requestAnimationFrame(t);
1994
+ this.zs = requestAnimationFrame(t);
1969
1995
  }
1970
- ir() {
1996
+ Qr() {
1971
1997
  const t = performance.now();
1972
1998
  if (this.Ws > 0) {
1973
1999
  const e = t - this.Ws;
1974
- this.Ns.push(e), this.Ns.length > this.Zs && this.Ns.shift();
1975
- const s = this.Ns.reduce((r, i) => r + i, 0) / this.Ns.length;
2000
+ this.Zs.push(e), this.Zs.length > this.Xs && this.Zs.shift();
2001
+ const s = this.Zs.reduce((r, i) => r + i, 0) / this.Zs.length;
1976
2002
  this.Ks = 1e3 / s;
1977
2003
  }
1978
2004
  this.Ws = t;
1979
2005
  }
1980
- Qr() {
1981
- this.Hs && (cancelAnimationFrame(this.Hs), this.Hs = null);
2006
+ Er() {
2007
+ this.zs && (cancelAnimationFrame(this.zs), this.zs = null);
1982
2008
  }
1983
2009
  renderMode(t) {
1984
- this.Rs !== t && (this.Qr(), this.Rs = t, t === "auto" && this.Js && this.rr());
2010
+ this.Vs !== t && (this.Er(), this.Vs = t, t === "auto" && this.js && this.Br());
1985
2011
  }
1986
2012
  frameRate(t) {
1987
2013
  if (t === void 0) return this.Ks;
1988
- this.Vs = t, this.Ls = 1e3 / t, this.Rs === "auto" && this.Js && (this.Qr(), this.rr());
2014
+ this.Hs = t, this.Js = 1e3 / t, this.Vs === "auto" && this.js && (this.Er(), this.Br());
1989
2015
  }
1990
2016
  noLoop() {
1991
- this.Js && (this.Js = !1, this.Hs && (cancelAnimationFrame(this.Hs), this.Hs = null));
2017
+ this.js && (this.js = !1, this.zs && (cancelAnimationFrame(this.zs), this.zs = null));
1992
2018
  }
1993
2019
  loop() {
1994
- this.Js || (this.Js = !0, this.Rs === "auto" && this.rr());
2020
+ this.js || (this.js = !0, this.Vs === "auto" && this.Br());
1995
2021
  }
1996
2022
  redraw(t = 1) {
1997
- if (u.C(typeof t == "number" && t > 0 && Number.isInteger(t), "Redraw count must be a positive integer.", { method: "redraw", providedValue: t })) for (let e = 0; e < t; e++) this.render();
2023
+ if (D.C(typeof t == "number" && t > 0 && Number.isInteger(t), "Redraw count must be a positive integer.", { method: "redraw", providedValue: t })) for (let e = 0; e < t; e++) this.render();
1998
2024
  }
1999
2025
  isLooping() {
2000
- return this.Rs === "auto" && this.Js;
2026
+ return this.Vs === "auto" && this.js;
2001
2027
  }
2002
2028
  draw(t) {
2003
- this.Ar = t;
2029
+ this.tr = t;
2004
2030
  }
2005
2031
  windowResized(t) {
2006
- this.tr = t;
2032
+ this.er = t;
2007
2033
  }
2008
2034
  resizeCanvas(t, e) {
2009
- this.qs && (this.Nt.se(t, e), this.ks.resize(this.Nt.width, this.Nt.height), this.ae.se(), this.Us.se(), this.Ct.kA(), this.Rs !== "manual" && this.render());
2035
+ this.Ar && (this.Zt.re(t, e), this.ks.resize(this.Zt.width, this.Zt.height), this.he.re(), this.Rs.re(), this.ut.VA(), this.Vs !== "manual" && this.render());
2010
2036
  }
2011
2037
  destroy() {
2012
- this.Xs || (this.Qr(), window.removeEventListener("resize", this.er), this.Qe && this.Qe.disconnect(), this.Us.S(), this.vt.S(), this.ks.S(), this.Ct.S(), this.Xs = !0);
2038
+ this.qs || (this.Er(), window.removeEventListener("resize", this.sr), this.Ee && this.Ee.disconnect(), this.Rs.O(), this.bt.O(), this.ks.O(), this.ut.O(), this.qs = !0);
2013
2039
  }
2014
2040
  get grid() {
2015
- return this.ae;
2041
+ return this.he;
2016
2042
  }
2017
2043
  get font() {
2018
- return this.vt;
2044
+ return this.bt;
2019
2045
  }
2020
2046
  get mode() {
2021
- return this.Rs;
2047
+ return this.Vs;
2022
2048
  }
2023
2049
  get pipeline() {
2024
- return this.Us;
2050
+ return this.Rs;
2025
2051
  }
2026
2052
  get frameCount() {
2027
- return this.js;
2053
+ return this.Ns;
2028
2054
  }
2029
2055
  get renderer() {
2030
- return this.Ct;
2056
+ return this.ut;
2031
2057
  }
2032
2058
  set frameCount(t) {
2033
- this.js = t;
2059
+ this.Ns = t;
2034
2060
  }
2035
2061
  get width() {
2036
- return this.Nt.width;
2062
+ return this.Zt.width;
2037
2063
  }
2038
2064
  get height() {
2039
- return this.Nt.height;
2065
+ return this.Zt.height;
2040
2066
  }
2041
2067
  get canvas() {
2042
- return this.Nt;
2068
+ return this.Zt;
2043
2069
  }
2044
2070
  get isDisposed() {
2045
- return this.Xs;
2071
+ return this.qs;
2046
2072
  }
2047
2073
  }
2048
- class L {
2074
+ class H {
2049
2075
  constructor() {
2050
2076
  throw new I("Textmode is a static class and cannot be instantiated.");
2051
2077
  }
2052
2078
  static async create(A, t = {}) {
2053
2079
  if (!(A == null || A instanceof HTMLCanvasElement || A instanceof HTMLVideoElement || typeof A == "object")) throw new I("First parameter must be HTMLCanvasElement, HTMLVideoElement, or options object.");
2054
2080
  if (typeof t != "object") throw new I("Second parameter must be an options object.");
2055
- if (A instanceof HTMLCanvasElement || A instanceof HTMLVideoElement) return z.create(A, t);
2081
+ if (A instanceof HTMLCanvasElement || A instanceof HTMLVideoElement) return W.create(A, t);
2056
2082
  {
2057
2083
  const e = A || {};
2058
- return z.create(null, e);
2084
+ return W.create(null, e);
2059
2085
  }
2060
2086
  }
2061
2087
  static setErrorLevel(A) {
2062
- u.u(A);
2088
+ D.u(A);
2063
2089
  }
2064
2090
  static get version() {
2065
- return "0.1.9-beta.5";
2091
+ return "0.1.9";
2066
2092
  }
2067
2093
  }
2068
- const NA = Object.freeze(Object.defineProperty({ __proto__: null }, Symbol.toStringTag, { value: "Module" })), kA = L.create, LA = L.setErrorLevel, HA = L.version;
2094
+ const HA = Object.freeze(Object.defineProperty({ __proto__: null }, Symbol.toStringTag, { value: "Module" })), VA = Object.freeze(Object.defineProperty({ __proto__: null, DEFAULT_FRAMEBUFFER_OPTIONS: { filter: "nearest", wrap: "clamp", format: "rgba", type: "unsigned_byte" }, Framebuffer: X, Shader: q }, Symbol.toStringTag, { value: "Module" })), NA = H.create, $A = H.setErrorLevel, zA = H.version;
2069
2095
  export {
2070
- DA as TextmodeCanvas,
2071
- uA as TextmodeColorPalette,
2072
- dA as TextmodeConversionPipeline,
2073
- eA as TextmodeErrorLevel,
2074
- cA as TextmodeFont,
2075
- CA as TextmodeGrid,
2076
- z as Textmodifier,
2077
- OA as converters,
2078
- kA as create,
2079
- L as default,
2080
- NA as export,
2081
- LA as setErrorLevel,
2082
- L as textmode,
2083
- HA as version
2096
+ dA as TextmodeCanvas,
2097
+ IA as TextmodeColorPalette,
2098
+ fA as TextmodeConversionPipeline,
2099
+ iA as TextmodeErrorLevel,
2100
+ DA as TextmodeFont,
2101
+ PA as TextmodeGrid,
2102
+ W as Textmodifier,
2103
+ LA as converters,
2104
+ NA as create,
2105
+ HA as export,
2106
+ VA as rendering,
2107
+ $A as setErrorLevel,
2108
+ H as textmode,
2109
+ zA as version
2084
2110
  };