@algorisys/yappydraw 0.8.253

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 (43) hide show
  1. package/LICENSE +661 -0
  2. package/README.md +45 -0
  3. package/chunks/AllPackages-DNX4gUvL.js +6879 -0
  4. package/chunks/BaseConfiguration-iE_YypNt.js +4401 -0
  5. package/chunks/Entities-XwxJEcR3.js +467 -0
  6. package/chunks/Factory--zguTNZ7.js +2768 -0
  7. package/chunks/InputJax-BYq2tqUz.js +42 -0
  8. package/chunks/MathItem-DD5NNBjZ.js +76 -0
  9. package/chunks/Options-BStFr0zv.js +199 -0
  10. package/chunks/PrioritizedList-TjDg4i-s.js +39 -0
  11. package/chunks/Styles-DdTYCumM.js +397 -0
  12. package/chunks/TeXAtom-Bp5xoo7F.js +2175 -0
  13. package/chunks/ai-providers-CycU8sO1.js +229 -0
  14. package/chunks/canva-ai-BREIRXSl.js +285 -0
  15. package/chunks/design-generator-C89SKTqv.js +149 -0
  16. package/chunks/drawing-engine-DLFI-cNg.js +903 -0
  17. package/chunks/drawings-store-C-PoHakg.js +109 -0
  18. package/chunks/ds-operations-D5B9Z5vO.js +253 -0
  19. package/chunks/export-game-DOlM1w0F.js +104 -0
  20. package/chunks/game-runtime-Hn9umSvi.js +346 -0
  21. package/chunks/gifenc.esm-48qFK9lH.js +278 -0
  22. package/chunks/html-DxnOvKy4.js +1694 -0
  23. package/chunks/image-utils-CJQBaGoQ.js +37 -0
  24. package/chunks/index-Bm3Inzn8.js +62744 -0
  25. package/chunks/lengths-DNFHULBn.js +70 -0
  26. package/chunks/liteAdaptor-BZby1Qz2.js +919 -0
  27. package/chunks/lucide-solid-D_6t_rbY.js +35452 -0
  28. package/chunks/markdown-to-slides-_1GIcD8M.js +96 -0
  29. package/chunks/mathjax-CnUrFnFS.js +117 -0
  30. package/chunks/mathjax-D6cR72fZ.js +26 -0
  31. package/chunks/morph-animator-7qX2s9j_.js +25 -0
  32. package/chunks/onboarding-tour-CthiVc3W.js +192 -0
  33. package/chunks/rocket-settings-CU8w9S9I.js +100 -0
  34. package/chunks/search-CnWoMV6A.js +384 -0
  35. package/chunks/slide-generator-BG0Oacui.js +553 -0
  36. package/chunks/svg-BvVc02XL.js +12498 -0
  37. package/chunks/tex-Cfi4Kfun.js +442 -0
  38. package/chunks/tinyfly-engine-Wfa50sVI.js +1804 -0
  39. package/chunks/turntable-ai-Bfq-oSsD.js +120 -0
  40. package/chunks/yappy-NspTXSPk.css +1 -0
  41. package/package.json +21 -0
  42. package/yappy.d.ts +34 -0
  43. package/yappy.js +9 -0
