@symbo.ls/scratch 2.11.131 → 2.11.132

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 +21 -0
  2. package/dist/cjs/defaultConfig/animation.js +26 -0
  3. package/dist/cjs/defaultConfig/cases.js +26 -0
  4. package/dist/cjs/defaultConfig/color.js +28 -0
  5. package/dist/cjs/defaultConfig/document.js +26 -0
  6. package/dist/cjs/defaultConfig/font-family.js +34 -0
  7. package/dist/cjs/defaultConfig/font.js +26 -0
  8. package/dist/cjs/defaultConfig/icons.js +26 -0
  9. package/dist/cjs/defaultConfig/index.js +221 -0
  10. package/dist/cjs/defaultConfig/media.js +51 -0
  11. package/dist/cjs/defaultConfig/responsive.js +50 -0
  12. package/dist/cjs/defaultConfig/sequence.js +51 -0
  13. package/dist/cjs/defaultConfig/spacing.js +85 -0
  14. package/dist/cjs/defaultConfig/svg.js +28 -0
  15. package/dist/cjs/defaultConfig/templates.js +26 -0
  16. package/dist/cjs/defaultConfig/theme.js +26 -0
  17. package/dist/cjs/defaultConfig/timing.js +67 -0
  18. package/dist/cjs/defaultConfig/typography.js +71 -0
  19. package/dist/cjs/defaultConfig/unit.js +28 -0
  20. package/dist/cjs/factory.js +1442 -0
  21. package/dist/cjs/index.js +3059 -0
  22. package/dist/cjs/package.json +4 -0
  23. package/dist/cjs/set.js +2428 -0
  24. package/dist/cjs/system/color.js +1711 -0
  25. package/dist/cjs/system/document.js +1504 -0
  26. package/dist/cjs/system/font.js +1544 -0
  27. package/dist/cjs/system/index.js +2616 -0
  28. package/dist/cjs/system/reset.js +1613 -0
  29. package/dist/cjs/system/spacing.js +1788 -0
  30. package/dist/cjs/system/svg.js +1615 -0
  31. package/dist/cjs/system/theme.js +1799 -0
  32. package/dist/cjs/system/timing.js +1701 -0
  33. package/dist/cjs/system/typography.js +1754 -0
  34. package/dist/cjs/tests/index.js +30 -0
  35. package/dist/cjs/transforms/index.js +1977 -0
  36. package/dist/cjs/utils/color.js +1399 -0
  37. package/dist/cjs/utils/font.js +72 -0
  38. package/dist/cjs/utils/index.js +1977 -0
  39. package/dist/cjs/utils/sequence.js +1611 -0
  40. package/dist/cjs/utils/sprite.js +1486 -0
  41. package/dist/cjs/utils/theme.js +34 -0
  42. package/dist/cjs/utils/var.js +1467 -0
  43. package/package.json +2 -2
