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