@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.
@@ -316,6 +316,7 @@ var require_cjs = __commonJS({
316
316
  var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
317
317
  var array_exports = {};
318
318
  __export22(array_exports, {
319
+ addItemAfterEveryElement: () => addItemAfterEveryElement,
319
320
  arrayContainsOtherArray: () => arrayContainsOtherArray,
320
321
  createNestedObject: () => createNestedObject,
321
322
  cutArrayAfterValue: () => cutArrayAfterValue,
@@ -327,6 +328,7 @@ var require_cjs = __commonJS({
327
328
  removeFromArray: () => removeFromArray,
328
329
  removeValueFromArray: () => removeValueFromArray,
329
330
  removeValueFromArrayAll: () => removeValueFromArrayAll,
331
+ reorderArrayByValues: () => reorderArrayByValues,
330
332
  swapItemsInArray: () => swapItemsInArray
331
333
  });
332
334
  module22.exports = __toCommonJS22(array_exports);
@@ -411,6 +413,27 @@ var require_cjs = __commonJS({
411
413
  var removeValueFromArrayAll = (arr, value) => {
412
414
  return arr.filter((item) => item !== value);
413
415
  };
416
+ var addItemAfterEveryElement = (array, item) => {
417
+ const result = [];
418
+ for (let i = 0; i < array.length; i++) {
419
+ result.push(array[i]);
420
+ if (i < array.length - 1) {
421
+ result.push(item);
422
+ }
423
+ }
424
+ return result;
425
+ };
426
+ var reorderArrayByValues = (array, valueToMove, insertBeforeValue) => {
427
+ const newArray = [...array];
428
+ const indexToMove = newArray.indexOf(valueToMove);
429
+ const indexToInsertBefore = newArray.indexOf(insertBeforeValue);
430
+ if (indexToMove !== -1 && indexToInsertBefore !== -1) {
431
+ const removedItem = newArray.splice(indexToMove, 1)[0];
432
+ const insertIndex = indexToInsertBefore < indexToMove ? indexToInsertBefore : indexToInsertBefore + 1;
433
+ newArray.splice(insertIndex, 0, removedItem);
434
+ }
435
+ return newArray;
436
+ };
414
437
  }
415
438
  });
416
439
  var require_string2 = __commonJS2({
@@ -683,7 +706,7 @@ var require_cjs = __commonJS({
683
706
  }
684
707
  return stringified;
685
708
  };
686
- var objectToString = (obj, indent = 0) => {
709
+ var objectToString = (obj = {}, indent = 0) => {
687
710
  const spaces = " ".repeat(indent);
688
711
  let str = "{\n";
689
712
  for (const [key, value] of Object.entries(obj)) {
@@ -750,7 +773,7 @@ var require_cjs = __commonJS({
750
773
  continue;
751
774
  const objProp = obj[prop];
752
775
  if ((0, import_types.isString)(objProp)) {
753
- if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
776
+ if ((objProp.includes("(){") || objProp.includes("() {") || objProp.includes("=>") || objProp.startsWith("()") || objProp.startsWith("async") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
754
777
  try {
755
778
  const evalProp = import_globals2.window.eval(`(${objProp})`);
756
779
  destringified[prop] = evalProp;
@@ -1132,20 +1155,21 @@ var require_cjs = __commonJS({
1132
1155
  });
1133
1156
  module22.exports = __toCommonJS22(cookie_exports);
1134
1157
  var import_types = require_types2();
1158
+ var import_utils32 = require_cjs4();
1135
1159
  var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
1136
1160
  var setCookie = (cname, cvalue, exdays = 365) => {
1137
- if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
1161
+ if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
1138
1162
  return;
1139
1163
  const d = /* @__PURE__ */ new Date();
1140
1164
  d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
1141
1165
  const expires = `expires=${d.toUTCString()}`;
1142
- document.cookie = `${cname}=${cvalue};${expires};path=/`;
1166
+ import_utils32.document.cookie = `${cname}=${cvalue};${expires};path=/`;
1143
1167
  };
1144
1168
  var getCookie = (cname) => {
1145
- if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
1169
+ if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
1146
1170
  return;
1147
1171
  const name = `${cname}=`;
1148
- const decodedCookie = decodeURIComponent(document.cookie);
1172
+ const decodedCookie = decodeURIComponent(import_utils32.document.cookie);
1149
1173
  const ca = decodedCookie.split(";");
1150
1174
  for (let i = 0; i < ca.length; i++) {
1151
1175
  let c = ca[i];
@@ -1365,6 +1389,7 @@ var require_cjs = __commonJS({
1365
1389
  findClosestNumber: () => findClosestNumber,
1366
1390
  findClosestNumberInFactory: () => findClosestNumberInFactory,
1367
1391
  formatDate: () => formatDate,
1392
+ loadJavascript: () => loadJavascript,
1368
1393
  loadJavascriptFile: () => loadJavascriptFile,
1369
1394
  removeChars: () => removeChars,
1370
1395
  toCamelCase: () => toCamelCase2,
@@ -1436,6 +1461,17 @@ var require_cjs = __commonJS({
1436
1461
  }
1437
1462
  });
1438
1463
  };
1464
+ var loadJavascript = (body, async = true, doc = document, type = "text/javascript") => {
1465
+ try {
1466
+ const scriptEle = doc.createElement("script");
1467
+ scriptEle.type = type;
1468
+ scriptEle.async = async;
1469
+ scriptEle.innerHTML = body;
1470
+ doc.body.appendChild(scriptEle);
1471
+ } catch (error) {
1472
+ console.warn(error);
1473
+ }
1474
+ };
1439
1475
  var copyStringToClipboard = (str) => {
1440
1476
  const el = document.createElement("textarea");
1441
1477
  el.value = str;
@@ -1462,6 +1498,8 @@ var require_cjs = __commonJS({
1462
1498
  );
1463
1499
  var toDashCase2 = (val) => val.replace(/[^a-zA-Z0-9]/g, " ").trim().toLowerCase().replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
1464
1500
  var toDescriptionCase = (str = "") => {
1501
+ if (typeof str !== "string")
1502
+ return;
1465
1503
  const result = str.replace(/([A-Z])/g, " $1");
1466
1504
  return result.charAt(0).toUpperCase() + result.slice(1);
1467
1505
  };
@@ -1741,6 +1779,7 @@ var require_array = __commonJS({
1741
1779
  var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
1742
1780
  var array_exports = {};
1743
1781
  __export2(array_exports, {
1782
+ addItemAfterEveryElement: () => addItemAfterEveryElement,
1744
1783
  arrayContainsOtherArray: () => arrayContainsOtherArray,
1745
1784
  createNestedObject: () => createNestedObject,
1746
1785
  cutArrayAfterValue: () => cutArrayAfterValue,
@@ -1752,6 +1791,7 @@ var require_array = __commonJS({
1752
1791
  removeFromArray: () => removeFromArray,
1753
1792
  removeValueFromArray: () => removeValueFromArray,
1754
1793
  removeValueFromArrayAll: () => removeValueFromArrayAll,
1794
+ reorderArrayByValues: () => reorderArrayByValues,
1755
1795
  swapItemsInArray: () => swapItemsInArray
1756
1796
  });
1757
1797
  module2.exports = __toCommonJS2(array_exports);
@@ -1836,6 +1876,27 @@ var require_array = __commonJS({
1836
1876
  var removeValueFromArrayAll = (arr, value) => {
1837
1877
  return arr.filter((item) => item !== value);
1838
1878
  };
1879
+ var addItemAfterEveryElement = (array, item) => {
1880
+ const result = [];
1881
+ for (let i = 0; i < array.length; i++) {
1882
+ result.push(array[i]);
1883
+ if (i < array.length - 1) {
1884
+ result.push(item);
1885
+ }
1886
+ }
1887
+ return result;
1888
+ };
1889
+ var reorderArrayByValues = (array, valueToMove, insertBeforeValue) => {
1890
+ const newArray = [...array];
1891
+ const indexToMove = newArray.indexOf(valueToMove);
1892
+ const indexToInsertBefore = newArray.indexOf(insertBeforeValue);
1893
+ if (indexToMove !== -1 && indexToInsertBefore !== -1) {
1894
+ const removedItem = newArray.splice(indexToMove, 1)[0];
1895
+ const insertIndex = indexToInsertBefore < indexToMove ? indexToInsertBefore : indexToInsertBefore + 1;
1896
+ newArray.splice(insertIndex, 0, removedItem);
1897
+ }
1898
+ return newArray;
1899
+ };
1839
1900
  }
1840
1901
  });
1841
1902
 
@@ -2112,7 +2173,7 @@ var require_object = __commonJS({
2112
2173
  }
2113
2174
  return stringified;
2114
2175
  };
2115
- var objectToString = (obj, indent = 0) => {
2176
+ var objectToString = (obj = {}, indent = 0) => {
2116
2177
  const spaces = " ".repeat(indent);
2117
2178
  let str = "{\n";
2118
2179
  for (const [key, value] of Object.entries(obj)) {
@@ -2179,7 +2240,7 @@ var require_object = __commonJS({
2179
2240
  continue;
2180
2241
  const objProp = obj[prop];
2181
2242
  if ((0, import_types.isString)(objProp)) {
2182
- if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
2243
+ if ((objProp.includes("(){") || objProp.includes("() {") || objProp.includes("=>") || objProp.startsWith("()") || objProp.startsWith("async") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
2183
2244
  try {
2184
2245
  const evalProp = import_globals2.window.eval(`(${objProp})`);
2185
2246
  destringified[prop] = evalProp;
@@ -2567,20 +2628,21 @@ var require_cookie = __commonJS({
2567
2628
  });
2568
2629
  module2.exports = __toCommonJS2(cookie_exports);
2569
2630
  var import_types = require_types();
2631
+ var import_utils9 = require_cjs2();
2570
2632
  var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
2571
2633
  var setCookie = (cname, cvalue, exdays = 365) => {
2572
- if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
2634
+ if ((0, import_types.isUndefined)(import_utils9.document) || (0, import_types.isUndefined)(import_utils9.document.cookie))
2573
2635
  return;
2574
2636
  const d = /* @__PURE__ */ new Date();
2575
2637
  d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
2576
2638
  const expires = `expires=${d.toUTCString()}`;
2577
- document.cookie = `${cname}=${cvalue};${expires};path=/`;
2639
+ import_utils9.document.cookie = `${cname}=${cvalue};${expires};path=/`;
2578
2640
  };
2579
2641
  var getCookie = (cname) => {
2580
- if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
2642
+ if ((0, import_types.isUndefined)(import_utils9.document) || (0, import_types.isUndefined)(import_utils9.document.cookie))
2581
2643
  return;
2582
2644
  const name = `${cname}=`;
2583
- const decodedCookie = decodeURIComponent(document.cookie);
2645
+ const decodedCookie = decodeURIComponent(import_utils9.document.cookie);
2584
2646
  const ca = decodedCookie.split(";");
2585
2647
  for (let i = 0; i < ca.length; i++) {
2586
2648
  let c = ca[i];
@@ -2864,6 +2926,7 @@ __export(defaultConfig_exports, {
2864
2926
  ICONS: () => ICONS,
2865
2927
  MEDIA: () => MEDIA,
2866
2928
  RESET: () => RESET,
2929
+ SEMANTIC_ICONS: () => SEMANTIC_ICONS,
2867
2930
  SEQUENCE: () => SEQUENCE,
2868
2931
  SHADOW: () => SHADOW,
2869
2932
  SPACING: () => SPACING,
@@ -2975,6 +3038,7 @@ var SHADOW = {};
2975
3038
 
2976
3039
  // src/defaultConfig/icons.js
2977
3040
  var ICONS = {};
3041
+ var SEMANTIC_ICONS = {};
2978
3042
 
2979
3043
  // src/defaultConfig/timing.js
2980
3044
  var defaultProps3 = {
@@ -3055,7 +3119,7 @@ var FACTORY = {
3055
3119
  0: CONFIG
3056
3120
  };
3057
3121
  var getActiveConfig = (def) => {
3058
- return FACTORY[def || FACTORY.active];
3122
+ return FACTORY[def || FACTORY.active] || CONFIG;
3059
3123
  };
3060
3124
 
3061
3125
  // src/utils/unit.js
@@ -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_globals2.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_utils9 = 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_utils9.document) || (0, import_types.isUndefined)(import_utils9.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_utils9.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_utils9.document) || (0, import_types.isUndefined)(import_utils9.document.cookie))
1133
1157
  return;
1134
1158
  const name = `${cname}=`;
1135
- const decodedCookie = decodeURIComponent(document.cookie);
1159
+ const decodedCookie = decodeURIComponent(import_utils9.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_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
  };
@@ -2865,6 +2927,7 @@ __export(defaultConfig_exports, {
2865
2927
  ICONS: () => ICONS,
2866
2928
  MEDIA: () => MEDIA,
2867
2929
  RESET: () => RESET,
2930
+ SEMANTIC_ICONS: () => SEMANTIC_ICONS,
2868
2931
  SEQUENCE: () => SEQUENCE,
2869
2932
  SHADOW: () => SHADOW,
2870
2933
  SPACING: () => SPACING,
@@ -2976,6 +3039,7 @@ var SHADOW = {};
2976
3039
 
2977
3040
  // src/defaultConfig/icons.js
2978
3041
  var ICONS = {};
3042
+ var SEMANTIC_ICONS = {};
2979
3043
 
2980
3044
  // src/defaultConfig/timing.js
2981
3045
  var defaultProps3 = {
@@ -3056,7 +3120,7 @@ var FACTORY = {
3056
3120
  0: CONFIG
3057
3121
  };
3058
3122
  var getActiveConfig = (def) => {
3059
- return FACTORY[def || FACTORY.active];
3123
+ return FACTORY[def || FACTORY.active] || CONFIG;
3060
3124
  };
3061
3125
 
3062
3126
  // src/utils/unit.js