@symbo.ls/scratch 2.11.389 → 2.11.396
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/factory.js +8 -7
- package/dist/cjs/index.js +27 -11
- package/dist/cjs/set.js +27 -11
- package/dist/cjs/system/color.js +27 -11
- package/dist/cjs/system/document.js +27 -11
- package/dist/cjs/system/font.js +27 -11
- package/dist/cjs/system/index.js +27 -11
- package/dist/cjs/system/reset.js +27 -11
- package/dist/cjs/system/shadow.js +27 -11
- package/dist/cjs/system/spacing.js +27 -11
- package/dist/cjs/system/svg.js +27 -11
- package/dist/cjs/system/theme.js +27 -11
- package/dist/cjs/system/timing.js +27 -11
- package/dist/cjs/system/typography.js +27 -11
- package/dist/cjs/transforms/index.js +27 -11
- package/dist/cjs/utils/color.js +9 -8
- package/dist/cjs/utils/index.js +27 -11
- package/dist/cjs/utils/sequence.js +27 -11
- package/dist/cjs/utils/sprite.js +8 -7
- package/dist/cjs/utils/var.js +27 -11
- package/package.json +2 -2
- package/src/factory.js +1 -1
- package/src/utils/color.js +1 -1
package/dist/cjs/factory.js
CHANGED
|
@@ -130,7 +130,7 @@ var require_globals = __commonJS({
|
|
|
130
130
|
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
131
131
|
var globals_exports = {};
|
|
132
132
|
__export2(globals_exports, {
|
|
133
|
-
document: () =>
|
|
133
|
+
document: () => document,
|
|
134
134
|
global: () => global,
|
|
135
135
|
self: () => self,
|
|
136
136
|
window: () => window
|
|
@@ -139,7 +139,7 @@ var require_globals = __commonJS({
|
|
|
139
139
|
var global = globalThis;
|
|
140
140
|
var self = globalThis;
|
|
141
141
|
var window = globalThis;
|
|
142
|
-
var
|
|
142
|
+
var document = window.document;
|
|
143
143
|
}
|
|
144
144
|
});
|
|
145
145
|
|
|
@@ -1142,20 +1142,21 @@ var require_cookie = __commonJS({
|
|
|
1142
1142
|
});
|
|
1143
1143
|
module2.exports = __toCommonJS2(cookie_exports);
|
|
1144
1144
|
var import_types = require_types();
|
|
1145
|
+
var import_utils2 = require_cjs();
|
|
1145
1146
|
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
1146
1147
|
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
1147
|
-
if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
|
|
1148
|
+
if ((0, import_types.isUndefined)(import_utils2.document) || (0, import_types.isUndefined)(import_utils2.document.cookie))
|
|
1148
1149
|
return;
|
|
1149
1150
|
const d = /* @__PURE__ */ new Date();
|
|
1150
1151
|
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
1151
1152
|
const expires = `expires=${d.toUTCString()}`;
|
|
1152
|
-
document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
1153
|
+
import_utils2.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
1153
1154
|
};
|
|
1154
1155
|
var getCookie = (cname) => {
|
|
1155
|
-
if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
|
|
1156
|
+
if ((0, import_types.isUndefined)(import_utils2.document) || (0, import_types.isUndefined)(import_utils2.document.cookie))
|
|
1156
1157
|
return;
|
|
1157
1158
|
const name = `${cname}=`;
|
|
1158
|
-
const decodedCookie = decodeURIComponent(document.cookie);
|
|
1159
|
+
const decodedCookie = decodeURIComponent(import_utils2.document.cookie);
|
|
1159
1160
|
const ca = decodedCookie.split(";");
|
|
1160
1161
|
for (let i = 0; i < ca.length; i++) {
|
|
1161
1162
|
let c = ca[i];
|
|
@@ -1602,7 +1603,7 @@ var activateConfig = (def) => {
|
|
|
1602
1603
|
return FACTORY[def || FACTORY.active];
|
|
1603
1604
|
};
|
|
1604
1605
|
var getActiveConfig = (def) => {
|
|
1605
|
-
return FACTORY[def || FACTORY.active];
|
|
1606
|
+
return FACTORY[def || FACTORY.active] || CONFIG;
|
|
1606
1607
|
};
|
|
1607
1608
|
var setActiveConfig = (newConfig) => {
|
|
1608
1609
|
if (!(0, import_utils.isObject)(newConfig))
|
package/dist/cjs/index.js
CHANGED
|
@@ -1178,20 +1178,21 @@ var require_cookie = __commonJS({
|
|
|
1178
1178
|
});
|
|
1179
1179
|
module2.exports = __toCommonJS2(cookie_exports);
|
|
1180
1180
|
var import_types = require_types();
|
|
1181
|
+
var import_utils27 = require_cjs2();
|
|
1181
1182
|
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
1182
1183
|
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
1183
|
-
if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
|
|
1184
|
+
if ((0, import_types.isUndefined)(import_utils27.document) || (0, import_types.isUndefined)(import_utils27.document.cookie))
|
|
1184
1185
|
return;
|
|
1185
1186
|
const d = /* @__PURE__ */ new Date();
|
|
1186
1187
|
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
1187
1188
|
const expires = `expires=${d.toUTCString()}`;
|
|
1188
|
-
document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
1189
|
+
import_utils27.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
1189
1190
|
};
|
|
1190
1191
|
var getCookie = (cname) => {
|
|
1191
|
-
if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
|
|
1192
|
+
if ((0, import_types.isUndefined)(import_utils27.document) || (0, import_types.isUndefined)(import_utils27.document.cookie))
|
|
1192
1193
|
return;
|
|
1193
1194
|
const name = `${cname}=`;
|
|
1194
|
-
const decodedCookie = decodeURIComponent(document.cookie);
|
|
1195
|
+
const decodedCookie = decodeURIComponent(import_utils27.document.cookie);
|
|
1195
1196
|
const ca = decodedCookie.split(";");
|
|
1196
1197
|
for (let i = 0; i < ca.length; i++) {
|
|
1197
1198
|
let c = ca[i];
|
|
@@ -1408,9 +1409,9 @@ var require_cjs2 = __commonJS({
|
|
|
1408
1409
|
}
|
|
1409
1410
|
});
|
|
1410
1411
|
|
|
1411
|
-
//
|
|
1412
|
+
// ../../node_modules/@symbo.ls/utils/dist/cjs/index.js
|
|
1412
1413
|
var require_cjs3 = __commonJS({
|
|
1413
|
-
"
|
|
1414
|
+
"../../node_modules/@symbo.ls/utils/dist/cjs/index.js"(exports, module2) {
|
|
1414
1415
|
"use strict";
|
|
1415
1416
|
var __create2 = Object.create;
|
|
1416
1417
|
var __defProp2 = Object.defineProperty;
|
|
@@ -2533,20 +2534,21 @@ var require_cjs3 = __commonJS({
|
|
|
2533
2534
|
});
|
|
2534
2535
|
module22.exports = __toCommonJS22(cookie_exports);
|
|
2535
2536
|
var import_types = require_types2();
|
|
2537
|
+
var import_utils32 = require_cjs4();
|
|
2536
2538
|
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
2537
2539
|
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
2538
|
-
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))
|
|
2539
2541
|
return;
|
|
2540
2542
|
const d = /* @__PURE__ */ new Date();
|
|
2541
2543
|
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
2542
2544
|
const expires = `expires=${d.toUTCString()}`;
|
|
2543
|
-
document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
2545
|
+
import_utils32.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
2544
2546
|
};
|
|
2545
2547
|
var getCookie = (cname) => {
|
|
2546
|
-
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))
|
|
2547
2549
|
return;
|
|
2548
2550
|
const name = `${cname}=`;
|
|
2549
|
-
const decodedCookie = decodeURIComponent(document.cookie);
|
|
2551
|
+
const decodedCookie = decodeURIComponent(import_utils32.document.cookie);
|
|
2550
2552
|
const ca = decodedCookie.split(";");
|
|
2551
2553
|
for (let i = 0; i < ca.length; i++) {
|
|
2552
2554
|
let c = ca[i];
|
|
@@ -2766,6 +2768,7 @@ var require_cjs3 = __commonJS({
|
|
|
2766
2768
|
findClosestNumber: () => findClosestNumber,
|
|
2767
2769
|
findClosestNumberInFactory: () => findClosestNumberInFactory,
|
|
2768
2770
|
formatDate: () => formatDate,
|
|
2771
|
+
loadJavascript: () => loadJavascript,
|
|
2769
2772
|
loadJavascriptFile: () => loadJavascriptFile,
|
|
2770
2773
|
removeChars: () => removeChars,
|
|
2771
2774
|
toCamelCase: () => toCamelCase2,
|
|
@@ -2837,6 +2840,17 @@ var require_cjs3 = __commonJS({
|
|
|
2837
2840
|
}
|
|
2838
2841
|
});
|
|
2839
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
|
+
};
|
|
2840
2854
|
var copyStringToClipboard = (str) => {
|
|
2841
2855
|
const el = document.createElement("textarea");
|
|
2842
2856
|
el.value = str;
|
|
@@ -2863,6 +2877,8 @@ var require_cjs3 = __commonJS({
|
|
|
2863
2877
|
);
|
|
2864
2878
|
var toDashCase2 = (val) => val.replace(/[^a-zA-Z0-9]/g, " ").trim().toLowerCase().replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
2865
2879
|
var toDescriptionCase = (str = "") => {
|
|
2880
|
+
if (typeof str !== "string")
|
|
2881
|
+
return;
|
|
2866
2882
|
const result = str.replace(/([A-Z])/g, " $1");
|
|
2867
2883
|
return result.charAt(0).toUpperCase() + result.slice(1);
|
|
2868
2884
|
};
|
|
@@ -3490,7 +3506,7 @@ var activateConfig = (def) => {
|
|
|
3490
3506
|
return FACTORY[def || FACTORY.active];
|
|
3491
3507
|
};
|
|
3492
3508
|
var getActiveConfig = (def) => {
|
|
3493
|
-
return FACTORY[def || FACTORY.active];
|
|
3509
|
+
return FACTORY[def || FACTORY.active] || CONFIG;
|
|
3494
3510
|
};
|
|
3495
3511
|
var setActiveConfig = (newConfig) => {
|
|
3496
3512
|
if (!(0, import_utils2.isObject)(newConfig))
|
package/dist/cjs/set.js
CHANGED
|
@@ -1142,20 +1142,21 @@ var require_cookie = __commonJS({
|
|
|
1142
1142
|
});
|
|
1143
1143
|
module2.exports = __toCommonJS2(cookie_exports);
|
|
1144
1144
|
var import_types = require_types();
|
|
1145
|
+
var import_utils26 = require_cjs();
|
|
1145
1146
|
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
1146
1147
|
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
1147
|
-
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))
|
|
1148
1149
|
return;
|
|
1149
1150
|
const d = /* @__PURE__ */ new Date();
|
|
1150
1151
|
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
1151
1152
|
const expires = `expires=${d.toUTCString()}`;
|
|
1152
|
-
document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
1153
|
+
import_utils26.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
1153
1154
|
};
|
|
1154
1155
|
var getCookie = (cname) => {
|
|
1155
|
-
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))
|
|
1156
1157
|
return;
|
|
1157
1158
|
const name = `${cname}=`;
|
|
1158
|
-
const decodedCookie = decodeURIComponent(document.cookie);
|
|
1159
|
+
const decodedCookie = decodeURIComponent(import_utils26.document.cookie);
|
|
1159
1160
|
const ca = decodedCookie.split(";");
|
|
1160
1161
|
for (let i = 0; i < ca.length; i++) {
|
|
1161
1162
|
let c = ca[i];
|
|
@@ -1408,9 +1409,9 @@ var require_cjs2 = __commonJS({
|
|
|
1408
1409
|
}
|
|
1409
1410
|
});
|
|
1410
1411
|
|
|
1411
|
-
//
|
|
1412
|
+
// ../../node_modules/@symbo.ls/utils/dist/cjs/index.js
|
|
1412
1413
|
var require_cjs3 = __commonJS({
|
|
1413
|
-
"
|
|
1414
|
+
"../../node_modules/@symbo.ls/utils/dist/cjs/index.js"(exports, module2) {
|
|
1414
1415
|
"use strict";
|
|
1415
1416
|
var __create2 = Object.create;
|
|
1416
1417
|
var __defProp2 = Object.defineProperty;
|
|
@@ -2533,20 +2534,21 @@ var require_cjs3 = __commonJS({
|
|
|
2533
2534
|
});
|
|
2534
2535
|
module22.exports = __toCommonJS22(cookie_exports);
|
|
2535
2536
|
var import_types = require_types2();
|
|
2537
|
+
var import_utils32 = require_cjs4();
|
|
2536
2538
|
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
2537
2539
|
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
2538
|
-
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))
|
|
2539
2541
|
return;
|
|
2540
2542
|
const d = /* @__PURE__ */ new Date();
|
|
2541
2543
|
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
2542
2544
|
const expires = `expires=${d.toUTCString()}`;
|
|
2543
|
-
document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
2545
|
+
import_utils32.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
2544
2546
|
};
|
|
2545
2547
|
var getCookie = (cname) => {
|
|
2546
|
-
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))
|
|
2547
2549
|
return;
|
|
2548
2550
|
const name = `${cname}=`;
|
|
2549
|
-
const decodedCookie = decodeURIComponent(document.cookie);
|
|
2551
|
+
const decodedCookie = decodeURIComponent(import_utils32.document.cookie);
|
|
2550
2552
|
const ca = decodedCookie.split(";");
|
|
2551
2553
|
for (let i = 0; i < ca.length; i++) {
|
|
2552
2554
|
let c = ca[i];
|
|
@@ -2766,6 +2768,7 @@ var require_cjs3 = __commonJS({
|
|
|
2766
2768
|
findClosestNumber: () => findClosestNumber,
|
|
2767
2769
|
findClosestNumberInFactory: () => findClosestNumberInFactory,
|
|
2768
2770
|
formatDate: () => formatDate,
|
|
2771
|
+
loadJavascript: () => loadJavascript,
|
|
2769
2772
|
loadJavascriptFile: () => loadJavascriptFile,
|
|
2770
2773
|
removeChars: () => removeChars,
|
|
2771
2774
|
toCamelCase: () => toCamelCase2,
|
|
@@ -2837,6 +2840,17 @@ var require_cjs3 = __commonJS({
|
|
|
2837
2840
|
}
|
|
2838
2841
|
});
|
|
2839
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
|
+
};
|
|
2840
2854
|
var copyStringToClipboard = (str) => {
|
|
2841
2855
|
const el = document.createElement("textarea");
|
|
2842
2856
|
el.value = str;
|
|
@@ -2863,6 +2877,8 @@ var require_cjs3 = __commonJS({
|
|
|
2863
2877
|
);
|
|
2864
2878
|
var toDashCase2 = (val) => val.replace(/[^a-zA-Z0-9]/g, " ").trim().toLowerCase().replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
2865
2879
|
var toDescriptionCase = (str = "") => {
|
|
2880
|
+
if (typeof str !== "string")
|
|
2881
|
+
return;
|
|
2866
2882
|
const result = str.replace(/([A-Z])/g, " $1");
|
|
2867
2883
|
return result.charAt(0).toUpperCase() + result.slice(1);
|
|
2868
2884
|
};
|
|
@@ -3103,7 +3119,7 @@ var FACTORY = {
|
|
|
3103
3119
|
0: CONFIG
|
|
3104
3120
|
};
|
|
3105
3121
|
var getActiveConfig = (def) => {
|
|
3106
|
-
return FACTORY[def || FACTORY.active];
|
|
3122
|
+
return FACTORY[def || FACTORY.active] || CONFIG;
|
|
3107
3123
|
};
|
|
3108
3124
|
var setActiveConfig = (newConfig) => {
|
|
3109
3125
|
if (!(0, import_utils.isObject)(newConfig))
|
package/dist/cjs/system/color.js
CHANGED
|
@@ -1142,20 +1142,21 @@ var require_cookie = __commonJS({
|
|
|
1142
1142
|
});
|
|
1143
1143
|
module2.exports = __toCommonJS2(cookie_exports);
|
|
1144
1144
|
var import_types = require_types();
|
|
1145
|
+
var import_utils9 = require_cjs();
|
|
1145
1146
|
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
1146
1147
|
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
1147
|
-
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))
|
|
1148
1149
|
return;
|
|
1149
1150
|
const d = /* @__PURE__ */ new Date();
|
|
1150
1151
|
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
1151
1152
|
const expires = `expires=${d.toUTCString()}`;
|
|
1152
|
-
document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
1153
|
+
import_utils9.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
1153
1154
|
};
|
|
1154
1155
|
var getCookie = (cname) => {
|
|
1155
|
-
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))
|
|
1156
1157
|
return;
|
|
1157
1158
|
const name = `${cname}=`;
|
|
1158
|
-
const decodedCookie = decodeURIComponent(document.cookie);
|
|
1159
|
+
const decodedCookie = decodeURIComponent(import_utils9.document.cookie);
|
|
1159
1160
|
const ca = decodedCookie.split(";");
|
|
1160
1161
|
for (let i = 0; i < ca.length; i++) {
|
|
1161
1162
|
let c = ca[i];
|
|
@@ -1408,9 +1409,9 @@ var require_cjs2 = __commonJS({
|
|
|
1408
1409
|
}
|
|
1409
1410
|
});
|
|
1410
1411
|
|
|
1411
|
-
//
|
|
1412
|
+
// ../../node_modules/@symbo.ls/utils/dist/cjs/index.js
|
|
1412
1413
|
var require_cjs3 = __commonJS({
|
|
1413
|
-
"
|
|
1414
|
+
"../../node_modules/@symbo.ls/utils/dist/cjs/index.js"(exports, module2) {
|
|
1414
1415
|
"use strict";
|
|
1415
1416
|
var __create2 = Object.create;
|
|
1416
1417
|
var __defProp2 = Object.defineProperty;
|
|
@@ -2533,20 +2534,21 @@ var require_cjs3 = __commonJS({
|
|
|
2533
2534
|
});
|
|
2534
2535
|
module22.exports = __toCommonJS22(cookie_exports);
|
|
2535
2536
|
var import_types = require_types2();
|
|
2537
|
+
var import_utils32 = require_cjs4();
|
|
2536
2538
|
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
2537
2539
|
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
2538
|
-
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))
|
|
2539
2541
|
return;
|
|
2540
2542
|
const d = /* @__PURE__ */ new Date();
|
|
2541
2543
|
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
2542
2544
|
const expires = `expires=${d.toUTCString()}`;
|
|
2543
|
-
document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
2545
|
+
import_utils32.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
2544
2546
|
};
|
|
2545
2547
|
var getCookie = (cname) => {
|
|
2546
|
-
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))
|
|
2547
2549
|
return;
|
|
2548
2550
|
const name = `${cname}=`;
|
|
2549
|
-
const decodedCookie = decodeURIComponent(document.cookie);
|
|
2551
|
+
const decodedCookie = decodeURIComponent(import_utils32.document.cookie);
|
|
2550
2552
|
const ca = decodedCookie.split(";");
|
|
2551
2553
|
for (let i = 0; i < ca.length; i++) {
|
|
2552
2554
|
let c = ca[i];
|
|
@@ -2766,6 +2768,7 @@ var require_cjs3 = __commonJS({
|
|
|
2766
2768
|
findClosestNumber: () => findClosestNumber,
|
|
2767
2769
|
findClosestNumberInFactory: () => findClosestNumberInFactory,
|
|
2768
2770
|
formatDate: () => formatDate,
|
|
2771
|
+
loadJavascript: () => loadJavascript,
|
|
2769
2772
|
loadJavascriptFile: () => loadJavascriptFile,
|
|
2770
2773
|
removeChars: () => removeChars,
|
|
2771
2774
|
toCamelCase: () => toCamelCase,
|
|
@@ -2837,6 +2840,17 @@ var require_cjs3 = __commonJS({
|
|
|
2837
2840
|
}
|
|
2838
2841
|
});
|
|
2839
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
|
+
};
|
|
2840
2854
|
var copyStringToClipboard = (str) => {
|
|
2841
2855
|
const el = document.createElement("textarea");
|
|
2842
2856
|
el.value = str;
|
|
@@ -2863,6 +2877,8 @@ var require_cjs3 = __commonJS({
|
|
|
2863
2877
|
);
|
|
2864
2878
|
var toDashCase2 = (val) => val.replace(/[^a-zA-Z0-9]/g, " ").trim().toLowerCase().replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
2865
2879
|
var toDescriptionCase = (str = "") => {
|
|
2880
|
+
if (typeof str !== "string")
|
|
2881
|
+
return;
|
|
2866
2882
|
const result = str.replace(/([A-Z])/g, " $1");
|
|
2867
2883
|
return result.charAt(0).toUpperCase() + result.slice(1);
|
|
2868
2884
|
};
|
|
@@ -3104,7 +3120,7 @@ var FACTORY = {
|
|
|
3104
3120
|
0: CONFIG
|
|
3105
3121
|
};
|
|
3106
3122
|
var getActiveConfig = (def) => {
|
|
3107
|
-
return FACTORY[def || FACTORY.active];
|
|
3123
|
+
return FACTORY[def || FACTORY.active] || CONFIG;
|
|
3108
3124
|
};
|
|
3109
3125
|
|
|
3110
3126
|
// src/utils/color.js
|
|
@@ -1142,20 +1142,21 @@ var require_cookie = __commonJS({
|
|
|
1142
1142
|
});
|
|
1143
1143
|
module2.exports = __toCommonJS2(cookie_exports);
|
|
1144
1144
|
var import_types = require_types();
|
|
1145
|
+
var import_utils9 = require_cjs();
|
|
1145
1146
|
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
1146
1147
|
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
1147
|
-
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))
|
|
1148
1149
|
return;
|
|
1149
1150
|
const d = /* @__PURE__ */ new Date();
|
|
1150
1151
|
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
1151
1152
|
const expires = `expires=${d.toUTCString()}`;
|
|
1152
|
-
document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
1153
|
+
import_utils9.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
1153
1154
|
};
|
|
1154
1155
|
var getCookie = (cname) => {
|
|
1155
|
-
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))
|
|
1156
1157
|
return;
|
|
1157
1158
|
const name = `${cname}=`;
|
|
1158
|
-
const decodedCookie = decodeURIComponent(document.cookie);
|
|
1159
|
+
const decodedCookie = decodeURIComponent(import_utils9.document.cookie);
|
|
1159
1160
|
const ca = decodedCookie.split(";");
|
|
1160
1161
|
for (let i = 0; i < ca.length; i++) {
|
|
1161
1162
|
let c = ca[i];
|
|
@@ -1408,9 +1409,9 @@ var require_cjs2 = __commonJS({
|
|
|
1408
1409
|
}
|
|
1409
1410
|
});
|
|
1410
1411
|
|
|
1411
|
-
//
|
|
1412
|
+
// ../../node_modules/@symbo.ls/utils/dist/cjs/index.js
|
|
1412
1413
|
var require_cjs3 = __commonJS({
|
|
1413
|
-
"
|
|
1414
|
+
"../../node_modules/@symbo.ls/utils/dist/cjs/index.js"(exports, module2) {
|
|
1414
1415
|
"use strict";
|
|
1415
1416
|
var __create2 = Object.create;
|
|
1416
1417
|
var __defProp2 = Object.defineProperty;
|
|
@@ -2533,20 +2534,21 @@ var require_cjs3 = __commonJS({
|
|
|
2533
2534
|
});
|
|
2534
2535
|
module22.exports = __toCommonJS22(cookie_exports);
|
|
2535
2536
|
var import_types = require_types2();
|
|
2537
|
+
var import_utils32 = require_cjs4();
|
|
2536
2538
|
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
2537
2539
|
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
2538
|
-
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))
|
|
2539
2541
|
return;
|
|
2540
2542
|
const d = /* @__PURE__ */ new Date();
|
|
2541
2543
|
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
2542
2544
|
const expires = `expires=${d.toUTCString()}`;
|
|
2543
|
-
document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
2545
|
+
import_utils32.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
2544
2546
|
};
|
|
2545
2547
|
var getCookie = (cname) => {
|
|
2546
|
-
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))
|
|
2547
2549
|
return;
|
|
2548
2550
|
const name = `${cname}=`;
|
|
2549
|
-
const decodedCookie = decodeURIComponent(document.cookie);
|
|
2551
|
+
const decodedCookie = decodeURIComponent(import_utils32.document.cookie);
|
|
2550
2552
|
const ca = decodedCookie.split(";");
|
|
2551
2553
|
for (let i = 0; i < ca.length; i++) {
|
|
2552
2554
|
let c = ca[i];
|
|
@@ -2766,6 +2768,7 @@ var require_cjs3 = __commonJS({
|
|
|
2766
2768
|
findClosestNumber: () => findClosestNumber,
|
|
2767
2769
|
findClosestNumberInFactory: () => findClosestNumberInFactory,
|
|
2768
2770
|
formatDate: () => formatDate,
|
|
2771
|
+
loadJavascript: () => loadJavascript,
|
|
2769
2772
|
loadJavascriptFile: () => loadJavascriptFile,
|
|
2770
2773
|
removeChars: () => removeChars,
|
|
2771
2774
|
toCamelCase: () => toCamelCase,
|
|
@@ -2837,6 +2840,17 @@ var require_cjs3 = __commonJS({
|
|
|
2837
2840
|
}
|
|
2838
2841
|
});
|
|
2839
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
|
+
};
|
|
2840
2854
|
var copyStringToClipboard = (str) => {
|
|
2841
2855
|
const el = document.createElement("textarea");
|
|
2842
2856
|
el.value = str;
|
|
@@ -2863,6 +2877,8 @@ var require_cjs3 = __commonJS({
|
|
|
2863
2877
|
);
|
|
2864
2878
|
var toDashCase2 = (val) => val.replace(/[^a-zA-Z0-9]/g, " ").trim().toLowerCase().replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
2865
2879
|
var toDescriptionCase = (str = "") => {
|
|
2880
|
+
if (typeof str !== "string")
|
|
2881
|
+
return;
|
|
2866
2882
|
const result = str.replace(/([A-Z])/g, " $1");
|
|
2867
2883
|
return result.charAt(0).toUpperCase() + result.slice(1);
|
|
2868
2884
|
};
|
|
@@ -3101,7 +3117,7 @@ var FACTORY = {
|
|
|
3101
3117
|
0: CONFIG
|
|
3102
3118
|
};
|
|
3103
3119
|
var getActiveConfig = (def) => {
|
|
3104
|
-
return FACTORY[def || FACTORY.active];
|
|
3120
|
+
return FACTORY[def || FACTORY.active] || CONFIG;
|
|
3105
3121
|
};
|
|
3106
3122
|
|
|
3107
3123
|
// src/utils/color.js
|
package/dist/cjs/system/font.js
CHANGED
|
@@ -1142,20 +1142,21 @@ var require_cookie = __commonJS({
|
|
|
1142
1142
|
});
|
|
1143
1143
|
module2.exports = __toCommonJS2(cookie_exports);
|
|
1144
1144
|
var import_types = require_types();
|
|
1145
|
+
var import_utils10 = require_cjs();
|
|
1145
1146
|
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
1146
1147
|
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
1147
|
-
if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
|
|
1148
|
+
if ((0, import_types.isUndefined)(import_utils10.document) || (0, import_types.isUndefined)(import_utils10.document.cookie))
|
|
1148
1149
|
return;
|
|
1149
1150
|
const d = /* @__PURE__ */ new Date();
|
|
1150
1151
|
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
1151
1152
|
const expires = `expires=${d.toUTCString()}`;
|
|
1152
|
-
document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
1153
|
+
import_utils10.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
1153
1154
|
};
|
|
1154
1155
|
var getCookie = (cname) => {
|
|
1155
|
-
if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
|
|
1156
|
+
if ((0, import_types.isUndefined)(import_utils10.document) || (0, import_types.isUndefined)(import_utils10.document.cookie))
|
|
1156
1157
|
return;
|
|
1157
1158
|
const name = `${cname}=`;
|
|
1158
|
-
const decodedCookie = decodeURIComponent(document.cookie);
|
|
1159
|
+
const decodedCookie = decodeURIComponent(import_utils10.document.cookie);
|
|
1159
1160
|
const ca = decodedCookie.split(";");
|
|
1160
1161
|
for (let i = 0; i < ca.length; i++) {
|
|
1161
1162
|
let c = ca[i];
|
|
@@ -1372,9 +1373,9 @@ var require_cjs = __commonJS({
|
|
|
1372
1373
|
}
|
|
1373
1374
|
});
|
|
1374
1375
|
|
|
1375
|
-
//
|
|
1376
|
+
// ../../node_modules/@symbo.ls/utils/dist/cjs/index.js
|
|
1376
1377
|
var require_cjs2 = __commonJS({
|
|
1377
|
-
"
|
|
1378
|
+
"../../node_modules/@symbo.ls/utils/dist/cjs/index.js"(exports, module2) {
|
|
1378
1379
|
"use strict";
|
|
1379
1380
|
var __create2 = Object.create;
|
|
1380
1381
|
var __defProp2 = Object.defineProperty;
|
|
@@ -2497,20 +2498,21 @@ var require_cjs2 = __commonJS({
|
|
|
2497
2498
|
});
|
|
2498
2499
|
module22.exports = __toCommonJS22(cookie_exports);
|
|
2499
2500
|
var import_types = require_types2();
|
|
2501
|
+
var import_utils32 = require_cjs4();
|
|
2500
2502
|
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
2501
2503
|
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
2502
|
-
if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
|
|
2504
|
+
if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
|
|
2503
2505
|
return;
|
|
2504
2506
|
const d = /* @__PURE__ */ new Date();
|
|
2505
2507
|
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
2506
2508
|
const expires = `expires=${d.toUTCString()}`;
|
|
2507
|
-
document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
2509
|
+
import_utils32.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
2508
2510
|
};
|
|
2509
2511
|
var getCookie = (cname) => {
|
|
2510
|
-
if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
|
|
2512
|
+
if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
|
|
2511
2513
|
return;
|
|
2512
2514
|
const name = `${cname}=`;
|
|
2513
|
-
const decodedCookie = decodeURIComponent(document.cookie);
|
|
2515
|
+
const decodedCookie = decodeURIComponent(import_utils32.document.cookie);
|
|
2514
2516
|
const ca = decodedCookie.split(";");
|
|
2515
2517
|
for (let i = 0; i < ca.length; i++) {
|
|
2516
2518
|
let c = ca[i];
|
|
@@ -2730,6 +2732,7 @@ var require_cjs2 = __commonJS({
|
|
|
2730
2732
|
findClosestNumber: () => findClosestNumber,
|
|
2731
2733
|
findClosestNumberInFactory: () => findClosestNumberInFactory,
|
|
2732
2734
|
formatDate: () => formatDate,
|
|
2735
|
+
loadJavascript: () => loadJavascript,
|
|
2733
2736
|
loadJavascriptFile: () => loadJavascriptFile,
|
|
2734
2737
|
removeChars: () => removeChars,
|
|
2735
2738
|
toCamelCase: () => toCamelCase,
|
|
@@ -2801,6 +2804,17 @@ var require_cjs2 = __commonJS({
|
|
|
2801
2804
|
}
|
|
2802
2805
|
});
|
|
2803
2806
|
};
|
|
2807
|
+
var loadJavascript = (body, async = true, doc = document, type = "text/javascript") => {
|
|
2808
|
+
try {
|
|
2809
|
+
const scriptEle = doc.createElement("script");
|
|
2810
|
+
scriptEle.type = type;
|
|
2811
|
+
scriptEle.async = async;
|
|
2812
|
+
scriptEle.innerHTML = body;
|
|
2813
|
+
doc.body.appendChild(scriptEle);
|
|
2814
|
+
} catch (error) {
|
|
2815
|
+
console.warn(error);
|
|
2816
|
+
}
|
|
2817
|
+
};
|
|
2804
2818
|
var copyStringToClipboard = (str) => {
|
|
2805
2819
|
const el = document.createElement("textarea");
|
|
2806
2820
|
el.value = str;
|
|
@@ -2827,6 +2841,8 @@ var require_cjs2 = __commonJS({
|
|
|
2827
2841
|
);
|
|
2828
2842
|
var toDashCase2 = (val) => val.replace(/[^a-zA-Z0-9]/g, " ").trim().toLowerCase().replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
2829
2843
|
var toDescriptionCase = (str = "") => {
|
|
2844
|
+
if (typeof str !== "string")
|
|
2845
|
+
return;
|
|
2830
2846
|
const result = str.replace(/([A-Z])/g, " $1");
|
|
2831
2847
|
return result.charAt(0).toUpperCase() + result.slice(1);
|
|
2832
2848
|
};
|
|
@@ -3104,7 +3120,7 @@ var FACTORY = {
|
|
|
3104
3120
|
0: CONFIG
|
|
3105
3121
|
};
|
|
3106
3122
|
var getActiveConfig = (def) => {
|
|
3107
|
-
return FACTORY[def || FACTORY.active];
|
|
3123
|
+
return FACTORY[def || FACTORY.active] || CONFIG;
|
|
3108
3124
|
};
|
|
3109
3125
|
|
|
3110
3126
|
// src/utils/color.js
|