@symbo.ls/scratch 2.11.375 → 2.11.394

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.
@@ -293,6 +293,7 @@ var require_array = __commonJS({
293
293
  var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
294
294
  var array_exports = {};
295
295
  __export2(array_exports, {
296
+ addItemAfterEveryElement: () => addItemAfterEveryElement,
296
297
  arrayContainsOtherArray: () => arrayContainsOtherArray,
297
298
  createNestedObject: () => createNestedObject,
298
299
  cutArrayAfterValue: () => cutArrayAfterValue,
@@ -304,6 +305,7 @@ var require_array = __commonJS({
304
305
  removeFromArray: () => removeFromArray,
305
306
  removeValueFromArray: () => removeValueFromArray,
306
307
  removeValueFromArrayAll: () => removeValueFromArrayAll,
308
+ reorderArrayByValues: () => reorderArrayByValues,
307
309
  swapItemsInArray: () => swapItemsInArray
308
310
  });
309
311
  module2.exports = __toCommonJS2(array_exports);
@@ -388,6 +390,27 @@ var require_array = __commonJS({
388
390
  var removeValueFromArrayAll = (arr, value) => {
389
391
  return arr.filter((item) => item !== value);
390
392
  };
393
+ var addItemAfterEveryElement = (array, item) => {
394
+ const result = [];
395
+ for (let i = 0; i < array.length; i++) {
396
+ result.push(array[i]);
397
+ if (i < array.length - 1) {
398
+ result.push(item);
399
+ }
400
+ }
401
+ return result;
402
+ };
403
+ var reorderArrayByValues = (array, valueToMove, insertBeforeValue) => {
404
+ const newArray = [...array];
405
+ const indexToMove = newArray.indexOf(valueToMove);
406
+ const indexToInsertBefore = newArray.indexOf(insertBeforeValue);
407
+ if (indexToMove !== -1 && indexToInsertBefore !== -1) {
408
+ const removedItem = newArray.splice(indexToMove, 1)[0];
409
+ const insertIndex = indexToInsertBefore < indexToMove ? indexToInsertBefore : indexToInsertBefore + 1;
410
+ newArray.splice(insertIndex, 0, removedItem);
411
+ }
412
+ return newArray;
413
+ };
391
414
  }
392
415
  });
393
416
 
@@ -664,7 +687,7 @@ var require_object = __commonJS({
664
687
  }
665
688
  return stringified;
666
689
  };
667
- var objectToString = (obj, indent = 0) => {
690
+ var objectToString = (obj = {}, indent = 0) => {
668
691
  const spaces = " ".repeat(indent);
669
692
  let str = "{\n";
670
693
  for (const [key, value] of Object.entries(obj)) {
@@ -731,7 +754,7 @@ var require_object = __commonJS({
731
754
  continue;
732
755
  const objProp = obj[prop];
733
756
  if ((0, import_types.isString)(objProp)) {
734
- if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
757
+ if ((objProp.includes("(){") || objProp.includes("() {") || objProp.includes("=>") || objProp.startsWith("()") || objProp.startsWith("async") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
735
758
  try {
736
759
  const evalProp = import_globals3.window.eval(`(${objProp})`);
737
760
  destringified[prop] = evalProp;
@@ -1119,20 +1142,21 @@ var require_cookie = __commonJS({
1119
1142
  });
1120
1143
  module2.exports = __toCommonJS2(cookie_exports);
1121
1144
  var import_types = require_types();
1145
+ var import_utils26 = require_cjs();
1122
1146
  var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
1123
1147
  var setCookie = (cname, cvalue, exdays = 365) => {
1124
- if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
1148
+ if ((0, import_types.isUndefined)(import_utils26.document) || (0, import_types.isUndefined)(import_utils26.document.cookie))
1125
1149
  return;
1126
1150
  const d = /* @__PURE__ */ new Date();
1127
1151
  d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
1128
1152
  const expires = `expires=${d.toUTCString()}`;
1129
- document.cookie = `${cname}=${cvalue};${expires};path=/`;
1153
+ import_utils26.document.cookie = `${cname}=${cvalue};${expires};path=/`;
1130
1154
  };
1131
1155
  var getCookie = (cname) => {
1132
- if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
1156
+ if ((0, import_types.isUndefined)(import_utils26.document) || (0, import_types.isUndefined)(import_utils26.document.cookie))
1133
1157
  return;
1134
1158
  const name = `${cname}=`;
1135
- const decodedCookie = decodeURIComponent(document.cookie);
1159
+ const decodedCookie = decodeURIComponent(import_utils26.document.cookie);
1136
1160
  const ca = decodedCookie.split(";");
1137
1161
  for (let i = 0; i < ca.length; i++) {
1138
1162
  let c = ca[i];
@@ -1671,6 +1695,7 @@ var require_cjs3 = __commonJS({
1671
1695
  var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
1672
1696
  var array_exports = {};
1673
1697
  __export22(array_exports, {
1698
+ addItemAfterEveryElement: () => addItemAfterEveryElement,
1674
1699
  arrayContainsOtherArray: () => arrayContainsOtherArray,
1675
1700
  createNestedObject: () => createNestedObject,
1676
1701
  cutArrayAfterValue: () => cutArrayAfterValue,
@@ -1682,6 +1707,7 @@ var require_cjs3 = __commonJS({
1682
1707
  removeFromArray: () => removeFromArray,
1683
1708
  removeValueFromArray: () => removeValueFromArray,
1684
1709
  removeValueFromArrayAll: () => removeValueFromArrayAll,
1710
+ reorderArrayByValues: () => reorderArrayByValues,
1685
1711
  swapItemsInArray: () => swapItemsInArray
1686
1712
  });
1687
1713
  module22.exports = __toCommonJS22(array_exports);
@@ -1766,6 +1792,27 @@ var require_cjs3 = __commonJS({
1766
1792
  var removeValueFromArrayAll = (arr, value) => {
1767
1793
  return arr.filter((item) => item !== value);
1768
1794
  };
1795
+ var addItemAfterEveryElement = (array, item) => {
1796
+ const result = [];
1797
+ for (let i = 0; i < array.length; i++) {
1798
+ result.push(array[i]);
1799
+ if (i < array.length - 1) {
1800
+ result.push(item);
1801
+ }
1802
+ }
1803
+ return result;
1804
+ };
1805
+ var reorderArrayByValues = (array, valueToMove, insertBeforeValue) => {
1806
+ const newArray = [...array];
1807
+ const indexToMove = newArray.indexOf(valueToMove);
1808
+ const indexToInsertBefore = newArray.indexOf(insertBeforeValue);
1809
+ if (indexToMove !== -1 && indexToInsertBefore !== -1) {
1810
+ const removedItem = newArray.splice(indexToMove, 1)[0];
1811
+ const insertIndex = indexToInsertBefore < indexToMove ? indexToInsertBefore : indexToInsertBefore + 1;
1812
+ newArray.splice(insertIndex, 0, removedItem);
1813
+ }
1814
+ return newArray;
1815
+ };
1769
1816
  }
1770
1817
  });
1771
1818
  var require_string2 = __commonJS2({
@@ -2038,7 +2085,7 @@ var require_cjs3 = __commonJS({
2038
2085
  }
2039
2086
  return stringified;
2040
2087
  };
2041
- var objectToString = (obj, indent = 0) => {
2088
+ var objectToString = (obj = {}, indent = 0) => {
2042
2089
  const spaces = " ".repeat(indent);
2043
2090
  let str = "{\n";
2044
2091
  for (const [key, value] of Object.entries(obj)) {
@@ -2105,7 +2152,7 @@ var require_cjs3 = __commonJS({
2105
2152
  continue;
2106
2153
  const objProp = obj[prop];
2107
2154
  if ((0, import_types.isString)(objProp)) {
2108
- if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
2155
+ if ((objProp.includes("(){") || objProp.includes("() {") || objProp.includes("=>") || objProp.startsWith("()") || objProp.startsWith("async") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
2109
2156
  try {
2110
2157
  const evalProp = import_globals3.window.eval(`(${objProp})`);
2111
2158
  destringified[prop] = evalProp;
@@ -2487,20 +2534,21 @@ var require_cjs3 = __commonJS({
2487
2534
  });
2488
2535
  module22.exports = __toCommonJS22(cookie_exports);
2489
2536
  var import_types = require_types2();
2537
+ var import_utils32 = require_cjs4();
2490
2538
  var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
2491
2539
  var setCookie = (cname, cvalue, exdays = 365) => {
2492
- if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
2540
+ if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
2493
2541
  return;
2494
2542
  const d = /* @__PURE__ */ new Date();
2495
2543
  d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
2496
2544
  const expires = `expires=${d.toUTCString()}`;
2497
- document.cookie = `${cname}=${cvalue};${expires};path=/`;
2545
+ import_utils32.document.cookie = `${cname}=${cvalue};${expires};path=/`;
2498
2546
  };
2499
2547
  var getCookie = (cname) => {
2500
- if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
2548
+ if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
2501
2549
  return;
2502
2550
  const name = `${cname}=`;
2503
- const decodedCookie = decodeURIComponent(document.cookie);
2551
+ const decodedCookie = decodeURIComponent(import_utils32.document.cookie);
2504
2552
  const ca = decodedCookie.split(";");
2505
2553
  for (let i = 0; i < ca.length; i++) {
2506
2554
  let c = ca[i];
@@ -2720,6 +2768,7 @@ var require_cjs3 = __commonJS({
2720
2768
  findClosestNumber: () => findClosestNumber,
2721
2769
  findClosestNumberInFactory: () => findClosestNumberInFactory,
2722
2770
  formatDate: () => formatDate,
2771
+ loadJavascript: () => loadJavascript,
2723
2772
  loadJavascriptFile: () => loadJavascriptFile,
2724
2773
  removeChars: () => removeChars,
2725
2774
  toCamelCase: () => toCamelCase2,
@@ -2791,6 +2840,17 @@ var require_cjs3 = __commonJS({
2791
2840
  }
2792
2841
  });
2793
2842
  };
2843
+ var loadJavascript = (body, async = true, doc = document, type = "text/javascript") => {
2844
+ try {
2845
+ const scriptEle = doc.createElement("script");
2846
+ scriptEle.type = type;
2847
+ scriptEle.async = async;
2848
+ scriptEle.innerHTML = body;
2849
+ doc.body.appendChild(scriptEle);
2850
+ } catch (error) {
2851
+ console.warn(error);
2852
+ }
2853
+ };
2794
2854
  var copyStringToClipboard = (str) => {
2795
2855
  const el = document.createElement("textarea");
2796
2856
  el.value = str;
@@ -2817,6 +2877,8 @@ var require_cjs3 = __commonJS({
2817
2877
  );
2818
2878
  var toDashCase2 = (val) => val.replace(/[^a-zA-Z0-9]/g, " ").trim().toLowerCase().replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
2819
2879
  var toDescriptionCase = (str = "") => {
2880
+ if (typeof str !== "string")
2881
+ return;
2820
2882
  const result = str.replace(/([A-Z])/g, " $1");
2821
2883
  return result.charAt(0).toUpperCase() + result.slice(1);
2822
2884
  };
@@ -2873,6 +2935,7 @@ __export(defaultConfig_exports, {
2873
2935
  ICONS: () => ICONS,
2874
2936
  MEDIA: () => MEDIA,
2875
2937
  RESET: () => RESET,
2938
+ SEMANTIC_ICONS: () => SEMANTIC_ICONS,
2876
2939
  SEQUENCE: () => SEQUENCE,
2877
2940
  SHADOW: () => SHADOW,
2878
2941
  SPACING: () => SPACING,
@@ -2984,6 +3047,7 @@ var SHADOW = {};
2984
3047
 
2985
3048
  // src/defaultConfig/icons.js
2986
3049
  var ICONS = {};
3050
+ var SEMANTIC_ICONS = {};
2987
3051
 
2988
3052
  // src/defaultConfig/timing.js
2989
3053
  var defaultProps3 = {
@@ -3064,7 +3128,7 @@ var FACTORY = {
3064
3128
  0: CONFIG
3065
3129
  };
3066
3130
  var getActiveConfig = (def) => {
3067
- return FACTORY[def || FACTORY.active];
3131
+ return FACTORY[def || FACTORY.active] || CONFIG;
3068
3132
  };
3069
3133
 
3070
3134
  // src/system/color.js
@@ -53,7 +53,7 @@ var require_cjs = __commonJS({
53
53
  var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
54
54
  var globals_exports = {};
55
55
  __export2(globals_exports, {
56
- document: () => document3,
56
+ document: () => document2,
57
57
  global: () => global,
58
58
  self: () => self,
59
59
  window: () => window2
@@ -62,7 +62,7 @@ var require_cjs = __commonJS({
62
62
  var global = globalThis;
63
63
  var self = globalThis;
64
64
  var window2 = globalThis;
65
- var document3 = window2.document;
65
+ var document2 = window2.document;
66
66
  }
67
67
  });
68
68
 
@@ -166,7 +166,7 @@ var require_globals = __commonJS({
166
166
  var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
167
167
  var globals_exports = {};
168
168
  __export2(globals_exports, {
169
- document: () => document3,
169
+ document: () => document2,
170
170
  global: () => global,
171
171
  self: () => self,
172
172
  window: () => window2
@@ -175,7 +175,7 @@ var require_globals = __commonJS({
175
175
  var global = globalThis;
176
176
  var self = globalThis;
177
177
  var window2 = globalThis;
178
- var document3 = window2.document;
178
+ var document2 = window2.document;
179
179
  }
180
180
  });
181
181
 
@@ -329,6 +329,7 @@ var require_array = __commonJS({
329
329
  var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
330
330
  var array_exports = {};
331
331
  __export2(array_exports, {
332
+ addItemAfterEveryElement: () => addItemAfterEveryElement,
332
333
  arrayContainsOtherArray: () => arrayContainsOtherArray,
333
334
  createNestedObject: () => createNestedObject,
334
335
  cutArrayAfterValue: () => cutArrayAfterValue,
@@ -340,6 +341,7 @@ var require_array = __commonJS({
340
341
  removeFromArray: () => removeFromArray,
341
342
  removeValueFromArray: () => removeValueFromArray,
342
343
  removeValueFromArrayAll: () => removeValueFromArrayAll,
344
+ reorderArrayByValues: () => reorderArrayByValues,
343
345
  swapItemsInArray: () => swapItemsInArray
344
346
  });
345
347
  module2.exports = __toCommonJS2(array_exports);
@@ -424,6 +426,27 @@ var require_array = __commonJS({
424
426
  var removeValueFromArrayAll = (arr, value) => {
425
427
  return arr.filter((item) => item !== value);
426
428
  };
429
+ var addItemAfterEveryElement = (array, item) => {
430
+ const result = [];
431
+ for (let i = 0; i < array.length; i++) {
432
+ result.push(array[i]);
433
+ if (i < array.length - 1) {
434
+ result.push(item);
435
+ }
436
+ }
437
+ return result;
438
+ };
439
+ var reorderArrayByValues = (array, valueToMove, insertBeforeValue) => {
440
+ const newArray = [...array];
441
+ const indexToMove = newArray.indexOf(valueToMove);
442
+ const indexToInsertBefore = newArray.indexOf(insertBeforeValue);
443
+ if (indexToMove !== -1 && indexToInsertBefore !== -1) {
444
+ const removedItem = newArray.splice(indexToMove, 1)[0];
445
+ const insertIndex = indexToInsertBefore < indexToMove ? indexToInsertBefore : indexToInsertBefore + 1;
446
+ newArray.splice(insertIndex, 0, removedItem);
447
+ }
448
+ return newArray;
449
+ };
427
450
  }
428
451
  });
429
452
 
@@ -700,7 +723,7 @@ var require_object = __commonJS({
700
723
  }
701
724
  return stringified;
702
725
  };
703
- var objectToString = (obj, indent = 0) => {
726
+ var objectToString = (obj = {}, indent = 0) => {
704
727
  const spaces = " ".repeat(indent);
705
728
  let str = "{\n";
706
729
  for (const [key, value] of Object.entries(obj)) {
@@ -767,7 +790,7 @@ var require_object = __commonJS({
767
790
  continue;
768
791
  const objProp = obj[prop];
769
792
  if ((0, import_types.isString)(objProp)) {
770
- if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
793
+ if ((objProp.includes("(){") || objProp.includes("() {") || objProp.includes("=>") || objProp.startsWith("()") || objProp.startsWith("async") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
771
794
  try {
772
795
  const evalProp = import_globals2.window.eval(`(${objProp})`);
773
796
  destringified[prop] = evalProp;
@@ -1155,20 +1178,21 @@ var require_cookie = __commonJS({
1155
1178
  });
1156
1179
  module2.exports = __toCommonJS2(cookie_exports);
1157
1180
  var import_types = require_types();
1181
+ var import_utils2 = require_cjs2();
1158
1182
  var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
1159
1183
  var setCookie = (cname, cvalue, exdays = 365) => {
1160
- if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
1184
+ if ((0, import_types.isUndefined)(import_utils2.document) || (0, import_types.isUndefined)(import_utils2.document.cookie))
1161
1185
  return;
1162
1186
  const d = /* @__PURE__ */ new Date();
1163
1187
  d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
1164
1188
  const expires = `expires=${d.toUTCString()}`;
1165
- document.cookie = `${cname}=${cvalue};${expires};path=/`;
1189
+ import_utils2.document.cookie = `${cname}=${cvalue};${expires};path=/`;
1166
1190
  };
1167
1191
  var getCookie = (cname) => {
1168
- if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
1192
+ if ((0, import_types.isUndefined)(import_utils2.document) || (0, import_types.isUndefined)(import_utils2.document.cookie))
1169
1193
  return;
1170
1194
  const name = `${cname}=`;
1171
- const decodedCookie = decodeURIComponent(document.cookie);
1195
+ const decodedCookie = decodeURIComponent(import_utils2.document.cookie);
1172
1196
  const ca = decodedCookie.split(";");
1173
1197
  for (let i = 0; i < ca.length; i++) {
1174
1198
  let c = ca[i];
@@ -329,6 +329,7 @@ var require_array = __commonJS({
329
329
  var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
330
330
  var array_exports = {};
331
331
  __export2(array_exports, {
332
+ addItemAfterEveryElement: () => addItemAfterEveryElement,
332
333
  arrayContainsOtherArray: () => arrayContainsOtherArray,
333
334
  createNestedObject: () => createNestedObject,
334
335
  cutArrayAfterValue: () => cutArrayAfterValue,
@@ -340,6 +341,7 @@ var require_array = __commonJS({
340
341
  removeFromArray: () => removeFromArray,
341
342
  removeValueFromArray: () => removeValueFromArray,
342
343
  removeValueFromArrayAll: () => removeValueFromArrayAll,
344
+ reorderArrayByValues: () => reorderArrayByValues,
343
345
  swapItemsInArray: () => swapItemsInArray
344
346
  });
345
347
  module2.exports = __toCommonJS2(array_exports);
@@ -424,6 +426,27 @@ var require_array = __commonJS({
424
426
  var removeValueFromArrayAll = (arr, value) => {
425
427
  return arr.filter((item) => item !== value);
426
428
  };
429
+ var addItemAfterEveryElement = (array, item) => {
430
+ const result = [];
431
+ for (let i = 0; i < array.length; i++) {
432
+ result.push(array[i]);
433
+ if (i < array.length - 1) {
434
+ result.push(item);
435
+ }
436
+ }
437
+ return result;
438
+ };
439
+ var reorderArrayByValues = (array, valueToMove, insertBeforeValue) => {
440
+ const newArray = [...array];
441
+ const indexToMove = newArray.indexOf(valueToMove);
442
+ const indexToInsertBefore = newArray.indexOf(insertBeforeValue);
443
+ if (indexToMove !== -1 && indexToInsertBefore !== -1) {
444
+ const removedItem = newArray.splice(indexToMove, 1)[0];
445
+ const insertIndex = indexToInsertBefore < indexToMove ? indexToInsertBefore : indexToInsertBefore + 1;
446
+ newArray.splice(insertIndex, 0, removedItem);
447
+ }
448
+ return newArray;
449
+ };
427
450
  }
428
451
  });
429
452
 
@@ -700,7 +723,7 @@ var require_object = __commonJS({
700
723
  }
701
724
  return stringified;
702
725
  };
703
- var objectToString = (obj, indent = 0) => {
726
+ var objectToString = (obj = {}, indent = 0) => {
704
727
  const spaces = " ".repeat(indent);
705
728
  let str = "{\n";
706
729
  for (const [key, value] of Object.entries(obj)) {
@@ -767,7 +790,7 @@ var require_object = __commonJS({
767
790
  continue;
768
791
  const objProp = obj[prop];
769
792
  if ((0, import_types.isString)(objProp)) {
770
- if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
793
+ if ((objProp.includes("(){") || objProp.includes("() {") || objProp.includes("=>") || objProp.startsWith("()") || objProp.startsWith("async") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
771
794
  try {
772
795
  const evalProp = import_globals2.window.eval(`(${objProp})`);
773
796
  destringified[prop] = evalProp;
@@ -1155,20 +1178,21 @@ var require_cookie = __commonJS({
1155
1178
  });
1156
1179
  module2.exports = __toCommonJS2(cookie_exports);
1157
1180
  var import_types = require_types();
1181
+ var import_utils7 = require_cjs2();
1158
1182
  var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
1159
1183
  var setCookie = (cname, cvalue, exdays = 365) => {
1160
- if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
1184
+ if ((0, import_types.isUndefined)(import_utils7.document) || (0, import_types.isUndefined)(import_utils7.document.cookie))
1161
1185
  return;
1162
1186
  const d = /* @__PURE__ */ new Date();
1163
1187
  d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
1164
1188
  const expires = `expires=${d.toUTCString()}`;
1165
- document.cookie = `${cname}=${cvalue};${expires};path=/`;
1189
+ import_utils7.document.cookie = `${cname}=${cvalue};${expires};path=/`;
1166
1190
  };
1167
1191
  var getCookie = (cname) => {
1168
- if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
1192
+ if ((0, import_types.isUndefined)(import_utils7.document) || (0, import_types.isUndefined)(import_utils7.document.cookie))
1169
1193
  return;
1170
1194
  const name = `${cname}=`;
1171
- const decodedCookie = decodeURIComponent(document.cookie);
1195
+ const decodedCookie = decodeURIComponent(import_utils7.document.cookie);
1172
1196
  const ca = decodedCookie.split(";");
1173
1197
  for (let i = 0; i < ca.length; i++) {
1174
1198
  let c = ca[i];
@@ -1671,6 +1695,7 @@ var require_cjs3 = __commonJS({
1671
1695
  var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
1672
1696
  var array_exports = {};
1673
1697
  __export22(array_exports, {
1698
+ addItemAfterEveryElement: () => addItemAfterEveryElement,
1674
1699
  arrayContainsOtherArray: () => arrayContainsOtherArray,
1675
1700
  createNestedObject: () => createNestedObject,
1676
1701
  cutArrayAfterValue: () => cutArrayAfterValue,
@@ -1682,6 +1707,7 @@ var require_cjs3 = __commonJS({
1682
1707
  removeFromArray: () => removeFromArray,
1683
1708
  removeValueFromArray: () => removeValueFromArray,
1684
1709
  removeValueFromArrayAll: () => removeValueFromArrayAll,
1710
+ reorderArrayByValues: () => reorderArrayByValues,
1685
1711
  swapItemsInArray: () => swapItemsInArray
1686
1712
  });
1687
1713
  module22.exports = __toCommonJS22(array_exports);
@@ -1766,6 +1792,27 @@ var require_cjs3 = __commonJS({
1766
1792
  var removeValueFromArrayAll = (arr, value) => {
1767
1793
  return arr.filter((item) => item !== value);
1768
1794
  };
1795
+ var addItemAfterEveryElement = (array, item) => {
1796
+ const result = [];
1797
+ for (let i = 0; i < array.length; i++) {
1798
+ result.push(array[i]);
1799
+ if (i < array.length - 1) {
1800
+ result.push(item);
1801
+ }
1802
+ }
1803
+ return result;
1804
+ };
1805
+ var reorderArrayByValues = (array, valueToMove, insertBeforeValue) => {
1806
+ const newArray = [...array];
1807
+ const indexToMove = newArray.indexOf(valueToMove);
1808
+ const indexToInsertBefore = newArray.indexOf(insertBeforeValue);
1809
+ if (indexToMove !== -1 && indexToInsertBefore !== -1) {
1810
+ const removedItem = newArray.splice(indexToMove, 1)[0];
1811
+ const insertIndex = indexToInsertBefore < indexToMove ? indexToInsertBefore : indexToInsertBefore + 1;
1812
+ newArray.splice(insertIndex, 0, removedItem);
1813
+ }
1814
+ return newArray;
1815
+ };
1769
1816
  }
1770
1817
  });
1771
1818
  var require_string2 = __commonJS2({
@@ -2038,7 +2085,7 @@ var require_cjs3 = __commonJS({
2038
2085
  }
2039
2086
  return stringified;
2040
2087
  };
2041
- var objectToString = (obj, indent = 0) => {
2088
+ var objectToString = (obj = {}, indent = 0) => {
2042
2089
  const spaces = " ".repeat(indent);
2043
2090
  let str = "{\n";
2044
2091
  for (const [key, value] of Object.entries(obj)) {
@@ -2105,7 +2152,7 @@ var require_cjs3 = __commonJS({
2105
2152
  continue;
2106
2153
  const objProp = obj[prop];
2107
2154
  if ((0, import_types.isString)(objProp)) {
2108
- if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
2155
+ if ((objProp.includes("(){") || objProp.includes("() {") || objProp.includes("=>") || objProp.startsWith("()") || objProp.startsWith("async") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
2109
2156
  try {
2110
2157
  const evalProp = import_globals2.window.eval(`(${objProp})`);
2111
2158
  destringified[prop] = evalProp;
@@ -2487,20 +2534,21 @@ var require_cjs3 = __commonJS({
2487
2534
  });
2488
2535
  module22.exports = __toCommonJS22(cookie_exports);
2489
2536
  var import_types = require_types2();
2537
+ var import_utils32 = require_cjs4();
2490
2538
  var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
2491
2539
  var setCookie = (cname, cvalue, exdays = 365) => {
2492
- if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
2540
+ if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
2493
2541
  return;
2494
2542
  const d = /* @__PURE__ */ new Date();
2495
2543
  d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
2496
2544
  const expires = `expires=${d.toUTCString()}`;
2497
- document.cookie = `${cname}=${cvalue};${expires};path=/`;
2545
+ import_utils32.document.cookie = `${cname}=${cvalue};${expires};path=/`;
2498
2546
  };
2499
2547
  var getCookie = (cname) => {
2500
- if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
2548
+ if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
2501
2549
  return;
2502
2550
  const name = `${cname}=`;
2503
- const decodedCookie = decodeURIComponent(document.cookie);
2551
+ const decodedCookie = decodeURIComponent(import_utils32.document.cookie);
2504
2552
  const ca = decodedCookie.split(";");
2505
2553
  for (let i = 0; i < ca.length; i++) {
2506
2554
  let c = ca[i];
@@ -2720,6 +2768,7 @@ var require_cjs3 = __commonJS({
2720
2768
  findClosestNumber: () => findClosestNumber,
2721
2769
  findClosestNumberInFactory: () => findClosestNumberInFactory,
2722
2770
  formatDate: () => formatDate,
2771
+ loadJavascript: () => loadJavascript,
2723
2772
  loadJavascriptFile: () => loadJavascriptFile,
2724
2773
  removeChars: () => removeChars,
2725
2774
  toCamelCase: () => toCamelCase,
@@ -2791,6 +2840,17 @@ var require_cjs3 = __commonJS({
2791
2840
  }
2792
2841
  });
2793
2842
  };
2843
+ var loadJavascript = (body, async = true, doc = document, type = "text/javascript") => {
2844
+ try {
2845
+ const scriptEle = doc.createElement("script");
2846
+ scriptEle.type = type;
2847
+ scriptEle.async = async;
2848
+ scriptEle.innerHTML = body;
2849
+ doc.body.appendChild(scriptEle);
2850
+ } catch (error) {
2851
+ console.warn(error);
2852
+ }
2853
+ };
2794
2854
  var copyStringToClipboard = (str) => {
2795
2855
  const el = document.createElement("textarea");
2796
2856
  el.value = str;
@@ -2817,6 +2877,8 @@ var require_cjs3 = __commonJS({
2817
2877
  );
2818
2878
  var toDashCase2 = (val) => val.replace(/[^a-zA-Z0-9]/g, " ").trim().toLowerCase().replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
2819
2879
  var toDescriptionCase = (str = "") => {
2880
+ if (typeof str !== "string")
2881
+ return;
2820
2882
  const result = str.replace(/([A-Z])/g, " $1");
2821
2883
  return result.charAt(0).toUpperCase() + result.slice(1);
2822
2884
  };
@@ -3118,6 +3180,7 @@ __export(defaultConfig_exports, {
3118
3180
  ICONS: () => ICONS,
3119
3181
  MEDIA: () => MEDIA,
3120
3182
  RESET: () => RESET,
3183
+ SEMANTIC_ICONS: () => SEMANTIC_ICONS,
3121
3184
  SEQUENCE: () => SEQUENCE,
3122
3185
  SHADOW: () => SHADOW,
3123
3186
  SPACING: () => SPACING,
@@ -3229,6 +3292,7 @@ var SHADOW = {};
3229
3292
 
3230
3293
  // src/defaultConfig/icons.js
3231
3294
  var ICONS = {};
3295
+ var SEMANTIC_ICONS = {};
3232
3296
 
3233
3297
  // src/defaultConfig/timing.js
3234
3298
  var defaultProps3 = {
@@ -3309,7 +3373,7 @@ var FACTORY = {
3309
3373
  0: CONFIG
3310
3374
  };
3311
3375
  var getActiveConfig = (def) => {
3312
- return FACTORY[def || FACTORY.active];
3376
+ return FACTORY[def || FACTORY.active] || CONFIG;
3313
3377
  };
3314
3378
 
3315
3379
  // src/utils/sequence.js