@symbo.ls/create 2.11.487 → 2.11.488
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/bundle/index.js +407 -424
- package/package.json +4 -4
package/dist/cjs/bundle/index.js
CHANGED
|
@@ -223,7 +223,7 @@ var require_types = __commonJS({
|
|
|
223
223
|
isNumber: () => isNumber3,
|
|
224
224
|
isObject: () => isObject11,
|
|
225
225
|
isObjectLike: () => isObjectLike4,
|
|
226
|
-
isString: () =>
|
|
226
|
+
isString: () => isString10,
|
|
227
227
|
isUndefined: () => isUndefined11
|
|
228
228
|
});
|
|
229
229
|
module2.exports = __toCommonJS2(types_exports);
|
|
@@ -233,7 +233,7 @@ var require_types = __commonJS({
|
|
|
233
233
|
return false;
|
|
234
234
|
return typeof arg === "object" && arg.constructor === Object;
|
|
235
235
|
};
|
|
236
|
-
var
|
|
236
|
+
var isString10 = (arg) => typeof arg === "string";
|
|
237
237
|
var isNumber3 = (arg) => typeof arg === "number";
|
|
238
238
|
var isFunction2 = (arg) => typeof arg === "function";
|
|
239
239
|
var isBoolean2 = (arg) => arg === true || arg === false;
|
|
@@ -246,7 +246,7 @@ var require_types = __commonJS({
|
|
|
246
246
|
return typeof arg === "object";
|
|
247
247
|
};
|
|
248
248
|
var isDefined2 = (arg) => {
|
|
249
|
-
return isObject11(arg) || isObjectLike4(arg) ||
|
|
249
|
+
return isObject11(arg) || isObjectLike4(arg) || isString10(arg) || isNumber3(arg) || isFunction2(arg) || isArray4(arg) || isObjectLike4(arg) || isBoolean2(arg) || isDate(arg) || isNull(arg);
|
|
250
250
|
};
|
|
251
251
|
var isUndefined11 = (arg) => {
|
|
252
252
|
return arg === void 0;
|
|
@@ -255,7 +255,7 @@ var require_types = __commonJS({
|
|
|
255
255
|
boolean: isBoolean2,
|
|
256
256
|
array: isArray4,
|
|
257
257
|
object: isObject11,
|
|
258
|
-
string:
|
|
258
|
+
string: isString10,
|
|
259
259
|
date: isDate,
|
|
260
260
|
number: isNumber3,
|
|
261
261
|
null: isNull,
|
|
@@ -461,7 +461,7 @@ var require_string = __commonJS({
|
|
|
461
461
|
encodeNewlines: () => encodeNewlines,
|
|
462
462
|
findKeyPosition: () => findKeyPosition,
|
|
463
463
|
lowercaseFirstLetter: () => lowercaseFirstLetter,
|
|
464
|
-
replaceLiteralsWithObjectFields: () =>
|
|
464
|
+
replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
|
|
465
465
|
replaceOctalEscapeSequences: () => replaceOctalEscapeSequences,
|
|
466
466
|
stringIncludesAny: () => stringIncludesAny,
|
|
467
467
|
trimStringFromSymbols: () => trimStringFromSymbols
|
|
@@ -483,7 +483,7 @@ var require_string = __commonJS({
|
|
|
483
483
|
2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
|
|
484
484
|
3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
|
|
485
485
|
};
|
|
486
|
-
var
|
|
486
|
+
var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
|
|
487
487
|
if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
|
|
488
488
|
return str;
|
|
489
489
|
const reg = brackRegex[options.bracketsLength || 2];
|
|
@@ -1405,21 +1405,21 @@ var require_cookie = __commonJS({
|
|
|
1405
1405
|
});
|
|
1406
1406
|
module2.exports = __toCommonJS2(cookie_exports);
|
|
1407
1407
|
var import_types = require_types();
|
|
1408
|
-
var
|
|
1408
|
+
var import_utils25 = require_cjs();
|
|
1409
1409
|
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
1410
1410
|
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
1411
|
-
if ((0, import_types.isUndefined)(
|
|
1411
|
+
if ((0, import_types.isUndefined)(import_utils25.document) || (0, import_types.isUndefined)(import_utils25.document.cookie))
|
|
1412
1412
|
return;
|
|
1413
1413
|
const d = /* @__PURE__ */ new Date();
|
|
1414
1414
|
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
1415
1415
|
const expires = `expires=${d.toUTCString()}`;
|
|
1416
|
-
|
|
1416
|
+
import_utils25.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
1417
1417
|
};
|
|
1418
1418
|
var getCookie = (cname) => {
|
|
1419
|
-
if ((0, import_types.isUndefined)(
|
|
1419
|
+
if ((0, import_types.isUndefined)(import_utils25.document) || (0, import_types.isUndefined)(import_utils25.document.cookie))
|
|
1420
1420
|
return;
|
|
1421
1421
|
const name = `${cname}=`;
|
|
1422
|
-
const decodedCookie = decodeURIComponent(
|
|
1422
|
+
const decodedCookie = decodeURIComponent(import_utils25.document.cookie);
|
|
1423
1423
|
const ca = decodedCookie.split(";");
|
|
1424
1424
|
for (let i = 0; i < ca.length; i++) {
|
|
1425
1425
|
let c = ca[i];
|
|
@@ -1431,9 +1431,9 @@ var require_cookie = __commonJS({
|
|
|
1431
1431
|
return "";
|
|
1432
1432
|
};
|
|
1433
1433
|
var removeCookie = (cname) => {
|
|
1434
|
-
if ((0, import_types.isUndefined)(
|
|
1434
|
+
if ((0, import_types.isUndefined)(import_utils25.document) || (0, import_types.isUndefined)(import_utils25.document.cookie))
|
|
1435
1435
|
return;
|
|
1436
|
-
|
|
1436
|
+
import_utils25.document.cookie = cname + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
|
|
1437
1437
|
};
|
|
1438
1438
|
function getLocalStorage(key) {
|
|
1439
1439
|
let savedJSON;
|
|
@@ -2393,7 +2393,7 @@ var require_cjs2 = __commonJS({
|
|
|
2393
2393
|
encodeNewlines: () => encodeNewlines,
|
|
2394
2394
|
findKeyPosition: () => findKeyPosition,
|
|
2395
2395
|
lowercaseFirstLetter: () => lowercaseFirstLetter,
|
|
2396
|
-
replaceLiteralsWithObjectFields: () =>
|
|
2396
|
+
replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
|
|
2397
2397
|
replaceOctalEscapeSequences: () => replaceOctalEscapeSequences,
|
|
2398
2398
|
stringIncludesAny: () => stringIncludesAny,
|
|
2399
2399
|
trimStringFromSymbols: () => trimStringFromSymbols
|
|
@@ -2415,7 +2415,7 @@ var require_cjs2 = __commonJS({
|
|
|
2415
2415
|
2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
|
|
2416
2416
|
3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
|
|
2417
2417
|
};
|
|
2418
|
-
var
|
|
2418
|
+
var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
|
|
2419
2419
|
if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
|
|
2420
2420
|
return str;
|
|
2421
2421
|
const reg = brackRegex[options.bracketsLength || 2];
|
|
@@ -4004,7 +4004,7 @@ var require_cjs2 = __commonJS({
|
|
|
4004
4004
|
return unit === "em" || unit === "rem" || unit === "vw" || unit === "vh" || unit === "vmax" || unit === "vmin";
|
|
4005
4005
|
};
|
|
4006
4006
|
var import_globals = __toESM2(require_cjs15(), 1);
|
|
4007
|
-
var
|
|
4007
|
+
var import_utils25 = __toESM2(require_cjs22(), 1);
|
|
4008
4008
|
var ENV3 = "development";
|
|
4009
4009
|
var colorStringToRgbaArray = (color) => {
|
|
4010
4010
|
if (color === "")
|
|
@@ -4136,11 +4136,11 @@ var require_cjs2 = __commonJS({
|
|
|
4136
4136
|
return `rgba(${arr})`;
|
|
4137
4137
|
};
|
|
4138
4138
|
var getRgbTone = (rgb, tone) => {
|
|
4139
|
-
if ((0,
|
|
4139
|
+
if ((0, import_utils25.isString)(rgb) && rgb.includes("rgb"))
|
|
4140
4140
|
rgb = colorStringToRgbaArray(rgb).join(", ");
|
|
4141
|
-
if ((0,
|
|
4141
|
+
if ((0, import_utils25.isString)(rgb))
|
|
4142
4142
|
rgb = rgb.split(",").map((v) => parseFloat(v.trim()));
|
|
4143
|
-
if ((0,
|
|
4143
|
+
if ((0, import_utils25.isNumber)(tone))
|
|
4144
4144
|
tone += "";
|
|
4145
4145
|
const toHex = rgbArrayToHex(rgb);
|
|
4146
4146
|
const abs2 = tone.slice(0, 1);
|
|
@@ -4648,7 +4648,7 @@ var require_cjs2 = __commonJS({
|
|
|
4648
4648
|
encodeNewlines: () => encodeNewlines,
|
|
4649
4649
|
findKeyPosition: () => findKeyPosition,
|
|
4650
4650
|
lowercaseFirstLetter: () => lowercaseFirstLetter,
|
|
4651
|
-
replaceLiteralsWithObjectFields: () =>
|
|
4651
|
+
replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
|
|
4652
4652
|
replaceOctalEscapeSequences: () => replaceOctalEscapeSequences,
|
|
4653
4653
|
stringIncludesAny: () => stringIncludesAny,
|
|
4654
4654
|
trimStringFromSymbols: () => trimStringFromSymbols
|
|
@@ -4670,7 +4670,7 @@ var require_cjs2 = __commonJS({
|
|
|
4670
4670
|
2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
|
|
4671
4671
|
3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
|
|
4672
4672
|
};
|
|
4673
|
-
var
|
|
4673
|
+
var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
|
|
4674
4674
|
if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
|
|
4675
4675
|
return str;
|
|
4676
4676
|
const reg = brackRegex[options.bracketsLength || 2];
|
|
@@ -6107,7 +6107,7 @@ var require_cjs2 = __commonJS({
|
|
|
6107
6107
|
toggleFullscreen: () => toggleFullscreen
|
|
6108
6108
|
});
|
|
6109
6109
|
module2.exports = __toCommonJS22(src_exports3);
|
|
6110
|
-
var
|
|
6110
|
+
var import_utils26 = __toESM22(require_cjs32(), 1);
|
|
6111
6111
|
var toggleFullscreen = async (el) => {
|
|
6112
6112
|
if (!document.fullscreenElement) {
|
|
6113
6113
|
try {
|
|
@@ -6282,13 +6282,13 @@ var require_cjs2 = __commonJS({
|
|
|
6282
6282
|
return result.charAt(0).toUpperCase() + result.slice(1);
|
|
6283
6283
|
};
|
|
6284
6284
|
var arrayzeValue = (val) => {
|
|
6285
|
-
if ((0,
|
|
6285
|
+
if ((0, import_utils26.isArray)(val))
|
|
6286
6286
|
return val;
|
|
6287
|
-
if ((0,
|
|
6287
|
+
if ((0, import_utils26.isString)(val))
|
|
6288
6288
|
return val.split(" ");
|
|
6289
|
-
if ((0,
|
|
6289
|
+
if ((0, import_utils26.isObject)(val))
|
|
6290
6290
|
return Object.values(val);
|
|
6291
|
-
if ((0,
|
|
6291
|
+
if ((0, import_utils26.isNumber)(val))
|
|
6292
6292
|
return [val];
|
|
6293
6293
|
};
|
|
6294
6294
|
var import_utils42 = __toESM2(require_cjs22(), 1);
|
|
@@ -7678,7 +7678,7 @@ var require_cjs2 = __commonJS({
|
|
|
7678
7678
|
});
|
|
7679
7679
|
}
|
|
7680
7680
|
};
|
|
7681
|
-
var
|
|
7681
|
+
var import_utils27 = __toESM2(require_cjs22(), 1);
|
|
7682
7682
|
var isBorderStyle = (str) => [
|
|
7683
7683
|
"none",
|
|
7684
7684
|
"hidden",
|
|
@@ -7726,7 +7726,7 @@ var require_cjs2 = __commonJS({
|
|
|
7726
7726
|
return `var(${v})`;
|
|
7727
7727
|
if (getColor2(v).length > 2) {
|
|
7728
7728
|
const color = getMediaColor3(v, globalTheme);
|
|
7729
|
-
if ((0,
|
|
7729
|
+
if ((0, import_utils27.isObject)(color))
|
|
7730
7730
|
return Object.values(color).filter((v2) => v2.includes(": " + globalTheme))[0];
|
|
7731
7731
|
return color;
|
|
7732
7732
|
}
|
|
@@ -7754,7 +7754,7 @@ var require_cjs2 = __commonJS({
|
|
|
7754
7754
|
return v;
|
|
7755
7755
|
}).join(" ");
|
|
7756
7756
|
};
|
|
7757
|
-
var transfromGap2 = (gap) => (0,
|
|
7757
|
+
var transfromGap2 = (gap) => (0, import_utils27.isString)(gap) && gap.split(" ").map((v) => getSpacingByKey3(v, "gap").gap).join(" ");
|
|
7758
7758
|
var transformTransition = (transition) => {
|
|
7759
7759
|
const arr = transition.split(" ");
|
|
7760
7760
|
if (!arr.length)
|
|
@@ -7772,7 +7772,7 @@ var require_cjs2 = __commonJS({
|
|
|
7772
7772
|
}).join(" ");
|
|
7773
7773
|
};
|
|
7774
7774
|
var transformDuration2 = (duration, props4, propertyName) => {
|
|
7775
|
-
if (!(0,
|
|
7775
|
+
if (!(0, import_utils27.isString)(duration))
|
|
7776
7776
|
return;
|
|
7777
7777
|
return duration.split(",").map((v) => getTimingByKey2(v).timing || v).join(",");
|
|
7778
7778
|
};
|
|
@@ -7788,11 +7788,11 @@ var require_cjs2 = __commonJS({
|
|
|
7788
7788
|
};
|
|
7789
7789
|
var transformSize2 = (propertyName, val, props4 = {}, opts = {}) => {
|
|
7790
7790
|
let value2 = val || props4[propertyName];
|
|
7791
|
-
if ((0,
|
|
7791
|
+
if ((0, import_utils27.isUndefined)(value2) && (0, import_utils27.isNull)(value2))
|
|
7792
7792
|
return;
|
|
7793
7793
|
const shouldScaleBoxSize = props4.scaleBoxSize;
|
|
7794
7794
|
const isBoxSize = checkIfBoxSize(propertyName);
|
|
7795
|
-
if (!shouldScaleBoxSize && isBoxSize && (0,
|
|
7795
|
+
if (!shouldScaleBoxSize && isBoxSize && (0, import_utils27.isString)(value2)) {
|
|
7796
7796
|
value2 = value2.split(" ").map((v) => {
|
|
7797
7797
|
const isSingleLetter = v.length < 3 && /[A-Z]/.test(v);
|
|
7798
7798
|
const hasUnits = ["%", "vw", "vh", "ch"].some((unit) => value2.includes(unit));
|
|
@@ -8367,7 +8367,7 @@ var require_cjs3 = __commonJS({
|
|
|
8367
8367
|
encodeNewlines: () => encodeNewlines,
|
|
8368
8368
|
findKeyPosition: () => findKeyPosition,
|
|
8369
8369
|
lowercaseFirstLetter: () => lowercaseFirstLetter,
|
|
8370
|
-
replaceLiteralsWithObjectFields: () =>
|
|
8370
|
+
replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
|
|
8371
8371
|
replaceOctalEscapeSequences: () => replaceOctalEscapeSequences,
|
|
8372
8372
|
stringIncludesAny: () => stringIncludesAny,
|
|
8373
8373
|
trimStringFromSymbols: () => trimStringFromSymbols
|
|
@@ -8389,7 +8389,7 @@ var require_cjs3 = __commonJS({
|
|
|
8389
8389
|
2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
|
|
8390
8390
|
3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
|
|
8391
8391
|
};
|
|
8392
|
-
var
|
|
8392
|
+
var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
|
|
8393
8393
|
if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
|
|
8394
8394
|
return str;
|
|
8395
8395
|
const reg = brackRegex[options.bracketsLength || 2];
|
|
@@ -9826,7 +9826,7 @@ var require_cjs3 = __commonJS({
|
|
|
9826
9826
|
toggleFullscreen: () => toggleFullscreen
|
|
9827
9827
|
});
|
|
9828
9828
|
module2.exports = __toCommonJS2(src_exports2);
|
|
9829
|
-
var
|
|
9829
|
+
var import_utils25 = __toESM2(require_cjs15(), 1);
|
|
9830
9830
|
var toggleFullscreen = async (el) => {
|
|
9831
9831
|
if (!document.fullscreenElement) {
|
|
9832
9832
|
try {
|
|
@@ -9838,15 +9838,15 @@ var require_cjs3 = __commonJS({
|
|
|
9838
9838
|
await document.exitFullscreen();
|
|
9839
9839
|
}
|
|
9840
9840
|
};
|
|
9841
|
-
var
|
|
9841
|
+
var import_utils26 = __toESM2(require_cjs15(), 1);
|
|
9842
9842
|
var findClosestNumber = (number, arr) => {
|
|
9843
|
-
return ((0,
|
|
9843
|
+
return ((0, import_utils26.isArray)(arr) ? arr : Object.values(arr)).reduce((prev2, curr) => {
|
|
9844
9844
|
return Math.abs(curr - number) < Math.abs(prev2 - number) ? curr : prev2;
|
|
9845
9845
|
});
|
|
9846
9846
|
};
|
|
9847
9847
|
var findClosestNumberInFactory = (val, factory) => {
|
|
9848
9848
|
val = parseFloat(val);
|
|
9849
|
-
if ((0,
|
|
9849
|
+
if ((0, import_utils26.isObject)(factory))
|
|
9850
9850
|
factory = Object.values(factory);
|
|
9851
9851
|
return findClosestNumber(val, factory);
|
|
9852
9852
|
};
|
|
@@ -10001,13 +10001,13 @@ var require_cjs3 = __commonJS({
|
|
|
10001
10001
|
return result.charAt(0).toUpperCase() + result.slice(1);
|
|
10002
10002
|
};
|
|
10003
10003
|
var arrayzeValue = (val) => {
|
|
10004
|
-
if ((0,
|
|
10004
|
+
if ((0, import_utils25.isArray)(val))
|
|
10005
10005
|
return val;
|
|
10006
|
-
if ((0,
|
|
10006
|
+
if ((0, import_utils25.isString)(val))
|
|
10007
10007
|
return val.split(" ");
|
|
10008
|
-
if ((0,
|
|
10008
|
+
if ((0, import_utils25.isObject)(val))
|
|
10009
10009
|
return Object.values(val);
|
|
10010
|
-
if ((0,
|
|
10010
|
+
if ((0, import_utils25.isNumber)(val))
|
|
10011
10011
|
return [val];
|
|
10012
10012
|
};
|
|
10013
10013
|
}
|
|
@@ -11531,13 +11531,13 @@ var require_on = __commonJS({
|
|
|
11531
11531
|
triggerEventOnUpdate: () => triggerEventOnUpdate
|
|
11532
11532
|
});
|
|
11533
11533
|
module2.exports = __toCommonJS2(on_exports);
|
|
11534
|
-
var
|
|
11534
|
+
var import_utils25 = require_cjs();
|
|
11535
11535
|
var applyEvent = (param, element, state, context, options) => {
|
|
11536
11536
|
return param.call(element, element, state || element.state, context || element.context, options);
|
|
11537
11537
|
};
|
|
11538
11538
|
var triggerEventOn = (param, element, options) => {
|
|
11539
11539
|
var _a;
|
|
11540
|
-
if (element.on && (0,
|
|
11540
|
+
if (element.on && (0, import_utils25.isFunction)(element.on[param])) {
|
|
11541
11541
|
const { state, context } = element;
|
|
11542
11542
|
return applyEvent(element.on[param] || ((_a = element.props) == null ? void 0 : _a[param]), element, state, context, options);
|
|
11543
11543
|
}
|
|
@@ -11547,7 +11547,7 @@ var require_on = __commonJS({
|
|
|
11547
11547
|
};
|
|
11548
11548
|
var triggerEventOnUpdate = (param, updatedObj, element, options) => {
|
|
11549
11549
|
var _a;
|
|
11550
|
-
if (element.on && (0,
|
|
11550
|
+
if (element.on && (0, import_utils25.isFunction)(element.on[param])) {
|
|
11551
11551
|
const { state, context } = element;
|
|
11552
11552
|
return applyEventUpdate(element.on[param] || ((_a = element.props) == null ? void 0 : _a[param]), updatedObj, element, state, context, options);
|
|
11553
11553
|
}
|
|
@@ -11568,7 +11568,7 @@ var require_on = __commonJS({
|
|
|
11568
11568
|
if (param === "init" || param === "beforeClassAssign" || param === "render" || param === "renderRouter" || param === "attachNode" || param === "stateInit" || param === "stateCreated" || param === "beforeStateUpdate" || param === "stateUpdate" || param === "beforeUpdate" || param === "done" || param === "create" || param === "complete" || param === "frame" || param === "update")
|
|
11569
11569
|
continue;
|
|
11570
11570
|
const appliedFunction = element.on[param] || ((_a = element.props) == null ? void 0 : _a[param]);
|
|
11571
|
-
if ((0,
|
|
11571
|
+
if ((0, import_utils25.isFunction)(appliedFunction)) {
|
|
11572
11572
|
node2.addEventListener(param, (event) => {
|
|
11573
11573
|
const { state, context } = element;
|
|
11574
11574
|
appliedFunction.call(element, event, element, state, context, options);
|
|
@@ -11606,9 +11606,9 @@ var require_can = __commonJS({
|
|
|
11606
11606
|
});
|
|
11607
11607
|
module2.exports = __toCommonJS2(can_exports);
|
|
11608
11608
|
var import_report = require_cjs4();
|
|
11609
|
-
var
|
|
11609
|
+
var import_utils25 = require_cjs();
|
|
11610
11610
|
var canRenderTag = (tag) => {
|
|
11611
|
-
return (0,
|
|
11611
|
+
return (0, import_utils25.isValidHtmlTag)(tag || "div") || (0, import_report.report)("HTMLInvalidTag");
|
|
11612
11612
|
};
|
|
11613
11613
|
}
|
|
11614
11614
|
});
|
|
@@ -11669,8 +11669,8 @@ var require_cjs6 = __commonJS({
|
|
|
11669
11669
|
});
|
|
11670
11670
|
module2.exports = __toCommonJS2(router_exports);
|
|
11671
11671
|
var import_event = require_cjs5();
|
|
11672
|
-
var
|
|
11673
|
-
var getActiveRoute = (level = 0, route =
|
|
11672
|
+
var import_utils25 = require_cjs();
|
|
11673
|
+
var getActiveRoute = (level = 0, route = import_utils25.window.location.pathname) => {
|
|
11674
11674
|
const routeArray = route.split("/");
|
|
11675
11675
|
const activeRoute = routeArray[level + 1];
|
|
11676
11676
|
if (activeRoute)
|
|
@@ -11684,7 +11684,7 @@ var require_cjs6 = __commonJS({
|
|
|
11684
11684
|
initialRender: false,
|
|
11685
11685
|
scrollToTop: true,
|
|
11686
11686
|
scrollToNode: false,
|
|
11687
|
-
scrollNode:
|
|
11687
|
+
scrollNode: import_utils25.document && import_utils25.document.documentElement,
|
|
11688
11688
|
scrollBody: false,
|
|
11689
11689
|
useFragment: false,
|
|
11690
11690
|
updateState: true,
|
|
@@ -11693,15 +11693,15 @@ var require_cjs6 = __commonJS({
|
|
|
11693
11693
|
scrollToOptions: { behavior: "smooth" }
|
|
11694
11694
|
};
|
|
11695
11695
|
var router = (path, element, state = {}, options = {}) => {
|
|
11696
|
-
const win = element.context.window ||
|
|
11697
|
-
const doc = element.context.document ||
|
|
11696
|
+
const win = element.context.window || import_utils25.window;
|
|
11697
|
+
const doc = element.context.document || import_utils25.document;
|
|
11698
11698
|
const opts = { ...defaultOptions, ...element.context.routerOptions, ...options };
|
|
11699
11699
|
lastLevel = opts.lastLevel;
|
|
11700
11700
|
const ref = element.__ref;
|
|
11701
11701
|
if (opts.contentElementKey !== "content" && opts.contentElementKey !== ref.contentElementKey || !ref.contentElementKey) {
|
|
11702
11702
|
ref.contentElementKey = opts.contentElementKey || "content";
|
|
11703
11703
|
}
|
|
11704
|
-
const contentElementKey = (0,
|
|
11704
|
+
const contentElementKey = (0, import_utils25.setContentKey)(element, opts);
|
|
11705
11705
|
const urlObj = new win.URL(win.location.origin + path);
|
|
11706
11706
|
const { pathname, search, hash: hash2 } = urlObj;
|
|
11707
11707
|
const rootNode = element.node;
|
|
@@ -12129,10 +12129,10 @@ var init_Img = __esm({
|
|
|
12129
12129
|
attr: {
|
|
12130
12130
|
src: (el) => {
|
|
12131
12131
|
const { props: props4, context } = el;
|
|
12132
|
-
const { exec: exec6, isString:
|
|
12132
|
+
const { exec: exec6, isString: isString10, replaceLiteralsWithObjectFields } = context.utils;
|
|
12133
12133
|
let src = (props4.preSrc || "") + exec6(props4.src, el);
|
|
12134
|
-
if (
|
|
12135
|
-
src =
|
|
12134
|
+
if (isString10(src) && src.includes("{{")) {
|
|
12135
|
+
src = replaceLiteralsWithObjectFields(src, el.state);
|
|
12136
12136
|
}
|
|
12137
12137
|
let isUrl;
|
|
12138
12138
|
try {
|
|
@@ -13061,11 +13061,11 @@ var require_methods = __commonJS({
|
|
|
13061
13061
|
values: () => values
|
|
13062
13062
|
});
|
|
13063
13063
|
module2.exports = __toCommonJS2(methods_exports);
|
|
13064
|
-
var
|
|
13064
|
+
var import_utils25 = require_cjs();
|
|
13065
13065
|
var import_ignore = require_ignore();
|
|
13066
13066
|
var parse3 = function() {
|
|
13067
13067
|
const state = this;
|
|
13068
|
-
if ((0,
|
|
13068
|
+
if ((0, import_utils25.isObject)(state)) {
|
|
13069
13069
|
const obj = {};
|
|
13070
13070
|
for (const param in state) {
|
|
13071
13071
|
if (!import_ignore.IGNORE_STATE_PARAMS.includes(param)) {
|
|
@@ -13073,7 +13073,7 @@ var require_methods = __commonJS({
|
|
|
13073
13073
|
}
|
|
13074
13074
|
}
|
|
13075
13075
|
return obj;
|
|
13076
|
-
} else if ((0,
|
|
13076
|
+
} else if ((0, import_utils25.isArray)(state)) {
|
|
13077
13077
|
return state.filter((item) => !import_ignore.IGNORE_STATE_PARAMS.includes(item));
|
|
13078
13078
|
}
|
|
13079
13079
|
};
|
|
@@ -13093,7 +13093,7 @@ var require_methods = __commonJS({
|
|
|
13093
13093
|
const state = this;
|
|
13094
13094
|
const element = state.__element;
|
|
13095
13095
|
const stateKey = element.__ref.__state;
|
|
13096
|
-
if ((0,
|
|
13096
|
+
if ((0, import_utils25.isString)(stateKey)) {
|
|
13097
13097
|
element.parent.state.remove(stateKey, { isHoisted: true, ...options });
|
|
13098
13098
|
return element.state;
|
|
13099
13099
|
}
|
|
@@ -13106,7 +13106,7 @@ var require_methods = __commonJS({
|
|
|
13106
13106
|
for (const key in state.__children) {
|
|
13107
13107
|
const child = state.__children[key];
|
|
13108
13108
|
if (child.state) {
|
|
13109
|
-
if ((0,
|
|
13109
|
+
if ((0, import_utils25.isArray)(child.state)) {
|
|
13110
13110
|
Object.defineProperty(child.state, "parent", {
|
|
13111
13111
|
value: state.parent,
|
|
13112
13112
|
enumerable: false,
|
|
@@ -13140,10 +13140,10 @@ var require_methods = __commonJS({
|
|
|
13140
13140
|
};
|
|
13141
13141
|
var add = function(value2, options = {}) {
|
|
13142
13142
|
const state = this;
|
|
13143
|
-
if ((0,
|
|
13143
|
+
if ((0, import_utils25.isArray)(state)) {
|
|
13144
13144
|
state.push(value2);
|
|
13145
13145
|
state.update(state.parse(), { overwrite: true, ...options });
|
|
13146
|
-
} else if ((0,
|
|
13146
|
+
} else if ((0, import_utils25.isObject)(state)) {
|
|
13147
13147
|
const key = Object.keys(state).length;
|
|
13148
13148
|
state.update({ [key]: value2 }, options);
|
|
13149
13149
|
}
|
|
@@ -13154,41 +13154,41 @@ var require_methods = __commonJS({
|
|
|
13154
13154
|
};
|
|
13155
13155
|
var remove = function(key, options = {}) {
|
|
13156
13156
|
const state = this;
|
|
13157
|
-
if ((0,
|
|
13158
|
-
(0,
|
|
13159
|
-
if ((0,
|
|
13160
|
-
(0,
|
|
13157
|
+
if ((0, import_utils25.isArray)(state))
|
|
13158
|
+
(0, import_utils25.removeFromArray)(state, key);
|
|
13159
|
+
if ((0, import_utils25.isObject)(state))
|
|
13160
|
+
(0, import_utils25.removeFromObject)(state, key);
|
|
13161
13161
|
if (options.applyReset)
|
|
13162
13162
|
return state.set(state.parse(), { replace: true, ...options });
|
|
13163
13163
|
return state.update();
|
|
13164
13164
|
};
|
|
13165
13165
|
var set3 = function(val, options = {}) {
|
|
13166
13166
|
const state = this;
|
|
13167
|
-
const value2 = (0,
|
|
13167
|
+
const value2 = (0, import_utils25.deepClone)(val);
|
|
13168
13168
|
return state.clean({ preventStateUpdate: true, ...options }).update(value2, { replace: true, ...options });
|
|
13169
13169
|
};
|
|
13170
13170
|
var reset = function(options = {}) {
|
|
13171
13171
|
const state = this;
|
|
13172
|
-
const value2 = (0,
|
|
13172
|
+
const value2 = (0, import_utils25.deepClone)(state.parse());
|
|
13173
13173
|
return state.set(value2, { replace: true, ...options });
|
|
13174
13174
|
};
|
|
13175
13175
|
var apply = function(func, options = {}) {
|
|
13176
13176
|
const state = this;
|
|
13177
|
-
if ((0,
|
|
13177
|
+
if ((0, import_utils25.isFunction)(func)) {
|
|
13178
13178
|
const value2 = func(state);
|
|
13179
13179
|
return state.update(value2, { replace: true, ...options });
|
|
13180
13180
|
}
|
|
13181
13181
|
};
|
|
13182
13182
|
var applyReplace = function(func, options = {}) {
|
|
13183
13183
|
const state = this;
|
|
13184
|
-
if ((0,
|
|
13184
|
+
if ((0, import_utils25.isFunction)(func)) {
|
|
13185
13185
|
const value2 = func(state);
|
|
13186
13186
|
return state.replace(value2, options);
|
|
13187
13187
|
}
|
|
13188
13188
|
};
|
|
13189
13189
|
var applyFunction = function(func, options = {}) {
|
|
13190
13190
|
const state = this;
|
|
13191
|
-
if ((0,
|
|
13191
|
+
if ((0, import_utils25.isFunction)(func)) {
|
|
13192
13192
|
func(state);
|
|
13193
13193
|
return state.update(state.parse(), { replace: true, ...options });
|
|
13194
13194
|
}
|
|
@@ -13252,7 +13252,7 @@ var require_inherit = __commonJS({
|
|
|
13252
13252
|
isState: () => isState2
|
|
13253
13253
|
});
|
|
13254
13254
|
module2.exports = __toCommonJS2(inherit_exports);
|
|
13255
|
-
var
|
|
13255
|
+
var import_utils25 = require_cjs();
|
|
13256
13256
|
var import_ignore = require_ignore();
|
|
13257
13257
|
var getRootStateInKey = (stateKey, parentState) => {
|
|
13258
13258
|
if (!stateKey.includes("~/"))
|
|
@@ -13317,11 +13317,11 @@ var require_inherit = __commonJS({
|
|
|
13317
13317
|
var createInheritedState = (element, parent) => {
|
|
13318
13318
|
const ref = element.__ref;
|
|
13319
13319
|
const inheritedState = findInheritedState(element, parent);
|
|
13320
|
-
if ((0,
|
|
13320
|
+
if ((0, import_utils25.isUndefined)(inheritedState))
|
|
13321
13321
|
return element.state;
|
|
13322
|
-
if ((0,
|
|
13323
|
-
return (0,
|
|
13324
|
-
} else if ((0,
|
|
13322
|
+
if ((0, import_utils25.is)(inheritedState)("object", "array")) {
|
|
13323
|
+
return (0, import_utils25.deepClone)(inheritedState, { exclude: import_ignore.IGNORE_STATE_PARAMS });
|
|
13324
|
+
} else if ((0, import_utils25.is)(inheritedState)("string", "number", "boolean")) {
|
|
13325
13325
|
ref.__stateType = typeof inheritedState;
|
|
13326
13326
|
return { value: inheritedState };
|
|
13327
13327
|
}
|
|
@@ -13330,12 +13330,12 @@ var require_inherit = __commonJS({
|
|
|
13330
13330
|
var checkIfInherits = (element) => {
|
|
13331
13331
|
const ref = element.__ref;
|
|
13332
13332
|
const stateKey = ref.__state;
|
|
13333
|
-
if (stateKey && (0,
|
|
13333
|
+
if (stateKey && (0, import_utils25.is)(stateKey)("number", "string", "boolean"))
|
|
13334
13334
|
return true;
|
|
13335
13335
|
return false;
|
|
13336
13336
|
};
|
|
13337
13337
|
var isState2 = function(state) {
|
|
13338
|
-
if (!(0,
|
|
13338
|
+
if (!(0, import_utils25.isObjectLike)(state))
|
|
13339
13339
|
return false;
|
|
13340
13340
|
return state.update && state.parse && state.clean && state.create && state.parent && state.destroy && state.rootUpdate && state.parentUpdate && state.keys && state.values && state.toggle && state.replace && state.quietUpdate && state.quietReplace && state.add && state.apply && state.applyReplace && state.applyFunction && state.__element && state.__children;
|
|
13341
13341
|
};
|
|
@@ -13384,7 +13384,7 @@ var require_updateState = __commonJS({
|
|
|
13384
13384
|
var import_report = require_cjs4();
|
|
13385
13385
|
var import_event = require_cjs5();
|
|
13386
13386
|
var import_ignore = require_ignore();
|
|
13387
|
-
var
|
|
13387
|
+
var import_utils25 = require_cjs();
|
|
13388
13388
|
var import_inherit = require_inherit();
|
|
13389
13389
|
var STATE_UPDATE_OPTIONS = {
|
|
13390
13390
|
overwrite: true,
|
|
@@ -13399,7 +13399,7 @@ var require_updateState = __commonJS({
|
|
|
13399
13399
|
if (options.onEach)
|
|
13400
13400
|
options.onEach(element, state, element.context, options);
|
|
13401
13401
|
if (!options.updateByState)
|
|
13402
|
-
(0,
|
|
13402
|
+
(0, import_utils25.merge)(options, STATE_UPDATE_OPTIONS);
|
|
13403
13403
|
if (!state.__element)
|
|
13404
13404
|
(0, import_report.report)("ElementOnStateIsNotDefined");
|
|
13405
13405
|
if (options.preventInheritAtCurrentState === true) {
|
|
@@ -13429,10 +13429,10 @@ var require_updateState = __commonJS({
|
|
|
13429
13429
|
const shallow = overwrite === "shallow" || overwrite === "shallow-once";
|
|
13430
13430
|
const merge22 = overwrite === "merge";
|
|
13431
13431
|
if (merge22) {
|
|
13432
|
-
(0,
|
|
13432
|
+
(0, import_utils25.deepMerge)(state, obj, import_ignore.IGNORE_STATE_PARAMS);
|
|
13433
13433
|
return;
|
|
13434
13434
|
}
|
|
13435
|
-
const overwriteFunc = shallow ?
|
|
13435
|
+
const overwriteFunc = shallow ? import_utils25.overwriteShallow : import_utils25.overwriteDeep;
|
|
13436
13436
|
if (options.overwrite === "shallow-once")
|
|
13437
13437
|
options.overwrite = true;
|
|
13438
13438
|
overwriteFunc(state, obj, import_ignore.IGNORE_STATE_PARAMS);
|
|
@@ -13457,7 +13457,7 @@ var require_updateState = __commonJS({
|
|
|
13457
13457
|
const changesValue = (0, import_inherit.createNestedObjectByKeyPath)(stateKey, passedValue);
|
|
13458
13458
|
const targetParent = findRootState || findGrandParentState || parent.state;
|
|
13459
13459
|
if (options.replace)
|
|
13460
|
-
(0,
|
|
13460
|
+
(0, import_utils25.overwriteDeep)(targetParent, changesValue || value2);
|
|
13461
13461
|
targetParent.update(changesValue, {
|
|
13462
13462
|
execStateFunction: false,
|
|
13463
13463
|
isHoisted: true,
|
|
@@ -13526,7 +13526,7 @@ var require_create = __commonJS({
|
|
|
13526
13526
|
});
|
|
13527
13527
|
module2.exports = __toCommonJS2(create_exports);
|
|
13528
13528
|
var import_event = require_cjs5();
|
|
13529
|
-
var
|
|
13529
|
+
var import_utils25 = require_cjs();
|
|
13530
13530
|
var import_ignore = require_ignore();
|
|
13531
13531
|
var import_methods = require_methods();
|
|
13532
13532
|
var import_updateState = require_updateState();
|
|
@@ -13546,7 +13546,7 @@ var require_create = __commonJS({
|
|
|
13546
13546
|
return element.state;
|
|
13547
13547
|
if ((0, import_inherit.checkIfInherits)(element)) {
|
|
13548
13548
|
const inheritedState = (0, import_inherit.createInheritedState)(element, parent);
|
|
13549
|
-
element.state = (0,
|
|
13549
|
+
element.state = (0, import_utils25.isUndefined)(inheritedState) ? {} : inheritedState;
|
|
13550
13550
|
}
|
|
13551
13551
|
const dependentState = applyDependentState(element, element.state || parent.state || {});
|
|
13552
13552
|
if (dependentState)
|
|
@@ -13557,12 +13557,12 @@ var require_create = __commonJS({
|
|
|
13557
13557
|
};
|
|
13558
13558
|
var applyDependentState = (element, state) => {
|
|
13559
13559
|
const { __ref, ref, __element } = state;
|
|
13560
|
-
const origState = (0,
|
|
13560
|
+
const origState = (0, import_utils25.exec)(__ref || ref || (__element == null ? void 0 : __element.state), element);
|
|
13561
13561
|
if (!origState)
|
|
13562
13562
|
return;
|
|
13563
|
-
const dependentState = (0,
|
|
13563
|
+
const dependentState = (0, import_utils25.deepClone)(origState, import_ignore.IGNORE_STATE_PARAMS);
|
|
13564
13564
|
const newDepends = { [element.key]: dependentState };
|
|
13565
|
-
const __depends = (0,
|
|
13565
|
+
const __depends = (0, import_utils25.isObject)(origState.__depends) ? { ...origState.__depends, ...newDepends } : newDepends;
|
|
13566
13566
|
if (Array.isArray(origState)) {
|
|
13567
13567
|
addProtoToArray(origState, { ...Object.getPrototypeOf(origState), __depends });
|
|
13568
13568
|
} else {
|
|
@@ -13573,10 +13573,10 @@ var require_create = __commonJS({
|
|
|
13573
13573
|
var checkForTypes = (element) => {
|
|
13574
13574
|
const { state: orig, props: props4, __ref: ref } = element;
|
|
13575
13575
|
const state = (props4 == null ? void 0 : props4.state) || orig;
|
|
13576
|
-
if ((0,
|
|
13576
|
+
if ((0, import_utils25.isFunction)(state)) {
|
|
13577
13577
|
ref.__state = state;
|
|
13578
|
-
return (0,
|
|
13579
|
-
} else if ((0,
|
|
13578
|
+
return (0, import_utils25.exec)(state, element);
|
|
13579
|
+
} else if ((0, import_utils25.is)(state)("string", "number")) {
|
|
13580
13580
|
ref.__state = state;
|
|
13581
13581
|
return { value: state };
|
|
13582
13582
|
} else if (state === true) {
|
|
@@ -13631,7 +13631,7 @@ var require_create = __commonJS({
|
|
|
13631
13631
|
__children: {},
|
|
13632
13632
|
root: ref.root ? ref.root.state : state
|
|
13633
13633
|
};
|
|
13634
|
-
if ((0,
|
|
13634
|
+
if ((0, import_utils25.isArray)(state)) {
|
|
13635
13635
|
addProtoToArray(state, proto);
|
|
13636
13636
|
} else {
|
|
13637
13637
|
Object.setPrototypeOf(state, proto);
|
|
@@ -14464,10 +14464,10 @@ var init_Link = __esm({
|
|
|
14464
14464
|
},
|
|
14465
14465
|
attr: {
|
|
14466
14466
|
href: (el, s, ctx) => {
|
|
14467
|
-
const { isString:
|
|
14467
|
+
const { isString: isString10, exec: exec6, replaceLiteralsWithObjectFields } = ctx.utils;
|
|
14468
14468
|
const href = exec6(el.props.href, el) || exec6(exec6(el.props, el).href, el);
|
|
14469
|
-
if (
|
|
14470
|
-
return
|
|
14469
|
+
if (isString10(href) && href.includes("{{")) {
|
|
14470
|
+
return replaceLiteralsWithObjectFields(href, s);
|
|
14471
14471
|
}
|
|
14472
14472
|
return href;
|
|
14473
14473
|
},
|
|
@@ -14481,10 +14481,10 @@ var init_Link = __esm({
|
|
|
14481
14481
|
click: (event, el, s) => {
|
|
14482
14482
|
const { props: props4, context: ctx } = el;
|
|
14483
14483
|
const { href: h, scrollToTop, stopPropagation } = props4;
|
|
14484
|
-
const { exec: exec6, isString:
|
|
14484
|
+
const { exec: exec6, isString: isString10, replaceLiteralsWithObjectFields, isDefined: isDefined2 } = ctx.utils;
|
|
14485
14485
|
let href = exec6(h, el, s);
|
|
14486
|
-
if (
|
|
14487
|
-
href =
|
|
14486
|
+
if (isString10(href) && href.includes("{{")) {
|
|
14487
|
+
href = replaceLiteralsWithObjectFields(href, s);
|
|
14488
14488
|
}
|
|
14489
14489
|
if (stopPropagation)
|
|
14490
14490
|
event.stopPropagation();
|
|
@@ -14548,15 +14548,13 @@ var init_Video = __esm({
|
|
|
14548
14548
|
});
|
|
14549
14549
|
|
|
14550
14550
|
// ../uikit/Input/Input.js
|
|
14551
|
-
var
|
|
14551
|
+
var Input;
|
|
14552
14552
|
var init_Input = __esm({
|
|
14553
14553
|
"../uikit/Input/Input.js"() {
|
|
14554
14554
|
"use strict";
|
|
14555
|
-
import_utils15 = __toESM(require_cjs());
|
|
14556
14555
|
Input = {
|
|
14557
14556
|
extend: ["Focusable"],
|
|
14558
14557
|
tag: "input",
|
|
14559
|
-
deps: { isString: import_utils15.isString, replaceLiteralsWithObjectFields: import_utils15.replaceLiteralsWithObjectFields },
|
|
14560
14558
|
props: {
|
|
14561
14559
|
border: "none",
|
|
14562
14560
|
type: "input",
|
|
@@ -14574,11 +14572,9 @@ var init_Input = __esm({
|
|
|
14574
14572
|
autocomplete: ({ props: props4 }) => props4.autocomplete,
|
|
14575
14573
|
placeholder: ({ props: props4 }) => props4.placeholder,
|
|
14576
14574
|
value: (el, s) => {
|
|
14577
|
-
const
|
|
14578
|
-
|
|
14579
|
-
|
|
14580
|
-
if (isString11(val) && val.includes("{{")) {
|
|
14581
|
-
return replaceLiteralsWithObjectFields2(val, state);
|
|
14575
|
+
const val = el.call("exec", el.props.value, el);
|
|
14576
|
+
if (el.call("isString", val) && val.includes("{{")) {
|
|
14577
|
+
return el.call("replaceLiteralsWithObjectFields", val, s);
|
|
14582
14578
|
}
|
|
14583
14579
|
return val;
|
|
14584
14580
|
},
|
|
@@ -14597,9 +14593,8 @@ var NumberInput;
|
|
|
14597
14593
|
var init_NumberInput = __esm({
|
|
14598
14594
|
"../uikit/Input/NumberInput.js"() {
|
|
14599
14595
|
"use strict";
|
|
14600
|
-
init_Input();
|
|
14601
14596
|
NumberInput = {
|
|
14602
|
-
extend: ["Flex", Input],
|
|
14597
|
+
extend: ["Flex", "Input"],
|
|
14603
14598
|
props: {
|
|
14604
14599
|
type: "number",
|
|
14605
14600
|
boxSize: "C+X",
|
|
@@ -14638,35 +14633,29 @@ var init_Checkbox = __esm({
|
|
|
14638
14633
|
round: "Y"
|
|
14639
14634
|
},
|
|
14640
14635
|
Input: {
|
|
14641
|
-
|
|
14642
|
-
|
|
14643
|
-
|
|
14644
|
-
|
|
14645
|
-
|
|
14646
|
-
|
|
14647
|
-
opacity: "1"
|
|
14648
|
-
}
|
|
14636
|
+
type: "checkbox",
|
|
14637
|
+
display: "none",
|
|
14638
|
+
":checked + div": { theme: "primary" },
|
|
14639
|
+
":checked + div > svg": {
|
|
14640
|
+
transform: "none",
|
|
14641
|
+
opacity: "1"
|
|
14649
14642
|
},
|
|
14650
14643
|
attr: {
|
|
14651
|
-
checked: (
|
|
14644
|
+
checked: (el) => el.call("exec", el.parent.props.checked)
|
|
14652
14645
|
}
|
|
14653
14646
|
},
|
|
14654
14647
|
Flex: {
|
|
14655
|
-
|
|
14656
|
-
|
|
14657
|
-
|
|
14658
|
-
|
|
14659
|
-
|
|
14660
|
-
|
|
14661
|
-
transition: "background A defaultBezier"
|
|
14662
|
-
},
|
|
14648
|
+
align: "center center",
|
|
14649
|
+
fontSize: "B1",
|
|
14650
|
+
padding: "V",
|
|
14651
|
+
theme: "field",
|
|
14652
|
+
round: "X2",
|
|
14653
|
+
transition: "background A defaultBezier",
|
|
14663
14654
|
Icon: {
|
|
14664
|
-
|
|
14665
|
-
|
|
14666
|
-
|
|
14667
|
-
|
|
14668
|
-
transition: "opacity B defaultBezier"
|
|
14669
|
-
}
|
|
14655
|
+
icon: "check",
|
|
14656
|
+
opacity: "0",
|
|
14657
|
+
transform: "scale(0.9) rotate(-15deg)",
|
|
14658
|
+
transition: "opacity B defaultBezier"
|
|
14670
14659
|
}
|
|
14671
14660
|
}
|
|
14672
14661
|
};
|
|
@@ -14692,33 +14681,29 @@ var Radio, RadioHgroup;
|
|
|
14692
14681
|
var init_Radio = __esm({
|
|
14693
14682
|
"../uikit/Input/Radio.js"() {
|
|
14694
14683
|
"use strict";
|
|
14695
|
-
init_Checkbox();
|
|
14696
14684
|
Radio = {
|
|
14697
|
-
extend: Checkbox,
|
|
14685
|
+
extend: "Checkbox",
|
|
14698
14686
|
Input: {
|
|
14699
14687
|
type: "radio",
|
|
14700
14688
|
":checked + div:after": { opacity: "1" }
|
|
14701
14689
|
},
|
|
14702
14690
|
Flex: {
|
|
14703
|
-
|
|
14704
|
-
|
|
14691
|
+
round: "100%",
|
|
14692
|
+
padding: "Y",
|
|
14693
|
+
":after": {
|
|
14694
|
+
content: '""',
|
|
14695
|
+
display: "block",
|
|
14696
|
+
boxSize: "X+W1",
|
|
14705
14697
|
round: "100%",
|
|
14706
|
-
|
|
14707
|
-
|
|
14708
|
-
|
|
14709
|
-
display: "block",
|
|
14710
|
-
boxSize: "X+W1",
|
|
14711
|
-
round: "100%",
|
|
14712
|
-
background: "white",
|
|
14713
|
-
opacity: "0",
|
|
14714
|
-
transition: "opacity .15s ease-in-out"
|
|
14715
|
-
}
|
|
14698
|
+
background: "white",
|
|
14699
|
+
opacity: "0",
|
|
14700
|
+
transition: "opacity .15s ease-in-out"
|
|
14716
14701
|
},
|
|
14717
14702
|
Icon: null
|
|
14718
14703
|
}
|
|
14719
14704
|
};
|
|
14720
14705
|
RadioHgroup = {
|
|
14721
|
-
extend: CheckboxHgroup,
|
|
14706
|
+
extend: "CheckboxHgroup",
|
|
14722
14707
|
Checkbox: null,
|
|
14723
14708
|
Radio: {}
|
|
14724
14709
|
};
|
|
@@ -14730,39 +14715,34 @@ var Toggle, ToggleHgroup;
|
|
|
14730
14715
|
var init_Toggle = __esm({
|
|
14731
14716
|
"../uikit/Input/Toggle.js"() {
|
|
14732
14717
|
"use strict";
|
|
14733
|
-
init_Checkbox();
|
|
14734
14718
|
Toggle = {
|
|
14735
|
-
extend: Checkbox,
|
|
14719
|
+
extend: "Checkbox",
|
|
14736
14720
|
Input: {
|
|
14737
|
-
|
|
14738
|
-
|
|
14739
|
-
|
|
14740
|
-
justifyContent: "flex-end"
|
|
14741
|
-
}
|
|
14721
|
+
":checked + div": {
|
|
14722
|
+
background: "green2 +8",
|
|
14723
|
+
justifyContent: "flex-end"
|
|
14742
14724
|
}
|
|
14743
14725
|
},
|
|
14744
14726
|
Flex: {
|
|
14745
|
-
|
|
14746
|
-
|
|
14747
|
-
|
|
14748
|
-
|
|
14749
|
-
|
|
14750
|
-
|
|
14751
|
-
|
|
14752
|
-
|
|
14753
|
-
|
|
14754
|
-
|
|
14755
|
-
|
|
14756
|
-
|
|
14757
|
-
|
|
14758
|
-
boxShadow: "1px, 1px, Z, gray .2"
|
|
14759
|
-
}
|
|
14727
|
+
boxSize: "A1 B1",
|
|
14728
|
+
padding: "- W_default",
|
|
14729
|
+
round: "D",
|
|
14730
|
+
align: "center flex-start",
|
|
14731
|
+
theme: "field",
|
|
14732
|
+
border: "none",
|
|
14733
|
+
transition: "opacity .15s ease",
|
|
14734
|
+
":after": {
|
|
14735
|
+
content: '""',
|
|
14736
|
+
boxSize: "A A",
|
|
14737
|
+
round: "100%",
|
|
14738
|
+
background: "white",
|
|
14739
|
+
boxShadow: "1px, 1px, Z, gray .2"
|
|
14760
14740
|
},
|
|
14761
14741
|
Icon: null
|
|
14762
14742
|
}
|
|
14763
14743
|
};
|
|
14764
14744
|
ToggleHgroup = {
|
|
14765
|
-
extend: CheckboxHgroup,
|
|
14745
|
+
extend: "CheckboxHgroup",
|
|
14766
14746
|
Checkbox: null,
|
|
14767
14747
|
Toggle: {}
|
|
14768
14748
|
};
|
|
@@ -14774,11 +14754,9 @@ var Textarea, TextareaWithButton;
|
|
|
14774
14754
|
var init_Textarea = __esm({
|
|
14775
14755
|
"../uikit/Input/Textarea.js"() {
|
|
14776
14756
|
"use strict";
|
|
14777
|
-
init_Atoms();
|
|
14778
|
-
init_Input();
|
|
14779
14757
|
Textarea = {
|
|
14780
14758
|
tag: "textarea",
|
|
14781
|
-
extend: [Input, Flex],
|
|
14759
|
+
extend: ["Input", "Flex"],
|
|
14782
14760
|
props: {
|
|
14783
14761
|
variant: "outlined",
|
|
14784
14762
|
fontfamily: "Avenir",
|
|
@@ -14825,10 +14803,8 @@ var init_Textarea = __esm({
|
|
|
14825
14803
|
minHeight: "fit-content"
|
|
14826
14804
|
},
|
|
14827
14805
|
SquareButton: {
|
|
14828
|
-
|
|
14829
|
-
|
|
14830
|
-
Icon: { name: "send" }
|
|
14831
|
-
}
|
|
14806
|
+
background: "blue",
|
|
14807
|
+
Icon: { name: "send" }
|
|
14832
14808
|
}
|
|
14833
14809
|
};
|
|
14834
14810
|
}
|
|
@@ -14971,7 +14947,7 @@ var init_Dialog = __esm({
|
|
|
14971
14947
|
gap: "A"
|
|
14972
14948
|
},
|
|
14973
14949
|
Title: {
|
|
14974
|
-
|
|
14950
|
+
align: "center space-between",
|
|
14975
14951
|
Text: { text: "Title" },
|
|
14976
14952
|
SquareButton: {
|
|
14977
14953
|
icon: "x",
|
|
@@ -14979,7 +14955,7 @@ var init_Dialog = __esm({
|
|
|
14979
14955
|
}
|
|
14980
14956
|
},
|
|
14981
14957
|
Paragraph: {
|
|
14982
|
-
|
|
14958
|
+
color: "caption"
|
|
14983
14959
|
}
|
|
14984
14960
|
};
|
|
14985
14961
|
DialogFooter = {
|
|
@@ -15023,11 +14999,11 @@ var init_Dialog = __esm({
|
|
|
15023
14999
|
});
|
|
15024
15000
|
|
|
15025
15001
|
// ../uikit/Tooltip/index.js
|
|
15026
|
-
var
|
|
15002
|
+
var import_utils15, Tooltip, TooltipHidden, TooltipParent;
|
|
15027
15003
|
var init_Tooltip = __esm({
|
|
15028
15004
|
"../uikit/Tooltip/index.js"() {
|
|
15029
15005
|
"use strict";
|
|
15030
|
-
|
|
15006
|
+
import_utils15 = __toESM(require_cjs());
|
|
15031
15007
|
Tooltip = {
|
|
15032
15008
|
extend: "Flex",
|
|
15033
15009
|
props: {
|
|
@@ -15046,7 +15022,7 @@ var init_Tooltip = __esm({
|
|
|
15046
15022
|
},
|
|
15047
15023
|
attr: { tooltip: true },
|
|
15048
15024
|
Title: {
|
|
15049
|
-
if: ({ parent, props: props4 }) => (0,
|
|
15025
|
+
if: ({ parent, props: props4 }) => (0, import_utils15.isDefined)(parent.props.title) || props4.text,
|
|
15050
15026
|
width: "fit-content",
|
|
15051
15027
|
fontWeight: 500,
|
|
15052
15028
|
color: "gray12",
|
|
@@ -15064,13 +15040,14 @@ var init_Tooltip = __esm({
|
|
|
15064
15040
|
};
|
|
15065
15041
|
TooltipHidden = {
|
|
15066
15042
|
extend: "Tooltip",
|
|
15067
|
-
props:
|
|
15043
|
+
props: {
|
|
15068
15044
|
position: "absolute",
|
|
15069
15045
|
pointerEvents: "none",
|
|
15070
15046
|
opacity: "0",
|
|
15071
15047
|
visibility: "hidden",
|
|
15072
15048
|
transition: "C defaultBezier opacity, C defaultBezier visibility, B defaultBezier transform",
|
|
15073
|
-
|
|
15049
|
+
isTop: ({ props: props4 }) => !props4.shapeDirection || props4.shapeDirection === "top",
|
|
15050
|
+
".isTop": {
|
|
15074
15051
|
top: "112%",
|
|
15075
15052
|
left: "50%",
|
|
15076
15053
|
transform: "translate3d(-50%,10%,0)",
|
|
@@ -15079,16 +15056,20 @@ var init_Tooltip = __esm({
|
|
|
15079
15056
|
opacity: 1,
|
|
15080
15057
|
visibility: "visible"
|
|
15081
15058
|
}
|
|
15082
|
-
}
|
|
15059
|
+
},
|
|
15060
|
+
isRight: ({ props: props4 }) => props4.shapeDirection === "right",
|
|
15061
|
+
".isRight": {
|
|
15083
15062
|
transform: "translate3d(10%,-50%,0)",
|
|
15084
|
-
|
|
15063
|
+
left: "112%",
|
|
15085
15064
|
top: "50%",
|
|
15086
15065
|
".active": {
|
|
15087
15066
|
transform: "translate3d(0%,-50%,0)",
|
|
15088
15067
|
opacity: 1,
|
|
15089
15068
|
visibility: "visible"
|
|
15090
15069
|
}
|
|
15091
|
-
}
|
|
15070
|
+
},
|
|
15071
|
+
isBottom: ({ props: props4 }) => props4.shapeDirection === "bottom",
|
|
15072
|
+
".isBottom": {
|
|
15092
15073
|
transform: "translate3d(-50%,-10%,0)",
|
|
15093
15074
|
bottom: "112%",
|
|
15094
15075
|
left: "50%",
|
|
@@ -15097,9 +15078,11 @@ var init_Tooltip = __esm({
|
|
|
15097
15078
|
opacity: 1,
|
|
15098
15079
|
visibility: "visible"
|
|
15099
15080
|
}
|
|
15100
|
-
}
|
|
15081
|
+
},
|
|
15082
|
+
isLeft: ({ props: props4 }) => props4.shapeDirection === "left",
|
|
15083
|
+
".isLeft": {
|
|
15101
15084
|
transform: "translate3d(10%,-50%,0)",
|
|
15102
|
-
|
|
15085
|
+
right: "112%",
|
|
15103
15086
|
top: "50%",
|
|
15104
15087
|
".active": {
|
|
15105
15088
|
transform: "translate3d(0%,-50%,0)",
|
|
@@ -15107,7 +15090,7 @@ var init_Tooltip = __esm({
|
|
|
15107
15090
|
visibility: "visible"
|
|
15108
15091
|
}
|
|
15109
15092
|
}
|
|
15110
|
-
}
|
|
15093
|
+
}
|
|
15111
15094
|
};
|
|
15112
15095
|
TooltipParent = {
|
|
15113
15096
|
props: (el) => {
|
|
@@ -15657,11 +15640,11 @@ var require_tree = __commonJS({
|
|
|
15657
15640
|
TREE: () => TREE
|
|
15658
15641
|
});
|
|
15659
15642
|
module2.exports = __toCommonJS2(tree_exports);
|
|
15660
|
-
var
|
|
15643
|
+
var import_utils25 = require_cjs();
|
|
15661
15644
|
var import_report = require_cjs4();
|
|
15662
15645
|
var ROOT = {
|
|
15663
15646
|
key: ":root",
|
|
15664
|
-
node:
|
|
15647
|
+
node: import_utils25.document ? import_utils25.document.body : (0, import_report.report)("DocumentNotDefined", import_utils25.document)
|
|
15665
15648
|
};
|
|
15666
15649
|
var TREE = ROOT;
|
|
15667
15650
|
}
|
|
@@ -15728,10 +15711,10 @@ var require_cache = __commonJS({
|
|
|
15728
15711
|
module2.exports = __toCommonJS2(cache_exports);
|
|
15729
15712
|
var import_report = require_cjs4();
|
|
15730
15713
|
var import_event = require_cjs5();
|
|
15731
|
-
var
|
|
15714
|
+
var import_utils25 = require_cjs();
|
|
15732
15715
|
var createHTMLNode = (element) => {
|
|
15733
15716
|
const { tag, context } = element;
|
|
15734
|
-
const doc = context.document ||
|
|
15717
|
+
const doc = context.document || import_utils25.document;
|
|
15735
15718
|
if (tag) {
|
|
15736
15719
|
if (tag === "string")
|
|
15737
15720
|
return doc.createTextNode(element.text);
|
|
@@ -15747,16 +15730,16 @@ var require_cache = __commonJS({
|
|
|
15747
15730
|
};
|
|
15748
15731
|
var detectTag = (element) => {
|
|
15749
15732
|
let { tag, key, props: props4 } = element;
|
|
15750
|
-
tag = (0,
|
|
15733
|
+
tag = (0, import_utils25.exec)(tag, element);
|
|
15751
15734
|
if (tag === true)
|
|
15752
15735
|
tag = key;
|
|
15753
|
-
if ((0,
|
|
15754
|
-
const tagExists = (0,
|
|
15736
|
+
if ((0, import_utils25.isObject)(props4) && (0, import_utils25.isString)(props4.tag)) {
|
|
15737
|
+
const tagExists = (0, import_utils25.isValidHtmlTag)(props4.tag);
|
|
15755
15738
|
if (tagExists)
|
|
15756
15739
|
return props4.tag;
|
|
15757
15740
|
}
|
|
15758
|
-
if ((0,
|
|
15759
|
-
if ((0,
|
|
15741
|
+
if ((0, import_utils25.isString)(tag)) {
|
|
15742
|
+
if ((0, import_utils25.isValidHtmlTag)(tag))
|
|
15760
15743
|
return tag;
|
|
15761
15744
|
} else {
|
|
15762
15745
|
let keyAsTag = key.toLowerCase();
|
|
@@ -15764,7 +15747,7 @@ var require_cache = __commonJS({
|
|
|
15764
15747
|
keyAsTag = keyAsTag.split(".")[0];
|
|
15765
15748
|
if (keyAsTag.includes("_"))
|
|
15766
15749
|
keyAsTag = keyAsTag.split("_")[0];
|
|
15767
|
-
if ((0,
|
|
15750
|
+
if ((0, import_utils25.isValidHtmlTag)(keyAsTag))
|
|
15768
15751
|
return keyAsTag;
|
|
15769
15752
|
}
|
|
15770
15753
|
return "div";
|
|
@@ -15932,9 +15915,9 @@ var require_inherit2 = __commonJS({
|
|
|
15932
15915
|
inheritParentProps: () => inheritParentProps
|
|
15933
15916
|
});
|
|
15934
15917
|
module2.exports = __toCommonJS2(inherit_exports);
|
|
15935
|
-
var
|
|
15918
|
+
var import_utils25 = require_cjs();
|
|
15936
15919
|
var objectizeStringProperty = (propValue) => {
|
|
15937
|
-
if ((0,
|
|
15920
|
+
if ((0, import_utils25.is)(propValue)("string", "number")) {
|
|
15938
15921
|
return { inheritedString: propValue };
|
|
15939
15922
|
}
|
|
15940
15923
|
return propValue;
|
|
@@ -15942,9 +15925,9 @@ var require_inherit2 = __commonJS({
|
|
|
15942
15925
|
var inheritParentProps = (element, parent) => {
|
|
15943
15926
|
var _a;
|
|
15944
15927
|
let propsStack = [];
|
|
15945
|
-
const parentProps = (0,
|
|
15928
|
+
const parentProps = (0, import_utils25.exec)(parent, parent.state).props;
|
|
15946
15929
|
const matchParent = parent.props && parentProps[element.key];
|
|
15947
|
-
const matchParentIsString = (0,
|
|
15930
|
+
const matchParentIsString = (0, import_utils25.isString)(matchParent);
|
|
15948
15931
|
const matchParentChildProps = parentProps && parentProps.childProps;
|
|
15949
15932
|
if (matchParent) {
|
|
15950
15933
|
if (matchParentIsString) {
|
|
@@ -15992,19 +15975,19 @@ var require_create3 = __commonJS({
|
|
|
15992
15975
|
syncProps: () => syncProps
|
|
15993
15976
|
});
|
|
15994
15977
|
module2.exports = __toCommonJS2(create_exports);
|
|
15995
|
-
var
|
|
15978
|
+
var import_utils25 = require_cjs();
|
|
15996
15979
|
var import_ignore = require_ignore2();
|
|
15997
15980
|
var import_inherit = require_inherit2();
|
|
15998
15981
|
var createPropsStack = (element, parent) => {
|
|
15999
15982
|
const { props: props4, __ref: ref } = element;
|
|
16000
15983
|
const propsStack = ref.__props = (0, import_inherit.inheritParentProps)(element, parent);
|
|
16001
|
-
if ((0,
|
|
15984
|
+
if ((0, import_utils25.isObject)(props4))
|
|
16002
15985
|
propsStack.push(props4);
|
|
16003
15986
|
else if (props4 === "inherit" && parent.props)
|
|
16004
15987
|
propsStack.push(parent.props);
|
|
16005
15988
|
else if (props4)
|
|
16006
15989
|
propsStack.push(props4);
|
|
16007
|
-
if ((0,
|
|
15990
|
+
if ((0, import_utils25.isArray)(ref.__extend)) {
|
|
16008
15991
|
ref.__extend.forEach((extend) => {
|
|
16009
15992
|
if (extend.props && extend.props !== props4)
|
|
16010
15993
|
propsStack.push(extend.props);
|
|
@@ -16021,13 +16004,13 @@ var require_create3 = __commonJS({
|
|
|
16021
16004
|
return;
|
|
16022
16005
|
let execProps;
|
|
16023
16006
|
try {
|
|
16024
|
-
execProps = (0,
|
|
16007
|
+
execProps = (0, import_utils25.exec)(v, element);
|
|
16025
16008
|
} catch (e) {
|
|
16026
16009
|
element.error(e, opts);
|
|
16027
16010
|
}
|
|
16028
|
-
element.props = (0,
|
|
16011
|
+
element.props = (0, import_utils25.deepMerge)(
|
|
16029
16012
|
mergedProps,
|
|
16030
|
-
(0,
|
|
16013
|
+
(0, import_utils25.deepClone)(execProps, { ignore: import_ignore.IGNORE_PROPS_PARAMS }),
|
|
16031
16014
|
import_ignore.IGNORE_PROPS_PARAMS
|
|
16032
16015
|
);
|
|
16033
16016
|
});
|
|
@@ -16175,7 +16158,7 @@ var require_object2 = __commonJS({
|
|
|
16175
16158
|
overwriteShallow: () => overwriteShallow2
|
|
16176
16159
|
});
|
|
16177
16160
|
module2.exports = __toCommonJS2(object_exports);
|
|
16178
|
-
var
|
|
16161
|
+
var import_utils25 = require_cjs();
|
|
16179
16162
|
var import_props = require_props();
|
|
16180
16163
|
var IGNORE_STATE_PARAMS = [
|
|
16181
16164
|
"update",
|
|
@@ -16227,7 +16210,7 @@ var require_object2 = __commonJS({
|
|
|
16227
16210
|
"nextElement",
|
|
16228
16211
|
"previousElement"
|
|
16229
16212
|
];
|
|
16230
|
-
var METHODS_EXL = (0,
|
|
16213
|
+
var METHODS_EXL = (0, import_utils25.joinArrays)(
|
|
16231
16214
|
["node", "state", "context", "extend", "__element"],
|
|
16232
16215
|
METHODS,
|
|
16233
16216
|
IGNORE_STATE_PARAMS,
|
|
@@ -16241,7 +16224,7 @@ var require_object2 = __commonJS({
|
|
|
16241
16224
|
const extendProp = extend[e];
|
|
16242
16225
|
if (elementProp === void 0) {
|
|
16243
16226
|
element[e] = extendProp;
|
|
16244
|
-
} else if ((0,
|
|
16227
|
+
} else if ((0, import_utils25.isObjectLike)(elementProp) && (0, import_utils25.isObject)(extendProp)) {
|
|
16245
16228
|
deepMerge7(elementProp, extendProp);
|
|
16246
16229
|
}
|
|
16247
16230
|
}
|
|
@@ -16288,7 +16271,7 @@ var require_object2 = __commonJS({
|
|
|
16288
16271
|
continue;
|
|
16289
16272
|
const objProp = obj[e];
|
|
16290
16273
|
const paramsProp = params[e];
|
|
16291
|
-
if ((0,
|
|
16274
|
+
if ((0, import_utils25.isObjectLike)(objProp) && (0, import_utils25.isObjectLike)(paramsProp)) {
|
|
16292
16275
|
overwriteDeep2(objProp, paramsProp);
|
|
16293
16276
|
} else if (paramsProp !== void 0) {
|
|
16294
16277
|
obj[e] = paramsProp;
|
|
@@ -16297,15 +16280,15 @@ var require_object2 = __commonJS({
|
|
|
16297
16280
|
return obj;
|
|
16298
16281
|
};
|
|
16299
16282
|
var mergeIfExisted = (a, b) => {
|
|
16300
|
-
if ((0,
|
|
16283
|
+
if ((0, import_utils25.isObjectLike)(a) && (0, import_utils25.isObjectLike)(b))
|
|
16301
16284
|
return deepMerge7(a, b);
|
|
16302
16285
|
return a || b;
|
|
16303
16286
|
};
|
|
16304
16287
|
var mergeArray = (arr, exclude = ["parent", "node", "__element", "state", "context", "__ref"]) => {
|
|
16305
|
-
return arr.reduce((a, c) => deepMerge7(a, (0,
|
|
16288
|
+
return arr.reduce((a, c) => deepMerge7(a, (0, import_utils25.deepClone)(c, { exclude })), {});
|
|
16306
16289
|
};
|
|
16307
16290
|
var mergeAndCloneIfArray = (obj) => {
|
|
16308
|
-
return (0,
|
|
16291
|
+
return (0, import_utils25.isArray)(obj) ? mergeArray(obj) : (0, import_utils25.deepClone)(obj);
|
|
16309
16292
|
};
|
|
16310
16293
|
var flattenRecursive = (param, prop, stack = []) => {
|
|
16311
16294
|
const objectized = mergeAndCloneIfArray(param);
|
|
@@ -16359,7 +16342,7 @@ var require_extendUtils = __commonJS({
|
|
|
16359
16342
|
setHashedExtend: () => setHashedExtend
|
|
16360
16343
|
});
|
|
16361
16344
|
module2.exports = __toCommonJS2(extendUtils_exports);
|
|
16362
|
-
var
|
|
16345
|
+
var import_utils25 = require_cjs();
|
|
16363
16346
|
var ENV3 = "development";
|
|
16364
16347
|
var generateHash = () => Math.random().toString(36).substring(2);
|
|
16365
16348
|
var extendStackRegistry = {};
|
|
@@ -16369,7 +16352,7 @@ var require_extendUtils = __commonJS({
|
|
|
16369
16352
|
};
|
|
16370
16353
|
var setHashedExtend = (extend, stack) => {
|
|
16371
16354
|
const hash2 = generateHash();
|
|
16372
|
-
if (!(0,
|
|
16355
|
+
if (!(0, import_utils25.isString)(extend)) {
|
|
16373
16356
|
extend.__hash = hash2;
|
|
16374
16357
|
}
|
|
16375
16358
|
extendStackRegistry[hash2] = stack;
|
|
@@ -16395,9 +16378,9 @@ var require_extendUtils = __commonJS({
|
|
|
16395
16378
|
var flattenExtend = (extend, stack, context) => {
|
|
16396
16379
|
if (!extend)
|
|
16397
16380
|
return stack;
|
|
16398
|
-
if ((0,
|
|
16381
|
+
if ((0, import_utils25.isArray)(extend))
|
|
16399
16382
|
return extractArrayExtend(extend, stack, context);
|
|
16400
|
-
if ((0,
|
|
16383
|
+
if ((0, import_utils25.isString)(extend))
|
|
16401
16384
|
extend = fallbackStringExtend(extend, context);
|
|
16402
16385
|
stack.push(extend);
|
|
16403
16386
|
if (extend.extend)
|
|
@@ -16412,14 +16395,14 @@ var require_extendUtils = __commonJS({
|
|
|
16412
16395
|
const extendProp = extend[e];
|
|
16413
16396
|
if (elementProp === void 0) {
|
|
16414
16397
|
element[e] = extendProp;
|
|
16415
|
-
} else if ((0,
|
|
16398
|
+
} else if ((0, import_utils25.isObject)(elementProp) && (0, import_utils25.isObject)(extendProp)) {
|
|
16416
16399
|
deepMergeExtend(elementProp, extendProp);
|
|
16417
|
-
} else if ((0,
|
|
16400
|
+
} else if ((0, import_utils25.isArray)(elementProp) && (0, import_utils25.isArray)(extendProp)) {
|
|
16418
16401
|
element[e] = elementProp.concat(extendProp);
|
|
16419
|
-
} else if ((0,
|
|
16402
|
+
} else if ((0, import_utils25.isArray)(elementProp) && (0, import_utils25.isObject)(extendProp)) {
|
|
16420
16403
|
const obj = deepMergeExtend({}, elementProp);
|
|
16421
16404
|
element[e] = deepMergeExtend(obj, extendProp);
|
|
16422
|
-
} else if (elementProp === void 0 && (0,
|
|
16405
|
+
} else if (elementProp === void 0 && (0, import_utils25.isFunction)(extendProp)) {
|
|
16423
16406
|
element[e] = extendProp;
|
|
16424
16407
|
}
|
|
16425
16408
|
}
|
|
@@ -16427,13 +16410,13 @@ var require_extendUtils = __commonJS({
|
|
|
16427
16410
|
};
|
|
16428
16411
|
var cloneAndMergeArrayExtend = (stack) => {
|
|
16429
16412
|
return stack.reduce((a, c) => {
|
|
16430
|
-
return deepMergeExtend(a, (0,
|
|
16413
|
+
return deepMergeExtend(a, (0, import_utils25.deepClone)(c));
|
|
16431
16414
|
}, {});
|
|
16432
16415
|
};
|
|
16433
16416
|
var fallbackStringExtend = (extend, context, options = {}) => {
|
|
16434
16417
|
const COMPONENTS = context && context.components || options.components;
|
|
16435
16418
|
const PAGES = context && context.pages || options.pages;
|
|
16436
|
-
if ((0,
|
|
16419
|
+
if ((0, import_utils25.isString)(extend)) {
|
|
16437
16420
|
const componentExists = COMPONENTS && (COMPONENTS[extend] || COMPONENTS["smbls." + extend]);
|
|
16438
16421
|
const pageExists = PAGES && extend.startsWith("/") && PAGES[extend];
|
|
16439
16422
|
if (componentExists)
|
|
@@ -16493,30 +16476,30 @@ var require_extend = __commonJS({
|
|
|
16493
16476
|
applyExtend: () => applyExtend
|
|
16494
16477
|
});
|
|
16495
16478
|
module2.exports = __toCommonJS2(extend_exports);
|
|
16496
|
-
var
|
|
16497
|
-
var
|
|
16479
|
+
var import_utils25 = require_cjs();
|
|
16480
|
+
var import_utils26 = require_utils();
|
|
16498
16481
|
var ENV3 = "development";
|
|
16499
16482
|
var mainExtend;
|
|
16500
16483
|
var applyExtend = (element, parent, options = {}) => {
|
|
16501
|
-
if ((0,
|
|
16502
|
-
element = (0,
|
|
16484
|
+
if ((0, import_utils25.isFunction)(element))
|
|
16485
|
+
element = (0, import_utils25.exec)(element, parent);
|
|
16503
16486
|
const { props: props4, __ref } = element;
|
|
16504
16487
|
let extend = (props4 == null ? void 0 : props4.extends) || element.extends || element.extend;
|
|
16505
16488
|
const context = element.context || parent.context;
|
|
16506
|
-
extend = (0,
|
|
16507
|
-
const extendStack = (0,
|
|
16489
|
+
extend = (0, import_utils26.fallbackStringExtend)(extend, context, options);
|
|
16490
|
+
const extendStack = (0, import_utils26.getExtendStack)(extend, context);
|
|
16508
16491
|
if (ENV3 !== "test" || ENV3 !== "development")
|
|
16509
16492
|
delete element.extend;
|
|
16510
16493
|
let childExtendStack = [];
|
|
16511
16494
|
if (parent) {
|
|
16512
16495
|
element.parent = parent;
|
|
16513
16496
|
if (!options.ignoreChildExtend && !(props4 && props4.ignoreChildExtend)) {
|
|
16514
|
-
childExtendStack = (0,
|
|
16497
|
+
childExtendStack = (0, import_utils26.getExtendStack)(parent.childExtend, context);
|
|
16515
16498
|
const ignoreChildExtendRecursive = props4 && props4.ignoreChildExtendRecursive;
|
|
16516
16499
|
if (parent.childExtendRecursive && !ignoreChildExtendRecursive) {
|
|
16517
16500
|
const canExtendRecursive = element.key !== "__text";
|
|
16518
16501
|
if (canExtendRecursive) {
|
|
16519
|
-
const childExtendRecursiveStack = (0,
|
|
16502
|
+
const childExtendRecursiveStack = (0, import_utils26.getExtendStack)(parent.childExtendRecursive, context);
|
|
16520
16503
|
childExtendStack = childExtendStack.concat(childExtendRecursiveStack);
|
|
16521
16504
|
element.childExtendRecursive = parent.childExtendRecursive;
|
|
16522
16505
|
}
|
|
@@ -16527,7 +16510,7 @@ var require_extend = __commonJS({
|
|
|
16527
16510
|
const childExtendLength = childExtendStack.length;
|
|
16528
16511
|
let stack = [];
|
|
16529
16512
|
if (extendLength && childExtendLength) {
|
|
16530
|
-
stack = (0,
|
|
16513
|
+
stack = (0, import_utils26.jointStacks)(extendStack, childExtendStack);
|
|
16531
16514
|
} else if (extendLength) {
|
|
16532
16515
|
stack = extendStack;
|
|
16533
16516
|
} else if (childExtendLength) {
|
|
@@ -16536,22 +16519,22 @@ var require_extend = __commonJS({
|
|
|
16536
16519
|
return element;
|
|
16537
16520
|
if (context.defaultExtends) {
|
|
16538
16521
|
if (!mainExtend) {
|
|
16539
|
-
const defaultOptionsExtend = (0,
|
|
16540
|
-
mainExtend = (0,
|
|
16522
|
+
const defaultOptionsExtend = (0, import_utils26.getExtendStack)(context.defaultExtends, context);
|
|
16523
|
+
mainExtend = (0, import_utils26.cloneAndMergeArrayExtend)(defaultOptionsExtend);
|
|
16541
16524
|
delete mainExtend.extend;
|
|
16542
16525
|
}
|
|
16543
16526
|
stack = [].concat(stack, mainExtend);
|
|
16544
16527
|
}
|
|
16545
16528
|
if (__ref)
|
|
16546
16529
|
__ref.__extend = stack;
|
|
16547
|
-
let mergedExtend = (0,
|
|
16530
|
+
let mergedExtend = (0, import_utils26.cloneAndMergeArrayExtend)(stack);
|
|
16548
16531
|
const COMPONENTS = context && context.components || options.components;
|
|
16549
|
-
const component = (0,
|
|
16532
|
+
const component = (0, import_utils25.exec)(element.component || mergedExtend.component, element);
|
|
16550
16533
|
if (component && COMPONENTS && COMPONENTS[component]) {
|
|
16551
|
-
const componentExtend = (0,
|
|
16552
|
-
mergedExtend = (0,
|
|
16534
|
+
const componentExtend = (0, import_utils26.cloneAndMergeArrayExtend)((0, import_utils26.getExtendStack)(COMPONENTS[component]));
|
|
16535
|
+
mergedExtend = (0, import_utils26.deepMergeExtend)(componentExtend, mergedExtend);
|
|
16553
16536
|
}
|
|
16554
|
-
const merged = (0,
|
|
16537
|
+
const merged = (0, import_utils26.deepMergeExtend)(element, mergedExtend);
|
|
16555
16538
|
return merged;
|
|
16556
16539
|
};
|
|
16557
16540
|
}
|
|
@@ -16585,7 +16568,7 @@ var require_component2 = __commonJS({
|
|
|
16585
16568
|
overwriteVariant: () => overwriteVariant
|
|
16586
16569
|
});
|
|
16587
16570
|
module2.exports = __toCommonJS2(component_exports);
|
|
16588
|
-
var
|
|
16571
|
+
var import_utils25 = require_cjs();
|
|
16589
16572
|
var import_extend = require_extend();
|
|
16590
16573
|
var import_mixins = require_mixins();
|
|
16591
16574
|
var replaceOnKeys = (key) => key.replace(/on\w+/g, (match2) => match2.substring(2));
|
|
@@ -16606,7 +16589,7 @@ var require_component2 = __commonJS({
|
|
|
16606
16589
|
if (isDefine) {
|
|
16607
16590
|
newElem.define[k] = prop;
|
|
16608
16591
|
}
|
|
16609
|
-
const isComponent = (0,
|
|
16592
|
+
const isComponent = (0, import_utils25.checkIfKeyIsComponent)(k);
|
|
16610
16593
|
const isRegistry = import_mixins.REGISTRY[k];
|
|
16611
16594
|
if (isComponent || isRegistry) {
|
|
16612
16595
|
newElem[k] = prop;
|
|
@@ -16620,25 +16603,25 @@ var require_component2 = __commonJS({
|
|
|
16620
16603
|
let variantElement = element[variant];
|
|
16621
16604
|
if (!variantElement)
|
|
16622
16605
|
return;
|
|
16623
|
-
const props4 = (0,
|
|
16624
|
-
if ((0,
|
|
16606
|
+
const props4 = (0, import_utils25.isObject)(variantProps) ? variantProps : {};
|
|
16607
|
+
if ((0, import_utils25.isString)(variantElement)) {
|
|
16625
16608
|
variantElement = {
|
|
16626
16609
|
extend: [{ props: props4 }, variantElement]
|
|
16627
16610
|
};
|
|
16628
16611
|
} else if (variantElement.extend) {
|
|
16629
|
-
variantElement = (0,
|
|
16612
|
+
variantElement = (0, import_utils25.addAdditionalExtend)({ props: props4 }, variantElement);
|
|
16630
16613
|
}
|
|
16631
16614
|
const extendedVariant = (0, import_extend.applyExtend)(variantElement, element.parent);
|
|
16632
16615
|
const { parent, ...rest } = extendedVariant;
|
|
16633
|
-
return (0,
|
|
16616
|
+
return (0, import_utils25.overwriteDeep)(element, rest);
|
|
16634
16617
|
};
|
|
16635
16618
|
var applyVariant = (element) => {
|
|
16636
16619
|
const { props: props4 } = element;
|
|
16637
|
-
if (!(0,
|
|
16620
|
+
if (!(0, import_utils25.hasVariantProp)(element))
|
|
16638
16621
|
return element;
|
|
16639
16622
|
const { variant } = props4;
|
|
16640
16623
|
overwriteVariant(element, `.${variant}`);
|
|
16641
|
-
const elKeys = Object.keys(element).filter((key) => (0,
|
|
16624
|
+
const elKeys = Object.keys(element).filter((key) => (0, import_utils25.isVariant)(key));
|
|
16642
16625
|
elKeys.forEach((variant2) => {
|
|
16643
16626
|
const slicedVariantElementKey = variant2.slice(1);
|
|
16644
16627
|
const variantElementProps = props4[slicedVariantElementKey];
|
|
@@ -16703,20 +16686,20 @@ var require_attr = __commonJS({
|
|
|
16703
16686
|
default: () => attr_default
|
|
16704
16687
|
});
|
|
16705
16688
|
module2.exports = __toCommonJS2(attr_exports);
|
|
16706
|
-
var
|
|
16689
|
+
var import_utils25 = require_cjs();
|
|
16707
16690
|
var import_report = require_cjs4();
|
|
16708
|
-
var
|
|
16691
|
+
var import_utils26 = require_utils();
|
|
16709
16692
|
function attr(params, element, node2) {
|
|
16710
16693
|
const { __ref: ref, props: props4 } = element;
|
|
16711
16694
|
const { __attr } = ref;
|
|
16712
|
-
if ((0,
|
|
16695
|
+
if ((0, import_utils25.isNot)("object"))
|
|
16713
16696
|
(0, import_report.report)("HTMLInvalidAttr", params);
|
|
16714
16697
|
if (params) {
|
|
16715
16698
|
if (props4.attr)
|
|
16716
|
-
(0,
|
|
16699
|
+
(0, import_utils26.deepMerge)(params, props4.attr);
|
|
16717
16700
|
for (const attr2 in params) {
|
|
16718
|
-
const val = (0,
|
|
16719
|
-
if (val !== false && !(0,
|
|
16701
|
+
const val = (0, import_utils25.exec)(params[attr2], element);
|
|
16702
|
+
if (val !== false && !(0, import_utils25.isUndefined)(val) && !(0, import_utils25.isNull)(val) && node2.setAttribute)
|
|
16720
16703
|
node2.setAttribute(attr2, val);
|
|
16721
16704
|
else if (node2.removeAttribute)
|
|
16722
16705
|
node2.removeAttribute(attr2);
|
|
@@ -16759,7 +16742,7 @@ var require_classList = __commonJS({
|
|
|
16759
16742
|
default: () => classList_default
|
|
16760
16743
|
});
|
|
16761
16744
|
module2.exports = __toCommonJS2(classList_exports);
|
|
16762
|
-
var
|
|
16745
|
+
var import_utils25 = require_cjs();
|
|
16763
16746
|
var assignKeyAsClassname = (element) => {
|
|
16764
16747
|
const { key } = element;
|
|
16765
16748
|
if (element.class === true)
|
|
@@ -16777,7 +16760,7 @@ var require_classList = __commonJS({
|
|
|
16777
16760
|
else if (typeof param === "string")
|
|
16778
16761
|
className += ` ${param}`;
|
|
16779
16762
|
else if (typeof param === "function") {
|
|
16780
|
-
className += ` ${(0,
|
|
16763
|
+
className += ` ${(0, import_utils25.exec)(param, element)}`;
|
|
16781
16764
|
}
|
|
16782
16765
|
}
|
|
16783
16766
|
return className;
|
|
@@ -16788,9 +16771,9 @@ var require_classList = __commonJS({
|
|
|
16788
16771
|
const { key } = element;
|
|
16789
16772
|
if (params === true)
|
|
16790
16773
|
params = element.class = { key };
|
|
16791
|
-
if ((0,
|
|
16774
|
+
if ((0, import_utils25.isString)(params))
|
|
16792
16775
|
params = element.class = { default: params };
|
|
16793
|
-
if ((0,
|
|
16776
|
+
if ((0, import_utils25.isObject)(params))
|
|
16794
16777
|
params = classify2(params, element);
|
|
16795
16778
|
const className = params.replace(/\s+/g, " ").trim();
|
|
16796
16779
|
if (element.ref)
|
|
@@ -16870,7 +16853,7 @@ var require_set = __commonJS({
|
|
|
16870
16853
|
set: () => set3
|
|
16871
16854
|
});
|
|
16872
16855
|
module2.exports = __toCommonJS2(set_exports);
|
|
16873
|
-
var
|
|
16856
|
+
var import_utils25 = require_cjs();
|
|
16874
16857
|
var import_options3 = require_options();
|
|
16875
16858
|
var import_create = require_create4();
|
|
16876
16859
|
var import_mixins = require_mixins();
|
|
@@ -16900,13 +16883,13 @@ var require_set = __commonJS({
|
|
|
16900
16883
|
var _a;
|
|
16901
16884
|
const element = el || this;
|
|
16902
16885
|
const { __ref: ref } = element;
|
|
16903
|
-
const content = (0,
|
|
16886
|
+
const content = (0, import_utils25.setContentKey)(element, options);
|
|
16904
16887
|
const __contentRef = content && content.__ref;
|
|
16905
16888
|
const lazyLoad = element.props && element.props.lazyLoad;
|
|
16906
16889
|
const hasCollection = element.$collection || element.$stateCollection || element.$propsCollection;
|
|
16907
16890
|
if (options.preventContentUpdate === true && !hasCollection)
|
|
16908
16891
|
return;
|
|
16909
|
-
if (ref.__noCollectionDifference || __contentRef && __contentRef.__cached && (0,
|
|
16892
|
+
if (ref.__noCollectionDifference || __contentRef && __contentRef.__cached && (0, import_utils25.deepContains)(params, content)) {
|
|
16910
16893
|
if (!options.preventBeforeUpdateListener && !options.preventListeners) {
|
|
16911
16894
|
const beforeUpdateReturns = (0, import_event.triggerEventOnUpdate)("beforeUpdate", params, element, options);
|
|
16912
16895
|
if (beforeUpdateReturns === false)
|
|
@@ -16967,7 +16950,7 @@ var require_content = __commonJS({
|
|
|
16967
16950
|
updateContent: () => updateContent
|
|
16968
16951
|
});
|
|
16969
16952
|
module2.exports = __toCommonJS2(content_exports);
|
|
16970
|
-
var
|
|
16953
|
+
var import_utils25 = require_cjs();
|
|
16971
16954
|
var import_set = require_set();
|
|
16972
16955
|
var updateContent = function(params, options) {
|
|
16973
16956
|
const element = this;
|
|
@@ -16981,7 +16964,7 @@ var require_content = __commonJS({
|
|
|
16981
16964
|
var removeContent = function(el, opts = {}) {
|
|
16982
16965
|
const element = el || this;
|
|
16983
16966
|
const { __ref: ref } = element;
|
|
16984
|
-
const contentElementKey = (0,
|
|
16967
|
+
const contentElementKey = (0, import_utils25.setContentKey)(element, opts);
|
|
16985
16968
|
if (opts.contentElementKey !== "content")
|
|
16986
16969
|
opts.contentElementKey = "content";
|
|
16987
16970
|
if (element[contentElementKey]) {
|
|
@@ -16998,14 +16981,14 @@ var require_content = __commonJS({
|
|
|
16998
16981
|
if (__cached && __cached[contentElementKey]) {
|
|
16999
16982
|
if (__cached[contentElementKey].tag === "fragment")
|
|
17000
16983
|
__cached[contentElementKey].parent.node.innerHTML = "";
|
|
17001
|
-
else if (__cached[contentElementKey] && (0,
|
|
16984
|
+
else if (__cached[contentElementKey] && (0, import_utils25.isFunction)(__cached[contentElementKey].remove))
|
|
17002
16985
|
__cached[contentElementKey].remove();
|
|
17003
16986
|
}
|
|
17004
16987
|
delete element[contentElementKey];
|
|
17005
16988
|
}
|
|
17006
16989
|
};
|
|
17007
16990
|
function setContent(param, element, node2, opts) {
|
|
17008
|
-
const contentElementKey = (0,
|
|
16991
|
+
const contentElementKey = (0, import_utils25.setContentKey)(element, opts);
|
|
17009
16992
|
if (param && element) {
|
|
17010
16993
|
if (element[contentElementKey].update) {
|
|
17011
16994
|
element[contentElementKey].update({}, opts);
|
|
@@ -17045,18 +17028,18 @@ var require_data = __commonJS({
|
|
|
17045
17028
|
default: () => data_default
|
|
17046
17029
|
});
|
|
17047
17030
|
module2.exports = __toCommonJS2(data_exports);
|
|
17048
|
-
var
|
|
17031
|
+
var import_utils25 = require_cjs();
|
|
17049
17032
|
var import_report = require_cjs4();
|
|
17050
17033
|
function data(params, element, node2) {
|
|
17051
17034
|
if (params) {
|
|
17052
17035
|
if (element.props.data)
|
|
17053
|
-
(0,
|
|
17036
|
+
(0, import_utils25.deepMerge)(params, element.props.data);
|
|
17054
17037
|
if (params.showOnNode) {
|
|
17055
|
-
if (!(0,
|
|
17038
|
+
if (!(0, import_utils25.isObject)(params))
|
|
17056
17039
|
(0, import_report.report)("HTMLInvalidData", params);
|
|
17057
17040
|
for (const dataset in params) {
|
|
17058
17041
|
if (dataset !== "showOnNode") {
|
|
17059
|
-
node2.dataset[dataset] = (0,
|
|
17042
|
+
node2.dataset[dataset] = (0, import_utils25.exec)(params[dataset], element);
|
|
17060
17043
|
}
|
|
17061
17044
|
}
|
|
17062
17045
|
}
|
|
@@ -17093,10 +17076,10 @@ var require_html = __commonJS({
|
|
|
17093
17076
|
html: () => html
|
|
17094
17077
|
});
|
|
17095
17078
|
module2.exports = __toCommonJS2(html_exports);
|
|
17096
|
-
var
|
|
17079
|
+
var import_utils25 = require_cjs();
|
|
17097
17080
|
function html(param, element, node2) {
|
|
17098
17081
|
var _a;
|
|
17099
|
-
const prop = (0,
|
|
17082
|
+
const prop = (0, import_utils25.exec)(param, element) || (0, import_utils25.exec)((_a = element == null ? void 0 : element.props) == null ? void 0 : _a.html, element);
|
|
17100
17083
|
const { __ref } = element;
|
|
17101
17084
|
if (prop !== __ref.__html) {
|
|
17102
17085
|
if (node2.nodeName === "SVG")
|
|
@@ -17137,12 +17120,12 @@ var require_style = __commonJS({
|
|
|
17137
17120
|
style: () => style2
|
|
17138
17121
|
});
|
|
17139
17122
|
module2.exports = __toCommonJS2(style_exports);
|
|
17140
|
-
var
|
|
17123
|
+
var import_utils25 = require_cjs();
|
|
17141
17124
|
var import_report = require_cjs4();
|
|
17142
17125
|
function style2(params, element, node2) {
|
|
17143
17126
|
if (params) {
|
|
17144
|
-
if ((0,
|
|
17145
|
-
(0,
|
|
17127
|
+
if ((0, import_utils25.isObject)(params))
|
|
17128
|
+
(0, import_utils25.map)(node2.style, params, element);
|
|
17146
17129
|
else
|
|
17147
17130
|
(0, import_report.report)("HTMLInvalidStyles", params);
|
|
17148
17131
|
}
|
|
@@ -17179,11 +17162,11 @@ var require_text = __commonJS({
|
|
|
17179
17162
|
});
|
|
17180
17163
|
module2.exports = __toCommonJS2(text_exports);
|
|
17181
17164
|
var import_create = require_create4();
|
|
17182
|
-
var
|
|
17165
|
+
var import_utils25 = require_cjs();
|
|
17183
17166
|
function text(param, element, node2) {
|
|
17184
|
-
let prop = (0,
|
|
17185
|
-
if ((0,
|
|
17186
|
-
prop = (0,
|
|
17167
|
+
let prop = (0, import_utils25.exec)(param, element);
|
|
17168
|
+
if ((0, import_utils25.isString)(prop) && prop.includes("{{")) {
|
|
17169
|
+
prop = (0, import_utils25.replaceLiteralsWithObjectFields)(prop, element.state);
|
|
17187
17170
|
}
|
|
17188
17171
|
if (element.tag === "string") {
|
|
17189
17172
|
node2.nodeValue = prop;
|
|
@@ -17230,10 +17213,10 @@ var require_state = __commonJS({
|
|
|
17230
17213
|
});
|
|
17231
17214
|
module2.exports = __toCommonJS2(state_exports);
|
|
17232
17215
|
var import_state2 = require_cjs7();
|
|
17233
|
-
var
|
|
17216
|
+
var import_utils25 = require_cjs();
|
|
17234
17217
|
function state(params, element, node2) {
|
|
17235
|
-
const state2 = (0,
|
|
17236
|
-
if ((0,
|
|
17218
|
+
const state2 = (0, import_utils25.exec)(params, element);
|
|
17219
|
+
if ((0, import_utils25.isObject)(state2)) {
|
|
17237
17220
|
for (const param in state2) {
|
|
17238
17221
|
if (import_state2.IGNORE_STATE_PARAMS.includes(param))
|
|
17239
17222
|
continue;
|
|
@@ -17274,13 +17257,13 @@ var require_scope = __commonJS({
|
|
|
17274
17257
|
scope: () => scope
|
|
17275
17258
|
});
|
|
17276
17259
|
module2.exports = __toCommonJS2(scope_exports);
|
|
17277
|
-
var
|
|
17260
|
+
var import_utils25 = require_cjs();
|
|
17278
17261
|
function scope(params, element, node2) {
|
|
17279
|
-
if (!(0,
|
|
17262
|
+
if (!(0, import_utils25.isObject)(params))
|
|
17280
17263
|
return;
|
|
17281
17264
|
for (const scopeItem in params) {
|
|
17282
17265
|
const value2 = params[scopeItem];
|
|
17283
|
-
if ((0,
|
|
17266
|
+
if ((0, import_utils25.isFunction)(value2)) {
|
|
17284
17267
|
element.scope[scopeItem] = value2.bind(element);
|
|
17285
17268
|
} else {
|
|
17286
17269
|
element.scope[scopeItem] = value2;
|
|
@@ -17509,7 +17492,7 @@ var require_methods2 = __commonJS({
|
|
|
17509
17492
|
warn: () => warn
|
|
17510
17493
|
});
|
|
17511
17494
|
module2.exports = __toCommonJS2(methods_exports);
|
|
17512
|
-
var
|
|
17495
|
+
var import_utils25 = require_cjs();
|
|
17513
17496
|
var import_tree = require_tree();
|
|
17514
17497
|
var import_mixins = require_mixins();
|
|
17515
17498
|
var ENV3 = "development";
|
|
@@ -17532,7 +17515,7 @@ var require_methods2 = __commonJS({
|
|
|
17532
17515
|
function lookup3(param) {
|
|
17533
17516
|
const el = this;
|
|
17534
17517
|
let { parent } = el;
|
|
17535
|
-
if ((0,
|
|
17518
|
+
if ((0, import_utils25.isFunction)(param)) {
|
|
17536
17519
|
if (parent.state && param(parent, parent.state, parent.context))
|
|
17537
17520
|
return parent;
|
|
17538
17521
|
else if (parent.parent)
|
|
@@ -17561,7 +17544,7 @@ var require_methods2 = __commonJS({
|
|
|
17561
17544
|
const childElem = el[v];
|
|
17562
17545
|
if (v === param)
|
|
17563
17546
|
return childElem;
|
|
17564
|
-
else if ((0,
|
|
17547
|
+
else if ((0, import_utils25.isFunction)(param)) {
|
|
17565
17548
|
const exec6 = param(childElem, childElem.state, childElem.context);
|
|
17566
17549
|
if (childElem.state && exec6) {
|
|
17567
17550
|
return childElem;
|
|
@@ -17582,7 +17565,7 @@ var require_methods2 = __commonJS({
|
|
|
17582
17565
|
const childElem = el[v];
|
|
17583
17566
|
if (v === param)
|
|
17584
17567
|
results.push(childElem);
|
|
17585
|
-
else if ((0,
|
|
17568
|
+
else if ((0, import_utils25.isFunction)(param)) {
|
|
17586
17569
|
const exec6 = param(childElem, childElem.state, childElem.context);
|
|
17587
17570
|
if (childElem.state && exec6)
|
|
17588
17571
|
results.push(childElem);
|
|
@@ -17599,7 +17582,7 @@ var require_methods2 = __commonJS({
|
|
|
17599
17582
|
for (const param in params) {
|
|
17600
17583
|
const value2 = params[param];
|
|
17601
17584
|
const childElem = el[param];
|
|
17602
|
-
if ((0,
|
|
17585
|
+
if ((0, import_utils25.isObject)(value2) && childElem)
|
|
17603
17586
|
setNodeStyles.call(childElem, value2);
|
|
17604
17587
|
else
|
|
17605
17588
|
el.node.style[param] = value2;
|
|
@@ -17608,15 +17591,15 @@ var require_methods2 = __commonJS({
|
|
|
17608
17591
|
}
|
|
17609
17592
|
function remove() {
|
|
17610
17593
|
const element = this;
|
|
17611
|
-
if ((0,
|
|
17594
|
+
if ((0, import_utils25.isFunction)(element.node.remove))
|
|
17612
17595
|
element.node.remove();
|
|
17613
|
-
else if (!(0,
|
|
17596
|
+
else if (!(0, import_utils25.isProduction)()) {
|
|
17614
17597
|
console.warn("This item cant be removed");
|
|
17615
17598
|
element.log();
|
|
17616
17599
|
}
|
|
17617
17600
|
delete element.parent[element.key];
|
|
17618
17601
|
if (element.parent.__ref)
|
|
17619
|
-
element.parent.__ref.__children = (0,
|
|
17602
|
+
element.parent.__ref.__children = (0, import_utils25.removeValueFromArray)(element.parent.__ref.__children, element.key);
|
|
17620
17603
|
}
|
|
17621
17604
|
function get(param) {
|
|
17622
17605
|
const element = this;
|
|
@@ -17658,8 +17641,8 @@ var require_methods2 = __commonJS({
|
|
|
17658
17641
|
if (v === "state") {
|
|
17659
17642
|
if (element.__ref && !element.__ref.__hasRootState)
|
|
17660
17643
|
return;
|
|
17661
|
-
const parsedVal = (0,
|
|
17662
|
-
obj[v] = (0,
|
|
17644
|
+
const parsedVal = (0, import_utils25.isFunction)(val && val.parse) ? val.parse() : val;
|
|
17645
|
+
obj[v] = (0, import_utils25.isFunction)(parsedVal) ? parsedVal : JSON.parse(JSON.stringify(parsedVal || {}));
|
|
17663
17646
|
} else if (v === "scope") {
|
|
17664
17647
|
if (element.__ref && !element.__ref.__hasRootScope)
|
|
17665
17648
|
return;
|
|
@@ -17667,7 +17650,7 @@ var require_methods2 = __commonJS({
|
|
|
17667
17650
|
} else if (v === "props") {
|
|
17668
17651
|
const { __element, update, ...props4 } = element[v];
|
|
17669
17652
|
obj[v] = props4;
|
|
17670
|
-
} else if ((0,
|
|
17653
|
+
} else if ((0, import_utils25.isDefined)(val) && Object.hasOwnProperty.call(element, v))
|
|
17671
17654
|
obj[v] = val;
|
|
17672
17655
|
});
|
|
17673
17656
|
return obj;
|
|
@@ -17678,7 +17661,7 @@ var require_methods2 = __commonJS({
|
|
|
17678
17661
|
for (const v in obj) {
|
|
17679
17662
|
if (excl.includes(v))
|
|
17680
17663
|
return;
|
|
17681
|
-
if ((0,
|
|
17664
|
+
if ((0, import_utils25.isObjectLike)(obj[v])) {
|
|
17682
17665
|
obj[v] = parseDeep.call(obj[v], excl);
|
|
17683
17666
|
}
|
|
17684
17667
|
}
|
|
@@ -17758,7 +17741,7 @@ var require_methods2 = __commonJS({
|
|
|
17758
17741
|
changed: (cb) => {
|
|
17759
17742
|
if (!changed)
|
|
17760
17743
|
return;
|
|
17761
|
-
const returns = cb(changes, (0,
|
|
17744
|
+
const returns = cb(changes, (0, import_utils25.deepClone)(varCaches));
|
|
17762
17745
|
for (const key in changes) {
|
|
17763
17746
|
varCaches[key] = changes[key];
|
|
17764
17747
|
}
|
|
@@ -17838,8 +17821,8 @@ var require_iterate = __commonJS({
|
|
|
17838
17821
|
throughUpdatedExec: () => throughUpdatedExec
|
|
17839
17822
|
});
|
|
17840
17823
|
module2.exports = __toCommonJS2(iterate_exports);
|
|
17841
|
-
var
|
|
17842
|
-
var
|
|
17824
|
+
var import_utils25 = require_cjs();
|
|
17825
|
+
var import_utils26 = require_utils();
|
|
17843
17826
|
var import_methods = require_methods2();
|
|
17844
17827
|
var throughInitialExec = (element, exclude = {}) => {
|
|
17845
17828
|
const { __ref: ref } = element;
|
|
@@ -17847,13 +17830,13 @@ var require_iterate = __commonJS({
|
|
|
17847
17830
|
if (exclude[param])
|
|
17848
17831
|
continue;
|
|
17849
17832
|
const prop = element[param];
|
|
17850
|
-
if ((0,
|
|
17833
|
+
if ((0, import_utils25.isFunction)(prop) && !(0, import_methods.isMethod)(param, element) && !(0, import_utils25.isVariant)(param)) {
|
|
17851
17834
|
ref.__exec[param] = prop;
|
|
17852
17835
|
element[param] = prop(element, element.state, element.context);
|
|
17853
17836
|
}
|
|
17854
17837
|
}
|
|
17855
17838
|
};
|
|
17856
|
-
var throughUpdatedExec = (element, options = { excludes:
|
|
17839
|
+
var throughUpdatedExec = (element, options = { excludes: import_utils26.METHODS_EXL }) => {
|
|
17857
17840
|
const { __ref: ref } = element;
|
|
17858
17841
|
const changes = {};
|
|
17859
17842
|
for (const param in ref.__exec) {
|
|
@@ -17862,13 +17845,13 @@ var require_iterate = __commonJS({
|
|
|
17862
17845
|
if (isDefinedParam)
|
|
17863
17846
|
continue;
|
|
17864
17847
|
const newExec = ref.__exec[param](element, element.state, element.context);
|
|
17865
|
-
const execReturnsString = (0,
|
|
17848
|
+
const execReturnsString = (0, import_utils25.isString)(newExec) || (0, import_utils25.isNumber)(newExec);
|
|
17866
17849
|
if (prop && prop.node && execReturnsString) {
|
|
17867
|
-
(0,
|
|
17850
|
+
(0, import_utils26.overwrite)(prop, { text: newExec }, options);
|
|
17868
17851
|
} else if (newExec !== prop) {
|
|
17869
|
-
if ((0,
|
|
17870
|
-
const { extend, ...newElem } = (0,
|
|
17871
|
-
(0,
|
|
17852
|
+
if ((0, import_utils25.checkIfKeyIsComponent)(param)) {
|
|
17853
|
+
const { extend, ...newElem } = (0, import_utils25.extendizeByKey)(newExec, element, param);
|
|
17854
|
+
(0, import_utils26.overwrite)(prop, newElem, options);
|
|
17872
17855
|
} else {
|
|
17873
17856
|
ref.__cached[param] = changes[param] = prop;
|
|
17874
17857
|
element[param] = newExec;
|
|
@@ -17883,27 +17866,27 @@ var require_iterate = __commonJS({
|
|
|
17883
17866
|
for (const k in props4) {
|
|
17884
17867
|
const isDefine = k.startsWith("is") || k.startsWith("has") || k.startsWith("use");
|
|
17885
17868
|
const cachedExecProp = ref.__execProps[k];
|
|
17886
|
-
if ((0,
|
|
17887
|
-
props4[k] = (0,
|
|
17888
|
-
} else if (isDefine && (0,
|
|
17869
|
+
if ((0, import_utils25.isFunction)(cachedExecProp)) {
|
|
17870
|
+
props4[k] = (0, import_utils25.exec)(cachedExecProp, element);
|
|
17871
|
+
} else if (isDefine && (0, import_utils25.isFunction)(props4[k])) {
|
|
17889
17872
|
ref.__execProps[k] = props4[k];
|
|
17890
|
-
props4[k] = (0,
|
|
17873
|
+
props4[k] = (0, import_utils25.exec)(props4[k], element);
|
|
17891
17874
|
}
|
|
17892
17875
|
}
|
|
17893
17876
|
};
|
|
17894
17877
|
var throughInitialDefine = (element) => {
|
|
17895
17878
|
const { define, context, __ref: ref } = element;
|
|
17896
17879
|
let defineObj = {};
|
|
17897
|
-
const hasGlobalDefine = context && (0,
|
|
17898
|
-
if ((0,
|
|
17880
|
+
const hasGlobalDefine = context && (0, import_utils25.isObject)(context.define);
|
|
17881
|
+
if ((0, import_utils25.isObject)(define))
|
|
17899
17882
|
defineObj = { ...define };
|
|
17900
17883
|
if (hasGlobalDefine)
|
|
17901
17884
|
defineObj = { ...defineObj, ...context.define };
|
|
17902
17885
|
for (const param in defineObj) {
|
|
17903
17886
|
let elementProp = element[param];
|
|
17904
|
-
if ((0,
|
|
17887
|
+
if ((0, import_utils25.isFunction)(elementProp) && !(0, import_methods.isMethod)(param, element) && !(0, import_utils25.isVariant)(param)) {
|
|
17905
17888
|
ref.__exec[param] = elementProp;
|
|
17906
|
-
const execParam2 = elementProp = (0,
|
|
17889
|
+
const execParam2 = elementProp = (0, import_utils25.exec)(elementProp, element);
|
|
17907
17890
|
if (execParam2) {
|
|
17908
17891
|
elementProp = element[param] = execParam2.parse ? execParam2.parse() : execParam2;
|
|
17909
17892
|
ref.__defineCache[param] = elementProp;
|
|
@@ -17919,15 +17902,15 @@ var require_iterate = __commonJS({
|
|
|
17919
17902
|
const { context, define, __ref: ref } = element;
|
|
17920
17903
|
const changes = {};
|
|
17921
17904
|
let obj = {};
|
|
17922
|
-
if ((0,
|
|
17905
|
+
if ((0, import_utils25.isObject)(define))
|
|
17923
17906
|
obj = { ...define };
|
|
17924
|
-
if ((0,
|
|
17907
|
+
if ((0, import_utils25.isObject)(context && context.define))
|
|
17925
17908
|
obj = { ...obj, ...context.define };
|
|
17926
17909
|
for (const param in obj) {
|
|
17927
17910
|
const execParam = ref.__exec[param];
|
|
17928
17911
|
if (execParam)
|
|
17929
17912
|
ref.__defineCache[param] = execParam(element, element.state, element.context);
|
|
17930
|
-
const cached = (0,
|
|
17913
|
+
const cached = (0, import_utils25.exec)(ref.__defineCache[param], element);
|
|
17931
17914
|
const newExecParam = obj[param](cached, element, element.state, element.context);
|
|
17932
17915
|
if (newExecParam)
|
|
17933
17916
|
element[param] = newExecParam;
|
|
@@ -17963,7 +17946,7 @@ var require_applyParam = __commonJS({
|
|
|
17963
17946
|
applyParam: () => applyParam
|
|
17964
17947
|
});
|
|
17965
17948
|
module2.exports = __toCommonJS2(applyParam_exports);
|
|
17966
|
-
var
|
|
17949
|
+
var import_utils25 = require_cjs();
|
|
17967
17950
|
var import_mixins = require_mixins();
|
|
17968
17951
|
var applyParam = (param, element, options) => {
|
|
17969
17952
|
const { node: node2, context, __ref: ref } = element;
|
|
@@ -17978,7 +17961,7 @@ var require_applyParam = __commonJS({
|
|
|
17978
17961
|
return;
|
|
17979
17962
|
const hasOnlyUpdate = onlyUpdate ? onlyUpdate === param || element.lookup(onlyUpdate) : true;
|
|
17980
17963
|
if (isGlobalTransformer && !hasContextDefine && hasOnlyUpdate) {
|
|
17981
|
-
if ((0,
|
|
17964
|
+
if ((0, import_utils25.isFunction)(isGlobalTransformer)) {
|
|
17982
17965
|
isGlobalTransformer(prop, element, node2, options);
|
|
17983
17966
|
return;
|
|
17984
17967
|
}
|
|
@@ -18014,15 +17997,15 @@ var require_propEvents = __commonJS({
|
|
|
18014
17997
|
propagateEventsFromProps: () => propagateEventsFromProps
|
|
18015
17998
|
});
|
|
18016
17999
|
module2.exports = __toCommonJS2(propEvents_exports);
|
|
18017
|
-
var
|
|
18000
|
+
var import_utils25 = require_cjs();
|
|
18018
18001
|
var propagateEventsFromProps = (element) => {
|
|
18019
18002
|
const { props: props4, on: on2 } = element;
|
|
18020
18003
|
const eventKeysFromProps = Object.keys(props4).filter((key) => key.startsWith("on"));
|
|
18021
18004
|
eventKeysFromProps.forEach((v) => {
|
|
18022
|
-
const eventName = (0,
|
|
18005
|
+
const eventName = (0, import_utils25.lowercaseFirstLetter)(v.split("on")[1]);
|
|
18023
18006
|
const origEvent = on2[eventName];
|
|
18024
18007
|
const funcFromProps = props4[v];
|
|
18025
|
-
if ((0,
|
|
18008
|
+
if ((0, import_utils25.isFunction)(origEvent)) {
|
|
18026
18009
|
on2[eventName] = (...args) => {
|
|
18027
18010
|
const originalEventRetunrs = origEvent(...args);
|
|
18028
18011
|
if (originalEventRetunrs !== false)
|
|
@@ -18072,7 +18055,7 @@ var require_node2 = __commonJS({
|
|
|
18072
18055
|
default: () => node_default
|
|
18073
18056
|
});
|
|
18074
18057
|
module2.exports = __toCommonJS2(node_exports);
|
|
18075
|
-
var
|
|
18058
|
+
var import_utils25 = require_cjs();
|
|
18076
18059
|
var import_event = require_cjs5();
|
|
18077
18060
|
var import_render = require_cjs10();
|
|
18078
18061
|
var import_methods = require_methods2();
|
|
@@ -18097,7 +18080,7 @@ var require_node2 = __commonJS({
|
|
|
18097
18080
|
}
|
|
18098
18081
|
if (ENV3 === "test" || ENV3 === "development" || options.alowRefReference) {
|
|
18099
18082
|
node2.ref = element;
|
|
18100
|
-
if ((0,
|
|
18083
|
+
if ((0, import_utils25.isFunction)(node2.setAttribute))
|
|
18101
18084
|
node2.setAttribute("key", element.key);
|
|
18102
18085
|
}
|
|
18103
18086
|
(0, import_iterate.throughExecProps)(element);
|
|
@@ -18106,7 +18089,7 @@ var require_node2 = __commonJS({
|
|
|
18106
18089
|
if (element.tag !== "string" && element.tag !== "fragment") {
|
|
18107
18090
|
(0, import_propEvents.propagateEventsFromProps)(element);
|
|
18108
18091
|
(0, import_event.applyAnimationFrame)(element, options);
|
|
18109
|
-
if (isNewNode && (0,
|
|
18092
|
+
if (isNewNode && (0, import_utils25.isObject)(element.on)) {
|
|
18110
18093
|
(0, import_event.applyEventsOnNode)(element, options);
|
|
18111
18094
|
}
|
|
18112
18095
|
}
|
|
@@ -18114,14 +18097,14 @@ var require_node2 = __commonJS({
|
|
|
18114
18097
|
const value2 = element[param];
|
|
18115
18098
|
if (!Object.hasOwnProperty.call(element, param))
|
|
18116
18099
|
continue;
|
|
18117
|
-
if ((0,
|
|
18100
|
+
if ((0, import_utils25.isUndefined)(value2) || (0, import_methods.isMethod)(param, element) || (0, import_utils25.isVariant)(param) || (0, import_utils25.isObject)(import_mixins.REGISTRY[param]))
|
|
18118
18101
|
continue;
|
|
18119
18102
|
const isElement = (0, import_applyParam.applyParam)(param, element, options);
|
|
18120
18103
|
if (isElement) {
|
|
18121
18104
|
const { hasDefine, hasContextDefine } = isElement;
|
|
18122
18105
|
if (element[param] && !hasDefine && !hasContextDefine) {
|
|
18123
18106
|
const createAsync2 = () => {
|
|
18124
|
-
(0, import_create.default)((0,
|
|
18107
|
+
(0, import_create.default)((0, import_utils25.exec)(value2, element), element, param, options);
|
|
18125
18108
|
};
|
|
18126
18109
|
if (element.props && element.props.lazyLoad || options.lazyLoad) {
|
|
18127
18110
|
window.requestAnimationFrame(() => createAsync2());
|
|
@@ -18163,7 +18146,7 @@ var require_update2 = __commonJS({
|
|
|
18163
18146
|
update: () => update
|
|
18164
18147
|
});
|
|
18165
18148
|
module2.exports = __toCommonJS2(update_exports);
|
|
18166
|
-
var
|
|
18149
|
+
var import_utils25 = require_cjs();
|
|
18167
18150
|
var import_event = require_cjs5();
|
|
18168
18151
|
var import_methods = require_methods2();
|
|
18169
18152
|
var import_props = require_props();
|
|
@@ -18173,9 +18156,9 @@ var require_update2 = __commonJS({
|
|
|
18173
18156
|
var import_mixins = require_mixins();
|
|
18174
18157
|
var import_applyParam = require_applyParam();
|
|
18175
18158
|
var import_options3 = require_options();
|
|
18176
|
-
var
|
|
18159
|
+
var import_utils26 = require_utils();
|
|
18177
18160
|
var snapshot = {
|
|
18178
|
-
snapshotId:
|
|
18161
|
+
snapshotId: import_utils25.createSnapshotId
|
|
18179
18162
|
};
|
|
18180
18163
|
var UPDATE_DEFAULT_OPTIONS = {
|
|
18181
18164
|
stackChanges: false,
|
|
@@ -18183,11 +18166,11 @@ var require_update2 = __commonJS({
|
|
|
18183
18166
|
preventRecursive: false,
|
|
18184
18167
|
currentSnapshot: false,
|
|
18185
18168
|
calleeElement: false,
|
|
18186
|
-
excludes:
|
|
18169
|
+
excludes: import_utils26.METHODS_EXL
|
|
18187
18170
|
};
|
|
18188
18171
|
var update = function(params = {}, opts) {
|
|
18189
18172
|
const calleeElementCache = opts == null ? void 0 : opts.calleeElement;
|
|
18190
|
-
const options = (0,
|
|
18173
|
+
const options = (0, import_utils25.deepClone)((0, import_utils25.isObject)(opts) ? (0, import_utils26.deepMerge)(opts, UPDATE_DEFAULT_OPTIONS) : UPDATE_DEFAULT_OPTIONS, { exclude: ["calleeElement"] });
|
|
18191
18174
|
options.calleeElement = calleeElementCache;
|
|
18192
18175
|
const element = this;
|
|
18193
18176
|
const { parent, node: node2, key } = element;
|
|
@@ -18203,8 +18186,8 @@ var require_update2 = __commonJS({
|
|
|
18203
18186
|
if (preventInheritAtCurrentState && preventInheritAtCurrentState.__element === element)
|
|
18204
18187
|
return;
|
|
18205
18188
|
if (!excludes)
|
|
18206
|
-
(0,
|
|
18207
|
-
if ((0,
|
|
18189
|
+
(0, import_utils25.merge)(options, UPDATE_DEFAULT_OPTIONS);
|
|
18190
|
+
if ((0, import_utils25.isString)(params) || (0, import_utils25.isNumber)(params)) {
|
|
18208
18191
|
params = { text: params };
|
|
18209
18192
|
}
|
|
18210
18193
|
const inheritState = inheritStateUpdates(element, options);
|
|
@@ -18215,7 +18198,7 @@ var require_update2 = __commonJS({
|
|
|
18215
18198
|
return;
|
|
18216
18199
|
if (ref.__if && !options.preventPropsUpdate) {
|
|
18217
18200
|
const hasParentProps = parent.props && (parent.props[key] || parent.props.childProps);
|
|
18218
|
-
const hasFunctionInProps = ref.__props.filter((v) => (0,
|
|
18201
|
+
const hasFunctionInProps = ref.__props.filter((v) => (0, import_utils25.isFunction)(v));
|
|
18219
18202
|
const props4 = params.props || hasParentProps || hasFunctionInProps.length;
|
|
18220
18203
|
if (props4)
|
|
18221
18204
|
(0, import_props.updateProps)(props4, element, parent);
|
|
@@ -18225,7 +18208,7 @@ var require_update2 = __commonJS({
|
|
|
18225
18208
|
if (beforeUpdateReturns === false)
|
|
18226
18209
|
return element;
|
|
18227
18210
|
}
|
|
18228
|
-
(0,
|
|
18211
|
+
(0, import_utils25.overwriteDeep)(element, params, { exclude: import_utils26.METHODS_EXL });
|
|
18229
18212
|
(0, import_iterate.throughExecProps)(element);
|
|
18230
18213
|
(0, import_iterate.throughUpdatedExec)(element, { ignore: UPDATE_DEFAULT_OPTIONS });
|
|
18231
18214
|
(0, import_iterate.throughUpdatedDefine)(element);
|
|
@@ -18248,7 +18231,7 @@ var require_update2 = __commonJS({
|
|
|
18248
18231
|
preventUpdateAfterCount
|
|
18249
18232
|
} = options;
|
|
18250
18233
|
if (preventUpdateAfter) {
|
|
18251
|
-
if ((0,
|
|
18234
|
+
if ((0, import_utils25.isNumber)(preventUpdateAfterCount) && preventUpdateAfter <= preventUpdateAfterCount)
|
|
18252
18235
|
return;
|
|
18253
18236
|
else if (options.preventUpdateAfterCount === void 0)
|
|
18254
18237
|
options.preventUpdateAfterCount = 1;
|
|
@@ -18262,17 +18245,17 @@ var require_update2 = __commonJS({
|
|
|
18262
18245
|
}
|
|
18263
18246
|
if (!Object.hasOwnProperty.call(element, param))
|
|
18264
18247
|
continue;
|
|
18265
|
-
const isInPreventUpdate = (0,
|
|
18266
|
-
const isInPreventDefineUpdate = (0,
|
|
18248
|
+
const isInPreventUpdate = (0, import_utils25.isArray)(preventUpdate) && preventUpdate.includes(param);
|
|
18249
|
+
const isInPreventDefineUpdate = (0, import_utils25.isArray)(preventDefineUpdate) && preventDefineUpdate.includes(param);
|
|
18267
18250
|
const hasCollection = element.$collection || element.$stateCollection || element.$propsCollection;
|
|
18268
|
-
if ((0,
|
|
18251
|
+
if ((0, import_utils25.isUndefined)(prop) || isInPreventUpdate || isInPreventDefineUpdate || preventDefineUpdate === true || preventDefineUpdate === param || preventContentUpdate && param === "content" && !hasCollection || (preventStateUpdate && param) === "state" || (0, import_methods.isMethod)(param, element) || (0, import_utils25.isObject)(import_mixins.REGISTRY[param]) || (0, import_utils25.isVariant)(param))
|
|
18269
18252
|
continue;
|
|
18270
18253
|
if (preventStateUpdate === "once")
|
|
18271
18254
|
options.preventStateUpdate = false;
|
|
18272
18255
|
const isElement = (0, import_applyParam.applyParam)(param, element, options);
|
|
18273
18256
|
if (isElement) {
|
|
18274
18257
|
const { hasDefine, hasContextDefine } = isElement;
|
|
18275
|
-
const canUpdate = (0,
|
|
18258
|
+
const canUpdate = (0, import_utils25.isObject)(prop) && !hasDefine && !hasContextDefine && !preventRecursive;
|
|
18276
18259
|
if (!canUpdate)
|
|
18277
18260
|
continue;
|
|
18278
18261
|
const lazyLoad = element.props.lazyLoad || options.lazyLoad;
|
|
@@ -18284,7 +18267,7 @@ var require_update2 = __commonJS({
|
|
|
18284
18267
|
currentSnapshot: snapshotOnCallee,
|
|
18285
18268
|
calleeElement
|
|
18286
18269
|
});
|
|
18287
|
-
lazyLoad ?
|
|
18270
|
+
lazyLoad ? import_utils25.window.requestAnimationFrame(() => childUpdateCall()) : childUpdateCall();
|
|
18288
18271
|
}
|
|
18289
18272
|
}
|
|
18290
18273
|
if (!preventUpdateListener)
|
|
@@ -18307,7 +18290,7 @@ var require_update2 = __commonJS({
|
|
|
18307
18290
|
};
|
|
18308
18291
|
var checkIfOnUpdate = (element, parent, options) => {
|
|
18309
18292
|
var _a, _b, _c;
|
|
18310
|
-
if (!(0,
|
|
18293
|
+
if (!(0, import_utils25.isFunction)(element.if) && !(0, import_utils25.isFunction)((_a = element.props) == null ? void 0 : _a.if) || !parent)
|
|
18311
18294
|
return;
|
|
18312
18295
|
const ref = element.__ref;
|
|
18313
18296
|
const ifPassed = (element.if || ((_b = element.props) == null ? void 0 : _b.if))(element, element.state, element.context, options);
|
|
@@ -18348,7 +18331,7 @@ var require_update2 = __commonJS({
|
|
|
18348
18331
|
delete element.__ref;
|
|
18349
18332
|
delete element.parent;
|
|
18350
18333
|
const createdElement = (0, import_create.create)(element, parent, element.key, import_options3.OPTIONS.create, attachOptions);
|
|
18351
|
-
if (options.preventUpdate !== true && element.on && (0,
|
|
18334
|
+
if (options.preventUpdate !== true && element.on && (0, import_utils25.isFunction)(element.on.update)) {
|
|
18352
18335
|
(0, import_event.applyEvent)(element.on.update, createdElement, createdElement.state);
|
|
18353
18336
|
}
|
|
18354
18337
|
return createdElement;
|
|
@@ -18369,9 +18352,9 @@ var require_update2 = __commonJS({
|
|
|
18369
18352
|
element.state = parent && parent.state || {};
|
|
18370
18353
|
return;
|
|
18371
18354
|
}
|
|
18372
|
-
const shouldForceFunctionState = (0,
|
|
18355
|
+
const shouldForceFunctionState = (0, import_utils25.isFunction)(stateKey) && !isHoisted && execStateFunction;
|
|
18373
18356
|
if (shouldForceFunctionState) {
|
|
18374
|
-
const execState = (0,
|
|
18357
|
+
const execState = (0, import_utils25.exec)(stateKey, element);
|
|
18375
18358
|
state.set(execState, { ...options, preventUpdate: true, preventStateUpdateListener: false, updatedByStateFunction: true });
|
|
18376
18359
|
return;
|
|
18377
18360
|
}
|
|
@@ -18429,7 +18412,7 @@ var require_set2 = __commonJS({
|
|
|
18429
18412
|
addMethods: () => addMethods
|
|
18430
18413
|
});
|
|
18431
18414
|
module2.exports = __toCommonJS2(set_exports);
|
|
18432
|
-
var
|
|
18415
|
+
var import_utils25 = require_cjs();
|
|
18433
18416
|
var import_set = require_set();
|
|
18434
18417
|
var import_update = require_update2();
|
|
18435
18418
|
var import__ = require_methods2();
|
|
@@ -18462,7 +18445,7 @@ var require_set2 = __commonJS({
|
|
|
18462
18445
|
error: import__.error
|
|
18463
18446
|
};
|
|
18464
18447
|
if (element.context.methods)
|
|
18465
|
-
(options.strict ?
|
|
18448
|
+
(options.strict ? import_utils25.merge : import_utils25.overwrite)(proto, element.context.methods);
|
|
18466
18449
|
Object.setPrototypeOf(element, proto);
|
|
18467
18450
|
};
|
|
18468
18451
|
}
|
|
@@ -18507,7 +18490,7 @@ var require_create4 = __commonJS({
|
|
|
18507
18490
|
module2.exports = __toCommonJS2(create_exports);
|
|
18508
18491
|
var import_node = __toESM2(require_node2(), 1);
|
|
18509
18492
|
var import_tree = require_tree();
|
|
18510
|
-
var
|
|
18493
|
+
var import_utils25 = require_cjs();
|
|
18511
18494
|
var import_event = require_cjs5();
|
|
18512
18495
|
var import_render = require_cjs10();
|
|
18513
18496
|
var import_state2 = require_cjs7();
|
|
@@ -18530,9 +18513,9 @@ var require_create4 = __commonJS({
|
|
|
18530
18513
|
parent = redefineParent(element, parent, key);
|
|
18531
18514
|
key = createKey(element, parent, key);
|
|
18532
18515
|
const ref = addRef(element, parent, key);
|
|
18533
|
-
ref.__initialProps = (0,
|
|
18516
|
+
ref.__initialProps = (0, import_utils25.deepClone)(element.props);
|
|
18534
18517
|
applyContext(element, parent, options);
|
|
18535
|
-
(0,
|
|
18518
|
+
(0, import_utils25.applyComponentFromContext)(element, parent, options);
|
|
18536
18519
|
if (!ref.__skipCreate) {
|
|
18537
18520
|
(0, import_extend.applyExtend)(element, parent, options);
|
|
18538
18521
|
}
|
|
@@ -18561,7 +18544,7 @@ var require_create4 = __commonJS({
|
|
|
18561
18544
|
return element;
|
|
18562
18545
|
(0, import_event.triggerEventOn)("beforeClassAssign", element, options);
|
|
18563
18546
|
(0, import_classList.assignKeyAsClassname)(element);
|
|
18564
|
-
(0,
|
|
18547
|
+
(0, import_utils25.addChildrenIfNotInOriginal)(element, parent, key);
|
|
18565
18548
|
renderElement(element, parent, options, attachOptions);
|
|
18566
18549
|
addElementIntoParentChildren(element, parent);
|
|
18567
18550
|
(0, import_event.triggerEventOn)("complete", element, options);
|
|
@@ -18574,7 +18557,7 @@ var require_create4 = __commonJS({
|
|
|
18574
18557
|
}
|
|
18575
18558
|
return {};
|
|
18576
18559
|
}
|
|
18577
|
-
if ((0,
|
|
18560
|
+
if ((0, import_utils25.isString)(key) && key.slice(0, 2 === "__")) {
|
|
18578
18561
|
if (ENV3 === "test" || ENV3 === "development") {
|
|
18579
18562
|
console.warn(key, "seems like to be in __ref");
|
|
18580
18563
|
}
|
|
@@ -18596,8 +18579,8 @@ var require_create4 = __commonJS({
|
|
|
18596
18579
|
else
|
|
18597
18580
|
element.syntaxv3 = true;
|
|
18598
18581
|
return (0, import_component.createValidDomqlObjectFromSugar)(element, parent, key, options);
|
|
18599
|
-
} else if ((0,
|
|
18600
|
-
return (0,
|
|
18582
|
+
} else if ((0, import_utils25.checkIfKeyIsComponent)(key)) {
|
|
18583
|
+
return (0, import_utils25.applyKeyComponentAsExtend)(elementWrapper, parent, key);
|
|
18601
18584
|
}
|
|
18602
18585
|
if (checkIfMedia(key)) {
|
|
18603
18586
|
return applyMediaProps2(elementWrapper, parent, key);
|
|
@@ -18607,7 +18590,7 @@ var require_create4 = __commonJS({
|
|
|
18607
18590
|
var redefineParent = (element, parent, key, options) => {
|
|
18608
18591
|
if (!parent)
|
|
18609
18592
|
return import_tree.ROOT;
|
|
18610
|
-
if ((0,
|
|
18593
|
+
if ((0, import_utils25.isNode)(parent)) {
|
|
18611
18594
|
const parentNodeWrapper = { key: ":root", node: parent };
|
|
18612
18595
|
import_tree.ROOT[`${key}_parent`] = parentNodeWrapper;
|
|
18613
18596
|
return parentNodeWrapper;
|
|
@@ -18621,7 +18604,7 @@ var require_create4 = __commonJS({
|
|
|
18621
18604
|
}
|
|
18622
18605
|
};
|
|
18623
18606
|
var createKey = (element, parent, key) => {
|
|
18624
|
-
return ((0,
|
|
18607
|
+
return ((0, import_utils25.exec)(key, element) || key || element.key || (0, import_utils25.generateKey)()).toString();
|
|
18625
18608
|
};
|
|
18626
18609
|
var addRef = (element, parent) => {
|
|
18627
18610
|
if (element.__ref)
|
|
@@ -18651,7 +18634,7 @@ var require_create4 = __commonJS({
|
|
|
18651
18634
|
visitedElements.set(element, true);
|
|
18652
18635
|
const { __ref: ref, key } = element;
|
|
18653
18636
|
try {
|
|
18654
|
-
const isInfiniteLoopDetected = (0,
|
|
18637
|
+
const isInfiniteLoopDetected = (0, import_utils25.detectInfiniteLoop)(ref.path);
|
|
18655
18638
|
if (ref.__uniqId || isInfiniteLoopDetected)
|
|
18656
18639
|
return;
|
|
18657
18640
|
(0, import_node.default)(element, options);
|
|
@@ -18683,12 +18666,12 @@ var require_create4 = __commonJS({
|
|
|
18683
18666
|
(0, import_event.triggerEventOn)("done", element, options);
|
|
18684
18667
|
(0, import_event.triggerEventOn)("create", element, options);
|
|
18685
18668
|
};
|
|
18686
|
-
var checkIfPrimitive = (element) => (0,
|
|
18669
|
+
var checkIfPrimitive = (element) => (0, import_utils25.is)(element)("string", "number");
|
|
18687
18670
|
var applyValueAsText = (element, parent, key) => {
|
|
18688
18671
|
const extendTag = element.extend && element.extend.tag;
|
|
18689
18672
|
const childExtendTag = parent.childExtend && parent.childExtend.tag;
|
|
18690
18673
|
const childPropsTag = parent.props.childProps && parent.props.childProps.tag;
|
|
18691
|
-
const isKeyValidHTMLTag =
|
|
18674
|
+
const isKeyValidHTMLTag = import_utils25.HTML_TAGS.body.indexOf(key) > -1 && key;
|
|
18692
18675
|
return {
|
|
18693
18676
|
text: element,
|
|
18694
18677
|
tag: extendTag || childExtendTag || childPropsTag || isKeyValidHTMLTag || "string"
|
|
@@ -18708,7 +18691,7 @@ var require_create4 = __commonJS({
|
|
|
18708
18691
|
};
|
|
18709
18692
|
var createIfConditionFlag = (element, parent) => {
|
|
18710
18693
|
const { __ref: ref } = element;
|
|
18711
|
-
if ((0,
|
|
18694
|
+
if ((0, import_utils25.isFunction)(element.if) && !element.if(element, element.state, element.context)) {
|
|
18712
18695
|
delete ref.__if;
|
|
18713
18696
|
} else
|
|
18714
18697
|
ref.__if = true;
|
|
@@ -18736,7 +18719,7 @@ var require_create4 = __commonJS({
|
|
|
18736
18719
|
ref.__changes = [];
|
|
18737
18720
|
if (!ref.__children)
|
|
18738
18721
|
ref.__children = [];
|
|
18739
|
-
if ((0,
|
|
18722
|
+
if ((0, import_utils25.checkIfKeyIsComponent)(key))
|
|
18740
18723
|
ref.__componentKey = key.split("_")[0].split(".")[0].split("+")[0];
|
|
18741
18724
|
const hasRoot = parent && parent.key === ":root";
|
|
18742
18725
|
if (!ref.root)
|
|
@@ -18772,7 +18755,7 @@ var require_create4 = __commonJS({
|
|
|
18772
18755
|
(0, import_iterate.throughInitialDefine)(element);
|
|
18773
18756
|
(0, import_iterate.throughInitialExec)(element);
|
|
18774
18757
|
for (const k in element) {
|
|
18775
|
-
if ((0,
|
|
18758
|
+
if ((0, import_utils25.isUndefined)(element[k]) || (0, import_methods.isMethod)(k, element) || (0, import_utils25.isObject)((import_mixins.registry.default || import_mixins.registry)[k]) || (0, import_utils25.isVariant)(k))
|
|
18776
18759
|
continue;
|
|
18777
18760
|
const hasDefine = element.define && element.define[k];
|
|
18778
18761
|
const contextHasDefine = element.context && element.context.define && element.context.define[k];
|
|
@@ -18780,7 +18763,7 @@ var require_create4 = __commonJS({
|
|
|
18780
18763
|
if (!ref.__skipCreate && import_mixins.REGISTRY[k] && !optionsHasDefine) {
|
|
18781
18764
|
continue;
|
|
18782
18765
|
} else if (element[k] && !hasDefine && !optionsHasDefine && !contextHasDefine) {
|
|
18783
|
-
create2((0,
|
|
18766
|
+
create2((0, import_utils25.exec)(element[k], element), element, k, options);
|
|
18784
18767
|
}
|
|
18785
18768
|
}
|
|
18786
18769
|
}
|
|
@@ -22781,10 +22764,10 @@ var require_Inspect = __commonJS({
|
|
|
22781
22764
|
});
|
|
22782
22765
|
module2.exports = __toCommonJS2(Inspect_exports);
|
|
22783
22766
|
var smblsUI = __toESM2((init_uikit(), __toCommonJS(uikit_exports)), 1);
|
|
22784
|
-
var
|
|
22767
|
+
var import_utils25 = require_cjs();
|
|
22785
22768
|
var import_client = (init_client(), __toCommonJS(client_exports));
|
|
22786
22769
|
function returnStringExtend(extend) {
|
|
22787
|
-
return (0,
|
|
22770
|
+
return (0, import_utils25.isString)(extend) ? extend : (0, import_utils25.isArray)(extend) ? extend.find((extItem) => (0, import_utils25.isString)(extItem)) : "";
|
|
22788
22771
|
}
|
|
22789
22772
|
function getComponentKey(el) {
|
|
22790
22773
|
if (!el)
|
|
@@ -22871,7 +22854,7 @@ var require_Inspect = __commonJS({
|
|
|
22871
22854
|
on: {
|
|
22872
22855
|
init: ({ context }) => {
|
|
22873
22856
|
const { components } = context;
|
|
22874
|
-
if ((0,
|
|
22857
|
+
if ((0, import_utils25.isObject)(components)) {
|
|
22875
22858
|
const { Content, ...rest } = components;
|
|
22876
22859
|
for (const key in rest) {
|
|
22877
22860
|
if (smblsUI[key])
|
|
@@ -23002,7 +22985,7 @@ var require_cjs13 = __commonJS({
|
|
|
23002
22985
|
var import_init3 = (init_init(), __toCommonJS(init_exports));
|
|
23003
22986
|
var import_client = (init_client(), __toCommonJS(client_exports));
|
|
23004
22987
|
var import_globals = require_cjs8();
|
|
23005
|
-
var
|
|
22988
|
+
var import_utils25 = require_cjs();
|
|
23006
22989
|
var import_Notifications = require_Notifications();
|
|
23007
22990
|
var import_Inspect = require_Inspect();
|
|
23008
22991
|
__reExport2(sync_exports, require_DefaultSyncApp(), module2.exports);
|
|
@@ -23026,16 +23009,16 @@ var require_cjs13 = __commonJS({
|
|
|
23026
23009
|
const { state, designSystem, pages, components, snippets, functions } = obj.DATA;
|
|
23027
23010
|
const { utils: utils2 } = ctx;
|
|
23028
23011
|
if (pages) {
|
|
23029
|
-
(0,
|
|
23012
|
+
(0, import_utils25.overwriteShallow)(ctx.pages, pages);
|
|
23030
23013
|
}
|
|
23031
23014
|
if (components) {
|
|
23032
|
-
(0,
|
|
23015
|
+
(0, import_utils25.overwriteShallow)(ctx.components, components);
|
|
23033
23016
|
}
|
|
23034
23017
|
if (functions) {
|
|
23035
|
-
(0,
|
|
23018
|
+
(0, import_utils25.overwriteShallow)(ctx.functions, functions);
|
|
23036
23019
|
}
|
|
23037
23020
|
if (snippets) {
|
|
23038
|
-
(0,
|
|
23021
|
+
(0, import_utils25.overwriteShallow)(ctx.snippets, snippets);
|
|
23039
23022
|
}
|
|
23040
23023
|
if (state) {
|
|
23041
23024
|
const route = state.route;
|
|
@@ -23344,7 +23327,7 @@ __export(src_exports, {
|
|
|
23344
23327
|
default: () => src_default
|
|
23345
23328
|
});
|
|
23346
23329
|
module.exports = __toCommonJS(src_exports);
|
|
23347
|
-
var
|
|
23330
|
+
var import_utils24 = __toESM(require_cjs(), 1);
|
|
23348
23331
|
|
|
23349
23332
|
// src/utilImports.js
|
|
23350
23333
|
var utilImports_exports = {};
|
|
@@ -23365,7 +23348,7 @@ __reExport(utilImports_exports, __toESM(require_cjs6(), 1));
|
|
|
23365
23348
|
|
|
23366
23349
|
// src/router.js
|
|
23367
23350
|
var import_router2 = __toESM(require_cjs6(), 1);
|
|
23368
|
-
var
|
|
23351
|
+
var import_utils16 = __toESM(require_cjs(), 1);
|
|
23369
23352
|
init_uikit();
|
|
23370
23353
|
var DEFAULT_ROUTING_OPTIONS = {
|
|
23371
23354
|
initRouter: true,
|
|
@@ -23378,16 +23361,16 @@ var initRouter = (element, context) => {
|
|
|
23378
23361
|
else if (context.router === true)
|
|
23379
23362
|
context.router = DEFAULT_ROUTING_OPTIONS;
|
|
23380
23363
|
else
|
|
23381
|
-
(0,
|
|
23364
|
+
(0, import_utils16.merge)(context.router || {}, DEFAULT_ROUTING_OPTIONS);
|
|
23382
23365
|
const routerOptions = context.router;
|
|
23383
23366
|
const router = context.utils && context.utils.router ? context.utils.router : import_router2.router;
|
|
23384
23367
|
const onRouterRenderDefault = (el, s) => {
|
|
23385
|
-
const { pathname, search, hash: hash2 } =
|
|
23368
|
+
const { pathname, search, hash: hash2 } = import_utils16.window.location;
|
|
23386
23369
|
const url2 = pathname + search + hash2;
|
|
23387
23370
|
if (el.routes)
|
|
23388
23371
|
router(url2, el, {}, { initialRender: true });
|
|
23389
23372
|
};
|
|
23390
|
-
const hasRenderRouter = element.on && !(0,
|
|
23373
|
+
const hasRenderRouter = element.on && !(0, import_utils16.isUndefined)(element.on.renderRouter);
|
|
23391
23374
|
if (routerOptions && routerOptions.initRouter && !hasRenderRouter) {
|
|
23392
23375
|
if (element.on) {
|
|
23393
23376
|
element.on.renderRouter = onRouterRenderDefault;
|
|
@@ -23409,20 +23392,20 @@ var popStateRouter = (element, context) => {
|
|
|
23409
23392
|
if (!routerOptions.popState)
|
|
23410
23393
|
return;
|
|
23411
23394
|
const router = context.utils && context.utils.router ? context.utils.router : import_router2.router;
|
|
23412
|
-
|
|
23413
|
-
const { pathname, search, hash: hash2 } =
|
|
23395
|
+
import_utils16.window.onpopstate = (e) => {
|
|
23396
|
+
const { pathname, search, hash: hash2 } = import_utils16.window.location;
|
|
23414
23397
|
const url2 = pathname + search + hash2;
|
|
23415
23398
|
router(url2, element, {}, { pushState: false, scrollToTop: false, level: 0 });
|
|
23416
23399
|
};
|
|
23417
23400
|
};
|
|
23418
23401
|
var injectRouterInLinkComponent = (routerOptions) => {
|
|
23419
23402
|
if (routerOptions && routerOptions.injectRouterInLinkComponent) {
|
|
23420
|
-
return (0,
|
|
23403
|
+
return (0, import_utils16.deepMerge)(Link, RouterLink);
|
|
23421
23404
|
}
|
|
23422
23405
|
};
|
|
23423
23406
|
|
|
23424
23407
|
// src/ferchOnCreate.js
|
|
23425
|
-
var
|
|
23408
|
+
var import_utils17 = __toESM(require_cjs(), 1);
|
|
23426
23409
|
var import_fetch = __toESM(require_cjs9(), 1);
|
|
23427
23410
|
var fetchSync = async (key, options) => {
|
|
23428
23411
|
if (key && options.editor) {
|
|
@@ -23439,10 +23422,10 @@ var fetchAsync = (app, key, options, callback) => {
|
|
|
23439
23422
|
try {
|
|
23440
23423
|
if (options.editor.async) {
|
|
23441
23424
|
(0, import_fetch.fetchProjectAsync)(key, options, callback || ((data) => {
|
|
23442
|
-
if ((0,
|
|
23425
|
+
if ((0, import_utils17.isObject)(data.designsystem)) {
|
|
23443
23426
|
options.utils.init(data.designsystem);
|
|
23444
23427
|
}
|
|
23445
|
-
if ((0,
|
|
23428
|
+
if ((0, import_utils17.isObject)(data.state)) {
|
|
23446
23429
|
app.state.set(data.state);
|
|
23447
23430
|
}
|
|
23448
23431
|
}));
|
|
@@ -23507,19 +23490,19 @@ init_dynamic();
|
|
|
23507
23490
|
// src/createDomql.js
|
|
23508
23491
|
var import_domql = __toESM(require_cjs12(), 1);
|
|
23509
23492
|
init_uikit();
|
|
23510
|
-
var
|
|
23493
|
+
var import_utils23 = __toESM(require_cjs(), 1);
|
|
23511
23494
|
|
|
23512
23495
|
// src/syncExtend.js
|
|
23513
|
-
var
|
|
23496
|
+
var import_utils18 = __toESM(require_cjs(), 1);
|
|
23514
23497
|
var import_sync = __toESM(require_cjs13(), 1);
|
|
23515
23498
|
var initializeExtend = (app, ctx) => {
|
|
23516
|
-
return (0,
|
|
23499
|
+
return (0, import_utils18.isObjectLike)(app.extend) ? app.extend : [];
|
|
23517
23500
|
};
|
|
23518
23501
|
var initializeSync = (app, ctx) => {
|
|
23519
23502
|
const { editor } = ctx;
|
|
23520
23503
|
if (!editor)
|
|
23521
23504
|
return;
|
|
23522
|
-
const liveSync = (0,
|
|
23505
|
+
const liveSync = (0, import_utils18.isUndefined)(editor.liveSync) ? (0, import_utils18.isDevelopment)() : editor.liveSync;
|
|
23523
23506
|
if (liveSync)
|
|
23524
23507
|
app.extend.push(import_sync.SyncComponent);
|
|
23525
23508
|
};
|
|
@@ -23527,7 +23510,7 @@ var initializeInspect = (app, ctx) => {
|
|
|
23527
23510
|
const { editor } = ctx;
|
|
23528
23511
|
if (!editor)
|
|
23529
23512
|
return;
|
|
23530
|
-
const inspect = (0,
|
|
23513
|
+
const inspect = (0, import_utils18.isUndefined)(editor.inspect) ? (0, import_utils18.isDevelopment)() : editor.inspect;
|
|
23531
23514
|
if (inspect)
|
|
23532
23515
|
app.extend.push(import_sync.Inspect);
|
|
23533
23516
|
};
|
|
@@ -23535,19 +23518,19 @@ var initializeNotifications = (app, ctx) => {
|
|
|
23535
23518
|
const { editor } = ctx;
|
|
23536
23519
|
if (!editor)
|
|
23537
23520
|
return;
|
|
23538
|
-
const verbose = (0,
|
|
23521
|
+
const verbose = (0, import_utils18.isUndefined)(editor.verbose) ? (0, import_utils18.isDevelopment)() || ctx.verbose : editor.verbose;
|
|
23539
23522
|
if (verbose)
|
|
23540
23523
|
app.extend.push(import_sync.Notifications);
|
|
23541
23524
|
};
|
|
23542
23525
|
|
|
23543
23526
|
// src/prepare.js
|
|
23544
|
-
var
|
|
23527
|
+
var import_utils22 = __toESM(require_cjs(), 1);
|
|
23545
23528
|
|
|
23546
23529
|
// ../../node_modules/@domql/emotion/index.js
|
|
23547
|
-
var
|
|
23530
|
+
var import_utils20 = __toESM(require_cjs());
|
|
23548
23531
|
|
|
23549
23532
|
// ../../node_modules/@domql/classlist/index.js
|
|
23550
|
-
var
|
|
23533
|
+
var import_utils19 = __toESM(require_cjs());
|
|
23551
23534
|
var classify = (obj, element) => {
|
|
23552
23535
|
let className = "";
|
|
23553
23536
|
for (const item in obj) {
|
|
@@ -23557,7 +23540,7 @@ var classify = (obj, element) => {
|
|
|
23557
23540
|
else if (typeof param === "string")
|
|
23558
23541
|
className += ` ${param}`;
|
|
23559
23542
|
else if (typeof param === "function") {
|
|
23560
|
-
className += ` ${(0,
|
|
23543
|
+
className += ` ${(0, import_utils19.exec)(param, element)}`;
|
|
23561
23544
|
}
|
|
23562
23545
|
}
|
|
23563
23546
|
return className;
|
|
@@ -23568,9 +23551,9 @@ var classList = (params, element) => {
|
|
|
23568
23551
|
const { key } = element;
|
|
23569
23552
|
if (params === true)
|
|
23570
23553
|
params = element.class = { key };
|
|
23571
|
-
if ((0,
|
|
23554
|
+
if ((0, import_utils19.isString)(params))
|
|
23572
23555
|
params = element.class = { default: params };
|
|
23573
|
-
if ((0,
|
|
23556
|
+
if ((0, import_utils19.isObject)(params))
|
|
23574
23557
|
params = classify(params, element);
|
|
23575
23558
|
const className = params.replace(/\s+/g, " ").trim();
|
|
23576
23559
|
if (element.ref)
|
|
@@ -23587,9 +23570,9 @@ var applyClassListOnNode = (params, element, node2) => {
|
|
|
23587
23570
|
init_emotion_css_create_instance_esm();
|
|
23588
23571
|
var transformEmotionStyle = (emotion2) => {
|
|
23589
23572
|
return (params, element, state) => {
|
|
23590
|
-
const execParams = (0,
|
|
23573
|
+
const execParams = (0, import_utils20.exec)(params, element);
|
|
23591
23574
|
if (params) {
|
|
23592
|
-
if ((0,
|
|
23575
|
+
if ((0, import_utils20.isObjectLike)(element.class))
|
|
23593
23576
|
element.class.elementStyle = execParams;
|
|
23594
23577
|
else
|
|
23595
23578
|
element.class = { elementStyle: execParams };
|
|
@@ -23603,7 +23586,7 @@ var transformEmotionClass = (emotion2) => {
|
|
|
23603
23586
|
return;
|
|
23604
23587
|
const { __ref } = element;
|
|
23605
23588
|
const { __class, __classNames } = __ref;
|
|
23606
|
-
if (!(0,
|
|
23589
|
+
if (!(0, import_utils20.isObjectLike)(params))
|
|
23607
23590
|
return;
|
|
23608
23591
|
if (element.props.class) {
|
|
23609
23592
|
__classNames.classProps = element.props.class;
|
|
@@ -23612,20 +23595,20 @@ var transformEmotionClass = (emotion2) => {
|
|
|
23612
23595
|
__classNames.class = element.attr.class;
|
|
23613
23596
|
}
|
|
23614
23597
|
for (const key in params) {
|
|
23615
|
-
const prop = (0,
|
|
23598
|
+
const prop = (0, import_utils20.exec)(params[key], element);
|
|
23616
23599
|
if (!prop) {
|
|
23617
23600
|
delete __class[key];
|
|
23618
23601
|
delete __classNames[key];
|
|
23619
23602
|
continue;
|
|
23620
23603
|
}
|
|
23621
|
-
const isEqual = (0,
|
|
23604
|
+
const isEqual = (0, import_utils20.isEqualDeep)(__class[key], prop);
|
|
23622
23605
|
if (!isEqual) {
|
|
23623
|
-
if (!(0,
|
|
23606
|
+
if (!(0, import_utils20.isProduction)() && (0, import_utils20.isObject)(prop))
|
|
23624
23607
|
prop.label = key || element.key;
|
|
23625
23608
|
let className;
|
|
23626
|
-
if ((0,
|
|
23609
|
+
if ((0, import_utils20.isString)(prop) || (0, import_utils20.isNumber)(prop))
|
|
23627
23610
|
className = prop;
|
|
23628
|
-
else if ((0,
|
|
23611
|
+
else if ((0, import_utils20.isBoolean)(prop))
|
|
23629
23612
|
className = element.key;
|
|
23630
23613
|
else
|
|
23631
23614
|
className = emotion2.css(prop);
|
|
@@ -23648,7 +23631,7 @@ var transformDOMQLEmotion = (emotion2, options) => {
|
|
|
23648
23631
|
// src/initEmotion.js
|
|
23649
23632
|
init_emotion();
|
|
23650
23633
|
init_init();
|
|
23651
|
-
var
|
|
23634
|
+
var import_utils21 = __toESM(require_cjs(), 1);
|
|
23652
23635
|
|
|
23653
23636
|
// ../default-config/src/index.js
|
|
23654
23637
|
var import_default_icons = __toESM(require_cjs14());
|
|
@@ -24042,7 +24025,7 @@ var initEmotion = (key, options = {}) => {
|
|
|
24042
24025
|
if (!initOptions.emotion)
|
|
24043
24026
|
initOptions.emotion = emotion;
|
|
24044
24027
|
const registry = options.registry || transformDOMQLEmotion(initOptions.emotion, options);
|
|
24045
|
-
const designSystem = initOptions.useDefaultConfig || ((_a = options.designSystem) == null ? void 0 : _a.useDefaultConfig) ? (0,
|
|
24028
|
+
const designSystem = initOptions.useDefaultConfig || ((_a = options.designSystem) == null ? void 0 : _a.useDefaultConfig) ? (0, import_utils21.deepMerge)(options.designSystem, (0, import_utils21.deepClone)(DEFAULT_CONFIG)) : options.designSystem || (0, import_utils21.deepClone)(DEFAULT_CONFIG);
|
|
24046
24029
|
const scratchSystem2 = init(designSystem, {
|
|
24047
24030
|
key,
|
|
24048
24031
|
emotion: emotion2,
|
|
@@ -24075,7 +24058,7 @@ var UIkitWithPrefix = () => {
|
|
|
24075
24058
|
const newObj = {};
|
|
24076
24059
|
for (const key in uikit_exports) {
|
|
24077
24060
|
if (Object.prototype.hasOwnProperty.call(uikit_exports, key)) {
|
|
24078
|
-
if ((0,
|
|
24061
|
+
if ((0, import_utils22.checkIfKeyIsComponent)(key)) {
|
|
24079
24062
|
newObj[`smbls.${key}`] = uikit_exports[key];
|
|
24080
24063
|
} else {
|
|
24081
24064
|
newObj[key] = uikit_exports[key];
|
|
@@ -24162,7 +24145,7 @@ var prepareRequire = (packages, ctx) => {
|
|
|
24162
24145
|
return windowOpts2.require(key);
|
|
24163
24146
|
};
|
|
24164
24147
|
if (windowOpts.packages) {
|
|
24165
|
-
windowOpts.packages = (0,
|
|
24148
|
+
windowOpts.packages = (0, import_utils22.merge)(windowOpts.packages, packages);
|
|
24166
24149
|
} else {
|
|
24167
24150
|
windowOpts.packages = packages;
|
|
24168
24151
|
}
|
|
@@ -24184,12 +24167,12 @@ var prepareState = (app, context) => {
|
|
|
24184
24167
|
if (context.state)
|
|
24185
24168
|
utilImports_exports.deepMerge(state, context.state);
|
|
24186
24169
|
if (app && app.state)
|
|
24187
|
-
(0,
|
|
24188
|
-
return (0,
|
|
24170
|
+
(0, import_utils22.deepMerge)(state, app.state);
|
|
24171
|
+
return (0, import_utils22.deepClone)(state);
|
|
24189
24172
|
};
|
|
24190
24173
|
var preparePages = (app, context) => {
|
|
24191
|
-
if ((0,
|
|
24192
|
-
(0,
|
|
24174
|
+
if ((0, import_utils22.isObject)(app.routes) && (0, import_utils22.isObject)(context.pages)) {
|
|
24175
|
+
(0, import_utils22.merge)(app.routes, context.pages);
|
|
24193
24176
|
}
|
|
24194
24177
|
const pages = app.routes || context.pages || {};
|
|
24195
24178
|
return Object.keys(pages).filter((v) => !v.startsWith("/")).reduce((pages2, v) => {
|
|
@@ -24221,7 +24204,7 @@ var initAnimationFrame = () => {
|
|
|
24221
24204
|
|
|
24222
24205
|
// src/createDomql.js
|
|
24223
24206
|
var prepareContext = (app, context = {}) => {
|
|
24224
|
-
const key = context.key = context.key || ((0,
|
|
24207
|
+
const key = context.key = context.key || ((0, import_utils23.isString)(app) ? app : "smblsapp");
|
|
24225
24208
|
context.define = context.define || defaultDefine;
|
|
24226
24209
|
context.window = prepareWindow(context);
|
|
24227
24210
|
const [scratcDesignSystem, emotion2, registry] = prepareDesignSystem(key, context);
|
|
@@ -24240,17 +24223,17 @@ var prepareContext = (app, context = {}) => {
|
|
|
24240
24223
|
return context;
|
|
24241
24224
|
};
|
|
24242
24225
|
var createDomqlElement = (app, ctx) => {
|
|
24243
|
-
if (!(0,
|
|
24226
|
+
if (!(0, import_utils23.isObject)(ctx))
|
|
24244
24227
|
ctx = {};
|
|
24245
|
-
if ((0,
|
|
24228
|
+
if ((0, import_utils23.isNode)(app)) {
|
|
24246
24229
|
app = {};
|
|
24247
24230
|
ctx.parent = app;
|
|
24248
24231
|
}
|
|
24249
|
-
if ((0,
|
|
24232
|
+
if ((0, import_utils23.isString)(app)) {
|
|
24250
24233
|
app = {};
|
|
24251
24234
|
ctx.key = app;
|
|
24252
24235
|
}
|
|
24253
|
-
if (!(0,
|
|
24236
|
+
if (!(0, import_utils23.isObject)(app)) {
|
|
24254
24237
|
app = {};
|
|
24255
24238
|
}
|
|
24256
24239
|
prepareContext(app, ctx);
|
|
@@ -24279,9 +24262,9 @@ var createDomqlElement = (app, ctx) => {
|
|
|
24279
24262
|
};
|
|
24280
24263
|
|
|
24281
24264
|
// src/index.js
|
|
24282
|
-
var mergeWithLocalFile2 = (options, optionsExternalFile) => (0,
|
|
24265
|
+
var mergeWithLocalFile2 = (options, optionsExternalFile) => (0, import_utils24.deepMerge)(
|
|
24283
24266
|
options,
|
|
24284
|
-
(0,
|
|
24267
|
+
(0, import_utils24.isObject)(optionsExternalFile) ? optionsExternalFile : dynamic_default || {}
|
|
24285
24268
|
);
|
|
24286
24269
|
var create = (App, options = options_default, optionsExternalFile) => {
|
|
24287
24270
|
const redefinedOptions = { ...options_default, ...mergeWithLocalFile2(options, optionsExternalFile) };
|
|
@@ -24310,10 +24293,10 @@ var createSync = async (App, options = options_default, optionsExternalFile) =>
|
|
|
24310
24293
|
var createSkeleton = (App = {}, options = options_default, optionsExternalFile) => {
|
|
24311
24294
|
return create(
|
|
24312
24295
|
{
|
|
24313
|
-
deps: { isUndefined:
|
|
24296
|
+
deps: { isUndefined: import_utils24.isUndefined },
|
|
24314
24297
|
...App
|
|
24315
24298
|
},
|
|
24316
|
-
(0,
|
|
24299
|
+
(0, import_utils24.deepMerge)({ domqlOptions: { onlyResolveExtends: true } }, options),
|
|
24317
24300
|
optionsExternalFile
|
|
24318
24301
|
);
|
|
24319
24302
|
};
|