@@ -0,0 +1,919 @@
1
+ import { g as R } from "./PrioritizedList-TjDg4i-s.js";
2
+ import { r as Z } from "./Options-BStFr0zv.js";
3
+ import { r as tt } from "./Entities-XwxJEcR3.js";
4
+ import { r as et } from "./Styles-DdTYCumM.js";
5
+ function rt(A, O) {
6
+ for (var b = 0; b < O.length; b++) {
7
+ const v = O[b];
8
+ if (typeof v != "string" && !Array.isArray(v)) {
9
+ for (const s in v)
10
+ if (s !== "default" && !(s in A)) {
11
+ const f = Object.getOwnPropertyDescriptor(v, s);
12
+ f && Object.defineProperty(A, s, f.get ? f : {
13
+ enumerable: !0,
14
+ get: () => v[s]
15
+ });
16
+ }
17
+ }
18
+ }
19
+ return Object.freeze(Object.defineProperty(A, Symbol.toStringTag, { value: "Module" }));
20
+ }
21
+ var w = {}, P = {}, B;
22
+ function nt() {
23
+ if (B) return P;
24
+ B = 1;
25
+ var A = P && P.__values || function(b) {
26
+ var v = typeof Symbol == "function" && Symbol.iterator, s = v && b[v], f = 0;
27
+ if (s) return s.call(b);
28
+ if (b && typeof b.length == "number") return {
29
+ next: function() {
30
+ return b && f >= b.length && (b = void 0), { value: b && b[f++], done: !b };
31
+ }
32
+ };
33
+ throw new TypeError(v ? "Object is not iterable." : "Symbol.iterator is not defined.");
34
+ };
35
+ Object.defineProperty(P, "__esModule", { value: !0 }), P.AbstractDOMAdaptor = void 0;
36
+ var O = (function() {
37
+ function b(v) {
38
+ v === void 0 && (v = null), this.document = v;
39
+ }
40
+ return b.prototype.node = function(v, s, f, p) {
41
+ var y, h;
42
+ s === void 0 && (s = {}), f === void 0 && (f = []);
43
+ var d = this.create(v, p);
44
+ this.setAttributes(d, s);
45
+ try {
46
+ for (var g = A(f), n = g.next(); !n.done; n = g.next()) {
47
+ var i = n.value;
48
+ this.append(d, i);
49
+ }
50
+ } catch (a) {
51
+ y = { error: a };
52
+ } finally {
53
+ try {
54
+ n && !n.done && (h = g.return) && h.call(g);
55
+ } finally {
56
+ if (y) throw y.error;
57
+ }
58
+ }
59
+ return d;
60
+ }, b.prototype.setAttributes = function(v, s) {
61
+ var f, p, y, h, d, g;
62
+ if (s.style && typeof s.style != "string")
63
+ try {
64
+ for (var n = A(Object.keys(s.style)), i = n.next(); !i.done; i = n.next()) {
65
+ var a = i.value;
66
+ this.setStyle(v, a.replace(/-([a-z])/g, function(t, e) {
67
+ return e.toUpperCase();
68
+ }), s.style[a]);
69
+ }
70
+ } catch (t) {
71
+ f = { error: t };
72
+ } finally {
73
+ try {
74
+ i && !i.done && (p = n.return) && p.call(n);
75
+ } finally {
76
+ if (f) throw f.error;
77
+ }
78
+ }
79
+ if (s.properties)
80
+ try {
81
+ for (var l = A(Object.keys(s.properties)), _ = l.next(); !_.done; _ = l.next()) {
82
+ var a = _.value;
83
+ v[a] = s.properties[a];
84
+ }
85
+ } catch (t) {
86
+ y = { error: t };
87
+ } finally {
88
+ try {
89
+ _ && !_.done && (h = l.return) && h.call(l);
90
+ } finally {
91
+ if (y) throw y.error;
92
+ }
93
+ }
94
+ try {
95
+ for (var c = A(Object.keys(s)), r = c.next(); !r.done; r = c.next()) {
96
+ var a = r.value;
97
+ (a !== "style" || typeof s.style == "string") && a !== "properties" && this.setAttribute(v, a, s[a]);
98
+ }
99
+ } catch (t) {
100
+ d = { error: t };
101
+ } finally {
102
+ try {
103
+ r && !r.done && (g = c.return) && g.call(c);
104
+ } finally {
105
+ if (d) throw d.error;
106
+ }
107
+ }
108
+ }, b.prototype.replace = function(v, s) {
109
+ return this.insert(v, s), this.remove(s), s;
110
+ }, b.prototype.childNode = function(v, s) {
111
+ return this.childNodes(v)[s];
112
+ }, b.prototype.allClasses = function(v) {
113
+ var s = this.getAttribute(v, "class");
114
+ return s ? s.replace(/ +/g, " ").replace(/^ /, "").replace(/ $/, "").split(/ /) : [];
115
+ }, b;
116
+ })();
117
+ return P.AbstractDOMAdaptor = O, P;
118
+ }
119
+ var T = {}, q;
120
+ function it() {
121
+ return q || (q = 1, (function(A) {
122
+ var O = T && T.__extends || /* @__PURE__ */ (function() {
123
+ var f = function(p, y) {
124
+ return f = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(h, d) {
125
+ h.__proto__ = d;
126
+ } || function(h, d) {
127
+ for (var g in d) Object.prototype.hasOwnProperty.call(d, g) && (h[g] = d[g]);
128
+ }, f(p, y);
129
+ };
130
+ return function(p, y) {
131
+ if (typeof y != "function" && y !== null)
132
+ throw new TypeError("Class extends value " + String(y) + " is not a constructor or null");
133
+ f(p, y);
134
+ function h() {
135
+ this.constructor = p;
136
+ }
137
+ p.prototype = y === null ? Object.create(y) : (h.prototype = y.prototype, new h());
138
+ };
139
+ })(), b = T && T.__assign || function() {
140
+ return b = Object.assign || function(f) {
141
+ for (var p, y = 1, h = arguments.length; y < h; y++) {
142
+ p = arguments[y];
143
+ for (var d in p) Object.prototype.hasOwnProperty.call(p, d) && (f[d] = p[d]);
144
+ }
145
+ return f;
146
+ }, b.apply(this, arguments);
147
+ };
148
+ Object.defineProperty(A, "__esModule", { value: !0 }), A.NodeMixin = A.NodeMixinOptions = void 0;
149
+ var v = Z();
150
+ A.NodeMixinOptions = {
151
+ badCSS: !0,
152
+ badSizes: !0
153
+ };
154
+ function s(f, p) {
155
+ var y;
156
+ return p === void 0 && (p = {}), p = (0, v.userOptions)((0, v.defaultOptions)({}, A.NodeMixinOptions), p), y = (function(h) {
157
+ O(d, h);
158
+ function d() {
159
+ for (var g = [], n = 0; n < arguments.length; n++)
160
+ g[n] = arguments[n];
161
+ var i = h.call(this, g[0]) || this, a = i.constructor;
162
+ return i.options = (0, v.userOptions)((0, v.defaultOptions)({}, a.OPTIONS), g[1]), i;
163
+ }
164
+ return d.prototype.fontSize = function(g) {
165
+ return p.badCSS ? this.options.fontSize : h.prototype.fontSize.call(this, g);
166
+ }, d.prototype.fontFamily = function(g) {
167
+ return p.badCSS ? this.options.fontFamily : h.prototype.fontFamily.call(this, g);
168
+ }, d.prototype.nodeSize = function(g, n, i) {
169
+ if (n === void 0 && (n = 1), i === void 0 && (i = null), !p.badSizes)
170
+ return h.prototype.nodeSize.call(this, g, n, i);
171
+ var a = this.textContent(g), l = Array.from(a.replace(d.cjkPattern, "")).length, _ = Array.from(a).length - l;
172
+ return [
173
+ _ * this.options.cjkCharWidth + l * this.options.unknownCharWidth,
174
+ this.options.unknownCharHeight
175
+ ];
176
+ }, d.prototype.nodeBBox = function(g) {
177
+ return p.badSizes ? { left: 0, right: 0, top: 0, bottom: 0 } : h.prototype.nodeBBox.call(this, g);
178
+ }, d;
179
+ })(f), y.OPTIONS = b(b({}, p.badCSS ? {
180
+ fontSize: 16,
181
+ fontFamily: "Times"
182
+ } : {}), p.badSizes ? {
183
+ cjkCharWidth: 1,
184
+ unknownCharWidth: 0.6,
185
+ unknownCharHeight: 0.8
186
+ } : {}), y.cjkPattern = new RegExp([
187
+ "[",
188
+ "ᄀ-ᅟ",
189
+ "〈〉",
190
+ "⺀-〾",
191
+ "぀-㉇",
192
+ "㉐-䶿",
193
+ "一-꓆",
194
+ "ꥠ-ꥼ",
195
+ "가-힣",
196
+ "豈-﫿",
197
+ "︐-︙",
198
+ "︰-﹫",
199
+ "!-⦆¢-₩",
200
+ "𛀀-𛀁",
201
+ "🈀-🉑",
202
+ "𠀀-𿿽",
203
+ "]"
204
+ ].join(""), "gu"), y;
205
+ }
206
+ A.NodeMixin = s;
207
+ })(T)), T;
208
+ }
209
+ var k = {}, j = {}, N;
210
+ function F() {
211
+ if (N) return j;
212
+ N = 1;
213
+ var A = j && j.__assign || function() {
214
+ return A = Object.assign || function(f) {
215
+ for (var p, y = 1, h = arguments.length; y < h; y++) {
216
+ p = arguments[y];
217
+ for (var d in p) Object.prototype.hasOwnProperty.call(p, d) && (f[d] = p[d]);
218
+ }
219
+ return f;
220
+ }, A.apply(this, arguments);
221
+ }, O = j && j.__read || function(f, p) {
222
+ var y = typeof Symbol == "function" && f[Symbol.iterator];
223
+ if (!y) return f;
224
+ var h = y.call(f), d, g = [], n;
225
+ try {
226
+ for (; (p === void 0 || p-- > 0) && !(d = h.next()).done; ) g.push(d.value);
227
+ } catch (i) {
228
+ n = { error: i };
229
+ } finally {
230
+ try {
231
+ d && !d.done && (y = h.return) && y.call(h);
232
+ } finally {
233
+ if (n) throw n.error;
234
+ }
235
+ }
236
+ return g;
237
+ }, b = j && j.__spreadArray || function(f, p, y) {
238
+ if (y || arguments.length === 2) for (var h = 0, d = p.length, g; h < d; h++)
239
+ (g || !(h in p)) && (g || (g = Array.prototype.slice.call(p, 0, h)), g[h] = p[h]);
240
+ return f.concat(g || Array.prototype.slice.call(p));
241
+ }, v = j && j.__values || function(f) {
242
+ var p = typeof Symbol == "function" && Symbol.iterator, y = p && f[p], h = 0;
243
+ if (y) return y.call(f);
244
+ if (f && typeof f.length == "number") return {
245
+ next: function() {
246
+ return f && h >= f.length && (f = void 0), { value: f && f[h++], done: !f };
247
+ }
248
+ };
249
+ throw new TypeError(p ? "Object is not iterable." : "Symbol.iterator is not defined.");
250
+ };
251
+ Object.defineProperty(j, "__esModule", { value: !0 }), j.LiteElement = void 0;
252
+ var s = /* @__PURE__ */ (function() {
253
+ function f(p, y, h) {
254
+ var d, g;
255
+ y === void 0 && (y = {}), h === void 0 && (h = []), this.kind = p, this.attributes = A({}, y), this.children = b([], O(h), !1);
256
+ try {
257
+ for (var n = v(this.children), i = n.next(); !i.done; i = n.next()) {
258
+ var a = i.value;
259
+ a.parent = this;
260
+ }
261
+ } catch (l) {
262
+ d = { error: l };
263
+ } finally {
264
+ try {
265
+ i && !i.done && (g = n.return) && g.call(n);
266
+ } finally {
267
+ if (d) throw d.error;
268
+ }
269
+ }
270
+ this.styles = null;
271
+ }
272
+ return f;
273
+ })();
274
+ return j.LiteElement = s, j;
275
+ }
276
+ var W;
277
+ function J() {
278
+ if (W) return k;
279
+ W = 1, Object.defineProperty(k, "__esModule", { value: !0 }), k.LiteDocument = void 0;
280
+ var A = F(), O = (function() {
281
+ function b() {
282
+ this.root = new A.LiteElement("html", {}, [
283
+ this.head = new A.LiteElement("head"),
284
+ this.body = new A.LiteElement("body")
285
+ ]), this.type = "";
286
+ }
287
+ return Object.defineProperty(b.prototype, "kind", {
288
+ get: function() {
289
+ return "#document";
290
+ },
291
+ enumerable: !1,
292
+ configurable: !0
293
+ }), b;
294
+ })();
295
+ return k.LiteDocument = O, k;
296
+ }
297
+ var D = {}, G;
298
+ function K() {
299
+ if (G) return D;
300
+ G = 1;
301
+ var A = D && D.__extends || /* @__PURE__ */ (function() {
302
+ var v = function(s, f) {
303
+ return v = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(p, y) {
304
+ p.__proto__ = y;
305
+ } || function(p, y) {
306
+ for (var h in y) Object.prototype.hasOwnProperty.call(y, h) && (p[h] = y[h]);
307
+ }, v(s, f);
308
+ };
309
+ return function(s, f) {
310
+ if (typeof f != "function" && f !== null)
311
+ throw new TypeError("Class extends value " + String(f) + " is not a constructor or null");
312
+ v(s, f);
313
+ function p() {
314
+ this.constructor = s;
315
+ }
316
+ s.prototype = f === null ? Object.create(f) : (p.prototype = f.prototype, new p());
317
+ };
318
+ })();
319
+ Object.defineProperty(D, "__esModule", { value: !0 }), D.LiteComment = D.LiteText = void 0;
320
+ var O = (function() {
321
+ function v(s) {
322
+ s === void 0 && (s = ""), this.value = s;
323
+ }
324
+ return Object.defineProperty(v.prototype, "kind", {
325
+ get: function() {
326
+ return "#text";
327
+ },
328
+ enumerable: !1,
329
+ configurable: !0
330
+ }), v;
331
+ })();
332
+ D.LiteText = O;
333
+ var b = (function(v) {
334
+ A(s, v);
335
+ function s() {
336
+ return v !== null && v.apply(this, arguments) || this;
337
+ }
338
+ return Object.defineProperty(s.prototype, "kind", {
339
+ get: function() {
340
+ return "#comment";
341
+ },
342
+ enumerable: !1,
343
+ configurable: !0
344
+ }), s;
345
+ })(O);
346
+ return D.LiteComment = b, D;
347
+ }
348
+ var I = {}, E = {}, U;
349
+ function ot() {
350
+ if (U) return E;
351
+ U = 1;
352
+ var A = E && E.__read || function(v, s) {
353
+ var f = typeof Symbol == "function" && v[Symbol.iterator];
354
+ if (!f) return v;
355
+ var p = f.call(v), y, h = [], d;
356
+ try {
357
+ for (; (s === void 0 || s-- > 0) && !(y = p.next()).done; ) h.push(y.value);
358
+ } catch (g) {
359
+ d = { error: g };
360
+ } finally {
361
+ try {
362
+ y && !y.done && (f = p.return) && f.call(p);
363
+ } finally {
364
+ if (d) throw d.error;
365
+ }
366
+ }
367
+ return h;
368
+ }, O = E && E.__spreadArray || function(v, s, f) {
369
+ if (f || arguments.length === 2) for (var p = 0, y = s.length, h; p < y; p++)
370
+ (h || !(p in s)) && (h || (h = Array.prototype.slice.call(s, 0, p)), h[p] = s[p]);
371
+ return v.concat(h || Array.prototype.slice.call(s));
372
+ };
373
+ Object.defineProperty(E, "__esModule", { value: !0 }), E.LiteList = void 0;
374
+ var b = (function() {
375
+ function v(s) {
376
+ this.nodes = [], this.nodes = O([], A(s), !1);
377
+ }
378
+ return v.prototype.append = function(s) {
379
+ this.nodes.push(s);
380
+ }, v.prototype[Symbol.iterator] = function() {
381
+ var s = 0;
382
+ return {
383
+ next: function() {
384
+ return s === this.nodes.length ? { value: null, done: !0 } : { value: this.nodes[s++], done: !1 };
385
+ }
386
+ };
387
+ }, v;
388
+ })();
389
+ return E.LiteList = b, E;
390
+ }
391
+ var S = {}, $;
392
+ function X() {
393
+ return $ || ($ = 1, (function(A) {
394
+ var O = S && S.__createBinding || (Object.create ? (function(n, i, a, l) {
395
+ l === void 0 && (l = a);
396
+ var _ = Object.getOwnPropertyDescriptor(i, a);
397
+ (!_ || ("get" in _ ? !i.__esModule : _.writable || _.configurable)) && (_ = { enumerable: !0, get: function() {
398
+ return i[a];
399
+ } }), Object.defineProperty(n, l, _);
400
+ }) : (function(n, i, a, l) {
401
+ l === void 0 && (l = a), n[l] = i[a];
402
+ })), b = S && S.__setModuleDefault || (Object.create ? (function(n, i) {
403
+ Object.defineProperty(n, "default", { enumerable: !0, value: i });
404
+ }) : function(n, i) {
405
+ n.default = i;
406
+ }), v = S && S.__importStar || function(n) {
407
+ if (n && n.__esModule) return n;
408
+ var i = {};
409
+ if (n != null) for (var a in n) a !== "default" && Object.prototype.hasOwnProperty.call(n, a) && O(i, n, a);
410
+ return b(i, n), i;
411
+ }, s = S && S.__read || function(n, i) {
412
+ var a = typeof Symbol == "function" && n[Symbol.iterator];
413
+ if (!a) return n;
414
+ var l = a.call(n), _, c = [], r;
415
+ try {
416
+ for (; (i === void 0 || i-- > 0) && !(_ = l.next()).done; ) c.push(_.value);
417
+ } catch (t) {
418
+ r = { error: t };
419
+ } finally {
420
+ try {
421
+ _ && !_.done && (a = l.return) && a.call(l);
422
+ } finally {
423
+ if (r) throw r.error;
424
+ }
425
+ }
426
+ return c;
427
+ }, f = S && S.__values || function(n) {
428
+ var i = typeof Symbol == "function" && Symbol.iterator, a = i && n[i], l = 0;
429
+ if (a) return a.call(n);
430
+ if (n && typeof n.length == "number") return {
431
+ next: function() {
432
+ return n && l >= n.length && (n = void 0), { value: n && n[l++], done: !n };
433
+ }
434
+ };
435
+ throw new TypeError(i ? "Object is not iterable." : "Symbol.iterator is not defined.");
436
+ };
437
+ Object.defineProperty(A, "__esModule", { value: !0 }), A.LiteParser = A.PATTERNS = void 0;
438
+ var p = v(tt()), y = F(), h = K(), d;
439
+ (function(n) {
440
+ n.TAGNAME = "[a-z][^\\s\\n>]*", n.ATTNAME = "[a-z][^\\s\\n>=]*", n.VALUE = `(?:'[^']*'|"[^"]*"|[^\\s\\n]+)`, n.VALUESPLIT = `(?:'([^']*)'|"([^"]*)"|([^\\s\\n]+))`, n.SPACE = "(?:\\s|\\n)+", n.OPTIONALSPACE = "(?:\\s|\\n)*", n.ATTRIBUTE = n.ATTNAME + "(?:" + n.OPTIONALSPACE + "=" + n.OPTIONALSPACE + n.VALUE + ")?", n.ATTRIBUTESPLIT = "(" + n.ATTNAME + ")(?:" + n.OPTIONALSPACE + "=" + n.OPTIONALSPACE + n.VALUESPLIT + ")?", n.TAG = "(<(?:" + n.TAGNAME + "(?:" + n.SPACE + n.ATTRIBUTE + ")*" + n.OPTIONALSPACE + "/?|/" + n.TAGNAME + "|!--[^]*?--|![^]*?)(?:>|$))", n.tag = new RegExp(n.TAG, "i"), n.attr = new RegExp(n.ATTRIBUTE, "i"), n.attrsplit = new RegExp(n.ATTRIBUTESPLIT, "i");
441
+ })(d = A.PATTERNS || (A.PATTERNS = {}));
442
+ var g = (function() {
443
+ function n() {
444
+ }
445
+ return n.prototype.parseFromString = function(i, a, l) {
446
+ l === void 0 && (l = null);
447
+ for (var _ = l.createDocument(), c = l.body(_), r = i.replace(/<\?.*?\?>/g, "").split(d.tag); r.length; ) {
448
+ var t = r.shift(), e = r.shift();
449
+ t && this.addText(l, c, t), e && e.charAt(e.length - 1) === ">" && (e.charAt(1) === "!" ? this.addComment(l, c, e) : e.charAt(1) === "/" ? c = this.closeTag(l, c, e) : c = this.openTag(l, c, e, r));
450
+ }
451
+ return this.checkDocument(l, _), _;
452
+ }, n.prototype.addText = function(i, a, l) {
453
+ return l = p.translate(l), i.append(a, i.text(l));
454
+ }, n.prototype.addComment = function(i, a, l) {
455
+ return i.append(a, new h.LiteComment(l));
456
+ }, n.prototype.closeTag = function(i, a, l) {
457
+ for (var _ = l.slice(2, l.length - 1).toLowerCase(); i.parent(a) && i.kind(a) !== _; )
458
+ a = i.parent(a);
459
+ return i.parent(a);
460
+ }, n.prototype.openTag = function(i, a, l, _) {
461
+ var c = this.constructor.PCDATA, r = this.constructor.SELF_CLOSING, t = l.match(/<(.*?)[\s\n>\/]/)[1].toLowerCase(), e = i.node(t), o = l.replace(/^<.*?[\s\n>]/, "").split(d.attrsplit);
462
+ return (o.pop().match(/>$/) || o.length < 5) && (this.addAttributes(i, e, o), i.append(a, e), !r[t] && !l.match(/\/>$/) && (c[t] ? this.handlePCDATA(i, e, t, _) : a = e)), a;
463
+ }, n.prototype.addAttributes = function(i, a, l) {
464
+ for (var _ = this.constructor.CDATA_ATTR; l.length; ) {
465
+ var c = s(l.splice(0, 5), 5), r = c[1], t = c[2], e = c[3], o = c[4], u = t || e || o || "";
466
+ _[r] || (u = p.translate(u)), i.setAttribute(a, r, u);
467
+ }
468
+ }, n.prototype.handlePCDATA = function(i, a, l, _) {
469
+ for (var c = [], r = "</" + l + ">", t = ""; _.length && t !== r; )
470
+ c.push(t), c.push(_.shift()), t = _.shift();
471
+ i.append(a, i.text(c.join("")));
472
+ }, n.prototype.checkDocument = function(i, a) {
473
+ var l, _, c, r, t = this.getOnlyChild(i, i.body(a));
474
+ if (t) {
475
+ try {
476
+ for (var e = f(i.childNodes(i.body(a))), o = e.next(); !o.done; o = e.next()) {
477
+ var u = o.value;
478
+ if (u === t)
479
+ break;
480
+ u instanceof h.LiteComment && u.value.match(/^<!DOCTYPE/) && (a.type = u.value);
481
+ }
482
+ } catch (C) {
483
+ l = { error: C };
484
+ } finally {
485
+ try {
486
+ o && !o.done && (_ = e.return) && _.call(e);
487
+ } finally {
488
+ if (l) throw l.error;
489
+ }
490
+ }
491
+ switch (i.kind(t)) {
492
+ case "html":
493
+ try {
494
+ for (var m = f(t.children), L = m.next(); !L.done; L = m.next()) {
495
+ var u = L.value;
496
+ switch (i.kind(u)) {
497
+ case "head":
498
+ a.head = u;
499
+ break;
500
+ case "body":
501
+ a.body = u;
502
+ break;
503
+ }
504
+ }
505
+ } catch (C) {
506
+ c = { error: C };
507
+ } finally {
508
+ try {
509
+ L && !L.done && (r = m.return) && r.call(m);
510
+ } finally {
511
+ if (c) throw c.error;
512
+ }
513
+ }
514
+ a.root = t, i.remove(t), i.parent(a.body) !== t && i.append(t, a.body), i.parent(a.head) !== t && i.insert(a.head, a.body);
515
+ break;
516
+ case "head":
517
+ a.head = i.replace(t, a.head);
518
+ break;
519
+ case "body":
520
+ a.body = i.replace(t, a.body);
521
+ break;
522
+ }
523
+ }
524
+ }, n.prototype.getOnlyChild = function(i, a) {
525
+ var l, _, c = null;
526
+ try {
527
+ for (var r = f(i.childNodes(a)), t = r.next(); !t.done; t = r.next()) {
528
+ var e = t.value;
529
+ if (e instanceof y.LiteElement) {
530
+ if (c)
531
+ return null;
532
+ c = e;
533
+ }
534
+ }
535
+ } catch (o) {
536
+ l = { error: o };
537
+ } finally {
538
+ try {
539
+ t && !t.done && (_ = r.return) && _.call(r);
540
+ } finally {
541
+ if (l) throw l.error;
542
+ }
543
+ }
544
+ return c;
545
+ }, n.prototype.serialize = function(i, a, l) {
546
+ var _ = this;
547
+ l === void 0 && (l = !1);
548
+ var c = this.constructor.SELF_CLOSING, r = this.constructor.CDATA_ATTR, t = i.kind(a), e = i.allAttributes(a).map(function(m) {
549
+ return m.name + '="' + (r[m.name] ? m.value : _.protectAttribute(m.value)) + '"';
550
+ }).join(" "), o = this.serializeInner(i, a, l), u = "<" + t + (e ? " " + e : "") + ((!l || o) && !c[t] ? ">".concat(o, "</").concat(t, ">") : l ? "/>" : ">");
551
+ return u;
552
+ }, n.prototype.serializeInner = function(i, a, l) {
553
+ var _ = this;
554
+ l === void 0 && (l = !1);
555
+ var c = this.constructor.PCDATA;
556
+ return c.hasOwnProperty(a.kind) ? i.childNodes(a).map(function(r) {
557
+ return i.value(r);
558
+ }).join("") : i.childNodes(a).map(function(r) {
559
+ var t = i.kind(r);
560
+ return t === "#text" ? _.protectHTML(i.value(r)) : t === "#comment" ? r.value : _.serialize(i, r, l);
561
+ }).join("");
562
+ }, n.prototype.protectAttribute = function(i) {
563
+ return typeof i != "string" && (i = String(i)), i.replace(/"/g, "&quot;");
564
+ }, n.prototype.protectHTML = function(i) {
565
+ return i.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
566
+ }, n.SELF_CLOSING = {
567
+ area: !0,
568
+ base: !0,
569
+ br: !0,
570
+ col: !0,
571
+ command: !0,
572
+ embed: !0,
573
+ hr: !0,
574
+ img: !0,
575
+ input: !0,
576
+ keygen: !0,
577
+ link: !0,
578
+ menuitem: !0,
579
+ meta: !0,
580
+ param: !0,
581
+ source: !0,
582
+ track: !0,
583
+ wbr: !0
584
+ }, n.PCDATA = {
585
+ option: !0,
586
+ textarea: !0,
587
+ fieldset: !0,
588
+ title: !0,
589
+ style: !0,
590
+ script: !0
591
+ }, n.CDATA_ATTR = {
592
+ style: !0,
593
+ datafld: !0,
594
+ datasrc: !0,
595
+ href: !0,
596
+ src: !0,
597
+ longdesc: !0,
598
+ usemap: !0,
599
+ cite: !0,
600
+ datetime: !0,
601
+ action: !0,
602
+ axis: !0,
603
+ profile: !0,
604
+ content: !0,
605
+ scheme: !0
606
+ }, n;
607
+ })();
608
+ A.LiteParser = g;
609
+ })(S)), S;
610
+ }
611
+ var H;
612
+ function at() {
613
+ if (H) return I;
614
+ H = 1, Object.defineProperty(I, "__esModule", { value: !0 }), I.LiteWindow = void 0;
615
+ var A = F(), O = J(), b = ot(), v = X(), s = /* @__PURE__ */ (function() {
616
+ function f() {
617
+ this.DOMParser = v.LiteParser, this.NodeList = b.LiteList, this.HTMLCollection = b.LiteList, this.HTMLElement = A.LiteElement, this.DocumentFragment = b.LiteList, this.Document = O.LiteDocument, this.document = new O.LiteDocument();
618
+ }
619
+ return f;
620
+ })();
621
+ return I.LiteWindow = s, I;
622
+ }
623
+ var V;
624
+ function ut() {
625
+ if (V) return w;
626
+ V = 1;
627
+ var A = w && w.__extends || /* @__PURE__ */ (function() {
628
+ var c = function(r, t) {
629
+ return c = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, o) {
630
+ e.__proto__ = o;
631
+ } || function(e, o) {
632
+ for (var u in o) Object.prototype.hasOwnProperty.call(o, u) && (e[u] = o[u]);
633
+ }, c(r, t);
634
+ };
635
+ return function(r, t) {
636
+ if (typeof t != "function" && t !== null)
637
+ throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
638
+ c(r, t);
639
+ function e() {
640
+ this.constructor = r;
641
+ }
642
+ r.prototype = t === null ? Object.create(t) : (e.prototype = t.prototype, new e());
643
+ };
644
+ })(), O = w && w.__assign || function() {
645
+ return O = Object.assign || function(c) {
646
+ for (var r, t = 1, e = arguments.length; t < e; t++) {
647
+ r = arguments[t];
648
+ for (var o in r) Object.prototype.hasOwnProperty.call(r, o) && (c[o] = r[o]);
649
+ }
650
+ return c;
651
+ }, O.apply(this, arguments);
652
+ }, b = w && w.__values || function(c) {
653
+ var r = typeof Symbol == "function" && Symbol.iterator, t = r && c[r], e = 0;
654
+ if (t) return t.call(c);
655
+ if (c && typeof c.length == "number") return {
656
+ next: function() {
657
+ return c && e >= c.length && (c = void 0), { value: c && c[e++], done: !c };
658
+ }
659
+ };
660
+ throw new TypeError(r ? "Object is not iterable." : "Symbol.iterator is not defined.");
661
+ }, v = w && w.__read || function(c, r) {
662
+ var t = typeof Symbol == "function" && c[Symbol.iterator];
663
+ if (!t) return c;
664
+ var e = t.call(c), o, u = [], m;
665
+ try {
666
+ for (; (r === void 0 || r-- > 0) && !(o = e.next()).done; ) u.push(o.value);
667
+ } catch (L) {
668
+ m = { error: L };
669
+ } finally {
670
+ try {
671
+ o && !o.done && (t = e.return) && t.call(e);
672
+ } finally {
673
+ if (m) throw m.error;
674
+ }
675
+ }
676
+ return u;
677
+ }, s = w && w.__spreadArray || function(c, r, t) {
678
+ if (t || arguments.length === 2) for (var e = 0, o = r.length, u; e < o; e++)
679
+ (u || !(e in r)) && (u || (u = Array.prototype.slice.call(r, 0, e)), u[e] = r[e]);
680
+ return c.concat(u || Array.prototype.slice.call(r));
681
+ };
682
+ Object.defineProperty(w, "__esModule", { value: !0 }), w.liteAdaptor = w.LiteAdaptor = w.LiteBase = void 0;
683
+ var f = nt(), p = it(), y = J(), h = F(), d = K(), g = at(), n = X(), i = et(), a = (function(c) {
684
+ A(r, c);
685
+ function r() {
686
+ var t = c.call(this) || this;
687
+ return t.parser = new n.LiteParser(), t.window = new g.LiteWindow(), t;
688
+ }
689
+ return r.prototype.parse = function(t, e) {
690
+ return this.parser.parseFromString(t, e, this);
691
+ }, r.prototype.create = function(t, e) {
692
+ return new h.LiteElement(t);
693
+ }, r.prototype.text = function(t) {
694
+ return new d.LiteText(t);
695
+ }, r.prototype.comment = function(t) {
696
+ return new d.LiteComment(t);
697
+ }, r.prototype.createDocument = function() {
698
+ return new y.LiteDocument();
699
+ }, r.prototype.head = function(t) {
700
+ return t.head;
701
+ }, r.prototype.body = function(t) {
702
+ return t.body;
703
+ }, r.prototype.root = function(t) {
704
+ return t.root;
705
+ }, r.prototype.doctype = function(t) {
706
+ return t.type;
707
+ }, r.prototype.tags = function(t, e, o) {
708
+ o === void 0 && (o = null);
709
+ var u = [], m = [];
710
+ if (o)
711
+ return m;
712
+ for (var L = t; L; ) {
713
+ var C = L.kind;
714
+ C !== "#text" && C !== "#comment" && (L = L, C === e && m.push(L), L.children.length && (u = L.children.concat(u))), L = u.shift();
715
+ }
716
+ return m;
717
+ }, r.prototype.elementById = function(t, e) {
718
+ for (var o = [], u = t; u; ) {
719
+ if (u.kind !== "#text" && u.kind !== "#comment") {
720
+ if (u = u, u.attributes.id === e)
721
+ return u;
722
+ u.children.length && (o = u.children.concat(o));
723
+ }
724
+ u = o.shift();
725
+ }
726
+ return null;
727
+ }, r.prototype.elementsByClass = function(t, e) {
728
+ for (var o = [], u = [], m = t; m; ) {
729
+ if (m.kind !== "#text" && m.kind !== "#comment") {
730
+ m = m;
731
+ var L = (m.attributes.class || "").trim().split(/ +/);
732
+ L.includes(e) && u.push(m), m.children.length && (o = m.children.concat(o));
733
+ }
734
+ m = o.shift();
735
+ }
736
+ return u;
737
+ }, r.prototype.getElements = function(t, e) {
738
+ var o, u, m = [], L = this.body(e);
739
+ try {
740
+ for (var C = b(t), M = C.next(); !M.done; M = C.next()) {
741
+ var x = M.value;
742
+ if (typeof x == "string")
743
+ if (x.charAt(0) === "#") {
744
+ var z = this.elementById(L, x.slice(1));
745
+ z && m.push(z);
746
+ } else x.charAt(0) === "." ? m = m.concat(this.elementsByClass(L, x.slice(1))) : x.match(/^[-a-z][-a-z0-9]*$/i) && (m = m.concat(this.tags(L, x)));
747
+ else Array.isArray(x) ? m = m.concat(x) : x instanceof this.window.NodeList || x instanceof this.window.HTMLCollection ? m = m.concat(x.nodes) : m.push(x);
748
+ }
749
+ } catch (Q) {
750
+ o = { error: Q };
751
+ } finally {
752
+ try {
753
+ M && !M.done && (u = C.return) && u.call(C);
754
+ } finally {
755
+ if (o) throw o.error;
756
+ }
757
+ }
758
+ return m;
759
+ }, r.prototype.contains = function(t, e) {
760
+ for (; e && e !== t; )
761
+ e = this.parent(e);
762
+ return !!e;
763
+ }, r.prototype.parent = function(t) {
764
+ return t.parent;
765
+ }, r.prototype.childIndex = function(t) {
766
+ return t.parent ? t.parent.children.findIndex(function(e) {
767
+ return e === t;
768
+ }) : -1;
769
+ }, r.prototype.append = function(t, e) {
770
+ return e.parent && this.remove(e), t.children.push(e), e.parent = t, e;
771
+ }, r.prototype.insert = function(t, e) {
772
+ if (t.parent && this.remove(t), e && e.parent) {
773
+ var o = this.childIndex(e);
774
+ e.parent.children.splice(o, 0, t), t.parent = e.parent;
775
+ }
776
+ }, r.prototype.remove = function(t) {
777
+ var e = this.childIndex(t);
778
+ return e >= 0 && t.parent.children.splice(e, 1), t.parent = null, t;
779
+ }, r.prototype.replace = function(t, e) {
780
+ var o = this.childIndex(e);
781
+ return o >= 0 && (e.parent.children[o] = t, t.parent = e.parent, e.parent = null), e;
782
+ }, r.prototype.clone = function(t) {
783
+ var e = this, o = new h.LiteElement(t.kind);
784
+ return o.attributes = O({}, t.attributes), o.children = t.children.map(function(u) {
785
+ if (u.kind === "#text")
786
+ return new d.LiteText(u.value);
787
+ if (u.kind === "#comment")
788
+ return new d.LiteComment(u.value);
789
+ var m = e.clone(u);
790
+ return m.parent = o, m;
791
+ }), o;
792
+ }, r.prototype.split = function(t, e) {
793
+ var o = new d.LiteText(t.value.slice(e));
794
+ return t.value = t.value.slice(0, e), t.parent.children.splice(this.childIndex(t) + 1, 0, o), o.parent = t.parent, o;
795
+ }, r.prototype.next = function(t) {
796
+ var e = t.parent;
797
+ if (!e)
798
+ return null;
799
+ var o = this.childIndex(t) + 1;
800
+ return o >= 0 && o < e.children.length ? e.children[o] : null;
801
+ }, r.prototype.previous = function(t) {
802
+ var e = t.parent;
803
+ if (!e)
804
+ return null;
805
+ var o = this.childIndex(t) - 1;
806
+ return o >= 0 ? e.children[o] : null;
807
+ }, r.prototype.firstChild = function(t) {
808
+ return t.children[0];
809
+ }, r.prototype.lastChild = function(t) {
810
+ return t.children[t.children.length - 1];
811
+ }, r.prototype.childNodes = function(t) {
812
+ return s([], v(t.children), !1);
813
+ }, r.prototype.childNode = function(t, e) {
814
+ return t.children[e];
815
+ }, r.prototype.kind = function(t) {
816
+ return t.kind;
817
+ }, r.prototype.value = function(t) {
818
+ return t.kind === "#text" ? t.value : t.kind === "#comment" ? t.value.replace(/^<!(--)?((?:.|\n)*)\1>$/, "$2") : "";
819
+ }, r.prototype.textContent = function(t) {
820
+ var e = this;
821
+ return t.children.reduce(function(o, u) {
822
+ return o + (u.kind === "#text" ? u.value : u.kind === "#comment" ? "" : e.textContent(u));
823
+ }, "");
824
+ }, r.prototype.innerHTML = function(t) {
825
+ return this.parser.serializeInner(this, t);
826
+ }, r.prototype.outerHTML = function(t) {
827
+ return this.parser.serialize(this, t);
828
+ }, r.prototype.serializeXML = function(t) {
829
+ return this.parser.serialize(this, t, !0);
830
+ }, r.prototype.setAttribute = function(t, e, o, u) {
831
+ u === void 0 && (u = null), typeof o != "string" && (o = String(o)), u && (e = u.replace(/.*\//, "") + ":" + e.replace(/^.*:/, "")), t.attributes[e] = o, e === "style" && (t.styles = null);
832
+ }, r.prototype.getAttribute = function(t, e) {
833
+ return t.attributes[e];
834
+ }, r.prototype.removeAttribute = function(t, e) {
835
+ delete t.attributes[e];
836
+ }, r.prototype.hasAttribute = function(t, e) {
837
+ return t.attributes.hasOwnProperty(e);
838
+ }, r.prototype.allAttributes = function(t) {
839
+ var e, o, u = t.attributes, m = [];
840
+ try {
841
+ for (var L = b(Object.keys(u)), C = L.next(); !C.done; C = L.next()) {
842
+ var M = C.value;
843
+ m.push({ name: M, value: u[M] });
844
+ }
845
+ } catch (x) {
846
+ e = { error: x };
847
+ } finally {
848
+ try {
849
+ C && !C.done && (o = L.return) && o.call(L);
850
+ } finally {
851
+ if (e) throw e.error;
852
+ }
853
+ }
854
+ return m;
855
+ }, r.prototype.addClass = function(t, e) {
856
+ var o = (t.attributes.class || "").split(/ /);
857
+ o.find(function(u) {
858
+ return u === e;
859
+ }) || (o.push(e), t.attributes.class = o.join(" "));
860
+ }, r.prototype.removeClass = function(t, e) {
861
+ var o = (t.attributes.class || "").split(/ /), u = o.findIndex(function(m) {
862
+ return m === e;
863
+ });
864
+ u >= 0 && (o.splice(u, 1), t.attributes.class = o.join(" "));
865
+ }, r.prototype.hasClass = function(t, e) {
866
+ var o = (t.attributes.class || "").split(/ /);
867
+ return !!o.find(function(u) {
868
+ return u === e;
869
+ });
870
+ }, r.prototype.setStyle = function(t, e, o) {
871
+ t.styles || (t.styles = new i.Styles(this.getAttribute(t, "style"))), t.styles.set(e, o), t.attributes.style = t.styles.cssText;
872
+ }, r.prototype.getStyle = function(t, e) {
873
+ if (!t.styles) {
874
+ var o = this.getAttribute(t, "style");
875
+ if (!o)
876
+ return "";
877
+ t.styles = new i.Styles(o);
878
+ }
879
+ return t.styles.get(e);
880
+ }, r.prototype.allStyles = function(t) {
881
+ return this.getAttribute(t, "style");
882
+ }, r.prototype.insertRules = function(t, e) {
883
+ t.children = [this.text(e.join(`
884
+
885
+ `) + `
886
+
887
+ ` + this.textContent(t))];
888
+ }, r.prototype.fontSize = function(t) {
889
+ return 0;
890
+ }, r.prototype.fontFamily = function(t) {
891
+ return "";
892
+ }, r.prototype.nodeSize = function(t, e, o) {
893
+ return [0, 0];
894
+ }, r.prototype.nodeBBox = function(t) {
895
+ return { left: 0, right: 0, top: 0, bottom: 0 };
896
+ }, r;
897
+ })(f.AbstractDOMAdaptor);
898
+ w.LiteBase = a;
899
+ var l = (function(c) {
900
+ A(r, c);
901
+ function r() {
902
+ return c !== null && c.apply(this, arguments) || this;
903
+ }
904
+ return r;
905
+ })((0, p.NodeMixin)(a));
906
+ w.LiteAdaptor = l;
907
+ function _(c) {
908
+ return c === void 0 && (c = null), new l(null, c);
909
+ }
910
+ return w.liteAdaptor = _, w;
911
+ }
912
+ var Y = ut();
913
+ const lt = /* @__PURE__ */ R(Y), yt = /* @__PURE__ */ rt({
914
+ __proto__: null,
915
+ default: lt
916
+ }, [Y]);
917
+ export {
918
+ yt as l
919
+ };