@pieai/swimmer-ui-kit 2.0.0 → 2.1.0
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/CHANGELOG.md +13 -1
- package/README.md +5 -1
- package/dist/index.d.ts +17 -0
- package/dist/index.js +937 -921
- package/dist/styles.css +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -296,7 +296,7 @@ void main(){
|
|
|
296
296
|
col = col * (1. + rip * 1.15 + well * 0.60);
|
|
297
297
|
|
|
298
298
|
o = vec4(col * pill * uHover, pill);
|
|
299
|
-
}`, ie = "#version 300 es\nprecision highp float;\nout vec4 o;\nuniform sampler2D uTex, uTex2;\nuniform vec2 uDstTexel; // 1 / destination size (maps dest fragCoord -> uv)\nuniform vec2 uSrcTexel; // 1 / source size (tap spacing)\nuniform float uAdd; // 1 to include uTex2\nvoid main(){\n vec2 uv = gl_FragCoord.xy * uDstTexel;\n // Taps sit a quarter of a *destination* texel out, so for a 2x reduction\n // they land exactly on the four source texel centres. Spacing them by a\n // whole source texel instead — as this did originally — skips every other\n // pixel, and any fine detail in the field folds down into low-frequency\n // moiré that no amount of subsequent blurring can remove.\n vec2 e = uDstTexel * 0.25;\n vec4 s = texture(uTex, uv + vec2(-e.x,-e.y)) + texture(uTex, uv + vec2( e.x,-e.y))\n + texture(uTex, uv + vec2(-e.x, e.y)) + texture(uTex, uv + vec2( e.x, e.y));\n s *= 0.25;\n if(uAdd > 0.5){\n vec4 r = texture(uTex2, uv + vec2(-e.x,-e.y)) + texture(uTex2, uv + vec2( e.x,-e.y))\n + texture(uTex2, uv + vec2(-e.x, e.y)) + texture(uTex2, uv + vec2( e.x, e.y));\n s.rgb += r.rgb * 0.25;\n }\n o = s;\n}", ae = "#version 300 es\nprecision highp float;\nout vec4 o;\nuniform sampler2D uTex; uniform vec2 uTexel; uniform vec2 uDir; uniform float uR;\nvoid main(){\n vec2 uv = gl_FragCoord.xy * uTexel;\n vec2 st = uTexel * uDir * uR;\n vec4 s = texture(uTex, uv) * 0.1964;\n s += (texture(uTex, uv + st*1.4118) + texture(uTex, uv - st*1.4118)) * 0.2969;\n s += (texture(uTex, uv + st*3.2941) + texture(uTex, uv - st*3.2941)) * 0.0944;\n s += (texture(uTex, uv + st*5.1765) + texture(uTex, uv - st*5.1765)) * 0.0104;\n o = s;\n}",
|
|
299
|
+
}`, ie = "#version 300 es\nprecision highp float;\nout vec4 o;\nuniform sampler2D uTex, uTex2;\nuniform vec2 uDstTexel; // 1 / destination size (maps dest fragCoord -> uv)\nuniform vec2 uSrcTexel; // 1 / source size (tap spacing)\nuniform float uAdd; // 1 to include uTex2\nvoid main(){\n vec2 uv = gl_FragCoord.xy * uDstTexel;\n // Taps sit a quarter of a *destination* texel out, so for a 2x reduction\n // they land exactly on the four source texel centres. Spacing them by a\n // whole source texel instead — as this did originally — skips every other\n // pixel, and any fine detail in the field folds down into low-frequency\n // moiré that no amount of subsequent blurring can remove.\n vec2 e = uDstTexel * 0.25;\n vec4 s = texture(uTex, uv + vec2(-e.x,-e.y)) + texture(uTex, uv + vec2( e.x,-e.y))\n + texture(uTex, uv + vec2(-e.x, e.y)) + texture(uTex, uv + vec2( e.x, e.y));\n s *= 0.25;\n if(uAdd > 0.5){\n vec4 r = texture(uTex2, uv + vec2(-e.x,-e.y)) + texture(uTex2, uv + vec2( e.x,-e.y))\n + texture(uTex2, uv + vec2(-e.x, e.y)) + texture(uTex2, uv + vec2( e.x, e.y));\n s.rgb += r.rgb * 0.25;\n }\n o = s;\n}", ae = "#version 300 es\nprecision highp float;\nout vec4 o;\nuniform sampler2D uTex; uniform vec2 uTexel; uniform vec2 uDir; uniform float uR;\nvoid main(){\n vec2 uv = gl_FragCoord.xy * uTexel;\n vec2 st = uTexel * uDir * uR;\n vec4 s = texture(uTex, uv) * 0.1964;\n s += (texture(uTex, uv + st*1.4118) + texture(uTex, uv - st*1.4118)) * 0.2969;\n s += (texture(uTex, uv + st*3.2941) + texture(uTex, uv - st*3.2941)) * 0.0944;\n s += (texture(uTex, uv + st*5.1765) + texture(uTex, uv - st*5.1765)) * 0.0104;\n o = s;\n}", oe = `${j}
|
|
300
300
|
uniform sampler2D uSoft, uRim, uGlow;
|
|
301
301
|
uniform vec2 uRes;
|
|
302
302
|
uniform float uGlowGain, uGlowIn, uOccl, uDim, uPunch;
|
|
@@ -345,7 +345,7 @@ void main(){
|
|
|
345
345
|
// CSS underneath, and this layer adds light on top of them
|
|
346
346
|
float a = clamp(max(rgb.r, max(rgb.g, rgb.b)), 0., 1.);
|
|
347
347
|
o = vec4(min(rgb, vec3(1.)), a);
|
|
348
|
-
}`,
|
|
348
|
+
}`, se = {
|
|
349
349
|
valFreq: .5,
|
|
350
350
|
valAmp: .55,
|
|
351
351
|
dens: 2.4,
|
|
@@ -367,7 +367,7 @@ void main(){
|
|
|
367
367
|
litLo: -.26,
|
|
368
368
|
litHi: .1,
|
|
369
369
|
dim: .44
|
|
370
|
-
},
|
|
370
|
+
}, ce = Object.keys(se), le = {
|
|
371
371
|
base: .2,
|
|
372
372
|
hot: .82,
|
|
373
373
|
chromA: .42,
|
|
@@ -376,14 +376,14 @@ void main(){
|
|
|
376
376
|
top: .35,
|
|
377
377
|
press: .85,
|
|
378
378
|
ripple: 1.6
|
|
379
|
-
},
|
|
379
|
+
}, ue = Object.keys(le), de = {
|
|
380
380
|
glow: 1.95,
|
|
381
381
|
glowR: 1.3,
|
|
382
382
|
glowIn: .3,
|
|
383
383
|
occl: .62,
|
|
384
384
|
soften: .24,
|
|
385
385
|
punch: 1.5
|
|
386
|
-
},
|
|
386
|
+
}, N = {
|
|
387
387
|
speed: 1.85,
|
|
388
388
|
width: .2,
|
|
389
389
|
decay: 1.35,
|
|
@@ -399,7 +399,7 @@ void main(){
|
|
|
399
399
|
ptrLag: .0016,
|
|
400
400
|
ptrVref: 4.5
|
|
401
401
|
};
|
|
402
|
-
function
|
|
402
|
+
function fe(e) {
|
|
403
403
|
let t = e.trim(), n = /^#([0-9a-f]{3,8})$/i.exec(t);
|
|
404
404
|
if (n?.[1]) {
|
|
405
405
|
let e = n[1];
|
|
@@ -424,11 +424,11 @@ function de(e) {
|
|
|
424
424
|
1
|
|
425
425
|
];
|
|
426
426
|
}
|
|
427
|
-
function
|
|
427
|
+
function pe(e, t, n) {
|
|
428
428
|
let r = Number.parseFloat(e.getPropertyValue(t).trim());
|
|
429
429
|
return Number.isFinite(r) ? r : n;
|
|
430
430
|
}
|
|
431
|
-
function
|
|
431
|
+
function me(e, t) {
|
|
432
432
|
let n = (e) => t[e] ?? null;
|
|
433
433
|
return {
|
|
434
434
|
f1: (t, r) => e.uniform1f(n(t), r),
|
|
@@ -440,7 +440,7 @@ function pe(e, t) {
|
|
|
440
440
|
i1: (t, r) => e.uniform1i(n(t), r)
|
|
441
441
|
};
|
|
442
442
|
}
|
|
443
|
-
function
|
|
443
|
+
function he(e, t, n) {
|
|
444
444
|
if (typeof e.getContext != "function") return null;
|
|
445
445
|
let r = null;
|
|
446
446
|
try {
|
|
@@ -456,21 +456,21 @@ function me(e, t, n) {
|
|
|
456
456
|
if (!r) return null;
|
|
457
457
|
let i = r;
|
|
458
458
|
try {
|
|
459
|
-
return
|
|
459
|
+
return _e(i, e, t, n);
|
|
460
460
|
} catch {
|
|
461
461
|
return i.getExtension("WEBGL_lose_context")?.loseContext(), null;
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
|
-
function
|
|
464
|
+
function ge(e, t, n) {
|
|
465
465
|
let r = e.createShader(t);
|
|
466
466
|
if (!r) throw Error("liquid-metal: createShader returned null");
|
|
467
467
|
if (e.shaderSource(r, n), e.compileShader(r), !e.getShaderParameter(r, e.COMPILE_STATUS)) throw Error(e.getShaderInfoLog(r) ?? "liquid-metal: shader compile failed");
|
|
468
468
|
return r;
|
|
469
469
|
}
|
|
470
|
-
function
|
|
470
|
+
function P(e, t) {
|
|
471
471
|
let n = e.createProgram();
|
|
472
472
|
if (!n) throw Error("liquid-metal: createProgram returned null");
|
|
473
|
-
if (e.attachShader(n,
|
|
473
|
+
if (e.attachShader(n, ge(e, e.VERTEX_SHADER, A)), e.attachShader(n, ge(e, e.FRAGMENT_SHADER, t)), e.bindAttribLocation(n, 0, "position"), e.linkProgram(n), !e.getProgramParameter(n, e.LINK_STATUS)) throw Error(e.getProgramInfoLog(n) ?? "liquid-metal: program link failed");
|
|
474
474
|
let r = {}, i = e.getProgramParameter(n, e.ACTIVE_UNIFORMS);
|
|
475
475
|
for (let t = 0; t < i; t += 1) {
|
|
476
476
|
let i = e.getActiveUniform(n, t);
|
|
@@ -481,8 +481,8 @@ function F(e, t) {
|
|
|
481
481
|
u: r
|
|
482
482
|
};
|
|
483
483
|
}
|
|
484
|
-
function
|
|
485
|
-
let i =
|
|
484
|
+
function _e(e, t, n, r) {
|
|
485
|
+
let i = P(e, re), a = P(e, M), o = P(e, ie), s = P(e, ae), c = P(e, oe), l = e.createVertexArray(), u = e.createBuffer();
|
|
486
486
|
if (!l || !u) throw Error("liquid-metal: VAO/VBO unavailable");
|
|
487
487
|
e.bindVertexArray(l), e.bindBuffer(e.ARRAY_BUFFER, u), e.bufferData(e.ARRAY_BUFFER, new Float32Array([
|
|
488
488
|
-1,
|
|
@@ -521,7 +521,7 @@ function ge(e, t, n, r) {
|
|
|
521
521
|
function k(t) {
|
|
522
522
|
e.bindFramebuffer(e.FRAMEBUFFER, t ? t.fbo : null), e.viewport(0, 0, t ? t.w : b, t ? t.h : x), e.drawArrays(e.TRIANGLES, 0, 3);
|
|
523
523
|
}
|
|
524
|
-
let te = new Float32Array(
|
|
524
|
+
let te = new Float32Array(ce.length), ne = new Float32Array(ue.length), A = 0, j = 0, he = 0, ge = performance.now(), _e = [
|
|
525
525
|
0,
|
|
526
526
|
1,
|
|
527
527
|
2
|
|
@@ -530,130 +530,130 @@ function ge(e, t, n, r) {
|
|
|
530
530
|
y: 0,
|
|
531
531
|
t: -99,
|
|
532
532
|
on: 0
|
|
533
|
-
})),
|
|
533
|
+
})), F = /* @__PURE__ */ new Float32Array(12), I = 0, L = 0, R = 0, ve = {
|
|
534
534
|
x: 0,
|
|
535
535
|
y: 0
|
|
536
|
-
},
|
|
536
|
+
}, z = {
|
|
537
537
|
x: 0,
|
|
538
538
|
y: 0
|
|
539
|
-
},
|
|
539
|
+
}, B = 0, ye = 0, V = {
|
|
540
540
|
over: !1,
|
|
541
541
|
press: !1,
|
|
542
542
|
focus: !1
|
|
543
543
|
};
|
|
544
|
-
function
|
|
545
|
-
let n =
|
|
546
|
-
n && (
|
|
544
|
+
function H(e, t) {
|
|
545
|
+
let n = _e[I];
|
|
546
|
+
n && (I = (I + 1) % _e.length, n.x = e, n.y = t, n.t = he, n.on = 1);
|
|
547
547
|
}
|
|
548
|
-
function
|
|
548
|
+
function U(e) {
|
|
549
549
|
let t = n.getBoundingClientRect(), r = t.height || 1;
|
|
550
550
|
return [(e.clientX - (t.left + t.width / 2)) / r, (e.clientY - (t.top + t.height / 2)) / r];
|
|
551
551
|
}
|
|
552
|
-
function
|
|
553
|
-
j =
|
|
552
|
+
function be() {
|
|
553
|
+
j = V.over || V.press || V.focus ? 1 : 0, R = +!!V.press;
|
|
554
554
|
}
|
|
555
|
-
let
|
|
555
|
+
let xe = window.matchMedia("(prefers-reduced-motion: reduce)"), Se = null, W = 0, Ce = !1, we = !1;
|
|
556
556
|
function Te() {
|
|
557
557
|
let e = getComputedStyle(n);
|
|
558
|
-
return
|
|
558
|
+
return le.base = pe(e, "--game-ui-liquid-metal-rest", le.base), le.speed = pe(e, "--game-ui-liquid-metal-sweep-speed", le.speed), se.disp = pe(e, "--game-ui-liquid-metal-dispersion", se.disp), de.glow = pe(e, "--game-ui-liquid-metal-bloom", de.glow), { accent: fe(getComputedStyle(O).color) };
|
|
559
559
|
}
|
|
560
560
|
function Ee(t) {
|
|
561
|
-
if (
|
|
562
|
-
let r = (t -
|
|
563
|
-
|
|
561
|
+
if (W = 0, Ce || we) return;
|
|
562
|
+
let r = (t - ge) / 1e3;
|
|
563
|
+
ge = t;
|
|
564
564
|
let l = Math.min(r, 1 / 20);
|
|
565
|
-
|
|
565
|
+
xe.matches || (he += l);
|
|
566
566
|
let u = j > A ? 1 - .0012 ** l : 1 - 12e-5 ** l;
|
|
567
567
|
A += (j - A) * u, Math.abs(j - A) < 8e-4 && (A = j);
|
|
568
|
-
let d =
|
|
569
|
-
|
|
568
|
+
let d = R > L ? 1 - 1e-9 ** l : 1 - .004 ** l;
|
|
569
|
+
L += (R - L) * d, Math.abs(R - L) < .002 && (L = R);
|
|
570
570
|
let f = !1;
|
|
571
|
-
for (let e = 0; e <
|
|
572
|
-
let t =
|
|
573
|
-
t && (t.on &&
|
|
571
|
+
for (let e = 0; e < _e.length; e += 1) {
|
|
572
|
+
let t = _e[e];
|
|
573
|
+
t && (t.on && he - t.t > 4 && (t.on = 0), t.on && (f = !0), F[e * 4] = t.x, F[e * 4 + 1] = t.y, F[e * 4 + 2] = t.t, F[e * 4 + 3] = t.on);
|
|
574
574
|
}
|
|
575
|
-
let p = 1 -
|
|
576
|
-
|
|
577
|
-
let re = Math.min(Math.hypot(O, M) / Math.max(l, .001) /
|
|
578
|
-
|
|
579
|
-
let ie =
|
|
580
|
-
|
|
581
|
-
let ae =
|
|
582
|
-
if (ae !== null && ae ===
|
|
583
|
-
|
|
575
|
+
let p = 1 - N.ptrLag ** +l, O = (ve.x - z.x) * p, M = (ve.y - z.y) * p;
|
|
576
|
+
z.x += O, z.y += M;
|
|
577
|
+
let re = Math.min(Math.hypot(O, M) / Math.max(l, .001) / N.ptrVref, 1);
|
|
578
|
+
ye += (re - ye) * (1 - (re > ye ? .001 : .02) ** l);
|
|
579
|
+
let ie = V.over || V.press ? 1 : 0;
|
|
580
|
+
B += (ie - B) * (1 - .004 ** l), Math.abs(ie - B) < .002 && (B = ie), V.over = n.matches(":hover"), V.focus = n.matches(":focus-visible"), be(), D && ee();
|
|
581
|
+
let ae = xe.matches && !f && B < .002 ? `${A}|${L}|${b}|${x}` : null;
|
|
582
|
+
if (ae !== null && ae === Se) {
|
|
583
|
+
W = requestAnimationFrame(Ee);
|
|
584
584
|
return;
|
|
585
585
|
}
|
|
586
|
-
|
|
587
|
-
let { accent:
|
|
586
|
+
Se = ae;
|
|
587
|
+
let { accent: oe } = Te();
|
|
588
588
|
for (let e = 0; e < te.length; e += 1) {
|
|
589
|
-
let t =
|
|
590
|
-
t && (te[e] =
|
|
589
|
+
let t = ce[e];
|
|
590
|
+
t && (te[e] = se[t]);
|
|
591
591
|
}
|
|
592
592
|
for (let e = 0; e < ne.length; e += 1) {
|
|
593
|
-
let t =
|
|
594
|
-
t && (ne[e] =
|
|
593
|
+
let t = ue[e];
|
|
594
|
+
t && (ne[e] = le[t]);
|
|
595
595
|
}
|
|
596
|
-
let
|
|
597
|
-
e.useProgram(i.p),
|
|
598
|
-
let De =
|
|
596
|
+
let fe = Math.max(C, 110), pe = Math.max(2.4, fe / 516 * 3.2), P = me(e, i.u), I = me(e, a.u), H = me(e, o.u), U = me(e, s.u), G = me(e, c.u);
|
|
597
|
+
e.useProgram(i.p), P.f2("uC", w, T), P.f2("uHalf", S / 2, C / 2), P.f1("uT", he), P.f1("uHover", A), P.f1("uPress", L), P.fv4("uRip", F), P.f4("uRipK", N.speed, N.width, N.decay, N.amp), P.f4("uRipK2", N.facet, N.lobes, N.sharp, N.emit), P.f4("uPtr", z.x, z.y, B, ye), P.f4("uPtrK", N.ptrRad, N.ptrAmp, N.ptrFast, N.ptrRim), P.f3("uAccent", oe[0], oe[1], oe[2]), P.fv1("uP", te), k(m), e.useProgram(a.p), I.f2("uC", w, T), I.f2("uHalf", S / 2, C / 2), I.f1("uT", he), I.f1("uBw", pe), I.f1("uPress", L), I.fv4("uRip", F), I.f4("uRipK", N.speed, N.width, N.decay, N.amp), I.f4("uRipK2", N.facet, N.lobes, N.sharp, N.emit), I.f4("uPtr", z.x, z.y, B, ye), I.f4("uPtrK", N.ptrRad, N.ptrAmp, N.ptrFast, N.ptrRim), I.f3("uAccent", oe[0], oe[1], oe[2]), I.fv1("uE", ne), k(h), e.useProgram(o.p), e.activeTexture(e.TEXTURE0), e.bindTexture(e.TEXTURE_2D, m.tex), H.i1("uTex", 0), H.f1("uAdd", 0), H.f2("uDstTexel", 1 / g.w, 1 / g.h), H.f2("uSrcTexel", 1 / b, 1 / x), k(g), e.useProgram(s.p), U.i1("uTex", 0), U.f2("uTexel", 1 / g.w, 1 / g.h);
|
|
598
|
+
let De = de.soften * (fe * .5) * .95;
|
|
599
599
|
if (De > .1) {
|
|
600
600
|
let t = Math.min(4, Math.max(1, Math.ceil(De / 3)));
|
|
601
|
-
|
|
602
|
-
for (let n = 0; n < t; n += 1) e.bindTexture(e.TEXTURE_2D, g.tex),
|
|
601
|
+
U.f1("uR", De / Math.sqrt(t) / 1.95);
|
|
602
|
+
for (let n = 0; n < t; n += 1) e.bindTexture(e.TEXTURE_2D, g.tex), U.f2("uDir", 1, 0), k(_), e.bindTexture(e.TEXTURE_2D, _.tex), U.f2("uDir", 0, 1), k(g);
|
|
603
603
|
}
|
|
604
|
-
e.useProgram(o.p), e.activeTexture(e.TEXTURE0), e.bindTexture(e.TEXTURE_2D, g.tex), e.activeTexture(e.TEXTURE1), e.bindTexture(e.TEXTURE_2D, h.tex),
|
|
605
|
-
let Oe =
|
|
604
|
+
e.useProgram(o.p), e.activeTexture(e.TEXTURE0), e.bindTexture(e.TEXTURE_2D, g.tex), e.activeTexture(e.TEXTURE1), e.bindTexture(e.TEXTURE_2D, h.tex), H.i1("uTex", 0), H.i1("uTex2", 1), H.f1("uAdd", 1), H.f2("uDstTexel", 1 / v.w, 1 / v.h), H.f2("uSrcTexel", 1 / g.w, 1 / g.h), k(v), e.useProgram(s.p), e.activeTexture(e.TEXTURE0), U.i1("uTex", 0), U.f2("uTexel", 1 / v.w, 1 / v.h);
|
|
605
|
+
let Oe = de.glowR * (fe / E) / 129;
|
|
606
606
|
for (let t of [
|
|
607
607
|
1,
|
|
608
608
|
2.3,
|
|
609
609
|
5.2,
|
|
610
610
|
9
|
|
611
|
-
].map((e) => e * Oe))
|
|
612
|
-
e.useProgram(c.p), e.activeTexture(e.TEXTURE0), e.bindTexture(e.TEXTURE_2D, g.tex), G.i1("uSoft", 0), e.activeTexture(e.TEXTURE1), e.bindTexture(e.TEXTURE_2D, h.tex), G.i1("uRim", 1), e.activeTexture(e.TEXTURE2), e.bindTexture(e.TEXTURE_2D, v.tex), G.i1("uGlow", 2), G.f2("uRes", b, x), G.f2("uC", w, T), G.f2("uHalf", S / 2, C / 2), G.f1("uT",
|
|
611
|
+
].map((e) => e * Oe)) U.f1("uR", t), e.bindTexture(e.TEXTURE_2D, v.tex), U.f2("uDir", 1, 0), k(y), e.bindTexture(e.TEXTURE_2D, y.tex), U.f2("uDir", 0, 1), k(v);
|
|
612
|
+
e.useProgram(c.p), e.activeTexture(e.TEXTURE0), e.bindTexture(e.TEXTURE_2D, g.tex), G.i1("uSoft", 0), e.activeTexture(e.TEXTURE1), e.bindTexture(e.TEXTURE_2D, h.tex), G.i1("uRim", 1), e.activeTexture(e.TEXTURE2), e.bindTexture(e.TEXTURE_2D, v.tex), G.i1("uGlow", 2), G.f2("uRes", b, x), G.f2("uC", w, T), G.f2("uHalf", S / 2, C / 2), G.f1("uT", he), G.fv4("uRip", F), G.f4("uRipK", N.speed, N.width, N.decay, N.amp), G.f4("uRipK2", N.facet, N.lobes, N.sharp, N.emit), G.f3("uAccent", oe[0], oe[1], oe[2]), G.f1("uGlowGain", de.glow), G.f1("uGlowIn", de.glowIn), G.f1("uOccl", de.occl), G.f1("uDim", se.dim), G.f1("uPunch", de.punch), k(null), W = requestAnimationFrame(Ee);
|
|
613
613
|
}
|
|
614
614
|
let G = (e) => {
|
|
615
615
|
if (e.pointerType !== "mouse") return;
|
|
616
|
-
let [t, n] =
|
|
617
|
-
|
|
616
|
+
let [t, n] = U(e);
|
|
617
|
+
ve.x = t, ve.y = n, z.x = t, z.y = n, ye = 0, V.over = !0, be();
|
|
618
618
|
}, De = (e) => {
|
|
619
|
-
e.pointerType === "mouse" && (
|
|
619
|
+
e.pointerType === "mouse" && (V.over = !1, be());
|
|
620
620
|
}, Oe = (e) => {
|
|
621
|
-
if (!
|
|
622
|
-
let [t, n] =
|
|
623
|
-
|
|
621
|
+
if (!V.over && !V.press) return;
|
|
622
|
+
let [t, n] = U(e);
|
|
623
|
+
ve.x = t, ve.y = n;
|
|
624
624
|
}, ke = (e) => {
|
|
625
|
-
let [t, n] =
|
|
626
|
-
|
|
625
|
+
let [t, n] = U(e);
|
|
626
|
+
ve.x = t, ve.y = n, V.press = !0, be(), H(t, n);
|
|
627
627
|
}, Ae = () => {
|
|
628
|
-
|
|
628
|
+
V.press = !1, be();
|
|
629
629
|
}, je = () => {
|
|
630
|
-
|
|
630
|
+
V.focus = n.matches(":focus-visible"), be();
|
|
631
631
|
}, Me = () => {
|
|
632
|
-
|
|
632
|
+
V.focus = !1, be();
|
|
633
633
|
}, Ne = (e) => {
|
|
634
|
-
e.key !== "Enter" && e.key !== " " || e.repeat || (
|
|
634
|
+
e.key !== "Enter" && e.key !== " " || e.repeat || (V.press = !0, be(), H(0, 0));
|
|
635
635
|
}, Pe = (e) => {
|
|
636
|
-
e.key !== "Enter" && e.key !== " " || (
|
|
636
|
+
e.key !== "Enter" && e.key !== " " || (V.press = !1, be());
|
|
637
637
|
};
|
|
638
638
|
n.addEventListener("pointerenter", G), n.addEventListener("pointerleave", De), window.addEventListener("pointermove", Oe, { passive: !0 }), n.addEventListener("pointerdown", ke), window.addEventListener("pointerup", Ae), window.addEventListener("pointercancel", Ae), n.addEventListener("focus", je), n.addEventListener("blur", Me), n.addEventListener("keydown", Ne), n.addEventListener("keyup", Pe);
|
|
639
639
|
let Fe = new ResizeObserver(() => {
|
|
640
640
|
D = !0;
|
|
641
641
|
});
|
|
642
|
-
return Fe.observe(r), Fe.observe(n), ee(),
|
|
642
|
+
return Fe.observe(r), Fe.observe(n), ee(), W = requestAnimationFrame(Ee), {
|
|
643
643
|
pause: () => {
|
|
644
|
-
Ce = !0,
|
|
644
|
+
Ce = !0, W && cancelAnimationFrame(W), W = 0;
|
|
645
645
|
},
|
|
646
646
|
resume: () => {
|
|
647
|
-
we || (Ce = !1,
|
|
647
|
+
we || (Ce = !1, ge = performance.now(), Se = null, W ||= requestAnimationFrame(Ee));
|
|
648
648
|
},
|
|
649
649
|
dispose: () => {
|
|
650
|
-
we || (we = !0, Ce = !0,
|
|
650
|
+
we || (we = !0, Ce = !0, W && cancelAnimationFrame(W), W = 0, Fe.disconnect(), n.removeEventListener("pointerenter", G), n.removeEventListener("pointerleave", De), window.removeEventListener("pointermove", Oe), n.removeEventListener("pointerdown", ke), window.removeEventListener("pointerup", Ae), window.removeEventListener("pointercancel", Ae), n.removeEventListener("focus", je), n.removeEventListener("blur", Me), n.removeEventListener("keydown", Ne), n.removeEventListener("keyup", Pe), O.remove(), e.getExtension("WEBGL_lose_context")?.loseContext());
|
|
651
651
|
}
|
|
652
652
|
};
|
|
653
653
|
}
|
|
654
654
|
//#endregion
|
|
655
655
|
//#region src/LiquidMetalButton.tsx
|
|
656
|
-
function
|
|
656
|
+
function F({ children: e, className: r, onClick: i, sound: a = !1, type: o = "button", renderer: s = "auto", ...c }) {
|
|
657
657
|
let u = p(null), d = p(null), f = p(null), [h, g] = m("css");
|
|
658
658
|
l(() => {
|
|
659
659
|
let e = u.current, t = d.current, n = f.current;
|
|
@@ -667,7 +667,7 @@ function I({ children: e, className: r, onClick: i, sound: a = !1, type: o = "bu
|
|
|
667
667
|
prefersReducedMotion: r.matches,
|
|
668
668
|
isInViewport: i
|
|
669
669
|
}) && k()) {
|
|
670
|
-
if (a = !0, o =
|
|
670
|
+
if (a = !0, o = he(n, t, e), !o) {
|
|
671
671
|
te(), a = !1;
|
|
672
672
|
return;
|
|
673
673
|
}
|
|
@@ -725,7 +725,7 @@ function I({ children: e, className: r, onClick: i, sound: a = !1, type: o = "bu
|
|
|
725
725
|
}
|
|
726
726
|
//#endregion
|
|
727
727
|
//#region src/clay/tokens.ts
|
|
728
|
-
var
|
|
728
|
+
var I = {
|
|
729
729
|
ink: "#3b2d23",
|
|
730
730
|
inkMuted: "#786250",
|
|
731
731
|
parchment: "#fff8ec",
|
|
@@ -748,7 +748,7 @@ var L = {
|
|
|
748
748
|
overlayGlassText: "#fff6ee",
|
|
749
749
|
liquidMetalFace: "#3a2518",
|
|
750
750
|
liquidMetalInk: "#fff8ec"
|
|
751
|
-
},
|
|
751
|
+
}, L = {
|
|
752
752
|
face: "var(--game-ui-liquid-metal-face)",
|
|
753
753
|
ink: "var(--game-ui-liquid-metal-ink)",
|
|
754
754
|
accent: "var(--game-ui-liquid-metal-accent)",
|
|
@@ -756,7 +756,7 @@ var L = {
|
|
|
756
756
|
sweepSpeed: "var(--game-ui-liquid-metal-sweep-speed)",
|
|
757
757
|
rest: "var(--game-ui-liquid-metal-rest)",
|
|
758
758
|
bloom: "var(--game-ui-liquid-metal-bloom)"
|
|
759
|
-
},
|
|
759
|
+
}, R = {
|
|
760
760
|
morphShape: "var(--game-ui-liquid-gooey-morph-shape)",
|
|
761
761
|
morphSpeed: "var(--game-ui-liquid-gooey-morph-speed)",
|
|
762
762
|
morphBounce: "var(--game-ui-liquid-gooey-morph-bounce)",
|
|
@@ -840,7 +840,7 @@ var L = {
|
|
|
840
840
|
dissolveStrength: "var(--game-ui-liquid-gooey-dissolve-strength)",
|
|
841
841
|
dissolveSink: "var(--game-ui-liquid-gooey-dissolve-sink)",
|
|
842
842
|
dissolveSeamBlur: "var(--game-ui-liquid-gooey-dissolve-seam-blur)"
|
|
843
|
-
},
|
|
843
|
+
}, ve = {
|
|
844
844
|
bg: "var(--game-ui-overlay-glass-bg)",
|
|
845
845
|
bgHover: "var(--game-ui-overlay-glass-bg-hover)",
|
|
846
846
|
bgStrong: "var(--game-ui-overlay-glass-bg-strong)",
|
|
@@ -852,7 +852,7 @@ var L = {
|
|
|
852
852
|
blur: "var(--game-ui-overlay-glass-blur)",
|
|
853
853
|
focusRing: "var(--game-ui-overlay-glass-focus-ring)",
|
|
854
854
|
primaryFill: "var(--game-ui-overlay-glass-primary-fill)"
|
|
855
|
-
},
|
|
855
|
+
}, z = {
|
|
856
856
|
background: "var(--game-ui-bg)",
|
|
857
857
|
playfieldScrim: "var(--game-ui-playfield-scrim)",
|
|
858
858
|
surface: "var(--game-ui-surface)",
|
|
@@ -871,7 +871,7 @@ var L = {
|
|
|
871
871
|
borderSubtle: "var(--game-ui-border-subtle)",
|
|
872
872
|
borderStrong: "var(--game-ui-border-strong)",
|
|
873
873
|
disabled: "var(--game-ui-disabled)"
|
|
874
|
-
},
|
|
874
|
+
}, B = {
|
|
875
875
|
familyDisplay: "var(--game-ui-font-display)",
|
|
876
876
|
familyBody: "var(--game-ui-font-body)",
|
|
877
877
|
familyMono: "var(--game-ui-font-mono)",
|
|
@@ -889,7 +889,7 @@ var L = {
|
|
|
889
889
|
weightBody: "var(--game-ui-weight-body)",
|
|
890
890
|
weightStrong: "var(--game-ui-weight-strong)",
|
|
891
891
|
weightTitle: "var(--game-ui-weight-title)"
|
|
892
|
-
},
|
|
892
|
+
}, ye = {
|
|
893
893
|
px2: "var(--game-ui-space-2)",
|
|
894
894
|
px4: "var(--game-ui-space-4)",
|
|
895
895
|
px6: "var(--game-ui-space-6)",
|
|
@@ -904,33 +904,38 @@ var L = {
|
|
|
904
904
|
safeRight: "var(--game-ui-safe-right)",
|
|
905
905
|
safeBottom: "var(--game-ui-safe-bottom)",
|
|
906
906
|
safeLeft: "var(--game-ui-safe-left)"
|
|
907
|
-
},
|
|
907
|
+
}, V = {
|
|
908
908
|
bead: "var(--game-ui-radius-bead)",
|
|
909
909
|
control: "var(--game-ui-radius-control)",
|
|
910
910
|
card: "var(--game-ui-radius-card)",
|
|
911
911
|
panel: "var(--game-ui-radius-panel)",
|
|
912
912
|
modal: "var(--game-ui-radius-modal)"
|
|
913
|
+
}, H = {
|
|
914
|
+
size: "var(--game-ui-scrollbar-size)",
|
|
915
|
+
track: "var(--game-ui-scrollbar-track)",
|
|
916
|
+
thumb: "var(--game-ui-scrollbar-thumb)",
|
|
917
|
+
thumbHover: "var(--game-ui-scrollbar-thumb-hover)"
|
|
913
918
|
}, U = {
|
|
914
919
|
button: "var(--game-ui-shadow-button)",
|
|
915
920
|
panel: "var(--game-ui-shadow-panel)",
|
|
916
921
|
modal: "var(--game-ui-shadow-modal)",
|
|
917
922
|
inset: "var(--game-ui-shadow-inset)",
|
|
918
923
|
stroke: "var(--game-ui-stroke)"
|
|
919
|
-
},
|
|
924
|
+
}, be = {
|
|
920
925
|
fast: "var(--game-ui-motion-fast)",
|
|
921
926
|
base: "var(--game-ui-motion-base)",
|
|
922
927
|
slow: "var(--game-ui-motion-slow)",
|
|
923
928
|
easingPop: "var(--game-ui-ease-pop)",
|
|
924
929
|
easingSoft: "var(--game-ui-ease-soft)",
|
|
925
930
|
reducedMotion: "var(--game-ui-reduced-motion-policy)"
|
|
926
|
-
},
|
|
931
|
+
}, xe = {
|
|
927
932
|
playfield: "var(--game-ui-z-playfield)",
|
|
928
933
|
hud: "var(--game-ui-z-hud)",
|
|
929
934
|
sidebar: "var(--game-ui-z-sidebar)",
|
|
930
935
|
overlay: "var(--game-ui-z-overlay)",
|
|
931
936
|
modal: "var(--game-ui-z-modal)",
|
|
932
937
|
toast: "var(--game-ui-z-toast)"
|
|
933
|
-
},
|
|
938
|
+
}, Se = {
|
|
934
939
|
touchMinimumPx: 44,
|
|
935
940
|
touchPrimaryPx: 52,
|
|
936
941
|
touchIconPx: 48,
|
|
@@ -941,7 +946,7 @@ var L = {
|
|
|
941
946
|
desktopProofHeightPx: 900,
|
|
942
947
|
mobileLandscapeProofWidthPx: 844,
|
|
943
948
|
mobileLandscapeProofHeightPx: 390
|
|
944
|
-
},
|
|
949
|
+
}, W = {
|
|
945
950
|
iconSm: "var(--game-ui-asset-icon-sm)",
|
|
946
951
|
iconMd: "var(--game-ui-asset-icon-md)",
|
|
947
952
|
iconLg: "var(--game-ui-asset-icon-lg)",
|
|
@@ -953,58 +958,59 @@ var L = {
|
|
|
953
958
|
terrainToolHitSize: "var(--game-ui-terrain-tool-hit-size)",
|
|
954
959
|
buildRailCardSize: "var(--game-ui-build-rail-card-size)",
|
|
955
960
|
brushNumberWidth: "var(--game-ui-brush-number-width)"
|
|
956
|
-
},
|
|
957
|
-
colors:
|
|
958
|
-
semantic:
|
|
959
|
-
typography:
|
|
960
|
-
spacing:
|
|
961
|
-
radius:
|
|
961
|
+
}, Ce = {
|
|
962
|
+
colors: I,
|
|
963
|
+
semantic: z,
|
|
964
|
+
typography: B,
|
|
965
|
+
spacing: ye,
|
|
966
|
+
radius: V,
|
|
967
|
+
scrollbars: H,
|
|
962
968
|
elevation: U,
|
|
963
|
-
motion:
|
|
964
|
-
layers:
|
|
965
|
-
targets:
|
|
966
|
-
assetSizing:
|
|
967
|
-
overlayGlass:
|
|
968
|
-
liquidMetal:
|
|
969
|
-
liquidGooey:
|
|
970
|
-
},
|
|
971
|
-
function
|
|
969
|
+
motion: be,
|
|
970
|
+
layers: xe,
|
|
971
|
+
targets: Se,
|
|
972
|
+
assetSizing: W,
|
|
973
|
+
overlayGlass: ve,
|
|
974
|
+
liquidMetal: L,
|
|
975
|
+
liquidGooey: R
|
|
976
|
+
}, we = 2, Te = 48e4, Ee = 2, G = Te, De = 0;
|
|
977
|
+
function Oe(e, t) {
|
|
972
978
|
return Number.isFinite(e) ? Math.max(0, Math.floor(e)) : t;
|
|
973
979
|
}
|
|
974
|
-
function
|
|
980
|
+
function ke() {
|
|
975
981
|
return {
|
|
976
|
-
maxAnimatedGroups:
|
|
977
|
-
maxFilterArea:
|
|
978
|
-
activeGroups:
|
|
982
|
+
maxAnimatedGroups: Ee,
|
|
983
|
+
maxFilterArea: G,
|
|
984
|
+
activeGroups: De
|
|
979
985
|
};
|
|
980
986
|
}
|
|
981
|
-
function
|
|
987
|
+
function Ae(e) {
|
|
982
988
|
if (typeof e == "number") {
|
|
983
|
-
|
|
989
|
+
Ee = Oe(e, 0);
|
|
984
990
|
return;
|
|
985
991
|
}
|
|
986
|
-
e.maxAnimatedGroups !== void 0 && (
|
|
992
|
+
e.maxAnimatedGroups !== void 0 && (Ee = Oe(e.maxAnimatedGroups, 0)), e.maxFilterArea !== void 0 && (G = Oe(e.maxFilterArea, 0));
|
|
987
993
|
}
|
|
988
|
-
function
|
|
989
|
-
return
|
|
994
|
+
function je(e) {
|
|
995
|
+
return De >= Ee || (Number.isFinite(e) ? Math.max(0, e) : Infinity) > G ? !1 : (De += 1, !0);
|
|
990
996
|
}
|
|
991
|
-
function
|
|
992
|
-
|
|
997
|
+
function Me() {
|
|
998
|
+
De > 0 && --De;
|
|
993
999
|
}
|
|
994
1000
|
//#endregion
|
|
995
1001
|
//#region src/liquidGooeyFilter.tsx
|
|
996
|
-
var
|
|
1002
|
+
var Ne = "1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 60 -29.5", Pe = .5, Fe = {
|
|
997
1003
|
waviness: 6,
|
|
998
1004
|
wavinessFreq: .018
|
|
999
1005
|
};
|
|
1000
|
-
function
|
|
1006
|
+
function Ie(e) {
|
|
1001
1007
|
return e.spread === 0 ? "shape" : "bin";
|
|
1002
1008
|
}
|
|
1003
|
-
function
|
|
1009
|
+
function Le(e, t) {
|
|
1004
1010
|
return t !== null || e.some((e) => e.spread !== 0);
|
|
1005
1011
|
}
|
|
1006
|
-
function
|
|
1007
|
-
let i = [], a =
|
|
1012
|
+
function Re({ index: n, shadow: r }) {
|
|
1013
|
+
let i = [], a = Ie(r), o = a;
|
|
1008
1014
|
return r.spread !== 0 && (i.push(/* @__PURE__ */ t("feMorphology", {
|
|
1009
1015
|
in: o,
|
|
1010
1016
|
operator: r.spread > 0 ? "erode" : "dilate",
|
|
@@ -1034,7 +1040,7 @@ function Le({ index: n, shadow: r }) {
|
|
|
1034
1040
|
result: `shadow-${n}`
|
|
1035
1041
|
}, "fill")), /* @__PURE__ */ t(e, { children: i });
|
|
1036
1042
|
}
|
|
1037
|
-
function
|
|
1043
|
+
function ze({ index: n, shadow: r }) {
|
|
1038
1044
|
let i = [], a = "shape";
|
|
1039
1045
|
return r.spread !== 0 && (i.push(/* @__PURE__ */ t("feMorphology", {
|
|
1040
1046
|
in: "bin",
|
|
@@ -1060,7 +1066,7 @@ function Re({ index: n, shadow: r }) {
|
|
|
1060
1066
|
result: `shadow-${n}`
|
|
1061
1067
|
}, "fill")), /* @__PURE__ */ t(e, { children: i });
|
|
1062
1068
|
}
|
|
1063
|
-
function
|
|
1069
|
+
function Be({ stroke: n }) {
|
|
1064
1070
|
let r = [];
|
|
1065
1071
|
return r.push(/* @__PURE__ */ t("feMorphology", {
|
|
1066
1072
|
in: "bin",
|
|
@@ -1082,7 +1088,7 @@ function ze({ stroke: n }) {
|
|
|
1082
1088
|
result: "stroke-out"
|
|
1083
1089
|
}, "fill")), /* @__PURE__ */ t(e, { children: r });
|
|
1084
1090
|
}
|
|
1085
|
-
function
|
|
1091
|
+
function Ve({ blur: r, contrast: i, shadows: a, stroke: o, waviness: s = Fe.waviness, wavinessFreq: c = Fe.wavinessFreq }) {
|
|
1086
1092
|
let l = Math.round((.5 - 5 / 12 * i) * 100) / 100, u = s > 0;
|
|
1087
1093
|
return /* @__PURE__ */ n(e, { children: [
|
|
1088
1094
|
/* @__PURE__ */ t("feGaussianBlur", {
|
|
@@ -1120,24 +1126,24 @@ function Be({ blur: r, contrast: i, shadows: a, stroke: o, waviness: s = Pe.wavi
|
|
|
1120
1126
|
}),
|
|
1121
1127
|
/* @__PURE__ */ t("feGaussianBlur", {
|
|
1122
1128
|
in: "shape-displaced",
|
|
1123
|
-
stdDeviation:
|
|
1129
|
+
stdDeviation: Pe,
|
|
1124
1130
|
result: "shape"
|
|
1125
1131
|
})
|
|
1126
1132
|
] }) : null,
|
|
1127
|
-
|
|
1133
|
+
Le(a, o) ? /* @__PURE__ */ t("feColorMatrix", {
|
|
1128
1134
|
in: "shape",
|
|
1129
1135
|
type: "matrix",
|
|
1130
|
-
values:
|
|
1136
|
+
values: Ne,
|
|
1131
1137
|
result: "bin"
|
|
1132
1138
|
}) : null,
|
|
1133
|
-
a.map((e, n) => e.inset ? /* @__PURE__ */ t(
|
|
1139
|
+
a.map((e, n) => e.inset ? /* @__PURE__ */ t(Re, {
|
|
1134
1140
|
index: n,
|
|
1135
1141
|
shadow: e
|
|
1136
|
-
}, n) : /* @__PURE__ */ t(
|
|
1142
|
+
}, n) : /* @__PURE__ */ t(ze, {
|
|
1137
1143
|
index: n,
|
|
1138
1144
|
shadow: e
|
|
1139
1145
|
}, n)),
|
|
1140
|
-
o ? /* @__PURE__ */ t(
|
|
1146
|
+
o ? /* @__PURE__ */ t(Be, { stroke: o }) : null,
|
|
1141
1147
|
a.length > 0 || o ? /* @__PURE__ */ n("feMerge", { children: [
|
|
1142
1148
|
a.map((e, t) => e.inset ? -1 : t).filter((e) => e >= 0).reverse().map((e) => /* @__PURE__ */ t("feMergeNode", { in: `shadow-${e}` }, e)),
|
|
1143
1149
|
/* @__PURE__ */ t("feMergeNode", { in: "shape" }),
|
|
@@ -1148,16 +1154,16 @@ function Be({ blur: r, contrast: i, shadows: a, stroke: o, waviness: s = Pe.wavi
|
|
|
1148
1154
|
}
|
|
1149
1155
|
//#endregion
|
|
1150
1156
|
//#region src/liquidGooeyWaviness.ts
|
|
1151
|
-
var
|
|
1152
|
-
function
|
|
1157
|
+
var He = .3;
|
|
1158
|
+
function Ue(e, t, n = He) {
|
|
1153
1159
|
let r = Math.max(0, Number.isFinite(e) ? e : 0);
|
|
1154
1160
|
if (n === !1) return r;
|
|
1155
|
-
let i = Math.max(0, Number.isFinite(n) ? n :
|
|
1161
|
+
let i = Math.max(0, Number.isFinite(n) ? n : He), a = Math.max(0, Number.isFinite(t) ? t : 0);
|
|
1156
1162
|
return a > 0 ? Math.min(r, a * i) : r;
|
|
1157
1163
|
}
|
|
1158
1164
|
//#endregion
|
|
1159
1165
|
//#region src/liquidGooeyGeometry.ts
|
|
1160
|
-
function
|
|
1166
|
+
function We(e, t) {
|
|
1161
1167
|
let n = 0, r = 0, i = e;
|
|
1162
1168
|
for (; i && i !== t && t.contains(i);) n += i.offsetLeft, r += i.offsetTop, i = i.offsetParent;
|
|
1163
1169
|
return {
|
|
@@ -1165,7 +1171,7 @@ function Ue(e, t) {
|
|
|
1165
1171
|
y: r
|
|
1166
1172
|
};
|
|
1167
1173
|
}
|
|
1168
|
-
function
|
|
1174
|
+
function Ge(e, t, n) {
|
|
1169
1175
|
let r = getComputedStyle(e), i = (e) => {
|
|
1170
1176
|
let r = e.split(" ")[0] ?? "";
|
|
1171
1177
|
return r.endsWith("%") ? (parseFloat(r) || 0) / 100 * Math.min(t, n) : parseFloat(r) || 0;
|
|
@@ -1177,7 +1183,7 @@ function We(e, t, n) {
|
|
|
1177
1183
|
i(r.borderBottomLeftRadius)
|
|
1178
1184
|
];
|
|
1179
1185
|
}
|
|
1180
|
-
function
|
|
1186
|
+
function Ke(e) {
|
|
1181
1187
|
return typeof e == "number" ? [
|
|
1182
1188
|
e,
|
|
1183
1189
|
e,
|
|
@@ -1185,13 +1191,13 @@ function Ge(e) {
|
|
|
1185
1191
|
e
|
|
1186
1192
|
] : e;
|
|
1187
1193
|
}
|
|
1188
|
-
function
|
|
1194
|
+
function qe(e, t, n, r, i) {
|
|
1189
1195
|
let [a, o, s, c] = i.map((e) => Math.max(0, e)), l = Math.min(1, n / Math.max(1e-6, a + o), n / Math.max(1e-6, c + s), r / Math.max(1e-6, a + c), r / Math.max(1e-6, o + s));
|
|
1190
1196
|
return a *= l, o *= l, s *= l, c *= l, `M ${e + a} ${t} H ${e + n - o} A ${o} ${o} 0 0 1 ${e + n} ${t + o} V ${t + r - s} A ${s} ${s} 0 0 1 ${e + n - s} ${t + r} H ${e + c} A ${c} ${c} 0 0 1 ${e} ${t + r - c} V ${t + a} A ${a} ${a} 0 0 1 ${e + a} ${t} Z`;
|
|
1191
1197
|
}
|
|
1192
1198
|
//#endregion
|
|
1193
1199
|
//#region src/liquidGooeyMove.ts
|
|
1194
|
-
var
|
|
1200
|
+
var Je = {
|
|
1195
1201
|
stiffness: 380,
|
|
1196
1202
|
damping: 18,
|
|
1197
1203
|
stretch: .18,
|
|
@@ -1221,29 +1227,29 @@ var qe = {
|
|
|
1221
1227
|
settleSpeed: 1,
|
|
1222
1228
|
integrationRate: 60
|
|
1223
1229
|
};
|
|
1224
|
-
function
|
|
1230
|
+
function Ye(e, t = 0, n = 1) {
|
|
1225
1231
|
return Math.min(n, Math.max(t, e));
|
|
1226
1232
|
}
|
|
1227
|
-
function
|
|
1233
|
+
function Xe(e, t) {
|
|
1228
1234
|
return e !== void 0 && Number.isFinite(e) ? e : t;
|
|
1229
1235
|
}
|
|
1230
|
-
function
|
|
1236
|
+
function Ze(e) {
|
|
1231
1237
|
return /^var\((--[\w-]+)\)$/.exec(e.trim())?.[1] ?? null;
|
|
1232
1238
|
}
|
|
1233
|
-
function
|
|
1234
|
-
let r = e?.ownerDocument.defaultView, i =
|
|
1239
|
+
function Qe(e, t, n) {
|
|
1240
|
+
let r = e?.ownerDocument.defaultView, i = Ze(R[t]);
|
|
1235
1241
|
if (!r || !i) return n;
|
|
1236
1242
|
let a = r.getComputedStyle(e).getPropertyValue(i), o = Number.parseFloat(a);
|
|
1237
1243
|
return Number.isFinite(o) ? o : n;
|
|
1238
1244
|
}
|
|
1239
|
-
function
|
|
1240
|
-
let t = (t, n) =>
|
|
1245
|
+
function $e(e) {
|
|
1246
|
+
let t = (t, n) => Qe(e, t, n);
|
|
1241
1247
|
return {
|
|
1242
|
-
stiffness: Math.max(.001, t("moveStiffness",
|
|
1243
|
-
damping: Math.max(0, t("moveDamping",
|
|
1244
|
-
stretch:
|
|
1245
|
-
tail:
|
|
1246
|
-
force:
|
|
1248
|
+
stiffness: Math.max(.001, t("moveStiffness", Je.stiffness)),
|
|
1249
|
+
damping: Math.max(0, t("moveDamping", Je.damping)),
|
|
1250
|
+
stretch: Ye(t("moveStretch", Je.stretch)),
|
|
1251
|
+
tail: Ye(t("moveTail", Je.tail)),
|
|
1252
|
+
force: Ye(t("moveForce", Je.force)),
|
|
1247
1253
|
tailSpringStiffness: Math.max(.001, t("moveTailSpringStiffness", K.tailSpringStiffness)),
|
|
1248
1254
|
tailSpringDamping: Math.max(0, t("moveTailSpringDamping", K.tailSpringDamping)),
|
|
1249
1255
|
stretchSpeed: Math.max(0, t("moveStretchSpeed", K.stretchSpeed)),
|
|
@@ -1255,10 +1261,10 @@ function Qe(e) {
|
|
|
1255
1261
|
tailMinRadius: Math.max(0, t("moveTailMinRadius", K.tailMinRadius)),
|
|
1256
1262
|
tailWobble: Math.max(0, t("moveTailWobble", K.tailWobble)),
|
|
1257
1263
|
tailPhaseSpeed: Math.max(0, t("moveTailPhaseSpeed", K.tailPhaseSpeed)),
|
|
1258
|
-
tailMidpointA:
|
|
1259
|
-
tailMidpointB:
|
|
1260
|
-
tailMidRadiusA:
|
|
1261
|
-
tailMidRadiusB:
|
|
1264
|
+
tailMidpointA: Ye(t("moveTailMidpointA", K.tailMidpointA)),
|
|
1265
|
+
tailMidpointB: Ye(t("moveTailMidpointB", K.tailMidpointB)),
|
|
1266
|
+
tailMidRadiusA: Ye(t("moveTailMidRadiusA", K.tailMidRadiusA)),
|
|
1267
|
+
tailMidRadiusB: Ye(t("moveTailMidRadiusB", K.tailMidRadiusB)),
|
|
1262
1268
|
tailWobblePhase: t("moveTailWobblePhase", K.tailWobblePhase),
|
|
1263
1269
|
minPerpendicular: Math.max(0, t("moveMinPerpendicular", K.minPerpendicular)),
|
|
1264
1270
|
lagBase: Math.max(0, t("moveLagBase", K.lagBase)),
|
|
@@ -1268,32 +1274,32 @@ function Qe(e) {
|
|
|
1268
1274
|
integrationRate: Math.max(1, t("moveIntegrationRate", K.integrationRate))
|
|
1269
1275
|
};
|
|
1270
1276
|
}
|
|
1271
|
-
function
|
|
1277
|
+
function et(e, t) {
|
|
1272
1278
|
return {
|
|
1273
|
-
vertical:
|
|
1274
|
-
horizontal:
|
|
1275
|
-
velocityVertical: Math.max(0,
|
|
1276
|
-
velocityHorizontal: Math.max(0,
|
|
1277
|
-
smoothing: Math.max(0,
|
|
1278
|
-
activeThreshold: Math.max(0,
|
|
1279
|
-
verticalCap: Math.max(0,
|
|
1280
|
-
horizontalCap: Math.max(0,
|
|
1281
|
-
radiusMin: Math.max(0,
|
|
1282
|
-
radiusMax: Math.max(0,
|
|
1283
|
-
leadingCapFactor: Math.max(0,
|
|
1284
|
-
trailingCapFactor: Math.max(0,
|
|
1279
|
+
vertical: Ye(Xe(t?.vertical, Qe(e, "bendVertical", .6))),
|
|
1280
|
+
horizontal: Ye(Xe(t?.horizontal, Qe(e, "bendHorizontal", .35))),
|
|
1281
|
+
velocityVertical: Math.max(0, Qe(e, "bendVelocityVertical", .05)),
|
|
1282
|
+
velocityHorizontal: Math.max(0, Qe(e, "bendVelocityHorizontal", .09)),
|
|
1283
|
+
smoothing: Math.max(0, Qe(e, "bendSmoothing", 9)),
|
|
1284
|
+
activeThreshold: Math.max(0, Qe(e, "bendActiveThreshold", .5)),
|
|
1285
|
+
verticalCap: Math.max(0, Qe(e, "bendVerticalCap", .5)),
|
|
1286
|
+
horizontalCap: Math.max(0, Qe(e, "bendHorizontalCap", .9)),
|
|
1287
|
+
radiusMin: Math.max(0, Qe(e, "bendRadiusMin", .2)),
|
|
1288
|
+
radiusMax: Math.max(0, Qe(e, "bendRadiusMax", 3)),
|
|
1289
|
+
leadingCapFactor: Math.max(0, Qe(e, "bendLeadingCapFactor", .8)),
|
|
1290
|
+
trailingCapFactor: Math.max(0, Qe(e, "bendTrailingCapFactor", 1.6))
|
|
1285
1291
|
};
|
|
1286
1292
|
}
|
|
1287
|
-
function
|
|
1293
|
+
function tt(e, t, n, r, i, a) {
|
|
1288
1294
|
let o = t + (r * (n - e) - i * t) * a;
|
|
1289
1295
|
return [e + o * a, o];
|
|
1290
1296
|
}
|
|
1291
|
-
function
|
|
1292
|
-
let s = Math.max(0,
|
|
1293
|
-
for (; c-- > 0;) [u, d] =
|
|
1297
|
+
function nt(e, t, n, r, i, a, o) {
|
|
1298
|
+
let s = Math.max(0, Xe(a, 0)), c = Math.max(1, Math.ceil(s * o)), l = s / c, u = e, d = t;
|
|
1299
|
+
for (; c-- > 0;) [u, d] = tt(u, d, n, r, i, l);
|
|
1294
1300
|
return [u, d];
|
|
1295
1301
|
}
|
|
1296
|
-
function
|
|
1302
|
+
function rt(e) {
|
|
1297
1303
|
return {
|
|
1298
1304
|
cx: e.cx,
|
|
1299
1305
|
cy: e.cy,
|
|
@@ -1308,31 +1314,31 @@ function nt(e) {
|
|
|
1308
1314
|
tailInitialized: !0
|
|
1309
1315
|
};
|
|
1310
1316
|
}
|
|
1311
|
-
function
|
|
1317
|
+
function it(e, t) {
|
|
1312
1318
|
e.cx = t.cx, e.cy = t.cy, e.vcx = 0, e.vcy = 0, e.tailX = t.cx, e.tailY = t.cy, e.tailVx = 0, e.tailVy = 0, e.tailR = 0, e.tailPhase = 0, e.tailInitialized = !0;
|
|
1313
1319
|
}
|
|
1314
|
-
function
|
|
1320
|
+
function at(e) {
|
|
1315
1321
|
return String(Math.round(e * 1e3) / 1e3);
|
|
1316
1322
|
}
|
|
1317
1323
|
function q(e) {
|
|
1318
1324
|
return Math.round(e * 10) / 10;
|
|
1319
1325
|
}
|
|
1320
|
-
function
|
|
1321
|
-
let a = Math.max(.01,
|
|
1322
|
-
[e.cx, e.vcx] =
|
|
1326
|
+
function ot(e, t, n, r, i) {
|
|
1327
|
+
let a = Math.max(.01, Xe(t.scale, 1));
|
|
1328
|
+
[e.cx, e.vcx] = nt(e.cx, e.vcx, t.cx, i.stiffness, i.damping, r, i.integrationRate), [e.cy, e.vcy] = nt(e.cy, e.vcy, t.cy, i.stiffness, i.damping, r, i.integrationRate);
|
|
1323
1329
|
let o = Math.hypot(e.vcx, e.vcy), s = 0, c = 1, l = 1;
|
|
1324
1330
|
if (o > i.speedThreshold) {
|
|
1325
1331
|
let t = Math.min(i.stretch, o * i.stretchSpeed);
|
|
1326
1332
|
s = Math.round(Math.atan2(e.vcy, e.vcx) * 100) / 100, c = 1 + t, l = 1 / (1 + t * i.stretchSquash);
|
|
1327
1333
|
}
|
|
1328
|
-
e.tailInitialized ||= (e.tailX = e.cx, e.tailY = e.cy, !0), [e.tailX, e.tailVx] =
|
|
1334
|
+
e.tailInitialized ||= (e.tailX = e.cx, e.tailY = e.cy, !0), [e.tailX, e.tailVx] = nt(e.tailX, e.tailVx, e.cx, i.tailSpringStiffness, i.tailSpringDamping, r, i.integrationRate), [e.tailY, e.tailVy] = nt(e.tailY, e.tailVy, e.cy, i.tailSpringStiffness, i.tailSpringDamping, r, i.integrationRate);
|
|
1329
1335
|
let u = Math.max(0, n.w * a), d = Math.max(0, n.h * a), f = o > .001 ? e.vcx / o : 1, p = o > .001 ? e.vcy / o : 0, m = Math.max(i.minPerpendicular, Math.abs(f) * d + Math.abs(p) * u), h = (Math.abs(f) * u + Math.abs(p) * d) / 2, g = m / 2, _ = e.tailX - e.cx, v = e.tailY - e.cy, y = Math.hypot(_, v), b = h + g * (i.lagBase + i.force * i.lagForce);
|
|
1330
1336
|
y > b && y > 0 && (e.tailX = e.cx + _ / y * b, e.tailY = e.cy + v / y * b);
|
|
1331
|
-
let x =
|
|
1337
|
+
let x = Ye((o - i.tailOnsetSpeed) / i.tailOnsetRange), S = g * i.tail * x;
|
|
1332
1338
|
e.tailR += (S - e.tailR) * Math.min(1, Math.max(0, r) * i.tailRamp);
|
|
1333
1339
|
let C = e.tailR >= i.tailMinRadius, w = e.cx, T = e.cy, E = e.cx, D = e.cy, O = 0, ee = 0;
|
|
1334
1340
|
if (C) {
|
|
1335
|
-
e.tailPhase += o * Math.max(0,
|
|
1341
|
+
e.tailPhase += o * Math.max(0, Xe(r, 0)) * i.tailPhaseSpeed;
|
|
1336
1342
|
let t = e.tailR * i.tailWobble, n = -p, a = f, s = Math.sin(e.tailPhase) * t, c = Math.sin(e.tailPhase + i.tailWobblePhase) * -t;
|
|
1337
1343
|
w = e.cx + _ * i.tailMidpointA + n * s, T = e.cy + v * i.tailMidpointA + a * s, E = e.cx + _ * i.tailMidpointB + n * c, D = e.cy + v * i.tailMidpointB + a * c, O = e.tailR * i.tailMidRadiusA, ee = e.tailR * i.tailMidRadiusB;
|
|
1338
1344
|
}
|
|
@@ -1358,17 +1364,17 @@ function at(e, t, n, r, i) {
|
|
|
1358
1364
|
].join(",") : "hidden"
|
|
1359
1365
|
};
|
|
1360
1366
|
return {
|
|
1361
|
-
path:
|
|
1362
|
-
transform: `translate(${
|
|
1367
|
+
path: qe(-n.w / 2, -n.h / 2, n.w, n.h, n.r),
|
|
1368
|
+
transform: `translate(${at(e.cx)} ${at(e.cy)}) ` + (o > i.speedThreshold ? `rotate(${at(s * 180 / Math.PI)}) scale(${at(c)} ${at(l)}) ` : "") + `scale(${at(a)})`,
|
|
1363
1369
|
tail: k,
|
|
1364
1370
|
moving: Math.hypot(e.cx - t.cx, e.cy - t.cy) > i.settleDistance || o > i.settleSpeed || e.tailR >= i.tailMinRadius
|
|
1365
1371
|
};
|
|
1366
1372
|
}
|
|
1367
|
-
function
|
|
1373
|
+
function st(e, t, n, r, i, a) {
|
|
1368
1374
|
let o = Math.min(Math.max(0, n), e / 2, t / 2), s = Math.round(r * 2 * 10) / 10, c = Math.max(o * a.radiusMin, Math.min(o * a.radiusMax, i > 0 ? o - a.leadingCapFactor * i : o + a.trailingCapFactor * -i)), l = Math.max(o * a.radiusMin, Math.min(o * a.radiusMax, i > 0 ? o + a.trailingCapFactor * i : o - a.leadingCapFactor * -i)), u = .5523, d = (e) => Math.round(e * 10) / 10;
|
|
1369
1375
|
return `M ${d(l)} 0 Q ${d(e / 2)} ${d(s)} ${d(e - c)} 0 C ${d(e - c + u * c)} 0 ${d(e)} ${d(o - u * o)} ${d(e)} ${d(o)} L ${d(e)} ${d(t - o)} C ${d(e)} ${d(t - o + u * o)} ${d(e - c + u * c)} ${d(t)} ${d(e - c)} ${d(t)} Q ${d(e / 2)} ${d(t + r * 2)} ${d(l)} ${d(t)} C ${d(l - u * l)} ${d(t)} 0 ${d(t - o + u * o)} 0 ${d(t - o)} L 0 ${d(o)} C 0 ${d(o - u * o)} ${d(l - u * l)} 0 ${d(l)} 0 Z`;
|
|
1370
1376
|
}
|
|
1371
|
-
function
|
|
1377
|
+
function ct(e) {
|
|
1372
1378
|
return {
|
|
1373
1379
|
cx: e.cx,
|
|
1374
1380
|
cy: e.cy,
|
|
@@ -1381,20 +1387,20 @@ function st(e) {
|
|
|
1381
1387
|
initialized: !1
|
|
1382
1388
|
};
|
|
1383
1389
|
}
|
|
1384
|
-
function
|
|
1390
|
+
function lt(e, t) {
|
|
1385
1391
|
e.cx = t.cx, e.cy = t.cy, e.previousCx = t.cx, e.previousCy = t.cy, e.vcx = 0, e.vcy = 0, e.bendY = 0, e.bendX = 0, e.initialized = !0;
|
|
1386
1392
|
}
|
|
1387
|
-
function
|
|
1393
|
+
function ut(e, t) {
|
|
1388
1394
|
return Math.min(e.w, e.h) * t.verticalCap * 2 * t.vertical;
|
|
1389
1395
|
}
|
|
1390
|
-
function
|
|
1391
|
-
let a = Math.max(1 / 240,
|
|
1396
|
+
function dt(e, t, n, r, i) {
|
|
1397
|
+
let a = Math.max(1 / 240, Xe(r, 1 / 60));
|
|
1392
1398
|
e.initialized ||= (e.previousCx = t.cx, e.previousCy = t.cy, !0);
|
|
1393
1399
|
let o = (t.cx - e.previousCx) / a, s = (t.cy - e.previousCy) / a;
|
|
1394
1400
|
e.previousCx = t.cx, e.previousCy = t.cy, e.vcx = e.vcx * .7 + o * .3, e.vcy = e.vcy * .7 + s * .3, e.cx = t.cx, e.cy = t.cy;
|
|
1395
1401
|
let c = Math.min(n.w, n.h), l = c * i.verticalCap, u = Math.max(-l, Math.min(l, e.vcy * i.velocityVertical)) * i.vertical, d = c * i.horizontalCap, f = Math.max(-d, Math.min(d, e.vcx * i.velocityHorizontal)) * i.horizontal;
|
|
1396
1402
|
e.bendY += (u - e.bendY) * Math.min(1, a * i.smoothing), e.bendX += (f - e.bendX) * Math.min(1, a * i.smoothing);
|
|
1397
|
-
let p = Math.abs(e.bendY) > i.activeThreshold || Math.abs(e.bendX) > i.activeThreshold, m = Math.min(...n.r), h = p ?
|
|
1403
|
+
let p = Math.abs(e.bendY) > i.activeThreshold || Math.abs(e.bendX) > i.activeThreshold, m = Math.min(...n.r), h = p ? st(n.w, n.h, m, e.bendY, e.bendX, i) : qe(-n.w / 2, -n.h / 2, n.w, n.h, n.r), g = p ? `translate(${at(e.cx - n.w / 2)} ${at(e.cy - n.h / 2)}) scale(${at(t.scale)})` : `translate(${at(e.cx)} ${at(e.cy)}) scale(${at(t.scale)})`, _ = Math.round(e.bendX * 10) / 10, v = Math.round(e.bendY * 10) / 10;
|
|
1398
1404
|
return {
|
|
1399
1405
|
path: h,
|
|
1400
1406
|
transform: g,
|
|
@@ -1406,7 +1412,7 @@ function ut(e, t, n, r, i) {
|
|
|
1406
1412
|
}
|
|
1407
1413
|
//#endregion
|
|
1408
1414
|
//#region src/liquidGooeyEvolve.ts
|
|
1409
|
-
var
|
|
1415
|
+
var ft = {
|
|
1410
1416
|
massStiffness: 320,
|
|
1411
1417
|
massDamping: 17,
|
|
1412
1418
|
sizeStiffness: 170,
|
|
@@ -1421,41 +1427,41 @@ var dt = {
|
|
|
1421
1427
|
anticipation: 90,
|
|
1422
1428
|
travel: 32
|
|
1423
1429
|
};
|
|
1424
|
-
function
|
|
1430
|
+
function pt(e) {
|
|
1425
1431
|
return /^var\((--[\w-]+)\)$/.exec(e.trim())?.[1] ?? null;
|
|
1426
1432
|
}
|
|
1427
|
-
function
|
|
1433
|
+
function mt(e, t) {
|
|
1428
1434
|
return e !== void 0 && Number.isFinite(e) ? e : t;
|
|
1429
1435
|
}
|
|
1430
|
-
function
|
|
1436
|
+
function ht(e, t = 0, n = 1) {
|
|
1431
1437
|
return Math.min(n, Math.max(t, e));
|
|
1432
1438
|
}
|
|
1433
|
-
function
|
|
1434
|
-
let r = e?.ownerDocument.defaultView, i =
|
|
1439
|
+
function gt(e, t, n) {
|
|
1440
|
+
let r = e?.ownerDocument.defaultView, i = pt(R[t]);
|
|
1435
1441
|
if (!r || !i) return n;
|
|
1436
1442
|
let a = Number.parseFloat(r.getComputedStyle(e).getPropertyValue(i));
|
|
1437
1443
|
return Number.isFinite(a) ? a : n;
|
|
1438
1444
|
}
|
|
1439
|
-
function
|
|
1440
|
-
let r = e?.ownerDocument.defaultView, i =
|
|
1445
|
+
function _t(e, t, n) {
|
|
1446
|
+
let r = e?.ownerDocument.defaultView, i = pt(R[t]);
|
|
1441
1447
|
return !r || !i ? n : r.getComputedStyle(e).getPropertyValue(i).trim() || n;
|
|
1442
1448
|
}
|
|
1443
|
-
function
|
|
1444
|
-
let n = (t, n) =>
|
|
1445
|
-
massStiffness: Math.max(.001, n("evolveMassStiffness",
|
|
1446
|
-
massDamping: Math.max(0, n("evolveMassDamping",
|
|
1447
|
-
sizeStiffness: Math.max(.001, n("evolveSizeStiffness",
|
|
1448
|
-
sizeDamping: Math.max(0, n("evolveSizeDamping",
|
|
1449
|
-
radiusStiffness: Math.max(.001, n("evolveRadiusStiffness",
|
|
1450
|
-
radiusDamping: Math.max(0, n("evolveRadiusDamping",
|
|
1451
|
-
contentBlur: Math.max(0, n("evolveContentBlur",
|
|
1452
|
-
roundness:
|
|
1453
|
-
cornerDuration: Math.max(0, n("evolveCornerDuration",
|
|
1454
|
-
cornerDelay: Math.max(0, n("evolveCornerDelay",
|
|
1455
|
-
cornerEase:
|
|
1456
|
-
anticipation: Math.max(0, n("evolveAnticipation",
|
|
1457
|
-
travel: Math.max(0, n("evolveTravel",
|
|
1458
|
-
}, i = Math.max(.25,
|
|
1449
|
+
function vt(e, t) {
|
|
1450
|
+
let n = (t, n) => gt(e, t, n), r = {
|
|
1451
|
+
massStiffness: Math.max(.001, n("evolveMassStiffness", ft.massStiffness)),
|
|
1452
|
+
massDamping: Math.max(0, n("evolveMassDamping", ft.massDamping)),
|
|
1453
|
+
sizeStiffness: Math.max(.001, n("evolveSizeStiffness", ft.sizeStiffness)),
|
|
1454
|
+
sizeDamping: Math.max(0, n("evolveSizeDamping", ft.sizeDamping)),
|
|
1455
|
+
radiusStiffness: Math.max(.001, n("evolveRadiusStiffness", ft.radiusStiffness)),
|
|
1456
|
+
radiusDamping: Math.max(0, n("evolveRadiusDamping", ft.radiusDamping)),
|
|
1457
|
+
contentBlur: Math.max(0, n("evolveContentBlur", ft.contentBlur)),
|
|
1458
|
+
roundness: ht(n("evolveRoundness", ft.roundness)),
|
|
1459
|
+
cornerDuration: Math.max(0, n("evolveCornerDuration", ft.cornerDuration)),
|
|
1460
|
+
cornerDelay: Math.max(0, n("evolveCornerDelay", ft.cornerDelay)),
|
|
1461
|
+
cornerEase: _t(e, "evolveCornerEase", ft.cornerEase),
|
|
1462
|
+
anticipation: Math.max(0, n("evolveAnticipation", ft.anticipation)),
|
|
1463
|
+
travel: Math.max(0, n("evolveTravel", ft.travel))
|
|
1464
|
+
}, i = Math.max(.25, mt(t?.speed, n("morphSpeed", 1))), a = ht(mt(t?.bounce, n("morphBounce", .5))), o = (e) => Math.max(.12, 1 - 1.1 * ht(e)), s = o(a) / o(.5);
|
|
1459
1465
|
return {
|
|
1460
1466
|
massStiffness: r.massStiffness * i * i,
|
|
1461
1467
|
massDamping: r.massDamping * i * s,
|
|
@@ -1463,7 +1469,7 @@ function _t(e, t) {
|
|
|
1463
1469
|
sizeDamping: r.sizeDamping * i * s,
|
|
1464
1470
|
radiusStiffness: r.radiusStiffness * i * i,
|
|
1465
1471
|
radiusDamping: r.radiusDamping * i,
|
|
1466
|
-
contentBlur: Math.max(0,
|
|
1472
|
+
contentBlur: Math.max(0, mt(t?.contentBlur, r.contentBlur)),
|
|
1467
1473
|
roundness: r.roundness,
|
|
1468
1474
|
cornerDuration: r.cornerDuration / i,
|
|
1469
1475
|
cornerDelay: r.cornerDelay,
|
|
@@ -1473,14 +1479,14 @@ function _t(e, t) {
|
|
|
1473
1479
|
...t?.advanced ?? {}
|
|
1474
1480
|
};
|
|
1475
1481
|
}
|
|
1476
|
-
function vt(e, t) {
|
|
1477
|
-
return t?.shape === void 0 ? ht(e, "morphShape", 1) >= .5 : t.shape;
|
|
1478
|
-
}
|
|
1479
1482
|
function yt(e, t) {
|
|
1480
|
-
|
|
1483
|
+
return t?.shape === void 0 ? gt(e, "morphShape", 1) >= .5 : t.shape;
|
|
1484
|
+
}
|
|
1485
|
+
function bt(e, t) {
|
|
1486
|
+
let n = vt(e, t), r = Math.max(0, gt(e, "contentBlurAreaMultiplier", 3));
|
|
1481
1487
|
return n.contentBlur * r;
|
|
1482
1488
|
}
|
|
1483
|
-
function
|
|
1489
|
+
function xt(e) {
|
|
1484
1490
|
return {
|
|
1485
1491
|
cx: e.cx,
|
|
1486
1492
|
cy: e.cy,
|
|
@@ -1505,7 +1511,7 @@ function bt(e) {
|
|
|
1505
1511
|
round01: 0
|
|
1506
1512
|
};
|
|
1507
1513
|
}
|
|
1508
|
-
function
|
|
1514
|
+
function St(e, t) {
|
|
1509
1515
|
e.cx = t.cx, e.cy = t.cy, e.w = t.w, e.h = t.h, e.r = t.r, e.vcx = 0, e.vcy = 0, e.vw = 0, e.vh = 0, e.vr = 0, e.motionEnv = 0, e.tPrev = {
|
|
1510
1516
|
cx: t.cx,
|
|
1511
1517
|
cy: t.cy
|
|
@@ -1514,18 +1520,18 @@ function xt(e, t) {
|
|
|
1514
1520
|
h: t.h
|
|
1515
1521
|
}, e.morphActive = !1, e.round01 = 0;
|
|
1516
1522
|
}
|
|
1517
|
-
function
|
|
1523
|
+
function Ct(e, t, n, r, i, a) {
|
|
1518
1524
|
let o = t + (r * (n - e) - i * t) * a;
|
|
1519
1525
|
return [e + o * a, o];
|
|
1520
1526
|
}
|
|
1521
|
-
function
|
|
1522
|
-
let o = Math.max(0,
|
|
1523
|
-
for (; s-- > 0;) [l, u] =
|
|
1527
|
+
function wt(e, t, n, r, i, a) {
|
|
1528
|
+
let o = Math.max(0, mt(a, 0)), s = Math.max(1, Math.ceil(o * 60)), c = o / s, l = e, u = t;
|
|
1529
|
+
for (; s-- > 0;) [l, u] = Ct(l, u, n, r, i, c);
|
|
1524
1530
|
return [l, u];
|
|
1525
1531
|
}
|
|
1526
|
-
var
|
|
1527
|
-
function
|
|
1528
|
-
let t =
|
|
1532
|
+
var Tt = /* @__PURE__ */ new Map();
|
|
1533
|
+
function Et(e) {
|
|
1534
|
+
let t = Tt.get(e);
|
|
1529
1535
|
if (t) return t;
|
|
1530
1536
|
let n = /cubic-bezier\(([^)]+)\)/.exec(e);
|
|
1531
1537
|
if (n) {
|
|
@@ -1541,14 +1547,14 @@ function Tt(e) {
|
|
|
1541
1547
|
let s = (n + o) / 2;
|
|
1542
1548
|
return 3 * s * (1 - s) * (1 - s) * r + 3 * s * s * (1 - s) * a + s ** 3;
|
|
1543
1549
|
};
|
|
1544
|
-
} else t = e === "ease-in-out" ?
|
|
1545
|
-
return
|
|
1550
|
+
} else t = e === "ease-in-out" ? Et("cubic-bezier(0.42, 0, 0.58, 1)") : (e) => ht(e);
|
|
1551
|
+
return Tt.set(e, t), t;
|
|
1546
1552
|
}
|
|
1547
|
-
function
|
|
1553
|
+
function Dt(e) {
|
|
1548
1554
|
return String(Math.round(e * 1e3) / 1e3);
|
|
1549
1555
|
}
|
|
1550
|
-
function
|
|
1551
|
-
let a = Math.max(0,
|
|
1556
|
+
function Ot(e, t, n, r, i) {
|
|
1557
|
+
let a = Math.max(0, mt(n, 0)), o = t.cx, s = t.cy;
|
|
1552
1558
|
e.tPrev ||= {
|
|
1553
1559
|
cx: o,
|
|
1554
1560
|
cy: s
|
|
@@ -1563,7 +1569,7 @@ function Dt(e, t, n, r, i) {
|
|
|
1563
1569
|
let g = Math.max(0, i.anticipation) / 1e3, _ = g > 0 ? 1 - Math.exp(-a / g) : 1;
|
|
1564
1570
|
e.lead01 += (+(f > .5) - e.lead01) * _;
|
|
1565
1571
|
let v = Math.min(Math.max(0, i.travel) * e.lead01, f);
|
|
1566
|
-
[e.cx, e.vcx] =
|
|
1572
|
+
[e.cx, e.vcx] = wt(e.cx, e.vcx, o + m * v, i.massStiffness, i.massDamping, a), [e.cy, e.vcy] = wt(e.cy, e.vcy, s + h * v, i.massStiffness, i.massDamping, a), [e.w, e.vw] = wt(e.w, e.vw, t.w, i.sizeStiffness, i.sizeDamping, a), [e.h, e.vh] = wt(e.h, e.vh, t.h, i.sizeStiffness, i.sizeDamping, a), [e.r, e.vr] = wt(e.r, e.vr, t.r, i.radiusStiffness, i.radiusDamping, a);
|
|
1567
1573
|
let y = e.lastTargetSize;
|
|
1568
1574
|
(y ? Math.abs(t.w - y.w) + Math.abs(t.h - y.h) : 0) > .5 ? (e.morphActive ||= (e.cornerT0 = r, e.cornerStarted = !0, !0), e.lastTargetMoveT = r) : e.morphActive && r - e.lastTargetMoveT > 150 && r - e.cornerT0 > Math.max(0, i.cornerDelay) + Math.max(1, i.cornerDuration) && (e.morphActive = !1), e.lastTargetSize = {
|
|
1569
1575
|
w: t.w,
|
|
@@ -1571,8 +1577,8 @@ function Dt(e, t, n, r, i) {
|
|
|
1571
1577
|
};
|
|
1572
1578
|
let b = Math.max(0, i.cornerDelay) + Math.max(1, i.cornerDuration), x = 0;
|
|
1573
1579
|
if (e.cornerStarted && i.roundness > 0 && r - e.cornerT0 < b) {
|
|
1574
|
-
let t =
|
|
1575
|
-
x =
|
|
1580
|
+
let t = ht((r - e.cornerT0 - Math.max(0, i.cornerDelay)) / Math.max(1, i.cornerDuration));
|
|
1581
|
+
x = ht((1 - Et(i.cornerEase)(t)) * i.roundness);
|
|
1576
1582
|
}
|
|
1577
1583
|
let S = a * 8;
|
|
1578
1584
|
e.round01 += Math.max(-S, Math.min(S, x - e.round01));
|
|
@@ -1590,15 +1596,15 @@ function Dt(e, t, n, r, i) {
|
|
|
1590
1596
|
C
|
|
1591
1597
|
];
|
|
1592
1598
|
return {
|
|
1593
|
-
path:
|
|
1594
|
-
transform: `translate(${
|
|
1599
|
+
path: qe(-e.w / 2, -e.h / 2, e.w, e.h, ee),
|
|
1600
|
+
transform: `translate(${Dt(e.cx)} ${Dt(e.cy)}) scale(${Dt(t.scale)})`,
|
|
1595
1601
|
contentBlur: T,
|
|
1596
1602
|
moving: !O
|
|
1597
1603
|
};
|
|
1598
1604
|
}
|
|
1599
1605
|
//#endregion
|
|
1600
1606
|
//#region src/liquidGooeySpring.ts
|
|
1601
|
-
var
|
|
1607
|
+
var kt = {
|
|
1602
1608
|
snappy: {
|
|
1603
1609
|
stiffness: 480,
|
|
1604
1610
|
damping: 34,
|
|
@@ -1614,16 +1620,16 @@ var Ot = {
|
|
|
1614
1620
|
damping: 17,
|
|
1615
1621
|
mass: 1
|
|
1616
1622
|
}
|
|
1617
|
-
},
|
|
1618
|
-
function
|
|
1623
|
+
}, At = 1 / 240;
|
|
1624
|
+
function jt(e) {
|
|
1619
1625
|
let t = 0, n = 0, r = 0, i = -1, a = 0, o = [0];
|
|
1620
1626
|
for (; r < 10;) {
|
|
1621
1627
|
let s = (-e.stiffness * (t - 1) - e.damping * n) / e.mass;
|
|
1622
|
-
if (n += s *
|
|
1628
|
+
if (n += s * At, t += n * At, r += At, o.push(t), t > a && (a = t), Math.abs(t - 1) < .001 && Math.abs(n) < .02) {
|
|
1623
1629
|
if (i < 0 && (i = r), r - i >= .064) break;
|
|
1624
1630
|
} else i = -1;
|
|
1625
1631
|
}
|
|
1626
|
-
let s = i > 0 ? i : r, c = Math.round(Math.min(120, Math.max(24, s * 90))), l = Math.min(o.length - 1, s /
|
|
1632
|
+
let s = i > 0 ? i : r, c = Math.round(Math.min(120, Math.max(24, s * 90))), l = Math.min(o.length - 1, s / At), u = [];
|
|
1627
1633
|
for (let e = 0; e <= c; e += 1) {
|
|
1628
1634
|
let t = Math.min(o.length - 1, Math.round(e / c * l));
|
|
1629
1635
|
u.push(Math.round((o[t] ?? 1) * 1e4) / 1e4);
|
|
@@ -1634,13 +1640,13 @@ function At(e) {
|
|
|
1634
1640
|
overshoots: a > 1.001
|
|
1635
1641
|
};
|
|
1636
1642
|
}
|
|
1637
|
-
var
|
|
1638
|
-
function
|
|
1639
|
-
return
|
|
1643
|
+
var Mt = null;
|
|
1644
|
+
function Nt() {
|
|
1645
|
+
return Mt === null && (Mt = typeof CSS < "u" && typeof CSS.supports == "function" && CSS.supports("transition-timing-function", "linear(0, 1)")), Mt;
|
|
1640
1646
|
}
|
|
1641
|
-
var
|
|
1642
|
-
function
|
|
1643
|
-
let t =
|
|
1647
|
+
var Pt = /* @__PURE__ */ new Map(), Ft = /* @__PURE__ */ new Map();
|
|
1648
|
+
function It(e) {
|
|
1649
|
+
let t = Ft.get(e);
|
|
1644
1650
|
if (t) return t;
|
|
1645
1651
|
let n = /^linear\(([^)]+)\)$/.exec(e.trim()), r = /^cubic-bezier\(([^)]+)\)$/.exec(e.trim()), i;
|
|
1646
1652
|
if (n) {
|
|
@@ -1664,10 +1670,10 @@ function Ft(e) {
|
|
|
1664
1670
|
let s = (i + o) / 2;
|
|
1665
1671
|
return 3 * s * (1 - s) * (1 - s) * t + 3 * s * s * (1 - s) * a + s ** 3;
|
|
1666
1672
|
};
|
|
1667
|
-
} else i = e === "ease" ?
|
|
1668
|
-
return
|
|
1673
|
+
} else i = e === "ease" ? It("cubic-bezier(0.25, 0.1, 0.25, 1)") : e === "ease-in" ? It("cubic-bezier(0.42, 0, 1, 1)") : e === "ease-out" ? It("cubic-bezier(0, 0, 0.58, 1)") : e === "ease-in-out" ? It("cubic-bezier(0.42, 0, 0.58, 1)") : (e) => Math.min(1, Math.max(0, e));
|
|
1674
|
+
return Ft.set(e, i), i;
|
|
1669
1675
|
}
|
|
1670
|
-
function
|
|
1676
|
+
function Lt(e, t = !1) {
|
|
1671
1677
|
if (t) return {
|
|
1672
1678
|
duration: 0,
|
|
1673
1679
|
easing: "linear"
|
|
@@ -1677,58 +1683,58 @@ function It(e, t = !1) {
|
|
|
1677
1683
|
duration: Math.max(0, n.duration),
|
|
1678
1684
|
easing: n.ease ?? "cubic-bezier(0.22, 1, 0.36, 1)"
|
|
1679
1685
|
};
|
|
1680
|
-
let r = typeof n == "string" ?
|
|
1686
|
+
let r = typeof n == "string" ? kt[n] : {
|
|
1681
1687
|
stiffness: 300,
|
|
1682
1688
|
damping: 24,
|
|
1683
1689
|
mass: 1,
|
|
1684
1690
|
...n
|
|
1685
|
-
}, i = `${r.stiffness}/${r.damping}/${r.mass}/${
|
|
1691
|
+
}, i = `${r.stiffness}/${r.damping}/${r.mass}/${Nt()}`, a = Pt.get(i);
|
|
1686
1692
|
if (!a) {
|
|
1687
|
-
let e =
|
|
1693
|
+
let e = jt(r);
|
|
1688
1694
|
a = {
|
|
1689
1695
|
duration: Math.round(e.duration * 1e3),
|
|
1690
|
-
easing:
|
|
1691
|
-
},
|
|
1696
|
+
easing: Nt() ? `linear(${e.values.join(", ")})` : e.overshoots ? "cubic-bezier(0.34, 1.56, 0.64, 1)" : "cubic-bezier(0.22, 1, 0.36, 1)"
|
|
1697
|
+
}, Pt.set(i, a);
|
|
1692
1698
|
}
|
|
1693
1699
|
return a;
|
|
1694
1700
|
}
|
|
1695
1701
|
//#endregion
|
|
1696
1702
|
//#region src/liquidGooeyEngine.ts
|
|
1697
|
-
function
|
|
1703
|
+
function Rt(e, t) {
|
|
1698
1704
|
return e !== void 0 && Number.isFinite(e) ? e : t;
|
|
1699
1705
|
}
|
|
1700
|
-
function
|
|
1706
|
+
function zt(e) {
|
|
1701
1707
|
let t = {
|
|
1702
1708
|
observe: e.observe ?? !1,
|
|
1703
|
-
x:
|
|
1704
|
-
y:
|
|
1705
|
-
scale: Math.max(.01,
|
|
1709
|
+
x: Rt(e.x, 0),
|
|
1710
|
+
y: Rt(e.y, 0),
|
|
1711
|
+
scale: Math.max(.01, Rt(e.scale, 1))
|
|
1706
1712
|
};
|
|
1707
|
-
return e.effect !== void 0 && (t.effect = e.effect), e.morph !== void 0 && (t.morph = e.morph), e.bend !== void 0 && (t.bend = e.bend), e.transition !== void 0 && (t.transition = e.transition), e.delay !== void 0 && (t.delay = Math.max(0,
|
|
1713
|
+
return e.effect !== void 0 && (t.effect = e.effect), e.morph !== void 0 && (t.morph = e.morph), e.bend !== void 0 && (t.bend = e.bend), e.transition !== void 0 && (t.transition = e.transition), e.delay !== void 0 && (t.delay = Math.max(0, Rt(e.delay, 0))), e.radius !== void 0 && (t.radius = e.radius), t;
|
|
1708
1714
|
}
|
|
1709
|
-
function
|
|
1715
|
+
function Bt(e) {
|
|
1710
1716
|
return {
|
|
1711
1717
|
x: e.x,
|
|
1712
1718
|
y: e.y,
|
|
1713
1719
|
scale: e.scale
|
|
1714
1720
|
};
|
|
1715
1721
|
}
|
|
1716
|
-
function
|
|
1722
|
+
function Vt(e, t) {
|
|
1717
1723
|
return e.x === t.x && e.y === t.y && e.scale === t.scale;
|
|
1718
1724
|
}
|
|
1719
|
-
function
|
|
1720
|
-
return e.effect === t.effect && e.observe === t.observe && JSON.stringify(e.morph) === JSON.stringify(t.morph) && JSON.stringify(e.bend) === JSON.stringify(t.bend) && JSON.stringify(e.transition) === JSON.stringify(t.transition) && e.delay === t.delay &&
|
|
1725
|
+
function Ht(e, t) {
|
|
1726
|
+
return e.effect === t.effect && e.observe === t.observe && JSON.stringify(e.morph) === JSON.stringify(t.morph) && JSON.stringify(e.bend) === JSON.stringify(t.bend) && JSON.stringify(e.transition) === JSON.stringify(t.transition) && e.delay === t.delay && Ut(e.radius) === Ut(t.radius);
|
|
1721
1727
|
}
|
|
1722
|
-
function
|
|
1728
|
+
function Ut(e) {
|
|
1723
1729
|
return e === void 0 ? "" : JSON.stringify(e);
|
|
1724
1730
|
}
|
|
1725
|
-
function
|
|
1731
|
+
function Wt(e, t) {
|
|
1726
1732
|
return !!(e && Math.abs(e.x - t.x) < .01 && Math.abs(e.y - t.y) < .01 && Math.abs(e.w - t.w) < .01 && Math.abs(e.h - t.h) < .01 && e.r.every((e, n) => Math.abs(e - (t.r[n] ?? 0)) < .01));
|
|
1727
1733
|
}
|
|
1728
|
-
function
|
|
1734
|
+
function Gt(e) {
|
|
1729
1735
|
return String(Math.round(e * 1e3) / 1e3);
|
|
1730
1736
|
}
|
|
1731
|
-
var
|
|
1737
|
+
var Kt = class {
|
|
1732
1738
|
getGroup;
|
|
1733
1739
|
getFilterArea;
|
|
1734
1740
|
onModeChange;
|
|
@@ -1758,11 +1764,11 @@ var Gt = class {
|
|
|
1758
1764
|
}
|
|
1759
1765
|
register(e) {
|
|
1760
1766
|
this.revive(), this.unregister(e.id);
|
|
1761
|
-
let t =
|
|
1767
|
+
let t = zt(e.config), n = {
|
|
1762
1768
|
...e,
|
|
1763
1769
|
config: t,
|
|
1764
|
-
target:
|
|
1765
|
-
current:
|
|
1770
|
+
target: Bt(t),
|
|
1771
|
+
current: Bt(t),
|
|
1766
1772
|
motion: null,
|
|
1767
1773
|
lastBox: null,
|
|
1768
1774
|
lastPaint: null,
|
|
@@ -1784,7 +1790,7 @@ var Gt = class {
|
|
|
1784
1790
|
update(e, t) {
|
|
1785
1791
|
let n = this.items.get(e);
|
|
1786
1792
|
if (!n) return;
|
|
1787
|
-
let r =
|
|
1793
|
+
let r = zt(t), i = Bt(r), a = !Vt(n.target, i), o = !Ht(n.config, r);
|
|
1788
1794
|
if (n.config = r, this.updateFeaturePadding(), !a) {
|
|
1789
1795
|
o && (n.lastPaint = null, this.isDynamic(n) || this.resetDynamicEntry(n), r.effect === "bend" && this.writeBendVars(n, 0, 0), this.isDynamic(n) && !this.reducedMotion && (this.ensureClaim() ? this.setMode("animated") : (this.snapEntry(n), this.resetDynamicEntry(n), this.setMode("static"))), this.touch(), this.wake());
|
|
1790
1796
|
return;
|
|
@@ -1792,13 +1798,13 @@ var Gt = class {
|
|
|
1792
1798
|
let s = this.now();
|
|
1793
1799
|
if (this.advanceEntry(n, s), n.target = i, this.reducedMotion) this.snapEntry(n), this.resetMoveEntry(n), this.resetDynamicEntry(n), this.setMode("reduced");
|
|
1794
1800
|
else {
|
|
1795
|
-
let e =
|
|
1801
|
+
let e = Lt(r.transition), t = e.duration > 0;
|
|
1796
1802
|
!(t || this.follow || this.isDynamic(n)) || !this.ensureClaim() ? (this.snapEntry(n), this.resetMoveEntry(n), this.resetDynamicEntry(n), this.setMode("static")) : !t || r.observe ? (n.current = { ...i }, n.motion = null, n.host.style.willChange = "", n.lastPaint = null, this.applyHost(n), this.setMode("animated")) : (n.motion = {
|
|
1797
1803
|
from: { ...n.current },
|
|
1798
1804
|
to: { ...i },
|
|
1799
1805
|
start: s + (r.delay ?? 0),
|
|
1800
1806
|
duration: e.duration,
|
|
1801
|
-
ease:
|
|
1807
|
+
ease: It(e.easing)
|
|
1802
1808
|
}, n.host.style.willChange = r.observe ? "" : "transform", this.setMode("animated"));
|
|
1803
1809
|
}
|
|
1804
1810
|
this.touch(s), this.needsPaint = !0, this.wake();
|
|
@@ -1816,7 +1822,7 @@ var Gt = class {
|
|
|
1816
1822
|
setFilterArea(e) {
|
|
1817
1823
|
let t = Number.isFinite(e) ? Math.max(0, e) : Infinity;
|
|
1818
1824
|
if (!(Math.abs(t - this.filterArea) < .5)) {
|
|
1819
|
-
if (this.filterArea = t, this.claimed && t >
|
|
1825
|
+
if (this.filterArea = t, this.claimed && t > ke().maxFilterArea) {
|
|
1820
1826
|
for (let e of this.items.values()) this.snapEntry(e), this.resetMoveEntry(e), this.resetDynamicEntry(e);
|
|
1821
1827
|
this.releaseClaim(), this.setMode(this.reducedMotion ? "reduced" : "static");
|
|
1822
1828
|
}
|
|
@@ -1855,25 +1861,25 @@ var Gt = class {
|
|
|
1855
1861
|
ensureClaim() {
|
|
1856
1862
|
if (this.claimed) return !0;
|
|
1857
1863
|
let e = this.getFilterArea();
|
|
1858
|
-
return Number.isFinite(e) && (this.filterArea = Math.max(0, e)),
|
|
1864
|
+
return Number.isFinite(e) && (this.filterArea = Math.max(0, e)), je(this.filterArea) ? (this.claimed = !0, this.moveOptions = $e(this.getGroup()), !0) : (this.warnBudgetFallback(), !1);
|
|
1859
1865
|
}
|
|
1860
1866
|
warnBudgetFallback() {
|
|
1861
1867
|
if (this.budgetWarningEmitted) return;
|
|
1862
1868
|
this.budgetWarningEmitted = !0;
|
|
1863
|
-
let e =
|
|
1869
|
+
let e = ke(), t = e.activeGroups >= e.maxAnimatedGroups ? "the active-group limit is reached" : "the filter-area limit is exceeded";
|
|
1864
1870
|
console.warn(`LiquidGroup: the liquid animation budget is insufficient (${t}); degrading to static rendering for this group.`);
|
|
1865
1871
|
}
|
|
1866
1872
|
revive() {
|
|
1867
1873
|
this.disposed && (this.disposed = !1, this.mutationObserver = null, this.removeListeners.length = 0, this.lastFrameTime = null, this.budgetWarningEmitted = !1);
|
|
1868
1874
|
}
|
|
1869
1875
|
releaseClaim() {
|
|
1870
|
-
this.claimed &&= (
|
|
1876
|
+
this.claimed &&= (Me(), !1);
|
|
1871
1877
|
}
|
|
1872
1878
|
isBend(e) {
|
|
1873
1879
|
return e.config.effect === "bend";
|
|
1874
1880
|
}
|
|
1875
1881
|
isShape(e) {
|
|
1876
|
-
return !this.isBend(e) && e.config.morph !== void 0 &&
|
|
1882
|
+
return !this.isBend(e) && e.config.morph !== void 0 && yt(this.getGroup(), e.config.morph);
|
|
1877
1883
|
}
|
|
1878
1884
|
isDynamic(e) {
|
|
1879
1885
|
return this.isBend(e) || this.isShape(e);
|
|
@@ -1896,7 +1902,7 @@ var Gt = class {
|
|
|
1896
1902
|
let e = 0;
|
|
1897
1903
|
for (let t of this.items.values()) {
|
|
1898
1904
|
let n = this.featureBox(t);
|
|
1899
|
-
this.isBend(t) ? e = Math.max(e,
|
|
1905
|
+
this.isBend(t) ? e = Math.max(e, ut(n, et(this.getGroup(), t.config.bend))) : this.isShape(t) && (e = Math.max(e, bt(this.getGroup(), t.config.morph)));
|
|
1900
1906
|
}
|
|
1901
1907
|
Math.abs(e - this.featurePadding) < .5 || (this.featurePadding = e, this.onFeaturePaddingChange?.(e));
|
|
1902
1908
|
}
|
|
@@ -1909,7 +1915,7 @@ var Gt = class {
|
|
|
1909
1915
|
this.clearContentBlur(e);
|
|
1910
1916
|
return;
|
|
1911
1917
|
}
|
|
1912
|
-
let r = e.baseContentFilter.trim(), i = `${r && r !== "none" ? `${r} ` : ""}blur(${
|
|
1918
|
+
let r = e.baseContentFilter.trim(), i = `${r && r !== "none" ? `${r} ` : ""}blur(${Gt(n)}px)`;
|
|
1913
1919
|
e.lastContentFilter !== i && (e.host.style.filter = i, e.lastContentFilter = i, e.contentBlurred = !0);
|
|
1914
1920
|
}
|
|
1915
1921
|
clearBendVars(e) {
|
|
@@ -1952,7 +1958,7 @@ var Gt = class {
|
|
|
1952
1958
|
e.ownTransform && e.host.style.transform === e.ownTransform && e.host.style.removeProperty("transform"), e.ownTransform = "";
|
|
1953
1959
|
return;
|
|
1954
1960
|
}
|
|
1955
|
-
let t = `translate(${
|
|
1961
|
+
let t = `translate(${Gt(e.current.x)}px, ${Gt(e.current.y)}px) scale(${Gt(e.current.scale)})`;
|
|
1956
1962
|
e.ownTransform !== t && (e.ownTransform = t, e.host.style.transform = t);
|
|
1957
1963
|
}
|
|
1958
1964
|
createTailElements(e) {
|
|
@@ -1988,15 +1994,15 @@ var Gt = class {
|
|
|
1988
1994
|
};
|
|
1989
1995
|
}
|
|
1990
1996
|
readBox(e, t) {
|
|
1991
|
-
let n = e.host.firstElementChild ?? e.host, r =
|
|
1997
|
+
let n = e.host.firstElementChild ?? e.host, r = We(e.host, t), i = e.host.offsetWidth, a = e.host.offsetHeight;
|
|
1992
1998
|
if (e.config.observe) {
|
|
1993
1999
|
let o = n.getBoundingClientRect(), s = t.getBoundingClientRect();
|
|
1994
2000
|
o.width > 0 || o.height > 0 ? (r = {
|
|
1995
2001
|
x: o.left - s.left,
|
|
1996
2002
|
y: o.top - s.top
|
|
1997
|
-
}, i = o.width || n.offsetWidth, a = o.height || n.offsetHeight) : (r =
|
|
2003
|
+
}, i = o.width || n.offsetWidth, a = o.height || n.offsetHeight) : (r = We(n, t), i = n.offsetWidth || e.host.offsetWidth, a = n.offsetHeight || e.host.offsetHeight);
|
|
1998
2004
|
}
|
|
1999
|
-
let o = e.config.radius === void 0 ?
|
|
2005
|
+
let o = e.config.radius === void 0 ? Ge(n, i, a) : Ke(e.config.radius);
|
|
2000
2006
|
return {
|
|
2001
2007
|
x: r.x,
|
|
2002
2008
|
y: r.y,
|
|
@@ -2018,8 +2024,8 @@ var Gt = class {
|
|
|
2018
2024
|
}
|
|
2019
2025
|
paintEvolveEntry(e, t, n, r) {
|
|
2020
2026
|
let i = this.dynamicTarget(e, t);
|
|
2021
|
-
e.evolve ||=
|
|
2022
|
-
let a =
|
|
2027
|
+
e.evolve ||= xt(i), (this.reducedMotion || !this.claimed && !r) && St(e.evolve, i);
|
|
2028
|
+
let a = vt(this.getGroup(), e.config.morph), o = Ot(e.evolve, i, this.reducedMotion || !this.claimed && !r ? 0 : n, this.now(), a), s = `${o.path}|${o.transform}`, c = !1;
|
|
2023
2029
|
return e.lastPaint !== s && (e.lastPaint = s, e.blob.setAttribute("d", o.path), e.blob.setAttribute("transform", o.transform), c = !0), this.hideTail(e), this.writeContentBlur(e, o.contentBlur), {
|
|
2024
2030
|
changed: c,
|
|
2025
2031
|
moving: !this.reducedMotion && this.claimed && o.moving
|
|
@@ -2027,8 +2033,8 @@ var Gt = class {
|
|
|
2027
2033
|
}
|
|
2028
2034
|
paintBendEntry(e, t, n, r) {
|
|
2029
2035
|
let i = this.dynamicTarget(e, t);
|
|
2030
|
-
e.bendState ||=
|
|
2031
|
-
let a =
|
|
2036
|
+
e.bendState ||= ct(i), (this.reducedMotion || !this.claimed && !r) && lt(e.bendState, i);
|
|
2037
|
+
let a = et(this.getGroup(), e.config.bend), o = dt(e.bendState, i, t, this.reducedMotion || !this.claimed && !r ? 0 : n, a), s = !1;
|
|
2032
2038
|
return e.lastPaint !== o.fingerprint && (e.lastPaint = o.fingerprint, e.blob.setAttribute("d", o.path), e.blob.setAttribute("transform", o.transform), s = !0), this.hideTail(e), this.clearContentBlur(e), this.writeBendVars(e, o.bendX, o.bendY), {
|
|
2033
2039
|
changed: s,
|
|
2034
2040
|
moving: !this.reducedMotion && this.claimed && o.moving
|
|
@@ -2036,15 +2042,15 @@ var Gt = class {
|
|
|
2036
2042
|
}
|
|
2037
2043
|
paintFollowEntry(e, t, n, r, i) {
|
|
2038
2044
|
let a = this.moveTarget(e, t);
|
|
2039
|
-
!i && r && !this.reducedMotion && !this.claimed && (this.ensureClaim() ? this.setMode("animated") : (this.resetMoveEntry(e), e.move =
|
|
2040
|
-
let o = this.moveOptions ??=
|
|
2045
|
+
!i && r && !this.reducedMotion && !this.claimed && (this.ensureClaim() ? this.setMode("animated") : (this.resetMoveEntry(e), e.move = rt(a))), e.move ||= rt(a), this.reducedMotion && it(e.move, a);
|
|
2046
|
+
let o = this.moveOptions ??= $e(this.getGroup()), s = ot(e.move, a, t, this.reducedMotion ? 0 : n, o), c = `${s.path}|${s.transform}`, l = !1;
|
|
2041
2047
|
return e.lastPaint !== c && (e.lastPaint = c, e.blob.setAttribute("d", s.path), e.blob.setAttribute("transform", s.transform), l = !0), this.paintTail(e, s.tail) && (l = !0), {
|
|
2042
2048
|
changed: l,
|
|
2043
2049
|
moving: !this.reducedMotion && s.moving && this.claimed
|
|
2044
2050
|
};
|
|
2045
2051
|
}
|
|
2046
2052
|
paintEntry(e, t) {
|
|
2047
|
-
let n = t.x + e.current.x + t.w * (1 - e.current.scale) / 2, r = t.y + e.current.y + t.h * (1 - e.current.scale) / 2, i = `translate(${
|
|
2053
|
+
let n = t.x + e.current.x + t.w * (1 - e.current.scale) / 2, r = t.y + e.current.y + t.h * (1 - e.current.scale) / 2, i = `translate(${Gt(n)} ${Gt(r)}) scale(${Gt(e.current.scale)})`, a = qe(0, 0, t.w, t.h, t.r), o = `${a}|${i}`;
|
|
2048
2054
|
return e.lastPaint === o ? !1 : (e.lastPaint = o, e.blob.setAttribute("d", a), e.blob.setAttribute("transform", i), !0);
|
|
2049
2055
|
}
|
|
2050
2056
|
loop = (e) => {
|
|
@@ -2063,7 +2069,7 @@ var Gt = class {
|
|
|
2063
2069
|
for (let t of this.items.values()) {
|
|
2064
2070
|
let n = e.get(t.id);
|
|
2065
2071
|
if (!n) continue;
|
|
2066
|
-
let r = t.lastBox === null, s = !
|
|
2072
|
+
let r = t.lastBox === null, s = !Wt(t.lastBox, n);
|
|
2067
2073
|
r && a.add(t.id), s && o.add(t.id), s && (t.lastBox = n, t.lastPaint = null, i = !0);
|
|
2068
2074
|
}
|
|
2069
2075
|
this.updateFeaturePadding();
|
|
@@ -2131,18 +2137,18 @@ var Gt = class {
|
|
|
2131
2137
|
};
|
|
2132
2138
|
//#endregion
|
|
2133
2139
|
//#region src/liquidGooeyShadow.ts
|
|
2134
|
-
function
|
|
2140
|
+
function qt(e, t) {
|
|
2135
2141
|
let n = [], r = 0, i = "";
|
|
2136
2142
|
for (let a of e) a === "(" ? r += 1 : a === ")" && --r, r === 0 && (t === "," ? a === "," : /\s/.test(a)) ? (i.trim() && n.push(i.trim()), i = "") : i += a;
|
|
2137
2143
|
return i.trim() && n.push(i.trim()), n;
|
|
2138
2144
|
}
|
|
2139
|
-
var
|
|
2140
|
-
function
|
|
2145
|
+
var Jt = /^[+-]?(\d+\.?\d*|\.\d+)(px)?$/;
|
|
2146
|
+
function Yt(e) {
|
|
2141
2147
|
if (!e || e.trim() === "" || e.trim() === "none") return [];
|
|
2142
2148
|
let t = [];
|
|
2143
|
-
for (let n of
|
|
2144
|
-
let e =
|
|
2145
|
-
for (let t of e) t !== "inset" && (i.length < 4 &&
|
|
2149
|
+
for (let n of qt(e, ",")) {
|
|
2150
|
+
let e = qt(n, " "), r = e.includes("inset"), i = [], a = [];
|
|
2151
|
+
for (let t of e) t !== "inset" && (i.length < 4 && Jt.test(t) ? i.push(parseFloat(t)) : a.push(t));
|
|
2146
2152
|
let [o = 0, s = 0, c = 0, l = 0] = i;
|
|
2147
2153
|
t.push({
|
|
2148
2154
|
x: o,
|
|
@@ -2155,31 +2161,31 @@ function Jt(e) {
|
|
|
2155
2161
|
}
|
|
2156
2162
|
return t;
|
|
2157
2163
|
}
|
|
2158
|
-
function
|
|
2164
|
+
function Xt(e) {
|
|
2159
2165
|
if (!e || e.trim() === "" || e.trim() === "none") return null;
|
|
2160
|
-
let t =
|
|
2161
|
-
for (let e of t) e !== "solid" && (n === 0 &&
|
|
2166
|
+
let t = qt(e, " "), n = 0, r = [];
|
|
2167
|
+
for (let e of t) e !== "solid" && (n === 0 && Jt.test(e) ? n = parseFloat(e) : r.push(e));
|
|
2162
2168
|
return {
|
|
2163
2169
|
width: n,
|
|
2164
2170
|
color: r.join(" ") || "var(--game-ui-stroke, transparent)"
|
|
2165
2171
|
};
|
|
2166
2172
|
}
|
|
2167
|
-
function Xt(e) {
|
|
2168
|
-
return !e.inset && e.spread === 0 && (e.blur > 0 || e.x !== 0 || e.y !== 0);
|
|
2169
|
-
}
|
|
2170
2173
|
function Zt(e) {
|
|
2171
|
-
|
|
2172
|
-
return t.length > 0 ? t.join(" ") : void 0;
|
|
2174
|
+
return !e.inset && e.spread === 0 && (e.blur > 0 || e.x !== 0 || e.y !== 0);
|
|
2173
2175
|
}
|
|
2174
2176
|
function Qt(e) {
|
|
2175
|
-
|
|
2177
|
+
let t = e.filter(Zt).map((e) => `drop-shadow(${e.x}px ${e.y}px ${e.blur}px ${e.color})`);
|
|
2178
|
+
return t.length > 0 ? t.join(" ") : void 0;
|
|
2176
2179
|
}
|
|
2177
2180
|
function $t(e) {
|
|
2181
|
+
return e.filter((e) => !Zt(e));
|
|
2182
|
+
}
|
|
2183
|
+
function en(e) {
|
|
2178
2184
|
return e.reduce((e, t) => Math.max(e, Math.max(Math.abs(t.x), Math.abs(t.y)) + t.blur * 1.5 + Math.max(0, t.spread)), 0);
|
|
2179
2185
|
}
|
|
2180
2186
|
//#endregion
|
|
2181
2187
|
//#region src/liquidGooeyImageMelt.tsx
|
|
2182
|
-
var
|
|
2188
|
+
var tn = 24, nn = 500, rn = 16, an = 6, on = {
|
|
2183
2189
|
blur: 7,
|
|
2184
2190
|
contrast: 40,
|
|
2185
2191
|
reach: .8,
|
|
@@ -2209,48 +2215,48 @@ var en = 24, tn = 500, nn = 16, rn = 6, an = {
|
|
|
2209
2215
|
sink: .8,
|
|
2210
2216
|
seamBlur: 12.8
|
|
2211
2217
|
};
|
|
2212
|
-
function
|
|
2218
|
+
function sn(e, t = 0, n = 1) {
|
|
2213
2219
|
return Math.min(n, Math.max(t, e));
|
|
2214
2220
|
}
|
|
2215
|
-
function
|
|
2221
|
+
function cn(e, t) {
|
|
2216
2222
|
return e !== void 0 && Number.isFinite(e) ? e : t;
|
|
2217
2223
|
}
|
|
2218
|
-
function
|
|
2224
|
+
function ln(e, t, n) {
|
|
2219
2225
|
let r = e?.ownerDocument.defaultView;
|
|
2220
2226
|
if (!r) return n;
|
|
2221
|
-
let i =
|
|
2227
|
+
let i = R[t], a = /^var\((--[\w-]+)\)$/.exec(i)?.[1];
|
|
2222
2228
|
if (!a) return n;
|
|
2223
2229
|
let o = Number.parseFloat(r.getComputedStyle(e).getPropertyValue(a));
|
|
2224
2230
|
return Number.isFinite(o) ? o : n;
|
|
2225
2231
|
}
|
|
2226
|
-
function
|
|
2227
|
-
let n = (n, r) =>
|
|
2232
|
+
function un(e, t = {}) {
|
|
2233
|
+
let n = (n, r) => cn(t[n], ln(e, r, on[n]));
|
|
2228
2234
|
return {
|
|
2229
2235
|
blur: Math.max(0, n("blur", "meltBlur")),
|
|
2230
2236
|
contrast: Math.max(1, n("contrast", "meltContrast")),
|
|
2231
2237
|
reach: Math.max(0, n("reach", "meltReach")),
|
|
2232
2238
|
fade: Math.max(0, n("fade", "meltFade")),
|
|
2233
2239
|
warp: Math.max(0, n("warp", "meltWarp")),
|
|
2234
|
-
mix:
|
|
2240
|
+
mix: sn(n("mix", "meltMix")),
|
|
2235
2241
|
mixBlur: Math.max(0, n("mixBlur", "meltMixBlur")),
|
|
2236
2242
|
gravity: Math.max(0, n("gravity", "meltGravity")),
|
|
2237
2243
|
waviness: Math.max(0, n("waviness", "meltWaviness"))
|
|
2238
2244
|
};
|
|
2239
2245
|
}
|
|
2240
|
-
function
|
|
2246
|
+
function dn(e, t) {
|
|
2241
2247
|
let n = typeof t == "object" && t ? t : {}, r = (t, r, i) => {
|
|
2242
2248
|
let a = n[t];
|
|
2243
|
-
return
|
|
2244
|
-
}, i =
|
|
2249
|
+
return cn(typeof a == "number" ? a : void 0, ln(e, r, i));
|
|
2250
|
+
}, i = sn(typeof t == "number" ? t : r("strength", "dissolveStrength", J.strength));
|
|
2245
2251
|
return {
|
|
2246
2252
|
blur: Math.max(0, r("blur", "dissolveBlur", J.blur)),
|
|
2247
2253
|
warp: Math.max(0, r("warp", "dissolveWarp", J.warp)),
|
|
2248
2254
|
pull: Math.max(0, r("pull", "dissolvePull", J.pull)),
|
|
2249
2255
|
range: Math.max(1, r("range", "dissolveRange", J.range)),
|
|
2250
2256
|
zone: Math.max(1, r("zone", "dissolveZone", J.zone)),
|
|
2251
|
-
mix:
|
|
2257
|
+
mix: sn(r("mix", "dissolveMix", J.mix)),
|
|
2252
2258
|
gravity: Math.max(0, r("gravity", "dissolveGravity", J.gravity)),
|
|
2253
|
-
taper:
|
|
2259
|
+
taper: sn(r("taper", "dissolveTaper", J.taper)),
|
|
2254
2260
|
warpFreq: Math.max(.2, r("warpFreq", "dissolveWarpFreq", J.warpFreq)),
|
|
2255
2261
|
flowSpeed: Math.max(0, r("flowSpeed", "dissolveFlowSpeed", J.flowSpeed)),
|
|
2256
2262
|
warpStyle: n.warpStyle ?? J.warpStyle,
|
|
@@ -2263,13 +2269,13 @@ function un(e, t) {
|
|
|
2263
2269
|
seamBlur: Math.max(0, r("seamBlur", "dissolveSeamBlur", J.seamBlur))
|
|
2264
2270
|
};
|
|
2265
2271
|
}
|
|
2266
|
-
function
|
|
2272
|
+
function fn(e) {
|
|
2267
2273
|
return e ? e instanceof HTMLImageElement ? e : e.querySelector("img") : null;
|
|
2268
2274
|
}
|
|
2269
|
-
function
|
|
2275
|
+
function pn(e) {
|
|
2270
2276
|
return e && (e.currentSrc || e.src) || null;
|
|
2271
2277
|
}
|
|
2272
|
-
function
|
|
2278
|
+
function mn(e) {
|
|
2273
2279
|
return {
|
|
2274
2280
|
maskImage: e.style.getPropertyValue("mask-image"),
|
|
2275
2281
|
maskPriority: e.style.getPropertyPriority("mask-image"),
|
|
@@ -2277,11 +2283,11 @@ function pn(e) {
|
|
|
2277
2283
|
webkitMaskPriority: e.style.getPropertyPriority("-webkit-mask-image")
|
|
2278
2284
|
};
|
|
2279
2285
|
}
|
|
2280
|
-
function
|
|
2286
|
+
function hn(e) {
|
|
2281
2287
|
let t = e.image, n = e.previousMask;
|
|
2282
2288
|
!t || !n || (n.maskImage ? t.style.setProperty("mask-image", n.maskImage, n.maskPriority) : t.style.removeProperty("mask-image"), n.webkitMaskImage ? t.style.setProperty("-webkit-mask-image", n.webkitMaskImage, n.webkitMaskPriority) : t.style.removeProperty("-webkit-mask-image"));
|
|
2283
2289
|
}
|
|
2284
|
-
function
|
|
2290
|
+
function gn() {
|
|
2285
2291
|
let e = /* @__PURE__ */ new Set(), t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), r = 0, i = () => n.forEach((e) => e());
|
|
2286
2292
|
return {
|
|
2287
2293
|
registerMelt(t) {
|
|
@@ -2299,15 +2305,15 @@ function hn() {
|
|
|
2299
2305
|
let n = {
|
|
2300
2306
|
...e,
|
|
2301
2307
|
id: `dissolve-${++r}`,
|
|
2302
|
-
previousMask: e.image ?
|
|
2308
|
+
previousMask: e.image ? mn(e.image) : null
|
|
2303
2309
|
};
|
|
2304
2310
|
return t.add(n), i(), {
|
|
2305
2311
|
update(e) {
|
|
2306
|
-
let t =
|
|
2307
|
-
t !== n.image && (
|
|
2312
|
+
let t = fn(n.el);
|
|
2313
|
+
t !== n.image && (hn(n), n.image = t, n.previousMask = t ? mn(t) : null), n.opts = dn(n.el, e), i();
|
|
2308
2314
|
},
|
|
2309
2315
|
unregister() {
|
|
2310
|
-
|
|
2316
|
+
hn(n), t.delete(n), i();
|
|
2311
2317
|
}
|
|
2312
2318
|
};
|
|
2313
2319
|
},
|
|
@@ -2318,20 +2324,20 @@ function hn() {
|
|
|
2318
2324
|
dissolveEntries: () => [...t]
|
|
2319
2325
|
};
|
|
2320
2326
|
}
|
|
2321
|
-
function
|
|
2322
|
-
let r =
|
|
2327
|
+
function _n(e, t, n) {
|
|
2328
|
+
let r = fn(t);
|
|
2323
2329
|
return r || console.warn("[swimmer-ui] `dissolve` needs an <img> inside the item; text and other DOM content stay unchanged."), e.registerDissolve({
|
|
2324
2330
|
el: t,
|
|
2325
2331
|
image: r,
|
|
2326
|
-
opts:
|
|
2332
|
+
opts: dn(t, n)
|
|
2327
2333
|
});
|
|
2328
2334
|
}
|
|
2329
|
-
function
|
|
2335
|
+
function vn({ src: e, options: n = {}, registry: r, children: i, forwardedRef: a, className: o, style: s, ...c }) {
|
|
2330
2336
|
let l = p(null), u = JSON.stringify(n), f = p(!1), m = (e) => {
|
|
2331
2337
|
l.current = e, typeof a == "function" ? a(e) : a && (a.current = e);
|
|
2332
2338
|
};
|
|
2333
2339
|
return d(() => {
|
|
2334
|
-
let t = l.current, i = t?.firstElementChild, a =
|
|
2340
|
+
let t = l.current, i = t?.firstElementChild, a = fn(i), o = e ?? pn(a);
|
|
2335
2341
|
if (!t || !i || !a || !o) {
|
|
2336
2342
|
f.current || (f.current = !0, console.warn("[swimmer-ui] effect=\"melt\" needs an image: pass melt={{ src }} or put an <img> inside the item."));
|
|
2337
2343
|
return;
|
|
@@ -2340,7 +2346,7 @@ function _n({ src: e, options: n = {}, registry: r, children: i, forwardedRef: a
|
|
|
2340
2346
|
el: t,
|
|
2341
2347
|
target: a,
|
|
2342
2348
|
src: o,
|
|
2343
|
-
opts:
|
|
2349
|
+
opts: un(t, n)
|
|
2344
2350
|
});
|
|
2345
2351
|
}, [
|
|
2346
2352
|
u,
|
|
@@ -2354,7 +2360,7 @@ function _n({ src: e, options: n = {}, registry: r, children: i, forwardedRef: a
|
|
|
2354
2360
|
children: i
|
|
2355
2361
|
});
|
|
2356
2362
|
}
|
|
2357
|
-
var
|
|
2363
|
+
var yn = {
|
|
2358
2364
|
width: 0,
|
|
2359
2365
|
height: 0,
|
|
2360
2366
|
melt: null,
|
|
@@ -2364,28 +2370,28 @@ function Y(e, t = 2) {
|
|
|
2364
2370
|
let n = 10 ** t;
|
|
2365
2371
|
return Math.round(e * n) / n;
|
|
2366
2372
|
}
|
|
2367
|
-
function
|
|
2368
|
-
let t =
|
|
2373
|
+
function bn(e) {
|
|
2374
|
+
let t = sn(e);
|
|
2369
2375
|
return t * t * (3 - 2 * t);
|
|
2370
2376
|
}
|
|
2371
|
-
function
|
|
2377
|
+
function xn(e, t) {
|
|
2372
2378
|
let n = Math.max(t.x - (e.x + e.w), e.x - (t.x + t.w), 0), r = Math.max(t.y - (e.y + e.h), e.y - (t.y + t.h), 0);
|
|
2373
2379
|
return Math.hypot(n, r);
|
|
2374
2380
|
}
|
|
2375
|
-
function
|
|
2381
|
+
function Sn(e, t) {
|
|
2376
2382
|
return {
|
|
2377
2383
|
x: e.x + e.w < t.x ? (e.x + e.w + t.x) / 2 : t.x + t.w < e.x ? (t.x + t.w + e.x) / 2 : (Math.max(e.x, t.x) + Math.min(e.x + e.w, t.x + t.w)) / 2,
|
|
2378
2384
|
y: e.y + e.h < t.y ? (e.y + e.h + t.y) / 2 : t.y + t.h < e.y ? (t.y + t.h + e.y) / 2 : (Math.max(e.y, t.y) + Math.min(e.y + e.h, t.y + t.h)) / 2
|
|
2379
2385
|
};
|
|
2380
2386
|
}
|
|
2381
|
-
function
|
|
2387
|
+
function Cn(e, t, n) {
|
|
2382
2388
|
let r = e.ownerDocument.defaultView?.getComputedStyle(e).borderTopLeftRadius ?? "";
|
|
2383
2389
|
return Math.max(0, Math.min(Number.parseFloat(r) || 0, t / 2, n / 2));
|
|
2384
2390
|
}
|
|
2385
|
-
function
|
|
2391
|
+
function wn(e) {
|
|
2386
2392
|
return e.getBoundingClientRect();
|
|
2387
2393
|
}
|
|
2388
|
-
function
|
|
2394
|
+
function Tn(e, t) {
|
|
2389
2395
|
let n = e.getBoundingClientRect();
|
|
2390
2396
|
return {
|
|
2391
2397
|
x: n.left - t.left,
|
|
@@ -2394,21 +2400,21 @@ function wn(e, t) {
|
|
|
2394
2400
|
h: n.height
|
|
2395
2401
|
};
|
|
2396
2402
|
}
|
|
2397
|
-
function
|
|
2398
|
-
let n =
|
|
2403
|
+
function En(e, t) {
|
|
2404
|
+
let n = Tn(e, t);
|
|
2399
2405
|
return {
|
|
2400
2406
|
...n,
|
|
2401
|
-
r:
|
|
2407
|
+
r: Cn(e, n.w, n.h)
|
|
2402
2408
|
};
|
|
2403
2409
|
}
|
|
2404
|
-
function
|
|
2410
|
+
function Dn(e) {
|
|
2405
2411
|
return `${Y(e.x)}:${Y(e.y)}:${Y(e.w)}:${Y(e.h)}`;
|
|
2406
2412
|
}
|
|
2407
|
-
function
|
|
2408
|
-
let r = Math.max(1, e.offsetWidth || e.getBoundingClientRect().width), i = Math.max(1, e.offsetHeight || e.getBoundingClientRect().height), a = t ? Math.max(
|
|
2413
|
+
function On(e, t, n) {
|
|
2414
|
+
let r = Math.max(1, e.offsetWidth || e.getBoundingClientRect().width), i = Math.max(1, e.offsetHeight || e.getBoundingClientRect().height), a = t ? Math.max(tn, t.blur * 3, t.fade * 2, t.warp + t.waviness, t.mixBlur * 2, t.gravity * .5) : 0, o = n ? Math.max(tn, n.blur * 3, n.warp + n.zone, n.gravity * .5, n.seamBlur * 3) : 0, s = Math.ceil(Math.max(a, o, tn));
|
|
2409
2415
|
return (r + s * 2) * (i + s * 2);
|
|
2410
2416
|
}
|
|
2411
|
-
function
|
|
2417
|
+
function kn(e) {
|
|
2412
2418
|
let t = e[0]?.opts;
|
|
2413
2419
|
return t ? e.slice(1).reduce((e, t) => ({
|
|
2414
2420
|
...e,
|
|
@@ -2419,25 +2425,25 @@ function On(e) {
|
|
|
2419
2425
|
seamBlur: Math.max(e.seamBlur, t.opts.seamBlur)
|
|
2420
2426
|
}), { ...t }) : null;
|
|
2421
2427
|
}
|
|
2422
|
-
function
|
|
2428
|
+
function An(e, t, n, r, i, a, o, s, c) {
|
|
2423
2429
|
let l = Math.atan2(r, n) * 180 / Math.PI, u = Math.max(0, (s - 1) * Math.max(8, 2 * i)), d = Math.min(2.2, (Math.max(0, o) + u) / Math.max(8, 2 * i)) * (.5 + c), f = 1 + d, p = 1 / (1 + d * .35), m = e - n * (i + a), h = t - r * (i + a);
|
|
2424
2430
|
return `translate(${Y(m)} ${Y(h)}) rotate(${Y(l)}) scale(${Y(f, 3)} ${Y(p, 3)}) rotate(${-Y(l)}) translate(${Y(-m)} ${Y(-h)})`;
|
|
2425
2431
|
}
|
|
2426
|
-
function
|
|
2432
|
+
function jn(e, t, n, r, i, a) {
|
|
2427
2433
|
let o = t - e.x, s = n - e.y;
|
|
2428
2434
|
if (Math.hypot(Math.max(e.x - t, t - (e.x + e.w), 0), Math.max(e.y - n, n - (e.y + e.h), 0)) > r + 2) return null;
|
|
2429
2435
|
let c = Math.min(e.w, e.h) / 2, l = Math.min(Math.max(r, a * .75), c), u = Y(Math.max(0, 1 - Math.min(i, a) * 2.2), 2), d = Y((1 + 2 * u) / 3, 2), f = Math.max(Math.hypot(o, s), Math.hypot(o - e.w, s), Math.hypot(o, s - e.h), Math.hypot(o - e.w, s - e.h)) + 2;
|
|
2430
2436
|
return `radial-gradient(circle at ${Y(o)}px ${Y(s)}px, rgba(255,255,255,${u}) ${Y(l * .2)}px, rgba(255,255,255,${d}) ${Y(l * .45)}px, #fff ${Y(l * .78)}px, #fff ${Y(f)}px)`;
|
|
2431
2437
|
}
|
|
2432
|
-
function
|
|
2438
|
+
function Mn(e) {
|
|
2433
2439
|
if (e < .002) return "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1";
|
|
2434
2440
|
let t = Y(1 + 4 * e, 3);
|
|
2435
2441
|
return `0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ${t} 0 0 0 ${Y(1 - t * (.38 + .12 * e), 3)}`;
|
|
2436
2442
|
}
|
|
2437
|
-
function
|
|
2443
|
+
function Nn(e) {
|
|
2438
2444
|
return e.replace(/[^a-zA-Z0-9_-]/g, "");
|
|
2439
2445
|
}
|
|
2440
|
-
var
|
|
2446
|
+
var Pn = class {
|
|
2441
2447
|
registry;
|
|
2442
2448
|
getGroup;
|
|
2443
2449
|
onState;
|
|
@@ -2469,7 +2475,7 @@ var Nn = class {
|
|
|
2469
2475
|
if (!this.disposed) {
|
|
2470
2476
|
this.disposed = !0, this.raf && cancelAnimationFrame(this.raf), this.raf = 0, this.awake = !1, this.resizeObserver?.disconnect(), this.mutationObserver?.disconnect(), this.removeListeners.forEach((e) => e()), this.removeListeners.length = 0;
|
|
2471
2477
|
for (let e of this.registry.entries()) this.setMeltPainted(e, !1);
|
|
2472
|
-
for (let e of this.registry.dissolveEntries())
|
|
2478
|
+
for (let e of this.registry.dissolveEntries()) hn(e);
|
|
2473
2479
|
this.releaseClaim(), this.observed.clear();
|
|
2474
2480
|
}
|
|
2475
2481
|
}
|
|
@@ -2483,7 +2489,7 @@ var Nn = class {
|
|
|
2483
2489
|
let t = /* @__PURE__ */ new Set(), n = (e) => {
|
|
2484
2490
|
e && (t.add(e), this.observed.has(e) || this.resizeObserver?.observe(e));
|
|
2485
2491
|
};
|
|
2486
|
-
for (let e of this.registry.entries()) n(e.el), n(e.target), n(
|
|
2492
|
+
for (let e of this.registry.entries()) n(e.el), n(e.target), n(fn(e.target));
|
|
2487
2493
|
for (let e of this.registry.dissolveEntries()) n(e.el), n(e.image);
|
|
2488
2494
|
for (let e of this.observed) t.has(e) || this.resizeObserver?.unobserve(e);
|
|
2489
2495
|
this.observed.clear(), t.forEach((e) => this.observed.add(e)), !this.mutationObserver && typeof MutationObserver < "u" && (this.mutationObserver = new MutationObserver((e) => {
|
|
@@ -2519,14 +2525,14 @@ var Nn = class {
|
|
|
2519
2525
|
e.painted !== t && (e.painted = t, e.target.style.opacity = t ? "0" : e.previousOpacity);
|
|
2520
2526
|
}
|
|
2521
2527
|
releaseClaim() {
|
|
2522
|
-
this.claimed &&= (
|
|
2528
|
+
this.claimed &&= (Me(), !1);
|
|
2523
2529
|
}
|
|
2524
2530
|
ensureClaim(e, t, n) {
|
|
2525
2531
|
if (this.claimed) return !0;
|
|
2526
|
-
if (!
|
|
2532
|
+
if (!je(On(e, t, n))) {
|
|
2527
2533
|
if (!this.budgetWarningEmitted) {
|
|
2528
2534
|
this.budgetWarningEmitted = !0;
|
|
2529
|
-
let e =
|
|
2535
|
+
let e = ke(), t = e.activeGroups >= e.maxAnimatedGroups ? "the active-group limit is reached" : "the filter-area limit is exceeded";
|
|
2530
2536
|
console.warn(`LiquidGroup: the Melt/dissolve image filter budget is insufficient (${t}); degrading to crisp imagery for this group.`);
|
|
2531
2537
|
}
|
|
2532
2538
|
return !1;
|
|
@@ -2537,7 +2543,7 @@ var Nn = class {
|
|
|
2537
2543
|
if (this.raf = 0, this.disposed) return;
|
|
2538
2544
|
let t = this.registry.entries(), n = this.registry.dissolveEntries();
|
|
2539
2545
|
if (t.length === 0 && n.length === 0) {
|
|
2540
|
-
this.awake = !1, this.lastNow = 0, this.lastActivity = 0, this.meltPairKey = "", this.meltProximity = 0, this.lastStateKey && (this.lastStateKey = "", this.onState(
|
|
2546
|
+
this.awake = !1, this.lastNow = 0, this.lastActivity = 0, this.meltPairKey = "", this.meltProximity = 0, this.lastStateKey && (this.lastStateKey = "", this.onState(yn)), this.releaseClaim();
|
|
2541
2547
|
return;
|
|
2542
2548
|
}
|
|
2543
2549
|
let r = this.getGroup();
|
|
@@ -2547,23 +2553,23 @@ var Nn = class {
|
|
|
2547
2553
|
}
|
|
2548
2554
|
let i = this.lastNow ? Math.min(.25, Math.max(1 / 240, (e - this.lastNow) / 1e3)) : 1 / 60;
|
|
2549
2555
|
this.lastNow = e;
|
|
2550
|
-
let a =
|
|
2551
|
-
for (let e of r.querySelectorAll(".game-ui-liquid-item")) e.closest(".game-ui-liquid-group") === r && o.set(e,
|
|
2556
|
+
let a = wn(r), o = /* @__PURE__ */ new Map();
|
|
2557
|
+
for (let e of r.querySelectorAll(".game-ui-liquid-item")) e.closest(".game-ui-liquid-group") === r && o.set(e, Tn(e, a));
|
|
2552
2558
|
let s = t.slice(0, 2), c = s.map((e) => {
|
|
2553
|
-
let t = o.get(e.el) ??
|
|
2559
|
+
let t = o.get(e.el) ?? Tn(e.el, a), n = pn(fn(e.target));
|
|
2554
2560
|
return n && (e.src = n), {
|
|
2555
2561
|
...t,
|
|
2556
|
-
r:
|
|
2562
|
+
r: Cn(e.target, t.w, t.h)
|
|
2557
2563
|
};
|
|
2558
2564
|
}), l = s.length === 2 && c.every((e) => e.w > 0 && e.h > 0), u = l ? s[0]?.opts ?? null : null, d = l ? `${s[0]?.id}|${s[1]?.id}` : "";
|
|
2559
2565
|
d !== this.meltPairKey && (this.meltPairKey = d, this.meltProximity = 0);
|
|
2560
|
-
let f = l && c[0] && c[1] ?
|
|
2566
|
+
let f = l && c[0] && c[1] ? bn(1 - xn(c[0], c[1]) / Math.max(8, u.blur * 2.6)) : 0;
|
|
2561
2567
|
this.meltProximity += (f - this.meltProximity) * (1 - Math.exp(-14 * i)), Math.abs(this.meltProximity - f) < .004 && (this.meltProximity = f);
|
|
2562
|
-
let p = this.computeDissolves(n, o, a, i), m = l, h = p.visuals.length > 0, g = m || h, _ =
|
|
2568
|
+
let p = this.computeDissolves(n, o, a, i), m = l, h = p.visuals.length > 0, g = m || h, _ = kn(n);
|
|
2563
2569
|
if (g && !this.ensureClaim(r, u, _)) {
|
|
2564
2570
|
for (let e of t) this.setMeltPainted(e, !1);
|
|
2565
|
-
for (let e of n)
|
|
2566
|
-
this.onState(
|
|
2571
|
+
for (let e of n) hn(e);
|
|
2572
|
+
this.onState(yn), this.lastStateKey = "", this.awake = !1, this.lastNow = 0;
|
|
2567
2573
|
return;
|
|
2568
2574
|
}
|
|
2569
2575
|
if (m) for (let [e, n] of t.entries()) this.setMeltPainted(n, e < 2);
|
|
@@ -2580,14 +2586,14 @@ var Nn = class {
|
|
|
2580
2586
|
srcA: s[0].src,
|
|
2581
2587
|
srcB: s[1].src,
|
|
2582
2588
|
opts: s[0].opts,
|
|
2583
|
-
prox:
|
|
2589
|
+
prox: sn(this.meltProximity)
|
|
2584
2590
|
} : null,
|
|
2585
2591
|
dissolves: p.visuals
|
|
2586
2592
|
}, y = this.renderStateKey(v), b = y !== this.lastStateKey;
|
|
2587
|
-
b && (this.lastStateKey = y, this.onState(v), this.lastActivity = e), b || p.pending || e - this.lastActivity <
|
|
2593
|
+
b && (this.lastStateKey = y, this.onState(v), this.lastActivity = e), b || p.pending || e - this.lastActivity < nn ? (this.awake = !0, this.raf = requestAnimationFrame(this.loop)) : (this.awake = !1, this.lastNow = 0);
|
|
2588
2594
|
};
|
|
2589
2595
|
renderStateKey(e) {
|
|
2590
|
-
let t = e.melt ? `${e.melt.srcA}|${e.melt.srcB}|${
|
|
2596
|
+
let t = e.melt ? `${e.melt.srcA}|${e.melt.srcB}|${Dn(e.melt.a)}|${Dn(e.melt.b)}|${Y(e.melt.prox, 3)}` : "", n = e.dissolves.map((e) => `${e.id}|${e.src}|${e.neighborSrc ?? ""}|${Dn(e.image)}|${Y(e.cx)}|${Y(e.cy)}|${Y(e.d, 2)}|${Y(e.opacity, 3)}|${Y(e.phase, 3)}|${e.mask ?? ""}`).join(";");
|
|
2591
2597
|
return `${e.width}x${e.height}|${t}|${n}`;
|
|
2592
2598
|
}
|
|
2593
2599
|
computeDissolves(e, t, n, r) {
|
|
@@ -2595,7 +2601,7 @@ var Nn = class {
|
|
|
2595
2601
|
for (let s of e) {
|
|
2596
2602
|
let e = t.get(s.el), c = s.image;
|
|
2597
2603
|
if (!e || !c) {
|
|
2598
|
-
s.image &&
|
|
2604
|
+
s.image && hn(s);
|
|
2599
2605
|
continue;
|
|
2600
2606
|
}
|
|
2601
2607
|
let l = this.motions.get(s.id) ?? {
|
|
@@ -2611,7 +2617,7 @@ var Nn = class {
|
|
|
2611
2617
|
let u = Infinity, d = null, f = null;
|
|
2612
2618
|
for (let [t, n] of o) {
|
|
2613
2619
|
if (t === s.el) continue;
|
|
2614
|
-
let r =
|
|
2620
|
+
let r = xn(e, n);
|
|
2615
2621
|
r < u && (u = r, d = n, f = t);
|
|
2616
2622
|
}
|
|
2617
2623
|
let p = 0, m = 0;
|
|
@@ -2621,11 +2627,11 @@ var Nn = class {
|
|
|
2621
2627
|
}
|
|
2622
2628
|
let h = 0;
|
|
2623
2629
|
if (d && u < s.opts.range && s.opts.active) {
|
|
2624
|
-
let e =
|
|
2630
|
+
let e = bn((1 - u / s.opts.range) / .65), t = bn((p - s.opts.sink * .2) / Math.max(.01, s.opts.sink * .8));
|
|
2625
2631
|
h = e ** 1.25 * s.opts.strength * (1 - t);
|
|
2626
2632
|
}
|
|
2627
|
-
if (h >= l.fade) l.fade += (h - l.fade) * Math.min(1, r *
|
|
2628
|
-
else if (h > .02) l.fade += (h - l.fade) * Math.min(1, r *
|
|
2633
|
+
if (h >= l.fade) l.fade += (h - l.fade) * Math.min(1, r * rn), l.release = null;
|
|
2634
|
+
else if (h > .02) l.fade += (h - l.fade) * Math.min(1, r * an), l.release = null;
|
|
2629
2635
|
else if (l.fade > .001 || l.release) {
|
|
2630
2636
|
l.release ||= {
|
|
2631
2637
|
from: l.fade,
|
|
@@ -2635,26 +2641,26 @@ var Nn = class {
|
|
|
2635
2641
|
l.fade = l.release.from * (1 - t) ** 2;
|
|
2636
2642
|
} else l.fade = 0;
|
|
2637
2643
|
if (l.fade <= .001) {
|
|
2638
|
-
l.fade = 0,
|
|
2644
|
+
l.fade = 0, hn(s);
|
|
2639
2645
|
continue;
|
|
2640
2646
|
}
|
|
2641
2647
|
let g = d ?? l.contact;
|
|
2642
2648
|
if (!g) continue;
|
|
2643
|
-
let _ =
|
|
2649
|
+
let _ = Sn(e, g);
|
|
2644
2650
|
l.contact = { ...g };
|
|
2645
|
-
let v =
|
|
2646
|
-
l.opacity = l.release ? (1 - y) ** 2 : l.opacity + (1 - l.opacity) * Math.min(1, r *
|
|
2651
|
+
let v = bn(l.release ? l.release.from * (.55 + .45 * (1 - Math.min(1, l.release.elapsed / Math.max(40, s.opts.fadeMs)))) : l.fade), y = l.release ? Math.min(1, l.release.elapsed / Math.max(40, s.opts.fadeMs)) : 0;
|
|
2652
|
+
l.opacity = l.release ? (1 - y) ** 2 : l.opacity + (1 - l.opacity) * Math.min(1, r * rn);
|
|
2647
2653
|
let b = Math.min(Math.min(e.w, e.h) * .9, s.opts.zone * (.7 + .6 * v)), x = l.previous, S = x ? Math.hypot(e.x - x.x, e.y - x.y) / Math.max(.001, r) : 0;
|
|
2648
2654
|
l.previous = {
|
|
2649
2655
|
x: e.x,
|
|
2650
2656
|
y: e.y
|
|
2651
2657
|
}, l.phase += Math.min(r, 1 / 24) * s.opts.flowSpeed * .12 * Math.min(1, S / 40);
|
|
2652
|
-
let C = (g.x + g.w / 2 - _.x) / Math.max(.001, Math.hypot(g.x + g.w / 2 - _.x, g.y + g.h / 2 - _.y)), w = (g.y + g.h / 2 - _.y) / Math.max(.001, Math.hypot(g.x + g.w / 2 - _.x, g.y + g.h / 2 - _.y)), T = 1 + Math.min(1.8, u / Math.max(8, 2 * b)), E =
|
|
2653
|
-
O ? (c.style.setProperty("mask-image", O), c.style.setProperty("-webkit-mask-image", O)) :
|
|
2658
|
+
let C = (g.x + g.w / 2 - _.x) / Math.max(.001, Math.hypot(g.x + g.w / 2 - _.x, g.y + g.h / 2 - _.y)), w = (g.y + g.h / 2 - _.y) / Math.max(.001, Math.hypot(g.x + g.w / 2 - _.x, g.y + g.h / 2 - _.y)), T = 1 + Math.min(1.8, u / Math.max(8, 2 * b)), E = En(c, n), D = d && u < Math.max(10, s.opts.blur * 2.5) ? bn(1 - u / Math.max(10, s.opts.blur * 2.5)) : l.fade, O = jn(E, _.x, _.y, b, l.fade, Math.max(D, m * .75));
|
|
2659
|
+
O ? (c.style.setProperty("mask-image", O), c.style.setProperty("-webkit-mask-image", O)) : hn(s);
|
|
2654
2660
|
let ee = Math.atan2(w, C) * 180 / Math.PI, k = {
|
|
2655
2661
|
id: s.id,
|
|
2656
|
-
src:
|
|
2657
|
-
neighborSrc: f ? fn(
|
|
2662
|
+
src: pn(c) ?? c.src,
|
|
2663
|
+
neighborSrc: f ? pn(fn(f)) : null,
|
|
2658
2664
|
image: E,
|
|
2659
2665
|
cx: _.x,
|
|
2660
2666
|
cy: _.y,
|
|
@@ -2679,8 +2685,8 @@ var Nn = class {
|
|
|
2679
2685
|
};
|
|
2680
2686
|
}
|
|
2681
2687
|
};
|
|
2682
|
-
function
|
|
2683
|
-
let f = `lgm-${
|
|
2688
|
+
function Fn({ a: r, b: i, srcA: a, srcB: o, opts: s, width: c, height: l, prox: d }) {
|
|
2689
|
+
let f = `lgm-${Nn(u())}`, { blur: p, contrast: m, reach: h, fade: g, warp: _, mix: v, mixBlur: y, gravity: b, waviness: x } = s, S = {
|
|
2684
2690
|
x: r.x + r.w / 2,
|
|
2685
2691
|
y: r.y + r.h / 2
|
|
2686
2692
|
}, C = {
|
|
@@ -2689,7 +2695,7 @@ function Pn({ a: r, b: i, srcA: a, srcB: o, opts: s, width: c, height: l, prox:
|
|
|
2689
2695
|
}, w = Math.hypot(r.w, r.h) / 2 * h * d, T = Math.hypot(i.w, i.h) / 2 * h * d, E = {
|
|
2690
2696
|
x: (S.x + C.x) / 2,
|
|
2691
2697
|
y: (S.y + C.y) / 2
|
|
2692
|
-
}, D = C.x - S.x, O = C.y - S.y, ee = Math.max(.001, Math.hypot(D, O)), k = -O / ee, te = D / ee, ne = Math.max(0, (r.w + i.w) / 2 - Math.abs(D)), A = Math.max(0, (r.h + i.h) / 2 - Math.abs(O)), j = .5 * (ne * Math.abs(k) + A * Math.abs(te)) * d, M = Math.round(Math.atan2(te, k) * 180 / Math.PI), re = Math.round(v * d * 100) / 100, ie = Math.round((2 + (p - 2) * d) * 10) / 10, ae = Math.round(_ * d * 10) / 10,
|
|
2698
|
+
}, D = C.x - S.x, O = C.y - S.y, ee = Math.max(.001, Math.hypot(D, O)), k = -O / ee, te = D / ee, ne = Math.max(0, (r.w + i.w) / 2 - Math.abs(D)), A = Math.max(0, (r.h + i.h) / 2 - Math.abs(O)), j = .5 * (ne * Math.abs(k) + A * Math.abs(te)) * d, M = Math.round(Math.atan2(te, k) * 180 / Math.PI), re = Math.round(v * d * 100) / 100, ie = Math.round((2 + (p - 2) * d) * 10) / 10, ae = Math.round(_ * d * 10) / 10, oe = Math.round(ie * 2.5 * 10) / 10, se = Math.round((.4 + (2 + p * .8) * d) * 10) / 10, ce = `translate(${r.x}, ${r.y})`, le = `translate(${i.x}, ${i.y})`;
|
|
2693
2699
|
return /* @__PURE__ */ n("svg", {
|
|
2694
2700
|
"aria-hidden": "true",
|
|
2695
2701
|
focusable: "false",
|
|
@@ -2750,7 +2756,7 @@ function Pn({ a: r, b: i, srcA: a, srcB: o, opts: s, width: c, height: l, prox:
|
|
|
2750
2756
|
}),
|
|
2751
2757
|
/* @__PURE__ */ t("feGaussianBlur", {
|
|
2752
2758
|
in: "SourceGraphic",
|
|
2753
|
-
stdDeviation:
|
|
2759
|
+
stdDeviation: oe,
|
|
2754
2760
|
result: "bc"
|
|
2755
2761
|
}),
|
|
2756
2762
|
/* @__PURE__ */ t("feComposite", {
|
|
@@ -2923,7 +2929,7 @@ function Pn({ a: r, b: i, srcA: a, srcB: o, opts: s, width: c, height: l, prox:
|
|
|
2923
2929
|
y: "-40%",
|
|
2924
2930
|
width: "180%",
|
|
2925
2931
|
height: "180%",
|
|
2926
|
-
children: /* @__PURE__ */ t("feGaussianBlur", { stdDeviation:
|
|
2932
|
+
children: /* @__PURE__ */ t("feGaussianBlur", { stdDeviation: se })
|
|
2927
2933
|
}),
|
|
2928
2934
|
/* @__PURE__ */ n("mask", {
|
|
2929
2935
|
id: `${f}-ma`,
|
|
@@ -2935,7 +2941,7 @@ function Pn({ a: r, b: i, srcA: a, srcB: o, opts: s, width: c, height: l, prox:
|
|
|
2935
2941
|
children: [/* @__PURE__ */ t("g", {
|
|
2936
2942
|
filter: `url(#${f}-edge)`,
|
|
2937
2943
|
children: /* @__PURE__ */ t("g", {
|
|
2938
|
-
transform:
|
|
2944
|
+
transform: ce,
|
|
2939
2945
|
children: /* @__PURE__ */ t("rect", {
|
|
2940
2946
|
width: r.w,
|
|
2941
2947
|
height: r.h,
|
|
@@ -2965,7 +2971,7 @@ function Pn({ a: r, b: i, srcA: a, srcB: o, opts: s, width: c, height: l, prox:
|
|
|
2965
2971
|
children: [/* @__PURE__ */ t("g", {
|
|
2966
2972
|
filter: `url(#${f}-edge)`,
|
|
2967
2973
|
children: /* @__PURE__ */ t("g", {
|
|
2968
|
-
transform:
|
|
2974
|
+
transform: le,
|
|
2969
2975
|
children: /* @__PURE__ */ t("rect", {
|
|
2970
2976
|
width: i.w,
|
|
2971
2977
|
height: i.h,
|
|
@@ -2989,7 +2995,7 @@ function Pn({ a: r, b: i, srcA: a, srcB: o, opts: s, width: c, height: l, prox:
|
|
|
2989
2995
|
/* @__PURE__ */ n("g", {
|
|
2990
2996
|
filter: `url(#${f}-goo)`,
|
|
2991
2997
|
children: [/* @__PURE__ */ t("g", {
|
|
2992
|
-
transform:
|
|
2998
|
+
transform: ce,
|
|
2993
2999
|
children: /* @__PURE__ */ t("rect", {
|
|
2994
3000
|
width: r.w,
|
|
2995
3001
|
height: r.h,
|
|
@@ -2997,7 +3003,7 @@ function Pn({ a: r, b: i, srcA: a, srcB: o, opts: s, width: c, height: l, prox:
|
|
|
2997
3003
|
fill: `url(#${f}-pa)`
|
|
2998
3004
|
})
|
|
2999
3005
|
}), /* @__PURE__ */ t("g", {
|
|
3000
|
-
transform:
|
|
3006
|
+
transform: le,
|
|
3001
3007
|
children: /* @__PURE__ */ t("rect", {
|
|
3002
3008
|
width: i.w,
|
|
3003
3009
|
height: i.h,
|
|
@@ -3011,7 +3017,7 @@ function Pn({ a: r, b: i, srcA: a, srcB: o, opts: s, width: c, height: l, prox:
|
|
|
3011
3017
|
children: /* @__PURE__ */ n("g", {
|
|
3012
3018
|
filter: `url(#${f}-marble)`,
|
|
3013
3019
|
children: [/* @__PURE__ */ t("g", {
|
|
3014
|
-
transform:
|
|
3020
|
+
transform: ce,
|
|
3015
3021
|
children: /* @__PURE__ */ t("rect", {
|
|
3016
3022
|
width: r.w,
|
|
3017
3023
|
height: r.h,
|
|
@@ -3019,7 +3025,7 @@ function Pn({ a: r, b: i, srcA: a, srcB: o, opts: s, width: c, height: l, prox:
|
|
|
3019
3025
|
fill: `url(#${f}-pa)`
|
|
3020
3026
|
})
|
|
3021
3027
|
}), /* @__PURE__ */ t("g", {
|
|
3022
|
-
transform:
|
|
3028
|
+
transform: le,
|
|
3023
3029
|
children: /* @__PURE__ */ t("rect", {
|
|
3024
3030
|
width: i.w,
|
|
3025
3031
|
height: i.h,
|
|
@@ -3032,7 +3038,7 @@ function Pn({ a: r, b: i, srcA: a, srcB: o, opts: s, width: c, height: l, prox:
|
|
|
3032
3038
|
/* @__PURE__ */ t("g", {
|
|
3033
3039
|
mask: `url(#${f}-ma)`,
|
|
3034
3040
|
children: /* @__PURE__ */ t("g", {
|
|
3035
|
-
transform:
|
|
3041
|
+
transform: ce,
|
|
3036
3042
|
children: /* @__PURE__ */ t("rect", {
|
|
3037
3043
|
width: r.w,
|
|
3038
3044
|
height: r.h,
|
|
@@ -3044,7 +3050,7 @@ function Pn({ a: r, b: i, srcA: a, srcB: o, opts: s, width: c, height: l, prox:
|
|
|
3044
3050
|
/* @__PURE__ */ t("g", {
|
|
3045
3051
|
mask: `url(#${f}-mb)`,
|
|
3046
3052
|
children: /* @__PURE__ */ t("g", {
|
|
3047
|
-
transform:
|
|
3053
|
+
transform: le,
|
|
3048
3054
|
children: /* @__PURE__ */ t("rect", {
|
|
3049
3055
|
width: i.w,
|
|
3050
3056
|
height: i.h,
|
|
@@ -3056,10 +3062,10 @@ function Pn({ a: r, b: i, srcA: a, srcB: o, opts: s, width: c, height: l, prox:
|
|
|
3056
3062
|
]
|
|
3057
3063
|
});
|
|
3058
3064
|
}
|
|
3059
|
-
function
|
|
3060
|
-
let i = `lgd-${
|
|
3065
|
+
function In({ visuals: r }) {
|
|
3066
|
+
let i = `lgd-${Nn(u())}`;
|
|
3061
3067
|
return /* @__PURE__ */ t(e, { children: r.map((e) => {
|
|
3062
|
-
let r = `${i}-${
|
|
3068
|
+
let r = `${i}-${Nn(e.id)}`, a = `${r}-pattern`, o = `${r}-mask`, s = r + "-neighbor", c = e.image, l = e.elongation > 1.001 ? `translate(${Y(e.cx)} ${Y(e.cy)}) rotate(${Y(e.angle)}) scale(${Y(e.elongation, 3)} 1) rotate(${-Y(e.angle)}) translate(${Y(-e.cx)} ${Y(-e.cy)})` : void 0, u = e.d * e.elongation + e.options.blur * 2.5 + e.options.warp + e.options.gravity * .5 + 8, d = Math.min(.3, Math.max(.01, e.options.warpFreq / (e.options.zone * 1.1))), f = An(e.cx, e.cy, e.gravityX, e.gravityY, e.d, e.options.pull * e.structure, e.options.gravity * e.structure, e.elongation, e.options.taper);
|
|
3063
3069
|
return /* @__PURE__ */ n("g", {
|
|
3064
3070
|
"data-liquid-gooey-dissolve": "",
|
|
3065
3071
|
children: [
|
|
@@ -3191,7 +3197,7 @@ function Fn({ visuals: r }) {
|
|
|
3191
3197
|
/* @__PURE__ */ t("feColorMatrix", {
|
|
3192
3198
|
in: "erosion-noise",
|
|
3193
3199
|
type: "matrix",
|
|
3194
|
-
values:
|
|
3200
|
+
values: Mn(c),
|
|
3195
3201
|
result: "erosion"
|
|
3196
3202
|
}),
|
|
3197
3203
|
/* @__PURE__ */ t("feComposite", {
|
|
@@ -3263,10 +3269,10 @@ function Fn({ visuals: r }) {
|
|
|
3263
3269
|
}, e.id);
|
|
3264
3270
|
}) });
|
|
3265
3271
|
}
|
|
3266
|
-
function
|
|
3267
|
-
let [i, a] = m(
|
|
3272
|
+
function Ln({ registry: e, getGroup: r }) {
|
|
3273
|
+
let [i, a] = m(yn);
|
|
3268
3274
|
return d(() => {
|
|
3269
|
-
let t = new
|
|
3275
|
+
let t = new Pn({
|
|
3270
3276
|
registry: e,
|
|
3271
3277
|
getGroup: r,
|
|
3272
3278
|
onState: a
|
|
@@ -3288,42 +3294,42 @@ function In({ registry: e, getGroup: r }) {
|
|
|
3288
3294
|
overflow: "visible",
|
|
3289
3295
|
pointerEvents: "none"
|
|
3290
3296
|
},
|
|
3291
|
-
children: [i.melt ? /* @__PURE__ */ t(
|
|
3297
|
+
children: [i.melt ? /* @__PURE__ */ t(Fn, {
|
|
3292
3298
|
...i.melt,
|
|
3293
3299
|
width: i.width,
|
|
3294
3300
|
height: i.height
|
|
3295
|
-
}) : null, i.dissolves.length > 0 ? /* @__PURE__ */ t(
|
|
3301
|
+
}) : null, i.dissolves.length > 0 ? /* @__PURE__ */ t(In, { visuals: i.dissolves }) : null]
|
|
3296
3302
|
});
|
|
3297
3303
|
}
|
|
3298
3304
|
//#endregion
|
|
3299
3305
|
//#region src/LiquidGroup.tsx
|
|
3300
|
-
var
|
|
3301
|
-
function
|
|
3302
|
-
let e = c(
|
|
3306
|
+
var Rn = i(null);
|
|
3307
|
+
function zn() {
|
|
3308
|
+
let e = c(Rn);
|
|
3303
3309
|
if (!e) throw Error("<LiquidGroup.Item> must be rendered inside <LiquidGroup>.");
|
|
3304
3310
|
return e;
|
|
3305
3311
|
}
|
|
3306
|
-
function
|
|
3312
|
+
function Bn(e) {
|
|
3307
3313
|
return e.replace(/[^a-zA-Z0-9_-]/g, "");
|
|
3308
3314
|
}
|
|
3309
|
-
function
|
|
3315
|
+
function Vn(e, t) {
|
|
3310
3316
|
return Number.isFinite(e) ? e : t;
|
|
3311
3317
|
}
|
|
3312
|
-
function
|
|
3318
|
+
function Hn(e, t) {
|
|
3313
3319
|
if (!e) return e;
|
|
3314
3320
|
let n = /^var\((--[\w-]+)\)$/.exec(e.trim());
|
|
3315
3321
|
if (!n || !t) return e;
|
|
3316
3322
|
let r = t.ownerDocument.defaultView;
|
|
3317
3323
|
return r && r.getComputedStyle(t).getPropertyValue(n[1] ?? "").trim() || e;
|
|
3318
3324
|
}
|
|
3319
|
-
function
|
|
3320
|
-
let r =
|
|
3325
|
+
function Un(e, t, n) {
|
|
3326
|
+
let r = Hn(e, t), i = Number.parseFloat(r ?? "");
|
|
3321
3327
|
return Number.isFinite(i) ? i : n;
|
|
3322
3328
|
}
|
|
3323
|
-
function
|
|
3329
|
+
function Wn(...e) {
|
|
3324
3330
|
return e.filter(Boolean).join(" ") || void 0;
|
|
3325
3331
|
}
|
|
3326
|
-
function
|
|
3332
|
+
function Gn(e) {
|
|
3327
3333
|
let t = { ...e };
|
|
3328
3334
|
for (let e of [
|
|
3329
3335
|
"children",
|
|
@@ -3342,53 +3348,53 @@ function Wn(e) {
|
|
|
3342
3348
|
]) delete t[e];
|
|
3343
3349
|
return t;
|
|
3344
3350
|
}
|
|
3345
|
-
function
|
|
3351
|
+
function Kn() {
|
|
3346
3352
|
return typeof window > "u" || typeof window.matchMedia != "function" ? null : window.matchMedia("(prefers-reduced-motion: reduce)");
|
|
3347
3353
|
}
|
|
3348
|
-
function
|
|
3349
|
-
let [e, t] = m(() =>
|
|
3354
|
+
function qn() {
|
|
3355
|
+
let [e, t] = m(() => Kn()?.matches ?? !1);
|
|
3350
3356
|
return l(() => {
|
|
3351
|
-
let e =
|
|
3357
|
+
let e = Kn();
|
|
3352
3358
|
if (!e) return;
|
|
3353
3359
|
let n = (e) => t(e.matches);
|
|
3354
3360
|
return t(e.matches), e.addEventListener("change", n), () => e.removeEventListener("change", n);
|
|
3355
3361
|
}, []), e;
|
|
3356
3362
|
}
|
|
3357
|
-
var
|
|
3363
|
+
var Jn = a(function({ blur: e = 6, contrast: r = 18, fill: i = "var(--game-ui-surface, var(--game-ui-panel-strong))", filterPadding: a = 24, shadow: o, stroke: c, waviness: h, wavinessFreq: g, wavinessClamp: _, motion: v = "auto", className: y, style: b, children: x, ...S }, C) {
|
|
3358
3364
|
let w = p(null), [T, E] = m(null), [D, O] = m({
|
|
3359
3365
|
w: 0,
|
|
3360
3366
|
h: 0
|
|
3361
3367
|
}), [ee, k] = m({
|
|
3362
|
-
waviness:
|
|
3363
|
-
wavinessFreq:
|
|
3364
|
-
}), [te, ne] = m(0), A = p(0), j =
|
|
3365
|
-
|
|
3366
|
-
let
|
|
3367
|
-
|
|
3368
|
-
let
|
|
3368
|
+
waviness: Fe.waviness,
|
|
3369
|
+
wavinessFreq: Fe.wavinessFreq
|
|
3370
|
+
}), [te, ne] = m(0), A = p(0), j = qn(), M = v === "reduced" || j, [re, ie] = m(M ? "reduced" : "static"), ae = Math.max(0, Vn(e, 6)), oe = Math.max(1, Vn(r, 18)), se = Math.max(0, Vn(a, 24)), ce = Math.max(0, Vn(h ?? ee.waviness, Fe.waviness)), le = _ !== !1 && Math.max(0, Vn(_ ?? .3, He)), ue = Ue(ce, D.w > 0 && D.h > 0 ? Math.min(D.w, D.h) : 0, le), de = Math.max(0, Vn(g ?? ee.wavinessFreq, Fe.wavinessFreq)), N = Hn(o, w.current), fe = Hn(c, w.current), pe = f(() => Yt(N), [N]), me = f(() => $t(pe), [pe]), he = f(() => Qt(pe), [pe]), ge = f(() => Xt(fe), [fe]), P = Math.ceil(ae * 3 + se + en(me) + (ge ? ge.width : 0) + ue + (ue > 0 ? Math.ceil(Pe * 3) : 0)), _e = p(P);
|
|
3371
|
+
_e.current = P;
|
|
3372
|
+
let F = Math.ceil(P + te), I = p(F);
|
|
3373
|
+
I.current = F;
|
|
3374
|
+
let L = `liquid-gooey-${Bn(u())}`, ve = s((e) => {
|
|
3369
3375
|
w.current = e, typeof C == "function" ? C(e) : C && (C.current = e);
|
|
3370
|
-
}, [C]),
|
|
3376
|
+
}, [C]), z = s((e) => E(e), []);
|
|
3371
3377
|
d(() => {
|
|
3372
3378
|
let e = w.current;
|
|
3373
3379
|
if (!e) return;
|
|
3374
3380
|
let t = {
|
|
3375
|
-
waviness: Math.max(0, h === void 0 ?
|
|
3376
|
-
wavinessFreq: Math.max(0, g === void 0 ?
|
|
3381
|
+
waviness: Math.max(0, h === void 0 ? Un(R.waviness, e, Fe.waviness) : Vn(h, Fe.waviness)),
|
|
3382
|
+
wavinessFreq: Math.max(0, g === void 0 ? Un(R.wavinessFreq, e, Fe.wavinessFreq) : Vn(g, Fe.wavinessFreq))
|
|
3377
3383
|
};
|
|
3378
3384
|
k((e) => e.waviness === t.waviness && e.wavinessFreq === t.wavinessFreq ? e : t);
|
|
3379
3385
|
}, [h, g]);
|
|
3380
|
-
let
|
|
3386
|
+
let B = f(() => new Kt({
|
|
3381
3387
|
getGroup: () => w.current,
|
|
3382
3388
|
getFilterArea: () => {
|
|
3383
3389
|
let e = w.current;
|
|
3384
|
-
return e ? (e.offsetWidth + (
|
|
3390
|
+
return e ? (e.offsetWidth + (_e.current + A.current) * 2) * (e.offsetHeight + (_e.current + A.current) * 2) : 0;
|
|
3385
3391
|
},
|
|
3386
3392
|
onModeChange: ie,
|
|
3387
3393
|
onFeaturePaddingChange: (e) => {
|
|
3388
3394
|
A.current = e, ne((t) => Math.abs(t - e) < .5 ? t : e);
|
|
3389
3395
|
},
|
|
3390
3396
|
follow: v === "follow"
|
|
3391
|
-
}), [v]),
|
|
3397
|
+
}), [v]), ye = f(() => gn(), []);
|
|
3392
3398
|
d(() => {
|
|
3393
3399
|
let e = w.current;
|
|
3394
3400
|
if (!e) return;
|
|
@@ -3397,24 +3403,24 @@ var qn = a(function({ blur: e = 6, contrast: r = 18, fill: i = "var(--game-ui-su
|
|
|
3397
3403
|
w: e.offsetWidth,
|
|
3398
3404
|
h: e.offsetHeight
|
|
3399
3405
|
};
|
|
3400
|
-
O((e) => e.w === t.w && e.h === t.h ? e : t),
|
|
3406
|
+
O((e) => e.w === t.w && e.h === t.h ? e : t), B.setFilterArea((t.w + I.current * 2) * (t.h + I.current * 2));
|
|
3401
3407
|
};
|
|
3402
3408
|
if (t(), typeof ResizeObserver > "u") return;
|
|
3403
3409
|
let n = new ResizeObserver(t);
|
|
3404
3410
|
return n.observe(e), () => n.disconnect();
|
|
3405
|
-
}, [
|
|
3406
|
-
|
|
3407
|
-
}, [
|
|
3408
|
-
let
|
|
3411
|
+
}, [B, F]), l(() => {
|
|
3412
|
+
B.setReducedMotion(M);
|
|
3413
|
+
}, [B, M]), l(() => () => B.dispose(), [B]);
|
|
3414
|
+
let V = Math.max(1, D.w), H = Math.max(1, D.h), U = Wn("game-ui-liquid-group", y);
|
|
3409
3415
|
return /* @__PURE__ */ n("div", {
|
|
3410
3416
|
...S,
|
|
3411
|
-
ref:
|
|
3412
|
-
className:
|
|
3413
|
-
"data-liquid-filter-area": Math.round((D.w +
|
|
3414
|
-
"data-liquid-filter-budget":
|
|
3417
|
+
ref: ve,
|
|
3418
|
+
className: U,
|
|
3419
|
+
"data-liquid-filter-area": Math.round((D.w + F * 2) * (D.h + F * 2)),
|
|
3420
|
+
"data-liquid-filter-budget": Te,
|
|
3415
3421
|
"data-liquid-feature-padding": Math.round(te * 10) / 10,
|
|
3416
3422
|
"data-liquid-motion": re,
|
|
3417
|
-
"data-liquid-waviness": Math.round(
|
|
3423
|
+
"data-liquid-waviness": Math.round(ue * 100) / 100,
|
|
3418
3424
|
style: b,
|
|
3419
3425
|
children: [
|
|
3420
3426
|
/* @__PURE__ */ n("svg", {
|
|
@@ -3422,40 +3428,40 @@ var qn = a(function({ blur: e = 6, contrast: r = 18, fill: i = "var(--game-ui-su
|
|
|
3422
3428
|
className: "game-ui-liquid-silhouette",
|
|
3423
3429
|
"data-liquid-gooey-silhouette": "",
|
|
3424
3430
|
focusable: "false",
|
|
3425
|
-
style:
|
|
3426
|
-
viewBox: `0 0 ${
|
|
3431
|
+
style: he ? { filter: he } : void 0,
|
|
3432
|
+
viewBox: `0 0 ${V} ${H}`,
|
|
3427
3433
|
children: [/* @__PURE__ */ t("defs", { children: /* @__PURE__ */ t("filter", {
|
|
3428
3434
|
colorInterpolationFilters: "sRGB",
|
|
3429
3435
|
filterUnits: "userSpaceOnUse",
|
|
3430
|
-
height:
|
|
3431
|
-
id:
|
|
3432
|
-
width:
|
|
3433
|
-
x: -
|
|
3434
|
-
y: -
|
|
3435
|
-
children: /* @__PURE__ */ t(
|
|
3436
|
+
height: H + F * 2,
|
|
3437
|
+
id: L,
|
|
3438
|
+
width: V + F * 2,
|
|
3439
|
+
x: -F,
|
|
3440
|
+
y: -F,
|
|
3441
|
+
children: /* @__PURE__ */ t(Ve, {
|
|
3436
3442
|
blur: ae,
|
|
3437
|
-
contrast:
|
|
3438
|
-
shadows:
|
|
3439
|
-
stroke:
|
|
3440
|
-
waviness:
|
|
3441
|
-
wavinessFreq:
|
|
3443
|
+
contrast: oe,
|
|
3444
|
+
shadows: me,
|
|
3445
|
+
stroke: ge,
|
|
3446
|
+
waviness: ue,
|
|
3447
|
+
wavinessFreq: de
|
|
3442
3448
|
})
|
|
3443
3449
|
}) }), /* @__PURE__ */ t("g", {
|
|
3444
|
-
ref:
|
|
3450
|
+
ref: z,
|
|
3445
3451
|
fill: i,
|
|
3446
|
-
filter: `url(#${
|
|
3452
|
+
filter: `url(#${L})`
|
|
3447
3453
|
})]
|
|
3448
3454
|
}),
|
|
3449
|
-
/* @__PURE__ */ t(
|
|
3450
|
-
registry:
|
|
3455
|
+
/* @__PURE__ */ t(Ln, {
|
|
3456
|
+
registry: ye,
|
|
3451
3457
|
getGroup: () => w.current
|
|
3452
3458
|
}),
|
|
3453
|
-
/* @__PURE__ */ t(
|
|
3459
|
+
/* @__PURE__ */ t(Rn.Provider, {
|
|
3454
3460
|
value: {
|
|
3455
3461
|
portal: T,
|
|
3456
|
-
engine:
|
|
3462
|
+
engine: B,
|
|
3457
3463
|
follow: v === "follow",
|
|
3458
|
-
imageMelt:
|
|
3464
|
+
imageMelt: ye
|
|
3459
3465
|
},
|
|
3460
3466
|
children: /* @__PURE__ */ t("div", {
|
|
3461
3467
|
className: "game-ui-liquid-content",
|
|
@@ -3464,16 +3470,16 @@ var qn = a(function({ blur: e = 6, contrast: r = 18, fill: i = "var(--game-ui-su
|
|
|
3464
3470
|
})
|
|
3465
3471
|
]
|
|
3466
3472
|
});
|
|
3467
|
-
}),
|
|
3468
|
-
let { portal: D, engine: O, follow: ee, imageMelt: k } =
|
|
3473
|
+
}), Yn = a(function({ effect: r, melt: i, dissolve: a, x: o = 0, y: c = 0, scale: m = 1, transition: g, delay: _, radius: v, morph: y, bend: b, observe: x, className: S, style: C, children: w, ...T }, E) {
|
|
3474
|
+
let { portal: D, engine: O, follow: ee, imageMelt: k } = zn(), te = `liquid-item-${Bn(u())}`, ne = p(null), A = p(null), j = p(null), M = p(null), re = JSON.stringify(a ?? null), ie = a !== void 0 && a !== !1, ae = f(() => {
|
|
3469
3475
|
let e = r === "morph" || r === "bend" ? r : void 0, t = e === "bend", n = r === "bend" || ee && y === void 0 && r !== "morph" || ie && y === void 0 && r !== "morph" ? void 0 : y ?? {}, i = {
|
|
3470
3476
|
...e === void 0 ? {} : { effect: e },
|
|
3471
3477
|
...n === void 0 ? {} : { morph: n },
|
|
3472
3478
|
...b === void 0 ? {} : { bend: b },
|
|
3473
3479
|
...x === void 0 && !t ? {} : { observe: t || x },
|
|
3474
|
-
x:
|
|
3475
|
-
y:
|
|
3476
|
-
scale:
|
|
3480
|
+
x: Vn(o, 0),
|
|
3481
|
+
y: Vn(c, 0),
|
|
3482
|
+
scale: Vn(m, 1)
|
|
3477
3483
|
};
|
|
3478
3484
|
return g !== void 0 && (i.transition = g), _ !== void 0 && (i.delay = _), v !== void 0 && (i.radius = v), i;
|
|
3479
3485
|
}, [
|
|
@@ -3491,7 +3497,7 @@ var qn = a(function({ blur: e = 6, contrast: r = 18, fill: i = "var(--game-ui-su
|
|
|
3491
3497
|
c
|
|
3492
3498
|
]);
|
|
3493
3499
|
j.current === null && (j.current = ae);
|
|
3494
|
-
let
|
|
3500
|
+
let oe = s((e) => {
|
|
3495
3501
|
ne.current = e, typeof E == "function" ? E(e) : E && (E.current = e);
|
|
3496
3502
|
}, [E]);
|
|
3497
3503
|
return d(() => {
|
|
@@ -3525,7 +3531,7 @@ var qn = a(function({ blur: e = 6, contrast: r = 18, fill: i = "var(--game-ui-su
|
|
|
3525
3531
|
M.current.update(a);
|
|
3526
3532
|
return;
|
|
3527
3533
|
}
|
|
3528
|
-
M.current =
|
|
3534
|
+
M.current = _n(k, e, a);
|
|
3529
3535
|
}
|
|
3530
3536
|
}, [
|
|
3531
3537
|
re,
|
|
@@ -3543,8 +3549,8 @@ var qn = a(function({ blur: e = 6, contrast: r = 18, fill: i = "var(--game-ui-su
|
|
|
3543
3549
|
(r || i || a) && console.warn("LiquidGroup.Item children should not have their own border, outline, or box-shadow. They exist on the content layer and will not merge with the liquid silhouette. Use the `stroke` and `shadow` props on <LiquidGroup> instead.");
|
|
3544
3550
|
}, []), /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("div", {
|
|
3545
3551
|
...T,
|
|
3546
|
-
ref:
|
|
3547
|
-
className:
|
|
3552
|
+
ref: oe,
|
|
3553
|
+
className: Wn("game-ui-liquid-item", S),
|
|
3548
3554
|
style: C,
|
|
3549
3555
|
children: w
|
|
3550
3556
|
}), D ? h(/* @__PURE__ */ t("path", {
|
|
@@ -3552,14 +3558,14 @@ var qn = a(function({ blur: e = 6, contrast: r = 18, fill: i = "var(--game-ui-su
|
|
|
3552
3558
|
d: "",
|
|
3553
3559
|
"data-liquid-gooey-blob": ""
|
|
3554
3560
|
}), D) : null] });
|
|
3555
|
-
}),
|
|
3556
|
-
let { imageMelt: r } =
|
|
3557
|
-
if (e.effect !== "melt") return /* @__PURE__ */ t(
|
|
3561
|
+
}), Xn = a(function(e, n) {
|
|
3562
|
+
let { imageMelt: r } = zn();
|
|
3563
|
+
if (e.effect !== "melt") return /* @__PURE__ */ t(Yn, {
|
|
3558
3564
|
...e,
|
|
3559
3565
|
ref: n
|
|
3560
3566
|
});
|
|
3561
|
-
let i =
|
|
3562
|
-
return delete o.src, /* @__PURE__ */ t(
|
|
3567
|
+
let i = Gn(e), a = e.children, o = { ...e.melt ?? {} }, s = o.src;
|
|
3568
|
+
return delete o.src, /* @__PURE__ */ t(vn, {
|
|
3563
3569
|
...i,
|
|
3564
3570
|
registry: r,
|
|
3565
3571
|
children: a,
|
|
@@ -3567,10 +3573,10 @@ var qn = a(function({ blur: e = 6, contrast: r = 18, fill: i = "var(--game-ui-su
|
|
|
3567
3573
|
...s === void 0 ? {} : { src: s },
|
|
3568
3574
|
...n === void 0 ? {} : { forwardedRef: n }
|
|
3569
3575
|
});
|
|
3570
|
-
}),
|
|
3576
|
+
}), Zn = Object.assign(Jn, { Item: Xn });
|
|
3571
3577
|
//#endregion
|
|
3572
3578
|
//#region src/GameCallout.tsx
|
|
3573
|
-
function
|
|
3579
|
+
function Qn({ heading: e, children: r, tone: i = "info", className: a, ...o }) {
|
|
3574
3580
|
return /* @__PURE__ */ n("div", {
|
|
3575
3581
|
className: [
|
|
3576
3582
|
"game-ui-callout",
|
|
@@ -3591,7 +3597,7 @@ function Zn({ heading: e, children: r, tone: i = "info", className: a, ...o }) {
|
|
|
3591
3597
|
}
|
|
3592
3598
|
//#endregion
|
|
3593
3599
|
//#region src/GameDialog.tsx
|
|
3594
|
-
function
|
|
3600
|
+
function $n({ children: e, className: r, title: i }) {
|
|
3595
3601
|
let a = u();
|
|
3596
3602
|
return /* @__PURE__ */ n("section", {
|
|
3597
3603
|
"aria-labelledby": a,
|
|
@@ -3609,7 +3615,7 @@ function Qn({ children: e, className: r, title: i }) {
|
|
|
3609
3615
|
}
|
|
3610
3616
|
//#endregion
|
|
3611
3617
|
//#region src/GameHistoryPanel.tsx
|
|
3612
|
-
function
|
|
3618
|
+
function er({ entries: e, label: r }) {
|
|
3613
3619
|
return /* @__PURE__ */ t("section", {
|
|
3614
3620
|
"aria-label": r,
|
|
3615
3621
|
className: "game-ui-history",
|
|
@@ -3625,7 +3631,7 @@ function $n({ entries: e, label: r }) {
|
|
|
3625
3631
|
}
|
|
3626
3632
|
//#endregion
|
|
3627
3633
|
//#region src/GameHudActions.tsx
|
|
3628
|
-
function
|
|
3634
|
+
function tr({ children: e, className: n, label: r, ...i }) {
|
|
3629
3635
|
return /* @__PURE__ */ t("nav", {
|
|
3630
3636
|
"aria-label": r,
|
|
3631
3637
|
className: ["game-ui-hud-actions", n].filter(Boolean).join(" "),
|
|
@@ -3645,7 +3651,7 @@ function X({ children: e, className: r, title: i, tone: a = "default", ...o }) {
|
|
|
3645
3651
|
children: [i ? /* @__PURE__ */ t("h3", { children: i }) : null, e]
|
|
3646
3652
|
});
|
|
3647
3653
|
}
|
|
3648
|
-
function
|
|
3654
|
+
function nr({ children: e, className: n, label: r, type: i = "button", ...a }) {
|
|
3649
3655
|
return /* @__PURE__ */ t("button", {
|
|
3650
3656
|
"aria-label": r,
|
|
3651
3657
|
className: ["game-ui-icon-button", n].filter(Boolean).join(" "),
|
|
@@ -3654,7 +3660,7 @@ function tr({ children: e, className: n, label: r, type: i = "button", ...a }) {
|
|
|
3654
3660
|
children: e
|
|
3655
3661
|
});
|
|
3656
3662
|
}
|
|
3657
|
-
function
|
|
3663
|
+
function rr({ children: e, label: i }) {
|
|
3658
3664
|
let a = u();
|
|
3659
3665
|
return /* @__PURE__ */ n("span", {
|
|
3660
3666
|
className: "game-ui-tooltip",
|
|
@@ -3665,7 +3671,7 @@ function nr({ children: e, label: i }) {
|
|
|
3665
3671
|
})]
|
|
3666
3672
|
});
|
|
3667
3673
|
}
|
|
3668
|
-
function
|
|
3674
|
+
function ir({ activeId: e, id: n, onSelect: r, tabs: i }) {
|
|
3669
3675
|
let a = u(), o = n ?? a;
|
|
3670
3676
|
return /* @__PURE__ */ t("div", {
|
|
3671
3677
|
className: "game-ui-tabs",
|
|
@@ -3705,10 +3711,10 @@ function rr({ activeId: e, id: n, onSelect: r, tabs: i }) {
|
|
|
3705
3711
|
}, n.id))
|
|
3706
3712
|
});
|
|
3707
3713
|
}
|
|
3708
|
-
function
|
|
3714
|
+
function ar(e, t) {
|
|
3709
3715
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
3710
3716
|
}
|
|
3711
|
-
function
|
|
3717
|
+
function or({ activeId: e, label: r, onSelect: i, options: a }) {
|
|
3712
3718
|
let o = p(null), s = p([]), [c, l] = m({
|
|
3713
3719
|
x: 0,
|
|
3714
3720
|
y: 0,
|
|
@@ -3725,7 +3731,7 @@ function ar({ activeId: e, label: r, onSelect: i, options: a }) {
|
|
|
3725
3731
|
width: r.width,
|
|
3726
3732
|
height: r.height
|
|
3727
3733
|
};
|
|
3728
|
-
l((e) =>
|
|
3734
|
+
l((e) => ar(e, i) ? e : i);
|
|
3729
3735
|
};
|
|
3730
3736
|
if (n(), typeof ResizeObserver > "u") return;
|
|
3731
3737
|
let r = new ResizeObserver(n);
|
|
@@ -3740,7 +3746,7 @@ function ar({ activeId: e, label: r, onSelect: i, options: a }) {
|
|
|
3740
3746
|
className: "game-ui-segmented",
|
|
3741
3747
|
role: "group",
|
|
3742
3748
|
children: [
|
|
3743
|
-
/* @__PURE__ */ t(
|
|
3749
|
+
/* @__PURE__ */ t(Zn, {
|
|
3744
3750
|
"aria-hidden": "true",
|
|
3745
3751
|
className: "game-ui-segmented-surface",
|
|
3746
3752
|
fill: "var(--game-ui-surface-raised)",
|
|
@@ -3751,7 +3757,7 @@ function ar({ activeId: e, label: r, onSelect: i, options: a }) {
|
|
|
3751
3757
|
pointerEvents: "none",
|
|
3752
3758
|
position: "absolute"
|
|
3753
3759
|
},
|
|
3754
|
-
children: /* @__PURE__ */ t(
|
|
3760
|
+
children: /* @__PURE__ */ t(Zn.Item, {
|
|
3755
3761
|
style: {
|
|
3756
3762
|
borderRadius: "var(--game-ui-radius-control)",
|
|
3757
3763
|
inset: 0,
|
|
@@ -3760,7 +3766,7 @@ function ar({ activeId: e, label: r, onSelect: i, options: a }) {
|
|
|
3760
3766
|
children: null
|
|
3761
3767
|
})
|
|
3762
3768
|
}),
|
|
3763
|
-
c.width > 0 && c.height > 0 ? /* @__PURE__ */ t(
|
|
3769
|
+
c.width > 0 && c.height > 0 ? /* @__PURE__ */ t(Zn, {
|
|
3764
3770
|
"aria-hidden": "true",
|
|
3765
3771
|
className: "game-ui-segmented-follow",
|
|
3766
3772
|
fill: "var(--game-ui-secondary)",
|
|
@@ -3771,7 +3777,7 @@ function ar({ activeId: e, label: r, onSelect: i, options: a }) {
|
|
|
3771
3777
|
pointerEvents: "none",
|
|
3772
3778
|
position: "absolute"
|
|
3773
3779
|
},
|
|
3774
|
-
children: /* @__PURE__ */ t(
|
|
3780
|
+
children: /* @__PURE__ */ t(Zn.Item, {
|
|
3775
3781
|
"aria-hidden": "true",
|
|
3776
3782
|
style: {
|
|
3777
3783
|
borderRadius: "var(--game-ui-radius-control)",
|
|
@@ -3800,7 +3806,7 @@ function ar({ activeId: e, label: r, onSelect: i, options: a }) {
|
|
|
3800
3806
|
]
|
|
3801
3807
|
});
|
|
3802
3808
|
}
|
|
3803
|
-
function
|
|
3809
|
+
function sr({ label: e, max: r, min: i, onChange: a, value: o }) {
|
|
3804
3810
|
return /* @__PURE__ */ n("label", {
|
|
3805
3811
|
className: "game-ui-slider",
|
|
3806
3812
|
children: [/* @__PURE__ */ t("span", { children: e }), /* @__PURE__ */ t("input", {
|
|
@@ -3814,7 +3820,7 @@ function or({ label: e, max: r, min: i, onChange: a, value: o }) {
|
|
|
3814
3820
|
})]
|
|
3815
3821
|
});
|
|
3816
3822
|
}
|
|
3817
|
-
function
|
|
3823
|
+
function cr({ checked: e, disabled: r, label: i, onClick: a }) {
|
|
3818
3824
|
return /* @__PURE__ */ n("button", {
|
|
3819
3825
|
"aria-checked": e,
|
|
3820
3826
|
className: "game-ui-toggle",
|
|
@@ -3828,7 +3834,7 @@ function sr({ checked: e, disabled: r, label: i, onClick: a }) {
|
|
|
3828
3834
|
})]
|
|
3829
3835
|
});
|
|
3830
3836
|
}
|
|
3831
|
-
function
|
|
3837
|
+
function lr({ items: e, label: n, onSelect: r }) {
|
|
3832
3838
|
return /* @__PURE__ */ t("div", {
|
|
3833
3839
|
"aria-label": n,
|
|
3834
3840
|
className: "game-ui-radial-menu",
|
|
@@ -3843,7 +3849,7 @@ function cr({ items: e, label: n, onSelect: r }) {
|
|
|
3843
3849
|
}, e.id))
|
|
3844
3850
|
});
|
|
3845
3851
|
}
|
|
3846
|
-
function
|
|
3852
|
+
function ur({ children: e, tone: n = "info" }) {
|
|
3847
3853
|
return /* @__PURE__ */ t("div", {
|
|
3848
3854
|
className: "game-ui-toast",
|
|
3849
3855
|
"data-toast-tone": n,
|
|
@@ -3851,7 +3857,7 @@ function lr({ children: e, tone: n = "info" }) {
|
|
|
3851
3857
|
children: e
|
|
3852
3858
|
});
|
|
3853
3859
|
}
|
|
3854
|
-
function
|
|
3860
|
+
function dr({ actionLabel: e, children: r, title: i }) {
|
|
3855
3861
|
return /* @__PURE__ */ n("section", {
|
|
3856
3862
|
"aria-label": i,
|
|
3857
3863
|
className: "game-ui-prompt",
|
|
@@ -3863,7 +3869,7 @@ function ur({ actionLabel: e, children: r, title: i }) {
|
|
|
3863
3869
|
}
|
|
3864
3870
|
//#endregion
|
|
3865
3871
|
//#region src/clay/assets.ts
|
|
3866
|
-
var
|
|
3872
|
+
var fr = "/assets/game/ui/clay/phase03-clay-kit", Z = (e) => `${fr}/${e}`, pr = {
|
|
3867
3873
|
ai: { line: Z("icons/function/brain-v1.png") },
|
|
3868
3874
|
alert: {
|
|
3869
3875
|
game: Z("components/common/alert-v1.png"),
|
|
@@ -3953,20 +3959,20 @@ var dr = "/assets/game/ui/clay/phase03-clay-kit", Z = (e) => `${dr}/${e}`, fr =
|
|
|
3953
3959
|
game: Z("icons/common/target-v1.png"),
|
|
3954
3960
|
line: Z("icons/function/target-v1.png")
|
|
3955
3961
|
}
|
|
3956
|
-
},
|
|
3957
|
-
function
|
|
3958
|
-
let t =
|
|
3962
|
+
}, mr = Object.keys(pr), hr = fr;
|
|
3963
|
+
function gr(e) {
|
|
3964
|
+
let t = hr;
|
|
3959
3965
|
return !e || t === "/assets/game/ui/clay/phase03-clay-kit" ? e : e.startsWith("/assets/game/ui/clay/phase03-clay-kit") ? `${t}${e.slice(37)}` : e;
|
|
3960
3966
|
}
|
|
3961
|
-
function
|
|
3962
|
-
let n =
|
|
3963
|
-
return
|
|
3967
|
+
function _r(e, t) {
|
|
3968
|
+
let n = pr[e];
|
|
3969
|
+
return gr(t === "line" ? n.line ?? n.game ?? "" : n.game ?? n.line ?? "");
|
|
3964
3970
|
}
|
|
3965
|
-
function
|
|
3966
|
-
let t =
|
|
3971
|
+
function vr(e) {
|
|
3972
|
+
let t = pr[e], n = [];
|
|
3967
3973
|
return t.game && n.push("game"), t.line && n.push("line"), n;
|
|
3968
3974
|
}
|
|
3969
|
-
var
|
|
3975
|
+
var yr = {
|
|
3970
3976
|
anvil: Z("icons/common/anvil-v1.png"),
|
|
3971
3977
|
arrow: Z("icons/common/arrow-v1.png"),
|
|
3972
3978
|
bomb: Z("icons/common/bomb-v1.png"),
|
|
@@ -3993,7 +3999,7 @@ var vr = {
|
|
|
3993
3999
|
swordB: Z("icons/common/sword-b-v1.png"),
|
|
3994
4000
|
talaria: Z("icons/common/talaria-v1.png"),
|
|
3995
4001
|
treasure: Z("icons/common/treasure-v1.png")
|
|
3996
|
-
},
|
|
4002
|
+
}, br = Object.keys(yr), xr = {
|
|
3997
4003
|
buttons: {
|
|
3998
4004
|
primary: Z("buttons/button-brown-large-v2.png"),
|
|
3999
4005
|
blue: Z("buttons/button-blue-large-v2.png"),
|
|
@@ -4014,7 +4020,7 @@ var vr = {
|
|
|
4014
4020
|
tabSelected: Z("components/common/tab-s-v1.png"),
|
|
4015
4021
|
tabNormal: Z("components/common/tab-n-v1.png")
|
|
4016
4022
|
},
|
|
4017
|
-
icons: Object.fromEntries(
|
|
4023
|
+
icons: Object.fromEntries(mr.map((e) => [e, _r(e)])),
|
|
4018
4024
|
catalog: {
|
|
4019
4025
|
manifest: "/assets/game/ui/clay/asset-manifest.json",
|
|
4020
4026
|
sourceCatalog: Z("catalog/phase03-clay-ui-catalog.json"),
|
|
@@ -4022,7 +4028,7 @@ var vr = {
|
|
|
4022
4028
|
contactSheetComponents: Z("catalog/component-candidates-contact-sheet-v1.png"),
|
|
4023
4029
|
contactSheetFunction: Z("catalog/function-icons-contact-sheet-v1.png")
|
|
4024
4030
|
}
|
|
4025
|
-
},
|
|
4031
|
+
}, Sr = {
|
|
4026
4032
|
ai: "AI",
|
|
4027
4033
|
alert: "!",
|
|
4028
4034
|
card: "▣",
|
|
@@ -4058,72 +4064,72 @@ var vr = {
|
|
|
4058
4064
|
timer: "◷",
|
|
4059
4065
|
trophy: "★",
|
|
4060
4066
|
vote: "⌾"
|
|
4061
|
-
},
|
|
4062
|
-
ai:
|
|
4063
|
-
alert:
|
|
4064
|
-
card:
|
|
4065
|
-
chat:
|
|
4066
|
-
check:
|
|
4067
|
-
close:
|
|
4068
|
-
coin:
|
|
4069
|
-
compass:
|
|
4070
|
-
copy:
|
|
4071
|
-
crown:
|
|
4072
|
-
energy:
|
|
4073
|
-
gem:
|
|
4074
|
-
gift:
|
|
4075
|
-
globe:
|
|
4076
|
-
history:
|
|
4077
|
-
redo:
|
|
4078
|
-
undo:
|
|
4079
|
-
home:
|
|
4080
|
-
hourglass:
|
|
4081
|
-
laurel:
|
|
4082
|
-
lock:
|
|
4083
|
-
lucky:
|
|
4084
|
-
mail:
|
|
4085
|
-
medal:
|
|
4086
|
-
mission:
|
|
4087
|
-
mobile:
|
|
4088
|
-
portal:
|
|
4089
|
-
scroll:
|
|
4090
|
-
settings:
|
|
4091
|
-
shirt:
|
|
4092
|
-
shop:
|
|
4093
|
-
smile:
|
|
4094
|
-
timer:
|
|
4095
|
-
trophy:
|
|
4096
|
-
vote:
|
|
4067
|
+
}, Cr = {
|
|
4068
|
+
ai: I.berry,
|
|
4069
|
+
alert: I.red,
|
|
4070
|
+
card: I.honey,
|
|
4071
|
+
chat: I.sky,
|
|
4072
|
+
check: I.green,
|
|
4073
|
+
close: I.red,
|
|
4074
|
+
coin: I.honey,
|
|
4075
|
+
compass: I.teal,
|
|
4076
|
+
copy: I.wood,
|
|
4077
|
+
crown: I.honey,
|
|
4078
|
+
energy: I.orange,
|
|
4079
|
+
gem: I.sky,
|
|
4080
|
+
gift: I.red,
|
|
4081
|
+
globe: I.teal,
|
|
4082
|
+
history: I.inkMuted,
|
|
4083
|
+
redo: I.wood,
|
|
4084
|
+
undo: I.wood,
|
|
4085
|
+
home: I.wood,
|
|
4086
|
+
hourglass: I.orange,
|
|
4087
|
+
laurel: I.green,
|
|
4088
|
+
lock: I.ink,
|
|
4089
|
+
lucky: I.green,
|
|
4090
|
+
mail: I.sky,
|
|
4091
|
+
medal: I.honey,
|
|
4092
|
+
mission: I.berry,
|
|
4093
|
+
mobile: I.sky,
|
|
4094
|
+
portal: I.teal,
|
|
4095
|
+
scroll: I.berry,
|
|
4096
|
+
settings: I.inkMuted,
|
|
4097
|
+
shirt: I.sky,
|
|
4098
|
+
shop: I.inkMuted,
|
|
4099
|
+
smile: I.honey,
|
|
4100
|
+
timer: I.orange,
|
|
4101
|
+
trophy: I.honey,
|
|
4102
|
+
vote: I.red
|
|
4097
4103
|
};
|
|
4098
|
-
function
|
|
4099
|
-
let t =
|
|
4104
|
+
function wr(e) {
|
|
4105
|
+
let t = Sr[e], n = Cr[e], r = I.parchment, i = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96"><defs><filter id="s" x="-20%" y="-20%" width="140%" height="140%"><feDropShadow dx="0" dy="5" stdDeviation="4" flood-color="#4c341c" flood-opacity=".22"/></filter></defs><rect x="10" y="8" width="76" height="76" rx="25" fill="${r}" filter="url(#s)"/><circle cx="48" cy="46" r="28" fill="${n}" opacity=".88"/><path d="M23 28c10-12 36-16 52 0" stroke="#fff" stroke-width="6" stroke-linecap="round" opacity=".38"/><text x="48" y="58" text-anchor="middle" font-family="system-ui,sans-serif" font-size="28" font-weight="900" fill="${r}">${t}</text></svg>`;
|
|
4100
4106
|
return `data:image/svg+xml,${encodeURIComponent(i)}`;
|
|
4101
4107
|
}
|
|
4102
|
-
var
|
|
4103
|
-
function
|
|
4104
|
-
|
|
4105
|
-
}
|
|
4106
|
-
function Er() {
|
|
4107
|
-
return wr;
|
|
4108
|
+
var Tr = "inline";
|
|
4109
|
+
function Er(e) {
|
|
4110
|
+
Tr = e;
|
|
4108
4111
|
}
|
|
4109
|
-
function Dr(
|
|
4110
|
-
|
|
4112
|
+
function Dr() {
|
|
4113
|
+
return Tr;
|
|
4111
4114
|
}
|
|
4112
|
-
function Or() {
|
|
4113
|
-
|
|
4115
|
+
function Or(e) {
|
|
4116
|
+
hr = e.replace(/\/+$/, "");
|
|
4114
4117
|
}
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
kr || (kr = !0, !(typeof console > "u") && console.warn("[SwimmerUIKit] Clay icons are rendering placeholders, not the icon set. The sculpted PNGs ship inside this package but must be served by your app:\n npx swimmer-ui-assets public\n setClayAssetMode('source') // once, at your entry\nCall setClayAssetMode('inline') explicitly to keep placeholders and silence this."));
|
|
4118
|
+
function kr() {
|
|
4119
|
+
return hr;
|
|
4118
4120
|
}
|
|
4121
|
+
var Ar = !1;
|
|
4119
4122
|
function jr() {
|
|
4120
|
-
|
|
4123
|
+
Ar || (Ar = !0, !(typeof console > "u") && console.warn("[SwimmerUIKit] Clay icons are rendering placeholders, not the icon set. The sculpted PNGs ship inside this package but must be served by your app:\n npx swimmer-ui-assets public\n setClayAssetMode('source') // once, at your entry\nCall setClayAssetMode('inline') explicitly to keep placeholders and silence this."));
|
|
4124
|
+
}
|
|
4125
|
+
function Mr() {
|
|
4126
|
+
Ar = !0;
|
|
4121
4127
|
}
|
|
4122
|
-
function
|
|
4123
|
-
return t.inline ??
|
|
4128
|
+
function Nr(e, t = {}) {
|
|
4129
|
+
return t.inline ?? Tr === "inline" ? (jr(), wr(e)) : _r(e, t.style);
|
|
4124
4130
|
}
|
|
4125
|
-
function
|
|
4126
|
-
return
|
|
4131
|
+
function Pr(e, t) {
|
|
4132
|
+
return _r(e, t);
|
|
4127
4133
|
}
|
|
4128
4134
|
//#endregion
|
|
4129
4135
|
//#region src/ClayComponents.tsx
|
|
@@ -4135,7 +4141,7 @@ function Q({ children: e, className: n, tone: r = "neutral" }) {
|
|
|
4135
4141
|
});
|
|
4136
4142
|
}
|
|
4137
4143
|
function $({ className: e, icon: n, label: r, size: i = "md", style: a, useSourceAsset: o = !1 }) {
|
|
4138
|
-
let s = ["game-ui-asset-icon", e].filter(Boolean).join(" "), c = r ? { "aria-label": r } : { "aria-hidden": !0 }, l =
|
|
4144
|
+
let s = ["game-ui-asset-icon", e].filter(Boolean).join(" "), c = r ? { "aria-label": r } : { "aria-hidden": !0 }, l = Nr(n, {
|
|
4139
4145
|
...a ? { style: a } : {},
|
|
4140
4146
|
...o ? { inline: !1 } : {}
|
|
4141
4147
|
});
|
|
@@ -4150,7 +4156,7 @@ function $({ className: e, icon: n, label: r, size: i = "md", style: a, useSourc
|
|
|
4150
4156
|
})
|
|
4151
4157
|
});
|
|
4152
4158
|
}
|
|
4153
|
-
function
|
|
4159
|
+
function Fr({ actions: e, className: r, items: i, label: a }) {
|
|
4154
4160
|
return /* @__PURE__ */ n("section", {
|
|
4155
4161
|
"aria-label": a,
|
|
4156
4162
|
className: ["game-ui-hud", r].filter(Boolean).join(" "),
|
|
@@ -4173,7 +4179,7 @@ function Pr({ actions: e, className: r, items: i, label: a }) {
|
|
|
4173
4179
|
}) : null]
|
|
4174
4180
|
});
|
|
4175
4181
|
}
|
|
4176
|
-
function
|
|
4182
|
+
function Ir({ cards: e, className: r, label: i }) {
|
|
4177
4183
|
let a = ["game-ui-card-fan", r].filter(Boolean).join(" "), o = (e.length - 1) / 2;
|
|
4178
4184
|
return /* @__PURE__ */ t("div", {
|
|
4179
4185
|
"aria-label": i,
|
|
@@ -4196,7 +4202,7 @@ function Fr({ cards: e, className: r, label: i }) {
|
|
|
4196
4202
|
}, e.id))
|
|
4197
4203
|
});
|
|
4198
4204
|
}
|
|
4199
|
-
function
|
|
4205
|
+
function Lr({ badge: e, className: r, icon: i, kicker: a, selected: o = !1, summary: s, title: c, tone: l = "daily", type: u = "button", ...d }) {
|
|
4200
4206
|
return /* @__PURE__ */ n("button", {
|
|
4201
4207
|
"aria-pressed": o,
|
|
4202
4208
|
className: ["game-ui-stage-tile", r].filter(Boolean).join(" "),
|
|
@@ -4223,15 +4229,15 @@ function Ir({ badge: e, className: r, icon: i, kicker: a, selected: o = !1, summ
|
|
|
4223
4229
|
]
|
|
4224
4230
|
});
|
|
4225
4231
|
}
|
|
4226
|
-
function
|
|
4232
|
+
function Rr() {
|
|
4227
4233
|
return typeof window > "u" ? !1 : (window.matchMedia?.("(pointer: coarse), (max-width: 899px)").matches ?? window.innerWidth < 900) && window.innerHeight > window.innerWidth;
|
|
4228
4234
|
}
|
|
4229
|
-
function
|
|
4230
|
-
let [c, u] = m(o ||
|
|
4235
|
+
function zr({ body: e, cta: r, badgeLabel: i = "Landscape only", manualHint: a = "Rotate manually if this browser blocks automatic landscape lock.", preview: o = !1, title: s }) {
|
|
4236
|
+
let [c, u] = m(o || Rr), [d, f] = m("");
|
|
4231
4237
|
if (l(() => {
|
|
4232
4238
|
if (o) return;
|
|
4233
4239
|
let e = () => {
|
|
4234
|
-
let e =
|
|
4240
|
+
let e = Rr();
|
|
4235
4241
|
u(e), e || f("");
|
|
4236
4242
|
};
|
|
4237
4243
|
return e(), window.addEventListener("resize", e), window.addEventListener("orientationchange", e), () => {
|
|
@@ -4241,7 +4247,7 @@ function Rr({ body: e, cta: r, badgeLabel: i = "Landscape only", manualHint: a =
|
|
|
4241
4247
|
let p = async () => {
|
|
4242
4248
|
if (f(""), !o) try {
|
|
4243
4249
|
let e = document.documentElement;
|
|
4244
|
-
!document.fullscreenElement && e.requestFullscreen && await e.requestFullscreen(), await screen.orientation.lock?.("landscape-primary"), u(
|
|
4250
|
+
!document.fullscreenElement && e.requestFullscreen && await e.requestFullscreen(), await screen.orientation.lock?.("landscape-primary"), u(Rr());
|
|
4245
4251
|
} catch {
|
|
4246
4252
|
f(a);
|
|
4247
4253
|
}
|
|
@@ -4272,7 +4278,7 @@ function Rr({ body: e, cta: r, badgeLabel: i = "Landscape only", manualHint: a =
|
|
|
4272
4278
|
})
|
|
4273
4279
|
});
|
|
4274
4280
|
}
|
|
4275
|
-
function
|
|
4281
|
+
function Br({ className: e, currentLabel: r, label: i, options: a, value: o, defaultValue: s, onSelect: c }) {
|
|
4276
4282
|
let [l, d] = m(!1), [f, p] = m(s ?? a[0]?.id ?? ""), h = u(), g = ["game-ui-language-menu", e].filter(Boolean).join(" "), _ = o ?? f, v = a.find((e) => e.id === _), y = r ?? v?.label ?? a[0]?.label ?? "", b = (e) => {
|
|
4277
4283
|
o === void 0 && p(e), c?.(e), d(!1);
|
|
4278
4284
|
};
|
|
@@ -4304,34 +4310,34 @@ function zr({ className: e, currentLabel: r, label: i, options: a, value: o, def
|
|
|
4304
4310
|
}) : null]
|
|
4305
4311
|
});
|
|
4306
4312
|
}
|
|
4307
|
-
function
|
|
4313
|
+
function Vr({ label: e, tone: r = "loading" }) {
|
|
4308
4314
|
return /* @__PURE__ */ n("div", {
|
|
4309
4315
|
className: "game-ui-loading-state",
|
|
4310
4316
|
"data-loading-tone": r,
|
|
4311
4317
|
role: r === "error" ? "alert" : "status",
|
|
4312
4318
|
children: [/* @__PURE__ */ t("img", {
|
|
4313
4319
|
alt: "",
|
|
4314
|
-
src:
|
|
4320
|
+
src: Nr(r === "error" ? "alert" : "timer")
|
|
4315
4321
|
}), /* @__PURE__ */ t("span", { children: e })]
|
|
4316
4322
|
});
|
|
4317
4323
|
}
|
|
4318
|
-
function
|
|
4319
|
-
return
|
|
4324
|
+
function Hr() {
|
|
4325
|
+
return xr.catalog;
|
|
4320
4326
|
}
|
|
4321
4327
|
//#endregion
|
|
4322
4328
|
//#region src/FirstSessionGameShell.tsx
|
|
4323
|
-
function
|
|
4329
|
+
function Ur({ fallback: e, slot: n }) {
|
|
4324
4330
|
return n ?? /* @__PURE__ */ t($, {
|
|
4325
4331
|
icon: e,
|
|
4326
4332
|
size: "sm"
|
|
4327
4333
|
});
|
|
4328
4334
|
}
|
|
4329
|
-
function
|
|
4335
|
+
function Wr({ authenticated: e, batteryCount: r, className: i, dailyStreak: a, iconSlots: o, labels: s, onHistory: c, onSettings: l, onWardrobe: u, playerName: d }) {
|
|
4330
4336
|
let f = ["swimmer-first-session-shell", i].filter(Boolean).join(" "), p = e ? `${r} 🔋` : s.guest ?? "guest";
|
|
4331
4337
|
return /* @__PURE__ */ n("section", {
|
|
4332
4338
|
"aria-label": s.shell,
|
|
4333
4339
|
className: f,
|
|
4334
|
-
children: [/* @__PURE__ */ t(
|
|
4340
|
+
children: [/* @__PURE__ */ t(Fr, {
|
|
4335
4341
|
className: "swimmer-first-session-hud",
|
|
4336
4342
|
items: [
|
|
4337
4343
|
{
|
|
@@ -4363,7 +4369,7 @@ function Ur({ authenticated: e, batteryCount: r, className: i, dailyStreak: a, i
|
|
|
4363
4369
|
}
|
|
4364
4370
|
],
|
|
4365
4371
|
label: s.hud,
|
|
4366
|
-
actions: /* @__PURE__ */ n(
|
|
4372
|
+
actions: /* @__PURE__ */ n(tr, {
|
|
4367
4373
|
className: "swimmer-first-session-hud-actions",
|
|
4368
4374
|
label: s.tools,
|
|
4369
4375
|
children: [
|
|
@@ -4371,7 +4377,7 @@ function Ur({ authenticated: e, batteryCount: r, className: i, dailyStreak: a, i
|
|
|
4371
4377
|
"aria-label": s.wardrobe,
|
|
4372
4378
|
onClick: u,
|
|
4373
4379
|
variant: "secondary",
|
|
4374
|
-
children: [/* @__PURE__ */ t(
|
|
4380
|
+
children: [/* @__PURE__ */ t(Ur, {
|
|
4375
4381
|
fallback: "shirt",
|
|
4376
4382
|
slot: o?.wardrobe
|
|
4377
4383
|
}), s.wardrobe]
|
|
@@ -4380,7 +4386,7 @@ function Ur({ authenticated: e, batteryCount: r, className: i, dailyStreak: a, i
|
|
|
4380
4386
|
"aria-label": s.settings,
|
|
4381
4387
|
onClick: l,
|
|
4382
4388
|
variant: "secondary",
|
|
4383
|
-
children: [/* @__PURE__ */ t(
|
|
4389
|
+
children: [/* @__PURE__ */ t(Ur, {
|
|
4384
4390
|
fallback: "settings",
|
|
4385
4391
|
slot: o?.settings
|
|
4386
4392
|
}), s.settings]
|
|
@@ -4389,7 +4395,7 @@ function Ur({ authenticated: e, batteryCount: r, className: i, dailyStreak: a, i
|
|
|
4389
4395
|
"aria-label": s.history,
|
|
4390
4396
|
onClick: c,
|
|
4391
4397
|
variant: "secondary",
|
|
4392
|
-
children: [/* @__PURE__ */ t(
|
|
4398
|
+
children: [/* @__PURE__ */ t(Ur, {
|
|
4393
4399
|
fallback: "history",
|
|
4394
4400
|
slot: o?.history
|
|
4395
4401
|
}), s.history]
|
|
@@ -4414,7 +4420,7 @@ function Ur({ authenticated: e, batteryCount: r, className: i, dailyStreak: a, i
|
|
|
4414
4420
|
}),
|
|
4415
4421
|
/* @__PURE__ */ n("label", {
|
|
4416
4422
|
className: "swimmer-first-session-input",
|
|
4417
|
-
children: [/* @__PURE__ */ t(
|
|
4423
|
+
children: [/* @__PURE__ */ t(Ur, {
|
|
4418
4424
|
fallback: "chat",
|
|
4419
4425
|
slot: o?.input
|
|
4420
4426
|
}), /* @__PURE__ */ t("span", { children: s.input })]
|
|
@@ -4422,7 +4428,7 @@ function Ur({ authenticated: e, batteryCount: r, className: i, dailyStreak: a, i
|
|
|
4422
4428
|
/* @__PURE__ */ n("button", {
|
|
4423
4429
|
className: "swimmer-first-session-emote",
|
|
4424
4430
|
type: "button",
|
|
4425
|
-
children: [/* @__PURE__ */ t(
|
|
4431
|
+
children: [/* @__PURE__ */ t(Ur, {
|
|
4426
4432
|
fallback: "smile",
|
|
4427
4433
|
slot: o?.emote
|
|
4428
4434
|
}), s.emote]
|
|
@@ -4431,7 +4437,7 @@ function Ur({ authenticated: e, batteryCount: r, className: i, dailyStreak: a, i
|
|
|
4431
4437
|
})]
|
|
4432
4438
|
});
|
|
4433
4439
|
}
|
|
4434
|
-
function
|
|
4440
|
+
function Gr({ labels: e, onDismiss: r, open: i }) {
|
|
4435
4441
|
return i ? /* @__PURE__ */ n("aside", {
|
|
4436
4442
|
"aria-labelledby": "swimmer-first-session-onboarding-title",
|
|
4437
4443
|
"aria-modal": "true",
|
|
@@ -4479,7 +4485,7 @@ function Wr({ labels: e, onDismiss: r, open: i }) {
|
|
|
4479
4485
|
}
|
|
4480
4486
|
//#endregion
|
|
4481
4487
|
//#region src/GameForms.tsx
|
|
4482
|
-
var
|
|
4488
|
+
var Kr = a(function({ className: e, invalid: n, type: r = "text", ...i }, a) {
|
|
4483
4489
|
return /* @__PURE__ */ t("input", {
|
|
4484
4490
|
className: ["game-ui-input", e].filter(Boolean).join(" "),
|
|
4485
4491
|
"data-invalid": n ? "true" : void 0,
|
|
@@ -4487,7 +4493,7 @@ var Gr = a(function({ className: e, invalid: n, type: r = "text", ...i }, a) {
|
|
|
4487
4493
|
type: r,
|
|
4488
4494
|
...i
|
|
4489
4495
|
});
|
|
4490
|
-
}),
|
|
4496
|
+
}), qr = a(function({ className: e, invalid: n, rows: r = 3, ...i }, a) {
|
|
4491
4497
|
return /* @__PURE__ */ t("textarea", {
|
|
4492
4498
|
className: [
|
|
4493
4499
|
"game-ui-input",
|
|
@@ -4500,7 +4506,7 @@ var Gr = a(function({ className: e, invalid: n, type: r = "text", ...i }, a) {
|
|
|
4500
4506
|
...i
|
|
4501
4507
|
});
|
|
4502
4508
|
});
|
|
4503
|
-
function
|
|
4509
|
+
function Jr({ children: e, className: r, error: i, hint: a, label: o, required: s }) {
|
|
4504
4510
|
return /* @__PURE__ */ n("label", {
|
|
4505
4511
|
className: ["game-ui-field", r].filter(Boolean).join(" "),
|
|
4506
4512
|
"data-invalid": i ? "true" : void 0,
|
|
@@ -4526,7 +4532,7 @@ function qr({ children: e, className: r, error: i, hint: a, label: o, required:
|
|
|
4526
4532
|
]
|
|
4527
4533
|
});
|
|
4528
4534
|
}
|
|
4529
|
-
function
|
|
4535
|
+
function Yr({ className: e, label: r, ...i }) {
|
|
4530
4536
|
return /* @__PURE__ */ n("label", {
|
|
4531
4537
|
className: ["game-ui-checkbox", e].filter(Boolean).join(" "),
|
|
4532
4538
|
children: [
|
|
@@ -4548,11 +4554,11 @@ function Jr({ className: e, label: r, ...i }) {
|
|
|
4548
4554
|
}
|
|
4549
4555
|
//#endregion
|
|
4550
4556
|
//#region src/GameDisplay.tsx
|
|
4551
|
-
function
|
|
4557
|
+
function Xr(e) {
|
|
4552
4558
|
let t = e.trim().split(/\s+/).filter(Boolean);
|
|
4553
4559
|
return t.length === 0 ? "?" : t.slice(0, 2).map((e) => e[0] ?? "").join("").toUpperCase();
|
|
4554
4560
|
}
|
|
4555
|
-
function
|
|
4561
|
+
function Zr({ className: r, name: i, size: a = "md", src: o, status: s = "none" }) {
|
|
4556
4562
|
return /* @__PURE__ */ n("span", {
|
|
4557
4563
|
className: ["game-ui-avatar", r].filter(Boolean).join(" "),
|
|
4558
4564
|
"data-avatar-size": a,
|
|
@@ -4563,7 +4569,7 @@ function Xr({ className: r, name: i, size: a = "md", src: o, status: s = "none"
|
|
|
4563
4569
|
}) : /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", {
|
|
4564
4570
|
"aria-hidden": "true",
|
|
4565
4571
|
className: "game-ui-avatar-initials",
|
|
4566
|
-
children:
|
|
4572
|
+
children: Xr(i)
|
|
4567
4573
|
}), /* @__PURE__ */ t("span", {
|
|
4568
4574
|
className: "game-ui-sr-only",
|
|
4569
4575
|
children: i
|
|
@@ -4573,7 +4579,7 @@ function Xr({ className: r, name: i, size: a = "md", src: o, status: s = "none"
|
|
|
4573
4579
|
})]
|
|
4574
4580
|
});
|
|
4575
4581
|
}
|
|
4576
|
-
function
|
|
4582
|
+
function Qr({ className: e, label: r, max: i = 100, showValue: a = !1, tone: o = "accent", value: s, valueLabel: c }) {
|
|
4577
4583
|
let l = i <= 0 ? 100 : i, u = Math.max(0, Math.min(100, s / l * 100)), d = ["game-ui-progress", e].filter(Boolean).join(" "), f = !!c, p = {
|
|
4578
4584
|
accent: "var(--game-ui-accent)",
|
|
4579
4585
|
danger: "var(--game-ui-danger)",
|
|
@@ -4591,7 +4597,7 @@ function Zr({ className: e, label: r, max: i = 100, showValue: a = !1, tone: o =
|
|
|
4591
4597
|
"aria-valuetext": f ? c : void 0,
|
|
4592
4598
|
className: "game-ui-progress-track",
|
|
4593
4599
|
role: "progressbar",
|
|
4594
|
-
children: /* @__PURE__ */ t(
|
|
4600
|
+
children: /* @__PURE__ */ t(Zn, {
|
|
4595
4601
|
"aria-hidden": "true",
|
|
4596
4602
|
className: "game-ui-progress-liquid",
|
|
4597
4603
|
fill: p,
|
|
@@ -4602,7 +4608,7 @@ function Zr({ className: e, label: r, max: i = 100, showValue: a = !1, tone: o =
|
|
|
4602
4608
|
pointerEvents: "none",
|
|
4603
4609
|
position: "absolute"
|
|
4604
4610
|
},
|
|
4605
|
-
children: /* @__PURE__ */ t(
|
|
4611
|
+
children: /* @__PURE__ */ t(Zn.Item, {
|
|
4606
4612
|
"aria-hidden": "true",
|
|
4607
4613
|
className: "game-ui-progress-fill",
|
|
4608
4614
|
style: {
|
|
@@ -4625,7 +4631,7 @@ function Zr({ className: e, label: r, max: i = 100, showValue: a = !1, tone: o =
|
|
|
4625
4631
|
}) : null]
|
|
4626
4632
|
});
|
|
4627
4633
|
}
|
|
4628
|
-
function
|
|
4634
|
+
function $r({ action: e, className: r, description: i, icon: a, title: o }) {
|
|
4629
4635
|
return /* @__PURE__ */ n("div", {
|
|
4630
4636
|
className: ["game-ui-empty-state", r].filter(Boolean).join(" "),
|
|
4631
4637
|
children: [
|
|
@@ -4650,7 +4656,7 @@ function Qr({ action: e, className: r, description: i, icon: a, title: o }) {
|
|
|
4650
4656
|
}
|
|
4651
4657
|
//#endregion
|
|
4652
4658
|
//#region src/GameSurfacePack.tsx
|
|
4653
|
-
function
|
|
4659
|
+
function ei({ assetLibrary: e, bottomBar: r, children: i, className: a, density: o = "comfortable", hud: s, layout: c = "auto", movementPad: l, overlay: u, sidePanel: d, title: f }) {
|
|
4654
4660
|
return /* @__PURE__ */ n("section", {
|
|
4655
4661
|
"aria-label": f,
|
|
4656
4662
|
className: ["game-ui-shell", a].filter(Boolean).join(" "),
|
|
@@ -4688,8 +4694,8 @@ function $r({ assetLibrary: e, bottomBar: r, children: i, className: a, density:
|
|
|
4688
4694
|
]
|
|
4689
4695
|
});
|
|
4690
4696
|
}
|
|
4691
|
-
var
|
|
4692
|
-
function
|
|
4697
|
+
var ti = ei;
|
|
4698
|
+
function ni({ className: e, density: r = "comfortable", facts: i, label: a, variant: o = "facts" }) {
|
|
4693
4699
|
return /* @__PURE__ */ t("section", {
|
|
4694
4700
|
"aria-label": a,
|
|
4695
4701
|
className: ["game-ui-fact-list", e].filter(Boolean).join(" "),
|
|
@@ -4718,9 +4724,9 @@ function ti({ className: e, density: r = "comfortable", facts: i, label: a, vari
|
|
|
4718
4724
|
}, e.id))
|
|
4719
4725
|
});
|
|
4720
4726
|
}
|
|
4721
|
-
var
|
|
4722
|
-
function
|
|
4723
|
-
return /* @__PURE__ */ n(
|
|
4727
|
+
var ri = ni;
|
|
4728
|
+
function ii({ actions: r, className: i, density: a = "comfortable", iconLabelMode: o = "hidden", label: s, style: c = "button" }) {
|
|
4729
|
+
return /* @__PURE__ */ n(tr, {
|
|
4724
4730
|
className: ["game-ui-action-grid", i].filter(Boolean).join(" "),
|
|
4725
4731
|
"data-icon-label-mode": c === "icon" ? o : void 0,
|
|
4726
4732
|
label: s,
|
|
@@ -4745,7 +4751,7 @@ function ri({ actions: r, className: i, density: a = "comfortable", iconLabelMod
|
|
|
4745
4751
|
}) : null,
|
|
4746
4752
|
r.shortcut ? /* @__PURE__ */ t("kbd", { children: r.shortcut }) : null
|
|
4747
4753
|
] }), l = () => r.onAction?.(r.id);
|
|
4748
|
-
return c === "icon" ? /* @__PURE__ */ t(
|
|
4754
|
+
return c === "icon" ? /* @__PURE__ */ t(nr, {
|
|
4749
4755
|
"aria-pressed": r.selected,
|
|
4750
4756
|
className: "game-ui-action-grid-button",
|
|
4751
4757
|
disabled: r.disabled,
|
|
@@ -4763,7 +4769,7 @@ function ri({ actions: r, className: i, density: a = "comfortable", iconLabelMod
|
|
|
4763
4769
|
})]
|
|
4764
4770
|
});
|
|
4765
4771
|
}
|
|
4766
|
-
var
|
|
4772
|
+
var ai = [
|
|
4767
4773
|
{
|
|
4768
4774
|
direction: "forward",
|
|
4769
4775
|
label: "Move forward",
|
|
@@ -4788,7 +4794,7 @@ var ii = [
|
|
|
4788
4794
|
shortcut: "S / ↓",
|
|
4789
4795
|
symbol: "↓"
|
|
4790
4796
|
}
|
|
4791
|
-
],
|
|
4797
|
+
], oi = {
|
|
4792
4798
|
ArrowUp: "forward",
|
|
4793
4799
|
w: "forward",
|
|
4794
4800
|
W: "forward",
|
|
@@ -4803,7 +4809,7 @@ var ii = [
|
|
|
4803
4809
|
S: "backward",
|
|
4804
4810
|
" ": "reset"
|
|
4805
4811
|
};
|
|
4806
|
-
function
|
|
4812
|
+
function si({ actions: e = ai, className: r, density: i = "comfortable", disabled: a = !1, helpText: o, label: s, layout: c = "dpad", onMove: l }) {
|
|
4807
4813
|
let u = ["game-ui-movement-pad", r].filter(Boolean).join(" "), d = (e) => {
|
|
4808
4814
|
a || l?.(e);
|
|
4809
4815
|
};
|
|
@@ -4813,7 +4819,7 @@ function oi({ actions: e = ii, className: r, density: i = "comfortable", disable
|
|
|
4813
4819
|
"data-density": i,
|
|
4814
4820
|
"data-layout": c,
|
|
4815
4821
|
onKeyDown: (t) => {
|
|
4816
|
-
let n =
|
|
4822
|
+
let n = oi[t.key];
|
|
4817
4823
|
if (!n) return;
|
|
4818
4824
|
let r = e.find((e) => e.direction === n);
|
|
4819
4825
|
!r || r.disabled || a || (t.preventDefault(), d(n));
|
|
@@ -4821,7 +4827,7 @@ function oi({ actions: e = ii, className: r, density: i = "comfortable", disable
|
|
|
4821
4827
|
tabIndex: 0,
|
|
4822
4828
|
children: [/* @__PURE__ */ t("div", {
|
|
4823
4829
|
className: "game-ui-movement-pad-grid",
|
|
4824
|
-
children: e.map((e) => /* @__PURE__ */ n(
|
|
4830
|
+
children: e.map((e) => /* @__PURE__ */ n(nr, {
|
|
4825
4831
|
className: "game-ui-movement-button",
|
|
4826
4832
|
"data-direction": e.direction,
|
|
4827
4833
|
disabled: a || e.disabled,
|
|
@@ -4839,15 +4845,15 @@ function oi({ actions: e = ii, className: r, density: i = "comfortable", disable
|
|
|
4839
4845
|
}), o ? /* @__PURE__ */ t("p", { children: o }) : null]
|
|
4840
4846
|
});
|
|
4841
4847
|
}
|
|
4842
|
-
var
|
|
4848
|
+
var ci = {
|
|
4843
4849
|
generated: "Generated",
|
|
4844
4850
|
imported: "Imported",
|
|
4845
4851
|
starter: "Starter"
|
|
4846
|
-
},
|
|
4852
|
+
}, li = {
|
|
4847
4853
|
generated: "ai",
|
|
4848
4854
|
imported: "warning",
|
|
4849
4855
|
starter: "neutral"
|
|
4850
|
-
},
|
|
4856
|
+
}, ui = {
|
|
4851
4857
|
error: "danger",
|
|
4852
4858
|
generating: "ai",
|
|
4853
4859
|
missing: "danger",
|
|
@@ -4855,8 +4861,8 @@ var si = {
|
|
|
4855
4861
|
ready: "neutral",
|
|
4856
4862
|
selected: "success"
|
|
4857
4863
|
};
|
|
4858
|
-
function
|
|
4859
|
-
let { "aria-label": S, ...C } = x, w = ["game-ui-asset-card", a].filter(Boolean).join(" "), T = m ??
|
|
4864
|
+
function di({ assetId: e, badges: r = [], cardLayout: i = "list", className: a, description: o, disabled: s, facts: c = [], icon: l = "gem", onClick: u, onSelect: d, selected: f = !1, source: p, sourceLabel: m, status: h = "ready", statusLabel: g, thumbnailAlt: _ = "", thumbnailSrc: v, title: y, type: b = "button", ...x }) {
|
|
4865
|
+
let { "aria-label": S, ...C } = x, w = ["game-ui-asset-card", a].filter(Boolean).join(" "), T = m ?? ci[p], E = g ?? h;
|
|
4860
4866
|
return /* @__PURE__ */ n("button", {
|
|
4861
4867
|
"aria-label": S ?? y,
|
|
4862
4868
|
"aria-pressed": f,
|
|
@@ -4887,11 +4893,11 @@ function ui({ assetId: e, badges: r = [], cardLayout: i = "list", className: a,
|
|
|
4887
4893
|
className: "game-ui-asset-card-badges",
|
|
4888
4894
|
children: [
|
|
4889
4895
|
/* @__PURE__ */ t(Q, {
|
|
4890
|
-
tone:
|
|
4896
|
+
tone: li[p],
|
|
4891
4897
|
children: T
|
|
4892
4898
|
}),
|
|
4893
4899
|
/* @__PURE__ */ t(Q, {
|
|
4894
|
-
tone:
|
|
4900
|
+
tone: ui[h],
|
|
4895
4901
|
children: E
|
|
4896
4902
|
}),
|
|
4897
4903
|
r.map((e) => /* @__PURE__ */ t(Q, {
|
|
@@ -4910,7 +4916,7 @@ function ui({ assetId: e, badges: r = [], cardLayout: i = "list", className: a,
|
|
|
4910
4916
|
})]
|
|
4911
4917
|
});
|
|
4912
4918
|
}
|
|
4913
|
-
function
|
|
4919
|
+
function fi({ cardLayout: e = "auto", className: r, density: i = "comfortable", emptyAction: a, emptyDescription: o = "Assets will appear here when they are ready to place.", emptyTitle: s = "No assets ready", groups: c, label: l, onSelectAsset: u, selectedAssetId: d, subtitle: f, title: p }) {
|
|
4914
4920
|
let m = ["game-ui-asset-library", r].filter(Boolean).join(" "), h = c.reduce((e, t) => e + t.assets.length, 0), g = c.reduce((e, t) => (t.assets.forEach((t) => {
|
|
4915
4921
|
e[t.source] += 1;
|
|
4916
4922
|
}), e), {
|
|
@@ -4935,15 +4941,15 @@ function di({ cardLayout: e = "auto", className: r, density: i = "comfortable",
|
|
|
4935
4941
|
"aria-label": "Asset source counts",
|
|
4936
4942
|
className: "game-ui-asset-library-counts",
|
|
4937
4943
|
children: Object.entries(g).map(([e, t]) => /* @__PURE__ */ n(Q, {
|
|
4938
|
-
tone:
|
|
4944
|
+
tone: li[e],
|
|
4939
4945
|
children: [
|
|
4940
|
-
|
|
4946
|
+
ci[e],
|
|
4941
4947
|
" ",
|
|
4942
4948
|
t
|
|
4943
4949
|
]
|
|
4944
4950
|
}, e))
|
|
4945
4951
|
}),
|
|
4946
|
-
h === 0 ? /* @__PURE__ */ t(
|
|
4952
|
+
h === 0 ? /* @__PURE__ */ t($r, {
|
|
4947
4953
|
action: a,
|
|
4948
4954
|
description: o,
|
|
4949
4955
|
icon: "gem",
|
|
@@ -4955,13 +4961,13 @@ function di({ cardLayout: e = "auto", className: r, density: i = "comfortable",
|
|
|
4955
4961
|
className: "game-ui-asset-library-group",
|
|
4956
4962
|
"data-asset-source": r.source,
|
|
4957
4963
|
children: [/* @__PURE__ */ n("header", { children: [/* @__PURE__ */ t("strong", { children: r.label }), r.source ? /* @__PURE__ */ t(Q, {
|
|
4958
|
-
tone:
|
|
4959
|
-
children:
|
|
4964
|
+
tone: li[r.source],
|
|
4965
|
+
children: ci[r.source]
|
|
4960
4966
|
}) : null] }), /* @__PURE__ */ t("div", {
|
|
4961
4967
|
className: "game-ui-asset-library-grid",
|
|
4962
4968
|
children: r.assets.map((n) => {
|
|
4963
4969
|
let r = e === "auto" ? n.cardLayout : e;
|
|
4964
|
-
return /* @__PURE__ */ t(
|
|
4970
|
+
return /* @__PURE__ */ t(di, {
|
|
4965
4971
|
...n,
|
|
4966
4972
|
...r ? { cardLayout: r } : {},
|
|
4967
4973
|
...u ? { onSelect: u } : {},
|
|
@@ -4975,7 +4981,7 @@ function di({ cardLayout: e = "auto", className: r, density: i = "comfortable",
|
|
|
4975
4981
|
})
|
|
4976
4982
|
});
|
|
4977
4983
|
}
|
|
4978
|
-
function
|
|
4984
|
+
function pi({ actions: e = [], capacityLabel: r = "Objects", className: i, density: a = "comfortable", maxObjects: o, objectActions: s = [], placedObjects: c, selectedLabel: l = "Selected", selectedTitle: u, statusLabel: d = "Status", statusTone: f = "neutral", statusValue: p = "Idle", title: m }) {
|
|
4979
4985
|
let h = ["game-ui-placement-toolbar", i].filter(Boolean).join(" "), g = typeof c == "number" && typeof o == "number", _ = g && o > 0 ? Math.min(o, c) : 0;
|
|
4980
4986
|
return /* @__PURE__ */ t(X, {
|
|
4981
4987
|
className: h,
|
|
@@ -4984,7 +4990,7 @@ function fi({ actions: e = [], capacityLabel: r = "Objects", className: i, densi
|
|
|
4984
4990
|
children: /* @__PURE__ */ n("div", {
|
|
4985
4991
|
"data-density": a,
|
|
4986
4992
|
children: [
|
|
4987
|
-
/* @__PURE__ */ t(
|
|
4993
|
+
/* @__PURE__ */ t(ni, {
|
|
4988
4994
|
density: a,
|
|
4989
4995
|
facts: [{
|
|
4990
4996
|
icon: "gem",
|
|
@@ -5000,19 +5006,19 @@ function fi({ actions: e = [], capacityLabel: r = "Objects", className: i, densi
|
|
|
5000
5006
|
}],
|
|
5001
5007
|
label: `${m} facts`
|
|
5002
5008
|
}),
|
|
5003
|
-
g ? /* @__PURE__ */ t(
|
|
5009
|
+
g ? /* @__PURE__ */ t(Qr, {
|
|
5004
5010
|
label: r,
|
|
5005
5011
|
max: o,
|
|
5006
5012
|
showValue: !0,
|
|
5007
5013
|
tone: _ >= o ? "warning" : "success",
|
|
5008
5014
|
value: _
|
|
5009
5015
|
}) : null,
|
|
5010
|
-
e.length > 0 ? /* @__PURE__ */ t(
|
|
5016
|
+
e.length > 0 ? /* @__PURE__ */ t(ii, {
|
|
5011
5017
|
actions: e,
|
|
5012
5018
|
density: a,
|
|
5013
5019
|
label: `${m} actions`
|
|
5014
5020
|
}) : null,
|
|
5015
|
-
s.length > 0 ? /* @__PURE__ */ t(
|
|
5021
|
+
s.length > 0 ? /* @__PURE__ */ t(ii, {
|
|
5016
5022
|
actions: s,
|
|
5017
5023
|
density: a,
|
|
5018
5024
|
label: `${m} object actions`,
|
|
@@ -5022,7 +5028,7 @@ function fi({ actions: e = [], capacityLabel: r = "Objects", className: i, densi
|
|
|
5022
5028
|
})
|
|
5023
5029
|
});
|
|
5024
5030
|
}
|
|
5025
|
-
var
|
|
5031
|
+
var mi = pi, hi = {
|
|
5026
5032
|
build: "home",
|
|
5027
5033
|
flatten: "card",
|
|
5028
5034
|
inspect: "compass",
|
|
@@ -5032,7 +5038,7 @@ var pi = fi, mi = {
|
|
|
5032
5038
|
raise: "energy",
|
|
5033
5039
|
smooth: "lucky",
|
|
5034
5040
|
terrain: "portal"
|
|
5035
|
-
},
|
|
5041
|
+
}, gi = {
|
|
5036
5042
|
error: "danger",
|
|
5037
5043
|
locked: "warning",
|
|
5038
5044
|
missing: "danger",
|
|
@@ -5040,10 +5046,10 @@ var pi = fi, mi = {
|
|
|
5040
5046
|
ready: "neutral",
|
|
5041
5047
|
selected: "success"
|
|
5042
5048
|
};
|
|
5043
|
-
function
|
|
5049
|
+
function _i(e, t, n, r) {
|
|
5044
5050
|
let i = {
|
|
5045
5051
|
disabled: !!(r || e.disabled),
|
|
5046
|
-
icon: e.icon ??
|
|
5052
|
+
icon: e.icon ?? hi[e.id] ?? "gem",
|
|
5047
5053
|
id: e.id,
|
|
5048
5054
|
label: e.label,
|
|
5049
5055
|
selected: e.id === t,
|
|
@@ -5051,21 +5057,21 @@ function gi(e, t, n, r) {
|
|
|
5051
5057
|
};
|
|
5052
5058
|
return e.ariaLabel && (i.ariaLabel = e.ariaLabel), e.compactLabel && (i.compactLabel = e.compactLabel), e.meta && (i.meta = e.meta), e.shortcut && (i.shortcut = e.shortcut), n && (i.onAction = n), i;
|
|
5053
5059
|
}
|
|
5054
|
-
function
|
|
5060
|
+
function vi(e, t, n) {
|
|
5055
5061
|
return Number.isNaN(e) ? t : Math.min(n, Math.max(t, e));
|
|
5056
5062
|
}
|
|
5057
|
-
function
|
|
5063
|
+
function yi(e) {
|
|
5058
5064
|
return e;
|
|
5059
5065
|
}
|
|
5060
|
-
function
|
|
5066
|
+
function bi(e, t) {
|
|
5061
5067
|
return e === "auto" ? t === "mobile" || t === "small-mobile" ? "caption" : "hidden" : e;
|
|
5062
5068
|
}
|
|
5063
|
-
function
|
|
5069
|
+
function xi({ activeModeId: e, className: r, disabled: i = !1, label: a, modes: o, onModeChange: s, variant: c = "desktop", "data-testid": l }) {
|
|
5064
5070
|
return /* @__PURE__ */ n("section", {
|
|
5065
5071
|
"aria-label": a,
|
|
5066
5072
|
className: ["game-ui-terrain-mode-control", r].filter(Boolean).join(" "),
|
|
5067
5073
|
"data-ui-hook": "terrain-mode-control",
|
|
5068
|
-
"data-variant":
|
|
5074
|
+
"data-variant": yi(c),
|
|
5069
5075
|
"data-testid": l,
|
|
5070
5076
|
children: [/* @__PURE__ */ t("span", {
|
|
5071
5077
|
className: "game-ui-sr-only",
|
|
@@ -5087,7 +5093,7 @@ function bi({ activeModeId: e, className: r, disabled: i = !1, label: a, modes:
|
|
|
5087
5093
|
type: "button",
|
|
5088
5094
|
children: [
|
|
5089
5095
|
/* @__PURE__ */ t($, {
|
|
5090
|
-
icon: r.icon ??
|
|
5096
|
+
icon: r.icon ?? hi[r.id] ?? "portal",
|
|
5091
5097
|
size: c === "small-mobile" ? "sm" : "md",
|
|
5092
5098
|
style: "line"
|
|
5093
5099
|
}),
|
|
@@ -5102,8 +5108,8 @@ function bi({ activeModeId: e, className: r, disabled: i = !1, label: a, modes:
|
|
|
5102
5108
|
})]
|
|
5103
5109
|
});
|
|
5104
5110
|
}
|
|
5105
|
-
function
|
|
5106
|
-
let d = ["game-ui-terrain-tool-strip", n].filter(Boolean).join(" "), f =
|
|
5111
|
+
function Si({ activeToolId: e, className: n, compactLabelMode: r = "auto", density: i = "comfortable", disabled: a = !1, label: o, onToolChange: s, tools: c, variant: l = "desktop", "data-testid": u }) {
|
|
5112
|
+
let d = ["game-ui-terrain-tool-strip", n].filter(Boolean).join(" "), f = bi(r, l);
|
|
5107
5113
|
return /* @__PURE__ */ t("section", {
|
|
5108
5114
|
"aria-label": o,
|
|
5109
5115
|
className: d,
|
|
@@ -5112,8 +5118,8 @@ function xi({ activeToolId: e, className: n, compactLabelMode: r = "auto", densi
|
|
|
5112
5118
|
"data-ui-hook": "terrain-tool-strip",
|
|
5113
5119
|
"data-variant": l,
|
|
5114
5120
|
"data-testid": u,
|
|
5115
|
-
children: /* @__PURE__ */ t(
|
|
5116
|
-
actions: c.map((t) =>
|
|
5121
|
+
children: /* @__PURE__ */ t(ii, {
|
|
5122
|
+
actions: c.map((t) => _i(t, e, s, a)),
|
|
5117
5123
|
density: i,
|
|
5118
5124
|
iconLabelMode: f,
|
|
5119
5125
|
label: o,
|
|
@@ -5121,18 +5127,18 @@ function xi({ activeToolId: e, className: n, compactLabelMode: r = "auto", densi
|
|
|
5121
5127
|
})
|
|
5122
5128
|
});
|
|
5123
5129
|
}
|
|
5124
|
-
function
|
|
5125
|
-
let l = ["game-ui-brush-controls", e].filter(Boolean).join(" "), u = o.minRadius ?? 1, d = o.maxRadius ?? 8, f = o.radiusStep ?? .25, p = o.minStrength ?? 0, m = o.maxStrength ?? 1, h = o.strengthStep ?? .05, g =
|
|
5126
|
-
i?.(
|
|
5130
|
+
function Ci({ className: e, labels: r = {}, onRadiusChange: i, onStrengthChange: a, state: o, variant: s = "desktop", "data-testid": c }) {
|
|
5131
|
+
let l = ["game-ui-brush-controls", e].filter(Boolean).join(" "), u = o.minRadius ?? 1, d = o.maxRadius ?? 8, f = o.radiusStep ?? .25, p = o.minStrength ?? 0, m = o.maxStrength ?? 1, h = o.strengthStep ?? .05, g = vi(o.radius, u, d), _ = vi(o.strength, p, m), v = !!o.disabled, y = (e) => {
|
|
5132
|
+
i?.(vi(Number(e.currentTarget.value), u, d));
|
|
5127
5133
|
}, b = (e) => {
|
|
5128
|
-
a?.(
|
|
5134
|
+
a?.(vi(Number(e.currentTarget.value), p, m));
|
|
5129
5135
|
};
|
|
5130
5136
|
return /* @__PURE__ */ n("section", {
|
|
5131
5137
|
className: l,
|
|
5132
5138
|
"data-ui-hook": "brush-controls",
|
|
5133
5139
|
"data-variant": s,
|
|
5134
5140
|
"data-testid": c,
|
|
5135
|
-
children: [/* @__PURE__ */ t(
|
|
5141
|
+
children: [/* @__PURE__ */ t(Jr, {
|
|
5136
5142
|
...r.radiusHint ? { hint: r.radiusHint } : {},
|
|
5137
5143
|
label: r.radius ?? "Brush radius",
|
|
5138
5144
|
children: /* @__PURE__ */ n("div", {
|
|
@@ -5162,7 +5168,7 @@ function Si({ className: e, labels: r = {}, onRadiusChange: i, onStrengthChange:
|
|
|
5162
5168
|
value: g
|
|
5163
5169
|
})]
|
|
5164
5170
|
})
|
|
5165
|
-
}), /* @__PURE__ */ t(
|
|
5171
|
+
}), /* @__PURE__ */ t(Jr, {
|
|
5166
5172
|
...r.strengthHint ? { hint: r.strengthHint } : {},
|
|
5167
5173
|
label: r.strength ?? "Brush strength",
|
|
5168
5174
|
children: /* @__PURE__ */ n("div", {
|
|
@@ -5195,7 +5201,7 @@ function Si({ className: e, labels: r = {}, onRadiusChange: i, onStrengthChange:
|
|
|
5195
5201
|
})]
|
|
5196
5202
|
});
|
|
5197
5203
|
}
|
|
5198
|
-
function
|
|
5204
|
+
function wi({ activeMaterialId: e, className: r, disabled: i = !1, label: a, materials: o, onMaterialChange: s, variant: c = "desktop", "data-testid": l }) {
|
|
5199
5205
|
return /* @__PURE__ */ t("section", {
|
|
5200
5206
|
"aria-label": a,
|
|
5201
5207
|
className: ["game-ui-material-swatches", r].filter(Boolean).join(" "),
|
|
@@ -5238,14 +5244,14 @@ function Ci({ activeMaterialId: e, className: r, disabled: i = !1, label: a, mat
|
|
|
5238
5244
|
})
|
|
5239
5245
|
});
|
|
5240
5246
|
}
|
|
5241
|
-
function
|
|
5247
|
+
function Ti({ canRedo: e = !1, canUndo: n = !1, className: r, disabled: i = !1, label: a, onRedo: o, onUndo: s, redoLabel: c = "Redo", undoLabel: l = "Undo", variant: u = "desktop", "data-testid": d }) {
|
|
5242
5248
|
return /* @__PURE__ */ t("section", {
|
|
5243
5249
|
"aria-label": a,
|
|
5244
5250
|
className: ["game-ui-undo-redo-actions", r].filter(Boolean).join(" "),
|
|
5245
5251
|
"data-ui-hook": "undo-redo-actions",
|
|
5246
5252
|
"data-variant": u,
|
|
5247
5253
|
"data-testid": d,
|
|
5248
|
-
children: /* @__PURE__ */ t(
|
|
5254
|
+
children: /* @__PURE__ */ t(ii, {
|
|
5249
5255
|
actions: [{
|
|
5250
5256
|
disabled: i || !n,
|
|
5251
5257
|
icon: "undo",
|
|
@@ -5271,7 +5277,7 @@ function wi({ canRedo: e = !1, canUndo: n = !1, className: r, disabled: i = !1,
|
|
|
5271
5277
|
})
|
|
5272
5278
|
});
|
|
5273
5279
|
}
|
|
5274
|
-
function
|
|
5280
|
+
function Ei({ activeCategoryId: e, categories: r, className: i, density: a = "comfortable", emptyDescription: o = "Building pieces will appear here when a category is available.", emptyTitle: s = "No build pieces ready", label: c, onCategoryChange: l, onSelectItem: u, selectedItemId: d, title: f, variant: p = "desktop", "data-testid": m }) {
|
|
5275
5281
|
let h = ["game-ui-build-library", i].filter(Boolean).join(" "), g = r.filter((e) => !e.disabled), _ = r.find((t) => t.id === e) ?? g[0] ?? r[0], v = _?.items ?? [], y = p === "small-mobile";
|
|
5276
5282
|
return /* @__PURE__ */ t(X, {
|
|
5277
5283
|
className: h,
|
|
@@ -5301,7 +5307,7 @@ function Ti({ activeCategoryId: e, categories: r, className: i, density: a = "co
|
|
|
5301
5307
|
type: "button",
|
|
5302
5308
|
children: [
|
|
5303
5309
|
/* @__PURE__ */ t($, {
|
|
5304
|
-
icon: e.icon ??
|
|
5310
|
+
icon: e.icon ?? hi[e.id] ?? "home",
|
|
5305
5311
|
size: "sm",
|
|
5306
5312
|
style: "line"
|
|
5307
5313
|
}),
|
|
@@ -5310,7 +5316,7 @@ function Ti({ activeCategoryId: e, categories: r, className: i, density: a = "co
|
|
|
5310
5316
|
]
|
|
5311
5317
|
}, e.id);
|
|
5312
5318
|
})
|
|
5313
|
-
}), v.length === 0 || !_ ? /* @__PURE__ */ t(
|
|
5319
|
+
}), v.length === 0 || !_ ? /* @__PURE__ */ t($r, {
|
|
5314
5320
|
description: o,
|
|
5315
5321
|
icon: "home",
|
|
5316
5322
|
title: s
|
|
@@ -5348,7 +5354,7 @@ function Ti({ activeCategoryId: e, categories: r, className: i, density: a = "co
|
|
|
5348
5354
|
/* @__PURE__ */ n("span", {
|
|
5349
5355
|
className: "game-ui-build-item-badges",
|
|
5350
5356
|
children: [/* @__PURE__ */ t(Q, {
|
|
5351
|
-
tone:
|
|
5357
|
+
tone: gi[i],
|
|
5352
5358
|
children: i
|
|
5353
5359
|
}), e.badges?.map((e) => /* @__PURE__ */ t(Q, {
|
|
5354
5360
|
tone: e.tone ?? "neutral",
|
|
@@ -5366,7 +5372,7 @@ function Ti({ activeCategoryId: e, categories: r, className: i, density: a = "co
|
|
|
5366
5372
|
})
|
|
5367
5373
|
});
|
|
5368
5374
|
}
|
|
5369
|
-
function
|
|
5375
|
+
function Di({ children: e, className: r, closeIcon: i = "close", closeLabel: a = "Close tools", disabled: o = !1, label: s, onOpenChange: c, open: l, panelId: u, title: d, triggerIcon: f = "settings", triggerLabel: p = "Tools", variant: m = "mobile", "data-testid": h }) {
|
|
5370
5376
|
let g = ["game-ui-compact-game-drawer", r].filter(Boolean).join(" "), _ = u ?? `${d.toLowerCase().replace(/[^a-z0-9]+/g, "-") || "tools"}-drawer-panel`;
|
|
5371
5377
|
return /* @__PURE__ */ n("aside", {
|
|
5372
5378
|
"aria-label": s,
|
|
@@ -5401,7 +5407,7 @@ function Ei({ children: e, className: r, closeIcon: i = "close", closeLabel: a =
|
|
|
5401
5407
|
})]
|
|
5402
5408
|
});
|
|
5403
5409
|
}
|
|
5404
|
-
function
|
|
5410
|
+
function Oi({ status: e }) {
|
|
5405
5411
|
if (!e) return null;
|
|
5406
5412
|
let r = typeof e.progressValue == "number" && typeof e.progressMax == "number", i = e.tone === "danger" ? "danger" : e.tone === "warning" ? "warning" : "success", a = e.progressMax ?? 100, o = e.progressValue ?? 0;
|
|
5407
5413
|
return /* @__PURE__ */ n("div", {
|
|
@@ -5414,7 +5420,7 @@ function Di({ status: e }) {
|
|
|
5414
5420
|
children: e.label
|
|
5415
5421
|
}),
|
|
5416
5422
|
e.description ? /* @__PURE__ */ t("p", { children: e.description }) : null,
|
|
5417
|
-
r ? /* @__PURE__ */ t(
|
|
5423
|
+
r ? /* @__PURE__ */ t(Qr, {
|
|
5418
5424
|
label: e.progressLabel ?? e.label,
|
|
5419
5425
|
max: a,
|
|
5420
5426
|
showValue: !0,
|
|
@@ -5424,15 +5430,15 @@ function Di({ status: e }) {
|
|
|
5424
5430
|
]
|
|
5425
5431
|
});
|
|
5426
5432
|
}
|
|
5427
|
-
function
|
|
5433
|
+
function ki({ activeBuildCategoryId: e, activeMaterialId: r, activeModeId: i, activeToolId: a, brush: o, buildCategories: s = [], density: c = "comfortable", disabled: l = !1, materials: u = [], modes: d, onBrushRadiusChange: f, onBrushStrengthChange: p, onBuildCategoryChange: m, onMaterialChange: h, onModeChange: g, onRedo: _, onSelectBuildItem: v, onToolChange: y, onUndo: b, selectedBuildItemId: x, status: S, toolCompactLabelMode: C = "auto", tools: w, undoRedo: T, variant: E = "desktop" }) {
|
|
5428
5434
|
return /* @__PURE__ */ n("div", {
|
|
5429
5435
|
className: "game-ui-terrain-build-toolbox-body",
|
|
5430
5436
|
"data-active-mode": i,
|
|
5431
5437
|
"data-active-tool": a,
|
|
5432
5438
|
"data-variant": E,
|
|
5433
5439
|
children: [
|
|
5434
|
-
/* @__PURE__ */ t(
|
|
5435
|
-
/* @__PURE__ */ t(
|
|
5440
|
+
/* @__PURE__ */ t(Oi, { status: S }),
|
|
5441
|
+
/* @__PURE__ */ t(xi, {
|
|
5436
5442
|
activeModeId: i,
|
|
5437
5443
|
disabled: l,
|
|
5438
5444
|
label: "Tool mode",
|
|
@@ -5443,7 +5449,7 @@ function Oi({ activeBuildCategoryId: e, activeMaterialId: r, activeModeId: i, ac
|
|
|
5443
5449
|
/* @__PURE__ */ n("div", {
|
|
5444
5450
|
className: "game-ui-terrain-build-main-grid",
|
|
5445
5451
|
children: [
|
|
5446
|
-
/* @__PURE__ */ t(
|
|
5452
|
+
/* @__PURE__ */ t(Si, {
|
|
5447
5453
|
activeToolId: a,
|
|
5448
5454
|
compactLabelMode: C,
|
|
5449
5455
|
density: c,
|
|
@@ -5453,7 +5459,7 @@ function Oi({ activeBuildCategoryId: e, activeMaterialId: r, activeModeId: i, ac
|
|
|
5453
5459
|
tools: w,
|
|
5454
5460
|
variant: E
|
|
5455
5461
|
}),
|
|
5456
|
-
/* @__PURE__ */ t(
|
|
5462
|
+
/* @__PURE__ */ t(Ti, {
|
|
5457
5463
|
canRedo: T?.canRedo,
|
|
5458
5464
|
canUndo: T?.canUndo,
|
|
5459
5465
|
disabled: l,
|
|
@@ -5464,7 +5470,7 @@ function Oi({ activeBuildCategoryId: e, activeMaterialId: r, activeModeId: i, ac
|
|
|
5464
5470
|
undoLabel: T?.undoLabel,
|
|
5465
5471
|
variant: E
|
|
5466
5472
|
}),
|
|
5467
|
-
/* @__PURE__ */ t(
|
|
5473
|
+
/* @__PURE__ */ t(Ci, {
|
|
5468
5474
|
onRadiusChange: f,
|
|
5469
5475
|
onStrengthChange: p,
|
|
5470
5476
|
state: {
|
|
@@ -5473,7 +5479,7 @@ function Oi({ activeBuildCategoryId: e, activeMaterialId: r, activeModeId: i, ac
|
|
|
5473
5479
|
},
|
|
5474
5480
|
variant: E
|
|
5475
5481
|
}),
|
|
5476
|
-
u.length > 0 ? /* @__PURE__ */ t(
|
|
5482
|
+
u.length > 0 ? /* @__PURE__ */ t(wi, {
|
|
5477
5483
|
activeMaterialId: r,
|
|
5478
5484
|
disabled: l,
|
|
5479
5485
|
label: "Terrain materials",
|
|
@@ -5483,7 +5489,7 @@ function Oi({ activeBuildCategoryId: e, activeMaterialId: r, activeModeId: i, ac
|
|
|
5483
5489
|
}) : null
|
|
5484
5490
|
]
|
|
5485
5491
|
}),
|
|
5486
|
-
s.length > 0 ? /* @__PURE__ */ t(
|
|
5492
|
+
s.length > 0 ? /* @__PURE__ */ t(Ei, {
|
|
5487
5493
|
activeCategoryId: e,
|
|
5488
5494
|
categories: s,
|
|
5489
5495
|
density: c,
|
|
@@ -5497,12 +5503,12 @@ function Oi({ activeBuildCategoryId: e, activeMaterialId: r, activeModeId: i, ac
|
|
|
5497
5503
|
]
|
|
5498
5504
|
});
|
|
5499
5505
|
}
|
|
5500
|
-
function
|
|
5501
|
-
let u = ["game-ui-terrain-build-toolbox", e].filter(Boolean).join(" "), d = /* @__PURE__ */ t(
|
|
5506
|
+
function Ai({ className: e, drawerOpen: n = !1, drawerTitle: r = "Terrain and build tools", label: i, onDrawerOpenChange: a, title: o, variant: s = "desktop", "data-testid": c, ...l }) {
|
|
5507
|
+
let u = ["game-ui-terrain-build-toolbox", e].filter(Boolean).join(" "), d = /* @__PURE__ */ t(ki, {
|
|
5502
5508
|
...l,
|
|
5503
5509
|
variant: s
|
|
5504
5510
|
});
|
|
5505
|
-
return s === "mobile" || s === "small-mobile" ? /* @__PURE__ */ t(
|
|
5511
|
+
return s === "mobile" || s === "small-mobile" ? /* @__PURE__ */ t(Di, {
|
|
5506
5512
|
className: u,
|
|
5507
5513
|
label: i,
|
|
5508
5514
|
onOpenChange: a,
|
|
@@ -5527,7 +5533,7 @@ function ki({ className: e, drawerOpen: n = !1, drawerTitle: r = "Terrain and bu
|
|
|
5527
5533
|
}
|
|
5528
5534
|
//#endregion
|
|
5529
5535
|
//#region src/GameContractorTools.tsx
|
|
5530
|
-
var
|
|
5536
|
+
var ji = {
|
|
5531
5537
|
accepted: "success",
|
|
5532
5538
|
blocked: "danger",
|
|
5533
5539
|
cancelled: "neutral",
|
|
@@ -5536,7 +5542,7 @@ var Ai = {
|
|
|
5536
5542
|
queued: "warning",
|
|
5537
5543
|
readyForReview: "success",
|
|
5538
5544
|
working: "ai"
|
|
5539
|
-
},
|
|
5545
|
+
}, Mi = {
|
|
5540
5546
|
accepted: "check",
|
|
5541
5547
|
blocked: "alert",
|
|
5542
5548
|
cancelled: "close",
|
|
@@ -5545,26 +5551,26 @@ var Ai = {
|
|
|
5545
5551
|
queued: "hourglass",
|
|
5546
5552
|
readyForReview: "vote",
|
|
5547
5553
|
working: "energy"
|
|
5548
|
-
},
|
|
5554
|
+
}, Ni = {
|
|
5549
5555
|
active: "ai",
|
|
5550
5556
|
blocked: "danger",
|
|
5551
5557
|
complete: "success",
|
|
5552
5558
|
pending: "neutral"
|
|
5553
|
-
},
|
|
5559
|
+
}, Pi = {
|
|
5554
5560
|
blocked: "danger",
|
|
5555
5561
|
done: "success",
|
|
5556
5562
|
idle: "neutral",
|
|
5557
5563
|
queued: "warning",
|
|
5558
5564
|
working: "ai"
|
|
5559
|
-
},
|
|
5565
|
+
}, Fi = {
|
|
5560
5566
|
"local-only": "Local only",
|
|
5561
5567
|
mock: "Mock run",
|
|
5562
5568
|
"paid-disabled": "Paid provider off"
|
|
5563
|
-
},
|
|
5569
|
+
}, Ii = {
|
|
5564
5570
|
"local-only": "success",
|
|
5565
5571
|
mock: "ai",
|
|
5566
5572
|
"paid-disabled": "warning"
|
|
5567
|
-
},
|
|
5573
|
+
}, Li = {
|
|
5568
5574
|
accepted: [{
|
|
5569
5575
|
id: "revert",
|
|
5570
5576
|
label: "Revert",
|
|
@@ -5670,17 +5676,17 @@ var Ai = {
|
|
|
5670
5676
|
tone: "danger"
|
|
5671
5677
|
}]
|
|
5672
5678
|
};
|
|
5673
|
-
function
|
|
5679
|
+
function Ri(e, t) {
|
|
5674
5680
|
if (t) return t;
|
|
5675
5681
|
switch (e) {
|
|
5676
5682
|
case "readyForReview": return "Ready for review";
|
|
5677
5683
|
default: return e.replace(/([A-Z])/g, " $1").replace(/^./, (e) => e.toUpperCase());
|
|
5678
5684
|
}
|
|
5679
5685
|
}
|
|
5680
|
-
function
|
|
5686
|
+
function zi(e) {
|
|
5681
5687
|
return e === "blocked" || e === "cancelled" ? "danger" : e === "accepted" || e === "readyForReview" ? "success" : e === "queued" || e === "draft" || e === "preview" ? "warning" : "accent";
|
|
5682
5688
|
}
|
|
5683
|
-
function
|
|
5689
|
+
function Bi(e) {
|
|
5684
5690
|
switch (e) {
|
|
5685
5691
|
case "accepted": return 100;
|
|
5686
5692
|
case "blocked": return 42;
|
|
@@ -5692,7 +5698,7 @@ function zi(e) {
|
|
|
5692
5698
|
case "working": return 64;
|
|
5693
5699
|
}
|
|
5694
5700
|
}
|
|
5695
|
-
function
|
|
5701
|
+
function Vi(e, t, n) {
|
|
5696
5702
|
let r = {
|
|
5697
5703
|
disabled: !!(n || e.disabled),
|
|
5698
5704
|
id: e.id,
|
|
@@ -5701,14 +5707,14 @@ function Bi(e, t, n) {
|
|
|
5701
5707
|
};
|
|
5702
5708
|
return e.icon && (r.icon = e.icon), e.ariaLabel && (r.ariaLabel = e.ariaLabel), e.meta && (r.meta = e.meta), t && (r.onAction = t), r;
|
|
5703
5709
|
}
|
|
5704
|
-
function
|
|
5710
|
+
function Hi(e) {
|
|
5705
5711
|
return e === "danger" || e === "warning" ? "alert" : "status";
|
|
5706
5712
|
}
|
|
5707
|
-
function
|
|
5713
|
+
function Ui(e) {
|
|
5708
5714
|
return !!(e.before && e.after);
|
|
5709
5715
|
}
|
|
5710
|
-
function
|
|
5711
|
-
let m = ["game-ui-construction-progress", e].filter(Boolean).join(" "), h = d ??
|
|
5716
|
+
function Wi({ className: e, label: r, max: i = 100, progressLabel: a = "Construction progress", showStatusBadge: o = !0, status: s, statusLabel: c, steps: l = [], validationWarnings: u = [], value: d, variant: f = "desktop", "data-testid": p }) {
|
|
5717
|
+
let m = ["game-ui-construction-progress", e].filter(Boolean).join(" "), h = d ?? Bi(s), g = Ri(s, c);
|
|
5712
5718
|
return /* @__PURE__ */ n("section", {
|
|
5713
5719
|
"aria-label": r,
|
|
5714
5720
|
className: m,
|
|
@@ -5720,18 +5726,18 @@ function Ui({ className: e, label: r, max: i = 100, progressLabel: a = "Construc
|
|
|
5720
5726
|
/* @__PURE__ */ n("header", {
|
|
5721
5727
|
className: "game-ui-construction-progress-header",
|
|
5722
5728
|
children: [/* @__PURE__ */ n("span", { children: [/* @__PURE__ */ t($, {
|
|
5723
|
-
icon:
|
|
5729
|
+
icon: Mi[s],
|
|
5724
5730
|
size: "sm"
|
|
5725
5731
|
}), /* @__PURE__ */ t("strong", { children: a })] }), o ? /* @__PURE__ */ t(Q, {
|
|
5726
|
-
tone:
|
|
5732
|
+
tone: ji[s],
|
|
5727
5733
|
children: g
|
|
5728
5734
|
}) : null]
|
|
5729
5735
|
}),
|
|
5730
|
-
/* @__PURE__ */ t(
|
|
5736
|
+
/* @__PURE__ */ t(Qr, {
|
|
5731
5737
|
label: a,
|
|
5732
5738
|
max: i,
|
|
5733
5739
|
showValue: !0,
|
|
5734
|
-
tone:
|
|
5740
|
+
tone: zi(s),
|
|
5735
5741
|
value: h
|
|
5736
5742
|
}),
|
|
5737
5743
|
l.length > 0 ? /* @__PURE__ */ t("ol", {
|
|
@@ -5746,7 +5752,7 @@ function Ui({ className: e, label: r, max: i = 100, progressLabel: a = "Construc
|
|
|
5746
5752
|
}),
|
|
5747
5753
|
/* @__PURE__ */ n("span", { children: [/* @__PURE__ */ t("strong", { children: e.label }), e.caption ? /* @__PURE__ */ t("small", { children: e.caption }) : null] }),
|
|
5748
5754
|
/* @__PURE__ */ t(Q, {
|
|
5749
|
-
tone:
|
|
5755
|
+
tone: Ni[e.status],
|
|
5750
5756
|
children: e.status
|
|
5751
5757
|
})
|
|
5752
5758
|
]
|
|
@@ -5758,7 +5764,7 @@ function Ui({ className: e, label: r, max: i = 100, progressLabel: a = "Construc
|
|
|
5758
5764
|
children: u.map((e) => /* @__PURE__ */ n("div", {
|
|
5759
5765
|
className: "game-ui-construction-warning",
|
|
5760
5766
|
"data-warning-tone": e.tone ?? "warning",
|
|
5761
|
-
role:
|
|
5767
|
+
role: Hi(e.tone),
|
|
5762
5768
|
children: [/* @__PURE__ */ t($, {
|
|
5763
5769
|
icon: e.tone === "danger" || e.tone === "warning" ? "alert" : "check",
|
|
5764
5770
|
size: "sm"
|
|
@@ -5768,8 +5774,8 @@ function Ui({ className: e, label: r, max: i = 100, progressLabel: a = "Construc
|
|
|
5768
5774
|
]
|
|
5769
5775
|
});
|
|
5770
5776
|
}
|
|
5771
|
-
function
|
|
5772
|
-
let p = ["game-ui-construction-approval-bar", r].filter(Boolean).join(" "), m = e ??
|
|
5777
|
+
function Gi({ actions: e, className: r, disabled: i = !1, label: a, localOnlyLabel: o = "Local-only construction", onAction: s, providerMode: c, status: l, validationWarnings: u = [], variant: d = "desktop", "data-testid": f }) {
|
|
5778
|
+
let p = ["game-ui-construction-approval-bar", r].filter(Boolean).join(" "), m = e ?? Li[l], h = u.filter((e) => e.tone !== "success").length, g = m.map((e) => Vi(e, s, i));
|
|
5773
5779
|
return /* @__PURE__ */ n("section", {
|
|
5774
5780
|
"aria-label": a,
|
|
5775
5781
|
className: p,
|
|
@@ -5780,8 +5786,8 @@ function Wi({ actions: e, className: r, disabled: i = !1, label: a, localOnlyLab
|
|
|
5780
5786
|
children: [/* @__PURE__ */ n("div", {
|
|
5781
5787
|
className: "game-ui-construction-approval-meta",
|
|
5782
5788
|
children: [c ? /* @__PURE__ */ t(Q, {
|
|
5783
|
-
tone:
|
|
5784
|
-
children:
|
|
5789
|
+
tone: Ii[c],
|
|
5790
|
+
children: Fi[c]
|
|
5785
5791
|
}) : /* @__PURE__ */ t(Q, {
|
|
5786
5792
|
tone: "success",
|
|
5787
5793
|
children: o
|
|
@@ -5796,21 +5802,21 @@ function Wi({ actions: e, className: r, disabled: i = !1, label: a, localOnlyLab
|
|
|
5796
5802
|
tone: "success",
|
|
5797
5803
|
children: "Validation clear"
|
|
5798
5804
|
})]
|
|
5799
|
-
}), g.length > 0 ? /* @__PURE__ */ t(
|
|
5805
|
+
}), g.length > 0 ? /* @__PURE__ */ t(ii, {
|
|
5800
5806
|
actions: g,
|
|
5801
5807
|
density: d === "small-mobile" ? "dense" : "comfortable",
|
|
5802
5808
|
label: `${a} actions`
|
|
5803
5809
|
}) : null]
|
|
5804
5810
|
});
|
|
5805
5811
|
}
|
|
5806
|
-
function
|
|
5812
|
+
function Ki({ className: e, crew: r, emptyDescription: i = "Robot crew members appear here when a construction job starts.", emptyTitle: a = "No robot crew assigned", label: o, title: s, variant: c = "desktop", "data-testid": l }) {
|
|
5807
5813
|
return /* @__PURE__ */ n("section", {
|
|
5808
5814
|
"aria-label": o,
|
|
5809
5815
|
className: ["game-ui-robot-crew-status", e].filter(Boolean).join(" "),
|
|
5810
5816
|
"data-ui-hook": "robot-crew-status",
|
|
5811
5817
|
"data-variant": c,
|
|
5812
5818
|
"data-testid": l,
|
|
5813
|
-
children: [s ? /* @__PURE__ */ t("header", { children: /* @__PURE__ */ t("strong", { children: s }) }) : null, r.length === 0 ? /* @__PURE__ */ t(
|
|
5819
|
+
children: [s ? /* @__PURE__ */ t("header", { children: /* @__PURE__ */ t("strong", { children: s }) }) : null, r.length === 0 ? /* @__PURE__ */ t($r, {
|
|
5814
5820
|
description: i,
|
|
5815
5821
|
icon: "ai",
|
|
5816
5822
|
title: a
|
|
@@ -5833,7 +5839,7 @@ function Gi({ className: e, crew: r, emptyDescription: i = "Robot crew members a
|
|
|
5833
5839
|
]
|
|
5834
5840
|
}),
|
|
5835
5841
|
/* @__PURE__ */ t(Q, {
|
|
5836
|
-
tone:
|
|
5842
|
+
tone: Pi[e.status],
|
|
5837
5843
|
children: e.status
|
|
5838
5844
|
})
|
|
5839
5845
|
]
|
|
@@ -5841,7 +5847,7 @@ function Gi({ className: e, crew: r, emptyDescription: i = "Robot crew members a
|
|
|
5841
5847
|
})]
|
|
5842
5848
|
});
|
|
5843
5849
|
}
|
|
5844
|
-
function
|
|
5850
|
+
function qi({ activeView: e, after: r, before: i, className: a, label: o, onViewChange: s, variant: c = "desktop", "data-testid": l }) {
|
|
5845
5851
|
let u = ["game-ui-before-after-toggle", a].filter(Boolean).join(" "), d = e === "before" ? i : r;
|
|
5846
5852
|
return /* @__PURE__ */ n("section", {
|
|
5847
5853
|
"aria-label": o,
|
|
@@ -5850,7 +5856,7 @@ function Ki({ activeView: e, after: r, before: i, className: a, label: o, onView
|
|
|
5850
5856
|
"data-ui-hook": "before-after-toggle",
|
|
5851
5857
|
"data-variant": c,
|
|
5852
5858
|
"data-testid": l,
|
|
5853
|
-
children: [/* @__PURE__ */ t(
|
|
5859
|
+
children: [/* @__PURE__ */ t(or, {
|
|
5854
5860
|
activeId: e,
|
|
5855
5861
|
label: `${o} view`,
|
|
5856
5862
|
...s ? { onSelect: (e) => s(e) } : {},
|
|
@@ -5877,8 +5883,8 @@ function Ki({ activeView: e, after: r, before: i, className: a, label: o, onView
|
|
|
5877
5883
|
})]
|
|
5878
5884
|
});
|
|
5879
5885
|
}
|
|
5880
|
-
function
|
|
5881
|
-
let f = ["game-ui-construction-job-card", e].filter(Boolean).join(" "), p =
|
|
5886
|
+
function Ji({ className: e, density: r = "comfortable", job: i, onAction: a, onSelect: o, selected: s = !1, showApprovalBar: c = !0, showBeforeAfter: l = !1, variant: u = "desktop", "data-testid": d }) {
|
|
5887
|
+
let f = ["game-ui-construction-job-card", e].filter(Boolean).join(" "), p = Ri(i.status, i.statusLabel), m = u === "mobile" || u === "small-mobile", h = i.facts ?? [];
|
|
5882
5888
|
return /* @__PURE__ */ n("article", {
|
|
5883
5889
|
className: f,
|
|
5884
5890
|
"data-density": r,
|
|
@@ -5898,19 +5904,19 @@ function qi({ className: e, density: r = "comfortable", job: i, onAction: a, onS
|
|
|
5898
5904
|
onClick: () => o?.(i.id),
|
|
5899
5905
|
type: "button",
|
|
5900
5906
|
children: [/* @__PURE__ */ t($, {
|
|
5901
|
-
icon:
|
|
5907
|
+
icon: Mi[i.status],
|
|
5902
5908
|
size: m ? "sm" : "md"
|
|
5903
5909
|
}), /* @__PURE__ */ n("span", { children: [/* @__PURE__ */ t("strong", { children: i.title }), i.description ? /* @__PURE__ */ t("small", { children: i.description }) : null] })]
|
|
5904
5910
|
}), /* @__PURE__ */ n("span", {
|
|
5905
5911
|
className: "game-ui-construction-job-badges",
|
|
5906
5912
|
children: [
|
|
5907
5913
|
/* @__PURE__ */ t(Q, {
|
|
5908
|
-
tone:
|
|
5914
|
+
tone: ji[i.status],
|
|
5909
5915
|
children: p
|
|
5910
5916
|
}),
|
|
5911
5917
|
i.providerMode ? /* @__PURE__ */ t(Q, {
|
|
5912
|
-
tone:
|
|
5913
|
-
children:
|
|
5918
|
+
tone: Ii[i.providerMode],
|
|
5919
|
+
children: Fi[i.providerMode]
|
|
5914
5920
|
}) : null,
|
|
5915
5921
|
i.badges?.map((e) => /* @__PURE__ */ t(Q, {
|
|
5916
5922
|
tone: e.tone ?? "neutral",
|
|
@@ -5928,7 +5934,7 @@ function qi({ className: e, density: r = "comfortable", job: i, onAction: a, onS
|
|
|
5928
5934
|
h.map((e) => /* @__PURE__ */ n("span", { children: [/* @__PURE__ */ t("small", { children: e.label }), /* @__PURE__ */ t("b", { children: e.value })] }, e.id))
|
|
5929
5935
|
]
|
|
5930
5936
|
}),
|
|
5931
|
-
/* @__PURE__ */ t(
|
|
5937
|
+
/* @__PURE__ */ t(Wi, {
|
|
5932
5938
|
label: `${i.title} progress`,
|
|
5933
5939
|
progressLabel: i.progressLabel,
|
|
5934
5940
|
status: i.status,
|
|
@@ -5939,19 +5945,19 @@ function qi({ className: e, density: r = "comfortable", job: i, onAction: a, onS
|
|
|
5939
5945
|
max: i.progressMax,
|
|
5940
5946
|
variant: u
|
|
5941
5947
|
}),
|
|
5942
|
-
l &&
|
|
5948
|
+
l && Ui(i) ? /* @__PURE__ */ t(qi, {
|
|
5943
5949
|
activeView: "after",
|
|
5944
5950
|
after: i.after,
|
|
5945
5951
|
before: i.before,
|
|
5946
5952
|
label: `${i.title} preview`,
|
|
5947
5953
|
variant: u
|
|
5948
5954
|
}) : null,
|
|
5949
|
-
i.crew && i.crew.length > 0 ? /* @__PURE__ */ t(
|
|
5955
|
+
i.crew && i.crew.length > 0 ? /* @__PURE__ */ t(Ki, {
|
|
5950
5956
|
crew: i.crew,
|
|
5951
5957
|
label: `${i.title} robot crew`,
|
|
5952
5958
|
variant: u
|
|
5953
5959
|
}) : null,
|
|
5954
|
-
c ? /* @__PURE__ */ t(
|
|
5960
|
+
c ? /* @__PURE__ */ t(Gi, {
|
|
5955
5961
|
actions: i.actions,
|
|
5956
5962
|
label: `${i.title} approval`,
|
|
5957
5963
|
onAction: (e) => a?.(e, i.id),
|
|
@@ -5963,8 +5969,8 @@ function qi({ className: e, density: r = "comfortable", job: i, onAction: a, onS
|
|
|
5963
5969
|
]
|
|
5964
5970
|
});
|
|
5965
5971
|
}
|
|
5966
|
-
function
|
|
5967
|
-
return /* @__PURE__ */ t(
|
|
5972
|
+
function Yi({ children: e, className: n, closeLabel: r = "Close jobs", disabled: i = !1, jobs: a = [], label: o, onAction: s, onOpenChange: c, onSelectJob: l, open: u, panelId: d = "game-compact-job-drawer-panel", selectedJobId: f, title: p, triggerLabel: m = "Construction jobs", variant: h = "mobile", "data-testid": g }) {
|
|
5973
|
+
return /* @__PURE__ */ t(Di, {
|
|
5968
5974
|
className: ["game-ui-compact-job-drawer", n].filter(Boolean).join(" "),
|
|
5969
5975
|
closeLabel: r,
|
|
5970
5976
|
disabled: i,
|
|
@@ -5980,7 +5986,7 @@ function Ji({ children: e, className: n, closeLabel: r = "Close jobs", disabled:
|
|
|
5980
5986
|
children: e ?? /* @__PURE__ */ t("div", {
|
|
5981
5987
|
className: "game-ui-compact-job-drawer-list",
|
|
5982
5988
|
tabIndex: 0,
|
|
5983
|
-
children: a.map((e) => /* @__PURE__ */ t(
|
|
5989
|
+
children: a.map((e) => /* @__PURE__ */ t(Ji, {
|
|
5984
5990
|
density: "dense",
|
|
5985
5991
|
job: e,
|
|
5986
5992
|
onAction: s,
|
|
@@ -5992,7 +5998,7 @@ function Ji({ children: e, className: n, closeLabel: r = "Close jobs", disabled:
|
|
|
5992
5998
|
})
|
|
5993
5999
|
});
|
|
5994
6000
|
}
|
|
5995
|
-
function
|
|
6001
|
+
function Xi({ activePreviewView: e = "after", className: r, density: i = "comfortable", drawerOpen: a = !1, emptyDescription: o = "Draft construction jobs will appear here before any provider call is allowed.", emptyTitle: s = "No construction jobs", jobs: c, label: l, onAction: u, onDrawerOpenChange: d, onPreviewViewChange: f, onSelectJob: p, selectedJobId: m, subtitle: h, title: g, variant: _ = "desktop", "data-testid": v }) {
|
|
5996
6002
|
let y = ["game-ui-contractor-panel", r].filter(Boolean).join(" "), b = c.find((e) => e.id === m) ?? c[0];
|
|
5997
6003
|
return _ === "mobile" || _ === "small-mobile" ? /* @__PURE__ */ n("section", {
|
|
5998
6004
|
"aria-label": l,
|
|
@@ -6001,7 +6007,7 @@ function Yi({ activePreviewView: e = "after", className: r, density: i = "comfor
|
|
|
6001
6007
|
"data-variant": _,
|
|
6002
6008
|
"data-testid": v,
|
|
6003
6009
|
children: [
|
|
6004
|
-
/* @__PURE__ */ t(
|
|
6010
|
+
/* @__PURE__ */ t(Yi, {
|
|
6005
6011
|
jobs: c,
|
|
6006
6012
|
label: `${l} drawer`,
|
|
6007
6013
|
onAction: u,
|
|
@@ -6013,16 +6019,16 @@ function Yi({ activePreviewView: e = "after", className: r, density: i = "comfor
|
|
|
6013
6019
|
triggerLabel: "Contractor",
|
|
6014
6020
|
variant: _
|
|
6015
6021
|
}),
|
|
6016
|
-
b && !a ? /* @__PURE__ */ t(
|
|
6022
|
+
b && !a ? /* @__PURE__ */ t(Ji, {
|
|
6017
6023
|
density: "dense",
|
|
6018
6024
|
job: b,
|
|
6019
6025
|
onAction: u,
|
|
6020
6026
|
onSelect: p,
|
|
6021
6027
|
selected: !0,
|
|
6022
|
-
showBeforeAfter:
|
|
6028
|
+
showBeforeAfter: Ui(b),
|
|
6023
6029
|
variant: _
|
|
6024
6030
|
}) : null,
|
|
6025
|
-
b ? null : /* @__PURE__ */ t(
|
|
6031
|
+
b ? null : /* @__PURE__ */ t($r, {
|
|
6026
6032
|
description: o,
|
|
6027
6033
|
icon: "energy",
|
|
6028
6034
|
title: s
|
|
@@ -6043,7 +6049,7 @@ function Yi({ activePreviewView: e = "after", className: r, density: i = "comfor
|
|
|
6043
6049
|
className: "game-ui-contractor-panel-subtitle",
|
|
6044
6050
|
children: h
|
|
6045
6051
|
}) : null,
|
|
6046
|
-
c.length === 0 ? /* @__PURE__ */ t(
|
|
6052
|
+
c.length === 0 ? /* @__PURE__ */ t($r, {
|
|
6047
6053
|
description: o,
|
|
6048
6054
|
icon: "energy",
|
|
6049
6055
|
title: s
|
|
@@ -6054,7 +6060,7 @@ function Yi({ activePreviewView: e = "after", className: r, density: i = "comfor
|
|
|
6054
6060
|
"aria-label": "Construction job queue",
|
|
6055
6061
|
className: "game-ui-contractor-job-list",
|
|
6056
6062
|
tabIndex: 0,
|
|
6057
|
-
children: c.map((e) => /* @__PURE__ */ t(
|
|
6063
|
+
children: c.map((e) => /* @__PURE__ */ t(Ji, {
|
|
6058
6064
|
density: i,
|
|
6059
6065
|
job: e,
|
|
6060
6066
|
onAction: u,
|
|
@@ -6067,7 +6073,7 @@ function Yi({ activePreviewView: e = "after", className: r, density: i = "comfor
|
|
|
6067
6073
|
className: "game-ui-contractor-detail",
|
|
6068
6074
|
"aria-label": `${b.title} detail`,
|
|
6069
6075
|
children: [
|
|
6070
|
-
/* @__PURE__ */ t(
|
|
6076
|
+
/* @__PURE__ */ t(Wi, {
|
|
6071
6077
|
label: `${b.title} progress detail`,
|
|
6072
6078
|
progressLabel: b.progressLabel,
|
|
6073
6079
|
status: b.status,
|
|
@@ -6078,7 +6084,7 @@ function Yi({ activePreviewView: e = "after", className: r, density: i = "comfor
|
|
|
6078
6084
|
max: b.progressMax,
|
|
6079
6085
|
variant: _
|
|
6080
6086
|
}),
|
|
6081
|
-
|
|
6087
|
+
Ui(b) ? /* @__PURE__ */ t(qi, {
|
|
6082
6088
|
activeView: e,
|
|
6083
6089
|
after: b.after,
|
|
6084
6090
|
before: b.before,
|
|
@@ -6086,13 +6092,13 @@ function Yi({ activePreviewView: e = "after", className: r, density: i = "comfor
|
|
|
6086
6092
|
onViewChange: f,
|
|
6087
6093
|
variant: _
|
|
6088
6094
|
}) : null,
|
|
6089
|
-
/* @__PURE__ */ t(
|
|
6095
|
+
/* @__PURE__ */ t(Ki, {
|
|
6090
6096
|
crew: b.crew ?? [],
|
|
6091
6097
|
label: `${b.title} robot crew`,
|
|
6092
6098
|
title: "Robot crew",
|
|
6093
6099
|
variant: _
|
|
6094
6100
|
}),
|
|
6095
|
-
/* @__PURE__ */ t(
|
|
6101
|
+
/* @__PURE__ */ t(Gi, {
|
|
6096
6102
|
actions: b.actions,
|
|
6097
6103
|
label: `${b.title} approval`,
|
|
6098
6104
|
onAction: u ? (e) => u(e, b.id) : void 0,
|
|
@@ -6110,16 +6116,16 @@ function Yi({ activePreviewView: e = "after", className: r, density: i = "comfor
|
|
|
6110
6116
|
}
|
|
6111
6117
|
//#endregion
|
|
6112
6118
|
//#region src/GamePanelSystem.tsx
|
|
6113
|
-
function
|
|
6119
|
+
function Zi(...e) {
|
|
6114
6120
|
return e.filter(Boolean).join(" ");
|
|
6115
6121
|
}
|
|
6116
|
-
var
|
|
6122
|
+
var Qi = {
|
|
6117
6123
|
collapse: "Collapse",
|
|
6118
6124
|
expand: "Expand"
|
|
6119
6125
|
};
|
|
6120
|
-
function
|
|
6126
|
+
function $i({ actions: e, children: r, className: i, defaultOpen: a = !0, labels: o, onOpenChange: s, open: c, title: l, tone: d = "default", ...f }) {
|
|
6121
6127
|
let p = u(), [h, g] = m(a), _ = c ?? h, v = {
|
|
6122
|
-
...
|
|
6128
|
+
...Qi,
|
|
6123
6129
|
...o
|
|
6124
6130
|
}, y = () => {
|
|
6125
6131
|
let e = !_;
|
|
@@ -6127,7 +6133,7 @@ function Qi({ actions: e, children: r, className: i, defaultOpen: a = !0, labels
|
|
|
6127
6133
|
};
|
|
6128
6134
|
return /* @__PURE__ */ n("section", {
|
|
6129
6135
|
...f,
|
|
6130
|
-
className:
|
|
6136
|
+
className: Zi("game-ui-collapsible", i),
|
|
6131
6137
|
"data-open": _,
|
|
6132
6138
|
"data-panel-tone": d,
|
|
6133
6139
|
children: [/* @__PURE__ */ n("header", {
|
|
@@ -6166,13 +6172,13 @@ function Qi({ actions: e, children: r, className: i, defaultOpen: a = !0, labels
|
|
|
6166
6172
|
})]
|
|
6167
6173
|
});
|
|
6168
6174
|
}
|
|
6169
|
-
var
|
|
6175
|
+
var ea = {
|
|
6170
6176
|
close: "Close",
|
|
6171
6177
|
maximize: "Maximize",
|
|
6172
6178
|
minimize: "Minimize",
|
|
6173
6179
|
restore: "Restore"
|
|
6174
6180
|
};
|
|
6175
|
-
function
|
|
6181
|
+
function ta({ kind: e }) {
|
|
6176
6182
|
return /* @__PURE__ */ t("svg", {
|
|
6177
6183
|
"aria-hidden": "true",
|
|
6178
6184
|
fill: "none",
|
|
@@ -6192,9 +6198,9 @@ function ea({ kind: e }) {
|
|
|
6192
6198
|
})
|
|
6193
6199
|
});
|
|
6194
6200
|
}
|
|
6195
|
-
function
|
|
6201
|
+
function na({ allowMaximize: e = !0, allowMinimize: r = !0, children: i, className: a, defaultState: o = "normal", footer: s, icon: c, labels: l, onClose: u, onStateChange: d, state: f, title: p, ...h }) {
|
|
6196
6202
|
let [g, _] = m(o), v = f ?? g, y = {
|
|
6197
|
-
|
|
6203
|
+
...ea,
|
|
6198
6204
|
...l
|
|
6199
6205
|
}, b = (e) => {
|
|
6200
6206
|
f === void 0 && _(e), d?.(e);
|
|
@@ -6202,7 +6208,7 @@ function ta({ allowMaximize: e = !0, allowMinimize: r = !0, children: i, classNa
|
|
|
6202
6208
|
return /* @__PURE__ */ n("section", {
|
|
6203
6209
|
...h,
|
|
6204
6210
|
"aria-label": p,
|
|
6205
|
-
className:
|
|
6211
|
+
className: Zi("game-ui-window", a),
|
|
6206
6212
|
"data-window-state": v,
|
|
6207
6213
|
role: "group",
|
|
6208
6214
|
children: [/* @__PURE__ */ n("header", {
|
|
@@ -6225,21 +6231,21 @@ function ta({ allowMaximize: e = !0, allowMinimize: r = !0, children: i, classNa
|
|
|
6225
6231
|
className: "game-ui-icon-button game-ui-window-button",
|
|
6226
6232
|
onClick: () => b(x ? "normal" : "minimized"),
|
|
6227
6233
|
type: "button",
|
|
6228
|
-
children: /* @__PURE__ */ t(
|
|
6234
|
+
children: /* @__PURE__ */ t(ta, { kind: x ? "restore" : "minimize" })
|
|
6229
6235
|
}) : null,
|
|
6230
6236
|
e ? /* @__PURE__ */ t("button", {
|
|
6231
6237
|
"aria-label": S ? y.restore : y.maximize,
|
|
6232
6238
|
className: "game-ui-icon-button game-ui-window-button",
|
|
6233
6239
|
onClick: () => b(S ? "normal" : "maximized"),
|
|
6234
6240
|
type: "button",
|
|
6235
|
-
children: /* @__PURE__ */ t(
|
|
6241
|
+
children: /* @__PURE__ */ t(ta, { kind: S ? "restore" : "maximize" })
|
|
6236
6242
|
}) : null,
|
|
6237
6243
|
u ? /* @__PURE__ */ t("button", {
|
|
6238
6244
|
"aria-label": y.close,
|
|
6239
6245
|
className: "game-ui-icon-button game-ui-window-button",
|
|
6240
6246
|
onClick: u,
|
|
6241
6247
|
type: "button",
|
|
6242
|
-
children: /* @__PURE__ */ t(
|
|
6248
|
+
children: /* @__PURE__ */ t(ta, { kind: "close" })
|
|
6243
6249
|
}) : null
|
|
6244
6250
|
]
|
|
6245
6251
|
})
|
|
@@ -6259,14 +6265,14 @@ function ta({ allowMaximize: e = !0, allowMinimize: r = !0, children: i, classNa
|
|
|
6259
6265
|
})]
|
|
6260
6266
|
});
|
|
6261
6267
|
}
|
|
6262
|
-
function
|
|
6268
|
+
function ra({ children: e, className: r, closeLabel: i = "Close", closeOnBackdrop: a = !0, footer: o, onClose: s, open: c, position: d = "center", size: f = "md", title: m }) {
|
|
6263
6269
|
let h = p(null), g = u();
|
|
6264
6270
|
return l(() => {
|
|
6265
6271
|
let e = h.current;
|
|
6266
6272
|
e && (c && !e.open && e.showModal(), !c && e.open && e.close());
|
|
6267
6273
|
}, [c]), /* @__PURE__ */ t("dialog", {
|
|
6268
6274
|
"aria-labelledby": g,
|
|
6269
|
-
className:
|
|
6275
|
+
className: Zi("game-ui-modal", r),
|
|
6270
6276
|
"data-position": d,
|
|
6271
6277
|
"data-size": f,
|
|
6272
6278
|
onCancel: (e) => {
|
|
@@ -6290,7 +6296,7 @@ function na({ children: e, className: r, closeLabel: i = "Close", closeOnBackdro
|
|
|
6290
6296
|
className: "game-ui-icon-button game-ui-window-button",
|
|
6291
6297
|
onClick: s,
|
|
6292
6298
|
type: "button",
|
|
6293
|
-
children: /* @__PURE__ */ t(
|
|
6299
|
+
children: /* @__PURE__ */ t(ta, { kind: "close" })
|
|
6294
6300
|
})]
|
|
6295
6301
|
}),
|
|
6296
6302
|
/* @__PURE__ */ t("div", {
|
|
@@ -6307,7 +6313,7 @@ function na({ children: e, className: r, closeLabel: i = "Close", closeOnBackdro
|
|
|
6307
6313
|
}
|
|
6308
6314
|
//#endregion
|
|
6309
6315
|
//#region src/previewStates.ts
|
|
6310
|
-
var
|
|
6316
|
+
var ia = [
|
|
6311
6317
|
{
|
|
6312
6318
|
id: "history-human-long",
|
|
6313
6319
|
kind: "human",
|
|
@@ -6329,23 +6335,27 @@ var ra = [
|
|
|
6329
6335
|
speaker: "Table",
|
|
6330
6336
|
text: "Three votes are locked. One more read can still change the pact."
|
|
6331
6337
|
}
|
|
6332
|
-
],
|
|
6338
|
+
], aa = {
|
|
6339
|
+
...z,
|
|
6333
6340
|
...B,
|
|
6341
|
+
...ye,
|
|
6334
6342
|
...V,
|
|
6335
|
-
|
|
6336
|
-
|
|
6343
|
+
scrollbarSize: H.size,
|
|
6344
|
+
scrollbarTrack: H.track,
|
|
6345
|
+
scrollbarThumb: H.thumb,
|
|
6346
|
+
scrollbarThumbHover: H.thumbHover,
|
|
6337
6347
|
...U,
|
|
6338
|
-
...
|
|
6339
|
-
...ye,
|
|
6348
|
+
...be,
|
|
6340
6349
|
...xe,
|
|
6341
|
-
...
|
|
6342
|
-
|
|
6350
|
+
...W,
|
|
6351
|
+
...R
|
|
6352
|
+
}, oa = {
|
|
6343
6353
|
toneAttr: "data-game-ui-tone",
|
|
6344
6354
|
toneGlass: "glass",
|
|
6345
6355
|
densityAttr: "data-game-ui-density",
|
|
6346
6356
|
densityCompact: "compact",
|
|
6347
6357
|
scopeClass: "game-ui-overlay-scope"
|
|
6348
|
-
},
|
|
6358
|
+
}, sa = Se, ca = /* @__PURE__ */ "--game-ui-bg.--game-ui-surface.--game-ui-surface-raised.--game-ui-panel.--game-ui-panel-strong.--game-ui-panel-deep.--game-ui-text.--game-ui-text-muted.--game-ui-accent.--game-ui-accent-bright.--game-ui-secondary.--game-ui-success.--game-ui-success-bright.--game-ui-danger.--game-ui-danger-bright.--game-ui-warning.--game-ui-focus-ring.--game-ui-border-subtle.--game-ui-border-strong.--game-ui-disabled.--game-ui-ink-deep.--game-ui-border-ink.--game-ui-wood.--game-ui-ink-title.--game-ui-ink-heading.--game-ui-liquid-metal-face.--game-ui-liquid-metal-ink".split("."), la = {
|
|
6349
6359
|
en: {
|
|
6350
6360
|
triggerLabel: "EN",
|
|
6351
6361
|
langMenuLabel: "Preview language",
|
|
@@ -6369,6 +6379,7 @@ var ra = [
|
|
|
6369
6379
|
typography: "typography",
|
|
6370
6380
|
spacing: "spacing",
|
|
6371
6381
|
radius: "radius",
|
|
6382
|
+
scrollbars: "scrollbars",
|
|
6372
6383
|
elevation: "elevation",
|
|
6373
6384
|
motion: "motion",
|
|
6374
6385
|
overlayGlass: "overlay glass",
|
|
@@ -6547,7 +6558,7 @@ var ra = [
|
|
|
6547
6558
|
hint: "Rotate manually if this browser blocks automatic landscape lock."
|
|
6548
6559
|
},
|
|
6549
6560
|
historyLabel: "Round history",
|
|
6550
|
-
history:
|
|
6561
|
+
history: ia
|
|
6551
6562
|
},
|
|
6552
6563
|
"zh-CN": {
|
|
6553
6564
|
triggerLabel: "中",
|
|
@@ -6572,6 +6583,7 @@ var ra = [
|
|
|
6572
6583
|
typography: "字体",
|
|
6573
6584
|
spacing: "间距",
|
|
6574
6585
|
radius: "圆角",
|
|
6586
|
+
scrollbars: "滚动条",
|
|
6575
6587
|
elevation: "阴影",
|
|
6576
6588
|
motion: "动效",
|
|
6577
6589
|
overlayGlass: "叠加玻璃",
|
|
@@ -6774,25 +6786,29 @@ var ra = [
|
|
|
6774
6786
|
}
|
|
6775
6787
|
]
|
|
6776
6788
|
}
|
|
6777
|
-
},
|
|
6789
|
+
}, ua = i(la.en), da = () => c(ua), fa = [
|
|
6778
6790
|
{
|
|
6779
6791
|
id: "colors",
|
|
6780
|
-
tokens:
|
|
6792
|
+
tokens: I
|
|
6781
6793
|
},
|
|
6782
6794
|
{
|
|
6783
6795
|
id: "semantic",
|
|
6784
|
-
tokens:
|
|
6796
|
+
tokens: z
|
|
6785
6797
|
},
|
|
6786
6798
|
{
|
|
6787
6799
|
id: "typography",
|
|
6788
|
-
tokens:
|
|
6800
|
+
tokens: B
|
|
6789
6801
|
},
|
|
6790
6802
|
{
|
|
6791
6803
|
id: "spacing",
|
|
6792
|
-
tokens:
|
|
6804
|
+
tokens: ye
|
|
6793
6805
|
},
|
|
6794
6806
|
{
|
|
6795
6807
|
id: "radius",
|
|
6808
|
+
tokens: V
|
|
6809
|
+
},
|
|
6810
|
+
{
|
|
6811
|
+
id: "scrollbars",
|
|
6796
6812
|
tokens: H
|
|
6797
6813
|
},
|
|
6798
6814
|
{
|
|
@@ -6801,34 +6817,34 @@ var ra = [
|
|
|
6801
6817
|
},
|
|
6802
6818
|
{
|
|
6803
6819
|
id: "motion",
|
|
6804
|
-
tokens:
|
|
6820
|
+
tokens: be
|
|
6805
6821
|
},
|
|
6806
6822
|
{
|
|
6807
6823
|
id: "overlayGlass",
|
|
6808
|
-
tokens:
|
|
6824
|
+
tokens: ve
|
|
6809
6825
|
},
|
|
6810
6826
|
{
|
|
6811
6827
|
id: "liquidMetal",
|
|
6812
|
-
tokens:
|
|
6828
|
+
tokens: L
|
|
6813
6829
|
},
|
|
6814
6830
|
{
|
|
6815
6831
|
id: "liquidGooey",
|
|
6816
|
-
tokens:
|
|
6832
|
+
tokens: R
|
|
6817
6833
|
},
|
|
6818
6834
|
{
|
|
6819
6835
|
id: "layers",
|
|
6820
|
-
tokens:
|
|
6836
|
+
tokens: xe
|
|
6821
6837
|
},
|
|
6822
6838
|
{
|
|
6823
6839
|
id: "targets",
|
|
6824
|
-
tokens:
|
|
6840
|
+
tokens: Se
|
|
6825
6841
|
},
|
|
6826
6842
|
{
|
|
6827
6843
|
id: "assetSizing",
|
|
6828
|
-
tokens:
|
|
6844
|
+
tokens: W
|
|
6829
6845
|
}
|
|
6830
6846
|
];
|
|
6831
|
-
function
|
|
6847
|
+
function pa({ id: e, label: r, tokens: i }) {
|
|
6832
6848
|
return /* @__PURE__ */ n("article", {
|
|
6833
6849
|
className: "game-ui-token-card",
|
|
6834
6850
|
children: [/* @__PURE__ */ t("h3", { children: r }), /* @__PURE__ */ t("div", {
|
|
@@ -6840,18 +6856,18 @@ function fa({ id: e, label: r, tokens: i }) {
|
|
|
6840
6856
|
})]
|
|
6841
6857
|
});
|
|
6842
6858
|
}
|
|
6843
|
-
function
|
|
6859
|
+
function ma() {
|
|
6844
6860
|
return /* @__PURE__ */ t("div", {
|
|
6845
6861
|
"aria-label": "Clay color swatches",
|
|
6846
6862
|
className: "game-ui-swatch-grid",
|
|
6847
|
-
children: Object.entries(
|
|
6863
|
+
children: Object.entries(I).map(([e, r]) => /* @__PURE__ */ n("figure", {
|
|
6848
6864
|
className: "game-ui-swatch",
|
|
6849
6865
|
children: [/* @__PURE__ */ t("span", { style: { background: r } }), /* @__PURE__ */ n("figcaption", { children: [/* @__PURE__ */ t("strong", { children: e }), /* @__PURE__ */ t("code", { children: r })] })]
|
|
6850
6866
|
}, e))
|
|
6851
6867
|
});
|
|
6852
6868
|
}
|
|
6853
|
-
function
|
|
6854
|
-
let { type: e } =
|
|
6869
|
+
function ha() {
|
|
6870
|
+
let { type: e } = da();
|
|
6855
6871
|
return /* @__PURE__ */ n("div", {
|
|
6856
6872
|
className: "game-ui-type-scale",
|
|
6857
6873
|
children: [
|
|
@@ -6866,8 +6882,8 @@ function ma() {
|
|
|
6866
6882
|
]
|
|
6867
6883
|
});
|
|
6868
6884
|
}
|
|
6869
|
-
function
|
|
6870
|
-
let { buttons: e } =
|
|
6885
|
+
function ga() {
|
|
6886
|
+
let { buttons: e } = da();
|
|
6871
6887
|
return /* @__PURE__ */ n(X, {
|
|
6872
6888
|
title: e.panelTitle,
|
|
6873
6889
|
tone: "strong",
|
|
@@ -6905,9 +6921,9 @@ function ha() {
|
|
|
6905
6921
|
/* @__PURE__ */ n("div", {
|
|
6906
6922
|
className: "game-ui-component-row",
|
|
6907
6923
|
children: [
|
|
6908
|
-
/* @__PURE__ */ t(
|
|
6924
|
+
/* @__PURE__ */ t(rr, {
|
|
6909
6925
|
label: e.settingsTip,
|
|
6910
|
-
children: /* @__PURE__ */ t(
|
|
6926
|
+
children: /* @__PURE__ */ t(nr, {
|
|
6911
6927
|
label: e.settingsTip,
|
|
6912
6928
|
children: /* @__PURE__ */ t($, {
|
|
6913
6929
|
icon: "settings",
|
|
@@ -6915,7 +6931,7 @@ function ha() {
|
|
|
6915
6931
|
})
|
|
6916
6932
|
})
|
|
6917
6933
|
}),
|
|
6918
|
-
/* @__PURE__ */ t(
|
|
6934
|
+
/* @__PURE__ */ t(nr, {
|
|
6919
6935
|
label: e.copyInvite,
|
|
6920
6936
|
children: /* @__PURE__ */ t($, {
|
|
6921
6937
|
icon: "copy",
|
|
@@ -6936,7 +6952,7 @@ function ha() {
|
|
|
6936
6952
|
})
|
|
6937
6953
|
]
|
|
6938
6954
|
}),
|
|
6939
|
-
/* @__PURE__ */ t(
|
|
6955
|
+
/* @__PURE__ */ t(or, {
|
|
6940
6956
|
activeId: "live",
|
|
6941
6957
|
label: e.segmentedLabel,
|
|
6942
6958
|
options: [
|
|
@@ -6954,7 +6970,7 @@ function ha() {
|
|
|
6954
6970
|
}
|
|
6955
6971
|
]
|
|
6956
6972
|
}),
|
|
6957
|
-
/* @__PURE__ */ t(
|
|
6973
|
+
/* @__PURE__ */ t(ir, {
|
|
6958
6974
|
activeId: "portal",
|
|
6959
6975
|
tabs: [
|
|
6960
6976
|
{
|
|
@@ -6971,7 +6987,7 @@ function ha() {
|
|
|
6971
6987
|
}
|
|
6972
6988
|
]
|
|
6973
6989
|
}),
|
|
6974
|
-
/* @__PURE__ */ t(
|
|
6990
|
+
/* @__PURE__ */ t(lr, {
|
|
6975
6991
|
items: [
|
|
6976
6992
|
{
|
|
6977
6993
|
id: "wave",
|
|
@@ -6988,28 +7004,28 @@ function ha() {
|
|
|
6988
7004
|
],
|
|
6989
7005
|
label: e.radialLabel
|
|
6990
7006
|
}),
|
|
6991
|
-
/* @__PURE__ */ t(
|
|
7007
|
+
/* @__PURE__ */ t(sr, {
|
|
6992
7008
|
label: e.sliderLabel,
|
|
6993
7009
|
max: 100,
|
|
6994
7010
|
min: 0,
|
|
6995
7011
|
value: 68
|
|
6996
7012
|
}),
|
|
6997
|
-
/* @__PURE__ */ t(
|
|
7013
|
+
/* @__PURE__ */ t(cr, {
|
|
6998
7014
|
checked: !0,
|
|
6999
7015
|
label: e.toggleLabel
|
|
7000
7016
|
})
|
|
7001
7017
|
]
|
|
7002
7018
|
});
|
|
7003
7019
|
}
|
|
7004
|
-
function
|
|
7005
|
-
let { hud: e, tiles: r } =
|
|
7020
|
+
function _a() {
|
|
7021
|
+
let { hud: e, tiles: r } = da();
|
|
7006
7022
|
return /* @__PURE__ */ n("div", {
|
|
7007
7023
|
className: "game-ui-stage-demo",
|
|
7008
7024
|
children: [/* @__PURE__ */ n("div", {
|
|
7009
7025
|
"aria-label": "Clay world HUD preview",
|
|
7010
7026
|
className: "game-ui-stage-world",
|
|
7011
7027
|
children: [
|
|
7012
|
-
/* @__PURE__ */ t(
|
|
7028
|
+
/* @__PURE__ */ t(Fr, {
|
|
7013
7029
|
label: e.label,
|
|
7014
7030
|
items: [
|
|
7015
7031
|
{
|
|
@@ -7032,15 +7048,15 @@ function ga() {
|
|
|
7032
7048
|
value: "02:46"
|
|
7033
7049
|
}
|
|
7034
7050
|
],
|
|
7035
|
-
actions: /* @__PURE__ */ n(
|
|
7051
|
+
actions: /* @__PURE__ */ n(tr, {
|
|
7036
7052
|
label: e.tools,
|
|
7037
|
-
children: [/* @__PURE__ */ t(
|
|
7053
|
+
children: [/* @__PURE__ */ t(nr, {
|
|
7038
7054
|
label: e.history,
|
|
7039
7055
|
children: /* @__PURE__ */ t($, {
|
|
7040
7056
|
icon: "scroll",
|
|
7041
7057
|
size: "sm"
|
|
7042
7058
|
})
|
|
7043
|
-
}), /* @__PURE__ */ t(
|
|
7059
|
+
}), /* @__PURE__ */ t(nr, {
|
|
7044
7060
|
label: e.settings,
|
|
7045
7061
|
children: /* @__PURE__ */ t($, {
|
|
7046
7062
|
icon: "settings",
|
|
@@ -7080,7 +7096,7 @@ function ga() {
|
|
|
7080
7096
|
}), /* @__PURE__ */ n("div", {
|
|
7081
7097
|
className: "game-ui-stage-sidecar",
|
|
7082
7098
|
children: [
|
|
7083
|
-
/* @__PURE__ */ t(
|
|
7099
|
+
/* @__PURE__ */ t(Lr, {
|
|
7084
7100
|
badge: r.daily.badge,
|
|
7085
7101
|
icon: "scroll",
|
|
7086
7102
|
kicker: r.daily.kicker,
|
|
@@ -7089,7 +7105,7 @@ function ga() {
|
|
|
7089
7105
|
title: r.daily.title,
|
|
7090
7106
|
tone: "daily"
|
|
7091
7107
|
}),
|
|
7092
|
-
/* @__PURE__ */ t(
|
|
7108
|
+
/* @__PURE__ */ t(Lr, {
|
|
7093
7109
|
badge: r.portal.badge,
|
|
7094
7110
|
icon: "portal",
|
|
7095
7111
|
kicker: r.portal.kicker,
|
|
@@ -7097,7 +7113,7 @@ function ga() {
|
|
|
7097
7113
|
title: r.portal.title,
|
|
7098
7114
|
tone: "portal"
|
|
7099
7115
|
}),
|
|
7100
|
-
/* @__PURE__ */ t(
|
|
7116
|
+
/* @__PURE__ */ t(Lr, {
|
|
7101
7117
|
icon: "energy",
|
|
7102
7118
|
kicker: r.host.kicker,
|
|
7103
7119
|
summary: r.host.summary,
|
|
@@ -7108,21 +7124,21 @@ function ga() {
|
|
|
7108
7124
|
})]
|
|
7109
7125
|
});
|
|
7110
7126
|
}
|
|
7111
|
-
function
|
|
7112
|
-
let { hud: e, buttons: r } =
|
|
7127
|
+
function va() {
|
|
7128
|
+
let { hud: e, buttons: r } = da(), i = (i) => {
|
|
7113
7129
|
let a = i === "glass";
|
|
7114
7130
|
return /* @__PURE__ */ n("div", {
|
|
7115
7131
|
"aria-label": a ? "Overlay glass HUD" : "Default clay HUD",
|
|
7116
7132
|
className: [
|
|
7117
7133
|
"game-ui-stage-world",
|
|
7118
7134
|
"game-ui-overlay-glass-proof",
|
|
7119
|
-
a ?
|
|
7135
|
+
a ? oa.scopeClass : void 0
|
|
7120
7136
|
].filter(Boolean).join(" "),
|
|
7121
7137
|
...a ? {
|
|
7122
|
-
[
|
|
7123
|
-
[
|
|
7138
|
+
[oa.toneAttr]: oa.toneGlass,
|
|
7139
|
+
[oa.densityAttr]: oa.densityCompact
|
|
7124
7140
|
} : {},
|
|
7125
|
-
children: [/* @__PURE__ */ t(
|
|
7141
|
+
children: [/* @__PURE__ */ t(Fr, {
|
|
7126
7142
|
label: e.label,
|
|
7127
7143
|
items: [
|
|
7128
7144
|
{
|
|
@@ -7145,15 +7161,15 @@ function _a() {
|
|
|
7145
7161
|
value: "02:46"
|
|
7146
7162
|
}
|
|
7147
7163
|
],
|
|
7148
|
-
actions: /* @__PURE__ */ n(
|
|
7164
|
+
actions: /* @__PURE__ */ n(tr, {
|
|
7149
7165
|
label: e.tools,
|
|
7150
|
-
children: [/* @__PURE__ */ t(
|
|
7166
|
+
children: [/* @__PURE__ */ t(nr, {
|
|
7151
7167
|
label: e.history,
|
|
7152
7168
|
children: /* @__PURE__ */ t($, {
|
|
7153
7169
|
icon: "scroll",
|
|
7154
7170
|
size: "sm"
|
|
7155
7171
|
})
|
|
7156
|
-
}), /* @__PURE__ */ t(
|
|
7172
|
+
}), /* @__PURE__ */ t(nr, {
|
|
7157
7173
|
label: e.settings,
|
|
7158
7174
|
children: /* @__PURE__ */ t($, {
|
|
7159
7175
|
icon: "settings",
|
|
@@ -7174,7 +7190,7 @@ function _a() {
|
|
|
7174
7190
|
tone: "success",
|
|
7175
7191
|
children: r.readyBadge
|
|
7176
7192
|
}),
|
|
7177
|
-
/* @__PURE__ */ t(
|
|
7193
|
+
/* @__PURE__ */ t(Qr, {
|
|
7178
7194
|
label: e.reveal,
|
|
7179
7195
|
value: 68
|
|
7180
7196
|
})
|
|
@@ -7212,22 +7228,22 @@ function _a() {
|
|
|
7212
7228
|
children: [/* @__PURE__ */ n("header", { children: [/* @__PURE__ */ t("strong", { children: "Overlay glass + compact" }), /* @__PURE__ */ n("span", {
|
|
7213
7229
|
className: "game-ui-small-copy",
|
|
7214
7230
|
children: [
|
|
7215
|
-
|
|
7231
|
+
oa.toneAttr,
|
|
7216
7232
|
"=\"",
|
|
7217
|
-
|
|
7233
|
+
oa.toneGlass,
|
|
7218
7234
|
"\" ·",
|
|
7219
7235
|
" ",
|
|
7220
|
-
|
|
7236
|
+
oa.densityAttr,
|
|
7221
7237
|
"=\"",
|
|
7222
|
-
|
|
7238
|
+
oa.densityCompact,
|
|
7223
7239
|
"\""
|
|
7224
7240
|
]
|
|
7225
7241
|
})] }), i("glass")]
|
|
7226
7242
|
})]
|
|
7227
7243
|
});
|
|
7228
7244
|
}
|
|
7229
|
-
function
|
|
7230
|
-
let { liquidMetal: e } =
|
|
7245
|
+
function ya() {
|
|
7246
|
+
let { liquidMetal: e } = da();
|
|
7231
7247
|
return /* @__PURE__ */ n("div", {
|
|
7232
7248
|
className: "game-ui-liquid-metal-compare",
|
|
7233
7249
|
children: [/* @__PURE__ */ t(X, {
|
|
@@ -7235,7 +7251,7 @@ function va() {
|
|
|
7235
7251
|
tone: "strong",
|
|
7236
7252
|
children: /* @__PURE__ */ t("div", {
|
|
7237
7253
|
className: "game-ui-liquid-metal-stage",
|
|
7238
|
-
children: /* @__PURE__ */ t(
|
|
7254
|
+
children: /* @__PURE__ */ t(F, {
|
|
7239
7255
|
renderer: "css",
|
|
7240
7256
|
children: e.cta
|
|
7241
7257
|
})
|
|
@@ -7245,7 +7261,7 @@ function va() {
|
|
|
7245
7261
|
tone: "strong",
|
|
7246
7262
|
children: /* @__PURE__ */ t("div", {
|
|
7247
7263
|
className: "game-ui-liquid-metal-stage",
|
|
7248
|
-
children: /* @__PURE__ */ t(
|
|
7264
|
+
children: /* @__PURE__ */ t(F, {
|
|
7249
7265
|
renderer: "webgl",
|
|
7250
7266
|
children: e.cta
|
|
7251
7267
|
})
|
|
@@ -7253,13 +7269,13 @@ function va() {
|
|
|
7253
7269
|
})]
|
|
7254
7270
|
});
|
|
7255
7271
|
}
|
|
7256
|
-
function
|
|
7257
|
-
let { modals: e } =
|
|
7272
|
+
function ba() {
|
|
7273
|
+
let { modals: e } = da();
|
|
7258
7274
|
return /* @__PURE__ */ n("div", {
|
|
7259
7275
|
className: "game-ui-preview-two-up",
|
|
7260
|
-
children: [/* @__PURE__ */ n(
|
|
7276
|
+
children: [/* @__PURE__ */ n($n, {
|
|
7261
7277
|
title: e.dialogTitle,
|
|
7262
|
-
children: [/* @__PURE__ */ t("p", { children: e.dialogBody }), /* @__PURE__ */ n(
|
|
7278
|
+
children: [/* @__PURE__ */ t("p", { children: e.dialogBody }), /* @__PURE__ */ n(tr, {
|
|
7263
7279
|
label: e.actionsLabel,
|
|
7264
7280
|
children: [/* @__PURE__ */ t(w, {
|
|
7265
7281
|
variant: "primary",
|
|
@@ -7273,16 +7289,16 @@ function ya() {
|
|
|
7273
7289
|
title: e.panelTitle,
|
|
7274
7290
|
tone: "strong",
|
|
7275
7291
|
children: [
|
|
7276
|
-
/* @__PURE__ */ t(
|
|
7292
|
+
/* @__PURE__ */ t(ur, {
|
|
7277
7293
|
tone: "success",
|
|
7278
7294
|
children: e.toastOk
|
|
7279
7295
|
}),
|
|
7280
|
-
/* @__PURE__ */ t(
|
|
7296
|
+
/* @__PURE__ */ t(ur, {
|
|
7281
7297
|
tone: "danger",
|
|
7282
7298
|
children: e.toastErr
|
|
7283
7299
|
}),
|
|
7284
|
-
/* @__PURE__ */ t(
|
|
7285
|
-
/* @__PURE__ */ t(
|
|
7300
|
+
/* @__PURE__ */ t(Vr, { label: e.loading }),
|
|
7301
|
+
/* @__PURE__ */ t(Vr, {
|
|
7286
7302
|
label: e.loadingErr,
|
|
7287
7303
|
tone: "error"
|
|
7288
7304
|
})
|
|
@@ -7290,14 +7306,14 @@ function ya() {
|
|
|
7290
7306
|
})]
|
|
7291
7307
|
});
|
|
7292
7308
|
}
|
|
7293
|
-
function
|
|
7294
|
-
let { cards: e } =
|
|
7309
|
+
function xa() {
|
|
7310
|
+
let { cards: e } = da();
|
|
7295
7311
|
return /* @__PURE__ */ n("div", {
|
|
7296
7312
|
className: "game-ui-preview-two-up",
|
|
7297
7313
|
children: [/* @__PURE__ */ t(X, {
|
|
7298
7314
|
title: e.fanTitle,
|
|
7299
7315
|
tone: "strong",
|
|
7300
|
-
children: /* @__PURE__ */ t(
|
|
7316
|
+
children: /* @__PURE__ */ t(Ir, {
|
|
7301
7317
|
label: e.fanLabel,
|
|
7302
7318
|
cards: [
|
|
7303
7319
|
{
|
|
@@ -7329,16 +7345,16 @@ function ba() {
|
|
|
7329
7345
|
}), /* @__PURE__ */ n("div", {
|
|
7330
7346
|
className: "game-ui-asset-path-grid",
|
|
7331
7347
|
children: [
|
|
7332
|
-
/* @__PURE__ */ t("code", { children:
|
|
7333
|
-
/* @__PURE__ */ t("code", { children:
|
|
7334
|
-
/* @__PURE__ */ t("code", { children:
|
|
7335
|
-
/* @__PURE__ */ t("code", { children:
|
|
7348
|
+
/* @__PURE__ */ t("code", { children: xr.catalog.manifest }),
|
|
7349
|
+
/* @__PURE__ */ t("code", { children: xr.catalog.sourceCatalog }),
|
|
7350
|
+
/* @__PURE__ */ t("code", { children: xr.buttons.primary }),
|
|
7351
|
+
/* @__PURE__ */ t("code", { children: xr.icons.trophy })
|
|
7336
7352
|
]
|
|
7337
7353
|
})]
|
|
7338
7354
|
})]
|
|
7339
7355
|
});
|
|
7340
7356
|
}
|
|
7341
|
-
var
|
|
7357
|
+
var Sa = [
|
|
7342
7358
|
{
|
|
7343
7359
|
id: "terrain",
|
|
7344
7360
|
label: "Terrain",
|
|
@@ -7354,7 +7370,7 @@ var xa = [
|
|
|
7354
7370
|
label: "Place",
|
|
7355
7371
|
icon: "gem"
|
|
7356
7372
|
}
|
|
7357
|
-
],
|
|
7373
|
+
], Ca = [
|
|
7358
7374
|
{
|
|
7359
7375
|
id: "raise",
|
|
7360
7376
|
label: "Raise",
|
|
@@ -7380,7 +7396,7 @@ var xa = [
|
|
|
7380
7396
|
label: "Paint",
|
|
7381
7397
|
shortcut: "5"
|
|
7382
7398
|
}
|
|
7383
|
-
],
|
|
7399
|
+
], wa = [
|
|
7384
7400
|
{
|
|
7385
7401
|
id: "grass",
|
|
7386
7402
|
label: "Grass",
|
|
@@ -7396,7 +7412,7 @@ var xa = [
|
|
|
7396
7412
|
label: "Path",
|
|
7397
7413
|
color: "#b98d5d"
|
|
7398
7414
|
}
|
|
7399
|
-
],
|
|
7415
|
+
], Ta = [{
|
|
7400
7416
|
id: "foundation",
|
|
7401
7417
|
label: "Foundation",
|
|
7402
7418
|
icon: "home",
|
|
@@ -7415,10 +7431,10 @@ var xa = [
|
|
|
7415
7431
|
status: "ready"
|
|
7416
7432
|
}]
|
|
7417
7433
|
}];
|
|
7418
|
-
function
|
|
7434
|
+
function Ea() {
|
|
7419
7435
|
return /* @__PURE__ */ n("div", {
|
|
7420
7436
|
className: "game-ui-preview-two-up",
|
|
7421
|
-
children: [/* @__PURE__ */ t(
|
|
7437
|
+
children: [/* @__PURE__ */ t(Ai, {
|
|
7422
7438
|
activeBuildCategoryId: "foundation",
|
|
7423
7439
|
activeMaterialId: "grass",
|
|
7424
7440
|
activeModeId: "terrain",
|
|
@@ -7427,10 +7443,10 @@ function Ta() {
|
|
|
7427
7443
|
radius: 2.75,
|
|
7428
7444
|
strength: .45
|
|
7429
7445
|
},
|
|
7430
|
-
buildCategories:
|
|
7446
|
+
buildCategories: Ta,
|
|
7431
7447
|
label: "Desktop terrain and build tools",
|
|
7432
|
-
materials:
|
|
7433
|
-
modes:
|
|
7448
|
+
materials: wa,
|
|
7449
|
+
modes: Sa,
|
|
7434
7450
|
selectedBuildItemId: "floor-2x2",
|
|
7435
7451
|
status: {
|
|
7436
7452
|
label: "Ready",
|
|
@@ -7441,12 +7457,12 @@ function Ta() {
|
|
|
7441
7457
|
progressValue: 68
|
|
7442
7458
|
},
|
|
7443
7459
|
title: "Island tools",
|
|
7444
|
-
tools:
|
|
7460
|
+
tools: Ca,
|
|
7445
7461
|
undoRedo: {
|
|
7446
7462
|
canRedo: !1,
|
|
7447
7463
|
canUndo: !0
|
|
7448
7464
|
}
|
|
7449
|
-
}), /* @__PURE__ */ t(
|
|
7465
|
+
}), /* @__PURE__ */ t(Ai, {
|
|
7450
7466
|
activeBuildCategoryId: "foundation",
|
|
7451
7467
|
activeMaterialId: "path",
|
|
7452
7468
|
activeModeId: "terrain",
|
|
@@ -7455,11 +7471,11 @@ function Ta() {
|
|
|
7455
7471
|
radius: 1.5,
|
|
7456
7472
|
strength: .3
|
|
7457
7473
|
},
|
|
7458
|
-
buildCategories:
|
|
7474
|
+
buildCategories: Ta,
|
|
7459
7475
|
drawerOpen: !0,
|
|
7460
7476
|
label: "Small mobile terrain drawer",
|
|
7461
|
-
materials:
|
|
7462
|
-
modes:
|
|
7477
|
+
materials: wa,
|
|
7478
|
+
modes: Sa,
|
|
7463
7479
|
selectedBuildItemId: "floor-2x2",
|
|
7464
7480
|
status: {
|
|
7465
7481
|
label: "Blocked",
|
|
@@ -7467,7 +7483,7 @@ function Ta() {
|
|
|
7467
7483
|
description: "This edit would bury a placed object."
|
|
7468
7484
|
},
|
|
7469
7485
|
title: "Tools",
|
|
7470
|
-
tools:
|
|
7486
|
+
tools: Ca,
|
|
7471
7487
|
undoRedo: {
|
|
7472
7488
|
canRedo: !0,
|
|
7473
7489
|
canUndo: !0
|
|
@@ -7476,7 +7492,7 @@ function Ta() {
|
|
|
7476
7492
|
})]
|
|
7477
7493
|
});
|
|
7478
7494
|
}
|
|
7479
|
-
function
|
|
7495
|
+
function Da({ label: e, mode: r }) {
|
|
7480
7496
|
return /* @__PURE__ */ n("div", {
|
|
7481
7497
|
className: "game-ui-construction-preview-card",
|
|
7482
7498
|
"data-preview": r,
|
|
@@ -7490,7 +7506,7 @@ function Ea({ label: e, mode: r }) {
|
|
|
7490
7506
|
]
|
|
7491
7507
|
});
|
|
7492
7508
|
}
|
|
7493
|
-
var
|
|
7509
|
+
var Oa = [
|
|
7494
7510
|
{
|
|
7495
7511
|
id: "preview-deck",
|
|
7496
7512
|
title: "Deck robot crew",
|
|
@@ -7551,7 +7567,7 @@ var Da = [
|
|
|
7551
7567
|
before: {
|
|
7552
7568
|
label: "Before",
|
|
7553
7569
|
caption: "Uneven terrain pad.",
|
|
7554
|
-
content: /* @__PURE__ */ t(
|
|
7570
|
+
content: /* @__PURE__ */ t(Da, {
|
|
7555
7571
|
label: "Rough pad",
|
|
7556
7572
|
mode: "before"
|
|
7557
7573
|
})
|
|
@@ -7559,7 +7575,7 @@ var Da = [
|
|
|
7559
7575
|
after: {
|
|
7560
7576
|
label: "After",
|
|
7561
7577
|
caption: "Flattened foundation pad with safe clearance.",
|
|
7562
|
-
content: /* @__PURE__ */ t(
|
|
7578
|
+
content: /* @__PURE__ */ t(Da, {
|
|
7563
7579
|
label: "Foundation ready",
|
|
7564
7580
|
mode: "after"
|
|
7565
7581
|
})
|
|
@@ -7588,19 +7604,19 @@ var Da = [
|
|
|
7588
7604
|
}]
|
|
7589
7605
|
}
|
|
7590
7606
|
];
|
|
7591
|
-
function
|
|
7607
|
+
function ka() {
|
|
7592
7608
|
return /* @__PURE__ */ n("div", {
|
|
7593
7609
|
className: "game-ui-preview-two-up",
|
|
7594
|
-
children: [/* @__PURE__ */ t(
|
|
7595
|
-
jobs:
|
|
7610
|
+
children: [/* @__PURE__ */ t(Xi, {
|
|
7611
|
+
jobs: Oa,
|
|
7596
7612
|
label: "AI contractor jobs",
|
|
7597
7613
|
selectedJobId: "review-house-pad",
|
|
7598
7614
|
subtitle: "Official contractor UI covers drafts, previews, robot work, validation, review, and local-only provider boundaries.",
|
|
7599
7615
|
title: "AI contractor",
|
|
7600
7616
|
variant: "desktop"
|
|
7601
|
-
}), /* @__PURE__ */ t(
|
|
7617
|
+
}), /* @__PURE__ */ t(Xi, {
|
|
7602
7618
|
drawerOpen: !0,
|
|
7603
|
-
jobs:
|
|
7619
|
+
jobs: Oa,
|
|
7604
7620
|
label: "Small mobile contractor jobs",
|
|
7605
7621
|
selectedJobId: "blocked-fence",
|
|
7606
7622
|
title: "Contractor",
|
|
@@ -7608,10 +7624,10 @@ function Oa() {
|
|
|
7608
7624
|
})]
|
|
7609
7625
|
});
|
|
7610
7626
|
}
|
|
7611
|
-
function
|
|
7612
|
-
return /* @__PURE__ */ t(
|
|
7627
|
+
function Aa() {
|
|
7628
|
+
return /* @__PURE__ */ t(ei, {
|
|
7613
7629
|
title: "OwnMySpace island editor preview",
|
|
7614
|
-
hud: /* @__PURE__ */ t(
|
|
7630
|
+
hud: /* @__PURE__ */ t(ni, {
|
|
7615
7631
|
label: "Island facts",
|
|
7616
7632
|
facts: [
|
|
7617
7633
|
{
|
|
@@ -7635,11 +7651,11 @@ function ka() {
|
|
|
7635
7651
|
}
|
|
7636
7652
|
]
|
|
7637
7653
|
}),
|
|
7638
|
-
movementPad: /* @__PURE__ */ t(
|
|
7654
|
+
movementPad: /* @__PURE__ */ t(si, {
|
|
7639
7655
|
helpText: "WASD or arrows",
|
|
7640
7656
|
label: "Move avatar"
|
|
7641
7657
|
}),
|
|
7642
|
-
assetLibrary: /* @__PURE__ */ t(
|
|
7658
|
+
assetLibrary: /* @__PURE__ */ t(fi, {
|
|
7643
7659
|
label: "Placeable assets",
|
|
7644
7660
|
title: "Assets",
|
|
7645
7661
|
subtitle: "Starter, generated, and imported assets stay visibly distinct but share one placement path.",
|
|
@@ -7686,7 +7702,7 @@ function ka() {
|
|
|
7686
7702
|
}
|
|
7687
7703
|
]
|
|
7688
7704
|
}),
|
|
7689
|
-
bottomBar: /* @__PURE__ */ t(
|
|
7705
|
+
bottomBar: /* @__PURE__ */ t(pi, {
|
|
7690
7706
|
title: "Placement",
|
|
7691
7707
|
selectedTitle: "Manual chair",
|
|
7692
7708
|
placedObjects: 3,
|
|
@@ -7722,7 +7738,7 @@ function ka() {
|
|
|
7722
7738
|
})
|
|
7723
7739
|
});
|
|
7724
7740
|
}
|
|
7725
|
-
var
|
|
7741
|
+
var ja = [{
|
|
7726
7742
|
id: "starter",
|
|
7727
7743
|
label: "Starter pieces",
|
|
7728
7744
|
source: "starter",
|
|
@@ -7753,7 +7769,7 @@ var Aa = [{
|
|
|
7753
7769
|
}
|
|
7754
7770
|
]
|
|
7755
7771
|
}];
|
|
7756
|
-
function
|
|
7772
|
+
function Ma() {
|
|
7757
7773
|
return /* @__PURE__ */ t("div", {
|
|
7758
7774
|
className: "game-ui-asset-compression-repro",
|
|
7759
7775
|
"aria-label": "Asset card compression repro",
|
|
@@ -7777,9 +7793,9 @@ function ja() {
|
|
|
7777
7793
|
className: "game-ui-asset-compression-repro-surface",
|
|
7778
7794
|
"data-repro-surface": e.id,
|
|
7779
7795
|
style: { "--repro-width": e.width },
|
|
7780
|
-
children: [/* @__PURE__ */ t(Q, { children: e.label }), /* @__PURE__ */ t(
|
|
7796
|
+
children: [/* @__PURE__ */ t(Q, { children: e.label }), /* @__PURE__ */ t(fi, {
|
|
7781
7797
|
density: "dense",
|
|
7782
|
-
groups:
|
|
7798
|
+
groups: ja,
|
|
7783
7799
|
label: `${e.label} assets`,
|
|
7784
7800
|
selectedAssetId: "asset-repro-chair",
|
|
7785
7801
|
title: "Build"
|
|
@@ -7787,13 +7803,13 @@ function ja() {
|
|
|
7787
7803
|
}, e.id))
|
|
7788
7804
|
});
|
|
7789
7805
|
}
|
|
7790
|
-
function
|
|
7791
|
-
let { firstSession: e } =
|
|
7806
|
+
function Na() {
|
|
7807
|
+
let { firstSession: e } = da();
|
|
7792
7808
|
return /* @__PURE__ */ n("div", {
|
|
7793
7809
|
className: "game-ui-first-session-preview",
|
|
7794
7810
|
children: [/* @__PURE__ */ t("div", {
|
|
7795
7811
|
className: "game-ui-first-session-world",
|
|
7796
|
-
children: /* @__PURE__ */ t(
|
|
7812
|
+
children: /* @__PURE__ */ t(Wr, {
|
|
7797
7813
|
authenticated: !0,
|
|
7798
7814
|
batteryCount: 5,
|
|
7799
7815
|
dailyStreak: 3,
|
|
@@ -7827,7 +7843,7 @@ function Ma() {
|
|
|
7827
7843
|
})
|
|
7828
7844
|
}), /* @__PURE__ */ t("div", {
|
|
7829
7845
|
className: "game-ui-first-session-modal-slot",
|
|
7830
|
-
children: /* @__PURE__ */ t(
|
|
7846
|
+
children: /* @__PURE__ */ t(Gr, {
|
|
7831
7847
|
open: !0,
|
|
7832
7848
|
onDismiss: () => void 0,
|
|
7833
7849
|
labels: {
|
|
@@ -7855,46 +7871,46 @@ function Ma() {
|
|
|
7855
7871
|
})]
|
|
7856
7872
|
});
|
|
7857
7873
|
}
|
|
7858
|
-
function
|
|
7859
|
-
let { responsive: e } =
|
|
7874
|
+
function Pa() {
|
|
7875
|
+
let { responsive: e } = da();
|
|
7860
7876
|
return /* @__PURE__ */ n("div", {
|
|
7861
7877
|
className: "game-ui-proof-frames",
|
|
7862
7878
|
children: [/* @__PURE__ */ n("article", {
|
|
7863
7879
|
className: "game-ui-proof-frame is-desktop",
|
|
7864
|
-
children: [/* @__PURE__ */ n("header", { children: [/* @__PURE__ */ t(Q, { children: e.desktop }), /* @__PURE__ */ t("strong", { children: "1440×900" })] }), /* @__PURE__ */ t(
|
|
7880
|
+
children: [/* @__PURE__ */ n("header", { children: [/* @__PURE__ */ t(Q, { children: e.desktop }), /* @__PURE__ */ t("strong", { children: "1440×900" })] }), /* @__PURE__ */ t(_a, {})]
|
|
7865
7881
|
}), /* @__PURE__ */ n("article", {
|
|
7866
7882
|
className: "game-ui-proof-frame is-mobile-landscape",
|
|
7867
|
-
children: [/* @__PURE__ */ n("header", { children: [/* @__PURE__ */ t(Q, { children: e.mobileLandscape }), /* @__PURE__ */ t("strong", { children: "844×390" })] }), /* @__PURE__ */ t(
|
|
7883
|
+
children: [/* @__PURE__ */ n("header", { children: [/* @__PURE__ */ t(Q, { children: e.mobileLandscape }), /* @__PURE__ */ t("strong", { children: "844×390" })] }), /* @__PURE__ */ t(_a, {})]
|
|
7868
7884
|
})]
|
|
7869
7885
|
});
|
|
7870
7886
|
}
|
|
7871
|
-
function
|
|
7872
|
-
let { forms: e } =
|
|
7887
|
+
function Fa() {
|
|
7888
|
+
let { forms: e } = da();
|
|
7873
7889
|
return /* @__PURE__ */ n("div", {
|
|
7874
7890
|
className: "game-ui-preview-two-up",
|
|
7875
7891
|
children: [/* @__PURE__ */ n(X, {
|
|
7876
7892
|
title: e.formsTitle,
|
|
7877
7893
|
tone: "strong",
|
|
7878
7894
|
children: [
|
|
7879
|
-
/* @__PURE__ */ t(
|
|
7895
|
+
/* @__PURE__ */ t(Jr, {
|
|
7880
7896
|
hint: e.roomCodeHint,
|
|
7881
7897
|
label: e.roomCodeLabel,
|
|
7882
|
-
children: /* @__PURE__ */ t(
|
|
7898
|
+
children: /* @__PURE__ */ t(Kr, { placeholder: e.roomCodePlaceholder })
|
|
7883
7899
|
}),
|
|
7884
|
-
/* @__PURE__ */ t(
|
|
7900
|
+
/* @__PURE__ */ t(Jr, {
|
|
7885
7901
|
label: e.nameLabel,
|
|
7886
7902
|
required: !0,
|
|
7887
|
-
children: /* @__PURE__ */ t(
|
|
7903
|
+
children: /* @__PURE__ */ t(Kr, { placeholder: e.namePlaceholder })
|
|
7888
7904
|
}),
|
|
7889
|
-
/* @__PURE__ */ t(
|
|
7905
|
+
/* @__PURE__ */ t(Jr, {
|
|
7890
7906
|
error: e.readError,
|
|
7891
7907
|
label: e.readLabel,
|
|
7892
|
-
children: /* @__PURE__ */ t(
|
|
7908
|
+
children: /* @__PURE__ */ t(qr, {
|
|
7893
7909
|
invalid: !0,
|
|
7894
7910
|
placeholder: e.readPlaceholder
|
|
7895
7911
|
})
|
|
7896
7912
|
}),
|
|
7897
|
-
/* @__PURE__ */ t(
|
|
7913
|
+
/* @__PURE__ */ t(Yr, {
|
|
7898
7914
|
defaultChecked: !0,
|
|
7899
7915
|
label: e.rememberLabel
|
|
7900
7916
|
})
|
|
@@ -7906,38 +7922,38 @@ function Pa() {
|
|
|
7906
7922
|
/* @__PURE__ */ n("div", {
|
|
7907
7923
|
className: "game-ui-component-row",
|
|
7908
7924
|
children: [
|
|
7909
|
-
/* @__PURE__ */ t(
|
|
7925
|
+
/* @__PURE__ */ t(Zr, {
|
|
7910
7926
|
name: "Mika Ono",
|
|
7911
7927
|
status: "online"
|
|
7912
7928
|
}),
|
|
7913
|
-
/* @__PURE__ */ t(
|
|
7929
|
+
/* @__PURE__ */ t(Zr, {
|
|
7914
7930
|
name: "River",
|
|
7915
7931
|
size: "lg",
|
|
7916
7932
|
status: "busy"
|
|
7917
7933
|
}),
|
|
7918
|
-
/* @__PURE__ */ t(
|
|
7934
|
+
/* @__PURE__ */ t(Zr, {
|
|
7919
7935
|
name: "Noa",
|
|
7920
7936
|
status: "away"
|
|
7921
7937
|
}),
|
|
7922
|
-
/* @__PURE__ */ t(
|
|
7938
|
+
/* @__PURE__ */ t(Zr, {
|
|
7923
7939
|
name: e.guestName,
|
|
7924
7940
|
size: "sm"
|
|
7925
7941
|
})
|
|
7926
7942
|
]
|
|
7927
7943
|
}),
|
|
7928
|
-
/* @__PURE__ */ t(
|
|
7944
|
+
/* @__PURE__ */ t(Qr, {
|
|
7929
7945
|
label: e.revealLabel,
|
|
7930
7946
|
showValue: !0,
|
|
7931
7947
|
value: 64
|
|
7932
7948
|
}),
|
|
7933
|
-
/* @__PURE__ */ t(
|
|
7949
|
+
/* @__PURE__ */ t(Qr, {
|
|
7934
7950
|
label: e.batteryLabel,
|
|
7935
7951
|
max: 20,
|
|
7936
7952
|
showValue: !0,
|
|
7937
7953
|
tone: "success",
|
|
7938
7954
|
value: 14
|
|
7939
7955
|
}),
|
|
7940
|
-
/* @__PURE__ */ t(
|
|
7956
|
+
/* @__PURE__ */ t($r, {
|
|
7941
7957
|
action: /* @__PURE__ */ t(w, {
|
|
7942
7958
|
variant: "primary",
|
|
7943
7959
|
children: e.emptyCta
|
|
@@ -7950,8 +7966,8 @@ function Pa() {
|
|
|
7950
7966
|
})]
|
|
7951
7967
|
});
|
|
7952
7968
|
}
|
|
7953
|
-
var
|
|
7954
|
-
function
|
|
7969
|
+
var Ia = mr.filter((e) => vr(e).includes("game")), La = mr.filter((e) => vr(e).includes("line"));
|
|
7970
|
+
function Ra({ names: e, style: r }) {
|
|
7955
7971
|
return /* @__PURE__ */ t("div", {
|
|
7956
7972
|
className: "game-ui-icon-grid",
|
|
7957
7973
|
children: e.map((e) => /* @__PURE__ */ n("figure", {
|
|
@@ -7964,10 +7980,10 @@ function La({ names: e, style: r }) {
|
|
|
7964
7980
|
}, `${r}-${e}`))
|
|
7965
7981
|
});
|
|
7966
7982
|
}
|
|
7967
|
-
function
|
|
7983
|
+
function za() {
|
|
7968
7984
|
return /* @__PURE__ */ t("div", {
|
|
7969
7985
|
className: "game-ui-icon-grid",
|
|
7970
|
-
children:
|
|
7986
|
+
children: br.map((e) => /* @__PURE__ */ n("figure", {
|
|
7971
7987
|
className: "game-ui-icon-cell",
|
|
7972
7988
|
children: [/* @__PURE__ */ t("span", {
|
|
7973
7989
|
className: "game-ui-asset-icon",
|
|
@@ -7976,14 +7992,14 @@ function Ra() {
|
|
|
7976
7992
|
"aria-hidden": !0,
|
|
7977
7993
|
children: /* @__PURE__ */ t("img", {
|
|
7978
7994
|
alt: "",
|
|
7979
|
-
src:
|
|
7995
|
+
src: yr[e]
|
|
7980
7996
|
})
|
|
7981
7997
|
}), /* @__PURE__ */ t("figcaption", { children: e })]
|
|
7982
7998
|
}, `sprite-${e}`))
|
|
7983
7999
|
});
|
|
7984
8000
|
}
|
|
7985
|
-
function
|
|
7986
|
-
let { gallery: e } =
|
|
8001
|
+
function Ba() {
|
|
8002
|
+
let { gallery: e } = da();
|
|
7987
8003
|
return /* @__PURE__ */ n("div", {
|
|
7988
8004
|
className: "game-ui-icon-gallery",
|
|
7989
8005
|
children: [
|
|
@@ -7998,8 +8014,8 @@ function za() {
|
|
|
7998
8014
|
className: "game-ui-small-copy",
|
|
7999
8015
|
children: e.gameHint
|
|
8000
8016
|
})]
|
|
8001
|
-
}), /* @__PURE__ */ t(
|
|
8002
|
-
names:
|
|
8017
|
+
}), /* @__PURE__ */ t(Ra, {
|
|
8018
|
+
names: Ia,
|
|
8003
8019
|
style: "game"
|
|
8004
8020
|
})]
|
|
8005
8021
|
}),
|
|
@@ -8011,8 +8027,8 @@ function za() {
|
|
|
8011
8027
|
className: "game-ui-small-copy",
|
|
8012
8028
|
children: e.lineHint
|
|
8013
8029
|
})]
|
|
8014
|
-
}), /* @__PURE__ */ t(
|
|
8015
|
-
names:
|
|
8030
|
+
}), /* @__PURE__ */ t(Ra, {
|
|
8031
|
+
names: La,
|
|
8016
8032
|
style: "line"
|
|
8017
8033
|
})]
|
|
8018
8034
|
}),
|
|
@@ -8027,16 +8043,16 @@ function za() {
|
|
|
8027
8043
|
className: "game-ui-small-copy",
|
|
8028
8044
|
children: e.spriteHint
|
|
8029
8045
|
})]
|
|
8030
|
-
}), /* @__PURE__ */ t(
|
|
8046
|
+
}), /* @__PURE__ */ t(za, {})]
|
|
8031
8047
|
})
|
|
8032
8048
|
]
|
|
8033
8049
|
});
|
|
8034
8050
|
}
|
|
8035
|
-
function
|
|
8036
|
-
let [i, a] = m("en"), o =
|
|
8051
|
+
function Va({ title: e, body: r }) {
|
|
8052
|
+
let [i, a] = m("en"), o = la[i], s = e && i === "en" ? e : o.heroTitle, c = r && i === "en" ? r : o.heroBody;
|
|
8037
8053
|
return l(() => (document.documentElement.dataset.gameUiPreview = "clay", () => {
|
|
8038
8054
|
delete document.documentElement.dataset.gameUiPreview;
|
|
8039
|
-
}), []), /* @__PURE__ */ t(
|
|
8055
|
+
}), []), /* @__PURE__ */ t(ua.Provider, {
|
|
8040
8056
|
value: o,
|
|
8041
8057
|
children: /* @__PURE__ */ n("main", {
|
|
8042
8058
|
"aria-label": "Swimmer UI Kit clay preview",
|
|
@@ -8049,7 +8065,7 @@ function Ba({ title: e, body: r }) {
|
|
|
8049
8065
|
tone: "ai",
|
|
8050
8066
|
children: "@pieai/swimmer-ui-kit"
|
|
8051
8067
|
}),
|
|
8052
|
-
/* @__PURE__ */ t(
|
|
8068
|
+
/* @__PURE__ */ t(Br, {
|
|
8053
8069
|
currentLabel: o.triggerLabel,
|
|
8054
8070
|
label: o.langMenuLabel,
|
|
8055
8071
|
onSelect: (e) => a(e),
|
|
@@ -8076,10 +8092,10 @@ function Ba({ title: e, body: r }) {
|
|
|
8076
8092
|
id: "game-ui-preview-token-title",
|
|
8077
8093
|
children: o.sections.tokens
|
|
8078
8094
|
}),
|
|
8079
|
-
/* @__PURE__ */ t(
|
|
8095
|
+
/* @__PURE__ */ t(ma, {}),
|
|
8080
8096
|
/* @__PURE__ */ t("div", {
|
|
8081
8097
|
className: "game-ui-token-ledger",
|
|
8082
|
-
children:
|
|
8098
|
+
children: fa.map((e) => /* @__PURE__ */ t(pa, {
|
|
8083
8099
|
id: e.id,
|
|
8084
8100
|
label: o.tokenGroups[e.id] ?? e.id,
|
|
8085
8101
|
tokens: e.tokens
|
|
@@ -8099,7 +8115,7 @@ function Ba({ title: e, body: r }) {
|
|
|
8099
8115
|
className: "game-ui-small-copy",
|
|
8100
8116
|
children: o.iconsIntro
|
|
8101
8117
|
}),
|
|
8102
|
-
/* @__PURE__ */ t(
|
|
8118
|
+
/* @__PURE__ */ t(Ba, {})
|
|
8103
8119
|
]
|
|
8104
8120
|
}),
|
|
8105
8121
|
/* @__PURE__ */ n("section", {
|
|
@@ -8108,7 +8124,7 @@ function Ba({ title: e, body: r }) {
|
|
|
8108
8124
|
children: [/* @__PURE__ */ t("h2", {
|
|
8109
8125
|
id: "game-ui-preview-type-title",
|
|
8110
8126
|
children: o.sections.typography
|
|
8111
|
-
}), /* @__PURE__ */ t(
|
|
8127
|
+
}), /* @__PURE__ */ t(ha, {})]
|
|
8112
8128
|
}),
|
|
8113
8129
|
/* @__PURE__ */ n("section", {
|
|
8114
8130
|
"aria-labelledby": "game-ui-preview-components-title",
|
|
@@ -8118,11 +8134,11 @@ function Ba({ title: e, body: r }) {
|
|
|
8118
8134
|
id: "game-ui-preview-components-title",
|
|
8119
8135
|
children: o.sections.components
|
|
8120
8136
|
}),
|
|
8121
|
-
/* @__PURE__ */ t(ha, {}),
|
|
8122
8137
|
/* @__PURE__ */ t(ga, {}),
|
|
8123
|
-
/* @__PURE__ */ t(
|
|
8138
|
+
/* @__PURE__ */ t(_a, {}),
|
|
8124
8139
|
/* @__PURE__ */ t(ba, {}),
|
|
8125
|
-
/* @__PURE__ */ t(
|
|
8140
|
+
/* @__PURE__ */ t(xa, {}),
|
|
8141
|
+
/* @__PURE__ */ t(er, {
|
|
8126
8142
|
entries: o.history,
|
|
8127
8143
|
label: o.historyLabel
|
|
8128
8144
|
})
|
|
@@ -8134,7 +8150,7 @@ function Ba({ title: e, body: r }) {
|
|
|
8134
8150
|
children: [/* @__PURE__ */ t("h2", {
|
|
8135
8151
|
id: "game-ui-preview-forms-title",
|
|
8136
8152
|
children: o.sections.forms
|
|
8137
|
-
}), /* @__PURE__ */ t(
|
|
8153
|
+
}), /* @__PURE__ */ t(Fa, {})]
|
|
8138
8154
|
}),
|
|
8139
8155
|
/* @__PURE__ */ n("section", {
|
|
8140
8156
|
"aria-labelledby": "game-ui-preview-overlay-glass-title",
|
|
@@ -8148,7 +8164,7 @@ function Ba({ title: e, body: r }) {
|
|
|
8148
8164
|
className: "game-ui-small-copy",
|
|
8149
8165
|
children: "Official HUD-on-scene tone: dark translucent glass, thin light border, no clay cast shadow, compact density. Use on any container that wraps scene-overlay chrome (3D tavern, cinematic stage). Nest inside light or night theme."
|
|
8150
8166
|
}),
|
|
8151
|
-
/* @__PURE__ */ t(
|
|
8167
|
+
/* @__PURE__ */ t(va, {})
|
|
8152
8168
|
]
|
|
8153
8169
|
}),
|
|
8154
8170
|
/* @__PURE__ */ n("section", {
|
|
@@ -8163,7 +8179,7 @@ function Ba({ title: e, body: r }) {
|
|
|
8163
8179
|
className: "game-ui-small-copy",
|
|
8164
8180
|
children: o.liquidMetal.body
|
|
8165
8181
|
}),
|
|
8166
|
-
/* @__PURE__ */ t(
|
|
8182
|
+
/* @__PURE__ */ t(ya, {})
|
|
8167
8183
|
]
|
|
8168
8184
|
}),
|
|
8169
8185
|
/* @__PURE__ */ n("section", {
|
|
@@ -8172,7 +8188,7 @@ function Ba({ title: e, body: r }) {
|
|
|
8172
8188
|
children: [/* @__PURE__ */ t("h2", {
|
|
8173
8189
|
id: "game-ui-preview-ownmyspace-title",
|
|
8174
8190
|
children: "OwnMySpace game surface pack"
|
|
8175
|
-
}), /* @__PURE__ */ t(
|
|
8191
|
+
}), /* @__PURE__ */ t(Aa, {})]
|
|
8176
8192
|
}),
|
|
8177
8193
|
/* @__PURE__ */ n("section", {
|
|
8178
8194
|
"aria-labelledby": "game-ui-preview-terrain-build-title",
|
|
@@ -8186,7 +8202,7 @@ function Ba({ title: e, body: r }) {
|
|
|
8186
8202
|
className: "game-ui-small-copy",
|
|
8187
8203
|
children: "Official terrain controls cover mode, brush, material, undo/redo, build library, status, progress, and compact mobile drawer surfaces."
|
|
8188
8204
|
}),
|
|
8189
|
-
/* @__PURE__ */ t(
|
|
8205
|
+
/* @__PURE__ */ t(Ea, {})
|
|
8190
8206
|
]
|
|
8191
8207
|
}),
|
|
8192
8208
|
/* @__PURE__ */ n("section", {
|
|
@@ -8201,7 +8217,7 @@ function Ba({ title: e, body: r }) {
|
|
|
8201
8217
|
className: "game-ui-small-copy",
|
|
8202
8218
|
children: "Official construction surfaces cover job queue states, before/after review, robot crew status, validation warnings, approval actions, and local-only provider badges."
|
|
8203
8219
|
}),
|
|
8204
|
-
/* @__PURE__ */ t(
|
|
8220
|
+
/* @__PURE__ */ t(ka, {})
|
|
8205
8221
|
]
|
|
8206
8222
|
}),
|
|
8207
8223
|
/* @__PURE__ */ n("section", {
|
|
@@ -8216,7 +8232,7 @@ function Ba({ title: e, body: r }) {
|
|
|
8216
8232
|
className: "game-ui-small-copy",
|
|
8217
8233
|
children: "Official asset cards must stay visually complete when a game shell uses dense, narrow, or rail-style inventory slots."
|
|
8218
8234
|
}),
|
|
8219
|
-
/* @__PURE__ */ t(
|
|
8235
|
+
/* @__PURE__ */ t(Ma, {})
|
|
8220
8236
|
]
|
|
8221
8237
|
}),
|
|
8222
8238
|
/* @__PURE__ */ n("section", {
|
|
@@ -8225,7 +8241,7 @@ function Ba({ title: e, body: r }) {
|
|
|
8225
8241
|
children: [/* @__PURE__ */ t("h2", {
|
|
8226
8242
|
id: "game-ui-preview-first-session-title",
|
|
8227
8243
|
children: o.sections.firstSession
|
|
8228
|
-
}), /* @__PURE__ */ t(
|
|
8244
|
+
}), /* @__PURE__ */ t(Na, {})]
|
|
8229
8245
|
}),
|
|
8230
8246
|
/* @__PURE__ */ n("section", {
|
|
8231
8247
|
"aria-labelledby": "game-ui-preview-orientation-title",
|
|
@@ -8233,7 +8249,7 @@ function Ba({ title: e, body: r }) {
|
|
|
8233
8249
|
children: [/* @__PURE__ */ t("h2", {
|
|
8234
8250
|
id: "game-ui-preview-orientation-title",
|
|
8235
8251
|
children: o.sections.orientation
|
|
8236
|
-
}), /* @__PURE__ */ t(
|
|
8252
|
+
}), /* @__PURE__ */ t(zr, {
|
|
8237
8253
|
badgeLabel: o.orientation.badge,
|
|
8238
8254
|
body: o.orientation.body,
|
|
8239
8255
|
cta: o.orientation.cta,
|
|
@@ -8248,11 +8264,11 @@ function Ba({ title: e, body: r }) {
|
|
|
8248
8264
|
children: [/* @__PURE__ */ t("h2", {
|
|
8249
8265
|
id: "game-ui-preview-responsive-title",
|
|
8250
8266
|
children: o.sections.responsive
|
|
8251
|
-
}), /* @__PURE__ */ t(
|
|
8267
|
+
}), /* @__PURE__ */ t(Pa, {})]
|
|
8252
8268
|
})
|
|
8253
8269
|
]
|
|
8254
8270
|
})
|
|
8255
8271
|
});
|
|
8256
8272
|
}
|
|
8257
8273
|
//#endregion
|
|
8258
|
-
export {
|
|
8274
|
+
export { xr as CLAY_ASSETS, fr as CLAY_ASSET_BASE_PATH, W as CLAY_ASSET_SIZE_TOKENS, I as CLAY_COLOR_TOKENS, U as CLAY_ELEVATION_TOKENS, yr as CLAY_GAME_SPRITES, br as CLAY_GAME_SPRITE_NAMES, mr as CLAY_ICON_NAMES, pr as CLAY_ICON_VARIANTS, xe as CLAY_LAYER_TOKENS, R as CLAY_LIQUID_GOOEY_TOKENS, R as GAME_UI_LIQUID_GOOEY_TOKENS, L as CLAY_LIQUID_METAL_TOKENS, L as GAME_UI_LIQUID_METAL_TOKENS, be as CLAY_MOTION_TOKENS, ve as CLAY_OVERLAY_GLASS_TOKENS, ve as GAME_UI_OVERLAY_GLASS_TOKENS, V as CLAY_RADIUS_TOKENS, H as CLAY_SCROLLBAR_TOKENS, z as CLAY_SEMANTIC_TOKENS, ye as CLAY_SPACE_TOKENS, Se as CLAY_TARGET_TOKENS, B as CLAY_TYPE_TOKENS, Ce as CLAY_UI_TOKENS, we as DEFAULT_LIQUID_GOOEY_ANIMATION_BUDGET, Te as DEFAULT_LIQUID_GOOEY_FILTER_AREA_BUDGET, T as DEFAULT_LIQUID_METAL_CONTEXT_BUDGET, J as DISSOLVE_DEFAULTS, Wr as FirstSessionHud, Gr as FirstSessionOnboarding, oa as GAME_UI_OVERLAY, ia as GAME_UI_PREVIEW_MESSAGES, sa as GAME_UI_TARGETS, ca as GAME_UI_THEME_CONTRACT, aa as GAME_UI_TOKENS, ii as GameActionGrid, di as GameAssetCard, $ as GameAssetIcon, fi as GameAssetLibrary, Zr as GameAvatar, Q as GameBadge, qi as GameBeforeAfterToggle, Ci as GameBrushControls, Ei as GameBuildLibrary, w as GameButton, Qn as GameCallout, Ir as GameCardFan, Yr as GameCheckbox, $i as GameCollapsiblePanel, Di as GameCompactGameDrawer, Yi as GameCompactJobDrawer, Gi as GameConstructionApprovalBar, Ji as GameConstructionJobCard, Wi as GameConstructionProgress, Xi as GameContractorPanel, $n as GameDialog, $r as GameEmptyState, ni as GameFactList, Jr as GameField, er as GameHistoryPanel, Fr as GameHud, tr as GameHudActions, nr as GameIconButton, Kr as GameInput, Br as GameLanguageMenu, Vr as GameLoadingState, wi as GameMaterialSwatches, ra as GameModal, si as GameMovementPad, mi as GameObjectToolbar, zr as GameOrientationGate, X as GamePanel, pi as GamePlacementToolbar, Qr as GameProgress, dr as GamePrompt, lr as GameRadialMenu, Ki as GameRobotCrewStatus, ti as GameSceneHudLayout, or as GameSegmentedControl, ei as GameShell, sr as GameSlider, Lr as GameStageTile, ri as GameStatList, ir as GameTabs, Ai as GameTerrainBuildToolbox, xi as GameTerrainModeControl, Si as GameTerrainToolStrip, qr as GameTextArea, ur as GameToast, cr as GameToggle, rr as GameTooltip, Va as GameUiPreview, Ti as GameUndoRedoActions, na as GameWindowPanel, on as IMAGE_MELT_DEFAULTS, He as LIQUID_GOOEY_WAVINESS_MAX_FRACTION, Zn as LiquidGroup, Xn as LiquidItem, F as LiquidMetalButton, Mr as acknowledgeClayPlaceholders, kr as getClayAssetBasePath, Dr as getClayAssetMode, Hr as getClayCatalogPaths, Nr as getClayIconPath, vr as getClayIconStyles, Pr as getClaySourceAssetPath, ke as getLiquidGooeyBudget, O as getLiquidMetalContextBudget, C as playGameInteractionSound, S as playGameInteractionSoundForContext, dn as resolveDissolveOptions, Or as setClayAssetBasePath, Er as setClayAssetMode, Ae as setLiquidGooeyBudget, ee as setLiquidMetalContextBudget };
|