@symbo.ls/scratch 2.10.134 → 2.10.149

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.
package/dist/index.cjs.js CHANGED
@@ -1,25 +1,793 @@
1
1
  "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
2
+ var __create = Object.create;
3
+ var __defProp2 = Object.defineProperty;
4
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
8
+ var __commonJS = (cb, mod) => function __require() {
9
+ return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
+ };
11
+ var __export2 = (target, all) => {
7
12
  for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
13
+ __defProp2(target, name, { get: all[name], enumerable: true });
9
14
  };
10
- var __copyProps = (to, from, except, desc) => {
15
+ var __copyProps2 = (to, from, except, desc) => {
11
16
  if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ for (let key of __getOwnPropNames2(from))
18
+ if (!__hasOwnProp2.call(to, key) && key !== except)
19
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
15
20
  }
16
21
  return to;
17
22
  };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps2(
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 ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
29
+ mod
30
+ ));
31
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
32
+
33
+ // ../../node_modules/@domql/globals/dist/cjs/index.js
34
+ var require_cjs = __commonJS({
35
+ "../../node_modules/@domql/globals/dist/cjs/index.js"(exports2, module2) {
36
+ "use strict";
37
+ var __defProp3 = Object.defineProperty;
38
+ var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
39
+ var __getOwnPropNames3 = Object.getOwnPropertyNames;
40
+ var __hasOwnProp3 = Object.prototype.hasOwnProperty;
41
+ var __export3 = (target, all) => {
42
+ for (var name in all)
43
+ __defProp3(target, name, { get: all[name], enumerable: true });
44
+ };
45
+ var __copyProps3 = (to, from, except, desc) => {
46
+ if (from && typeof from === "object" || typeof from === "function") {
47
+ for (let key of __getOwnPropNames3(from))
48
+ if (!__hasOwnProp3.call(to, key) && key !== except)
49
+ __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
50
+ }
51
+ return to;
52
+ };
53
+ var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
54
+ var globals_exports = {};
55
+ __export3(globals_exports, {
56
+ document: () => document4,
57
+ global: () => global,
58
+ self: () => self,
59
+ window: () => window3
60
+ });
61
+ module2.exports = __toCommonJS3(globals_exports);
62
+ var global = globalThis;
63
+ var self = globalThis;
64
+ var window3 = globalThis;
65
+ var document4 = window3.document;
66
+ }
67
+ });
68
+
69
+ // ../../node_modules/@domql/tags/dist/cjs/htmlTags.js
70
+ var require_htmlTags = __commonJS({
71
+ "../../node_modules/@domql/tags/dist/cjs/htmlTags.js"(exports2, module2) {
72
+ "use strict";
73
+ var __defProp3 = Object.defineProperty;
74
+ var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
75
+ var __getOwnPropNames3 = Object.getOwnPropertyNames;
76
+ var __hasOwnProp3 = Object.prototype.hasOwnProperty;
77
+ var __export3 = (target, all) => {
78
+ for (var name in all)
79
+ __defProp3(target, name, { get: all[name], enumerable: true });
80
+ };
81
+ var __copyProps3 = (to, from, except, desc) => {
82
+ if (from && typeof from === "object" || typeof from === "function") {
83
+ for (let key of __getOwnPropNames3(from))
84
+ if (!__hasOwnProp3.call(to, key) && key !== except)
85
+ __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
86
+ }
87
+ return to;
88
+ };
89
+ var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
90
+ var htmlTags_exports = {};
91
+ __export3(htmlTags_exports, {
92
+ HTML_TAGS: () => HTML_TAGS
93
+ });
94
+ module2.exports = __toCommonJS3(htmlTags_exports);
95
+ var HTML_TAGS = {
96
+ root: [
97
+ "body",
98
+ "html"
99
+ ],
100
+ head: [
101
+ "title",
102
+ "base",
103
+ "meta",
104
+ "style"
105
+ ],
106
+ body: [
107
+ "string",
108
+ "fragment",
109
+ "a",
110
+ "abbr",
111
+ "acronym",
112
+ "address",
113
+ "applet",
114
+ "area",
115
+ "article",
116
+ "aside",
117
+ "audio",
118
+ "b",
119
+ "basefont",
120
+ "bdi",
121
+ "bdo",
122
+ "big",
123
+ "blockquote",
124
+ "br",
125
+ "button",
126
+ "canvas",
127
+ "caption",
128
+ "center",
129
+ "cite",
130
+ "code",
131
+ "col",
132
+ "colgroup",
133
+ "data",
134
+ "datalist",
135
+ "dd",
136
+ "del",
137
+ "details",
138
+ "dfn",
139
+ "dialog",
140
+ "dir",
141
+ "div",
142
+ "dl",
143
+ "dt",
144
+ "em",
145
+ "embed",
146
+ "fieldset",
147
+ "figcaption",
148
+ "figure",
149
+ "font",
150
+ "footer",
151
+ "form",
152
+ "frame",
153
+ "frameset",
154
+ "h1",
155
+ "h2",
156
+ "h3",
157
+ "h4",
158
+ "h5",
159
+ "h6",
160
+ "head",
161
+ "header",
162
+ "hr",
163
+ "i",
164
+ "iframe",
165
+ "img",
166
+ "input",
167
+ "ins",
168
+ "kbd",
169
+ "label",
170
+ "legend",
171
+ "li",
172
+ "link",
173
+ "main",
174
+ "map",
175
+ "mark",
176
+ "meter",
177
+ "nav",
178
+ "noframes",
179
+ "noscript",
180
+ "object",
181
+ "ol",
182
+ "optgroup",
183
+ "option",
184
+ "output",
185
+ "p",
186
+ "param",
187
+ "picture",
188
+ "pre",
189
+ "progress",
190
+ "q",
191
+ "rp",
192
+ "rt",
193
+ "ruby",
194
+ "s",
195
+ "samp",
196
+ "script",
197
+ "section",
198
+ "select",
199
+ "small",
200
+ "source",
201
+ "span",
202
+ "strike",
203
+ "strong",
204
+ "sub",
205
+ "summary",
206
+ "sup",
207
+ "table",
208
+ "tbody",
209
+ "td",
210
+ "template",
211
+ "textarea",
212
+ "tfoot",
213
+ "th",
214
+ "thead",
215
+ "time",
216
+ "tr",
217
+ "track",
218
+ "tt",
219
+ "u",
220
+ "ul",
221
+ "var",
222
+ "video",
223
+ "wbr",
224
+ // SVG
225
+ "svg",
226
+ "path"
227
+ ]
228
+ };
229
+ }
230
+ });
231
+
232
+ // ../../node_modules/@domql/tags/dist/cjs/index.js
233
+ var require_cjs2 = __commonJS({
234
+ "../../node_modules/@domql/tags/dist/cjs/index.js"(exports2, module2) {
235
+ "use strict";
236
+ var __defProp3 = Object.defineProperty;
237
+ var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
238
+ var __getOwnPropNames3 = Object.getOwnPropertyNames;
239
+ var __hasOwnProp3 = Object.prototype.hasOwnProperty;
240
+ var __copyProps3 = (to, from, except, desc) => {
241
+ if (from && typeof from === "object" || typeof from === "function") {
242
+ for (let key of __getOwnPropNames3(from))
243
+ if (!__hasOwnProp3.call(to, key) && key !== except)
244
+ __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
245
+ }
246
+ return to;
247
+ };
248
+ var __reExport = (target, mod, secondTarget) => (__copyProps3(target, mod, "default"), secondTarget && __copyProps3(secondTarget, mod, "default"));
249
+ var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
250
+ var tags_exports = {};
251
+ module2.exports = __toCommonJS3(tags_exports);
252
+ __reExport(tags_exports, require_htmlTags(), module2.exports);
253
+ }
254
+ });
255
+
256
+ // ../../node_modules/@domql/utils/dist/cjs/types.js
257
+ var require_types = __commonJS({
258
+ "../../node_modules/@domql/utils/dist/cjs/types.js"(exports2, module2) {
259
+ "use strict";
260
+ var __defProp3 = Object.defineProperty;
261
+ var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
262
+ var __getOwnPropNames3 = Object.getOwnPropertyNames;
263
+ var __hasOwnProp3 = Object.prototype.hasOwnProperty;
264
+ var __export3 = (target, all) => {
265
+ for (var name in all)
266
+ __defProp3(target, name, { get: all[name], enumerable: true });
267
+ };
268
+ var __copyProps3 = (to, from, except, desc) => {
269
+ if (from && typeof from === "object" || typeof from === "function") {
270
+ for (let key of __getOwnPropNames3(from))
271
+ if (!__hasOwnProp3.call(to, key) && key !== except)
272
+ __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
273
+ }
274
+ return to;
275
+ };
276
+ var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
277
+ var types_exports = {};
278
+ __export3(types_exports, {
279
+ TYPES: () => TYPES,
280
+ is: () => is,
281
+ isArray: () => isArray5,
282
+ isBoolean: () => isBoolean,
283
+ isDefined: () => isDefined2,
284
+ isFunction: () => isFunction2,
285
+ isHtmlElement: () => isHtmlElement,
286
+ isNode: () => isNode,
287
+ isNot: () => isNot,
288
+ isNull: () => isNull,
289
+ isNumber: () => isNumber,
290
+ isObject: () => isObject6,
291
+ isObjectLike: () => isObjectLike4,
292
+ isString: () => isString7,
293
+ isUndefined: () => isUndefined,
294
+ isValidHtmlTag: () => isValidHtmlTag
295
+ });
296
+ module2.exports = __toCommonJS3(types_exports);
297
+ var import_globals3 = require_cjs();
298
+ var import_tags = require_cjs2();
299
+ var isValidHtmlTag = (arg) => import_tags.HTML_TAGS.body.indexOf(arg);
300
+ var isObject6 = (arg) => {
301
+ if (arg === null)
302
+ return false;
303
+ return typeof arg === "object" && arg.constructor === Object;
304
+ };
305
+ var isString7 = (arg) => typeof arg === "string";
306
+ var isNumber = (arg) => typeof arg === "number";
307
+ var isFunction2 = (arg) => typeof arg === "function";
308
+ var isBoolean = (arg) => arg === true || arg === false;
309
+ var isNull = (arg) => arg === null;
310
+ var isArray5 = (arg) => Array.isArray(arg);
311
+ var isObjectLike4 = (arg) => {
312
+ if (arg === null)
313
+ return false;
314
+ return typeof arg === "object";
315
+ };
316
+ var isNode = (obj2) => {
317
+ return typeof import_globals3.window.Node === "object" ? obj2 instanceof import_globals3.window.Node : obj2 && typeof obj2 === "object" && typeof obj2.nodeType === "number" && typeof obj2.nodeName === "string";
318
+ };
319
+ var isHtmlElement = (obj2) => {
320
+ return typeof import_globals3.window.HTMLElement === "object" ? obj2 instanceof import_globals3.window.HTMLElement : obj2 && typeof obj2 === "object" && obj2 !== null && obj2.nodeType === 1 && typeof obj2.nodeName === "string";
321
+ };
322
+ var isDefined2 = (arg) => {
323
+ return isObject6(arg) || isObjectLike4(arg) || isString7(arg) || isNumber(arg) || isFunction2(arg) || isArray5(arg) || isObjectLike4(arg) || isBoolean(arg) || isNull(arg);
324
+ };
325
+ var isUndefined = (arg) => {
326
+ return arg === void 0;
327
+ };
328
+ var TYPES = {
329
+ boolean: isBoolean,
330
+ array: isArray5,
331
+ object: isObject6,
332
+ string: isString7,
333
+ number: isNumber,
334
+ null: isNull,
335
+ function: isFunction2,
336
+ objectLike: isObjectLike4,
337
+ node: isNode,
338
+ htmlElement: isHtmlElement,
339
+ defined: isDefined2
340
+ };
341
+ var is = (arg) => {
342
+ return (...args) => {
343
+ return args.map((val) => TYPES[val](arg)).filter((v) => v).length > 0;
344
+ };
345
+ };
346
+ var isNot = (arg) => {
347
+ return (...args) => {
348
+ return args.map((val) => TYPES[val](arg)).filter((v) => v).length === 0;
349
+ };
350
+ };
351
+ }
352
+ });
353
+
354
+ // ../../node_modules/@domql/utils/dist/cjs/object.js
355
+ var require_object = __commonJS({
356
+ "../../node_modules/@domql/utils/dist/cjs/object.js"(exports, module) {
357
+ "use strict";
358
+ var __defProp = Object.defineProperty;
359
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
360
+ var __getOwnPropNames = Object.getOwnPropertyNames;
361
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
362
+ var __export = (target, all) => {
363
+ for (var name in all)
364
+ __defProp(target, name, { get: all[name], enumerable: true });
365
+ };
366
+ var __copyProps = (to, from, except, desc) => {
367
+ if (from && typeof from === "object" || typeof from === "function") {
368
+ for (let key of __getOwnPropNames(from))
369
+ if (!__hasOwnProp.call(to, key) && key !== except)
370
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
371
+ }
372
+ return to;
373
+ };
374
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
375
+ var object_exports = {};
376
+ __export(object_exports, {
377
+ clone: () => clone,
378
+ deepClone: () => deepClone,
379
+ deepCloneExclude: () => deepCloneExclude,
380
+ deepDestringify: () => deepDestringify,
381
+ deepMerge: () => deepMerge,
382
+ deepStringify: () => deepStringify,
383
+ diff: () => diff,
384
+ exec: () => exec,
385
+ flattenRecursive: () => flattenRecursive,
386
+ isEqualDeep: () => isEqualDeep,
387
+ map: () => map,
388
+ merge: () => merge,
389
+ mergeAndCloneIfArray: () => mergeAndCloneIfArray,
390
+ mergeArray: () => mergeArray,
391
+ mergeArrayExclude: () => mergeArrayExclude,
392
+ mergeIfExisted: () => mergeIfExisted,
393
+ overwrite: () => overwrite,
394
+ overwriteDeep: () => overwriteDeep,
395
+ overwriteObj: () => overwriteObj
396
+ });
397
+ module.exports = __toCommonJS(object_exports);
398
+ var import_types = require_types();
399
+ var exec = (param, element, state) => {
400
+ if ((0, import_types.isFunction)(param))
401
+ return param(element, state || element.state);
402
+ return param;
403
+ };
404
+ var map = (obj2, extention, element) => {
405
+ for (const e in extention) {
406
+ obj2[e] = exec(extention[e], element);
407
+ }
408
+ };
409
+ var merge = (element, obj2) => {
410
+ for (const e in obj2) {
411
+ const elementProp = element[e];
412
+ const objProp2 = obj2[e];
413
+ if (elementProp === void 0) {
414
+ element[e] = objProp2;
415
+ }
416
+ }
417
+ return element;
418
+ };
419
+ var deepMerge = (element, extend) => {
420
+ for (const e in extend) {
421
+ const elementProp = element[e];
422
+ const extendProp = extend[e];
423
+ if (e === "parent" || e === "props")
424
+ continue;
425
+ if (elementProp === void 0) {
426
+ element[e] = extendProp;
427
+ } else if ((0, import_types.isObjectLike)(elementProp) && (0, import_types.isObject)(extendProp)) {
428
+ deepMerge(elementProp, extendProp);
429
+ }
430
+ }
431
+ return element;
432
+ };
433
+ var clone = (obj2) => {
434
+ const o = {};
435
+ for (const prop2 in obj2) {
436
+ if (prop2 === "node")
437
+ continue;
438
+ o[prop2] = obj2[prop2];
439
+ }
440
+ return o;
441
+ };
442
+ var deepCloneExclude = (obj2, exclude = []) => {
443
+ if ((0, import_types.isArray)(obj2)) {
444
+ return obj2.map((x) => deepCloneExclude(x, exclude));
445
+ }
446
+ const o = {};
447
+ for (const k in obj2) {
448
+ if (exclude.indexOf(k) > -1)
449
+ continue;
450
+ let v = obj2[k];
451
+ if (k === "extend" && (0, import_types.isArray)(v)) {
452
+ v = mergeArrayExclude(v, exclude);
453
+ }
454
+ if ((0, import_types.isArray)(v)) {
455
+ o[k] = v.map((x) => deepCloneExclude(x, exclude));
456
+ } else if ((0, import_types.isObject)(v)) {
457
+ o[k] = deepCloneExclude(v, exclude);
458
+ } else
459
+ o[k] = v;
460
+ }
461
+ return o;
462
+ };
463
+ var mergeArrayExclude = (arr, excl = []) => {
464
+ return arr.reduce((acc, curr) => deepMerge(acc, deepCloneExclude(curr, excl)), {});
465
+ };
466
+ var deepClone = (obj2) => {
467
+ if ((0, import_types.isArray)(obj2)) {
468
+ return obj2.map(deepClone);
469
+ }
470
+ const o = {};
471
+ for (const prop2 in obj2) {
472
+ let objProp2 = obj2[prop2];
473
+ if (prop2 === "extend" && (0, import_types.isArray)(objProp2)) {
474
+ objProp2 = mergeArray(objProp2);
475
+ }
476
+ if ((0, import_types.isArray)(objProp2)) {
477
+ o[prop2] = objProp2.map((v) => (0, import_types.isObject)(v) ? deepClone(v) : v);
478
+ } else if ((0, import_types.isObject)(objProp2)) {
479
+ o[prop2] = deepClone(objProp2);
480
+ } else
481
+ o[prop2] = objProp2;
482
+ }
483
+ return o;
484
+ };
485
+ var deepStringify = (obj2, stringified2 = {}) => {
486
+ for (const prop2 in obj2) {
487
+ const objProp2 = obj2[prop2];
488
+ if ((0, import_types.isFunction)(objProp2)) {
489
+ stringified2[prop2] = objProp2.toString();
490
+ } else if ((0, import_types.isObject)(objProp2)) {
491
+ stringified2[prop2] = {};
492
+ deepStringify(objProp2[prop2], stringified2[prop2]);
493
+ } else if ((0, import_types.isArray)(objProp2)) {
494
+ stringified2[prop2] = [];
495
+ objProp2.map((v, i) => deepStringify(v, stringified2[prop2][i]));
496
+ } else
497
+ stringified2[prop2] = objProp2;
498
+ }
499
+ return stringified2;
500
+ };
501
+ var deepDestringify = (obj, stringified = {}) => {
502
+ for (const prop in obj) {
503
+ const objProp = obj[prop];
504
+ if ((0, import_types.isString)(objProp)) {
505
+ if (objProp.includes("=>") || objProp.includes("function") || objProp[0] === "(") {
506
+ try {
507
+ const evalProp = eval(objProp);
508
+ stringified[prop] = evalProp;
509
+ } catch (e) {
510
+ if (e)
511
+ stringified[prop] = objProp;
512
+ }
513
+ }
514
+ } else
515
+ stringified[prop] = objProp;
516
+ if ((0, import_types.isObject)(objProp))
517
+ deepDestringify(stringified[prop], stringified[prop]);
518
+ }
519
+ return stringified;
520
+ };
521
+ var overwrite = (element, params, options) => {
522
+ const { ref } = element;
523
+ const changes = {};
524
+ for (const e in params) {
525
+ if (e === "props")
526
+ continue;
527
+ const elementProp = element[e];
528
+ const paramsProp = params[e];
529
+ if (paramsProp) {
530
+ ref.__cache[e] = changes[e] = elementProp;
531
+ ref[e] = paramsProp;
532
+ }
533
+ }
534
+ return changes;
535
+ };
536
+ var diff = (obj2, original, cache) => {
537
+ const changes = cache || {};
538
+ for (const e in obj2) {
539
+ if (e === "ref")
540
+ continue;
541
+ const originalProp = original[e];
542
+ const objProp2 = obj2[e];
543
+ if ((0, import_types.isObjectLike)(originalProp) && (0, import_types.isObjectLike)(objProp2)) {
544
+ changes[e] = {};
545
+ diff(originalProp, objProp2, changes[e]);
546
+ } else if (objProp2 !== void 0) {
547
+ changes[e] = objProp2;
548
+ }
549
+ }
550
+ return changes;
551
+ };
552
+ var overwriteObj = (params, obj2) => {
553
+ const changes = {};
554
+ for (const e in params) {
555
+ const objProp2 = obj2[e];
556
+ const paramsProp = params[e];
557
+ if (paramsProp) {
558
+ obj2[e] = changes[e] = objProp2;
559
+ }
560
+ }
561
+ return changes;
562
+ };
563
+ var overwriteDeep = (params, obj2) => {
564
+ for (const e in params) {
565
+ const objProp2 = obj2[e];
566
+ const paramsProp = params[e];
567
+ if ((0, import_types.isObjectLike)(objProp2) && (0, import_types.isObjectLike)(paramsProp)) {
568
+ overwriteDeep(objProp2, paramsProp);
569
+ } else if (paramsProp !== void 0) {
570
+ obj2[e] = paramsProp;
571
+ }
572
+ }
573
+ return obj2;
574
+ };
575
+ var mergeIfExisted = (a, b) => {
576
+ if ((0, import_types.isObjectLike)(a) && (0, import_types.isObjectLike)(b))
577
+ return deepMerge(a, b);
578
+ return a || b;
579
+ };
580
+ var mergeArray = (arr) => {
581
+ return arr.reduce((a, c) => deepMerge(a, deepClone(c)), {});
582
+ };
583
+ var mergeAndCloneIfArray = (obj2) => {
584
+ return (0, import_types.isArray)(obj2) ? mergeArray(obj2) : deepClone(obj2);
585
+ };
586
+ var flattenRecursive = (param, prop2, stack = []) => {
587
+ const objectized = mergeAndCloneIfArray(param);
588
+ stack.push(objectized);
589
+ const extendOfExtend = objectized[prop2];
590
+ if (extendOfExtend)
591
+ flattenRecursive(extendOfExtend, prop2, stack);
592
+ delete objectized[prop2];
593
+ return stack;
594
+ };
595
+ var isEqualDeep = (param, element) => {
596
+ if (param === element)
597
+ return true;
598
+ if (!param || !element)
599
+ return false;
600
+ for (const prop2 in param) {
601
+ const paramProp = param[prop2];
602
+ const elementProp = element[prop2];
603
+ if ((0, import_types.isObjectLike)(paramProp)) {
604
+ const isEqual = isEqualDeep(paramProp, elementProp);
605
+ if (!isEqual)
606
+ return false;
607
+ } else {
608
+ const isEqual = paramProp === elementProp;
609
+ if (!isEqual)
610
+ return false;
611
+ }
612
+ }
613
+ return true;
614
+ };
615
+ }
616
+ });
617
+
618
+ // ../../node_modules/@domql/utils/dist/cjs/function.js
619
+ var require_function = __commonJS({
620
+ "../../node_modules/@domql/utils/dist/cjs/function.js"(exports2, module2) {
621
+ "use strict";
622
+ var __defProp3 = Object.defineProperty;
623
+ var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
624
+ var __getOwnPropNames3 = Object.getOwnPropertyNames;
625
+ var __hasOwnProp3 = Object.prototype.hasOwnProperty;
626
+ var __export3 = (target, all) => {
627
+ for (var name in all)
628
+ __defProp3(target, name, { get: all[name], enumerable: true });
629
+ };
630
+ var __copyProps3 = (to, from, except, desc) => {
631
+ if (from && typeof from === "object" || typeof from === "function") {
632
+ for (let key of __getOwnPropNames3(from))
633
+ if (!__hasOwnProp3.call(to, key) && key !== except)
634
+ __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
635
+ }
636
+ return to;
637
+ };
638
+ var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
639
+ var function_exports = {};
640
+ __export3(function_exports, {
641
+ debounce: () => debounce,
642
+ memoize: () => memoize
643
+ });
644
+ module2.exports = __toCommonJS3(function_exports);
645
+ var debounce = (element, func, timeout = 300) => {
646
+ let timer;
647
+ return (...args) => {
648
+ clearTimeout(timer);
649
+ timer = setTimeout(() => {
650
+ func.apply(element, args);
651
+ }, timeout);
652
+ };
653
+ };
654
+ var memoize = (fn) => {
655
+ const cache = {};
656
+ return (...args) => {
657
+ const n = args[0];
658
+ if (n in cache) {
659
+ return cache[n];
660
+ } else {
661
+ const result = fn(n);
662
+ cache[n] = result;
663
+ return result;
664
+ }
665
+ };
666
+ };
667
+ }
668
+ });
669
+
670
+ // ../../node_modules/@domql/utils/dist/cjs/array.js
671
+ var require_array = __commonJS({
672
+ "../../node_modules/@domql/utils/dist/cjs/array.js"() {
673
+ "use strict";
674
+ }
675
+ });
676
+
677
+ // ../../node_modules/@domql/utils/dist/cjs/node.js
678
+ var require_node = __commonJS({
679
+ "../../node_modules/@domql/utils/dist/cjs/node.js"(exports2, module2) {
680
+ "use strict";
681
+ var __defProp3 = Object.defineProperty;
682
+ var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
683
+ var __getOwnPropNames3 = Object.getOwnPropertyNames;
684
+ var __hasOwnProp3 = Object.prototype.hasOwnProperty;
685
+ var __export3 = (target, all) => {
686
+ for (var name in all)
687
+ __defProp3(target, name, { get: all[name], enumerable: true });
688
+ };
689
+ var __copyProps3 = (to, from, except, desc) => {
690
+ if (from && typeof from === "object" || typeof from === "function") {
691
+ for (let key of __getOwnPropNames3(from))
692
+ if (!__hasOwnProp3.call(to, key) && key !== except)
693
+ __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
694
+ }
695
+ return to;
696
+ };
697
+ var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
698
+ var node_exports = {};
699
+ __export3(node_exports, {
700
+ cleanWithNode: () => cleanWithNode,
701
+ createID: () => createID,
702
+ createSnapshotId: () => createSnapshotId
703
+ });
704
+ module2.exports = __toCommonJS3(node_exports);
705
+ var cleanWithNode = (extend) => delete extend.node && extend;
706
+ var createID = function() {
707
+ let index = 0;
708
+ function newId() {
709
+ index++;
710
+ return index;
711
+ }
712
+ return newId;
713
+ }();
714
+ var createSnapshotId = createID;
715
+ }
716
+ });
717
+
718
+ // ../../node_modules/@domql/utils/dist/cjs/log.js
719
+ var require_log = __commonJS({
720
+ "../../node_modules/@domql/utils/dist/cjs/log.js"(exports2, module2) {
721
+ "use strict";
722
+ var __defProp3 = Object.defineProperty;
723
+ var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
724
+ var __getOwnPropNames3 = Object.getOwnPropertyNames;
725
+ var __hasOwnProp3 = Object.prototype.hasOwnProperty;
726
+ var __export3 = (target, all) => {
727
+ for (var name in all)
728
+ __defProp3(target, name, { get: all[name], enumerable: true });
729
+ };
730
+ var __copyProps3 = (to, from, except, desc) => {
731
+ if (from && typeof from === "object" || typeof from === "function") {
732
+ for (let key of __getOwnPropNames3(from))
733
+ if (!__hasOwnProp3.call(to, key) && key !== except)
734
+ __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
735
+ }
736
+ return to;
737
+ };
738
+ var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
739
+ var log_exports = {};
740
+ __export3(log_exports, {
741
+ logGroupIf: () => logGroupIf,
742
+ logIf: () => logIf
743
+ });
744
+ module2.exports = __toCommonJS3(log_exports);
745
+ var logIf = (bool, ...arg) => {
746
+ if (bool)
747
+ arg.map((v) => console.log(v));
748
+ };
749
+ var logGroupIf = (bool, key, ...arg) => {
750
+ if (bool) {
751
+ console.group(key);
752
+ arg.map((v) => console.log(v));
753
+ console.groupEnd(key);
754
+ }
755
+ };
756
+ }
757
+ });
758
+
759
+ // ../../node_modules/@domql/utils/dist/cjs/index.js
760
+ var require_cjs3 = __commonJS({
761
+ "../../node_modules/@domql/utils/dist/cjs/index.js"(exports2, module2) {
762
+ "use strict";
763
+ var __defProp3 = Object.defineProperty;
764
+ var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
765
+ var __getOwnPropNames3 = Object.getOwnPropertyNames;
766
+ var __hasOwnProp3 = Object.prototype.hasOwnProperty;
767
+ var __copyProps3 = (to, from, except, desc) => {
768
+ if (from && typeof from === "object" || typeof from === "function") {
769
+ for (let key of __getOwnPropNames3(from))
770
+ if (!__hasOwnProp3.call(to, key) && key !== except)
771
+ __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
772
+ }
773
+ return to;
774
+ };
775
+ var __reExport = (target, mod, secondTarget) => (__copyProps3(target, mod, "default"), secondTarget && __copyProps3(secondTarget, mod, "default"));
776
+ var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
777
+ var utils_exports = {};
778
+ module2.exports = __toCommonJS3(utils_exports);
779
+ __reExport(utils_exports, require_types(), module2.exports);
780
+ __reExport(utils_exports, require_object(), module2.exports);
781
+ __reExport(utils_exports, require_function(), module2.exports);
782
+ __reExport(utils_exports, require_array(), module2.exports);
783
+ __reExport(utils_exports, require_node(), module2.exports);
784
+ __reExport(utils_exports, require_log(), module2.exports);
785
+ }
786
+ });
19
787
 
