@symbo.ls/scratch 2.11.410 → 2.11.429
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 +18 -4
- package/dist/cjs/index.js +2297 -2248
- package/dist/cjs/set.js +2234 -2187
- package/dist/cjs/system/color.js +2145 -2101
- package/dist/cjs/system/document.js +2072 -2028
- package/dist/cjs/system/font.js +1846 -1801
- package/dist/cjs/system/index.js +2277 -2230
- package/dist/cjs/system/reset.js +2057 -2013
- package/dist/cjs/system/shadow.js +2154 -2109
- package/dist/cjs/system/spacing.js +1907 -1862
- package/dist/cjs/system/svg.js +1837 -1793
- package/dist/cjs/system/theme.js +2153 -2109
- package/dist/cjs/system/timing.js +1908 -1861
- package/dist/cjs/system/typography.js +2065 -2021
- package/dist/cjs/transforms/index.js +2176 -2129
- package/dist/cjs/utils/color.js +18 -4
- package/dist/cjs/utils/index.js +2082 -2036
- package/dist/cjs/utils/sequence.js +1820 -1774
- package/dist/cjs/utils/sprite.js +18 -4
- package/dist/cjs/utils/var.js +2033 -1989
- package/package.json +2 -2
- package/src/utils/sequence.js +2 -1
|
@@ -34,29 +34,29 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
34
34
|
var require_key = __commonJS({
|
|
35
35
|
"../../../domql/packages/utils/dist/cjs/key.js"(exports, module2) {
|
|
36
36
|
"use strict";
|
|
37
|
-
var
|
|
38
|
-
var
|
|
39
|
-
var
|
|
40
|
-
var
|
|
41
|
-
var
|
|
37
|
+
var __defProp2 = Object.defineProperty;
|
|
38
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
39
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
40
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
41
|
+
var __export2 = (target, all) => {
|
|
42
42
|
for (var name in all)
|
|
43
|
-
|
|
43
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
44
44
|
};
|
|
45
|
-
var
|
|
45
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
46
46
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
47
|
-
for (let key of
|
|
48
|
-
if (!
|
|
49
|
-
|
|
47
|
+
for (let key of __getOwnPropNames2(from))
|
|
48
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
49
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
50
50
|
}
|
|
51
51
|
return to;
|
|
52
52
|
};
|
|
53
|
-
var
|
|
53
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
54
54
|
var key_exports = {};
|
|
55
|
-
|
|
55
|
+
__export2(key_exports, {
|
|
56
56
|
createSnapshotId: () => createSnapshotId,
|
|
57
57
|
generateKey: () => generateKey
|
|
58
58
|
});
|
|
59
|
-
module2.exports =
|
|
59
|
+
module2.exports = __toCommonJS2(key_exports);
|
|
60
60
|
var generateKey = /* @__PURE__ */ function() {
|
|
61
61
|
let index = 0;
|
|
62
62
|
function newId() {
|
|
@@ -73,32 +73,32 @@ var require_key = __commonJS({
|
|
|
73
73
|
var require_env = __commonJS({
|
|
74
74
|
"../../../domql/packages/utils/dist/cjs/env.js"(exports, module2) {
|
|
75
75
|
"use strict";
|
|
76
|
-
var
|
|
77
|
-
var
|
|
78
|
-
var
|
|
79
|
-
var
|
|
80
|
-
var
|
|
76
|
+
var __defProp2 = Object.defineProperty;
|
|
77
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
78
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
79
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
80
|
+
var __export2 = (target, all) => {
|
|
81
81
|
for (var name in all)
|
|
82
|
-
|
|
82
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
83
83
|
};
|
|
84
|
-
var
|
|
84
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
85
85
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
86
|
-
for (let key of
|
|
87
|
-
if (!
|
|
88
|
-
|
|
86
|
+
for (let key of __getOwnPropNames2(from))
|
|
87
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
88
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
89
89
|
}
|
|
90
90
|
return to;
|
|
91
91
|
};
|
|
92
|
-
var
|
|
92
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
93
93
|
var env_exports = {};
|
|
94
|
-
|
|
94
|
+
__export2(env_exports, {
|
|
95
95
|
NODE_ENV: () => NODE_ENV,
|
|
96
96
|
getNev: () => getNev,
|
|
97
97
|
isDevelopment: () => isDevelopment,
|
|
98
98
|
isProduction: () => isProduction,
|
|
99
99
|
isTest: () => isTest
|
|
100
100
|
});
|
|
101
|
-
module2.exports =
|
|
101
|
+
module2.exports = __toCommonJS2(env_exports);
|
|
102
102
|
var NODE_ENV = "development";
|
|
103
103
|
var isProduction = (env = NODE_ENV) => env === "production" || env === "prod" || env !== "development" && env !== "dev" && env !== "test";
|
|
104
104
|
var isTest = (env = NODE_ENV) => env === "test";
|
|
@@ -111,35 +111,35 @@ var require_env = __commonJS({
|
|
|
111
111
|
var require_globals = __commonJS({
|
|
112
112
|
"../../../domql/packages/utils/dist/cjs/globals.js"(exports, module2) {
|
|
113
113
|
"use strict";
|
|
114
|
-
var
|
|
115
|
-
var
|
|
116
|
-
var
|
|
117
|
-
var
|
|
118
|
-
var
|
|
114
|
+
var __defProp2 = Object.defineProperty;
|
|
115
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
116
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
117
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
118
|
+
var __export2 = (target, all) => {
|
|
119
119
|
for (var name in all)
|
|
120
|
-
|
|
120
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
121
121
|
};
|
|
122
|
-
var
|
|
122
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
123
123
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
124
|
-
for (let key of
|
|
125
|
-
if (!
|
|
126
|
-
|
|
124
|
+
for (let key of __getOwnPropNames2(from))
|
|
125
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
126
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
127
127
|
}
|
|
128
128
|
return to;
|
|
129
129
|
};
|
|
130
|
-
var
|
|
130
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
131
131
|
var globals_exports = {};
|
|
132
|
-
|
|
132
|
+
__export2(globals_exports, {
|
|
133
133
|
document: () => document3,
|
|
134
134
|
global: () => global,
|
|
135
135
|
self: () => self,
|
|
136
|
-
window: () =>
|
|
136
|
+
window: () => window3
|
|
137
137
|
});
|
|
138
|
-
module2.exports =
|
|
138
|
+
module2.exports = __toCommonJS2(globals_exports);
|
|
139
139
|
var global = globalThis;
|
|
140
140
|
var self = globalThis;
|
|
141
|
-
var
|
|
142
|
-
var document3 =
|
|
141
|
+
var window3 = globalThis;
|
|
142
|
+
var document3 = window3.document;
|
|
143
143
|
}
|
|
144
144
|
});
|
|
145
145
|
|
|
@@ -147,29 +147,29 @@ var require_globals = __commonJS({
|
|
|
147
147
|
var require_node = __commonJS({
|
|
148
148
|
"../../../domql/packages/utils/dist/cjs/node.js"(exports, module2) {
|
|
149
149
|
"use strict";
|
|
150
|
-
var
|
|
151
|
-
var
|
|
152
|
-
var
|
|
153
|
-
var
|
|
154
|
-
var
|
|
150
|
+
var __defProp2 = Object.defineProperty;
|
|
151
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
152
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
153
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
154
|
+
var __export2 = (target, all) => {
|
|
155
155
|
for (var name in all)
|
|
156
|
-
|
|
156
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
157
157
|
};
|
|
158
|
-
var
|
|
158
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
159
159
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
160
|
-
for (let key of
|
|
161
|
-
if (!
|
|
162
|
-
|
|
160
|
+
for (let key of __getOwnPropNames2(from))
|
|
161
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
162
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
163
163
|
}
|
|
164
164
|
return to;
|
|
165
165
|
};
|
|
166
|
-
var
|
|
166
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
167
167
|
var node_exports = {};
|
|
168
|
-
|
|
168
|
+
__export2(node_exports, {
|
|
169
169
|
isHtmlElement: () => isHtmlElement,
|
|
170
170
|
isNode: () => isNode
|
|
171
171
|
});
|
|
172
|
-
module2.exports =
|
|
172
|
+
module2.exports = __toCommonJS2(node_exports);
|
|
173
173
|
var import_globals2 = require_globals();
|
|
174
174
|
var isNode = (obj) => {
|
|
175
175
|
return (typeof Node === "object" ? obj instanceof import_globals2.window.Node : obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string") || false;
|
|
@@ -184,25 +184,25 @@ var require_node = __commonJS({
|
|
|
184
184
|
var require_types = __commonJS({
|
|
185
185
|
"../../../domql/packages/utils/dist/cjs/types.js"(exports, module2) {
|
|
186
186
|
"use strict";
|
|
187
|
-
var
|
|
188
|
-
var
|
|
189
|
-
var
|
|
190
|
-
var
|
|
191
|
-
var
|
|
187
|
+
var __defProp2 = Object.defineProperty;
|
|
188
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
189
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
190
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
191
|
+
var __export2 = (target, all) => {
|
|
192
192
|
for (var name in all)
|
|
193
|
-
|
|
193
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
194
194
|
};
|
|
195
|
-
var
|
|
195
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
196
196
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
197
|
-
for (let key of
|
|
198
|
-
if (!
|
|
199
|
-
|
|
197
|
+
for (let key of __getOwnPropNames2(from))
|
|
198
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
199
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
200
200
|
}
|
|
201
201
|
return to;
|
|
202
202
|
};
|
|
203
|
-
var
|
|
203
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
204
204
|
var types_exports = {};
|
|
205
|
-
|
|
205
|
+
__export2(types_exports, {
|
|
206
206
|
TYPES: () => TYPES,
|
|
207
207
|
is: () => is,
|
|
208
208
|
isArray: () => isArray5,
|
|
@@ -218,7 +218,7 @@ var require_types = __commonJS({
|
|
|
218
218
|
isString: () => isString7,
|
|
219
219
|
isUndefined: () => isUndefined
|
|
220
220
|
});
|
|
221
|
-
module2.exports =
|
|
221
|
+
module2.exports = __toCommonJS2(types_exports);
|
|
222
222
|
var import_node = require_node();
|
|
223
223
|
var isObject4 = (arg) => {
|
|
224
224
|
if (arg === null)
|
|
@@ -274,25 +274,25 @@ var require_types = __commonJS({
|
|
|
274
274
|
var require_array = __commonJS({
|
|
275
275
|
"../../../domql/packages/utils/dist/cjs/array.js"(exports, module2) {
|
|
276
276
|
"use strict";
|
|
277
|
-
var
|
|
278
|
-
var
|
|
279
|
-
var
|
|
280
|
-
var
|
|
281
|
-
var
|
|
277
|
+
var __defProp2 = Object.defineProperty;
|
|
278
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
279
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
280
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
281
|
+
var __export2 = (target, all) => {
|
|
282
282
|
for (var name in all)
|
|
283
|
-
|
|
283
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
284
284
|
};
|
|
285
|
-
var
|
|
285
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
286
286
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
287
|
-
for (let key of
|
|
288
|
-
if (!
|
|
289
|
-
|
|
287
|
+
for (let key of __getOwnPropNames2(from))
|
|
288
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
289
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
290
290
|
}
|
|
291
291
|
return to;
|
|
292
292
|
};
|
|
293
|
-
var
|
|
293
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
294
294
|
var array_exports = {};
|
|
295
|
-
|
|
295
|
+
__export2(array_exports, {
|
|
296
296
|
addItemAfterEveryElement: () => addItemAfterEveryElement,
|
|
297
297
|
arrayContainsOtherArray: () => arrayContainsOtherArray,
|
|
298
298
|
arraysEqual: () => arraysEqual,
|
|
@@ -309,7 +309,7 @@ var require_array = __commonJS({
|
|
|
309
309
|
reorderArrayByValues: () => reorderArrayByValues,
|
|
310
310
|
swapItemsInArray: () => swapItemsInArray
|
|
311
311
|
});
|
|
312
|
-
module2.exports =
|
|
312
|
+
module2.exports = __toCommonJS2(array_exports);
|
|
313
313
|
var import_object = require_object();
|
|
314
314
|
var import_types = require_types();
|
|
315
315
|
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
@@ -342,10 +342,10 @@ var require_array = __commonJS({
|
|
|
342
342
|
return [].concat(...arrays);
|
|
343
343
|
};
|
|
344
344
|
var mergeArray = (arr, excludeFrom = []) => {
|
|
345
|
-
return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.
|
|
345
|
+
return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepCloneWithExtend)(c, excludeFrom), excludeFrom), {});
|
|
346
346
|
};
|
|
347
347
|
var mergeAndCloneIfArray = (obj) => {
|
|
348
|
-
return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.
|
|
348
|
+
return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepCloneWithExtend)(obj);
|
|
349
349
|
};
|
|
350
350
|
var cutArrayBeforeValue = (arr, value) => {
|
|
351
351
|
const index = arr.indexOf(value);
|
|
@@ -430,27 +430,29 @@ var require_array = __commonJS({
|
|
|
430
430
|
var require_string = __commonJS({
|
|
431
431
|
"../../../domql/packages/utils/dist/cjs/string.js"(exports, module2) {
|
|
432
432
|
"use strict";
|
|
433
|
-
var
|
|
434
|
-
var
|
|
435
|
-
var
|
|
436
|
-
var
|
|
437
|
-
var
|
|
433
|
+
var __defProp2 = Object.defineProperty;
|
|
434
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
435
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
436
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
437
|
+
var __export2 = (target, all) => {
|
|
438
438
|
for (var name in all)
|
|
439
|
-
|
|
439
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
440
440
|
};
|
|
441
|
-
var
|
|
441
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
442
442
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
443
|
-
for (let key of
|
|
444
|
-
if (!
|
|
445
|
-
|
|
443
|
+
for (let key of __getOwnPropNames2(from))
|
|
444
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
445
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
446
446
|
}
|
|
447
447
|
return to;
|
|
448
448
|
};
|
|
449
|
-
var
|
|
449
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
450
450
|
var string_exports = {};
|
|
451
|
-
|
|
451
|
+
__export2(string_exports, {
|
|
452
452
|
customDecodeURIComponent: () => customDecodeURIComponent,
|
|
453
453
|
customEncodeURIComponent: () => customEncodeURIComponent,
|
|
454
|
+
decodeNewlines: () => decodeNewlines,
|
|
455
|
+
encodeNewlines: () => encodeNewlines,
|
|
454
456
|
findKeyPosition: () => findKeyPosition,
|
|
455
457
|
lowercaseFirstLetter: () => lowercaseFirstLetter,
|
|
456
458
|
replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
|
|
@@ -458,7 +460,7 @@ var require_string = __commonJS({
|
|
|
458
460
|
stringIncludesAny: () => stringIncludesAny,
|
|
459
461
|
trimStringFromSymbols: () => trimStringFromSymbols
|
|
460
462
|
});
|
|
461
|
-
module2.exports =
|
|
463
|
+
module2.exports = __toCommonJS2(string_exports);
|
|
462
464
|
var stringIncludesAny = (str, characters) => {
|
|
463
465
|
for (const char of characters) {
|
|
464
466
|
if (str.includes(char)) {
|
|
@@ -554,6 +556,12 @@ var require_string = __commonJS({
|
|
|
554
556
|
return char;
|
|
555
557
|
});
|
|
556
558
|
};
|
|
559
|
+
var encodeNewlines = (str) => {
|
|
560
|
+
return str.split("\n").join("/////n").split("`").join("/////tilde").split("$").join("/////dlrsgn");
|
|
561
|
+
};
|
|
562
|
+
var decodeNewlines = (encodedStr) => {
|
|
563
|
+
return encodedStr.split("/////n").join("\n").split("/////tilde").join("`").split("/////dlrsgn").join("$");
|
|
564
|
+
};
|
|
557
565
|
var customEncodeURIComponent = (str) => {
|
|
558
566
|
return str.split("").map((char) => {
|
|
559
567
|
if (/[^a-zA-Z0-9\s]/.test(char)) {
|
|
@@ -572,25 +580,25 @@ var require_string = __commonJS({
|
|
|
572
580
|
var require_object = __commonJS({
|
|
573
581
|
"../../../domql/packages/utils/dist/cjs/object.js"(exports, module2) {
|
|
574
582
|
"use strict";
|
|
575
|
-
var
|
|
576
|
-
var
|
|
577
|
-
var
|
|
578
|
-
var
|
|
579
|
-
var
|
|
583
|
+
var __defProp2 = Object.defineProperty;
|
|
584
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
585
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
586
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
587
|
+
var __export2 = (target, all) => {
|
|
580
588
|
for (var name in all)
|
|
581
|
-
|
|
589
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
582
590
|
};
|
|
583
|
-
var
|
|
591
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
584
592
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
585
|
-
for (let key of
|
|
586
|
-
if (!
|
|
587
|
-
|
|
593
|
+
for (let key of __getOwnPropNames2(from))
|
|
594
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
595
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
588
596
|
}
|
|
589
597
|
return to;
|
|
590
598
|
};
|
|
591
|
-
var
|
|
599
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
592
600
|
var object_exports = {};
|
|
593
|
-
|
|
601
|
+
__export2(object_exports, {
|
|
594
602
|
checkIfKeyIsComponent: () => checkIfKeyIsComponent,
|
|
595
603
|
clone: () => clone,
|
|
596
604
|
createObjectWithoutPrototype: () => createObjectWithoutPrototype,
|
|
@@ -626,7 +634,7 @@ var require_object = __commonJS({
|
|
|
626
634
|
removeFromObject: () => removeFromObject,
|
|
627
635
|
stringToObject: () => stringToObject
|
|
628
636
|
});
|
|
629
|
-
module2.exports =
|
|
637
|
+
module2.exports = __toCommonJS2(object_exports);
|
|
630
638
|
var import_globals2 = require_globals();
|
|
631
639
|
var import_types = require_types();
|
|
632
640
|
var import_array = require_array();
|
|
@@ -732,7 +740,7 @@ var require_object = __commonJS({
|
|
|
732
740
|
return o;
|
|
733
741
|
};
|
|
734
742
|
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
735
|
-
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
743
|
+
const o = options.window ? (0, import_types.isArray)(obj) ? new options.window.Array([]) : new options.window.Object({}) : (0, import_types.isArray)(obj) ? [] : {};
|
|
736
744
|
for (const prop in obj) {
|
|
737
745
|
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
738
746
|
continue;
|
|
@@ -986,7 +994,7 @@ var require_object = __commonJS({
|
|
|
986
994
|
};
|
|
987
995
|
var overwriteDeep = (obj, params, excludeFrom = []) => {
|
|
988
996
|
for (const e in params) {
|
|
989
|
-
if (e === "
|
|
997
|
+
if (e === "__ref")
|
|
990
998
|
continue;
|
|
991
999
|
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
992
1000
|
continue;
|
|
@@ -1108,6 +1116,12 @@ var require_object = __commonJS({
|
|
|
1108
1116
|
if (foundString || foundInArray)
|
|
1109
1117
|
return el;
|
|
1110
1118
|
}
|
|
1119
|
+
if (el.parent && el.parent.childExtend) {
|
|
1120
|
+
const foundString = (0, import_types.isString)(el.parent.childExtend) && el.parent.childExtend === key;
|
|
1121
|
+
const foundInArray = (0, import_types.isArray)(el.parent.childExtend) && el.parent.childExtend.filter((v) => v === key).length;
|
|
1122
|
+
if (foundString || foundInArray)
|
|
1123
|
+
return el;
|
|
1124
|
+
}
|
|
1111
1125
|
};
|
|
1112
1126
|
var getExtendsInElement = (obj) => {
|
|
1113
1127
|
let result = [];
|
|
@@ -1140,31 +1154,31 @@ var require_object = __commonJS({
|
|
|
1140
1154
|
var require_function = __commonJS({
|
|
1141
1155
|
"../../../domql/packages/utils/dist/cjs/function.js"(exports, module2) {
|
|
1142
1156
|
"use strict";
|
|
1143
|
-
var
|
|
1144
|
-
var
|
|
1145
|
-
var
|
|
1146
|
-
var
|
|
1147
|
-
var
|
|
1157
|
+
var __defProp2 = Object.defineProperty;
|
|
1158
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1159
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1160
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1161
|
+
var __export2 = (target, all) => {
|
|
1148
1162
|
for (var name in all)
|
|
1149
|
-
|
|
1163
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
1150
1164
|
};
|
|
1151
|
-
var
|
|
1165
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
1152
1166
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1153
|
-
for (let key of
|
|
1154
|
-
if (!
|
|
1155
|
-
|
|
1167
|
+
for (let key of __getOwnPropNames2(from))
|
|
1168
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1169
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1156
1170
|
}
|
|
1157
1171
|
return to;
|
|
1158
1172
|
};
|
|
1159
|
-
var
|
|
1173
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1160
1174
|
var function_exports = {};
|
|
1161
|
-
|
|
1175
|
+
__export2(function_exports, {
|
|
1162
1176
|
debounce: () => debounce,
|
|
1163
1177
|
debounceOnContext: () => debounceOnContext,
|
|
1164
1178
|
isStringFunction: () => isStringFunction,
|
|
1165
1179
|
memoize: () => memoize
|
|
1166
1180
|
});
|
|
1167
|
-
module2.exports =
|
|
1181
|
+
module2.exports = __toCommonJS2(function_exports);
|
|
1168
1182
|
function debounce(func, wait, immediate) {
|
|
1169
1183
|
let timeout;
|
|
1170
1184
|
return function() {
|
|
@@ -1215,29 +1229,29 @@ var require_function = __commonJS({
|
|
|
1215
1229
|
var require_log = __commonJS({
|
|
1216
1230
|
"../../../domql/packages/utils/dist/cjs/log.js"(exports, module2) {
|
|
1217
1231
|
"use strict";
|
|
1218
|
-
var
|
|
1219
|
-
var
|
|
1220
|
-
var
|
|
1221
|
-
var
|
|
1222
|
-
var
|
|
1232
|
+
var __defProp2 = Object.defineProperty;
|
|
1233
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1234
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1235
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1236
|
+
var __export2 = (target, all) => {
|
|
1223
1237
|
for (var name in all)
|
|
1224
|
-
|
|
1238
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
1225
1239
|
};
|
|
1226
|
-
var
|
|
1240
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
1227
1241
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1228
|
-
for (let key of
|
|
1229
|
-
if (!
|
|
1230
|
-
|
|
1242
|
+
for (let key of __getOwnPropNames2(from))
|
|
1243
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1244
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1231
1245
|
}
|
|
1232
1246
|
return to;
|
|
1233
1247
|
};
|
|
1234
|
-
var
|
|
1248
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1235
1249
|
var log_exports = {};
|
|
1236
|
-
|
|
1250
|
+
__export2(log_exports, {
|
|
1237
1251
|
logGroupIf: () => logGroupIf,
|
|
1238
1252
|
logIf: () => logIf
|
|
1239
1253
|
});
|
|
1240
|
-
module2.exports =
|
|
1254
|
+
module2.exports = __toCommonJS2(log_exports);
|
|
1241
1255
|
var logIf = (bool, ...arg) => {
|
|
1242
1256
|
if (bool)
|
|
1243
1257
|
arg.map((v) => console.log(v));
|
|
@@ -1256,46 +1270,46 @@ var require_log = __commonJS({
|
|
|
1256
1270
|
var require_cookie = __commonJS({
|
|
1257
1271
|
"../../../domql/packages/utils/dist/cjs/cookie.js"(exports, module2) {
|
|
1258
1272
|
"use strict";
|
|
1259
|
-
var
|
|
1260
|
-
var
|
|
1261
|
-
var
|
|
1262
|
-
var
|
|
1263
|
-
var
|
|
1273
|
+
var __defProp2 = Object.defineProperty;
|
|
1274
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1275
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1276
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1277
|
+
var __export2 = (target, all) => {
|
|
1264
1278
|
for (var name in all)
|
|
1265
|
-
|
|
1279
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
1266
1280
|
};
|
|
1267
|
-
var
|
|
1281
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
1268
1282
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1269
|
-
for (let key of
|
|
1270
|
-
if (!
|
|
1271
|
-
|
|
1283
|
+
for (let key of __getOwnPropNames2(from))
|
|
1284
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1285
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1272
1286
|
}
|
|
1273
1287
|
return to;
|
|
1274
1288
|
};
|
|
1275
|
-
var
|
|
1289
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1276
1290
|
var cookie_exports = {};
|
|
1277
|
-
|
|
1291
|
+
__export2(cookie_exports, {
|
|
1278
1292
|
getCookie: () => getCookie,
|
|
1279
1293
|
isMobile: () => isMobile,
|
|
1280
1294
|
setCookie: () => setCookie
|
|
1281
1295
|
});
|
|
1282
|
-
module2.exports =
|
|
1296
|
+
module2.exports = __toCommonJS2(cookie_exports);
|
|
1283
1297
|
var import_types = require_types();
|
|
1284
|
-
var
|
|
1298
|
+
var import_utils13 = require_cjs();
|
|
1285
1299
|
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
1286
1300
|
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
1287
|
-
if ((0, import_types.isUndefined)(
|
|
1301
|
+
if ((0, import_types.isUndefined)(import_utils13.document) || (0, import_types.isUndefined)(import_utils13.document.cookie))
|
|
1288
1302
|
return;
|
|
1289
1303
|
const d = /* @__PURE__ */ new Date();
|
|
1290
1304
|
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
1291
1305
|
const expires = `expires=${d.toUTCString()}`;
|
|
1292
|
-
|
|
1306
|
+
import_utils13.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
1293
1307
|
};
|
|
1294
1308
|
var getCookie = (cname) => {
|
|
1295
|
-
if ((0, import_types.isUndefined)(
|
|
1309
|
+
if ((0, import_types.isUndefined)(import_utils13.document) || (0, import_types.isUndefined)(import_utils13.document.cookie))
|
|
1296
1310
|
return;
|
|
1297
1311
|
const name = `${cname}=`;
|
|
1298
|
-
const decodedCookie = decodeURIComponent(
|
|
1312
|
+
const decodedCookie = decodeURIComponent(import_utils13.document.cookie);
|
|
1299
1313
|
const ca = decodedCookie.split(";");
|
|
1300
1314
|
for (let i = 0; i < ca.length; i++) {
|
|
1301
1315
|
let c = ca[i];
|
|
@@ -1313,29 +1327,29 @@ var require_cookie = __commonJS({
|
|
|
1313
1327
|
var require_tags = __commonJS({
|
|
1314
1328
|
"../../../domql/packages/utils/dist/cjs/tags.js"(exports, module2) {
|
|
1315
1329
|
"use strict";
|
|
1316
|
-
var
|
|
1317
|
-
var
|
|
1318
|
-
var
|
|
1319
|
-
var
|
|
1320
|
-
var
|
|
1330
|
+
var __defProp2 = Object.defineProperty;
|
|
1331
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1332
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1333
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1334
|
+
var __export2 = (target, all) => {
|
|
1321
1335
|
for (var name in all)
|
|
1322
|
-
|
|
1336
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
1323
1337
|
};
|
|
1324
|
-
var
|
|
1338
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
1325
1339
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1326
|
-
for (let key of
|
|
1327
|
-
if (!
|
|
1328
|
-
|
|
1340
|
+
for (let key of __getOwnPropNames2(from))
|
|
1341
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1342
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1329
1343
|
}
|
|
1330
1344
|
return to;
|
|
1331
1345
|
};
|
|
1332
|
-
var
|
|
1346
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1333
1347
|
var tags_exports = {};
|
|
1334
|
-
|
|
1348
|
+
__export2(tags_exports, {
|
|
1335
1349
|
HTML_TAGS: () => HTML_TAGS,
|
|
1336
1350
|
isValidHtmlTag: () => isValidHtmlTag
|
|
1337
1351
|
});
|
|
1338
|
-
module2.exports =
|
|
1352
|
+
module2.exports = __toCommonJS2(tags_exports);
|
|
1339
1353
|
var HTML_TAGS = {
|
|
1340
1354
|
root: [
|
|
1341
1355
|
"body",
|
|
@@ -1481,22 +1495,22 @@ var require_tags = __commonJS({
|
|
|
1481
1495
|
var require_cjs = __commonJS({
|
|
1482
1496
|
"../../../domql/packages/utils/dist/cjs/index.js"(exports, module2) {
|
|
1483
1497
|
"use strict";
|
|
1484
|
-
var
|
|
1485
|
-
var
|
|
1486
|
-
var
|
|
1487
|
-
var
|
|
1488
|
-
var
|
|
1498
|
+
var __defProp2 = Object.defineProperty;
|
|
1499
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1500
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1501
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1502
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
1489
1503
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1490
|
-
for (let key of
|
|
1491
|
-
if (!
|
|
1492
|
-
|
|
1504
|
+
for (let key of __getOwnPropNames2(from))
|
|
1505
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1506
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1493
1507
|
}
|
|
1494
1508
|
return to;
|
|
1495
1509
|
};
|
|
1496
|
-
var __reExport = (target, mod, secondTarget) => (
|
|
1497
|
-
var
|
|
1510
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default"));
|
|
1511
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1498
1512
|
var utils_exports = {};
|
|
1499
|
-
module2.exports =
|
|
1513
|
+
module2.exports = __toCommonJS2(utils_exports);
|
|
1500
1514
|
__reExport(utils_exports, require_key(), module2.exports);
|
|
1501
1515
|
__reExport(utils_exports, require_env(), module2.exports);
|
|
1502
1516
|
__reExport(utils_exports, require_types(), module2.exports);
|
|
@@ -1516,2018 +1530,2046 @@ var require_cjs = __commonJS({
|
|
|
1516
1530
|
var require_cjs2 = __commonJS({
|
|
1517
1531
|
"../../node_modules/@domql/globals/dist/cjs/index.js"(exports, module2) {
|
|
1518
1532
|
"use strict";
|
|
1519
|
-
var
|
|
1520
|
-
var
|
|
1521
|
-
var
|
|
1522
|
-
var
|
|
1523
|
-
var
|
|
1533
|
+
var __defProp2 = Object.defineProperty;
|
|
1534
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1535
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1536
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1537
|
+
var __export2 = (target, all) => {
|
|
1524
1538
|
for (var name in all)
|
|
1525
|
-
|
|
1539
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
1526
1540
|
};
|
|
1527
|
-
var
|
|
1541
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
1528
1542
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1529
|
-
for (let key of
|
|
1530
|
-
if (!
|
|
1531
|
-
|
|
1543
|
+
for (let key of __getOwnPropNames2(from))
|
|
1544
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1545
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1532
1546
|
}
|
|
1533
1547
|
return to;
|
|
1534
1548
|
};
|
|
1535
|
-
var
|
|
1549
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1536
1550
|
var globals_exports = {};
|
|
1537
|
-
|
|
1551
|
+
__export2(globals_exports, {
|
|
1538
1552
|
document: () => document3,
|
|
1539
1553
|
global: () => global,
|
|
1540
1554
|
self: () => self,
|
|
1541
|
-
window: () =>
|
|
1555
|
+
window: () => window3
|
|
1542
1556
|
});
|
|
1543
|
-
module2.exports =
|
|
1557
|
+
module2.exports = __toCommonJS2(globals_exports);
|
|
1544
1558
|
var global = globalThis;
|
|
1545
1559
|
var self = globalThis;
|
|
1546
|
-
var
|
|
1547
|
-
var document3 =
|
|
1560
|
+
var window3 = globalThis;
|
|
1561
|
+
var document3 = window3.document;
|
|
1548
1562
|
}
|
|
1549
1563
|
});
|
|
1550
1564
|
|
|
1551
|
-
// src/system/shadow.js
|
|
1552
|
-
var shadow_exports = {};
|
|
1553
|
-
__export(shadow_exports, {
|
|
1554
|
-
getShadow: () => getShadow,
|
|
1555
|
-
setShadow: () => setShadow
|
|
1556
|
-
});
|
|
1557
|
-
module.exports = __toCommonJS(shadow_exports);
|
|
1558
|
-
|
|
1559
|
-
// src/factory.js
|
|
1560
|
-
var import_utils = __toESM(require_cjs(), 1);
|
|
1561
|
-
|
|
1562
|
-
// src/defaultConfig/index.js
|
|
1563
|
-
var defaultConfig_exports = {};
|
|
1564
|
-
__export(defaultConfig_exports, {
|
|
1565
|
-
ANIMATION: () => ANIMATION,
|
|
1566
|
-
BREAKPOINTS: () => BREAKPOINTS,
|
|
1567
|
-
CASES: () => CASES,
|
|
1568
|
-
COLOR: () => COLOR,
|
|
1569
|
-
DEVICES: () => DEVICES,
|
|
1570
|
-
DOCUMENT: () => DOCUMENT,
|
|
1571
|
-
FONT: () => FONT,
|
|
1572
|
-
FONT_FACE: () => FONT_FACE,
|
|
1573
|
-
FONT_FAMILY: () => FONT_FAMILY,
|
|
1574
|
-
FONT_FAMILY_TYPES: () => FONT_FAMILY_TYPES,
|
|
1575
|
-
GRADIENT: () => GRADIENT,
|
|
1576
|
-
GRID: () => GRID,
|
|
1577
|
-
ICONS: () => ICONS,
|
|
1578
|
-
MEDIA: () => MEDIA,
|
|
1579
|
-
RESET: () => RESET,
|
|
1580
|
-
SEMANTIC_ICONS: () => SEMANTIC_ICONS,
|
|
1581
|
-
SEQUENCE: () => SEQUENCE,
|
|
1582
|
-
SHADOW: () => SHADOW,
|
|
1583
|
-
SPACING: () => SPACING,
|
|
1584
|
-
SVG: () => SVG,
|
|
1585
|
-
SVG_DATA: () => SVG_DATA,
|
|
1586
|
-
TEMPLATES: () => TEMPLATES,
|
|
1587
|
-
THEME: () => THEME,
|
|
1588
|
-
TIMING: () => TIMING,
|
|
1589
|
-
TYPOGRAPHY: () => TYPOGRAPHY,
|
|
1590
|
-
UNIT: () => UNIT
|
|
1591
|
-
});
|
|
1592
|
-
|
|
1593
|
-
// src/defaultConfig/sequence.js
|
|
1594
|
-
var SEQUENCE = {
|
|
1595
|
-
"minor-second": 1.067,
|
|
1596
|
-
"major-second": 1.125,
|
|
1597
|
-
"minor-third": 1.2,
|
|
1598
|
-
"major-third": 1.25,
|
|
1599
|
-
"perfect-fourth": 1.333,
|
|
1600
|
-
"augmented-fourth": 1.414,
|
|
1601
|
-
"perfect-fifth": 1.5,
|
|
1602
|
-
"minor-sixth": 1.6,
|
|
1603
|
-
phi: 1.618,
|
|
1604
|
-
// golden-ratio
|
|
1605
|
-
"major-sixth": 1.667,
|
|
1606
|
-
"square-root-3": 1.732,
|
|
1607
|
-
// theodorus
|
|
1608
|
-
"minor-seventh": 1.778,
|
|
1609
|
-
"major-seventh": 1.875,
|
|
1610
|
-
octave: 2,
|
|
1611
|
-
"square-root-5": 2.23,
|
|
1612
|
-
// pythagoras
|
|
1613
|
-
"major-tenth": 2.5,
|
|
1614
|
-
"major-eleventh": 2.667,
|
|
1615
|
-
"major-twelfth": 3,
|
|
1616
|
-
pi: 3.14,
|
|
1617
|
-
// archimedes
|
|
1618
|
-
"double-octave": 4
|
|
1619
|
-
};
|
|
1620
|
-
|
|
1621
|
-
// src/defaultConfig/unit.js
|
|
1622
|
-
var UNIT = {
|
|
1623
|
-
default: "em"
|
|
1624
|
-
};
|
|
1625
|
-
|
|
1626
|
-
// src/defaultConfig/typography.js
|
|
1627
|
-
var defaultProps = {
|
|
1628
|
-
browserDefault: 16,
|
|
1629
|
-
base: 16,
|
|
1630
|
-
type: "font-size",
|
|
1631
|
-
ratio: SEQUENCE["minor-third"],
|
|
1632
|
-
range: [-3, 12],
|
|
1633
|
-
h1Matches: 6,
|
|
1634
|
-
lineHeight: 1.5,
|
|
1635
|
-
subSequence: true,
|
|
1636
|
-
mediaRegenerate: false,
|
|
1637
|
-
unit: "em",
|
|
1638
|
-
templates: {},
|
|
1639
|
-
sequence: {},
|
|
1640
|
-
scales: {},
|
|
1641
|
-
vars: {}
|
|
1642
|
-
};
|
|
1643
|
-
var TYPOGRAPHY = defaultProps;
|
|
1644
|
-
|
|
1645
|
-
// src/defaultConfig/font.js
|
|
1646
|
-
var FONT = {};
|
|
1647
|
-
|
|
1648
|
-
// src/defaultConfig/font-family.js
|
|
1649
|
-
var FONT_FAMILY = {};
|
|
1650
|
-
var FONT_FAMILY_TYPES = {
|
|
1651
|
-
"sans-serif": "Helvetica, Arial, sans-serif, --system-default",
|
|
1652
|
-
serif: "Times New Roman, Georgia, serif, --system-default",
|
|
1653
|
-
monospace: "Courier New, monospace, --system-default"
|
|
1654
|
-
};
|
|
1655
|
-
var FONT_FACE = {};
|
|
1656
|
-
|
|
1657
|
-
// src/defaultConfig/media.js
|
|
1658
|
-
var MEDIA = {
|
|
1659
|
-
tv: "(min-width: 2780px)",
|
|
1660
|
-
light: "(prefers-color-scheme: light)",
|
|
1661
|
-
dark: "(prefers-color-scheme: dark)",
|
|
1662
|
-
print: "print"
|
|
1663
|
-
};
|
|
1664
|
-
|
|
1665
|
-
// src/defaultConfig/spacing.js
|
|
1666
|
-
var defaultProps2 = {
|
|
1667
|
-
base: TYPOGRAPHY.base,
|
|
1668
|
-
type: "spacing",
|
|
1669
|
-
ratio: SEQUENCE.phi,
|
|
1670
|
-
range: [-5, 15],
|
|
1671
|
-
subSequence: true,
|
|
1672
|
-
mediaRegenerate: false,
|
|
1673
|
-
unit: "em",
|
|
1674
|
-
sequence: {},
|
|
1675
|
-
scales: {},
|
|
1676
|
-
vars: {}
|
|
1677
|
-
};
|
|
1678
|
-
var SPACING = defaultProps2;
|
|
1679
|
-
|
|
1680
|
-
// src/defaultConfig/color.js
|
|
1681
|
-
var COLOR = {};
|
|
1682
|
-
var GRADIENT = {};
|
|
1683
|
-
|
|
1684
|
-
// src/defaultConfig/theme.js
|
|
1685
|
-
var THEME = {};
|
|
1686
|
-
|
|
1687
|
-
// src/defaultConfig/shadow.js
|
|
1688
|
-
var SHADOW = {};
|
|
1689
|
-
|
|
1690
|
-
// src/defaultConfig/icons.js
|
|
1691
|
-
var ICONS = {};
|
|
1692
|
-
var SEMANTIC_ICONS = {};
|
|
1693
|
-
|
|
1694
|
-
// src/defaultConfig/timing.js
|
|
1695
|
-
var defaultProps3 = {
|
|
1696
|
-
default: 150,
|
|
1697
|
-
base: 150,
|
|
1698
|
-
type: "timing",
|
|
1699
|
-
ratio: SEQUENCE["perfect-fourth"],
|
|
1700
|
-
range: [-3, 12],
|
|
1701
|
-
mediaRegenerate: false,
|
|
1702
|
-
unit: "ms",
|
|
1703
|
-
sequence: {},
|
|
1704
|
-
scales: {},
|
|
1705
|
-
vars: {}
|
|
1706
|
-
};
|
|
1707
|
-
var TIMING = defaultProps3;
|
|
1708
|
-
|
|
1709
|
-
// src/defaultConfig/document.js
|
|
1710
|
-
var DOCUMENT = {};
|
|
1711
|
-
|
|
1712
|
-
// src/defaultConfig/responsive.js
|
|
1713
|
-
var BREAKPOINTS = {
|
|
1714
|
-
screenL: 1920,
|
|
1715
|
-
screenM: 1680,
|
|
1716
|
-
screenS: 1440,
|
|
1717
|
-
tabletL: 1366,
|
|
1718
|
-
tabletM: 1280,
|
|
1719
|
-
tabletS: 1024,
|
|
1720
|
-
mobileL: 768,
|
|
1721
|
-
mobileM: 560,
|
|
1722
|
-
mobileS: 480,
|
|
1723
|
-
mobileXS: 375
|
|
1724
|
-
};
|
|
1725
|
-
var DEVICES = {
|
|
1726
|
-
screenL: [1920, 1024],
|
|
1727
|
-
screenM: [1680, 1024],
|
|
1728
|
-
screenS: [1440, 978],
|
|
1729
|
-
tabletL: [1366, 926],
|
|
1730
|
-
tabletM: [1280, 768],
|
|
1731
|
-
tabletS: [1024, 768],
|
|
1732
|
-
mobileL: [768, 375],
|
|
1733
|
-
mobileM: [560, 768],
|
|
1734
|
-
mobileS: [480, 768],
|
|
1735
|
-
mobileXS: [375, 768]
|
|
1736
|
-
};
|
|
1737
|
-
|
|
1738
|
-
// src/defaultConfig/cases.js
|
|
1739
|
-
var CASES = {};
|
|
1740
|
-
|
|
1741
|
-
// src/defaultConfig/animation.js
|
|
1742
|
-
var ANIMATION = {};
|
|
1743
|
-
|
|
1744
|
-
// src/defaultConfig/svg.js
|
|
1745
|
-
var SVG = {};
|
|
1746
|
-
var SVG_DATA = {};
|
|
1747
|
-
|
|
1748
|
-
// src/defaultConfig/templates.js
|
|
1749
|
-
var TEMPLATES = {};
|
|
1750
|
-
|
|
1751
|
-
// src/defaultConfig/grid.js
|
|
1752
|
-
var defaultProps4 = {};
|
|
1753
|
-
var GRID = defaultProps4;
|
|
1754
|
-
|
|
1755
|
-
// src/defaultConfig/index.js
|
|
1756
|
-
var RESET = {};
|
|
1757
|
-
|
|
1758
|
-
// src/factory.js
|
|
1759
|
-
var CSS_VARS = {};
|
|
1760
|
-
var CONFIG = {
|
|
1761
|
-
verbose: false,
|
|
1762
|
-
useVariable: true,
|
|
1763
|
-
useReset: true,
|
|
1764
|
-
CSS_VARS,
|
|
1765
|
-
...defaultConfig_exports
|
|
1766
|
-
};
|
|
1767
|
-
var cachedConfig = (0, import_utils.deepClone)(CONFIG);
|
|
1768
|
-
var FACTORY = {
|
|
1769
|
-
active: "0",
|
|
1770
|
-
0: CONFIG
|
|
1771
|
-
};
|
|
1772
|
-
var getActiveConfig = (def) => {
|
|
1773
|
-
return FACTORY[def || FACTORY.active] || CONFIG;
|
|
1774
|
-
};
|
|
1775
|
-
|
|
1776
|
-
// src/system/color.js
|
|
1777
|
-
var import_utils8 = __toESM(require_cjs(), 1);
|
|
1778
|
-
|
|
1779
|
-
// src/utils/unit.js
|
|
1780
|
-
var isScalingUnit = (unit) => {
|
|
1781
|
-
return unit === "em" || unit === "rem" || unit === "vw" || unit === "vh" || unit === "vmax" || unit === "vmin";
|
|
1782
|
-
};
|
|
1783
|
-
|
|
1784
|
-
// src/utils/color.js
|
|
1785
|
-
var import_globals = __toESM(require_cjs2(), 1);
|
|
1786
|
-
var import_utils2 = __toESM(require_cjs(), 1);
|
|
1787
|
-
var colorStringToRgbaArray = (color) => {
|
|
1788
|
-
if (color === "")
|
|
1789
|
-
return [0, 0, 0, 0];
|
|
1790
|
-
if (color.toLowerCase() === "transparent")
|
|
1791
|
-
return [0, 0, 0, 0];
|
|
1792
|
-
if (color[0] === "#") {
|
|
1793
|
-
if (color.length < 7) {
|
|
1794
|
-
color = "#" + color[1] + color[1] + color[2] + color[2] + color[3] + color[3] + (color.length > 4 ? color[4] + color[4] : "");
|
|
1795
|
-
}
|
|
1796
|
-
return [
|
|
1797
|
-
parseInt(color.substr(1, 2), 16),
|
|
1798
|
-
parseInt(color.substr(3, 2), 16),
|
|
1799
|
-
parseInt(color.substr(5, 2), 16),
|
|
1800
|
-
color.length > 7 ? parseInt(color.substr(7, 2), 16) / 255 : 1
|
|
1801
|
-
];
|
|
1802
|
-
}
|
|
1803
|
-
if (color.indexOf("rgb") === -1) {
|
|
1804
|
-
if (import_globals.document && import_globals.window) {
|
|
1805
|
-
const elem = import_globals.document.body.appendChild(import_globals.document.createElement("fictum"));
|
|
1806
|
-
const flag = "rgb(1, 2, 3)";
|
|
1807
|
-
elem.style.color = flag;
|
|
1808
|
-
if (elem.style.color !== flag) {
|
|
1809
|
-
import_globals.document.body.removeChild(elem);
|
|
1810
|
-
return;
|
|
1811
|
-
}
|
|
1812
|
-
elem.style.color = color;
|
|
1813
|
-
if (elem.style.color === flag || elem.style.color === "") {
|
|
1814
|
-
import_globals.document.body.removeChild(elem);
|
|
1815
|
-
return [0, 0, 0, 0];
|
|
1816
|
-
}
|
|
1817
|
-
color = import_globals.window.getComputedStyle(elem).color;
|
|
1818
|
-
import_globals.document.body.removeChild(elem);
|
|
1819
|
-
}
|
|
1820
|
-
}
|
|
1821
|
-
if (color.indexOf("rgb") === 0) {
|
|
1822
|
-
if (color.indexOf("rgba") === -1)
|
|
1823
|
-
color = `${color}, 1`;
|
|
1824
|
-
return color.match(/[\.\d]+/g).map((a) => +a);
|
|
1825
|
-
}
|
|
1826
|
-
return [0, 0, 0, 0];
|
|
1827
|
-
};
|
|
1828
|
-
var hexToRgbArray = (hex, alpha = 1) => {
|
|
1829
|
-
const [r, g, b] = hex.match(/\w\w/g).map((x) => parseInt(x, 16));
|
|
1830
|
-
return [r, g, b];
|
|
1831
|
-
};
|
|
1832
|
-
var rgbArrayToHex = ([r, g, b]) => {
|
|
1833
|
-
return ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
|
|
1834
|
-
};
|
|
1835
|
-
var rgbToHSL = (r, g, b) => {
|
|
1836
|
-
const a = Math.max(r, g, b);
|
|
1837
|
-
const n = a - Math.min(r, g, b);
|
|
1838
|
-
const f = 1 - Math.abs(a + a - n - 1);
|
|
1839
|
-
const h = n && (a == r ? (g - b) / n : a == g ? 2 + (b - r) / n : 4 + (r - g) / n);
|
|
1840
|
-
return [60 * (h < 0 ? h + 6 : h), f ? n / f : 0, (a + a - n) / 2];
|
|
1841
|
-
};
|
|
1842
|
-
var hslToRgb = (h, s, l, a = s * Math.min(l, 1 - l), f = (n, k = (n + h / 30) % 12) => l - a * Math.max(
|
|
1843
|
-
Math.min(k - 3, 9 - k, 1),
|
|
1844
|
-
-1
|
|
1845
|
-
)) => [f(0), f(8), f(4)];
|
|
1846
|
-
var getColorShade = (col, amt) => {
|
|
1847
|
-
const num = parseInt(col, 16);
|
|
1848
|
-
let r = (num >> 16) + amt;
|
|
1849
|
-
if (r > 255)
|
|
1850
|
-
r = 255;
|
|
1851
|
-
else if (r < 0)
|
|
1852
|
-
r = 0;
|
|
1853
|
-
let b = (num >> 8 & 255) + amt;
|
|
1854
|
-
if (b > 255)
|
|
1855
|
-
b = 255;
|
|
1856
|
-
else if (b < 0)
|
|
1857
|
-
b = 0;
|
|
1858
|
-
let g = (num & 255) + amt;
|
|
1859
|
-
if (g > 255)
|
|
1860
|
-
g = 255;
|
|
1861
|
-
else if (g < 0)
|
|
1862
|
-
g = 0;
|
|
1863
|
-
return ((g | b << 8 | r << 16) + 16777216).toString(16).slice(1);
|
|
1864
|
-
};
|
|
1865
|
-
var getRgbTone = (rgb, tone) => {
|
|
1866
|
-
if ((0, import_utils2.isString)(rgb) && rgb.includes("rgb"))
|
|
1867
|
-
rgb = colorStringToRgbaArray(rgb).join(", ");
|
|
1868
|
-
if ((0, import_utils2.isString)(rgb))
|
|
1869
|
-
rgb = rgb.split(",").map((v) => parseFloat(v.trim()));
|
|
1870
|
-
if ((0, import_utils2.isNumber)(tone))
|
|
1871
|
-
tone += "";
|
|
1872
|
-
const toHex = rgbArrayToHex(rgb);
|
|
1873
|
-
const abs = tone.slice(0, 1);
|
|
1874
|
-
if (abs === "-" || abs === "+") {
|
|
1875
|
-
const colorShade = getColorShade(toHex, parseFloat(tone));
|
|
1876
|
-
return hexToRgbArray(colorShade).join(", ");
|
|
1877
|
-
} else {
|
|
1878
|
-
const [r, g, b] = rgb;
|
|
1879
|
-
const hsl = rgbToHSL(r, g, b);
|
|
1880
|
-
const [h, s, l] = hsl;
|
|
1881
|
-
const newRgb = hslToRgb(h, s, parseFloat(tone) / 100 * 255);
|
|
1882
|
-
return newRgb;
|
|
1883
|
-
}
|
|
1884
|
-
};
|
|
1885
|
-
|
|
1886
|
-
// src/utils/sequence.js
|
|
1887
|
-
var import_utils4 = __toESM(require_cjs(), 1);
|
|
1888
|
-
|
|
1889
1565
|
// ../utils/dist/cjs/index.js
|
|
1890
|
-
var
|
|
1891
|
-
|
|
1892
|
-
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1893
|
-
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1894
|
-
var __getProtoOf2 = Object.getPrototypeOf;
|
|
1895
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1896
|
-
var __commonJS2 = (cb, mod) => function __require() {
|
|
1897
|
-
return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
1898
|
-
};
|
|
1899
|
-
var __export2 = (target, all) => {
|
|
1900
|
-
for (var name in all)
|
|
1901
|
-
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
1902
|
-
};
|
|
1903
|
-
var __copyProps2 = (to, from, except, desc) => {
|
|
1904
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
1905
|
-
for (let key of __getOwnPropNames2(from))
|
|
1906
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1907
|
-
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1908
|
-
}
|
|
1909
|
-
return to;
|
|
1910
|
-
};
|
|
1911
|
-
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
1912
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
1913
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
1914
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
1915
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
1916
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
|
1917
|
-
mod
|
|
1918
|
-
));
|
|
1919
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1920
|
-
var require_key2 = __commonJS2({
|
|
1921
|
-
"../../../domql/packages/utils/dist/cjs/key.js"(exports, module2) {
|
|
1566
|
+
var require_cjs3 = __commonJS({
|
|
1567
|
+
"../utils/dist/cjs/index.js"(exports, module2) {
|
|
1922
1568
|
"use strict";
|
|
1923
|
-
var
|
|
1924
|
-
var
|
|
1925
|
-
var
|
|
1926
|
-
var
|
|
1927
|
-
var
|
|
1569
|
+
var __create2 = Object.create;
|
|
1570
|
+
var __defProp2 = Object.defineProperty;
|
|
1571
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1572
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1573
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
|
1574
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1575
|
+
var __commonJS2 = (cb, mod) => function __require() {
|
|
1576
|
+
return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
1577
|
+
};
|
|
1578
|
+
var __export2 = (target, all) => {
|
|
1928
1579
|
for (var name in all)
|
|
1929
|
-
|
|
1580
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
1930
1581
|
};
|
|
1931
|
-
var
|
|
1582
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
1932
1583
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1933
|
-
for (let key of
|
|
1934
|
-
if (!
|
|
1935
|
-
|
|
1584
|
+
for (let key of __getOwnPropNames2(from))
|
|
1585
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1586
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1936
1587
|
}
|
|
1937
1588
|
return to;
|
|
1938
1589
|
};
|
|
1939
|
-
var
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1590
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
1591
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
1592
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
1593
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
1594
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
1595
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
|
1596
|
+
mod
|
|
1597
|
+
));
|
|
1598
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1599
|
+
var require_key2 = __commonJS2({
|
|
1600
|
+
"../../../domql/packages/utils/dist/cjs/key.js"(exports2, module22) {
|
|
1601
|
+
"use strict";
|
|
1602
|
+
var __defProp22 = Object.defineProperty;
|
|
1603
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1604
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1605
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1606
|
+
var __export22 = (target, all) => {
|
|
1607
|
+
for (var name in all)
|
|
1608
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1609
|
+
};
|
|
1610
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1611
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1612
|
+
for (let key of __getOwnPropNames22(from))
|
|
1613
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1614
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1615
|
+
}
|
|
1616
|
+
return to;
|
|
1617
|
+
};
|
|
1618
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1619
|
+
var key_exports = {};
|
|
1620
|
+
__export22(key_exports, {
|
|
1621
|
+
createSnapshotId: () => createSnapshotId,
|
|
1622
|
+
generateKey: () => generateKey
|
|
1623
|
+
});
|
|
1624
|
+
module22.exports = __toCommonJS22(key_exports);
|
|
1625
|
+
var generateKey = /* @__PURE__ */ function() {
|
|
1626
|
+
let index = 0;
|
|
1627
|
+
function newId() {
|
|
1628
|
+
index++;
|
|
1629
|
+
return index;
|
|
1630
|
+
}
|
|
1631
|
+
return newId;
|
|
1632
|
+
}();
|
|
1633
|
+
var createSnapshotId = generateKey;
|
|
1634
|
+
}
|
|
1944
1635
|
});
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1636
|
+
var require_env2 = __commonJS2({
|
|
1637
|
+
"../../../domql/packages/utils/dist/cjs/env.js"(exports2, module22) {
|
|
1638
|
+
"use strict";
|
|
1639
|
+
var __defProp22 = Object.defineProperty;
|
|
1640
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1641
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1642
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1643
|
+
var __export22 = (target, all) => {
|
|
1644
|
+
for (var name in all)
|
|
1645
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1646
|
+
};
|
|
1647
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1648
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1649
|
+
for (let key of __getOwnPropNames22(from))
|
|
1650
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1651
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1652
|
+
}
|
|
1653
|
+
return to;
|
|
1654
|
+
};
|
|
1655
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1656
|
+
var env_exports = {};
|
|
1657
|
+
__export22(env_exports, {
|
|
1658
|
+
NODE_ENV: () => NODE_ENV,
|
|
1659
|
+
getNev: () => getNev,
|
|
1660
|
+
isDevelopment: () => isDevelopment,
|
|
1661
|
+
isProduction: () => isProduction,
|
|
1662
|
+
isTest: () => isTest
|
|
1663
|
+
});
|
|
1664
|
+
module22.exports = __toCommonJS22(env_exports);
|
|
1665
|
+
var NODE_ENV = "development";
|
|
1666
|
+
var isProduction = (env = NODE_ENV) => env === "production" || env === "prod" || env !== "development" && env !== "dev" && env !== "test";
|
|
1667
|
+
var isTest = (env = NODE_ENV) => env === "test";
|
|
1668
|
+
var isDevelopment = (env = NODE_ENV) => env === "development" || env === "dev";
|
|
1669
|
+
var getNev = (key, env = NODE_ENV) => env[key];
|
|
1951
1670
|
}
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
var
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1671
|
+
});
|
|
1672
|
+
var require_globals2 = __commonJS2({
|
|
1673
|
+
"../../../domql/packages/utils/dist/cjs/globals.js"(exports2, module22) {
|
|
1674
|
+
"use strict";
|
|
1675
|
+
var __defProp22 = Object.defineProperty;
|
|
1676
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1677
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1678
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1679
|
+
var __export22 = (target, all) => {
|
|
1680
|
+
for (var name in all)
|
|
1681
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1682
|
+
};
|
|
1683
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1684
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1685
|
+
for (let key of __getOwnPropNames22(from))
|
|
1686
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1687
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1688
|
+
}
|
|
1689
|
+
return to;
|
|
1690
|
+
};
|
|
1691
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1692
|
+
var globals_exports = {};
|
|
1693
|
+
__export22(globals_exports, {
|
|
1694
|
+
document: () => document22,
|
|
1695
|
+
global: () => global,
|
|
1696
|
+
self: () => self,
|
|
1697
|
+
window: () => window22
|
|
1698
|
+
});
|
|
1699
|
+
module22.exports = __toCommonJS22(globals_exports);
|
|
1700
|
+
var global = globalThis;
|
|
1701
|
+
var self = globalThis;
|
|
1702
|
+
var window22 = globalThis;
|
|
1703
|
+
var document22 = window22.document;
|
|
1973
1704
|
}
|
|
1974
|
-
return to;
|
|
1975
|
-
};
|
|
1976
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1977
|
-
var env_exports = {};
|
|
1978
|
-
__export22(env_exports, {
|
|
1979
|
-
NODE_ENV: () => NODE_ENV,
|
|
1980
|
-
getNev: () => getNev,
|
|
1981
|
-
isDevelopment: () => isDevelopment,
|
|
1982
|
-
isProduction: () => isProduction,
|
|
1983
|
-
isTest: () => isTest
|
|
1984
1705
|
});
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
var
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
1706
|
+
var require_node2 = __commonJS2({
|
|
1707
|
+
"../../../domql/packages/utils/dist/cjs/node.js"(exports2, module22) {
|
|
1708
|
+
"use strict";
|
|
1709
|
+
var __defProp22 = Object.defineProperty;
|
|
1710
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1711
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1712
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1713
|
+
var __export22 = (target, all) => {
|
|
1714
|
+
for (var name in all)
|
|
1715
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1716
|
+
};
|
|
1717
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1718
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1719
|
+
for (let key of __getOwnPropNames22(from))
|
|
1720
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1721
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1722
|
+
}
|
|
1723
|
+
return to;
|
|
1724
|
+
};
|
|
1725
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1726
|
+
var node_exports = {};
|
|
1727
|
+
__export22(node_exports, {
|
|
1728
|
+
isHtmlElement: () => isHtmlElement,
|
|
1729
|
+
isNode: () => isNode
|
|
1730
|
+
});
|
|
1731
|
+
module22.exports = __toCommonJS22(node_exports);
|
|
1732
|
+
var import_globals2 = require_globals2();
|
|
1733
|
+
var isNode = (obj) => {
|
|
1734
|
+
return (typeof Node === "object" ? obj instanceof import_globals2.window.Node : obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string") || false;
|
|
1735
|
+
};
|
|
1736
|
+
var isHtmlElement = (obj) => {
|
|
1737
|
+
return (typeof HTMLElement === "object" ? obj instanceof import_globals2.window.HTMLElement : obj && typeof obj === "object" && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === "string") || false;
|
|
1738
|
+
};
|
|
2009
1739
|
}
|
|
2010
|
-
return to;
|
|
2011
|
-
};
|
|
2012
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2013
|
-
var globals_exports = {};
|
|
2014
|
-
__export22(globals_exports, {
|
|
2015
|
-
document: () => document22,
|
|
2016
|
-
global: () => global,
|
|
2017
|
-
self: () => self,
|
|
2018
|
-
window: () => window2
|
|
2019
1740
|
});
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
var
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
1741
|
+
var require_types2 = __commonJS2({
|
|
1742
|
+
"../../../domql/packages/utils/dist/cjs/types.js"(exports2, module22) {
|
|
1743
|
+
"use strict";
|
|
1744
|
+
var __defProp22 = Object.defineProperty;
|
|
1745
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1746
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1747
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1748
|
+
var __export22 = (target, all) => {
|
|
1749
|
+
for (var name in all)
|
|
1750
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1751
|
+
};
|
|
1752
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1753
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1754
|
+
for (let key of __getOwnPropNames22(from))
|
|
1755
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1756
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1757
|
+
}
|
|
1758
|
+
return to;
|
|
1759
|
+
};
|
|
1760
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1761
|
+
var types_exports = {};
|
|
1762
|
+
__export22(types_exports, {
|
|
1763
|
+
TYPES: () => TYPES,
|
|
1764
|
+
is: () => is,
|
|
1765
|
+
isArray: () => isArray32,
|
|
1766
|
+
isBoolean: () => isBoolean,
|
|
1767
|
+
isDate: () => isDate,
|
|
1768
|
+
isDefined: () => isDefined2,
|
|
1769
|
+
isFunction: () => isFunction,
|
|
1770
|
+
isNot: () => isNot,
|
|
1771
|
+
isNull: () => isNull,
|
|
1772
|
+
isNumber: () => isNumber2,
|
|
1773
|
+
isObject: () => isObject32,
|
|
1774
|
+
isObjectLike: () => isObjectLike2,
|
|
1775
|
+
isString: () => isString22,
|
|
1776
|
+
isUndefined: () => isUndefined
|
|
1777
|
+
});
|
|
1778
|
+
module22.exports = __toCommonJS22(types_exports);
|
|
1779
|
+
var import_node = require_node2();
|
|
1780
|
+
var isObject32 = (arg) => {
|
|
1781
|
+
if (arg === null)
|
|
1782
|
+
return false;
|
|
1783
|
+
return typeof arg === "object" && arg.constructor === Object;
|
|
1784
|
+
};
|
|
1785
|
+
var isString22 = (arg) => typeof arg === "string";
|
|
1786
|
+
var isNumber2 = (arg) => typeof arg === "number";
|
|
1787
|
+
var isFunction = (arg) => typeof arg === "function";
|
|
1788
|
+
var isBoolean = (arg) => arg === true || arg === false;
|
|
1789
|
+
var isNull = (arg) => arg === null;
|
|
1790
|
+
var isArray32 = (arg) => Array.isArray(arg);
|
|
1791
|
+
var isDate = (d) => d instanceof Date;
|
|
1792
|
+
var isObjectLike2 = (arg) => {
|
|
1793
|
+
if (arg === null)
|
|
1794
|
+
return false;
|
|
1795
|
+
return typeof arg === "object";
|
|
1796
|
+
};
|
|
1797
|
+
var isDefined2 = (arg) => {
|
|
1798
|
+
return isObject32(arg) || isObjectLike2(arg) || isString22(arg) || isNumber2(arg) || isFunction(arg) || isArray32(arg) || isObjectLike2(arg) || isBoolean(arg) || isDate(arg) || isNull(arg);
|
|
1799
|
+
};
|
|
1800
|
+
var isUndefined = (arg) => {
|
|
1801
|
+
return arg === void 0;
|
|
1802
|
+
};
|
|
1803
|
+
var TYPES = {
|
|
1804
|
+
boolean: isBoolean,
|
|
1805
|
+
array: isArray32,
|
|
1806
|
+
object: isObject32,
|
|
1807
|
+
string: isString22,
|
|
1808
|
+
date: isDate,
|
|
1809
|
+
number: isNumber2,
|
|
1810
|
+
null: isNull,
|
|
1811
|
+
function: isFunction,
|
|
1812
|
+
objectLike: isObjectLike2,
|
|
1813
|
+
node: import_node.isNode,
|
|
1814
|
+
htmlElement: import_node.isHtmlElement,
|
|
1815
|
+
defined: isDefined2
|
|
1816
|
+
};
|
|
1817
|
+
var is = (arg) => {
|
|
1818
|
+
return (...args) => {
|
|
1819
|
+
return args.map((val) => TYPES[val](arg)).filter((v) => v).length > 0;
|
|
1820
|
+
};
|
|
1821
|
+
};
|
|
1822
|
+
var isNot = (arg) => {
|
|
1823
|
+
return (...args) => {
|
|
1824
|
+
return args.map((val) => TYPES[val](arg)).filter((v) => v).length === 0;
|
|
1825
|
+
};
|
|
1826
|
+
};
|
|
2043
1827
|
}
|
|
2044
|
-
return to;
|
|
2045
|
-
};
|
|
2046
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2047
|
-
var node_exports = {};
|
|
2048
|
-
__export22(node_exports, {
|
|
2049
|
-
isHtmlElement: () => isHtmlElement,
|
|
2050
|
-
isNode: () => isNode
|
|
2051
1828
|
});
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
});
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
__defProp22(
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
1829
|
+
var require_array2 = __commonJS2({
|
|
1830
|
+
"../../../domql/packages/utils/dist/cjs/array.js"(exports2, module22) {
|
|
1831
|
+
"use strict";
|
|
1832
|
+
var __defProp22 = Object.defineProperty;
|
|
1833
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1834
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1835
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1836
|
+
var __export22 = (target, all) => {
|
|
1837
|
+
for (var name in all)
|
|
1838
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1839
|
+
};
|
|
1840
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1841
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1842
|
+
for (let key of __getOwnPropNames22(from))
|
|
1843
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1844
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1845
|
+
}
|
|
1846
|
+
return to;
|
|
1847
|
+
};
|
|
1848
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1849
|
+
var array_exports = {};
|
|
1850
|
+
__export22(array_exports, {
|
|
1851
|
+
addItemAfterEveryElement: () => addItemAfterEveryElement,
|
|
1852
|
+
arrayContainsOtherArray: () => arrayContainsOtherArray,
|
|
1853
|
+
arraysEqual: () => arraysEqual,
|
|
1854
|
+
createNestedObject: () => createNestedObject,
|
|
1855
|
+
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
1856
|
+
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
1857
|
+
getFrequencyInArray: () => getFrequencyInArray,
|
|
1858
|
+
joinArrays: () => joinArrays,
|
|
1859
|
+
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
1860
|
+
mergeArray: () => mergeArray,
|
|
1861
|
+
removeFromArray: () => removeFromArray,
|
|
1862
|
+
removeValueFromArray: () => removeValueFromArray,
|
|
1863
|
+
removeValueFromArrayAll: () => removeValueFromArrayAll,
|
|
1864
|
+
reorderArrayByValues: () => reorderArrayByValues,
|
|
1865
|
+
swapItemsInArray: () => swapItemsInArray
|
|
1866
|
+
});
|
|
1867
|
+
module22.exports = __toCommonJS22(array_exports);
|
|
1868
|
+
var import_object = require_object2();
|
|
1869
|
+
var import_types = require_types2();
|
|
1870
|
+
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
1871
|
+
return arr2.every((val) => arr1.includes(val));
|
|
1872
|
+
};
|
|
1873
|
+
var getFrequencyInArray = (arr, value) => {
|
|
1874
|
+
return arr.reduce((count, currentValue) => {
|
|
1875
|
+
return currentValue === value ? count + 1 : count;
|
|
1876
|
+
}, 0);
|
|
1877
|
+
};
|
|
1878
|
+
var removeFromArray = (arr, index) => {
|
|
1879
|
+
if ((0, import_types.isString)(index))
|
|
1880
|
+
index = parseInt(index);
|
|
1881
|
+
if ((0, import_types.isNumber)(index)) {
|
|
1882
|
+
if (index < 0 || index >= arr.length || isNaN(index)) {
|
|
1883
|
+
throw new Error("Invalid index");
|
|
1884
|
+
}
|
|
1885
|
+
arr.splice(index, 1);
|
|
1886
|
+
} else if ((0, import_types.isArray)(index)) {
|
|
1887
|
+
index.forEach((idx) => removeFromArray(arr, idx));
|
|
1888
|
+
} else {
|
|
1889
|
+
throw new Error("Invalid index");
|
|
1890
|
+
}
|
|
1891
|
+
return arr;
|
|
1892
|
+
};
|
|
1893
|
+
var swapItemsInArray = (arr, i, j) => {
|
|
1894
|
+
[arr[i], arr[j]] = [arr[j], arr[i]];
|
|
1895
|
+
};
|
|
1896
|
+
var joinArrays = (...arrays) => {
|
|
1897
|
+
return [].concat(...arrays);
|
|
1898
|
+
};
|
|
1899
|
+
var mergeArray = (arr, excludeFrom = []) => {
|
|
1900
|
+
return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepClone)(c, excludeFrom), excludeFrom), {});
|
|
1901
|
+
};
|
|
1902
|
+
var mergeAndCloneIfArray = (obj) => {
|
|
1903
|
+
return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepClone)(obj);
|
|
1904
|
+
};
|
|
1905
|
+
var cutArrayBeforeValue = (arr, value) => {
|
|
1906
|
+
const index = arr.indexOf(value);
|
|
1907
|
+
if (index !== -1) {
|
|
1908
|
+
return arr.slice(0, index);
|
|
1909
|
+
}
|
|
1910
|
+
return arr;
|
|
1911
|
+
};
|
|
1912
|
+
var cutArrayAfterValue = (arr, value) => {
|
|
1913
|
+
if (!(0, import_types.isArray)(arr))
|
|
1914
|
+
return;
|
|
1915
|
+
const index = arr.indexOf(value);
|
|
1916
|
+
if (index !== -1) {
|
|
1917
|
+
return arr.slice(index + 1);
|
|
1918
|
+
}
|
|
1919
|
+
return arr;
|
|
1920
|
+
};
|
|
1921
|
+
var createNestedObject = (arr, lastValue) => {
|
|
1922
|
+
const nestedObject = {};
|
|
1923
|
+
if (arr.length === 0) {
|
|
1924
|
+
return lastValue;
|
|
1925
|
+
}
|
|
1926
|
+
arr.reduce((obj, value, index) => {
|
|
1927
|
+
if (!obj[value]) {
|
|
1928
|
+
obj[value] = {};
|
|
1929
|
+
}
|
|
1930
|
+
if (index === arr.length - 1 && lastValue) {
|
|
1931
|
+
obj[value] = lastValue;
|
|
1932
|
+
}
|
|
1933
|
+
return obj[value];
|
|
1934
|
+
}, nestedObject);
|
|
1935
|
+
return nestedObject;
|
|
1936
|
+
};
|
|
1937
|
+
var removeValueFromArray = (arr, value) => {
|
|
1938
|
+
const index = arr.indexOf(value);
|
|
1939
|
+
if (index > -1) {
|
|
1940
|
+
const newArray = [...arr];
|
|
1941
|
+
newArray.splice(index, 1);
|
|
1942
|
+
return newArray;
|
|
1943
|
+
}
|
|
1944
|
+
return arr;
|
|
1945
|
+
};
|
|
1946
|
+
var removeValueFromArrayAll = (arr, value) => {
|
|
1947
|
+
return arr.filter((item) => item !== value);
|
|
1948
|
+
};
|
|
1949
|
+
var addItemAfterEveryElement = (array, item) => {
|
|
1950
|
+
const result = [];
|
|
1951
|
+
for (let i = 0; i < array.length; i++) {
|
|
1952
|
+
result.push(array[i]);
|
|
1953
|
+
if (i < array.length - 1) {
|
|
1954
|
+
result.push(item);
|
|
1955
|
+
}
|
|
1956
|
+
}
|
|
1957
|
+
return result;
|
|
1958
|
+
};
|
|
1959
|
+
var reorderArrayByValues = (array, valueToMove, insertBeforeValue) => {
|
|
1960
|
+
const newArray = [...array];
|
|
1961
|
+
const indexToMove = newArray.indexOf(valueToMove);
|
|
1962
|
+
const indexToInsertBefore = newArray.indexOf(insertBeforeValue);
|
|
1963
|
+
if (indexToMove !== -1 && indexToInsertBefore !== -1) {
|
|
1964
|
+
const removedItem = newArray.splice(indexToMove, 1)[0];
|
|
1965
|
+
const insertIndex = indexToInsertBefore < indexToMove ? indexToInsertBefore : indexToInsertBefore + 1;
|
|
1966
|
+
newArray.splice(insertIndex, 0, removedItem);
|
|
1967
|
+
}
|
|
1968
|
+
return newArray;
|
|
1969
|
+
};
|
|
1970
|
+
var arraysEqual = (arr1, arr2) => {
|
|
1971
|
+
if (arr1.length !== arr2.length) {
|
|
1972
|
+
return false;
|
|
1973
|
+
}
|
|
1974
|
+
for (let i = 0; i < arr1.length; i++) {
|
|
1975
|
+
if (arr1[i] !== arr2[i]) {
|
|
1976
|
+
return false;
|
|
1977
|
+
}
|
|
1978
|
+
}
|
|
1979
|
+
return true;
|
|
1980
|
+
};
|
|
2078
1981
|
}
|
|
2079
|
-
return to;
|
|
2080
|
-
};
|
|
2081
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2082
|
-
var types_exports = {};
|
|
2083
|
-
__export22(types_exports, {
|
|
2084
|
-
TYPES: () => TYPES,
|
|
2085
|
-
is: () => is,
|
|
2086
|
-
isArray: () => isArray32,
|
|
2087
|
-
isBoolean: () => isBoolean,
|
|
2088
|
-
isDate: () => isDate,
|
|
2089
|
-
isDefined: () => isDefined2,
|
|
2090
|
-
isFunction: () => isFunction,
|
|
2091
|
-
isNot: () => isNot,
|
|
2092
|
-
isNull: () => isNull,
|
|
2093
|
-
isNumber: () => isNumber2,
|
|
2094
|
-
isObject: () => isObject32,
|
|
2095
|
-
isObjectLike: () => isObjectLike2,
|
|
2096
|
-
isString: () => isString22,
|
|
2097
|
-
isUndefined: () => isUndefined
|
|
2098
1982
|
});
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
for (let key of __getOwnPropNames22(from))
|
|
2164
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2165
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2166
|
-
}
|
|
2167
|
-
return to;
|
|
2168
|
-
};
|
|
2169
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2170
|
-
var array_exports = {};
|
|
2171
|
-
__export22(array_exports, {
|
|
2172
|
-
addItemAfterEveryElement: () => addItemAfterEveryElement,
|
|
2173
|
-
arrayContainsOtherArray: () => arrayContainsOtherArray,
|
|
2174
|
-
arraysEqual: () => arraysEqual,
|
|
2175
|
-
createNestedObject: () => createNestedObject,
|
|
2176
|
-
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
2177
|
-
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
2178
|
-
getFrequencyInArray: () => getFrequencyInArray,
|
|
2179
|
-
joinArrays: () => joinArrays,
|
|
2180
|
-
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
2181
|
-
mergeArray: () => mergeArray,
|
|
2182
|
-
removeFromArray: () => removeFromArray,
|
|
2183
|
-
removeValueFromArray: () => removeValueFromArray,
|
|
2184
|
-
removeValueFromArrayAll: () => removeValueFromArrayAll,
|
|
2185
|
-
reorderArrayByValues: () => reorderArrayByValues,
|
|
2186
|
-
swapItemsInArray: () => swapItemsInArray
|
|
2187
|
-
});
|
|
2188
|
-
module2.exports = __toCommonJS22(array_exports);
|
|
2189
|
-
var import_object = require_object2();
|
|
2190
|
-
var import_types = require_types2();
|
|
2191
|
-
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
2192
|
-
return arr2.every((val) => arr1.includes(val));
|
|
2193
|
-
};
|
|
2194
|
-
var getFrequencyInArray = (arr, value) => {
|
|
2195
|
-
return arr.reduce((count, currentValue) => {
|
|
2196
|
-
return currentValue === value ? count + 1 : count;
|
|
2197
|
-
}, 0);
|
|
2198
|
-
};
|
|
2199
|
-
var removeFromArray = (arr, index) => {
|
|
2200
|
-
if ((0, import_types.isString)(index))
|
|
2201
|
-
index = parseInt(index);
|
|
2202
|
-
if ((0, import_types.isNumber)(index)) {
|
|
2203
|
-
if (index < 0 || index >= arr.length || isNaN(index)) {
|
|
2204
|
-
throw new Error("Invalid index");
|
|
2205
|
-
}
|
|
2206
|
-
arr.splice(index, 1);
|
|
2207
|
-
} else if ((0, import_types.isArray)(index)) {
|
|
2208
|
-
index.forEach((idx) => removeFromArray(arr, idx));
|
|
2209
|
-
} else {
|
|
2210
|
-
throw new Error("Invalid index");
|
|
2211
|
-
}
|
|
2212
|
-
return arr;
|
|
2213
|
-
};
|
|
2214
|
-
var swapItemsInArray = (arr, i, j) => {
|
|
2215
|
-
[arr[i], arr[j]] = [arr[j], arr[i]];
|
|
2216
|
-
};
|
|
2217
|
-
var joinArrays = (...arrays) => {
|
|
2218
|
-
return [].concat(...arrays);
|
|
2219
|
-
};
|
|
2220
|
-
var mergeArray = (arr, excludeFrom = []) => {
|
|
2221
|
-
return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepClone)(c, excludeFrom), excludeFrom), {});
|
|
2222
|
-
};
|
|
2223
|
-
var mergeAndCloneIfArray = (obj) => {
|
|
2224
|
-
return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepClone)(obj);
|
|
2225
|
-
};
|
|
2226
|
-
var cutArrayBeforeValue = (arr, value) => {
|
|
2227
|
-
const index = arr.indexOf(value);
|
|
2228
|
-
if (index !== -1) {
|
|
2229
|
-
return arr.slice(0, index);
|
|
2230
|
-
}
|
|
2231
|
-
return arr;
|
|
2232
|
-
};
|
|
2233
|
-
var cutArrayAfterValue = (arr, value) => {
|
|
2234
|
-
if (!(0, import_types.isArray)(arr))
|
|
2235
|
-
return;
|
|
2236
|
-
const index = arr.indexOf(value);
|
|
2237
|
-
if (index !== -1) {
|
|
2238
|
-
return arr.slice(index + 1);
|
|
2239
|
-
}
|
|
2240
|
-
return arr;
|
|
2241
|
-
};
|
|
2242
|
-
var createNestedObject = (arr, lastValue) => {
|
|
2243
|
-
const nestedObject = {};
|
|
2244
|
-
if (arr.length === 0) {
|
|
2245
|
-
return lastValue;
|
|
2246
|
-
}
|
|
2247
|
-
arr.reduce((obj, value, index) => {
|
|
2248
|
-
if (!obj[value]) {
|
|
2249
|
-
obj[value] = {};
|
|
2250
|
-
}
|
|
2251
|
-
if (index === arr.length - 1 && lastValue) {
|
|
2252
|
-
obj[value] = lastValue;
|
|
2253
|
-
}
|
|
2254
|
-
return obj[value];
|
|
2255
|
-
}, nestedObject);
|
|
2256
|
-
return nestedObject;
|
|
2257
|
-
};
|
|
2258
|
-
var removeValueFromArray = (arr, value) => {
|
|
2259
|
-
const index = arr.indexOf(value);
|
|
2260
|
-
if (index > -1) {
|
|
2261
|
-
const newArray = [...arr];
|
|
2262
|
-
newArray.splice(index, 1);
|
|
2263
|
-
return newArray;
|
|
2264
|
-
}
|
|
2265
|
-
return arr;
|
|
2266
|
-
};
|
|
2267
|
-
var removeValueFromArrayAll = (arr, value) => {
|
|
2268
|
-
return arr.filter((item) => item !== value);
|
|
2269
|
-
};
|
|
2270
|
-
var addItemAfterEveryElement = (array, item) => {
|
|
2271
|
-
const result = [];
|
|
2272
|
-
for (let i = 0; i < array.length; i++) {
|
|
2273
|
-
result.push(array[i]);
|
|
2274
|
-
if (i < array.length - 1) {
|
|
2275
|
-
result.push(item);
|
|
2276
|
-
}
|
|
2277
|
-
}
|
|
2278
|
-
return result;
|
|
2279
|
-
};
|
|
2280
|
-
var reorderArrayByValues = (array, valueToMove, insertBeforeValue) => {
|
|
2281
|
-
const newArray = [...array];
|
|
2282
|
-
const indexToMove = newArray.indexOf(valueToMove);
|
|
2283
|
-
const indexToInsertBefore = newArray.indexOf(insertBeforeValue);
|
|
2284
|
-
if (indexToMove !== -1 && indexToInsertBefore !== -1) {
|
|
2285
|
-
const removedItem = newArray.splice(indexToMove, 1)[0];
|
|
2286
|
-
const insertIndex = indexToInsertBefore < indexToMove ? indexToInsertBefore : indexToInsertBefore + 1;
|
|
2287
|
-
newArray.splice(insertIndex, 0, removedItem);
|
|
2288
|
-
}
|
|
2289
|
-
return newArray;
|
|
2290
|
-
};
|
|
2291
|
-
var arraysEqual = (arr1, arr2) => {
|
|
2292
|
-
if (arr1.length !== arr2.length) {
|
|
2293
|
-
return false;
|
|
2294
|
-
}
|
|
2295
|
-
for (let i = 0; i < arr1.length; i++) {
|
|
2296
|
-
if (arr1[i] !== arr2[i]) {
|
|
2297
|
-
return false;
|
|
2298
|
-
}
|
|
2299
|
-
}
|
|
2300
|
-
return true;
|
|
2301
|
-
};
|
|
2302
|
-
}
|
|
2303
|
-
});
|
|
2304
|
-
var require_string2 = __commonJS2({
|
|
2305
|
-
"../../../domql/packages/utils/dist/cjs/string.js"(exports, module2) {
|
|
2306
|
-
"use strict";
|
|
2307
|
-
var __defProp22 = Object.defineProperty;
|
|
2308
|
-
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2309
|
-
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2310
|
-
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2311
|
-
var __export22 = (target, all) => {
|
|
2312
|
-
for (var name in all)
|
|
2313
|
-
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2314
|
-
};
|
|
2315
|
-
var __copyProps22 = (to, from, except, desc) => {
|
|
2316
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
2317
|
-
for (let key of __getOwnPropNames22(from))
|
|
2318
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2319
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2320
|
-
}
|
|
2321
|
-
return to;
|
|
2322
|
-
};
|
|
2323
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2324
|
-
var string_exports = {};
|
|
2325
|
-
__export22(string_exports, {
|
|
2326
|
-
customDecodeURIComponent: () => customDecodeURIComponent,
|
|
2327
|
-
customEncodeURIComponent: () => customEncodeURIComponent,
|
|
2328
|
-
findKeyPosition: () => findKeyPosition,
|
|
2329
|
-
lowercaseFirstLetter: () => lowercaseFirstLetter,
|
|
2330
|
-
replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
|
|
2331
|
-
replaceOctalEscapeSequences: () => replaceOctalEscapeSequences,
|
|
2332
|
-
stringIncludesAny: () => stringIncludesAny,
|
|
2333
|
-
trimStringFromSymbols: () => trimStringFromSymbols
|
|
2334
|
-
});
|
|
2335
|
-
module2.exports = __toCommonJS22(string_exports);
|
|
2336
|
-
var stringIncludesAny = (str, characters) => {
|
|
2337
|
-
for (const char of characters) {
|
|
2338
|
-
if (str.includes(char)) {
|
|
2339
|
-
return true;
|
|
2340
|
-
}
|
|
2341
|
-
}
|
|
2342
|
-
return false;
|
|
2343
|
-
};
|
|
2344
|
-
var trimStringFromSymbols = (str, characters) => {
|
|
2345
|
-
const pattern = new RegExp(`[${characters.join("\\")}]`, "g");
|
|
2346
|
-
return str.replace(pattern, "");
|
|
2347
|
-
};
|
|
2348
|
-
var brackRegex = {
|
|
2349
|
-
2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
|
|
2350
|
-
3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
|
|
2351
|
-
};
|
|
2352
|
-
var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
|
|
2353
|
-
if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
|
|
2354
|
-
return str;
|
|
2355
|
-
const reg = brackRegex[options.bracketsLength || 2];
|
|
2356
|
-
return str.replace(reg, (_, parentPath, variable) => {
|
|
2357
|
-
if (parentPath) {
|
|
2358
|
-
const parentLevels = parentPath.match(options.bracketsLength === 3 ? /\.\.\.\//g : /\.\.\//g).length;
|
|
2359
|
-
let parentState = state;
|
|
2360
|
-
for (let i = 0; i < parentLevels; i++) {
|
|
2361
|
-
parentState = parentState.parent;
|
|
2362
|
-
if (!parentState) {
|
|
2363
|
-
return "";
|
|
2364
|
-
}
|
|
2365
|
-
}
|
|
2366
|
-
const value = parentState[variable.trim()];
|
|
2367
|
-
return value !== void 0 ? `${value}` : "";
|
|
2368
|
-
} else {
|
|
2369
|
-
const value = state[variable.trim()];
|
|
2370
|
-
return value !== void 0 ? `${value}` : "";
|
|
2371
|
-
}
|
|
2372
|
-
});
|
|
2373
|
-
};
|
|
2374
|
-
var lowercaseFirstLetter = (inputString) => {
|
|
2375
|
-
return `${inputString.charAt(0).toLowerCase()}${inputString.slice(1)}`;
|
|
2376
|
-
};
|
|
2377
|
-
var findKeyPosition = (str, key) => {
|
|
2378
|
-
const lines = str.split("\n");
|
|
2379
|
-
let startLineNumber = -1;
|
|
2380
|
-
let endLineNumber = -1;
|
|
2381
|
-
let startColumn = -1;
|
|
2382
|
-
let endColumn = -1;
|
|
2383
|
-
const keyPattern = new RegExp(`\\b${key}\\b\\s*:\\s*`);
|
|
2384
|
-
let braceCount = 0;
|
|
2385
|
-
let foundKey = false;
|
|
2386
|
-
for (let i = 0; i < lines.length; i++) {
|
|
2387
|
-
if (keyPattern.test(lines[i]) && !foundKey) {
|
|
2388
|
-
foundKey = true;
|
|
2389
|
-
startLineNumber = i + 1;
|
|
2390
|
-
startColumn = lines[i].indexOf(key) + 1;
|
|
2391
|
-
if (lines[i].includes("{}")) {
|
|
2392
|
-
endLineNumber = startLineNumber;
|
|
2393
|
-
endColumn = lines[i].indexOf("{}") + 3;
|
|
2394
|
-
break;
|
|
2395
|
-
}
|
|
2396
|
-
const line = lines[i].slice(startColumn + key.length);
|
|
2397
|
-
if (line.includes("{") || line.includes("[")) {
|
|
2398
|
-
braceCount = 1;
|
|
2399
|
-
} else {
|
|
2400
|
-
endLineNumber = i + 1;
|
|
2401
|
-
endColumn = lines[i].length + 1;
|
|
2402
|
-
break;
|
|
2403
|
-
}
|
|
2404
|
-
} else if (foundKey) {
|
|
2405
|
-
braceCount += (lines[i].match(/{/g) || []).length;
|
|
2406
|
-
braceCount += (lines[i].match(/\[/g) || []).length;
|
|
2407
|
-
braceCount -= (lines[i].match(/}/g) || []).length;
|
|
2408
|
-
braceCount -= (lines[i].match(/]/g) || []).length;
|
|
2409
|
-
if (braceCount === 0) {
|
|
2410
|
-
endLineNumber = i + 1;
|
|
2411
|
-
endColumn = lines[i].lastIndexOf("}") !== -1 ? lines[i].lastIndexOf("}") + 2 : lines[i].length + 1;
|
|
2412
|
-
break;
|
|
2413
|
-
}
|
|
2414
|
-
}
|
|
2415
|
-
}
|
|
2416
|
-
return {
|
|
2417
|
-
startColumn,
|
|
2418
|
-
endColumn,
|
|
2419
|
-
startLineNumber,
|
|
2420
|
-
endLineNumber
|
|
2421
|
-
};
|
|
2422
|
-
};
|
|
2423
|
-
var replaceOctalEscapeSequences = (str) => {
|
|
2424
|
-
const octalRegex = /\\([0-7]{1,3})/g;
|
|
2425
|
-
return str.replace(octalRegex, (match, p1) => {
|
|
2426
|
-
const octalValue = parseInt(p1, 8);
|
|
2427
|
-
const char = String.fromCharCode(octalValue);
|
|
2428
|
-
return char;
|
|
2429
|
-
});
|
|
2430
|
-
};
|
|
2431
|
-
var customEncodeURIComponent = (str) => {
|
|
2432
|
-
return str.split("").map((char) => {
|
|
2433
|
-
if (/[^a-zA-Z0-9\s]/.test(char)) {
|
|
2434
|
-
return "%" + char.charCodeAt(0).toString(16).toUpperCase();
|
|
2435
|
-
}
|
|
2436
|
-
return char;
|
|
2437
|
-
}).join("");
|
|
2438
|
-
};
|
|
2439
|
-
var customDecodeURIComponent = (encodedStr) => {
|
|
2440
|
-
return encodedStr.replace(/%[0-9A-Fa-f]{2}/g, (match) => String.fromCharCode(parseInt(match.slice(1), 16)));
|
|
2441
|
-
};
|
|
2442
|
-
}
|
|
2443
|
-
});
|
|
2444
|
-
var require_object2 = __commonJS2({
|
|
2445
|
-
"../../../domql/packages/utils/dist/cjs/object.js"(exports, module2) {
|
|
2446
|
-
"use strict";
|
|
2447
|
-
var __defProp22 = Object.defineProperty;
|
|
2448
|
-
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2449
|
-
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2450
|
-
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2451
|
-
var __export22 = (target, all) => {
|
|
2452
|
-
for (var name in all)
|
|
2453
|
-
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2454
|
-
};
|
|
2455
|
-
var __copyProps22 = (to, from, except, desc) => {
|
|
2456
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
2457
|
-
for (let key of __getOwnPropNames22(from))
|
|
2458
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2459
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2460
|
-
}
|
|
2461
|
-
return to;
|
|
2462
|
-
};
|
|
2463
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2464
|
-
var object_exports = {};
|
|
2465
|
-
__export22(object_exports, {
|
|
2466
|
-
checkIfKeyIsComponent: () => checkIfKeyIsComponent,
|
|
2467
|
-
clone: () => clone,
|
|
2468
|
-
createObjectWithoutPrototype: () => createObjectWithoutPrototype,
|
|
2469
|
-
deepClone: () => deepClone2,
|
|
2470
|
-
deepCloneExclude: () => deepCloneExclude,
|
|
2471
|
-
deepCloneWithExtend: () => deepCloneWithExtend,
|
|
2472
|
-
deepContains: () => deepContains,
|
|
2473
|
-
deepDestringify: () => deepDestringify,
|
|
2474
|
-
deepDiff: () => deepDiff,
|
|
2475
|
-
deepMerge: () => deepMerge2,
|
|
2476
|
-
deepStringify: () => deepStringify,
|
|
2477
|
-
detachFunctionsFromObject: () => detachFunctionsFromObject,
|
|
2478
|
-
diff: () => diff,
|
|
2479
|
-
diffArrays: () => diffArrays,
|
|
2480
|
-
diffObjects: () => diffObjects,
|
|
2481
|
-
exec: () => exec,
|
|
2482
|
-
flattenRecursive: () => flattenRecursive,
|
|
2483
|
-
getChildrenComponentsByKey: () => getChildrenComponentsByKey,
|
|
2484
|
-
getExtendsInElement: () => getExtendsInElement,
|
|
2485
|
-
hasOwnProperty: () => hasOwnProperty,
|
|
2486
|
-
isEmpty: () => isEmpty,
|
|
2487
|
-
isEmptyObject: () => isEmptyObject,
|
|
2488
|
-
isEqualDeep: () => isEqualDeep,
|
|
2489
|
-
makeObjectWithoutPrototype: () => makeObjectWithoutPrototype,
|
|
2490
|
-
map: () => map,
|
|
2491
|
-
merge: () => merge2,
|
|
2492
|
-
mergeArrayExclude: () => mergeArrayExclude,
|
|
2493
|
-
mergeIfExisted: () => mergeIfExisted,
|
|
2494
|
-
objectToString: () => objectToString,
|
|
2495
|
-
overwrite: () => overwrite,
|
|
2496
|
-
overwriteDeep: () => overwriteDeep,
|
|
2497
|
-
overwriteShallow: () => overwriteShallow,
|
|
2498
|
-
removeFromObject: () => removeFromObject,
|
|
2499
|
-
stringToObject: () => stringToObject
|
|
2500
|
-
});
|
|
2501
|
-
module2.exports = __toCommonJS22(object_exports);
|
|
2502
|
-
var import_globals2 = require_globals2();
|
|
2503
|
-
var import_types = require_types2();
|
|
2504
|
-
var import_array = require_array2();
|
|
2505
|
-
var import_string = require_string2();
|
|
2506
|
-
var exec = (param, element, state, context) => {
|
|
2507
|
-
if ((0, import_types.isFunction)(param)) {
|
|
2508
|
-
return param(
|
|
2509
|
-
element,
|
|
2510
|
-
state || element.state,
|
|
2511
|
-
context || element.context
|
|
2512
|
-
);
|
|
2513
|
-
}
|
|
2514
|
-
return param;
|
|
2515
|
-
};
|
|
2516
|
-
var map = (obj, extention, element) => {
|
|
2517
|
-
for (const e in extention) {
|
|
2518
|
-
obj[e] = exec(extention[e], element);
|
|
2519
|
-
}
|
|
2520
|
-
};
|
|
2521
|
-
var merge2 = (element, obj, excludeFrom = []) => {
|
|
2522
|
-
for (const e in obj) {
|
|
2523
|
-
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, e);
|
|
2524
|
-
if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
|
|
2525
|
-
continue;
|
|
2526
|
-
const elementProp = element[e];
|
|
2527
|
-
const objProp = obj[e];
|
|
2528
|
-
if (elementProp === void 0) {
|
|
2529
|
-
element[e] = objProp;
|
|
2530
|
-
}
|
|
2531
|
-
}
|
|
2532
|
-
return element;
|
|
2533
|
-
};
|
|
2534
|
-
var deepMerge2 = (element, extend, excludeFrom = []) => {
|
|
2535
|
-
for (const e in extend) {
|
|
2536
|
-
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(extend, e);
|
|
2537
|
-
if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
|
|
2538
|
-
continue;
|
|
2539
|
-
const elementProp = element[e];
|
|
2540
|
-
const extendProp = extend[e];
|
|
2541
|
-
if ((0, import_types.isObjectLike)(elementProp) && (0, import_types.isObjectLike)(extendProp)) {
|
|
2542
|
-
deepMerge2(elementProp, extendProp, excludeFrom);
|
|
2543
|
-
} else if (elementProp === void 0) {
|
|
2544
|
-
element[e] = extendProp;
|
|
2545
|
-
}
|
|
2546
|
-
}
|
|
2547
|
-
return element;
|
|
2548
|
-
};
|
|
2549
|
-
var clone = (obj, excludeFrom = []) => {
|
|
2550
|
-
const o = {};
|
|
2551
|
-
for (const prop in obj) {
|
|
2552
|
-
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, prop);
|
|
2553
|
-
if (!hasOwnProperty2 || excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
2554
|
-
continue;
|
|
2555
|
-
o[prop] = obj[prop];
|
|
2556
|
-
}
|
|
2557
|
-
return o;
|
|
2558
|
-
};
|
|
2559
|
-
var deepCloneExclude = (obj, excludeFrom = []) => {
|
|
2560
|
-
if ((0, import_types.isArray)(obj)) {
|
|
2561
|
-
return obj.map((x) => deepCloneExclude(x, excludeFrom));
|
|
2562
|
-
}
|
|
2563
|
-
const o = {};
|
|
2564
|
-
for (const k in obj) {
|
|
2565
|
-
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, k);
|
|
2566
|
-
if (!hasOwnProperty2 || excludeFrom.includes(k) || k.startsWith("__"))
|
|
2567
|
-
continue;
|
|
2568
|
-
let v = obj[k];
|
|
2569
|
-
if (k === "extend" && (0, import_types.isArray)(v)) {
|
|
2570
|
-
v = mergeArrayExclude(v, excludeFrom);
|
|
2571
|
-
}
|
|
2572
|
-
if ((0, import_types.isArray)(v)) {
|
|
2573
|
-
o[k] = v.map((x) => deepCloneExclude(x, excludeFrom));
|
|
2574
|
-
} else if ((0, import_types.isObject)(v)) {
|
|
2575
|
-
o[k] = deepCloneExclude(v, excludeFrom);
|
|
2576
|
-
} else
|
|
2577
|
-
o[k] = v;
|
|
2578
|
-
}
|
|
2579
|
-
return o;
|
|
2580
|
-
};
|
|
2581
|
-
var mergeArrayExclude = (arr, excl = []) => {
|
|
2582
|
-
return arr.reduce((acc, curr) => deepMerge2(acc, deepCloneExclude(curr, excl)), {});
|
|
2583
|
-
};
|
|
2584
|
-
var deepClone2 = (obj, excludeFrom = [], cleanUndefined = false) => {
|
|
2585
|
-
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
2586
|
-
for (const prop in obj) {
|
|
2587
|
-
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
2588
|
-
continue;
|
|
2589
|
-
if (prop === "__proto__")
|
|
2590
|
-
continue;
|
|
2591
|
-
if (excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
2592
|
-
continue;
|
|
2593
|
-
let objProp = obj[prop];
|
|
2594
|
-
if (cleanUndefined && (0, import_types.isUndefined)(objProp))
|
|
2595
|
-
continue;
|
|
2596
|
-
if (prop === "extend" && (0, import_types.isArray)(objProp)) {
|
|
2597
|
-
objProp = (0, import_array.mergeArray)(objProp);
|
|
2598
|
-
}
|
|
2599
|
-
if ((0, import_types.isObjectLike)(objProp)) {
|
|
2600
|
-
o[prop] = deepClone2(objProp, excludeFrom, cleanUndefined);
|
|
2601
|
-
} else
|
|
2602
|
-
o[prop] = objProp;
|
|
2603
|
-
}
|
|
2604
|
-
return o;
|
|
2605
|
-
};
|
|
2606
|
-
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
2607
|
-
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
2608
|
-
for (const prop in obj) {
|
|
2609
|
-
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
2610
|
-
continue;
|
|
2611
|
-
const objProp = obj[prop];
|
|
2612
|
-
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
|
|
2613
|
-
continue;
|
|
2614
|
-
if ((0, import_types.isObjectLike)(objProp)) {
|
|
2615
|
-
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
|
|
2616
|
-
} else
|
|
2617
|
-
o[prop] = objProp;
|
|
2618
|
-
}
|
|
2619
|
-
return o;
|
|
2620
|
-
};
|
|
2621
|
-
var deepStringify = (obj, stringified = {}) => {
|
|
2622
|
-
for (const prop in obj) {
|
|
2623
|
-
const objProp = obj[prop];
|
|
2624
|
-
if ((0, import_types.isFunction)(objProp)) {
|
|
2625
|
-
stringified[prop] = objProp.toString();
|
|
2626
|
-
} else if ((0, import_types.isObject)(objProp)) {
|
|
2627
|
-
stringified[prop] = {};
|
|
2628
|
-
deepStringify(objProp, stringified[prop]);
|
|
2629
|
-
} else if ((0, import_types.isArray)(objProp)) {
|
|
2630
|
-
stringified[prop] = [];
|
|
2631
|
-
objProp.forEach((v, i) => {
|
|
2632
|
-
if ((0, import_types.isObject)(v)) {
|
|
2633
|
-
stringified[prop][i] = {};
|
|
2634
|
-
deepStringify(v, stringified[prop][i]);
|
|
2635
|
-
} else if ((0, import_types.isFunction)(v)) {
|
|
2636
|
-
stringified[prop][i] = v.toString();
|
|
1983
|
+
var require_string2 = __commonJS2({
|
|
1984
|
+
"../../../domql/packages/utils/dist/cjs/string.js"(exports2, module22) {
|
|
1985
|
+
"use strict";
|
|
1986
|
+
var __defProp22 = Object.defineProperty;
|
|
1987
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1988
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1989
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1990
|
+
var __export22 = (target, all) => {
|
|
1991
|
+
for (var name in all)
|
|
1992
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1993
|
+
};
|
|
1994
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1995
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1996
|
+
for (let key of __getOwnPropNames22(from))
|
|
1997
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1998
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1999
|
+
}
|
|
2000
|
+
return to;
|
|
2001
|
+
};
|
|
2002
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2003
|
+
var string_exports = {};
|
|
2004
|
+
__export22(string_exports, {
|
|
2005
|
+
customDecodeURIComponent: () => customDecodeURIComponent,
|
|
2006
|
+
customEncodeURIComponent: () => customEncodeURIComponent,
|
|
2007
|
+
findKeyPosition: () => findKeyPosition,
|
|
2008
|
+
lowercaseFirstLetter: () => lowercaseFirstLetter,
|
|
2009
|
+
replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
|
|
2010
|
+
replaceOctalEscapeSequences: () => replaceOctalEscapeSequences,
|
|
2011
|
+
stringIncludesAny: () => stringIncludesAny,
|
|
2012
|
+
trimStringFromSymbols: () => trimStringFromSymbols
|
|
2013
|
+
});
|
|
2014
|
+
module22.exports = __toCommonJS22(string_exports);
|
|
2015
|
+
var stringIncludesAny = (str, characters) => {
|
|
2016
|
+
for (const char of characters) {
|
|
2017
|
+
if (str.includes(char)) {
|
|
2018
|
+
return true;
|
|
2019
|
+
}
|
|
2020
|
+
}
|
|
2021
|
+
return false;
|
|
2022
|
+
};
|
|
2023
|
+
var trimStringFromSymbols = (str, characters) => {
|
|
2024
|
+
const pattern = new RegExp(`[${characters.join("\\")}]`, "g");
|
|
2025
|
+
return str.replace(pattern, "");
|
|
2026
|
+
};
|
|
2027
|
+
var brackRegex = {
|
|
2028
|
+
2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
|
|
2029
|
+
3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
|
|
2030
|
+
};
|
|
2031
|
+
var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
|
|
2032
|
+
if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
|
|
2033
|
+
return str;
|
|
2034
|
+
const reg = brackRegex[options.bracketsLength || 2];
|
|
2035
|
+
return str.replace(reg, (_, parentPath, variable) => {
|
|
2036
|
+
if (parentPath) {
|
|
2037
|
+
const parentLevels = parentPath.match(options.bracketsLength === 3 ? /\.\.\.\//g : /\.\.\//g).length;
|
|
2038
|
+
let parentState = state;
|
|
2039
|
+
for (let i = 0; i < parentLevels; i++) {
|
|
2040
|
+
parentState = parentState.parent;
|
|
2041
|
+
if (!parentState) {
|
|
2042
|
+
return "";
|
|
2043
|
+
}
|
|
2044
|
+
}
|
|
2045
|
+
const value = parentState[variable.trim()];
|
|
2046
|
+
return value !== void 0 ? `${value}` : "";
|
|
2637
2047
|
} else {
|
|
2638
|
-
|
|
2048
|
+
const value = state[variable.trim()];
|
|
2049
|
+
return value !== void 0 ? `${value}` : "";
|
|
2639
2050
|
}
|
|
2640
2051
|
});
|
|
2641
|
-
}
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2052
|
+
};
|
|
2053
|
+
var lowercaseFirstLetter = (inputString) => {
|
|
2054
|
+
return `${inputString.charAt(0).toLowerCase()}${inputString.slice(1)}`;
|
|
2055
|
+
};
|
|
2056
|
+
var findKeyPosition = (str, key) => {
|
|
2057
|
+
const lines = str.split("\n");
|
|
2058
|
+
let startLineNumber = -1;
|
|
2059
|
+
let endLineNumber = -1;
|
|
2060
|
+
let startColumn = -1;
|
|
2061
|
+
let endColumn = -1;
|
|
2062
|
+
const keyPattern = new RegExp(`\\b${key}\\b\\s*:\\s*`);
|
|
2063
|
+
let braceCount = 0;
|
|
2064
|
+
let foundKey = false;
|
|
2065
|
+
for (let i = 0; i < lines.length; i++) {
|
|
2066
|
+
if (keyPattern.test(lines[i]) && !foundKey) {
|
|
2067
|
+
foundKey = true;
|
|
2068
|
+
startLineNumber = i + 1;
|
|
2069
|
+
startColumn = lines[i].indexOf(key) + 1;
|
|
2070
|
+
if (lines[i].includes("{}")) {
|
|
2071
|
+
endLineNumber = startLineNumber;
|
|
2072
|
+
endColumn = lines[i].indexOf("{}") + 3;
|
|
2073
|
+
break;
|
|
2074
|
+
}
|
|
2075
|
+
const line = lines[i].slice(startColumn + key.length);
|
|
2076
|
+
if (line.includes("{") || line.includes("[")) {
|
|
2077
|
+
braceCount = 1;
|
|
2078
|
+
} else {
|
|
2079
|
+
endLineNumber = i + 1;
|
|
2080
|
+
endColumn = lines[i].length + 1;
|
|
2081
|
+
break;
|
|
2082
|
+
}
|
|
2083
|
+
} else if (foundKey) {
|
|
2084
|
+
braceCount += (lines[i].match(/{/g) || []).length;
|
|
2085
|
+
braceCount += (lines[i].match(/\[/g) || []).length;
|
|
2086
|
+
braceCount -= (lines[i].match(/}/g) || []).length;
|
|
2087
|
+
braceCount -= (lines[i].match(/]/g) || []).length;
|
|
2088
|
+
if (braceCount === 0) {
|
|
2089
|
+
endLineNumber = i + 1;
|
|
2090
|
+
endColumn = lines[i].lastIndexOf("}") !== -1 ? lines[i].lastIndexOf("}") + 2 : lines[i].length + 1;
|
|
2091
|
+
break;
|
|
2092
|
+
}
|
|
2666
2093
|
}
|
|
2667
2094
|
}
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2095
|
+
return {
|
|
2096
|
+
startColumn,
|
|
2097
|
+
endColumn,
|
|
2098
|
+
startLineNumber,
|
|
2099
|
+
endLineNumber
|
|
2100
|
+
};
|
|
2101
|
+
};
|
|
2102
|
+
var replaceOctalEscapeSequences = (str) => {
|
|
2103
|
+
const octalRegex = /\\([0-7]{1,3})/g;
|
|
2104
|
+
return str.replace(octalRegex, (match, p1) => {
|
|
2105
|
+
const octalValue = parseInt(p1, 8);
|
|
2106
|
+
const char = String.fromCharCode(octalValue);
|
|
2107
|
+
return char;
|
|
2108
|
+
});
|
|
2109
|
+
};
|
|
2110
|
+
var customEncodeURIComponent = (str) => {
|
|
2111
|
+
return str.split("").map((char) => {
|
|
2112
|
+
if (/[^a-zA-Z0-9\s]/.test(char)) {
|
|
2113
|
+
return "%" + char.charCodeAt(0).toString(16).toUpperCase();
|
|
2114
|
+
}
|
|
2115
|
+
return char;
|
|
2116
|
+
}).join("");
|
|
2117
|
+
};
|
|
2118
|
+
var customDecodeURIComponent = (encodedStr) => {
|
|
2119
|
+
return encodedStr.replace(/%[0-9A-Fa-f]{2}/g, (match) => String.fromCharCode(parseInt(match.slice(1), 16)));
|
|
2120
|
+
};
|
|
2677
2121
|
}
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
}
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2122
|
+
});
|
|
2123
|
+
var require_object2 = __commonJS2({
|
|
2124
|
+
"../../../domql/packages/utils/dist/cjs/object.js"(exports2, module22) {
|
|
2125
|
+
"use strict";
|
|
2126
|
+
var __defProp22 = Object.defineProperty;
|
|
2127
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2128
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2129
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2130
|
+
var __export22 = (target, all) => {
|
|
2131
|
+
for (var name in all)
|
|
2132
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2133
|
+
};
|
|
2134
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
2135
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
2136
|
+
for (let key of __getOwnPropNames22(from))
|
|
2137
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2138
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2139
|
+
}
|
|
2140
|
+
return to;
|
|
2141
|
+
};
|
|
2142
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2143
|
+
var object_exports = {};
|
|
2144
|
+
__export22(object_exports, {
|
|
2145
|
+
checkIfKeyIsComponent: () => checkIfKeyIsComponent,
|
|
2146
|
+
clone: () => clone,
|
|
2147
|
+
createObjectWithoutPrototype: () => createObjectWithoutPrototype,
|
|
2148
|
+
deepClone: () => deepClone2,
|
|
2149
|
+
deepCloneExclude: () => deepCloneExclude,
|
|
2150
|
+
deepCloneWithExtend: () => deepCloneWithExtend,
|
|
2151
|
+
deepContains: () => deepContains,
|
|
2152
|
+
deepDestringify: () => deepDestringify,
|
|
2153
|
+
deepDiff: () => deepDiff,
|
|
2154
|
+
deepMerge: () => deepMerge2,
|
|
2155
|
+
deepStringify: () => deepStringify,
|
|
2156
|
+
detachFunctionsFromObject: () => detachFunctionsFromObject,
|
|
2157
|
+
diff: () => diff,
|
|
2158
|
+
diffArrays: () => diffArrays,
|
|
2159
|
+
diffObjects: () => diffObjects,
|
|
2160
|
+
exec: () => exec,
|
|
2161
|
+
flattenRecursive: () => flattenRecursive,
|
|
2162
|
+
getChildrenComponentsByKey: () => getChildrenComponentsByKey,
|
|
2163
|
+
getExtendsInElement: () => getExtendsInElement,
|
|
2164
|
+
hasOwnProperty: () => hasOwnProperty,
|
|
2165
|
+
isEmpty: () => isEmpty,
|
|
2166
|
+
isEmptyObject: () => isEmptyObject,
|
|
2167
|
+
isEqualDeep: () => isEqualDeep,
|
|
2168
|
+
makeObjectWithoutPrototype: () => makeObjectWithoutPrototype,
|
|
2169
|
+
map: () => map,
|
|
2170
|
+
merge: () => merge2,
|
|
2171
|
+
mergeArrayExclude: () => mergeArrayExclude,
|
|
2172
|
+
mergeIfExisted: () => mergeIfExisted,
|
|
2173
|
+
objectToString: () => objectToString,
|
|
2174
|
+
overwrite: () => overwrite,
|
|
2175
|
+
overwriteDeep: () => overwriteDeep,
|
|
2176
|
+
overwriteShallow: () => overwriteShallow,
|
|
2177
|
+
removeFromObject: () => removeFromObject,
|
|
2178
|
+
stringToObject: () => stringToObject
|
|
2179
|
+
});
|
|
2180
|
+
module22.exports = __toCommonJS22(object_exports);
|
|
2181
|
+
var import_globals2 = require_globals2();
|
|
2182
|
+
var import_types = require_types2();
|
|
2183
|
+
var import_array = require_array2();
|
|
2184
|
+
var import_string = require_string2();
|
|
2185
|
+
var exec = (param, element, state, context) => {
|
|
2186
|
+
if ((0, import_types.isFunction)(param)) {
|
|
2187
|
+
return param(
|
|
2188
|
+
element,
|
|
2189
|
+
state || element.state,
|
|
2190
|
+
context || element.context
|
|
2191
|
+
);
|
|
2192
|
+
}
|
|
2193
|
+
return param;
|
|
2194
|
+
};
|
|
2195
|
+
var map = (obj, extention, element) => {
|
|
2196
|
+
for (const e in extention) {
|
|
2197
|
+
obj[e] = exec(extention[e], element);
|
|
2198
|
+
}
|
|
2199
|
+
};
|
|
2200
|
+
var merge2 = (element, obj, excludeFrom = []) => {
|
|
2201
|
+
for (const e in obj) {
|
|
2202
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, e);
|
|
2203
|
+
if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
|
|
2204
|
+
continue;
|
|
2205
|
+
const elementProp = element[e];
|
|
2206
|
+
const objProp = obj[e];
|
|
2207
|
+
if (elementProp === void 0) {
|
|
2208
|
+
element[e] = objProp;
|
|
2209
|
+
}
|
|
2210
|
+
}
|
|
2211
|
+
return element;
|
|
2212
|
+
};
|
|
2213
|
+
var deepMerge2 = (element, extend, excludeFrom = []) => {
|
|
2214
|
+
for (const e in extend) {
|
|
2215
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(extend, e);
|
|
2216
|
+
if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
|
|
2217
|
+
continue;
|
|
2218
|
+
const elementProp = element[e];
|
|
2219
|
+
const extendProp = extend[e];
|
|
2220
|
+
if ((0, import_types.isObjectLike)(elementProp) && (0, import_types.isObjectLike)(extendProp)) {
|
|
2221
|
+
deepMerge2(elementProp, extendProp, excludeFrom);
|
|
2222
|
+
} else if (elementProp === void 0) {
|
|
2223
|
+
element[e] = extendProp;
|
|
2224
|
+
}
|
|
2225
|
+
}
|
|
2226
|
+
return element;
|
|
2227
|
+
};
|
|
2228
|
+
var clone = (obj, excludeFrom = []) => {
|
|
2229
|
+
const o = {};
|
|
2230
|
+
for (const prop in obj) {
|
|
2231
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, prop);
|
|
2232
|
+
if (!hasOwnProperty2 || excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
2233
|
+
continue;
|
|
2234
|
+
o[prop] = obj[prop];
|
|
2235
|
+
}
|
|
2236
|
+
return o;
|
|
2237
|
+
};
|
|
2238
|
+
var deepCloneExclude = (obj, excludeFrom = []) => {
|
|
2239
|
+
if ((0, import_types.isArray)(obj)) {
|
|
2240
|
+
return obj.map((x) => deepCloneExclude(x, excludeFrom));
|
|
2241
|
+
}
|
|
2242
|
+
const o = {};
|
|
2243
|
+
for (const k in obj) {
|
|
2244
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, k);
|
|
2245
|
+
if (!hasOwnProperty2 || excludeFrom.includes(k) || k.startsWith("__"))
|
|
2246
|
+
continue;
|
|
2247
|
+
let v = obj[k];
|
|
2248
|
+
if (k === "extend" && (0, import_types.isArray)(v)) {
|
|
2249
|
+
v = mergeArrayExclude(v, excludeFrom);
|
|
2250
|
+
}
|
|
2251
|
+
if ((0, import_types.isArray)(v)) {
|
|
2252
|
+
o[k] = v.map((x) => deepCloneExclude(x, excludeFrom));
|
|
2253
|
+
} else if ((0, import_types.isObject)(v)) {
|
|
2254
|
+
o[k] = deepCloneExclude(v, excludeFrom);
|
|
2255
|
+
} else
|
|
2256
|
+
o[k] = v;
|
|
2257
|
+
}
|
|
2258
|
+
return o;
|
|
2259
|
+
};
|
|
2260
|
+
var mergeArrayExclude = (arr, excl = []) => {
|
|
2261
|
+
return arr.reduce((acc, curr) => deepMerge2(acc, deepCloneExclude(curr, excl)), {});
|
|
2262
|
+
};
|
|
2263
|
+
var deepClone2 = (obj, excludeFrom = [], cleanUndefined = false) => {
|
|
2264
|
+
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
2265
|
+
for (const prop in obj) {
|
|
2266
|
+
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
2267
|
+
continue;
|
|
2268
|
+
if (prop === "__proto__")
|
|
2269
|
+
continue;
|
|
2270
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
2271
|
+
continue;
|
|
2272
|
+
let objProp = obj[prop];
|
|
2273
|
+
if (cleanUndefined && (0, import_types.isUndefined)(objProp))
|
|
2274
|
+
continue;
|
|
2275
|
+
if (prop === "extend" && (0, import_types.isArray)(objProp)) {
|
|
2276
|
+
objProp = (0, import_array.mergeArray)(objProp);
|
|
2277
|
+
}
|
|
2278
|
+
if ((0, import_types.isObjectLike)(objProp)) {
|
|
2279
|
+
o[prop] = deepClone2(objProp, excludeFrom, cleanUndefined);
|
|
2280
|
+
} else
|
|
2281
|
+
o[prop] = objProp;
|
|
2282
|
+
}
|
|
2283
|
+
return o;
|
|
2284
|
+
};
|
|
2285
|
+
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
2286
|
+
const o = options.window ? (0, import_types.isArray)(obj) ? new options.window.Array([]) : new options.window.Object({}) : (0, import_types.isArray)(obj) ? [] : {};
|
|
2287
|
+
for (const prop in obj) {
|
|
2288
|
+
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
2289
|
+
continue;
|
|
2290
|
+
const objProp = obj[prop];
|
|
2291
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
|
|
2292
|
+
continue;
|
|
2293
|
+
if ((0, import_types.isObjectLike)(objProp)) {
|
|
2294
|
+
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
|
|
2295
|
+
} else
|
|
2296
|
+
o[prop] = objProp;
|
|
2297
|
+
}
|
|
2298
|
+
return o;
|
|
2299
|
+
};
|
|
2300
|
+
var deepStringify = (obj, stringified = {}) => {
|
|
2301
|
+
for (const prop in obj) {
|
|
2302
|
+
const objProp = obj[prop];
|
|
2303
|
+
if ((0, import_types.isFunction)(objProp)) {
|
|
2304
|
+
stringified[prop] = objProp.toString();
|
|
2305
|
+
} else if ((0, import_types.isObject)(objProp)) {
|
|
2306
|
+
stringified[prop] = {};
|
|
2307
|
+
deepStringify(objProp, stringified[prop]);
|
|
2308
|
+
} else if ((0, import_types.isArray)(objProp)) {
|
|
2309
|
+
stringified[prop] = [];
|
|
2310
|
+
objProp.forEach((v, i) => {
|
|
2311
|
+
if ((0, import_types.isObject)(v)) {
|
|
2312
|
+
stringified[prop][i] = {};
|
|
2313
|
+
deepStringify(v, stringified[prop][i]);
|
|
2314
|
+
} else if ((0, import_types.isFunction)(v)) {
|
|
2315
|
+
stringified[prop][i] = v.toString();
|
|
2316
|
+
} else {
|
|
2317
|
+
stringified[prop][i] = v;
|
|
2318
|
+
}
|
|
2319
|
+
});
|
|
2697
2320
|
} else {
|
|
2698
|
-
|
|
2321
|
+
stringified[prop] = objProp;
|
|
2699
2322
|
}
|
|
2700
|
-
}
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
}
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2323
|
+
}
|
|
2324
|
+
return stringified;
|
|
2325
|
+
};
|
|
2326
|
+
var objectToString = (obj = {}, indent = 0) => {
|
|
2327
|
+
const spaces = " ".repeat(indent);
|
|
2328
|
+
let str = "{\n";
|
|
2329
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
2330
|
+
const keyNotAllowdChars = (0, import_string.stringIncludesAny)(key, ["&", "*", "-", ":", "%", "{", "}", ">", "<", "@", ".", "/", "!", " "]);
|
|
2331
|
+
const stringedKey = keyNotAllowdChars ? `'${key}'` : key;
|
|
2332
|
+
str += `${spaces} ${stringedKey}: `;
|
|
2333
|
+
if ((0, import_types.isArray)(value)) {
|
|
2334
|
+
str += "[\n";
|
|
2335
|
+
for (const element of value) {
|
|
2336
|
+
if ((0, import_types.isObject)(element) && element !== null) {
|
|
2337
|
+
str += `${spaces} ${objectToString(element, indent + 2)},
|
|
2338
|
+
`;
|
|
2339
|
+
} else if ((0, import_types.isString)(element)) {
|
|
2340
|
+
str += `${spaces} '${element}',
|
|
2341
|
+
`;
|
|
2342
|
+
} else {
|
|
2343
|
+
str += `${spaces} ${element},
|
|
2344
|
+
`;
|
|
2345
|
+
}
|
|
2346
|
+
}
|
|
2347
|
+
str += `${spaces} ]`;
|
|
2348
|
+
} else if ((0, import_types.isObjectLike)(value)) {
|
|
2349
|
+
str += objectToString(value, indent + 1);
|
|
2350
|
+
} else if ((0, import_types.isString)(value)) {
|
|
2351
|
+
str += (0, import_string.stringIncludesAny)(value, ["\n", "'"]) ? `\`${value}\`` : `'${value}'`;
|
|
2352
|
+
} else {
|
|
2353
|
+
str += value;
|
|
2721
2354
|
}
|
|
2722
|
-
|
|
2723
|
-
destringified[prop] = objProp;
|
|
2355
|
+
str += ",\n";
|
|
2724
2356
|
}
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2357
|
+
str += `${spaces}}`;
|
|
2358
|
+
return str;
|
|
2359
|
+
};
|
|
2360
|
+
var detachFunctionsFromObject = (obj, detached = {}) => {
|
|
2361
|
+
for (const prop in obj) {
|
|
2362
|
+
const objProp = obj[prop];
|
|
2363
|
+
if ((0, import_types.isFunction)(objProp))
|
|
2364
|
+
continue;
|
|
2365
|
+
else if ((0, import_types.isObject)(objProp)) {
|
|
2366
|
+
detached[prop] = {};
|
|
2367
|
+
deepStringify(objProp, detached[prop]);
|
|
2368
|
+
} else if ((0, import_types.isArray)(objProp)) {
|
|
2369
|
+
detached[prop] = [];
|
|
2370
|
+
objProp.forEach((v, i) => {
|
|
2371
|
+
if ((0, import_types.isFunction)(v))
|
|
2372
|
+
return;
|
|
2373
|
+
if ((0, import_types.isObject)(v)) {
|
|
2374
|
+
detached[prop][i] = {};
|
|
2375
|
+
detachFunctionsFromObject(v, detached[prop][i]);
|
|
2376
|
+
} else {
|
|
2377
|
+
detached[prop][i] = v;
|
|
2378
|
+
}
|
|
2379
|
+
});
|
|
2380
|
+
} else {
|
|
2381
|
+
detached[prop] = objProp;
|
|
2382
|
+
}
|
|
2383
|
+
}
|
|
2384
|
+
return detached;
|
|
2385
|
+
};
|
|
2386
|
+
var deepDestringify = (obj, destringified = {}) => {
|
|
2387
|
+
for (const prop in obj) {
|
|
2388
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, prop);
|
|
2389
|
+
if (!hasOwnProperty2)
|
|
2390
|
+
continue;
|
|
2391
|
+
const objProp = obj[prop];
|
|
2392
|
+
if ((0, import_types.isString)(objProp)) {
|
|
2393
|
+
if ((objProp.includes("(){") || objProp.includes("() {") || objProp.includes("=>") || objProp.startsWith("()") || objProp.startsWith("async") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
2730
2394
|
try {
|
|
2731
|
-
const evalProp = import_globals2.window.eval(`(${
|
|
2732
|
-
destringified[prop]
|
|
2395
|
+
const evalProp = import_globals2.window.eval(`(${objProp})`);
|
|
2396
|
+
destringified[prop] = evalProp;
|
|
2733
2397
|
} catch (e) {
|
|
2734
2398
|
if (e)
|
|
2735
|
-
destringified[prop]
|
|
2399
|
+
destringified[prop] = objProp;
|
|
2736
2400
|
}
|
|
2737
2401
|
} else {
|
|
2738
|
-
destringified[prop]
|
|
2402
|
+
destringified[prop] = objProp;
|
|
2739
2403
|
}
|
|
2740
|
-
} else if ((0, import_types.
|
|
2741
|
-
destringified[prop]
|
|
2404
|
+
} else if ((0, import_types.isArray)(objProp)) {
|
|
2405
|
+
destringified[prop] = [];
|
|
2406
|
+
objProp.forEach((arrProp) => {
|
|
2407
|
+
if ((0, import_types.isString)(arrProp)) {
|
|
2408
|
+
if (arrProp.includes("=>") || arrProp.includes("function") || arrProp.startsWith("(")) {
|
|
2409
|
+
try {
|
|
2410
|
+
const evalProp = import_globals2.window.eval(`(${arrProp})`);
|
|
2411
|
+
destringified[prop].push(evalProp);
|
|
2412
|
+
} catch (e) {
|
|
2413
|
+
if (e)
|
|
2414
|
+
destringified[prop].push(arrProp);
|
|
2415
|
+
}
|
|
2416
|
+
} else {
|
|
2417
|
+
destringified[prop].push(arrProp);
|
|
2418
|
+
}
|
|
2419
|
+
} else if ((0, import_types.isObject)(arrProp)) {
|
|
2420
|
+
destringified[prop].push(deepDestringify(arrProp));
|
|
2421
|
+
} else {
|
|
2422
|
+
destringified[prop].push(arrProp);
|
|
2423
|
+
}
|
|
2424
|
+
});
|
|
2425
|
+
} else if ((0, import_types.isObject)(objProp)) {
|
|
2426
|
+
destringified[prop] = deepDestringify(objProp, destringified[prop]);
|
|
2742
2427
|
} else {
|
|
2743
|
-
destringified[prop]
|
|
2428
|
+
destringified[prop] = objProp;
|
|
2744
2429
|
}
|
|
2745
|
-
});
|
|
2746
|
-
} else if ((0, import_types.isObject)(objProp)) {
|
|
2747
|
-
destringified[prop] = deepDestringify(objProp, destringified[prop]);
|
|
2748
|
-
} else {
|
|
2749
|
-
destringified[prop] = objProp;
|
|
2750
|
-
}
|
|
2751
|
-
}
|
|
2752
|
-
return destringified;
|
|
2753
|
-
};
|
|
2754
|
-
var stringToObject = (str, opts = { verbose: true }) => {
|
|
2755
|
-
try {
|
|
2756
|
-
return import_globals2.window.eval("(" + str + ")");
|
|
2757
|
-
} catch (e) {
|
|
2758
|
-
if (opts.verbose)
|
|
2759
|
-
console.warn(e);
|
|
2760
|
-
}
|
|
2761
|
-
};
|
|
2762
|
-
var diffObjects = (original, objToDiff, cache) => {
|
|
2763
|
-
for (const e in objToDiff) {
|
|
2764
|
-
if (e === "ref")
|
|
2765
|
-
continue;
|
|
2766
|
-
const originalProp = original[e];
|
|
2767
|
-
const objToDiffProp = objToDiff[e];
|
|
2768
|
-
if ((0, import_types.isObject)(originalProp) && (0, import_types.isObject)(objToDiffProp)) {
|
|
2769
|
-
cache[e] = {};
|
|
2770
|
-
diff(originalProp, objToDiffProp, cache[e]);
|
|
2771
|
-
} else if (objToDiffProp !== void 0) {
|
|
2772
|
-
cache[e] = objToDiffProp;
|
|
2773
|
-
}
|
|
2774
|
-
}
|
|
2775
|
-
return cache;
|
|
2776
|
-
};
|
|
2777
|
-
var diffArrays = (original, objToDiff, cache) => {
|
|
2778
|
-
if (original.length !== objToDiff.length) {
|
|
2779
|
-
cache = objToDiff;
|
|
2780
|
-
} else {
|
|
2781
|
-
const diffArr = [];
|
|
2782
|
-
for (let i = 0; i < original.length; i++) {
|
|
2783
|
-
const diffObj = diff(original[i], objToDiff[i]);
|
|
2784
|
-
if (Object.keys(diffObj).length > 0) {
|
|
2785
|
-
diffArr.push(diffObj);
|
|
2786
2430
|
}
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2431
|
+
return destringified;
|
|
2432
|
+
};
|
|
2433
|
+
var stringToObject = (str, opts = { verbose: true }) => {
|
|
2434
|
+
try {
|
|
2435
|
+
return import_globals2.window.eval("(" + str + ")");
|
|
2436
|
+
} catch (e) {
|
|
2437
|
+
if (opts.verbose)
|
|
2438
|
+
console.warn(e);
|
|
2439
|
+
}
|
|
2440
|
+
};
|
|
2441
|
+
var diffObjects = (original, objToDiff, cache) => {
|
|
2442
|
+
for (const e in objToDiff) {
|
|
2443
|
+
if (e === "ref")
|
|
2444
|
+
continue;
|
|
2445
|
+
const originalProp = original[e];
|
|
2446
|
+
const objToDiffProp = objToDiff[e];
|
|
2447
|
+
if ((0, import_types.isObject)(originalProp) && (0, import_types.isObject)(objToDiffProp)) {
|
|
2448
|
+
cache[e] = {};
|
|
2449
|
+
diff(originalProp, objToDiffProp, cache[e]);
|
|
2450
|
+
} else if (objToDiffProp !== void 0) {
|
|
2451
|
+
cache[e] = objToDiffProp;
|
|
2452
|
+
}
|
|
2453
|
+
}
|
|
2454
|
+
return cache;
|
|
2455
|
+
};
|
|
2456
|
+
var diffArrays = (original, objToDiff, cache) => {
|
|
2457
|
+
if (original.length !== objToDiff.length) {
|
|
2458
|
+
cache = objToDiff;
|
|
2459
|
+
} else {
|
|
2460
|
+
const diffArr = [];
|
|
2461
|
+
for (let i = 0; i < original.length; i++) {
|
|
2462
|
+
const diffObj = diff(original[i], objToDiff[i]);
|
|
2463
|
+
if (Object.keys(diffObj).length > 0) {
|
|
2464
|
+
diffArr.push(diffObj);
|
|
2465
|
+
}
|
|
2466
|
+
}
|
|
2467
|
+
if (diffArr.length > 0) {
|
|
2468
|
+
cache = diffArr;
|
|
2469
|
+
}
|
|
2470
|
+
}
|
|
2471
|
+
return cache;
|
|
2472
|
+
};
|
|
2473
|
+
var diff = (original, objToDiff, cache = {}) => {
|
|
2474
|
+
if ((0, import_types.isArray)(original) && (0, import_types.isArray)(objToDiff)) {
|
|
2475
|
+
cache = [];
|
|
2476
|
+
diffArrays(original, objToDiff, cache);
|
|
2477
|
+
} else {
|
|
2478
|
+
diffObjects(original, objToDiff, cache);
|
|
2479
|
+
}
|
|
2480
|
+
return cache;
|
|
2481
|
+
};
|
|
2482
|
+
var hasOwnProperty = (o, ...args) => Object.prototype.hasOwnProperty.call(o, ...args);
|
|
2483
|
+
var isEmpty = (o) => Object.keys(o).length === 0;
|
|
2484
|
+
var isEmptyObject = (o) => (0, import_types.isObject)(o) && isEmpty(o);
|
|
2485
|
+
var makeObjectWithoutPrototype = () => /* @__PURE__ */ Object.create(null);
|
|
2486
|
+
var deepDiff = (lhs, rhs) => {
|
|
2487
|
+
if (lhs === rhs)
|
|
2488
|
+
return {};
|
|
2489
|
+
if (!(0, import_types.isObjectLike)(lhs) || !(0, import_types.isObjectLike)(rhs))
|
|
2490
|
+
return rhs;
|
|
2491
|
+
const deletedValues = Object.keys(lhs).reduce((acc, key) => {
|
|
2492
|
+
if (!hasOwnProperty(rhs, key)) {
|
|
2493
|
+
acc[key] = void 0;
|
|
2494
|
+
}
|
|
2495
|
+
return acc;
|
|
2496
|
+
}, makeObjectWithoutPrototype());
|
|
2497
|
+
if ((0, import_types.isDate)(lhs) || (0, import_types.isDate)(rhs)) {
|
|
2498
|
+
if (lhs.valueOf() === rhs.valueOf())
|
|
2499
|
+
return {};
|
|
2500
|
+
return rhs;
|
|
2501
|
+
}
|
|
2502
|
+
return Object.keys(rhs).reduce((acc, key) => {
|
|
2503
|
+
if (!hasOwnProperty(lhs, key)) {
|
|
2504
|
+
acc[key] = rhs[key];
|
|
2505
|
+
return acc;
|
|
2506
|
+
}
|
|
2507
|
+
const difference = diff(lhs[key], rhs[key]);
|
|
2508
|
+
if (isEmptyObject(difference) && !(0, import_types.isDate)(difference) && (isEmptyObject(lhs[key]) || !isEmptyObject(rhs[key]))) {
|
|
2509
|
+
return acc;
|
|
2510
|
+
}
|
|
2511
|
+
acc[key] = difference;
|
|
2512
|
+
return acc;
|
|
2513
|
+
}, deletedValues);
|
|
2514
|
+
};
|
|
2515
|
+
var overwrite = (element, params, excludeFrom = []) => {
|
|
2516
|
+
const { ref } = element;
|
|
2517
|
+
const changes = {};
|
|
2518
|
+
for (const e in params) {
|
|
2519
|
+
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
2520
|
+
continue;
|
|
2521
|
+
const elementProp = element[e];
|
|
2522
|
+
const paramsProp = params[e];
|
|
2523
|
+
if (paramsProp) {
|
|
2524
|
+
ref.__cache[e] = changes[e] = elementProp;
|
|
2525
|
+
ref[e] = paramsProp;
|
|
2526
|
+
}
|
|
2527
|
+
}
|
|
2528
|
+
return changes;
|
|
2529
|
+
};
|
|
2530
|
+
var overwriteShallow = (obj, params, excludeFrom = []) => {
|
|
2531
|
+
for (const e in params) {
|
|
2532
|
+
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
2533
|
+
continue;
|
|
2534
|
+
obj[e] = params[e];
|
|
2535
|
+
}
|
|
2536
|
+
return obj;
|
|
2537
|
+
};
|
|
2538
|
+
var overwriteDeep = (obj, params, excludeFrom = []) => {
|
|
2539
|
+
for (const e in params) {
|
|
2540
|
+
if (e === "__proto__")
|
|
2541
|
+
continue;
|
|
2542
|
+
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
2543
|
+
continue;
|
|
2544
|
+
const objProp = obj[e];
|
|
2545
|
+
const paramsProp = params[e];
|
|
2546
|
+
if ((0, import_types.isObjectLike)(objProp) && (0, import_types.isObjectLike)(paramsProp)) {
|
|
2547
|
+
overwriteDeep(objProp, paramsProp);
|
|
2548
|
+
} else if (paramsProp !== void 0) {
|
|
2549
|
+
obj[e] = paramsProp;
|
|
2550
|
+
}
|
|
2551
|
+
}
|
|
2552
|
+
return obj;
|
|
2553
|
+
};
|
|
2554
|
+
var mergeIfExisted = (a, b) => {
|
|
2555
|
+
if ((0, import_types.isObjectLike)(a) && (0, import_types.isObjectLike)(b))
|
|
2556
|
+
return deepMerge2(a, b);
|
|
2557
|
+
return a || b;
|
|
2558
|
+
};
|
|
2559
|
+
var flattenRecursive = (param, prop, stack = []) => {
|
|
2560
|
+
const objectized = (0, import_array.mergeAndCloneIfArray)(param);
|
|
2561
|
+
stack.push(objectized);
|
|
2562
|
+
const extendOfExtend = objectized[prop];
|
|
2563
|
+
if (extendOfExtend)
|
|
2564
|
+
flattenRecursive(extendOfExtend, prop, stack);
|
|
2565
|
+
delete objectized[prop];
|
|
2566
|
+
return stack;
|
|
2567
|
+
};
|
|
2568
|
+
var isEqualDeep = (param, element, visited = /* @__PURE__ */ new Set()) => {
|
|
2569
|
+
if (typeof param !== "object" || typeof element !== "object" || param === null || element === null) {
|
|
2570
|
+
return param === element;
|
|
2571
|
+
}
|
|
2572
|
+
if (visited.has(param) || visited.has(element)) {
|
|
2573
|
+
return true;
|
|
2574
|
+
}
|
|
2575
|
+
visited.add(param);
|
|
2576
|
+
visited.add(element);
|
|
2577
|
+
const keysParam = Object.keys(param);
|
|
2578
|
+
const keysElement = Object.keys(element);
|
|
2579
|
+
if (keysParam.length !== keysElement.length) {
|
|
2922
2580
|
return false;
|
|
2923
2581
|
}
|
|
2924
|
-
for (
|
|
2925
|
-
if (!
|
|
2582
|
+
for (const key of keysParam) {
|
|
2583
|
+
if (!keysElement.includes(key)) {
|
|
2926
2584
|
return false;
|
|
2927
2585
|
}
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj2, key);
|
|
2932
|
-
if (!hasOwnProperty2 || !deepContains(obj1[key], obj2[key])) {
|
|
2586
|
+
const paramProp = param[key];
|
|
2587
|
+
const elementProp = element[key];
|
|
2588
|
+
if (!isEqualDeep(paramProp, elementProp, visited)) {
|
|
2933
2589
|
return false;
|
|
2934
2590
|
}
|
|
2935
2591
|
}
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
const newObj = /* @__PURE__ */ Object.create(null);
|
|
2959
|
-
for (const key in obj) {
|
|
2960
|
-
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
2961
|
-
newObj[key] = createObjectWithoutPrototype(obj[key]);
|
|
2962
|
-
}
|
|
2963
|
-
}
|
|
2964
|
-
return newObj;
|
|
2965
|
-
};
|
|
2966
|
-
var checkIfKeyIsComponent = (key) => {
|
|
2967
|
-
const isFirstKeyString = (0, import_types.isString)(key);
|
|
2968
|
-
if (!isFirstKeyString)
|
|
2969
|
-
return;
|
|
2970
|
-
const firstCharKey = key.slice(0, 1);
|
|
2971
|
-
return /^[A-Z]*$/.test(firstCharKey);
|
|
2972
|
-
};
|
|
2973
|
-
var getChildrenComponentsByKey = (key, el) => {
|
|
2974
|
-
if (key === el.key || el.__ref.__componentKey === key) {
|
|
2975
|
-
return el;
|
|
2976
|
-
}
|
|
2977
|
-
if (el.extend) {
|
|
2978
|
-
const foundString = (0, import_types.isString)(el.extend) && el.extend === key;
|
|
2979
|
-
const foundInArray = (0, import_types.isArray)(el.extend) && el.extend.filter((v) => v === key).length;
|
|
2980
|
-
if (foundString || foundInArray)
|
|
2981
|
-
return el;
|
|
2982
|
-
}
|
|
2983
|
-
};
|
|
2984
|
-
var getExtendsInElement = (obj) => {
|
|
2985
|
-
let result = [];
|
|
2986
|
-
function traverse(o) {
|
|
2987
|
-
for (const key in o) {
|
|
2988
|
-
if (Object.hasOwnProperty.call(o, key)) {
|
|
2989
|
-
if (checkIfKeyIsComponent(key)) {
|
|
2990
|
-
result.push(key);
|
|
2991
|
-
}
|
|
2992
|
-
if (key === "extend") {
|
|
2993
|
-
if (typeof o[key] === "string") {
|
|
2994
|
-
result.push(o[key]);
|
|
2995
|
-
} else if (Array.isArray(o[key])) {
|
|
2996
|
-
result = result.concat(o[key]);
|
|
2592
|
+
return true;
|
|
2593
|
+
};
|
|
2594
|
+
var deepContains = (obj1, obj2) => {
|
|
2595
|
+
if (typeof obj1 !== typeof obj2) {
|
|
2596
|
+
return false;
|
|
2597
|
+
}
|
|
2598
|
+
if ((0, import_types.isObjectLike)(obj1)) {
|
|
2599
|
+
if (Array.isArray(obj1) && Array.isArray(obj2)) {
|
|
2600
|
+
if (obj1.length !== obj2.length) {
|
|
2601
|
+
return false;
|
|
2602
|
+
}
|
|
2603
|
+
for (let i = 0; i < obj1.length; i++) {
|
|
2604
|
+
if (!deepContains(obj1[i], obj2[i])) {
|
|
2605
|
+
return false;
|
|
2606
|
+
}
|
|
2607
|
+
}
|
|
2608
|
+
} else if ((0, import_types.isObjectLike)(obj1) && obj2 !== null) {
|
|
2609
|
+
for (const key in obj1) {
|
|
2610
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj2, key);
|
|
2611
|
+
if (!hasOwnProperty2 || !deepContains(obj1[key], obj2[key])) {
|
|
2612
|
+
return false;
|
|
2613
|
+
}
|
|
2997
2614
|
}
|
|
2998
2615
|
}
|
|
2999
|
-
|
|
3000
|
-
|
|
2616
|
+
} else {
|
|
2617
|
+
return obj2 === obj1;
|
|
2618
|
+
}
|
|
2619
|
+
return true;
|
|
2620
|
+
};
|
|
2621
|
+
var removeFromObject = (obj, props) => {
|
|
2622
|
+
if (props === void 0 || props === null)
|
|
2623
|
+
return obj;
|
|
2624
|
+
if ((0, import_types.is)(props)("string", "number")) {
|
|
2625
|
+
delete obj[props];
|
|
2626
|
+
} else if ((0, import_types.isArray)(props)) {
|
|
2627
|
+
props.forEach((prop) => delete obj[prop]);
|
|
2628
|
+
} else {
|
|
2629
|
+
throw new Error("Invalid input: props must be a string or an array of strings");
|
|
2630
|
+
}
|
|
2631
|
+
return obj;
|
|
2632
|
+
};
|
|
2633
|
+
var createObjectWithoutPrototype = (obj) => {
|
|
2634
|
+
if (obj === null || typeof obj !== "object") {
|
|
2635
|
+
return obj;
|
|
2636
|
+
}
|
|
2637
|
+
const newObj = /* @__PURE__ */ Object.create(null);
|
|
2638
|
+
for (const key in obj) {
|
|
2639
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
2640
|
+
newObj[key] = createObjectWithoutPrototype(obj[key]);
|
|
2641
|
+
}
|
|
2642
|
+
}
|
|
2643
|
+
return newObj;
|
|
2644
|
+
};
|
|
2645
|
+
var checkIfKeyIsComponent = (key) => {
|
|
2646
|
+
const isFirstKeyString = (0, import_types.isString)(key);
|
|
2647
|
+
if (!isFirstKeyString)
|
|
2648
|
+
return;
|
|
2649
|
+
const firstCharKey = key.slice(0, 1);
|
|
2650
|
+
return /^[A-Z]*$/.test(firstCharKey);
|
|
2651
|
+
};
|
|
2652
|
+
var getChildrenComponentsByKey = (key, el) => {
|
|
2653
|
+
if (key === el.key || el.__ref.__componentKey === key) {
|
|
2654
|
+
return el;
|
|
2655
|
+
}
|
|
2656
|
+
if (el.extend) {
|
|
2657
|
+
const foundString = (0, import_types.isString)(el.extend) && el.extend === key;
|
|
2658
|
+
const foundInArray = (0, import_types.isArray)(el.extend) && el.extend.filter((v) => v === key).length;
|
|
2659
|
+
if (foundString || foundInArray)
|
|
2660
|
+
return el;
|
|
2661
|
+
}
|
|
2662
|
+
if (el.parent && el.parent.childExtend) {
|
|
2663
|
+
const foundString = (0, import_types.isString)(el.parent.childExtend) && el.parent.childExtend === key;
|
|
2664
|
+
const foundInArray = (0, import_types.isArray)(el.parent.childExtend) && el.parent.childExtend.filter((v) => v === key).length;
|
|
2665
|
+
if (foundString || foundInArray)
|
|
2666
|
+
return el;
|
|
2667
|
+
}
|
|
2668
|
+
};
|
|
2669
|
+
var getExtendsInElement = (obj) => {
|
|
2670
|
+
let result = [];
|
|
2671
|
+
function traverse(o) {
|
|
2672
|
+
for (const key in o) {
|
|
2673
|
+
if (Object.hasOwnProperty.call(o, key)) {
|
|
2674
|
+
if (checkIfKeyIsComponent(key)) {
|
|
2675
|
+
result.push(key);
|
|
2676
|
+
}
|
|
2677
|
+
if (key === "extend") {
|
|
2678
|
+
if (typeof o[key] === "string") {
|
|
2679
|
+
result.push(o[key]);
|
|
2680
|
+
} else if (Array.isArray(o[key])) {
|
|
2681
|
+
result = result.concat(o[key]);
|
|
2682
|
+
}
|
|
2683
|
+
}
|
|
2684
|
+
if (typeof o[key] === "object" && o[key] !== null) {
|
|
2685
|
+
traverse(o[key]);
|
|
2686
|
+
}
|
|
2687
|
+
}
|
|
3001
2688
|
}
|
|
3002
2689
|
}
|
|
2690
|
+
traverse(obj);
|
|
2691
|
+
return result;
|
|
2692
|
+
};
|
|
2693
|
+
}
|
|
2694
|
+
});
|
|
2695
|
+
var require_function2 = __commonJS2({
|
|
2696
|
+
"../../../domql/packages/utils/dist/cjs/function.js"(exports2, module22) {
|
|
2697
|
+
"use strict";
|
|
2698
|
+
var __defProp22 = Object.defineProperty;
|
|
2699
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2700
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2701
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2702
|
+
var __export22 = (target, all) => {
|
|
2703
|
+
for (var name in all)
|
|
2704
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2705
|
+
};
|
|
2706
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
2707
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
2708
|
+
for (let key of __getOwnPropNames22(from))
|
|
2709
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2710
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2711
|
+
}
|
|
2712
|
+
return to;
|
|
2713
|
+
};
|
|
2714
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2715
|
+
var function_exports = {};
|
|
2716
|
+
__export22(function_exports, {
|
|
2717
|
+
debounce: () => debounce,
|
|
2718
|
+
debounceOnContext: () => debounceOnContext,
|
|
2719
|
+
isStringFunction: () => isStringFunction,
|
|
2720
|
+
memoize: () => memoize
|
|
2721
|
+
});
|
|
2722
|
+
module22.exports = __toCommonJS22(function_exports);
|
|
2723
|
+
function debounce(func, wait, immediate) {
|
|
2724
|
+
let timeout;
|
|
2725
|
+
return function() {
|
|
2726
|
+
const context = this;
|
|
2727
|
+
const args = arguments;
|
|
2728
|
+
const later = function() {
|
|
2729
|
+
timeout = null;
|
|
2730
|
+
if (!immediate)
|
|
2731
|
+
func.apply(context, args);
|
|
2732
|
+
};
|
|
2733
|
+
const callNow = immediate && !timeout;
|
|
2734
|
+
clearTimeout(timeout);
|
|
2735
|
+
timeout = setTimeout(later, wait);
|
|
2736
|
+
if (callNow)
|
|
2737
|
+
func.apply(context, args);
|
|
2738
|
+
};
|
|
3003
2739
|
}
|
|
2740
|
+
var debounceOnContext = (element, func, timeout = 300) => {
|
|
2741
|
+
let timer;
|
|
2742
|
+
return (...args) => {
|
|
2743
|
+
clearTimeout(timer);
|
|
2744
|
+
timer = setTimeout(() => {
|
|
2745
|
+
func.apply(element, args);
|
|
2746
|
+
}, timeout);
|
|
2747
|
+
};
|
|
2748
|
+
};
|
|
2749
|
+
var memoize = (fn) => {
|
|
2750
|
+
const cache = {};
|
|
2751
|
+
return (...args) => {
|
|
2752
|
+
const n = args[0];
|
|
2753
|
+
if (n in cache) {
|
|
2754
|
+
return cache[n];
|
|
2755
|
+
} else {
|
|
2756
|
+
const result = fn(n);
|
|
2757
|
+
cache[n] = result;
|
|
2758
|
+
return result;
|
|
2759
|
+
}
|
|
2760
|
+
};
|
|
2761
|
+
};
|
|
2762
|
+
var isStringFunction = (inputString) => {
|
|
2763
|
+
const functionRegex = /^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/;
|
|
2764
|
+
return functionRegex.test(inputString);
|
|
2765
|
+
};
|
|
3004
2766
|
}
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
var
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
2767
|
+
});
|
|
2768
|
+
var require_log2 = __commonJS2({
|
|
2769
|
+
"../../../domql/packages/utils/dist/cjs/log.js"(exports2, module22) {
|
|
2770
|
+
"use strict";
|
|
2771
|
+
var __defProp22 = Object.defineProperty;
|
|
2772
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2773
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2774
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2775
|
+
var __export22 = (target, all) => {
|
|
2776
|
+
for (var name in all)
|
|
2777
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2778
|
+
};
|
|
2779
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
2780
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
2781
|
+
for (let key of __getOwnPropNames22(from))
|
|
2782
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2783
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2784
|
+
}
|
|
2785
|
+
return to;
|
|
2786
|
+
};
|
|
2787
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2788
|
+
var log_exports = {};
|
|
2789
|
+
__export22(log_exports, {
|
|
2790
|
+
logGroupIf: () => logGroupIf,
|
|
2791
|
+
logIf: () => logIf
|
|
2792
|
+
});
|
|
2793
|
+
module22.exports = __toCommonJS22(log_exports);
|
|
2794
|
+
var logIf = (bool, ...arg) => {
|
|
2795
|
+
if (bool)
|
|
2796
|
+
arg.map((v) => console.log(v));
|
|
2797
|
+
};
|
|
2798
|
+
var logGroupIf = (bool, key, ...arg) => {
|
|
2799
|
+
if (bool) {
|
|
2800
|
+
console.group(key);
|
|
2801
|
+
arg.map((v) => console.log(v));
|
|
2802
|
+
console.groupEnd(key);
|
|
2803
|
+
}
|
|
2804
|
+
};
|
|
3026
2805
|
}
|
|
3027
|
-
return to;
|
|
3028
|
-
};
|
|
3029
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
3030
|
-
var function_exports = {};
|
|
3031
|
-
__export22(function_exports, {
|
|
3032
|
-
debounce: () => debounce,
|
|
3033
|
-
debounceOnContext: () => debounceOnContext,
|
|
3034
|
-
isStringFunction: () => isStringFunction,
|
|
3035
|
-
memoize: () => memoize
|
|
3036
2806
|
});
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
2807
|
+
var require_cookie2 = __commonJS2({
|
|
2808
|
+
"../../../domql/packages/utils/dist/cjs/cookie.js"(exports2, module22) {
|
|
2809
|
+
"use strict";
|
|
2810
|
+
var __defProp22 = Object.defineProperty;
|
|
2811
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2812
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2813
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2814
|
+
var __export22 = (target, all) => {
|
|
2815
|
+
for (var name in all)
|
|
2816
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2817
|
+
};
|
|
2818
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
2819
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
2820
|
+
for (let key of __getOwnPropNames22(from))
|
|
2821
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2822
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2823
|
+
}
|
|
2824
|
+
return to;
|
|
2825
|
+
};
|
|
2826
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2827
|
+
var cookie_exports = {};
|
|
2828
|
+
__export22(cookie_exports, {
|
|
2829
|
+
getCookie: () => getCookie,
|
|
2830
|
+
isMobile: () => isMobile,
|
|
2831
|
+
setCookie: () => setCookie
|
|
2832
|
+
});
|
|
2833
|
+
module22.exports = __toCommonJS22(cookie_exports);
|
|
2834
|
+
var import_types = require_types2();
|
|
2835
|
+
var import_utils32 = require_cjs4();
|
|
2836
|
+
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
2837
|
+
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
2838
|
+
if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
|
|
2839
|
+
return;
|
|
2840
|
+
const d = /* @__PURE__ */ new Date();
|
|
2841
|
+
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
2842
|
+
const expires = `expires=${d.toUTCString()}`;
|
|
2843
|
+
import_utils32.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
2844
|
+
};
|
|
2845
|
+
var getCookie = (cname) => {
|
|
2846
|
+
if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
|
|
2847
|
+
return;
|
|
2848
|
+
const name = `${cname}=`;
|
|
2849
|
+
const decodedCookie = decodeURIComponent(import_utils32.document.cookie);
|
|
2850
|
+
const ca = decodedCookie.split(";");
|
|
2851
|
+
for (let i = 0; i < ca.length; i++) {
|
|
2852
|
+
let c = ca[i];
|
|
2853
|
+
while (c.charAt(0) === " ")
|
|
2854
|
+
c = c.substring(1);
|
|
2855
|
+
if (c.indexOf(name) === 0)
|
|
2856
|
+
return c.substring(name.length, c.length);
|
|
2857
|
+
}
|
|
2858
|
+
return "";
|
|
3047
2859
|
};
|
|
3048
|
-
const callNow = immediate && !timeout;
|
|
3049
|
-
clearTimeout(timeout);
|
|
3050
|
-
timeout = setTimeout(later, wait);
|
|
3051
|
-
if (callNow)
|
|
3052
|
-
func.apply(context, args);
|
|
3053
|
-
};
|
|
3054
|
-
}
|
|
3055
|
-
var debounceOnContext = (element, func, timeout = 300) => {
|
|
3056
|
-
let timer;
|
|
3057
|
-
return (...args) => {
|
|
3058
|
-
clearTimeout(timer);
|
|
3059
|
-
timer = setTimeout(() => {
|
|
3060
|
-
func.apply(element, args);
|
|
3061
|
-
}, timeout);
|
|
3062
|
-
};
|
|
3063
|
-
};
|
|
3064
|
-
var memoize = (fn) => {
|
|
3065
|
-
const cache = {};
|
|
3066
|
-
return (...args) => {
|
|
3067
|
-
const n = args[0];
|
|
3068
|
-
if (n in cache) {
|
|
3069
|
-
return cache[n];
|
|
3070
|
-
} else {
|
|
3071
|
-
const result = fn(n);
|
|
3072
|
-
cache[n] = result;
|
|
3073
|
-
return result;
|
|
3074
|
-
}
|
|
3075
|
-
};
|
|
3076
|
-
};
|
|
3077
|
-
var isStringFunction = (inputString) => {
|
|
3078
|
-
const functionRegex = /^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/;
|
|
3079
|
-
return functionRegex.test(inputString);
|
|
3080
|
-
};
|
|
3081
|
-
}
|
|
3082
|
-
});
|
|
3083
|
-
var require_log2 = __commonJS2({
|
|
3084
|
-
"../../../domql/packages/utils/dist/cjs/log.js"(exports, module2) {
|
|
3085
|
-
"use strict";
|
|
3086
|
-
var __defProp22 = Object.defineProperty;
|
|
3087
|
-
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
3088
|
-
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
3089
|
-
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
3090
|
-
var __export22 = (target, all) => {
|
|
3091
|
-
for (var name in all)
|
|
3092
|
-
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
3093
|
-
};
|
|
3094
|
-
var __copyProps22 = (to, from, except, desc) => {
|
|
3095
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
3096
|
-
for (let key of __getOwnPropNames22(from))
|
|
3097
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
3098
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
3099
2860
|
}
|
|
3100
|
-
return to;
|
|
3101
|
-
};
|
|
3102
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
3103
|
-
var log_exports = {};
|
|
3104
|
-
__export22(log_exports, {
|
|
3105
|
-
logGroupIf: () => logGroupIf,
|
|
3106
|
-
logIf: () => logIf
|
|
3107
2861
|
});
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
2862
|
+
var require_tags2 = __commonJS2({
|
|
2863
|
+
"../../../domql/packages/utils/dist/cjs/tags.js"(exports2, module22) {
|
|
2864
|
+
"use strict";
|
|
2865
|
+
var __defProp22 = Object.defineProperty;
|
|
2866
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2867
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2868
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2869
|
+
var __export22 = (target, all) => {
|
|
2870
|
+
for (var name in all)
|
|
2871
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2872
|
+
};
|
|
2873
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
2874
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
2875
|
+
for (let key of __getOwnPropNames22(from))
|
|
2876
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2877
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2878
|
+
}
|
|
2879
|
+
return to;
|
|
2880
|
+
};
|
|
2881
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2882
|
+
var tags_exports = {};
|
|
2883
|
+
__export22(tags_exports, {
|
|
2884
|
+
HTML_TAGS: () => HTML_TAGS,
|
|
2885
|
+
isValidHtmlTag: () => isValidHtmlTag
|
|
2886
|
+
});
|
|
2887
|
+
module22.exports = __toCommonJS22(tags_exports);
|
|
2888
|
+
var HTML_TAGS = {
|
|
2889
|
+
root: [
|
|
2890
|
+
"body",
|
|
2891
|
+
"html"
|
|
2892
|
+
],
|
|
2893
|
+
head: [
|
|
2894
|
+
"title",
|
|
2895
|
+
"base",
|
|
2896
|
+
"meta",
|
|
2897
|
+
"style"
|
|
2898
|
+
],
|
|
2899
|
+
body: [
|
|
2900
|
+
"string",
|
|
2901
|
+
"fragment",
|
|
2902
|
+
"a",
|
|
2903
|
+
"abbr",
|
|
2904
|
+
"acronym",
|
|
2905
|
+
"address",
|
|
2906
|
+
"applet",
|
|
2907
|
+
"area",
|
|
2908
|
+
"article",
|
|
2909
|
+
"aside",
|
|
2910
|
+
"audio",
|
|
2911
|
+
"b",
|
|
2912
|
+
"basefont",
|
|
2913
|
+
"bdi",
|
|
2914
|
+
"bdo",
|
|
2915
|
+
"big",
|
|
2916
|
+
"blockquote",
|
|
2917
|
+
"br",
|
|
2918
|
+
"button",
|
|
2919
|
+
"canvas",
|
|
2920
|
+
"caption",
|
|
2921
|
+
"center",
|
|
2922
|
+
"cite",
|
|
2923
|
+
"code",
|
|
2924
|
+
"search",
|
|
2925
|
+
"col",
|
|
2926
|
+
"colgroup",
|
|
2927
|
+
"data",
|
|
2928
|
+
"datalist",
|
|
2929
|
+
"dd",
|
|
2930
|
+
"del",
|
|
2931
|
+
"details",
|
|
2932
|
+
"dfn",
|
|
2933
|
+
"dialog",
|
|
2934
|
+
"dir",
|
|
2935
|
+
"div",
|
|
2936
|
+
"dl",
|
|
2937
|
+
"dt",
|
|
2938
|
+
"em",
|
|
2939
|
+
"embed",
|
|
2940
|
+
"fieldset",
|
|
2941
|
+
"figcaption",
|
|
2942
|
+
"figure",
|
|
2943
|
+
"font",
|
|
2944
|
+
"footer",
|
|
2945
|
+
"form",
|
|
2946
|
+
"frame",
|
|
2947
|
+
"frameset",
|
|
2948
|
+
"h1",
|
|
2949
|
+
"h2",
|
|
2950
|
+
"h3",
|
|
2951
|
+
"h4",
|
|
2952
|
+
"h5",
|
|
2953
|
+
"h6",
|
|
2954
|
+
"head",
|
|
2955
|
+
"header",
|
|
2956
|
+
"hr",
|
|
2957
|
+
"i",
|
|
2958
|
+
"iframe",
|
|
2959
|
+
"img",
|
|
2960
|
+
"input",
|
|
2961
|
+
"ins",
|
|
2962
|
+
"kbd",
|
|
2963
|
+
"label",
|
|
2964
|
+
"legend",
|
|
2965
|
+
"li",
|
|
2966
|
+
"link",
|
|
2967
|
+
"main",
|
|
2968
|
+
"map",
|
|
2969
|
+
"mark",
|
|
2970
|
+
"meter",
|
|
2971
|
+
"nav",
|
|
2972
|
+
"noframes",
|
|
2973
|
+
"noscript",
|
|
2974
|
+
"object",
|
|
2975
|
+
"ol",
|
|
2976
|
+
"optgroup",
|
|
2977
|
+
"option",
|
|
2978
|
+
"output",
|
|
2979
|
+
"p",
|
|
2980
|
+
"param",
|
|
2981
|
+
"picture",
|
|
2982
|
+
"pre",
|
|
2983
|
+
"progress",
|
|
2984
|
+
"hgroup",
|
|
2985
|
+
"q",
|
|
2986
|
+
"rp",
|
|
2987
|
+
"rt",
|
|
2988
|
+
"ruby",
|
|
2989
|
+
"s",
|
|
2990
|
+
"samp",
|
|
2991
|
+
"script",
|
|
2992
|
+
"section",
|
|
2993
|
+
"select",
|
|
2994
|
+
"small",
|
|
2995
|
+
"source",
|
|
2996
|
+
"span",
|
|
2997
|
+
"strike",
|
|
2998
|
+
"strong",
|
|
2999
|
+
"sub",
|
|
3000
|
+
"summary",
|
|
3001
|
+
"sup",
|
|
3002
|
+
"table",
|
|
3003
|
+
"tbody",
|
|
3004
|
+
"td",
|
|
3005
|
+
"template",
|
|
3006
|
+
"hgroup",
|
|
3007
|
+
"textarea",
|
|
3008
|
+
"tfoot",
|
|
3009
|
+
"th",
|
|
3010
|
+
"thead",
|
|
3011
|
+
"time",
|
|
3012
|
+
"tr",
|
|
3013
|
+
"track",
|
|
3014
|
+
"tt",
|
|
3015
|
+
"u",
|
|
3016
|
+
"ul",
|
|
3017
|
+
"var",
|
|
3018
|
+
"video",
|
|
3019
|
+
"wbr",
|
|
3020
|
+
// SVG
|
|
3021
|
+
"svg",
|
|
3022
|
+
"path"
|
|
3023
|
+
]
|
|
3024
|
+
};
|
|
3025
|
+
var isValidHtmlTag = (arg) => HTML_TAGS.body.includes(arg);
|
|
3118
3026
|
}
|
|
3119
|
-
};
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3027
|
+
});
|
|
3028
|
+
var require_cjs4 = __commonJS2({
|
|
3029
|
+
"../../../domql/packages/utils/dist/cjs/index.js"(exports2, module22) {
|
|
3030
|
+
"use strict";
|
|
3031
|
+
var __defProp22 = Object.defineProperty;
|
|
3032
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
3033
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
3034
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
3035
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
3036
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
3037
|
+
for (let key of __getOwnPropNames22(from))
|
|
3038
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
3039
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
3040
|
+
}
|
|
3041
|
+
return to;
|
|
3042
|
+
};
|
|
3043
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps22(target, mod, "default"), secondTarget && __copyProps22(secondTarget, mod, "default"));
|
|
3044
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
3045
|
+
var utils_exports = {};
|
|
3046
|
+
module22.exports = __toCommonJS22(utils_exports);
|
|
3047
|
+
__reExport(utils_exports, require_key2(), module22.exports);
|
|
3048
|
+
__reExport(utils_exports, require_env2(), module22.exports);
|
|
3049
|
+
__reExport(utils_exports, require_types2(), module22.exports);
|
|
3050
|
+
__reExport(utils_exports, require_object2(), module22.exports);
|
|
3051
|
+
__reExport(utils_exports, require_function2(), module22.exports);
|
|
3052
|
+
__reExport(utils_exports, require_array2(), module22.exports);
|
|
3053
|
+
__reExport(utils_exports, require_node2(), module22.exports);
|
|
3054
|
+
__reExport(utils_exports, require_log2(), module22.exports);
|
|
3055
|
+
__reExport(utils_exports, require_string2(), module22.exports);
|
|
3056
|
+
__reExport(utils_exports, require_globals2(), module22.exports);
|
|
3057
|
+
__reExport(utils_exports, require_cookie2(), module22.exports);
|
|
3058
|
+
__reExport(utils_exports, require_tags2(), module22.exports);
|
|
3138
3059
|
}
|
|
3139
|
-
return to;
|
|
3140
|
-
};
|
|
3141
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
3142
|
-
var cookie_exports = {};
|
|
3143
|
-
__export22(cookie_exports, {
|
|
3144
|
-
getCookie: () => getCookie,
|
|
3145
|
-
isMobile: () => isMobile,
|
|
3146
|
-
setCookie: () => setCookie
|
|
3147
3060
|
});
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3061
|
+
var src_exports = {};
|
|
3062
|
+
__export2(src_exports, {
|
|
3063
|
+
arrayzeValue: () => arrayzeValue2,
|
|
3064
|
+
copyStringToClipboard: () => copyStringToClipboard,
|
|
3065
|
+
fibonacciNumberByIndex: () => fibonacciNumberByIndex,
|
|
3066
|
+
findClosestNumber: () => findClosestNumber,
|
|
3067
|
+
findClosestNumberInFactory: () => findClosestNumberInFactory,
|
|
3068
|
+
formatDate: () => formatDate,
|
|
3069
|
+
isPhoto: () => isPhoto,
|
|
3070
|
+
loadCssFile: () => loadCssFile,
|
|
3071
|
+
loadJavascript: () => loadJavascript,
|
|
3072
|
+
loadJavascriptFile: () => loadJavascriptFile,
|
|
3073
|
+
loadJavascriptFileSync: () => loadJavascriptFileSync,
|
|
3074
|
+
removeChars: () => removeChars,
|
|
3075
|
+
toCamelCase: () => toCamelCase,
|
|
3076
|
+
toDashCase: () => toDashCase2,
|
|
3077
|
+
toDescriptionCase: () => toDescriptionCase,
|
|
3078
|
+
toTitleCase: () => toTitleCase,
|
|
3079
|
+
toggleFullscreen: () => toggleFullscreen
|
|
3080
|
+
});
|
|
3081
|
+
module2.exports = __toCommonJS2(src_exports);
|
|
3082
|
+
var import_utils22 = __toESM2(require_cjs4(), 1);
|
|
3083
|
+
var toggleFullscreen = async (el) => {
|
|
3084
|
+
if (!document.fullscreenElement) {
|
|
3085
|
+
try {
|
|
3086
|
+
await (el.node || document).requestFullscreen();
|
|
3087
|
+
} catch (err) {
|
|
3088
|
+
console.warn(`Error attempting to enable fullscreen mode: ${err.message} (${err.name})`);
|
|
3089
|
+
}
|
|
3090
|
+
} else {
|
|
3091
|
+
await document.exitFullscreen();
|
|
3172
3092
|
}
|
|
3173
|
-
return "";
|
|
3174
3093
|
};
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
var __defProp22 = Object.defineProperty;
|
|
3181
|
-
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
3182
|
-
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
3183
|
-
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
3184
|
-
var __export22 = (target, all) => {
|
|
3185
|
-
for (var name in all)
|
|
3186
|
-
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
3094
|
+
var import_utils13 = __toESM2(require_cjs4(), 1);
|
|
3095
|
+
var findClosestNumber = (number, arr) => {
|
|
3096
|
+
return ((0, import_utils13.isArray)(arr) ? arr : Object.values(arr)).reduce((prev, curr) => {
|
|
3097
|
+
return Math.abs(curr - number) < Math.abs(prev - number) ? curr : prev;
|
|
3098
|
+
});
|
|
3187
3099
|
};
|
|
3188
|
-
var
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3100
|
+
var findClosestNumberInFactory = (val, factory) => {
|
|
3101
|
+
val = parseFloat(val);
|
|
3102
|
+
if ((0, import_utils13.isObject)(factory))
|
|
3103
|
+
factory = Object.values(factory);
|
|
3104
|
+
return findClosestNumber(val, factory);
|
|
3105
|
+
};
|
|
3106
|
+
var formatDate = (timestamp) => {
|
|
3107
|
+
if (!timestamp)
|
|
3108
|
+
return "";
|
|
3109
|
+
const d = new Date(timestamp);
|
|
3110
|
+
const ye = new Intl.DateTimeFormat("en", { year: "numeric" }).format(d);
|
|
3111
|
+
const mo = new Intl.DateTimeFormat("en", { month: "short" }).format(d);
|
|
3112
|
+
const da = new Intl.DateTimeFormat("en", { day: "2-digit" }).format(d);
|
|
3113
|
+
return `${da} ${mo}, ${ye}`;
|
|
3114
|
+
};
|
|
3115
|
+
var fibonacciNumberByIndex = function fibonacciNumberByIndex2(n) {
|
|
3116
|
+
const fib = [0, 1];
|
|
3117
|
+
for (let i = 2; i <= n; i++) {
|
|
3118
|
+
fib[i] = fib[i - 1] + fib[i - 2];
|
|
3119
|
+
}
|
|
3120
|
+
return fib[n];
|
|
3121
|
+
};
|
|
3122
|
+
var loadJavascriptFile = (FILE_URL, async = false, doc = document, type = "text/javascript") => {
|
|
3123
|
+
return new Promise((resolve, reject) => {
|
|
3124
|
+
try {
|
|
3125
|
+
const scriptEle = doc.createElement("script");
|
|
3126
|
+
scriptEle.type = type;
|
|
3127
|
+
scriptEle.async = async;
|
|
3128
|
+
scriptEle.src = FILE_URL;
|
|
3129
|
+
scriptEle.addEventListener("load", (ev) => {
|
|
3130
|
+
resolve({
|
|
3131
|
+
status: true
|
|
3132
|
+
});
|
|
3133
|
+
});
|
|
3134
|
+
scriptEle.addEventListener("error", (ev) => {
|
|
3135
|
+
reject(new Error({
|
|
3136
|
+
status: false,
|
|
3137
|
+
message: `Failed to load the script ${FILE_URL}`
|
|
3138
|
+
}));
|
|
3139
|
+
});
|
|
3140
|
+
doc.body.appendChild(scriptEle);
|
|
3141
|
+
} catch (error) {
|
|
3142
|
+
reject(error);
|
|
3143
|
+
}
|
|
3144
|
+
});
|
|
3195
3145
|
};
|
|
3196
|
-
var
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
"
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
"basefont",
|
|
3228
|
-
"bdi",
|
|
3229
|
-
"bdo",
|
|
3230
|
-
"big",
|
|
3231
|
-
"blockquote",
|
|
3232
|
-
"br",
|
|
3233
|
-
"button",
|
|
3234
|
-
"canvas",
|
|
3235
|
-
"caption",
|
|
3236
|
-
"center",
|
|
3237
|
-
"cite",
|
|
3238
|
-
"code",
|
|
3239
|
-
"search",
|
|
3240
|
-
"col",
|
|
3241
|
-
"colgroup",
|
|
3242
|
-
"data",
|
|
3243
|
-
"datalist",
|
|
3244
|
-
"dd",
|
|
3245
|
-
"del",
|
|
3246
|
-
"details",
|
|
3247
|
-
"dfn",
|
|
3248
|
-
"dialog",
|
|
3249
|
-
"dir",
|
|
3250
|
-
"div",
|
|
3251
|
-
"dl",
|
|
3252
|
-
"dt",
|
|
3253
|
-
"em",
|
|
3254
|
-
"embed",
|
|
3255
|
-
"fieldset",
|
|
3256
|
-
"figcaption",
|
|
3257
|
-
"figure",
|
|
3258
|
-
"font",
|
|
3259
|
-
"footer",
|
|
3260
|
-
"form",
|
|
3261
|
-
"frame",
|
|
3262
|
-
"frameset",
|
|
3263
|
-
"h1",
|
|
3264
|
-
"h2",
|
|
3265
|
-
"h3",
|
|
3266
|
-
"h4",
|
|
3267
|
-
"h5",
|
|
3268
|
-
"h6",
|
|
3269
|
-
"head",
|
|
3270
|
-
"header",
|
|
3271
|
-
"hr",
|
|
3272
|
-
"i",
|
|
3273
|
-
"iframe",
|
|
3274
|
-
"img",
|
|
3275
|
-
"input",
|
|
3276
|
-
"ins",
|
|
3277
|
-
"kbd",
|
|
3278
|
-
"label",
|
|
3279
|
-
"legend",
|
|
3280
|
-
"li",
|
|
3281
|
-
"link",
|
|
3282
|
-
"main",
|
|
3283
|
-
"map",
|
|
3284
|
-
"mark",
|
|
3285
|
-
"meter",
|
|
3286
|
-
"nav",
|
|
3287
|
-
"noframes",
|
|
3288
|
-
"noscript",
|
|
3289
|
-
"object",
|
|
3290
|
-
"ol",
|
|
3291
|
-
"optgroup",
|
|
3292
|
-
"option",
|
|
3293
|
-
"output",
|
|
3294
|
-
"p",
|
|
3295
|
-
"param",
|
|
3296
|
-
"picture",
|
|
3297
|
-
"pre",
|
|
3298
|
-
"progress",
|
|
3299
|
-
"hgroup",
|
|
3300
|
-
"q",
|
|
3301
|
-
"rp",
|
|
3302
|
-
"rt",
|
|
3303
|
-
"ruby",
|
|
3304
|
-
"s",
|
|
3305
|
-
"samp",
|
|
3306
|
-
"script",
|
|
3307
|
-
"section",
|
|
3308
|
-
"select",
|
|
3309
|
-
"small",
|
|
3310
|
-
"source",
|
|
3311
|
-
"span",
|
|
3312
|
-
"strike",
|
|
3313
|
-
"strong",
|
|
3314
|
-
"sub",
|
|
3315
|
-
"summary",
|
|
3316
|
-
"sup",
|
|
3317
|
-
"table",
|
|
3318
|
-
"tbody",
|
|
3319
|
-
"td",
|
|
3320
|
-
"template",
|
|
3321
|
-
"hgroup",
|
|
3322
|
-
"textarea",
|
|
3323
|
-
"tfoot",
|
|
3324
|
-
"th",
|
|
3325
|
-
"thead",
|
|
3326
|
-
"time",
|
|
3327
|
-
"tr",
|
|
3328
|
-
"track",
|
|
3329
|
-
"tt",
|
|
3330
|
-
"u",
|
|
3331
|
-
"ul",
|
|
3332
|
-
"var",
|
|
3333
|
-
"video",
|
|
3334
|
-
"wbr",
|
|
3335
|
-
// SVG
|
|
3336
|
-
"svg",
|
|
3337
|
-
"path"
|
|
3338
|
-
]
|
|
3146
|
+
var loadJavascriptFileSync = (FILE_URL, doc = document, fallback, type = "text/javascript") => {
|
|
3147
|
+
const xhr = new window.XMLHttpRequest();
|
|
3148
|
+
xhr.open("GET", FILE_URL, false);
|
|
3149
|
+
xhr.send();
|
|
3150
|
+
if (xhr.status === 200) {
|
|
3151
|
+
const scriptEle = doc.createElement("script");
|
|
3152
|
+
scriptEle.type = type;
|
|
3153
|
+
scriptEle.text = xhr.responseText;
|
|
3154
|
+
doc.body.appendChild(scriptEle);
|
|
3155
|
+
if (typeof fallback === "function")
|
|
3156
|
+
fallback();
|
|
3157
|
+
} else {
|
|
3158
|
+
throw new Error(`Failed to load the script ${FILE_URL}`);
|
|
3159
|
+
}
|
|
3160
|
+
};
|
|
3161
|
+
var loadCssFile = (FILE_URL, async = false, doc = document, type = "text/javascript") => {
|
|
3162
|
+
return new Promise((resolve, reject) => {
|
|
3163
|
+
try {
|
|
3164
|
+
const linkElem = doc.createElement("link");
|
|
3165
|
+
linkElem.rel = "stylesheet";
|
|
3166
|
+
linkElem.href = FILE_URL;
|
|
3167
|
+
linkElem.addEventListener("load", (ev) => {
|
|
3168
|
+
resolve({
|
|
3169
|
+
status: true
|
|
3170
|
+
});
|
|
3171
|
+
});
|
|
3172
|
+
doc.head.appendChild(linkElem);
|
|
3173
|
+
} catch (error) {
|
|
3174
|
+
reject(error);
|
|
3175
|
+
}
|
|
3176
|
+
});
|
|
3339
3177
|
};
|
|
3340
|
-
var
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3178
|
+
var loadJavascript = (body, async = false, doc = document, type = "text/javascript", id = "smbls-script") => {
|
|
3179
|
+
try {
|
|
3180
|
+
const scriptEle = doc.createElement("script");
|
|
3181
|
+
scriptEle.type = type;
|
|
3182
|
+
scriptEle.async = async;
|
|
3183
|
+
scriptEle.id = id;
|
|
3184
|
+
scriptEle.innerHTML = body;
|
|
3185
|
+
doc.body.appendChild(scriptEle);
|
|
3186
|
+
} catch (error) {
|
|
3187
|
+
console.warn(error);
|
|
3188
|
+
}
|
|
3189
|
+
};
|
|
3190
|
+
var isPhoto = (format) => ["jpeg", "gif", "jpg", "png", "tiff", "woff"].includes(format);
|
|
3191
|
+
var copyStringToClipboard = (str) => {
|
|
3192
|
+
const el = document.createElement("textarea");
|
|
3193
|
+
el.value = str;
|
|
3194
|
+
el.setAttribute("readonly", "");
|
|
3195
|
+
el.style = { position: "absolute", left: "-9999px" };
|
|
3196
|
+
document.body.appendChild(el);
|
|
3197
|
+
el.select();
|
|
3198
|
+
document.execCommand("copy");
|
|
3199
|
+
document.body.removeChild(el);
|
|
3200
|
+
};
|
|
3201
|
+
var removeChars = (str) => {
|
|
3202
|
+
return str.replace(/[^a-zA-Z0-9_]/g, "");
|
|
3203
|
+
};
|
|
3204
|
+
var toCamelCase = (str) => {
|
|
3205
|
+
return str.replace(/(?:^\w|[A-Z]|\b\w)/g, function(word, index) {
|
|
3206
|
+
return index === 0 ? word.toLowerCase() : word.toUpperCase();
|
|
3207
|
+
}).replaceAll(/\s+/g, "");
|
|
3208
|
+
};
|
|
3209
|
+
var toTitleCase = (str) => str && str.replace(
|
|
3210
|
+
/\w\S*/g,
|
|
3211
|
+
(txt) => {
|
|
3212
|
+
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
|
|
3355
3213
|
}
|
|
3356
|
-
|
|
3214
|
+
);
|
|
3215
|
+
var toDashCase2 = (val) => val.replace(/[^a-zA-Z0-9]/g, " ").trim().toLowerCase().replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
3216
|
+
var toDescriptionCase = (str = "") => {
|
|
3217
|
+
if (typeof str !== "string")
|
|
3218
|
+
return;
|
|
3219
|
+
const result = str.replace(/([A-Z])/g, " $1");
|
|
3220
|
+
return result.charAt(0).toUpperCase() + result.slice(1);
|
|
3221
|
+
};
|
|
3222
|
+
var arrayzeValue2 = (val) => {
|
|
3223
|
+
if ((0, import_utils22.isArray)(val))
|
|
3224
|
+
return val;
|
|
3225
|
+
if ((0, import_utils22.isString)(val))
|
|
3226
|
+
return val.split(" ");
|
|
3227
|
+
if ((0, import_utils22.isObject)(val))
|
|
3228
|
+
return Object.values(val);
|
|
3229
|
+
if ((0, import_utils22.isNumber)(val))
|
|
3230
|
+
return [val];
|
|
3357
3231
|
};
|
|
3358
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps22(target, mod, "default"), secondTarget && __copyProps22(secondTarget, mod, "default"));
|
|
3359
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
3360
|
-
var utils_exports = {};
|
|
3361
|
-
module2.exports = __toCommonJS22(utils_exports);
|
|
3362
|
-
__reExport(utils_exports, require_key2(), module2.exports);
|
|
3363
|
-
__reExport(utils_exports, require_env2(), module2.exports);
|
|
3364
|
-
__reExport(utils_exports, require_types2(), module2.exports);
|
|
3365
|
-
__reExport(utils_exports, require_object2(), module2.exports);
|
|
3366
|
-
__reExport(utils_exports, require_function2(), module2.exports);
|
|
3367
|
-
__reExport(utils_exports, require_array2(), module2.exports);
|
|
3368
|
-
__reExport(utils_exports, require_node2(), module2.exports);
|
|
3369
|
-
__reExport(utils_exports, require_log2(), module2.exports);
|
|
3370
|
-
__reExport(utils_exports, require_string2(), module2.exports);
|
|
3371
|
-
__reExport(utils_exports, require_globals2(), module2.exports);
|
|
3372
|
-
__reExport(utils_exports, require_cookie2(), module2.exports);
|
|
3373
|
-
__reExport(utils_exports, require_tags2(), module2.exports);
|
|
3374
3232
|
}
|
|
3375
3233
|
});
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
findClosestNumberInFactory: () => findClosestNumberInFactory,
|
|
3383
|
-
formatDate: () => formatDate,
|
|
3384
|
-
isPhoto: () => isPhoto,
|
|
3385
|
-
loadCssFile: () => loadCssFile,
|
|
3386
|
-
loadJavascript: () => loadJavascript,
|
|
3387
|
-
loadJavascriptFile: () => loadJavascriptFile,
|
|
3388
|
-
removeChars: () => removeChars,
|
|
3389
|
-
toCamelCase: () => toCamelCase,
|
|
3390
|
-
toDashCase: () => toDashCase,
|
|
3391
|
-
toDescriptionCase: () => toDescriptionCase,
|
|
3392
|
-
toTitleCase: () => toTitleCase,
|
|
3393
|
-
toggleFullscreen: () => toggleFullscreen
|
|
3234
|
+
|
|
3235
|
+
// src/system/shadow.js
|
|
3236
|
+
var shadow_exports = {};
|
|
3237
|
+
__export(shadow_exports, {
|
|
3238
|
+
getShadow: () => getShadow,
|
|
3239
|
+
setShadow: () => setShadow
|
|
3394
3240
|
});
|
|
3395
|
-
module.exports =
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3241
|
+
module.exports = __toCommonJS(shadow_exports);
|
|
3242
|
+
|
|
3243
|
+
// src/factory.js
|
|
3244
|
+
var import_utils = __toESM(require_cjs(), 1);
|
|
3245
|
+
|
|
3246
|
+
// src/defaultConfig/index.js
|
|
3247
|
+
var defaultConfig_exports = {};
|
|
3248
|
+
__export(defaultConfig_exports, {
|
|
3249
|
+
ANIMATION: () => ANIMATION,
|
|
3250
|
+
BREAKPOINTS: () => BREAKPOINTS,
|
|
3251
|
+
CASES: () => CASES,
|
|
3252
|
+
COLOR: () => COLOR,
|
|
3253
|
+
DEVICES: () => DEVICES,
|
|
3254
|
+
DOCUMENT: () => DOCUMENT,
|
|
3255
|
+
FONT: () => FONT,
|
|
3256
|
+
FONT_FACE: () => FONT_FACE,
|
|
3257
|
+
FONT_FAMILY: () => FONT_FAMILY,
|
|
3258
|
+
FONT_FAMILY_TYPES: () => FONT_FAMILY_TYPES,
|
|
3259
|
+
GRADIENT: () => GRADIENT,
|
|
3260
|
+
GRID: () => GRID,
|
|
3261
|
+
ICONS: () => ICONS,
|
|
3262
|
+
MEDIA: () => MEDIA,
|
|
3263
|
+
RESET: () => RESET,
|
|
3264
|
+
SEMANTIC_ICONS: () => SEMANTIC_ICONS,
|
|
3265
|
+
SEQUENCE: () => SEQUENCE,
|
|
3266
|
+
SHADOW: () => SHADOW,
|
|
3267
|
+
SPACING: () => SPACING,
|
|
3268
|
+
SVG: () => SVG,
|
|
3269
|
+
SVG_DATA: () => SVG_DATA,
|
|
3270
|
+
TEMPLATES: () => TEMPLATES,
|
|
3271
|
+
THEME: () => THEME,
|
|
3272
|
+
TIMING: () => TIMING,
|
|
3273
|
+
TYPOGRAPHY: () => TYPOGRAPHY,
|
|
3274
|
+
UNIT: () => UNIT
|
|
3275
|
+
});
|
|
3276
|
+
|
|
3277
|
+
// src/defaultConfig/sequence.js
|
|
3278
|
+
var SEQUENCE = {
|
|
3279
|
+
"minor-second": 1.067,
|
|
3280
|
+
"major-second": 1.125,
|
|
3281
|
+
"minor-third": 1.2,
|
|
3282
|
+
"major-third": 1.25,
|
|
3283
|
+
"perfect-fourth": 1.333,
|
|
3284
|
+
"augmented-fourth": 1.414,
|
|
3285
|
+
"perfect-fifth": 1.5,
|
|
3286
|
+
"minor-sixth": 1.6,
|
|
3287
|
+
phi: 1.618,
|
|
3288
|
+
// golden-ratio
|
|
3289
|
+
"major-sixth": 1.667,
|
|
3290
|
+
"square-root-3": 1.732,
|
|
3291
|
+
// theodorus
|
|
3292
|
+
"minor-seventh": 1.778,
|
|
3293
|
+
"major-seventh": 1.875,
|
|
3294
|
+
octave: 2,
|
|
3295
|
+
"square-root-5": 2.23,
|
|
3296
|
+
// pythagoras
|
|
3297
|
+
"major-tenth": 2.5,
|
|
3298
|
+
"major-eleventh": 2.667,
|
|
3299
|
+
"major-twelfth": 3,
|
|
3300
|
+
pi: 3.14,
|
|
3301
|
+
// archimedes
|
|
3302
|
+
"double-octave": 4
|
|
3303
|
+
};
|
|
3304
|
+
|
|
3305
|
+
// src/defaultConfig/unit.js
|
|
3306
|
+
var UNIT = {
|
|
3307
|
+
default: "em"
|
|
3308
|
+
};
|
|
3309
|
+
|
|
3310
|
+
// src/defaultConfig/typography.js
|
|
3311
|
+
var defaultProps = {
|
|
3312
|
+
browserDefault: 16,
|
|
3313
|
+
base: 16,
|
|
3314
|
+
type: "font-size",
|
|
3315
|
+
ratio: SEQUENCE["minor-third"],
|
|
3316
|
+
range: [-3, 12],
|
|
3317
|
+
h1Matches: 6,
|
|
3318
|
+
lineHeight: 1.5,
|
|
3319
|
+
subSequence: true,
|
|
3320
|
+
mediaRegenerate: false,
|
|
3321
|
+
unit: "em",
|
|
3322
|
+
templates: {},
|
|
3323
|
+
sequence: {},
|
|
3324
|
+
scales: {},
|
|
3325
|
+
vars: {}
|
|
3405
3326
|
};
|
|
3406
|
-
var
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3327
|
+
var TYPOGRAPHY = defaultProps;
|
|
3328
|
+
|
|
3329
|
+
// src/defaultConfig/font.js
|
|
3330
|
+
var FONT = {};
|
|
3331
|
+
|
|
3332
|
+
// src/defaultConfig/font-family.js
|
|
3333
|
+
var FONT_FAMILY = {};
|
|
3334
|
+
var FONT_FAMILY_TYPES = {
|
|
3335
|
+
"sans-serif": "Helvetica, Arial, sans-serif, --system-default",
|
|
3336
|
+
serif: "Times New Roman, Georgia, serif, --system-default",
|
|
3337
|
+
monospace: "Courier New, monospace, --system-default"
|
|
3411
3338
|
};
|
|
3412
|
-
var
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3339
|
+
var FONT_FACE = {};
|
|
3340
|
+
|
|
3341
|
+
// src/defaultConfig/media.js
|
|
3342
|
+
var MEDIA = {
|
|
3343
|
+
tv: "(min-width: 2780px)",
|
|
3344
|
+
light: "(prefers-color-scheme: light)",
|
|
3345
|
+
dark: "(prefers-color-scheme: dark)",
|
|
3346
|
+
print: "print"
|
|
3417
3347
|
};
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3348
|
+
|
|
3349
|
+
// src/defaultConfig/spacing.js
|
|
3350
|
+
var defaultProps2 = {
|
|
3351
|
+
base: TYPOGRAPHY.base,
|
|
3352
|
+
type: "spacing",
|
|
3353
|
+
ratio: SEQUENCE.phi,
|
|
3354
|
+
range: [-5, 15],
|
|
3355
|
+
subSequence: true,
|
|
3356
|
+
mediaRegenerate: false,
|
|
3357
|
+
unit: "em",
|
|
3358
|
+
sequence: {},
|
|
3359
|
+
scales: {},
|
|
3360
|
+
vars: {}
|
|
3426
3361
|
};
|
|
3427
|
-
var
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3362
|
+
var SPACING = defaultProps2;
|
|
3363
|
+
|
|
3364
|
+
// src/defaultConfig/color.js
|
|
3365
|
+
var COLOR = {};
|
|
3366
|
+
var GRADIENT = {};
|
|
3367
|
+
|
|
3368
|
+
// src/defaultConfig/theme.js
|
|
3369
|
+
var THEME = {};
|
|
3370
|
+
|
|
3371
|
+
// src/defaultConfig/shadow.js
|
|
3372
|
+
var SHADOW = {};
|
|
3373
|
+
|
|
3374
|
+
// src/defaultConfig/icons.js
|
|
3375
|
+
var ICONS = {};
|
|
3376
|
+
var SEMANTIC_ICONS = {};
|
|
3377
|
+
|
|
3378
|
+
// src/defaultConfig/timing.js
|
|
3379
|
+
var defaultProps3 = {
|
|
3380
|
+
default: 150,
|
|
3381
|
+
base: 150,
|
|
3382
|
+
type: "timing",
|
|
3383
|
+
ratio: SEQUENCE["perfect-fourth"],
|
|
3384
|
+
range: [-3, 12],
|
|
3385
|
+
mediaRegenerate: false,
|
|
3386
|
+
unit: "ms",
|
|
3387
|
+
sequence: {},
|
|
3388
|
+
scales: {},
|
|
3389
|
+
vars: {}
|
|
3433
3390
|
};
|
|
3434
|
-
var
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
});
|
|
3452
|
-
doc.body.appendChild(scriptEle);
|
|
3453
|
-
} catch (error) {
|
|
3454
|
-
reject(error);
|
|
3455
|
-
}
|
|
3456
|
-
});
|
|
3391
|
+
var TIMING = defaultProps3;
|
|
3392
|
+
|
|
3393
|
+
// src/defaultConfig/document.js
|
|
3394
|
+
var DOCUMENT = {};
|
|
3395
|
+
|
|
3396
|
+
// src/defaultConfig/responsive.js
|
|
3397
|
+
var BREAKPOINTS = {
|
|
3398
|
+
screenL: 1920,
|
|
3399
|
+
screenM: 1680,
|
|
3400
|
+
screenS: 1440,
|
|
3401
|
+
tabletL: 1366,
|
|
3402
|
+
tabletM: 1280,
|
|
3403
|
+
tabletS: 1024,
|
|
3404
|
+
mobileL: 768,
|
|
3405
|
+
mobileM: 560,
|
|
3406
|
+
mobileS: 480,
|
|
3407
|
+
mobileXS: 375
|
|
3457
3408
|
};
|
|
3458
|
-
var
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
doc.head.appendChild(linkElem);
|
|
3470
|
-
} catch (error) {
|
|
3471
|
-
reject(error);
|
|
3472
|
-
}
|
|
3473
|
-
});
|
|
3409
|
+
var DEVICES = {
|
|
3410
|
+
screenL: [1920, 1024],
|
|
3411
|
+
screenM: [1680, 1024],
|
|
3412
|
+
screenS: [1440, 978],
|
|
3413
|
+
tabletL: [1366, 926],
|
|
3414
|
+
tabletM: [1280, 768],
|
|
3415
|
+
tabletS: [1024, 768],
|
|
3416
|
+
mobileL: [768, 375],
|
|
3417
|
+
mobileM: [560, 768],
|
|
3418
|
+
mobileS: [480, 768],
|
|
3419
|
+
mobileXS: [375, 768]
|
|
3474
3420
|
};
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3421
|
+
|
|
3422
|
+
// src/defaultConfig/cases.js
|
|
3423
|
+
var CASES = {};
|
|
3424
|
+
|
|
3425
|
+
// src/defaultConfig/animation.js
|
|
3426
|
+
var ANIMATION = {};
|
|
3427
|
+
|
|
3428
|
+
// src/defaultConfig/svg.js
|
|
3429
|
+
var SVG = {};
|
|
3430
|
+
var SVG_DATA = {};
|
|
3431
|
+
|
|
3432
|
+
// src/defaultConfig/templates.js
|
|
3433
|
+
var TEMPLATES = {};
|
|
3434
|
+
|
|
3435
|
+
// src/defaultConfig/grid.js
|
|
3436
|
+
var defaultProps4 = {};
|
|
3437
|
+
var GRID = defaultProps4;
|
|
3438
|
+
|
|
3439
|
+
// src/defaultConfig/index.js
|
|
3440
|
+
var RESET = {};
|
|
3441
|
+
|
|
3442
|
+
// src/factory.js
|
|
3443
|
+
var CSS_VARS = {};
|
|
3444
|
+
var CONFIG = {
|
|
3445
|
+
verbose: false,
|
|
3446
|
+
useVariable: true,
|
|
3447
|
+
useReset: true,
|
|
3448
|
+
CSS_VARS,
|
|
3449
|
+
...defaultConfig_exports
|
|
3486
3450
|
};
|
|
3487
|
-
var
|
|
3488
|
-
var
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
el.setAttribute("readonly", "");
|
|
3492
|
-
el.style = { position: "absolute", left: "-9999px" };
|
|
3493
|
-
document.body.appendChild(el);
|
|
3494
|
-
el.select();
|
|
3495
|
-
document.execCommand("copy");
|
|
3496
|
-
document.body.removeChild(el);
|
|
3451
|
+
var cachedConfig = (0, import_utils.deepClone)(CONFIG);
|
|
3452
|
+
var FACTORY = {
|
|
3453
|
+
active: "0",
|
|
3454
|
+
0: CONFIG
|
|
3497
3455
|
};
|
|
3498
|
-
var
|
|
3499
|
-
return
|
|
3456
|
+
var getActiveConfig = (def) => {
|
|
3457
|
+
return FACTORY[def || FACTORY.active] || CONFIG;
|
|
3500
3458
|
};
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3459
|
+
|
|
3460
|
+
// src/system/color.js
|
|
3461
|
+
var import_utils7 = __toESM(require_cjs(), 1);
|
|
3462
|
+
|
|
3463
|
+
// src/utils/unit.js
|
|
3464
|
+
var isScalingUnit = (unit) => {
|
|
3465
|
+
return unit === "em" || unit === "rem" || unit === "vw" || unit === "vh" || unit === "vmax" || unit === "vmin";
|
|
3505
3466
|
};
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3467
|
+
|
|
3468
|
+
// src/utils/color.js
|
|
3469
|
+
var import_globals = __toESM(require_cjs2(), 1);
|
|
3470
|
+
var import_utils2 = __toESM(require_cjs(), 1);
|
|
3471
|
+
var colorStringToRgbaArray = (color) => {
|
|
3472
|
+
if (color === "")
|
|
3473
|
+
return [0, 0, 0, 0];
|
|
3474
|
+
if (color.toLowerCase() === "transparent")
|
|
3475
|
+
return [0, 0, 0, 0];
|
|
3476
|
+
if (color[0] === "#") {
|
|
3477
|
+
if (color.length < 7) {
|
|
3478
|
+
color = "#" + color[1] + color[1] + color[2] + color[2] + color[3] + color[3] + (color.length > 4 ? color[4] + color[4] : "");
|
|
3479
|
+
}
|
|
3480
|
+
return [
|
|
3481
|
+
parseInt(color.substr(1, 2), 16),
|
|
3482
|
+
parseInt(color.substr(3, 2), 16),
|
|
3483
|
+
parseInt(color.substr(5, 2), 16),
|
|
3484
|
+
color.length > 7 ? parseInt(color.substr(7, 2), 16) / 255 : 1
|
|
3485
|
+
];
|
|
3510
3486
|
}
|
|
3511
|
-
)
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3487
|
+
if (color.indexOf("rgb") === -1) {
|
|
3488
|
+
if (import_globals.document && import_globals.window) {
|
|
3489
|
+
const elem = import_globals.document.body.appendChild(import_globals.document.createElement("fictum"));
|
|
3490
|
+
const flag = "rgb(1, 2, 3)";
|
|
3491
|
+
elem.style.color = flag;
|
|
3492
|
+
if (elem.style.color !== flag) {
|
|
3493
|
+
import_globals.document.body.removeChild(elem);
|
|
3494
|
+
return;
|
|
3495
|
+
}
|
|
3496
|
+
elem.style.color = color;
|
|
3497
|
+
if (elem.style.color === flag || elem.style.color === "") {
|
|
3498
|
+
import_globals.document.body.removeChild(elem);
|
|
3499
|
+
return [0, 0, 0, 0];
|
|
3500
|
+
}
|
|
3501
|
+
color = import_globals.window.getComputedStyle(elem).color;
|
|
3502
|
+
import_globals.document.body.removeChild(elem);
|
|
3503
|
+
}
|
|
3504
|
+
}
|
|
3505
|
+
if (color.indexOf("rgb") === 0) {
|
|
3506
|
+
if (color.indexOf("rgba") === -1)
|
|
3507
|
+
color = `${color}, 1`;
|
|
3508
|
+
return color.match(/[\.\d]+/g).map((a) => +a);
|
|
3509
|
+
}
|
|
3510
|
+
return [0, 0, 0, 0];
|
|
3511
|
+
};
|
|
3512
|
+
var hexToRgbArray = (hex, alpha = 1) => {
|
|
3513
|
+
const [r, g, b] = hex.match(/\w\w/g).map((x) => parseInt(x, 16));
|
|
3514
|
+
return [r, g, b];
|
|
3515
|
+
};
|
|
3516
|
+
var rgbArrayToHex = ([r, g, b]) => {
|
|
3517
|
+
return ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
|
|
3518
|
+
};
|
|
3519
|
+
var rgbToHSL = (r, g, b) => {
|
|
3520
|
+
const a = Math.max(r, g, b);
|
|
3521
|
+
const n = a - Math.min(r, g, b);
|
|
3522
|
+
const f = 1 - Math.abs(a + a - n - 1);
|
|
3523
|
+
const h = n && (a == r ? (g - b) / n : a == g ? 2 + (b - r) / n : 4 + (r - g) / n);
|
|
3524
|
+
return [60 * (h < 0 ? h + 6 : h), f ? n / f : 0, (a + a - n) / 2];
|
|
3525
|
+
};
|
|
3526
|
+
var hslToRgb = (h, s, l, a = s * Math.min(l, 1 - l), f = (n, k = (n + h / 30) % 12) => l - a * Math.max(
|
|
3527
|
+
Math.min(k - 3, 9 - k, 1),
|
|
3528
|
+
-1
|
|
3529
|
+
)) => [f(0), f(8), f(4)];
|
|
3530
|
+
var getColorShade = (col, amt) => {
|
|
3531
|
+
const num = parseInt(col, 16);
|
|
3532
|
+
let r = (num >> 16) + amt;
|
|
3533
|
+
if (r > 255)
|
|
3534
|
+
r = 255;
|
|
3535
|
+
else if (r < 0)
|
|
3536
|
+
r = 0;
|
|
3537
|
+
let b = (num >> 8 & 255) + amt;
|
|
3538
|
+
if (b > 255)
|
|
3539
|
+
b = 255;
|
|
3540
|
+
else if (b < 0)
|
|
3541
|
+
b = 0;
|
|
3542
|
+
let g = (num & 255) + amt;
|
|
3543
|
+
if (g > 255)
|
|
3544
|
+
g = 255;
|
|
3545
|
+
else if (g < 0)
|
|
3546
|
+
g = 0;
|
|
3547
|
+
return ((g | b << 8 | r << 16) + 16777216).toString(16).slice(1);
|
|
3518
3548
|
};
|
|
3519
|
-
var
|
|
3520
|
-
if ((0,
|
|
3521
|
-
|
|
3522
|
-
if ((0,
|
|
3523
|
-
|
|
3524
|
-
if ((0,
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3549
|
+
var getRgbTone = (rgb, tone) => {
|
|
3550
|
+
if ((0, import_utils2.isString)(rgb) && rgb.includes("rgb"))
|
|
3551
|
+
rgb = colorStringToRgbaArray(rgb).join(", ");
|
|
3552
|
+
if ((0, import_utils2.isString)(rgb))
|
|
3553
|
+
rgb = rgb.split(",").map((v) => parseFloat(v.trim()));
|
|
3554
|
+
if ((0, import_utils2.isNumber)(tone))
|
|
3555
|
+
tone += "";
|
|
3556
|
+
const toHex = rgbArrayToHex(rgb);
|
|
3557
|
+
const abs = tone.slice(0, 1);
|
|
3558
|
+
if (abs === "-" || abs === "+") {
|
|
3559
|
+
const colorShade = getColorShade(toHex, parseFloat(tone));
|
|
3560
|
+
return hexToRgbArray(colorShade).join(", ");
|
|
3561
|
+
} else {
|
|
3562
|
+
const [r, g, b] = rgb;
|
|
3563
|
+
const hsl = rgbToHSL(r, g, b);
|
|
3564
|
+
const [h, s, l] = hsl;
|
|
3565
|
+
const newRgb = hslToRgb(h, s, parseFloat(tone) / 100 * 255);
|
|
3566
|
+
return newRgb;
|
|
3567
|
+
}
|
|
3528
3568
|
};
|
|
3529
3569
|
|
|
3530
3570
|
// src/utils/sequence.js
|
|
3571
|
+
var import_utils3 = __toESM(require_cjs(), 1);
|
|
3572
|
+
var import_utils4 = __toESM(require_cjs3(), 1);
|
|
3531
3573
|
var numToLetterMap = {
|
|
3532
3574
|
"-6": "U",
|
|
3533
3575
|
"-5": "V",
|
|
@@ -3666,9 +3708,9 @@ var getSequenceValue = (value = "A", sequenceProps) => {
|
|
|
3666
3708
|
unit = UNIT2.default,
|
|
3667
3709
|
useVariable
|
|
3668
3710
|
} = sequenceProps;
|
|
3669
|
-
if ((0,
|
|
3711
|
+
if ((0, import_utils3.isString)(value) && value.slice(0, 2) === "--")
|
|
3670
3712
|
return `var(${value})`;
|
|
3671
|
-
const prefix = `--${(
|
|
3713
|
+
const prefix = `--${(0, import_utils4.toDashCase)(sequenceProps.type.replace(".", "-"))}-`;
|
|
3672
3714
|
const startsWithDashOrLetterRegex = /^-?[a-zA-Z]/i;
|
|
3673
3715
|
const startsWithDashOrLetter = startsWithDashOrLetterRegex.test(value);
|
|
3674
3716
|
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)
|
|
@@ -3714,7 +3756,9 @@ var getSequenceValue = (value = "A", sequenceProps) => {
|
|
|
3714
3756
|
};
|
|
3715
3757
|
var getSequenceValuePropertyPair = (value, propertyName, sequenceProps) => {
|
|
3716
3758
|
if (typeof value !== "string") {
|
|
3717
|
-
|
|
3759
|
+
const CONFIG2 = getActiveConfig();
|
|
3760
|
+
if (CONFIG2.verbose)
|
|
3761
|
+
console.warn(propertyName, value, "is not a string");
|
|
3718
3762
|
return { [propertyName]: value };
|
|
3719
3763
|
}
|
|
3720
3764
|
if (value === "-" || value === "")
|
|
@@ -3723,15 +3767,15 @@ var getSequenceValuePropertyPair = (value, propertyName, sequenceProps) => {
|
|
|
3723
3767
|
};
|
|
3724
3768
|
|
|
3725
3769
|
// src/utils/var.js
|
|
3726
|
-
var
|
|
3770
|
+
var import_utils5 = __toESM(require_cjs(), 1);
|
|
3727
3771
|
|
|
3728
3772
|
// src/utils/sprite.js
|
|
3729
|
-
var
|
|
3773
|
+
var import_utils6 = __toESM(require_cjs(), 1);
|
|
3730
3774
|
|
|
3731
3775
|
// src/system/color.js
|
|
3732
3776
|
var getColor = (value, key, config) => {
|
|
3733
3777
|
const CONFIG2 = config || getActiveConfig();
|
|
3734
|
-
if (!(0,
|
|
3778
|
+
if (!(0, import_utils7.isString)(value)) {
|
|
3735
3779
|
if (CONFIG2.verbose)
|
|
3736
3780
|
console.warn(value, "- type for color is not valid");
|
|
3737
3781
|
return;
|
|
@@ -3740,7 +3784,7 @@ var getColor = (value, key, config) => {
|
|
|
3740
3784
|
return `var(${value})`;
|
|
3741
3785
|
if (key && value[key])
|
|
3742
3786
|
value = value[key];
|
|
3743
|
-
const [name, alpha, tone] = (0,
|
|
3787
|
+
const [name, alpha, tone] = (0, import_utils7.isArray)(value) ? value : value.split(" ");
|
|
3744
3788
|
const { COLOR: COLOR2, GRADIENT: GRADIENT2 } = CONFIG2;
|
|
3745
3789
|
let val = COLOR2[name] || GRADIENT2[name];
|
|
3746
3790
|
if (!val) {
|
|
@@ -3770,7 +3814,8 @@ var getColor = (value, key, config) => {
|
|
|
3770
3814
|
};
|
|
3771
3815
|
|
|
3772
3816
|
// src/system/spacing.js
|
|
3773
|
-
var
|
|
3817
|
+
var import_utils9 = __toESM(require_cjs3(), 1);
|
|
3818
|
+
var import_utils10 = __toESM(require_cjs(), 1);
|
|
3774
3819
|
var getSequence = (sequenceProps) => {
|
|
3775
3820
|
const CONFIG2 = getActiveConfig();
|
|
3776
3821
|
const { SPACING: SPACING2 } = CONFIG2;
|
|
@@ -3781,11 +3826,11 @@ var getSequence = (sequenceProps) => {
|
|
|
3781
3826
|
};
|
|
3782
3827
|
var getSpacingByKey = (value, propertyName = "padding", sequenceProps) => {
|
|
3783
3828
|
const sequence = getSequence(sequenceProps);
|
|
3784
|
-
if ((0,
|
|
3829
|
+
if ((0, import_utils10.isString)(value) && (value.includes("calc") || value.includes("var"))) {
|
|
3785
3830
|
return { [propertyName]: value };
|
|
3786
3831
|
}
|
|
3787
|
-
const stack = (
|
|
3788
|
-
if (!(0,
|
|
3832
|
+
const stack = (0, import_utils9.arrayzeValue)(value);
|
|
3833
|
+
if (!(0, import_utils10.isArray)(stack))
|
|
3789
3834
|
return;
|
|
3790
3835
|
if (stack.length > 1) {
|
|
3791
3836
|
let suffix = "";
|
|
@@ -3813,16 +3858,16 @@ var getSpacingByKey = (value, propertyName = "padding", sequenceProps) => {
|
|
|
3813
3858
|
};
|
|
3814
3859
|
|
|
3815
3860
|
// src/system/shadow.js
|
|
3816
|
-
var
|
|
3861
|
+
var import_utils12 = __toESM(require_cjs(), 1);
|
|
3817
3862
|
var setShadow = (value, key, suffix, prefers) => {
|
|
3818
3863
|
const CONFIG2 = getActiveConfig();
|
|
3819
|
-
if ((0,
|
|
3864
|
+
if ((0, import_utils12.isArray)(value)) {
|
|
3820
3865
|
return {
|
|
3821
3866
|
"@light": setShadow(value[0], key, "light"),
|
|
3822
3867
|
"@dark": setShadow(value[1], key, "dark")
|
|
3823
3868
|
};
|
|
3824
3869
|
}
|
|
3825
|
-
if ((0,
|
|
3870
|
+
if ((0, import_utils12.isObject)(value)) {
|
|
3826
3871
|
const obj = {};
|
|
3827
3872
|
for (const variant in value) {
|
|
3828
3873
|
obj[variant] = setShadow(
|
|
@@ -3833,7 +3878,7 @@ var setShadow = (value, key, suffix, prefers) => {
|
|
|
3833
3878
|
}
|
|
3834
3879
|
return obj;
|
|
3835
3880
|
}
|
|
3836
|
-
if ((0,
|
|
3881
|
+
if ((0, import_utils12.isString)(value) && value.includes(",")) {
|
|
3837
3882
|
value = value.split(",").map((v) => {
|
|
3838
3883
|
v = v.trim();
|
|
3839
3884
|
if (v.startsWith("--"))
|
|
@@ -3861,17 +3906,17 @@ var getShadow = (value, globalTheme) => {
|
|
|
3861
3906
|
const CONFIG2 = getActiveConfig();
|
|
3862
3907
|
if (!globalTheme)
|
|
3863
3908
|
globalTheme = CONFIG2.globalTheme;
|
|
3864
|
-
if (!(0,
|
|
3909
|
+
if (!(0, import_utils12.isString)(value)) {
|
|
3865
3910
|
if (CONFIG2.verbose)
|
|
3866
3911
|
console.warn(value, "- type for color is not valid");
|
|
3867
3912
|
return;
|
|
3868
3913
|
}
|
|
3869
3914
|
if (value.slice(0, 2) === "--")
|
|
3870
3915
|
return `var(${value})`;
|
|
3871
|
-
const [name] = (0,
|
|
3916
|
+
const [name] = (0, import_utils12.isArray)(value) ? value : value.split(" ");
|
|
3872
3917
|
const { SHADOW: SHADOW2 } = CONFIG2;
|
|
3873
3918
|
const val = SHADOW2[name];
|
|
3874
|
-
const isObj = (0,
|
|
3919
|
+
const isObj = (0, import_utils12.isObject)(val);
|
|
3875
3920
|
if (!val) {
|
|
3876
3921
|
if (CONFIG2.verbose)
|
|
3877
3922
|
console.warn("Can't find color ", name);
|