laymur 0.1.72 → 0.1.73
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/index.js +158 -185
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +14 -10
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MathUtils, Vector2, Box2, Matrix3,
|
|
1
|
+
import { MathUtils, Vector2, Box2, Matrix3, Vector3, ShaderMaterial, Color, AddEquation, SrcAlphaFactor, OneMinusSrcAlphaFactor, NormalBlending, CustomBlending, OneMinusDstColorFactor, OneFactor, MultiplyBlending, SubtractiveBlending, AdditiveBlending, PlaneGeometry, Scene, Mesh, OrthographicCamera, WebGLRenderTarget, UnsignedByteType, LinearFilter, RGBAFormat, NoBlending, Object3D, UniformsUtils, PerspectiveCamera, CanvasTexture } from 'three';
|
|
2
2
|
|
|
3
3
|
/*-----------------------------------------------------------------------------
|
|
4
4
|
| Copyright (c) 2014, Nucleic Development Team.
|
|
@@ -1616,7 +1616,7 @@ function isUIOrientation(obj) {
|
|
|
1616
1616
|
* @returns The provided orientation, or ALWAYS if none was provided
|
|
1617
1617
|
*/
|
|
1618
1618
|
function resolveOrientation(orientation) {
|
|
1619
|
-
return orientation
|
|
1619
|
+
return orientation ?? UIOrientation.ALWAYS;
|
|
1620
1620
|
}
|
|
1621
1621
|
|
|
1622
1622
|
/**
|
|
@@ -1711,7 +1711,7 @@ function isUIConstraintPower(obj) {
|
|
|
1711
1711
|
* @returns The provided power level, or P0 (highest) if none was provided
|
|
1712
1712
|
*/
|
|
1713
1713
|
function resolvePower(power) {
|
|
1714
|
-
return power
|
|
1714
|
+
return power ?? UIConstraintPower.P0;
|
|
1715
1715
|
}
|
|
1716
1716
|
/**
|
|
1717
1717
|
* Converts a UIConstraintPower enum value to a Kiwi.js strength value.
|
|
@@ -1790,7 +1790,7 @@ function isUIConstraintRule(obj) {
|
|
|
1790
1790
|
* @returns The provided rule, or EQUAL if none was provided
|
|
1791
1791
|
*/
|
|
1792
1792
|
function resolveRule(rule) {
|
|
1793
|
-
return rule
|
|
1793
|
+
return rule ?? UIConstraintRule.EQUAL;
|
|
1794
1794
|
}
|
|
1795
1795
|
/**
|
|
1796
1796
|
* Converts a UIConstraintRule to the corresponding Kiwi.js Operator.
|
|
@@ -1826,14 +1826,13 @@ class UIHeightConstraint extends UIConstraint {
|
|
|
1826
1826
|
* @param options - Configuration options
|
|
1827
1827
|
*/
|
|
1828
1828
|
constructor(_private_element, options) {
|
|
1829
|
-
var _a;
|
|
1830
1829
|
super(_private_element.layer, new Set([_private_element]));
|
|
1831
1830
|
this._private_element = _private_element;
|
|
1832
1831
|
this._private_options = {
|
|
1833
|
-
height:
|
|
1834
|
-
power: resolvePower(options
|
|
1835
|
-
rule: resolveRule(options
|
|
1836
|
-
orientation: resolveOrientation(options
|
|
1832
|
+
height: options?.height ?? _private_element.height,
|
|
1833
|
+
power: resolvePower(options?.power),
|
|
1834
|
+
rule: resolveRule(options?.rule),
|
|
1835
|
+
orientation: resolveOrientation(options?.orientation),
|
|
1837
1836
|
};
|
|
1838
1837
|
if (this._private_options.orientation === UIOrientation.ALWAYS ||
|
|
1839
1838
|
this._private_options.orientation === this.layer.orientation) {
|
|
@@ -1938,8 +1937,7 @@ class UIAnchor extends i {
|
|
|
1938
1937
|
}
|
|
1939
1938
|
/** Gets the current z-index (depth) of the element */
|
|
1940
1939
|
get zIndex() {
|
|
1941
|
-
|
|
1942
|
-
return (_e = (_d = this.object) === null || _d === void 0 ? void 0 : _d.position.z) !== null && _e !== void 0 ? _e : 0;
|
|
1940
|
+
return this.object?.position.z ?? 0;
|
|
1943
1941
|
}
|
|
1944
1942
|
/** Gets whether the element needs recalculation */
|
|
1945
1943
|
get needsRecalculation() {
|
|
@@ -2018,31 +2016,30 @@ const tempMatrixB = new Matrix3();
|
|
|
2018
2016
|
const tempMatrixC = new Matrix3();
|
|
2019
2017
|
const tempMatrixD = new Matrix3();
|
|
2020
2018
|
const tempMatrixE = new Matrix3();
|
|
2021
|
-
const
|
|
2022
|
-
const tempMatrixG = new Matrix4();
|
|
2019
|
+
const tempVectorA = new Vector3();
|
|
2023
2020
|
function applyMicroTransformations(object, micro, x, y, width, height, padding) {
|
|
2024
|
-
const
|
|
2025
|
-
const
|
|
2026
|
-
const
|
|
2027
|
-
const
|
|
2028
|
-
const
|
|
2029
|
-
const
|
|
2030
|
-
const
|
|
2031
|
-
const
|
|
2032
|
-
const
|
|
2033
|
-
const
|
|
2034
|
-
const
|
|
2035
|
-
const
|
|
2036
|
-
|
|
2037
|
-
.
|
|
2038
|
-
.
|
|
2039
|
-
.
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
object.
|
|
2021
|
+
const realX = x - padding;
|
|
2022
|
+
const realY = y - padding;
|
|
2023
|
+
const realWidth = width + padding * 2;
|
|
2024
|
+
const realHeight = height + padding * 2;
|
|
2025
|
+
const anchorOffsetX = realWidth * micro.anchorX;
|
|
2026
|
+
const anchorOffsetY = realHeight * micro.anchorY;
|
|
2027
|
+
const centerX = realX + anchorOffsetX;
|
|
2028
|
+
const centerY = realY + anchorOffsetY;
|
|
2029
|
+
const translateToCenter = tempMatrixA.set(1, 0, -centerX, 0, 1, -centerY, 0, 0, 1);
|
|
2030
|
+
const scale = tempMatrixB.set(micro.scaleX, 0, 0, 0, micro.scaleY, 0, 0, 0, 1);
|
|
2031
|
+
const rotation = tempMatrixC.set(Math.cos(micro.rotation), -Math.sin(micro.rotation), 0, Math.sin(micro.rotation), Math.cos(micro.rotation), 0, 0, 0, 1);
|
|
2032
|
+
const translateFinal = tempMatrixD.set(1, 0, micro.x + centerX, 0, 1, micro.y + centerY, 0, 0, 1);
|
|
2033
|
+
const finalMatrix = tempMatrixE
|
|
2034
|
+
.multiplyMatrices(translateFinal, rotation)
|
|
2035
|
+
.multiply(scale)
|
|
2036
|
+
.multiply(translateToCenter);
|
|
2037
|
+
const point = tempVectorA.set(realX, realY, 1).applyMatrix3(finalMatrix);
|
|
2038
|
+
object.position.x = point.x;
|
|
2039
|
+
object.position.y = point.y;
|
|
2040
|
+
object.rotation.z = micro.rotation;
|
|
2041
|
+
object.scale.x = realWidth * micro.scaleX;
|
|
2042
|
+
object.scale.y = realHeight * micro.scaleY;
|
|
2046
2043
|
}
|
|
2047
2044
|
|
|
2048
2045
|
/**
|
|
@@ -2987,7 +2984,7 @@ class UILayer extends i {
|
|
|
2987
2984
|
constraints: new Set(),
|
|
2988
2985
|
});
|
|
2989
2986
|
if (object) {
|
|
2990
|
-
const zIndex = renderOrder
|
|
2987
|
+
const zIndex = renderOrder ?? this.scene.children.length;
|
|
2991
2988
|
object.position.z = zIndex;
|
|
2992
2989
|
object.renderOrder = zIndex;
|
|
2993
2990
|
this.scene.add(object);
|
|
@@ -3054,7 +3051,6 @@ class UILayer extends i {
|
|
|
3054
3051
|
this.constraints.delete(constraint);
|
|
3055
3052
|
}
|
|
3056
3053
|
[addConstraintSymbol](owner, constraint) {
|
|
3057
|
-
var _e;
|
|
3058
3054
|
const dependencies = this.constraints.get(owner);
|
|
3059
3055
|
if (dependencies === undefined) {
|
|
3060
3056
|
throw new Error("Before adding constraint you need to add it's owner");
|
|
@@ -3064,15 +3060,14 @@ class UILayer extends i {
|
|
|
3064
3060
|
}
|
|
3065
3061
|
dependencies.constraints.add(constraint);
|
|
3066
3062
|
try {
|
|
3067
|
-
|
|
3063
|
+
this.solver?.addConstraint(constraint);
|
|
3068
3064
|
}
|
|
3069
|
-
catch
|
|
3065
|
+
catch {
|
|
3070
3066
|
this._private_rebuildSolver();
|
|
3071
3067
|
}
|
|
3072
3068
|
this.needsRecalculation = true;
|
|
3073
3069
|
}
|
|
3074
3070
|
[removeConstraintSymbol](owner, constraint) {
|
|
3075
|
-
var _e;
|
|
3076
3071
|
const dependencies = this.constraints.get(owner);
|
|
3077
3072
|
if (dependencies === undefined) {
|
|
3078
3073
|
throw new Error("Before removing constraint you need to add it's owner");
|
|
@@ -3082,15 +3077,14 @@ class UILayer extends i {
|
|
|
3082
3077
|
}
|
|
3083
3078
|
dependencies.constraints.delete(constraint);
|
|
3084
3079
|
try {
|
|
3085
|
-
|
|
3080
|
+
this.solver?.removeConstraint(constraint);
|
|
3086
3081
|
}
|
|
3087
|
-
catch
|
|
3082
|
+
catch {
|
|
3088
3083
|
this._private_rebuildSolver();
|
|
3089
3084
|
}
|
|
3090
3085
|
this.needsRecalculation = true;
|
|
3091
3086
|
}
|
|
3092
3087
|
[addVariableSymbol](owner, variable, strength) {
|
|
3093
|
-
var _e;
|
|
3094
3088
|
const dependencies = owner instanceof UIElement || owner instanceof UIAnchor
|
|
3095
3089
|
? this.elements.get(owner)
|
|
3096
3090
|
: this.constraints.get(owner);
|
|
@@ -3105,15 +3099,14 @@ class UILayer extends i {
|
|
|
3105
3099
|
suggestedValue: variable.value(),
|
|
3106
3100
|
});
|
|
3107
3101
|
try {
|
|
3108
|
-
|
|
3102
|
+
this.solver?.addEditVariable(variable, strength);
|
|
3109
3103
|
}
|
|
3110
|
-
catch
|
|
3104
|
+
catch {
|
|
3111
3105
|
this._private_rebuildSolver();
|
|
3112
3106
|
}
|
|
3113
3107
|
this.needsRecalculation = true;
|
|
3114
3108
|
}
|
|
3115
3109
|
[removeVariableSymbol](owner, variable) {
|
|
3116
|
-
var _e;
|
|
3117
3110
|
const dependencies = owner instanceof UIElement || owner instanceof UIAnchor
|
|
3118
3111
|
? this.elements.get(owner)
|
|
3119
3112
|
: this.constraints.get(owner);
|
|
@@ -3125,15 +3118,14 @@ class UILayer extends i {
|
|
|
3125
3118
|
}
|
|
3126
3119
|
dependencies.variables.delete(variable);
|
|
3127
3120
|
try {
|
|
3128
|
-
|
|
3121
|
+
this.solver?.removeEditVariable(variable);
|
|
3129
3122
|
}
|
|
3130
|
-
catch
|
|
3123
|
+
catch {
|
|
3131
3124
|
this._private_rebuildSolver();
|
|
3132
3125
|
}
|
|
3133
3126
|
this.needsRecalculation = true;
|
|
3134
3127
|
}
|
|
3135
3128
|
[suggestVariableSymbol](owner, variable, value) {
|
|
3136
|
-
var _e;
|
|
3137
3129
|
const dependencies = owner instanceof UIElement || owner instanceof UIAnchor
|
|
3138
3130
|
? this.elements.get(owner)
|
|
3139
3131
|
: this.constraints.get(owner);
|
|
@@ -3147,9 +3139,9 @@ class UILayer extends i {
|
|
|
3147
3139
|
if (description.suggestedValue !== value) {
|
|
3148
3140
|
description.suggestedValue = value;
|
|
3149
3141
|
try {
|
|
3150
|
-
|
|
3142
|
+
this.solver?.suggestValue(variable, value);
|
|
3151
3143
|
}
|
|
3152
|
-
catch
|
|
3144
|
+
catch {
|
|
3153
3145
|
this._private_rebuildSolver();
|
|
3154
3146
|
}
|
|
3155
3147
|
this.needsRecalculation = true;
|
|
@@ -3170,7 +3162,6 @@ class UILayer extends i {
|
|
|
3170
3162
|
this.camera.updateMatrix();
|
|
3171
3163
|
}
|
|
3172
3164
|
render(renderer, deltaTime) {
|
|
3173
|
-
var _e;
|
|
3174
3165
|
if (this.mode === UIMode.HIDDEN) {
|
|
3175
3166
|
return;
|
|
3176
3167
|
}
|
|
@@ -3179,7 +3170,7 @@ class UILayer extends i {
|
|
|
3179
3170
|
const originalClearAlpha = renderer.getClearAlpha();
|
|
3180
3171
|
if (this.needsRecalculation) {
|
|
3181
3172
|
this.needsRecalculation = false;
|
|
3182
|
-
|
|
3173
|
+
this.solver?.updateVariables();
|
|
3183
3174
|
for (const element of this.elements.keys()) {
|
|
3184
3175
|
element[needsRecalculation] = true;
|
|
3185
3176
|
}
|
|
@@ -3221,31 +3212,30 @@ class UILayer extends i {
|
|
|
3221
3212
|
this.camera.updateProjectionMatrix();
|
|
3222
3213
|
}
|
|
3223
3214
|
rebuildLayerConstraints(width, height) {
|
|
3224
|
-
var _e, _f, _g, _h, _j, _k, _l, _m;
|
|
3225
3215
|
if (this.constraintX) {
|
|
3226
|
-
|
|
3216
|
+
this.solver?.removeConstraint(this.constraintX);
|
|
3227
3217
|
this.constraintX = undefined;
|
|
3228
3218
|
}
|
|
3229
3219
|
if (this.constraintY) {
|
|
3230
|
-
|
|
3220
|
+
this.solver?.removeConstraint(this.constraintY);
|
|
3231
3221
|
this.constraintY = undefined;
|
|
3232
3222
|
}
|
|
3233
3223
|
if (this.constraintW) {
|
|
3234
|
-
|
|
3224
|
+
this.solver?.removeConstraint(this.constraintW);
|
|
3235
3225
|
this.constraintW = undefined;
|
|
3236
3226
|
}
|
|
3237
3227
|
if (this.constraintH) {
|
|
3238
|
-
|
|
3228
|
+
this.solver?.removeConstraint(this.constraintH);
|
|
3239
3229
|
this.constraintH = undefined;
|
|
3240
3230
|
}
|
|
3241
3231
|
this.constraintX = new Constraint(new Expression(this[xSymbol]), Operator.Eq, 0, Strength.required);
|
|
3242
3232
|
this.constraintY = new Constraint(new Expression(this[ySymbol]), Operator.Eq, 0, Strength.required);
|
|
3243
3233
|
this.constraintW = new Constraint(new Expression(this[widthSymbol]), Operator.Eq, width, Strength.required);
|
|
3244
3234
|
this.constraintH = new Constraint(new Expression(this[heightSymbol]), Operator.Eq, height, Strength.required);
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3235
|
+
this.solver?.addConstraint(this.constraintX);
|
|
3236
|
+
this.solver?.addConstraint(this.constraintY);
|
|
3237
|
+
this.solver?.addConstraint(this.constraintW);
|
|
3238
|
+
this.solver?.addConstraint(this.constraintH);
|
|
3249
3239
|
}
|
|
3250
3240
|
updateOrientation(width, height) {
|
|
3251
3241
|
const lastOrientation = this.orientationPrivate;
|
|
@@ -3336,7 +3326,8 @@ function assertSameLayer(elementOne, elementTwo, message) {
|
|
|
3336
3326
|
}
|
|
3337
3327
|
function assertSize(width, height, message) {
|
|
3338
3328
|
if (width <= 0 || height <= 0) {
|
|
3339
|
-
throw new Error(message
|
|
3329
|
+
throw new Error(message ??
|
|
3330
|
+
`Invalid dimensions: width (${width}) and height (${height}) must both be positive numbers greater than 0`);
|
|
3340
3331
|
}
|
|
3341
3332
|
}
|
|
3342
3333
|
|
|
@@ -3359,7 +3350,6 @@ class UIHorizontalDistanceConstraint extends UIConstraint {
|
|
|
3359
3350
|
* @param parameters - Configuration options
|
|
3360
3351
|
*/
|
|
3361
3352
|
constructor(_private_elementOne, _private_elementTwo, parameters) {
|
|
3362
|
-
var _a, _b, _c;
|
|
3363
3353
|
assertSameLayer(_private_elementOne, _private_elementTwo);
|
|
3364
3354
|
super(_private_elementTwo.layer, new Set(_private_elementOne instanceof UIElement || _private_elementOne instanceof UIAnchor
|
|
3365
3355
|
? [_private_elementOne, _private_elementTwo]
|
|
@@ -3367,12 +3357,12 @@ class UIHorizontalDistanceConstraint extends UIConstraint {
|
|
|
3367
3357
|
this._private_elementOne = _private_elementOne;
|
|
3368
3358
|
this._private_elementTwo = _private_elementTwo;
|
|
3369
3359
|
this._private_parameters = {
|
|
3370
|
-
anchorOne:
|
|
3371
|
-
anchorTwo:
|
|
3372
|
-
distance:
|
|
3373
|
-
power: resolvePower(parameters
|
|
3374
|
-
rule: resolveRule(parameters
|
|
3375
|
-
orientation: resolveOrientation(parameters
|
|
3360
|
+
anchorOne: parameters?.anchorOne ?? DEFAULT_ANCHOR$3,
|
|
3361
|
+
anchorTwo: parameters?.anchorTwo ?? DEFAULT_ANCHOR$3,
|
|
3362
|
+
distance: parameters?.distance ?? 0,
|
|
3363
|
+
power: resolvePower(parameters?.power),
|
|
3364
|
+
rule: resolveRule(parameters?.rule),
|
|
3365
|
+
orientation: resolveOrientation(parameters?.orientation),
|
|
3376
3366
|
};
|
|
3377
3367
|
if (this._private_parameters.orientation === UIOrientation.ALWAYS ||
|
|
3378
3368
|
this._private_parameters.orientation === this.layer.orientation) {
|
|
@@ -3454,7 +3444,6 @@ class UIHorizontalProportionConstraint extends UIConstraint {
|
|
|
3454
3444
|
* @param parameters - Configuration options
|
|
3455
3445
|
*/
|
|
3456
3446
|
constructor(_private_elementOne, _private_elementTwo, parameters) {
|
|
3457
|
-
var _a;
|
|
3458
3447
|
assertSameLayer(_private_elementOne, _private_elementTwo);
|
|
3459
3448
|
super(_private_elementTwo.layer, new Set(_private_elementOne instanceof UIElement
|
|
3460
3449
|
? [_private_elementOne, _private_elementTwo]
|
|
@@ -3462,10 +3451,10 @@ class UIHorizontalProportionConstraint extends UIConstraint {
|
|
|
3462
3451
|
this._private_elementOne = _private_elementOne;
|
|
3463
3452
|
this._private_elementTwo = _private_elementTwo;
|
|
3464
3453
|
this._private_parameters = {
|
|
3465
|
-
proportion:
|
|
3466
|
-
power: resolvePower(parameters
|
|
3467
|
-
rule: resolveRule(parameters
|
|
3468
|
-
orientation: resolveOrientation(parameters
|
|
3454
|
+
proportion: parameters?.proportion ?? 1,
|
|
3455
|
+
power: resolvePower(parameters?.power),
|
|
3456
|
+
rule: resolveRule(parameters?.rule),
|
|
3457
|
+
orientation: resolveOrientation(parameters?.orientation),
|
|
3469
3458
|
};
|
|
3470
3459
|
if (this._private_parameters.orientation === UIOrientation.ALWAYS ||
|
|
3471
3460
|
this._private_parameters.orientation === this.layer.orientation) {
|
|
@@ -3547,7 +3536,6 @@ class UIVerticalDistanceConstraint extends UIConstraint {
|
|
|
3547
3536
|
* @param parameters - Configuration options
|
|
3548
3537
|
*/
|
|
3549
3538
|
constructor(_private_elementOne, _private_elementTwo, parameters) {
|
|
3550
|
-
var _a, _b, _c;
|
|
3551
3539
|
assertSameLayer(_private_elementOne, _private_elementTwo);
|
|
3552
3540
|
super(_private_elementTwo.layer, new Set(_private_elementOne instanceof UIElement || _private_elementOne instanceof UIAnchor
|
|
3553
3541
|
? [_private_elementOne, _private_elementTwo]
|
|
@@ -3555,12 +3543,12 @@ class UIVerticalDistanceConstraint extends UIConstraint {
|
|
|
3555
3543
|
this._private_elementOne = _private_elementOne;
|
|
3556
3544
|
this._private_elementTwo = _private_elementTwo;
|
|
3557
3545
|
this._private_parameters = {
|
|
3558
|
-
anchorOne:
|
|
3559
|
-
anchorTwo:
|
|
3560
|
-
distance:
|
|
3561
|
-
power: resolvePower(parameters
|
|
3562
|
-
rule: resolveRule(parameters
|
|
3563
|
-
orientation: resolveOrientation(parameters
|
|
3546
|
+
anchorOne: parameters?.anchorOne ?? DEFAULT_ANCHOR$2,
|
|
3547
|
+
anchorTwo: parameters?.anchorTwo ?? DEFAULT_ANCHOR$2,
|
|
3548
|
+
distance: parameters?.distance ?? 0,
|
|
3549
|
+
power: resolvePower(parameters?.power),
|
|
3550
|
+
rule: resolveRule(parameters?.rule),
|
|
3551
|
+
orientation: resolveOrientation(parameters?.orientation),
|
|
3564
3552
|
};
|
|
3565
3553
|
if (this._private_parameters.orientation === UIOrientation.ALWAYS ||
|
|
3566
3554
|
this._private_parameters.orientation === this.layer.orientation) {
|
|
@@ -3642,7 +3630,6 @@ class UIVerticalProportionConstraint extends UIConstraint {
|
|
|
3642
3630
|
* @param parameters - Configuration options
|
|
3643
3631
|
*/
|
|
3644
3632
|
constructor(_private_elementOne, _private_elementTwo, parameters) {
|
|
3645
|
-
var _a;
|
|
3646
3633
|
assertSameLayer(_private_elementOne, _private_elementTwo);
|
|
3647
3634
|
super(_private_elementTwo.layer, new Set(_private_elementOne instanceof UIElement
|
|
3648
3635
|
? [_private_elementOne, _private_elementTwo]
|
|
@@ -3650,10 +3637,10 @@ class UIVerticalProportionConstraint extends UIConstraint {
|
|
|
3650
3637
|
this._private_elementOne = _private_elementOne;
|
|
3651
3638
|
this._private_elementTwo = _private_elementTwo;
|
|
3652
3639
|
this._private_parameters = {
|
|
3653
|
-
proportion:
|
|
3654
|
-
power: resolvePower(parameters
|
|
3655
|
-
rule: resolveRule(parameters
|
|
3656
|
-
orientation: resolveOrientation(parameters
|
|
3640
|
+
proportion: parameters?.proportion ?? 1,
|
|
3641
|
+
power: resolvePower(parameters?.power),
|
|
3642
|
+
rule: resolveRule(parameters?.rule),
|
|
3643
|
+
orientation: resolveOrientation(parameters?.orientation),
|
|
3657
3644
|
};
|
|
3658
3645
|
if (this._private_parameters.orientation === UIOrientation.ALWAYS ||
|
|
3659
3646
|
this._private_parameters.orientation === this.layer.orientation) {
|
|
@@ -3730,14 +3717,13 @@ class UIWidthConstraint extends UIConstraint {
|
|
|
3730
3717
|
* @param options - Configuration options
|
|
3731
3718
|
*/
|
|
3732
3719
|
constructor(_private_element, options) {
|
|
3733
|
-
var _a;
|
|
3734
3720
|
super(_private_element.layer, new Set([_private_element]));
|
|
3735
3721
|
this._private_element = _private_element;
|
|
3736
3722
|
this._private_options = {
|
|
3737
|
-
width:
|
|
3738
|
-
power: resolvePower(options
|
|
3739
|
-
rule: resolveRule(options
|
|
3740
|
-
orientation: resolveOrientation(options
|
|
3723
|
+
width: options?.width ?? _private_element.width,
|
|
3724
|
+
power: resolvePower(options?.power),
|
|
3725
|
+
rule: resolveRule(options?.rule),
|
|
3726
|
+
orientation: resolveOrientation(options?.orientation),
|
|
3741
3727
|
};
|
|
3742
3728
|
if (this._private_options.orientation === UIOrientation.ALWAYS ||
|
|
3743
3729
|
this._private_options.orientation === this.layer.orientation) {
|
|
@@ -3800,57 +3786,54 @@ class UIWidthConstraint extends UIConstraint {
|
|
|
3800
3786
|
|
|
3801
3787
|
class UIConstraint2DBuilder {
|
|
3802
3788
|
static size(element, options = {}) {
|
|
3803
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
3804
3789
|
return {
|
|
3805
3790
|
x: new UIWidthConstraint(element, {
|
|
3806
|
-
width:
|
|
3807
|
-
power:
|
|
3808
|
-
rule:
|
|
3809
|
-
orientation:
|
|
3791
|
+
width: options.size?.x,
|
|
3792
|
+
power: options.power?.x,
|
|
3793
|
+
rule: options.rule?.x,
|
|
3794
|
+
orientation: options.orientation?.x,
|
|
3810
3795
|
}),
|
|
3811
3796
|
y: new UIHeightConstraint(element, {
|
|
3812
|
-
height:
|
|
3813
|
-
power:
|
|
3814
|
-
rule:
|
|
3815
|
-
orientation:
|
|
3797
|
+
height: options.size?.y,
|
|
3798
|
+
power: options.power?.y,
|
|
3799
|
+
rule: options.rule?.y,
|
|
3800
|
+
orientation: options.orientation?.y,
|
|
3816
3801
|
}),
|
|
3817
3802
|
};
|
|
3818
3803
|
}
|
|
3819
3804
|
static distance(elementOne, elementTwo, options = {}) {
|
|
3820
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
3821
3805
|
return {
|
|
3822
3806
|
x: new UIHorizontalDistanceConstraint(elementOne, elementTwo, {
|
|
3823
|
-
anchorOne:
|
|
3824
|
-
anchorTwo:
|
|
3825
|
-
distance:
|
|
3826
|
-
power:
|
|
3827
|
-
rule:
|
|
3828
|
-
orientation:
|
|
3807
|
+
anchorOne: options.anchorOne?.x,
|
|
3808
|
+
anchorTwo: options.anchorTwo?.x,
|
|
3809
|
+
distance: options.distance?.x,
|
|
3810
|
+
power: options.power?.x,
|
|
3811
|
+
rule: options.rule?.x,
|
|
3812
|
+
orientation: options.orientation?.x,
|
|
3829
3813
|
}),
|
|
3830
3814
|
y: new UIVerticalDistanceConstraint(elementOne, elementTwo, {
|
|
3831
|
-
anchorOne:
|
|
3832
|
-
anchorTwo:
|
|
3833
|
-
distance:
|
|
3834
|
-
power:
|
|
3835
|
-
rule:
|
|
3836
|
-
orientation:
|
|
3815
|
+
anchorOne: options.anchorOne?.y,
|
|
3816
|
+
anchorTwo: options.anchorTwo?.y,
|
|
3817
|
+
distance: options.distance?.y,
|
|
3818
|
+
power: options.power?.y,
|
|
3819
|
+
rule: options.rule?.y,
|
|
3820
|
+
orientation: options.orientation?.y,
|
|
3837
3821
|
}),
|
|
3838
3822
|
};
|
|
3839
3823
|
}
|
|
3840
3824
|
static proportion(elementOne, elementTwo, options = {}) {
|
|
3841
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
3842
3825
|
return {
|
|
3843
3826
|
x: new UIHorizontalProportionConstraint(elementOne, elementTwo, {
|
|
3844
|
-
proportion:
|
|
3845
|
-
power:
|
|
3846
|
-
rule:
|
|
3847
|
-
orientation:
|
|
3827
|
+
proportion: options.proportion?.x,
|
|
3828
|
+
power: options.power?.x,
|
|
3829
|
+
rule: options.rule?.x,
|
|
3830
|
+
orientation: options.orientation?.x,
|
|
3848
3831
|
}),
|
|
3849
3832
|
y: new UIVerticalProportionConstraint(elementOne, elementTwo, {
|
|
3850
|
-
proportion:
|
|
3851
|
-
power:
|
|
3852
|
-
rule:
|
|
3853
|
-
orientation:
|
|
3833
|
+
proportion: options.proportion?.y,
|
|
3834
|
+
power: options.power?.y,
|
|
3835
|
+
rule: options.rule?.y,
|
|
3836
|
+
orientation: options.orientation?.y,
|
|
3854
3837
|
}),
|
|
3855
3838
|
};
|
|
3856
3839
|
}
|
|
@@ -3863,8 +3846,7 @@ var UIConstraintContainerDirection;
|
|
|
3863
3846
|
})(UIConstraintContainerDirection || (UIConstraintContainerDirection = {}));
|
|
3864
3847
|
class UIConstraintContainerBuilder {
|
|
3865
3848
|
static build(container, elementOne, elementTwo, options = {}) {
|
|
3866
|
-
|
|
3867
|
-
const direction = (_a = options.direction) !== null && _a !== void 0 ? _a : UIConstraintContainerDirection.FROM_LEFT_TOP;
|
|
3849
|
+
const direction = options.direction ?? UIConstraintContainerDirection.FROM_LEFT_TOP;
|
|
3868
3850
|
const horizontalDistances = [];
|
|
3869
3851
|
const verticalDistances = [];
|
|
3870
3852
|
horizontalDistances.push(new UIHorizontalDistanceConstraint(container, elementOne, {
|
|
@@ -3969,14 +3951,13 @@ class UIAspectConstraint extends UIConstraint {
|
|
|
3969
3951
|
* @param parameters - Configuration options
|
|
3970
3952
|
*/
|
|
3971
3953
|
constructor(_private_element, parameters) {
|
|
3972
|
-
var _a;
|
|
3973
3954
|
super(_private_element.layer, new Set([_private_element]));
|
|
3974
3955
|
this._private_element = _private_element;
|
|
3975
3956
|
this._private_parameters = {
|
|
3976
|
-
aspect:
|
|
3977
|
-
power: resolvePower(parameters
|
|
3978
|
-
rule: resolveRule(parameters
|
|
3979
|
-
orientation: resolveOrientation(parameters
|
|
3957
|
+
aspect: parameters?.aspect ?? this._private_element.width / this._private_element.height,
|
|
3958
|
+
power: resolvePower(parameters?.power),
|
|
3959
|
+
rule: resolveRule(parameters?.rule),
|
|
3960
|
+
orientation: resolveOrientation(parameters?.orientation),
|
|
3980
3961
|
};
|
|
3981
3962
|
if (this._private_parameters.orientation === UIOrientation.ALWAYS ||
|
|
3982
3963
|
this._private_parameters.orientation === this.layer.orientation) {
|
|
@@ -4061,7 +4042,6 @@ class UICoverConstraint extends UIConstraint {
|
|
|
4061
4042
|
* @param parameters - Configuration options
|
|
4062
4043
|
*/
|
|
4063
4044
|
constructor(_private_elementOne, _private_elementTwo, parameters) {
|
|
4064
|
-
var _a, _b, _c;
|
|
4065
4045
|
assertSameLayer(_private_elementOne, _private_elementTwo);
|
|
4066
4046
|
super(_private_elementTwo.layer, new Set(_private_elementOne instanceof UIElement
|
|
4067
4047
|
? [_private_elementOne, _private_elementTwo]
|
|
@@ -4069,10 +4049,10 @@ class UICoverConstraint extends UIConstraint {
|
|
|
4069
4049
|
this._private_elementOne = _private_elementOne;
|
|
4070
4050
|
this._private_elementTwo = _private_elementTwo;
|
|
4071
4051
|
this._private_parameters = {
|
|
4072
|
-
isStrict:
|
|
4073
|
-
horizontalAnchor:
|
|
4074
|
-
verticalAnchor:
|
|
4075
|
-
orientation: resolveOrientation(parameters
|
|
4052
|
+
isStrict: parameters?.isStrict ?? true,
|
|
4053
|
+
horizontalAnchor: parameters?.horizontalAnchor ?? DEFAULT_ANCHOR$1,
|
|
4054
|
+
verticalAnchor: parameters?.verticalAnchor ?? DEFAULT_ANCHOR$1,
|
|
4055
|
+
orientation: resolveOrientation(parameters?.orientation),
|
|
4076
4056
|
};
|
|
4077
4057
|
if (this._private_parameters.orientation === UIOrientation.ALWAYS ||
|
|
4078
4058
|
this._private_parameters.orientation === this.layer.orientation) {
|
|
@@ -4186,7 +4166,6 @@ class UIFitConstraint extends UIConstraint {
|
|
|
4186
4166
|
* @param parameters - Configuration options
|
|
4187
4167
|
*/
|
|
4188
4168
|
constructor(_private_elementOne, _private_elementTwo, parameters) {
|
|
4189
|
-
var _a, _b, _c;
|
|
4190
4169
|
super(_private_elementTwo.layer, new Set(_private_elementOne instanceof UIElement
|
|
4191
4170
|
? [_private_elementOne, _private_elementTwo]
|
|
4192
4171
|
: [_private_elementTwo]));
|
|
@@ -4194,10 +4173,10 @@ class UIFitConstraint extends UIConstraint {
|
|
|
4194
4173
|
this._private_elementTwo = _private_elementTwo;
|
|
4195
4174
|
assertSameLayer(_private_elementOne, _private_elementTwo);
|
|
4196
4175
|
this._private_parameters = {
|
|
4197
|
-
isStrict:
|
|
4198
|
-
horizontalAnchor:
|
|
4199
|
-
verticalAnchor:
|
|
4200
|
-
orientation: resolveOrientation(parameters
|
|
4176
|
+
isStrict: parameters?.isStrict ?? true,
|
|
4177
|
+
horizontalAnchor: parameters?.horizontalAnchor ?? DEFAULT_ANCHOR,
|
|
4178
|
+
verticalAnchor: parameters?.verticalAnchor ?? DEFAULT_ANCHOR,
|
|
4179
|
+
orientation: resolveOrientation(parameters?.orientation),
|
|
4201
4180
|
};
|
|
4202
4181
|
if (this._private_parameters.orientation === UIOrientation.ALWAYS ||
|
|
4203
4182
|
this._private_parameters.orientation === this.layer.orientation) {
|
|
@@ -4330,9 +4309,8 @@ class UIImage extends UIElement {
|
|
|
4330
4309
|
* @throws Error if the texture has invalid dimensions
|
|
4331
4310
|
*/
|
|
4332
4311
|
constructor(layer, texture) {
|
|
4333
|
-
|
|
4334
|
-
const
|
|
4335
|
-
const height = (_b = texture.image) === null || _b === void 0 ? void 0 : _b.height;
|
|
4312
|
+
const width = texture.image?.width;
|
|
4313
|
+
const height = texture.image?.height;
|
|
4336
4314
|
assertSize(width, height, `Invalid image dimensions - texture "${texture.name || "unnamed"}" has invalid width (${width}) or height (${height}). Image dimensions must be non-zero positive numbers.`);
|
|
4337
4315
|
const material = new UIMaterial(texture);
|
|
4338
4316
|
const object = new Mesh(geometry, material);
|
|
@@ -4564,12 +4542,11 @@ class UIProgress extends UIElement {
|
|
|
4564
4542
|
* @throws Error if either texture has invalid dimensions
|
|
4565
4543
|
*/
|
|
4566
4544
|
constructor(layer, textureForeground, options = {}) {
|
|
4567
|
-
|
|
4568
|
-
const
|
|
4569
|
-
const foregroundHeight = (_b = textureForeground.image) === null || _b === void 0 ? void 0 : _b.height;
|
|
4545
|
+
const foregroundWidth = textureForeground.image?.width;
|
|
4546
|
+
const foregroundHeight = textureForeground.image?.height;
|
|
4570
4547
|
assertSize(foregroundWidth, foregroundHeight, `Invalid image dimensions - texture "${textureForeground.name || "unnamed"}" has invalid width (${foregroundWidth}) or height (${foregroundHeight}). Image dimensions must be non-zero positive numbers.`);
|
|
4571
|
-
const backgroundWidth =
|
|
4572
|
-
const backgroundHeight =
|
|
4548
|
+
const backgroundWidth = options.textureBackground?.image?.width;
|
|
4549
|
+
const backgroundHeight = options.textureBackground?.image?.height;
|
|
4573
4550
|
if (options.textureBackground) {
|
|
4574
4551
|
assertSize(backgroundWidth, backgroundHeight, `Invalid image dimensions - texture "${options.textureBackground.name || "unnamed"}" has invalid width (${backgroundWidth}) or height (${backgroundHeight}). Image dimensions must be non-zero positive numbers.`);
|
|
4575
4552
|
}
|
|
@@ -4602,8 +4579,8 @@ class UIProgress extends UIElement {
|
|
|
4602
4579
|
if (options.foregroundOpacity) {
|
|
4603
4580
|
material.setForegroundOpacity(options.foregroundOpacity);
|
|
4604
4581
|
}
|
|
4605
|
-
const imageWidth = backgroundWidth
|
|
4606
|
-
const imageHeight = foregroundHeight
|
|
4582
|
+
const imageWidth = backgroundWidth ?? foregroundWidth;
|
|
4583
|
+
const imageHeight = foregroundHeight ?? backgroundHeight;
|
|
4607
4584
|
super(layer, object, 0, 0, imageWidth, imageHeight);
|
|
4608
4585
|
this._private_material = material;
|
|
4609
4586
|
this._private_imageWidth = imageWidth;
|
|
@@ -4796,21 +4773,20 @@ class UIScene extends UIElement {
|
|
|
4796
4773
|
* @throws Error if resolution factor is out of valid range or dimensions are invalid
|
|
4797
4774
|
*/
|
|
4798
4775
|
constructor(layer, options = {}) {
|
|
4799
|
-
|
|
4800
|
-
const resolutionFactor = (_a = options.resolutionFactor) !== null && _a !== void 0 ? _a : DEFAULT_RESOLUTION_FACTOR;
|
|
4776
|
+
const resolutionFactor = options.resolutionFactor ?? DEFAULT_RESOLUTION_FACTOR;
|
|
4801
4777
|
if (resolutionFactor < MIN_RESOLUTION_FACTOR ||
|
|
4802
4778
|
resolutionFactor > MAX_RESOLUTION_FACTOR) {
|
|
4803
4779
|
throw new Error(`Invalid resolution factor: ${resolutionFactor}. Must be between ${MIN_RESOLUTION_FACTOR} and ${MAX_RESOLUTION_FACTOR}.`);
|
|
4804
4780
|
}
|
|
4805
|
-
const width =
|
|
4806
|
-
const height =
|
|
4781
|
+
const width = options.width ?? DEFAULT_WIDTH;
|
|
4782
|
+
const height = options.height ?? DEFAULT_HEIGHT;
|
|
4807
4783
|
assertSize(width, height, `Invalid width or height: ${width}x${height}. Must be positive.`);
|
|
4808
4784
|
const renderTarget = new WebGLRenderTarget(width * resolutionFactor, height * resolutionFactor, {
|
|
4809
4785
|
format: RGBAFormat,
|
|
4810
4786
|
minFilter: LinearFilter,
|
|
4811
4787
|
magFilter: LinearFilter,
|
|
4812
4788
|
type: UnsignedByteType,
|
|
4813
|
-
depthBuffer:
|
|
4789
|
+
depthBuffer: options.useDepth ?? DEFAULT_USE_DEPTH,
|
|
4814
4790
|
stencilBuffer: false,
|
|
4815
4791
|
});
|
|
4816
4792
|
const material = new UIMaterial(renderTarget.texture);
|
|
@@ -4818,16 +4794,17 @@ class UIScene extends UIElement {
|
|
|
4818
4794
|
super(layer, object, 0, 0, width, height);
|
|
4819
4795
|
/** Whether the scene needs to be re-rendered on the next frame */
|
|
4820
4796
|
this._private_needsRenderInternal = false;
|
|
4821
|
-
this._private_sceneInternal =
|
|
4797
|
+
this._private_sceneInternal = options.scene ?? new Scene();
|
|
4822
4798
|
this._private_cameraInternal =
|
|
4823
|
-
|
|
4799
|
+
options.camera ??
|
|
4800
|
+
new PerspectiveCamera(DEFAULT_FOV, width / height, DEFAULT_NEAR, DEFAULT_FAR);
|
|
4824
4801
|
this._private_resolutionFactorInternal = resolutionFactor;
|
|
4825
|
-
this._private_updateModeInternal =
|
|
4826
|
-
if (
|
|
4802
|
+
this._private_updateModeInternal = options.updateBehavior ?? DEFAULT_UPDATE_MODE;
|
|
4803
|
+
if (options.renderedByDefault ?? DEFAULT_RENDERED_BY_DEFAULT) {
|
|
4827
4804
|
this._private_needsRenderInternal = true;
|
|
4828
4805
|
}
|
|
4829
|
-
this._private_clearColorInternal =
|
|
4830
|
-
this._private_clearAlphaInternal =
|
|
4806
|
+
this._private_clearColorInternal = options.clearColor ?? DEFAULT_CLEAR_COLOR;
|
|
4807
|
+
this._private_clearAlphaInternal = options.clearAlpha ?? DEFAULT_CLEAR_ALPHA;
|
|
4831
4808
|
this._private_renderTarget = renderTarget;
|
|
4832
4809
|
this._private_material = material;
|
|
4833
4810
|
this.applyTransformations();
|
|
@@ -4981,7 +4958,6 @@ class UIScene extends UIElement {
|
|
|
4981
4958
|
}
|
|
4982
4959
|
|
|
4983
4960
|
function resolvePadding(padding) {
|
|
4984
|
-
var _a, _b, _c, _d;
|
|
4985
4961
|
if (typeof padding === "number") {
|
|
4986
4962
|
return {
|
|
4987
4963
|
left: padding,
|
|
@@ -4991,32 +4967,31 @@ function resolvePadding(padding) {
|
|
|
4991
4967
|
};
|
|
4992
4968
|
}
|
|
4993
4969
|
return {
|
|
4994
|
-
left: Math.max(
|
|
4995
|
-
right: Math.max(
|
|
4996
|
-
top: Math.max(
|
|
4997
|
-
bottom: Math.max(
|
|
4970
|
+
left: Math.max(padding?.left ?? 0, 0),
|
|
4971
|
+
right: Math.max(padding?.right ?? 0, 0),
|
|
4972
|
+
top: Math.max(padding?.top ?? 0, 0),
|
|
4973
|
+
bottom: Math.max(padding?.bottom ?? 0, 0),
|
|
4998
4974
|
};
|
|
4999
4975
|
}
|
|
5000
4976
|
function resolveTextStyle(currentStyle, baseStyle) {
|
|
5001
|
-
|
|
5002
|
-
const
|
|
5003
|
-
const
|
|
5004
|
-
const
|
|
5005
|
-
const strokeWidth = Math.max((_h = (_g = currentStyle === null || currentStyle === void 0 ? void 0 : currentStyle.strokeWidth) !== null && _g !== void 0 ? _g : baseStyle === null || baseStyle === void 0 ? void 0 : baseStyle.strokeWidth) !== null && _h !== void 0 ? _h : 0, 0);
|
|
4977
|
+
const fontSize = Math.max(currentStyle?.fontSize ?? baseStyle?.fontSize ?? 16, 1);
|
|
4978
|
+
const lineHeight = currentStyle?.lineHeight ?? baseStyle?.lineHeight ?? fontSize * 1.2;
|
|
4979
|
+
const shadowBlur = Math.max(currentStyle?.shadowBlur ?? baseStyle?.shadowBlur ?? 0, 0);
|
|
4980
|
+
const strokeWidth = Math.max(currentStyle?.strokeWidth ?? baseStyle?.strokeWidth ?? 0, 0);
|
|
5006
4981
|
return {
|
|
5007
|
-
color:
|
|
5008
|
-
fontFamily:
|
|
4982
|
+
color: currentStyle?.color ?? baseStyle?.color ?? "#000000",
|
|
4983
|
+
fontFamily: currentStyle?.fontFamily ?? baseStyle?.fontFamily ?? "Arial",
|
|
5009
4984
|
fontSize,
|
|
5010
|
-
fontStyle:
|
|
5011
|
-
fontWeight:
|
|
4985
|
+
fontStyle: currentStyle?.fontStyle ?? baseStyle?.fontStyle ?? "normal",
|
|
4986
|
+
fontWeight: currentStyle?.fontWeight ?? baseStyle?.fontWeight ?? "normal",
|
|
5012
4987
|
lineHeight,
|
|
5013
|
-
enableShadow:
|
|
5014
|
-
shadowOffsetX:
|
|
5015
|
-
shadowOffsetY:
|
|
4988
|
+
enableShadow: currentStyle?.enableShadow ?? baseStyle?.enableShadow ?? false,
|
|
4989
|
+
shadowOffsetX: currentStyle?.shadowOffsetX ?? baseStyle?.shadowOffsetX ?? 0,
|
|
4990
|
+
shadowOffsetY: currentStyle?.shadowOffsetY ?? baseStyle?.shadowOffsetY ?? 0,
|
|
5016
4991
|
shadowBlur,
|
|
5017
|
-
shadowColor:
|
|
5018
|
-
enableStroke:
|
|
5019
|
-
strokeColor:
|
|
4992
|
+
shadowColor: currentStyle?.shadowColor ?? baseStyle?.shadowColor ?? "transparent",
|
|
4993
|
+
enableStroke: currentStyle?.enableStroke ?? baseStyle?.enableStroke ?? false,
|
|
4994
|
+
strokeColor: currentStyle?.strokeColor ?? baseStyle?.strokeColor ?? "transparent",
|
|
5020
4995
|
strokeWidth,
|
|
5021
4996
|
};
|
|
5022
4997
|
}
|
|
@@ -5170,7 +5145,6 @@ class UIText extends UIElement {
|
|
|
5170
5145
|
* @throws Error if canvas context creation fails
|
|
5171
5146
|
*/
|
|
5172
5147
|
constructor(layer, spans, parameters = {}) {
|
|
5173
|
-
var _a;
|
|
5174
5148
|
const canvas = document.createElement("canvas");
|
|
5175
5149
|
const context = canvas.getContext("2d");
|
|
5176
5150
|
if (!context) {
|
|
@@ -5187,7 +5161,7 @@ class UIText extends UIElement {
|
|
|
5187
5161
|
chunks.push({ text, style, metrics });
|
|
5188
5162
|
}
|
|
5189
5163
|
}
|
|
5190
|
-
const wrappedLines = wrapTextLines(
|
|
5164
|
+
const wrappedLines = wrapTextLines(parameters.maxWidth ?? DEFAULT_LINE_SIZE, chunks);
|
|
5191
5165
|
const textBlockSize = calculateTextBlockSize(wrappedLines);
|
|
5192
5166
|
const padding = resolvePadding(parameters.padding);
|
|
5193
5167
|
canvas.width = textBlockSize.width + padding.left + padding.right;
|
|
@@ -5313,8 +5287,7 @@ class UIFullScreenLayer extends UILayer {
|
|
|
5313
5287
|
super.render(renderer, deltaTime);
|
|
5314
5288
|
}
|
|
5315
5289
|
_private_calculateScale() {
|
|
5316
|
-
|
|
5317
|
-
const targetHeight = (_a = this.tergetScreenHeight) !== null && _a !== void 0 ? _a : window.innerHeight;
|
|
5290
|
+
const targetHeight = this.tergetScreenHeight ?? window.innerHeight;
|
|
5318
5291
|
return targetHeight / window.innerHeight;
|
|
5319
5292
|
}
|
|
5320
5293
|
}
|