20
788
  // src/index.js
21
789
  var src_exports = {};
22
- __export(src_exports, {
790
+ __export2(src_exports, {
23
791
  ANIMATION: () => ANIMATION,
24
792
  BREAKPOINTS: () => BREAKPOINTS,
25
793
  CASES: () => CASES,
@@ -90,11 +858,11 @@ __export(src_exports, {
90
858
  hexToRgbArray: () => hexToRgbArray,
91
859
  hexToRgba: () => hexToRgba,
92
860
  hslToRgb: () => hslToRgb,
93
- isArray: () => isArray2,
94
- isFunction: () => isFunction2,
95
- isObject: () => isObject2,
96
- isObjectLike: () => isObjectLike2,
97
- isString: () => isString2,
861
+ isArray: () => isArray,
862
+ isFunction: () => isFunction,
863
+ isObject: () => isObject,
864
+ isObjectLike: () => isObjectLike,
865
+ isString: () => isString,
98
866
  merge: () => merge2,
99
867
  mixTwoColors: () => mixTwoColors,
100
868
  mixTwoRgb: () => mixTwoRgb,
@@ -122,264 +890,14 @@ __export(src_exports, {
122
890
  setValue: () => setValue,
123
891
  setVariables: () => setVariables
124
892
  });
125
- module.exports = __toCommonJS(src_exports);
893
+ module.exports = __toCommonJS2(src_exports);
126
894
 
127
- // ../../node_modules/@domql/globals/index.js
128
- var window2 = globalThis;
129
- var document2 = window2.document;
130
-
131
- // ../../node_modules/@domql/utils/types.js
132
- var isObject = (arg) => {
133
- if (arg === null)
134
- return false;
135
- return typeof arg === "object" && arg.constructor === Object;
136
- };
137
- var isString = (arg) => typeof arg === "string";
138
- var isNumber = (arg) => typeof arg === "number";
139
- var isFunction = (arg) => typeof arg === "function";
140
- var isBoolean = (arg) => arg === true || arg === false;
141
- var isNull = (arg) => arg === null;
142
- var isArray = (arg) => Array.isArray(arg);
143
- var isObjectLike = (arg) => {
144
- if (arg === null)
145
- return false;
146
- return typeof arg === "object";
147
- };
148
- var isDefined = (arg) => {
149
- return isObject(arg) || isObjectLike(arg) || isString(arg) || isNumber(arg) || isFunction(arg) || isArray(arg) || isObjectLike(arg) || isBoolean(arg) || isNull(arg);
150
- };
151
-
152
- // ../../node_modules/@domql/utils/object.js
153
- var exec = (param, element, state) => {
154
- if (isFunction(param))
155
- return param(element, state || element.state);
156
- return param;
157
- };
158
- var map = (obj2, extention, element) => {
159
- for (const e in extention) {
160
- obj2[e] = exec(extention[e], element);
161
- }
162
- };
163
- var merge = (element, obj2) => {
164
- for (const e in obj2) {
165
- const elementProp = element[e];
166
- const objProp2 = obj2[e];
167
- if (elementProp === void 0) {
168
- element[e] = objProp2;
169
- }
170
- }
171
- return element;
172
- };
173
- var deepMerge = (element, extend) => {
174
- for (const e in extend) {
175
- const elementProp = element[e];
176
- const extendProp = extend[e];
177
- if (e === "parent" || e === "props")
178
- continue;
179
- if (elementProp === void 0) {
180
- element[e] = extendProp;
181
- } else if (isObjectLike(elementProp) && isObject(extendProp)) {
182
- deepMerge(elementProp, extendProp);
183
- }
184
- }
185
- return element;
186
- };
187
- var clone = (obj2) => {
188
- const o = {};
189
- for (const prop2 in obj2) {
190
- if (prop2 === "node")
191
- continue;
192
- o[prop2] = obj2[prop2];
193
- }
194
- return o;
195
- };
196
- var deepCloneExclude = (obj2, exclude = []) => {
197
- if (isArray(obj2)) {
198
- return obj2.map((x) => deepCloneExclude(x, exclude));
199
- }
200
- const o = {};
201
- for (const k in obj2) {
202
- if (exclude.indexOf(k) > -1)
203
- continue;
204
- let v = obj2[k];
205
- if (k === "extend" && isArray(v)) {
206
- v = mergeArrayExclude(v, exclude);
207
- }
208
- if (isArray(v)) {
209
- o[k] = v.map((x) => deepCloneExclude(x, exclude));
210
- } else if (isObject(v)) {
211
- o[k] = deepCloneExclude(v, exclude);
212
- } else
213
- o[k] = v;
214
- }
215
- return o;
216
- };
217
- var mergeArrayExclude = (arr, excl = []) => {
218
- return arr.reduce((acc, curr) => deepMerge(acc, deepCloneExclude(curr, excl)), {});
219
- };
220
- var deepClone = (obj2) => {
221
- if (isArray(obj2)) {
222
- return obj2.map(deepClone);
223
- }
224
- const o = {};
225
- for (const prop2 in obj2) {
226
- let objProp2 = obj2[prop2];
227
- if (prop2 === "extend" && isArray(objProp2)) {
228
- objProp2 = mergeArray(objProp2);
229
- }
230
- if (isArray(objProp2)) {
231
- o[prop2] = objProp2.map((v) => isObject(v) ? deepClone(v) : v);
232
- } else if (isObject(objProp2)) {
233
- o[prop2] = deepClone(objProp2);
234
- } else
235
- o[prop2] = objProp2;
236
- }
237
- return o;
238
- };
239
- var deepStringify = (obj2, stringified2 = {}) => {
240
- for (const prop2 in obj2) {
241
- const objProp2 = obj2[prop2];
242
- if (isFunction(objProp2)) {
243
- stringified2[prop2] = objProp2.toString();
244
- } else if (isObject(objProp2)) {
245
- stringified2[prop2] = {};
246
- deepStringify(objProp2[prop2], stringified2[prop2]);
247
- } else if (isArray(objProp2)) {
248
- stringified2[prop2] = [];
249
- objProp2.map((v, i) => deepStringify(v, stringified2[prop2][i]));
250
- } else
251
- stringified2[prop2] = objProp2;
252
- }
253
- return stringified2;
254
- };
255
- var deepDestringify = (obj, stringified = {}) => {
256
- for (const prop in obj) {
257
- const objProp = obj[prop];
258
- if (isString(objProp)) {
259
- if (objProp.includes("=>") || objProp.includes("function") || objProp[0] === "(") {
260
- try {
261
- const evalProp = eval(objProp);
262
- stringified[prop] = evalProp;
263
- } catch (e) {
264
- if (e)
265
- stringified[prop] = objProp;
266
- }
267
- }
268
- } else
269
- stringified[prop] = objProp;
270
- if (isObject(objProp))
271
- deepDestringify(stringified[prop], stringified[prop]);
272
- }
273
- return stringified;
274
- };
275
- var overwrite = (element, params, options) => {
276
- const { ref } = element;
277
- const changes = {};
278
- for (const e in params) {
279
- if (e === "props")
280
- continue;
281
- const elementProp = element[e];
282
- const paramsProp = params[e];
283
- if (paramsProp) {
284
- ref.__cache[e] = changes[e] = elementProp;
285
- ref[e] = paramsProp;
286
- }
287
- }
288
- return changes;
289
- };
290
- var diff = (obj2, original, cache) => {
291
- const changes = cache || {};
292
- for (const e in obj2) {
293
- if (e === "ref")
294
- continue;
295
- const originalProp = original[e];
296
- const objProp2 = obj2[e];
297
- if (isObjectLike(originalProp) && isObjectLike(objProp2)) {
298
- changes[e] = {};
299
- diff(originalProp, objProp2, changes[e]);
300
- } else if (objProp2 !== void 0) {
301
- changes[e] = objProp2;
302
- }
303
- }
304
- return changes;
305
- };
306
- var overwriteObj = (params, obj2) => {
307
- const changes = {};
308
- for (const e in params) {
309
- const objProp2 = obj2[e];
310
- const paramsProp = params[e];
311
- if (paramsProp) {
312
- obj2[e] = changes[e] = objProp2;
313
- }
314
- }
315
- return changes;
316
- };
317
- var overwriteDeep = (params, obj2) => {
318
- for (const e in params) {
319
- const objProp2 = obj2[e];
320
- const paramsProp = params[e];
321
- if (isObjectLike(objProp2) && isObjectLike(paramsProp)) {
322
- overwriteDeep(objProp2, paramsProp);
323
- } else if (paramsProp !== void 0) {
324
- obj2[e] = paramsProp;
325
- }
326
- }
327
- return obj2;
328
- };
329
- var mergeIfExisted = (a, b) => {
330
- if (isObjectLike(a) && isObjectLike(b))
331
- return deepMerge(a, b);
332
- return a || b;
333
- };
334
- var mergeArray = (arr) => {
335
- return arr.reduce((a, c) => deepMerge(a, deepClone(c)), {});
336
- };
337
- var mergeAndCloneIfArray = (obj2) => {
338
- return isArray(obj2) ? mergeArray(obj2) : deepClone(obj2);
339
- };
340
- var flattenRecursive = (param, prop2, stack = []) => {
341
- const objectized = mergeAndCloneIfArray(param);
342
- stack.push(objectized);
343
- const extendOfExtend = objectized[prop2];
344
- if (extendOfExtend)
345
- flattenRecursive(extendOfExtend, prop2, stack);
346
- delete objectized[prop2];
347
- return stack;
348
- };
349
- var isEqualDeep = (param, element) => {
350
- if (param === element)
351
- return true;
352
- if (!param || !element)
353
- return false;
354
- for (const prop2 in param) {
355
- const paramProp = param[prop2];
356
- const elementProp = element[prop2];
357
- if (isObjectLike(paramProp)) {
358
- const isEqual = isEqualDeep(paramProp, elementProp);
359
- if (!isEqual)
360
- return false;
361
- } else {
362
- const isEqual = paramProp === elementProp;
363
- if (!isEqual)
364
- return false;
365
- }
366
- }
367
- return true;
368
- };
369
-
370
- // ../../node_modules/@domql/utils/node.js
371
- var createID = function() {
372
- let index = 0;
373
- function newId() {
374
- index++;
375
- return index;
376
- }
377
- return newId;
378
- }();
895
+ // src/factory.js
896
+ var import_utils7 = __toESM(require_cjs3());
379
897
 
380
898
  // src/defaultConfig/index.js
381
899
  var defaultConfig_exports = {};
382
- __export(defaultConfig_exports, {
900
+ __export2(defaultConfig_exports, {
383
901
  ANIMATION: () => ANIMATION,
384
902
  BREAKPOINTS: () => BREAKPOINTS,
385
903
  CASES: () => CASES,
@@ -458,14 +976,14 @@ var TYPOGRAPHY = defaultProps;
458
976
  var FONT = {};
459
977
 
460
978
  // src/utils/object.js
461
- var isString2 = (arg) => typeof arg === "string";
462
- var isArray2 = (arg) => Array.isArray(arg);
463
- var isObject2 = (arg) => {
979
+ var isString = (arg) => typeof arg === "string";
980
+ var isArray = (arg) => Array.isArray(arg);
981
+ var isObject = (arg) => {
464
982
  if (arg === null)
465
983
  return false;
466
984
  return typeof arg === "object" && arg.constructor === Object;
467
985
  };
468
- var isObjectLike2 = (arg) => {
986
+ var isObjectLike = (arg) => {
469
987
  if (arg === null)
470
988
  return false;
471
989
  return typeof arg === "object";
@@ -486,23 +1004,24 @@ var deepMerge2 = (obj2, obj22) => {
486
1004
  const obj2Prop = obj22[e];
487
1005
  if (objProp2 === void 0) {
488
1006
  obj2[e] = obj2Prop;
489
- } else if (isObjectLike2(objProp2) && isObject2(obj2Prop)) {
1007
+ } else if (isObjectLike(objProp2) && isObject(obj2Prop)) {
490
1008
  deepMerge2(objProp2, obj2Prop);
491
1009
  }
492
1010
  }
493
1011
  return obj2;
494
1012
  };
495
1013
  var arrayze = (val) => {
496
- if (isString2(val))
1014
+ if (isString(val))
497
1015
  return val.split(" ");
498
- if (isObject2(val))
1016
+ if (isObject(val))
499
1017
  return Object.keys(val).map((v) => val[v]);
500
- if (isArray2(val))
1018
+ if (isArray(val))
501
1019
  return val;
502
1020
  };
503
- var isFunction2 = (arg) => typeof arg === "function";
1021
+ var isFunction = (arg) => typeof arg === "function";
504
1022
 
505
1023
  // src/utils/color.js
1024
+ var import_globals = __toESM(require_cjs());
506
1025
  var ENV = "development";
507
1026
  var colorStringToRgbaArray = (color) => {
508
1027
  if (color === "")
@@ -521,8 +1040,8 @@ var colorStringToRgbaArray = (color) => {
521
1040
  ];
522
1041
  }
523
1042
  if (color.indexOf("rgb") === -1) {
524
- if (document2 && window2) {
525
- const elem = document2.body.appendChild(document2.createElement("fictum"));
1043
+ if (import_globals.document && import_globals.window) {
1044
+ const elem = import_globals.document.body.appendChild(import_globals.document.createElement("fictum"));
526
1045
  const flag = "rgb(1, 2, 3)";
527
1046
  elem.style.color = flag;
528
1047
  if (elem.style.color !== flag)
@@ -530,8 +1049,8 @@ var colorStringToRgbaArray = (color) => {
530
1049
  elem.style.color = color;
531
1050
  if (elem.style.color === flag || elem.style.color === "")
532
1051
  return;
533
- color = window2.getComputedStyle(elem).color;
534
- document2.body.removeChild(elem);
1052
+ color = import_globals.window.getComputedStyle(elem).color;
1053
+ import_globals.document.body.removeChild(elem);
535
1054
  } else
536
1055
  console.warn("Color conversion failed, no document or window object found");
537
1056
  }
@@ -671,6 +1190,12 @@ var getFontFaceString = (LIBRARY) => {
671
1190
  return keys.map((key) => getFontFaceEachString(key, LIBRARY[key].value));
672
1191
  };
673
1192
 
1193
+ // src/utils/sequence.js
1194
+ var import_utils2 = __toESM(require_cjs3());
1195
+
1196
+ // ../utils/src/scaling.js
1197
+ var import_utils = __toESM(require_cjs3());
1198
+
674
1199
  // ../utils/src/index.js
675
1200
  var toCamelCase = (str) => {
676
1201
  return str.replace(/(?:^\w|[A-Z]|\b\w)/g, function(word, index) {
@@ -786,7 +1311,7 @@ var getSequenceValue = (value = "A", sequenceProps) => {
786
1311
  unit = UNIT2.default,
787
1312
  useVariable
788
1313
  } = sequenceProps;
789
- if (isString(value) && value.slice(0, 2) === "--")
1314
+ if ((0, import_utils2.isString)(value) && value.slice(0, 2) === "--")
790
1315
  return `var(${value})`;
791
1316
  const prefix = `--${toDashCase(sequenceProps.type.replace(".", "-"))}-`;
792
1317
  const startsWithDashOrLetterRegex = /^-?[a-zA-Z]/i;
@@ -849,10 +1374,11 @@ var findHeadings = (propertyNames) => {
849
1374
  };
850
1375
 
851
1376
  // src/utils/var.js
1377
+ var import_utils4 = __toESM(require_cjs3());
852
1378
  var setVariables = (result, key) => {
853
1379
  const CONFIG2 = getActiveConfig();
854
1380
  const { CSS_VARS: CSS_VARS2 } = CONFIG2;
855
- if (isObjectLike(result.value)) {
1381
+ if ((0, import_utils4.isObjectLike)(result.value)) {
856
1382
  } else {
857
1383
  CSS_VARS2[result.var] = result.value;
858
1384
  }
@@ -888,6 +1414,7 @@ var applySequenceVars = (props, mediaName, options = {}) => {
888
1414
  };
889
1415
 
890
1416
  // src/utils/sprite.js
1417
+ var import_utils5 = __toESM(require_cjs3());
891
1418
  var generateSprite = (icons) => {
892
1419
  let sprite = '<svg aria-hidden="true" width="0" height="0" style="position:absolute">';
893
1420
  for (let key in icons) {
@@ -897,7 +1424,7 @@ var generateSprite = (icons) => {
897
1424
  return sprite;
898
1425
  };
899
1426
  var parseRootAttributes = (htmlString) => {
900
- if (!isString(htmlString)) {
1427
+ if (!(0, import_utils5.isString)(htmlString)) {
901
1428
  return console.warn(`parseRootAttributes: ${htmlString} is not a string`);
902
1429
  }
903
1430
  let match = htmlString.match(/<svg\s+(.*?)>/);
@@ -1043,20 +1570,20 @@ var CONFIG = {
1043
1570
  CSS_VARS,
1044
1571
  ...defaultConfig_exports
1045
1572
  };
1046
- var cachedConfig = deepClone(CONFIG);
1573
+ var cachedConfig = (0, import_utils7.deepClone)(CONFIG);
1047
1574
  var FACTORY = {
1048
1575
  active: "0",
1049
1576
  0: CONFIG
1050
1577
  };
1051
1578
  var activateConfig = (def) => {
1052
- if (isDefined(def)) {
1579
+ if ((0, import_utils7.isDefined)(def)) {
1053
1580
  FACTORY.active = def;
1054
1581
  }
1055
1582
  return FACTORY[def || FACTORY.active];
1056
1583
  };
1057
1584
  var getActiveConfig = (def) => {
1058
- if (isDefined(def) && !FACTORY[def]) {
1059
- FACTORY[def] = deepClone(cachedConfig);
1585
+ if ((0, import_utils7.isDefined)(def) && !FACTORY[def]) {
1586
+ FACTORY[def] = (0, import_utils7.deepClone)(cachedConfig);
1060
1587
  return FACTORY[def];
1061
1588
  }
1062
1589
  return FACTORY[def || FACTORY.active];
@@ -1066,9 +1593,10 @@ var setActiveConfig = (def) => {
1066
1593
  };
1067
1594
 
1068
1595
  // src/system/color.js
1596
+ var import_utils8 = __toESM(require_cjs3());
1069
1597
  var getColor = (value, key) => {
1070
1598
  const CONFIG2 = getActiveConfig();
1071
- if (!isString(value)) {
1599
+ if (!(0, import_utils8.isString)(value)) {
1072
1600
  if (CONFIG2.verbose)
1073
1601
  console.warn(value, "- type for color is not valid");
1074
1602
  return;
@@ -1077,7 +1605,7 @@ var getColor = (value, key) => {
1077
1605
  return `var(${value})`;
1078
1606
  if (key && value[key])
1079
1607
  value = value[key];
1080
- const [name, alpha, tone] = isArray(value) ? value : value.split(" ");
1608
+ const [name, alpha, tone] = (0, import_utils8.isArray)(value) ? value : value.split(" ");
1081
1609
  const { COLOR: COLOR2, GRADIENT: GRADIENT2 } = CONFIG2;
1082
1610
  let val = COLOR2[name] || GRADIENT2[name];
1083
1611
  if (!val) {
@@ -1119,17 +1647,17 @@ var getMediaColor = (value, property, globalTheme) => {
1119
1647
  const CONFIG2 = getActiveConfig();
1120
1648
  if (!globalTheme)
1121
1649
  globalTheme = CONFIG2.globalTheme;
1122
- if (!isString(value)) {
1650
+ if (!(0, import_utils8.isString)(value)) {
1123
1651
  if (CONFIG2.verbose)
1124
1652
  console.warn(value, "- type for color is not valid");
1125
1653
  return;
1126
1654
  }
1127
1655
  if (value.slice(0, 2) === "--")
1128
1656
  return { [property]: `var(${value})` };
1129
- const [name] = isArray(value) ? value : value.split(" ");
1657
+ const [name] = (0, import_utils8.isArray)(value) ? value : value.split(" ");
1130
1658
  const { COLOR: COLOR2, GRADIENT: GRADIENT2 } = CONFIG2;
1131
1659
  const val = COLOR2[name] || GRADIENT2[name];
1132
- const isObj = isObject(val);
1660
+ const isObj = (0, import_utils8.isObject)(val);
1133
1661
  if (isObj && val.value)
1134
1662
  return { [property]: getColor(value, globalTheme) };
1135
1663
  else if (isObj) {
@@ -1152,15 +1680,15 @@ var getMediaColor = (value, property, globalTheme) => {
1152
1680
  };
1153
1681
  var setColor = (val, key, suffix) => {
1154
1682
  const CONFIG2 = getActiveConfig();
1155
- if (isString(val) && val.slice(0, 2) === "--")
1683
+ if ((0, import_utils8.isString)(val) && val.slice(0, 2) === "--")
1156
1684
  val = getColor(val.slice(2));
1157
- if (isArray(val)) {
1685
+ if ((0, import_utils8.isArray)(val)) {
1158
1686
  return {
1159
1687
  "@light": setColor(val[0], key, "light"),
1160
1688
  "@dark": setColor(val[1], key, "dark")
1161
1689
  };
1162
1690
  }
1163
- if (isObject(val)) {
1691
+ if ((0, import_utils8.isObject)(val)) {
1164
1692
  const obj2 = {};
1165
1693
  for (const variant in val)
1166
1694
  obj2[variant] = setColor(val[variant], key, variant.slice(0, 1) === "@" ? variant.slice(1) : variant);
@@ -1183,15 +1711,15 @@ var setColor = (val, key, suffix) => {
1183
1711
  };
1184
1712
  var setGradient = (val, key, suffix) => {
1185
1713
  const CONFIG2 = getActiveConfig();
1186
- if (isString(val) && val.slice(0, 2) === "--")
1714
+ if ((0, import_utils8.isString)(val) && val.slice(0, 2) === "--")
1187
1715
  val = getColor(val.slice(2));
1188
- if (isArray(val)) {
1716
+ if ((0, import_utils8.isArray)(val)) {
1189
1717
  return {
1190
1718
  "@light": setGradient(val[0], key, "light"),
1191
1719
  "@dark": setGradient(val[0], key, "dark")
1192
1720
  };
1193
1721
  }
1194
- if (isObject(val)) {
1722
+ if ((0, import_utils8.isObject)(val)) {
1195
1723
  const obj2 = {};
1196
1724
  for (const variant in val)
1197
1725
  obj2[variant] = setGradient(val[variant], key, variant.slice(0, 1) === "@" ? variant.slice(1) : variant);
@@ -1208,6 +1736,7 @@ var setGradient = (val, key, suffix) => {
1208
1736
  };
1209
1737
 
1210
1738
  // src/system/theme.js
1739
+ var import_utils10 = __toESM(require_cjs3());
1211
1740
  var setThemeValue = (theme) => {
1212
1741
  const value = {};
1213
1742
  const { state, media, helpers, ...rest } = theme;
@@ -1230,7 +1759,7 @@ var getTheme = (value, modifier) => {
1230
1759
  if (CONFIG2.useVariable)
1231
1760
  return getMediaTheme(value, modifier);
1232
1761
  const { THEME: THEME2 } = CONFIG2;
1233
- if (isString(value)) {
1762
+ if ((0, import_utils10.isString)(value)) {
1234
1763
  const [theme, subtheme] = value.split(" ");
1235
1764
  const isOurTheme = THEME2[theme];
1236
1765
  if (isOurTheme) {
@@ -1239,7 +1768,7 @@ var getTheme = (value, modifier) => {
1239
1768
  value = [theme, subtheme || modifier];
1240
1769
  }
1241
1770
  }
1242
- if (isObjectLike(value) && value[1]) {
1771
+ if ((0, import_utils10.isObjectLike)(value) && value[1]) {
1243
1772
  const themeName = value[0];
1244
1773
  const subThemeName = value[1];
1245
1774
  const { helpers, media, state } = THEME2[themeName];
@@ -1249,11 +1778,11 @@ var getTheme = (value, modifier) => {
1249
1778
  return getThemeValue(helpers[subThemeName]);
1250
1779
  if (state && state[subThemeName])
1251
1780
  return getThemeValue(state[subThemeName]);
1252
- } else if (isObject(value))
1781
+ } else if ((0, import_utils10.isObject)(value))
1253
1782
  return setThemeValue(value);
1254
1783
  };
1255
1784
  var setInverseTheme = (theme, variant, value) => {
1256
- if (isObject(variant)) {
1785
+ if ((0, import_utils10.isObject)(variant)) {
1257
1786
  theme.variants.inverse.value = setThemeValue(variant);
1258
1787
  } else if (variant === true) {
1259
1788
  const { color, background } = value;
@@ -1268,7 +1797,7 @@ var setInverseTheme = (theme, variant, value) => {
1268
1797
  var setPseudo = (theme, key, variant, themeValue) => {
1269
1798
  const result = getTheme(variant);
1270
1799
  themeValue[`&:${key}`] = result;
1271
- if (isObject(variant) && !variant.value)
1800
+ if ((0, import_utils10.isObject)(variant) && !variant.value)
1272
1801
  variant.value = result;
1273
1802
  };
1274
1803
  var setSelectors = (theme, value) => {
@@ -1286,7 +1815,7 @@ var setSelectors = (theme, value) => {
1286
1815
  var setPrefersScheme = (theme, key, variant, themeValue) => {
1287
1816
  const result = getTheme(variant);
1288
1817
  themeValue[`@media (prefers-color-scheme: ${key})`] = result;
1289
- if (isObject(variant) && !variant.value)
1818
+ if ((0, import_utils10.isObject)(variant) && !variant.value)
1290
1819
  variant.value = result;
1291
1820
  };
1292
1821
  var setMedia = (theme, value) => {
@@ -1312,7 +1841,7 @@ var setHelpers = (theme, value) => {
1312
1841
  const keys = Object.keys(helpers);
1313
1842
  keys.map((key) => {
1314
1843
  const helper = helpers[key];
1315
- if (isString(helper))
1844
+ if ((0, import_utils10.isString)(helper))
1316
1845
  helpers[key] = CONFIG2.THEME[helper];
1317
1846
  else
1318
1847
  getThemeValue(helpers[key]);
@@ -1336,7 +1865,7 @@ var setMediaTheme = (val, key, suffix, prefers) => {
1336
1865
  const CONFIG2 = getActiveConfig();
1337
1866
  const { CSS_VARS: CSS_VARS2 } = CONFIG2;
1338
1867
  const theme = { value: val };
1339
- if (isObjectLike(val)) {
1868
+ if ((0, import_utils10.isObjectLike)(val)) {
1340
1869
  for (const param in val) {
1341
1870
  const symb = param.slice(0, 1);
1342
1871
  const value = val[param];
@@ -1364,7 +1893,7 @@ var setMediaTheme = (val, key, suffix, prefers) => {
1364
1893
  };
1365
1894
  }
1366
1895
  }
1367
- if (isString(val) && val.slice(0, 2) === "--") {
1896
+ if ((0, import_utils10.isString)(val) && val.slice(0, 2) === "--") {
1368
1897
  const { THEME: THEME2 } = CONFIG2;
1369
1898
  const value = THEME2[val.slice(2)];
1370
1899
  const getReferenced = getMediaTheme(value, prefers);
@@ -1377,7 +1906,7 @@ var recursiveTheme = (val) => {
1377
1906
  const obj2 = {};
1378
1907
  for (const param in val) {
1379
1908
  const symb = param.slice(0, 1);
1380
- if (isObjectLike(val[param])) {
1909
+ if ((0, import_utils10.isObjectLike)(val[param])) {
1381
1910
  if (symb === "@") {
1382
1911
  const query = CONFIG2.MEDIA[param.slice(1)];
1383
1912
  const media = `@media screen and ${query}`;
@@ -1397,23 +1926,23 @@ var findModifierFromArray = (val, modifierArray) => {
1397
1926
  return val;
1398
1927
  };
1399
1928
  var findModifier = (val, modifier) => {
1400
- if (isArray(modifier))
1929
+ if ((0, import_utils10.isArray)(modifier))
1401
1930
  return findModifierFromArray(val, modifier);
1402
- else if (isString(modifier) && val[modifier])
1931
+ else if ((0, import_utils10.isString)(modifier) && val[modifier])
1403
1932
  return val[modifier];
1404
1933
  else
1405
1934
  return val;
1406
1935
  };
1407
1936
  var getMediaTheme = (val, mod) => {
1408
1937
  const CONFIG2 = getActiveConfig();
1409
- if (isString(val) && val.slice(0, 2) === "--")
1938
+ if ((0, import_utils10.isString)(val) && val.slice(0, 2) === "--")
1410
1939
  val = getMediaTheme(val.slice(2));
1411
- if (!val || !isString(val)) {
1940
+ if (!val || !(0, import_utils10.isString)(val)) {
1412
1941
  if (CONFIG2.verbose)
1413
1942
  console.warn(val, "- theme is not string");
1414
1943
  return;
1415
1944
  }
1416
- const [name, ...modifier] = isArray(val) ? val : val.split(" ");
1945
+ const [name, ...modifier] = (0, import_utils10.isArray)(val) ? val : val.split(" ");
1417
1946
  let value = CONFIG2.THEME[name];
1418
1947
  if (value && (modifier || mod)) {
1419
1948
  value = findModifier(value, modifier.length ? modifier : mod);
@@ -1423,6 +1952,7 @@ var getMediaTheme = (val, mod) => {
1423
1952
  };
1424
1953
 
1425
1954
  // src/system/font.js
1955
+ var import_utils11 = __toESM(require_cjs3());
1426
1956
  var setFont = (val, key) => {
1427
1957
  const CSSvar = `--font-${key}`;
1428
1958
  const fontFace = val[0] ? getFontFaceEach(key, val) : setCustomFontMedia(key, val.url);
@@ -1439,7 +1969,7 @@ var setFontFamily = (val, key) => {
1439
1969
  let { value, type } = val;
1440
1970
  if (val.isDefault)
1441
1971
  FONT_FAMILY2.default = key;
1442
- if (isObject(value))
1972
+ if ((0, import_utils11.isObject)(value))
1443
1973
  value = arrayze(value);
1444
1974
  const CSSvar = `--font-family-${key}`;
1445
1975
  const str = `${value.join(", ")}, ${FONT_FAMILY_TYPES2[type]}`;
@@ -1515,6 +2045,7 @@ var getFontSizeByKey = (value) => {
1515
2045
  };
1516
2046
 
1517
2047
  // src/system/spacing.js
2048
+ var import_utils14 = __toESM(require_cjs3());
1518
2049
  var runThroughMedia2 = (sequenceProps) => {
1519
2050
  for (const prop2 in sequenceProps) {
1520
2051
  const mediaProps = sequenceProps[prop2];
@@ -1559,7 +2090,7 @@ var getSpacingByKey = (value, propertyName = "padding", sequenceProps) => {
1559
2090
  const stack = arrayze(value);
1560
2091
  if (!stack)
1561
2092
  return;
1562
- if (isString(value) && value.includes("calc")) {
2093
+ if ((0, import_utils14.isString)(value) && value.includes("calc")) {
1563
2094
  return { [propertyName]: value };
1564
2095
  }
1565
2096
  if (stack.length > 1) {
@@ -1652,12 +2183,16 @@ var applyDocument = () => {
1652
2183
  };
1653
2184
 
1654
2185
  // src/system/svg.js
2186
+ var import_globals2 = __toESM(require_cjs());
1655
2187
  var DEF_OPTIONS = {
1656
- document: document2
2188
+ document: import_globals2.document
1657
2189
  };
1658
2190
  var setSVG = (val, key) => {
1659
- if (!val)
1660
- return console.log("setSVG: val is not defined");
2191
+ if (!val) {
2192
+ if (CONFIG2.verbose)
2193
+ console.warn("setSVG: val is not defined", key);
2194
+ return;
2195
+ }
1661
2196
  const CONFIG2 = getActiveConfig();
1662
2197
  if (CONFIG2.useSvgSprite) {
1663
2198
  return convertSvgToSymbol(key, val);
@@ -1666,7 +2201,7 @@ var setSVG = (val, key) => {
1666
2201
  };
1667
2202
  var appendSVGSprite = (LIBRARY, options = DEF_OPTIONS) => {
1668
2203
  const CONFIG2 = getActiveConfig();
1669
- const doc = options.document || document2;
2204
+ const doc = options.document || import_globals2.document;
1670
2205
  const lib = Object.keys(LIBRARY).length ? {} : CONFIG2.SVG;
1671
2206
  for (let key in LIBRARY)
1672
2207
  lib[key] = CONFIG2.SVG[key];
@@ -1688,7 +2223,7 @@ var setIcon = (val, key) => {
1688
2223
  };
1689
2224
  var appendIconsSprite = (LIBRARY, options = DEF_OPTIONS) => {
1690
2225
  const CONFIG2 = getActiveConfig();
1691
- const doc = options.document || document2;
2226
+ const doc = options.document || import_globals2.document;
1692
2227
  const lib = Object.keys(LIBRARY).length ? {} : CONFIG2.ICONS;
1693
2228
  for (let key in LIBRARY)
1694
2229
  lib[key] = CONFIG2.ICONS[key];
@@ -1703,6 +2238,7 @@ var appendIconsSprite = (LIBRARY, options = DEF_OPTIONS) => {
1703
2238
  };
1704
2239
 
1705
2240
  // src/system/reset.js
2241
+ var import_utils20 = __toESM(require_cjs3());
1706
2242
  var applyReset = (reset = {}) => {
1707
2243
  const CONFIG2 = getActiveConfig();
1708
2244
  const { CSS_VARS: CSS_VARS2, RESET: RESET2, TYPOGRAPHY: TYPOGRAPHY2, DOCUMENT: DOCUMENT2 } = CONFIG2;
@@ -1722,7 +2258,7 @@ var applyReset = (reset = {}) => {
1722
2258
  configReset.h6 = configTemplates.h6;
1723
2259
  }
1724
2260
  const { body, ...templates } = TYPOGRAPHY2.templates;
1725
- return deepMerge(merge(RESET2, reset), {
2261
+ return (0, import_utils20.deepMerge)((0, import_utils20.merge)(RESET2, reset), {
1726
2262
  html: {
1727
2263
  position: "absolute",
1728
2264
  overflow: "hidden",
@@ -1763,7 +2299,7 @@ var applyReset = (reset = {}) => {
1763
2299
 
1764
2300
  // src/set.js
1765
2301
  var setCases = (val, key) => {
1766
- if (isFunction2(val))
2302
+ if (isFunction(val))
1767
2303
  return val();
1768
2304
  return val;
1769
2305
  };