@symbo.ls/scratch 2.11.360 → 2.11.373

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.
@@ -205,32 +205,32 @@ var require_types = __commonJS({
205
205
  __export2(types_exports, {
206
206
  TYPES: () => TYPES,
207
207
  is: () => is,
208
- isArray: () => isArray7,
208
+ isArray: () => isArray5,
209
209
  isBoolean: () => isBoolean,
210
210
  isDate: () => isDate,
211
211
  isDefined: () => isDefined2,
212
212
  isFunction: () => isFunction,
213
213
  isNot: () => isNot,
214
214
  isNull: () => isNull,
215
- isNumber: () => isNumber3,
216
- isObject: () => isObject6,
215
+ isNumber: () => isNumber2,
216
+ isObject: () => isObject4,
217
217
  isObjectLike: () => isObjectLike2,
218
- isString: () => isString8,
218
+ isString: () => isString7,
219
219
  isUndefined: () => isUndefined
220
220
  });
221
221
  module2.exports = __toCommonJS2(types_exports);
222
222
  var import_node = require_node();
223
- var isObject6 = (arg) => {
223
+ var isObject4 = (arg) => {
224
224
  if (arg === null)
225
225
  return false;
226
226
  return typeof arg === "object" && arg.constructor === Object;
227
227
  };
228
- var isString8 = (arg) => typeof arg === "string";
229
- var isNumber3 = (arg) => typeof arg === "number";
228
+ var isString7 = (arg) => typeof arg === "string";
229
+ var isNumber2 = (arg) => typeof arg === "number";
230
230
  var isFunction = (arg) => typeof arg === "function";
231
231
  var isBoolean = (arg) => arg === true || arg === false;
232
232
  var isNull = (arg) => arg === null;
233
- var isArray7 = (arg) => Array.isArray(arg);
233
+ var isArray5 = (arg) => Array.isArray(arg);
234
234
  var isDate = (d) => d instanceof Date;
235
235
  var isObjectLike2 = (arg) => {
236
236
  if (arg === null)
@@ -238,18 +238,18 @@ var require_types = __commonJS({
238
238
  return typeof arg === "object";
239
239
  };
240
240
  var isDefined2 = (arg) => {
241
- return isObject6(arg) || isObjectLike2(arg) || isString8(arg) || isNumber3(arg) || isFunction(arg) || isArray7(arg) || isObjectLike2(arg) || isBoolean(arg) || isDate(arg) || isNull(arg);
241
+ return isObject4(arg) || isObjectLike2(arg) || isString7(arg) || isNumber2(arg) || isFunction(arg) || isArray5(arg) || isObjectLike2(arg) || isBoolean(arg) || isDate(arg) || isNull(arg);
242
242
  };
243
243
  var isUndefined = (arg) => {
244
244
  return arg === void 0;
245
245
  };
246
246
  var TYPES = {
247
247
  boolean: isBoolean,
248
- array: isArray7,
249
- object: isObject6,
250
- string: isString8,
248
+ array: isArray5,
249
+ object: isObject4,
250
+ string: isString7,
251
251
  date: isDate,
252
- number: isNumber3,
252
+ number: isNumber2,
253
253
  null: isNull,
254
254
  function: isFunction,
255
255
  objectLike: isObjectLike2,
@@ -297,6 +297,7 @@ var require_array = __commonJS({
297
297
  createNestedObject: () => createNestedObject,
298
298
  cutArrayAfterValue: () => cutArrayAfterValue,
299
299
  cutArrayBeforeValue: () => cutArrayBeforeValue,
300
+ getFrequencyInArray: () => getFrequencyInArray,
300
301
  joinArrays: () => joinArrays,
301
302
  mergeAndCloneIfArray: () => mergeAndCloneIfArray,
302
303
  mergeArray: () => mergeArray,
@@ -311,6 +312,11 @@ var require_array = __commonJS({
311
312
  var arrayContainsOtherArray = (arr1, arr2) => {
312
313
  return arr2.every((val) => arr1.includes(val));
313
314
  };
315
+ var getFrequencyInArray = (arr, value) => {
316
+ return arr.reduce((count, currentValue) => {
317
+ return currentValue === value ? count + 1 : count;
318
+ }, 0);
319
+ };
314
320
  var removeFromArray = (arr, index) => {
315
321
  if ((0, import_types.isString)(index))
316
322
  index = parseInt(index);
@@ -377,7 +383,7 @@ var require_array = __commonJS({
377
383
  newArray.splice(index, 1);
378
384
  return newArray;
379
385
  }
380
- return arr.slice();
386
+ return arr;
381
387
  };
382
388
  var removeValueFromArrayAll = (arr, value) => {
383
389
  return arr.filter((item) => item !== value);
@@ -725,7 +731,7 @@ var require_object = __commonJS({
725
731
  continue;
726
732
  const objProp = obj[prop];
727
733
  if ((0, import_types.isString)(objProp)) {
728
- if (objProp.includes("=>") || objProp.includes("function") || objProp.startsWith("(")) {
734
+ if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
729
735
  try {
730
736
  const evalProp = import_globals2.window.eval(`(${objProp})`);
731
737
  destringified[prop] = evalProp;
@@ -765,11 +771,11 @@ var require_object = __commonJS({
765
771
  }
766
772
  return destringified;
767
773
  };
768
- var stringToObject = (str, verbose) => {
774
+ var stringToObject = (str, opts = { verbose: true }) => {
769
775
  try {
770
776
  return import_globals2.window.eval("(" + str + ")");
771
777
  } catch (e) {
772
- if (verbose)
778
+ if (opts.verbose)
773
779
  console.warn(e);
774
780
  }
775
781
  };
@@ -1379,6 +1385,1454 @@ var require_cjs2 = __commonJS({
1379
1385
  }
1380
1386
  });
1381
1387
 
1388
+ // ../utils/dist/cjs/index.js
1389
+ var require_cjs3 = __commonJS({
1390
+ "../utils/dist/cjs/index.js"(exports, module2) {
1391
+ "use strict";
1392
+ var __create2 = Object.create;
1393
+ var __defProp2 = Object.defineProperty;
1394
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
1395
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
1396
+ var __getProtoOf2 = Object.getPrototypeOf;
1397
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
1398
+ var __commonJS2 = (cb, mod) => function __require() {
1399
+ return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
1400
+ };
1401
+ var __export2 = (target, all) => {
1402
+ for (var name in all)
1403
+ __defProp2(target, name, { get: all[name], enumerable: true });
1404
+ };
1405
+ var __copyProps2 = (to, from, except, desc) => {
1406
+ if (from && typeof from === "object" || typeof from === "function") {
1407
+ for (let key of __getOwnPropNames2(from))
1408
+ if (!__hasOwnProp2.call(to, key) && key !== except)
1409
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
1410
+ }
1411
+ return to;
1412
+ };
1413
+ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
1414
+ // If the importer is in node compatibility mode or this is not an ESM
1415
+ // file that has been converted to a CommonJS file using a Babel-
1416
+ // compatible transform (i.e. "__esModule" has not been set), then set
1417
+ // "default" to the CommonJS "module.exports" for node compatibility.
1418
+ isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
1419
+ mod
1420
+ ));
1421
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
1422
+ var require_key2 = __commonJS2({
1423
+ "../../node_modules/@domql/utils/dist/cjs/key.js"(exports2, module22) {
1424
+ "use strict";
1425
+ var __defProp22 = Object.defineProperty;
1426
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
1427
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
1428
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
1429
+ var __export22 = (target, all) => {
1430
+ for (var name in all)
1431
+ __defProp22(target, name, { get: all[name], enumerable: true });
1432
+ };
1433
+ var __copyProps22 = (to, from, except, desc) => {
1434
+ if (from && typeof from === "object" || typeof from === "function") {
1435
+ for (let key of __getOwnPropNames22(from))
1436
+ if (!__hasOwnProp22.call(to, key) && key !== except)
1437
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
1438
+ }
1439
+ return to;
1440
+ };
1441
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
1442
+ var key_exports = {};
1443
+ __export22(key_exports, {
1444
+ createSnapshotId: () => createSnapshotId,
1445
+ generateKey: () => generateKey
1446
+ });
1447
+ module22.exports = __toCommonJS22(key_exports);
1448
+ var generateKey = /* @__PURE__ */ function() {
1449
+ let index = 0;
1450
+ function newId() {
1451
+ index++;
1452
+ return index;
1453
+ }
1454
+ return newId;
1455
+ }();
1456
+ var createSnapshotId = generateKey;
1457
+ }
1458
+ });
1459
+ var require_env2 = __commonJS2({
1460
+ "../../node_modules/@domql/utils/dist/cjs/env.js"(exports2, module22) {
1461
+ "use strict";
1462
+ var __defProp22 = Object.defineProperty;
1463
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
1464
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
1465
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
1466
+ var __export22 = (target, all) => {
1467
+ for (var name in all)
1468
+ __defProp22(target, name, { get: all[name], enumerable: true });
1469
+ };
1470
+ var __copyProps22 = (to, from, except, desc) => {
1471
+ if (from && typeof from === "object" || typeof from === "function") {
1472
+ for (let key of __getOwnPropNames22(from))
1473
+ if (!__hasOwnProp22.call(to, key) && key !== except)
1474
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
1475
+ }
1476
+ return to;
1477
+ };
1478
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
1479
+ var env_exports = {};
1480
+ __export22(env_exports, {
1481
+ NODE_ENV: () => NODE_ENV,
1482
+ getNev: () => getNev,
1483
+ isDevelopment: () => isDevelopment,
1484
+ isProduction: () => isProduction,
1485
+ isTest: () => isTest
1486
+ });
1487
+ module22.exports = __toCommonJS22(env_exports);
1488
+ var NODE_ENV = "development";
1489
+ var isProduction = (env = NODE_ENV) => env === "production" || env === "prod" || env !== "development" && env !== "dev" && env !== "test";
1490
+ var isTest = (env = NODE_ENV) => env === "test";
1491
+ var isDevelopment = (env = NODE_ENV) => env === "development" || env === "dev";
1492
+ var getNev = (key, env = NODE_ENV) => env[key];
1493
+ }
1494
+ });
1495
+ var require_globals2 = __commonJS2({
1496
+ "../../node_modules/@domql/utils/dist/cjs/globals.js"(exports2, module22) {
1497
+ "use strict";
1498
+ var __defProp22 = Object.defineProperty;
1499
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
1500
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
1501
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
1502
+ var __export22 = (target, all) => {
1503
+ for (var name in all)
1504
+ __defProp22(target, name, { get: all[name], enumerable: true });
1505
+ };
1506
+ var __copyProps22 = (to, from, except, desc) => {
1507
+ if (from && typeof from === "object" || typeof from === "function") {
1508
+ for (let key of __getOwnPropNames22(from))
1509
+ if (!__hasOwnProp22.call(to, key) && key !== except)
1510
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
1511
+ }
1512
+ return to;
1513
+ };
1514
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
1515
+ var globals_exports = {};
1516
+ __export22(globals_exports, {
1517
+ document: () => document22,
1518
+ global: () => global,
1519
+ self: () => self,
1520
+ window: () => window2
1521
+ });
1522
+ module22.exports = __toCommonJS22(globals_exports);
1523
+ var global = globalThis;
1524
+ var self = globalThis;
1525
+ var window2 = globalThis;
1526
+ var document22 = window2.document;
1527
+ }
1528
+ });
1529
+ var require_node2 = __commonJS2({
1530
+ "../../node_modules/@domql/utils/dist/cjs/node.js"(exports2, module22) {
1531
+ "use strict";
1532
+ var __defProp22 = Object.defineProperty;
1533
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
1534
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
1535
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
1536
+ var __export22 = (target, all) => {
1537
+ for (var name in all)
1538
+ __defProp22(target, name, { get: all[name], enumerable: true });
1539
+ };
1540
+ var __copyProps22 = (to, from, except, desc) => {
1541
+ if (from && typeof from === "object" || typeof from === "function") {
1542
+ for (let key of __getOwnPropNames22(from))
1543
+ if (!__hasOwnProp22.call(to, key) && key !== except)
1544
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
1545
+ }
1546
+ return to;
1547
+ };
1548
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
1549
+ var node_exports = {};
1550
+ __export22(node_exports, {
1551
+ isHtmlElement: () => isHtmlElement,
1552
+ isNode: () => isNode
1553
+ });
1554
+ module22.exports = __toCommonJS22(node_exports);
1555
+ var import_globals2 = require_globals2();
1556
+ var isNode = (obj) => {
1557
+ return (typeof Node === "object" ? obj instanceof import_globals2.window.Node : obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string") || false;
1558
+ };
1559
+ var isHtmlElement = (obj) => {
1560
+ return (typeof HTMLElement === "object" ? obj instanceof import_globals2.window.HTMLElement : obj && typeof obj === "object" && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === "string") || false;
1561
+ };
1562
+ }
1563
+ });
1564
+ var require_types2 = __commonJS2({
1565
+ "../../node_modules/@domql/utils/dist/cjs/types.js"(exports2, module22) {
1566
+ "use strict";
1567
+ var __defProp22 = Object.defineProperty;
1568
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
1569
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
1570
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
1571
+ var __export22 = (target, all) => {
1572
+ for (var name in all)
1573
+ __defProp22(target, name, { get: all[name], enumerable: true });
1574
+ };
1575
+ var __copyProps22 = (to, from, except, desc) => {
1576
+ if (from && typeof from === "object" || typeof from === "function") {
1577
+ for (let key of __getOwnPropNames22(from))
1578
+ if (!__hasOwnProp22.call(to, key) && key !== except)
1579
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
1580
+ }
1581
+ return to;
1582
+ };
1583
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
1584
+ var types_exports = {};
1585
+ __export22(types_exports, {
1586
+ TYPES: () => TYPES,
1587
+ is: () => is,
1588
+ isArray: () => isArray32,
1589
+ isBoolean: () => isBoolean,
1590
+ isDate: () => isDate,
1591
+ isDefined: () => isDefined2,
1592
+ isFunction: () => isFunction,
1593
+ isNot: () => isNot,
1594
+ isNull: () => isNull,
1595
+ isNumber: () => isNumber2,
1596
+ isObject: () => isObject32,
1597
+ isObjectLike: () => isObjectLike2,
1598
+ isString: () => isString22,
1599
+ isUndefined: () => isUndefined
1600
+ });
1601
+ module22.exports = __toCommonJS22(types_exports);
1602
+ var import_node = require_node2();
1603
+ var isObject32 = (arg) => {
1604
+ if (arg === null)
1605
+ return false;
1606
+ return typeof arg === "object" && arg.constructor === Object;
1607
+ };
1608
+ var isString22 = (arg) => typeof arg === "string";
1609
+ var isNumber2 = (arg) => typeof arg === "number";
1610
+ var isFunction = (arg) => typeof arg === "function";
1611
+ var isBoolean = (arg) => arg === true || arg === false;
1612
+ var isNull = (arg) => arg === null;
1613
+ var isArray32 = (arg) => Array.isArray(arg);
1614
+ var isDate = (d) => d instanceof Date;
1615
+ var isObjectLike2 = (arg) => {
1616
+ if (arg === null)
1617
+ return false;
1618
+ return typeof arg === "object";
1619
+ };
1620
+ var isDefined2 = (arg) => {
1621
+ return isObject32(arg) || isObjectLike2(arg) || isString22(arg) || isNumber2(arg) || isFunction(arg) || isArray32(arg) || isObjectLike2(arg) || isBoolean(arg) || isDate(arg) || isNull(arg);
1622
+ };
1623
+ var isUndefined = (arg) => {
1624
+ return arg === void 0;
1625
+ };
1626
+ var TYPES = {
1627
+ boolean: isBoolean,
1628
+ array: isArray32,
1629
+ object: isObject32,
1630
+ string: isString22,
1631
+ date: isDate,
1632
+ number: isNumber2,
1633
+ null: isNull,
1634
+ function: isFunction,
1635
+ objectLike: isObjectLike2,
1636
+ node: import_node.isNode,
1637
+ htmlElement: import_node.isHtmlElement,
1638
+ defined: isDefined2
1639
+ };
1640
+ var is = (arg) => {
1641
+ return (...args) => {
1642
+ return args.map((val) => TYPES[val](arg)).filter((v) => v).length > 0;
1643
+ };
1644
+ };
1645
+ var isNot = (arg) => {
1646
+ return (...args) => {
1647
+ return args.map((val) => TYPES[val](arg)).filter((v) => v).length === 0;
1648
+ };
1649
+ };
1650
+ }
1651
+ });
1652
+ var require_array2 = __commonJS2({
1653
+ "../../node_modules/@domql/utils/dist/cjs/array.js"(exports2, module22) {
1654
+ "use strict";
1655
+ var __defProp22 = Object.defineProperty;
1656
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
1657
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
1658
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
1659
+ var __export22 = (target, all) => {
1660
+ for (var name in all)
1661
+ __defProp22(target, name, { get: all[name], enumerable: true });
1662
+ };
1663
+ var __copyProps22 = (to, from, except, desc) => {
1664
+ if (from && typeof from === "object" || typeof from === "function") {
1665
+ for (let key of __getOwnPropNames22(from))
1666
+ if (!__hasOwnProp22.call(to, key) && key !== except)
1667
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
1668
+ }
1669
+ return to;
1670
+ };
1671
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
1672
+ var array_exports = {};
1673
+ __export22(array_exports, {
1674
+ arrayContainsOtherArray: () => arrayContainsOtherArray,
1675
+ createNestedObject: () => createNestedObject,
1676
+ cutArrayAfterValue: () => cutArrayAfterValue,
1677
+ cutArrayBeforeValue: () => cutArrayBeforeValue,
1678
+ getFrequencyInArray: () => getFrequencyInArray,
1679
+ joinArrays: () => joinArrays,
1680
+ mergeAndCloneIfArray: () => mergeAndCloneIfArray,
1681
+ mergeArray: () => mergeArray,
1682
+ removeFromArray: () => removeFromArray,
1683
+ removeValueFromArray: () => removeValueFromArray,
1684
+ removeValueFromArrayAll: () => removeValueFromArrayAll,
1685
+ swapItemsInArray: () => swapItemsInArray
1686
+ });
1687
+ module22.exports = __toCommonJS22(array_exports);
1688
+ var import_object = require_object2();
1689
+ var import_types = require_types2();
1690
+ var arrayContainsOtherArray = (arr1, arr2) => {
1691
+ return arr2.every((val) => arr1.includes(val));
1692
+ };
1693
+ var getFrequencyInArray = (arr, value) => {
1694
+ return arr.reduce((count, currentValue) => {
1695
+ return currentValue === value ? count + 1 : count;
1696
+ }, 0);
1697
+ };
1698
+ var removeFromArray = (arr, index) => {
1699
+ if ((0, import_types.isString)(index))
1700
+ index = parseInt(index);
1701
+ if ((0, import_types.isNumber)(index)) {
1702
+ if (index < 0 || index >= arr.length || isNaN(index)) {
1703
+ throw new Error("Invalid index");
1704
+ }
1705
+ arr.splice(index, 1);
1706
+ } else if ((0, import_types.isArray)(index)) {
1707
+ index.forEach((idx) => removeFromArray(arr, idx));
1708
+ } else {
1709
+ throw new Error("Invalid index");
1710
+ }
1711
+ return arr;
1712
+ };
1713
+ var swapItemsInArray = (arr, i, j) => {
1714
+ [arr[i], arr[j]] = [arr[j], arr[i]];
1715
+ };
1716
+ var joinArrays = (...arrays) => {
1717
+ return [].concat(...arrays);
1718
+ };
1719
+ var mergeArray = (arr, excludeFrom = []) => {
1720
+ return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepClone)(c, excludeFrom), excludeFrom), {});
1721
+ };
1722
+ var mergeAndCloneIfArray = (obj) => {
1723
+ return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepClone)(obj);
1724
+ };
1725
+ var cutArrayBeforeValue = (arr, value) => {
1726
+ const index = arr.indexOf(value);
1727
+ if (index !== -1) {
1728
+ return arr.slice(0, index);
1729
+ }
1730
+ return arr;
1731
+ };
1732
+ var cutArrayAfterValue = (arr, value) => {
1733
+ if (!(0, import_types.isArray)(arr))
1734
+ return;
1735
+ const index = arr.indexOf(value);
1736
+ if (index !== -1) {
1737
+ return arr.slice(index + 1);
1738
+ }
1739
+ return arr;
1740
+ };
1741
+ var createNestedObject = (arr, lastValue) => {
1742
+ const nestedObject = {};
1743
+ if (arr.length === 0) {
1744
+ return lastValue;
1745
+ }
1746
+ arr.reduce((obj, value, index) => {
1747
+ if (!obj[value]) {
1748
+ obj[value] = {};
1749
+ }
1750
+ if (index === arr.length - 1 && lastValue) {
1751
+ obj[value] = lastValue;
1752
+ }
1753
+ return obj[value];
1754
+ }, nestedObject);
1755
+ return nestedObject;
1756
+ };
1757
+ var removeValueFromArray = (arr, value) => {
1758
+ const index = arr.indexOf(value);
1759
+ if (index > -1) {
1760
+ const newArray = [...arr];
1761
+ newArray.splice(index, 1);
1762
+ return newArray;
1763
+ }
1764
+ return arr;
1765
+ };
1766
+ var removeValueFromArrayAll = (arr, value) => {
1767
+ return arr.filter((item) => item !== value);
1768
+ };
1769
+ }
1770
+ });
1771
+ var require_string2 = __commonJS2({
1772
+ "../../node_modules/@domql/utils/dist/cjs/string.js"(exports2, module22) {
1773
+ "use strict";
1774
+ var __defProp22 = Object.defineProperty;
1775
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
1776
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
1777
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
1778
+ var __export22 = (target, all) => {
1779
+ for (var name in all)
1780
+ __defProp22(target, name, { get: all[name], enumerable: true });
1781
+ };
1782
+ var __copyProps22 = (to, from, except, desc) => {
1783
+ if (from && typeof from === "object" || typeof from === "function") {
1784
+ for (let key of __getOwnPropNames22(from))
1785
+ if (!__hasOwnProp22.call(to, key) && key !== except)
1786
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
1787
+ }
1788
+ return to;
1789
+ };
1790
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
1791
+ var string_exports = {};
1792
+ __export22(string_exports, {
1793
+ lowercaseFirstLetter: () => lowercaseFirstLetter,
1794
+ replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
1795
+ stringIncludesAny: () => stringIncludesAny,
1796
+ trimStringFromSymbols: () => trimStringFromSymbols
1797
+ });
1798
+ module22.exports = __toCommonJS22(string_exports);
1799
+ var stringIncludesAny = (str, characters) => {
1800
+ for (const char of characters) {
1801
+ if (str.includes(char)) {
1802
+ return true;
1803
+ }
1804
+ }
1805
+ return false;
1806
+ };
1807
+ var trimStringFromSymbols = (str, characters) => {
1808
+ const pattern = new RegExp(`[${characters.join("\\")}]`, "g");
1809
+ return str.replace(pattern, "");
1810
+ };
1811
+ var brackRegex = {
1812
+ 2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
1813
+ 3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
1814
+ };
1815
+ var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
1816
+ if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
1817
+ return str;
1818
+ const reg = brackRegex[options.bracketsLength || 2];
1819
+ return str.replace(reg, (_, parentPath, variable) => {
1820
+ if (parentPath) {
1821
+ const parentLevels = parentPath.match(options.bracketsLength === 3 ? /\.\.\.\//g : /\.\.\//g).length;
1822
+ let parentState = state;
1823
+ for (let i = 0; i < parentLevels; i++) {
1824
+ parentState = parentState.parent;
1825
+ if (!parentState) {
1826
+ return "";
1827
+ }
1828
+ }
1829
+ const value = parentState[variable.trim()];
1830
+ return value !== void 0 ? `${value}` : "";
1831
+ } else {
1832
+ const value = state[variable.trim()];
1833
+ return value !== void 0 ? `${value}` : "";
1834
+ }
1835
+ });
1836
+ };
1837
+ var lowercaseFirstLetter = (inputString) => {
1838
+ return `${inputString.charAt(0).toLowerCase()}${inputString.slice(1)}`;
1839
+ };
1840
+ }
1841
+ });
1842
+ var require_object2 = __commonJS2({
1843
+ "../../node_modules/@domql/utils/dist/cjs/object.js"(exports2, module22) {
1844
+ "use strict";
1845
+ var __defProp22 = Object.defineProperty;
1846
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
1847
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
1848
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
1849
+ var __export22 = (target, all) => {
1850
+ for (var name in all)
1851
+ __defProp22(target, name, { get: all[name], enumerable: true });
1852
+ };
1853
+ var __copyProps22 = (to, from, except, desc) => {
1854
+ if (from && typeof from === "object" || typeof from === "function") {
1855
+ for (let key of __getOwnPropNames22(from))
1856
+ if (!__hasOwnProp22.call(to, key) && key !== except)
1857
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
1858
+ }
1859
+ return to;
1860
+ };
1861
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
1862
+ var object_exports = {};
1863
+ __export22(object_exports, {
1864
+ clone: () => clone,
1865
+ deepClone: () => deepClone2,
1866
+ deepCloneExclude: () => deepCloneExclude,
1867
+ deepCloneWithExtend: () => deepCloneWithExtend,
1868
+ deepContains: () => deepContains,
1869
+ deepDestringify: () => deepDestringify,
1870
+ deepDiff: () => deepDiff,
1871
+ deepMerge: () => deepMerge2,
1872
+ deepStringify: () => deepStringify,
1873
+ detachFunctionsFromObject: () => detachFunctionsFromObject,
1874
+ diff: () => diff,
1875
+ diffArrays: () => diffArrays,
1876
+ diffObjects: () => diffObjects,
1877
+ exec: () => exec,
1878
+ flattenRecursive: () => flattenRecursive,
1879
+ hasOwnProperty: () => hasOwnProperty,
1880
+ isEmpty: () => isEmpty,
1881
+ isEmptyObject: () => isEmptyObject,
1882
+ isEqualDeep: () => isEqualDeep,
1883
+ makeObjectWithoutPrototype: () => makeObjectWithoutPrototype,
1884
+ map: () => map,
1885
+ merge: () => merge2,
1886
+ mergeArrayExclude: () => mergeArrayExclude,
1887
+ mergeIfExisted: () => mergeIfExisted,
1888
+ objectToString: () => objectToString,
1889
+ overwrite: () => overwrite,
1890
+ overwriteDeep: () => overwriteDeep,
1891
+ overwriteShallow: () => overwriteShallow,
1892
+ removeFromObject: () => removeFromObject,
1893
+ stringToObject: () => stringToObject
1894
+ });
1895
+ module22.exports = __toCommonJS22(object_exports);
1896
+ var import_globals2 = require_globals2();
1897
+ var import_types = require_types2();
1898
+ var import_array = require_array2();
1899
+ var import_string = require_string2();
1900
+ var exec = (param, element, state, context) => {
1901
+ if ((0, import_types.isFunction)(param)) {
1902
+ return param(
1903
+ element,
1904
+ state || element.state,
1905
+ context || element.context
1906
+ );
1907
+ }
1908
+ return param;
1909
+ };
1910
+ var map = (obj, extention, element) => {
1911
+ for (const e in extention) {
1912
+ obj[e] = exec(extention[e], element);
1913
+ }
1914
+ };
1915
+ var merge2 = (element, obj, excludeFrom = []) => {
1916
+ for (const e in obj) {
1917
+ const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, e);
1918
+ if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
1919
+ continue;
1920
+ const elementProp = element[e];
1921
+ const objProp = obj[e];
1922
+ if (elementProp === void 0) {
1923
+ element[e] = objProp;
1924
+ }
1925
+ }
1926
+ return element;
1927
+ };
1928
+ var deepMerge2 = (element, extend, excludeFrom = []) => {
1929
+ for (const e in extend) {
1930
+ const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(extend, e);
1931
+ if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
1932
+ continue;
1933
+ const elementProp = element[e];
1934
+ const extendProp = extend[e];
1935
+ if ((0, import_types.isObjectLike)(elementProp) && (0, import_types.isObjectLike)(extendProp)) {
1936
+ deepMerge2(elementProp, extendProp, excludeFrom);
1937
+ } else if (elementProp === void 0) {
1938
+ element[e] = extendProp;
1939
+ }
1940
+ }
1941
+ return element;
1942
+ };
1943
+ var clone = (obj, excludeFrom = []) => {
1944
+ const o = {};
1945
+ for (const prop in obj) {
1946
+ const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, prop);
1947
+ if (!hasOwnProperty2 || excludeFrom.includes(prop) || prop.startsWith("__"))
1948
+ continue;
1949
+ o[prop] = obj[prop];
1950
+ }
1951
+ return o;
1952
+ };
1953
+ var deepCloneExclude = (obj, excludeFrom = []) => {
1954
+ if ((0, import_types.isArray)(obj)) {
1955
+ return obj.map((x) => deepCloneExclude(x, excludeFrom));
1956
+ }
1957
+ const o = {};
1958
+ for (const k in obj) {
1959
+ const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, k);
1960
+ if (!hasOwnProperty2 || excludeFrom.includes(k) || k.startsWith("__"))
1961
+ continue;
1962
+ let v = obj[k];
1963
+ if (k === "extend" && (0, import_types.isArray)(v)) {
1964
+ v = mergeArrayExclude(v, excludeFrom);
1965
+ }
1966
+ if ((0, import_types.isArray)(v)) {
1967
+ o[k] = v.map((x) => deepCloneExclude(x, excludeFrom));
1968
+ } else if ((0, import_types.isObject)(v)) {
1969
+ o[k] = deepCloneExclude(v, excludeFrom);
1970
+ } else
1971
+ o[k] = v;
1972
+ }
1973
+ return o;
1974
+ };
1975
+ var mergeArrayExclude = (arr, excl = []) => {
1976
+ return arr.reduce((acc, curr) => deepMerge2(acc, deepCloneExclude(curr, excl)), {});
1977
+ };
1978
+ var deepClone2 = (obj, excludeFrom = [], cleanUndefined = false) => {
1979
+ const o = (0, import_types.isArray)(obj) ? [] : {};
1980
+ for (const prop in obj) {
1981
+ if (!Object.prototype.hasOwnProperty.call(obj, prop))
1982
+ continue;
1983
+ if (prop === "__proto__")
1984
+ continue;
1985
+ if (excludeFrom.includes(prop) || prop.startsWith("__"))
1986
+ continue;
1987
+ let objProp = obj[prop];
1988
+ if (cleanUndefined && (0, import_types.isUndefined)(objProp))
1989
+ continue;
1990
+ if (prop === "extend" && (0, import_types.isArray)(objProp)) {
1991
+ objProp = (0, import_array.mergeArray)(objProp);
1992
+ }
1993
+ if ((0, import_types.isObjectLike)(objProp)) {
1994
+ o[prop] = deepClone2(objProp, excludeFrom, cleanUndefined);
1995
+ } else
1996
+ o[prop] = objProp;
1997
+ }
1998
+ return o;
1999
+ };
2000
+ var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
2001
+ const o = (0, import_types.isArray)(obj) ? [] : {};
2002
+ for (const prop in obj) {
2003
+ if (!Object.prototype.hasOwnProperty.call(obj, prop))
2004
+ continue;
2005
+ const objProp = obj[prop];
2006
+ if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
2007
+ continue;
2008
+ if ((0, import_types.isObjectLike)(objProp)) {
2009
+ o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
2010
+ } else
2011
+ o[prop] = objProp;
2012
+ }
2013
+ return o;
2014
+ };
2015
+ var deepStringify = (obj, stringified = {}) => {
2016
+ for (const prop in obj) {
2017
+ const objProp = obj[prop];
2018
+ if ((0, import_types.isFunction)(objProp)) {
2019
+ stringified[prop] = objProp.toString();
2020
+ } else if ((0, import_types.isObject)(objProp)) {
2021
+ stringified[prop] = {};
2022
+ deepStringify(objProp, stringified[prop]);
2023
+ } else if ((0, import_types.isArray)(objProp)) {
2024
+ stringified[prop] = [];
2025
+ objProp.forEach((v, i) => {
2026
+ if ((0, import_types.isObject)(v)) {
2027
+ stringified[prop][i] = {};
2028
+ deepStringify(v, stringified[prop][i]);
2029
+ } else if ((0, import_types.isFunction)(v)) {
2030
+ stringified[prop][i] = v.toString();
2031
+ } else {
2032
+ stringified[prop][i] = v;
2033
+ }
2034
+ });
2035
+ } else {
2036
+ stringified[prop] = objProp;
2037
+ }
2038
+ }
2039
+ return stringified;
2040
+ };
2041
+ var objectToString = (obj, indent = 0) => {
2042
+ const spaces = " ".repeat(indent);
2043
+ let str = "{\n";
2044
+ for (const [key, value] of Object.entries(obj)) {
2045
+ const keyNotAllowdChars = (0, import_string.stringIncludesAny)(key, ["&", "*", "-", ":", "%", "{", "}", ">", "<", "@", ".", "/", "!", " "]);
2046
+ const stringedKey = keyNotAllowdChars ? `'${key}'` : key;
2047
+ str += `${spaces} ${stringedKey}: `;
2048
+ if ((0, import_types.isArray)(value)) {
2049
+ str += "[\n";
2050
+ for (const element of value) {
2051
+ if ((0, import_types.isObject)(element) && element !== null) {
2052
+ str += `${spaces} ${objectToString(element, indent + 2)},
2053
+ `;
2054
+ } else if ((0, import_types.isString)(element)) {
2055
+ str += `${spaces} '${element}',
2056
+ `;
2057
+ } else {
2058
+ str += `${spaces} ${element},
2059
+ `;
2060
+ }
2061
+ }
2062
+ str += `${spaces} ]`;
2063
+ } else if ((0, import_types.isObjectLike)(value)) {
2064
+ str += objectToString(value, indent + 1);
2065
+ } else if ((0, import_types.isString)(value)) {
2066
+ str += (0, import_string.stringIncludesAny)(value, ["\n", "'"]) ? `\`${value}\`` : `'${value}'`;
2067
+ } else {
2068
+ str += value;
2069
+ }
2070
+ str += ",\n";
2071
+ }
2072
+ str += `${spaces}}`;
2073
+ return str;
2074
+ };
2075
+ var detachFunctionsFromObject = (obj, detached = {}) => {
2076
+ for (const prop in obj) {
2077
+ const objProp = obj[prop];
2078
+ if ((0, import_types.isFunction)(objProp))
2079
+ continue;
2080
+ else if ((0, import_types.isObject)(objProp)) {
2081
+ detached[prop] = {};
2082
+ deepStringify(objProp, detached[prop]);
2083
+ } else if ((0, import_types.isArray)(objProp)) {
2084
+ detached[prop] = [];
2085
+ objProp.forEach((v, i) => {
2086
+ if ((0, import_types.isFunction)(v))
2087
+ return;
2088
+ if ((0, import_types.isObject)(v)) {
2089
+ detached[prop][i] = {};
2090
+ detachFunctionsFromObject(v, detached[prop][i]);
2091
+ } else {
2092
+ detached[prop][i] = v;
2093
+ }
2094
+ });
2095
+ } else {
2096
+ detached[prop] = objProp;
2097
+ }
2098
+ }
2099
+ return detached;
2100
+ };
2101
+ var deepDestringify = (obj, destringified = {}) => {
2102
+ for (const prop in obj) {
2103
+ const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, prop);
2104
+ if (!hasOwnProperty2)
2105
+ continue;
2106
+ const objProp = obj[prop];
2107
+ if ((0, import_types.isString)(objProp)) {
2108
+ if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
2109
+ try {
2110
+ const evalProp = import_globals2.window.eval(`(${objProp})`);
2111
+ destringified[prop] = evalProp;
2112
+ } catch (e) {
2113
+ if (e)
2114
+ destringified[prop] = objProp;
2115
+ }
2116
+ } else {
2117
+ destringified[prop] = objProp;
2118
+ }
2119
+ } else if ((0, import_types.isArray)(objProp)) {
2120
+ destringified[prop] = [];
2121
+ objProp.forEach((arrProp) => {
2122
+ if ((0, import_types.isString)(arrProp)) {
2123
+ if (arrProp.includes("=>") || arrProp.includes("function") || arrProp.startsWith("(")) {
2124
+ try {
2125
+ const evalProp = import_globals2.window.eval(`(${arrProp})`);
2126
+ destringified[prop].push(evalProp);
2127
+ } catch (e) {
2128
+ if (e)
2129
+ destringified[prop].push(arrProp);
2130
+ }
2131
+ } else {
2132
+ destringified[prop].push(arrProp);
2133
+ }
2134
+ } else if ((0, import_types.isObject)(arrProp)) {
2135
+ destringified[prop].push(deepDestringify(arrProp));
2136
+ } else {
2137
+ destringified[prop].push(arrProp);
2138
+ }
2139
+ });
2140
+ } else if ((0, import_types.isObject)(objProp)) {
2141
+ destringified[prop] = deepDestringify(objProp, destringified[prop]);
2142
+ } else {
2143
+ destringified[prop] = objProp;
2144
+ }
2145
+ }
2146
+ return destringified;
2147
+ };
2148
+ var stringToObject = (str, opts = { verbose: true }) => {
2149
+ try {
2150
+ return import_globals2.window.eval("(" + str + ")");
2151
+ } catch (e) {
2152
+ if (opts.verbose)
2153
+ console.warn(e);
2154
+ }
2155
+ };
2156
+ var diffObjects = (original, objToDiff, cache) => {
2157
+ for (const e in objToDiff) {
2158
+ if (e === "ref")
2159
+ continue;
2160
+ const originalProp = original[e];
2161
+ const objToDiffProp = objToDiff[e];
2162
+ if ((0, import_types.isObject)(originalProp) && (0, import_types.isObject)(objToDiffProp)) {
2163
+ cache[e] = {};
2164
+ diff(originalProp, objToDiffProp, cache[e]);
2165
+ } else if (objToDiffProp !== void 0) {
2166
+ cache[e] = objToDiffProp;
2167
+ }
2168
+ }
2169
+ return cache;
2170
+ };
2171
+ var diffArrays = (original, objToDiff, cache) => {
2172
+ if (original.length !== objToDiff.length) {
2173
+ cache = objToDiff;
2174
+ } else {
2175
+ const diffArr = [];
2176
+ for (let i = 0; i < original.length; i++) {
2177
+ const diffObj = diff(original[i], objToDiff[i]);
2178
+ if (Object.keys(diffObj).length > 0) {
2179
+ diffArr.push(diffObj);
2180
+ }
2181
+ }
2182
+ if (diffArr.length > 0) {
2183
+ cache = diffArr;
2184
+ }
2185
+ }
2186
+ return cache;
2187
+ };
2188
+ var diff = (original, objToDiff, cache = {}) => {
2189
+ if ((0, import_types.isArray)(original) && (0, import_types.isArray)(objToDiff)) {
2190
+ cache = [];
2191
+ diffArrays(original, objToDiff, cache);
2192
+ } else {
2193
+ diffObjects(original, objToDiff, cache);
2194
+ }
2195
+ return cache;
2196
+ };
2197
+ var hasOwnProperty = (o, ...args) => Object.prototype.hasOwnProperty.call(o, ...args);
2198
+ var isEmpty = (o) => Object.keys(o).length === 0;
2199
+ var isEmptyObject = (o) => (0, import_types.isObject)(o) && isEmpty(o);
2200
+ var makeObjectWithoutPrototype = () => /* @__PURE__ */ Object.create(null);
2201
+ var deepDiff = (lhs, rhs) => {
2202
+ if (lhs === rhs)
2203
+ return {};
2204
+ if (!(0, import_types.isObjectLike)(lhs) || !(0, import_types.isObjectLike)(rhs))
2205
+ return rhs;
2206
+ const deletedValues = Object.keys(lhs).reduce((acc, key) => {
2207
+ if (!hasOwnProperty(rhs, key)) {
2208
+ acc[key] = void 0;
2209
+ }
2210
+ return acc;
2211
+ }, makeObjectWithoutPrototype());
2212
+ if ((0, import_types.isDate)(lhs) || (0, import_types.isDate)(rhs)) {
2213
+ if (lhs.valueOf() === rhs.valueOf())
2214
+ return {};
2215
+ return rhs;
2216
+ }
2217
+ return Object.keys(rhs).reduce((acc, key) => {
2218
+ if (!hasOwnProperty(lhs, key)) {
2219
+ acc[key] = rhs[key];
2220
+ return acc;
2221
+ }
2222
+ const difference = diff(lhs[key], rhs[key]);
2223
+ if (isEmptyObject(difference) && !(0, import_types.isDate)(difference) && (isEmptyObject(lhs[key]) || !isEmptyObject(rhs[key]))) {
2224
+ return acc;
2225
+ }
2226
+ acc[key] = difference;
2227
+ return acc;
2228
+ }, deletedValues);
2229
+ };
2230
+ var overwrite = (element, params, excludeFrom = []) => {
2231
+ const { ref } = element;
2232
+ const changes = {};
2233
+ for (const e in params) {
2234
+ if (excludeFrom.includes(e) || e.startsWith("__"))
2235
+ continue;
2236
+ const elementProp = element[e];
2237
+ const paramsProp = params[e];
2238
+ if (paramsProp) {
2239
+ ref.__cache[e] = changes[e] = elementProp;
2240
+ ref[e] = paramsProp;
2241
+ }
2242
+ }
2243
+ return changes;
2244
+ };
2245
+ var overwriteShallow = (obj, params, excludeFrom = []) => {
2246
+ for (const e in params) {
2247
+ if (excludeFrom.includes(e) || e.startsWith("__"))
2248
+ continue;
2249
+ obj[e] = params[e];
2250
+ }
2251
+ return obj;
2252
+ };
2253
+ var overwriteDeep = (obj, params, excludeFrom = []) => {
2254
+ for (const e in params) {
2255
+ if (e === "__proto__")
2256
+ continue;
2257
+ if (excludeFrom.includes(e) || e.startsWith("__"))
2258
+ continue;
2259
+ const objProp = obj[e];
2260
+ const paramsProp = params[e];
2261
+ if ((0, import_types.isObjectLike)(objProp) && (0, import_types.isObjectLike)(paramsProp)) {
2262
+ overwriteDeep(objProp, paramsProp);
2263
+ } else if (paramsProp !== void 0) {
2264
+ obj[e] = paramsProp;
2265
+ }
2266
+ }
2267
+ return obj;
2268
+ };
2269
+ var mergeIfExisted = (a, b) => {
2270
+ if ((0, import_types.isObjectLike)(a) && (0, import_types.isObjectLike)(b))
2271
+ return deepMerge2(a, b);
2272
+ return a || b;
2273
+ };
2274
+ var flattenRecursive = (param, prop, stack = []) => {
2275
+ const objectized = (0, import_array.mergeAndCloneIfArray)(param);
2276
+ stack.push(objectized);
2277
+ const extendOfExtend = objectized[prop];
2278
+ if (extendOfExtend)
2279
+ flattenRecursive(extendOfExtend, prop, stack);
2280
+ delete objectized[prop];
2281
+ return stack;
2282
+ };
2283
+ var isEqualDeep = (param, element, visited = /* @__PURE__ */ new Set()) => {
2284
+ if (typeof param !== "object" || typeof element !== "object" || param === null || element === null) {
2285
+ return param === element;
2286
+ }
2287
+ if (visited.has(param) || visited.has(element)) {
2288
+ return true;
2289
+ }
2290
+ visited.add(param);
2291
+ visited.add(element);
2292
+ const keysParam = Object.keys(param);
2293
+ const keysElement = Object.keys(element);
2294
+ if (keysParam.length !== keysElement.length) {
2295
+ return false;
2296
+ }
2297
+ for (const key of keysParam) {
2298
+ if (!keysElement.includes(key)) {
2299
+ return false;
2300
+ }
2301
+ const paramProp = param[key];
2302
+ const elementProp = element[key];
2303
+ if (!isEqualDeep(paramProp, elementProp, visited)) {
2304
+ return false;
2305
+ }
2306
+ }
2307
+ return true;
2308
+ };
2309
+ var deepContains = (obj1, obj2) => {
2310
+ if (typeof obj1 !== typeof obj2) {
2311
+ return false;
2312
+ }
2313
+ if ((0, import_types.isObjectLike)(obj1)) {
2314
+ if (Array.isArray(obj1) && Array.isArray(obj2)) {
2315
+ if (obj1.length !== obj2.length) {
2316
+ return false;
2317
+ }
2318
+ for (let i = 0; i < obj1.length; i++) {
2319
+ if (!deepContains(obj1[i], obj2[i])) {
2320
+ return false;
2321
+ }
2322
+ }
2323
+ } else if ((0, import_types.isObjectLike)(obj1) && obj2 !== null) {
2324
+ for (const key in obj1) {
2325
+ const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj2, key);
2326
+ if (!hasOwnProperty2 || !deepContains(obj1[key], obj2[key])) {
2327
+ return false;
2328
+ }
2329
+ }
2330
+ }
2331
+ } else {
2332
+ return obj2 === obj1;
2333
+ }
2334
+ return true;
2335
+ };
2336
+ var removeFromObject = (obj, props) => {
2337
+ if (props === void 0 || props === null)
2338
+ return obj;
2339
+ if ((0, import_types.is)(props)("string", "number")) {
2340
+ delete obj[props];
2341
+ } else if ((0, import_types.isArray)(props)) {
2342
+ props.forEach((prop) => delete obj[prop]);
2343
+ } else {
2344
+ throw new Error("Invalid input: props must be a string or an array of strings");
2345
+ }
2346
+ return obj;
2347
+ };
2348
+ }
2349
+ });
2350
+ var require_function2 = __commonJS2({
2351
+ "../../node_modules/@domql/utils/dist/cjs/function.js"(exports2, module22) {
2352
+ "use strict";
2353
+ var __defProp22 = Object.defineProperty;
2354
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
2355
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
2356
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
2357
+ var __export22 = (target, all) => {
2358
+ for (var name in all)
2359
+ __defProp22(target, name, { get: all[name], enumerable: true });
2360
+ };
2361
+ var __copyProps22 = (to, from, except, desc) => {
2362
+ if (from && typeof from === "object" || typeof from === "function") {
2363
+ for (let key of __getOwnPropNames22(from))
2364
+ if (!__hasOwnProp22.call(to, key) && key !== except)
2365
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
2366
+ }
2367
+ return to;
2368
+ };
2369
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
2370
+ var function_exports = {};
2371
+ __export22(function_exports, {
2372
+ debounce: () => debounce,
2373
+ debounceOnContext: () => debounceOnContext,
2374
+ isStringFunction: () => isStringFunction,
2375
+ memoize: () => memoize
2376
+ });
2377
+ module22.exports = __toCommonJS22(function_exports);
2378
+ function debounce(func, wait, immediate) {
2379
+ let timeout;
2380
+ return function() {
2381
+ const context = this;
2382
+ const args = arguments;
2383
+ const later = function() {
2384
+ timeout = null;
2385
+ if (!immediate)
2386
+ func.apply(context, args);
2387
+ };
2388
+ const callNow = immediate && !timeout;
2389
+ clearTimeout(timeout);
2390
+ timeout = setTimeout(later, wait);
2391
+ if (callNow)
2392
+ func.apply(context, args);
2393
+ };
2394
+ }
2395
+ var debounceOnContext = (element, func, timeout = 300) => {
2396
+ let timer;
2397
+ return (...args) => {
2398
+ clearTimeout(timer);
2399
+ timer = setTimeout(() => {
2400
+ func.apply(element, args);
2401
+ }, timeout);
2402
+ };
2403
+ };
2404
+ var memoize = (fn) => {
2405
+ const cache = {};
2406
+ return (...args) => {
2407
+ const n = args[0];
2408
+ if (n in cache) {
2409
+ return cache[n];
2410
+ } else {
2411
+ const result = fn(n);
2412
+ cache[n] = result;
2413
+ return result;
2414
+ }
2415
+ };
2416
+ };
2417
+ var isStringFunction = (inputString) => {
2418
+ const functionRegex = /^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/;
2419
+ return functionRegex.test(inputString);
2420
+ };
2421
+ }
2422
+ });
2423
+ var require_log2 = __commonJS2({
2424
+ "../../node_modules/@domql/utils/dist/cjs/log.js"(exports2, module22) {
2425
+ "use strict";
2426
+ var __defProp22 = Object.defineProperty;
2427
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
2428
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
2429
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
2430
+ var __export22 = (target, all) => {
2431
+ for (var name in all)
2432
+ __defProp22(target, name, { get: all[name], enumerable: true });
2433
+ };
2434
+ var __copyProps22 = (to, from, except, desc) => {
2435
+ if (from && typeof from === "object" || typeof from === "function") {
2436
+ for (let key of __getOwnPropNames22(from))
2437
+ if (!__hasOwnProp22.call(to, key) && key !== except)
2438
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
2439
+ }
2440
+ return to;
2441
+ };
2442
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
2443
+ var log_exports = {};
2444
+ __export22(log_exports, {
2445
+ logGroupIf: () => logGroupIf,
2446
+ logIf: () => logIf
2447
+ });
2448
+ module22.exports = __toCommonJS22(log_exports);
2449
+ var logIf = (bool, ...arg) => {
2450
+ if (bool)
2451
+ arg.map((v) => console.log(v));
2452
+ };
2453
+ var logGroupIf = (bool, key, ...arg) => {
2454
+ if (bool) {
2455
+ console.group(key);
2456
+ arg.map((v) => console.log(v));
2457
+ console.groupEnd(key);
2458
+ }
2459
+ };
2460
+ }
2461
+ });
2462
+ var require_cookie2 = __commonJS2({
2463
+ "../../node_modules/@domql/utils/dist/cjs/cookie.js"(exports2, module22) {
2464
+ "use strict";
2465
+ var __defProp22 = Object.defineProperty;
2466
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
2467
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
2468
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
2469
+ var __export22 = (target, all) => {
2470
+ for (var name in all)
2471
+ __defProp22(target, name, { get: all[name], enumerable: true });
2472
+ };
2473
+ var __copyProps22 = (to, from, except, desc) => {
2474
+ if (from && typeof from === "object" || typeof from === "function") {
2475
+ for (let key of __getOwnPropNames22(from))
2476
+ if (!__hasOwnProp22.call(to, key) && key !== except)
2477
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
2478
+ }
2479
+ return to;
2480
+ };
2481
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
2482
+ var cookie_exports = {};
2483
+ __export22(cookie_exports, {
2484
+ getCookie: () => getCookie,
2485
+ isMobile: () => isMobile,
2486
+ setCookie: () => setCookie
2487
+ });
2488
+ module22.exports = __toCommonJS22(cookie_exports);
2489
+ var import_types = require_types2();
2490
+ var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
2491
+ var setCookie = (cname, cvalue, exdays = 365) => {
2492
+ if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
2493
+ return;
2494
+ const d = /* @__PURE__ */ new Date();
2495
+ d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
2496
+ const expires = `expires=${d.toUTCString()}`;
2497
+ document.cookie = `${cname}=${cvalue};${expires};path=/`;
2498
+ };
2499
+ var getCookie = (cname) => {
2500
+ if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
2501
+ return;
2502
+ const name = `${cname}=`;
2503
+ const decodedCookie = decodeURIComponent(document.cookie);
2504
+ const ca = decodedCookie.split(";");
2505
+ for (let i = 0; i < ca.length; i++) {
2506
+ let c = ca[i];
2507
+ while (c.charAt(0) === " ")
2508
+ c = c.substring(1);
2509
+ if (c.indexOf(name) === 0)
2510
+ return c.substring(name.length, c.length);
2511
+ }
2512
+ return "";
2513
+ };
2514
+ }
2515
+ });
2516
+ var require_tags2 = __commonJS2({
2517
+ "../../node_modules/@domql/utils/dist/cjs/tags.js"(exports2, module22) {
2518
+ "use strict";
2519
+ var __defProp22 = Object.defineProperty;
2520
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
2521
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
2522
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
2523
+ var __export22 = (target, all) => {
2524
+ for (var name in all)
2525
+ __defProp22(target, name, { get: all[name], enumerable: true });
2526
+ };
2527
+ var __copyProps22 = (to, from, except, desc) => {
2528
+ if (from && typeof from === "object" || typeof from === "function") {
2529
+ for (let key of __getOwnPropNames22(from))
2530
+ if (!__hasOwnProp22.call(to, key) && key !== except)
2531
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
2532
+ }
2533
+ return to;
2534
+ };
2535
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
2536
+ var tags_exports = {};
2537
+ __export22(tags_exports, {
2538
+ HTML_TAGS: () => HTML_TAGS,
2539
+ isValidHtmlTag: () => isValidHtmlTag
2540
+ });
2541
+ module22.exports = __toCommonJS22(tags_exports);
2542
+ var HTML_TAGS = {
2543
+ root: [
2544
+ "body",
2545
+ "html"
2546
+ ],
2547
+ head: [
2548
+ "title",
2549
+ "base",
2550
+ "meta",
2551
+ "style"
2552
+ ],
2553
+ body: [
2554
+ "string",
2555
+ "fragment",
2556
+ "a",
2557
+ "abbr",
2558
+ "acronym",
2559
+ "address",
2560
+ "applet",
2561
+ "area",
2562
+ "article",
2563
+ "aside",
2564
+ "audio",
2565
+ "b",
2566
+ "basefont",
2567
+ "bdi",
2568
+ "bdo",
2569
+ "big",
2570
+ "blockquote",
2571
+ "br",
2572
+ "button",
2573
+ "canvas",
2574
+ "caption",
2575
+ "center",
2576
+ "cite",
2577
+ "code",
2578
+ "search",
2579
+ "col",
2580
+ "colgroup",
2581
+ "data",
2582
+ "datalist",
2583
+ "dd",
2584
+ "del",
2585
+ "details",
2586
+ "dfn",
2587
+ "dialog",
2588
+ "dir",
2589
+ "div",
2590
+ "dl",
2591
+ "dt",
2592
+ "em",
2593
+ "embed",
2594
+ "fieldset",
2595
+ "figcaption",
2596
+ "figure",
2597
+ "font",
2598
+ "footer",
2599
+ "form",
2600
+ "frame",
2601
+ "frameset",
2602
+ "h1",
2603
+ "h2",
2604
+ "h3",
2605
+ "h4",
2606
+ "h5",
2607
+ "h6",
2608
+ "head",
2609
+ "header",
2610
+ "hr",
2611
+ "i",
2612
+ "iframe",
2613
+ "img",
2614
+ "input",
2615
+ "ins",
2616
+ "kbd",
2617
+ "label",
2618
+ "legend",
2619
+ "li",
2620
+ "link",
2621
+ "main",
2622
+ "map",
2623
+ "mark",
2624
+ "meter",
2625
+ "nav",
2626
+ "noframes",
2627
+ "noscript",
2628
+ "object",
2629
+ "ol",
2630
+ "optgroup",
2631
+ "option",
2632
+ "output",
2633
+ "p",
2634
+ "param",
2635
+ "picture",
2636
+ "pre",
2637
+ "progress",
2638
+ "hgroup",
2639
+ "q",
2640
+ "rp",
2641
+ "rt",
2642
+ "ruby",
2643
+ "s",
2644
+ "samp",
2645
+ "script",
2646
+ "section",
2647
+ "select",
2648
+ "small",
2649
+ "source",
2650
+ "span",
2651
+ "strike",
2652
+ "strong",
2653
+ "sub",
2654
+ "summary",
2655
+ "sup",
2656
+ "table",
2657
+ "tbody",
2658
+ "td",
2659
+ "template",
2660
+ "hgroup",
2661
+ "textarea",
2662
+ "tfoot",
2663
+ "th",
2664
+ "thead",
2665
+ "time",
2666
+ "tr",
2667
+ "track",
2668
+ "tt",
2669
+ "u",
2670
+ "ul",
2671
+ "var",
2672
+ "video",
2673
+ "wbr",
2674
+ // SVG
2675
+ "svg",
2676
+ "path"
2677
+ ]
2678
+ };
2679
+ var isValidHtmlTag = (arg) => HTML_TAGS.body.includes(arg);
2680
+ }
2681
+ });
2682
+ var require_cjs4 = __commonJS2({
2683
+ "../../node_modules/@domql/utils/dist/cjs/index.js"(exports2, module22) {
2684
+ "use strict";
2685
+ var __defProp22 = Object.defineProperty;
2686
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
2687
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
2688
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
2689
+ var __copyProps22 = (to, from, except, desc) => {
2690
+ if (from && typeof from === "object" || typeof from === "function") {
2691
+ for (let key of __getOwnPropNames22(from))
2692
+ if (!__hasOwnProp22.call(to, key) && key !== except)
2693
+ __defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
2694
+ }
2695
+ return to;
2696
+ };
2697
+ var __reExport = (target, mod, secondTarget) => (__copyProps22(target, mod, "default"), secondTarget && __copyProps22(secondTarget, mod, "default"));
2698
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
2699
+ var utils_exports = {};
2700
+ module22.exports = __toCommonJS22(utils_exports);
2701
+ __reExport(utils_exports, require_key2(), module22.exports);
2702
+ __reExport(utils_exports, require_env2(), module22.exports);
2703
+ __reExport(utils_exports, require_types2(), module22.exports);
2704
+ __reExport(utils_exports, require_object2(), module22.exports);
2705
+ __reExport(utils_exports, require_function2(), module22.exports);
2706
+ __reExport(utils_exports, require_array2(), module22.exports);
2707
+ __reExport(utils_exports, require_node2(), module22.exports);
2708
+ __reExport(utils_exports, require_log2(), module22.exports);
2709
+ __reExport(utils_exports, require_string2(), module22.exports);
2710
+ __reExport(utils_exports, require_globals2(), module22.exports);
2711
+ __reExport(utils_exports, require_cookie2(), module22.exports);
2712
+ __reExport(utils_exports, require_tags2(), module22.exports);
2713
+ }
2714
+ });
2715
+ var src_exports = {};
2716
+ __export2(src_exports, {
2717
+ arrayzeValue: () => arrayzeValue2,
2718
+ copyStringToClipboard: () => copyStringToClipboard,
2719
+ fibonacciNumberByIndex: () => fibonacciNumberByIndex,
2720
+ findClosestNumber: () => findClosestNumber,
2721
+ findClosestNumberInFactory: () => findClosestNumberInFactory,
2722
+ formatDate: () => formatDate,
2723
+ loadJavascriptFile: () => loadJavascriptFile,
2724
+ removeChars: () => removeChars,
2725
+ toCamelCase: () => toCamelCase,
2726
+ toDashCase: () => toDashCase2,
2727
+ toDescriptionCase: () => toDescriptionCase,
2728
+ toTitleCase: () => toTitleCase,
2729
+ toggleFullscreen: () => toggleFullscreen
2730
+ });
2731
+ module2.exports = __toCommonJS2(src_exports);
2732
+ var import_utils22 = __toESM2(require_cjs4(), 1);
2733
+ var toggleFullscreen = (el) => {
2734
+ if (!document.fullscreenElement) {
2735
+ el.node.requestFullscreen().catch((err) => {
2736
+ console.warn(`Error attempting to enable fullscreen mode: ${err.message} (${err.name})`);
2737
+ });
2738
+ } else {
2739
+ document.exitFullscreen();
2740
+ }
2741
+ };
2742
+ var import_utils13 = __toESM2(require_cjs4(), 1);
2743
+ var findClosestNumber = (number, arr) => {
2744
+ return ((0, import_utils13.isArray)(arr) ? arr : Object.values(arr)).reduce((prev, curr) => {
2745
+ return Math.abs(curr - number) < Math.abs(prev - number) ? curr : prev;
2746
+ });
2747
+ };
2748
+ var findClosestNumberInFactory = (val, factory) => {
2749
+ val = parseFloat(val);
2750
+ if ((0, import_utils13.isObject)(factory))
2751
+ factory = Object.values(factory);
2752
+ return findClosestNumber(val, factory);
2753
+ };
2754
+ var formatDate = (timestamp) => {
2755
+ if (!timestamp)
2756
+ return "";
2757
+ const d = new Date(timestamp);
2758
+ const ye = new Intl.DateTimeFormat("en", { year: "numeric" }).format(d);
2759
+ const mo = new Intl.DateTimeFormat("en", { month: "short" }).format(d);
2760
+ const da = new Intl.DateTimeFormat("en", { day: "2-digit" }).format(d);
2761
+ return `${da} ${mo}, ${ye}`;
2762
+ };
2763
+ var fibonacciNumberByIndex = function fibonacciNumberByIndex2(n) {
2764
+ const fib = [0, 1];
2765
+ for (let i = 2; i <= n; i++) {
2766
+ fib[i] = fib[i - 1] + fib[i - 2];
2767
+ }
2768
+ return fib[n];
2769
+ };
2770
+ var loadJavascriptFile = (FILE_URL, async = true, doc = document, type = "text/javascript") => {
2771
+ return new Promise((resolve, reject) => {
2772
+ try {
2773
+ const scriptEle = doc.createElement("script");
2774
+ scriptEle.type = type;
2775
+ scriptEle.async = async;
2776
+ scriptEle.src = FILE_URL;
2777
+ scriptEle.addEventListener("load", (ev) => {
2778
+ resolve({
2779
+ status: true
2780
+ });
2781
+ });
2782
+ scriptEle.addEventListener("error", (ev) => {
2783
+ reject({
2784
+ status: false,
2785
+ message: `Failed to load the script ${FILE_URL}`
2786
+ });
2787
+ });
2788
+ doc.body.appendChild(scriptEle);
2789
+ } catch (error) {
2790
+ reject(error);
2791
+ }
2792
+ });
2793
+ };
2794
+ var copyStringToClipboard = (str) => {
2795
+ const el = document.createElement("textarea");
2796
+ el.value = str;
2797
+ el.setAttribute("readonly", "");
2798
+ el.style = { position: "absolute", left: "-9999px" };
2799
+ document.body.appendChild(el);
2800
+ el.select();
2801
+ document.execCommand("copy");
2802
+ document.body.removeChild(el);
2803
+ };
2804
+ var removeChars = (str) => {
2805
+ return str.replace(/[^a-zA-Z0-9_]/g, "");
2806
+ };
2807
+ var toCamelCase = (str) => {
2808
+ return str.replace(/(?:^\w|[A-Z]|\b\w)/g, function(word, index) {
2809
+ return index === 0 ? word.toLowerCase() : word.toUpperCase();
2810
+ }).replaceAll(/\s+/g, "");
2811
+ };
2812
+ var toTitleCase = (str) => str && str.replace(
2813
+ /\w\S*/g,
2814
+ (txt) => {
2815
+ return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
2816
+ }
2817
+ );
2818
+ var toDashCase2 = (val) => val.replace(/[^a-zA-Z0-9]/g, " ").trim().toLowerCase().replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
2819
+ var toDescriptionCase = (str = "") => {
2820
+ const result = str.replace(/([A-Z])/g, " $1");
2821
+ return result.charAt(0).toUpperCase() + result.slice(1);
2822
+ };
2823
+ var arrayzeValue2 = (val) => {
2824
+ if ((0, import_utils22.isArray)(val))
2825
+ return val;
2826
+ if ((0, import_utils22.isString)(val))
2827
+ return val.split(" ");
2828
+ if ((0, import_utils22.isObject)(val))
2829
+ return Object.values(val);
2830
+ if ((0, import_utils22.isNumber)(val))
2831
+ return [val];
2832
+ };
2833
+ }
2834
+ });
2835
+
1382
2836
  // src/system/shadow.js
1383
2837
  var shadow_exports = {};
1384
2838
  __export(shadow_exports, {
@@ -1603,7 +3057,7 @@ var getActiveConfig = (def) => {
1603
3057
  };
1604
3058
 
1605
3059
  // src/system/color.js
1606
- var import_utils9 = __toESM(require_cjs(), 1);
3060
+ var import_utils7 = __toESM(require_cjs(), 1);
1607
3061
 
1608
3062
  // src/utils/unit.js
1609
3063
  var isScalingUnit = (unit) => {
@@ -1713,28 +3167,8 @@ var getRgbTone = (rgb, tone) => {
1713
3167
  };
1714
3168
 
1715
3169
  // src/utils/sequence.js
1716
- var import_utils5 = __toESM(require_cjs(), 1);
1717
-
1718
- // ../utils/src/index.js
1719
- var import_utils4 = __toESM(require_cjs());
1720
-
1721
- // ../utils/src/scaling.js
1722
- var import_utils3 = __toESM(require_cjs());
1723
-
1724
- // ../utils/src/index.js
1725
- var toDashCase = (val) => val.replace(/[^a-zA-Z0-9]/g, " ").trim().toLowerCase().replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
1726
- var arrayzeValue = (val) => {
1727
- if ((0, import_utils4.isArray)(val))
1728
- return val;
1729
- if ((0, import_utils4.isString)(val))
1730
- return val.split(" ");
1731
- if ((0, import_utils4.isObject)(val))
1732
- return Object.values(val);
1733
- if ((0, import_utils4.isNumber)(val))
1734
- return [val];
1735
- };
1736
-
1737
- // src/utils/sequence.js
3170
+ var import_utils3 = __toESM(require_cjs(), 1);
3171
+ var import_utils4 = __toESM(require_cjs3(), 1);
1738
3172
  var numToLetterMap = {
1739
3173
  "-6": "U",
1740
3174
  "-5": "V",
@@ -1873,9 +3307,9 @@ var getSequenceValue = (value = "A", sequenceProps) => {
1873
3307
  unit = UNIT2.default,
1874
3308
  useVariable
1875
3309
  } = sequenceProps;
1876
- if ((0, import_utils5.isString)(value) && value.slice(0, 2) === "--")
3310
+ if ((0, import_utils3.isString)(value) && value.slice(0, 2) === "--")
1877
3311
  return `var(${value})`;
1878
- const prefix = `--${toDashCase(sequenceProps.type.replace(".", "-"))}-`;
3312
+ const prefix = `--${(0, import_utils4.toDashCase)(sequenceProps.type.replace(".", "-"))}-`;
1879
3313
  const startsWithDashOrLetterRegex = /^-?[a-zA-Z]/i;
1880
3314
  const startsWithDashOrLetter = startsWithDashOrLetterRegex.test(value);
1881
3315
  if (value === "none" || value === "auto" || value === "unset" || value === "inherit" || value === "fit-content" || value === "min-content" || value === "max-content" || value.includes("calc") || value.includes("var") || !startsWithDashOrLetter)
@@ -1930,15 +3364,15 @@ var getSequenceValuePropertyPair = (value, propertyName, sequenceProps) => {
1930
3364
  };
1931
3365
 
1932
3366
  // src/utils/var.js
1933
- var import_utils7 = __toESM(require_cjs(), 1);
3367
+ var import_utils5 = __toESM(require_cjs(), 1);
1934
3368
 
1935
3369
  // src/utils/sprite.js
1936
- var import_utils8 = __toESM(require_cjs(), 1);
3370
+ var import_utils6 = __toESM(require_cjs(), 1);
1937
3371
 
1938
3372
  // src/system/color.js
1939
3373
  var getColor = (value, key, config) => {
1940
3374
  const CONFIG2 = config || getActiveConfig();
1941
- if (!(0, import_utils9.isString)(value)) {
3375
+ if (!(0, import_utils7.isString)(value)) {
1942
3376
  if (CONFIG2.verbose)
1943
3377
  console.warn(value, "- type for color is not valid");
1944
3378
  return;
@@ -1947,7 +3381,7 @@ var getColor = (value, key, config) => {
1947
3381
  return `var(${value})`;
1948
3382
  if (key && value[key])
1949
3383
  value = value[key];
1950
- const [name, alpha, tone] = (0, import_utils9.isArray)(value) ? value : value.split(" ");
3384
+ const [name, alpha, tone] = (0, import_utils7.isArray)(value) ? value : value.split(" ");
1951
3385
  const { COLOR: COLOR2, GRADIENT: GRADIENT2 } = CONFIG2;
1952
3386
  let val = COLOR2[name] || GRADIENT2[name];
1953
3387
  if (!val) {
@@ -1977,7 +3411,8 @@ var getColor = (value, key, config) => {
1977
3411
  };
1978
3412
 
1979
3413
  // src/system/spacing.js
1980
- var import_utils12 = __toESM(require_cjs(), 1);
3414
+ var import_utils9 = __toESM(require_cjs3(), 1);
3415
+ var import_utils10 = __toESM(require_cjs(), 1);
1981
3416
  var getSequence = (sequenceProps) => {
1982
3417
  const CONFIG2 = getActiveConfig();
1983
3418
  const { SPACING: SPACING2 } = CONFIG2;
@@ -1988,11 +3423,11 @@ var getSequence = (sequenceProps) => {
1988
3423
  };
1989
3424
  var getSpacingByKey = (value, propertyName = "padding", sequenceProps) => {
1990
3425
  const sequence = getSequence(sequenceProps);
1991
- if ((0, import_utils12.isString)(value) && (value.includes("calc") || value.includes("var"))) {
3426
+ if ((0, import_utils10.isString)(value) && (value.includes("calc") || value.includes("var"))) {
1992
3427
  return { [propertyName]: value };
1993
3428
  }
1994
- const stack = arrayzeValue(value);
1995
- if (!(0, import_utils12.isArray)(stack))
3429
+ const stack = (0, import_utils9.arrayzeValue)(value);
3430
+ if (!(0, import_utils10.isArray)(stack))
1996
3431
  return;
1997
3432
  if (stack.length > 1) {
1998
3433
  let suffix = "";
@@ -2020,16 +3455,16 @@ var getSpacingByKey = (value, propertyName = "padding", sequenceProps) => {
2020
3455
  };
2021
3456
 
2022
3457
  // src/system/shadow.js
2023
- var import_utils14 = __toESM(require_cjs(), 1);
3458
+ var import_utils12 = __toESM(require_cjs(), 1);
2024
3459
  var setShadow = (value, key, suffix, prefers) => {
2025
3460
  const CONFIG2 = getActiveConfig();
2026
- if ((0, import_utils14.isArray)(value)) {
3461
+ if ((0, import_utils12.isArray)(value)) {
2027
3462
  return {
2028
3463
  "@light": setShadow(value[0], key, "light"),
2029
3464
  "@dark": setShadow(value[1], key, "dark")
2030
3465
  };
2031
3466
  }
2032
- if ((0, import_utils14.isObject)(value)) {
3467
+ if ((0, import_utils12.isObject)(value)) {
2033
3468
  const obj = {};
2034
3469
  for (const variant in value) {
2035
3470
  obj[variant] = setShadow(
@@ -2040,7 +3475,7 @@ var setShadow = (value, key, suffix, prefers) => {
2040
3475
  }
2041
3476
  return obj;
2042
3477
  }
2043
- if ((0, import_utils14.isString)(value) && value.includes(",")) {
3478
+ if ((0, import_utils12.isString)(value) && value.includes(",")) {
2044
3479
  value = value.split(",").map((v) => {
2045
3480
  v = v.trim();
2046
3481
  if (v.startsWith("--"))
@@ -2068,17 +3503,17 @@ var getShadow = (value, globalTheme) => {
2068
3503
  const CONFIG2 = getActiveConfig();
2069
3504
  if (!globalTheme)
2070
3505
  globalTheme = CONFIG2.globalTheme;
2071
- if (!(0, import_utils14.isString)(value)) {
3506
+ if (!(0, import_utils12.isString)(value)) {
2072
3507
  if (CONFIG2.verbose)
2073
3508
  console.warn(value, "- type for color is not valid");
2074
3509
  return;
2075
3510
  }
2076
3511
  if (value.slice(0, 2) === "--")
2077
3512
  return `var(${value})`;
2078
- const [name] = (0, import_utils14.isArray)(value) ? value : value.split(" ");
3513
+ const [name] = (0, import_utils12.isArray)(value) ? value : value.split(" ");
2079
3514
  const { SHADOW: SHADOW2 } = CONFIG2;
2080
3515
  const val = SHADOW2[name];
2081
- const isObj = (0, import_utils14.isObject)(val);
3516
+ const isObj = (0, import_utils12.isObject)(val);
2082
3517
  if (!val) {
2083
3518
  if (CONFIG2.verbose)
2084
3519
  console.warn("Can't find color ", name);