@symbo.ls/scratch 2.11.410 → 2.11.429
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/factory.js +18 -4
- package/dist/cjs/index.js +2297 -2248
- package/dist/cjs/set.js +2234 -2187
- package/dist/cjs/system/color.js +2145 -2101
- package/dist/cjs/system/document.js +2072 -2028
- package/dist/cjs/system/font.js +1846 -1801
- package/dist/cjs/system/index.js +2277 -2230
- package/dist/cjs/system/reset.js +2057 -2013
- package/dist/cjs/system/shadow.js +2154 -2109
- package/dist/cjs/system/spacing.js +1907 -1862
- package/dist/cjs/system/svg.js +1837 -1793
- package/dist/cjs/system/theme.js +2153 -2109
- package/dist/cjs/system/timing.js +1908 -1861
- package/dist/cjs/system/typography.js +2065 -2021
- package/dist/cjs/transforms/index.js +2176 -2129
- package/dist/cjs/utils/color.js +18 -4
- package/dist/cjs/utils/index.js +2082 -2036
- package/dist/cjs/utils/sequence.js +1820 -1774
- package/dist/cjs/utils/sprite.js +18 -4
- package/dist/cjs/utils/var.js +2033 -1989
- package/package.json +2 -2
- package/src/utils/sequence.js +2 -1
|
@@ -30,1590 +30,1703 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
30
|
));
|
|
31
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
32
|
|
|
33
|
-
//
|
|
34
|
-
var
|
|
35
|
-
"
|
|
33
|
+
// ../utils/dist/cjs/index.js
|
|
34
|
+
var require_cjs = __commonJS({
|
|
35
|
+
"../utils/dist/cjs/index.js"(exports, module2) {
|
|
36
36
|
"use strict";
|
|
37
|
-
var
|
|
38
|
-
var
|
|
39
|
-
var
|
|
40
|
-
var
|
|
41
|
-
var
|
|
37
|
+
var __create2 = Object.create;
|
|
38
|
+
var __defProp2 = Object.defineProperty;
|
|
39
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
40
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
41
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
|
42
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
43
|
+
var __commonJS2 = (cb, mod) => function __require() {
|
|
44
|
+
return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
45
|
+
};
|
|
46
|
+
var __export2 = (target, all) => {
|
|
42
47
|
for (var name in all)
|
|
43
|
-
|
|
48
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
44
49
|
};
|
|
45
|
-
var
|
|
50
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
46
51
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
47
|
-
for (let key of
|
|
48
|
-
if (!
|
|
49
|
-
|
|
52
|
+
for (let key of __getOwnPropNames2(from))
|
|
53
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
54
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
50
55
|
}
|
|
51
56
|
return to;
|
|
52
57
|
};
|
|
53
|
-
var
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
58
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
59
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
60
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
61
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
62
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
63
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
|
64
|
+
mod
|
|
65
|
+
));
|
|
66
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
67
|
+
var require_key2 = __commonJS2({
|
|
68
|
+
"../../../domql/packages/utils/dist/cjs/key.js"(exports2, module22) {
|
|
69
|
+
"use strict";
|
|
70
|
+
var __defProp22 = Object.defineProperty;
|
|
71
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
72
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
73
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
74
|
+
var __export22 = (target, all) => {
|
|
75
|
+
for (var name in all)
|
|
76
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
77
|
+
};
|
|
78
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
79
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
80
|
+
for (let key of __getOwnPropNames22(from))
|
|
81
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
82
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
83
|
+
}
|
|
84
|
+
return to;
|
|
85
|
+
};
|
|
86
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
87
|
+
var key_exports = {};
|
|
88
|
+
__export22(key_exports, {
|
|
89
|
+
createSnapshotId: () => createSnapshotId,
|
|
90
|
+
generateKey: () => generateKey
|
|
91
|
+
});
|
|
92
|
+
module22.exports = __toCommonJS22(key_exports);
|
|
93
|
+
var generateKey = /* @__PURE__ */ function() {
|
|
94
|
+
let index = 0;
|
|
95
|
+
function newId() {
|
|
96
|
+
index++;
|
|
97
|
+
return index;
|
|
98
|
+
}
|
|
99
|
+
return newId;
|
|
100
|
+
}();
|
|
101
|
+
var createSnapshotId = generateKey;
|
|
65
102
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
var
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
103
|
+
});
|
|
104
|
+
var require_env2 = __commonJS2({
|
|
105
|
+
"../../../domql/packages/utils/dist/cjs/env.js"(exports2, module22) {
|
|
106
|
+
"use strict";
|
|
107
|
+
var __defProp22 = Object.defineProperty;
|
|
108
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
109
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
110
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
111
|
+
var __export22 = (target, all) => {
|
|
112
|
+
for (var name in all)
|
|
113
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
114
|
+
};
|
|
115
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
116
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
117
|
+
for (let key of __getOwnPropNames22(from))
|
|
118
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
119
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
120
|
+
}
|
|
121
|
+
return to;
|
|
122
|
+
};
|
|
123
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
124
|
+
var env_exports = {};
|
|
125
|
+
__export22(env_exports, {
|
|
126
|
+
NODE_ENV: () => NODE_ENV,
|
|
127
|
+
getNev: () => getNev,
|
|
128
|
+
isDevelopment: () => isDevelopment,
|
|
129
|
+
isProduction: () => isProduction,
|
|
130
|
+
isTest: () => isTest
|
|
131
|
+
});
|
|
132
|
+
module22.exports = __toCommonJS22(env_exports);
|
|
133
|
+
var NODE_ENV = "development";
|
|
134
|
+
var isProduction = (env = NODE_ENV) => env === "production" || env === "prod" || env !== "development" && env !== "dev" && env !== "test";
|
|
135
|
+
var isTest = (env = NODE_ENV) => env === "test";
|
|
136
|
+
var isDevelopment = (env = NODE_ENV) => env === "development" || env === "dev";
|
|
137
|
+
var getNev = (key, env = NODE_ENV) => env[key];
|
|
89
138
|
}
|
|
90
|
-
return to;
|
|
91
|
-
};
|
|
92
|
-
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
93
|
-
var env_exports = {};
|
|
94
|
-
__export3(env_exports, {
|
|
95
|
-
NODE_ENV: () => NODE_ENV,
|
|
96
|
-
getNev: () => getNev,
|
|
97
|
-
isDevelopment: () => isDevelopment,
|
|
98
|
-
isProduction: () => isProduction,
|
|
99
|
-
isTest: () => isTest
|
|
100
139
|
});
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
140
|
+
var require_globals2 = __commonJS2({
|
|
141
|
+
"../../../domql/packages/utils/dist/cjs/globals.js"(exports2, module22) {
|
|
142
|
+
"use strict";
|
|
143
|
+
var __defProp22 = Object.defineProperty;
|
|
144
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
145
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
146
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
147
|
+
var __export22 = (target, all) => {
|
|
148
|
+
for (var name in all)
|
|
149
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
150
|
+
};
|
|
151
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
152
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
153
|
+
for (let key of __getOwnPropNames22(from))
|
|
154
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
155
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
156
|
+
}
|
|
157
|
+
return to;
|
|
158
|
+
};
|
|
159
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
160
|
+
var globals_exports = {};
|
|
161
|
+
__export22(globals_exports, {
|
|
162
|
+
document: () => document22,
|
|
163
|
+
global: () => global,
|
|
164
|
+
self: () => self,
|
|
165
|
+
window: () => window22
|
|
166
|
+
});
|
|
167
|
+
module22.exports = __toCommonJS22(globals_exports);
|
|
168
|
+
var global = globalThis;
|
|
169
|
+
var self = globalThis;
|
|
170
|
+
var window22 = globalThis;
|
|
171
|
+
var document22 = window22.document;
|
|
127
172
|
}
|
|
128
|
-
return to;
|
|
129
|
-
};
|
|
130
|
-
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
131
|
-
var globals_exports = {};
|
|
132
|
-
__export3(globals_exports, {
|
|
133
|
-
document: () => document3,
|
|
134
|
-
global: () => global,
|
|
135
|
-
self: () => self,
|
|
136
|
-
window: () => window2
|
|
137
173
|
});
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
174
|
+
var require_node2 = __commonJS2({
|
|
175
|
+
"../../../domql/packages/utils/dist/cjs/node.js"(exports2, module22) {
|
|
176
|
+
"use strict";
|
|
177
|
+
var __defProp22 = Object.defineProperty;
|
|
178
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
179
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
180
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
181
|
+
var __export22 = (target, all) => {
|
|
182
|
+
for (var name in all)
|
|
183
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
184
|
+
};
|
|
185
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
186
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
187
|
+
for (let key of __getOwnPropNames22(from))
|
|
188
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
189
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
190
|
+
}
|
|
191
|
+
return to;
|
|
192
|
+
};
|
|
193
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
194
|
+
var node_exports = {};
|
|
195
|
+
__export22(node_exports, {
|
|
196
|
+
isHtmlElement: () => isHtmlElement,
|
|
197
|
+
isNode: () => isNode
|
|
198
|
+
});
|
|
199
|
+
module22.exports = __toCommonJS22(node_exports);
|
|
200
|
+
var import_globals2 = require_globals2();
|
|
201
|
+
var isNode = (obj) => {
|
|
202
|
+
return (typeof Node === "object" ? obj instanceof import_globals2.window.Node : obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string") || false;
|
|
203
|
+
};
|
|
204
|
+
var isHtmlElement = (obj) => {
|
|
205
|
+
return (typeof HTMLElement === "object" ? obj instanceof import_globals2.window.HTMLElement : obj && typeof obj === "object" && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === "string") || false;
|
|
206
|
+
};
|
|
163
207
|
}
|
|
164
|
-
return to;
|
|
165
|
-
};
|
|
166
|
-
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
167
|
-
var node_exports = {};
|
|
168
|
-
__export3(node_exports, {
|
|
169
|
-
isHtmlElement: () => isHtmlElement,
|
|
170
|
-
isNode: () => isNode
|
|
171
208
|
});
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
});
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
209
|
+
var require_types2 = __commonJS2({
|
|
210
|
+
"../../../domql/packages/utils/dist/cjs/types.js"(exports2, module22) {
|
|
211
|
+
"use strict";
|
|
212
|
+
var __defProp22 = Object.defineProperty;
|
|
213
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
214
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
215
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
216
|
+
var __export22 = (target, all) => {
|
|
217
|
+
for (var name in all)
|
|
218
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
219
|
+
};
|
|
220
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
221
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
222
|
+
for (let key of __getOwnPropNames22(from))
|
|
223
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
224
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
225
|
+
}
|
|
226
|
+
return to;
|
|
227
|
+
};
|
|
228
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
229
|
+
var types_exports = {};
|
|
230
|
+
__export22(types_exports, {
|
|
231
|
+
TYPES: () => TYPES,
|
|
232
|
+
is: () => is,
|
|
233
|
+
isArray: () => isArray3,
|
|
234
|
+
isBoolean: () => isBoolean,
|
|
235
|
+
isDate: () => isDate,
|
|
236
|
+
isDefined: () => isDefined2,
|
|
237
|
+
isFunction: () => isFunction,
|
|
238
|
+
isNot: () => isNot,
|
|
239
|
+
isNull: () => isNull,
|
|
240
|
+
isNumber: () => isNumber2,
|
|
241
|
+
isObject: () => isObject3,
|
|
242
|
+
isObjectLike: () => isObjectLike2,
|
|
243
|
+
isString: () => isString22,
|
|
244
|
+
isUndefined: () => isUndefined
|
|
245
|
+
});
|
|
246
|
+
module22.exports = __toCommonJS22(types_exports);
|
|
247
|
+
var import_node = require_node2();
|
|
248
|
+
var isObject3 = (arg) => {
|
|
249
|
+
if (arg === null)
|
|
250
|
+
return false;
|
|
251
|
+
return typeof arg === "object" && arg.constructor === Object;
|
|
252
|
+
};
|
|
253
|
+
var isString22 = (arg) => typeof arg === "string";
|
|
254
|
+
var isNumber2 = (arg) => typeof arg === "number";
|
|
255
|
+
var isFunction = (arg) => typeof arg === "function";
|
|
256
|
+
var isBoolean = (arg) => arg === true || arg === false;
|
|
257
|
+
var isNull = (arg) => arg === null;
|
|
258
|
+
var isArray3 = (arg) => Array.isArray(arg);
|
|
259
|
+
var isDate = (d) => d instanceof Date;
|
|
260
|
+
var isObjectLike2 = (arg) => {
|
|
261
|
+
if (arg === null)
|
|
262
|
+
return false;
|
|
263
|
+
return typeof arg === "object";
|
|
264
|
+
};
|
|
265
|
+
var isDefined2 = (arg) => {
|
|
266
|
+
return isObject3(arg) || isObjectLike2(arg) || isString22(arg) || isNumber2(arg) || isFunction(arg) || isArray3(arg) || isObjectLike2(arg) || isBoolean(arg) || isDate(arg) || isNull(arg);
|
|
267
|
+
};
|
|
268
|
+
var isUndefined = (arg) => {
|
|
269
|
+
return arg === void 0;
|
|
270
|
+
};
|
|
271
|
+
var TYPES = {
|
|
272
|
+
boolean: isBoolean,
|
|
273
|
+
array: isArray3,
|
|
274
|
+
object: isObject3,
|
|
275
|
+
string: isString22,
|
|
276
|
+
date: isDate,
|
|
277
|
+
number: isNumber2,
|
|
278
|
+
null: isNull,
|
|
279
|
+
function: isFunction,
|
|
280
|
+
objectLike: isObjectLike2,
|
|
281
|
+
node: import_node.isNode,
|
|
282
|
+
htmlElement: import_node.isHtmlElement,
|
|
283
|
+
defined: isDefined2
|
|
284
|
+
};
|
|
285
|
+
var is = (arg) => {
|
|
286
|
+
return (...args) => {
|
|
287
|
+
return args.map((val) => TYPES[val](arg)).filter((v) => v).length > 0;
|
|
288
|
+
};
|
|
289
|
+
};
|
|
290
|
+
var isNot = (arg) => {
|
|
291
|
+
return (...args) => {
|
|
292
|
+
return args.map((val) => TYPES[val](arg)).filter((v) => v).length === 0;
|
|
293
|
+
};
|
|
294
|
+
};
|
|
200
295
|
}
|
|
201
|
-
return to;
|
|
202
|
-
};
|
|
203
|
-
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
204
|
-
var types_exports = {};
|
|
205
|
-
__export3(types_exports, {
|
|
206
|
-
TYPES: () => TYPES,
|
|
207
|
-
is: () => is,
|
|
208
|
-
isArray: () => isArray2,
|
|
209
|
-
isBoolean: () => isBoolean,
|
|
210
|
-
isDate: () => isDate,
|
|
211
|
-
isDefined: () => isDefined2,
|
|
212
|
-
isFunction: () => isFunction,
|
|
213
|
-
isNot: () => isNot,
|
|
214
|
-
isNull: () => isNull,
|
|
215
|
-
isNumber: () => isNumber2,
|
|
216
|
-
isObject: () => isObject2,
|
|
217
|
-
isObjectLike: () => isObjectLike2,
|
|
218
|
-
isString: () => isString4,
|
|
219
|
-
isUndefined: () => isUndefined
|
|
220
296
|
});
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
297
|
+
var require_array2 = __commonJS2({
|
|
298
|
+
"../../../domql/packages/utils/dist/cjs/array.js"(exports2, module22) {
|
|
299
|
+
"use strict";
|
|
300
|
+
var __defProp22 = Object.defineProperty;
|
|
301
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
302
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
303
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
304
|
+
var __export22 = (target, all) => {
|
|
305
|
+
for (var name in all)
|
|
306
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
307
|
+
};
|
|
308
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
309
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
310
|
+
for (let key of __getOwnPropNames22(from))
|
|
311
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
312
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
313
|
+
}
|
|
314
|
+
return to;
|
|
315
|
+
};
|
|
316
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
317
|
+
var array_exports = {};
|
|
318
|
+
__export22(array_exports, {
|
|
319
|
+
addItemAfterEveryElement: () => addItemAfterEveryElement,
|
|
320
|
+
arrayContainsOtherArray: () => arrayContainsOtherArray,
|
|
321
|
+
arraysEqual: () => arraysEqual,
|
|
322
|
+
createNestedObject: () => createNestedObject,
|
|
323
|
+
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
324
|
+
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
325
|
+
getFrequencyInArray: () => getFrequencyInArray,
|
|
326
|
+
joinArrays: () => joinArrays,
|
|
327
|
+
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
328
|
+
mergeArray: () => mergeArray,
|
|
329
|
+
removeFromArray: () => removeFromArray,
|
|
330
|
+
removeValueFromArray: () => removeValueFromArray,
|
|
331
|
+
removeValueFromArrayAll: () => removeValueFromArrayAll,
|
|
332
|
+
reorderArrayByValues: () => reorderArrayByValues,
|
|
333
|
+
swapItemsInArray: () => swapItemsInArray
|
|
334
|
+
});
|
|
335
|
+
module22.exports = __toCommonJS22(array_exports);
|
|
336
|
+
var import_object = require_object2();
|
|
337
|
+
var import_types = require_types2();
|
|
338
|
+
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
339
|
+
return arr2.every((val) => arr1.includes(val));
|
|
340
|
+
};
|
|
341
|
+
var getFrequencyInArray = (arr, value) => {
|
|
342
|
+
return arr.reduce((count, currentValue) => {
|
|
343
|
+
return currentValue === value ? count + 1 : count;
|
|
344
|
+
}, 0);
|
|
345
|
+
};
|
|
346
|
+
var removeFromArray = (arr, index) => {
|
|
347
|
+
if ((0, import_types.isString)(index))
|
|
348
|
+
index = parseInt(index);
|
|
349
|
+
if ((0, import_types.isNumber)(index)) {
|
|
350
|
+
if (index < 0 || index >= arr.length || isNaN(index)) {
|
|
351
|
+
throw new Error("Invalid index");
|
|
352
|
+
}
|
|
353
|
+
arr.splice(index, 1);
|
|
354
|
+
} else if ((0, import_types.isArray)(index)) {
|
|
355
|
+
index.forEach((idx) => removeFromArray(arr, idx));
|
|
356
|
+
} else {
|
|
357
|
+
throw new Error("Invalid index");
|
|
358
|
+
}
|
|
359
|
+
return arr;
|
|
360
|
+
};
|
|
361
|
+
var swapItemsInArray = (arr, i, j) => {
|
|
362
|
+
[arr[i], arr[j]] = [arr[j], arr[i]];
|
|
363
|
+
};
|
|
364
|
+
var joinArrays = (...arrays) => {
|
|
365
|
+
return [].concat(...arrays);
|
|
366
|
+
};
|
|
367
|
+
var mergeArray = (arr, excludeFrom = []) => {
|
|
368
|
+
return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepClone)(c, excludeFrom), excludeFrom), {});
|
|
369
|
+
};
|
|
370
|
+
var mergeAndCloneIfArray = (obj) => {
|
|
371
|
+
return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepClone)(obj);
|
|
372
|
+
};
|
|
373
|
+
var cutArrayBeforeValue = (arr, value) => {
|
|
374
|
+
const index = arr.indexOf(value);
|
|
375
|
+
if (index !== -1) {
|
|
376
|
+
return arr.slice(0, index);
|
|
377
|
+
}
|
|
378
|
+
return arr;
|
|
379
|
+
};
|
|
380
|
+
var cutArrayAfterValue = (arr, value) => {
|
|
381
|
+
if (!(0, import_types.isArray)(arr))
|
|
382
|
+
return;
|
|
383
|
+
const index = arr.indexOf(value);
|
|
384
|
+
if (index !== -1) {
|
|
385
|
+
return arr.slice(index + 1);
|
|
386
|
+
}
|
|
387
|
+
return arr;
|
|
388
|
+
};
|
|
389
|
+
var createNestedObject = (arr, lastValue) => {
|
|
390
|
+
const nestedObject = {};
|
|
391
|
+
if (arr.length === 0) {
|
|
392
|
+
return lastValue;
|
|
393
|
+
}
|
|
394
|
+
arr.reduce((obj, value, index) => {
|
|
395
|
+
if (!obj[value]) {
|
|
396
|
+
obj[value] = {};
|
|
397
|
+
}
|
|
398
|
+
if (index === arr.length - 1 && lastValue) {
|
|
399
|
+
obj[value] = lastValue;
|
|
400
|
+
}
|
|
401
|
+
return obj[value];
|
|
402
|
+
}, nestedObject);
|
|
403
|
+
return nestedObject;
|
|
404
|
+
};
|
|
405
|
+
var removeValueFromArray = (arr, value) => {
|
|
406
|
+
const index = arr.indexOf(value);
|
|
407
|
+
if (index > -1) {
|
|
408
|
+
const newArray = [...arr];
|
|
409
|
+
newArray.splice(index, 1);
|
|
410
|
+
return newArray;
|
|
411
|
+
}
|
|
412
|
+
return arr;
|
|
413
|
+
};
|
|
414
|
+
var removeValueFromArrayAll = (arr, value) => {
|
|
415
|
+
return arr.filter((item) => item !== value);
|
|
416
|
+
};
|
|
417
|
+
var addItemAfterEveryElement = (array, item) => {
|
|
418
|
+
const result = [];
|
|
419
|
+
for (let i = 0; i < array.length; i++) {
|
|
420
|
+
result.push(array[i]);
|
|
421
|
+
if (i < array.length - 1) {
|
|
422
|
+
result.push(item);
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
return result;
|
|
426
|
+
};
|
|
427
|
+
var reorderArrayByValues = (array, valueToMove, insertBeforeValue) => {
|
|
428
|
+
const newArray = [...array];
|
|
429
|
+
const indexToMove = newArray.indexOf(valueToMove);
|
|
430
|
+
const indexToInsertBefore = newArray.indexOf(insertBeforeValue);
|
|
431
|
+
if (indexToMove !== -1 && indexToInsertBefore !== -1) {
|
|
432
|
+
const removedItem = newArray.splice(indexToMove, 1)[0];
|
|
433
|
+
const insertIndex = indexToInsertBefore < indexToMove ? indexToInsertBefore : indexToInsertBefore + 1;
|
|
434
|
+
newArray.splice(insertIndex, 0, removedItem);
|
|
435
|
+
}
|
|
436
|
+
return newArray;
|
|
437
|
+
};
|
|
438
|
+
var arraysEqual = (arr1, arr2) => {
|
|
439
|
+
if (arr1.length !== arr2.length) {
|
|
440
|
+
return false;
|
|
441
|
+
}
|
|
442
|
+
for (let i = 0; i < arr1.length; i++) {
|
|
443
|
+
if (arr1[i] !== arr2[i]) {
|
|
444
|
+
return false;
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
return true;
|
|
448
|
+
};
|
|
290
449
|
}
|
|
291
|
-
return to;
|
|
292
|
-
};
|
|
293
|
-
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
294
|
-
var array_exports = {};
|
|
295
|
-
__export3(array_exports, {
|
|
296
|
-
addItemAfterEveryElement: () => addItemAfterEveryElement,
|
|
297
|
-
arrayContainsOtherArray: () => arrayContainsOtherArray,
|
|
298
|
-
arraysEqual: () => arraysEqual,
|
|
299
|
-
createNestedObject: () => createNestedObject,
|
|
300
|
-
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
301
|
-
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
302
|
-
getFrequencyInArray: () => getFrequencyInArray,
|
|
303
|
-
joinArrays: () => joinArrays,
|
|
304
|
-
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
305
|
-
mergeArray: () => mergeArray,
|
|
306
|
-
removeFromArray: () => removeFromArray,
|
|
307
|
-
removeValueFromArray: () => removeValueFromArray,
|
|
308
|
-
removeValueFromArrayAll: () => removeValueFromArrayAll,
|
|
309
|
-
reorderArrayByValues: () => reorderArrayByValues,
|
|
310
|
-
swapItemsInArray: () => swapItemsInArray
|
|
311
450
|
});
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
var cutArrayBeforeValue = (arr, value) => {
|
|
351
|
-
const index = arr.indexOf(value);
|
|
352
|
-
if (index !== -1) {
|
|
353
|
-
return arr.slice(0, index);
|
|
354
|
-
}
|
|
355
|
-
return arr;
|
|
356
|
-
};
|
|
357
|
-
var cutArrayAfterValue = (arr, value) => {
|
|
358
|
-
if (!(0, import_types.isArray)(arr))
|
|
359
|
-
return;
|
|
360
|
-
const index = arr.indexOf(value);
|
|
361
|
-
if (index !== -1) {
|
|
362
|
-
return arr.slice(index + 1);
|
|
363
|
-
}
|
|
364
|
-
return arr;
|
|
365
|
-
};
|
|
366
|
-
var createNestedObject = (arr, lastValue) => {
|
|
367
|
-
const nestedObject = {};
|
|
368
|
-
if (arr.length === 0) {
|
|
369
|
-
return lastValue;
|
|
370
|
-
}
|
|
371
|
-
arr.reduce((obj, value, index) => {
|
|
372
|
-
if (!obj[value]) {
|
|
373
|
-
obj[value] = {};
|
|
374
|
-
}
|
|
375
|
-
if (index === arr.length - 1 && lastValue) {
|
|
376
|
-
obj[value] = lastValue;
|
|
377
|
-
}
|
|
378
|
-
return obj[value];
|
|
379
|
-
}, nestedObject);
|
|
380
|
-
return nestedObject;
|
|
381
|
-
};
|
|
382
|
-
var removeValueFromArray = (arr, value) => {
|
|
383
|
-
const index = arr.indexOf(value);
|
|
384
|
-
if (index > -1) {
|
|
385
|
-
const newArray = [...arr];
|
|
386
|
-
newArray.splice(index, 1);
|
|
387
|
-
return newArray;
|
|
388
|
-
}
|
|
389
|
-
return arr;
|
|
390
|
-
};
|
|
391
|
-
var removeValueFromArrayAll = (arr, value) => {
|
|
392
|
-
return arr.filter((item) => item !== value);
|
|
393
|
-
};
|
|
394
|
-
var addItemAfterEveryElement = (array, item) => {
|
|
395
|
-
const result = [];
|
|
396
|
-
for (let i = 0; i < array.length; i++) {
|
|
397
|
-
result.push(array[i]);
|
|
398
|
-
if (i < array.length - 1) {
|
|
399
|
-
result.push(item);
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
return result;
|
|
403
|
-
};
|
|
404
|
-
var reorderArrayByValues = (array, valueToMove, insertBeforeValue) => {
|
|
405
|
-
const newArray = [...array];
|
|
406
|
-
const indexToMove = newArray.indexOf(valueToMove);
|
|
407
|
-
const indexToInsertBefore = newArray.indexOf(insertBeforeValue);
|
|
408
|
-
if (indexToMove !== -1 && indexToInsertBefore !== -1) {
|
|
409
|
-
const removedItem = newArray.splice(indexToMove, 1)[0];
|
|
410
|
-
const insertIndex = indexToInsertBefore < indexToMove ? indexToInsertBefore : indexToInsertBefore + 1;
|
|
411
|
-
newArray.splice(insertIndex, 0, removedItem);
|
|
412
|
-
}
|
|
413
|
-
return newArray;
|
|
414
|
-
};
|
|
415
|
-
var arraysEqual = (arr1, arr2) => {
|
|
416
|
-
if (arr1.length !== arr2.length) {
|
|
417
|
-
return false;
|
|
418
|
-
}
|
|
419
|
-
for (let i = 0; i < arr1.length; i++) {
|
|
420
|
-
if (arr1[i] !== arr2[i]) {
|
|
451
|
+
var require_string2 = __commonJS2({
|
|
452
|
+
"../../../domql/packages/utils/dist/cjs/string.js"(exports2, module22) {
|
|
453
|
+
"use strict";
|
|
454
|
+
var __defProp22 = Object.defineProperty;
|
|
455
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
456
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
457
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
458
|
+
var __export22 = (target, all) => {
|
|
459
|
+
for (var name in all)
|
|
460
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
461
|
+
};
|
|
462
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
463
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
464
|
+
for (let key of __getOwnPropNames22(from))
|
|
465
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
466
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
467
|
+
}
|
|
468
|
+
return to;
|
|
469
|
+
};
|
|
470
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
471
|
+
var string_exports = {};
|
|
472
|
+
__export22(string_exports, {
|
|
473
|
+
customDecodeURIComponent: () => customDecodeURIComponent,
|
|
474
|
+
customEncodeURIComponent: () => customEncodeURIComponent,
|
|
475
|
+
findKeyPosition: () => findKeyPosition,
|
|
476
|
+
lowercaseFirstLetter: () => lowercaseFirstLetter,
|
|
477
|
+
replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
|
|
478
|
+
replaceOctalEscapeSequences: () => replaceOctalEscapeSequences,
|
|
479
|
+
stringIncludesAny: () => stringIncludesAny,
|
|
480
|
+
trimStringFromSymbols: () => trimStringFromSymbols
|
|
481
|
+
});
|
|
482
|
+
module22.exports = __toCommonJS22(string_exports);
|
|
483
|
+
var stringIncludesAny = (str, characters) => {
|
|
484
|
+
for (const char of characters) {
|
|
485
|
+
if (str.includes(char)) {
|
|
486
|
+
return true;
|
|
487
|
+
}
|
|
488
|
+
}
|
|
421
489
|
return false;
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
490
|
+
};
|
|
491
|
+
var trimStringFromSymbols = (str, characters) => {
|
|
492
|
+
const pattern = new RegExp(`[${characters.join("\\")}]`, "g");
|
|
493
|
+
return str.replace(pattern, "");
|
|
494
|
+
};
|
|
495
|
+
var brackRegex = {
|
|
496
|
+
2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
|
|
497
|
+
3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
|
|
498
|
+
};
|
|
499
|
+
var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
|
|
500
|
+
if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
|
|
501
|
+
return str;
|
|
502
|
+
const reg = brackRegex[options.bracketsLength || 2];
|
|
503
|
+
return str.replace(reg, (_, parentPath, variable) => {
|
|
504
|
+
if (parentPath) {
|
|
505
|
+
const parentLevels = parentPath.match(options.bracketsLength === 3 ? /\.\.\.\//g : /\.\.\//g).length;
|
|
506
|
+
let parentState = state;
|
|
507
|
+
for (let i = 0; i < parentLevels; i++) {
|
|
508
|
+
parentState = parentState.parent;
|
|
509
|
+
if (!parentState) {
|
|
510
|
+
return "";
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
const value = parentState[variable.trim()];
|
|
514
|
+
return value !== void 0 ? `${value}` : "";
|
|
515
|
+
} else {
|
|
516
|
+
const value = state[variable.trim()];
|
|
517
|
+
return value !== void 0 ? `${value}` : "";
|
|
518
|
+
}
|
|
519
|
+
});
|
|
520
|
+
};
|
|
521
|
+
var lowercaseFirstLetter = (inputString) => {
|
|
522
|
+
return `${inputString.charAt(0).toLowerCase()}${inputString.slice(1)}`;
|
|
523
|
+
};
|
|
524
|
+
var findKeyPosition = (str, key) => {
|
|
525
|
+
const lines = str.split("\n");
|
|
526
|
+
let startLineNumber = -1;
|
|
527
|
+
let endLineNumber = -1;
|
|
528
|
+
let startColumn = -1;
|
|
529
|
+
let endColumn = -1;
|
|
530
|
+
const keyPattern = new RegExp(`\\b${key}\\b\\s*:\\s*`);
|
|
531
|
+
let braceCount = 0;
|
|
532
|
+
let foundKey = false;
|
|
533
|
+
for (let i = 0; i < lines.length; i++) {
|
|
534
|
+
if (keyPattern.test(lines[i]) && !foundKey) {
|
|
535
|
+
foundKey = true;
|
|
536
|
+
startLineNumber = i + 1;
|
|
537
|
+
startColumn = lines[i].indexOf(key) + 1;
|
|
538
|
+
if (lines[i].includes("{}")) {
|
|
539
|
+
endLineNumber = startLineNumber;
|
|
540
|
+
endColumn = lines[i].indexOf("{}") + 3;
|
|
541
|
+
break;
|
|
542
|
+
}
|
|
543
|
+
const line = lines[i].slice(startColumn + key.length);
|
|
544
|
+
if (line.includes("{") || line.includes("[")) {
|
|
545
|
+
braceCount = 1;
|
|
546
|
+
} else {
|
|
547
|
+
endLineNumber = i + 1;
|
|
548
|
+
endColumn = lines[i].length + 1;
|
|
549
|
+
break;
|
|
550
|
+
}
|
|
551
|
+
} else if (foundKey) {
|
|
552
|
+
braceCount += (lines[i].match(/{/g) || []).length;
|
|
553
|
+
braceCount += (lines[i].match(/\[/g) || []).length;
|
|
554
|
+
braceCount -= (lines[i].match(/}/g) || []).length;
|
|
555
|
+
braceCount -= (lines[i].match(/]/g) || []).length;
|
|
556
|
+
if (braceCount === 0) {
|
|
557
|
+
endLineNumber = i + 1;
|
|
558
|
+
endColumn = lines[i].lastIndexOf("}") !== -1 ? lines[i].lastIndexOf("}") + 2 : lines[i].length + 1;
|
|
559
|
+
break;
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
return {
|
|
564
|
+
startColumn,
|
|
565
|
+
endColumn,
|
|
566
|
+
startLineNumber,
|
|
567
|
+
endLineNumber
|
|
568
|
+
};
|
|
569
|
+
};
|
|
570
|
+
var replaceOctalEscapeSequences = (str) => {
|
|
571
|
+
const octalRegex = /\\([0-7]{1,3})/g;
|
|
572
|
+
return str.replace(octalRegex, (match, p1) => {
|
|
573
|
+
const octalValue = parseInt(p1, 8);
|
|
574
|
+
const char = String.fromCharCode(octalValue);
|
|
575
|
+
return char;
|
|
576
|
+
});
|
|
577
|
+
};
|
|
578
|
+
var customEncodeURIComponent = (str) => {
|
|
579
|
+
return str.split("").map((char) => {
|
|
580
|
+
if (/[^a-zA-Z0-9\s]/.test(char)) {
|
|
581
|
+
return "%" + char.charCodeAt(0).toString(16).toUpperCase();
|
|
582
|
+
}
|
|
583
|
+
return char;
|
|
584
|
+
}).join("");
|
|
585
|
+
};
|
|
586
|
+
var customDecodeURIComponent = (encodedStr) => {
|
|
587
|
+
return encodedStr.replace(/%[0-9A-Fa-f]{2}/g, (match) => String.fromCharCode(parseInt(match.slice(1), 16)));
|
|
588
|
+
};
|
|
446
589
|
}
|
|
447
|
-
return to;
|
|
448
|
-
};
|
|
449
|
-
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
450
|
-
var string_exports = {};
|
|
451
|
-
__export3(string_exports, {
|
|
452
|
-
customDecodeURIComponent: () => customDecodeURIComponent,
|
|
453
|
-
customEncodeURIComponent: () => customEncodeURIComponent,
|
|
454
|
-
findKeyPosition: () => findKeyPosition,
|
|
455
|
-
lowercaseFirstLetter: () => lowercaseFirstLetter,
|
|
456
|
-
replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
|
|
457
|
-
replaceOctalEscapeSequences: () => replaceOctalEscapeSequences,
|
|
458
|
-
stringIncludesAny: () => stringIncludesAny,
|
|
459
|
-
trimStringFromSymbols: () => trimStringFromSymbols
|
|
460
590
|
});
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
591
|
+
var require_object2 = __commonJS2({
|
|
592
|
+
"../../../domql/packages/utils/dist/cjs/object.js"(exports2, module22) {
|
|
593
|
+
"use strict";
|
|
594
|
+
var __defProp22 = Object.defineProperty;
|
|
595
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
596
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
597
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
598
|
+
var __export22 = (target, all) => {
|
|
599
|
+
for (var name in all)
|
|
600
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
601
|
+
};
|
|
602
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
603
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
604
|
+
for (let key of __getOwnPropNames22(from))
|
|
605
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
606
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
607
|
+
}
|
|
608
|
+
return to;
|
|
609
|
+
};
|
|
610
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
611
|
+
var object_exports = {};
|
|
612
|
+
__export22(object_exports, {
|
|
613
|
+
checkIfKeyIsComponent: () => checkIfKeyIsComponent,
|
|
614
|
+
clone: () => clone,
|
|
615
|
+
createObjectWithoutPrototype: () => createObjectWithoutPrototype,
|
|
616
|
+
deepClone: () => deepClone2,
|
|
617
|
+
deepCloneExclude: () => deepCloneExclude,
|
|
618
|
+
deepCloneWithExtend: () => deepCloneWithExtend,
|
|
619
|
+
deepContains: () => deepContains,
|
|
620
|
+
deepDestringify: () => deepDestringify,
|
|
621
|
+
deepDiff: () => deepDiff,
|
|
622
|
+
deepMerge: () => deepMerge2,
|
|
623
|
+
deepStringify: () => deepStringify,
|
|
624
|
+
detachFunctionsFromObject: () => detachFunctionsFromObject,
|
|
625
|
+
diff: () => diff,
|
|
626
|
+
diffArrays: () => diffArrays,
|
|
627
|
+
diffObjects: () => diffObjects,
|
|
628
|
+
exec: () => exec,
|
|
629
|
+
flattenRecursive: () => flattenRecursive,
|
|
630
|
+
getChildrenComponentsByKey: () => getChildrenComponentsByKey,
|
|
631
|
+
getExtendsInElement: () => getExtendsInElement,
|
|
632
|
+
hasOwnProperty: () => hasOwnProperty,
|
|
633
|
+
isEmpty: () => isEmpty,
|
|
634
|
+
isEmptyObject: () => isEmptyObject,
|
|
635
|
+
isEqualDeep: () => isEqualDeep,
|
|
636
|
+
makeObjectWithoutPrototype: () => makeObjectWithoutPrototype,
|
|
637
|
+
map: () => map,
|
|
638
|
+
merge: () => merge,
|
|
639
|
+
mergeArrayExclude: () => mergeArrayExclude,
|
|
640
|
+
mergeIfExisted: () => mergeIfExisted,
|
|
641
|
+
objectToString: () => objectToString,
|
|
642
|
+
overwrite: () => overwrite,
|
|
643
|
+
overwriteDeep: () => overwriteDeep,
|
|
644
|
+
overwriteShallow: () => overwriteShallow,
|
|
645
|
+
removeFromObject: () => removeFromObject,
|
|
646
|
+
stringToObject: () => stringToObject
|
|
647
|
+
});
|
|
648
|
+
module22.exports = __toCommonJS22(object_exports);
|
|
649
|
+
var import_globals2 = require_globals2();
|
|
650
|
+
var import_types = require_types2();
|
|
651
|
+
var import_array = require_array2();
|
|
652
|
+
var import_string = require_string2();
|
|
653
|
+
var exec = (param, element, state, context) => {
|
|
654
|
+
if ((0, import_types.isFunction)(param)) {
|
|
655
|
+
return param(
|
|
656
|
+
element,
|
|
657
|
+
state || element.state,
|
|
658
|
+
context || element.context
|
|
659
|
+
);
|
|
660
|
+
}
|
|
661
|
+
return param;
|
|
662
|
+
};
|
|
663
|
+
var map = (obj, extention, element) => {
|
|
664
|
+
for (const e in extention) {
|
|
665
|
+
obj[e] = exec(extention[e], element);
|
|
666
|
+
}
|
|
667
|
+
};
|
|
668
|
+
var merge = (element, obj, excludeFrom = []) => {
|
|
669
|
+
for (const e in obj) {
|
|
670
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, e);
|
|
671
|
+
if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
|
|
672
|
+
continue;
|
|
673
|
+
const elementProp = element[e];
|
|
674
|
+
const objProp = obj[e];
|
|
675
|
+
if (elementProp === void 0) {
|
|
676
|
+
element[e] = objProp;
|
|
490
677
|
}
|
|
491
678
|
}
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
const
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
let endLineNumber = -1;
|
|
507
|
-
let startColumn = -1;
|
|
508
|
-
let endColumn = -1;
|
|
509
|
-
const keyPattern = new RegExp(`\\b${key}\\b\\s*:\\s*`);
|
|
510
|
-
let braceCount = 0;
|
|
511
|
-
let foundKey = false;
|
|
512
|
-
for (let i = 0; i < lines.length; i++) {
|
|
513
|
-
if (keyPattern.test(lines[i]) && !foundKey) {
|
|
514
|
-
foundKey = true;
|
|
515
|
-
startLineNumber = i + 1;
|
|
516
|
-
startColumn = lines[i].indexOf(key) + 1;
|
|
517
|
-
if (lines[i].includes("{}")) {
|
|
518
|
-
endLineNumber = startLineNumber;
|
|
519
|
-
endColumn = lines[i].indexOf("{}") + 3;
|
|
520
|
-
break;
|
|
679
|
+
return element;
|
|
680
|
+
};
|
|
681
|
+
var deepMerge2 = (element, extend, excludeFrom = []) => {
|
|
682
|
+
for (const e in extend) {
|
|
683
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(extend, e);
|
|
684
|
+
if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
|
|
685
|
+
continue;
|
|
686
|
+
const elementProp = element[e];
|
|
687
|
+
const extendProp = extend[e];
|
|
688
|
+
if ((0, import_types.isObjectLike)(elementProp) && (0, import_types.isObjectLike)(extendProp)) {
|
|
689
|
+
deepMerge2(elementProp, extendProp, excludeFrom);
|
|
690
|
+
} else if (elementProp === void 0) {
|
|
691
|
+
element[e] = extendProp;
|
|
692
|
+
}
|
|
521
693
|
}
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
694
|
+
return element;
|
|
695
|
+
};
|
|
696
|
+
var clone = (obj, excludeFrom = []) => {
|
|
697
|
+
const o = {};
|
|
698
|
+
for (const prop in obj) {
|
|
699
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, prop);
|
|
700
|
+
if (!hasOwnProperty2 || excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
701
|
+
continue;
|
|
702
|
+
o[prop] = obj[prop];
|
|
529
703
|
}
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
if (braceCount === 0) {
|
|
536
|
-
endLineNumber = i + 1;
|
|
537
|
-
endColumn = lines[i].lastIndexOf("}") !== -1 ? lines[i].lastIndexOf("}") + 2 : lines[i].length + 1;
|
|
538
|
-
break;
|
|
704
|
+
return o;
|
|
705
|
+
};
|
|
706
|
+
var deepCloneExclude = (obj, excludeFrom = []) => {
|
|
707
|
+
if ((0, import_types.isArray)(obj)) {
|
|
708
|
+
return obj.map((x) => deepCloneExclude(x, excludeFrom));
|
|
539
709
|
}
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
map: () => map,
|
|
619
|
-
merge: () => merge,
|
|
620
|
-
mergeArrayExclude: () => mergeArrayExclude,
|
|
621
|
-
mergeIfExisted: () => mergeIfExisted,
|
|
622
|
-
objectToString: () => objectToString,
|
|
623
|
-
overwrite: () => overwrite,
|
|
624
|
-
overwriteDeep: () => overwriteDeep,
|
|
625
|
-
overwriteShallow: () => overwriteShallow,
|
|
626
|
-
removeFromObject: () => removeFromObject,
|
|
627
|
-
stringToObject: () => stringToObject
|
|
628
|
-
});
|
|
629
|
-
module2.exports = __toCommonJS3(object_exports);
|
|
630
|
-
var import_globals2 = require_globals2();
|
|
631
|
-
var import_types = require_types2();
|
|
632
|
-
var import_array = require_array2();
|
|
633
|
-
var import_string = require_string2();
|
|
634
|
-
var exec = (param, element, state, context) => {
|
|
635
|
-
if ((0, import_types.isFunction)(param)) {
|
|
636
|
-
return param(
|
|
637
|
-
element,
|
|
638
|
-
state || element.state,
|
|
639
|
-
context || element.context
|
|
640
|
-
);
|
|
641
|
-
}
|
|
642
|
-
return param;
|
|
643
|
-
};
|
|
644
|
-
var map = (obj, extention, element) => {
|
|
645
|
-
for (const e in extention) {
|
|
646
|
-
obj[e] = exec(extention[e], element);
|
|
647
|
-
}
|
|
648
|
-
};
|
|
649
|
-
var merge = (element, obj, excludeFrom = []) => {
|
|
650
|
-
for (const e in obj) {
|
|
651
|
-
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, e);
|
|
652
|
-
if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
|
|
653
|
-
continue;
|
|
654
|
-
const elementProp = element[e];
|
|
655
|
-
const objProp = obj[e];
|
|
656
|
-
if (elementProp === void 0) {
|
|
657
|
-
element[e] = objProp;
|
|
658
|
-
}
|
|
659
|
-
}
|
|
660
|
-
return element;
|
|
661
|
-
};
|
|
662
|
-
var deepMerge2 = (element, extend, excludeFrom = []) => {
|
|
663
|
-
for (const e in extend) {
|
|
664
|
-
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(extend, e);
|
|
665
|
-
if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
|
|
666
|
-
continue;
|
|
667
|
-
const elementProp = element[e];
|
|
668
|
-
const extendProp = extend[e];
|
|
669
|
-
if ((0, import_types.isObjectLike)(elementProp) && (0, import_types.isObjectLike)(extendProp)) {
|
|
670
|
-
deepMerge2(elementProp, extendProp, excludeFrom);
|
|
671
|
-
} else if (elementProp === void 0) {
|
|
672
|
-
element[e] = extendProp;
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
return element;
|
|
676
|
-
};
|
|
677
|
-
var clone = (obj, excludeFrom = []) => {
|
|
678
|
-
const o = {};
|
|
679
|
-
for (const prop in obj) {
|
|
680
|
-
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, prop);
|
|
681
|
-
if (!hasOwnProperty2 || excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
682
|
-
continue;
|
|
683
|
-
o[prop] = obj[prop];
|
|
684
|
-
}
|
|
685
|
-
return o;
|
|
686
|
-
};
|
|
687
|
-
var deepCloneExclude = (obj, excludeFrom = []) => {
|
|
688
|
-
if ((0, import_types.isArray)(obj)) {
|
|
689
|
-
return obj.map((x) => deepCloneExclude(x, excludeFrom));
|
|
690
|
-
}
|
|
691
|
-
const o = {};
|
|
692
|
-
for (const k in obj) {
|
|
693
|
-
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, k);
|
|
694
|
-
if (!hasOwnProperty2 || excludeFrom.includes(k) || k.startsWith("__"))
|
|
695
|
-
continue;
|
|
696
|
-
let v = obj[k];
|
|
697
|
-
if (k === "extend" && (0, import_types.isArray)(v)) {
|
|
698
|
-
v = mergeArrayExclude(v, excludeFrom);
|
|
699
|
-
}
|
|
700
|
-
if ((0, import_types.isArray)(v)) {
|
|
701
|
-
o[k] = v.map((x) => deepCloneExclude(x, excludeFrom));
|
|
702
|
-
} else if ((0, import_types.isObject)(v)) {
|
|
703
|
-
o[k] = deepCloneExclude(v, excludeFrom);
|
|
704
|
-
} else
|
|
705
|
-
o[k] = v;
|
|
706
|
-
}
|
|
707
|
-
return o;
|
|
708
|
-
};
|
|
709
|
-
var mergeArrayExclude = (arr, excl = []) => {
|
|
710
|
-
return arr.reduce((acc, curr) => deepMerge2(acc, deepCloneExclude(curr, excl)), {});
|
|
711
|
-
};
|
|
712
|
-
var deepClone2 = (obj, excludeFrom = [], cleanUndefined = false) => {
|
|
713
|
-
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
714
|
-
for (const prop in obj) {
|
|
715
|
-
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
716
|
-
continue;
|
|
717
|
-
if (prop === "__proto__")
|
|
718
|
-
continue;
|
|
719
|
-
if (excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
720
|
-
continue;
|
|
721
|
-
let objProp = obj[prop];
|
|
722
|
-
if (cleanUndefined && (0, import_types.isUndefined)(objProp))
|
|
723
|
-
continue;
|
|
724
|
-
if (prop === "extend" && (0, import_types.isArray)(objProp)) {
|
|
725
|
-
objProp = (0, import_array.mergeArray)(objProp);
|
|
726
|
-
}
|
|
727
|
-
if ((0, import_types.isObjectLike)(objProp)) {
|
|
728
|
-
o[prop] = deepClone2(objProp, excludeFrom, cleanUndefined);
|
|
729
|
-
} else
|
|
730
|
-
o[prop] = objProp;
|
|
731
|
-
}
|
|
732
|
-
return o;
|
|
733
|
-
};
|
|
734
|
-
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
735
|
-
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
736
|
-
for (const prop in obj) {
|
|
737
|
-
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
738
|
-
continue;
|
|
739
|
-
const objProp = obj[prop];
|
|
740
|
-
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
|
|
741
|
-
continue;
|
|
742
|
-
if ((0, import_types.isObjectLike)(objProp)) {
|
|
743
|
-
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
|
|
744
|
-
} else
|
|
745
|
-
o[prop] = objProp;
|
|
746
|
-
}
|
|
747
|
-
return o;
|
|
748
|
-
};
|
|
749
|
-
var deepStringify = (obj, stringified = {}) => {
|
|
750
|
-
for (const prop in obj) {
|
|
751
|
-
const objProp = obj[prop];
|
|
752
|
-
if ((0, import_types.isFunction)(objProp)) {
|
|
753
|
-
stringified[prop] = objProp.toString();
|
|
754
|
-
} else if ((0, import_types.isObject)(objProp)) {
|
|
755
|
-
stringified[prop] = {};
|
|
756
|
-
deepStringify(objProp, stringified[prop]);
|
|
757
|
-
} else if ((0, import_types.isArray)(objProp)) {
|
|
758
|
-
stringified[prop] = [];
|
|
759
|
-
objProp.forEach((v, i) => {
|
|
760
|
-
if ((0, import_types.isObject)(v)) {
|
|
761
|
-
stringified[prop][i] = {};
|
|
762
|
-
deepStringify(v, stringified[prop][i]);
|
|
763
|
-
} else if ((0, import_types.isFunction)(v)) {
|
|
764
|
-
stringified[prop][i] = v.toString();
|
|
710
|
+
const o = {};
|
|
711
|
+
for (const k in obj) {
|
|
712
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, k);
|
|
713
|
+
if (!hasOwnProperty2 || excludeFrom.includes(k) || k.startsWith("__"))
|
|
714
|
+
continue;
|
|
715
|
+
let v = obj[k];
|
|
716
|
+
if (k === "extend" && (0, import_types.isArray)(v)) {
|
|
717
|
+
v = mergeArrayExclude(v, excludeFrom);
|
|
718
|
+
}
|
|
719
|
+
if ((0, import_types.isArray)(v)) {
|
|
720
|
+
o[k] = v.map((x) => deepCloneExclude(x, excludeFrom));
|
|
721
|
+
} else if ((0, import_types.isObject)(v)) {
|
|
722
|
+
o[k] = deepCloneExclude(v, excludeFrom);
|
|
723
|
+
} else
|
|
724
|
+
o[k] = v;
|
|
725
|
+
}
|
|
726
|
+
return o;
|
|
727
|
+
};
|
|
728
|
+
var mergeArrayExclude = (arr, excl = []) => {
|
|
729
|
+
return arr.reduce((acc, curr) => deepMerge2(acc, deepCloneExclude(curr, excl)), {});
|
|
730
|
+
};
|
|
731
|
+
var deepClone2 = (obj, excludeFrom = [], cleanUndefined = false) => {
|
|
732
|
+
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
733
|
+
for (const prop in obj) {
|
|
734
|
+
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
735
|
+
continue;
|
|
736
|
+
if (prop === "__proto__")
|
|
737
|
+
continue;
|
|
738
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
739
|
+
continue;
|
|
740
|
+
let objProp = obj[prop];
|
|
741
|
+
if (cleanUndefined && (0, import_types.isUndefined)(objProp))
|
|
742
|
+
continue;
|
|
743
|
+
if (prop === "extend" && (0, import_types.isArray)(objProp)) {
|
|
744
|
+
objProp = (0, import_array.mergeArray)(objProp);
|
|
745
|
+
}
|
|
746
|
+
if ((0, import_types.isObjectLike)(objProp)) {
|
|
747
|
+
o[prop] = deepClone2(objProp, excludeFrom, cleanUndefined);
|
|
748
|
+
} else
|
|
749
|
+
o[prop] = objProp;
|
|
750
|
+
}
|
|
751
|
+
return o;
|
|
752
|
+
};
|
|
753
|
+
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
754
|
+
const o = options.window ? (0, import_types.isArray)(obj) ? new options.window.Array([]) : new options.window.Object({}) : (0, import_types.isArray)(obj) ? [] : {};
|
|
755
|
+
for (const prop in obj) {
|
|
756
|
+
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
757
|
+
continue;
|
|
758
|
+
const objProp = obj[prop];
|
|
759
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
|
|
760
|
+
continue;
|
|
761
|
+
if ((0, import_types.isObjectLike)(objProp)) {
|
|
762
|
+
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
|
|
763
|
+
} else
|
|
764
|
+
o[prop] = objProp;
|
|
765
|
+
}
|
|
766
|
+
return o;
|
|
767
|
+
};
|
|
768
|
+
var deepStringify = (obj, stringified = {}) => {
|
|
769
|
+
for (const prop in obj) {
|
|
770
|
+
const objProp = obj[prop];
|
|
771
|
+
if ((0, import_types.isFunction)(objProp)) {
|
|
772
|
+
stringified[prop] = objProp.toString();
|
|
773
|
+
} else if ((0, import_types.isObject)(objProp)) {
|
|
774
|
+
stringified[prop] = {};
|
|
775
|
+
deepStringify(objProp, stringified[prop]);
|
|
776
|
+
} else if ((0, import_types.isArray)(objProp)) {
|
|
777
|
+
stringified[prop] = [];
|
|
778
|
+
objProp.forEach((v, i) => {
|
|
779
|
+
if ((0, import_types.isObject)(v)) {
|
|
780
|
+
stringified[prop][i] = {};
|
|
781
|
+
deepStringify(v, stringified[prop][i]);
|
|
782
|
+
} else if ((0, import_types.isFunction)(v)) {
|
|
783
|
+
stringified[prop][i] = v.toString();
|
|
784
|
+
} else {
|
|
785
|
+
stringified[prop][i] = v;
|
|
786
|
+
}
|
|
787
|
+
});
|
|
765
788
|
} else {
|
|
766
|
-
stringified[prop]
|
|
789
|
+
stringified[prop] = objProp;
|
|
767
790
|
}
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
str += "[\n";
|
|
784
|
-
for (const element of value) {
|
|
785
|
-
if ((0, import_types.isObject)(element) && element !== null) {
|
|
786
|
-
str += `${spaces} ${objectToString(element, indent + 2)},
|
|
791
|
+
}
|
|
792
|
+
return stringified;
|
|
793
|
+
};
|
|
794
|
+
var objectToString = (obj = {}, indent = 0) => {
|
|
795
|
+
const spaces = " ".repeat(indent);
|
|
796
|
+
let str = "{\n";
|
|
797
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
798
|
+
const keyNotAllowdChars = (0, import_string.stringIncludesAny)(key, ["&", "*", "-", ":", "%", "{", "}", ">", "<", "@", ".", "/", "!", " "]);
|
|
799
|
+
const stringedKey = keyNotAllowdChars ? `'${key}'` : key;
|
|
800
|
+
str += `${spaces} ${stringedKey}: `;
|
|
801
|
+
if ((0, import_types.isArray)(value)) {
|
|
802
|
+
str += "[\n";
|
|
803
|
+
for (const element of value) {
|
|
804
|
+
if ((0, import_types.isObject)(element) && element !== null) {
|
|
805
|
+
str += `${spaces} ${objectToString(element, indent + 2)},
|
|
787
806
|
`;
|
|
788
|
-
|
|
789
|
-
|
|
807
|
+
} else if ((0, import_types.isString)(element)) {
|
|
808
|
+
str += `${spaces} '${element}',
|
|
790
809
|
`;
|
|
791
|
-
|
|
792
|
-
|
|
810
|
+
} else {
|
|
811
|
+
str += `${spaces} ${element},
|
|
793
812
|
`;
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
str += `${spaces} ]`;
|
|
816
|
+
} else if ((0, import_types.isObjectLike)(value)) {
|
|
817
|
+
str += objectToString(value, indent + 1);
|
|
818
|
+
} else if ((0, import_types.isString)(value)) {
|
|
819
|
+
str += (0, import_string.stringIncludesAny)(value, ["\n", "'"]) ? `\`${value}\`` : `'${value}'`;
|
|
820
|
+
} else {
|
|
821
|
+
str += value;
|
|
794
822
|
}
|
|
823
|
+
str += ",\n";
|
|
795
824
|
}
|
|
796
|
-
str += `${spaces}
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
objProp.forEach((v, i) => {
|
|
820
|
-
if ((0, import_types.isFunction)(v))
|
|
821
|
-
return;
|
|
822
|
-
if ((0, import_types.isObject)(v)) {
|
|
823
|
-
detached[prop][i] = {};
|
|
824
|
-
detachFunctionsFromObject(v, detached[prop][i]);
|
|
825
|
+
str += `${spaces}}`;
|
|
826
|
+
return str;
|
|
827
|
+
};
|
|
828
|
+
var detachFunctionsFromObject = (obj, detached = {}) => {
|
|
829
|
+
for (const prop in obj) {
|
|
830
|
+
const objProp = obj[prop];
|
|
831
|
+
if ((0, import_types.isFunction)(objProp))
|
|
832
|
+
continue;
|
|
833
|
+
else if ((0, import_types.isObject)(objProp)) {
|
|
834
|
+
detached[prop] = {};
|
|
835
|
+
deepStringify(objProp, detached[prop]);
|
|
836
|
+
} else if ((0, import_types.isArray)(objProp)) {
|
|
837
|
+
detached[prop] = [];
|
|
838
|
+
objProp.forEach((v, i) => {
|
|
839
|
+
if ((0, import_types.isFunction)(v))
|
|
840
|
+
return;
|
|
841
|
+
if ((0, import_types.isObject)(v)) {
|
|
842
|
+
detached[prop][i] = {};
|
|
843
|
+
detachFunctionsFromObject(v, detached[prop][i]);
|
|
844
|
+
} else {
|
|
845
|
+
detached[prop][i] = v;
|
|
846
|
+
}
|
|
847
|
+
});
|
|
825
848
|
} else {
|
|
826
|
-
detached[prop]
|
|
849
|
+
detached[prop] = objProp;
|
|
827
850
|
}
|
|
828
|
-
});
|
|
829
|
-
} else {
|
|
830
|
-
detached[prop] = objProp;
|
|
831
|
-
}
|
|
832
|
-
}
|
|
833
|
-
return detached;
|
|
834
|
-
};
|
|
835
|
-
var deepDestringify = (obj, destringified = {}) => {
|
|
836
|
-
for (const prop in obj) {
|
|
837
|
-
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, prop);
|
|
838
|
-
if (!hasOwnProperty2)
|
|
839
|
-
continue;
|
|
840
|
-
const objProp = obj[prop];
|
|
841
|
-
if ((0, import_types.isString)(objProp)) {
|
|
842
|
-
if ((objProp.includes("(){") || objProp.includes("() {") || objProp.includes("=>") || objProp.startsWith("()") || objProp.startsWith("async") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
843
|
-
try {
|
|
844
|
-
const evalProp = import_globals2.window.eval(`(${objProp})`);
|
|
845
|
-
destringified[prop] = evalProp;
|
|
846
|
-
} catch (e) {
|
|
847
|
-
if (e)
|
|
848
|
-
destringified[prop] = objProp;
|
|
849
|
-
}
|
|
850
|
-
} else {
|
|
851
|
-
destringified[prop] = objProp;
|
|
852
851
|
}
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
852
|
+
return detached;
|
|
853
|
+
};
|
|
854
|
+
var deepDestringify = (obj, destringified = {}) => {
|
|
855
|
+
for (const prop in obj) {
|
|
856
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, prop);
|
|
857
|
+
if (!hasOwnProperty2)
|
|
858
|
+
continue;
|
|
859
|
+
const objProp = obj[prop];
|
|
860
|
+
if ((0, import_types.isString)(objProp)) {
|
|
861
|
+
if ((objProp.includes("(){") || objProp.includes("() {") || objProp.includes("=>") || objProp.startsWith("()") || objProp.startsWith("async") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
858
862
|
try {
|
|
859
|
-
const evalProp = import_globals2.window.eval(`(${
|
|
860
|
-
destringified[prop]
|
|
863
|
+
const evalProp = import_globals2.window.eval(`(${objProp})`);
|
|
864
|
+
destringified[prop] = evalProp;
|
|
861
865
|
} catch (e) {
|
|
862
866
|
if (e)
|
|
863
|
-
destringified[prop]
|
|
867
|
+
destringified[prop] = objProp;
|
|
864
868
|
}
|
|
865
869
|
} else {
|
|
866
|
-
destringified[prop]
|
|
870
|
+
destringified[prop] = objProp;
|
|
867
871
|
}
|
|
868
|
-
} else if ((0, import_types.
|
|
869
|
-
destringified[prop]
|
|
872
|
+
} else if ((0, import_types.isArray)(objProp)) {
|
|
873
|
+
destringified[prop] = [];
|
|
874
|
+
objProp.forEach((arrProp) => {
|
|
875
|
+
if ((0, import_types.isString)(arrProp)) {
|
|
876
|
+
if (arrProp.includes("=>") || arrProp.includes("function") || arrProp.startsWith("(")) {
|
|
877
|
+
try {
|
|
878
|
+
const evalProp = import_globals2.window.eval(`(${arrProp})`);
|
|
879
|
+
destringified[prop].push(evalProp);
|
|
880
|
+
} catch (e) {
|
|
881
|
+
if (e)
|
|
882
|
+
destringified[prop].push(arrProp);
|
|
883
|
+
}
|
|
884
|
+
} else {
|
|
885
|
+
destringified[prop].push(arrProp);
|
|
886
|
+
}
|
|
887
|
+
} else if ((0, import_types.isObject)(arrProp)) {
|
|
888
|
+
destringified[prop].push(deepDestringify(arrProp));
|
|
889
|
+
} else {
|
|
890
|
+
destringified[prop].push(arrProp);
|
|
891
|
+
}
|
|
892
|
+
});
|
|
893
|
+
} else if ((0, import_types.isObject)(objProp)) {
|
|
894
|
+
destringified[prop] = deepDestringify(objProp, destringified[prop]);
|
|
870
895
|
} else {
|
|
871
|
-
destringified[prop]
|
|
896
|
+
destringified[prop] = objProp;
|
|
872
897
|
}
|
|
873
|
-
});
|
|
874
|
-
} else if ((0, import_types.isObject)(objProp)) {
|
|
875
|
-
destringified[prop] = deepDestringify(objProp, destringified[prop]);
|
|
876
|
-
} else {
|
|
877
|
-
destringified[prop] = objProp;
|
|
878
|
-
}
|
|
879
|
-
}
|
|
880
|
-
return destringified;
|
|
881
|
-
};
|
|
882
|
-
var stringToObject = (str, opts = { verbose: true }) => {
|
|
883
|
-
try {
|
|
884
|
-
return import_globals2.window.eval("(" + str + ")");
|
|
885
|
-
} catch (e) {
|
|
886
|
-
if (opts.verbose)
|
|
887
|
-
console.warn(e);
|
|
888
|
-
}
|
|
889
|
-
};
|
|
890
|
-
var diffObjects = (original, objToDiff, cache) => {
|
|
891
|
-
for (const e in objToDiff) {
|
|
892
|
-
if (e === "ref")
|
|
893
|
-
continue;
|
|
894
|
-
const originalProp = original[e];
|
|
895
|
-
const objToDiffProp = objToDiff[e];
|
|
896
|
-
if ((0, import_types.isObject)(originalProp) && (0, import_types.isObject)(objToDiffProp)) {
|
|
897
|
-
cache[e] = {};
|
|
898
|
-
diff(originalProp, objToDiffProp, cache[e]);
|
|
899
|
-
} else if (objToDiffProp !== void 0) {
|
|
900
|
-
cache[e] = objToDiffProp;
|
|
901
|
-
}
|
|
902
|
-
}
|
|
903
|
-
return cache;
|
|
904
|
-
};
|
|
905
|
-
var diffArrays = (original, objToDiff, cache) => {
|
|
906
|
-
if (original.length !== objToDiff.length) {
|
|
907
|
-
cache = objToDiff;
|
|
908
|
-
} else {
|
|
909
|
-
const diffArr = [];
|
|
910
|
-
for (let i = 0; i < original.length; i++) {
|
|
911
|
-
const diffObj = diff(original[i], objToDiff[i]);
|
|
912
|
-
if (Object.keys(diffObj).length > 0) {
|
|
913
|
-
diffArr.push(diffObj);
|
|
914
898
|
}
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
if ((0, import_types.isArray)(original) && (0, import_types.isArray)(objToDiff)) {
|
|
924
|
-
cache = [];
|
|
925
|
-
diffArrays(original, objToDiff, cache);
|
|
926
|
-
} else {
|
|
927
|
-
diffObjects(original, objToDiff, cache);
|
|
928
|
-
}
|
|
929
|
-
return cache;
|
|
930
|
-
};
|
|
931
|
-
var hasOwnProperty = (o, ...args) => Object.prototype.hasOwnProperty.call(o, ...args);
|
|
932
|
-
var isEmpty = (o) => Object.keys(o).length === 0;
|
|
933
|
-
var isEmptyObject = (o) => (0, import_types.isObject)(o) && isEmpty(o);
|
|
934
|
-
var makeObjectWithoutPrototype = () => /* @__PURE__ */ Object.create(null);
|
|
935
|
-
var deepDiff = (lhs, rhs) => {
|
|
936
|
-
if (lhs === rhs)
|
|
937
|
-
return {};
|
|
938
|
-
if (!(0, import_types.isObjectLike)(lhs) || !(0, import_types.isObjectLike)(rhs))
|
|
939
|
-
return rhs;
|
|
940
|
-
const deletedValues = Object.keys(lhs).reduce((acc, key) => {
|
|
941
|
-
if (!hasOwnProperty(rhs, key)) {
|
|
942
|
-
acc[key] = void 0;
|
|
943
|
-
}
|
|
944
|
-
return acc;
|
|
945
|
-
}, makeObjectWithoutPrototype());
|
|
946
|
-
if ((0, import_types.isDate)(lhs) || (0, import_types.isDate)(rhs)) {
|
|
947
|
-
if (lhs.valueOf() === rhs.valueOf())
|
|
948
|
-
return {};
|
|
949
|
-
return rhs;
|
|
950
|
-
}
|
|
951
|
-
return Object.keys(rhs).reduce((acc, key) => {
|
|
952
|
-
if (!hasOwnProperty(lhs, key)) {
|
|
953
|
-
acc[key] = rhs[key];
|
|
954
|
-
return acc;
|
|
955
|
-
}
|
|
956
|
-
const difference = diff(lhs[key], rhs[key]);
|
|
957
|
-
if (isEmptyObject(difference) && !(0, import_types.isDate)(difference) && (isEmptyObject(lhs[key]) || !isEmptyObject(rhs[key]))) {
|
|
958
|
-
return acc;
|
|
959
|
-
}
|
|
960
|
-
acc[key] = difference;
|
|
961
|
-
return acc;
|
|
962
|
-
}, deletedValues);
|
|
963
|
-
};
|
|
964
|
-
var overwrite = (element, params, excludeFrom = []) => {
|
|
965
|
-
const { ref } = element;
|
|
966
|
-
const changes = {};
|
|
967
|
-
for (const e in params) {
|
|
968
|
-
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
969
|
-
continue;
|
|
970
|
-
const elementProp = element[e];
|
|
971
|
-
const paramsProp = params[e];
|
|
972
|
-
if (paramsProp) {
|
|
973
|
-
ref.__cache[e] = changes[e] = elementProp;
|
|
974
|
-
ref[e] = paramsProp;
|
|
975
|
-
}
|
|
976
|
-
}
|
|
977
|
-
return changes;
|
|
978
|
-
};
|
|
979
|
-
var overwriteShallow = (obj, params, excludeFrom = []) => {
|
|
980
|
-
for (const e in params) {
|
|
981
|
-
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
982
|
-
continue;
|
|
983
|
-
obj[e] = params[e];
|
|
984
|
-
}
|
|
985
|
-
return obj;
|
|
986
|
-
};
|
|
987
|
-
var overwriteDeep = (obj, params, excludeFrom = []) => {
|
|
988
|
-
for (const e in params) {
|
|
989
|
-
if (e === "__proto__")
|
|
990
|
-
continue;
|
|
991
|
-
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
992
|
-
continue;
|
|
993
|
-
const objProp = obj[e];
|
|
994
|
-
const paramsProp = params[e];
|
|
995
|
-
if ((0, import_types.isObjectLike)(objProp) && (0, import_types.isObjectLike)(paramsProp)) {
|
|
996
|
-
overwriteDeep(objProp, paramsProp);
|
|
997
|
-
} else if (paramsProp !== void 0) {
|
|
998
|
-
obj[e] = paramsProp;
|
|
999
|
-
}
|
|
1000
|
-
}
|
|
1001
|
-
return obj;
|
|
1002
|
-
};
|
|
1003
|
-
var mergeIfExisted = (a, b) => {
|
|
1004
|
-
if ((0, import_types.isObjectLike)(a) && (0, import_types.isObjectLike)(b))
|
|
1005
|
-
return deepMerge2(a, b);
|
|
1006
|
-
return a || b;
|
|
1007
|
-
};
|
|
1008
|
-
var flattenRecursive = (param, prop, stack = []) => {
|
|
1009
|
-
const objectized = (0, import_array.mergeAndCloneIfArray)(param);
|
|
1010
|
-
stack.push(objectized);
|
|
1011
|
-
const extendOfExtend = objectized[prop];
|
|
1012
|
-
if (extendOfExtend)
|
|
1013
|
-
flattenRecursive(extendOfExtend, prop, stack);
|
|
1014
|
-
delete objectized[prop];
|
|
1015
|
-
return stack;
|
|
1016
|
-
};
|
|
1017
|
-
var isEqualDeep = (param, element, visited = /* @__PURE__ */ new Set()) => {
|
|
1018
|
-
if (typeof param !== "object" || typeof element !== "object" || param === null || element === null) {
|
|
1019
|
-
return param === element;
|
|
1020
|
-
}
|
|
1021
|
-
if (visited.has(param) || visited.has(element)) {
|
|
1022
|
-
return true;
|
|
1023
|
-
}
|
|
1024
|
-
visited.add(param);
|
|
1025
|
-
visited.add(element);
|
|
1026
|
-
const keysParam = Object.keys(param);
|
|
1027
|
-
const keysElement = Object.keys(element);
|
|
1028
|
-
if (keysParam.length !== keysElement.length) {
|
|
1029
|
-
return false;
|
|
1030
|
-
}
|
|
1031
|
-
for (const key of keysParam) {
|
|
1032
|
-
if (!keysElement.includes(key)) {
|
|
1033
|
-
return false;
|
|
1034
|
-
}
|
|
1035
|
-
const paramProp = param[key];
|
|
1036
|
-
const elementProp = element[key];
|
|
1037
|
-
if (!isEqualDeep(paramProp, elementProp, visited)) {
|
|
1038
|
-
return false;
|
|
1039
|
-
}
|
|
1040
|
-
}
|
|
1041
|
-
return true;
|
|
1042
|
-
};
|
|
1043
|
-
var deepContains = (obj1, obj2) => {
|
|
1044
|
-
if (typeof obj1 !== typeof obj2) {
|
|
1045
|
-
return false;
|
|
1046
|
-
}
|
|
1047
|
-
if ((0, import_types.isObjectLike)(obj1)) {
|
|
1048
|
-
if (Array.isArray(obj1) && Array.isArray(obj2)) {
|
|
1049
|
-
if (obj1.length !== obj2.length) {
|
|
1050
|
-
return false;
|
|
899
|
+
return destringified;
|
|
900
|
+
};
|
|
901
|
+
var stringToObject = (str, opts = { verbose: true }) => {
|
|
902
|
+
try {
|
|
903
|
+
return import_globals2.window.eval("(" + str + ")");
|
|
904
|
+
} catch (e) {
|
|
905
|
+
if (opts.verbose)
|
|
906
|
+
console.warn(e);
|
|
1051
907
|
}
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
908
|
+
};
|
|
909
|
+
var diffObjects = (original, objToDiff, cache) => {
|
|
910
|
+
for (const e in objToDiff) {
|
|
911
|
+
if (e === "ref")
|
|
912
|
+
continue;
|
|
913
|
+
const originalProp = original[e];
|
|
914
|
+
const objToDiffProp = objToDiff[e];
|
|
915
|
+
if ((0, import_types.isObject)(originalProp) && (0, import_types.isObject)(objToDiffProp)) {
|
|
916
|
+
cache[e] = {};
|
|
917
|
+
diff(originalProp, objToDiffProp, cache[e]);
|
|
918
|
+
} else if (objToDiffProp !== void 0) {
|
|
919
|
+
cache[e] = objToDiffProp;
|
|
1055
920
|
}
|
|
1056
921
|
}
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
922
|
+
return cache;
|
|
923
|
+
};
|
|
924
|
+
var diffArrays = (original, objToDiff, cache) => {
|
|
925
|
+
if (original.length !== objToDiff.length) {
|
|
926
|
+
cache = objToDiff;
|
|
927
|
+
} else {
|
|
928
|
+
const diffArr = [];
|
|
929
|
+
for (let i = 0; i < original.length; i++) {
|
|
930
|
+
const diffObj = diff(original[i], objToDiff[i]);
|
|
931
|
+
if (Object.keys(diffObj).length > 0) {
|
|
932
|
+
diffArr.push(diffObj);
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
if (diffArr.length > 0) {
|
|
936
|
+
cache = diffArr;
|
|
1062
937
|
}
|
|
1063
938
|
}
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
for (const key in obj) {
|
|
1088
|
-
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
1089
|
-
newObj[key] = createObjectWithoutPrototype(obj[key]);
|
|
1090
|
-
}
|
|
1091
|
-
}
|
|
1092
|
-
return newObj;
|
|
1093
|
-
};
|
|
1094
|
-
var checkIfKeyIsComponent = (key) => {
|
|
1095
|
-
const isFirstKeyString = (0, import_types.isString)(key);
|
|
1096
|
-
if (!isFirstKeyString)
|
|
1097
|
-
return;
|
|
1098
|
-
const firstCharKey = key.slice(0, 1);
|
|
1099
|
-
return /^[A-Z]*$/.test(firstCharKey);
|
|
1100
|
-
};
|
|
1101
|
-
var getChildrenComponentsByKey = (key, el) => {
|
|
1102
|
-
if (key === el.key || el.__ref.__componentKey === key) {
|
|
1103
|
-
return el;
|
|
1104
|
-
}
|
|
1105
|
-
if (el.extend) {
|
|
1106
|
-
const foundString = (0, import_types.isString)(el.extend) && el.extend === key;
|
|
1107
|
-
const foundInArray = (0, import_types.isArray)(el.extend) && el.extend.filter((v) => v === key).length;
|
|
1108
|
-
if (foundString || foundInArray)
|
|
1109
|
-
return el;
|
|
1110
|
-
}
|
|
1111
|
-
};
|
|
1112
|
-
var getExtendsInElement = (obj) => {
|
|
1113
|
-
let result = [];
|
|
1114
|
-
function traverse(o) {
|
|
1115
|
-
for (const key in o) {
|
|
1116
|
-
if (Object.hasOwnProperty.call(o, key)) {
|
|
1117
|
-
if (checkIfKeyIsComponent(key)) {
|
|
1118
|
-
result.push(key);
|
|
939
|
+
return cache;
|
|
940
|
+
};
|
|
941
|
+
var diff = (original, objToDiff, cache = {}) => {
|
|
942
|
+
if ((0, import_types.isArray)(original) && (0, import_types.isArray)(objToDiff)) {
|
|
943
|
+
cache = [];
|
|
944
|
+
diffArrays(original, objToDiff, cache);
|
|
945
|
+
} else {
|
|
946
|
+
diffObjects(original, objToDiff, cache);
|
|
947
|
+
}
|
|
948
|
+
return cache;
|
|
949
|
+
};
|
|
950
|
+
var hasOwnProperty = (o, ...args) => Object.prototype.hasOwnProperty.call(o, ...args);
|
|
951
|
+
var isEmpty = (o) => Object.keys(o).length === 0;
|
|
952
|
+
var isEmptyObject = (o) => (0, import_types.isObject)(o) && isEmpty(o);
|
|
953
|
+
var makeObjectWithoutPrototype = () => /* @__PURE__ */ Object.create(null);
|
|
954
|
+
var deepDiff = (lhs, rhs) => {
|
|
955
|
+
if (lhs === rhs)
|
|
956
|
+
return {};
|
|
957
|
+
if (!(0, import_types.isObjectLike)(lhs) || !(0, import_types.isObjectLike)(rhs))
|
|
958
|
+
return rhs;
|
|
959
|
+
const deletedValues = Object.keys(lhs).reduce((acc, key) => {
|
|
960
|
+
if (!hasOwnProperty(rhs, key)) {
|
|
961
|
+
acc[key] = void 0;
|
|
1119
962
|
}
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
963
|
+
return acc;
|
|
964
|
+
}, makeObjectWithoutPrototype());
|
|
965
|
+
if ((0, import_types.isDate)(lhs) || (0, import_types.isDate)(rhs)) {
|
|
966
|
+
if (lhs.valueOf() === rhs.valueOf())
|
|
967
|
+
return {};
|
|
968
|
+
return rhs;
|
|
969
|
+
}
|
|
970
|
+
return Object.keys(rhs).reduce((acc, key) => {
|
|
971
|
+
if (!hasOwnProperty(lhs, key)) {
|
|
972
|
+
acc[key] = rhs[key];
|
|
973
|
+
return acc;
|
|
1126
974
|
}
|
|
1127
|
-
|
|
1128
|
-
|
|
975
|
+
const difference = diff(lhs[key], rhs[key]);
|
|
976
|
+
if (isEmptyObject(difference) && !(0, import_types.isDate)(difference) && (isEmptyObject(lhs[key]) || !isEmptyObject(rhs[key]))) {
|
|
977
|
+
return acc;
|
|
1129
978
|
}
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
979
|
+
acc[key] = difference;
|
|
980
|
+
return acc;
|
|
981
|
+
}, deletedValues);
|
|
982
|
+
};
|
|
983
|
+
var overwrite = (element, params, excludeFrom = []) => {
|
|
984
|
+
const { ref } = element;
|
|
985
|
+
const changes = {};
|
|
986
|
+
for (const e in params) {
|
|
987
|
+
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
988
|
+
continue;
|
|
989
|
+
const elementProp = element[e];
|
|
990
|
+
const paramsProp = params[e];
|
|
991
|
+
if (paramsProp) {
|
|
992
|
+
ref.__cache[e] = changes[e] = elementProp;
|
|
993
|
+
ref[e] = paramsProp;
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
return changes;
|
|
997
|
+
};
|
|
998
|
+
var overwriteShallow = (obj, params, excludeFrom = []) => {
|
|
999
|
+
for (const e in params) {
|
|
1000
|
+
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
1001
|
+
continue;
|
|
1002
|
+
obj[e] = params[e];
|
|
1003
|
+
}
|
|
1004
|
+
return obj;
|
|
1005
|
+
};
|
|
1006
|
+
var overwriteDeep = (obj, params, excludeFrom = []) => {
|
|
1007
|
+
for (const e in params) {
|
|
1008
|
+
if (e === "__proto__")
|
|
1009
|
+
continue;
|
|
1010
|
+
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
1011
|
+
continue;
|
|
1012
|
+
const objProp = obj[e];
|
|
1013
|
+
const paramsProp = params[e];
|
|
1014
|
+
if ((0, import_types.isObjectLike)(objProp) && (0, import_types.isObjectLike)(paramsProp)) {
|
|
1015
|
+
overwriteDeep(objProp, paramsProp);
|
|
1016
|
+
} else if (paramsProp !== void 0) {
|
|
1017
|
+
obj[e] = paramsProp;
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
return obj;
|
|
1021
|
+
};
|
|
1022
|
+
var mergeIfExisted = (a, b) => {
|
|
1023
|
+
if ((0, import_types.isObjectLike)(a) && (0, import_types.isObjectLike)(b))
|
|
1024
|
+
return deepMerge2(a, b);
|
|
1025
|
+
return a || b;
|
|
1026
|
+
};
|
|
1027
|
+
var flattenRecursive = (param, prop, stack = []) => {
|
|
1028
|
+
const objectized = (0, import_array.mergeAndCloneIfArray)(param);
|
|
1029
|
+
stack.push(objectized);
|
|
1030
|
+
const extendOfExtend = objectized[prop];
|
|
1031
|
+
if (extendOfExtend)
|
|
1032
|
+
flattenRecursive(extendOfExtend, prop, stack);
|
|
1033
|
+
delete objectized[prop];
|
|
1034
|
+
return stack;
|
|
1035
|
+
};
|
|
1036
|
+
var isEqualDeep = (param, element, visited = /* @__PURE__ */ new Set()) => {
|
|
1037
|
+
if (typeof param !== "object" || typeof element !== "object" || param === null || element === null) {
|
|
1038
|
+
return param === element;
|
|
1039
|
+
}
|
|
1040
|
+
if (visited.has(param) || visited.has(element)) {
|
|
1041
|
+
return true;
|
|
1042
|
+
}
|
|
1043
|
+
visited.add(param);
|
|
1044
|
+
visited.add(element);
|
|
1045
|
+
const keysParam = Object.keys(param);
|
|
1046
|
+
const keysElement = Object.keys(element);
|
|
1047
|
+
if (keysParam.length !== keysElement.length) {
|
|
1048
|
+
return false;
|
|
1049
|
+
}
|
|
1050
|
+
for (const key of keysParam) {
|
|
1051
|
+
if (!keysElement.includes(key)) {
|
|
1052
|
+
return false;
|
|
1053
|
+
}
|
|
1054
|
+
const paramProp = param[key];
|
|
1055
|
+
const elementProp = element[key];
|
|
1056
|
+
if (!isEqualDeep(paramProp, elementProp, visited)) {
|
|
1057
|
+
return false;
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
return true;
|
|
1061
|
+
};
|
|
1062
|
+
var deepContains = (obj1, obj2) => {
|
|
1063
|
+
if (typeof obj1 !== typeof obj2) {
|
|
1064
|
+
return false;
|
|
1065
|
+
}
|
|
1066
|
+
if ((0, import_types.isObjectLike)(obj1)) {
|
|
1067
|
+
if (Array.isArray(obj1) && Array.isArray(obj2)) {
|
|
1068
|
+
if (obj1.length !== obj2.length) {
|
|
1069
|
+
return false;
|
|
1070
|
+
}
|
|
1071
|
+
for (let i = 0; i < obj1.length; i++) {
|
|
1072
|
+
if (!deepContains(obj1[i], obj2[i])) {
|
|
1073
|
+
return false;
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
} else if ((0, import_types.isObjectLike)(obj1) && obj2 !== null) {
|
|
1077
|
+
for (const key in obj1) {
|
|
1078
|
+
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj2, key);
|
|
1079
|
+
if (!hasOwnProperty2 || !deepContains(obj1[key], obj2[key])) {
|
|
1080
|
+
return false;
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
}
|
|
1084
|
+
} else {
|
|
1085
|
+
return obj2 === obj1;
|
|
1086
|
+
}
|
|
1087
|
+
return true;
|
|
1088
|
+
};
|
|
1089
|
+
var removeFromObject = (obj, props) => {
|
|
1090
|
+
if (props === void 0 || props === null)
|
|
1091
|
+
return obj;
|
|
1092
|
+
if ((0, import_types.is)(props)("string", "number")) {
|
|
1093
|
+
delete obj[props];
|
|
1094
|
+
} else if ((0, import_types.isArray)(props)) {
|
|
1095
|
+
props.forEach((prop) => delete obj[prop]);
|
|
1096
|
+
} else {
|
|
1097
|
+
throw new Error("Invalid input: props must be a string or an array of strings");
|
|
1098
|
+
}
|
|
1099
|
+
return obj;
|
|
1100
|
+
};
|
|
1101
|
+
var createObjectWithoutPrototype = (obj) => {
|
|
1102
|
+
if (obj === null || typeof obj !== "object") {
|
|
1103
|
+
return obj;
|
|
1104
|
+
}
|
|
1105
|
+
const newObj = /* @__PURE__ */ Object.create(null);
|
|
1106
|
+
for (const key in obj) {
|
|
1107
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
1108
|
+
newObj[key] = createObjectWithoutPrototype(obj[key]);
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
return newObj;
|
|
1112
|
+
};
|
|
1113
|
+
var checkIfKeyIsComponent = (key) => {
|
|
1114
|
+
const isFirstKeyString = (0, import_types.isString)(key);
|
|
1115
|
+
if (!isFirstKeyString)
|
|
1116
|
+
return;
|
|
1117
|
+
const firstCharKey = key.slice(0, 1);
|
|
1118
|
+
return /^[A-Z]*$/.test(firstCharKey);
|
|
1119
|
+
};
|
|
1120
|
+
var getChildrenComponentsByKey = (key, el) => {
|
|
1121
|
+
if (key === el.key || el.__ref.__componentKey === key) {
|
|
1122
|
+
return el;
|
|
1123
|
+
}
|
|
1124
|
+
if (el.extend) {
|
|
1125
|
+
const foundString = (0, import_types.isString)(el.extend) && el.extend === key;
|
|
1126
|
+
const foundInArray = (0, import_types.isArray)(el.extend) && el.extend.filter((v) => v === key).length;
|
|
1127
|
+
if (foundString || foundInArray)
|
|
1128
|
+
return el;
|
|
1129
|
+
}
|
|
1130
|
+
if (el.parent && el.parent.childExtend) {
|
|
1131
|
+
const foundString = (0, import_types.isString)(el.parent.childExtend) && el.parent.childExtend === key;
|
|
1132
|
+
const foundInArray = (0, import_types.isArray)(el.parent.childExtend) && el.parent.childExtend.filter((v) => v === key).length;
|
|
1133
|
+
if (foundString || foundInArray)
|
|
1134
|
+
return el;
|
|
1135
|
+
}
|
|
1136
|
+
};
|
|
1137
|
+
var getExtendsInElement = (obj) => {
|
|
1138
|
+
let result = [];
|
|
1139
|
+
function traverse(o) {
|
|
1140
|
+
for (const key in o) {
|
|
1141
|
+
if (Object.hasOwnProperty.call(o, key)) {
|
|
1142
|
+
if (checkIfKeyIsComponent(key)) {
|
|
1143
|
+
result.push(key);
|
|
1144
|
+
}
|
|
1145
|
+
if (key === "extend") {
|
|
1146
|
+
if (typeof o[key] === "string") {
|
|
1147
|
+
result.push(o[key]);
|
|
1148
|
+
} else if (Array.isArray(o[key])) {
|
|
1149
|
+
result = result.concat(o[key]);
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
if (typeof o[key] === "object" && o[key] !== null) {
|
|
1153
|
+
traverse(o[key]);
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1158
|
+
traverse(obj);
|
|
1159
|
+
return result;
|
|
1177
1160
|
};
|
|
1178
|
-
const callNow = immediate && !timeout;
|
|
1179
|
-
clearTimeout(timeout);
|
|
1180
|
-
timeout = setTimeout(later, wait);
|
|
1181
|
-
if (callNow)
|
|
1182
|
-
func.apply(context, args);
|
|
1183
|
-
};
|
|
1184
|
-
}
|
|
1185
|
-
var debounceOnContext = (element, func, timeout = 300) => {
|
|
1186
|
-
let timer;
|
|
1187
|
-
return (...args) => {
|
|
1188
|
-
clearTimeout(timer);
|
|
1189
|
-
timer = setTimeout(() => {
|
|
1190
|
-
func.apply(element, args);
|
|
1191
|
-
}, timeout);
|
|
1192
|
-
};
|
|
1193
|
-
};
|
|
1194
|
-
var memoize = (fn) => {
|
|
1195
|
-
const cache = {};
|
|
1196
|
-
return (...args) => {
|
|
1197
|
-
const n = args[0];
|
|
1198
|
-
if (n in cache) {
|
|
1199
|
-
return cache[n];
|
|
1200
|
-
} else {
|
|
1201
|
-
const result = fn(n);
|
|
1202
|
-
cache[n] = result;
|
|
1203
|
-
return result;
|
|
1204
|
-
}
|
|
1205
|
-
};
|
|
1206
|
-
};
|
|
1207
|
-
var isStringFunction = (inputString) => {
|
|
1208
|
-
const functionRegex = /^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/;
|
|
1209
|
-
return functionRegex.test(inputString);
|
|
1210
|
-
};
|
|
1211
|
-
}
|
|
1212
|
-
});
|
|
1213
|
-
|
|
1214
|
-
// ../../../domql/packages/utils/dist/cjs/log.js
|
|
1215
|
-
var require_log2 = __commonJS({
|
|
1216
|
-
"../../../domql/packages/utils/dist/cjs/log.js"(exports, module2) {
|
|
1217
|
-
"use strict";
|
|
1218
|
-
var __defProp3 = Object.defineProperty;
|
|
1219
|
-
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
1220
|
-
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
1221
|
-
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
1222
|
-
var __export3 = (target, all) => {
|
|
1223
|
-
for (var name in all)
|
|
1224
|
-
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
1225
|
-
};
|
|
1226
|
-
var __copyProps3 = (to, from, except, desc) => {
|
|
1227
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
1228
|
-
for (let key of __getOwnPropNames3(from))
|
|
1229
|
-
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
1230
|
-
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
1231
|
-
}
|
|
1232
|
-
return to;
|
|
1233
|
-
};
|
|
1234
|
-
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
1235
|
-
var log_exports = {};
|
|
1236
|
-
__export3(log_exports, {
|
|
1237
|
-
logGroupIf: () => logGroupIf,
|
|
1238
|
-
logIf: () => logIf
|
|
1239
|
-
});
|
|
1240
|
-
module2.exports = __toCommonJS3(log_exports);
|
|
1241
|
-
var logIf = (bool, ...arg) => {
|
|
1242
|
-
if (bool)
|
|
1243
|
-
arg.map((v) => console.log(v));
|
|
1244
|
-
};
|
|
1245
|
-
var logGroupIf = (bool, key, ...arg) => {
|
|
1246
|
-
if (bool) {
|
|
1247
|
-
console.group(key);
|
|
1248
|
-
arg.map((v) => console.log(v));
|
|
1249
|
-
console.groupEnd(key);
|
|
1250
|
-
}
|
|
1251
|
-
};
|
|
1252
|
-
}
|
|
1253
|
-
});
|
|
1254
|
-
|
|
1255
|
-
// ../../../domql/packages/utils/dist/cjs/cookie.js
|
|
1256
|
-
var require_cookie2 = __commonJS({
|
|
1257
|
-
"../../../domql/packages/utils/dist/cjs/cookie.js"(exports, module2) {
|
|
1258
|
-
"use strict";
|
|
1259
|
-
var __defProp3 = Object.defineProperty;
|
|
1260
|
-
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
1261
|
-
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
1262
|
-
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
1263
|
-
var __export3 = (target, all) => {
|
|
1264
|
-
for (var name in all)
|
|
1265
|
-
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
1266
|
-
};
|
|
1267
|
-
var __copyProps3 = (to, from, except, desc) => {
|
|
1268
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
1269
|
-
for (let key of __getOwnPropNames3(from))
|
|
1270
|
-
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
1271
|
-
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
1272
|
-
}
|
|
1273
|
-
return to;
|
|
1274
|
-
};
|
|
1275
|
-
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
1276
|
-
var cookie_exports = {};
|
|
1277
|
-
__export3(cookie_exports, {
|
|
1278
|
-
getCookie: () => getCookie,
|
|
1279
|
-
isMobile: () => isMobile,
|
|
1280
|
-
setCookie: () => setCookie
|
|
1281
|
-
});
|
|
1282
|
-
module2.exports = __toCommonJS3(cookie_exports);
|
|
1283
|
-
var import_types = require_types2();
|
|
1284
|
-
var import_utils11 = require_cjs2();
|
|
1285
|
-
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
1286
|
-
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
1287
|
-
if ((0, import_types.isUndefined)(import_utils11.document) || (0, import_types.isUndefined)(import_utils11.document.cookie))
|
|
1288
|
-
return;
|
|
1289
|
-
const d = /* @__PURE__ */ new Date();
|
|
1290
|
-
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
1291
|
-
const expires = `expires=${d.toUTCString()}`;
|
|
1292
|
-
import_utils11.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
1293
|
-
};
|
|
1294
|
-
var getCookie = (cname) => {
|
|
1295
|
-
if ((0, import_types.isUndefined)(import_utils11.document) || (0, import_types.isUndefined)(import_utils11.document.cookie))
|
|
1296
|
-
return;
|
|
1297
|
-
const name = `${cname}=`;
|
|
1298
|
-
const decodedCookie = decodeURIComponent(import_utils11.document.cookie);
|
|
1299
|
-
const ca = decodedCookie.split(";");
|
|
1300
|
-
for (let i = 0; i < ca.length; i++) {
|
|
1301
|
-
let c = ca[i];
|
|
1302
|
-
while (c.charAt(0) === " ")
|
|
1303
|
-
c = c.substring(1);
|
|
1304
|
-
if (c.indexOf(name) === 0)
|
|
1305
|
-
return c.substring(name.length, c.length);
|
|
1306
|
-
}
|
|
1307
|
-
return "";
|
|
1308
|
-
};
|
|
1309
|
-
}
|
|
1310
|
-
});
|
|
1311
|
-
|
|
1312
|
-
// ../../../domql/packages/utils/dist/cjs/tags.js
|
|
1313
|
-
var require_tags2 = __commonJS({
|
|
1314
|
-
"../../../domql/packages/utils/dist/cjs/tags.js"(exports, module2) {
|
|
1315
|
-
"use strict";
|
|
1316
|
-
var __defProp3 = Object.defineProperty;
|
|
1317
|
-
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
1318
|
-
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
1319
|
-
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
1320
|
-
var __export3 = (target, all) => {
|
|
1321
|
-
for (var name in all)
|
|
1322
|
-
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
1323
|
-
};
|
|
1324
|
-
var __copyProps3 = (to, from, except, desc) => {
|
|
1325
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
1326
|
-
for (let key of __getOwnPropNames3(from))
|
|
1327
|
-
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
1328
|
-
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
1329
|
-
}
|
|
1330
|
-
return to;
|
|
1331
|
-
};
|
|
1332
|
-
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
1333
|
-
var tags_exports = {};
|
|
1334
|
-
__export3(tags_exports, {
|
|
1335
|
-
HTML_TAGS: () => HTML_TAGS,
|
|
1336
|
-
isValidHtmlTag: () => isValidHtmlTag
|
|
1337
|
-
});
|
|
1338
|
-
module2.exports = __toCommonJS3(tags_exports);
|
|
1339
|
-
var HTML_TAGS = {
|
|
1340
|
-
root: [
|
|
1341
|
-
"body",
|
|
1342
|
-
"html"
|
|
1343
|
-
],
|
|
1344
|
-
head: [
|
|
1345
|
-
"title",
|
|
1346
|
-
"base",
|
|
1347
|
-
"meta",
|
|
1348
|
-
"style"
|
|
1349
|
-
],
|
|
1350
|
-
body: [
|
|
1351
|
-
"string",
|
|
1352
|
-
"fragment",
|
|
1353
|
-
"a",
|
|
1354
|
-
"abbr",
|
|
1355
|
-
"acronym",
|
|
1356
|
-
"address",
|
|
1357
|
-
"applet",
|
|
1358
|
-
"area",
|
|
1359
|
-
"article",
|
|
1360
|
-
"aside",
|
|
1361
|
-
"audio",
|
|
1362
|
-
"b",
|
|
1363
|
-
"basefont",
|
|
1364
|
-
"bdi",
|
|
1365
|
-
"bdo",
|
|
1366
|
-
"big",
|
|
1367
|
-
"blockquote",
|
|
1368
|
-
"br",
|
|
1369
|
-
"button",
|
|
1370
|
-
"canvas",
|
|
1371
|
-
"caption",
|
|
1372
|
-
"center",
|
|
1373
|
-
"cite",
|
|
1374
|
-
"code",
|
|
1375
|
-
"search",
|
|
1376
|
-
"col",
|
|
1377
|
-
"colgroup",
|
|
1378
|
-
"data",
|
|
1379
|
-
"datalist",
|
|
1380
|
-
"dd",
|
|
1381
|
-
"del",
|
|
1382
|
-
"details",
|
|
1383
|
-
"dfn",
|
|
1384
|
-
"dialog",
|
|
1385
|
-
"dir",
|
|
1386
|
-
"div",
|
|
1387
|
-
"dl",
|
|
1388
|
-
"dt",
|
|
1389
|
-
"em",
|
|
1390
|
-
"embed",
|
|
1391
|
-
"fieldset",
|
|
1392
|
-
"figcaption",
|
|
1393
|
-
"figure",
|
|
1394
|
-
"font",
|
|
1395
|
-
"footer",
|
|
1396
|
-
"form",
|
|
1397
|
-
"frame",
|
|
1398
|
-
"frameset",
|
|
1399
|
-
"h1",
|
|
1400
|
-
"h2",
|
|
1401
|
-
"h3",
|
|
1402
|
-
"h4",
|
|
1403
|
-
"h5",
|
|
1404
|
-
"h6",
|
|
1405
|
-
"head",
|
|
1406
|
-
"header",
|
|
1407
|
-
"hr",
|
|
1408
|
-
"i",
|
|
1409
|
-
"iframe",
|
|
1410
|
-
"img",
|
|
1411
|
-
"input",
|
|
1412
|
-
"ins",
|
|
1413
|
-
"kbd",
|
|
1414
|
-
"label",
|
|
1415
|
-
"legend",
|
|
1416
|
-
"li",
|
|
1417
|
-
"link",
|
|
1418
|
-
"main",
|
|
1419
|
-
"map",
|
|
1420
|
-
"mark",
|
|
1421
|
-
"meter",
|
|
1422
|
-
"nav",
|
|
1423
|
-
"noframes",
|
|
1424
|
-
"noscript",
|
|
1425
|
-
"object",
|
|
1426
|
-
"ol",
|
|
1427
|
-
"optgroup",
|
|
1428
|
-
"option",
|
|
1429
|
-
"output",
|
|
1430
|
-
"p",
|
|
1431
|
-
"param",
|
|
1432
|
-
"picture",
|
|
1433
|
-
"pre",
|
|
1434
|
-
"progress",
|
|
1435
|
-
"hgroup",
|
|
1436
|
-
"q",
|
|
1437
|
-
"rp",
|
|
1438
|
-
"rt",
|
|
1439
|
-
"ruby",
|
|
1440
|
-
"s",
|
|
1441
|
-
"samp",
|
|
1442
|
-
"script",
|
|
1443
|
-
"section",
|
|
1444
|
-
"select",
|
|
1445
|
-
"small",
|
|
1446
|
-
"source",
|
|
1447
|
-
"span",
|
|
1448
|
-
"strike",
|
|
1449
|
-
"strong",
|
|
1450
|
-
"sub",
|
|
1451
|
-
"summary",
|
|
1452
|
-
"sup",
|
|
1453
|
-
"table",
|
|
1454
|
-
"tbody",
|
|
1455
|
-
"td",
|
|
1456
|
-
"template",
|
|
1457
|
-
"hgroup",
|
|
1458
|
-
"textarea",
|
|
1459
|
-
"tfoot",
|
|
1460
|
-
"th",
|
|
1461
|
-
"thead",
|
|
1462
|
-
"time",
|
|
1463
|
-
"tr",
|
|
1464
|
-
"track",
|
|
1465
|
-
"tt",
|
|
1466
|
-
"u",
|
|
1467
|
-
"ul",
|
|
1468
|
-
"var",
|
|
1469
|
-
"video",
|
|
1470
|
-
"wbr",
|
|
1471
|
-
// SVG
|
|
1472
|
-
"svg",
|
|
1473
|
-
"path"
|
|
1474
|
-
]
|
|
1475
|
-
};
|
|
1476
|
-
var isValidHtmlTag = (arg) => HTML_TAGS.body.includes(arg);
|
|
1477
|
-
}
|
|
1478
|
-
});
|
|
1479
|
-
|
|
1480
|
-
// ../../../domql/packages/utils/dist/cjs/index.js
|
|
1481
|
-
var require_cjs2 = __commonJS({
|
|
1482
|
-
"../../../domql/packages/utils/dist/cjs/index.js"(exports, module2) {
|
|
1483
|
-
"use strict";
|
|
1484
|
-
var __defProp3 = Object.defineProperty;
|
|
1485
|
-
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
1486
|
-
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
1487
|
-
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
1488
|
-
var __copyProps3 = (to, from, except, desc) => {
|
|
1489
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
1490
|
-
for (let key of __getOwnPropNames3(from))
|
|
1491
|
-
if (!__hasOwnProp3.call(to, key) && key !== except)
|
|
1492
|
-
__defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
|
|
1493
1161
|
}
|
|
1494
|
-
|
|
1162
|
+
});
|
|
1163
|
+
var require_function2 = __commonJS2({
|
|
1164
|
+
"../../../domql/packages/utils/dist/cjs/function.js"(exports2, module22) {
|
|
1165
|
+
"use strict";
|
|
1166
|
+
var __defProp22 = Object.defineProperty;
|
|
1167
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1168
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1169
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1170
|
+
var __export22 = (target, all) => {
|
|
1171
|
+
for (var name in all)
|
|
1172
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1173
|
+
};
|
|
1174
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1175
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1176
|
+
for (let key of __getOwnPropNames22(from))
|
|
1177
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1178
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1179
|
+
}
|
|
1180
|
+
return to;
|
|
1181
|
+
};
|
|
1182
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1183
|
+
var function_exports = {};
|
|
1184
|
+
__export22(function_exports, {
|
|
1185
|
+
debounce: () => debounce,
|
|
1186
|
+
debounceOnContext: () => debounceOnContext,
|
|
1187
|
+
isStringFunction: () => isStringFunction,
|
|
1188
|
+
memoize: () => memoize
|
|
1189
|
+
});
|
|
1190
|
+
module22.exports = __toCommonJS22(function_exports);
|
|
1191
|
+
function debounce(func, wait, immediate) {
|
|
1192
|
+
let timeout;
|
|
1193
|
+
return function() {
|
|
1194
|
+
const context = this;
|
|
1195
|
+
const args = arguments;
|
|
1196
|
+
const later = function() {
|
|
1197
|
+
timeout = null;
|
|
1198
|
+
if (!immediate)
|
|
1199
|
+
func.apply(context, args);
|
|
1200
|
+
};
|
|
1201
|
+
const callNow = immediate && !timeout;
|
|
1202
|
+
clearTimeout(timeout);
|
|
1203
|
+
timeout = setTimeout(later, wait);
|
|
1204
|
+
if (callNow)
|
|
1205
|
+
func.apply(context, args);
|
|
1206
|
+
};
|
|
1207
|
+
}
|
|
1208
|
+
var debounceOnContext = (element, func, timeout = 300) => {
|
|
1209
|
+
let timer;
|
|
1210
|
+
return (...args) => {
|
|
1211
|
+
clearTimeout(timer);
|
|
1212
|
+
timer = setTimeout(() => {
|
|
1213
|
+
func.apply(element, args);
|
|
1214
|
+
}, timeout);
|
|
1215
|
+
};
|
|
1216
|
+
};
|
|
1217
|
+
var memoize = (fn) => {
|
|
1218
|
+
const cache = {};
|
|
1219
|
+
return (...args) => {
|
|
1220
|
+
const n = args[0];
|
|
1221
|
+
if (n in cache) {
|
|
1222
|
+
return cache[n];
|
|
1223
|
+
} else {
|
|
1224
|
+
const result = fn(n);
|
|
1225
|
+
cache[n] = result;
|
|
1226
|
+
return result;
|
|
1227
|
+
}
|
|
1228
|
+
};
|
|
1229
|
+
};
|
|
1230
|
+
var isStringFunction = (inputString) => {
|
|
1231
|
+
const functionRegex = /^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/;
|
|
1232
|
+
return functionRegex.test(inputString);
|
|
1233
|
+
};
|
|
1234
|
+
}
|
|
1235
|
+
});
|
|
1236
|
+
var require_log2 = __commonJS2({
|
|
1237
|
+
"../../../domql/packages/utils/dist/cjs/log.js"(exports2, module22) {
|
|
1238
|
+
"use strict";
|
|
1239
|
+
var __defProp22 = Object.defineProperty;
|
|
1240
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1241
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1242
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1243
|
+
var __export22 = (target, all) => {
|
|
1244
|
+
for (var name in all)
|
|
1245
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1246
|
+
};
|
|
1247
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1248
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1249
|
+
for (let key of __getOwnPropNames22(from))
|
|
1250
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1251
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1252
|
+
}
|
|
1253
|
+
return to;
|
|
1254
|
+
};
|
|
1255
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1256
|
+
var log_exports = {};
|
|
1257
|
+
__export22(log_exports, {
|
|
1258
|
+
logGroupIf: () => logGroupIf,
|
|
1259
|
+
logIf: () => logIf
|
|
1260
|
+
});
|
|
1261
|
+
module22.exports = __toCommonJS22(log_exports);
|
|
1262
|
+
var logIf = (bool, ...arg) => {
|
|
1263
|
+
if (bool)
|
|
1264
|
+
arg.map((v) => console.log(v));
|
|
1265
|
+
};
|
|
1266
|
+
var logGroupIf = (bool, key, ...arg) => {
|
|
1267
|
+
if (bool) {
|
|
1268
|
+
console.group(key);
|
|
1269
|
+
arg.map((v) => console.log(v));
|
|
1270
|
+
console.groupEnd(key);
|
|
1271
|
+
}
|
|
1272
|
+
};
|
|
1273
|
+
}
|
|
1274
|
+
});
|
|
1275
|
+
var require_cookie2 = __commonJS2({
|
|
1276
|
+
"../../../domql/packages/utils/dist/cjs/cookie.js"(exports2, module22) {
|
|
1277
|
+
"use strict";
|
|
1278
|
+
var __defProp22 = Object.defineProperty;
|
|
1279
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1280
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1281
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1282
|
+
var __export22 = (target, all) => {
|
|
1283
|
+
for (var name in all)
|
|
1284
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1285
|
+
};
|
|
1286
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1287
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1288
|
+
for (let key of __getOwnPropNames22(from))
|
|
1289
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1290
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1291
|
+
}
|
|
1292
|
+
return to;
|
|
1293
|
+
};
|
|
1294
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1295
|
+
var cookie_exports = {};
|
|
1296
|
+
__export22(cookie_exports, {
|
|
1297
|
+
getCookie: () => getCookie,
|
|
1298
|
+
isMobile: () => isMobile,
|
|
1299
|
+
setCookie: () => setCookie
|
|
1300
|
+
});
|
|
1301
|
+
module22.exports = __toCommonJS22(cookie_exports);
|
|
1302
|
+
var import_types = require_types2();
|
|
1303
|
+
var import_utils32 = require_cjs4();
|
|
1304
|
+
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
1305
|
+
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
1306
|
+
if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
|
|
1307
|
+
return;
|
|
1308
|
+
const d = /* @__PURE__ */ new Date();
|
|
1309
|
+
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
1310
|
+
const expires = `expires=${d.toUTCString()}`;
|
|
1311
|
+
import_utils32.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
1312
|
+
};
|
|
1313
|
+
var getCookie = (cname) => {
|
|
1314
|
+
if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
|
|
1315
|
+
return;
|
|
1316
|
+
const name = `${cname}=`;
|
|
1317
|
+
const decodedCookie = decodeURIComponent(import_utils32.document.cookie);
|
|
1318
|
+
const ca = decodedCookie.split(";");
|
|
1319
|
+
for (let i = 0; i < ca.length; i++) {
|
|
1320
|
+
let c = ca[i];
|
|
1321
|
+
while (c.charAt(0) === " ")
|
|
1322
|
+
c = c.substring(1);
|
|
1323
|
+
if (c.indexOf(name) === 0)
|
|
1324
|
+
return c.substring(name.length, c.length);
|
|
1325
|
+
}
|
|
1326
|
+
return "";
|
|
1327
|
+
};
|
|
1328
|
+
}
|
|
1329
|
+
});
|
|
1330
|
+
var require_tags2 = __commonJS2({
|
|
1331
|
+
"../../../domql/packages/utils/dist/cjs/tags.js"(exports2, module22) {
|
|
1332
|
+
"use strict";
|
|
1333
|
+
var __defProp22 = Object.defineProperty;
|
|
1334
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1335
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1336
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1337
|
+
var __export22 = (target, all) => {
|
|
1338
|
+
for (var name in all)
|
|
1339
|
+
__defProp22(target, name, { get: all[name], enumerable: true });
|
|
1340
|
+
};
|
|
1341
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1342
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1343
|
+
for (let key of __getOwnPropNames22(from))
|
|
1344
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1345
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1346
|
+
}
|
|
1347
|
+
return to;
|
|
1348
|
+
};
|
|
1349
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1350
|
+
var tags_exports = {};
|
|
1351
|
+
__export22(tags_exports, {
|
|
1352
|
+
HTML_TAGS: () => HTML_TAGS,
|
|
1353
|
+
isValidHtmlTag: () => isValidHtmlTag
|
|
1354
|
+
});
|
|
1355
|
+
module22.exports = __toCommonJS22(tags_exports);
|
|
1356
|
+
var HTML_TAGS = {
|
|
1357
|
+
root: [
|
|
1358
|
+
"body",
|
|
1359
|
+
"html"
|
|
1360
|
+
],
|
|
1361
|
+
head: [
|
|
1362
|
+
"title",
|
|
1363
|
+
"base",
|
|
1364
|
+
"meta",
|
|
1365
|
+
"style"
|
|
1366
|
+
],
|
|
1367
|
+
body: [
|
|
1368
|
+
"string",
|
|
1369
|
+
"fragment",
|
|
1370
|
+
"a",
|
|
1371
|
+
"abbr",
|
|
1372
|
+
"acronym",
|
|
1373
|
+
"address",
|
|
1374
|
+
"applet",
|
|
1375
|
+
"area",
|
|
1376
|
+
"article",
|
|
1377
|
+
"aside",
|
|
1378
|
+
"audio",
|
|
1379
|
+
"b",
|
|
1380
|
+
"basefont",
|
|
1381
|
+
"bdi",
|
|
1382
|
+
"bdo",
|
|
1383
|
+
"big",
|
|
1384
|
+
"blockquote",
|
|
1385
|
+
"br",
|
|
1386
|
+
"button",
|
|
1387
|
+
"canvas",
|
|
1388
|
+
"caption",
|
|
1389
|
+
"center",
|
|
1390
|
+
"cite",
|
|
1391
|
+
"code",
|
|
1392
|
+
"search",
|
|
1393
|
+
"col",
|
|
1394
|
+
"colgroup",
|
|
1395
|
+
"data",
|
|
1396
|
+
"datalist",
|
|
1397
|
+
"dd",
|
|
1398
|
+
"del",
|
|
1399
|
+
"details",
|
|
1400
|
+
"dfn",
|
|
1401
|
+
"dialog",
|
|
1402
|
+
"dir",
|
|
1403
|
+
"div",
|
|
1404
|
+
"dl",
|
|
1405
|
+
"dt",
|
|
1406
|
+
"em",
|
|
1407
|
+
"embed",
|
|
1408
|
+
"fieldset",
|
|
1409
|
+
"figcaption",
|
|
1410
|
+
"figure",
|
|
1411
|
+
"font",
|
|
1412
|
+
"footer",
|
|
1413
|
+
"form",
|
|
1414
|
+
"frame",
|
|
1415
|
+
"frameset",
|
|
1416
|
+
"h1",
|
|
1417
|
+
"h2",
|
|
1418
|
+
"h3",
|
|
1419
|
+
"h4",
|
|
1420
|
+
"h5",
|
|
1421
|
+
"h6",
|
|
1422
|
+
"head",
|
|
1423
|
+
"header",
|
|
1424
|
+
"hr",
|
|
1425
|
+
"i",
|
|
1426
|
+
"iframe",
|
|
1427
|
+
"img",
|
|
1428
|
+
"input",
|
|
1429
|
+
"ins",
|
|
1430
|
+
"kbd",
|
|
1431
|
+
"label",
|
|
1432
|
+
"legend",
|
|
1433
|
+
"li",
|
|
1434
|
+
"link",
|
|
1435
|
+
"main",
|
|
1436
|
+
"map",
|
|
1437
|
+
"mark",
|
|
1438
|
+
"meter",
|
|
1439
|
+
"nav",
|
|
1440
|
+
"noframes",
|
|
1441
|
+
"noscript",
|
|
1442
|
+
"object",
|
|
1443
|
+
"ol",
|
|
1444
|
+
"optgroup",
|
|
1445
|
+
"option",
|
|
1446
|
+
"output",
|
|
1447
|
+
"p",
|
|
1448
|
+
"param",
|
|
1449
|
+
"picture",
|
|
1450
|
+
"pre",
|
|
1451
|
+
"progress",
|
|
1452
|
+
"hgroup",
|
|
1453
|
+
"q",
|
|
1454
|
+
"rp",
|
|
1455
|
+
"rt",
|
|
1456
|
+
"ruby",
|
|
1457
|
+
"s",
|
|
1458
|
+
"samp",
|
|
1459
|
+
"script",
|
|
1460
|
+
"section",
|
|
1461
|
+
"select",
|
|
1462
|
+
"small",
|
|
1463
|
+
"source",
|
|
1464
|
+
"span",
|
|
1465
|
+
"strike",
|
|
1466
|
+
"strong",
|
|
1467
|
+
"sub",
|
|
1468
|
+
"summary",
|
|
1469
|
+
"sup",
|
|
1470
|
+
"table",
|
|
1471
|
+
"tbody",
|
|
1472
|
+
"td",
|
|
1473
|
+
"template",
|
|
1474
|
+
"hgroup",
|
|
1475
|
+
"textarea",
|
|
1476
|
+
"tfoot",
|
|
1477
|
+
"th",
|
|
1478
|
+
"thead",
|
|
1479
|
+
"time",
|
|
1480
|
+
"tr",
|
|
1481
|
+
"track",
|
|
1482
|
+
"tt",
|
|
1483
|
+
"u",
|
|
1484
|
+
"ul",
|
|
1485
|
+
"var",
|
|
1486
|
+
"video",
|
|
1487
|
+
"wbr",
|
|
1488
|
+
// SVG
|
|
1489
|
+
"svg",
|
|
1490
|
+
"path"
|
|
1491
|
+
]
|
|
1492
|
+
};
|
|
1493
|
+
var isValidHtmlTag = (arg) => HTML_TAGS.body.includes(arg);
|
|
1494
|
+
}
|
|
1495
|
+
});
|
|
1496
|
+
var require_cjs4 = __commonJS2({
|
|
1497
|
+
"../../../domql/packages/utils/dist/cjs/index.js"(exports2, module22) {
|
|
1498
|
+
"use strict";
|
|
1499
|
+
var __defProp22 = Object.defineProperty;
|
|
1500
|
+
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
1501
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1502
|
+
var __hasOwnProp22 = Object.prototype.hasOwnProperty;
|
|
1503
|
+
var __copyProps22 = (to, from, except, desc) => {
|
|
1504
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1505
|
+
for (let key of __getOwnPropNames22(from))
|
|
1506
|
+
if (!__hasOwnProp22.call(to, key) && key !== except)
|
|
1507
|
+
__defProp22(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc22(from, key)) || desc.enumerable });
|
|
1508
|
+
}
|
|
1509
|
+
return to;
|
|
1510
|
+
};
|
|
1511
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps22(target, mod, "default"), secondTarget && __copyProps22(secondTarget, mod, "default"));
|
|
1512
|
+
var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
|
|
1513
|
+
var utils_exports = {};
|
|
1514
|
+
module22.exports = __toCommonJS22(utils_exports);
|
|
1515
|
+
__reExport(utils_exports, require_key2(), module22.exports);
|
|
1516
|
+
__reExport(utils_exports, require_env2(), module22.exports);
|
|
1517
|
+
__reExport(utils_exports, require_types2(), module22.exports);
|
|
1518
|
+
__reExport(utils_exports, require_object2(), module22.exports);
|
|
1519
|
+
__reExport(utils_exports, require_function2(), module22.exports);
|
|
1520
|
+
__reExport(utils_exports, require_array2(), module22.exports);
|
|
1521
|
+
__reExport(utils_exports, require_node2(), module22.exports);
|
|
1522
|
+
__reExport(utils_exports, require_log2(), module22.exports);
|
|
1523
|
+
__reExport(utils_exports, require_string2(), module22.exports);
|
|
1524
|
+
__reExport(utils_exports, require_globals2(), module22.exports);
|
|
1525
|
+
__reExport(utils_exports, require_cookie2(), module22.exports);
|
|
1526
|
+
__reExport(utils_exports, require_tags2(), module22.exports);
|
|
1527
|
+
}
|
|
1528
|
+
});
|
|
1529
|
+
var src_exports = {};
|
|
1530
|
+
__export2(src_exports, {
|
|
1531
|
+
arrayzeValue: () => arrayzeValue,
|
|
1532
|
+
copyStringToClipboard: () => copyStringToClipboard,
|
|
1533
|
+
fibonacciNumberByIndex: () => fibonacciNumberByIndex,
|
|
1534
|
+
findClosestNumber: () => findClosestNumber,
|
|
1535
|
+
findClosestNumberInFactory: () => findClosestNumberInFactory,
|
|
1536
|
+
formatDate: () => formatDate,
|
|
1537
|
+
isPhoto: () => isPhoto,
|
|
1538
|
+
loadCssFile: () => loadCssFile,
|
|
1539
|
+
loadJavascript: () => loadJavascript,
|
|
1540
|
+
loadJavascriptFile: () => loadJavascriptFile,
|
|
1541
|
+
loadJavascriptFileSync: () => loadJavascriptFileSync,
|
|
1542
|
+
removeChars: () => removeChars,
|
|
1543
|
+
toCamelCase: () => toCamelCase2,
|
|
1544
|
+
toDashCase: () => toDashCase2,
|
|
1545
|
+
toDescriptionCase: () => toDescriptionCase,
|
|
1546
|
+
toTitleCase: () => toTitleCase,
|
|
1547
|
+
toggleFullscreen: () => toggleFullscreen
|
|
1548
|
+
});
|
|
1549
|
+
module2.exports = __toCommonJS2(src_exports);
|
|
1550
|
+
var import_utils22 = __toESM2(require_cjs4(), 1);
|
|
1551
|
+
var toggleFullscreen = async (el) => {
|
|
1552
|
+
if (!document.fullscreenElement) {
|
|
1553
|
+
try {
|
|
1554
|
+
await (el.node || document).requestFullscreen();
|
|
1555
|
+
} catch (err) {
|
|
1556
|
+
console.warn(`Error attempting to enable fullscreen mode: ${err.message} (${err.name})`);
|
|
1557
|
+
}
|
|
1558
|
+
} else {
|
|
1559
|
+
await document.exitFullscreen();
|
|
1560
|
+
}
|
|
1495
1561
|
};
|
|
1496
|
-
var
|
|
1497
|
-
var
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
__reExport(utils_exports, require_env2(), module2.exports);
|
|
1502
|
-
__reExport(utils_exports, require_types2(), module2.exports);
|
|
1503
|
-
__reExport(utils_exports, require_object2(), module2.exports);
|
|
1504
|
-
__reExport(utils_exports, require_function2(), module2.exports);
|
|
1505
|
-
__reExport(utils_exports, require_array2(), module2.exports);
|
|
1506
|
-
__reExport(utils_exports, require_node2(), module2.exports);
|
|
1507
|
-
__reExport(utils_exports, require_log2(), module2.exports);
|
|
1508
|
-
__reExport(utils_exports, require_string2(), module2.exports);
|
|
1509
|
-
__reExport(utils_exports, require_globals2(), module2.exports);
|
|
1510
|
-
__reExport(utils_exports, require_cookie2(), module2.exports);
|
|
1511
|
-
__reExport(utils_exports, require_tags2(), module2.exports);
|
|
1512
|
-
}
|
|
1513
|
-
});
|
|
1514
|
-
|
|
1515
|
-
// ../../node_modules/@domql/globals/dist/cjs/index.js
|
|
1516
|
-
var require_cjs3 = __commonJS({
|
|
1517
|
-
"../../node_modules/@domql/globals/dist/cjs/index.js"(exports, module2) {
|
|
1518
|
-
"use strict";
|
|
1519
|
-
var __defProp3 = Object.defineProperty;
|
|
1520
|
-
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
1521
|
-
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
1522
|
-
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
1523
|
-
var __export3 = (target, all) => {
|
|
1524
|
-
for (var name in all)
|
|
1525
|
-
__defProp3(target, name, { get: all[name], enumerable: true });
|
|
1562
|
+
var import_utils9 = __toESM2(require_cjs4(), 1);
|
|
1563
|
+
var findClosestNumber = (number, arr) => {
|
|
1564
|
+
return ((0, import_utils9.isArray)(arr) ? arr : Object.values(arr)).reduce((prev, curr) => {
|
|
1565
|
+
return Math.abs(curr - number) < Math.abs(prev - number) ? curr : prev;
|
|
1566
|
+
});
|
|
1526
1567
|
};
|
|
1527
|
-
var
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1568
|
+
var findClosestNumberInFactory = (val, factory) => {
|
|
1569
|
+
val = parseFloat(val);
|
|
1570
|
+
if ((0, import_utils9.isObject)(factory))
|
|
1571
|
+
factory = Object.values(factory);
|
|
1572
|
+
return findClosestNumber(val, factory);
|
|
1573
|
+
};
|
|
1574
|
+
var formatDate = (timestamp) => {
|
|
1575
|
+
if (!timestamp)
|
|
1576
|
+
return "";
|
|
1577
|
+
const d = new Date(timestamp);
|
|
1578
|
+
const ye = new Intl.DateTimeFormat("en", { year: "numeric" }).format(d);
|
|
1579
|
+
const mo = new Intl.DateTimeFormat("en", { month: "short" }).format(d);
|
|
1580
|
+
const da = new Intl.DateTimeFormat("en", { day: "2-digit" }).format(d);
|
|
1581
|
+
return `${da} ${mo}, ${ye}`;
|
|
1582
|
+
};
|
|
1583
|
+
var fibonacciNumberByIndex = function fibonacciNumberByIndex2(n) {
|
|
1584
|
+
const fib = [0, 1];
|
|
1585
|
+
for (let i = 2; i <= n; i++) {
|
|
1586
|
+
fib[i] = fib[i - 1] + fib[i - 2];
|
|
1587
|
+
}
|
|
1588
|
+
return fib[n];
|
|
1589
|
+
};
|
|
1590
|
+
var loadJavascriptFile = (FILE_URL, async = false, doc = document, type = "text/javascript") => {
|
|
1591
|
+
return new Promise((resolve, reject) => {
|
|
1592
|
+
try {
|
|
1593
|
+
const scriptEle = doc.createElement("script");
|
|
1594
|
+
scriptEle.type = type;
|
|
1595
|
+
scriptEle.async = async;
|
|
1596
|
+
scriptEle.src = FILE_URL;
|
|
1597
|
+
scriptEle.addEventListener("load", (ev) => {
|
|
1598
|
+
resolve({
|
|
1599
|
+
status: true
|
|
1600
|
+
});
|
|
1601
|
+
});
|
|
1602
|
+
scriptEle.addEventListener("error", (ev) => {
|
|
1603
|
+
reject(new Error({
|
|
1604
|
+
status: false,
|
|
1605
|
+
message: `Failed to load the script ${FILE_URL}`
|
|
1606
|
+
}));
|
|
1607
|
+
});
|
|
1608
|
+
doc.body.appendChild(scriptEle);
|
|
1609
|
+
} catch (error) {
|
|
1610
|
+
reject(error);
|
|
1611
|
+
}
|
|
1612
|
+
});
|
|
1613
|
+
};
|
|
1614
|
+
var loadJavascriptFileSync = (FILE_URL, doc = document, fallback, type = "text/javascript") => {
|
|
1615
|
+
const xhr = new window.XMLHttpRequest();
|
|
1616
|
+
xhr.open("GET", FILE_URL, false);
|
|
1617
|
+
xhr.send();
|
|
1618
|
+
if (xhr.status === 200) {
|
|
1619
|
+
const scriptEle = doc.createElement("script");
|
|
1620
|
+
scriptEle.type = type;
|
|
1621
|
+
scriptEle.text = xhr.responseText;
|
|
1622
|
+
doc.body.appendChild(scriptEle);
|
|
1623
|
+
if (typeof fallback === "function")
|
|
1624
|
+
fallback();
|
|
1625
|
+
} else {
|
|
1626
|
+
throw new Error(`Failed to load the script ${FILE_URL}`);
|
|
1627
|
+
}
|
|
1628
|
+
};
|
|
1629
|
+
var loadCssFile = (FILE_URL, async = false, doc = document, type = "text/javascript") => {
|
|
1630
|
+
return new Promise((resolve, reject) => {
|
|
1631
|
+
try {
|
|
1632
|
+
const linkElem = doc.createElement("link");
|
|
1633
|
+
linkElem.rel = "stylesheet";
|
|
1634
|
+
linkElem.href = FILE_URL;
|
|
1635
|
+
linkElem.addEventListener("load", (ev) => {
|
|
1636
|
+
resolve({
|
|
1637
|
+
status: true
|
|
1638
|
+
});
|
|
1639
|
+
});
|
|
1640
|
+
doc.head.appendChild(linkElem);
|
|
1641
|
+
} catch (error) {
|
|
1642
|
+
reject(error);
|
|
1643
|
+
}
|
|
1644
|
+
});
|
|
1645
|
+
};
|
|
1646
|
+
var loadJavascript = (body, async = false, doc = document, type = "text/javascript", id = "smbls-script") => {
|
|
1647
|
+
try {
|
|
1648
|
+
const scriptEle = doc.createElement("script");
|
|
1649
|
+
scriptEle.type = type;
|
|
1650
|
+
scriptEle.async = async;
|
|
1651
|
+
scriptEle.id = id;
|
|
1652
|
+
scriptEle.innerHTML = body;
|
|
1653
|
+
doc.body.appendChild(scriptEle);
|
|
1654
|
+
} catch (error) {
|
|
1655
|
+
console.warn(error);
|
|
1656
|
+
}
|
|
1657
|
+
};
|
|
1658
|
+
var isPhoto = (format) => ["jpeg", "gif", "jpg", "png", "tiff", "woff"].includes(format);
|
|
1659
|
+
var copyStringToClipboard = (str) => {
|
|
1660
|
+
const el = document.createElement("textarea");
|
|
1661
|
+
el.value = str;
|
|
1662
|
+
el.setAttribute("readonly", "");
|
|
1663
|
+
el.style = { position: "absolute", left: "-9999px" };
|
|
1664
|
+
document.body.appendChild(el);
|
|
1665
|
+
el.select();
|
|
1666
|
+
document.execCommand("copy");
|
|
1667
|
+
document.body.removeChild(el);
|
|
1668
|
+
};
|
|
1669
|
+
var removeChars = (str) => {
|
|
1670
|
+
return str.replace(/[^a-zA-Z0-9_]/g, "");
|
|
1671
|
+
};
|
|
1672
|
+
var toCamelCase2 = (str) => {
|
|
1673
|
+
return str.replace(/(?:^\w|[A-Z]|\b\w)/g, function(word, index) {
|
|
1674
|
+
return index === 0 ? word.toLowerCase() : word.toUpperCase();
|
|
1675
|
+
}).replaceAll(/\s+/g, "");
|
|
1676
|
+
};
|
|
1677
|
+
var toTitleCase = (str) => str && str.replace(
|
|
1678
|
+
/\w\S*/g,
|
|
1679
|
+
(txt) => {
|
|
1680
|
+
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
|
|
1681
|
+
}
|
|
1682
|
+
);
|
|
1683
|
+
var toDashCase2 = (val) => val.replace(/[^a-zA-Z0-9]/g, " ").trim().toLowerCase().replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
1684
|
+
var toDescriptionCase = (str = "") => {
|
|
1685
|
+
if (typeof str !== "string")
|
|
1686
|
+
return;
|
|
1687
|
+
const result = str.replace(/([A-Z])/g, " $1");
|
|
1688
|
+
return result.charAt(0).toUpperCase() + result.slice(1);
|
|
1689
|
+
};
|
|
1690
|
+
var arrayzeValue = (val) => {
|
|
1691
|
+
if ((0, import_utils22.isArray)(val))
|
|
1692
|
+
return val;
|
|
1693
|
+
if ((0, import_utils22.isString)(val))
|
|
1694
|
+
return val.split(" ");
|
|
1695
|
+
if ((0, import_utils22.isObject)(val))
|
|
1696
|
+
return Object.values(val);
|
|
1697
|
+
if ((0, import_utils22.isNumber)(val))
|
|
1698
|
+
return [val];
|
|
1534
1699
|
};
|
|
1535
|
-
var __toCommonJS3 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
|
|
1536
|
-
var globals_exports = {};
|
|
1537
|
-
__export3(globals_exports, {
|
|
1538
|
-
document: () => document3,
|
|
1539
|
-
global: () => global,
|
|
1540
|
-
self: () => self,
|
|
1541
|
-
window: () => window2
|
|
1542
|
-
});
|
|
1543
|
-
module2.exports = __toCommonJS3(globals_exports);
|
|
1544
|
-
var global = globalThis;
|
|
1545
|
-
var self = globalThis;
|
|
1546
|
-
var window2 = globalThis;
|
|
1547
|
-
var document3 = window2.document;
|
|
1548
1700
|
}
|
|
1549
1701
|
});
|
|
1550
1702
|
|
|
1551
|
-
//
|
|
1552
|
-
var
|
|
1553
|
-
__export(timing_exports, {
|
|
1554
|
-
applyTimingSequence: () => applyTimingSequence,
|
|
1555
|
-
getTimingByKey: () => getTimingByKey,
|
|
1556
|
-
getTimingFunction: () => getTimingFunction
|
|
1557
|
-
});
|
|
1558
|
-
module.exports = __toCommonJS(timing_exports);
|
|
1559
|
-
|
|
1560
|
-
// ../utils/dist/cjs/index.js
|
|
1561
|
-
var __create2 = Object.create;
|
|
1562
|
-
var __defProp2 = Object.defineProperty;
|
|
1563
|
-
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1564
|
-
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1565
|
-
var __getProtoOf2 = Object.getPrototypeOf;
|
|
1566
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1567
|
-
var __commonJS2 = (cb, mod) => function __require() {
|
|
1568
|
-
return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
1569
|
-
};
|
|
1570
|
-
var __export2 = (target, all) => {
|
|
1571
|
-
for (var name in all)
|
|
1572
|
-
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
1573
|
-
};
|
|
1574
|
-
var __copyProps2 = (to, from, except, desc) => {
|
|
1575
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
1576
|
-
for (let key of __getOwnPropNames2(from))
|
|
1577
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1578
|
-
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1579
|
-
}
|
|
1580
|
-
return to;
|
|
1581
|
-
};
|
|
1582
|
-
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
1583
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
1584
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
1585
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
1586
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
1587
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
|
1588
|
-
mod
|
|
1589
|
-
));
|
|
1590
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1591
|
-
var require_key = __commonJS2({
|
|
1703
|
+
// ../../../domql/packages/utils/dist/cjs/key.js
|
|
1704
|
+
var require_key = __commonJS({
|
|
1592
1705
|
"../../../domql/packages/utils/dist/cjs/key.js"(exports, module2) {
|
|
1593
1706
|
"use strict";
|
|
1594
|
-
var
|
|
1595
|
-
var
|
|
1596
|
-
var
|
|
1597
|
-
var
|
|
1598
|
-
var
|
|
1707
|
+
var __defProp2 = Object.defineProperty;
|
|
1708
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1709
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1710
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1711
|
+
var __export2 = (target, all) => {
|
|
1599
1712
|
for (var name in all)
|
|
1600
|
-
|
|
1713
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
1601
1714
|
};
|
|
1602
|
-
var
|
|
1715
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
1603
1716
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1604
|
-
for (let key of
|
|
1605
|
-
if (!
|
|
1606
|
-
|
|
1717
|
+
for (let key of __getOwnPropNames2(from))
|
|
1718
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1719
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1607
1720
|
}
|
|
1608
1721
|
return to;
|
|
1609
1722
|
};
|
|
1610
|
-
var
|
|
1723
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1611
1724
|
var key_exports = {};
|
|
1612
|
-
|
|
1725
|
+
__export2(key_exports, {
|
|
1613
1726
|
createSnapshotId: () => createSnapshotId,
|
|
1614
1727
|
generateKey: () => generateKey
|
|
1615
1728
|
});
|
|
1616
|
-
module2.exports =
|
|
1729
|
+
module2.exports = __toCommonJS2(key_exports);
|
|
1617
1730
|
var generateKey = /* @__PURE__ */ function() {
|
|
1618
1731
|
let index = 0;
|
|
1619
1732
|
function newId() {
|
|
@@ -1625,35 +1738,37 @@ var require_key = __commonJS2({
|
|
|
1625
1738
|
var createSnapshotId = generateKey;
|
|
1626
1739
|
}
|
|
1627
1740
|
});
|
|
1628
|
-
|
|
1741
|
+
|
|
1742
|
+
// ../../../domql/packages/utils/dist/cjs/env.js
|
|
1743
|
+
var require_env = __commonJS({
|
|
1629
1744
|
"../../../domql/packages/utils/dist/cjs/env.js"(exports, module2) {
|
|
1630
1745
|
"use strict";
|
|
1631
|
-
var
|
|
1632
|
-
var
|
|
1633
|
-
var
|
|
1634
|
-
var
|
|
1635
|
-
var
|
|
1746
|
+
var __defProp2 = Object.defineProperty;
|
|
1747
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1748
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1749
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1750
|
+
var __export2 = (target, all) => {
|
|
1636
1751
|
for (var name in all)
|
|
1637
|
-
|
|
1752
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
1638
1753
|
};
|
|
1639
|
-
var
|
|
1754
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
1640
1755
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1641
|
-
for (let key of
|
|
1642
|
-
if (!
|
|
1643
|
-
|
|
1756
|
+
for (let key of __getOwnPropNames2(from))
|
|
1757
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1758
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1644
1759
|
}
|
|
1645
1760
|
return to;
|
|
1646
1761
|
};
|
|
1647
|
-
var
|
|
1762
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1648
1763
|
var env_exports = {};
|
|
1649
|
-
|
|
1764
|
+
__export2(env_exports, {
|
|
1650
1765
|
NODE_ENV: () => NODE_ENV,
|
|
1651
1766
|
getNev: () => getNev,
|
|
1652
1767
|
isDevelopment: () => isDevelopment,
|
|
1653
1768
|
isProduction: () => isProduction,
|
|
1654
1769
|
isTest: () => isTest
|
|
1655
1770
|
});
|
|
1656
|
-
module2.exports =
|
|
1771
|
+
module2.exports = __toCommonJS2(env_exports);
|
|
1657
1772
|
var NODE_ENV = "development";
|
|
1658
1773
|
var isProduction = (env = NODE_ENV) => env === "production" || env === "prod" || env !== "development" && env !== "dev" && env !== "test";
|
|
1659
1774
|
var isTest = (env = NODE_ENV) => env === "test";
|
|
@@ -1661,66 +1776,70 @@ var require_env = __commonJS2({
|
|
|
1661
1776
|
var getNev = (key, env = NODE_ENV) => env[key];
|
|
1662
1777
|
}
|
|
1663
1778
|
});
|
|
1664
|
-
|
|
1779
|
+
|
|
1780
|
+
// ../../../domql/packages/utils/dist/cjs/globals.js
|
|
1781
|
+
var require_globals = __commonJS({
|
|
1665
1782
|
"../../../domql/packages/utils/dist/cjs/globals.js"(exports, module2) {
|
|
1666
1783
|
"use strict";
|
|
1667
|
-
var
|
|
1668
|
-
var
|
|
1669
|
-
var
|
|
1670
|
-
var
|
|
1671
|
-
var
|
|
1784
|
+
var __defProp2 = Object.defineProperty;
|
|
1785
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1786
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1787
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1788
|
+
var __export2 = (target, all) => {
|
|
1672
1789
|
for (var name in all)
|
|
1673
|
-
|
|
1790
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
1674
1791
|
};
|
|
1675
|
-
var
|
|
1792
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
1676
1793
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1677
|
-
for (let key of
|
|
1678
|
-
if (!
|
|
1679
|
-
|
|
1794
|
+
for (let key of __getOwnPropNames2(from))
|
|
1795
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1796
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1680
1797
|
}
|
|
1681
1798
|
return to;
|
|
1682
1799
|
};
|
|
1683
|
-
var
|
|
1800
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1684
1801
|
var globals_exports = {};
|
|
1685
|
-
|
|
1686
|
-
document: () =>
|
|
1802
|
+
__export2(globals_exports, {
|
|
1803
|
+
document: () => document3,
|
|
1687
1804
|
global: () => global,
|
|
1688
1805
|
self: () => self,
|
|
1689
|
-
window: () =>
|
|
1806
|
+
window: () => window3
|
|
1690
1807
|
});
|
|
1691
|
-
module2.exports =
|
|
1808
|
+
module2.exports = __toCommonJS2(globals_exports);
|
|
1692
1809
|
var global = globalThis;
|
|
1693
1810
|
var self = globalThis;
|
|
1694
|
-
var
|
|
1695
|
-
var
|
|
1811
|
+
var window3 = globalThis;
|
|
1812
|
+
var document3 = window3.document;
|
|
1696
1813
|
}
|
|
1697
1814
|
});
|
|
1698
|
-
|
|
1815
|
+
|
|
1816
|
+
// ../../../domql/packages/utils/dist/cjs/node.js
|
|
1817
|
+
var require_node = __commonJS({
|
|
1699
1818
|
"../../../domql/packages/utils/dist/cjs/node.js"(exports, module2) {
|
|
1700
1819
|
"use strict";
|
|
1701
|
-
var
|
|
1702
|
-
var
|
|
1703
|
-
var
|
|
1704
|
-
var
|
|
1705
|
-
var
|
|
1820
|
+
var __defProp2 = Object.defineProperty;
|
|
1821
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1822
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1823
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1824
|
+
var __export2 = (target, all) => {
|
|
1706
1825
|
for (var name in all)
|
|
1707
|
-
|
|
1826
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
1708
1827
|
};
|
|
1709
|
-
var
|
|
1828
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
1710
1829
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1711
|
-
for (let key of
|
|
1712
|
-
if (!
|
|
1713
|
-
|
|
1830
|
+
for (let key of __getOwnPropNames2(from))
|
|
1831
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1832
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1714
1833
|
}
|
|
1715
1834
|
return to;
|
|
1716
1835
|
};
|
|
1717
|
-
var
|
|
1836
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1718
1837
|
var node_exports = {};
|
|
1719
|
-
|
|
1838
|
+
__export2(node_exports, {
|
|
1720
1839
|
isHtmlElement: () => isHtmlElement,
|
|
1721
1840
|
isNode: () => isNode
|
|
1722
1841
|
});
|
|
1723
|
-
module2.exports =
|
|
1842
|
+
module2.exports = __toCommonJS2(node_exports);
|
|
1724
1843
|
var import_globals2 = require_globals();
|
|
1725
1844
|
var isNode = (obj) => {
|
|
1726
1845
|
return (typeof Node === "object" ? obj instanceof import_globals2.window.Node : obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string") || false;
|
|
@@ -1730,31 +1849,33 @@ var require_node = __commonJS2({
|
|
|
1730
1849
|
};
|
|
1731
1850
|
}
|
|
1732
1851
|
});
|
|
1733
|
-
|
|
1852
|
+
|
|
1853
|
+
// ../../../domql/packages/utils/dist/cjs/types.js
|
|
1854
|
+
var require_types = __commonJS({
|
|
1734
1855
|
"../../../domql/packages/utils/dist/cjs/types.js"(exports, module2) {
|
|
1735
1856
|
"use strict";
|
|
1736
|
-
var
|
|
1737
|
-
var
|
|
1738
|
-
var
|
|
1739
|
-
var
|
|
1740
|
-
var
|
|
1857
|
+
var __defProp2 = Object.defineProperty;
|
|
1858
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1859
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1860
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1861
|
+
var __export2 = (target, all) => {
|
|
1741
1862
|
for (var name in all)
|
|
1742
|
-
|
|
1863
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
1743
1864
|
};
|
|
1744
|
-
var
|
|
1865
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
1745
1866
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1746
|
-
for (let key of
|
|
1747
|
-
if (!
|
|
1748
|
-
|
|
1867
|
+
for (let key of __getOwnPropNames2(from))
|
|
1868
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1869
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1749
1870
|
}
|
|
1750
1871
|
return to;
|
|
1751
1872
|
};
|
|
1752
|
-
var
|
|
1873
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1753
1874
|
var types_exports = {};
|
|
1754
|
-
|
|
1875
|
+
__export2(types_exports, {
|
|
1755
1876
|
TYPES: () => TYPES,
|
|
1756
1877
|
is: () => is,
|
|
1757
|
-
isArray: () =>
|
|
1878
|
+
isArray: () => isArray2,
|
|
1758
1879
|
isBoolean: () => isBoolean,
|
|
1759
1880
|
isDate: () => isDate,
|
|
1760
1881
|
isDefined: () => isDefined2,
|
|
@@ -1762,24 +1883,24 @@ var require_types = __commonJS2({
|
|
|
1762
1883
|
isNot: () => isNot,
|
|
1763
1884
|
isNull: () => isNull,
|
|
1764
1885
|
isNumber: () => isNumber2,
|
|
1765
|
-
isObject: () =>
|
|
1886
|
+
isObject: () => isObject2,
|
|
1766
1887
|
isObjectLike: () => isObjectLike2,
|
|
1767
|
-
isString: () =>
|
|
1888
|
+
isString: () => isString4,
|
|
1768
1889
|
isUndefined: () => isUndefined
|
|
1769
1890
|
});
|
|
1770
|
-
module2.exports =
|
|
1891
|
+
module2.exports = __toCommonJS2(types_exports);
|
|
1771
1892
|
var import_node = require_node();
|
|
1772
|
-
var
|
|
1893
|
+
var isObject2 = (arg) => {
|
|
1773
1894
|
if (arg === null)
|
|
1774
1895
|
return false;
|
|
1775
1896
|
return typeof arg === "object" && arg.constructor === Object;
|
|
1776
1897
|
};
|
|
1777
|
-
var
|
|
1898
|
+
var isString4 = (arg) => typeof arg === "string";
|
|
1778
1899
|
var isNumber2 = (arg) => typeof arg === "number";
|
|
1779
1900
|
var isFunction = (arg) => typeof arg === "function";
|
|
1780
1901
|
var isBoolean = (arg) => arg === true || arg === false;
|
|
1781
1902
|
var isNull = (arg) => arg === null;
|
|
1782
|
-
var
|
|
1903
|
+
var isArray2 = (arg) => Array.isArray(arg);
|
|
1783
1904
|
var isDate = (d) => d instanceof Date;
|
|
1784
1905
|
var isObjectLike2 = (arg) => {
|
|
1785
1906
|
if (arg === null)
|
|
@@ -1787,16 +1908,16 @@ var require_types = __commonJS2({
|
|
|
1787
1908
|
return typeof arg === "object";
|
|
1788
1909
|
};
|
|
1789
1910
|
var isDefined2 = (arg) => {
|
|
1790
|
-
return
|
|
1911
|
+
return isObject2(arg) || isObjectLike2(arg) || isString4(arg) || isNumber2(arg) || isFunction(arg) || isArray2(arg) || isObjectLike2(arg) || isBoolean(arg) || isDate(arg) || isNull(arg);
|
|
1791
1912
|
};
|
|
1792
1913
|
var isUndefined = (arg) => {
|
|
1793
1914
|
return arg === void 0;
|
|
1794
1915
|
};
|
|
1795
1916
|
var TYPES = {
|
|
1796
1917
|
boolean: isBoolean,
|
|
1797
|
-
array:
|
|
1798
|
-
object:
|
|
1799
|
-
string:
|
|
1918
|
+
array: isArray2,
|
|
1919
|
+
object: isObject2,
|
|
1920
|
+
string: isString4,
|
|
1800
1921
|
date: isDate,
|
|
1801
1922
|
number: isNumber2,
|
|
1802
1923
|
null: isNull,
|
|
@@ -1818,28 +1939,30 @@ var require_types = __commonJS2({
|
|
|
1818
1939
|
};
|
|
1819
1940
|
}
|
|
1820
1941
|
});
|
|
1821
|
-
|
|
1942
|
+
|
|
1943
|
+
// ../../../domql/packages/utils/dist/cjs/array.js
|
|
1944
|
+
var require_array = __commonJS({
|
|
1822
1945
|
"../../../domql/packages/utils/dist/cjs/array.js"(exports, module2) {
|
|
1823
1946
|
"use strict";
|
|
1824
|
-
var
|
|
1825
|
-
var
|
|
1826
|
-
var
|
|
1827
|
-
var
|
|
1828
|
-
var
|
|
1947
|
+
var __defProp2 = Object.defineProperty;
|
|
1948
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1949
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1950
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1951
|
+
var __export2 = (target, all) => {
|
|
1829
1952
|
for (var name in all)
|
|
1830
|
-
|
|
1953
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
1831
1954
|
};
|
|
1832
|
-
var
|
|
1955
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
1833
1956
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1834
|
-
for (let key of
|
|
1835
|
-
if (!
|
|
1836
|
-
|
|
1957
|
+
for (let key of __getOwnPropNames2(from))
|
|
1958
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
1959
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1837
1960
|
}
|
|
1838
1961
|
return to;
|
|
1839
1962
|
};
|
|
1840
|
-
var
|
|
1963
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1841
1964
|
var array_exports = {};
|
|
1842
|
-
|
|
1965
|
+
__export2(array_exports, {
|
|
1843
1966
|
addItemAfterEveryElement: () => addItemAfterEveryElement,
|
|
1844
1967
|
arrayContainsOtherArray: () => arrayContainsOtherArray,
|
|
1845
1968
|
arraysEqual: () => arraysEqual,
|
|
@@ -1856,7 +1979,7 @@ var require_array = __commonJS2({
|
|
|
1856
1979
|
reorderArrayByValues: () => reorderArrayByValues,
|
|
1857
1980
|
swapItemsInArray: () => swapItemsInArray
|
|
1858
1981
|
});
|
|
1859
|
-
module2.exports =
|
|
1982
|
+
module2.exports = __toCommonJS2(array_exports);
|
|
1860
1983
|
var import_object = require_object();
|
|
1861
1984
|
var import_types = require_types();
|
|
1862
1985
|
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
@@ -1889,10 +2012,10 @@ var require_array = __commonJS2({
|
|
|
1889
2012
|
return [].concat(...arrays);
|
|
1890
2013
|
};
|
|
1891
2014
|
var mergeArray = (arr, excludeFrom = []) => {
|
|
1892
|
-
return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.
|
|
2015
|
+
return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepCloneWithExtend)(c, excludeFrom), excludeFrom), {});
|
|
1893
2016
|
};
|
|
1894
2017
|
var mergeAndCloneIfArray = (obj) => {
|
|
1895
|
-
return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.
|
|
2018
|
+
return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepCloneWithExtend)(obj);
|
|
1896
2019
|
};
|
|
1897
2020
|
var cutArrayBeforeValue = (arr, value) => {
|
|
1898
2021
|
const index = arr.indexOf(value);
|
|
@@ -1972,30 +2095,34 @@ var require_array = __commonJS2({
|
|
|
1972
2095
|
};
|
|
1973
2096
|
}
|
|
1974
2097
|
});
|
|
1975
|
-
|
|
2098
|
+
|
|
2099
|
+
// ../../../domql/packages/utils/dist/cjs/string.js
|
|
2100
|
+
var require_string = __commonJS({
|
|
1976
2101
|
"../../../domql/packages/utils/dist/cjs/string.js"(exports, module2) {
|
|
1977
2102
|
"use strict";
|
|
1978
|
-
var
|
|
1979
|
-
var
|
|
1980
|
-
var
|
|
1981
|
-
var
|
|
1982
|
-
var
|
|
2103
|
+
var __defProp2 = Object.defineProperty;
|
|
2104
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
2105
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
2106
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
2107
|
+
var __export2 = (target, all) => {
|
|
1983
2108
|
for (var name in all)
|
|
1984
|
-
|
|
2109
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
1985
2110
|
};
|
|
1986
|
-
var
|
|
2111
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
1987
2112
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
1988
|
-
for (let key of
|
|
1989
|
-
if (!
|
|
1990
|
-
|
|
2113
|
+
for (let key of __getOwnPropNames2(from))
|
|
2114
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
2115
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1991
2116
|
}
|
|
1992
2117
|
return to;
|
|
1993
2118
|
};
|
|
1994
|
-
var
|
|
2119
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1995
2120
|
var string_exports = {};
|
|
1996
|
-
|
|
2121
|
+
__export2(string_exports, {
|
|
1997
2122
|
customDecodeURIComponent: () => customDecodeURIComponent,
|
|
1998
2123
|
customEncodeURIComponent: () => customEncodeURIComponent,
|
|
2124
|
+
decodeNewlines: () => decodeNewlines,
|
|
2125
|
+
encodeNewlines: () => encodeNewlines,
|
|
1999
2126
|
findKeyPosition: () => findKeyPosition,
|
|
2000
2127
|
lowercaseFirstLetter: () => lowercaseFirstLetter,
|
|
2001
2128
|
replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
|
|
@@ -2003,7 +2130,7 @@ var require_string = __commonJS2({
|
|
|
2003
2130
|
stringIncludesAny: () => stringIncludesAny,
|
|
2004
2131
|
trimStringFromSymbols: () => trimStringFromSymbols
|
|
2005
2132
|
});
|
|
2006
|
-
module2.exports =
|
|
2133
|
+
module2.exports = __toCommonJS2(string_exports);
|
|
2007
2134
|
var stringIncludesAny = (str, characters) => {
|
|
2008
2135
|
for (const char of characters) {
|
|
2009
2136
|
if (str.includes(char)) {
|
|
@@ -2099,6 +2226,12 @@ var require_string = __commonJS2({
|
|
|
2099
2226
|
return char;
|
|
2100
2227
|
});
|
|
2101
2228
|
};
|
|
2229
|
+
var encodeNewlines = (str) => {
|
|
2230
|
+
return str.split("\n").join("/////n").split("`").join("/////tilde").split("$").join("/////dlrsgn");
|
|
2231
|
+
};
|
|
2232
|
+
var decodeNewlines = (encodedStr) => {
|
|
2233
|
+
return encodedStr.split("/////n").join("\n").split("/////tilde").join("`").split("/////dlrsgn").join("$");
|
|
2234
|
+
};
|
|
2102
2235
|
var customEncodeURIComponent = (str) => {
|
|
2103
2236
|
return str.split("").map((char) => {
|
|
2104
2237
|
if (/[^a-zA-Z0-9\s]/.test(char)) {
|
|
@@ -2112,28 +2245,30 @@ var require_string = __commonJS2({
|
|
|
2112
2245
|
};
|
|
2113
2246
|
}
|
|
2114
2247
|
});
|
|
2115
|
-
|
|
2248
|
+
|
|
2249
|
+
// ../../../domql/packages/utils/dist/cjs/object.js
|
|
2250
|
+
var require_object = __commonJS({
|
|
2116
2251
|
"../../../domql/packages/utils/dist/cjs/object.js"(exports, module2) {
|
|
2117
2252
|
"use strict";
|
|
2118
|
-
var
|
|
2119
|
-
var
|
|
2120
|
-
var
|
|
2121
|
-
var
|
|
2122
|
-
var
|
|
2253
|
+
var __defProp2 = Object.defineProperty;
|
|
2254
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
2255
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
2256
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
2257
|
+
var __export2 = (target, all) => {
|
|
2123
2258
|
for (var name in all)
|
|
2124
|
-
|
|
2259
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
2125
2260
|
};
|
|
2126
|
-
var
|
|
2261
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
2127
2262
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
2128
|
-
for (let key of
|
|
2129
|
-
if (!
|
|
2130
|
-
|
|
2263
|
+
for (let key of __getOwnPropNames2(from))
|
|
2264
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
2265
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
2131
2266
|
}
|
|
2132
2267
|
return to;
|
|
2133
2268
|
};
|
|
2134
|
-
var
|
|
2269
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
2135
2270
|
var object_exports = {};
|
|
2136
|
-
|
|
2271
|
+
__export2(object_exports, {
|
|
2137
2272
|
checkIfKeyIsComponent: () => checkIfKeyIsComponent,
|
|
2138
2273
|
clone: () => clone,
|
|
2139
2274
|
createObjectWithoutPrototype: () => createObjectWithoutPrototype,
|
|
@@ -2169,7 +2304,7 @@ var require_object = __commonJS2({
|
|
|
2169
2304
|
removeFromObject: () => removeFromObject,
|
|
2170
2305
|
stringToObject: () => stringToObject
|
|
2171
2306
|
});
|
|
2172
|
-
module2.exports =
|
|
2307
|
+
module2.exports = __toCommonJS2(object_exports);
|
|
2173
2308
|
var import_globals2 = require_globals();
|
|
2174
2309
|
var import_types = require_types();
|
|
2175
2310
|
var import_array = require_array();
|
|
@@ -2275,7 +2410,7 @@ var require_object = __commonJS2({
|
|
|
2275
2410
|
return o;
|
|
2276
2411
|
};
|
|
2277
2412
|
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
2278
|
-
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
2413
|
+
const o = options.window ? (0, import_types.isArray)(obj) ? new options.window.Array([]) : new options.window.Object({}) : (0, import_types.isArray)(obj) ? [] : {};
|
|
2279
2414
|
for (const prop in obj) {
|
|
2280
2415
|
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
2281
2416
|
continue;
|
|
@@ -2529,7 +2664,7 @@ var require_object = __commonJS2({
|
|
|
2529
2664
|
};
|
|
2530
2665
|
var overwriteDeep = (obj, params, excludeFrom = []) => {
|
|
2531
2666
|
for (const e in params) {
|
|
2532
|
-
if (e === "
|
|
2667
|
+
if (e === "__ref")
|
|
2533
2668
|
continue;
|
|
2534
2669
|
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
2535
2670
|
continue;
|
|
@@ -2651,6 +2786,12 @@ var require_object = __commonJS2({
|
|
|
2651
2786
|
if (foundString || foundInArray)
|
|
2652
2787
|
return el;
|
|
2653
2788
|
}
|
|
2789
|
+
if (el.parent && el.parent.childExtend) {
|
|
2790
|
+
const foundString = (0, import_types.isString)(el.parent.childExtend) && el.parent.childExtend === key;
|
|
2791
|
+
const foundInArray = (0, import_types.isArray)(el.parent.childExtend) && el.parent.childExtend.filter((v) => v === key).length;
|
|
2792
|
+
if (foundString || foundInArray)
|
|
2793
|
+
return el;
|
|
2794
|
+
}
|
|
2654
2795
|
};
|
|
2655
2796
|
var getExtendsInElement = (obj) => {
|
|
2656
2797
|
let result = [];
|
|
@@ -2678,34 +2819,36 @@ var require_object = __commonJS2({
|
|
|
2678
2819
|
};
|
|
2679
2820
|
}
|
|
2680
2821
|
});
|
|
2681
|
-
|
|
2822
|
+
|
|
2823
|
+
// ../../../domql/packages/utils/dist/cjs/function.js
|
|
2824
|
+
var require_function = __commonJS({
|
|
2682
2825
|
"../../../domql/packages/utils/dist/cjs/function.js"(exports, module2) {
|
|
2683
2826
|
"use strict";
|
|
2684
|
-
var
|
|
2685
|
-
var
|
|
2686
|
-
var
|
|
2687
|
-
var
|
|
2688
|
-
var
|
|
2827
|
+
var __defProp2 = Object.defineProperty;
|
|
2828
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
2829
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
2830
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
2831
|
+
var __export2 = (target, all) => {
|
|
2689
2832
|
for (var name in all)
|
|
2690
|
-
|
|
2833
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
2691
2834
|
};
|
|
2692
|
-
var
|
|
2835
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
2693
2836
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
2694
|
-
for (let key of
|
|
2695
|
-
if (!
|
|
2696
|
-
|
|
2837
|
+
for (let key of __getOwnPropNames2(from))
|
|
2838
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
2839
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
2697
2840
|
}
|
|
2698
2841
|
return to;
|
|
2699
2842
|
};
|
|
2700
|
-
var
|
|
2843
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
2701
2844
|
var function_exports = {};
|
|
2702
|
-
|
|
2845
|
+
__export2(function_exports, {
|
|
2703
2846
|
debounce: () => debounce,
|
|
2704
2847
|
debounceOnContext: () => debounceOnContext,
|
|
2705
2848
|
isStringFunction: () => isStringFunction,
|
|
2706
2849
|
memoize: () => memoize
|
|
2707
2850
|
});
|
|
2708
|
-
module2.exports =
|
|
2851
|
+
module2.exports = __toCommonJS2(function_exports);
|
|
2709
2852
|
function debounce(func, wait, immediate) {
|
|
2710
2853
|
let timeout;
|
|
2711
2854
|
return function() {
|
|
@@ -2751,32 +2894,34 @@ var require_function = __commonJS2({
|
|
|
2751
2894
|
};
|
|
2752
2895
|
}
|
|
2753
2896
|
});
|
|
2754
|
-
|
|
2897
|
+
|
|
2898
|
+
// ../../../domql/packages/utils/dist/cjs/log.js
|
|
2899
|
+
var require_log = __commonJS({
|
|
2755
2900
|
"../../../domql/packages/utils/dist/cjs/log.js"(exports, module2) {
|
|
2756
2901
|
"use strict";
|
|
2757
|
-
var
|
|
2758
|
-
var
|
|
2759
|
-
var
|
|
2760
|
-
var
|
|
2761
|
-
var
|
|
2902
|
+
var __defProp2 = Object.defineProperty;
|
|
2903
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
2904
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
2905
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
2906
|
+
var __export2 = (target, all) => {
|
|
2762
2907
|
for (var name in all)
|
|
2763
|
-
|
|
2908
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
2764
2909
|
};
|
|
2765
|
-
var
|
|
2910
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
2766
2911
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
2767
|
-
for (let key of
|
|
2768
|
-
if (!
|
|
2769
|
-
|
|
2912
|
+
for (let key of __getOwnPropNames2(from))
|
|
2913
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
2914
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
2770
2915
|
}
|
|
2771
2916
|
return to;
|
|
2772
2917
|
};
|
|
2773
|
-
var
|
|
2918
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
2774
2919
|
var log_exports = {};
|
|
2775
|
-
|
|
2920
|
+
__export2(log_exports, {
|
|
2776
2921
|
logGroupIf: () => logGroupIf,
|
|
2777
2922
|
logIf: () => logIf
|
|
2778
2923
|
});
|
|
2779
|
-
module2.exports =
|
|
2924
|
+
module2.exports = __toCommonJS2(log_exports);
|
|
2780
2925
|
var logIf = (bool, ...arg) => {
|
|
2781
2926
|
if (bool)
|
|
2782
2927
|
arg.map((v) => console.log(v));
|
|
@@ -2790,49 +2935,51 @@ var require_log = __commonJS2({
|
|
|
2790
2935
|
};
|
|
2791
2936
|
}
|
|
2792
2937
|
});
|
|
2793
|
-
|
|
2938
|
+
|
|
2939
|
+
// ../../../domql/packages/utils/dist/cjs/cookie.js
|
|
2940
|
+
var require_cookie = __commonJS({
|
|
2794
2941
|
"../../../domql/packages/utils/dist/cjs/cookie.js"(exports, module2) {
|
|
2795
2942
|
"use strict";
|
|
2796
|
-
var
|
|
2797
|
-
var
|
|
2798
|
-
var
|
|
2799
|
-
var
|
|
2800
|
-
var
|
|
2943
|
+
var __defProp2 = Object.defineProperty;
|
|
2944
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
2945
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
2946
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
2947
|
+
var __export2 = (target, all) => {
|
|
2801
2948
|
for (var name in all)
|
|
2802
|
-
|
|
2949
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
2803
2950
|
};
|
|
2804
|
-
var
|
|
2951
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
2805
2952
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
2806
|
-
for (let key of
|
|
2807
|
-
if (!
|
|
2808
|
-
|
|
2953
|
+
for (let key of __getOwnPropNames2(from))
|
|
2954
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
2955
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
2809
2956
|
}
|
|
2810
2957
|
return to;
|
|
2811
2958
|
};
|
|
2812
|
-
var
|
|
2959
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
2813
2960
|
var cookie_exports = {};
|
|
2814
|
-
|
|
2961
|
+
__export2(cookie_exports, {
|
|
2815
2962
|
getCookie: () => getCookie,
|
|
2816
2963
|
isMobile: () => isMobile,
|
|
2817
2964
|
setCookie: () => setCookie
|
|
2818
2965
|
});
|
|
2819
|
-
module2.exports =
|
|
2966
|
+
module2.exports = __toCommonJS2(cookie_exports);
|
|
2820
2967
|
var import_types = require_types();
|
|
2821
|
-
var
|
|
2968
|
+
var import_utils9 = require_cjs2();
|
|
2822
2969
|
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
2823
2970
|
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
2824
|
-
if ((0, import_types.isUndefined)(
|
|
2971
|
+
if ((0, import_types.isUndefined)(import_utils9.document) || (0, import_types.isUndefined)(import_utils9.document.cookie))
|
|
2825
2972
|
return;
|
|
2826
2973
|
const d = /* @__PURE__ */ new Date();
|
|
2827
2974
|
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
2828
2975
|
const expires = `expires=${d.toUTCString()}`;
|
|
2829
|
-
|
|
2976
|
+
import_utils9.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
2830
2977
|
};
|
|
2831
2978
|
var getCookie = (cname) => {
|
|
2832
|
-
if ((0, import_types.isUndefined)(
|
|
2979
|
+
if ((0, import_types.isUndefined)(import_utils9.document) || (0, import_types.isUndefined)(import_utils9.document.cookie))
|
|
2833
2980
|
return;
|
|
2834
2981
|
const name = `${cname}=`;
|
|
2835
|
-
const decodedCookie = decodeURIComponent(
|
|
2982
|
+
const decodedCookie = decodeURIComponent(import_utils9.document.cookie);
|
|
2836
2983
|
const ca = decodedCookie.split(";");
|
|
2837
2984
|
for (let i = 0; i < ca.length; i++) {
|
|
2838
2985
|
let c = ca[i];
|
|
@@ -2845,32 +2992,34 @@ var require_cookie = __commonJS2({
|
|
|
2845
2992
|
};
|
|
2846
2993
|
}
|
|
2847
2994
|
});
|
|
2848
|
-
|
|
2995
|
+
|
|
2996
|
+
// ../../../domql/packages/utils/dist/cjs/tags.js
|
|
2997
|
+
var require_tags = __commonJS({
|
|
2849
2998
|
"../../../domql/packages/utils/dist/cjs/tags.js"(exports, module2) {
|
|
2850
2999
|
"use strict";
|
|
2851
|
-
var
|
|
2852
|
-
var
|
|
2853
|
-
var
|
|
2854
|
-
var
|
|
2855
|
-
var
|
|
3000
|
+
var __defProp2 = Object.defineProperty;
|
|
3001
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
3002
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
3003
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
3004
|
+
var __export2 = (target, all) => {
|
|
2856
3005
|
for (var name in all)
|
|
2857
|
-
|
|
3006
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
2858
3007
|
};
|
|
2859
|
-
var
|
|
3008
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
2860
3009
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
2861
|
-
for (let key of
|
|
2862
|
-
if (!
|
|
2863
|
-
|
|
3010
|
+
for (let key of __getOwnPropNames2(from))
|
|
3011
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
3012
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
2864
3013
|
}
|
|
2865
3014
|
return to;
|
|
2866
3015
|
};
|
|
2867
|
-
var
|
|
3016
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
2868
3017
|
var tags_exports = {};
|
|
2869
|
-
|
|
3018
|
+
__export2(tags_exports, {
|
|
2870
3019
|
HTML_TAGS: () => HTML_TAGS,
|
|
2871
3020
|
isValidHtmlTag: () => isValidHtmlTag
|
|
2872
3021
|
});
|
|
2873
|
-
module2.exports =
|
|
3022
|
+
module2.exports = __toCommonJS2(tags_exports);
|
|
2874
3023
|
var HTML_TAGS = {
|
|
2875
3024
|
root: [
|
|
2876
3025
|
"body",
|
|
@@ -3011,25 +3160,27 @@ var require_tags = __commonJS2({
|
|
|
3011
3160
|
var isValidHtmlTag = (arg) => HTML_TAGS.body.includes(arg);
|
|
3012
3161
|
}
|
|
3013
3162
|
});
|
|
3014
|
-
|
|
3163
|
+
|
|
3164
|
+
// ../../../domql/packages/utils/dist/cjs/index.js
|
|
3165
|
+
var require_cjs2 = __commonJS({
|
|
3015
3166
|
"../../../domql/packages/utils/dist/cjs/index.js"(exports, module2) {
|
|
3016
3167
|
"use strict";
|
|
3017
|
-
var
|
|
3018
|
-
var
|
|
3019
|
-
var
|
|
3020
|
-
var
|
|
3021
|
-
var
|
|
3168
|
+
var __defProp2 = Object.defineProperty;
|
|
3169
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
3170
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
3171
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
3172
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
3022
3173
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
3023
|
-
for (let key of
|
|
3024
|
-
if (!
|
|
3025
|
-
|
|
3174
|
+
for (let key of __getOwnPropNames2(from))
|
|
3175
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
3176
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
3026
3177
|
}
|
|
3027
3178
|
return to;
|
|
3028
3179
|
};
|
|
3029
|
-
var __reExport = (target, mod, secondTarget) => (
|
|
3030
|
-
var
|
|
3180
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default"));
|
|
3181
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
3031
3182
|
var utils_exports = {};
|
|
3032
|
-
module2.exports =
|
|
3183
|
+
module2.exports = __toCommonJS2(utils_exports);
|
|
3033
3184
|
__reExport(utils_exports, require_key(), module2.exports);
|
|
3034
3185
|
__reExport(utils_exports, require_env(), module2.exports);
|
|
3035
3186
|
__reExport(utils_exports, require_types(), module2.exports);
|
|
@@ -3044,162 +3195,55 @@ var require_cjs = __commonJS2({
|
|
|
3044
3195
|
__reExport(utils_exports, require_tags(), module2.exports);
|
|
3045
3196
|
}
|
|
3046
3197
|
});
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
}
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
var
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3198
|
+
|
|
3199
|
+
// ../../node_modules/@domql/globals/dist/cjs/index.js
|
|
3200
|
+
var require_cjs3 = __commonJS({
|
|
3201
|
+
"../../node_modules/@domql/globals/dist/cjs/index.js"(exports, module2) {
|
|
3202
|
+
"use strict";
|
|
3203
|
+
var __defProp2 = Object.defineProperty;
|
|
3204
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
3205
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
3206
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
3207
|
+
var __export2 = (target, all) => {
|
|
3208
|
+
for (var name in all)
|
|
3209
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
3210
|
+
};
|
|
3211
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
3212
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
3213
|
+
for (let key of __getOwnPropNames2(from))
|
|
3214
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
3215
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
3216
|
+
}
|
|
3217
|
+
return to;
|
|
3218
|
+
};
|
|
3219
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
3220
|
+
var globals_exports = {};
|
|
3221
|
+
__export2(globals_exports, {
|
|
3222
|
+
document: () => document3,
|
|
3223
|
+
global: () => global,
|
|
3224
|
+
self: () => self,
|
|
3225
|
+
window: () => window3
|
|
3072
3226
|
});
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
var
|
|
3078
|
-
var findClosestNumber = (number, arr) => {
|
|
3079
|
-
return ((0, import_utils.isArray)(arr) ? arr : Object.values(arr)).reduce((prev, curr) => {
|
|
3080
|
-
return Math.abs(curr - number) < Math.abs(prev - number) ? curr : prev;
|
|
3081
|
-
});
|
|
3082
|
-
};
|
|
3083
|
-
var findClosestNumberInFactory = (val, factory) => {
|
|
3084
|
-
val = parseFloat(val);
|
|
3085
|
-
if ((0, import_utils.isObject)(factory))
|
|
3086
|
-
factory = Object.values(factory);
|
|
3087
|
-
return findClosestNumber(val, factory);
|
|
3088
|
-
};
|
|
3089
|
-
var formatDate = (timestamp) => {
|
|
3090
|
-
if (!timestamp)
|
|
3091
|
-
return "";
|
|
3092
|
-
const d = new Date(timestamp);
|
|
3093
|
-
const ye = new Intl.DateTimeFormat("en", { year: "numeric" }).format(d);
|
|
3094
|
-
const mo = new Intl.DateTimeFormat("en", { month: "short" }).format(d);
|
|
3095
|
-
const da = new Intl.DateTimeFormat("en", { day: "2-digit" }).format(d);
|
|
3096
|
-
return `${da} ${mo}, ${ye}`;
|
|
3097
|
-
};
|
|
3098
|
-
var fibonacciNumberByIndex = function fibonacciNumberByIndex2(n) {
|
|
3099
|
-
const fib = [0, 1];
|
|
3100
|
-
for (let i = 2; i <= n; i++) {
|
|
3101
|
-
fib[i] = fib[i - 1] + fib[i - 2];
|
|
3102
|
-
}
|
|
3103
|
-
return fib[n];
|
|
3104
|
-
};
|
|
3105
|
-
var loadJavascriptFile = (FILE_URL, async = false, doc = document, type = "text/javascript") => {
|
|
3106
|
-
return new Promise((resolve, reject) => {
|
|
3107
|
-
try {
|
|
3108
|
-
const scriptEle = doc.createElement("script");
|
|
3109
|
-
scriptEle.type = type;
|
|
3110
|
-
scriptEle.async = async;
|
|
3111
|
-
scriptEle.src = FILE_URL;
|
|
3112
|
-
scriptEle.addEventListener("load", (ev) => {
|
|
3113
|
-
resolve({
|
|
3114
|
-
status: true
|
|
3115
|
-
});
|
|
3116
|
-
});
|
|
3117
|
-
scriptEle.addEventListener("error", (ev) => {
|
|
3118
|
-
reject({
|
|
3119
|
-
status: false,
|
|
3120
|
-
message: `Failed to load the script ${FILE_URL}`
|
|
3121
|
-
});
|
|
3122
|
-
});
|
|
3123
|
-
doc.body.appendChild(scriptEle);
|
|
3124
|
-
} catch (error) {
|
|
3125
|
-
reject(error);
|
|
3126
|
-
}
|
|
3127
|
-
});
|
|
3128
|
-
};
|
|
3129
|
-
var loadCssFile = (FILE_URL, async = false, doc = document, type = "text/javascript") => {
|
|
3130
|
-
return new Promise((resolve, reject) => {
|
|
3131
|
-
try {
|
|
3132
|
-
const linkElem = doc.createElement("link");
|
|
3133
|
-
linkElem.rel = "stylesheet";
|
|
3134
|
-
linkElem.href = FILE_URL;
|
|
3135
|
-
linkElem.addEventListener("load", (ev) => {
|
|
3136
|
-
resolve({
|
|
3137
|
-
status: true
|
|
3138
|
-
});
|
|
3139
|
-
});
|
|
3140
|
-
doc.head.appendChild(linkElem);
|
|
3141
|
-
} catch (error) {
|
|
3142
|
-
reject(error);
|
|
3143
|
-
}
|
|
3144
|
-
});
|
|
3145
|
-
};
|
|
3146
|
-
var loadJavascript = (body, async = false, doc = document, type = "text/javascript", id = "smbls-script") => {
|
|
3147
|
-
try {
|
|
3148
|
-
const scriptEle = doc.createElement("script");
|
|
3149
|
-
scriptEle.type = type;
|
|
3150
|
-
scriptEle.async = async;
|
|
3151
|
-
scriptEle.id = id;
|
|
3152
|
-
scriptEle.innerHTML = body;
|
|
3153
|
-
doc.body.appendChild(scriptEle);
|
|
3154
|
-
} catch (error) {
|
|
3155
|
-
console.warn(error);
|
|
3156
|
-
}
|
|
3157
|
-
};
|
|
3158
|
-
var isPhoto = (format) => ["jpeg", "gif", "jpg", "png", "tiff", "woff"].includes(format);
|
|
3159
|
-
var copyStringToClipboard = (str) => {
|
|
3160
|
-
const el = document.createElement("textarea");
|
|
3161
|
-
el.value = str;
|
|
3162
|
-
el.setAttribute("readonly", "");
|
|
3163
|
-
el.style = { position: "absolute", left: "-9999px" };
|
|
3164
|
-
document.body.appendChild(el);
|
|
3165
|
-
el.select();
|
|
3166
|
-
document.execCommand("copy");
|
|
3167
|
-
document.body.removeChild(el);
|
|
3168
|
-
};
|
|
3169
|
-
var removeChars = (str) => {
|
|
3170
|
-
return str.replace(/[^a-zA-Z0-9_]/g, "");
|
|
3171
|
-
};
|
|
3172
|
-
var toCamelCase = (str) => {
|
|
3173
|
-
return str.replace(/(?:^\w|[A-Z]|\b\w)/g, function(word, index) {
|
|
3174
|
-
return index === 0 ? word.toLowerCase() : word.toUpperCase();
|
|
3175
|
-
}).replaceAll(/\s+/g, "");
|
|
3176
|
-
};
|
|
3177
|
-
var toTitleCase = (str) => str && str.replace(
|
|
3178
|
-
/\w\S*/g,
|
|
3179
|
-
(txt) => {
|
|
3180
|
-
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
|
|
3227
|
+
module2.exports = __toCommonJS2(globals_exports);
|
|
3228
|
+
var global = globalThis;
|
|
3229
|
+
var self = globalThis;
|
|
3230
|
+
var window3 = globalThis;
|
|
3231
|
+
var document3 = window3.document;
|
|
3181
3232
|
}
|
|
3182
|
-
);
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
if ((0, import_utils2.isString)(val))
|
|
3194
|
-
return val.split(" ");
|
|
3195
|
-
if ((0, import_utils2.isObject)(val))
|
|
3196
|
-
return Object.values(val);
|
|
3197
|
-
if ((0, import_utils2.isNumber)(val))
|
|
3198
|
-
return [val];
|
|
3199
|
-
};
|
|
3233
|
+
});
|
|
3234
|
+
|
|
3235
|
+
// src/system/timing.js
|
|
3236
|
+
var timing_exports = {};
|
|
3237
|
+
__export(timing_exports, {
|
|
3238
|
+
applyTimingSequence: () => applyTimingSequence,
|
|
3239
|
+
getTimingByKey: () => getTimingByKey,
|
|
3240
|
+
getTimingFunction: () => getTimingFunction
|
|
3241
|
+
});
|
|
3242
|
+
module.exports = __toCommonJS(timing_exports);
|
|
3243
|
+
var import_utils7 = __toESM(require_cjs(), 1);
|
|
3200
3244
|
|
|
3201
3245
|
// src/factory.js
|
|
3202
|
-
var
|
|
3246
|
+
var import_utils = __toESM(require_cjs2(), 1);
|
|
3203
3247
|
|
|
3204
3248
|
// src/defaultConfig/index.js
|
|
3205
3249
|
var defaultConfig_exports = {};
|
|
@@ -3406,7 +3450,7 @@ var CONFIG = {
|
|
|
3406
3450
|
CSS_VARS,
|
|
3407
3451
|
...defaultConfig_exports
|
|
3408
3452
|
};
|
|
3409
|
-
var cachedConfig = (0,
|
|
3453
|
+
var cachedConfig = (0, import_utils.deepClone)(CONFIG);
|
|
3410
3454
|
var FACTORY = {
|
|
3411
3455
|
active: "0",
|
|
3412
3456
|
0: CONFIG
|
|
@@ -3422,10 +3466,11 @@ var isScalingUnit = (unit) => {
|
|
|
3422
3466
|
|
|
3423
3467
|
// src/utils/color.js
|
|
3424
3468
|
var import_globals = __toESM(require_cjs3(), 1);
|
|
3425
|
-
var
|
|
3469
|
+
var import_utils2 = __toESM(require_cjs2(), 1);
|
|
3426
3470
|
|
|
3427
3471
|
// src/utils/sequence.js
|
|
3428
|
-
var
|
|
3472
|
+
var import_utils3 = __toESM(require_cjs2(), 1);
|
|
3473
|
+
var import_utils4 = __toESM(require_cjs(), 1);
|
|
3429
3474
|
var numToLetterMap = {
|
|
3430
3475
|
"-6": "U",
|
|
3431
3476
|
"-5": "V",
|
|
@@ -3567,9 +3612,9 @@ var getSequenceValue = (value = "A", sequenceProps) => {
|
|
|
3567
3612
|
unit = UNIT2.default,
|
|
3568
3613
|
useVariable
|
|
3569
3614
|
} = sequenceProps;
|
|
3570
|
-
if ((0,
|
|
3615
|
+
if ((0, import_utils3.isString)(value) && value.slice(0, 2) === "--")
|
|
3571
3616
|
return `var(${value})`;
|
|
3572
|
-
const prefix = `--${(
|
|
3617
|
+
const prefix = `--${(0, import_utils4.toDashCase)(sequenceProps.type.replace(".", "-"))}-`;
|
|
3573
3618
|
const startsWithDashOrLetterRegex = /^-?[a-zA-Z]/i;
|
|
3574
3619
|
const startsWithDashOrLetter = startsWithDashOrLetterRegex.test(value);
|
|
3575
3620
|
if (value === "none" || value === "auto" || value === "unset" || value === "inherit" || value === "fit-content" || value === "min-content" || value === "max-content" || value.includes("calc") || value.includes("var") || !startsWithDashOrLetter)
|
|
@@ -3615,7 +3660,9 @@ var getSequenceValue = (value = "A", sequenceProps) => {
|
|
|
3615
3660
|
};
|
|
3616
3661
|
var getSequenceValuePropertyPair = (value, propertyName, sequenceProps) => {
|
|
3617
3662
|
if (typeof value !== "string") {
|
|
3618
|
-
|
|
3663
|
+
const CONFIG2 = getActiveConfig();
|
|
3664
|
+
if (CONFIG2.verbose)
|
|
3665
|
+
console.warn(propertyName, value, "is not a string");
|
|
3619
3666
|
return { [propertyName]: value };
|
|
3620
3667
|
}
|
|
3621
3668
|
if (value === "-" || value === "")
|
|
@@ -3624,7 +3671,7 @@ var getSequenceValuePropertyPair = (value, propertyName, sequenceProps) => {
|
|
|
3624
3671
|
};
|
|
3625
3672
|
|
|
3626
3673
|
// src/utils/var.js
|
|
3627
|
-
var
|
|
3674
|
+
var import_utils5 = __toESM(require_cjs2(), 1);
|
|
3628
3675
|
var applySequenceGlobalVars = (vars, obj, options) => {
|
|
3629
3676
|
const CONFIG2 = getActiveConfig();
|
|
3630
3677
|
const { UNIT: UNIT2 } = CONFIG2;
|
|
@@ -3666,7 +3713,7 @@ var applySequenceVars = (FACTORY2, options = {}) => {
|
|
|
3666
3713
|
};
|
|
3667
3714
|
|
|
3668
3715
|
// src/utils/sprite.js
|
|
3669
|
-
var
|
|
3716
|
+
var import_utils6 = __toESM(require_cjs2(), 1);
|
|
3670
3717
|
|
|
3671
3718
|
// src/system/timing.js
|
|
3672
3719
|
var applyTimingSequence = () => {
|
|
@@ -3678,7 +3725,7 @@ var applyTimingSequence = () => {
|
|
|
3678
3725
|
var getTimingFunction = (value) => {
|
|
3679
3726
|
const CONFIG2 = getActiveConfig();
|
|
3680
3727
|
const { TIMING: TIMING2 } = CONFIG2;
|
|
3681
|
-
return TIMING2[value] || TIMING2[(
|
|
3728
|
+
return TIMING2[value] || TIMING2[(0, import_utils7.toCamelCase)(value)] || value;
|
|
3682
3729
|
};
|
|
3683
3730
|
var getTimingByKey = (value, property = "timing") => {
|
|
3684
3731
|
const CONFIG2 = getActiveConfig();
|