@symbo.ls/scratch 2.11.397 → 2.11.410
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/factory.js +165 -26
- package/dist/cjs/index.js +2413 -2123
- package/dist/cjs/set.js +2184 -1892
- package/dist/cjs/system/color.js +2009 -1716
- package/dist/cjs/system/document.js +1999 -1706
- package/dist/cjs/system/font.js +1954 -1662
- package/dist/cjs/system/index.js +2211 -1919
- package/dist/cjs/system/reset.js +2010 -1717
- package/dist/cjs/system/shadow.js +2163 -1869
- package/dist/cjs/system/spacing.js +2003 -1709
- package/dist/cjs/system/svg.js +1950 -1657
- package/dist/cjs/system/theme.js +2016 -1723
- package/dist/cjs/system/timing.js +2002 -1710
- package/dist/cjs/system/typography.js +2199 -1904
- package/dist/cjs/transforms/index.js +2189 -1897
- package/dist/cjs/utils/color.js +165 -26
- package/dist/cjs/utils/index.js +2200 -1907
- package/dist/cjs/utils/sequence.js +1935 -1642
- package/dist/cjs/utils/sprite.js +165 -26
- package/dist/cjs/utils/var.js +1981 -1688
- package/package.json +2 -2
package/dist/cjs/system/svg.js
CHANGED
|
@@ -34,31 +34,31 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
34
34
|
var require_cjs = __commonJS({
|
|
35
35
|
"../../node_modules/@domql/globals/dist/cjs/index.js"(exports, module2) {
|
|
36
36
|
"use strict";
|
|
37
|
-
var
|
|
38
|
-
var
|
|
39
|
-
var
|
|
40
|
-
var
|
|
41
|
-
var
|
|
37
|
+
var __defProp3 = Object.defineProperty;
|
|
38
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
39
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
40
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
41
|
+
var __export3 = (target, all) => {
|
|
42
42
|
for (var name in all)
|
|
43
|
-
|
|
43
|
+
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
44
44
|
};
|
|
45
|
-
var
|
|
45
|
+
var __copyProps3 = (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 __getOwnPropNames3(from))
|
|
48
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
49
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
50
50
|
}
|
|
51
51
|
return to;
|
|
52
52
|
};
|
|
53
|
-
var
|
|
53
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
54
54
|
var globals_exports = {};
|
|
55
|
-
|
|
55
|
+
__export3(globals_exports, {
|
|
56
56
|
document: () => document4,
|
|
57
57
|
global: () => global,
|
|
58
58
|
self: () => self,
|
|
59
59
|
window: () => window2
|
|
60
60
|
});
|
|
61
|
-
module2.exports =
|
|
61
|
+
module2.exports = __toCommonJS3(globals_exports);
|
|
62
62
|
var global = globalThis;
|
|
63
63
|
var self = globalThis;
|
|
64
64
|
var window2 = globalThis;
|
|
@@ -66,33 +66,33 @@ var require_cjs = __commonJS({
|
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
68
|
|
|
69
|
-
//
|
|
69
|
+
// ../../../domql/packages/utils/dist/cjs/key.js
|
|
70
70
|
var require_key = __commonJS({
|
|
71
|
-
"
|
|
71
|
+
"../../../domql/packages/utils/dist/cjs/key.js"(exports, module2) {
|
|
72
72
|
"use strict";
|
|
73
|
-
var
|
|
74
|
-
var
|
|
75
|
-
var
|
|
76
|
-
var
|
|
77
|
-
var
|
|
73
|
+
var __defProp3 = Object.defineProperty;
|
|
74
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
75
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
76
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
77
|
+
var __export3 = (target, all) => {
|
|
78
78
|
for (var name in all)
|
|
79
|
-
|
|
79
|
+
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
80
80
|
};
|
|
81
|
-
var
|
|
81
|
+
var __copyProps3 = (to, from, except, desc) => {
|
|
82
82
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
83
|
-
for (let key of
|
|
84
|
-
if (!
|
|
85
|
-
|
|
83
|
+
for (let key of __getOwnPropNames3(from))
|
|
84
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
85
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
86
86
|
}
|
|
87
87
|
return to;
|
|
88
88
|
};
|
|
89
|
-
var
|
|
89
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
90
90
|
var key_exports = {};
|
|
91
|
-
|
|
91
|
+
__export3(key_exports, {
|
|
92
92
|
createSnapshotId: () => createSnapshotId,
|
|
93
93
|
generateKey: () => generateKey
|
|
94
94
|
});
|
|
95
|
-
module2.exports =
|
|
95
|
+
module2.exports = __toCommonJS3(key_exports);
|
|
96
96
|
var generateKey = /* @__PURE__ */ function() {
|
|
97
97
|
let index = 0;
|
|
98
98
|
function newId() {
|
|
@@ -105,36 +105,36 @@ var require_key = __commonJS({
|
|
|
105
105
|
}
|
|
106
106
|
});
|
|
107
107
|
|
|
108
|
-
//
|
|
108
|
+
// ../../../domql/packages/utils/dist/cjs/env.js
|
|
109
109
|
var require_env = __commonJS({
|
|
110
|
-
"
|
|
110
|
+
"../../../domql/packages/utils/dist/cjs/env.js"(exports, module2) {
|
|
111
111
|
"use strict";
|
|
112
|
-
var
|
|
113
|
-
var
|
|
114
|
-
var
|
|
115
|
-
var
|
|
116
|
-
var
|
|
112
|
+
var __defProp3 = Object.defineProperty;
|
|
113
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
114
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
115
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
116
|
+
var __export3 = (target, all) => {
|
|
117
117
|
for (var name in all)
|
|
118
|
-
|
|
118
|
+
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
119
119
|
};
|
|
120
|
-
var
|
|
120
|
+
var __copyProps3 = (to, from, except, desc) => {
|
|
121
121
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
122
|
-
for (let key of
|
|
123
|
-
if (!
|
|
124
|
-
|
|
122
|
+
for (let key of __getOwnPropNames3(from))
|
|
123
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
124
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
125
125
|
}
|
|
126
126
|
return to;
|
|
127
127
|
};
|
|
128
|
-
var
|
|
128
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
129
129
|
var env_exports = {};
|
|
130
|
-
|
|
130
|
+
__export3(env_exports, {
|
|
131
131
|
NODE_ENV: () => NODE_ENV,
|
|
132
132
|
getNev: () => getNev,
|
|
133
133
|
isDevelopment: () => isDevelopment,
|
|
134
134
|
isProduction: () => isProduction,
|
|
135
135
|
isTest: () => isTest
|
|
136
136
|
});
|
|
137
|
-
module2.exports =
|
|
137
|
+
module2.exports = __toCommonJS3(env_exports);
|
|
138
138
|
var NODE_ENV = "development";
|
|
139
139
|
var isProduction = (env = NODE_ENV) => env === "production" || env === "prod" || env !== "development" && env !== "dev" && env !== "test";
|
|
140
140
|
var isTest = (env = NODE_ENV) => env === "test";
|
|
@@ -143,35 +143,35 @@ var require_env = __commonJS({
|
|
|
143
143
|
}
|
|
144
144
|
});
|
|
145
145
|
|
|
146
|
-
//
|
|
146
|
+
// ../../../domql/packages/utils/dist/cjs/globals.js
|
|
147
147
|
var require_globals = __commonJS({
|
|
148
|
-
"
|
|
148
|
+
"../../../domql/packages/utils/dist/cjs/globals.js"(exports, module2) {
|
|
149
149
|
"use strict";
|
|
150
|
-
var
|
|
151
|
-
var
|
|
152
|
-
var
|
|
153
|
-
var
|
|
154
|
-
var
|
|
150
|
+
var __defProp3 = Object.defineProperty;
|
|
151
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
152
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
153
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
154
|
+
var __export3 = (target, all) => {
|
|
155
155
|
for (var name in all)
|
|
156
|
-
|
|
156
|
+
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
157
157
|
};
|
|
158
|
-
var
|
|
158
|
+
var __copyProps3 = (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 __getOwnPropNames3(from))
|
|
161
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
162
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
163
163
|
}
|
|
164
164
|
return to;
|
|
165
165
|
};
|
|
166
|
-
var
|
|
166
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
167
167
|
var globals_exports = {};
|
|
168
|
-
|
|
168
|
+
__export3(globals_exports, {
|
|
169
169
|
document: () => document4,
|
|
170
170
|
global: () => global,
|
|
171
171
|
self: () => self,
|
|
172
172
|
window: () => window2
|
|
173
173
|
});
|
|
174
|
-
module2.exports =
|
|
174
|
+
module2.exports = __toCommonJS3(globals_exports);
|
|
175
175
|
var global = globalThis;
|
|
176
176
|
var self = globalThis;
|
|
177
177
|
var window2 = globalThis;
|
|
@@ -179,33 +179,33 @@ var require_globals = __commonJS({
|
|
|
179
179
|
}
|
|
180
180
|
});
|
|
181
181
|
|
|
182
|
-
//
|
|
182
|
+
// ../../../domql/packages/utils/dist/cjs/node.js
|
|
183
183
|
var require_node = __commonJS({
|
|
184
|
-
"
|
|
184
|
+
"../../../domql/packages/utils/dist/cjs/node.js"(exports, module2) {
|
|
185
185
|
"use strict";
|
|
186
|
-
var
|
|
187
|
-
var
|
|
188
|
-
var
|
|
189
|
-
var
|
|
190
|
-
var
|
|
186
|
+
var __defProp3 = Object.defineProperty;
|
|
187
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
188
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
189
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
190
|
+
var __export3 = (target, all) => {
|
|
191
191
|
for (var name in all)
|
|
192
|
-
|
|
192
|
+
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
193
193
|
};
|
|
194
|
-
var
|
|
194
|
+
var __copyProps3 = (to, from, except, desc) => {
|
|
195
195
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
196
|
-
for (let key of
|
|
197
|
-
if (!
|
|
198
|
-
|
|
196
|
+
for (let key of __getOwnPropNames3(from))
|
|
197
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
198
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
199
199
|
}
|
|
200
200
|
return to;
|
|
201
201
|
};
|
|
202
|
-
var
|
|
202
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
203
203
|
var node_exports = {};
|
|
204
|
-
|
|
204
|
+
__export3(node_exports, {
|
|
205
205
|
isHtmlElement: () => isHtmlElement,
|
|
206
206
|
isNode: () => isNode
|
|
207
207
|
});
|
|
208
|
-
module2.exports =
|
|
208
|
+
module2.exports = __toCommonJS3(node_exports);
|
|
209
209
|
var import_globals3 = require_globals();
|
|
210
210
|
var isNode = (obj) => {
|
|
211
211
|
return (typeof Node === "object" ? obj instanceof import_globals3.window.Node : obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string") || false;
|
|
@@ -216,29 +216,29 @@ var require_node = __commonJS({
|
|
|
216
216
|
}
|
|
217
217
|
});
|
|
218
218
|
|
|
219
|
-
//
|
|
219
|
+
// ../../../domql/packages/utils/dist/cjs/types.js
|
|
220
220
|
var require_types = __commonJS({
|
|
221
|
-
"
|
|
221
|
+
"../../../domql/packages/utils/dist/cjs/types.js"(exports, module2) {
|
|
222
222
|
"use strict";
|
|
223
|
-
var
|
|
224
|
-
var
|
|
225
|
-
var
|
|
226
|
-
var
|
|
227
|
-
var
|
|
223
|
+
var __defProp3 = Object.defineProperty;
|
|
224
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
225
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
226
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
227
|
+
var __export3 = (target, all) => {
|
|
228
228
|
for (var name in all)
|
|
229
|
-
|
|
229
|
+
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
230
230
|
};
|
|
231
|
-
var
|
|
231
|
+
var __copyProps3 = (to, from, except, desc) => {
|
|
232
232
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
233
|
-
for (let key of
|
|
234
|
-
if (!
|
|
235
|
-
|
|
233
|
+
for (let key of __getOwnPropNames3(from))
|
|
234
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
235
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
236
236
|
}
|
|
237
237
|
return to;
|
|
238
238
|
};
|
|
239
|
-
var
|
|
239
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
240
240
|
var types_exports = {};
|
|
241
|
-
|
|
241
|
+
__export3(types_exports, {
|
|
242
242
|
TYPES: () => TYPES,
|
|
243
243
|
is: () => is,
|
|
244
244
|
isArray: () => isArray2,
|
|
@@ -254,7 +254,7 @@ var require_types = __commonJS({
|
|
|
254
254
|
isString: () => isString4,
|
|
255
255
|
isUndefined: () => isUndefined
|
|
256
256
|
});
|
|
257
|
-
module2.exports =
|
|
257
|
+
module2.exports = __toCommonJS3(types_exports);
|
|
258
258
|
var import_node = require_node();
|
|
259
259
|
var isObject2 = (arg) => {
|
|
260
260
|
if (arg === null)
|
|
@@ -306,31 +306,32 @@ var require_types = __commonJS({
|
|
|
306
306
|
}
|
|
307
307
|
});
|
|
308
308
|
|
|
309
|
-
//
|
|
309
|
+
// ../../../domql/packages/utils/dist/cjs/array.js
|
|
310
310
|
var require_array = __commonJS({
|
|
311
|
-
"
|
|
311
|
+
"../../../domql/packages/utils/dist/cjs/array.js"(exports, module2) {
|
|
312
312
|
"use strict";
|
|
313
|
-
var
|
|
314
|
-
var
|
|
315
|
-
var
|
|
316
|
-
var
|
|
317
|
-
var
|
|
313
|
+
var __defProp3 = Object.defineProperty;
|
|
314
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
315
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
316
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
317
|
+
var __export3 = (target, all) => {
|
|
318
318
|
for (var name in all)
|
|
319
|
-
|
|
319
|
+
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
320
320
|
};
|
|
321
|
-
var
|
|
321
|
+
var __copyProps3 = (to, from, except, desc) => {
|
|
322
322
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
323
|
-
for (let key of
|
|
324
|
-
if (!
|
|
325
|
-
|
|
323
|
+
for (let key of __getOwnPropNames3(from))
|
|
324
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
325
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
326
326
|
}
|
|
327
327
|
return to;
|
|
328
328
|
};
|
|
329
|
-
var
|
|
329
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
330
330
|
var array_exports = {};
|
|
331
|
-
|
|
331
|
+
__export3(array_exports, {
|
|
332
332
|
addItemAfterEveryElement: () => addItemAfterEveryElement,
|
|
333
333
|
arrayContainsOtherArray: () => arrayContainsOtherArray,
|
|
334
|
+
arraysEqual: () => arraysEqual,
|
|
334
335
|
createNestedObject: () => createNestedObject,
|
|
335
336
|
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
336
337
|
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
@@ -344,7 +345,7 @@ var require_array = __commonJS({
|
|
|
344
345
|
reorderArrayByValues: () => reorderArrayByValues,
|
|
345
346
|
swapItemsInArray: () => swapItemsInArray
|
|
346
347
|
});
|
|
347
|
-
module2.exports =
|
|
348
|
+
module2.exports = __toCommonJS3(array_exports);
|
|
348
349
|
var import_object = require_object();
|
|
349
350
|
var import_types = require_types();
|
|
350
351
|
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
@@ -447,38 +448,53 @@ var require_array = __commonJS({
|
|
|
447
448
|
}
|
|
448
449
|
return newArray;
|
|
449
450
|
};
|
|
451
|
+
var arraysEqual = (arr1, arr2) => {
|
|
452
|
+
if (arr1.length !== arr2.length) {
|
|
453
|
+
return false;
|
|
454
|
+
}
|
|
455
|
+
for (let i = 0; i < arr1.length; i++) {
|
|
456
|
+
if (arr1[i] !== arr2[i]) {
|
|
457
|
+
return false;
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
return true;
|
|
461
|
+
};
|
|
450
462
|
}
|
|
451
463
|
});
|
|
452
464
|
|
|
453
|
-
//
|
|
465
|
+
// ../../../domql/packages/utils/dist/cjs/string.js
|
|
454
466
|
var require_string = __commonJS({
|
|
455
|
-
"
|
|
467
|
+
"../../../domql/packages/utils/dist/cjs/string.js"(exports, module2) {
|
|
456
468
|
"use strict";
|
|
457
|
-
var
|
|
458
|
-
var
|
|
459
|
-
var
|
|
460
|
-
var
|
|
461
|
-
var
|
|
469
|
+
var __defProp3 = Object.defineProperty;
|
|
470
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
471
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
472
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
473
|
+
var __export3 = (target, all) => {
|
|
462
474
|
for (var name in all)
|
|
463
|
-
|
|
475
|
+
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
464
476
|
};
|
|
465
|
-
var
|
|
477
|
+
var __copyProps3 = (to, from, except, desc) => {
|
|
466
478
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
467
|
-
for (let key of
|
|
468
|
-
if (!
|
|
469
|
-
|
|
479
|
+
for (let key of __getOwnPropNames3(from))
|
|
480
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
481
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
470
482
|
}
|
|
471
483
|
return to;
|
|
472
484
|
};
|
|
473
|
-
var
|
|
485
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
474
486
|
var string_exports = {};
|
|
475
|
-
|
|
487
|
+
__export3(string_exports, {
|
|
488
|
+
customDecodeURIComponent: () => customDecodeURIComponent,
|
|
489
|
+
customEncodeURIComponent: () => customEncodeURIComponent,
|
|
490
|
+
findKeyPosition: () => findKeyPosition,
|
|
476
491
|
lowercaseFirstLetter: () => lowercaseFirstLetter,
|
|
477
492
|
replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
|
|
493
|
+
replaceOctalEscapeSequences: () => replaceOctalEscapeSequences,
|
|
478
494
|
stringIncludesAny: () => stringIncludesAny,
|
|
479
495
|
trimStringFromSymbols: () => trimStringFromSymbols
|
|
480
496
|
});
|
|
481
|
-
module2.exports =
|
|
497
|
+
module2.exports = __toCommonJS3(string_exports);
|
|
482
498
|
var stringIncludesAny = (str, characters) => {
|
|
483
499
|
for (const char of characters) {
|
|
484
500
|
if (str.includes(char)) {
|
|
@@ -520,33 +536,100 @@ var require_string = __commonJS({
|
|
|
520
536
|
var lowercaseFirstLetter = (inputString) => {
|
|
521
537
|
return `${inputString.charAt(0).toLowerCase()}${inputString.slice(1)}`;
|
|
522
538
|
};
|
|
539
|
+
var findKeyPosition = (str, key) => {
|
|
540
|
+
const lines = str.split("\n");
|
|
541
|
+
let startLineNumber = -1;
|
|
542
|
+
let endLineNumber = -1;
|
|
543
|
+
let startColumn = -1;
|
|
544
|
+
let endColumn = -1;
|
|
545
|
+
const keyPattern = new RegExp(`\\b${key}\\b\\s*:\\s*`);
|
|
546
|
+
let braceCount = 0;
|
|
547
|
+
let foundKey = false;
|
|
548
|
+
for (let i = 0; i < lines.length; i++) {
|
|
549
|
+
if (keyPattern.test(lines[i]) && !foundKey) {
|
|
550
|
+
foundKey = true;
|
|
551
|
+
startLineNumber = i + 1;
|
|
552
|
+
startColumn = lines[i].indexOf(key) + 1;
|
|
553
|
+
if (lines[i].includes("{}")) {
|
|
554
|
+
endLineNumber = startLineNumber;
|
|
555
|
+
endColumn = lines[i].indexOf("{}") + 3;
|
|
556
|
+
break;
|
|
557
|
+
}
|
|
558
|
+
const line = lines[i].slice(startColumn + key.length);
|
|
559
|
+
if (line.includes("{") || line.includes("[")) {
|
|
560
|
+
braceCount = 1;
|
|
561
|
+
} else {
|
|
562
|
+
endLineNumber = i + 1;
|
|
563
|
+
endColumn = lines[i].length + 1;
|
|
564
|
+
break;
|
|
565
|
+
}
|
|
566
|
+
} else if (foundKey) {
|
|
567
|
+
braceCount += (lines[i].match(/{/g) || []).length;
|
|
568
|
+
braceCount += (lines[i].match(/\[/g) || []).length;
|
|
569
|
+
braceCount -= (lines[i].match(/}/g) || []).length;
|
|
570
|
+
braceCount -= (lines[i].match(/]/g) || []).length;
|
|
571
|
+
if (braceCount === 0) {
|
|
572
|
+
endLineNumber = i + 1;
|
|
573
|
+
endColumn = lines[i].lastIndexOf("}") !== -1 ? lines[i].lastIndexOf("}") + 2 : lines[i].length + 1;
|
|
574
|
+
break;
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
return {
|
|
579
|
+
startColumn,
|
|
580
|
+
endColumn,
|
|
581
|
+
startLineNumber,
|
|
582
|
+
endLineNumber
|
|
583
|
+
};
|
|
584
|
+
};
|
|
585
|
+
var replaceOctalEscapeSequences = (str) => {
|
|
586
|
+
const octalRegex = /\\([0-7]{1,3})/g;
|
|
587
|
+
return str.replace(octalRegex, (match, p1) => {
|
|
588
|
+
const octalValue = parseInt(p1, 8);
|
|
589
|
+
const char = String.fromCharCode(octalValue);
|
|
590
|
+
return char;
|
|
591
|
+
});
|
|
592
|
+
};
|
|
593
|
+
var customEncodeURIComponent = (str) => {
|
|
594
|
+
return str.split("").map((char) => {
|
|
595
|
+
if (/[^a-zA-Z0-9\s]/.test(char)) {
|
|
596
|
+
return "%" + char.charCodeAt(0).toString(16).toUpperCase();
|
|
597
|
+
}
|
|
598
|
+
return char;
|
|
599
|
+
}).join("");
|
|
600
|
+
};
|
|
601
|
+
var customDecodeURIComponent = (encodedStr) => {
|
|
602
|
+
return encodedStr.replace(/%[0-9A-Fa-f]{2}/g, (match) => String.fromCharCode(parseInt(match.slice(1), 16)));
|
|
603
|
+
};
|
|
523
604
|
}
|
|
524
605
|
});
|
|
525
606
|
|
|
526
|
-
//
|
|
607
|
+
// ../../../domql/packages/utils/dist/cjs/object.js
|
|
527
608
|
var require_object = __commonJS({
|
|
528
|
-
"
|
|
609
|
+
"../../../domql/packages/utils/dist/cjs/object.js"(exports, module2) {
|
|
529
610
|
"use strict";
|
|
530
|
-
var
|
|
531
|
-
var
|
|
532
|
-
var
|
|
533
|
-
var
|
|
534
|
-
var
|
|
611
|
+
var __defProp3 = Object.defineProperty;
|
|
612
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
613
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
614
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
615
|
+
var __export3 = (target, all) => {
|
|
535
616
|
for (var name in all)
|
|
536
|
-
|
|
617
|
+
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
537
618
|
};
|
|
538
|
-
var
|
|
619
|
+
var __copyProps3 = (to, from, except, desc) => {
|
|
539
620
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
540
|
-
for (let key of
|
|
541
|
-
if (!
|
|
542
|
-
|
|
621
|
+
for (let key of __getOwnPropNames3(from))
|
|
622
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
623
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
543
624
|
}
|
|
544
625
|
return to;
|
|
545
626
|
};
|
|
546
|
-
var
|
|
627
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
547
628
|
var object_exports = {};
|
|
548
|
-
|
|
629
|
+
__export3(object_exports, {
|
|
630
|
+
checkIfKeyIsComponent: () => checkIfKeyIsComponent,
|
|
549
631
|
clone: () => clone,
|
|
632
|
+
createObjectWithoutPrototype: () => createObjectWithoutPrototype,
|
|
550
633
|
deepClone: () => deepClone2,
|
|
551
634
|
deepCloneExclude: () => deepCloneExclude,
|
|
552
635
|
deepCloneWithExtend: () => deepCloneWithExtend,
|
|
@@ -561,6 +644,8 @@ var require_object = __commonJS({
|
|
|
561
644
|
diffObjects: () => diffObjects,
|
|
562
645
|
exec: () => exec,
|
|
563
646
|
flattenRecursive: () => flattenRecursive,
|
|
647
|
+
getChildrenComponentsByKey: () => getChildrenComponentsByKey,
|
|
648
|
+
getExtendsInElement: () => getExtendsInElement,
|
|
564
649
|
hasOwnProperty: () => hasOwnProperty,
|
|
565
650
|
isEmpty: () => isEmpty,
|
|
566
651
|
isEmptyObject: () => isEmptyObject,
|
|
@@ -577,7 +662,7 @@ var require_object = __commonJS({
|
|
|
577
662
|
removeFromObject: () => removeFromObject,
|
|
578
663
|
stringToObject: () => stringToObject
|
|
579
664
|
});
|
|
580
|
-
module2.exports =
|
|
665
|
+
module2.exports = __toCommonJS3(object_exports);
|
|
581
666
|
var import_globals3 = require_globals();
|
|
582
667
|
var import_types = require_types();
|
|
583
668
|
var import_array = require_array();
|
|
@@ -1030,38 +1115,92 @@ var require_object = __commonJS({
|
|
|
1030
1115
|
}
|
|
1031
1116
|
return obj;
|
|
1032
1117
|
};
|
|
1118
|
+
var createObjectWithoutPrototype = (obj) => {
|
|
1119
|
+
if (obj === null || typeof obj !== "object") {
|
|
1120
|
+
return obj;
|
|
1121
|
+
}
|
|
1122
|
+
const newObj = /* @__PURE__ */ Object.create(null);
|
|
1123
|
+
for (const key in obj) {
|
|
1124
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
1125
|
+
newObj[key] = createObjectWithoutPrototype(obj[key]);
|
|
1126
|
+
}
|
|
1127
|
+
}
|
|
1128
|
+
return newObj;
|
|
1129
|
+
};
|
|
1130
|
+
var checkIfKeyIsComponent = (key) => {
|
|
1131
|
+
const isFirstKeyString = (0, import_types.isString)(key);
|
|
1132
|
+
if (!isFirstKeyString)
|
|
1133
|
+
return;
|
|
1134
|
+
const firstCharKey = key.slice(0, 1);
|
|
1135
|
+
return /^[A-Z]*$/.test(firstCharKey);
|
|
1136
|
+
};
|
|
1137
|
+
var getChildrenComponentsByKey = (key, el) => {
|
|
1138
|
+
if (key === el.key || el.__ref.__componentKey === key) {
|
|
1139
|
+
return el;
|
|
1140
|
+
}
|
|
1141
|
+
if (el.extend) {
|
|
1142
|
+
const foundString = (0, import_types.isString)(el.extend) && el.extend === key;
|
|
1143
|
+
const foundInArray = (0, import_types.isArray)(el.extend) && el.extend.filter((v) => v === key).length;
|
|
1144
|
+
if (foundString || foundInArray)
|
|
1145
|
+
return el;
|
|
1146
|
+
}
|
|
1147
|
+
};
|
|
1148
|
+
var getExtendsInElement = (obj) => {
|
|
1149
|
+
let result = [];
|
|
1150
|
+
function traverse(o) {
|
|
1151
|
+
for (const key in o) {
|
|
1152
|
+
if (Object.hasOwnProperty.call(o, key)) {
|
|
1153
|
+
if (checkIfKeyIsComponent(key)) {
|
|
1154
|
+
result.push(key);
|
|
1155
|
+
}
|
|
1156
|
+
if (key === "extend") {
|
|
1157
|
+
if (typeof o[key] === "string") {
|
|
1158
|
+
result.push(o[key]);
|
|
1159
|
+
} else if (Array.isArray(o[key])) {
|
|
1160
|
+
result = result.concat(o[key]);
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
1163
|
+
if (typeof o[key] === "object" && o[key] !== null) {
|
|
1164
|
+
traverse(o[key]);
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
traverse(obj);
|
|
1170
|
+
return result;
|
|
1171
|
+
};
|
|
1033
1172
|
}
|
|
1034
1173
|
});
|
|
1035
1174
|
|
|
1036
|
-
//
|
|
1175
|
+
// ../../../domql/packages/utils/dist/cjs/function.js
|
|
1037
1176
|
var require_function = __commonJS({
|
|
1038
|
-
"
|
|
1177
|
+
"../../../domql/packages/utils/dist/cjs/function.js"(exports, module2) {
|
|
1039
1178
|
"use strict";
|
|
1040
|
-
var
|
|
1041
|
-
var
|
|
1042
|
-
var
|
|
1043
|
-
var
|
|
1044
|
-
var
|
|
1179
|
+
var __defProp3 = Object.defineProperty;
|
|
1180
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
1181
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
1182
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
1183
|
+
var __export3 = (target, all) => {
|
|
1045
1184
|
for (var name in all)
|
|
1046
|
-
|
|
1185
|
+
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
1047
1186
|
};
|
|
1048
|
-
var
|
|
1187
|
+
var __copyProps3 = (to, from, except, desc) => {
|
|
1049
1188
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1050
|
-
for (let key of
|
|
1051
|
-
if (!
|
|
1052
|
-
|
|
1189
|
+
for (let key of __getOwnPropNames3(from))
|
|
1190
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
1191
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
1053
1192
|
}
|
|
1054
1193
|
return to;
|
|
1055
1194
|
};
|
|
1056
|
-
var
|
|
1195
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
1057
1196
|
var function_exports = {};
|
|
1058
|
-
|
|
1197
|
+
__export3(function_exports, {
|
|
1059
1198
|
debounce: () => debounce,
|
|
1060
1199
|
debounceOnContext: () => debounceOnContext,
|
|
1061
1200
|
isStringFunction: () => isStringFunction,
|
|
1062
1201
|
memoize: () => memoize
|
|
1063
1202
|
});
|
|
1064
|
-
module2.exports =
|
|
1203
|
+
module2.exports = __toCommonJS3(function_exports);
|
|
1065
1204
|
function debounce(func, wait, immediate) {
|
|
1066
1205
|
let timeout;
|
|
1067
1206
|
return function() {
|
|
@@ -1108,33 +1247,33 @@ var require_function = __commonJS({
|
|
|
1108
1247
|
}
|
|
1109
1248
|
});
|
|
1110
1249
|
|
|
1111
|
-
//
|
|
1250
|
+
// ../../../domql/packages/utils/dist/cjs/log.js
|
|
1112
1251
|
var require_log = __commonJS({
|
|
1113
|
-
"
|
|
1252
|
+
"../../../domql/packages/utils/dist/cjs/log.js"(exports, module2) {
|
|
1114
1253
|
"use strict";
|
|
1115
|
-
var
|
|
1116
|
-
var
|
|
1117
|
-
var
|
|
1118
|
-
var
|
|
1119
|
-
var
|
|
1254
|
+
var __defProp3 = Object.defineProperty;
|
|
1255
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
1256
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
1257
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
1258
|
+
var __export3 = (target, all) => {
|
|
1120
1259
|
for (var name in all)
|
|
1121
|
-
|
|
1260
|
+
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
1122
1261
|
};
|
|
1123
|
-
var
|
|
1262
|
+
var __copyProps3 = (to, from, except, desc) => {
|
|
1124
1263
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1125
|
-
for (let key of
|
|
1126
|
-
if (!
|
|
1127
|
-
|
|
1264
|
+
for (let key of __getOwnPropNames3(from))
|
|
1265
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
1266
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
1128
1267
|
}
|
|
1129
1268
|
return to;
|
|
1130
1269
|
};
|
|
1131
|
-
var
|
|
1270
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
1132
1271
|
var log_exports = {};
|
|
1133
|
-
|
|
1272
|
+
__export3(log_exports, {
|
|
1134
1273
|
logGroupIf: () => logGroupIf,
|
|
1135
1274
|
logIf: () => logIf
|
|
1136
1275
|
});
|
|
1137
|
-
module2.exports =
|
|
1276
|
+
module2.exports = __toCommonJS3(log_exports);
|
|
1138
1277
|
var logIf = (bool, ...arg) => {
|
|
1139
1278
|
if (bool)
|
|
1140
1279
|
arg.map((v) => console.log(v));
|
|
@@ -1149,50 +1288,50 @@ var require_log = __commonJS({
|
|
|
1149
1288
|
}
|
|
1150
1289
|
});
|
|
1151
1290
|
|
|
1152
|
-
//
|
|
1291
|
+
// ../../../domql/packages/utils/dist/cjs/cookie.js
|
|
1153
1292
|
var require_cookie = __commonJS({
|
|
1154
|
-
"
|
|
1293
|
+
"../../../domql/packages/utils/dist/cjs/cookie.js"(exports, module2) {
|
|
1155
1294
|
"use strict";
|
|
1156
|
-
var
|
|
1157
|
-
var
|
|
1158
|
-
var
|
|
1159
|
-
var
|
|
1160
|
-
var
|
|
1295
|
+
var __defProp3 = Object.defineProperty;
|
|
1296
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
1297
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
1298
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
1299
|
+
var __export3 = (target, all) => {
|
|
1161
1300
|
for (var name in all)
|
|
1162
|
-
|
|
1301
|
+
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
1163
1302
|
};
|
|
1164
|
-
var
|
|
1303
|
+
var __copyProps3 = (to, from, except, desc) => {
|
|
1165
1304
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1166
|
-
for (let key of
|
|
1167
|
-
if (!
|
|
1168
|
-
|
|
1305
|
+
for (let key of __getOwnPropNames3(from))
|
|
1306
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
1307
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
1169
1308
|
}
|
|
1170
1309
|
return to;
|
|
1171
1310
|
};
|
|
1172
|
-
var
|
|
1311
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
1173
1312
|
var cookie_exports = {};
|
|
1174
|
-
|
|
1313
|
+
__export3(cookie_exports, {
|
|
1175
1314
|
getCookie: () => getCookie,
|
|
1176
1315
|
isMobile: () => isMobile,
|
|
1177
1316
|
setCookie: () => setCookie
|
|
1178
1317
|
});
|
|
1179
|
-
module2.exports =
|
|
1318
|
+
module2.exports = __toCommonJS3(cookie_exports);
|
|
1180
1319
|
var import_types = require_types();
|
|
1181
|
-
var
|
|
1320
|
+
var import_utils10 = require_cjs2();
|
|
1182
1321
|
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
1183
1322
|
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
1184
|
-
if ((0, import_types.isUndefined)(
|
|
1323
|
+
if ((0, import_types.isUndefined)(import_utils10.document) || (0, import_types.isUndefined)(import_utils10.document.cookie))
|
|
1185
1324
|
return;
|
|
1186
1325
|
const d = /* @__PURE__ */ new Date();
|
|
1187
1326
|
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
1188
1327
|
const expires = `expires=${d.toUTCString()}`;
|
|
1189
|
-
|
|
1328
|
+
import_utils10.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
1190
1329
|
};
|
|
1191
1330
|
var getCookie = (cname) => {
|
|
1192
|
-
if ((0, import_types.isUndefined)(
|
|
1331
|
+
if ((0, import_types.isUndefined)(import_utils10.document) || (0, import_types.isUndefined)(import_utils10.document.cookie))
|
|
1193
1332
|
return;
|
|
1194
1333
|
const name = `${cname}=`;
|
|
1195
|
-
const decodedCookie = decodeURIComponent(
|
|
1334
|
+
const decodedCookie = decodeURIComponent(import_utils10.document.cookie);
|
|
1196
1335
|
const ca = decodedCookie.split(";");
|
|
1197
1336
|
for (let i = 0; i < ca.length; i++) {
|
|
1198
1337
|
let c = ca[i];
|
|
@@ -1206,33 +1345,33 @@ var require_cookie = __commonJS({
|
|
|
1206
1345
|
}
|
|
1207
1346
|
});
|
|
1208
1347
|
|
|
1209
|
-
//
|
|
1348
|
+
// ../../../domql/packages/utils/dist/cjs/tags.js
|
|
1210
1349
|
var require_tags = __commonJS({
|
|
1211
|
-
"
|
|
1350
|
+
"../../../domql/packages/utils/dist/cjs/tags.js"(exports, module2) {
|
|
1212
1351
|
"use strict";
|
|
1213
|
-
var
|
|
1214
|
-
var
|
|
1215
|
-
var
|
|
1216
|
-
var
|
|
1217
|
-
var
|
|
1352
|
+
var __defProp3 = Object.defineProperty;
|
|
1353
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
1354
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
1355
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
1356
|
+
var __export3 = (target, all) => {
|
|
1218
1357
|
for (var name in all)
|
|
1219
|
-
|
|
1358
|
+
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
1220
1359
|
};
|
|
1221
|
-
var
|
|
1360
|
+
var __copyProps3 = (to, from, except, desc) => {
|
|
1222
1361
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1223
|
-
for (let key of
|
|
1224
|
-
if (!
|
|
1225
|
-
|
|
1362
|
+
for (let key of __getOwnPropNames3(from))
|
|
1363
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
1364
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
1226
1365
|
}
|
|
1227
1366
|
return to;
|
|
1228
1367
|
};
|
|
1229
|
-
var
|
|
1368
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
1230
1369
|
var tags_exports = {};
|
|
1231
|
-
|
|
1370
|
+
__export3(tags_exports, {
|
|
1232
1371
|
HTML_TAGS: () => HTML_TAGS,
|
|
1233
1372
|
isValidHtmlTag: () => isValidHtmlTag
|
|
1234
1373
|
});
|
|
1235
|
-
module2.exports =
|
|
1374
|
+
module2.exports = __toCommonJS3(tags_exports);
|
|
1236
1375
|
var HTML_TAGS = {
|
|
1237
1376
|
root: [
|
|
1238
1377
|
"body",
|
|
@@ -1374,26 +1513,26 @@ var require_tags = __commonJS({
|
|
|
1374
1513
|
}
|
|
1375
1514
|
});
|
|
1376
1515
|
|
|
1377
|
-
//
|
|
1516
|
+
// ../../../domql/packages/utils/dist/cjs/index.js
|
|
1378
1517
|
var require_cjs2 = __commonJS({
|
|
1379
|
-
"
|
|
1518
|
+
"../../../domql/packages/utils/dist/cjs/index.js"(exports, module2) {
|
|
1380
1519
|
"use strict";
|
|
1381
|
-
var
|
|
1382
|
-
var
|
|
1383
|
-
var
|
|
1384
|
-
var
|
|
1385
|
-
var
|
|
1520
|
+
var __defProp3 = Object.defineProperty;
|
|
1521
|
+
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
1522
|
+
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
1523
|
+
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
1524
|
+
var __copyProps3 = (to, from, except, desc) => {
|
|
1386
1525
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1387
|
-
for (let key of
|
|
1388
|
-
if (!
|
|
1389
|
-
|
|
1526
|
+
for (let key of __getOwnPropNames3(from))
|
|
1527
|
+
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
1528
|
+
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
1390
1529
|
}
|
|
1391
1530
|
return to;
|
|
1392
1531
|
};
|
|
1393
|
-
var __reExport = (target, mod, secondTarget) => (
|
|
1394
|
-
var
|
|
1532
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps3(target, mod, "default"), secondTarget && __copyProps3(secondTarget, mod, "default"));
|
|
1533
|
+
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
1395
1534
|
var utils_exports = {};
|
|
1396
|
-
module2.exports =
|
|
1535
|
+
module2.exports = __toCommonJS3(utils_exports);
|
|
1397
1536
|
__reExport(utils_exports, require_key(), module2.exports);
|
|
1398
1537
|
__reExport(utils_exports, require_env(), module2.exports);
|
|
1399
1538
|
__reExport(utils_exports, require_types(), module2.exports);
|
|
@@ -1409,1513 +1548,1667 @@ var require_cjs2 = __commonJS({
|
|
|
1409
1548
|
}
|
|
1410
1549
|
});
|
|
1411
1550
|
|
|
1412
|
-
//
|
|
1413
|
-
var
|
|
1414
|
-
|
|
1551
|
+
// src/system/svg.js
|
|
1552
|
+
var svg_exports = {};
|
|
1553
|
+
__export(svg_exports, {
|
|
1554
|
+
appendSVGSprite: () => appendSVGSprite,
|
|
1555
|
+
appendSvgIconsSprite: () => appendSvgIconsSprite,
|
|
1556
|
+
setSVG: () => setSVG,
|
|
1557
|
+
setSvgIcon: () => setSvgIcon
|
|
1558
|
+
});
|
|
1559
|
+
module.exports = __toCommonJS(svg_exports);
|
|
1560
|
+
var import_globals2 = __toESM(require_cjs(), 1);
|
|
1561
|
+
|
|
1562
|
+
// src/utils/color.js
|
|
1563
|
+
var import_globals = __toESM(require_cjs(), 1);
|
|
1564
|
+
var import_utils = __toESM(require_cjs2(), 1);
|
|
1565
|
+
|
|
1566
|
+
// src/utils/sequence.js
|
|
1567
|
+
var import_utils5 = __toESM(require_cjs2(), 1);
|
|
1568
|
+
|
|
1569
|
+
// ../utils/dist/cjs/index.js
|
|
1570
|
+
var __create2 = Object.create;
|
|
1571
|
+
var __defProp2 = Object.defineProperty;
|
|
1572
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1573
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1574
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
|
1575
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1576
|
+
var __commonJS2 = (cb, mod) => function __require() {
|
|
1577
|
+
return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
1578
|
+
};
|
|
1579
|
+
var __export2 = (target, all) => {
|
|
1580
|
+
for (var name in all)
|
|
1581
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
1582
|
+
};
|
|
1583
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
1584
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1585
|
+
for (let key of __getOwnPropNames2(from))
|
|
1586
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1587
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1588
|
+
}
|
|
1589
|
+
return to;
|
|
1590
|
+
};
|
|
1591
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
1592
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
1593
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
1594
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
1595
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
1596
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
|
1597
|
+
mod
|
|
1598
|
+
));
|
|
1599
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1600
|
+
var require_key2 = __commonJS2({
|
|
1601
|
+
"../../../domql/packages/utils/dist/cjs/key.js"(exports, module2) {
|
|
1415
1602
|
"use strict";
|
|
1416
|
-
var
|
|
1417
|
-
var
|
|
1418
|
-
var
|
|
1419
|
-
var
|
|
1420
|
-
var
|
|
1421
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1422
|
-
var __commonJS2 = (cb, mod) => function __require() {
|
|
1423
|
-
return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
1424
|
-
};
|
|
1425
|
-
var __export2 = (target, all) => {
|
|
1603
|
+
var __defProp22 = Object.defineProperty;
|
|
1604
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1605
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1606
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1607
|
+
var __export22 = (target, all) => {
|
|
1426
1608
|
for (var name in all)
|
|
1427
|
-
|
|
1609
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1428
1610
|
};
|
|
1429
|
-
var
|
|
1611
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1430
1612
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1431
|
-
for (let key of
|
|
1432
|
-
if (!
|
|
1433
|
-
|
|
1613
|
+
for (let key of __getOwnPropNames22(from))
|
|
1614
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1615
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1434
1616
|
}
|
|
1435
1617
|
return to;
|
|
1436
1618
|
};
|
|
1437
|
-
var
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
|
1443
|
-
mod
|
|
1444
|
-
));
|
|
1445
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1446
|
-
var require_key2 = __commonJS2({
|
|
1447
|
-
"../../node_modules/@domql/utils/dist/cjs/key.js"(exports2, module22) {
|
|
1448
|
-
"use strict";
|
|
1449
|
-
var __defProp22 = Object.defineProperty;
|
|
1450
|
-
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1451
|
-
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1452
|
-
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1453
|
-
var __export22 = (target, all) => {
|
|
1454
|
-
for (var name in all)
|
|
1455
|
-
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1456
|
-
};
|
|
1457
|
-
var __copyProps22 = (to, from, except, desc) => {
|
|
1458
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
1459
|
-
for (let key of __getOwnPropNames22(from))
|
|
1460
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1461
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1462
|
-
}
|
|
1463
|
-
return to;
|
|
1464
|
-
};
|
|
1465
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1466
|
-
var key_exports = {};
|
|
1467
|
-
__export22(key_exports, {
|
|
1468
|
-
createSnapshotId: () => createSnapshotId,
|
|
1469
|
-
generateKey: () => generateKey
|
|
1470
|
-
});
|
|
1471
|
-
module22.exports = __toCommonJS22(key_exports);
|
|
1472
|
-
var generateKey = /* @__PURE__ */ function() {
|
|
1473
|
-
let index = 0;
|
|
1474
|
-
function newId() {
|
|
1475
|
-
index++;
|
|
1476
|
-
return index;
|
|
1477
|
-
}
|
|
1478
|
-
return newId;
|
|
1479
|
-
}();
|
|
1480
|
-
var createSnapshotId = generateKey;
|
|
1481
|
-
}
|
|
1482
|
-
});
|
|
1483
|
-
var require_env2 = __commonJS2({
|
|
1484
|
-
"../../node_modules/@domql/utils/dist/cjs/env.js"(exports2, module22) {
|
|
1485
|
-
"use strict";
|
|
1486
|
-
var __defProp22 = Object.defineProperty;
|
|
1487
|
-
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1488
|
-
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1489
|
-
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1490
|
-
var __export22 = (target, all) => {
|
|
1491
|
-
for (var name in all)
|
|
1492
|
-
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1493
|
-
};
|
|
1494
|
-
var __copyProps22 = (to, from, except, desc) => {
|
|
1495
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
1496
|
-
for (let key of __getOwnPropNames22(from))
|
|
1497
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1498
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1499
|
-
}
|
|
1500
|
-
return to;
|
|
1501
|
-
};
|
|
1502
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1503
|
-
var env_exports = {};
|
|
1504
|
-
__export22(env_exports, {
|
|
1505
|
-
NODE_ENV: () => NODE_ENV,
|
|
1506
|
-
getNev: () => getNev,
|
|
1507
|
-
isDevelopment: () => isDevelopment,
|
|
1508
|
-
isProduction: () => isProduction,
|
|
1509
|
-
isTest: () => isTest
|
|
1510
|
-
});
|
|
1511
|
-
module22.exports = __toCommonJS22(env_exports);
|
|
1512
|
-
var NODE_ENV = "development";
|
|
1513
|
-
var isProduction = (env = NODE_ENV) => env === "production" || env === "prod" || env !== "development" && env !== "dev" && env !== "test";
|
|
1514
|
-
var isTest = (env = NODE_ENV) => env === "test";
|
|
1515
|
-
var isDevelopment = (env = NODE_ENV) => env === "development" || env === "dev";
|
|
1516
|
-
var getNev = (key, env = NODE_ENV) => env[key];
|
|
1517
|
-
}
|
|
1619
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1620
|
+
var key_exports = {};
|
|
1621
|
+
__export22(key_exports, {
|
|
1622
|
+
createSnapshotId: () => createSnapshotId,
|
|
1623
|
+
generateKey: () => generateKey
|
|
1518
1624
|
});
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1526
|
-
var __export22 = (target, all) => {
|
|
1527
|
-
for (var name in all)
|
|
1528
|
-
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1529
|
-
};
|
|
1530
|
-
var __copyProps22 = (to, from, except, desc) => {
|
|
1531
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
1532
|
-
for (let key of __getOwnPropNames22(from))
|
|
1533
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1534
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1535
|
-
}
|
|
1536
|
-
return to;
|
|
1537
|
-
};
|
|
1538
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1539
|
-
var globals_exports = {};
|
|
1540
|
-
__export22(globals_exports, {
|
|
1541
|
-
document: () => document22,
|
|
1542
|
-
global: () => global,
|
|
1543
|
-
self: () => self,
|
|
1544
|
-
window: () => window2
|
|
1545
|
-
});
|
|
1546
|
-
module22.exports = __toCommonJS22(globals_exports);
|
|
1547
|
-
var global = globalThis;
|
|
1548
|
-
var self = globalThis;
|
|
1549
|
-
var window2 = globalThis;
|
|
1550
|
-
var document22 = window2.document;
|
|
1625
|
+
module2.exports = __toCommonJS22(key_exports);
|
|
1626
|
+
var generateKey = /* @__PURE__ */ function() {
|
|
1627
|
+
let index = 0;
|
|
1628
|
+
function newId() {
|
|
1629
|
+
index++;
|
|
1630
|
+
return index;
|
|
1551
1631
|
}
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
var node_exports = {};
|
|
1574
|
-
__export22(node_exports, {
|
|
1575
|
-
isHtmlElement: () => isHtmlElement,
|
|
1576
|
-
isNode: () => isNode
|
|
1577
|
-
});
|
|
1578
|
-
module22.exports = __toCommonJS22(node_exports);
|
|
1579
|
-
var import_globals3 = require_globals2();
|
|
1580
|
-
var isNode = (obj) => {
|
|
1581
|
-
return (typeof Node === "object" ? obj instanceof import_globals3.window.Node : obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string") || false;
|
|
1582
|
-
};
|
|
1583
|
-
var isHtmlElement = (obj) => {
|
|
1584
|
-
return (typeof HTMLElement === "object" ? obj instanceof import_globals3.window.HTMLElement : obj && typeof obj === "object" && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === "string") || false;
|
|
1585
|
-
};
|
|
1632
|
+
return newId;
|
|
1633
|
+
}();
|
|
1634
|
+
var createSnapshotId = generateKey;
|
|
1635
|
+
}
|
|
1636
|
+
});
|
|
1637
|
+
var require_env2 = __commonJS2({
|
|
1638
|
+
"../../../domql/packages/utils/dist/cjs/env.js"(exports, module2) {
|
|
1639
|
+
"use strict";
|
|
1640
|
+
var __defProp22 = Object.defineProperty;
|
|
1641
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1642
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1643
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1644
|
+
var __export22 = (target, all) => {
|
|
1645
|
+
for (var name in all)
|
|
1646
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1647
|
+
};
|
|
1648
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1649
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1650
|
+
for (let key of __getOwnPropNames22(from))
|
|
1651
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1652
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1586
1653
|
}
|
|
1654
|
+
return to;
|
|
1655
|
+
};
|
|
1656
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1657
|
+
var env_exports = {};
|
|
1658
|
+
__export22(env_exports, {
|
|
1659
|
+
NODE_ENV: () => NODE_ENV,
|
|
1660
|
+
getNev: () => getNev,
|
|
1661
|
+
isDevelopment: () => isDevelopment,
|
|
1662
|
+
isProduction: () => isProduction,
|
|
1663
|
+
isTest: () => isTest
|
|
1587
1664
|
});
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
isArray: () => isArray3,
|
|
1613
|
-
isBoolean: () => isBoolean,
|
|
1614
|
-
isDate: () => isDate,
|
|
1615
|
-
isDefined: () => isDefined2,
|
|
1616
|
-
isFunction: () => isFunction,
|
|
1617
|
-
isNot: () => isNot,
|
|
1618
|
-
isNull: () => isNull,
|
|
1619
|
-
isNumber: () => isNumber2,
|
|
1620
|
-
isObject: () => isObject3,
|
|
1621
|
-
isObjectLike: () => isObjectLike2,
|
|
1622
|
-
isString: () => isString22,
|
|
1623
|
-
isUndefined: () => isUndefined
|
|
1624
|
-
});
|
|
1625
|
-
module22.exports = __toCommonJS22(types_exports);
|
|
1626
|
-
var import_node = require_node2();
|
|
1627
|
-
var isObject3 = (arg) => {
|
|
1628
|
-
if (arg === null)
|
|
1629
|
-
return false;
|
|
1630
|
-
return typeof arg === "object" && arg.constructor === Object;
|
|
1631
|
-
};
|
|
1632
|
-
var isString22 = (arg) => typeof arg === "string";
|
|
1633
|
-
var isNumber2 = (arg) => typeof arg === "number";
|
|
1634
|
-
var isFunction = (arg) => typeof arg === "function";
|
|
1635
|
-
var isBoolean = (arg) => arg === true || arg === false;
|
|
1636
|
-
var isNull = (arg) => arg === null;
|
|
1637
|
-
var isArray3 = (arg) => Array.isArray(arg);
|
|
1638
|
-
var isDate = (d) => d instanceof Date;
|
|
1639
|
-
var isObjectLike2 = (arg) => {
|
|
1640
|
-
if (arg === null)
|
|
1641
|
-
return false;
|
|
1642
|
-
return typeof arg === "object";
|
|
1643
|
-
};
|
|
1644
|
-
var isDefined2 = (arg) => {
|
|
1645
|
-
return isObject3(arg) || isObjectLike2(arg) || isString22(arg) || isNumber2(arg) || isFunction(arg) || isArray3(arg) || isObjectLike2(arg) || isBoolean(arg) || isDate(arg) || isNull(arg);
|
|
1646
|
-
};
|
|
1647
|
-
var isUndefined = (arg) => {
|
|
1648
|
-
return arg === void 0;
|
|
1649
|
-
};
|
|
1650
|
-
var TYPES = {
|
|
1651
|
-
boolean: isBoolean,
|
|
1652
|
-
array: isArray3,
|
|
1653
|
-
object: isObject3,
|
|
1654
|
-
string: isString22,
|
|
1655
|
-
date: isDate,
|
|
1656
|
-
number: isNumber2,
|
|
1657
|
-
null: isNull,
|
|
1658
|
-
function: isFunction,
|
|
1659
|
-
objectLike: isObjectLike2,
|
|
1660
|
-
node: import_node.isNode,
|
|
1661
|
-
htmlElement: import_node.isHtmlElement,
|
|
1662
|
-
defined: isDefined2
|
|
1663
|
-
};
|
|
1664
|
-
var is = (arg) => {
|
|
1665
|
-
return (...args) => {
|
|
1666
|
-
return args.map((val) => TYPES[val](arg)).filter((v) => v).length > 0;
|
|
1667
|
-
};
|
|
1668
|
-
};
|
|
1669
|
-
var isNot = (arg) => {
|
|
1670
|
-
return (...args) => {
|
|
1671
|
-
return args.map((val) => TYPES[val](arg)).filter((v) => v).length === 0;
|
|
1672
|
-
};
|
|
1673
|
-
};
|
|
1665
|
+
module2.exports = __toCommonJS22(env_exports);
|
|
1666
|
+
var NODE_ENV = "development";
|
|
1667
|
+
var isProduction = (env = NODE_ENV) => env === "production" || env === "prod" || env !== "development" && env !== "dev" && env !== "test";
|
|
1668
|
+
var isTest = (env = NODE_ENV) => env === "test";
|
|
1669
|
+
var isDevelopment = (env = NODE_ENV) => env === "development" || env === "dev";
|
|
1670
|
+
var getNev = (key, env = NODE_ENV) => env[key];
|
|
1671
|
+
}
|
|
1672
|
+
});
|
|
1673
|
+
var require_globals2 = __commonJS2({
|
|
1674
|
+
"../../../domql/packages/utils/dist/cjs/globals.js"(exports, module2) {
|
|
1675
|
+
"use strict";
|
|
1676
|
+
var __defProp22 = Object.defineProperty;
|
|
1677
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1678
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1679
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1680
|
+
var __export22 = (target, all) => {
|
|
1681
|
+
for (var name in all)
|
|
1682
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1683
|
+
};
|
|
1684
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1685
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1686
|
+
for (let key of __getOwnPropNames22(from))
|
|
1687
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1688
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1674
1689
|
}
|
|
1690
|
+
return to;
|
|
1691
|
+
};
|
|
1692
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1693
|
+
var globals_exports = {};
|
|
1694
|
+
__export22(globals_exports, {
|
|
1695
|
+
document: () => document22,
|
|
1696
|
+
global: () => global,
|
|
1697
|
+
self: () => self,
|
|
1698
|
+
window: () => window2
|
|
1675
1699
|
});
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
arrayContainsOtherArray: () => arrayContainsOtherArray,
|
|
1700
|
-
createNestedObject: () => createNestedObject,
|
|
1701
|
-
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
1702
|
-
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
1703
|
-
getFrequencyInArray: () => getFrequencyInArray,
|
|
1704
|
-
joinArrays: () => joinArrays,
|
|
1705
|
-
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
1706
|
-
mergeArray: () => mergeArray,
|
|
1707
|
-
removeFromArray: () => removeFromArray,
|
|
1708
|
-
removeValueFromArray: () => removeValueFromArray,
|
|
1709
|
-
removeValueFromArrayAll: () => removeValueFromArrayAll,
|
|
1710
|
-
reorderArrayByValues: () => reorderArrayByValues,
|
|
1711
|
-
swapItemsInArray: () => swapItemsInArray
|
|
1712
|
-
});
|
|
1713
|
-
module22.exports = __toCommonJS22(array_exports);
|
|
1714
|
-
var import_object = require_object2();
|
|
1715
|
-
var import_types = require_types2();
|
|
1716
|
-
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
1717
|
-
return arr2.every((val) => arr1.includes(val));
|
|
1718
|
-
};
|
|
1719
|
-
var getFrequencyInArray = (arr, value) => {
|
|
1720
|
-
return arr.reduce((count, currentValue) => {
|
|
1721
|
-
return currentValue === value ? count + 1 : count;
|
|
1722
|
-
}, 0);
|
|
1723
|
-
};
|
|
1724
|
-
var removeFromArray = (arr, index) => {
|
|
1725
|
-
if ((0, import_types.isString)(index))
|
|
1726
|
-
index = parseInt(index);
|
|
1727
|
-
if ((0, import_types.isNumber)(index)) {
|
|
1728
|
-
if (index < 0 || index >= arr.length || isNaN(index)) {
|
|
1729
|
-
throw new Error("Invalid index");
|
|
1730
|
-
}
|
|
1731
|
-
arr.splice(index, 1);
|
|
1732
|
-
} else if ((0, import_types.isArray)(index)) {
|
|
1733
|
-
index.forEach((idx) => removeFromArray(arr, idx));
|
|
1734
|
-
} else {
|
|
1735
|
-
throw new Error("Invalid index");
|
|
1736
|
-
}
|
|
1737
|
-
return arr;
|
|
1738
|
-
};
|
|
1739
|
-
var swapItemsInArray = (arr, i, j) => {
|
|
1740
|
-
[arr[i], arr[j]] = [arr[j], arr[i]];
|
|
1741
|
-
};
|
|
1742
|
-
var joinArrays = (...arrays) => {
|
|
1743
|
-
return [].concat(...arrays);
|
|
1744
|
-
};
|
|
1745
|
-
var mergeArray = (arr, excludeFrom = []) => {
|
|
1746
|
-
return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepClone)(c, excludeFrom), excludeFrom), {});
|
|
1747
|
-
};
|
|
1748
|
-
var mergeAndCloneIfArray = (obj) => {
|
|
1749
|
-
return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepClone)(obj);
|
|
1750
|
-
};
|
|
1751
|
-
var cutArrayBeforeValue = (arr, value) => {
|
|
1752
|
-
const index = arr.indexOf(value);
|
|
1753
|
-
if (index !== -1) {
|
|
1754
|
-
return arr.slice(0, index);
|
|
1755
|
-
}
|
|
1756
|
-
return arr;
|
|
1757
|
-
};
|
|
1758
|
-
var cutArrayAfterValue = (arr, value) => {
|
|
1759
|
-
if (!(0, import_types.isArray)(arr))
|
|
1760
|
-
return;
|
|
1761
|
-
const index = arr.indexOf(value);
|
|
1762
|
-
if (index !== -1) {
|
|
1763
|
-
return arr.slice(index + 1);
|
|
1764
|
-
}
|
|
1765
|
-
return arr;
|
|
1766
|
-
};
|
|
1767
|
-
var createNestedObject = (arr, lastValue) => {
|
|
1768
|
-
const nestedObject = {};
|
|
1769
|
-
if (arr.length === 0) {
|
|
1770
|
-
return lastValue;
|
|
1771
|
-
}
|
|
1772
|
-
arr.reduce((obj, value, index) => {
|
|
1773
|
-
if (!obj[value]) {
|
|
1774
|
-
obj[value] = {};
|
|
1775
|
-
}
|
|
1776
|
-
if (index === arr.length - 1 && lastValue) {
|
|
1777
|
-
obj[value] = lastValue;
|
|
1778
|
-
}
|
|
1779
|
-
return obj[value];
|
|
1780
|
-
}, nestedObject);
|
|
1781
|
-
return nestedObject;
|
|
1782
|
-
};
|
|
1783
|
-
var removeValueFromArray = (arr, value) => {
|
|
1784
|
-
const index = arr.indexOf(value);
|
|
1785
|
-
if (index > -1) {
|
|
1786
|
-
const newArray = [...arr];
|
|
1787
|
-
newArray.splice(index, 1);
|
|
1788
|
-
return newArray;
|
|
1789
|
-
}
|
|
1790
|
-
return arr;
|
|
1791
|
-
};
|
|
1792
|
-
var removeValueFromArrayAll = (arr, value) => {
|
|
1793
|
-
return arr.filter((item) => item !== value);
|
|
1794
|
-
};
|
|
1795
|
-
var addItemAfterEveryElement = (array, item) => {
|
|
1796
|
-
const result = [];
|
|
1797
|
-
for (let i = 0; i < array.length; i++) {
|
|
1798
|
-
result.push(array[i]);
|
|
1799
|
-
if (i < array.length - 1) {
|
|
1800
|
-
result.push(item);
|
|
1801
|
-
}
|
|
1802
|
-
}
|
|
1803
|
-
return result;
|
|
1804
|
-
};
|
|
1805
|
-
var reorderArrayByValues = (array, valueToMove, insertBeforeValue) => {
|
|
1806
|
-
const newArray = [...array];
|
|
1807
|
-
const indexToMove = newArray.indexOf(valueToMove);
|
|
1808
|
-
const indexToInsertBefore = newArray.indexOf(insertBeforeValue);
|
|
1809
|
-
if (indexToMove !== -1 && indexToInsertBefore !== -1) {
|
|
1810
|
-
const removedItem = newArray.splice(indexToMove, 1)[0];
|
|
1811
|
-
const insertIndex = indexToInsertBefore < indexToMove ? indexToInsertBefore : indexToInsertBefore + 1;
|
|
1812
|
-
newArray.splice(insertIndex, 0, removedItem);
|
|
1813
|
-
}
|
|
1814
|
-
return newArray;
|
|
1815
|
-
};
|
|
1700
|
+
module2.exports = __toCommonJS22(globals_exports);
|
|
1701
|
+
var global = globalThis;
|
|
1702
|
+
var self = globalThis;
|
|
1703
|
+
var window2 = globalThis;
|
|
1704
|
+
var document22 = window2.document;
|
|
1705
|
+
}
|
|
1706
|
+
});
|
|
1707
|
+
var require_node2 = __commonJS2({
|
|
1708
|
+
"../../../domql/packages/utils/dist/cjs/node.js"(exports, module2) {
|
|
1709
|
+
"use strict";
|
|
1710
|
+
var __defProp22 = Object.defineProperty;
|
|
1711
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1712
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1713
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1714
|
+
var __export22 = (target, all) => {
|
|
1715
|
+
for (var name in all)
|
|
1716
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1717
|
+
};
|
|
1718
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1719
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1720
|
+
for (let key of __getOwnPropNames22(from))
|
|
1721
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1722
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1816
1723
|
}
|
|
1724
|
+
return to;
|
|
1725
|
+
};
|
|
1726
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1727
|
+
var node_exports = {};
|
|
1728
|
+
__export22(node_exports, {
|
|
1729
|
+
isHtmlElement: () => isHtmlElement,
|
|
1730
|
+
isNode: () => isNode
|
|
1817
1731
|
});
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
});
|
|
1845
|
-
module22.exports = __toCommonJS22(string_exports);
|
|
1846
|
-
var stringIncludesAny = (str, characters) => {
|
|
1847
|
-
for (const char of characters) {
|
|
1848
|
-
if (str.includes(char)) {
|
|
1849
|
-
return true;
|
|
1850
|
-
}
|
|
1851
|
-
}
|
|
1852
|
-
return false;
|
|
1853
|
-
};
|
|
1854
|
-
var trimStringFromSymbols = (str, characters) => {
|
|
1855
|
-
const pattern = new RegExp(`[${characters.join("\\")}]`, "g");
|
|
1856
|
-
return str.replace(pattern, "");
|
|
1857
|
-
};
|
|
1858
|
-
var brackRegex = {
|
|
1859
|
-
2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
|
|
1860
|
-
3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
|
|
1861
|
-
};
|
|
1862
|
-
var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
|
|
1863
|
-
if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
|
|
1864
|
-
return str;
|
|
1865
|
-
const reg = brackRegex[options.bracketsLength || 2];
|
|
1866
|
-
return str.replace(reg, (_, parentPath, variable) => {
|
|
1867
|
-
if (parentPath) {
|
|
1868
|
-
const parentLevels = parentPath.match(options.bracketsLength === 3 ? /\.\.\.\//g : /\.\.\//g).length;
|
|
1869
|
-
let parentState = state;
|
|
1870
|
-
for (let i = 0; i < parentLevels; i++) {
|
|
1871
|
-
parentState = parentState.parent;
|
|
1872
|
-
if (!parentState) {
|
|
1873
|
-
return "";
|
|
1874
|
-
}
|
|
1875
|
-
}
|
|
1876
|
-
const value = parentState[variable.trim()];
|
|
1877
|
-
return value !== void 0 ? `${value}` : "";
|
|
1878
|
-
} else {
|
|
1879
|
-
const value = state[variable.trim()];
|
|
1880
|
-
return value !== void 0 ? `${value}` : "";
|
|
1881
|
-
}
|
|
1882
|
-
});
|
|
1883
|
-
};
|
|
1884
|
-
var lowercaseFirstLetter = (inputString) => {
|
|
1885
|
-
return `${inputString.charAt(0).toLowerCase()}${inputString.slice(1)}`;
|
|
1886
|
-
};
|
|
1732
|
+
module2.exports = __toCommonJS22(node_exports);
|
|
1733
|
+
var import_globals3 = require_globals2();
|
|
1734
|
+
var isNode = (obj) => {
|
|
1735
|
+
return (typeof Node === "object" ? obj instanceof import_globals3.window.Node : obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string") || false;
|
|
1736
|
+
};
|
|
1737
|
+
var isHtmlElement = (obj) => {
|
|
1738
|
+
return (typeof HTMLElement === "object" ? obj instanceof import_globals3.window.HTMLElement : obj && typeof obj === "object" && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === "string") || false;
|
|
1739
|
+
};
|
|
1740
|
+
}
|
|
1741
|
+
});
|
|
1742
|
+
var require_types2 = __commonJS2({
|
|
1743
|
+
"../../../domql/packages/utils/dist/cjs/types.js"(exports, module2) {
|
|
1744
|
+
"use strict";
|
|
1745
|
+
var __defProp22 = Object.defineProperty;
|
|
1746
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1747
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1748
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1749
|
+
var __export22 = (target, all) => {
|
|
1750
|
+
for (var name in all)
|
|
1751
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1752
|
+
};
|
|
1753
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1754
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1755
|
+
for (let key of __getOwnPropNames22(from))
|
|
1756
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1757
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1887
1758
|
}
|
|
1759
|
+
return to;
|
|
1760
|
+
};
|
|
1761
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1762
|
+
var types_exports = {};
|
|
1763
|
+
__export22(types_exports, {
|
|
1764
|
+
TYPES: () => TYPES,
|
|
1765
|
+
is: () => is,
|
|
1766
|
+
isArray: () => isArray3,
|
|
1767
|
+
isBoolean: () => isBoolean,
|
|
1768
|
+
isDate: () => isDate,
|
|
1769
|
+
isDefined: () => isDefined2,
|
|
1770
|
+
isFunction: () => isFunction,
|
|
1771
|
+
isNot: () => isNot,
|
|
1772
|
+
isNull: () => isNull,
|
|
1773
|
+
isNumber: () => isNumber2,
|
|
1774
|
+
isObject: () => isObject3,
|
|
1775
|
+
isObjectLike: () => isObjectLike2,
|
|
1776
|
+
isString: () => isString22,
|
|
1777
|
+
isUndefined: () => isUndefined
|
|
1888
1778
|
});
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
1779
|
+
module2.exports = __toCommonJS22(types_exports);
|
|
1780
|
+
var import_node = require_node2();
|
|
1781
|
+
var isObject3 = (arg) => {
|
|
1782
|
+
if (arg === null)
|
|
1783
|
+
return false;
|
|
1784
|
+
return typeof arg === "object" && arg.constructor === Object;
|
|
1785
|
+
};
|
|
1786
|
+
var isString22 = (arg) => typeof arg === "string";
|
|
1787
|
+
var isNumber2 = (arg) => typeof arg === "number";
|
|
1788
|
+
var isFunction = (arg) => typeof arg === "function";
|
|
1789
|
+
var isBoolean = (arg) => arg === true || arg === false;
|
|
1790
|
+
var isNull = (arg) => arg === null;
|
|
1791
|
+
var isArray3 = (arg) => Array.isArray(arg);
|
|
1792
|
+
var isDate = (d) => d instanceof Date;
|
|
1793
|
+
var isObjectLike2 = (arg) => {
|
|
1794
|
+
if (arg === null)
|
|
1795
|
+
return false;
|
|
1796
|
+
return typeof arg === "object";
|
|
1797
|
+
};
|
|
1798
|
+
var isDefined2 = (arg) => {
|
|
1799
|
+
return isObject3(arg) || isObjectLike2(arg) || isString22(arg) || isNumber2(arg) || isFunction(arg) || isArray3(arg) || isObjectLike2(arg) || isBoolean(arg) || isDate(arg) || isNull(arg);
|
|
1800
|
+
};
|
|
1801
|
+
var isUndefined = (arg) => {
|
|
1802
|
+
return arg === void 0;
|
|
1803
|
+
};
|
|
1804
|
+
var TYPES = {
|
|
1805
|
+
boolean: isBoolean,
|
|
1806
|
+
array: isArray3,
|
|
1807
|
+
object: isObject3,
|
|
1808
|
+
string: isString22,
|
|
1809
|
+
date: isDate,
|
|
1810
|
+
number: isNumber2,
|
|
1811
|
+
null: isNull,
|
|
1812
|
+
function: isFunction,
|
|
1813
|
+
objectLike: isObjectLike2,
|
|
1814
|
+
node: import_node.isNode,
|
|
1815
|
+
htmlElement: import_node.isHtmlElement,
|
|
1816
|
+
defined: isDefined2
|
|
1817
|
+
};
|
|
1818
|
+
var is = (arg) => {
|
|
1819
|
+
return (...args) => {
|
|
1820
|
+
return args.map((val) => TYPES[val](arg)).filter((v) => v).length > 0;
|
|
1821
|
+
};
|
|
1822
|
+
};
|
|
1823
|
+
var isNot = (arg) => {
|
|
1824
|
+
return (...args) => {
|
|
1825
|
+
return args.map((val) => TYPES[val](arg)).filter((v) => v).length === 0;
|
|
1826
|
+
};
|
|
1827
|
+
};
|
|
1828
|
+
}
|
|
1829
|
+
});
|
|
1830
|
+
var require_array2 = __commonJS2({
|
|
1831
|
+
"../../../domql/packages/utils/dist/cjs/array.js"(exports, module2) {
|
|
1832
|
+
"use strict";
|
|
1833
|
+
var __defProp22 = Object.defineProperty;
|
|
1834
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1835
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1836
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1837
|
+
var __export22 = (target, all) => {
|
|
1838
|
+
for (var name in all)
|
|
1839
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1840
|
+
};
|
|
1841
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1842
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1843
|
+
for (let key of __getOwnPropNames22(from))
|
|
1844
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1845
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1846
|
+
}
|
|
1847
|
+
return to;
|
|
1848
|
+
};
|
|
1849
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1850
|
+
var array_exports = {};
|
|
1851
|
+
__export22(array_exports, {
|
|
1852
|
+
addItemAfterEveryElement: () => addItemAfterEveryElement,
|
|
1853
|
+
arrayContainsOtherArray: () => arrayContainsOtherArray,
|
|
1854
|
+
arraysEqual: () => arraysEqual,
|
|
1855
|
+
createNestedObject: () => createNestedObject,
|
|
1856
|
+
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
1857
|
+
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
1858
|
+
getFrequencyInArray: () => getFrequencyInArray,
|
|
1859
|
+
joinArrays: () => joinArrays,
|
|
1860
|
+
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
1861
|
+
mergeArray: () => mergeArray,
|
|
1862
|
+
removeFromArray: () => removeFromArray,
|
|
1863
|
+
removeValueFromArray: () => removeValueFromArray,
|
|
1864
|
+
removeValueFromArrayAll: () => removeValueFromArrayAll,
|
|
1865
|
+
reorderArrayByValues: () => reorderArrayByValues,
|
|
1866
|
+
swapItemsInArray: () => swapItemsInArray
|
|
1867
|
+
});
|
|
1868
|
+
module2.exports = __toCommonJS22(array_exports);
|
|
1869
|
+
var import_object = require_object2();
|
|
1870
|
+
var import_types = require_types2();
|
|
1871
|
+
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
1872
|
+
return arr2.every((val) => arr1.includes(val));
|
|
1873
|
+
};
|
|
1874
|
+
var getFrequencyInArray = (arr, value) => {
|
|
1875
|
+
return arr.reduce((count, currentValue) => {
|
|
1876
|
+
return currentValue === value ? count + 1 : count;
|
|
1877
|
+
}, 0);
|
|
1878
|
+
};
|
|
1879
|
+
var removeFromArray = (arr, index) => {
|
|
1880
|
+
if ((0, import_types.isString)(index))
|
|
1881
|
+
index = parseInt(index);
|
|
1882
|
+
if ((0, import_types.isNumber)(index)) {
|
|
1883
|
+
if (index < 0 || index >= arr.length || isNaN(index)) {
|
|
1884
|
+
throw new Error("Invalid index");
|
|
1885
|
+
}
|
|
1886
|
+
arr.splice(index, 1);
|
|
1887
|
+
} else if ((0, import_types.isArray)(index)) {
|
|
1888
|
+
index.forEach((idx) => removeFromArray(arr, idx));
|
|
1889
|
+
} else {
|
|
1890
|
+
throw new Error("Invalid index");
|
|
1891
|
+
}
|
|
1892
|
+
return arr;
|
|
1893
|
+
};
|
|
1894
|
+
var swapItemsInArray = (arr, i, j) => {
|
|
1895
|
+
[arr[i], arr[j]] = [arr[j], arr[i]];
|
|
1896
|
+
};
|
|
1897
|
+
var joinArrays = (...arrays) => {
|
|
1898
|
+
return [].concat(...arrays);
|
|
1899
|
+
};
|
|
1900
|
+
var mergeArray = (arr, excludeFrom = []) => {
|
|
1901
|
+
return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepClone)(c, excludeFrom), excludeFrom), {});
|
|
1902
|
+
};
|
|
1903
|
+
var mergeAndCloneIfArray = (obj) => {
|
|
1904
|
+
return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepClone)(obj);
|
|
1905
|
+
};
|
|
1906
|
+
var cutArrayBeforeValue = (arr, value) => {
|
|
1907
|
+
const index = arr.indexOf(value);
|
|
1908
|
+
if (index !== -1) {
|
|
1909
|
+
return arr.slice(0, index);
|
|
1910
|
+
}
|
|
1911
|
+
return arr;
|
|
1912
|
+
};
|
|
1913
|
+
var cutArrayAfterValue = (arr, value) => {
|
|
1914
|
+
if (!(0, import_types.isArray)(arr))
|
|
1915
|
+
return;
|
|
1916
|
+
const index = arr.indexOf(value);
|
|
1917
|
+
if (index !== -1) {
|
|
1918
|
+
return arr.slice(index + 1);
|
|
1919
|
+
}
|
|
1920
|
+
return arr;
|
|
1921
|
+
};
|
|
1922
|
+
var createNestedObject = (arr, lastValue) => {
|
|
1923
|
+
const nestedObject = {};
|
|
1924
|
+
if (arr.length === 0) {
|
|
1925
|
+
return lastValue;
|
|
1926
|
+
}
|
|
1927
|
+
arr.reduce((obj, value, index) => {
|
|
1928
|
+
if (!obj[value]) {
|
|
1929
|
+
obj[value] = {};
|
|
1930
|
+
}
|
|
1931
|
+
if (index === arr.length - 1 && lastValue) {
|
|
1932
|
+
obj[value] = lastValue;
|
|
1933
|
+
}
|
|
1934
|
+
return obj[value];
|
|
1935
|
+
}, nestedObject);
|
|
1936
|
+
return nestedObject;
|
|
1937
|
+
};
|
|
1938
|
+
var removeValueFromArray = (arr, value) => {
|
|
1939
|
+
const index = arr.indexOf(value);
|
|
1940
|
+
if (index > -1) {
|
|
1941
|
+
const newArray = [...arr];
|
|
1942
|
+
newArray.splice(index, 1);
|
|
1943
|
+
return newArray;
|
|
1944
|
+
}
|
|
1945
|
+
return arr;
|
|
1946
|
+
};
|
|
1947
|
+
var removeValueFromArrayAll = (arr, value) => {
|
|
1948
|
+
return arr.filter((item) => item !== value);
|
|
1949
|
+
};
|
|
1950
|
+
var addItemAfterEveryElement = (array, item) => {
|
|
1951
|
+
const result = [];
|
|
1952
|
+
for (let i = 0; i < array.length; i++) {
|
|
1953
|
+
result.push(array[i]);
|
|
1954
|
+
if (i < array.length - 1) {
|
|
1955
|
+
result.push(item);
|
|
1956
|
+
}
|
|
1957
|
+
}
|
|
1958
|
+
return result;
|
|
1959
|
+
};
|
|
1960
|
+
var reorderArrayByValues = (array, valueToMove, insertBeforeValue) => {
|
|
1961
|
+
const newArray = [...array];
|
|
1962
|
+
const indexToMove = newArray.indexOf(valueToMove);
|
|
1963
|
+
const indexToInsertBefore = newArray.indexOf(insertBeforeValue);
|
|
1964
|
+
if (indexToMove !== -1 && indexToInsertBefore !== -1) {
|
|
1965
|
+
const removedItem = newArray.splice(indexToMove, 1)[0];
|
|
1966
|
+
const insertIndex = indexToInsertBefore < indexToMove ? indexToInsertBefore : indexToInsertBefore + 1;
|
|
1967
|
+
newArray.splice(insertIndex, 0, removedItem);
|
|
1968
|
+
}
|
|
1969
|
+
return newArray;
|
|
1970
|
+
};
|
|
1971
|
+
var arraysEqual = (arr1, arr2) => {
|
|
1972
|
+
if (arr1.length !== arr2.length) {
|
|
1973
|
+
return false;
|
|
1974
|
+
}
|
|
1975
|
+
for (let i = 0; i < arr1.length; i++) {
|
|
1976
|
+
if (arr1[i] !== arr2[i]) {
|
|
1977
|
+
return false;
|
|
1978
|
+
}
|
|
1979
|
+
}
|
|
1980
|
+
return true;
|
|
1981
|
+
};
|
|
1982
|
+
}
|
|
1983
|
+
});
|
|
1984
|
+
var require_string2 = __commonJS2({
|
|
1985
|
+
"../../../domql/packages/utils/dist/cjs/string.js"(exports, module2) {
|
|
1986
|
+
"use strict";
|
|
1987
|
+
var __defProp22 = Object.defineProperty;
|
|
1988
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1989
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1990
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1991
|
+
var __export22 = (target, all) => {
|
|
1992
|
+
for (var name in all)
|
|
1993
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1994
|
+
};
|
|
1995
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1996
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1997
|
+
for (let key of __getOwnPropNames22(from))
|
|
1998
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1999
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2000
|
+
}
|
|
2001
|
+
return to;
|
|
2002
|
+
};
|
|
2003
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2004
|
+
var string_exports = {};
|
|
2005
|
+
__export22(string_exports, {
|
|
2006
|
+
customDecodeURIComponent: () => customDecodeURIComponent,
|
|
2007
|
+
customEncodeURIComponent: () => customEncodeURIComponent,
|
|
2008
|
+
findKeyPosition: () => findKeyPosition,
|
|
2009
|
+
lowercaseFirstLetter: () => lowercaseFirstLetter,
|
|
2010
|
+
replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
|
|
2011
|
+
replaceOctalEscapeSequences: () => replaceOctalEscapeSequences,
|
|
2012
|
+
stringIncludesAny: () => stringIncludesAny,
|
|
2013
|
+
trimStringFromSymbols: () => trimStringFromSymbols
|
|
2014
|
+
});
|
|
2015
|
+
module2.exports = __toCommonJS22(string_exports);
|
|
2016
|
+
var stringIncludesAny = (str, characters) => {
|
|
2017
|
+
for (const char of characters) {
|
|
2018
|
+
if (str.includes(char)) {
|
|
2019
|
+
return true;
|
|
2020
|
+
}
|
|
2021
|
+
}
|
|
2022
|
+
return false;
|
|
2023
|
+
};
|
|
2024
|
+
var trimStringFromSymbols = (str, characters) => {
|
|
2025
|
+
const pattern = new RegExp(`[${characters.join("\\")}]`, "g");
|
|
2026
|
+
return str.replace(pattern, "");
|
|
2027
|
+
};
|
|
2028
|
+
var brackRegex = {
|
|
2029
|
+
2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
|
|
2030
|
+
3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
|
|
2031
|
+
};
|
|
2032
|
+
var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
|
|
2033
|
+
if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
|
|
2034
|
+
return str;
|
|
2035
|
+
const reg = brackRegex[options.bracketsLength || 2];
|
|
2036
|
+
return str.replace(reg, (_, parentPath, variable) => {
|
|
2037
|
+
if (parentPath) {
|
|
2038
|
+
const parentLevels = parentPath.match(options.bracketsLength === 3 ? /\.\.\.\//g : /\.\.\//g).length;
|
|
2039
|
+
let parentState = state;
|
|
2040
|
+
for (let i = 0; i < parentLevels; i++) {
|
|
2041
|
+
parentState = parentState.parent;
|
|
2042
|
+
if (!parentState) {
|
|
2043
|
+
return "";
|
|
2044
|
+
}
|
|
2059
2045
|
}
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2046
|
+
const value = parentState[variable.trim()];
|
|
2047
|
+
return value !== void 0 ? `${value}` : "";
|
|
2048
|
+
} else {
|
|
2049
|
+
const value = state[variable.trim()];
|
|
2050
|
+
return value !== void 0 ? `${value}` : "";
|
|
2051
|
+
}
|
|
2052
|
+
});
|
|
2053
|
+
};
|
|
2054
|
+
var lowercaseFirstLetter = (inputString) => {
|
|
2055
|
+
return `${inputString.charAt(0).toLowerCase()}${inputString.slice(1)}`;
|
|
2056
|
+
};
|
|
2057
|
+
var findKeyPosition = (str, key) => {
|
|
2058
|
+
const lines = str.split("\n");
|
|
2059
|
+
let startLineNumber = -1;
|
|
2060
|
+
let endLineNumber = -1;
|
|
2061
|
+
let startColumn = -1;
|
|
2062
|
+
let endColumn = -1;
|
|
2063
|
+
const keyPattern = new RegExp(`\\b${key}\\b\\s*:\\s*`);
|
|
2064
|
+
let braceCount = 0;
|
|
2065
|
+
let foundKey = false;
|
|
2066
|
+
for (let i = 0; i < lines.length; i++) {
|
|
2067
|
+
if (keyPattern.test(lines[i]) && !foundKey) {
|
|
2068
|
+
foundKey = true;
|
|
2069
|
+
startLineNumber = i + 1;
|
|
2070
|
+
startColumn = lines[i].indexOf(key) + 1;
|
|
2071
|
+
if (lines[i].includes("{}")) {
|
|
2072
|
+
endLineNumber = startLineNumber;
|
|
2073
|
+
endColumn = lines[i].indexOf("{}") + 3;
|
|
2074
|
+
break;
|
|
2075
|
+
}
|
|
2076
|
+
const line = lines[i].slice(startColumn + key.length);
|
|
2077
|
+
if (line.includes("{") || line.includes("[")) {
|
|
2078
|
+
braceCount = 1;
|
|
2079
|
+
} else {
|
|
2080
|
+
endLineNumber = i + 1;
|
|
2081
|
+
endColumn = lines[i].length + 1;
|
|
2082
|
+
break;
|
|
2083
|
+
}
|
|
2084
|
+
} else if (foundKey) {
|
|
2085
|
+
braceCount += (lines[i].match(/{/g) || []).length;
|
|
2086
|
+
braceCount += (lines[i].match(/\[/g) || []).length;
|
|
2087
|
+
braceCount -= (lines[i].match(/}/g) || []).length;
|
|
2088
|
+
braceCount -= (lines[i].match(/]/g) || []).length;
|
|
2089
|
+
if (braceCount === 0) {
|
|
2090
|
+
endLineNumber = i + 1;
|
|
2091
|
+
endColumn = lines[i].lastIndexOf("}") !== -1 ? lines[i].lastIndexOf("}") + 2 : lines[i].length + 1;
|
|
2092
|
+
break;
|
|
2093
|
+
}
|
|
2094
|
+
}
|
|
2095
|
+
}
|
|
2096
|
+
return {
|
|
2097
|
+
startColumn,
|
|
2098
|
+
endColumn,
|
|
2099
|
+
startLineNumber,
|
|
2100
|
+
endLineNumber
|
|
2101
|
+
};
|
|
2102
|
+
};
|
|
2103
|
+
var replaceOctalEscapeSequences = (str) => {
|
|
2104
|
+
const octalRegex = /\\([0-7]{1,3})/g;
|
|
2105
|
+
return str.replace(octalRegex, (match, p1) => {
|
|
2106
|
+
const octalValue = parseInt(p1, 8);
|
|
2107
|
+
const char = String.fromCharCode(octalValue);
|
|
2108
|
+
return char;
|
|
2109
|
+
});
|
|
2110
|
+
};
|
|
2111
|
+
var customEncodeURIComponent = (str) => {
|
|
2112
|
+
return str.split("").map((char) => {
|
|
2113
|
+
if (/[^a-zA-Z0-9\s]/.test(char)) {
|
|
2114
|
+
return "%" + char.charCodeAt(0).toString(16).toUpperCase();
|
|
2115
|
+
}
|
|
2116
|
+
return char;
|
|
2117
|
+
}).join("");
|
|
2118
|
+
};
|
|
2119
|
+
var customDecodeURIComponent = (encodedStr) => {
|
|
2120
|
+
return encodedStr.replace(/%[0-9A-Fa-f]{2}/g, (match) => String.fromCharCode(parseInt(match.slice(1), 16)));
|
|
2121
|
+
};
|
|
2122
|
+
}
|
|
2123
|
+
});
|
|
2124
|
+
var require_object2 = __commonJS2({
|
|
2125
|
+
"../../../domql/packages/utils/dist/cjs/object.js"(exports, module2) {
|
|
2126
|
+
"use strict";
|
|
2127
|
+
var __defProp22 = Object.defineProperty;
|
|
2128
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2129
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2130
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2131
|
+
var __export22 = (target, all) => {
|
|
2132
|
+
for (var name in all)
|
|
2133
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2134
|
+
};
|
|
2135
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
2136
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
2137
|
+
for (let key of __getOwnPropNames22(from))
|
|
2138
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2139
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2140
|
+
}
|
|
2141
|
+
return to;
|
|
2142
|
+
};
|
|
2143
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2144
|
+
var object_exports = {};
|
|
2145
|
+
__export22(object_exports, {
|
|
2146
|
+
checkIfKeyIsComponent: () => checkIfKeyIsComponent,
|
|
2147
|
+
clone: () => clone,
|
|
2148
|
+
createObjectWithoutPrototype: () => createObjectWithoutPrototype,
|
|
2149
|
+
deepClone: () => deepClone2,
|
|
2150
|
+
deepCloneExclude: () => deepCloneExclude,
|
|
2151
|
+
deepCloneWithExtend: () => deepCloneWithExtend,
|
|
2152
|
+
deepContains: () => deepContains,
|
|
2153
|
+
deepDestringify: () => deepDestringify,
|
|
2154
|
+
deepDiff: () => deepDiff,
|
|
2155
|
+
deepMerge: () => deepMerge2,
|
|
2156
|
+
deepStringify: () => deepStringify,
|
|
2157
|
+
detachFunctionsFromObject: () => detachFunctionsFromObject,
|
|
2158
|
+
diff: () => diff,
|
|
2159
|
+
diffArrays: () => diffArrays,
|
|
2160
|
+
diffObjects: () => diffObjects,
|
|
2161
|
+
exec: () => exec,
|
|
2162
|
+
flattenRecursive: () => flattenRecursive,
|
|
2163
|
+
getChildrenComponentsByKey: () => getChildrenComponentsByKey,
|
|
2164
|
+
getExtendsInElement: () => getExtendsInElement,
|
|
2165
|
+
hasOwnProperty: () => hasOwnProperty,
|
|
2166
|
+
isEmpty: () => isEmpty,
|
|
2167
|
+
isEmptyObject: () => isEmptyObject,
|
|
2168
|
+
isEqualDeep: () => isEqualDeep,
|
|
2169
|
+
makeObjectWithoutPrototype: () => makeObjectWithoutPrototype,
|
|
2170
|
+
map: () => map,
|
|
2171
|
+
merge: () => merge,
|
|
2172
|
+
mergeArrayExclude: () => mergeArrayExclude,
|
|
2173
|
+
mergeIfExisted: () => mergeIfExisted,
|
|
2174
|
+
objectToString: () => objectToString,
|
|
2175
|
+
overwrite: () => overwrite,
|
|
2176
|
+
overwriteDeep: () => overwriteDeep,
|
|
2177
|
+
overwriteShallow: () => overwriteShallow,
|
|
2178
|
+
removeFromObject: () => removeFromObject,
|
|
2179
|
+
stringToObject: () => stringToObject
|
|
2180
|
+
});
|
|
2181
|
+
module2.exports = __toCommonJS22(object_exports);
|
|
2182
|
+
var import_globals3 = require_globals2();
|
|
2183
|
+
var import_types = require_types2();
|
|
2184
|
+
var import_array = require_array2();
|
|
2185
|
+
var import_string = require_string2();
|
|
2186
|
+
var exec = (param, element, state, context) => {
|
|
2187
|
+
if ((0, import_types.isFunction)(param)) {
|
|
2188
|
+
return param(
|
|
2189
|
+
element,
|
|
2190
|
+
state || element.state,
|
|
2191
|
+
context || element.context
|
|
2192
|
+
);
|
|
2193
|
+
}
|
|
2194
|
+
return param;
|
|
2195
|
+
};
|
|
2196
|
+
var map = (obj, extention, element) => {
|
|
2197
|
+
for (const e in extention) {
|
|
2198
|
+
obj[e] = exec(extention[e], element);
|
|
2199
|
+
}
|
|
2200
|
+
};
|
|
2201
|
+
var merge = (element, obj, excludeFrom = []) => {
|
|
2202
|
+
for (const e in obj) {
|
|
2203
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, e);
|
|
2204
|
+
if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
|
|
2205
|
+
continue;
|
|
2206
|
+
const elementProp = element[e];
|
|
2207
|
+
const objProp = obj[e];
|
|
2208
|
+
if (elementProp === void 0) {
|
|
2209
|
+
element[e] = objProp;
|
|
2210
|
+
}
|
|
2211
|
+
}
|
|
2212
|
+
return element;
|
|
2213
|
+
};
|
|
2214
|
+
var deepMerge2 = (element, extend, excludeFrom = []) => {
|
|
2215
|
+
for (const e in extend) {
|
|
2216
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(extend, e);
|
|
2217
|
+
if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
|
|
2218
|
+
continue;
|
|
2219
|
+
const elementProp = element[e];
|
|
2220
|
+
const extendProp = extend[e];
|
|
2221
|
+
if ((0, import_types.isObjectLike)(elementProp) && (0, import_types.isObjectLike)(extendProp)) {
|
|
2222
|
+
deepMerge2(elementProp, extendProp, excludeFrom);
|
|
2223
|
+
} else if (elementProp === void 0) {
|
|
2224
|
+
element[e] = extendProp;
|
|
2225
|
+
}
|
|
2226
|
+
}
|
|
2227
|
+
return element;
|
|
2228
|
+
};
|
|
2229
|
+
var clone = (obj, excludeFrom = []) => {
|
|
2230
|
+
const o = {};
|
|
2231
|
+
for (const prop in obj) {
|
|
2232
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, prop);
|
|
2233
|
+
if (!hasOwnProperty2 || excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
2234
|
+
continue;
|
|
2235
|
+
o[prop] = obj[prop];
|
|
2236
|
+
}
|
|
2237
|
+
return o;
|
|
2238
|
+
};
|
|
2239
|
+
var deepCloneExclude = (obj, excludeFrom = []) => {
|
|
2240
|
+
if ((0, import_types.isArray)(obj)) {
|
|
2241
|
+
return obj.map((x) => deepCloneExclude(x, excludeFrom));
|
|
2242
|
+
}
|
|
2243
|
+
const o = {};
|
|
2244
|
+
for (const k in obj) {
|
|
2245
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, k);
|
|
2246
|
+
if (!hasOwnProperty2 || excludeFrom.includes(k) || k.startsWith("__"))
|
|
2247
|
+
continue;
|
|
2248
|
+
let v = obj[k];
|
|
2249
|
+
if (k === "extend" && (0, import_types.isArray)(v)) {
|
|
2250
|
+
v = mergeArrayExclude(v, excludeFrom);
|
|
2251
|
+
}
|
|
2252
|
+
if ((0, import_types.isArray)(v)) {
|
|
2253
|
+
o[k] = v.map((x) => deepCloneExclude(x, excludeFrom));
|
|
2254
|
+
} else if ((0, import_types.isObject)(v)) {
|
|
2255
|
+
o[k] = deepCloneExclude(v, excludeFrom);
|
|
2256
|
+
} else
|
|
2257
|
+
o[k] = v;
|
|
2258
|
+
}
|
|
2259
|
+
return o;
|
|
2260
|
+
};
|
|
2261
|
+
var mergeArrayExclude = (arr, excl = []) => {
|
|
2262
|
+
return arr.reduce((acc, curr) => deepMerge2(acc, deepCloneExclude(curr, excl)), {});
|
|
2263
|
+
};
|
|
2264
|
+
var deepClone2 = (obj, excludeFrom = [], cleanUndefined = false) => {
|
|
2265
|
+
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
2266
|
+
for (const prop in obj) {
|
|
2267
|
+
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
2268
|
+
continue;
|
|
2269
|
+
if (prop === "__proto__")
|
|
2270
|
+
continue;
|
|
2271
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
2272
|
+
continue;
|
|
2273
|
+
let objProp = obj[prop];
|
|
2274
|
+
if (cleanUndefined && (0, import_types.isUndefined)(objProp))
|
|
2275
|
+
continue;
|
|
2276
|
+
if (prop === "extend" && (0, import_types.isArray)(objProp)) {
|
|
2277
|
+
objProp = (0, import_array.mergeArray)(objProp);
|
|
2278
|
+
}
|
|
2279
|
+
if ((0, import_types.isObjectLike)(objProp)) {
|
|
2280
|
+
o[prop] = deepClone2(objProp, excludeFrom, cleanUndefined);
|
|
2281
|
+
} else
|
|
2282
|
+
o[prop] = objProp;
|
|
2283
|
+
}
|
|
2284
|
+
return o;
|
|
2285
|
+
};
|
|
2286
|
+
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
2287
|
+
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
2288
|
+
for (const prop in obj) {
|
|
2289
|
+
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
2290
|
+
continue;
|
|
2291
|
+
const objProp = obj[prop];
|
|
2292
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
|
|
2293
|
+
continue;
|
|
2294
|
+
if ((0, import_types.isObjectLike)(objProp)) {
|
|
2295
|
+
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
|
|
2296
|
+
} else
|
|
2297
|
+
o[prop] = objProp;
|
|
2298
|
+
}
|
|
2299
|
+
return o;
|
|
2300
|
+
};
|
|
2301
|
+
var deepStringify = (obj, stringified = {}) => {
|
|
2302
|
+
for (const prop in obj) {
|
|
2303
|
+
const objProp = obj[prop];
|
|
2304
|
+
if ((0, import_types.isFunction)(objProp)) {
|
|
2305
|
+
stringified[prop] = objProp.toString();
|
|
2306
|
+
} else if ((0, import_types.isObject)(objProp)) {
|
|
2307
|
+
stringified[prop] = {};
|
|
2308
|
+
deepStringify(objProp, stringified[prop]);
|
|
2309
|
+
} else if ((0, import_types.isArray)(objProp)) {
|
|
2310
|
+
stringified[prop] = [];
|
|
2311
|
+
objProp.forEach((v, i) => {
|
|
2312
|
+
if ((0, import_types.isObject)(v)) {
|
|
2313
|
+
stringified[prop][i] = {};
|
|
2314
|
+
deepStringify(v, stringified[prop][i]);
|
|
2315
|
+
} else if ((0, import_types.isFunction)(v)) {
|
|
2316
|
+
stringified[prop][i] = v.toString();
|
|
2082
2317
|
} else {
|
|
2083
|
-
stringified[prop] =
|
|
2318
|
+
stringified[prop][i] = v;
|
|
2084
2319
|
}
|
|
2085
|
-
}
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2320
|
+
});
|
|
2321
|
+
} else {
|
|
2322
|
+
stringified[prop] = objProp;
|
|
2323
|
+
}
|
|
2324
|
+
}
|
|
2325
|
+
return stringified;
|
|
2326
|
+
};
|
|
2327
|
+
var objectToString = (obj = {}, indent = 0) => {
|
|
2328
|
+
const spaces = " ".repeat(indent);
|
|
2329
|
+
let str = "{\n";
|
|
2330
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
2331
|
+
const keyNotAllowdChars = (0, import_string.stringIncludesAny)(key, ["&", "*", "-", ":", "%", "{", "}", ">", "<", "@", ".", "/", "!", " "]);
|
|
2332
|
+
const stringedKey = keyNotAllowdChars ? `'${key}'` : key;
|
|
2333
|
+
str += `${spaces} ${stringedKey}: `;
|
|
2334
|
+
if ((0, import_types.isArray)(value)) {
|
|
2335
|
+
str += "[\n";
|
|
2336
|
+
for (const element of value) {
|
|
2337
|
+
if ((0, import_types.isObject)(element) && element !== null) {
|
|
2338
|
+
str += `${spaces} ${objectToString(element, indent + 2)},
|
|
2103
2339
|
`;
|
|
2104
|
-
|
|
2105
|
-
|
|
2340
|
+
} else if ((0, import_types.isString)(element)) {
|
|
2341
|
+
str += `${spaces} '${element}',
|
|
2106
2342
|
`;
|
|
2107
|
-
}
|
|
2108
|
-
}
|
|
2109
|
-
str += `${spaces} ]`;
|
|
2110
|
-
} else if ((0, import_types.isObjectLike)(value)) {
|
|
2111
|
-
str += objectToString(value, indent + 1);
|
|
2112
|
-
} else if ((0, import_types.isString)(value)) {
|
|
2113
|
-
str += (0, import_string.stringIncludesAny)(value, ["\n", "'"]) ? `\`${value}\`` : `'${value}'`;
|
|
2114
2343
|
} else {
|
|
2115
|
-
str +=
|
|
2344
|
+
str += `${spaces} ${element},
|
|
2345
|
+
`;
|
|
2116
2346
|
}
|
|
2117
|
-
str += ",\n";
|
|
2118
2347
|
}
|
|
2119
|
-
str += `${spaces}
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2348
|
+
str += `${spaces} ]`;
|
|
2349
|
+
} else if ((0, import_types.isObjectLike)(value)) {
|
|
2350
|
+
str += objectToString(value, indent + 1);
|
|
2351
|
+
} else if ((0, import_types.isString)(value)) {
|
|
2352
|
+
str += (0, import_string.stringIncludesAny)(value, ["\n", "'"]) ? `\`${value}\`` : `'${value}'`;
|
|
2353
|
+
} else {
|
|
2354
|
+
str += value;
|
|
2355
|
+
}
|
|
2356
|
+
str += ",\n";
|
|
2357
|
+
}
|
|
2358
|
+
str += `${spaces}}`;
|
|
2359
|
+
return str;
|
|
2360
|
+
};
|
|
2361
|
+
var detachFunctionsFromObject = (obj, detached = {}) => {
|
|
2362
|
+
for (const prop in obj) {
|
|
2363
|
+
const objProp = obj[prop];
|
|
2364
|
+
if ((0, import_types.isFunction)(objProp))
|
|
2365
|
+
continue;
|
|
2366
|
+
else if ((0, import_types.isObject)(objProp)) {
|
|
2367
|
+
detached[prop] = {};
|
|
2368
|
+
deepStringify(objProp, detached[prop]);
|
|
2369
|
+
} else if ((0, import_types.isArray)(objProp)) {
|
|
2370
|
+
detached[prop] = [];
|
|
2371
|
+
objProp.forEach((v, i) => {
|
|
2372
|
+
if ((0, import_types.isFunction)(v))
|
|
2373
|
+
return;
|
|
2374
|
+
if ((0, import_types.isObject)(v)) {
|
|
2375
|
+
detached[prop][i] = {};
|
|
2376
|
+
detachFunctionsFromObject(v, detached[prop][i]);
|
|
2142
2377
|
} else {
|
|
2143
|
-
detached[prop] =
|
|
2378
|
+
detached[prop][i] = v;
|
|
2379
|
+
}
|
|
2380
|
+
});
|
|
2381
|
+
} else {
|
|
2382
|
+
detached[prop] = objProp;
|
|
2383
|
+
}
|
|
2384
|
+
}
|
|
2385
|
+
return detached;
|
|
2386
|
+
};
|
|
2387
|
+
var deepDestringify = (obj, destringified = {}) => {
|
|
2388
|
+
for (const prop in obj) {
|
|
2389
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, prop);
|
|
2390
|
+
if (!hasOwnProperty2)
|
|
2391
|
+
continue;
|
|
2392
|
+
const objProp = obj[prop];
|
|
2393
|
+
if ((0, import_types.isString)(objProp)) {
|
|
2394
|
+
if ((objProp.includes("(){") || objProp.includes("() {") || objProp.includes("=>") || objProp.startsWith("()") || objProp.startsWith("async") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
2395
|
+
try {
|
|
2396
|
+
const evalProp = import_globals3.window.eval(`(${objProp})`);
|
|
2397
|
+
destringified[prop] = evalProp;
|
|
2398
|
+
} catch (e) {
|
|
2399
|
+
if (e)
|
|
2400
|
+
destringified[prop] = objProp;
|
|
2144
2401
|
}
|
|
2402
|
+
} else {
|
|
2403
|
+
destringified[prop] = objProp;
|
|
2145
2404
|
}
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
if (!hasOwnProperty2)
|
|
2152
|
-
continue;
|
|
2153
|
-
const objProp = obj[prop];
|
|
2154
|
-
if ((0, import_types.isString)(objProp)) {
|
|
2155
|
-
if ((objProp.includes("(){") || objProp.includes("() {") || objProp.includes("=>") || objProp.startsWith("()") || objProp.startsWith("async") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
2405
|
+
} else if ((0, import_types.isArray)(objProp)) {
|
|
2406
|
+
destringified[prop] = [];
|
|
2407
|
+
objProp.forEach((arrProp) => {
|
|
2408
|
+
if ((0, import_types.isString)(arrProp)) {
|
|
2409
|
+
if (arrProp.includes("=>") || arrProp.includes("function") || arrProp.startsWith("(")) {
|
|
2156
2410
|
try {
|
|
2157
|
-
const evalProp = import_globals3.window.eval(`(${
|
|
2158
|
-
destringified[prop]
|
|
2411
|
+
const evalProp = import_globals3.window.eval(`(${arrProp})`);
|
|
2412
|
+
destringified[prop].push(evalProp);
|
|
2159
2413
|
} catch (e) {
|
|
2160
2414
|
if (e)
|
|
2161
|
-
destringified[prop]
|
|
2415
|
+
destringified[prop].push(arrProp);
|
|
2162
2416
|
}
|
|
2163
2417
|
} else {
|
|
2164
|
-
destringified[prop]
|
|
2418
|
+
destringified[prop].push(arrProp);
|
|
2165
2419
|
}
|
|
2166
|
-
} else if ((0, import_types.
|
|
2167
|
-
destringified[prop]
|
|
2168
|
-
objProp.forEach((arrProp) => {
|
|
2169
|
-
if ((0, import_types.isString)(arrProp)) {
|
|
2170
|
-
if (arrProp.includes("=>") || arrProp.includes("function") || arrProp.startsWith("(")) {
|
|
2171
|
-
try {
|
|
2172
|
-
const evalProp = import_globals3.window.eval(`(${arrProp})`);
|
|
2173
|
-
destringified[prop].push(evalProp);
|
|
2174
|
-
} catch (e) {
|
|
2175
|
-
if (e)
|
|
2176
|
-
destringified[prop].push(arrProp);
|
|
2177
|
-
}
|
|
2178
|
-
} else {
|
|
2179
|
-
destringified[prop].push(arrProp);
|
|
2180
|
-
}
|
|
2181
|
-
} else if ((0, import_types.isObject)(arrProp)) {
|
|
2182
|
-
destringified[prop].push(deepDestringify(arrProp));
|
|
2183
|
-
} else {
|
|
2184
|
-
destringified[prop].push(arrProp);
|
|
2185
|
-
}
|
|
2186
|
-
});
|
|
2187
|
-
} else if ((0, import_types.isObject)(objProp)) {
|
|
2188
|
-
destringified[prop] = deepDestringify(objProp, destringified[prop]);
|
|
2420
|
+
} else if ((0, import_types.isObject)(arrProp)) {
|
|
2421
|
+
destringified[prop].push(deepDestringify(arrProp));
|
|
2189
2422
|
} else {
|
|
2190
|
-
destringified[prop]
|
|
2191
|
-
}
|
|
2192
|
-
}
|
|
2193
|
-
return destringified;
|
|
2194
|
-
};
|
|
2195
|
-
var stringToObject = (str, opts = { verbose: true }) => {
|
|
2196
|
-
try {
|
|
2197
|
-
return import_globals3.window.eval("(" + str + ")");
|
|
2198
|
-
} catch (e) {
|
|
2199
|
-
if (opts.verbose)
|
|
2200
|
-
console.warn(e);
|
|
2201
|
-
}
|
|
2202
|
-
};
|
|
2203
|
-
var diffObjects = (original, objToDiff, cache) => {
|
|
2204
|
-
for (const e in objToDiff) {
|
|
2205
|
-
if (e === "ref")
|
|
2206
|
-
continue;
|
|
2207
|
-
const originalProp = original[e];
|
|
2208
|
-
const objToDiffProp = objToDiff[e];
|
|
2209
|
-
if ((0, import_types.isObject)(originalProp) && (0, import_types.isObject)(objToDiffProp)) {
|
|
2210
|
-
cache[e] = {};
|
|
2211
|
-
diff(originalProp, objToDiffProp, cache[e]);
|
|
2212
|
-
} else if (objToDiffProp !== void 0) {
|
|
2213
|
-
cache[e] = objToDiffProp;
|
|
2214
|
-
}
|
|
2215
|
-
}
|
|
2216
|
-
return cache;
|
|
2217
|
-
};
|
|
2218
|
-
var diffArrays = (original, objToDiff, cache) => {
|
|
2219
|
-
if (original.length !== objToDiff.length) {
|
|
2220
|
-
cache = objToDiff;
|
|
2221
|
-
} else {
|
|
2222
|
-
const diffArr = [];
|
|
2223
|
-
for (let i = 0; i < original.length; i++) {
|
|
2224
|
-
const diffObj = diff(original[i], objToDiff[i]);
|
|
2225
|
-
if (Object.keys(diffObj).length > 0) {
|
|
2226
|
-
diffArr.push(diffObj);
|
|
2227
|
-
}
|
|
2228
|
-
}
|
|
2229
|
-
if (diffArr.length > 0) {
|
|
2230
|
-
cache = diffArr;
|
|
2231
|
-
}
|
|
2232
|
-
}
|
|
2233
|
-
return cache;
|
|
2234
|
-
};
|
|
2235
|
-
var diff = (original, objToDiff, cache = {}) => {
|
|
2236
|
-
if ((0, import_types.isArray)(original) && (0, import_types.isArray)(objToDiff)) {
|
|
2237
|
-
cache = [];
|
|
2238
|
-
diffArrays(original, objToDiff, cache);
|
|
2239
|
-
} else {
|
|
2240
|
-
diffObjects(original, objToDiff, cache);
|
|
2241
|
-
}
|
|
2242
|
-
return cache;
|
|
2243
|
-
};
|
|
2244
|
-
var hasOwnProperty = (o, ...args) => Object.prototype.hasOwnProperty.call(o, ...args);
|
|
2245
|
-
var isEmpty = (o) => Object.keys(o).length === 0;
|
|
2246
|
-
var isEmptyObject = (o) => (0, import_types.isObject)(o) && isEmpty(o);
|
|
2247
|
-
var makeObjectWithoutPrototype = () => /* @__PURE__ */ Object.create(null);
|
|
2248
|
-
var deepDiff = (lhs, rhs) => {
|
|
2249
|
-
if (lhs === rhs)
|
|
2250
|
-
return {};
|
|
2251
|
-
if (!(0, import_types.isObjectLike)(lhs) || !(0, import_types.isObjectLike)(rhs))
|
|
2252
|
-
return rhs;
|
|
2253
|
-
const deletedValues = Object.keys(lhs).reduce((acc, key) => {
|
|
2254
|
-
if (!hasOwnProperty(rhs, key)) {
|
|
2255
|
-
acc[key] = void 0;
|
|
2256
|
-
}
|
|
2257
|
-
return acc;
|
|
2258
|
-
}, makeObjectWithoutPrototype());
|
|
2259
|
-
if ((0, import_types.isDate)(lhs) || (0, import_types.isDate)(rhs)) {
|
|
2260
|
-
if (lhs.valueOf() === rhs.valueOf())
|
|
2261
|
-
return {};
|
|
2262
|
-
return rhs;
|
|
2263
|
-
}
|
|
2264
|
-
return Object.keys(rhs).reduce((acc, key) => {
|
|
2265
|
-
if (!hasOwnProperty(lhs, key)) {
|
|
2266
|
-
acc[key] = rhs[key];
|
|
2267
|
-
return acc;
|
|
2268
|
-
}
|
|
2269
|
-
const difference = diff(lhs[key], rhs[key]);
|
|
2270
|
-
if (isEmptyObject(difference) && !(0, import_types.isDate)(difference) && (isEmptyObject(lhs[key]) || !isEmptyObject(rhs[key]))) {
|
|
2271
|
-
return acc;
|
|
2272
|
-
}
|
|
2273
|
-
acc[key] = difference;
|
|
2274
|
-
return acc;
|
|
2275
|
-
}, deletedValues);
|
|
2276
|
-
};
|
|
2277
|
-
var overwrite = (element, params, excludeFrom = []) => {
|
|
2278
|
-
const { ref } = element;
|
|
2279
|
-
const changes = {};
|
|
2280
|
-
for (const e in params) {
|
|
2281
|
-
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
2282
|
-
continue;
|
|
2283
|
-
const elementProp = element[e];
|
|
2284
|
-
const paramsProp = params[e];
|
|
2285
|
-
if (paramsProp) {
|
|
2286
|
-
ref.__cache[e] = changes[e] = elementProp;
|
|
2287
|
-
ref[e] = paramsProp;
|
|
2288
|
-
}
|
|
2289
|
-
}
|
|
2290
|
-
return changes;
|
|
2291
|
-
};
|
|
2292
|
-
var overwriteShallow = (obj, params, excludeFrom = []) => {
|
|
2293
|
-
for (const e in params) {
|
|
2294
|
-
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
2295
|
-
continue;
|
|
2296
|
-
obj[e] = params[e];
|
|
2297
|
-
}
|
|
2298
|
-
return obj;
|
|
2299
|
-
};
|
|
2300
|
-
var overwriteDeep = (obj, params, excludeFrom = []) => {
|
|
2301
|
-
for (const e in params) {
|
|
2302
|
-
if (e === "__proto__")
|
|
2303
|
-
continue;
|
|
2304
|
-
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
2305
|
-
continue;
|
|
2306
|
-
const objProp = obj[e];
|
|
2307
|
-
const paramsProp = params[e];
|
|
2308
|
-
if ((0, import_types.isObjectLike)(objProp) && (0, import_types.isObjectLike)(paramsProp)) {
|
|
2309
|
-
overwriteDeep(objProp, paramsProp);
|
|
2310
|
-
} else if (paramsProp !== void 0) {
|
|
2311
|
-
obj[e] = paramsProp;
|
|
2423
|
+
destringified[prop].push(arrProp);
|
|
2312
2424
|
}
|
|
2425
|
+
});
|
|
2426
|
+
} else if ((0, import_types.isObject)(objProp)) {
|
|
2427
|
+
destringified[prop] = deepDestringify(objProp, destringified[prop]);
|
|
2428
|
+
} else {
|
|
2429
|
+
destringified[prop] = objProp;
|
|
2430
|
+
}
|
|
2431
|
+
}
|
|
2432
|
+
return destringified;
|
|
2433
|
+
};
|
|
2434
|
+
var stringToObject = (str, opts = { verbose: true }) => {
|
|
2435
|
+
try {
|
|
2436
|
+
return import_globals3.window.eval("(" + str + ")");
|
|
2437
|
+
} catch (e) {
|
|
2438
|
+
if (opts.verbose)
|
|
2439
|
+
console.warn(e);
|
|
2440
|
+
}
|
|
2441
|
+
};
|
|
2442
|
+
var diffObjects = (original, objToDiff, cache) => {
|
|
2443
|
+
for (const e in objToDiff) {
|
|
2444
|
+
if (e === "ref")
|
|
2445
|
+
continue;
|
|
2446
|
+
const originalProp = original[e];
|
|
2447
|
+
const objToDiffProp = objToDiff[e];
|
|
2448
|
+
if ((0, import_types.isObject)(originalProp) && (0, import_types.isObject)(objToDiffProp)) {
|
|
2449
|
+
cache[e] = {};
|
|
2450
|
+
diff(originalProp, objToDiffProp, cache[e]);
|
|
2451
|
+
} else if (objToDiffProp !== void 0) {
|
|
2452
|
+
cache[e] = objToDiffProp;
|
|
2453
|
+
}
|
|
2454
|
+
}
|
|
2455
|
+
return cache;
|
|
2456
|
+
};
|
|
2457
|
+
var diffArrays = (original, objToDiff, cache) => {
|
|
2458
|
+
if (original.length !== objToDiff.length) {
|
|
2459
|
+
cache = objToDiff;
|
|
2460
|
+
} else {
|
|
2461
|
+
const diffArr = [];
|
|
2462
|
+
for (let i = 0; i < original.length; i++) {
|
|
2463
|
+
const diffObj = diff(original[i], objToDiff[i]);
|
|
2464
|
+
if (Object.keys(diffObj).length > 0) {
|
|
2465
|
+
diffArr.push(diffObj);
|
|
2313
2466
|
}
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2467
|
+
}
|
|
2468
|
+
if (diffArr.length > 0) {
|
|
2469
|
+
cache = diffArr;
|
|
2470
|
+
}
|
|
2471
|
+
}
|
|
2472
|
+
return cache;
|
|
2473
|
+
};
|
|
2474
|
+
var diff = (original, objToDiff, cache = {}) => {
|
|
2475
|
+
if ((0, import_types.isArray)(original) && (0, import_types.isArray)(objToDiff)) {
|
|
2476
|
+
cache = [];
|
|
2477
|
+
diffArrays(original, objToDiff, cache);
|
|
2478
|
+
} else {
|
|
2479
|
+
diffObjects(original, objToDiff, cache);
|
|
2480
|
+
}
|
|
2481
|
+
return cache;
|
|
2482
|
+
};
|
|
2483
|
+
var hasOwnProperty = (o, ...args) => Object.prototype.hasOwnProperty.call(o, ...args);
|
|
2484
|
+
var isEmpty = (o) => Object.keys(o).length === 0;
|
|
2485
|
+
var isEmptyObject = (o) => (0, import_types.isObject)(o) && isEmpty(o);
|
|
2486
|
+
var makeObjectWithoutPrototype = () => /* @__PURE__ */ Object.create(null);
|
|
2487
|
+
var deepDiff = (lhs, rhs) => {
|
|
2488
|
+
if (lhs === rhs)
|
|
2489
|
+
return {};
|
|
2490
|
+
if (!(0, import_types.isObjectLike)(lhs) || !(0, import_types.isObjectLike)(rhs))
|
|
2491
|
+
return rhs;
|
|
2492
|
+
const deletedValues = Object.keys(lhs).reduce((acc, key) => {
|
|
2493
|
+
if (!hasOwnProperty(rhs, key)) {
|
|
2494
|
+
acc[key] = void 0;
|
|
2495
|
+
}
|
|
2496
|
+
return acc;
|
|
2497
|
+
}, makeObjectWithoutPrototype());
|
|
2498
|
+
if ((0, import_types.isDate)(lhs) || (0, import_types.isDate)(rhs)) {
|
|
2499
|
+
if (lhs.valueOf() === rhs.valueOf())
|
|
2500
|
+
return {};
|
|
2501
|
+
return rhs;
|
|
2502
|
+
}
|
|
2503
|
+
return Object.keys(rhs).reduce((acc, key) => {
|
|
2504
|
+
if (!hasOwnProperty(lhs, key)) {
|
|
2505
|
+
acc[key] = rhs[key];
|
|
2506
|
+
return acc;
|
|
2507
|
+
}
|
|
2508
|
+
const difference = diff(lhs[key], rhs[key]);
|
|
2509
|
+
if (isEmptyObject(difference) && !(0, import_types.isDate)(difference) && (isEmptyObject(lhs[key]) || !isEmptyObject(rhs[key]))) {
|
|
2510
|
+
return acc;
|
|
2511
|
+
}
|
|
2512
|
+
acc[key] = difference;
|
|
2513
|
+
return acc;
|
|
2514
|
+
}, deletedValues);
|
|
2515
|
+
};
|
|
2516
|
+
var overwrite = (element, params, excludeFrom = []) => {
|
|
2517
|
+
const { ref } = element;
|
|
2518
|
+
const changes = {};
|
|
2519
|
+
for (const e in params) {
|
|
2520
|
+
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
2521
|
+
continue;
|
|
2522
|
+
const elementProp = element[e];
|
|
2523
|
+
const paramsProp = params[e];
|
|
2524
|
+
if (paramsProp) {
|
|
2525
|
+
ref.__cache[e] = changes[e] = elementProp;
|
|
2526
|
+
ref[e] = paramsProp;
|
|
2527
|
+
}
|
|
2528
|
+
}
|
|
2529
|
+
return changes;
|
|
2530
|
+
};
|
|
2531
|
+
var overwriteShallow = (obj, params, excludeFrom = []) => {
|
|
2532
|
+
for (const e in params) {
|
|
2533
|
+
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
2534
|
+
continue;
|
|
2535
|
+
obj[e] = params[e];
|
|
2536
|
+
}
|
|
2537
|
+
return obj;
|
|
2538
|
+
};
|
|
2539
|
+
var overwriteDeep = (obj, params, excludeFrom = []) => {
|
|
2540
|
+
for (const e in params) {
|
|
2541
|
+
if (e === "__proto__")
|
|
2542
|
+
continue;
|
|
2543
|
+
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
2544
|
+
continue;
|
|
2545
|
+
const objProp = obj[e];
|
|
2546
|
+
const paramsProp = params[e];
|
|
2547
|
+
if ((0, import_types.isObjectLike)(objProp) && (0, import_types.isObjectLike)(paramsProp)) {
|
|
2548
|
+
overwriteDeep(objProp, paramsProp);
|
|
2549
|
+
} else if (paramsProp !== void 0) {
|
|
2550
|
+
obj[e] = paramsProp;
|
|
2551
|
+
}
|
|
2552
|
+
}
|
|
2553
|
+
return obj;
|
|
2554
|
+
};
|
|
2555
|
+
var mergeIfExisted = (a, b) => {
|
|
2556
|
+
if ((0, import_types.isObjectLike)(a) && (0, import_types.isObjectLike)(b))
|
|
2557
|
+
return deepMerge2(a, b);
|
|
2558
|
+
return a || b;
|
|
2559
|
+
};
|
|
2560
|
+
var flattenRecursive = (param, prop, stack = []) => {
|
|
2561
|
+
const objectized = (0, import_array.mergeAndCloneIfArray)(param);
|
|
2562
|
+
stack.push(objectized);
|
|
2563
|
+
const extendOfExtend = objectized[prop];
|
|
2564
|
+
if (extendOfExtend)
|
|
2565
|
+
flattenRecursive(extendOfExtend, prop, stack);
|
|
2566
|
+
delete objectized[prop];
|
|
2567
|
+
return stack;
|
|
2568
|
+
};
|
|
2569
|
+
var isEqualDeep = (param, element, visited = /* @__PURE__ */ new Set()) => {
|
|
2570
|
+
if (typeof param !== "object" || typeof element !== "object" || param === null || element === null) {
|
|
2571
|
+
return param === element;
|
|
2572
|
+
}
|
|
2573
|
+
if (visited.has(param) || visited.has(element)) {
|
|
2574
|
+
return true;
|
|
2575
|
+
}
|
|
2576
|
+
visited.add(param);
|
|
2577
|
+
visited.add(element);
|
|
2578
|
+
const keysParam = Object.keys(param);
|
|
2579
|
+
const keysElement = Object.keys(element);
|
|
2580
|
+
if (keysParam.length !== keysElement.length) {
|
|
2581
|
+
return false;
|
|
2582
|
+
}
|
|
2583
|
+
for (const key of keysParam) {
|
|
2584
|
+
if (!keysElement.includes(key)) {
|
|
2585
|
+
return false;
|
|
2586
|
+
}
|
|
2587
|
+
const paramProp = param[key];
|
|
2588
|
+
const elementProp = element[key];
|
|
2589
|
+
if (!isEqualDeep(paramProp, elementProp, visited)) {
|
|
2590
|
+
return false;
|
|
2591
|
+
}
|
|
2592
|
+
}
|
|
2593
|
+
return true;
|
|
2594
|
+
};
|
|
2595
|
+
var deepContains = (obj1, obj2) => {
|
|
2596
|
+
if (typeof obj1 !== typeof obj2) {
|
|
2597
|
+
return false;
|
|
2598
|
+
}
|
|
2599
|
+
if ((0, import_types.isObjectLike)(obj1)) {
|
|
2600
|
+
if (Array.isArray(obj1) && Array.isArray(obj2)) {
|
|
2601
|
+
if (obj1.length !== obj2.length) {
|
|
2342
2602
|
return false;
|
|
2343
2603
|
}
|
|
2344
|
-
for (
|
|
2345
|
-
if (!
|
|
2346
|
-
return false;
|
|
2347
|
-
}
|
|
2348
|
-
const paramProp = param[key];
|
|
2349
|
-
const elementProp = element[key];
|
|
2350
|
-
if (!isEqualDeep(paramProp, elementProp, visited)) {
|
|
2604
|
+
for (let i = 0; i < obj1.length; i++) {
|
|
2605
|
+
if (!deepContains(obj1[i], obj2[i])) {
|
|
2351
2606
|
return false;
|
|
2352
2607
|
}
|
|
2353
2608
|
}
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
}
|
|
2360
|
-
if ((0, import_types.isObjectLike)(obj1)) {
|
|
2361
|
-
if (Array.isArray(obj1) && Array.isArray(obj2)) {
|
|
2362
|
-
if (obj1.length !== obj2.length) {
|
|
2363
|
-
return false;
|
|
2364
|
-
}
|
|
2365
|
-
for (let i = 0; i < obj1.length; i++) {
|
|
2366
|
-
if (!deepContains(obj1[i], obj2[i])) {
|
|
2367
|
-
return false;
|
|
2368
|
-
}
|
|
2369
|
-
}
|
|
2370
|
-
} else if ((0, import_types.isObjectLike)(obj1) && obj2 !== null) {
|
|
2371
|
-
for (const key in obj1) {
|
|
2372
|
-
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj2, key);
|
|
2373
|
-
if (!hasOwnProperty2 || !deepContains(obj1[key], obj2[key])) {
|
|
2374
|
-
return false;
|
|
2375
|
-
}
|
|
2376
|
-
}
|
|
2609
|
+
} else if ((0, import_types.isObjectLike)(obj1) && obj2 !== null) {
|
|
2610
|
+
for (const key in obj1) {
|
|
2611
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj2, key);
|
|
2612
|
+
if (!hasOwnProperty2 || !deepContains(obj1[key], obj2[key])) {
|
|
2613
|
+
return false;
|
|
2377
2614
|
}
|
|
2378
|
-
} else {
|
|
2379
|
-
return obj2 === obj1;
|
|
2380
|
-
}
|
|
2381
|
-
return true;
|
|
2382
|
-
};
|
|
2383
|
-
var removeFromObject = (obj, props) => {
|
|
2384
|
-
if (props === void 0 || props === null)
|
|
2385
|
-
return obj;
|
|
2386
|
-
if ((0, import_types.is)(props)("string", "number")) {
|
|
2387
|
-
delete obj[props];
|
|
2388
|
-
} else if ((0, import_types.isArray)(props)) {
|
|
2389
|
-
props.forEach((prop) => delete obj[prop]);
|
|
2390
|
-
} else {
|
|
2391
|
-
throw new Error("Invalid input: props must be a string or an array of strings");
|
|
2392
2615
|
}
|
|
2393
|
-
|
|
2394
|
-
|
|
2616
|
+
}
|
|
2617
|
+
} else {
|
|
2618
|
+
return obj2 === obj1;
|
|
2395
2619
|
}
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
__export22(function_exports, {
|
|
2419
|
-
debounce: () => debounce,
|
|
2420
|
-
debounceOnContext: () => debounceOnContext,
|
|
2421
|
-
isStringFunction: () => isStringFunction,
|
|
2422
|
-
memoize: () => memoize
|
|
2423
|
-
});
|
|
2424
|
-
module22.exports = __toCommonJS22(function_exports);
|
|
2425
|
-
function debounce(func, wait, immediate) {
|
|
2426
|
-
let timeout;
|
|
2427
|
-
return function() {
|
|
2428
|
-
const context = this;
|
|
2429
|
-
const args = arguments;
|
|
2430
|
-
const later = function() {
|
|
2431
|
-
timeout = null;
|
|
2432
|
-
if (!immediate)
|
|
2433
|
-
func.apply(context, args);
|
|
2434
|
-
};
|
|
2435
|
-
const callNow = immediate && !timeout;
|
|
2436
|
-
clearTimeout(timeout);
|
|
2437
|
-
timeout = setTimeout(later, wait);
|
|
2438
|
-
if (callNow)
|
|
2439
|
-
func.apply(context, args);
|
|
2440
|
-
};
|
|
2620
|
+
return true;
|
|
2621
|
+
};
|
|
2622
|
+
var removeFromObject = (obj, props) => {
|
|
2623
|
+
if (props === void 0 || props === null)
|
|
2624
|
+
return obj;
|
|
2625
|
+
if ((0, import_types.is)(props)("string", "number")) {
|
|
2626
|
+
delete obj[props];
|
|
2627
|
+
} else if ((0, import_types.isArray)(props)) {
|
|
2628
|
+
props.forEach((prop) => delete obj[prop]);
|
|
2629
|
+
} else {
|
|
2630
|
+
throw new Error("Invalid input: props must be a string or an array of strings");
|
|
2631
|
+
}
|
|
2632
|
+
return obj;
|
|
2633
|
+
};
|
|
2634
|
+
var createObjectWithoutPrototype = (obj) => {
|
|
2635
|
+
if (obj === null || typeof obj !== "object") {
|
|
2636
|
+
return obj;
|
|
2637
|
+
}
|
|
2638
|
+
const newObj = /* @__PURE__ */ Object.create(null);
|
|
2639
|
+
for (const key in obj) {
|
|
2640
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
2641
|
+
newObj[key] = createObjectWithoutPrototype(obj[key]);
|
|
2441
2642
|
}
|
|
2442
|
-
var debounceOnContext = (element, func, timeout = 300) => {
|
|
2443
|
-
let timer;
|
|
2444
|
-
return (...args) => {
|
|
2445
|
-
clearTimeout(timer);
|
|
2446
|
-
timer = setTimeout(() => {
|
|
2447
|
-
func.apply(element, args);
|
|
2448
|
-
}, timeout);
|
|
2449
|
-
};
|
|
2450
|
-
};
|
|
2451
|
-
var memoize = (fn) => {
|
|
2452
|
-
const cache = {};
|
|
2453
|
-
return (...args) => {
|
|
2454
|
-
const n = args[0];
|
|
2455
|
-
if (n in cache) {
|
|
2456
|
-
return cache[n];
|
|
2457
|
-
} else {
|
|
2458
|
-
const result = fn(n);
|
|
2459
|
-
cache[n] = result;
|
|
2460
|
-
return result;
|
|
2461
|
-
}
|
|
2462
|
-
};
|
|
2463
|
-
};
|
|
2464
|
-
var isStringFunction = (inputString) => {
|
|
2465
|
-
const functionRegex = /^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/;
|
|
2466
|
-
return functionRegex.test(inputString);
|
|
2467
|
-
};
|
|
2468
2643
|
}
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2644
|
+
return newObj;
|
|
2645
|
+
};
|
|
2646
|
+
var checkIfKeyIsComponent = (key) => {
|
|
2647
|
+
const isFirstKeyString = (0, import_types.isString)(key);
|
|
2648
|
+
if (!isFirstKeyString)
|
|
2649
|
+
return;
|
|
2650
|
+
const firstCharKey = key.slice(0, 1);
|
|
2651
|
+
return /^[A-Z]*$/.test(firstCharKey);
|
|
2652
|
+
};
|
|
2653
|
+
var getChildrenComponentsByKey = (key, el) => {
|
|
2654
|
+
if (key === el.key || el.__ref.__componentKey === key) {
|
|
2655
|
+
return el;
|
|
2656
|
+
}
|
|
2657
|
+
if (el.extend) {
|
|
2658
|
+
const foundString = (0, import_types.isString)(el.extend) && el.extend === key;
|
|
2659
|
+
const foundInArray = (0, import_types.isArray)(el.extend) && el.extend.filter((v) => v === key).length;
|
|
2660
|
+
if (foundString || foundInArray)
|
|
2661
|
+
return el;
|
|
2662
|
+
}
|
|
2663
|
+
};
|
|
2664
|
+
var getExtendsInElement = (obj) => {
|
|
2665
|
+
let result = [];
|
|
2666
|
+
function traverse(o) {
|
|
2667
|
+
for (const key in o) {
|
|
2668
|
+
if (Object.hasOwnProperty.call(o, key)) {
|
|
2669
|
+
if (checkIfKeyIsComponent(key)) {
|
|
2670
|
+
result.push(key);
|
|
2671
|
+
}
|
|
2672
|
+
if (key === "extend") {
|
|
2673
|
+
if (typeof o[key] === "string") {
|
|
2674
|
+
result.push(o[key]);
|
|
2675
|
+
} else if (Array.isArray(o[key])) {
|
|
2676
|
+
result = result.concat(o[key]);
|
|
2677
|
+
}
|
|
2678
|
+
}
|
|
2679
|
+
if (typeof o[key] === "object" && o[key] !== null) {
|
|
2680
|
+
traverse(o[key]);
|
|
2681
|
+
}
|
|
2505
2682
|
}
|
|
2506
|
-
}
|
|
2683
|
+
}
|
|
2507
2684
|
}
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
var cookie_exports = {};
|
|
2530
|
-
__export22(cookie_exports, {
|
|
2531
|
-
getCookie: () => getCookie,
|
|
2532
|
-
isMobile: () => isMobile,
|
|
2533
|
-
setCookie: () => setCookie
|
|
2534
|
-
});
|
|
2535
|
-
module22.exports = __toCommonJS22(cookie_exports);
|
|
2536
|
-
var import_types = require_types2();
|
|
2537
|
-
var import_utils32 = require_cjs4();
|
|
2538
|
-
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
2539
|
-
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
2540
|
-
if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
|
|
2541
|
-
return;
|
|
2542
|
-
const d = /* @__PURE__ */ new Date();
|
|
2543
|
-
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
2544
|
-
const expires = `expires=${d.toUTCString()}`;
|
|
2545
|
-
import_utils32.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
2546
|
-
};
|
|
2547
|
-
var getCookie = (cname) => {
|
|
2548
|
-
if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
|
|
2549
|
-
return;
|
|
2550
|
-
const name = `${cname}=`;
|
|
2551
|
-
const decodedCookie = decodeURIComponent(import_utils32.document.cookie);
|
|
2552
|
-
const ca = decodedCookie.split(";");
|
|
2553
|
-
for (let i = 0; i < ca.length; i++) {
|
|
2554
|
-
let c = ca[i];
|
|
2555
|
-
while (c.charAt(0) === " ")
|
|
2556
|
-
c = c.substring(1);
|
|
2557
|
-
if (c.indexOf(name) === 0)
|
|
2558
|
-
return c.substring(name.length, c.length);
|
|
2559
|
-
}
|
|
2560
|
-
return "";
|
|
2561
|
-
};
|
|
2685
|
+
traverse(obj);
|
|
2686
|
+
return result;
|
|
2687
|
+
};
|
|
2688
|
+
}
|
|
2689
|
+
});
|
|
2690
|
+
var require_function2 = __commonJS2({
|
|
2691
|
+
"../../../domql/packages/utils/dist/cjs/function.js"(exports, module2) {
|
|
2692
|
+
"use strict";
|
|
2693
|
+
var __defProp22 = Object.defineProperty;
|
|
2694
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2695
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2696
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2697
|
+
var __export22 = (target, all) => {
|
|
2698
|
+
for (var name in all)
|
|
2699
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2700
|
+
};
|
|
2701
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
2702
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
2703
|
+
for (let key of __getOwnPropNames22(from))
|
|
2704
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2705
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2562
2706
|
}
|
|
2707
|
+
return to;
|
|
2708
|
+
};
|
|
2709
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2710
|
+
var function_exports = {};
|
|
2711
|
+
__export22(function_exports, {
|
|
2712
|
+
debounce: () => debounce,
|
|
2713
|
+
debounceOnContext: () => debounceOnContext,
|
|
2714
|
+
isStringFunction: () => isStringFunction,
|
|
2715
|
+
memoize: () => memoize
|
|
2563
2716
|
});
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
};
|
|
2575
|
-
var __copyProps22 = (to, from, except, desc) => {
|
|
2576
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
2577
|
-
for (let key of __getOwnPropNames22(from))
|
|
2578
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2579
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2580
|
-
}
|
|
2581
|
-
return to;
|
|
2582
|
-
};
|
|
2583
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2584
|
-
var tags_exports = {};
|
|
2585
|
-
__export22(tags_exports, {
|
|
2586
|
-
HTML_TAGS: () => HTML_TAGS,
|
|
2587
|
-
isValidHtmlTag: () => isValidHtmlTag
|
|
2588
|
-
});
|
|
2589
|
-
module22.exports = __toCommonJS22(tags_exports);
|
|
2590
|
-
var HTML_TAGS = {
|
|
2591
|
-
root: [
|
|
2592
|
-
"body",
|
|
2593
|
-
"html"
|
|
2594
|
-
],
|
|
2595
|
-
head: [
|
|
2596
|
-
"title",
|
|
2597
|
-
"base",
|
|
2598
|
-
"meta",
|
|
2599
|
-
"style"
|
|
2600
|
-
],
|
|
2601
|
-
body: [
|
|
2602
|
-
"string",
|
|
2603
|
-
"fragment",
|
|
2604
|
-
"a",
|
|
2605
|
-
"abbr",
|
|
2606
|
-
"acronym",
|
|
2607
|
-
"address",
|
|
2608
|
-
"applet",
|
|
2609
|
-
"area",
|
|
2610
|
-
"article",
|
|
2611
|
-
"aside",
|
|
2612
|
-
"audio",
|
|
2613
|
-
"b",
|
|
2614
|
-
"basefont",
|
|
2615
|
-
"bdi",
|
|
2616
|
-
"bdo",
|
|
2617
|
-
"big",
|
|
2618
|
-
"blockquote",
|
|
2619
|
-
"br",
|
|
2620
|
-
"button",
|
|
2621
|
-
"canvas",
|
|
2622
|
-
"caption",
|
|
2623
|
-
"center",
|
|
2624
|
-
"cite",
|
|
2625
|
-
"code",
|
|
2626
|
-
"search",
|
|
2627
|
-
"col",
|
|
2628
|
-
"colgroup",
|
|
2629
|
-
"data",
|
|
2630
|
-
"datalist",
|
|
2631
|
-
"dd",
|
|
2632
|
-
"del",
|
|
2633
|
-
"details",
|
|
2634
|
-
"dfn",
|
|
2635
|
-
"dialog",
|
|
2636
|
-
"dir",
|
|
2637
|
-
"div",
|
|
2638
|
-
"dl",
|
|
2639
|
-
"dt",
|
|
2640
|
-
"em",
|
|
2641
|
-
"embed",
|
|
2642
|
-
"fieldset",
|
|
2643
|
-
"figcaption",
|
|
2644
|
-
"figure",
|
|
2645
|
-
"font",
|
|
2646
|
-
"footer",
|
|
2647
|
-
"form",
|
|
2648
|
-
"frame",
|
|
2649
|
-
"frameset",
|
|
2650
|
-
"h1",
|
|
2651
|
-
"h2",
|
|
2652
|
-
"h3",
|
|
2653
|
-
"h4",
|
|
2654
|
-
"h5",
|
|
2655
|
-
"h6",
|
|
2656
|
-
"head",
|
|
2657
|
-
"header",
|
|
2658
|
-
"hr",
|
|
2659
|
-
"i",
|
|
2660
|
-
"iframe",
|
|
2661
|
-
"img",
|
|
2662
|
-
"input",
|
|
2663
|
-
"ins",
|
|
2664
|
-
"kbd",
|
|
2665
|
-
"label",
|
|
2666
|
-
"legend",
|
|
2667
|
-
"li",
|
|
2668
|
-
"link",
|
|
2669
|
-
"main",
|
|
2670
|
-
"map",
|
|
2671
|
-
"mark",
|
|
2672
|
-
"meter",
|
|
2673
|
-
"nav",
|
|
2674
|
-
"noframes",
|
|
2675
|
-
"noscript",
|
|
2676
|
-
"object",
|
|
2677
|
-
"ol",
|
|
2678
|
-
"optgroup",
|
|
2679
|
-
"option",
|
|
2680
|
-
"output",
|
|
2681
|
-
"p",
|
|
2682
|
-
"param",
|
|
2683
|
-
"picture",
|
|
2684
|
-
"pre",
|
|
2685
|
-
"progress",
|
|
2686
|
-
"hgroup",
|
|
2687
|
-
"q",
|
|
2688
|
-
"rp",
|
|
2689
|
-
"rt",
|
|
2690
|
-
"ruby",
|
|
2691
|
-
"s",
|
|
2692
|
-
"samp",
|
|
2693
|
-
"script",
|
|
2694
|
-
"section",
|
|
2695
|
-
"select",
|
|
2696
|
-
"small",
|
|
2697
|
-
"source",
|
|
2698
|
-
"span",
|
|
2699
|
-
"strike",
|
|
2700
|
-
"strong",
|
|
2701
|
-
"sub",
|
|
2702
|
-
"summary",
|
|
2703
|
-
"sup",
|
|
2704
|
-
"table",
|
|
2705
|
-
"tbody",
|
|
2706
|
-
"td",
|
|
2707
|
-
"template",
|
|
2708
|
-
"hgroup",
|
|
2709
|
-
"textarea",
|
|
2710
|
-
"tfoot",
|
|
2711
|
-
"th",
|
|
2712
|
-
"thead",
|
|
2713
|
-
"time",
|
|
2714
|
-
"tr",
|
|
2715
|
-
"track",
|
|
2716
|
-
"tt",
|
|
2717
|
-
"u",
|
|
2718
|
-
"ul",
|
|
2719
|
-
"var",
|
|
2720
|
-
"video",
|
|
2721
|
-
"wbr",
|
|
2722
|
-
// SVG
|
|
2723
|
-
"svg",
|
|
2724
|
-
"path"
|
|
2725
|
-
]
|
|
2717
|
+
module2.exports = __toCommonJS22(function_exports);
|
|
2718
|
+
function debounce(func, wait, immediate) {
|
|
2719
|
+
let timeout;
|
|
2720
|
+
return function() {
|
|
2721
|
+
const context = this;
|
|
2722
|
+
const args = arguments;
|
|
2723
|
+
const later = function() {
|
|
2724
|
+
timeout = null;
|
|
2725
|
+
if (!immediate)
|
|
2726
|
+
func.apply(context, args);
|
|
2726
2727
|
};
|
|
2727
|
-
|
|
2728
|
+
const callNow = immediate && !timeout;
|
|
2729
|
+
clearTimeout(timeout);
|
|
2730
|
+
timeout = setTimeout(later, wait);
|
|
2731
|
+
if (callNow)
|
|
2732
|
+
func.apply(context, args);
|
|
2733
|
+
};
|
|
2734
|
+
}
|
|
2735
|
+
var debounceOnContext = (element, func, timeout = 300) => {
|
|
2736
|
+
let timer;
|
|
2737
|
+
return (...args) => {
|
|
2738
|
+
clearTimeout(timer);
|
|
2739
|
+
timer = setTimeout(() => {
|
|
2740
|
+
func.apply(element, args);
|
|
2741
|
+
}, timeout);
|
|
2742
|
+
};
|
|
2743
|
+
};
|
|
2744
|
+
var memoize = (fn) => {
|
|
2745
|
+
const cache = {};
|
|
2746
|
+
return (...args) => {
|
|
2747
|
+
const n = args[0];
|
|
2748
|
+
if (n in cache) {
|
|
2749
|
+
return cache[n];
|
|
2750
|
+
} else {
|
|
2751
|
+
const result = fn(n);
|
|
2752
|
+
cache[n] = result;
|
|
2753
|
+
return result;
|
|
2754
|
+
}
|
|
2755
|
+
};
|
|
2756
|
+
};
|
|
2757
|
+
var isStringFunction = (inputString) => {
|
|
2758
|
+
const functionRegex = /^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/;
|
|
2759
|
+
return functionRegex.test(inputString);
|
|
2760
|
+
};
|
|
2761
|
+
}
|
|
2762
|
+
});
|
|
2763
|
+
var require_log2 = __commonJS2({
|
|
2764
|
+
"../../../domql/packages/utils/dist/cjs/log.js"(exports, module2) {
|
|
2765
|
+
"use strict";
|
|
2766
|
+
var __defProp22 = Object.defineProperty;
|
|
2767
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2768
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2769
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2770
|
+
var __export22 = (target, all) => {
|
|
2771
|
+
for (var name in all)
|
|
2772
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2773
|
+
};
|
|
2774
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
2775
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
2776
|
+
for (let key of __getOwnPropNames22(from))
|
|
2777
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2778
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2728
2779
|
}
|
|
2780
|
+
return to;
|
|
2781
|
+
};
|
|
2782
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2783
|
+
var log_exports = {};
|
|
2784
|
+
__export22(log_exports, {
|
|
2785
|
+
logGroupIf: () => logGroupIf,
|
|
2786
|
+
logIf: () => logIf
|
|
2729
2787
|
});
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2741
|
-
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2742
|
-
}
|
|
2743
|
-
return to;
|
|
2744
|
-
};
|
|
2745
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps22(target, mod, "default"), secondTarget && __copyProps22(secondTarget, mod, "default"));
|
|
2746
|
-
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2747
|
-
var utils_exports = {};
|
|
2748
|
-
module22.exports = __toCommonJS22(utils_exports);
|
|
2749
|
-
__reExport(utils_exports, require_key2(), module22.exports);
|
|
2750
|
-
__reExport(utils_exports, require_env2(), module22.exports);
|
|
2751
|
-
__reExport(utils_exports, require_types2(), module22.exports);
|
|
2752
|
-
__reExport(utils_exports, require_object2(), module22.exports);
|
|
2753
|
-
__reExport(utils_exports, require_function2(), module22.exports);
|
|
2754
|
-
__reExport(utils_exports, require_array2(), module22.exports);
|
|
2755
|
-
__reExport(utils_exports, require_node2(), module22.exports);
|
|
2756
|
-
__reExport(utils_exports, require_log2(), module22.exports);
|
|
2757
|
-
__reExport(utils_exports, require_string2(), module22.exports);
|
|
2758
|
-
__reExport(utils_exports, require_globals2(), module22.exports);
|
|
2759
|
-
__reExport(utils_exports, require_cookie2(), module22.exports);
|
|
2760
|
-
__reExport(utils_exports, require_tags2(), module22.exports);
|
|
2788
|
+
module2.exports = __toCommonJS22(log_exports);
|
|
2789
|
+
var logIf = (bool, ...arg) => {
|
|
2790
|
+
if (bool)
|
|
2791
|
+
arg.map((v) => console.log(v));
|
|
2792
|
+
};
|
|
2793
|
+
var logGroupIf = (bool, key, ...arg) => {
|
|
2794
|
+
if (bool) {
|
|
2795
|
+
console.group(key);
|
|
2796
|
+
arg.map((v) => console.log(v));
|
|
2797
|
+
console.groupEnd(key);
|
|
2761
2798
|
}
|
|
2799
|
+
};
|
|
2800
|
+
}
|
|
2801
|
+
});
|
|
2802
|
+
var require_cookie2 = __commonJS2({
|
|
2803
|
+
"../../../domql/packages/utils/dist/cjs/cookie.js"(exports, module2) {
|
|
2804
|
+
"use strict";
|
|
2805
|
+
var __defProp22 = Object.defineProperty;
|
|
2806
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2807
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2808
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2809
|
+
var __export22 = (target, all) => {
|
|
2810
|
+
for (var name in all)
|
|
2811
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2812
|
+
};
|
|
2813
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
2814
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
2815
|
+
for (let key of __getOwnPropNames22(from))
|
|
2816
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2817
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2818
|
+
}
|
|
2819
|
+
return to;
|
|
2820
|
+
};
|
|
2821
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2822
|
+
var cookie_exports = {};
|
|
2823
|
+
__export22(cookie_exports, {
|
|
2824
|
+
getCookie: () => getCookie,
|
|
2825
|
+
isMobile: () => isMobile,
|
|
2826
|
+
setCookie: () => setCookie
|
|
2762
2827
|
});
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
} else {
|
|
2788
|
-
document.exitFullscreen();
|
|
2828
|
+
module2.exports = __toCommonJS22(cookie_exports);
|
|
2829
|
+
var import_types = require_types2();
|
|
2830
|
+
var import_utils32 = require_cjs3();
|
|
2831
|
+
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
2832
|
+
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
2833
|
+
if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
|
|
2834
|
+
return;
|
|
2835
|
+
const d = /* @__PURE__ */ new Date();
|
|
2836
|
+
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
2837
|
+
const expires = `expires=${d.toUTCString()}`;
|
|
2838
|
+
import_utils32.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
2839
|
+
};
|
|
2840
|
+
var getCookie = (cname) => {
|
|
2841
|
+
if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
|
|
2842
|
+
return;
|
|
2843
|
+
const name = `${cname}=`;
|
|
2844
|
+
const decodedCookie = decodeURIComponent(import_utils32.document.cookie);
|
|
2845
|
+
const ca = decodedCookie.split(";");
|
|
2846
|
+
for (let i = 0; i < ca.length; i++) {
|
|
2847
|
+
let c = ca[i];
|
|
2848
|
+
while (c.charAt(0) === " ")
|
|
2849
|
+
c = c.substring(1);
|
|
2850
|
+
if (c.indexOf(name) === 0)
|
|
2851
|
+
return c.substring(name.length, c.length);
|
|
2789
2852
|
}
|
|
2853
|
+
return "";
|
|
2790
2854
|
};
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2855
|
+
}
|
|
2856
|
+
});
|
|
2857
|
+
var require_tags2 = __commonJS2({
|
|
2858
|
+
"../../../domql/packages/utils/dist/cjs/tags.js"(exports, module2) {
|
|
2859
|
+
"use strict";
|
|
2860
|
+
var __defProp22 = Object.defineProperty;
|
|
2861
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
2862
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
2863
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
2864
|
+
var __export22 = (target, all) => {
|
|
2865
|
+
for (var name in all)
|
|
2866
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
2796
2867
|
};
|
|
2797
|
-
var
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
if (!timestamp)
|
|
2805
|
-
return "";
|
|
2806
|
-
const d = new Date(timestamp);
|
|
2807
|
-
const ye = new Intl.DateTimeFormat("en", { year: "numeric" }).format(d);
|
|
2808
|
-
const mo = new Intl.DateTimeFormat("en", { month: "short" }).format(d);
|
|
2809
|
-
const da = new Intl.DateTimeFormat("en", { day: "2-digit" }).format(d);
|
|
2810
|
-
return `${da} ${mo}, ${ye}`;
|
|
2811
|
-
};
|
|
2812
|
-
var fibonacciNumberByIndex = function fibonacciNumberByIndex2(n) {
|
|
2813
|
-
const fib = [0, 1];
|
|
2814
|
-
for (let i = 2; i <= n; i++) {
|
|
2815
|
-
fib[i] = fib[i - 1] + fib[i - 2];
|
|
2816
|
-
}
|
|
2817
|
-
return fib[n];
|
|
2818
|
-
};
|
|
2819
|
-
var loadJavascriptFile = (FILE_URL, async = true, doc = document, type = "text/javascript") => {
|
|
2820
|
-
return new Promise((resolve, reject) => {
|
|
2821
|
-
try {
|
|
2822
|
-
const scriptEle = doc.createElement("script");
|
|
2823
|
-
scriptEle.type = type;
|
|
2824
|
-
scriptEle.async = async;
|
|
2825
|
-
scriptEle.src = FILE_URL;
|
|
2826
|
-
scriptEle.addEventListener("load", (ev) => {
|
|
2827
|
-
resolve({
|
|
2828
|
-
status: true
|
|
2829
|
-
});
|
|
2830
|
-
});
|
|
2831
|
-
scriptEle.addEventListener("error", (ev) => {
|
|
2832
|
-
reject({
|
|
2833
|
-
status: false,
|
|
2834
|
-
message: `Failed to load the script ${FILE_URL}`
|
|
2835
|
-
});
|
|
2836
|
-
});
|
|
2837
|
-
doc.body.appendChild(scriptEle);
|
|
2838
|
-
} catch (error) {
|
|
2839
|
-
reject(error);
|
|
2840
|
-
}
|
|
2841
|
-
});
|
|
2868
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
2869
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
2870
|
+
for (let key of __getOwnPropNames22(from))
|
|
2871
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
2872
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
2873
|
+
}
|
|
2874
|
+
return to;
|
|
2842
2875
|
};
|
|
2843
|
-
var
|
|
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
|
-
|
|
2876
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
2877
|
+
var tags_exports = {};
|
|
2878
|
+
__export22(tags_exports, {
|
|
2879
|
+
HTML_TAGS: () => HTML_TAGS,
|
|
2880
|
+
isValidHtmlTag: () => isValidHtmlTag
|
|
2881
|
+
});
|
|
2882
|
+
module2.exports = __toCommonJS22(tags_exports);
|
|
2883
|
+
var HTML_TAGS = {
|
|
2884
|
+
root: [
|
|
2885
|
+
"body",
|
|
2886
|
+
"html"
|
|
2887
|
+
],
|
|
2888
|
+
head: [
|
|
2889
|
+
"title",
|
|
2890
|
+
"base",
|
|
2891
|
+
"meta",
|
|
2892
|
+
"style"
|
|
2893
|
+
],
|
|
2894
|
+
body: [
|
|
2895
|
+
"string",
|
|
2896
|
+
"fragment",
|
|
2897
|
+
"a",
|
|
2898
|
+
"abbr",
|
|
2899
|
+
"acronym",
|
|
2900
|
+
"address",
|
|
2901
|
+
"applet",
|
|
2902
|
+
"area",
|
|
2903
|
+
"article",
|
|
2904
|
+
"aside",
|
|
2905
|
+
"audio",
|
|
2906
|
+
"b",
|
|
2907
|
+
"basefont",
|
|
2908
|
+
"bdi",
|
|
2909
|
+
"bdo",
|
|
2910
|
+
"big",
|
|
2911
|
+
"blockquote",
|
|
2912
|
+
"br",
|
|
2913
|
+
"button",
|
|
2914
|
+
"canvas",
|
|
2915
|
+
"caption",
|
|
2916
|
+
"center",
|
|
2917
|
+
"cite",
|
|
2918
|
+
"code",
|
|
2919
|
+
"search",
|
|
2920
|
+
"col",
|
|
2921
|
+
"colgroup",
|
|
2922
|
+
"data",
|
|
2923
|
+
"datalist",
|
|
2924
|
+
"dd",
|
|
2925
|
+
"del",
|
|
2926
|
+
"details",
|
|
2927
|
+
"dfn",
|
|
2928
|
+
"dialog",
|
|
2929
|
+
"dir",
|
|
2930
|
+
"div",
|
|
2931
|
+
"dl",
|
|
2932
|
+
"dt",
|
|
2933
|
+
"em",
|
|
2934
|
+
"embed",
|
|
2935
|
+
"fieldset",
|
|
2936
|
+
"figcaption",
|
|
2937
|
+
"figure",
|
|
2938
|
+
"font",
|
|
2939
|
+
"footer",
|
|
2940
|
+
"form",
|
|
2941
|
+
"frame",
|
|
2942
|
+
"frameset",
|
|
2943
|
+
"h1",
|
|
2944
|
+
"h2",
|
|
2945
|
+
"h3",
|
|
2946
|
+
"h4",
|
|
2947
|
+
"h5",
|
|
2948
|
+
"h6",
|
|
2949
|
+
"head",
|
|
2950
|
+
"header",
|
|
2951
|
+
"hr",
|
|
2952
|
+
"i",
|
|
2953
|
+
"iframe",
|
|
2954
|
+
"img",
|
|
2955
|
+
"input",
|
|
2956
|
+
"ins",
|
|
2957
|
+
"kbd",
|
|
2958
|
+
"label",
|
|
2959
|
+
"legend",
|
|
2960
|
+
"li",
|
|
2961
|
+
"link",
|
|
2962
|
+
"main",
|
|
2963
|
+
"map",
|
|
2964
|
+
"mark",
|
|
2965
|
+
"meter",
|
|
2966
|
+
"nav",
|
|
2967
|
+
"noframes",
|
|
2968
|
+
"noscript",
|
|
2969
|
+
"object",
|
|
2970
|
+
"ol",
|
|
2971
|
+
"optgroup",
|
|
2972
|
+
"option",
|
|
2973
|
+
"output",
|
|
2974
|
+
"p",
|
|
2975
|
+
"param",
|
|
2976
|
+
"picture",
|
|
2977
|
+
"pre",
|
|
2978
|
+
"progress",
|
|
2979
|
+
"hgroup",
|
|
2980
|
+
"q",
|
|
2981
|
+
"rp",
|
|
2982
|
+
"rt",
|
|
2983
|
+
"ruby",
|
|
2984
|
+
"s",
|
|
2985
|
+
"samp",
|
|
2986
|
+
"script",
|
|
2987
|
+
"section",
|
|
2988
|
+
"select",
|
|
2989
|
+
"small",
|
|
2990
|
+
"source",
|
|
2991
|
+
"span",
|
|
2992
|
+
"strike",
|
|
2993
|
+
"strong",
|
|
2994
|
+
"sub",
|
|
2995
|
+
"summary",
|
|
2996
|
+
"sup",
|
|
2997
|
+
"table",
|
|
2998
|
+
"tbody",
|
|
2999
|
+
"td",
|
|
3000
|
+
"template",
|
|
3001
|
+
"hgroup",
|
|
3002
|
+
"textarea",
|
|
3003
|
+
"tfoot",
|
|
3004
|
+
"th",
|
|
3005
|
+
"thead",
|
|
3006
|
+
"time",
|
|
3007
|
+
"tr",
|
|
3008
|
+
"track",
|
|
3009
|
+
"tt",
|
|
3010
|
+
"u",
|
|
3011
|
+
"ul",
|
|
3012
|
+
"var",
|
|
3013
|
+
"video",
|
|
3014
|
+
"wbr",
|
|
3015
|
+
// SVG
|
|
3016
|
+
"svg",
|
|
3017
|
+
"path"
|
|
3018
|
+
]
|
|
2894
3019
|
};
|
|
3020
|
+
var isValidHtmlTag = (arg) => HTML_TAGS.body.includes(arg);
|
|
2895
3021
|
}
|
|
2896
3022
|
});
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
3023
|
+
var require_cjs3 = __commonJS2({
|
|
3024
|
+
"../../../domql/packages/utils/dist/cjs/index.js"(exports, module2) {
|
|
3025
|
+
"use strict";
|
|
3026
|
+
var __defProp22 = Object.defineProperty;
|
|
3027
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
3028
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
3029
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
3030
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
3031
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
3032
|
+
for (let key of __getOwnPropNames22(from))
|
|
3033
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
3034
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
3035
|
+
}
|
|
3036
|
+
return to;
|
|
3037
|
+
};
|
|
3038
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps22(target, mod, "default"), secondTarget && __copyProps22(secondTarget, mod, "default"));
|
|
3039
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
3040
|
+
var utils_exports = {};
|
|
3041
|
+
module2.exports = __toCommonJS22(utils_exports);
|
|
3042
|
+
__reExport(utils_exports, require_key2(), module2.exports);
|
|
3043
|
+
__reExport(utils_exports, require_env2(), module2.exports);
|
|
3044
|
+
__reExport(utils_exports, require_types2(), module2.exports);
|
|
3045
|
+
__reExport(utils_exports, require_object2(), module2.exports);
|
|
3046
|
+
__reExport(utils_exports, require_function2(), module2.exports);
|
|
3047
|
+
__reExport(utils_exports, require_array2(), module2.exports);
|
|
3048
|
+
__reExport(utils_exports, require_node2(), module2.exports);
|
|
3049
|
+
__reExport(utils_exports, require_log2(), module2.exports);
|
|
3050
|
+
__reExport(utils_exports, require_string2(), module2.exports);
|
|
3051
|
+
__reExport(utils_exports, require_globals2(), module2.exports);
|
|
3052
|
+
__reExport(utils_exports, require_cookie2(), module2.exports);
|
|
3053
|
+
__reExport(utils_exports, require_tags2(), module2.exports);
|
|
3054
|
+
}
|
|
2905
3055
|
});
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
3056
|
+
var src_exports = {};
|
|
3057
|
+
__export2(src_exports, {
|
|
3058
|
+
arrayzeValue: () => arrayzeValue,
|
|
3059
|
+
copyStringToClipboard: () => copyStringToClipboard,
|
|
3060
|
+
fibonacciNumberByIndex: () => fibonacciNumberByIndex,
|
|
3061
|
+
findClosestNumber: () => findClosestNumber,
|
|
3062
|
+
findClosestNumberInFactory: () => findClosestNumberInFactory,
|
|
3063
|
+
formatDate: () => formatDate,
|
|
3064
|
+
isPhoto: () => isPhoto,
|
|
3065
|
+
loadCssFile: () => loadCssFile,
|
|
3066
|
+
loadJavascript: () => loadJavascript,
|
|
3067
|
+
loadJavascriptFile: () => loadJavascriptFile,
|
|
3068
|
+
removeChars: () => removeChars,
|
|
3069
|
+
toCamelCase: () => toCamelCase,
|
|
3070
|
+
toDashCase: () => toDashCase,
|
|
3071
|
+
toDescriptionCase: () => toDescriptionCase,
|
|
3072
|
+
toTitleCase: () => toTitleCase,
|
|
3073
|
+
toggleFullscreen: () => toggleFullscreen
|
|
3074
|
+
});
|
|
3075
|
+
module.exports = __toCommonJS2(src_exports);
|
|
3076
|
+
var import_utils2 = __toESM2(require_cjs3(), 1);
|
|
3077
|
+
var toggleFullscreen = (el) => {
|
|
3078
|
+
if (!document.fullscreenElement) {
|
|
3079
|
+
el.node.requestFullscreen().catch((err) => {
|
|
3080
|
+
console.warn(`Error attempting to enable fullscreen mode: ${err.message} (${err.name})`);
|
|
3081
|
+
});
|
|
3082
|
+
} else {
|
|
3083
|
+
document.exitFullscreen();
|
|
3084
|
+
}
|
|
3085
|
+
};
|
|
3086
|
+
var import_utils3 = __toESM2(require_cjs3(), 1);
|
|
3087
|
+
var findClosestNumber = (number, arr) => {
|
|
3088
|
+
return ((0, import_utils3.isArray)(arr) ? arr : Object.values(arr)).reduce((prev, curr) => {
|
|
3089
|
+
return Math.abs(curr - number) < Math.abs(prev - number) ? curr : prev;
|
|
3090
|
+
});
|
|
3091
|
+
};
|
|
3092
|
+
var findClosestNumberInFactory = (val, factory) => {
|
|
3093
|
+
val = parseFloat(val);
|
|
3094
|
+
if ((0, import_utils3.isObject)(factory))
|
|
3095
|
+
factory = Object.values(factory);
|
|
3096
|
+
return findClosestNumber(val, factory);
|
|
3097
|
+
};
|
|
3098
|
+
var formatDate = (timestamp) => {
|
|
3099
|
+
if (!timestamp)
|
|
3100
|
+
return "";
|
|
3101
|
+
const d = new Date(timestamp);
|
|
3102
|
+
const ye = new Intl.DateTimeFormat("en", { year: "numeric" }).format(d);
|
|
3103
|
+
const mo = new Intl.DateTimeFormat("en", { month: "short" }).format(d);
|
|
3104
|
+
const da = new Intl.DateTimeFormat("en", { day: "2-digit" }).format(d);
|
|
3105
|
+
return `${da} ${mo}, ${ye}`;
|
|
3106
|
+
};
|
|
3107
|
+
var fibonacciNumberByIndex = function fibonacciNumberByIndex2(n) {
|
|
3108
|
+
const fib = [0, 1];
|
|
3109
|
+
for (let i = 2; i <= n; i++) {
|
|
3110
|
+
fib[i] = fib[i - 1] + fib[i - 2];
|
|
3111
|
+
}
|
|
3112
|
+
return fib[n];
|
|
3113
|
+
};
|
|
3114
|
+
var loadJavascriptFile = (FILE_URL, async = false, doc = document, type = "text/javascript") => {
|
|
3115
|
+
return new Promise((resolve, reject) => {
|
|
3116
|
+
try {
|
|
3117
|
+
const scriptEle = doc.createElement("script");
|
|
3118
|
+
scriptEle.type = type;
|
|
3119
|
+
scriptEle.async = async;
|
|
3120
|
+
scriptEle.src = FILE_URL;
|
|
3121
|
+
scriptEle.addEventListener("load", (ev) => {
|
|
3122
|
+
resolve({
|
|
3123
|
+
status: true
|
|
3124
|
+
});
|
|
3125
|
+
});
|
|
3126
|
+
scriptEle.addEventListener("error", (ev) => {
|
|
3127
|
+
reject({
|
|
3128
|
+
status: false,
|
|
3129
|
+
message: `Failed to load the script ${FILE_URL}`
|
|
3130
|
+
});
|
|
3131
|
+
});
|
|
3132
|
+
doc.body.appendChild(scriptEle);
|
|
3133
|
+
} catch (error) {
|
|
3134
|
+
reject(error);
|
|
3135
|
+
}
|
|
3136
|
+
});
|
|
3137
|
+
};
|
|
3138
|
+
var loadCssFile = (FILE_URL, async = false, doc = document, type = "text/javascript") => {
|
|
3139
|
+
return new Promise((resolve, reject) => {
|
|
3140
|
+
try {
|
|
3141
|
+
const linkElem = doc.createElement("link");
|
|
3142
|
+
linkElem.rel = "stylesheet";
|
|
3143
|
+
linkElem.href = FILE_URL;
|
|
3144
|
+
linkElem.addEventListener("load", (ev) => {
|
|
3145
|
+
resolve({
|
|
3146
|
+
status: true
|
|
3147
|
+
});
|
|
3148
|
+
});
|
|
3149
|
+
doc.head.appendChild(linkElem);
|
|
3150
|
+
} catch (error) {
|
|
3151
|
+
reject(error);
|
|
3152
|
+
}
|
|
3153
|
+
});
|
|
3154
|
+
};
|
|
3155
|
+
var loadJavascript = (body, async = false, doc = document, type = "text/javascript", id = "smbls-script") => {
|
|
3156
|
+
try {
|
|
3157
|
+
const scriptEle = doc.createElement("script");
|
|
3158
|
+
scriptEle.type = type;
|
|
3159
|
+
scriptEle.async = async;
|
|
3160
|
+
scriptEle.id = id;
|
|
3161
|
+
scriptEle.innerHTML = body;
|
|
3162
|
+
doc.body.appendChild(scriptEle);
|
|
3163
|
+
} catch (error) {
|
|
3164
|
+
console.warn(error);
|
|
3165
|
+
}
|
|
3166
|
+
};
|
|
3167
|
+
var isPhoto = (format) => ["jpeg", "gif", "jpg", "png", "tiff", "woff"].includes(format);
|
|
3168
|
+
var copyStringToClipboard = (str) => {
|
|
3169
|
+
const el = document.createElement("textarea");
|
|
3170
|
+
el.value = str;
|
|
3171
|
+
el.setAttribute("readonly", "");
|
|
3172
|
+
el.style = { position: "absolute", left: "-9999px" };
|
|
3173
|
+
document.body.appendChild(el);
|
|
3174
|
+
el.select();
|
|
3175
|
+
document.execCommand("copy");
|
|
3176
|
+
document.body.removeChild(el);
|
|
3177
|
+
};
|
|
3178
|
+
var removeChars = (str) => {
|
|
3179
|
+
return str.replace(/[^a-zA-Z0-9_]/g, "");
|
|
3180
|
+
};
|
|
3181
|
+
var toCamelCase = (str) => {
|
|
3182
|
+
return str.replace(/(?:^\w|[A-Z]|\b\w)/g, function(word, index) {
|
|
3183
|
+
return index === 0 ? word.toLowerCase() : word.toUpperCase();
|
|
3184
|
+
}).replaceAll(/\s+/g, "");
|
|
3185
|
+
};
|
|
3186
|
+
var toTitleCase = (str) => str && str.replace(
|
|
3187
|
+
/\w\S*/g,
|
|
3188
|
+
(txt) => {
|
|
3189
|
+
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
|
|
3190
|
+
}
|
|
3191
|
+
);
|
|
3192
|
+
var toDashCase = (val) => val.replace(/[^a-zA-Z0-9]/g, " ").trim().toLowerCase().replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
3193
|
+
var toDescriptionCase = (str = "") => {
|
|
3194
|
+
if (typeof str !== "string")
|
|
3195
|
+
return;
|
|
3196
|
+
const result = str.replace(/([A-Z])/g, " $1");
|
|
3197
|
+
return result.charAt(0).toUpperCase() + result.slice(1);
|
|
3198
|
+
};
|
|
3199
|
+
var arrayzeValue = (val) => {
|
|
3200
|
+
if ((0, import_utils2.isArray)(val))
|
|
3201
|
+
return val;
|
|
3202
|
+
if ((0, import_utils2.isString)(val))
|
|
3203
|
+
return val.split(" ");
|
|
3204
|
+
if ((0, import_utils2.isObject)(val))
|
|
3205
|
+
return Object.values(val);
|
|
3206
|
+
if ((0, import_utils2.isNumber)(val))
|
|
3207
|
+
return [val];
|
|
3208
|
+
};
|
|
2916
3209
|
|
|
2917
3210
|
// src/factory.js
|
|
2918
|
-
var
|
|
3211
|
+
var import_utils4 = __toESM(require_cjs2(), 1);
|
|
2919
3212
|
|
|
2920
3213
|
// src/defaultConfig/index.js
|
|
2921
3214
|
var defaultConfig_exports = {};
|
|
@@ -3122,7 +3415,7 @@ var CONFIG = {
|
|
|
3122
3415
|
CSS_VARS,
|
|
3123
3416
|
...defaultConfig_exports
|
|
3124
3417
|
};
|
|
3125
|
-
var cachedConfig = (0,
|
|
3418
|
+
var cachedConfig = (0, import_utils4.deepClone)(CONFIG);
|
|
3126
3419
|
var FACTORY = {
|
|
3127
3420
|
active: "0",
|
|
3128
3421
|
0: CONFIG
|
|
@@ -3132,10 +3425,10 @@ var getActiveConfig = (def) => {
|
|
|
3132
3425
|
};
|
|
3133
3426
|
|
|
3134
3427
|
// src/utils/var.js
|
|
3135
|
-
var
|
|
3428
|
+
var import_utils7 = __toESM(require_cjs2(), 1);
|
|
3136
3429
|
|
|
3137
3430
|
// src/utils/sprite.js
|
|
3138
|
-
var
|
|
3431
|
+
var import_utils8 = __toESM(require_cjs2(), 1);
|
|
3139
3432
|
var generateSprite = (icons) => {
|
|
3140
3433
|
const CONFIG2 = getActiveConfig();
|
|
3141
3434
|
let sprite = "";
|
|
@@ -3149,7 +3442,7 @@ var generateSprite = (icons) => {
|
|
|
3149
3442
|
return sprite;
|
|
3150
3443
|
};
|
|
3151
3444
|
var parseRootAttributes = (htmlString) => {
|
|
3152
|
-
if (!(0,
|
|
3445
|
+
if (!(0, import_utils8.isString)(htmlString)) {
|
|
3153
3446
|
return console.warn(`parseRootAttributes: ${htmlString} is not a string`);
|
|
3154
3447
|
}
|
|
3155
3448
|
const match = htmlString.match(/<svg\s+(.*?)>/);
|
|
@@ -3169,7 +3462,7 @@ var replaceIdsAndUrls = (code, key) => {
|
|
|
3169
3462
|
const urlRegex = /url\(#([^)]*)\)/g;
|
|
3170
3463
|
const matches = code.match(/id="([^"]*)"/g);
|
|
3171
3464
|
let replacedCode = code;
|
|
3172
|
-
if ((0,
|
|
3465
|
+
if ((0, import_utils8.isArray)(matches)) {
|
|
3173
3466
|
matches.forEach(() => {
|
|
3174
3467
|
const randomKey = Math.floor(Math.random() * 1e5);
|
|
3175
3468
|
replacedCode = code.replace(idRegex, `id="${key}-${randomKey}"`).replace(urlRegex, `url(#${key}-${randomKey})`);
|