@@ -0,0 +1,1613 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __commonJS = (cb, mod) => function __require() {
9
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
+ };
11
+ var __export = (target, all) => {
12
+ for (var name in all)
13
+ __defProp(target, name, { get: all[name], enumerable: true });
14
+ };
15
+ var __copyProps = (to, from, except, desc) => {
16
+ if (from && typeof from === "object" || typeof from === "function") {
17
+ for (let key of __getOwnPropNames(from))
18
+ if (!__hasOwnProp.call(to, key) && key !== except)
19
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
20
+ }
21
+ return to;
22
+ };
23
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
24
+ // If the importer is in node compatibility mode or this is not an ESM
25
+ // file that has been converted to a CommonJS file using a Babel-
26
+ // compatible transform (i.e. "__esModule" has not been set), then set
27
+ // "default" to the CommonJS "module.exports" for node compatibility.
28
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
29
+ mod
30
+ ));
31
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
32
+
33
+ // ../../node_modules/@domql/utils/dist/cjs/key.js
34
+ var require_key = __commonJS({
35
+ "../../node_modules/@domql/utils/dist/cjs/key.js"(exports, module2) {
36
+ "use strict";
37
+ var __defProp2 = Object.defineProperty;
38
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
39
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
40
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
41
+ var __export2 = (target, all) => {
42
+ for (var name in all)
43
+ __defProp2(target, name, { get: all[name], enumerable: true });
44
+ };
45
+ var __copyProps2 = (to, from, except, desc) => {
46
+ if (from && typeof from === "object" || typeof from === "function") {
47
+ for (let key of __getOwnPropNames2(from))
48
+ if (!__hasOwnProp2.call(to, key) && key !== except)
49
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
50
+ }
51
+ return to;
52
+ };
53
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
54
+ var key_exports = {};
55
+ __export2(key_exports, {
56
+ createKey: () => createKey,
57
+ createSnapshotId: () => createSnapshotId
58
+ });
59
+ module2.exports = __toCommonJS2(key_exports);
60
+ var createKey = function() {
61
+ let index = 0;
62
+ function newId() {
63
+ index++;
64
+ return index;
65
+ }
66
+ return newId;
67
+ }();
68
+ var createSnapshotId = createKey;
69
+ }
70
+ });
71
+
72
+ // ../../node_modules/@domql/utils/dist/cjs/env.js
73
+ var require_env = __commonJS({
74
+ "../../node_modules/@domql/utils/dist/cjs/env.js"(exports, module2) {
75
+ "use strict";
76
+ var __defProp2 = Object.defineProperty;
77
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
78
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
79
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
80
+ var __export2 = (target, all) => {
81
+ for (var name in all)
82
+ __defProp2(target, name, { get: all[name], enumerable: true });
83
+ };
84
+ var __copyProps2 = (to, from, except, desc) => {
85
+ if (from && typeof from === "object" || typeof from === "function") {
86
+ for (let key of __getOwnPropNames2(from))
87
+ if (!__hasOwnProp2.call(to, key) && key !== except)
88
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
89
+ }
90
+ return to;
91
+ };
92
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
93
+ var env_exports = {};
94
+ __export2(env_exports, {
95
+ NODE_ENV: () => NODE_ENV,
96
+ getNev: () => getNev,
97
+ isDevelopment: () => isDevelopment,
98
+ isProduction: () => isProduction,
99
+ isTest: () => isTest
100
+ });
101
+ module2.exports = __toCommonJS2(env_exports);
102
+ var NODE_ENV = "development";
103
+ var isProduction = (env = NODE_ENV) => env === "production" || env === "prod" || env !== "development" && env !== "dev" && env !== "test";
104
+ var isTest = (env = NODE_ENV) => env === "test";
105
+ var isDevelopment = (env = NODE_ENV) => env === "development" || env === "dev";
106
+ var getNev = (key, env = NODE_ENV) => env[key];
107
+ }
108
+ });
109
+
110
+ // ../../node_modules/@domql/utils/dist/cjs/globals.js
111
+ var require_globals = __commonJS({
112
+ "../../node_modules/@domql/utils/dist/cjs/globals.js"(exports, module2) {
113
+ "use strict";
114
+ var __defProp2 = Object.defineProperty;
115
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
116
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
117
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
118
+ var __export2 = (target, all) => {
119
+ for (var name in all)
120
+ __defProp2(target, name, { get: all[name], enumerable: true });
121
+ };
122
+ var __copyProps2 = (to, from, except, desc) => {
123
+ if (from && typeof from === "object" || typeof from === "function") {
124
+ for (let key of __getOwnPropNames2(from))
125
+ if (!__hasOwnProp2.call(to, key) && key !== except)
126
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
127
+ }
128
+ return to;
129
+ };
130
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
131
+ var globals_exports = {};
132
+ __export2(globals_exports, {
133
+ document: () => document4,
134
+ global: () => global,
135
+ self: () => self,
136
+ window: () => window2
137
+ });
138
+ module2.exports = __toCommonJS2(globals_exports);
139
+ var global = globalThis;
140
+ var self = globalThis;
141
+ var window2 = globalThis;
142
+ var document4 = window2.document;
143
+ }
144
+ });
145
+
146
+ // ../../node_modules/@domql/utils/dist/cjs/node.js
147
+ var require_node = __commonJS({
148
+ "../../node_modules/@domql/utils/dist/cjs/node.js"(exports, module2) {
149
+ "use strict";
150
+ var __defProp2 = Object.defineProperty;
151
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
152
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
153
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
154
+ var __export2 = (target, all) => {
155
+ for (var name in all)
156
+ __defProp2(target, name, { get: all[name], enumerable: true });
157
+ };
158
+ var __copyProps2 = (to, from, except, desc) => {
159
+ if (from && typeof from === "object" || typeof from === "function") {
160
+ for (let key of __getOwnPropNames2(from))
161
+ if (!__hasOwnProp2.call(to, key) && key !== except)
162
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
163
+ }
164
+ return to;
165
+ };
166
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
167
+ var node_exports = {};
168
+ __export2(node_exports, {
169
+ isHtmlElement: () => isHtmlElement,
170
+ isNode: () => isNode
171
+ });
172
+ module2.exports = __toCommonJS2(node_exports);
173
+ var import_globals3 = require_globals();
174
+ var isNode = (obj) => {
175
+ return (typeof Node === "object" ? obj instanceof import_globals3.window.Node : obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string") || false;
176
+ };
177
+ var isHtmlElement = (obj) => {
178
+ return (typeof HTMLElement === "object" ? obj instanceof import_globals3.window.HTMLElement : obj && typeof obj === "object" && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === "string") || false;
179
+ };
180
+ }
181
+ });
182
+
183
+ // ../../node_modules/@domql/utils/dist/cjs/types.js
184
+ var require_types = __commonJS({
185
+ "../../node_modules/@domql/utils/dist/cjs/types.js"(exports, module2) {
186
+ "use strict";
187
+ var __defProp2 = Object.defineProperty;
188
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
189
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
190
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
191
+ var __export2 = (target, all) => {
192
+ for (var name in all)
193
+ __defProp2(target, name, { get: all[name], enumerable: true });
194
+ };
195
+ var __copyProps2 = (to, from, except, desc) => {
196
+ if (from && typeof from === "object" || typeof from === "function") {
197
+ for (let key of __getOwnPropNames2(from))
198
+ if (!__hasOwnProp2.call(to, key) && key !== except)
199
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
200
+ }
201
+ return to;
202
+ };
203
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
204
+ var types_exports = {};
205
+ __export2(types_exports, {
206
+ TYPES: () => TYPES,
207
+ is: () => is,
208
+ isArray: () => isArray6,
209
+ isBoolean: () => isBoolean,
210
+ isDefined: () => isDefined2,
211
+ isFunction: () => isFunction,
212
+ isNot: () => isNot,
213
+ isNull: () => isNull,
214
+ isNumber: () => isNumber2,
215
+ isObject: () => isObject7,
216
+ isObjectLike: () => isObjectLike3,
217
+ isString: () => isString8,
218
+ isUndefined: () => isUndefined
219
+ });
220
+ module2.exports = __toCommonJS2(types_exports);
221
+ var import_node = require_node();
222
+ var isObject7 = (arg) => {
223
+ if (arg === null)
224
+ return false;
225
+ return typeof arg === "object" && arg.constructor === Object;
226
+ };
227
+ var isString8 = (arg) => typeof arg === "string";
228
+ var isNumber2 = (arg) => typeof arg === "number";
229
+ var isFunction = (arg) => typeof arg === "function";
230
+ var isBoolean = (arg) => arg === true || arg === false;
231
+ var isNull = (arg) => arg === null;
232
+ var isArray6 = (arg) => Array.isArray(arg);
233
+ var isObjectLike3 = (arg) => {
234
+ if (arg === null)
235
+ return false;
236
+ return typeof arg === "object";
237
+ };
238
+ var isDefined2 = (arg) => {
239
+ return isObject7(arg) || isObjectLike3(arg) || isString8(arg) || isNumber2(arg) || isFunction(arg) || isArray6(arg) || isObjectLike3(arg) || isBoolean(arg) || isNull(arg);
240
+ };
241
+ var isUndefined = (arg) => {
242
+ return arg === void 0;
243
+ };
244
+ var TYPES = {
245
+ boolean: isBoolean,
246
+ array: isArray6,
247
+ object: isObject7,
248
+ string: isString8,
249
+ number: isNumber2,
250
+ null: isNull,
251
+ function: isFunction,
252
+ objectLike: isObjectLike3,
253
+ node: import_node.isNode,
254
+ htmlElement: import_node.isHtmlElement,
255
+ defined: isDefined2
256
+ };
257
+ var is = (arg) => {
258
+ return (...args) => {
259
+ return args.map((val) => TYPES[val](arg)).filter((v) => v).length > 0;
260
+ };
261
+ };
262
+ var isNot = (arg) => {
263
+ return (...args) => {
264
+ return args.map((val) => TYPES[val](arg)).filter((v) => v).length === 0;
265
+ };
266
+ };
267
+ }
268
+ });
269
+
270
+ // ../../node_modules/@domql/utils/dist/cjs/array.js
271
+ var require_array = __commonJS({
272
+ "../../node_modules/@domql/utils/dist/cjs/array.js"(exports, module2) {
273
+ "use strict";
274
+ var __defProp2 = Object.defineProperty;
275
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
276
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
277
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
278
+ var __export2 = (target, all) => {
279
+ for (var name in all)
280
+ __defProp2(target, name, { get: all[name], enumerable: true });
281
+ };
282
+ var __copyProps2 = (to, from, except, desc) => {
283
+ if (from && typeof from === "object" || typeof from === "function") {
284
+ for (let key of __getOwnPropNames2(from))
285
+ if (!__hasOwnProp2.call(to, key) && key !== except)
286
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
287
+ }
288
+ return to;
289
+ };
290
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
291
+ var array_exports = {};
292
+ __export2(array_exports, {
293
+ arrayContainsOtherArray: () => arrayContainsOtherArray,
294
+ createNestedObject: () => createNestedObject,
295
+ cutArrayAfterValue: () => cutArrayAfterValue,
296
+ cutArrayBeforeValue: () => cutArrayBeforeValue,
297
+ joinArrays: () => joinArrays,
298
+ mergeAndCloneIfArray: () => mergeAndCloneIfArray,
299
+ mergeArray: () => mergeArray,
300
+ removeFromArray: () => removeFromArray,
301
+ swapItemsInArray: () => swapItemsInArray
302
+ });
303
+ module2.exports = __toCommonJS2(array_exports);
304
+ var import_object = require_object();
305
+ var import_types = require_types();
306
+ var arrayContainsOtherArray = (arr1, arr2) => {
307
+ return arr2.every((val) => arr1.includes(val));
308
+ };
309
+ var removeFromArray = (arr, index) => {
310
+ if ((0, import_types.isString)(index))
311
+ index = parseInt(index);
312
+ if ((0, import_types.isNumber)(index)) {
313
+ if (index < 0 || index >= arr.length || isNaN(index)) {
314
+ throw new Error("Invalid index");
315
+ }
316
+ arr.splice(index, 1);
317
+ } else if ((0, import_types.isArray)(index)) {
318
+ index.forEach((idx) => removeFromArray(arr, idx));
319
+ } else {
320
+ throw new Error("Invalid index");
321
+ }
322
+ return arr;
323
+ };
324
+ var swapItemsInArray = (arr, i, j) => {
325
+ [arr[i], arr[j]] = [arr[j], arr[i]];
326
+ };
327
+ var joinArrays = (...arrays) => {
328
+ return [].concat(...arrays);
329
+ };
330
+ var mergeArray = (arr, excludeFrom = []) => {
331
+ return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepClone)(c, excludeFrom), excludeFrom), {});
332
+ };
333
+ var mergeAndCloneIfArray = (obj) => {
334
+ return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepClone)(obj);
335
+ };
336
+ var cutArrayBeforeValue = (arr, value) => {
337
+ const index = arr.indexOf(value);
338
+ if (index !== -1) {
339
+ return arr.slice(0, index);
340
+ }
341
+ return arr;
342
+ };
343
+ var cutArrayAfterValue = (arr, value) => {
344
+ const index = arr.indexOf(value);
345
+ if (index !== -1) {
346
+ return arr.slice(index + 1);
347
+ }
348
+ return arr;
349
+ };
350
+ var createNestedObject = (arr, lastValue) => {
351
+ const nestedObject = {};
352
+ if (arr.length === 0) {
353
+ return lastValue;
354
+ }
355
+ arr.reduce((obj, value, index) => {
356
+ if (!obj[value]) {
357
+ obj[value] = {};
358
+ }
359
+ if (index === arr.length - 1 && lastValue) {
360
+ obj[value] = lastValue;
361
+ }
362
+ return obj[value];
363
+ }, nestedObject);
364
+ return nestedObject;
365
+ };
366
+ }
367
+ });
368
+
369
+ // ../../node_modules/@domql/utils/dist/cjs/string.js
370
+ var require_string = __commonJS({
371
+ "../../node_modules/@domql/utils/dist/cjs/string.js"(exports, module2) {
372
+ "use strict";
373
+ var __defProp2 = Object.defineProperty;
374
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
375
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
376
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
377
+ var __export2 = (target, all) => {
378
+ for (var name in all)
379
+ __defProp2(target, name, { get: all[name], enumerable: true });
380
+ };
381
+ var __copyProps2 = (to, from, except, desc) => {
382
+ if (from && typeof from === "object" || typeof from === "function") {
383
+ for (let key of __getOwnPropNames2(from))
384
+ if (!__hasOwnProp2.call(to, key) && key !== except)
385
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
386
+ }
387
+ return to;
388
+ };
389
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
390
+ var string_exports = {};
391
+ __export2(string_exports, {
392
+ replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
393
+ stringIncludesAny: () => stringIncludesAny
394
+ });
395
+ module2.exports = __toCommonJS2(string_exports);
396
+ var stringIncludesAny = (str, characters) => {
397
+ for (const char of characters) {
398
+ if (str.includes(char)) {
399
+ return true;
400
+ }
401
+ }
402
+ return false;
403
+ };
404
+ var brackRegex = /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g;
405
+ var replaceLiteralsWithObjectFields = (str, state) => {
406
+ if (!str.includes("{{"))
407
+ return str;
408
+ return str.replace(brackRegex, (_, parentPath, variable) => {
409
+ if (parentPath) {
410
+ const parentLevels = parentPath.match(/\.\.\//g).length;
411
+ let parentState = state;
412
+ for (let i = 0; i < parentLevels; i++) {
413
+ parentState = parentState.parent;
414
+ if (!parentState) {
415
+ return "";
416
+ }
417
+ }
418
+ const value = parentState[variable.trim()];
419
+ return value !== void 0 ? `${value}` : "";
420
+ } else {
421
+ const value = state[variable.trim()];
422
+ return value !== void 0 ? `${value}` : "";
423
+ }
424
+ });
425
+ };
426
+ }
427
+ });
428
+
429
+ // ../../node_modules/@domql/utils/dist/cjs/object.js
430
+ var require_object = __commonJS({
431
+ "../../node_modules/@domql/utils/dist/cjs/object.js"(exports, module2) {
432
+ "use strict";
433
+ var __defProp2 = Object.defineProperty;
434
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
435
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
436
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
437
+ var __export2 = (target, all) => {
438
+ for (var name in all)
439
+ __defProp2(target, name, { get: all[name], enumerable: true });
440
+ };
441
+ var __copyProps2 = (to, from, except, desc) => {
442
+ if (from && typeof from === "object" || typeof from === "function") {
443
+ for (let key of __getOwnPropNames2(from))
444
+ if (!__hasOwnProp2.call(to, key) && key !== except)
445
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
446
+ }
447
+ return to;
448
+ };
449
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
450
+ var object_exports = {};
451
+ __export2(object_exports, {
452
+ clone: () => clone,
453
+ deepClone: () => deepClone2,
454
+ deepCloneExclude: () => deepCloneExclude,
455
+ deepDestringify: () => deepDestringify,
456
+ deepMerge: () => deepMerge3,
457
+ deepStringify: () => deepStringify,
458
+ detachFunctionsFromObject: () => detachFunctionsFromObject,
459
+ diff: () => diff,
460
+ diffArrays: () => diffArrays,
461
+ diffObjects: () => diffObjects,
462
+ exec: () => exec,
463
+ flattenRecursive: () => flattenRecursive,
464
+ isEqualDeep: () => isEqualDeep,
465
+ map: () => map,
466
+ merge: () => merge5,
467
+ mergeArrayExclude: () => mergeArrayExclude,
468
+ mergeIfExisted: () => mergeIfExisted,
469
+ objectToString: () => objectToString,
470
+ overwrite: () => overwrite,
471
+ overwriteDeep: () => overwriteDeep2,
472
+ overwriteShallow: () => overwriteShallow,
473
+ removeFromObject: () => removeFromObject,
474
+ stringToObject: () => stringToObject
475
+ });
476
+ module2.exports = __toCommonJS2(object_exports);
477
+ var import_globals3 = require_globals();
478
+ var import_types = require_types();
479
+ var import_array = require_array();
480
+ var import_string = require_string();
481
+ var exec = (param, element, state, context) => {
482
+ if ((0, import_types.isFunction)(param)) {
483
+ return param(
484
+ element,
485
+ state || element.state,
486
+ context || element.context
487
+ );
488
+ }
489
+ return param;
490
+ };
491
+ var map = (obj, extention, element) => {
492
+ for (const e in extention) {
493
+ obj[e] = exec(extention[e], element);
494
+ }
495
+ };
496
+ var merge5 = (element, obj, excludeFrom = []) => {
497
+ for (const e in obj) {
498
+ const hasOwnProperty = Object.prototype.hasOwnProperty.call(obj, e);
499
+ if (!hasOwnProperty || excludeFrom.includes(e) || e.startsWith("__"))
500
+ continue;
501
+ const elementProp = element[e];
502
+ const objProp = obj[e];
503
+ if (elementProp === void 0) {
504
+ element[e] = objProp;
505
+ }
506
+ }
507
+ return element;
508
+ };
509
+ var deepMerge3 = (element, extend, excludeFrom = []) => {
510
+ for (const e in extend) {
511
+ const hasOwnProperty = Object.prototype.hasOwnProperty.call(extend, e);
512
+ if (!hasOwnProperty || excludeFrom.includes(e) || e.startsWith("__"))
513
+ continue;
514
+ const elementProp = element[e];
515
+ const extendProp = extend[e];
516
+ if ((0, import_types.isObjectLike)(elementProp) && (0, import_types.isObjectLike)(extendProp)) {
517
+ deepMerge3(elementProp, extendProp);
518
+ } else if (elementProp === void 0) {
519
+ element[e] = extendProp;
520
+ }
521
+ }
522
+ return element;
523
+ };
524
+ var clone = (obj, excludeFrom = []) => {
525
+ const o = {};
526
+ for (const prop in obj) {
527
+ const hasOwnProperty = Object.prototype.hasOwnProperty.call(obj, prop);
528
+ if (!hasOwnProperty || excludeFrom.includes(prop) || prop.startsWith("__"))
529
+ continue;
530
+ o[prop] = obj[prop];
531
+ }
532
+ return o;
533
+ };
534
+ var deepCloneExclude = (obj, excludeFrom = []) => {
535
+ if ((0, import_types.isArray)(obj)) {
536
+ return obj.map((x) => deepCloneExclude(x, excludeFrom));
537
+ }
538
+ const o = {};
539
+ for (const k in obj) {
540
+ const hasOwnProperty = Object.prototype.hasOwnProperty.call(obj, k);
541
+ if (!hasOwnProperty || excludeFrom.includes(k) || k.startsWith("__"))
542
+ continue;
543
+ let v = obj[k];
544
+ if (k === "extend" && (0, import_types.isArray)(v)) {
545
+ v = mergeArrayExclude(v, excludeFrom);
546
+ }
547
+ if ((0, import_types.isArray)(v)) {
548
+ o[k] = v.map((x) => deepCloneExclude(x, excludeFrom));
549
+ } else if ((0, import_types.isObject)(v)) {
550
+ o[k] = deepCloneExclude(v, excludeFrom);
551
+ } else
552
+ o[k] = v;
553
+ }
554
+ return o;
555
+ };
556
+ var mergeArrayExclude = (arr, excl = []) => {
557
+ return arr.reduce((acc, curr) => deepMerge3(acc, deepCloneExclude(curr, excl)), {});
558
+ };
559
+ var deepClone2 = (obj, excludeFrom = []) => {
560
+ const o = (0, import_types.isArray)(obj) ? [] : {};
561
+ for (const prop in obj) {
562
+ if (prop === "__proto__")
563
+ continue;
564
+ if (excludeFrom.includes(prop) || prop.startsWith("__"))
565
+ continue;
566
+ let objProp = obj[prop];
567
+ if (prop === "extend" && (0, import_types.isArray)(objProp)) {
568
+ objProp = (0, import_array.mergeArray)(objProp);
569
+ }
570
+ if ((0, import_types.isObjectLike)(objProp)) {
571
+ o[prop] = deepClone2(objProp, excludeFrom);
572
+ } else
573
+ o[prop] = objProp;
574
+ }
575
+ return o;
576
+ };
577
+ var deepStringify = (obj, stringified = {}) => {
578
+ for (const prop in obj) {
579
+ const objProp = obj[prop];
580
+ if ((0, import_types.isFunction)(objProp)) {
581
+ stringified[prop] = objProp.toString();
582
+ } else if ((0, import_types.isObject)(objProp)) {
583
+ stringified[prop] = {};
584
+ deepStringify(objProp, stringified[prop]);
585
+ } else if ((0, import_types.isArray)(objProp)) {
586
+ stringified[prop] = [];
587
+ objProp.forEach((v, i) => {
588
+ if ((0, import_types.isObject)(v)) {
589
+ stringified[prop][i] = {};
590
+ deepStringify(v, stringified[prop][i]);
591
+ } else if ((0, import_types.isFunction)(v)) {
592
+ stringified[prop][i] = v.toString();
593
+ } else {
594
+ stringified[prop][i] = v;
595
+ }
596
+ });
597
+ } else {
598
+ stringified[prop] = objProp;
599
+ }
600
+ }
601
+ return stringified;
602
+ };
603
+ var objectToString = (obj, indent = 0) => {
604
+ const spaces = " ".repeat(indent);
605
+ let str = "{\n";
606
+ for (const [key, value] of Object.entries(obj)) {
607
+ const keyAllowdChars = (0, import_string.stringIncludesAny)(key, ["-", ":", "@", ".", "!"]);
608
+ const stringedKey = keyAllowdChars ? `'${key}'` : key;
609
+ str += `${spaces} ${stringedKey}: `;
610
+ if ((0, import_types.isArray)(value)) {
611
+ str += "[\n";
612
+ for (const element of value) {
613
+ if ((0, import_types.isObject)(element) && element !== null) {
614
+ str += `${spaces} ${objectToString(element, indent + 2)},
615
+ `;
616
+ } else if ((0, import_types.isString)(element)) {
617
+ str += `${spaces} '${element}',
618
+ `;
619
+ } else {
620
+ str += `${spaces} ${element},
621
+ `;
622
+ }
623
+ }
624
+ str += `${spaces} ]`;
625
+ } else if ((0, import_types.isObject)(value)) {
626
+ str += objectToString(value, indent + 1);
627
+ } else if ((0, import_types.isString)(value)) {
628
+ str += (0, import_string.stringIncludesAny)(value, ["\n", "'"]) ? `\`${value}\`` : `'${value}'`;
629
+ } else {
630
+ str += value;
631
+ }
632
+ str += ",\n";
633
+ }
634
+ str += `${spaces}}`;
635
+ return str;
636
+ };
637
+ var detachFunctionsFromObject = (obj, detached = {}) => {
638
+ for (const prop in obj) {
639
+ const objProp = obj[prop];
640
+ if ((0, import_types.isFunction)(objProp))
641
+ continue;
642
+ else if ((0, import_types.isObject)(objProp)) {
643
+ detached[prop] = {};
644
+ deepStringify(objProp, detached[prop]);
645
+ } else if ((0, import_types.isArray)(objProp)) {
646
+ detached[prop] = [];
647
+ objProp.forEach((v, i) => {
648
+ if ((0, import_types.isFunction)(v))
649
+ return;
650
+ if ((0, import_types.isObject)(v)) {
651
+ detached[prop][i] = {};
652
+ detachFunctionsFromObject(v, detached[prop][i]);
653
+ } else {
654
+ detached[prop][i] = v;
655
+ }
656
+ });
657
+ } else {
658
+ detached[prop] = objProp;
659
+ }
660
+ }
661
+ return detached;
662
+ };
663
+ var deepDestringify = (obj, stringified = {}) => {
664
+ for (const prop in obj) {
665
+ const hasOwnProperty = Object.prototype.hasOwnProperty.call(obj, prop);
666
+ if (!hasOwnProperty)
667
+ continue;
668
+ const objProp = obj[prop];
669
+ if ((0, import_types.isString)(objProp)) {
670
+ if (objProp.includes("=>") || objProp.includes("function") || objProp.startsWith("(")) {
671
+ try {
672
+ const evalProp = import_globals3.window.eval(`(${objProp})`);
673
+ stringified[prop] = evalProp;
674
+ } catch (e) {
675
+ if (e)
676
+ stringified[prop] = objProp;
677
+ }
678
+ } else {
679
+ stringified[prop] = objProp;
680
+ }
681
+ } else if ((0, import_types.isArray)(objProp)) {
682
+ stringified[prop] = [];
683
+ objProp.forEach((arrProp) => {
684
+ if ((0, import_types.isString)(arrProp)) {
685
+ if (arrProp.includes("=>") || arrProp.includes("function") || arrProp.startsWith("(")) {
686
+ try {
687
+ const evalProp = import_globals3.window.eval(`(${arrProp})`);
688
+ stringified[prop].push(evalProp);
689
+ } catch (e) {
690
+ if (e)
691
+ stringified[prop].push(arrProp);
692
+ }
693
+ } else {
694
+ stringified[prop].push(arrProp);
695
+ }
696
+ } else if ((0, import_types.isObject)(arrProp)) {
697
+ stringified[prop].push(deepDestringify(arrProp));
698
+ } else {
699
+ stringified[prop].push(arrProp);
700
+ }
701
+ });
702
+ } else if ((0, import_types.isObject)(objProp)) {
703
+ stringified[prop] = deepDestringify(objProp, stringified[prop]);
704
+ } else {
705
+ stringified[prop] = objProp;
706
+ }
707
+ }
708
+ return stringified;
709
+ };
710
+ var stringToObject = (str) => {
711
+ let obj;
712
+ try {
713
+ obj = import_globals3.window.eval("(" + str + ")");
714
+ } catch (e) {
715
+ console.warn(e);
716
+ }
717
+ if (obj)
718
+ return obj;
719
+ };
720
+ var diffObjects = (original, objToDiff, cache) => {
721
+ for (const e in objToDiff) {
722
+ if (e === "ref")
723
+ continue;
724
+ const originalProp = original[e];
725
+ const objToDiffProp = objToDiff[e];
726
+ if ((0, import_types.isObject)(originalProp) && (0, import_types.isObject)(objToDiffProp)) {
727
+ cache[e] = {};
728
+ diff(originalProp, objToDiffProp, cache[e]);
729
+ } else if (objToDiffProp !== void 0) {
730
+ cache[e] = objToDiffProp;
731
+ }
732
+ }
733
+ return cache;
734
+ };
735
+ var diffArrays = (original, objToDiff, cache) => {
736
+ if (original.length !== objToDiff.length) {
737
+ cache = objToDiff;
738
+ } else {
739
+ const diffArr = [];
740
+ for (let i = 0; i < original.length; i++) {
741
+ const diffObj = diff(original[i], objToDiff[i]);
742
+ if (Object.keys(diffObj).length > 0) {
743
+ diffArr.push(diffObj);
744
+ }
745
+ }
746
+ if (diffArr.length > 0) {
747
+ cache = diffArr;
748
+ }
749
+ }
750
+ return cache;
751
+ };
752
+ var diff = (original, objToDiff, cache = {}) => {
753
+ if ((0, import_types.isArray)(original) && (0, import_types.isArray)(objToDiff)) {
754
+ cache = [];
755
+ diffArrays(original, objToDiff, cache);
756
+ } else {
757
+ diffObjects(original, objToDiff, cache);
758
+ }
759
+ return cache;
760
+ };
761
+ var overwrite = (element, params, excludeFrom = []) => {
762
+ const { ref } = element;
763
+ const changes = {};
764
+ for (const e in params) {
765
+ if (excludeFrom.includes(e) || e.startsWith("__"))
766
+ continue;
767
+ const elementProp = element[e];
768
+ const paramsProp = params[e];
769
+ if (paramsProp) {
770
+ ref.__cache[e] = changes[e] = elementProp;
771
+ ref[e] = paramsProp;
772
+ }
773
+ }
774
+ return changes;
775
+ };
776
+ var overwriteShallow = (obj, params, excludeFrom = []) => {
777
+ for (const e in params) {
778
+ if (excludeFrom.includes(e) || e.startsWith("__"))
779
+ continue;
780
+ obj[e] = params[e];
781
+ }
782
+ return obj;
783
+ };
784
+ var overwriteDeep2 = (obj, params, excludeFrom = []) => {
785
+ for (const e in params) {
786
+ if (e === "__proto__")
787
+ continue;
788
+ if (excludeFrom.includes(e) || e.startsWith("__"))
789
+ continue;
790
+ const objProp = obj[e];
791
+ const paramsProp = params[e];
792
+ if ((0, import_types.isObjectLike)(objProp) && (0, import_types.isObjectLike)(paramsProp)) {
793
+ overwriteDeep2(objProp, paramsProp);
794
+ } else if (paramsProp !== void 0) {
795
+ obj[e] = paramsProp;
796
+ }
797
+ }
798
+ return obj;
799
+ };
800
+ var mergeIfExisted = (a, b) => {
801
+ if ((0, import_types.isObjectLike)(a) && (0, import_types.isObjectLike)(b))
802
+ return deepMerge3(a, b);
803
+ return a || b;
804
+ };
805
+ var flattenRecursive = (param, prop, stack = []) => {
806
+ const objectized = (0, import_array.mergeAndCloneIfArray)(param);
807
+ stack.push(objectized);
808
+ const extendOfExtend = objectized[prop];
809
+ if (extendOfExtend)
810
+ flattenRecursive(extendOfExtend, prop, stack);
811
+ delete objectized[prop];
812
+ return stack;
813
+ };
814
+ var isEqualDeep = (param, element) => {
815
+ if (param === element)
816
+ return true;
817
+ if (!param || !element)
818
+ return false;
819
+ for (const prop in param) {
820
+ const paramProp = param[prop];
821
+ const elementProp = element[prop];
822
+ if ((0, import_types.isObjectLike)(paramProp)) {
823
+ const isEqual = isEqualDeep(paramProp, elementProp);
824
+ if (!isEqual)
825
+ return false;
826
+ } else {
827
+ const isEqual = paramProp === elementProp;
828
+ if (!isEqual)
829
+ return false;
830
+ }
831
+ }
832
+ return true;
833
+ };
834
+ var removeFromObject = (obj, props) => {
835
+ if (props === void 0 || props === null)
836
+ return obj;
837
+ if ((0, import_types.is)(props)("string", "number")) {
838
+ delete obj[props];
839
+ } else if ((0, import_types.isArray)(props)) {
840
+ props.forEach((prop) => delete obj[prop]);
841
+ } else {
842
+ throw new Error("Invalid input: props must be a string or an array of strings");
843
+ }
844
+ return obj;
845
+ };
846
+ }
847
+ });
848
+
849
+ // ../../node_modules/@domql/utils/dist/cjs/function.js
850
+ var require_function = __commonJS({
851
+ "../../node_modules/@domql/utils/dist/cjs/function.js"(exports, module2) {
852
+ "use strict";
853
+ var __defProp2 = Object.defineProperty;
854
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
855
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
856
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
857
+ var __export2 = (target, all) => {
858
+ for (var name in all)
859
+ __defProp2(target, name, { get: all[name], enumerable: true });
860
+ };
861
+ var __copyProps2 = (to, from, except, desc) => {
862
+ if (from && typeof from === "object" || typeof from === "function") {
863
+ for (let key of __getOwnPropNames2(from))
864
+ if (!__hasOwnProp2.call(to, key) && key !== except)
865
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
866
+ }
867
+ return to;
868
+ };
869
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
870
+ var function_exports = {};
871
+ __export2(function_exports, {
872
+ debounce: () => debounce,
873
+ memoize: () => memoize
874
+ });
875
+ module2.exports = __toCommonJS2(function_exports);
876
+ var debounce = (element, func, timeout = 300) => {
877
+ let timer;
878
+ return (...args) => {
879
+ clearTimeout(timer);
880
+ timer = setTimeout(() => {
881
+ func.apply(element, args);
882
+ }, timeout);
883
+ };
884
+ };
885
+ var memoize = (fn) => {
886
+ const cache = {};
887
+ return (...args) => {
888
+ const n = args[0];
889
+ if (n in cache) {
890
+ return cache[n];
891
+ } else {
892
+ const result = fn(n);
893
+ cache[n] = result;
894
+ return result;
895
+ }
896
+ };
897
+ };
898
+ }
899
+ });
900
+
901
+ // ../../node_modules/@domql/utils/dist/cjs/log.js
902
+ var require_log = __commonJS({
903
+ "../../node_modules/@domql/utils/dist/cjs/log.js"(exports, module2) {
904
+ "use strict";
905
+ var __defProp2 = Object.defineProperty;
906
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
907
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
908
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
909
+ var __export2 = (target, all) => {
910
+ for (var name in all)
911
+ __defProp2(target, name, { get: all[name], enumerable: true });
912
+ };
913
+ var __copyProps2 = (to, from, except, desc) => {
914
+ if (from && typeof from === "object" || typeof from === "function") {
915
+ for (let key of __getOwnPropNames2(from))
916
+ if (!__hasOwnProp2.call(to, key) && key !== except)
917
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
918
+ }
919
+ return to;
920
+ };
921
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
922
+ var log_exports = {};
923
+ __export2(log_exports, {
924
+ logGroupIf: () => logGroupIf,
925
+ logIf: () => logIf
926
+ });
927
+ module2.exports = __toCommonJS2(log_exports);
928
+ var logIf = (bool, ...arg) => {
929
+ if (bool)
930
+ arg.map((v) => console.log(v));
931
+ };
932
+ var logGroupIf = (bool, key, ...arg) => {
933
+ if (bool) {
934
+ console.group(key);
935
+ arg.map((v) => console.log(v));
936
+ console.groupEnd(key);
937
+ }
938
+ };
939
+ }
940
+ });
941
+
942
+ // ../../node_modules/@domql/utils/dist/cjs/cookie.js
943
+ var require_cookie = __commonJS({
944
+ "../../node_modules/@domql/utils/dist/cjs/cookie.js"(exports, module2) {
945
+ "use strict";
946
+ var __defProp2 = Object.defineProperty;
947
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
948
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
949
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
950
+ var __export2 = (target, all) => {
951
+ for (var name in all)
952
+ __defProp2(target, name, { get: all[name], enumerable: true });
953
+ };
954
+ var __copyProps2 = (to, from, except, desc) => {
955
+ if (from && typeof from === "object" || typeof from === "function") {
956
+ for (let key of __getOwnPropNames2(from))
957
+ if (!__hasOwnProp2.call(to, key) && key !== except)
958
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
959
+ }
960
+ return to;
961
+ };
962
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
963
+ var cookie_exports = {};
964
+ __export2(cookie_exports, {
965
+ getCookie: () => getCookie,
966
+ isMobile: () => isMobile,
967
+ setCookie: () => setCookie
968
+ });
969
+ module2.exports = __toCommonJS2(cookie_exports);
970
+ var import_types = require_types();
971
+ var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
972
+ var setCookie = (cname, cvalue, exdays = 365) => {
973
+ if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
974
+ return;
975
+ const d = /* @__PURE__ */ new Date();
976
+ d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
977
+ const expires = `expires=${d.toUTCString()}`;
978
+ document.cookie = `${cname}=${cvalue};${expires};path=/`;
979
+ };
980
+ var getCookie = (cname) => {
981
+ if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
982
+ return;
983
+ const name = `${cname}=`;
984
+ const decodedCookie = decodeURIComponent(document.cookie);
985
+ const ca = decodedCookie.split(";");
986
+ for (let i = 0; i < ca.length; i++) {
987
+ let c = ca[i];
988
+ while (c.charAt(0) === " ")
989
+ c = c.substring(1);
990
+ if (c.indexOf(name) === 0)
991
+ return c.substring(name.length, c.length);
992
+ }
993
+ return "";
994
+ };
995
+ }
996
+ });
997
+
998
+ // ../../node_modules/@domql/utils/dist/cjs/tags.js
999
+ var require_tags = __commonJS({
1000
+ "../../node_modules/@domql/utils/dist/cjs/tags.js"(exports, module2) {
1001
+ "use strict";
1002
+ var __defProp2 = Object.defineProperty;
1003
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
1004
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
1005
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
1006
+ var __export2 = (target, all) => {
1007
+ for (var name in all)
1008
+ __defProp2(target, name, { get: all[name], enumerable: true });
1009
+ };
1010
+ var __copyProps2 = (to, from, except, desc) => {
1011
+ if (from && typeof from === "object" || typeof from === "function") {
1012
+ for (let key of __getOwnPropNames2(from))
1013
+ if (!__hasOwnProp2.call(to, key) && key !== except)
1014
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
1015
+ }
1016
+ return to;
1017
+ };
1018
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
1019
+ var tags_exports = {};
1020
+ __export2(tags_exports, {
1021
+ HTML_TAGS: () => HTML_TAGS,
1022
+ isValidHtmlTag: () => isValidHtmlTag
1023
+ });
1024
+ module2.exports = __toCommonJS2(tags_exports);
1025
+ var HTML_TAGS = {
1026
+ root: [
1027
+ "body",
1028
+ "html"
1029
+ ],
1030
+ head: [
1031
+ "title",
1032
+ "base",
1033
+ "meta",
1034
+ "style"
1035
+ ],
1036
+ body: [
1037
+ "string",
1038
+ "fragment",
1039
+ "a",
1040
+ "abbr",
1041
+ "acronym",
1042
+ "address",
1043
+ "applet",
1044
+ "area",
1045
+ "article",
1046
+ "aside",
1047
+ "audio",
1048
+ "b",
1049
+ "basefont",
1050
+ "bdi",
1051
+ "bdo",
1052
+ "big",
1053
+ "blockquote",
1054
+ "br",
1055
+ "button",
1056
+ "canvas",
1057
+ "caption",
1058
+ "center",
1059
+ "cite",
1060
+ "code",
1061
+ "col",
1062
+ "colgroup",
1063
+ "data",
1064
+ "datalist",
1065
+ "dd",
1066
+ "del",
1067
+ "details",
1068
+ "dfn",
1069
+ "dialog",
1070
+ "dir",
1071
+ "div",
1072
+ "dl",
1073
+ "dt",
1074
+ "em",
1075
+ "embed",
1076
+ "fieldset",
1077
+ "figcaption",
1078
+ "figure",
1079
+ "font",
1080
+ "footer",
1081
+ "form",
1082
+ "frame",
1083
+ "frameset",
1084
+ "h1",
1085
+ "h2",
1086
+ "h3",
1087
+ "h4",
1088
+ "h5",
1089
+ "h6",
1090
+ "head",
1091
+ "header",
1092
+ "hr",
1093
+ "i",
1094
+ "iframe",
1095
+ "img",
1096
+ "input",
1097
+ "ins",
1098
+ "kbd",
1099
+ "label",
1100
+ "legend",
1101
+ "li",
1102
+ "link",
1103
+ "main",
1104
+ "map",
1105
+ "mark",
1106
+ "meter",
1107
+ "nav",
1108
+ "noframes",
1109
+ "noscript",
1110
+ "object",
1111
+ "ol",
1112
+ "optgroup",
1113
+ "option",
1114
+ "output",
1115
+ "p",
1116
+ "param",
1117
+ "picture",
1118
+ "pre",
1119
+ "progress",
1120
+ "q",
1121
+ "rp",
1122
+ "rt",
1123
+ "ruby",
1124
+ "s",
1125
+ "samp",
1126
+ "script",
1127
+ "section",
1128
+ "select",
1129
+ "small",
1130
+ "source",
1131
+ "span",
1132
+ "strike",
1133
+ "strong",
1134
+ "sub",
1135
+ "summary",
1136
+ "sup",
1137
+ "table",
1138
+ "tbody",
1139
+ "td",
1140
+ "template",
1141
+ "textarea",
1142
+ "tfoot",
1143
+ "th",
1144
+ "thead",
1145
+ "time",
1146
+ "tr",
1147
+ "track",
1148
+ "tt",
1149
+ "u",
1150
+ "ul",
1151
+ "var",
1152
+ "video",
1153
+ "wbr",
1154
+ // SVG
1155
+ "svg",
1156
+ "path"
1157
+ ]
1158
+ };
1159
+ var isValidHtmlTag = (arg) => HTML_TAGS.body.includes(arg);
1160
+ }
1161
+ });
1162
+
1163
+ // ../../node_modules/@domql/utils/dist/cjs/index.js
1164
+ var require_cjs = __commonJS({
1165
+ "../../node_modules/@domql/utils/dist/cjs/index.js"(exports, module2) {
1166
+ "use strict";
1167
+ var __defProp2 = Object.defineProperty;
1168
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
1169
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
1170
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
1171
+ var __copyProps2 = (to, from, except, desc) => {
1172
+ if (from && typeof from === "object" || typeof from === "function") {
1173
+ for (let key of __getOwnPropNames2(from))
1174
+ if (!__hasOwnProp2.call(to, key) && key !== except)
1175
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
1176
+ }
1177
+ return to;
1178
+ };
1179
+ var __reExport = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default"));
1180
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
1181
+ var utils_exports = {};
1182
+ module2.exports = __toCommonJS2(utils_exports);
1183
+ __reExport(utils_exports, require_key(), module2.exports);
1184
+ __reExport(utils_exports, require_env(), module2.exports);
1185
+ __reExport(utils_exports, require_types(), module2.exports);
1186
+ __reExport(utils_exports, require_object(), module2.exports);
1187
+ __reExport(utils_exports, require_function(), module2.exports);
1188
+ __reExport(utils_exports, require_array(), module2.exports);
1189
+ __reExport(utils_exports, require_node(), module2.exports);
1190
+ __reExport(utils_exports, require_log(), module2.exports);
1191
+ __reExport(utils_exports, require_string(), module2.exports);
1192
+ __reExport(utils_exports, require_globals(), module2.exports);
1193
+ __reExport(utils_exports, require_cookie(), module2.exports);
1194
+ __reExport(utils_exports, require_tags(), module2.exports);
1195
+ }
1196
+ });
1197
+
1198
+ // ../../node_modules/@domql/globals/dist/cjs/index.js
1199
+ var require_cjs2 = __commonJS({
1200
+ "../../node_modules/@domql/globals/dist/cjs/index.js"(exports, module2) {
1201
+ "use strict";
1202
+ var __defProp2 = Object.defineProperty;
1203
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
1204
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
1205
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
1206
+ var __export2 = (target, all) => {
1207
+ for (var name in all)
1208
+ __defProp2(target, name, { get: all[name], enumerable: true });
1209
+ };
1210
+ var __copyProps2 = (to, from, except, desc) => {
1211
+ if (from && typeof from === "object" || typeof from === "function") {
1212
+ for (let key of __getOwnPropNames2(from))
1213
+ if (!__hasOwnProp2.call(to, key) && key !== except)
1214
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
1215
+ }
1216
+ return to;
1217
+ };
1218
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
1219
+ var globals_exports = {};
1220
+ __export2(globals_exports, {
1221
+ document: () => document4,
1222
+ global: () => global,
1223
+ self: () => self,
1224
+ window: () => window2
1225
+ });
1226
+ module2.exports = __toCommonJS2(globals_exports);
1227
+ var global = globalThis;
1228
+ var self = globalThis;
1229
+ var window2 = globalThis;
1230
+ var document4 = window2.document;
1231
+ }
1232
+ });
1233
+
1234
+ // src/system/reset.js
1235
+ var reset_exports = {};
1236
+ __export(reset_exports, {
1237
+ applyReset: () => applyReset
1238
+ });
1239
+ module.exports = __toCommonJS(reset_exports);
1240
+ var import_utils25 = __toESM(require_cjs(), 1);
1241
+
1242
+ // src/factory.js
1243
+ var import_utils = __toESM(require_cjs(), 1);
1244
+
1245
+ // src/defaultConfig/index.js
1246
+ var defaultConfig_exports = {};
1247
+ __export(defaultConfig_exports, {
1248
+ ANIMATION: () => ANIMATION,
1249
+ BREAKPOINTS: () => BREAKPOINTS,
1250
+ CASES: () => CASES,
1251
+ COLOR: () => COLOR,
1252
+ DEVICES: () => DEVICES,
1253
+ DOCUMENT: () => DOCUMENT,
1254
+ FONT: () => FONT,
1255
+ FONT_FACE: () => FONT_FACE,
1256
+ FONT_FAMILY: () => FONT_FAMILY,
1257
+ FONT_FAMILY_TYPES: () => FONT_FAMILY_TYPES,
1258
+ GRADIENT: () => GRADIENT,
1259
+ ICONS: () => ICONS,
1260
+ MEDIA: () => MEDIA,
1261
+ RESET: () => RESET,
1262
+ SEQUENCE: () => SEQUENCE,
1263
+ SPACING: () => SPACING,
1264
+ SVG: () => SVG,
1265
+ SVG_DATA: () => SVG_DATA,
1266
+ TEMPLATES: () => TEMPLATES,
1267
+ THEME: () => THEME,
1268
+ TIMING: () => TIMING,
1269
+ TYPOGRAPHY: () => TYPOGRAPHY,
1270
+ UNIT: () => UNIT
1271
+ });
1272
+
1273
+ // src/defaultConfig/sequence.js
1274
+ var SEQUENCE = {
1275
+ "minor-second": 1.067,
1276
+ "major-second": 1.125,
1277
+ "minor-third": 1.2,
1278
+ "major-third": 1.25,
1279
+ "perfect-fourth": 1.333,
1280
+ "augmented-fourth": 1.414,
1281
+ "perfect-fifth": 1.5,
1282
+ "minor-sixth": 1.6,
1283
+ phi: 1.618,
1284
+ // golden-ratio
1285
+ "major-sixth": 1.667,
1286
+ "square-root-3": 1.732,
1287
+ // theodorus
1288
+ "minor-seventh": 1.778,
1289
+ "major-seventh": 1.875,
1290
+ octave: 2,
1291
+ "square-root-5": 2.23,
1292
+ // pythagoras
1293
+ "major-tenth": 2.5,
1294
+ "major-eleventh": 2.667,
1295
+ "major-twelfth": 3,
1296
+ pi: 3.14,
1297
+ // archimedes
1298
+ "double-octave": 4
1299
+ };
1300
+
1301
+ // src/defaultConfig/unit.js
1302
+ var UNIT = {
1303
+ default: "em"
1304
+ };
1305
+
1306
+ // src/defaultConfig/typography.js
1307
+ var defaultProps = {
1308
+ browserDefault: 16,
1309
+ base: 16,
1310
+ type: "font-size",
1311
+ ratio: SEQUENCE["minor-third"],
1312
+ range: [-3, 12],
1313
+ h1Matches: 6,
1314
+ lineHeight: 1.5,
1315
+ subSequence: true,
1316
+ unit: "em",
1317
+ templates: {},
1318
+ sequence: {},
1319
+ scales: {},
1320
+ vars: {}
1321
+ };
1322
+ var TYPOGRAPHY = defaultProps;
1323
+
1324
+ // src/defaultConfig/font.js
1325
+ var FONT = {};
1326
+
1327
+ // src/defaultConfig/font-family.js
1328
+ var FONT_FAMILY = {};
1329
+ var FONT_FAMILY_TYPES = {
1330
+ "sans-serif": "Helvetica, Arial, sans-serif, --system-default",
1331
+ serif: "Times New Roman, Georgia, serif, --system-default",
1332
+ monospace: "Courier New, monospace, --system-default"
1333
+ };
1334
+ var FONT_FACE = {};
1335
+
1336
+ // src/defaultConfig/media.js
1337
+ var MEDIA = {
1338
+ tv: "(min-width: 2780px)",
1339
+ screenL: "(max-width: 1920px)",
1340
+ "screenL<": "(min-width: 1920px)",
1341
+ screenM: "(max-width: 1680px)",
1342
+ "screenM<": "(min-width: 1680px)",
1343
+ screenS: "(max-width: 1440px)",
1344
+ "screenS<": "(min-width: 1440px)",
1345
+ tabletL: "(max-width: 1366px)",
1346
+ "tabletL<": "(min-width: 1366px)",
1347
+ tabletM: "(max-width: 1280px)",
1348
+ "tabletM<": "(min-width: 1280px)",
1349
+ tabletS: "(max-width: 1024px)",
1350
+ "tabletS<": "(min-width: 1024px)",
1351
+ mobileL: "(max-width: 768px)",
1352
+ "mobileL<": "(min-width: 768px)",
1353
+ mobileM: "(max-width: 560px)",
1354
+ "mobileM<": "(min-width: 560px)",
1355
+ mobileS: "(max-width: 480px)",
1356
+ "mobileS<": "(min-width: 480px)",
1357
+ mobileXS: "(max-width: 375px)",
1358
+ "mobileXS<": "(min-width: 375px)",
1359
+ light: "(prefers-color-scheme: light)",
1360
+ dark: "(prefers-color-scheme: dark)",
1361
+ print: "print"
1362
+ };
1363
+
1364
+ // src/defaultConfig/spacing.js
1365
+ var defaultProps2 = {
1366
+ base: TYPOGRAPHY.base,
1367
+ type: "spacing",
1368
+ ratio: SEQUENCE.phi,
1369
+ range: [-5, 15],
1370
+ subSequence: true,
1371
+ unit: "em",
1372
+ sequence: {},
1373
+ scales: {},
1374
+ vars: {}
1375
+ };
1376
+ var SPACING = defaultProps2;
1377
+
1378
+ // src/defaultConfig/color.js
1379
+ var COLOR = {};
1380
+ var GRADIENT = {};
1381
+
1382
+ // src/defaultConfig/theme.js
1383
+ var THEME = {};
1384
+
1385
+ // src/defaultConfig/icons.js
1386
+ var ICONS = {};
1387
+
1388
+ // src/defaultConfig/timing.js
1389
+ var defaultProps3 = {
1390
+ default: 150,
1391
+ base: 150,
1392
+ type: "timing",
1393
+ ratio: SEQUENCE["perfect-fourth"],
1394
+ range: [-3, 12],
1395
+ unit: "ms",
1396
+ sequence: {},
1397
+ scales: {},
1398
+ vars: {}
1399
+ };
1400
+ var TIMING = defaultProps3;
1401
+
1402
+ // src/defaultConfig/document.js
1403
+ var DOCUMENT = {};
1404
+
1405
+ // src/defaultConfig/responsive.js
1406
+ var BREAKPOINTS = {
1407
+ screenL: 1920,
1408
+ screenM: 1680,
1409
+ screenS: 1440,
1410
+ tabletL: 1366,
1411
+ tabletM: 1280,
1412
+ tabletS: 1024,
1413
+ mobileL: 768,
1414
+ mobileM: 560,
1415
+ mobileS: 480,
1416
+ mobileXS: 375
1417
+ };
1418
+ var DEVICES = {
1419
+ screenL: [1920, 1024],
1420
+ screenM: [1680, 1024],
1421
+ screenS: [1440, 978],
1422
+ tabletL: [1366, 926],
1423
+ tabletM: [1280, 768],
1424
+ tabletS: [1024, 768],
1425
+ mobileL: [768, 375],
1426
+ mobileM: [560, 768],
1427
+ mobileS: [480, 768],
1428
+ mobileXS: [375, 768]
1429
+ };
1430
+
1431
+ // src/defaultConfig/cases.js
1432
+ var CASES = {};
1433
+
1434
+ // src/defaultConfig/animation.js
1435
+ var ANIMATION = {};
1436
+
1437
+ // src/defaultConfig/svg.js
1438
+ var SVG = {};
1439
+ var SVG_DATA = {};
1440
+
1441
+ // src/defaultConfig/templates.js
1442
+ var TEMPLATES = {};
1443
+
1444
+ // src/defaultConfig/index.js
1445
+ var RESET = {};
1446
+
1447
+ // src/factory.js
1448
+ var CSS_VARS = {};
1449
+ var CONFIG = {
1450
+ verbose: false,
1451
+ useVariable: true,
1452
+ useReset: true,
1453
+ CSS_VARS,
1454
+ ...defaultConfig_exports
1455
+ };
1456
+ var cachedConfig = (0, import_utils.deepClone)(CONFIG);
1457
+ var FACTORY = {
1458
+ active: "0",
1459
+ 0: CONFIG
1460
+ };
1461
+ var getActiveConfig = (def) => {
1462
+ return FACTORY[def || FACTORY.active];
1463
+ };
1464
+
1465
+ // src/system/color.js
1466
+ var import_utils9 = __toESM(require_cjs(), 1);
1467
+
1468
+ // src/utils/color.js
1469
+ var import_globals = __toESM(require_cjs2(), 1);
1470
+ var import_utils2 = __toESM(require_cjs(), 1);
1471
+
1472
+ // src/utils/sequence.js
1473
+ var import_utils5 = __toESM(require_cjs(), 1);
1474
+
1475
+ // ../utils/src/index.js
1476
+ var import_utils4 = __toESM(require_cjs());
1477
+
1478
+ // ../utils/src/scaling.js
1479
+ var import_utils3 = __toESM(require_cjs());
1480
+
1481
+ // src/utils/var.js
1482
+ var import_utils7 = __toESM(require_cjs(), 1);
1483
+
1484
+ // src/utils/sprite.js
1485
+ var import_utils8 = __toESM(require_cjs(), 1);
1486
+
1487
+ // src/system/theme.js
1488
+ var import_utils11 = __toESM(require_cjs(), 1);
1489
+ var recursiveTheme = (val) => {
1490
+ const CONFIG2 = getActiveConfig();
1491
+ const obj = {};
1492
+ for (const param in val) {
1493
+ const symb = param.slice(0, 1);
1494
+ if ((0, import_utils11.isObjectLike)(val[param])) {
1495
+ if (symb === "@") {
1496
+ const query = CONFIG2.MEDIA[param.slice(1)];
1497
+ const media = `@media screen and ${query}`;
1498
+ obj[media] = recursiveTheme(val[param]);
1499
+ } else if (symb === ":") {
1500
+ obj[`&${param}`] = recursiveTheme(val[param]);
1501
+ }
1502
+ } else
1503
+ obj[param] = val[param];
1504
+ }
1505
+ return obj;
1506
+ };
1507
+ var findModifierFromArray = (val, modifierArray) => {
1508
+ const currentMod = modifierArray.shift();
1509
+ if (val[currentMod])
1510
+ return findModifierFromArray(val[currentMod], modifierArray);
1511
+ return val;
1512
+ };
1513
+ var findModifier = (val, modifier) => {
1514
+ if ((0, import_utils11.isArray)(modifier))
1515
+ return findModifierFromArray(val, modifier);
1516
+ else if ((0, import_utils11.isString)(modifier) && val[modifier])
1517
+ return val[modifier];
1518
+ else
1519
+ return val;
1520
+ };
1521
+ var getMediaTheme = (val, mod) => {
1522
+ const CONFIG2 = getActiveConfig();
1523
+ if ((0, import_utils11.isString)(val) && val.slice(0, 2) === "--")
1524
+ val = getMediaTheme(val.slice(2));
1525
+ if (!val || !(0, import_utils11.isString)(val)) {
1526
+ if (CONFIG2.verbose)
1527
+ console.warn(val, "- theme is not string");
1528
+ return;
1529
+ }
1530
+ const [name, ...modifier] = (0, import_utils11.isArray)(val) ? val : val.split(" ");
1531
+ let value = CONFIG2.THEME[name];
1532
+ if (value && (modifier || mod)) {
1533
+ value = findModifier(value, modifier.length ? modifier : mod);
1534
+ }
1535
+ const r = recursiveTheme(value);
1536
+ return r;
1537
+ };
1538
+
1539
+ // src/system/font.js
1540
+ var import_utils12 = __toESM(require_cjs(), 1);
1541
+
1542
+ // src/system/typography.js
1543
+ var import_utils15 = __toESM(require_cjs(), 1);
1544
+
1545
+ // src/system/spacing.js
1546
+ var import_utils18 = __toESM(require_cjs(), 1);
1547
+
1548
+ // src/system/document.js
1549
+ var import_utils22 = __toESM(require_cjs(), 1);
1550
+
1551
+ // src/system/svg.js
1552
+ var import_globals2 = __toESM(require_cjs2(), 1);
1553
+
1554
+ // src/system/reset.js
1555
+ var applyReset = (reset = {}) => {
1556
+ const CONFIG2 = getActiveConfig();
1557
+ const { RESET: RESET2, TYPOGRAPHY: TYPOGRAPHY2, DOCUMENT: DOCUMENT2 } = CONFIG2;
1558
+ if (RESET2) {
1559
+ if (RESET2[":root"]) {
1560
+ const configReset = RESET2;
1561
+ const configTemplates = TYPOGRAPHY2.templates;
1562
+ configReset.body = {
1563
+ ...CONFIG2.useDocumentTheme ? getMediaTheme("document", `@${CONFIG2.globalTheme}`) : {},
1564
+ ...configTemplates.body
1565
+ };
1566
+ configReset.h1 = configTemplates.h1;
1567
+ configReset.h2 = configTemplates.h2;
1568
+ configReset.h3 = configTemplates.h3;
1569
+ configReset.h4 = configTemplates.h4;
1570
+ configReset.h5 = configTemplates.h5;
1571
+ configReset.h6 = configTemplates.h6;
1572
+ }
1573
+ const { body, ...templates } = TYPOGRAPHY2.templates;
1574
+ const globalTheme = CONFIG2.useDocumentTheme ? getMediaTheme("document", `@${CONFIG2.globalTheme}`) : {};
1575
+ if (RESET2.html)
1576
+ (0, import_utils25.overwriteDeep)(RESET2.html, globalTheme);
1577
+ return (0, import_utils25.deepMerge)((0, import_utils25.merge)(RESET2, reset), {
1578
+ html: {
1579
+ position: "absolute",
1580
+ // overflow: 'hidden',
1581
+ width: "100%",
1582
+ height: "100%",
1583
+ top: "0",
1584
+ left: "0",
1585
+ margin: "0",
1586
+ WebkitFontSmoothing: "subpixel-antialiased",
1587
+ scrollBehavior: "smooth",
1588
+ ...globalTheme,
1589
+ fontSize: TYPOGRAPHY2.browserDefault + "px",
1590
+ fontFamily: DOCUMENT2.fontFamily,
1591
+ lineHeight: DOCUMENT2.lineHeight
1592
+ },
1593
+ body: {
1594
+ boxSizing: "border-box",
1595
+ height: "100%",
1596
+ margin: 0,
1597
+ fontFamily: DOCUMENT2.fontFamily,
1598
+ fontSize: TYPOGRAPHY2.base / TYPOGRAPHY2.browserDefault + CONFIG2.UNIT.default,
1599
+ ...templates,
1600
+ ...body
1601
+ },
1602
+ // form elements
1603
+ fieldset: {
1604
+ border: 0,
1605
+ padding: 0,
1606
+ margin: 0
1607
+ },
1608
+ "select, input": {
1609
+ fontFamily: DOCUMENT2.fontFamily
1610
+ }
1611
+ });
1612
+ }
1613
+ };