@tavus/embed 0.19.1 → 0.19.3
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/README.md +2 -2
- package/dist/index.iife.js +9 -9
- package/dist/index.mjs +811 -638
- package/dist/integration.d.ts +6 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3101,7 +3101,7 @@ var jn = class extends Error {
|
|
|
3101
3101
|
}
|
|
3102
3102
|
}, Mn = {
|
|
3103
3103
|
name: "@tavus/embed",
|
|
3104
|
-
version: "0.19.
|
|
3104
|
+
version: "0.19.3",
|
|
3105
3105
|
variant: "embed"
|
|
3106
3106
|
}, Nn = /* @__PURE__ */ new Set([
|
|
3107
3107
|
"Error",
|
|
@@ -16376,7 +16376,7 @@ function tg({ children: e }) {
|
|
|
16376
16376
|
...r,
|
|
16377
16377
|
tavus: d,
|
|
16378
16378
|
open: s.expand,
|
|
16379
|
-
close: s.
|
|
16379
|
+
close: s.close
|
|
16380
16380
|
} : {
|
|
16381
16381
|
...r,
|
|
16382
16382
|
tavus: d
|
|
@@ -25217,6 +25217,10 @@ var jM = {
|
|
|
25217
25217
|
componentOverrides: {}
|
|
25218
25218
|
},
|
|
25219
25219
|
content: { stackedAspect: 16 / 9 },
|
|
25220
|
+
replica: {
|
|
25221
|
+
maxAspect: 16 / 9,
|
|
25222
|
+
landscapeMinAspect: 1
|
|
25223
|
+
},
|
|
25220
25224
|
pip: {
|
|
25221
25225
|
gapPaddingPx: 24,
|
|
25222
25226
|
minWidthPx: 128,
|
|
@@ -25445,6 +25449,81 @@ var PM = {
|
|
|
25445
25449
|
}
|
|
25446
25450
|
]
|
|
25447
25451
|
},
|
|
25452
|
+
"content-columns-compact": {
|
|
25453
|
+
id: "content-columns-compact",
|
|
25454
|
+
soloVariant: "content-solo",
|
|
25455
|
+
regions: [
|
|
25456
|
+
{
|
|
25457
|
+
name: "replicaColumn",
|
|
25458
|
+
x: { fraction: 0 },
|
|
25459
|
+
y: { fraction: 0 },
|
|
25460
|
+
width: { fraction: 1 / 3 },
|
|
25461
|
+
height: { fraction: 1 },
|
|
25462
|
+
accepts: ["replica", "selfView"],
|
|
25463
|
+
zBase: 0
|
|
25464
|
+
},
|
|
25465
|
+
{
|
|
25466
|
+
name: "contentStage",
|
|
25467
|
+
x: { fraction: 1 / 3 },
|
|
25468
|
+
y: { fraction: 0 },
|
|
25469
|
+
width: { fraction: 2 / 3 },
|
|
25470
|
+
height: { fraction: 1 },
|
|
25471
|
+
accepts: ["content"],
|
|
25472
|
+
zBase: 0
|
|
25473
|
+
},
|
|
25474
|
+
{
|
|
25475
|
+
name: "pip",
|
|
25476
|
+
x: { fraction: .02 },
|
|
25477
|
+
y: { fraction: .76 },
|
|
25478
|
+
width: { fraction: .2 },
|
|
25479
|
+
height: { fraction: .2 },
|
|
25480
|
+
accepts: ["selfView"],
|
|
25481
|
+
zBase: 100
|
|
25482
|
+
}
|
|
25483
|
+
]
|
|
25484
|
+
},
|
|
25485
|
+
"content-sheet-columns": {
|
|
25486
|
+
id: "content-sheet-columns",
|
|
25487
|
+
soloVariant: "content-sheet-solo",
|
|
25488
|
+
regions: [
|
|
25489
|
+
{
|
|
25490
|
+
name: "replicaColumn",
|
|
25491
|
+
x: { fraction: 0 },
|
|
25492
|
+
y: { fraction: 0 },
|
|
25493
|
+
width: { fraction: 1 / 3 },
|
|
25494
|
+
height: { fraction: 1 },
|
|
25495
|
+
accepts: ["replica", "selfView"],
|
|
25496
|
+
zBase: 0
|
|
25497
|
+
},
|
|
25498
|
+
{
|
|
25499
|
+
name: "contentStage",
|
|
25500
|
+
x: { fraction: 1 / 3 },
|
|
25501
|
+
y: { fraction: 0 },
|
|
25502
|
+
width: { fraction: 2 / 3 },
|
|
25503
|
+
height: { fraction: 1 },
|
|
25504
|
+
accepts: ["content"],
|
|
25505
|
+
zBase: 0
|
|
25506
|
+
},
|
|
25507
|
+
{
|
|
25508
|
+
name: "cardSheet",
|
|
25509
|
+
x: { fraction: 1 / 3 },
|
|
25510
|
+
y: { fraction: 0 },
|
|
25511
|
+
width: { fraction: 2 / 3 },
|
|
25512
|
+
height: { fraction: 1 },
|
|
25513
|
+
accepts: ["card"],
|
|
25514
|
+
zBase: 100
|
|
25515
|
+
},
|
|
25516
|
+
{
|
|
25517
|
+
name: "pip",
|
|
25518
|
+
x: { fraction: .02 },
|
|
25519
|
+
y: { fraction: .76 },
|
|
25520
|
+
width: { fraction: .2 },
|
|
25521
|
+
height: { fraction: .2 },
|
|
25522
|
+
accepts: ["selfView"],
|
|
25523
|
+
zBase: 110
|
|
25524
|
+
}
|
|
25525
|
+
]
|
|
25526
|
+
},
|
|
25448
25527
|
"content-stack": {
|
|
25449
25528
|
id: "content-stack",
|
|
25450
25529
|
soloVariant: "content-solo",
|
|
@@ -25670,6 +25749,39 @@ var PM = {
|
|
|
25670
25749
|
}
|
|
25671
25750
|
]
|
|
25672
25751
|
},
|
|
25752
|
+
"canvas-takeover-columns-compact": {
|
|
25753
|
+
id: "canvas-takeover-columns-compact",
|
|
25754
|
+
soloVariant: "canvas-solo",
|
|
25755
|
+
regions: [
|
|
25756
|
+
{
|
|
25757
|
+
name: "replicaColumn",
|
|
25758
|
+
x: { fraction: 0 },
|
|
25759
|
+
y: { fraction: 0 },
|
|
25760
|
+
width: { fraction: 1 / 3 },
|
|
25761
|
+
height: { fraction: 1 },
|
|
25762
|
+
accepts: ["replica", "selfView"],
|
|
25763
|
+
zBase: 0
|
|
25764
|
+
},
|
|
25765
|
+
{
|
|
25766
|
+
name: "canvasStage",
|
|
25767
|
+
x: { fraction: 1 / 3 },
|
|
25768
|
+
y: { fraction: 0 },
|
|
25769
|
+
width: { fraction: 2 / 3 },
|
|
25770
|
+
height: { fraction: 1 },
|
|
25771
|
+
accepts: ["card"],
|
|
25772
|
+
zBase: 0
|
|
25773
|
+
},
|
|
25774
|
+
{
|
|
25775
|
+
name: "pip",
|
|
25776
|
+
x: { fraction: .02 },
|
|
25777
|
+
y: { fraction: .78 },
|
|
25778
|
+
width: { fraction: .18 },
|
|
25779
|
+
height: { fraction: .18 },
|
|
25780
|
+
accepts: ["selfView"],
|
|
25781
|
+
zBase: 100
|
|
25782
|
+
}
|
|
25783
|
+
]
|
|
25784
|
+
},
|
|
25673
25785
|
"canvas-takeover-strip": {
|
|
25674
25786
|
id: "canvas-takeover-strip",
|
|
25675
25787
|
soloVariant: "canvas-solo",
|
|
@@ -25898,7 +26010,7 @@ var PM = {
|
|
|
25898
26010
|
"content-focus": {
|
|
25899
26011
|
compact: {
|
|
25900
26012
|
stacked: "content-stack-compact",
|
|
25901
|
-
"side-by-side": "content-
|
|
26013
|
+
"side-by-side": "content-columns-compact"
|
|
25902
26014
|
},
|
|
25903
26015
|
medium: {
|
|
25904
26016
|
stacked: "content-stack",
|
|
@@ -25912,7 +26024,7 @@ var PM = {
|
|
|
25912
26024
|
"content-plus-canvas": {
|
|
25913
26025
|
compact: {
|
|
25914
26026
|
stacked: "content-sheet-compact",
|
|
25915
|
-
"side-by-side": "content-sheet-
|
|
26027
|
+
"side-by-side": "content-sheet-columns"
|
|
25916
26028
|
},
|
|
25917
26029
|
medium: {
|
|
25918
26030
|
stacked: "content-stack-canvas",
|
|
@@ -25926,7 +26038,7 @@ var PM = {
|
|
|
25926
26038
|
"canvas-dominant": {
|
|
25927
26039
|
compact: {
|
|
25928
26040
|
stacked: "canvas-takeover-strip",
|
|
25929
|
-
"side-by-side": "canvas-takeover-
|
|
26041
|
+
"side-by-side": "canvas-takeover-columns-compact"
|
|
25930
26042
|
},
|
|
25931
26043
|
medium: {
|
|
25932
26044
|
stacked: "canvas-takeover-strip",
|
|
@@ -26151,21 +26263,28 @@ function $M(e, t) {
|
|
|
26151
26263
|
};
|
|
26152
26264
|
}
|
|
26153
26265
|
function eN(e, t, n) {
|
|
26154
|
-
|
|
26266
|
+
let r = Math.round(e.rail.widthPx);
|
|
26267
|
+
return n > 0 ? Math.max(0, r - $M(e, t).cardsPad) : r;
|
|
26155
26268
|
}
|
|
26156
26269
|
function tN(e, t, n) {
|
|
26270
|
+
return e === "canvas-dominant" && t.width === "compact" ? n.eviction.compactTakeoverMaxCards : n.eviction.maxVisibleCards;
|
|
26271
|
+
}
|
|
26272
|
+
function nN(e, t, n) {
|
|
26157
26273
|
let r = [...e].sort((e, t) => e.dispatchSeq - t.dispatchSeq), i = Math.floor(t);
|
|
26158
26274
|
return r.length <= i ? r : n === "evict-newest" ? r.slice(0, i) : r.slice(r.length - i);
|
|
26159
26275
|
}
|
|
26160
|
-
function
|
|
26161
|
-
let o =
|
|
26276
|
+
function rN(e, t, n, r, i, a) {
|
|
26277
|
+
let o = $M(n, r).cardsPad, { left: s, right: c } = i ?? {
|
|
26278
|
+
left: o,
|
|
26279
|
+
right: o
|
|
26280
|
+
}, l = Math.round(a ?? n.rail.widthPx), u = Math.max(1, Math.min(t - s - c, l - s - c));
|
|
26162
26281
|
return {
|
|
26163
|
-
innerW:
|
|
26282
|
+
innerW: u,
|
|
26164
26283
|
entries: e.map((e) => {
|
|
26165
26284
|
let t = WM(e.component, {
|
|
26166
26285
|
...e.contentOpts,
|
|
26167
26286
|
naturalHeightPx: e.naturalHeightPx,
|
|
26168
|
-
widthPx:
|
|
26287
|
+
widthPx: u,
|
|
26169
26288
|
coldDefaultHeightPx: n.card.coldDefaultHeightPx
|
|
26170
26289
|
}, n.card.componentOverrides);
|
|
26171
26290
|
return {
|
|
@@ -26176,14 +26295,22 @@ function nN(e, t, n, r, i, a) {
|
|
|
26176
26295
|
})
|
|
26177
26296
|
};
|
|
26178
26297
|
}
|
|
26179
|
-
|
|
26298
|
+
var iN = (e) => e.accepts.includes("replica") && e.accepts.includes("selfView");
|
|
26299
|
+
function aN(e, t, n, r, i) {
|
|
26300
|
+
let a = (e, t) => Math.abs(e - t) <= 1, o = e.x + e.width, s = (e, r, i) => n > 0 && a(e, r) || t.some((t) => iN(t.region) && a(i(t.rect), e));
|
|
26301
|
+
return {
|
|
26302
|
+
left: s(e.x, n, (e) => e.x + e.width) ? 0 : i,
|
|
26303
|
+
right: s(o, r - n, (e) => e.x) ? 0 : i
|
|
26304
|
+
};
|
|
26305
|
+
}
|
|
26306
|
+
function oN(e, t) {
|
|
26180
26307
|
return "fraction" in e ? e.fraction * t : e.px >= 0 ? e.px : t + e.px;
|
|
26181
26308
|
}
|
|
26182
|
-
function
|
|
26309
|
+
function sN(e, t, n, r) {
|
|
26183
26310
|
return e.name !== "rail" || "fraction" in t ? t : r === "width" ? { px: n.rail.widthPx } : { px: t.px < 0 ? -n.rail.widthPx : t.px };
|
|
26184
26311
|
}
|
|
26185
|
-
function
|
|
26186
|
-
let o = n === "x" ? t.width : t.height, s = [...e].sort((e, t) =>
|
|
26312
|
+
function cN(e, t, n, r, i, a) {
|
|
26313
|
+
let o = n === "x" ? t.width : t.height, s = [...e].sort((e, t) => oN(n === "x" ? e.x : e.y, o) - oN(n === "x" ? t.x : t.y, o)), c = s.map((e) => n === "x" ? sN(e, e.width, r, "width") : e.height), l = 0, u = 0;
|
|
26187
26314
|
for (let e of c) "px" in e ? l += e.px : u += e.fraction;
|
|
26188
26315
|
let d = Math.max(0, o - l), f = c.map((e) => "px" in e ? e.px : u > 0 ? e.fraction / u * d : 0);
|
|
26189
26316
|
if (n === "y" && i !== void 0) {
|
|
@@ -26216,25 +26343,29 @@ function aN(e, t, n, r, i, a) {
|
|
|
26216
26343
|
let _ = [0], v = 0;
|
|
26217
26344
|
for (let e of f) v += e, _.push(QM(Math.round(v), 0, o));
|
|
26218
26345
|
return s.map((e, r) => {
|
|
26219
|
-
let i = _[r] ?? 0,
|
|
26346
|
+
let i = _[r] ?? 0, o = _[r + 1] ?? i;
|
|
26347
|
+
if (n === "y" && a !== void 0 && e.accepts.includes("replica")) {
|
|
26348
|
+
let e = r > 0 ? a.replicaGapPx : 0, t = r < s.length - 1 ? a.replicaGapPx : 0;
|
|
26349
|
+
o - i - e - t >= 48 && (i += e, o -= t);
|
|
26350
|
+
}
|
|
26220
26351
|
return {
|
|
26221
26352
|
region: e,
|
|
26222
26353
|
rect: n === "x" ? {
|
|
26223
26354
|
x: i,
|
|
26224
26355
|
y: 0,
|
|
26225
|
-
width:
|
|
26356
|
+
width: o - i,
|
|
26226
26357
|
height: t.height
|
|
26227
26358
|
} : {
|
|
26228
26359
|
x: 0,
|
|
26229
26360
|
y: i,
|
|
26230
26361
|
width: t.width,
|
|
26231
|
-
height:
|
|
26362
|
+
height: o - i
|
|
26232
26363
|
}
|
|
26233
26364
|
};
|
|
26234
26365
|
});
|
|
26235
26366
|
}
|
|
26236
|
-
function
|
|
26237
|
-
let r = t.width, i = t.height, a =
|
|
26367
|
+
function lN(e, t, n) {
|
|
26368
|
+
let r = t.width, i = t.height, a = sN(e, e.width, n, "width"), o = sN(e, e.x, n, "x"), s = QM(Math.round(oN(o, r)), 0, r), c = QM(Math.round(oN(e.y, i)), 0, i);
|
|
26238
26369
|
return {
|
|
26239
26370
|
x: s,
|
|
26240
26371
|
y: c,
|
|
@@ -26242,37 +26373,43 @@ function oN(e, t, n) {
|
|
|
26242
26373
|
height: QM(Math.round("fraction" in e.height ? e.height.fraction * i : e.height.px), 0, i - c)
|
|
26243
26374
|
};
|
|
26244
26375
|
}
|
|
26245
|
-
function
|
|
26376
|
+
function uN(e, t, n, r, i) {
|
|
26246
26377
|
let a = e.regions.filter((e) => e.zBase < 100), o = (e) => "fraction" in e && e.fraction === 1;
|
|
26247
|
-
return a.length > 1 && a.every((e) => o(e.height)) ?
|
|
26378
|
+
return a.length > 1 && a.every((e) => o(e.height)) ? cN(a, t, "x", n) : a.length > 1 && a.every((e) => o(e.width)) ? cN(a, t, "y", n, r, i) : a.map((e) => ({
|
|
26248
26379
|
region: e,
|
|
26249
|
-
rect:
|
|
26380
|
+
rect: lN(e, t, n)
|
|
26250
26381
|
}));
|
|
26251
26382
|
}
|
|
26252
|
-
function
|
|
26383
|
+
function dN(e, t, n, r, i, a, o, s, c, l, u) {
|
|
26253
26384
|
if (n !== null) return;
|
|
26254
26385
|
let d = e.regions.filter((e) => e.zBase < 100);
|
|
26255
26386
|
if (!(d.length > 1 && d.every((e) => "fraction" in e.width && e.width.fraction === 1))) return;
|
|
26256
26387
|
let f = d.find((e) => e.accepts.includes("card") && "fraction" in e.height);
|
|
26257
26388
|
if (f === void 0 || r.cards.length === 0) return;
|
|
26258
|
-
let { innerW: p, entries: m } = nN(
|
|
26389
|
+
let { innerW: p, entries: m } = rN(nN(r.cards, u, c.eviction.policy), i.width, c, l, s > 0 ? {
|
|
26390
|
+
left: 0,
|
|
26391
|
+
right: 0
|
|
26392
|
+
} : void 0, c.card.stackMaxWidthPx), h = m.reduce((e, t) => t.constraints.minWidthPx > p ? e : Math.max(e, t.clampedHeightPx), 0), { cardsPad: g } = $M(c, l), _ = oN(f.y, i.height), v = d.every((e) => oN(e.y, i.height) <= _) ? Math.max(0, o - s) : 0, y = h > 0;
|
|
26259
26393
|
return {
|
|
26260
26394
|
neededPx: h + 2 * g + v,
|
|
26261
26395
|
capPx: Math.round(c.card.stackBandMaxFraction * a.height),
|
|
26262
26396
|
...y && { shrinkToContent: y }
|
|
26263
26397
|
};
|
|
26264
26398
|
}
|
|
26265
|
-
function
|
|
26399
|
+
function fN(e, t, n, r, i) {
|
|
26266
26400
|
if (t === null) return;
|
|
26267
|
-
let
|
|
26268
|
-
if (!(
|
|
26269
|
-
let
|
|
26270
|
-
if (!
|
|
26271
|
-
let
|
|
26272
|
-
if (!(!Number.isFinite(
|
|
26273
|
-
|
|
26274
|
-
|
|
26275
|
-
|
|
26401
|
+
let a = e.regions.filter((e) => e.zBase < 100);
|
|
26402
|
+
if (!(a.length > 1 && a.every((e) => "fraction" in e.width && e.width.fraction === 1))) return;
|
|
26403
|
+
let o = a.some((e) => e.accepts.includes("content") && "fraction" in e.height), s = a.some((e) => e.accepts.includes("replica") && "fraction" in e.height);
|
|
26404
|
+
if (!o || !s) return;
|
|
26405
|
+
let c = i.content.stackedAspect;
|
|
26406
|
+
if (!(!Number.isFinite(c) || c <= 0)) return {
|
|
26407
|
+
maxPx: Math.round(n.width / c),
|
|
26408
|
+
replicaGapPx: r
|
|
26409
|
+
};
|
|
26410
|
+
}
|
|
26411
|
+
var pN = "bottom-left";
|
|
26412
|
+
function mN(e, t, n) {
|
|
26276
26413
|
let r = e.statusStrip;
|
|
26277
26414
|
if (r === void 0) return null;
|
|
26278
26415
|
let i = QM(Math.round(r.heightPx ?? 48), 0, 160), a = e.callControlsRect, o = Math.min(Math.max(Math.round(a?.width ?? 0), 448), t.width - 32);
|
|
@@ -26285,12 +26422,12 @@ function dN(e, t, n) {
|
|
|
26285
26422
|
height: i
|
|
26286
26423
|
};
|
|
26287
26424
|
}
|
|
26288
|
-
function
|
|
26425
|
+
function hN(e, t, n, r, i, a) {
|
|
26289
26426
|
return e.x < 0 || e.width <= 0 || e.height <= 0 || e.x + e.width > n.width || e.y + e.height > n.height || e.y < 48 ? !1 : t.every((e) => r && e.region.accepts.includes("content") ? e.rect.height >= 48 : i && e.region.accepts.includes("card") ? e.rect.height >= a.card.reportedHeightFloorPx : !0);
|
|
26290
26427
|
}
|
|
26291
|
-
var
|
|
26292
|
-
function
|
|
26293
|
-
return t === null || !
|
|
26428
|
+
var gN = (e, t) => e.x < t.x + t.width && e.x + e.width > t.x;
|
|
26429
|
+
function _N(e, t, n) {
|
|
26430
|
+
return t === null || !gN(e.rect, t) ? e : {
|
|
26294
26431
|
...e,
|
|
26295
26432
|
rect: {
|
|
26296
26433
|
...e.rect,
|
|
@@ -26298,7 +26435,7 @@ function mN(e, t, n) {
|
|
|
26298
26435
|
}
|
|
26299
26436
|
};
|
|
26300
26437
|
}
|
|
26301
|
-
function
|
|
26438
|
+
function vN(e, t, n, r, i) {
|
|
26302
26439
|
let a = t.endsWith("right") ? e.x + e.width - n - r : e.x + n, o = t.startsWith("bottom") ? e.y + e.height - n - i : e.y + n;
|
|
26303
26440
|
return {
|
|
26304
26441
|
x: Math.round(a),
|
|
@@ -26307,20 +26444,40 @@ function hN(e, t, n, r, i) {
|
|
|
26307
26444
|
height: i
|
|
26308
26445
|
};
|
|
26309
26446
|
}
|
|
26310
|
-
function
|
|
26447
|
+
function yN(e, t, n) {
|
|
26448
|
+
let { maxAspect: r, landscapeMinAspect: i } = n.replica;
|
|
26449
|
+
if (e.width - e.height * r > 1) {
|
|
26450
|
+
let t = Math.max(Math.min(48, e.width), Math.round(e.height * r));
|
|
26451
|
+
return {
|
|
26452
|
+
...e,
|
|
26453
|
+
x: e.x + Math.round((e.width - t) / 2),
|
|
26454
|
+
width: t
|
|
26455
|
+
};
|
|
26456
|
+
}
|
|
26457
|
+
if (t && e.height - e.width / i > 1) {
|
|
26458
|
+
let t = Math.max(Math.min(48, e.height), Math.round(e.width / i));
|
|
26459
|
+
return {
|
|
26460
|
+
...e,
|
|
26461
|
+
y: e.y + Math.round((e.height - t) / 2),
|
|
26462
|
+
height: t
|
|
26463
|
+
};
|
|
26464
|
+
}
|
|
26465
|
+
return e;
|
|
26466
|
+
}
|
|
26467
|
+
function bN(e, t, n, r) {
|
|
26311
26468
|
let i = Math.max(n.pip.minWidthPx, Math.round(e.width * .25)), a = r ? e.height - t : Math.round((e.height - t) * 16 / 9), o = Math.min(i, e.width - t, a), s = r ? o : Math.round(o * 9 / 16);
|
|
26312
26469
|
return o < n.pip.minWidthPx || o <= 0 || s <= 0 ? null : {
|
|
26313
26470
|
w: o,
|
|
26314
26471
|
h: s
|
|
26315
26472
|
};
|
|
26316
26473
|
}
|
|
26317
|
-
function
|
|
26474
|
+
function xN(e, t, n) {
|
|
26318
26475
|
return t === null || !YM(e, t) ? e : {
|
|
26319
26476
|
...e,
|
|
26320
26477
|
y: Math.round(t.y) - n - e.height
|
|
26321
26478
|
};
|
|
26322
26479
|
}
|
|
26323
|
-
function
|
|
26480
|
+
function SN(e) {
|
|
26324
26481
|
if (typeof e != "object" || !e) return !1;
|
|
26325
26482
|
let t = e;
|
|
26326
26483
|
return [
|
|
@@ -26330,17 +26487,17 @@ function vN(e) {
|
|
|
26330
26487
|
"height"
|
|
26331
26488
|
].every((e) => typeof t[e] == "number" && Number.isFinite(t[e]));
|
|
26332
26489
|
}
|
|
26333
|
-
function
|
|
26490
|
+
function CN(e, t, n) {
|
|
26334
26491
|
let r = e;
|
|
26335
|
-
for (let e of t.filter(
|
|
26492
|
+
for (let e of t.filter(SN).sort((e, t) => t.y - e.y)) r = xN(r, e, n);
|
|
26336
26493
|
return r;
|
|
26337
26494
|
}
|
|
26338
|
-
function
|
|
26495
|
+
function wN(e, t, n) {
|
|
26339
26496
|
if (t <= 0) return e;
|
|
26340
26497
|
let r = Math.min(t, e.length);
|
|
26341
26498
|
return n === "evict-newest" ? e.slice(0, e.length - r) : e.slice(r);
|
|
26342
26499
|
}
|
|
26343
|
-
function
|
|
26500
|
+
function TN(e, t, n, r, i, a) {
|
|
26344
26501
|
let o = n.callControls === !0 ? Math.round(a.insets.callControlsBottomPx) : 0, s = i.height - o, c = n.selfView && n.prefs.hideSelfView !== !0, l = n.replica || c, u = e.regions.some((e) => e.zBase < 100 && e.accepts.includes("card")), d = +!!l + (t.contentKind === null ? 0 : 1) + (n.cards.length > 0 && u ? 1 : 0) >= 2 ? $M(a, r.width).surfacePad : 0, f = {
|
|
26345
26502
|
width: Math.max(0, i.width - 2 * d),
|
|
26346
26503
|
height: Math.max(0, i.height - 2 * d)
|
|
@@ -26349,56 +26506,65 @@ function xN(e, t, n, r, i, a) {
|
|
|
26349
26506
|
y: s,
|
|
26350
26507
|
width: i.width,
|
|
26351
26508
|
height: o
|
|
26352
|
-
} : null), m =
|
|
26509
|
+
} : null), m = dN(e, t.state, t.contentKind, n, f, i, o, d, a, r.width, tN(t.state, r, a)), h = fN(e, t.contentKind, f, d, a), g = uN(e, f, {
|
|
26510
|
+
...a,
|
|
26511
|
+
rail: {
|
|
26512
|
+
...a.rail,
|
|
26513
|
+
widthPx: eN(a, r.width, d)
|
|
26514
|
+
}
|
|
26515
|
+
}, m, h).map((e) => ({
|
|
26353
26516
|
...e,
|
|
26354
26517
|
rect: {
|
|
26355
26518
|
...e.rect,
|
|
26356
26519
|
x: e.rect.x + d,
|
|
26357
26520
|
y: e.rect.y + d
|
|
26358
26521
|
}
|
|
26359
|
-
})),
|
|
26522
|
+
})), _ = t.contentKind !== null, v = (e) => g.map((t) => {
|
|
26360
26523
|
let n = t.region.accepts.includes("card");
|
|
26361
|
-
if (!n && !(
|
|
26362
|
-
let r = n ?
|
|
26363
|
-
return e === null ? r :
|
|
26364
|
-
}),
|
|
26365
|
-
return
|
|
26366
|
-
regions:
|
|
26524
|
+
if (!n && !(_ && t.region.accepts.includes("content"))) return t;
|
|
26525
|
+
let r = n ? _N(t, p, s) : t;
|
|
26526
|
+
return e === null ? r : _N(r, e, e.y - 8);
|
|
26527
|
+
}), y = mN(n, i, s), b = v(y);
|
|
26528
|
+
return y !== null && !hN(y, b, i, _, n.cards.length > 0, a) && (y = null, b = v(null)), {
|
|
26529
|
+
regions: b,
|
|
26367
26530
|
surfacePad: d,
|
|
26368
26531
|
controlsInset: o,
|
|
26369
26532
|
bandTopY: s,
|
|
26370
|
-
statusStrip:
|
|
26533
|
+
statusStrip: y
|
|
26371
26534
|
};
|
|
26372
26535
|
}
|
|
26373
|
-
function
|
|
26374
|
-
let o = n.selfView && n.prefs.hideSelfView !== !0, { regions: s, surfacePad: c, controlsInset: l, bandTopY: u, statusStrip: d } =
|
|
26375
|
-
|
|
26536
|
+
function EN(e, t, n, r, i, a) {
|
|
26537
|
+
let o = n.selfView && n.prefs.hideSelfView !== !0, { regions: s, surfacePad: c, controlsInset: l, bandTopY: u, statusStrip: d } = TN(t, e, n, r, i, a), f = n.statusStrip !== void 0, p = s.find((e) => e.region.accepts.includes("replica")), m = s.find((e) => e.region.accepts.includes("content")), h = s.find((e) => e.region.accepts.includes("card")), g = t.regions.find((e) => e.zBase >= 100 && e.accepts.includes("selfView")), _ = t.regions.find((e) => e.zBase >= 100 && e.accepts.includes("card")), v = Math.round(a.rail.gutterPx), y = Math.round(a.pip.gapPaddingPx), b = (r.composition ?? NM({
|
|
26538
|
+
widthPx: i.width,
|
|
26539
|
+
heightPx: i.height
|
|
26540
|
+
}, a).composition) === "side-by-side", x = [...n.cards].sort((e, t) => e.dispatchSeq - t.dispatchSeq), S = tN(e.state, r, a), C = h ? nN(n.cards, S, a.eviction.policy) : _ === void 0 ? [] : nN(n.cards, 1, a.eviction.policy), w = (S) => {
|
|
26541
|
+
let w = {
|
|
26376
26542
|
evictedCardIds: [],
|
|
26377
26543
|
selfViewDropped: !1,
|
|
26378
26544
|
replicaCollapsed: !1,
|
|
26379
26545
|
...f && { statusStripDropped: d === null }
|
|
26380
|
-
},
|
|
26381
|
-
if (p &&
|
|
26382
|
-
let e = p.rect, t = o && !
|
|
26383
|
-
o &&
|
|
26384
|
-
let r = +!!n.replica + +!!t,
|
|
26385
|
-
|
|
26386
|
-
let
|
|
26546
|
+
}, T = [], E = null, D = !1, ee = p !== void 0 && p.region.accepts.includes("selfView");
|
|
26547
|
+
if (p && ee && (n.replica || o)) {
|
|
26548
|
+
let e = p.rect, t = o && !S.selfViewDropped;
|
|
26549
|
+
o && S.selfViewDropped && (w.selfViewDropped = !0);
|
|
26550
|
+
let r = +!!n.replica + +!!t, s = Math.round(a.insets.participantsPadPx), l = e.x <= c + 1 ? 0 : s, u = e.x + e.width >= i.width - c - 1 ? 0 : s, d = Math.max(1, e.width - l - u), f = d, m = Math.round(f * 9 / 16), h = (e) => r * e + (r - 1) * s;
|
|
26551
|
+
h(m) > e.height && (m = Math.max(1, Math.floor((e.height - (r - 1) * s) / r)), f = Math.min(d, Math.round(m * 16 / 9))), m = Math.max(m, Math.min(48, e.height)), f = Math.max(f, Math.min(48, e.width));
|
|
26552
|
+
let g = e.x + l + Math.round((d - f) / 2), _ = e.y + Math.round((e.height - h(m)) / 2);
|
|
26387
26553
|
if (n.replica) {
|
|
26388
26554
|
let e = {
|
|
26389
|
-
x:
|
|
26390
|
-
y:
|
|
26391
|
-
width:
|
|
26392
|
-
height:
|
|
26555
|
+
x: g,
|
|
26556
|
+
y: _,
|
|
26557
|
+
width: f,
|
|
26558
|
+
height: m
|
|
26393
26559
|
};
|
|
26394
|
-
if (
|
|
26395
|
-
let t = Math.min(
|
|
26560
|
+
if (S.replicaCollapsed) {
|
|
26561
|
+
let t = Math.min(m, Math.max(64, Math.round(m * .25)));
|
|
26396
26562
|
e = {
|
|
26397
26563
|
...e,
|
|
26398
26564
|
height: t
|
|
26399
|
-
},
|
|
26565
|
+
}, w.replicaCollapsed = !0;
|
|
26400
26566
|
}
|
|
26401
|
-
|
|
26567
|
+
e = yN(e, b, a), E = {
|
|
26402
26568
|
id: "replica",
|
|
26403
26569
|
kind: "replica",
|
|
26404
26570
|
rect: e,
|
|
@@ -26406,31 +26572,32 @@ function SN(e, t, n, r, i, a) {
|
|
|
26406
26572
|
order: p.region.zBase,
|
|
26407
26573
|
fit: { kind: "natural" },
|
|
26408
26574
|
region: p.region.name
|
|
26409
|
-
},
|
|
26575
|
+
}, T.push(E), _ += m + s;
|
|
26410
26576
|
}
|
|
26411
|
-
t && (
|
|
26577
|
+
t && (T.push({
|
|
26412
26578
|
id: "selfView",
|
|
26413
26579
|
kind: "selfView",
|
|
26414
26580
|
rect: {
|
|
26415
|
-
x:
|
|
26416
|
-
y:
|
|
26417
|
-
width:
|
|
26418
|
-
height:
|
|
26581
|
+
x: g,
|
|
26582
|
+
y: _,
|
|
26583
|
+
width: f,
|
|
26584
|
+
height: m
|
|
26419
26585
|
},
|
|
26420
26586
|
layer: "grid",
|
|
26421
26587
|
order: p.region.zBase,
|
|
26422
26588
|
fit: { kind: "natural" },
|
|
26423
26589
|
region: p.region.name
|
|
26424
|
-
}),
|
|
26590
|
+
}), D = !0);
|
|
26425
26591
|
} else if (p && (n.replica || o)) {
|
|
26426
26592
|
let e = !n.replica, t = p.rect;
|
|
26427
|
-
if (!e &&
|
|
26593
|
+
if (!e && S.replicaCollapsed) {
|
|
26428
26594
|
let e = Math.min(t.height, Math.max(64, Math.round(t.height * .25)));
|
|
26429
26595
|
t = {
|
|
26430
26596
|
...t,
|
|
26431
26597
|
height: e
|
|
26432
|
-
},
|
|
26598
|
+
}, w.replicaCollapsed = !0;
|
|
26433
26599
|
}
|
|
26600
|
+
e || (t = yN(t, b, a));
|
|
26434
26601
|
let r = {
|
|
26435
26602
|
id: e ? "selfView" : "replica",
|
|
26436
26603
|
kind: e ? "selfView" : "replica",
|
|
@@ -26440,9 +26607,9 @@ function SN(e, t, n, r, i, a) {
|
|
|
26440
26607
|
fit: { kind: "natural" },
|
|
26441
26608
|
region: p.region.name
|
|
26442
26609
|
};
|
|
26443
|
-
|
|
26610
|
+
T.push(r), e ? D = !0 : E = r;
|
|
26444
26611
|
}
|
|
26445
|
-
e.contentKind !== null && m &&
|
|
26612
|
+
e.contentKind !== null && m && T.push({
|
|
26446
26613
|
id: "content",
|
|
26447
26614
|
kind: "content",
|
|
26448
26615
|
rect: m.rect,
|
|
@@ -26451,51 +26618,51 @@ function SN(e, t, n, r, i, a) {
|
|
|
26451
26618
|
fit: { kind: "natural" },
|
|
26452
26619
|
region: m.region.name
|
|
26453
26620
|
});
|
|
26454
|
-
let
|
|
26455
|
-
if (
|
|
26456
|
-
let
|
|
26457
|
-
if (
|
|
26621
|
+
let O = wN(C, S.extraEvictions, a.eviction.policy), te = new Set(O.map((e) => e.id));
|
|
26622
|
+
if (w.evictedCardIds = x.filter((e) => !te.has(e.id)).map((e) => e.id), h && O.length > 0) {
|
|
26623
|
+
let n = h.rect, o = t.regions.filter((e) => e.zBase < 100), l = o.length > 1 && o.every((e) => "fraction" in e.width && e.width.fraction === 1), u = aN(n, s, c, i.width, $M(a, r.width).cardsPad), { innerW: d, entries: f } = rN(O, n.width, a, r.width, u, l || e.state === "canvas-dominant" && o.length > 1 ? a.card.stackMaxWidthPx : eN(a, r.width, c)), p = n.x + u.left + Math.round((n.width - u.left - u.right - d) / 2), m = n.height - v * (f.length - 1), g = f.reduce((e, t) => e + t.clampedHeightPx, 0), _;
|
|
26624
|
+
if (g <= m) _ = f.map((e) => e.clampedHeightPx);
|
|
26458
26625
|
else {
|
|
26459
|
-
let e =
|
|
26460
|
-
|
|
26461
|
-
let t =
|
|
26626
|
+
let e = m > 0 ? m / g : 0;
|
|
26627
|
+
_ = f.map((t) => Math.max(a.card.reportedHeightFloorPx, Math.floor(t.clampedHeightPx * e)));
|
|
26628
|
+
let t = _.reduce((e, t) => e + t, 0) - Math.max(0, m);
|
|
26462
26629
|
for (; t > 0;) {
|
|
26463
26630
|
let e = -1;
|
|
26464
|
-
for (let t = 0; t <
|
|
26465
|
-
let n =
|
|
26466
|
-
n > a.card.reportedHeightFloorPx && (e === -1 || n > (
|
|
26631
|
+
for (let t = 0; t < _.length; t++) {
|
|
26632
|
+
let n = _[t] ?? 0;
|
|
26633
|
+
n > a.card.reportedHeightFloorPx && (e === -1 || n > (_[e] ?? 0)) && (e = t);
|
|
26467
26634
|
}
|
|
26468
26635
|
if (e === -1) break;
|
|
26469
|
-
|
|
26636
|
+
_[e] = (_[e] ?? 0) - 1, --t;
|
|
26470
26637
|
}
|
|
26471
26638
|
}
|
|
26472
|
-
let
|
|
26473
|
-
|
|
26474
|
-
let r = Math.min(
|
|
26475
|
-
|
|
26476
|
-
id:
|
|
26639
|
+
let y = _.reduce((e, t) => e + t, 0) + v * (f.length - 1), b = n.y + Math.max(0, Math.round((n.height - y) / 2));
|
|
26640
|
+
f.forEach((e, t) => {
|
|
26641
|
+
let r = Math.min(b, n.y + n.height), i = Math.max(0, Math.min(_[t] ?? 0, n.y + n.height - r)), o = JM(e.clampedHeightPx, i, a), s = e.constraints.hardMinHeightPx;
|
|
26642
|
+
s !== void 0 && i < s && o.kind !== "scroll" && (o = { kind: "scroll" }), T.push({
|
|
26643
|
+
id: e.card.id,
|
|
26477
26644
|
kind: "card",
|
|
26478
|
-
component:
|
|
26479
|
-
cardSizeClass:
|
|
26645
|
+
component: e.card.component,
|
|
26646
|
+
cardSizeClass: e.constraints.sizeClass,
|
|
26480
26647
|
rect: {
|
|
26481
|
-
x:
|
|
26648
|
+
x: p,
|
|
26482
26649
|
y: r,
|
|
26483
|
-
width:
|
|
26650
|
+
width: d,
|
|
26484
26651
|
height: i
|
|
26485
26652
|
},
|
|
26486
26653
|
layer: "grid",
|
|
26487
|
-
order: h.region.zBase +
|
|
26488
|
-
fit:
|
|
26654
|
+
order: h.region.zBase + t,
|
|
26655
|
+
fit: o,
|
|
26489
26656
|
region: h.region.name
|
|
26490
|
-
}),
|
|
26657
|
+
}), b = r + i + v;
|
|
26491
26658
|
});
|
|
26492
26659
|
}
|
|
26493
|
-
let
|
|
26494
|
-
if (h === void 0 && _ !== void 0 &&
|
|
26660
|
+
let k = null;
|
|
26661
|
+
if (h === void 0 && _ !== void 0 && O.length > 0) {
|
|
26495
26662
|
let e = {
|
|
26496
26663
|
width: Math.max(0, i.width - 2 * c),
|
|
26497
26664
|
height: Math.max(0, i.height - 2 * c)
|
|
26498
|
-
}, t =
|
|
26665
|
+
}, t = lN(_, e, a), o = _.sheetAnchor === "bottom", s = $M(a, r.width).cardsPad, l = o ? Math.min(u, n.callControlsRect?.y ?? u) - s : u, f = t.x + c, p = d !== null && gN({
|
|
26499
26666
|
...t,
|
|
26500
26667
|
x: f
|
|
26501
26668
|
}, d) ? d.y - 8 : l, m = Math.min(l, p), h = {
|
|
@@ -26503,12 +26670,18 @@ function SN(e, t, n, r, i, a) {
|
|
|
26503
26670
|
y: t.y + c,
|
|
26504
26671
|
width: t.width,
|
|
26505
26672
|
height: Math.max(0, Math.min(t.height, m - (t.y + c)))
|
|
26506
|
-
}, { innerW: g, entries: v } =
|
|
26673
|
+
}, { innerW: g, entries: v } = rN(O, h.width, a, r.width, o ? {
|
|
26674
|
+
left: s,
|
|
26675
|
+
right: s
|
|
26676
|
+
} : {
|
|
26677
|
+
left: 0,
|
|
26678
|
+
right: 0
|
|
26679
|
+
}, a.card.stackMaxWidthPx), y = v[0];
|
|
26507
26680
|
if (y !== void 0) {
|
|
26508
26681
|
let e = h.x + Math.round((h.width - g) / 2), t = Math.max(0, Math.min(y.clampedHeightPx, h.height)), n = JM(y.clampedHeightPx, t, a);
|
|
26509
26682
|
o && y.constraints.naturalHeightPx > t && (n = { kind: "scroll" });
|
|
26510
26683
|
let r = y.constraints.hardMinHeightPx;
|
|
26511
|
-
r !== void 0 && t < r && n.kind !== "scroll" && (n = { kind: "scroll" }),
|
|
26684
|
+
r !== void 0 && t < r && n.kind !== "scroll" && (n = { kind: "scroll" }), k = {
|
|
26512
26685
|
id: y.card.id,
|
|
26513
26686
|
kind: "card",
|
|
26514
26687
|
component: y.card.component,
|
|
@@ -26525,26 +26698,26 @@ function SN(e, t, n, r, i, a) {
|
|
|
26525
26698
|
region: _.name,
|
|
26526
26699
|
sheet: !0,
|
|
26527
26700
|
...o && { sheetAnchor: "bottom" }
|
|
26528
|
-
},
|
|
26701
|
+
}, T.push(k);
|
|
26529
26702
|
}
|
|
26530
26703
|
}
|
|
26531
|
-
if (!
|
|
26532
|
-
if (o &&
|
|
26704
|
+
if (!D) {
|
|
26705
|
+
if (o && S.selfViewDropped) w.selfViewDropped = !0;
|
|
26533
26706
|
else if (o) {
|
|
26534
|
-
let t = e.suppressedPrefs.includes("pipCorner") ?
|
|
26707
|
+
let t = e.suppressedPrefs.includes("pipCorner") ? pN : n.prefs.pipCorner ?? "bottom-left", o = n.callControlsVisible === !1 ? null : n.callControlsRect ?? (l > 0 ? {
|
|
26535
26708
|
x: 0,
|
|
26536
26709
|
y: u,
|
|
26537
26710
|
width: i.width,
|
|
26538
26711
|
height: l
|
|
26539
26712
|
} : null), s = [
|
|
26540
26713
|
...o === null ? [] : [o],
|
|
26541
|
-
...
|
|
26714
|
+
...k === null ? [] : [k.rect],
|
|
26542
26715
|
...d === null ? [] : [d],
|
|
26543
26716
|
...n.chromeObstacles ?? []
|
|
26544
26717
|
];
|
|
26545
|
-
if (
|
|
26546
|
-
let e =
|
|
26547
|
-
o !== null && c && l <= a.pip.maxAreaRatio ?
|
|
26718
|
+
if (E) {
|
|
26719
|
+
let e = E.rect, n = bN(e, y, a, r.width === "compact"), i = n === null ? null : vN(e, t, y, n.w, n.h), o = i === null ? null : CN(i, s, y), c = n !== null && o !== null && o.y >= e.y && n.w + y <= e.width && n.h + y <= e.height, l = n !== null && e.width > 0 && e.height > 0 ? n.w * n.h / (e.width * e.height) : Infinity;
|
|
26720
|
+
o !== null && c && l <= a.pip.maxAreaRatio ? T.push({
|
|
26548
26721
|
id: "selfView",
|
|
26549
26722
|
kind: "selfView",
|
|
26550
26723
|
rect: o,
|
|
@@ -26552,15 +26725,15 @@ function SN(e, t, n, r, i, a) {
|
|
|
26552
26725
|
order: g?.zBase ?? 100,
|
|
26553
26726
|
fit: { kind: "natural" },
|
|
26554
26727
|
region: g?.name ?? "pip"
|
|
26555
|
-
}) :
|
|
26728
|
+
}) : w.selfViewDropped = !0;
|
|
26556
26729
|
} else {
|
|
26557
26730
|
let e = a.pip.minWidthPx, n = r.width === "compact" ? e : Math.round(e * 9 / 16), o = {
|
|
26558
26731
|
x: 0,
|
|
26559
26732
|
y: 0,
|
|
26560
26733
|
width: i.width,
|
|
26561
26734
|
height: i.height
|
|
26562
|
-
}, c =
|
|
26563
|
-
l && !u ?
|
|
26735
|
+
}, c = CN(vN(o, t, y, e, n), s, y), l = c.y >= 0 && e + y <= o.width && n + y <= o.height, u = T.some((e) => (e.kind === "content" || e.kind === "card") && YM(e.rect, c));
|
|
26736
|
+
l && !u ? T.push({
|
|
26564
26737
|
id: "selfView",
|
|
26565
26738
|
kind: "selfView",
|
|
26566
26739
|
rect: c,
|
|
@@ -26568,45 +26741,45 @@ function SN(e, t, n, r, i, a) {
|
|
|
26568
26741
|
order: g?.zBase ?? 100,
|
|
26569
26742
|
fit: { kind: "natural" },
|
|
26570
26743
|
region: g?.name ?? "pip"
|
|
26571
|
-
}) :
|
|
26744
|
+
}) : w.selfViewDropped = !0;
|
|
26572
26745
|
}
|
|
26573
26746
|
}
|
|
26574
26747
|
}
|
|
26575
26748
|
return {
|
|
26576
|
-
tiles:
|
|
26577
|
-
degradations:
|
|
26749
|
+
tiles: T,
|
|
26750
|
+
degradations: w,
|
|
26578
26751
|
statusStrip: d
|
|
26579
26752
|
};
|
|
26580
|
-
},
|
|
26753
|
+
}, T = {
|
|
26581
26754
|
extraEvictions: 0,
|
|
26582
26755
|
selfViewDropped: !1,
|
|
26583
26756
|
replicaCollapsed: !1
|
|
26584
|
-
},
|
|
26757
|
+
}, E = w(T), D = ZM(E.tiles, i, a, d);
|
|
26585
26758
|
for (let e of a.degradationLadder) {
|
|
26586
|
-
if (
|
|
26587
|
-
if (e === "evict-cards") for (;
|
|
26588
|
-
...
|
|
26589
|
-
extraEvictions:
|
|
26590
|
-
},
|
|
26591
|
-
else e === "drop-self-view" ?
|
|
26592
|
-
...
|
|
26759
|
+
if (D.length === 0) break;
|
|
26760
|
+
if (e === "evict-cards") for (; D.length > 0 && T.extraEvictions < C.length;) T = {
|
|
26761
|
+
...T,
|
|
26762
|
+
extraEvictions: T.extraEvictions + 1
|
|
26763
|
+
}, E = w(T), D = ZM(E.tiles, i, a, d);
|
|
26764
|
+
else e === "drop-self-view" ? E.tiles.some((e) => e.kind === "selfView") && (T = {
|
|
26765
|
+
...T,
|
|
26593
26766
|
selfViewDropped: !0
|
|
26594
|
-
},
|
|
26595
|
-
...
|
|
26767
|
+
}, E = w(T), D = ZM(E.tiles, i, a, d)) : e === "collapse-replica" && !T.replicaCollapsed && E.tiles.some((e) => e.kind === "replica") && (T = {
|
|
26768
|
+
...T,
|
|
26596
26769
|
replicaCollapsed: !0
|
|
26597
|
-
},
|
|
26770
|
+
}, E = w(T), D = ZM(E.tiles, i, a, d));
|
|
26598
26771
|
}
|
|
26599
|
-
return
|
|
26772
|
+
return E;
|
|
26600
26773
|
}
|
|
26601
26774
|
//#endregion
|
|
26602
26775
|
//#region ../../node_modules/@tavus-engineering/magic-grid-core/dist/resolveCore.js
|
|
26603
|
-
function
|
|
26776
|
+
function DN(e) {
|
|
26604
26777
|
if (e !== void 0 && e.length !== 0) return {
|
|
26605
26778
|
...PM,
|
|
26606
26779
|
...Object.fromEntries(e.map((e) => [e.id, e]))
|
|
26607
26780
|
};
|
|
26608
26781
|
}
|
|
26609
|
-
function
|
|
26782
|
+
function ON(e, t, n, r) {
|
|
26610
26783
|
let i = e.callControlsRect, a = i === void 0 ? e : {
|
|
26611
26784
|
...e,
|
|
26612
26785
|
callControlsRect: {
|
|
@@ -26618,7 +26791,7 @@ function wN(e, t, n, r) {
|
|
|
26618
26791
|
}, o = {
|
|
26619
26792
|
width: Math.max(0, Math.round(a.container.widthPx)),
|
|
26620
26793
|
height: Math.max(0, Math.round(a.container.heightPx))
|
|
26621
|
-
}, s = RM(a, t, n), c = a.replica || a.selfView && a.prefs.hideSelfView !== !0, l = LM(s.state, t,
|
|
26794
|
+
}, s = RM(a, t, n), c = a.replica || a.selfView && a.prefs.hideSelfView !== !0, l = LM(s.state, t, DN(r?.templates), void 0, c, a.kioskMode === !0), { tiles: u, degradations: d, statusStrip: f } = EN(s, l, a, t, o, n);
|
|
26622
26795
|
return {
|
|
26623
26796
|
state: s.state,
|
|
26624
26797
|
sizeClass: t,
|
|
@@ -26632,32 +26805,32 @@ function wN(e, t, n, r) {
|
|
|
26632
26805
|
}
|
|
26633
26806
|
//#endregion
|
|
26634
26807
|
//#region ../../node_modules/@tavus-engineering/magic-grid-core/dist/transitions.js
|
|
26635
|
-
var
|
|
26808
|
+
var kN = {
|
|
26636
26809
|
compact: 0,
|
|
26637
26810
|
medium: 1,
|
|
26638
26811
|
expanded: 2
|
|
26639
26812
|
};
|
|
26640
|
-
function
|
|
26813
|
+
function AN(e, t) {
|
|
26641
26814
|
return e.width === t.width && e.height === t.height && e.composition === t.composition;
|
|
26642
26815
|
}
|
|
26643
|
-
function
|
|
26816
|
+
function jN(e, t, n, r, i) {
|
|
26644
26817
|
let a = e.committedClass;
|
|
26645
26818
|
if (a === null || a.composition === void 0) return {
|
|
26646
26819
|
committedClass: t,
|
|
26647
26820
|
pendingClass: null,
|
|
26648
26821
|
pendingSinceMs: null
|
|
26649
26822
|
};
|
|
26650
|
-
if (
|
|
26823
|
+
if (AN(t, a)) return {
|
|
26651
26824
|
committedClass: a,
|
|
26652
26825
|
pendingClass: null,
|
|
26653
26826
|
pendingSinceMs: null
|
|
26654
26827
|
};
|
|
26655
|
-
let o = Math.abs(
|
|
26828
|
+
let o = Math.abs(kN[t.width] - kN[a.width]), s = e.lastResolution?.containerPx;
|
|
26656
26829
|
return o > 1 || s === void 0 || Math.max(Math.abs(Math.round(n.widthPx) - s.width), Math.abs(Math.round(n.heightPx) - s.height)) >= i.hysteresis.decisiveJumpPxDelta ? {
|
|
26657
26830
|
committedClass: t,
|
|
26658
26831
|
pendingClass: null,
|
|
26659
26832
|
pendingSinceMs: null
|
|
26660
|
-
} : e.pendingClass !== null && e.pendingSinceMs !== null &&
|
|
26833
|
+
} : e.pendingClass !== null && e.pendingSinceMs !== null && AN(e.pendingClass, t) ? r - e.pendingSinceMs >= i.hysteresis.windowMs ? {
|
|
26661
26834
|
committedClass: t,
|
|
26662
26835
|
pendingClass: null,
|
|
26663
26836
|
pendingSinceMs: null
|
|
@@ -26671,15 +26844,15 @@ function DN(e, t, n, r, i) {
|
|
|
26671
26844
|
pendingSinceMs: r
|
|
26672
26845
|
};
|
|
26673
26846
|
}
|
|
26674
|
-
var
|
|
26675
|
-
function
|
|
26847
|
+
var MN = (e, t) => e < t ? -1 : +(e > t);
|
|
26848
|
+
function NN(e, t) {
|
|
26676
26849
|
let n = new Map((e?.tiles ?? []).map((e) => [e.id, e])), r = new Map(t.tiles.map((e) => [e.id, e])), i = [];
|
|
26677
|
-
for (let e of [...n.keys()].sort(
|
|
26850
|
+
for (let e of [...n.keys()].sort(MN)) r.has(e) || i.push({
|
|
26678
26851
|
type: "exit",
|
|
26679
26852
|
tileId: e
|
|
26680
26853
|
});
|
|
26681
26854
|
let a = [], o = [], s = [];
|
|
26682
|
-
for (let e of [...r.keys()].sort(
|
|
26855
|
+
for (let e of [...r.keys()].sort(MN)) {
|
|
26683
26856
|
let t = n.get(e);
|
|
26684
26857
|
if (t === void 0) {
|
|
26685
26858
|
a.push({
|
|
@@ -26721,11 +26894,11 @@ function kN(e, t) {
|
|
|
26721
26894
|
...s
|
|
26722
26895
|
];
|
|
26723
26896
|
}
|
|
26724
|
-
function
|
|
26725
|
-
let a =
|
|
26897
|
+
function PN(e, t, n, r, i) {
|
|
26898
|
+
let a = jN(e, NM(t.container, r), t.container, n, r), o = ON(t, a.committedClass, r, i);
|
|
26726
26899
|
return {
|
|
26727
26900
|
resolution: o,
|
|
26728
|
-
transitions:
|
|
26901
|
+
transitions: NN(e.lastResolution, o),
|
|
26729
26902
|
nextState: {
|
|
26730
26903
|
committedClass: a.committedClass,
|
|
26731
26904
|
pendingClass: a.pendingClass,
|
|
@@ -26736,26 +26909,26 @@ function AN(e, t, n, r, i) {
|
|
|
26736
26909
|
}
|
|
26737
26910
|
//#endregion
|
|
26738
26911
|
//#region ../../node_modules/@tavus-engineering/magic-grid-core/dist/index.js
|
|
26739
|
-
var
|
|
26912
|
+
var FN = "0.1.16", IN = jM, LN = (() => {
|
|
26740
26913
|
try {
|
|
26741
26914
|
return new URLSearchParams(globalThis.location?.search ?? "").get("grid_enabled") === "1";
|
|
26742
26915
|
} catch {
|
|
26743
26916
|
return !1;
|
|
26744
26917
|
}
|
|
26745
|
-
})(),
|
|
26918
|
+
})(), RN = (() => {
|
|
26746
26919
|
try {
|
|
26747
26920
|
return new URLSearchParams(globalThis.location?.search ?? "").get("grid_debug") === "1";
|
|
26748
26921
|
} catch {
|
|
26749
26922
|
return !1;
|
|
26750
26923
|
}
|
|
26751
26924
|
})();
|
|
26752
|
-
function
|
|
26753
|
-
return
|
|
26925
|
+
function zN(e, t) {
|
|
26926
|
+
return LN || e === !0 || t === !0;
|
|
26754
26927
|
}
|
|
26755
|
-
function
|
|
26928
|
+
function BN(e = globalThis.location?.search ?? "") {
|
|
26756
26929
|
return new URLSearchParams(e).get("kiosk") === "1";
|
|
26757
26930
|
}
|
|
26758
|
-
function
|
|
26931
|
+
function VN({ kioskMode: e = !1, instances: t, viewport: n, presence: r, callControlsBandPx: i, callControlsVisible: a, callControlsRect: o, statusStripId: s, statusStripHeightPx: c, reportedHeights: l }) {
|
|
26759
26932
|
return {
|
|
26760
26933
|
kioskMode: e,
|
|
26761
26934
|
container: {
|
|
@@ -26782,15 +26955,15 @@ function LN({ kioskMode: e = !1, instances: t, viewport: n, presence: r, callCon
|
|
|
26782
26955
|
} }
|
|
26783
26956
|
};
|
|
26784
26957
|
}
|
|
26785
|
-
var
|
|
26786
|
-
function
|
|
26787
|
-
|
|
26958
|
+
var HN = 16, UN = 200, WN = It(null);
|
|
26959
|
+
function GN(e) {
|
|
26960
|
+
WN.peek() === null && (console.error("Magic Grid engine error; rendering the legacy layout.", e), WN.value = (e instanceof Error ? `${e.name}: ${e.message}` : String(e)).slice(0, UN));
|
|
26788
26961
|
}
|
|
26789
|
-
function
|
|
26790
|
-
|
|
26962
|
+
function KN() {
|
|
26963
|
+
WN.peek() !== null && (WN.value = null);
|
|
26791
26964
|
}
|
|
26792
|
-
function
|
|
26793
|
-
let u = P(
|
|
26965
|
+
function qN({ kioskMode: e = !1, instances: t, viewport: n, presence: r, callControlsBandPx: i, callControlsVisible: a, callControlsRect: o, statusStripId: s, statusStripHeightPx: c, enabled: l }) {
|
|
26966
|
+
let u = P(IN), d = P(null), [f, p] = M({}), [m, h] = M(null), g = I((e, t) => {
|
|
26794
26967
|
l && p((n) => n[e] === t ? n : {
|
|
26795
26968
|
...n,
|
|
26796
26969
|
[e]: t
|
|
@@ -26803,7 +26976,7 @@ function UN({ kioskMode: e = !1, instances: t, viewport: n, presence: r, callCon
|
|
|
26803
26976
|
return Object.keys(r).length === Object.keys(e).length ? e : r;
|
|
26804
26977
|
});
|
|
26805
26978
|
}, [t]);
|
|
26806
|
-
let _ = F(() =>
|
|
26979
|
+
let _ = F(() => VN({
|
|
26807
26980
|
kioskMode: e,
|
|
26808
26981
|
instances: t,
|
|
26809
26982
|
viewport: n,
|
|
@@ -26827,20 +27000,20 @@ function UN({ kioskMode: e = !1, instances: t, viewport: n, presence: r, callCon
|
|
|
26827
27000
|
f
|
|
26828
27001
|
]);
|
|
26829
27002
|
return N(() => {
|
|
26830
|
-
if (!l ||
|
|
27003
|
+
if (!l || WN.peek() !== null) return;
|
|
26831
27004
|
d.current === null && (d.current = Date.now());
|
|
26832
27005
|
let e = null, t = () => {
|
|
26833
|
-
if (e = null,
|
|
27006
|
+
if (e = null, WN.peek() !== null) return;
|
|
26834
27007
|
let n = Date.now() - (d.current ?? 0), r;
|
|
26835
27008
|
try {
|
|
26836
|
-
r =
|
|
27009
|
+
r = PN(u.current, _, n, MM);
|
|
26837
27010
|
} catch (e) {
|
|
26838
|
-
|
|
27011
|
+
GN(e);
|
|
26839
27012
|
return;
|
|
26840
27013
|
}
|
|
26841
27014
|
if (u.current = r.nextState, h(r), r.nextState.pendingClass !== null) {
|
|
26842
27015
|
let i = r.nextState.pendingSinceMs === null ? 0 : Math.max(0, n - r.nextState.pendingSinceMs);
|
|
26843
|
-
e = setTimeout(t, Math.max(
|
|
27016
|
+
e = setTimeout(t, Math.max(HN, MM.hysteresis.windowMs - i + HN));
|
|
26844
27017
|
}
|
|
26845
27018
|
};
|
|
26846
27019
|
return t(), () => {
|
|
@@ -26854,18 +27027,18 @@ function UN({ kioskMode: e = !1, instances: t, viewport: n, presence: r, callCon
|
|
|
26854
27027
|
recordNaturalHeight: g
|
|
26855
27028
|
};
|
|
26856
27029
|
}
|
|
26857
|
-
function
|
|
27030
|
+
function JN(e) {
|
|
26858
27031
|
return e.kind === "card" && e.sheet === !0 && e.sheetAnchor === "bottom";
|
|
26859
27032
|
}
|
|
26860
|
-
function
|
|
26861
|
-
return n ? e === null ? "no-presence" : t.hasPersonaVideo ? e.degradations.evictedCardIds.length > 0 ? "card-dropped" : e.tiles.some((e) => e.kind === "card" && e.fit.kind === "scroll" && !
|
|
27033
|
+
function YN(e, t, n) {
|
|
27034
|
+
return n ? e === null ? "no-presence" : t.hasPersonaVideo ? e.degradations.evictedCardIds.length > 0 ? "card-dropped" : e.tiles.some((e) => e.kind === "card" && e.fit.kind === "scroll" && !JN(e)) ? "card-overflow" : e.degradations.statusStripDropped === !0 ? "status-strip-dropped" : null : "no-persona-video" : "flag-off";
|
|
26862
27035
|
}
|
|
26863
|
-
function
|
|
27036
|
+
function XN(e, t) {
|
|
26864
27037
|
if (t !== null || e === null) return null;
|
|
26865
|
-
let n = e.tiles.find((e) => e.kind === "card" && e.sheet === !0 && !
|
|
27038
|
+
let n = e.tiles.find((e) => e.kind === "card" && e.sheet === !0 && !JN(e));
|
|
26866
27039
|
return n === void 0 ? null : n.rect.y + n.rect.height;
|
|
26867
27040
|
}
|
|
26868
|
-
var
|
|
27041
|
+
var ZN = {
|
|
26869
27042
|
driving: !1,
|
|
26870
27043
|
containerPx: null,
|
|
26871
27044
|
replica: null,
|
|
@@ -26873,10 +27046,10 @@ var qN = {
|
|
|
26873
27046
|
content: null,
|
|
26874
27047
|
replicaCollapsed: !1
|
|
26875
27048
|
};
|
|
26876
|
-
function
|
|
26877
|
-
if (e === null) return
|
|
27049
|
+
function QN(e, t, n) {
|
|
27050
|
+
if (e === null) return ZN;
|
|
26878
27051
|
let r = t === null;
|
|
26879
|
-
if (!r && !(t === "no-persona-video" && n)) return
|
|
27052
|
+
if (!r && !(t === "no-persona-video" && n)) return ZN;
|
|
26880
27053
|
let i = (t) => e.tiles.find((e) => e.kind === t)?.rect ?? null;
|
|
26881
27054
|
return {
|
|
26882
27055
|
driving: r,
|
|
@@ -26887,34 +27060,34 @@ function JN(e, t, n) {
|
|
|
26887
27060
|
replicaCollapsed: r ? e.degradations.replicaCollapsed : !1
|
|
26888
27061
|
};
|
|
26889
27062
|
}
|
|
26890
|
-
function
|
|
27063
|
+
function $N(e) {
|
|
26891
27064
|
return e.selfView === null ? e.driving ? "hidden" : "legacy" : "engine";
|
|
26892
27065
|
}
|
|
26893
|
-
function
|
|
27066
|
+
function eP(e, t) {
|
|
26894
27067
|
return e.containerPx === null || t.containerPx === null ? !1 : e.containerPx.width === t.containerPx.width && e.containerPx.height === t.containerPx.height;
|
|
26895
27068
|
}
|
|
26896
27069
|
//#endregion
|
|
26897
27070
|
//#region ../core/src/magic-canvas/grid-composition.ts
|
|
26898
|
-
function
|
|
27071
|
+
function tP(e) {
|
|
26899
27072
|
let t = "composition" in e ? e.composition : void 0;
|
|
26900
27073
|
return t === "stacked" || t === "side-by-side" ? t : void 0;
|
|
26901
27074
|
}
|
|
26902
27075
|
//#endregion
|
|
26903
27076
|
//#region ../core/src/magic-canvas/grid-telemetry.ts
|
|
26904
|
-
var
|
|
26905
|
-
function
|
|
27077
|
+
var nP = "conversation.grid_status", rP = 6e4;
|
|
27078
|
+
function iP(e, t, n) {
|
|
26906
27079
|
return n ? e && t ? "url+config+start" : e ? "url+start" : t ? "config+start" : "start" : e && t ? "both" : e ? "url" : "config";
|
|
26907
27080
|
}
|
|
26908
|
-
function
|
|
27081
|
+
function aP(e, t) {
|
|
26909
27082
|
return {
|
|
26910
27083
|
message_type: "conversation",
|
|
26911
|
-
event_type:
|
|
27084
|
+
event_type: nP,
|
|
26912
27085
|
conversation_id: e,
|
|
26913
27086
|
properties: t
|
|
26914
27087
|
};
|
|
26915
27088
|
}
|
|
26916
|
-
function
|
|
26917
|
-
let t =
|
|
27089
|
+
function oP(e) {
|
|
27090
|
+
let t = tP(e.sizeClass);
|
|
26918
27091
|
return {
|
|
26919
27092
|
template_id: e.templateId,
|
|
26920
27093
|
size_class: `${e.sizeClass.width}/${e.sizeClass.height}`,
|
|
@@ -26926,8 +27099,8 @@ function nP(e) {
|
|
|
26926
27099
|
cards: e.tiles.filter((e) => e.kind === "card").length
|
|
26927
27100
|
};
|
|
26928
27101
|
}
|
|
26929
|
-
function
|
|
26930
|
-
let { send: t, enabledVia: n, engineVersion: r =
|
|
27102
|
+
function sP(e) {
|
|
27103
|
+
let { send: t, enabledVia: n, engineVersion: r = FN, now: i = Date.now, transitionDebounceMs: a = 500, summaryIntervalMs: o = rP } = e, s = i(), c = !1, l = !1, u, d = null, f = null, p = !1, m = null, h = 0, g = 0, _ = {}, v = null, y = (e) => {
|
|
26931
27104
|
try {
|
|
26932
27105
|
t(e);
|
|
26933
27106
|
} catch {}
|
|
@@ -26964,7 +27137,7 @@ function rP(e) {
|
|
|
26964
27137
|
return {
|
|
26965
27138
|
update(e, t) {
|
|
26966
27139
|
if (c) return;
|
|
26967
|
-
t !== null && (v =
|
|
27140
|
+
t !== null && (v = oP(t));
|
|
26968
27141
|
let n = f === null ? u : d;
|
|
26969
27142
|
(n === void 0 || e !== n) && (d = e, f !== null && clearTimeout(f), f = setTimeout(() => x(e), a));
|
|
26970
27143
|
},
|
|
@@ -26979,7 +27152,7 @@ function rP(e) {
|
|
|
26979
27152
|
}
|
|
26980
27153
|
};
|
|
26981
27154
|
}
|
|
26982
|
-
function
|
|
27155
|
+
function cP({ enabled: e, enabledVia: t, bail: n, resolution: r, engineError: i }) {
|
|
26983
27156
|
let a = Yf(), o = Xf(), s = L(rh), c = P({
|
|
26984
27157
|
daily: a,
|
|
26985
27158
|
meetingState: o,
|
|
@@ -26993,7 +27166,7 @@ function iP({ enabled: e, enabledVia: t, bail: n, resolution: r, engineError: i
|
|
|
26993
27166
|
let l = P(null);
|
|
26994
27167
|
N(() => {
|
|
26995
27168
|
if (!e) return;
|
|
26996
|
-
let n =
|
|
27169
|
+
let n = sP({
|
|
26997
27170
|
enabledVia: t,
|
|
26998
27171
|
send: (e) => {
|
|
26999
27172
|
try {
|
|
@@ -27001,7 +27174,7 @@ function iP({ enabled: e, enabledVia: t, bail: n, resolution: r, engineError: i
|
|
|
27001
27174
|
if (!t.daily || t.meetingState !== "joined-meeting") return;
|
|
27002
27175
|
let n = t.conversation?.session.peek()?.conversationId;
|
|
27003
27176
|
if (!n) return;
|
|
27004
|
-
t.daily.sendAppMessage(
|
|
27177
|
+
t.daily.sendAppMessage(aP(n, e), "*");
|
|
27005
27178
|
} catch {}
|
|
27006
27179
|
}
|
|
27007
27180
|
});
|
|
@@ -27016,100 +27189,100 @@ function iP({ enabled: e, enabledVia: t, bail: n, resolution: r, engineError: i
|
|
|
27016
27189
|
}
|
|
27017
27190
|
//#endregion
|
|
27018
27191
|
//#region ../../node_modules/tailwind-merge/dist/bundle-mjs.mjs
|
|
27019
|
-
var
|
|
27192
|
+
var lP = (e, t) => {
|
|
27020
27193
|
let n = Array(e.length + t.length);
|
|
27021
27194
|
for (let t = 0; t < e.length; t++) n[t] = e[t];
|
|
27022
27195
|
for (let r = 0; r < t.length; r++) n[e.length + r] = t[r];
|
|
27023
27196
|
return n;
|
|
27024
|
-
},
|
|
27197
|
+
}, uP = (e, t) => ({
|
|
27025
27198
|
classGroupId: e,
|
|
27026
27199
|
validator: t
|
|
27027
|
-
}),
|
|
27200
|
+
}), dP = (e = /* @__PURE__ */ new Map(), t = null, n) => ({
|
|
27028
27201
|
nextPart: e,
|
|
27029
27202
|
validators: t,
|
|
27030
27203
|
classGroupId: n
|
|
27031
|
-
}),
|
|
27032
|
-
let t =
|
|
27204
|
+
}), fP = "-", pP = [], mP = "arbitrary..", hP = (e) => {
|
|
27205
|
+
let t = vP(e), { conflictingClassGroups: n, conflictingClassGroupModifiers: r } = e;
|
|
27033
27206
|
return {
|
|
27034
27207
|
getClassGroupId: (e) => {
|
|
27035
|
-
if (e.startsWith("[") && e.endsWith("]")) return
|
|
27036
|
-
let n = e.split(
|
|
27037
|
-
return
|
|
27208
|
+
if (e.startsWith("[") && e.endsWith("]")) return _P(e);
|
|
27209
|
+
let n = e.split(fP);
|
|
27210
|
+
return gP(n, +(n[0] === "" && n.length > 1), t);
|
|
27038
27211
|
},
|
|
27039
27212
|
getConflictingClassGroupIds: (e, t) => {
|
|
27040
27213
|
if (t) {
|
|
27041
27214
|
let t = r[e], i = n[e];
|
|
27042
|
-
return t ? i ?
|
|
27215
|
+
return t ? i ? lP(i, t) : t : i || pP;
|
|
27043
27216
|
}
|
|
27044
|
-
return n[e] ||
|
|
27217
|
+
return n[e] || pP;
|
|
27045
27218
|
}
|
|
27046
27219
|
};
|
|
27047
|
-
},
|
|
27220
|
+
}, gP = (e, t, n) => {
|
|
27048
27221
|
if (e.length - t === 0) return n.classGroupId;
|
|
27049
27222
|
let r = e[t], i = n.nextPart.get(r);
|
|
27050
27223
|
if (i) {
|
|
27051
|
-
let n =
|
|
27224
|
+
let n = gP(e, t + 1, i);
|
|
27052
27225
|
if (n) return n;
|
|
27053
27226
|
}
|
|
27054
27227
|
let a = n.validators;
|
|
27055
27228
|
if (a === null) return;
|
|
27056
|
-
let o = t === 0 ? e.join(
|
|
27229
|
+
let o = t === 0 ? e.join(fP) : e.slice(t).join(fP), s = a.length;
|
|
27057
27230
|
for (let e = 0; e < s; e++) {
|
|
27058
27231
|
let t = a[e];
|
|
27059
27232
|
if (t.validator(o)) return t.classGroupId;
|
|
27060
27233
|
}
|
|
27061
|
-
},
|
|
27234
|
+
}, _P = (e) => e.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
|
|
27062
27235
|
let t = e.slice(1, -1), n = t.indexOf(":"), r = t.slice(0, n);
|
|
27063
|
-
return r ?
|
|
27064
|
-
})(),
|
|
27236
|
+
return r ? mP + r : void 0;
|
|
27237
|
+
})(), vP = (e) => {
|
|
27065
27238
|
let { theme: t, classGroups: n } = e;
|
|
27066
|
-
return
|
|
27067
|
-
},
|
|
27068
|
-
let n =
|
|
27239
|
+
return yP(n, t);
|
|
27240
|
+
}, yP = (e, t) => {
|
|
27241
|
+
let n = dP();
|
|
27069
27242
|
for (let r in e) {
|
|
27070
27243
|
let i = e[r];
|
|
27071
|
-
|
|
27244
|
+
bP(i, n, r, t);
|
|
27072
27245
|
}
|
|
27073
27246
|
return n;
|
|
27074
|
-
},
|
|
27247
|
+
}, bP = (e, t, n, r) => {
|
|
27075
27248
|
let i = e.length;
|
|
27076
27249
|
for (let a = 0; a < i; a++) {
|
|
27077
27250
|
let i = e[a];
|
|
27078
|
-
|
|
27251
|
+
xP(i, t, n, r);
|
|
27079
27252
|
}
|
|
27080
|
-
},
|
|
27253
|
+
}, xP = (e, t, n, r) => {
|
|
27081
27254
|
if (typeof e == "string") {
|
|
27082
|
-
|
|
27255
|
+
SP(e, t, n);
|
|
27083
27256
|
return;
|
|
27084
27257
|
}
|
|
27085
27258
|
if (typeof e == "function") {
|
|
27086
|
-
|
|
27259
|
+
CP(e, t, n, r);
|
|
27087
27260
|
return;
|
|
27088
27261
|
}
|
|
27089
|
-
|
|
27090
|
-
},
|
|
27091
|
-
let r = e === "" ? t :
|
|
27262
|
+
wP(e, t, n, r);
|
|
27263
|
+
}, SP = (e, t, n) => {
|
|
27264
|
+
let r = e === "" ? t : TP(t, e);
|
|
27092
27265
|
r.classGroupId = n;
|
|
27093
|
-
},
|
|
27094
|
-
if (
|
|
27095
|
-
|
|
27266
|
+
}, CP = (e, t, n, r) => {
|
|
27267
|
+
if (EP(e)) {
|
|
27268
|
+
bP(e(r), t, n, r);
|
|
27096
27269
|
return;
|
|
27097
27270
|
}
|
|
27098
|
-
t.validators === null && (t.validators = []), t.validators.push(
|
|
27099
|
-
},
|
|
27271
|
+
t.validators === null && (t.validators = []), t.validators.push(uP(n, e));
|
|
27272
|
+
}, wP = (e, t, n, r) => {
|
|
27100
27273
|
let i = Object.entries(e), a = i.length;
|
|
27101
27274
|
for (let e = 0; e < a; e++) {
|
|
27102
27275
|
let [a, o] = i[e];
|
|
27103
|
-
|
|
27276
|
+
bP(o, TP(t, a), n, r);
|
|
27104
27277
|
}
|
|
27105
|
-
},
|
|
27106
|
-
let n = e, r = t.split(
|
|
27278
|
+
}, TP = (e, t) => {
|
|
27279
|
+
let n = e, r = t.split(fP), i = r.length;
|
|
27107
27280
|
for (let e = 0; e < i; e++) {
|
|
27108
27281
|
let t = r[e], i = n.nextPart.get(t);
|
|
27109
|
-
i || (i =
|
|
27282
|
+
i || (i = dP(), n.nextPart.set(t, i)), n = i;
|
|
27110
27283
|
}
|
|
27111
27284
|
return n;
|
|
27112
|
-
},
|
|
27285
|
+
}, EP = (e) => "isThemeGetter" in e && e.isThemeGetter === !0, DP = (e) => {
|
|
27113
27286
|
if (e < 1) return {
|
|
27114
27287
|
get: () => void 0,
|
|
27115
27288
|
set: () => {}
|
|
@@ -27127,19 +27300,19 @@ var aP = (e, t) => {
|
|
|
27127
27300
|
e in n ? n[e] = t : i(e, t);
|
|
27128
27301
|
}
|
|
27129
27302
|
};
|
|
27130
|
-
},
|
|
27303
|
+
}, OP = "!", kP = ":", AP = [], jP = (e, t, n, r, i) => ({
|
|
27131
27304
|
modifiers: e,
|
|
27132
27305
|
hasImportantModifier: t,
|
|
27133
27306
|
baseClassName: n,
|
|
27134
27307
|
maybePostfixModifierPosition: r,
|
|
27135
27308
|
isExternal: i
|
|
27136
|
-
}),
|
|
27309
|
+
}), MP = (e) => {
|
|
27137
27310
|
let { prefix: t, experimentalParseClassName: n } = e, r = (e) => {
|
|
27138
27311
|
let t = [], n = 0, r = 0, i = 0, a, o = e.length;
|
|
27139
27312
|
for (let s = 0; s < o; s++) {
|
|
27140
27313
|
let o = e[s];
|
|
27141
27314
|
if (n === 0 && r === 0) {
|
|
27142
|
-
if (o ===
|
|
27315
|
+
if (o === kP) {
|
|
27143
27316
|
t.push(e.slice(i, s)), i = s + 1;
|
|
27144
27317
|
continue;
|
|
27145
27318
|
}
|
|
@@ -27151,13 +27324,13 @@ var aP = (e, t) => {
|
|
|
27151
27324
|
o === "[" ? n++ : o === "]" ? n-- : o === "(" ? r++ : o === ")" && r--;
|
|
27152
27325
|
}
|
|
27153
27326
|
let s = t.length === 0 ? e : e.slice(i), c = s, l = !1;
|
|
27154
|
-
s.endsWith(
|
|
27327
|
+
s.endsWith(OP) ? (c = s.slice(0, -1), l = !0) : s.startsWith(OP) && (c = s.slice(1), l = !0);
|
|
27155
27328
|
let u = a && a > i ? a - i : void 0;
|
|
27156
|
-
return
|
|
27329
|
+
return jP(t, l, c, u);
|
|
27157
27330
|
};
|
|
27158
27331
|
if (t) {
|
|
27159
|
-
let e = t +
|
|
27160
|
-
r = (t) => t.startsWith(e) ? n(t.slice(e.length)) :
|
|
27332
|
+
let e = t + kP, n = r;
|
|
27333
|
+
r = (t) => t.startsWith(e) ? n(t.slice(e.length)) : jP(AP, !1, t, void 0, !0);
|
|
27161
27334
|
}
|
|
27162
27335
|
if (n) {
|
|
27163
27336
|
let e = r;
|
|
@@ -27167,7 +27340,7 @@ var aP = (e, t) => {
|
|
|
27167
27340
|
});
|
|
27168
27341
|
}
|
|
27169
27342
|
return r;
|
|
27170
|
-
},
|
|
27343
|
+
}, NP = (e) => {
|
|
27171
27344
|
let t = /* @__PURE__ */ new Map();
|
|
27172
27345
|
return e.orderSensitiveModifiers.forEach((e, n) => {
|
|
27173
27346
|
t.set(e, 1e6 + n);
|
|
@@ -27179,18 +27352,18 @@ var aP = (e, t) => {
|
|
|
27179
27352
|
}
|
|
27180
27353
|
return r.length > 0 && (r.sort(), n.push(...r)), n;
|
|
27181
27354
|
};
|
|
27182
|
-
},
|
|
27183
|
-
cache:
|
|
27184
|
-
parseClassName:
|
|
27185
|
-
sortModifiers:
|
|
27186
|
-
postfixLookupClassGroupIds:
|
|
27187
|
-
...
|
|
27188
|
-
}),
|
|
27355
|
+
}, PP = (e) => ({
|
|
27356
|
+
cache: DP(e.cacheSize),
|
|
27357
|
+
parseClassName: MP(e),
|
|
27358
|
+
sortModifiers: NP(e),
|
|
27359
|
+
postfixLookupClassGroupIds: FP(e),
|
|
27360
|
+
...hP(e)
|
|
27361
|
+
}), FP = (e) => {
|
|
27189
27362
|
let t = Object.create(null), n = e.postfixLookupClassGroups;
|
|
27190
27363
|
if (n) for (let e = 0; e < n.length; e++) t[n[e]] = !0;
|
|
27191
27364
|
return t;
|
|
27192
|
-
},
|
|
27193
|
-
let { parseClassName: n, getClassGroupId: r, getConflictingClassGroupIds: i, sortModifiers: a, postfixLookupClassGroupIds: o } = t, s = [], c = e.trim().split(
|
|
27365
|
+
}, IP = /\s+/, LP = (e, t) => {
|
|
27366
|
+
let { parseClassName: n, getClassGroupId: r, getConflictingClassGroupIds: i, sortModifiers: a, postfixLookupClassGroupIds: o } = t, s = [], c = e.trim().split(IP), l = "";
|
|
27194
27367
|
for (let e = c.length - 1; e >= 0; --e) {
|
|
27195
27368
|
let t = c[e], { isExternal: u, modifiers: d, hasImportantModifier: f, baseClassName: p, maybePostfixModifierPosition: m } = n(t);
|
|
27196
27369
|
if (u) {
|
|
@@ -27214,7 +27387,7 @@ var aP = (e, t) => {
|
|
|
27214
27387
|
}
|
|
27215
27388
|
h = !1;
|
|
27216
27389
|
}
|
|
27217
|
-
let _ = d.length === 0 ? "" : d.length === 1 ? d[0] : a(d).join(":"), v = f ? _ +
|
|
27390
|
+
let _ = d.length === 0 ? "" : d.length === 1 ? d[0] : a(d).join(":"), v = f ? _ + OP : _, y = v + g;
|
|
27218
27391
|
if (s.indexOf(y) > -1) continue;
|
|
27219
27392
|
s.push(y);
|
|
27220
27393
|
let b = i(g, h);
|
|
@@ -27225,34 +27398,34 @@ var aP = (e, t) => {
|
|
|
27225
27398
|
l = t + (l.length > 0 ? " " + l : l);
|
|
27226
27399
|
}
|
|
27227
27400
|
return l;
|
|
27228
|
-
},
|
|
27401
|
+
}, RP = (...e) => {
|
|
27229
27402
|
let t = 0, n, r, i = "";
|
|
27230
|
-
for (; t < e.length;) (n = e[t++]) && (r =
|
|
27403
|
+
for (; t < e.length;) (n = e[t++]) && (r = zP(n)) && (i && (i += " "), i += r);
|
|
27231
27404
|
return i;
|
|
27232
|
-
},
|
|
27405
|
+
}, zP = (e) => {
|
|
27233
27406
|
if (typeof e == "string") return e;
|
|
27234
27407
|
let t, n = "";
|
|
27235
|
-
for (let r = 0; r < e.length; r++) e[r] && (t =
|
|
27408
|
+
for (let r = 0; r < e.length; r++) e[r] && (t = zP(e[r])) && (n && (n += " "), n += t);
|
|
27236
27409
|
return n;
|
|
27237
|
-
},
|
|
27238
|
-
let n, r, i, a, o = (o) => (n =
|
|
27410
|
+
}, BP = (e, ...t) => {
|
|
27411
|
+
let n, r, i, a, o = (o) => (n = PP(t.reduce((e, t) => t(e), e())), r = n.cache.get, i = n.cache.set, a = s, s(o)), s = (e) => {
|
|
27239
27412
|
let t = r(e);
|
|
27240
27413
|
if (t) return t;
|
|
27241
|
-
let a =
|
|
27414
|
+
let a = LP(e, n);
|
|
27242
27415
|
return i(e, a), a;
|
|
27243
27416
|
};
|
|
27244
|
-
return a = o, (...e) => a(
|
|
27245
|
-
},
|
|
27246
|
-
let t = (t) => t[e] ||
|
|
27417
|
+
return a = o, (...e) => a(RP(...e));
|
|
27418
|
+
}, VP = [], HP = (e) => {
|
|
27419
|
+
let t = (t) => t[e] || VP;
|
|
27247
27420
|
return t.isThemeGetter = !0, t;
|
|
27248
|
-
},
|
|
27249
|
-
let r =
|
|
27421
|
+
}, UP = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, WP = /^\((?:(\w[\w-]*):)?(.+)\)$/i, GP = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/, KP = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, qP = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, JP = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, YP = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, XP = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, ZP = (e) => GP.test(e), QP = (e) => !!e && !Number.isNaN(Number(e)), $P = (e) => !!e && Number.isInteger(Number(e)), eF = (e) => e.endsWith("%") && QP(e.slice(0, -1)), tF = (e) => KP.test(e), nF = () => !0, rF = (e) => qP.test(e) && !JP.test(e), iF = () => !1, aF = (e) => YP.test(e), oF = (e) => XP.test(e), sF = (e) => !Q(e) && !$(e), cF = (e) => e.startsWith("@container") && (e[10] === "/" && e[11] !== void 0 || e[11] === "s" && e[16] !== void 0 && e.startsWith("-size/", 10) || e[11] === "n" && e[18] !== void 0 && e.startsWith("-normal/", 10)), lF = (e) => wF(e, OF, iF), Q = (e) => UP.test(e), uF = (e) => wF(e, kF, rF), dF = (e) => wF(e, AF, QP), fF = (e) => wF(e, MF, nF), pF = (e) => wF(e, jF, iF), mF = (e) => wF(e, EF, iF), hF = (e) => wF(e, DF, oF), gF = (e) => wF(e, NF, aF), $ = (e) => WP.test(e), _F = (e) => TF(e, kF), vF = (e) => TF(e, jF), yF = (e) => TF(e, EF), bF = (e) => TF(e, OF), xF = (e) => TF(e, DF), SF = (e) => TF(e, NF, !0), CF = (e) => TF(e, MF, !0), wF = (e, t, n) => {
|
|
27422
|
+
let r = UP.exec(e);
|
|
27250
27423
|
return r ? r[1] ? t(r[1]) : n(r[2]) : !1;
|
|
27251
|
-
},
|
|
27252
|
-
let r =
|
|
27424
|
+
}, TF = (e, t, n = !1) => {
|
|
27425
|
+
let r = WP.exec(e);
|
|
27253
27426
|
return r ? r[1] ? t(r[1]) : n : !1;
|
|
27254
|
-
},
|
|
27255
|
-
let e =
|
|
27427
|
+
}, EF = (e) => e === "position" || e === "percentage", DF = (e) => e === "image" || e === "url", OF = (e) => e === "length" || e === "size" || e === "bg-size", kF = (e) => e === "length", AF = (e) => e === "number", jF = (e) => e === "family-name", MF = (e) => e === "number" || e === "weight", NF = (e) => e === "shadow", PF = /* @__PURE__ */ BP(() => {
|
|
27428
|
+
let e = HP("color"), t = HP("font"), n = HP("text"), r = HP("font-weight"), i = HP("tracking"), a = HP("leading"), o = HP("breakpoint"), s = HP("container"), c = HP("spacing"), l = HP("radius"), u = HP("shadow"), d = HP("inset-shadow"), f = HP("text-shadow"), p = HP("drop-shadow"), m = HP("blur"), h = HP("perspective"), g = HP("aspect"), _ = HP("ease"), v = HP("animate"), y = () => [
|
|
27256
27429
|
"auto",
|
|
27257
27430
|
"avoid",
|
|
27258
27431
|
"all",
|
|
@@ -27294,12 +27467,12 @@ var aP = (e, t) => {
|
|
|
27294
27467
|
Q,
|
|
27295
27468
|
c
|
|
27296
27469
|
], T = () => [
|
|
27297
|
-
|
|
27470
|
+
ZP,
|
|
27298
27471
|
"full",
|
|
27299
27472
|
"auto",
|
|
27300
27473
|
...w()
|
|
27301
27474
|
], E = () => [
|
|
27302
|
-
|
|
27475
|
+
$P,
|
|
27303
27476
|
"none",
|
|
27304
27477
|
"subgrid",
|
|
27305
27478
|
$,
|
|
@@ -27308,15 +27481,15 @@ var aP = (e, t) => {
|
|
|
27308
27481
|
"auto",
|
|
27309
27482
|
{ span: [
|
|
27310
27483
|
"full",
|
|
27311
|
-
|
|
27484
|
+
$P,
|
|
27312
27485
|
$,
|
|
27313
27486
|
Q
|
|
27314
27487
|
] },
|
|
27315
|
-
|
|
27488
|
+
$P,
|
|
27316
27489
|
$,
|
|
27317
27490
|
Q
|
|
27318
27491
|
], ee = () => [
|
|
27319
|
-
|
|
27492
|
+
$P,
|
|
27320
27493
|
"auto",
|
|
27321
27494
|
$,
|
|
27322
27495
|
Q
|
|
@@ -27346,7 +27519,7 @@ var aP = (e, t) => {
|
|
|
27346
27519
|
"center-safe",
|
|
27347
27520
|
"end-safe"
|
|
27348
27521
|
], A = () => ["auto", ...w()], ne = () => [
|
|
27349
|
-
|
|
27522
|
+
ZP,
|
|
27350
27523
|
"auto",
|
|
27351
27524
|
"full",
|
|
27352
27525
|
"dvw",
|
|
@@ -27360,7 +27533,7 @@ var aP = (e, t) => {
|
|
|
27360
27533
|
"fit",
|
|
27361
27534
|
...w()
|
|
27362
27535
|
], re = () => [
|
|
27363
|
-
|
|
27536
|
+
ZP,
|
|
27364
27537
|
"screen",
|
|
27365
27538
|
"full",
|
|
27366
27539
|
"dvw",
|
|
@@ -27371,7 +27544,7 @@ var aP = (e, t) => {
|
|
|
27371
27544
|
"fit",
|
|
27372
27545
|
...w()
|
|
27373
27546
|
], ie = () => [
|
|
27374
|
-
|
|
27547
|
+
ZP,
|
|
27375
27548
|
"screen",
|
|
27376
27549
|
"full",
|
|
27377
27550
|
"lh",
|
|
@@ -27388,8 +27561,8 @@ var aP = (e, t) => {
|
|
|
27388
27561
|
Q
|
|
27389
27562
|
], ae = () => [
|
|
27390
27563
|
...b(),
|
|
27391
|
-
|
|
27392
|
-
|
|
27564
|
+
yF,
|
|
27565
|
+
mF,
|
|
27393
27566
|
{ position: [$, Q] }
|
|
27394
27567
|
], oe = () => ["no-repeat", { repeat: [
|
|
27395
27568
|
"",
|
|
@@ -27401,13 +27574,13 @@ var aP = (e, t) => {
|
|
|
27401
27574
|
"auto",
|
|
27402
27575
|
"cover",
|
|
27403
27576
|
"contain",
|
|
27404
|
-
|
|
27405
|
-
|
|
27577
|
+
bF,
|
|
27578
|
+
lF,
|
|
27406
27579
|
{ size: [$, Q] }
|
|
27407
27580
|
], ce = () => [
|
|
27408
|
-
|
|
27409
|
-
|
|
27410
|
-
|
|
27581
|
+
eF,
|
|
27582
|
+
_F,
|
|
27583
|
+
uF
|
|
27411
27584
|
], le = () => [
|
|
27412
27585
|
"",
|
|
27413
27586
|
"none",
|
|
@@ -27417,9 +27590,9 @@ var aP = (e, t) => {
|
|
|
27417
27590
|
Q
|
|
27418
27591
|
], ue = () => [
|
|
27419
27592
|
"",
|
|
27420
|
-
|
|
27421
|
-
|
|
27422
|
-
|
|
27593
|
+
QP,
|
|
27594
|
+
_F,
|
|
27595
|
+
uF
|
|
27423
27596
|
], de = () => [
|
|
27424
27597
|
"solid",
|
|
27425
27598
|
"dashed",
|
|
@@ -27443,10 +27616,10 @@ var aP = (e, t) => {
|
|
|
27443
27616
|
"color",
|
|
27444
27617
|
"luminosity"
|
|
27445
27618
|
], pe = () => [
|
|
27446
|
-
|
|
27447
|
-
|
|
27448
|
-
|
|
27449
|
-
|
|
27619
|
+
QP,
|
|
27620
|
+
eF,
|
|
27621
|
+
yF,
|
|
27622
|
+
mF
|
|
27450
27623
|
], me = () => [
|
|
27451
27624
|
"",
|
|
27452
27625
|
"none",
|
|
@@ -27455,20 +27628,20 @@ var aP = (e, t) => {
|
|
|
27455
27628
|
Q
|
|
27456
27629
|
], he = () => [
|
|
27457
27630
|
"none",
|
|
27458
|
-
|
|
27631
|
+
QP,
|
|
27459
27632
|
$,
|
|
27460
27633
|
Q
|
|
27461
27634
|
], ge = () => [
|
|
27462
27635
|
"none",
|
|
27463
|
-
|
|
27636
|
+
QP,
|
|
27464
27637
|
$,
|
|
27465
27638
|
Q
|
|
27466
27639
|
], _e = () => [
|
|
27467
|
-
|
|
27640
|
+
QP,
|
|
27468
27641
|
$,
|
|
27469
27642
|
Q
|
|
27470
27643
|
], ve = () => [
|
|
27471
|
-
|
|
27644
|
+
ZP,
|
|
27472
27645
|
"full",
|
|
27473
27646
|
...w()
|
|
27474
27647
|
];
|
|
@@ -27482,17 +27655,17 @@ var aP = (e, t) => {
|
|
|
27482
27655
|
"bounce"
|
|
27483
27656
|
],
|
|
27484
27657
|
aspect: ["video"],
|
|
27485
|
-
blur: [
|
|
27486
|
-
breakpoint: [
|
|
27487
|
-
color: [
|
|
27488
|
-
container: [
|
|
27489
|
-
"drop-shadow": [
|
|
27658
|
+
blur: [tF],
|
|
27659
|
+
breakpoint: [tF],
|
|
27660
|
+
color: [nF],
|
|
27661
|
+
container: [tF],
|
|
27662
|
+
"drop-shadow": [tF],
|
|
27490
27663
|
ease: [
|
|
27491
27664
|
"in",
|
|
27492
27665
|
"out",
|
|
27493
27666
|
"in-out"
|
|
27494
27667
|
],
|
|
27495
|
-
font: [
|
|
27668
|
+
font: [sF],
|
|
27496
27669
|
"font-weight": [
|
|
27497
27670
|
"thin",
|
|
27498
27671
|
"extralight",
|
|
@@ -27504,7 +27677,7 @@ var aP = (e, t) => {
|
|
|
27504
27677
|
"extrabold",
|
|
27505
27678
|
"black"
|
|
27506
27679
|
],
|
|
27507
|
-
"inset-shadow": [
|
|
27680
|
+
"inset-shadow": [tF],
|
|
27508
27681
|
leading: [
|
|
27509
27682
|
"none",
|
|
27510
27683
|
"tight",
|
|
@@ -27521,11 +27694,11 @@ var aP = (e, t) => {
|
|
|
27521
27694
|
"distant",
|
|
27522
27695
|
"none"
|
|
27523
27696
|
],
|
|
27524
|
-
radius: [
|
|
27525
|
-
shadow: [
|
|
27526
|
-
spacing: ["px",
|
|
27527
|
-
text: [
|
|
27528
|
-
"text-shadow": [
|
|
27697
|
+
radius: [tF],
|
|
27698
|
+
shadow: [tF],
|
|
27699
|
+
spacing: ["px", QP],
|
|
27700
|
+
text: [tF],
|
|
27701
|
+
"text-shadow": [tF],
|
|
27529
27702
|
tracking: [
|
|
27530
27703
|
"tighter",
|
|
27531
27704
|
"tight",
|
|
@@ -27539,7 +27712,7 @@ var aP = (e, t) => {
|
|
|
27539
27712
|
aspect: [{ aspect: [
|
|
27540
27713
|
"auto",
|
|
27541
27714
|
"square",
|
|
27542
|
-
|
|
27715
|
+
ZP,
|
|
27543
27716
|
Q,
|
|
27544
27717
|
$,
|
|
27545
27718
|
g
|
|
@@ -27552,9 +27725,9 @@ var aP = (e, t) => {
|
|
|
27552
27725
|
$,
|
|
27553
27726
|
Q
|
|
27554
27727
|
] }],
|
|
27555
|
-
"container-named": [
|
|
27728
|
+
"container-named": [cF],
|
|
27556
27729
|
columns: [{ columns: [
|
|
27557
|
-
|
|
27730
|
+
QP,
|
|
27558
27731
|
Q,
|
|
27559
27732
|
$,
|
|
27560
27733
|
s
|
|
@@ -27653,13 +27826,13 @@ var aP = (e, t) => {
|
|
|
27653
27826
|
"collapse"
|
|
27654
27827
|
],
|
|
27655
27828
|
z: [{ z: [
|
|
27656
|
-
|
|
27829
|
+
$P,
|
|
27657
27830
|
"auto",
|
|
27658
27831
|
$,
|
|
27659
27832
|
Q
|
|
27660
27833
|
] }],
|
|
27661
27834
|
basis: [{ basis: [
|
|
27662
|
-
|
|
27835
|
+
ZP,
|
|
27663
27836
|
"full",
|
|
27664
27837
|
"auto",
|
|
27665
27838
|
s,
|
|
@@ -27677,8 +27850,8 @@ var aP = (e, t) => {
|
|
|
27677
27850
|
"wrap-reverse"
|
|
27678
27851
|
] }],
|
|
27679
27852
|
flex: [{ flex: [
|
|
27680
|
-
|
|
27681
|
-
|
|
27853
|
+
QP,
|
|
27854
|
+
ZP,
|
|
27682
27855
|
"auto",
|
|
27683
27856
|
"initial",
|
|
27684
27857
|
"none",
|
|
@@ -27686,18 +27859,18 @@ var aP = (e, t) => {
|
|
|
27686
27859
|
] }],
|
|
27687
27860
|
grow: [{ grow: [
|
|
27688
27861
|
"",
|
|
27689
|
-
|
|
27862
|
+
QP,
|
|
27690
27863
|
$,
|
|
27691
27864
|
Q
|
|
27692
27865
|
] }],
|
|
27693
27866
|
shrink: [{ shrink: [
|
|
27694
27867
|
"",
|
|
27695
|
-
|
|
27868
|
+
QP,
|
|
27696
27869
|
$,
|
|
27697
27870
|
Q
|
|
27698
27871
|
] }],
|
|
27699
27872
|
order: [{ order: [
|
|
27700
|
-
|
|
27873
|
+
$P,
|
|
27701
27874
|
"first",
|
|
27702
27875
|
"last",
|
|
27703
27876
|
"none",
|
|
@@ -27808,15 +27981,15 @@ var aP = (e, t) => {
|
|
|
27808
27981
|
"font-size": [{ text: [
|
|
27809
27982
|
"base",
|
|
27810
27983
|
n,
|
|
27811
|
-
|
|
27812
|
-
|
|
27984
|
+
_F,
|
|
27985
|
+
uF
|
|
27813
27986
|
] }],
|
|
27814
27987
|
"font-smoothing": ["antialiased", "subpixel-antialiased"],
|
|
27815
27988
|
"font-style": ["italic", "not-italic"],
|
|
27816
27989
|
"font-weight": [{ font: [
|
|
27817
27990
|
r,
|
|
27818
|
-
|
|
27819
|
-
|
|
27991
|
+
CF,
|
|
27992
|
+
fF
|
|
27820
27993
|
] }],
|
|
27821
27994
|
"font-stretch": [{ "font-stretch": [
|
|
27822
27995
|
"ultra-condensed",
|
|
@@ -27828,12 +28001,12 @@ var aP = (e, t) => {
|
|
|
27828
28001
|
"expanded",
|
|
27829
28002
|
"extra-expanded",
|
|
27830
28003
|
"ultra-expanded",
|
|
27831
|
-
|
|
28004
|
+
eF,
|
|
27832
28005
|
Q
|
|
27833
28006
|
] }],
|
|
27834
28007
|
"font-family": [{ font: [
|
|
27835
|
-
|
|
27836
|
-
|
|
28008
|
+
vF,
|
|
28009
|
+
pF,
|
|
27837
28010
|
t
|
|
27838
28011
|
] }],
|
|
27839
28012
|
"font-features": [{ "font-features": [Q] }],
|
|
@@ -27849,10 +28022,10 @@ var aP = (e, t) => {
|
|
|
27849
28022
|
Q
|
|
27850
28023
|
] }],
|
|
27851
28024
|
"line-clamp": [{ "line-clamp": [
|
|
27852
|
-
|
|
28025
|
+
QP,
|
|
27853
28026
|
"none",
|
|
27854
28027
|
$,
|
|
27855
|
-
|
|
28028
|
+
dF
|
|
27856
28029
|
] }],
|
|
27857
28030
|
leading: [{ leading: [a, ...w()] }],
|
|
27858
28031
|
"list-image": [{ "list-image": [
|
|
@@ -27886,15 +28059,15 @@ var aP = (e, t) => {
|
|
|
27886
28059
|
],
|
|
27887
28060
|
"text-decoration-style": [{ decoration: [...de(), "wavy"] }],
|
|
27888
28061
|
"text-decoration-thickness": [{ decoration: [
|
|
27889
|
-
|
|
28062
|
+
QP,
|
|
27890
28063
|
"from-font",
|
|
27891
28064
|
"auto",
|
|
27892
28065
|
$,
|
|
27893
|
-
|
|
28066
|
+
uF
|
|
27894
28067
|
] }],
|
|
27895
28068
|
"text-decoration-color": [{ decoration: j() }],
|
|
27896
28069
|
"underline-offset": [{ "underline-offset": [
|
|
27897
|
-
|
|
28070
|
+
QP,
|
|
27898
28071
|
"auto",
|
|
27899
28072
|
$,
|
|
27900
28073
|
Q
|
|
@@ -27918,7 +28091,7 @@ var aP = (e, t) => {
|
|
|
27918
28091
|
] }],
|
|
27919
28092
|
indent: [{ indent: w() }],
|
|
27920
28093
|
"tab-size": [{ tab: [
|
|
27921
|
-
|
|
28094
|
+
$P,
|
|
27922
28095
|
$,
|
|
27923
28096
|
Q
|
|
27924
28097
|
] }],
|
|
@@ -27996,7 +28169,7 @@ var aP = (e, t) => {
|
|
|
27996
28169
|
"l",
|
|
27997
28170
|
"tl"
|
|
27998
28171
|
] },
|
|
27999
|
-
|
|
28172
|
+
$P,
|
|
28000
28173
|
$,
|
|
28001
28174
|
Q
|
|
28002
28175
|
],
|
|
@@ -28006,13 +28179,13 @@ var aP = (e, t) => {
|
|
|
28006
28179
|
Q
|
|
28007
28180
|
],
|
|
28008
28181
|
conic: [
|
|
28009
|
-
|
|
28182
|
+
$P,
|
|
28010
28183
|
$,
|
|
28011
28184
|
Q
|
|
28012
28185
|
]
|
|
28013
28186
|
},
|
|
28014
|
-
|
|
28015
|
-
|
|
28187
|
+
xF,
|
|
28188
|
+
hF
|
|
28016
28189
|
] }],
|
|
28017
28190
|
"bg-color": [{ bg: j() }],
|
|
28018
28191
|
"gradient-from-pos": [{ from: ce() }],
|
|
@@ -28079,48 +28252,48 @@ var aP = (e, t) => {
|
|
|
28079
28252
|
"hidden"
|
|
28080
28253
|
] }],
|
|
28081
28254
|
"outline-offset": [{ "outline-offset": [
|
|
28082
|
-
|
|
28255
|
+
QP,
|
|
28083
28256
|
$,
|
|
28084
28257
|
Q
|
|
28085
28258
|
] }],
|
|
28086
28259
|
"outline-w": [{ outline: [
|
|
28087
28260
|
"",
|
|
28088
|
-
|
|
28089
|
-
|
|
28090
|
-
|
|
28261
|
+
QP,
|
|
28262
|
+
_F,
|
|
28263
|
+
uF
|
|
28091
28264
|
] }],
|
|
28092
28265
|
"outline-color": [{ outline: j() }],
|
|
28093
28266
|
shadow: [{ shadow: [
|
|
28094
28267
|
"",
|
|
28095
28268
|
"none",
|
|
28096
28269
|
u,
|
|
28097
|
-
|
|
28098
|
-
|
|
28270
|
+
SF,
|
|
28271
|
+
gF
|
|
28099
28272
|
] }],
|
|
28100
28273
|
"shadow-color": [{ shadow: j() }],
|
|
28101
28274
|
"inset-shadow": [{ "inset-shadow": [
|
|
28102
28275
|
"none",
|
|
28103
28276
|
d,
|
|
28104
|
-
|
|
28105
|
-
|
|
28277
|
+
SF,
|
|
28278
|
+
gF
|
|
28106
28279
|
] }],
|
|
28107
28280
|
"inset-shadow-color": [{ "inset-shadow": j() }],
|
|
28108
28281
|
"ring-w": [{ ring: ue() }],
|
|
28109
28282
|
"ring-w-inset": ["ring-inset"],
|
|
28110
28283
|
"ring-color": [{ ring: j() }],
|
|
28111
|
-
"ring-offset-w": [{ "ring-offset": [
|
|
28284
|
+
"ring-offset-w": [{ "ring-offset": [QP, uF] }],
|
|
28112
28285
|
"ring-offset-color": [{ "ring-offset": j() }],
|
|
28113
28286
|
"inset-ring-w": [{ "inset-ring": ue() }],
|
|
28114
28287
|
"inset-ring-color": [{ "inset-ring": j() }],
|
|
28115
28288
|
"text-shadow": [{ "text-shadow": [
|
|
28116
28289
|
"none",
|
|
28117
28290
|
f,
|
|
28118
|
-
|
|
28119
|
-
|
|
28291
|
+
SF,
|
|
28292
|
+
gF
|
|
28120
28293
|
] }],
|
|
28121
28294
|
"text-shadow-color": [{ "text-shadow": j() }],
|
|
28122
28295
|
opacity: [{ opacity: [
|
|
28123
|
-
|
|
28296
|
+
QP,
|
|
28124
28297
|
$,
|
|
28125
28298
|
Q
|
|
28126
28299
|
] }],
|
|
@@ -28144,7 +28317,7 @@ var aP = (e, t) => {
|
|
|
28144
28317
|
"intersect",
|
|
28145
28318
|
"exclude"
|
|
28146
28319
|
] }],
|
|
28147
|
-
"mask-image-linear-pos": [{ "mask-linear": [
|
|
28320
|
+
"mask-image-linear-pos": [{ "mask-linear": [QP] }],
|
|
28148
28321
|
"mask-image-linear-from-pos": [{ "mask-linear-from": pe() }],
|
|
28149
28322
|
"mask-image-linear-to-pos": [{ "mask-linear-to": pe() }],
|
|
28150
28323
|
"mask-image-linear-from-color": [{ "mask-linear-from": j() }],
|
|
@@ -28184,7 +28357,7 @@ var aP = (e, t) => {
|
|
|
28184
28357
|
farthest: ["side", "corner"]
|
|
28185
28358
|
}] }],
|
|
28186
28359
|
"mask-image-radial-pos": [{ "mask-radial-at": b() }],
|
|
28187
|
-
"mask-image-conic-pos": [{ "mask-conic": [
|
|
28360
|
+
"mask-image-conic-pos": [{ "mask-conic": [QP] }],
|
|
28188
28361
|
"mask-image-conic-from-pos": [{ "mask-conic-from": pe() }],
|
|
28189
28362
|
"mask-image-conic-to-pos": [{ "mask-conic-to": pe() }],
|
|
28190
28363
|
"mask-image-conic-from-color": [{ "mask-conic-from": j() }],
|
|
@@ -28219,12 +28392,12 @@ var aP = (e, t) => {
|
|
|
28219
28392
|
] }],
|
|
28220
28393
|
blur: [{ blur: me() }],
|
|
28221
28394
|
brightness: [{ brightness: [
|
|
28222
|
-
|
|
28395
|
+
QP,
|
|
28223
28396
|
$,
|
|
28224
28397
|
Q
|
|
28225
28398
|
] }],
|
|
28226
28399
|
contrast: [{ contrast: [
|
|
28227
|
-
|
|
28400
|
+
QP,
|
|
28228
28401
|
$,
|
|
28229
28402
|
Q
|
|
28230
28403
|
] }],
|
|
@@ -28232,35 +28405,35 @@ var aP = (e, t) => {
|
|
|
28232
28405
|
"",
|
|
28233
28406
|
"none",
|
|
28234
28407
|
p,
|
|
28235
|
-
|
|
28236
|
-
|
|
28408
|
+
SF,
|
|
28409
|
+
gF
|
|
28237
28410
|
] }],
|
|
28238
28411
|
"drop-shadow-color": [{ "drop-shadow": j() }],
|
|
28239
28412
|
grayscale: [{ grayscale: [
|
|
28240
28413
|
"",
|
|
28241
|
-
|
|
28414
|
+
QP,
|
|
28242
28415
|
$,
|
|
28243
28416
|
Q
|
|
28244
28417
|
] }],
|
|
28245
28418
|
"hue-rotate": [{ "hue-rotate": [
|
|
28246
|
-
|
|
28419
|
+
QP,
|
|
28247
28420
|
$,
|
|
28248
28421
|
Q
|
|
28249
28422
|
] }],
|
|
28250
28423
|
invert: [{ invert: [
|
|
28251
28424
|
"",
|
|
28252
|
-
|
|
28425
|
+
QP,
|
|
28253
28426
|
$,
|
|
28254
28427
|
Q
|
|
28255
28428
|
] }],
|
|
28256
28429
|
saturate: [{ saturate: [
|
|
28257
|
-
|
|
28430
|
+
QP,
|
|
28258
28431
|
$,
|
|
28259
28432
|
Q
|
|
28260
28433
|
] }],
|
|
28261
28434
|
sepia: [{ sepia: [
|
|
28262
28435
|
"",
|
|
28263
|
-
|
|
28436
|
+
QP,
|
|
28264
28437
|
$,
|
|
28265
28438
|
Q
|
|
28266
28439
|
] }],
|
|
@@ -28272,45 +28445,45 @@ var aP = (e, t) => {
|
|
|
28272
28445
|
] }],
|
|
28273
28446
|
"backdrop-blur": [{ "backdrop-blur": me() }],
|
|
28274
28447
|
"backdrop-brightness": [{ "backdrop-brightness": [
|
|
28275
|
-
|
|
28448
|
+
QP,
|
|
28276
28449
|
$,
|
|
28277
28450
|
Q
|
|
28278
28451
|
] }],
|
|
28279
28452
|
"backdrop-contrast": [{ "backdrop-contrast": [
|
|
28280
|
-
|
|
28453
|
+
QP,
|
|
28281
28454
|
$,
|
|
28282
28455
|
Q
|
|
28283
28456
|
] }],
|
|
28284
28457
|
"backdrop-grayscale": [{ "backdrop-grayscale": [
|
|
28285
28458
|
"",
|
|
28286
|
-
|
|
28459
|
+
QP,
|
|
28287
28460
|
$,
|
|
28288
28461
|
Q
|
|
28289
28462
|
] }],
|
|
28290
28463
|
"backdrop-hue-rotate": [{ "backdrop-hue-rotate": [
|
|
28291
|
-
|
|
28464
|
+
QP,
|
|
28292
28465
|
$,
|
|
28293
28466
|
Q
|
|
28294
28467
|
] }],
|
|
28295
28468
|
"backdrop-invert": [{ "backdrop-invert": [
|
|
28296
28469
|
"",
|
|
28297
|
-
|
|
28470
|
+
QP,
|
|
28298
28471
|
$,
|
|
28299
28472
|
Q
|
|
28300
28473
|
] }],
|
|
28301
28474
|
"backdrop-opacity": [{ "backdrop-opacity": [
|
|
28302
|
-
|
|
28475
|
+
QP,
|
|
28303
28476
|
$,
|
|
28304
28477
|
Q
|
|
28305
28478
|
] }],
|
|
28306
28479
|
"backdrop-saturate": [{ "backdrop-saturate": [
|
|
28307
|
-
|
|
28480
|
+
QP,
|
|
28308
28481
|
$,
|
|
28309
28482
|
Q
|
|
28310
28483
|
] }],
|
|
28311
28484
|
"backdrop-sepia": [{ "backdrop-sepia": [
|
|
28312
28485
|
"",
|
|
28313
|
-
|
|
28486
|
+
QP,
|
|
28314
28487
|
$,
|
|
28315
28488
|
Q
|
|
28316
28489
|
] }],
|
|
@@ -28333,7 +28506,7 @@ var aP = (e, t) => {
|
|
|
28333
28506
|
] }],
|
|
28334
28507
|
"transition-behavior": [{ transition: ["normal", "discrete"] }],
|
|
28335
28508
|
duration: [{ duration: [
|
|
28336
|
-
|
|
28509
|
+
QP,
|
|
28337
28510
|
"initial",
|
|
28338
28511
|
$,
|
|
28339
28512
|
Q
|
|
@@ -28346,7 +28519,7 @@ var aP = (e, t) => {
|
|
|
28346
28519
|
Q
|
|
28347
28520
|
] }],
|
|
28348
28521
|
delay: [{ delay: [
|
|
28349
|
-
|
|
28522
|
+
QP,
|
|
28350
28523
|
$,
|
|
28351
28524
|
Q
|
|
28352
28525
|
] }],
|
|
@@ -28391,7 +28564,7 @@ var aP = (e, t) => {
|
|
|
28391
28564
|
"translate-z": [{ "translate-z": ve() }],
|
|
28392
28565
|
"translate-none": ["translate-none"],
|
|
28393
28566
|
zoom: [{ zoom: [
|
|
28394
|
-
|
|
28567
|
+
$P,
|
|
28395
28568
|
$,
|
|
28396
28569
|
Q
|
|
28397
28570
|
] }],
|
|
@@ -28535,10 +28708,10 @@ var aP = (e, t) => {
|
|
|
28535
28708
|
] }],
|
|
28536
28709
|
fill: [{ fill: ["none", ...j()] }],
|
|
28537
28710
|
"stroke-w": [{ stroke: [
|
|
28538
|
-
|
|
28539
|
-
|
|
28540
|
-
|
|
28541
|
-
|
|
28711
|
+
QP,
|
|
28712
|
+
_F,
|
|
28713
|
+
uF,
|
|
28714
|
+
dF
|
|
28542
28715
|
] }],
|
|
28543
28716
|
stroke: [{ stroke: ["none", ...j()] }],
|
|
28544
28717
|
"forced-color-adjust": [{ "forced-color-adjust": ["auto", "none"] }]
|
|
@@ -28729,11 +28902,11 @@ var aP = (e, t) => {
|
|
|
28729
28902
|
});
|
|
28730
28903
|
//#endregion
|
|
28731
28904
|
//#region ../core/src/magic-canvas/grid-overlay.tsx
|
|
28732
|
-
function
|
|
28905
|
+
function FF({ resolution: e, inputs: t, config: n, bailReason: r }) {
|
|
28733
28906
|
if (e === null || t === null) return null;
|
|
28734
28907
|
let i = PM[e.templateId];
|
|
28735
28908
|
if (i === void 0) return null;
|
|
28736
|
-
let a = r !== null, o = a ? "border-warning/70 bg-warning/5" : "border-info/80 bg-info/5", s = a ? "bg-warning/85 text-warning-content" : "bg-info/85 text-info-content", c = a ? "border-warning" : "border-success", l = a ? "bg-warning/85 text-warning-content" : "bg-success/85 text-success-content", u = t.userShare ? "userShare" : t.presentation ? "presentation" : null, { regions: d } =
|
|
28909
|
+
let a = r !== null, o = a ? "border-warning/70 bg-warning/5" : "border-info/80 bg-info/5", s = a ? "bg-warning/85 text-warning-content" : "bg-info/85 text-info-content", c = a ? "border-warning" : "border-success", l = a ? "bg-warning/85 text-warning-content" : "bg-success/85 text-success-content", u = t.userShare ? "userShare" : t.presentation ? "presentation" : null, { regions: d } = TN(i, {
|
|
28737
28910
|
state: e.state,
|
|
28738
28911
|
contentKind: u
|
|
28739
28912
|
}, t, e.sizeClass, e.containerPx, n);
|
|
@@ -28746,7 +28919,7 @@ function jF({ resolution: e, inputs: t, config: n, bailReason: r }) {
|
|
|
28746
28919
|
children: ["engine plan only · legacy: ", r]
|
|
28747
28920
|
}),
|
|
28748
28921
|
d.map((e) => /* @__PURE__ */ R("div", {
|
|
28749
|
-
class:
|
|
28922
|
+
class: PF("absolute rounded-box border border-dashed", o),
|
|
28750
28923
|
style: {
|
|
28751
28924
|
left: `${e.rect.x}px`,
|
|
28752
28925
|
top: `${e.rect.y}px`,
|
|
@@ -28754,7 +28927,7 @@ function jF({ resolution: e, inputs: t, config: n, bailReason: r }) {
|
|
|
28754
28927
|
height: `${e.rect.height}px`
|
|
28755
28928
|
},
|
|
28756
28929
|
children: /* @__PURE__ */ R("span", {
|
|
28757
|
-
class:
|
|
28930
|
+
class: PF("absolute top-1 left-1 flex flex-col rounded px-1.5 py-0.5 font-mono text-[10px] leading-tight", s),
|
|
28758
28931
|
children: [/* @__PURE__ */ R("span", { children: e.region.name }), /* @__PURE__ */ R("span", {
|
|
28759
28932
|
class: "opacity-75",
|
|
28760
28933
|
children: e.region.accepts.join(" · ")
|
|
@@ -28762,7 +28935,7 @@ function jF({ resolution: e, inputs: t, config: n, bailReason: r }) {
|
|
|
28762
28935
|
})
|
|
28763
28936
|
}, e.region.name)),
|
|
28764
28937
|
e.tiles.map((e) => /* @__PURE__ */ R("div", {
|
|
28765
|
-
class:
|
|
28938
|
+
class: PF("absolute border", c),
|
|
28766
28939
|
style: {
|
|
28767
28940
|
left: `${e.rect.x}px`,
|
|
28768
28941
|
top: `${e.rect.y}px`,
|
|
@@ -28770,7 +28943,7 @@ function jF({ resolution: e, inputs: t, config: n, bailReason: r }) {
|
|
|
28770
28943
|
height: `${e.rect.height}px`
|
|
28771
28944
|
},
|
|
28772
28945
|
children: /* @__PURE__ */ R("span", {
|
|
28773
|
-
class:
|
|
28946
|
+
class: PF("absolute right-1 bottom-1 rounded px-1.5 py-0.5 font-mono text-[10px]", l),
|
|
28774
28947
|
children: [
|
|
28775
28948
|
e.kind,
|
|
28776
28949
|
" ",
|
|
@@ -28785,11 +28958,11 @@ function jF({ resolution: e, inputs: t, config: n, bailReason: r }) {
|
|
|
28785
28958
|
}
|
|
28786
28959
|
//#endregion
|
|
28787
28960
|
//#region ../core/src/magic-canvas/grid-readout.tsx
|
|
28788
|
-
function
|
|
28961
|
+
function IF(e) {
|
|
28789
28962
|
return {
|
|
28790
28963
|
version: 1,
|
|
28791
|
-
buildSha:
|
|
28792
|
-
engineVersion:
|
|
28964
|
+
buildSha: FN,
|
|
28965
|
+
engineVersion: FN,
|
|
28793
28966
|
config: MM,
|
|
28794
28967
|
session: {
|
|
28795
28968
|
containerPx: {
|
|
@@ -28812,7 +28985,7 @@ function MF(e) {
|
|
|
28812
28985
|
}
|
|
28813
28986
|
};
|
|
28814
28987
|
}
|
|
28815
|
-
function
|
|
28988
|
+
function LF({ resolution: e, inputs: t, shadowing: n, bailReason: r, engineError: i = null }) {
|
|
28816
28989
|
let [a, o] = M(!1), s = P(null);
|
|
28817
28990
|
if (N(() => () => {
|
|
28818
28991
|
s.current !== null && clearTimeout(s.current);
|
|
@@ -28850,11 +29023,11 @@ function NF({ resolution: e, inputs: t, shadowing: n, bailReason: r, engineError
|
|
|
28850
29023
|
})]
|
|
28851
29024
|
});
|
|
28852
29025
|
let c = () => {
|
|
28853
|
-
let e = JSON.stringify(
|
|
29026
|
+
let e = JSON.stringify(IF(t), null, 2);
|
|
28854
29027
|
s.current !== null && clearTimeout(s.current), navigator.clipboard?.writeText(e).then(() => {
|
|
28855
29028
|
o(!0), s.current = setTimeout(() => o(!1), 1500);
|
|
28856
29029
|
}, () => o(!1));
|
|
28857
|
-
}, l = e.degradations.evictedCardIds, u =
|
|
29030
|
+
}, l = e.degradations.evictedCardIds, u = tP(e.sizeClass);
|
|
28858
29031
|
return /* @__PURE__ */ R("div", {
|
|
28859
29032
|
class: "pointer-events-auto max-w-[22rem] rounded-box bg-base-100/95 p-3 font-mono text-[10px] leading-relaxed shadow-lg",
|
|
28860
29033
|
children: [
|
|
@@ -28952,10 +29125,10 @@ function NF({ resolution: e, inputs: t, shadowing: n, bailReason: r, engineError
|
|
|
28952
29125
|
}
|
|
28953
29126
|
//#endregion
|
|
28954
29127
|
//#region ../core/src/magic-canvas/grid-host.tsx
|
|
28955
|
-
var
|
|
28956
|
-
effect:
|
|
29128
|
+
var RF = {
|
|
29129
|
+
effect: ZN,
|
|
28957
29130
|
animate: !1
|
|
28958
|
-
},
|
|
29131
|
+
}, zF = It(RF), BF = {
|
|
28959
29132
|
presence: { phase: "connecting" },
|
|
28960
29133
|
localId: null,
|
|
28961
29134
|
isScreenSharing: !1,
|
|
@@ -28963,17 +29136,17 @@ var PF = {
|
|
|
28963
29136
|
hasPersonaVideo: !1,
|
|
28964
29137
|
hasSelfView: !1
|
|
28965
29138
|
};
|
|
28966
|
-
function
|
|
29139
|
+
function VF(e, t) {
|
|
28967
29140
|
return e === null || t === null ? e === t : e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
28968
29141
|
}
|
|
28969
|
-
function
|
|
29142
|
+
function HF(e, t) {
|
|
28970
29143
|
let n = e.containerPx === null || t.containerPx === null ? e.containerPx === t.containerPx : e.containerPx.width === t.containerPx.width && e.containerPx.height === t.containerPx.height;
|
|
28971
|
-
return e.driving === t.driving && e.replicaCollapsed === t.replicaCollapsed && n &&
|
|
29144
|
+
return e.driving === t.driving && e.replicaCollapsed === t.replicaCollapsed && n && VF(e.replica, t.replica) && VF(e.selfView, t.selfView) && VF(e.content, t.content);
|
|
28972
29145
|
}
|
|
28973
|
-
var
|
|
28974
|
-
function
|
|
28975
|
-
let u =
|
|
28976
|
-
kioskMode: F(() =>
|
|
29146
|
+
var UF = /* @__PURE__ */ new Map(), WF = /* @__PURE__ */ new Set();
|
|
29147
|
+
function GF({ instances: e, viewport: t, callControlsBandPx: n, callPresence: r, callControlsVisible: i, callControlsRect: a, statusStripId: o, statusStripHeightPx: s, gridConfigEnabled: c, gridStartEnabled: l }) {
|
|
29148
|
+
let u = zN(c, l) && r !== void 0, d = r ?? BF, f = globalThis.location?.search ?? "", p = qN({
|
|
29149
|
+
kioskMode: F(() => BN(f), [f]),
|
|
28977
29150
|
instances: e,
|
|
28978
29151
|
viewport: t,
|
|
28979
29152
|
presence: d,
|
|
@@ -28983,10 +29156,10 @@ function VF({ instances: e, viewport: t, callControlsBandPx: n, callPresence: r,
|
|
|
28983
29156
|
statusStripId: o,
|
|
28984
29157
|
statusStripHeightPx: s,
|
|
28985
29158
|
enabled: u
|
|
28986
|
-
}), m = u ?
|
|
28987
|
-
|
|
29159
|
+
}), m = u ? WN.value : null, h = m === null ? YN(p.resolution, d, u) : "engine-error";
|
|
29160
|
+
cP({
|
|
28988
29161
|
enabled: u,
|
|
28989
|
-
enabledVia:
|
|
29162
|
+
enabledVia: iP(LN, c === !0, l === !0),
|
|
28990
29163
|
bail: h,
|
|
28991
29164
|
resolution: p.resolution,
|
|
28992
29165
|
engineError: m
|
|
@@ -28995,39 +29168,39 @@ function VF({ instances: e, viewport: t, callControlsBandPx: n, callPresence: r,
|
|
|
28995
29168
|
d.presence.phase === "ready" ? d.hasPersonaVideo && (g.current = !0) : g.current = !1;
|
|
28996
29169
|
let _ = !g.current, v;
|
|
28997
29170
|
try {
|
|
28998
|
-
v =
|
|
29171
|
+
v = QN(p.resolution, h, _);
|
|
28999
29172
|
} catch (e) {
|
|
29000
|
-
|
|
29173
|
+
GN(e), v = ZN;
|
|
29001
29174
|
}
|
|
29002
|
-
let y = P(
|
|
29175
|
+
let y = P(ZN), b = eP(y.current, v);
|
|
29003
29176
|
N(() => {
|
|
29004
|
-
y.current = v,
|
|
29177
|
+
y.current = v, HF(zF.peek().effect, v) || (zF.value = {
|
|
29005
29178
|
effect: v,
|
|
29006
29179
|
animate: b
|
|
29007
29180
|
});
|
|
29008
29181
|
}), N(() => () => {
|
|
29009
|
-
|
|
29182
|
+
KN(), zF.peek() !== RF && (zF.value = RF);
|
|
29010
29183
|
}, []);
|
|
29011
29184
|
let x = p.resolution, S = F(() => {
|
|
29012
|
-
if (h !== null || x === null) return
|
|
29185
|
+
if (h !== null || x === null) return UF;
|
|
29013
29186
|
try {
|
|
29014
29187
|
let e = /* @__PURE__ */ new Map();
|
|
29015
29188
|
for (let t of x.tiles) t.kind === "card" && e.set(t.id, t.rect);
|
|
29016
29189
|
return e;
|
|
29017
29190
|
} catch (e) {
|
|
29018
|
-
return
|
|
29191
|
+
return GN(e), UF;
|
|
29019
29192
|
}
|
|
29020
|
-
}, [h, x]), C = F(() => h !== null || x === null ?
|
|
29193
|
+
}, [h, x]), C = F(() => h !== null || x === null ? WF : new Set(x.tiles.filter(JN).map((e) => e.id)), [h, x]), w = RN ? /* @__PURE__ */ R("div", {
|
|
29021
29194
|
class: "contents",
|
|
29022
29195
|
"data-grid-debug": !0,
|
|
29023
|
-
children: [/* @__PURE__ */ R(
|
|
29196
|
+
children: [/* @__PURE__ */ R(FF, {
|
|
29024
29197
|
resolution: p.resolution,
|
|
29025
29198
|
inputs: p.inputs,
|
|
29026
29199
|
config: MM,
|
|
29027
29200
|
bailReason: h
|
|
29028
29201
|
}), /* @__PURE__ */ R("div", {
|
|
29029
29202
|
class: "pointer-events-none absolute bottom-4 left-4 z-50",
|
|
29030
|
-
children: /* @__PURE__ */ R(
|
|
29203
|
+
children: /* @__PURE__ */ R(LF, {
|
|
29031
29204
|
resolution: p.resolution,
|
|
29032
29205
|
inputs: p.inputs,
|
|
29033
29206
|
shadowing: h !== null,
|
|
@@ -29039,7 +29212,7 @@ function VF({ instances: e, viewport: t, callControlsBandPx: n, callPresence: r,
|
|
|
29039
29212
|
return {
|
|
29040
29213
|
cardRects: S,
|
|
29041
29214
|
kioskCardIds: C,
|
|
29042
|
-
sheetBottomPx:
|
|
29215
|
+
sheetBottomPx: XN(x, h),
|
|
29043
29216
|
animate: b,
|
|
29044
29217
|
recordNaturalHeight: p.recordNaturalHeight,
|
|
29045
29218
|
debug: w
|
|
@@ -29047,24 +29220,24 @@ function VF({ instances: e, viewport: t, callControlsBandPx: n, callPresence: r,
|
|
|
29047
29220
|
}
|
|
29048
29221
|
//#endregion
|
|
29049
29222
|
//#region ../core/src/magic-canvas/grid-motion.ts
|
|
29050
|
-
var
|
|
29223
|
+
var KF = [
|
|
29051
29224
|
"left",
|
|
29052
29225
|
"top",
|
|
29053
29226
|
"width",
|
|
29054
29227
|
"height"
|
|
29055
29228
|
].map((e) => `${e} ${Jx}`).join(", ");
|
|
29056
|
-
function
|
|
29229
|
+
function qF(e, t) {
|
|
29057
29230
|
return {
|
|
29058
29231
|
left: `${e.x}px`,
|
|
29059
29232
|
top: `${e.y}px`,
|
|
29060
29233
|
width: `${e.width}px`,
|
|
29061
29234
|
height: `${e.height}px`,
|
|
29062
|
-
transition: t && !iS() ?
|
|
29235
|
+
transition: t && !iS() ? KF : "none"
|
|
29063
29236
|
};
|
|
29064
29237
|
}
|
|
29065
29238
|
//#endregion
|
|
29066
29239
|
//#region ../core/src/magic-canvas/debug-panel.tsx
|
|
29067
|
-
function
|
|
29240
|
+
function JF({ state: e }) {
|
|
29068
29241
|
return e.enabled ? /* @__PURE__ */ R("details", {
|
|
29069
29242
|
class: "pointer-events-auto w-full max-w-md rounded-lg border border-base-300 bg-base-100/95 p-2 text-xs shadow-lg backdrop-blur",
|
|
29070
29243
|
children: [/* @__PURE__ */ R("summary", {
|
|
@@ -29073,27 +29246,27 @@ function WF({ state: e }) {
|
|
|
29073
29246
|
}), /* @__PURE__ */ R("dl", {
|
|
29074
29247
|
class: "mt-2 grid gap-2",
|
|
29075
29248
|
children: [
|
|
29076
|
-
/* @__PURE__ */ R(
|
|
29249
|
+
/* @__PURE__ */ R(YF, {
|
|
29077
29250
|
label: "iframe",
|
|
29078
29251
|
value: e.iframeLifecycleState
|
|
29079
29252
|
}),
|
|
29080
|
-
/* @__PURE__ */ R(
|
|
29253
|
+
/* @__PURE__ */ R(YF, {
|
|
29081
29254
|
label: "post",
|
|
29082
29255
|
value: e.lastInteractionPostResult
|
|
29083
29256
|
}),
|
|
29084
|
-
/* @__PURE__ */ R(
|
|
29257
|
+
/* @__PURE__ */ R(YF, {
|
|
29085
29258
|
label: "context",
|
|
29086
29259
|
value: e.lastModelContextUpdate
|
|
29087
29260
|
}),
|
|
29088
|
-
/* @__PURE__ */ R(
|
|
29261
|
+
/* @__PURE__ */ R(YF, {
|
|
29089
29262
|
label: "error",
|
|
29090
29263
|
value: e.lastError
|
|
29091
29264
|
}),
|
|
29092
|
-
/* @__PURE__ */ R(
|
|
29265
|
+
/* @__PURE__ */ R(XF, {
|
|
29093
29266
|
label: "tool_call",
|
|
29094
29267
|
value: e.lastToolCall
|
|
29095
29268
|
}),
|
|
29096
|
-
/* @__PURE__ */ R(
|
|
29269
|
+
/* @__PURE__ */ R(XF, {
|
|
29097
29270
|
label: "canvas_config",
|
|
29098
29271
|
value: e.parsedCanvasConfig
|
|
29099
29272
|
})
|
|
@@ -29101,7 +29274,7 @@ function WF({ state: e }) {
|
|
|
29101
29274
|
})]
|
|
29102
29275
|
}) : null;
|
|
29103
29276
|
}
|
|
29104
|
-
function
|
|
29277
|
+
function YF({ label: e, value: t }) {
|
|
29105
29278
|
return t ? /* @__PURE__ */ R("div", { children: [/* @__PURE__ */ R("dt", {
|
|
29106
29279
|
class: "font-semibold",
|
|
29107
29280
|
children: e
|
|
@@ -29110,7 +29283,7 @@ function GF({ label: e, value: t }) {
|
|
|
29110
29283
|
children: t
|
|
29111
29284
|
})] }) : null;
|
|
29112
29285
|
}
|
|
29113
|
-
function
|
|
29286
|
+
function XF({ label: e, value: t }) {
|
|
29114
29287
|
return t === void 0 ? null : /* @__PURE__ */ R("div", { children: [/* @__PURE__ */ R("dt", {
|
|
29115
29288
|
class: "font-semibold",
|
|
29116
29289
|
children: e
|
|
@@ -29121,43 +29294,43 @@ function KF({ label: e, value: t }) {
|
|
|
29121
29294
|
}
|
|
29122
29295
|
//#endregion
|
|
29123
29296
|
//#region ../core/src/magic-canvas/status-strip.ts
|
|
29124
|
-
var
|
|
29297
|
+
var ZF = {
|
|
29125
29298
|
compact: 32,
|
|
29126
29299
|
regular: 40,
|
|
29127
29300
|
roomy: 68
|
|
29128
|
-
},
|
|
29301
|
+
}, QF = 6e3, $F = "ease-out", eI = {
|
|
29129
29302
|
stiffness: 2822,
|
|
29130
29303
|
damping: 84,
|
|
29131
29304
|
mass: 3.5
|
|
29132
|
-
},
|
|
29133
|
-
function
|
|
29134
|
-
if (typeof document > "u" || typeof getComputedStyle != "function") return
|
|
29305
|
+
}, tI = .25, nI = 16;
|
|
29306
|
+
function rI() {
|
|
29307
|
+
if (typeof document > "u" || typeof getComputedStyle != "function") return nI;
|
|
29135
29308
|
let e = Number.parseFloat(getComputedStyle(document.documentElement).fontSize);
|
|
29136
|
-
return Number.isFinite(e) ? e :
|
|
29309
|
+
return Number.isFinite(e) ? e : nI;
|
|
29137
29310
|
}
|
|
29138
|
-
function
|
|
29311
|
+
function iI(e, t) {
|
|
29139
29312
|
return e === "widget" || t !== void 0 && t > 0 && t < 640 ? "compact" : "regular";
|
|
29140
29313
|
}
|
|
29141
|
-
function
|
|
29314
|
+
function aI(e) {
|
|
29142
29315
|
if (typeof e == "string") try {
|
|
29143
29316
|
let t = JSON.parse(e);
|
|
29144
|
-
return
|
|
29317
|
+
return oI(t) ? t : null;
|
|
29145
29318
|
} catch {
|
|
29146
29319
|
return null;
|
|
29147
29320
|
}
|
|
29148
|
-
return
|
|
29321
|
+
return oI(e) ? e : null;
|
|
29149
29322
|
}
|
|
29150
|
-
function
|
|
29323
|
+
function oI(e) {
|
|
29151
29324
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
29152
29325
|
}
|
|
29153
|
-
function
|
|
29154
|
-
let t =
|
|
29326
|
+
function sI(e) {
|
|
29327
|
+
let t = aI(e)?.state;
|
|
29155
29328
|
return t === "success" || t === "error";
|
|
29156
29329
|
}
|
|
29157
|
-
function
|
|
29158
|
-
return
|
|
29330
|
+
function cI(e) {
|
|
29331
|
+
return aI(e)?.state === "error";
|
|
29159
29332
|
}
|
|
29160
|
-
function
|
|
29333
|
+
function lI(e, t, n) {
|
|
29161
29334
|
let r = `${t + 8}px`;
|
|
29162
29335
|
if (n === void 0 || !Number.isFinite(n) || n <= 0) return {
|
|
29163
29336
|
left: "1rem",
|
|
@@ -29171,83 +29344,83 @@ function aI(e, t, n) {
|
|
|
29171
29344
|
bottom: r
|
|
29172
29345
|
};
|
|
29173
29346
|
}
|
|
29174
|
-
function
|
|
29347
|
+
function uI(e) {
|
|
29175
29348
|
let t = e?.trim();
|
|
29176
|
-
if (!t) return
|
|
29349
|
+
if (!t) return tI * rI();
|
|
29177
29350
|
let n = Number.parseFloat(t);
|
|
29178
|
-
if (!Number.isFinite(n)) return
|
|
29179
|
-
if (t.endsWith("rem")) return n *
|
|
29351
|
+
if (!Number.isFinite(n)) return tI * rI();
|
|
29352
|
+
if (t.endsWith("rem")) return n * rI();
|
|
29180
29353
|
if (t.endsWith("px")) return n;
|
|
29181
29354
|
}
|
|
29182
|
-
function
|
|
29183
|
-
let n = e["--color-neutral"], r = e["--color-neutral-content"], i =
|
|
29355
|
+
function dI(e, t) {
|
|
29356
|
+
let n = e["--color-neutral"], r = e["--color-neutral-content"], i = uI(e["--radius-field"]);
|
|
29184
29357
|
return {
|
|
29185
29358
|
...n ? { "--activity-bg": n } : {},
|
|
29186
29359
|
...r ? { "--activity-fg": r } : {},
|
|
29187
29360
|
"--activity-border": "transparent",
|
|
29188
29361
|
...i === void 0 ? {} : { "--activity-radius": `${i}px` },
|
|
29189
|
-
"--activity-height": `${
|
|
29362
|
+
"--activity-height": `${ZF[t.density]}px`,
|
|
29190
29363
|
"--activity-align": t.align
|
|
29191
29364
|
};
|
|
29192
29365
|
}
|
|
29193
29366
|
//#endregion
|
|
29194
29367
|
//#region ../core/src/magic-canvas/magic-canvas.tsx
|
|
29195
|
-
var
|
|
29196
|
-
async function
|
|
29197
|
-
let r = new AbortController(), i = globalThis.setTimeout(() => r.abort(),
|
|
29368
|
+
var fI = 1e3, pI = 5e3, mI = 1200, hI = [2e3, 6e3];
|
|
29369
|
+
async function gI(e, t, n) {
|
|
29370
|
+
let r = new AbortController(), i = globalThis.setTimeout(() => r.abort(), pI);
|
|
29198
29371
|
try {
|
|
29199
29372
|
await Cn(e, t, n, { signal: r.signal });
|
|
29200
29373
|
} finally {
|
|
29201
29374
|
globalThis.clearTimeout(i);
|
|
29202
29375
|
}
|
|
29203
29376
|
}
|
|
29204
|
-
function
|
|
29377
|
+
function _I(e) {
|
|
29205
29378
|
return e instanceof _n && e.status >= 400 && e.status < 500 && e.status !== 408 && e.status !== 429;
|
|
29206
29379
|
}
|
|
29207
|
-
function
|
|
29380
|
+
function vI(e, t) {
|
|
29208
29381
|
console.error("Magic Canvas interaction POST failed; this interaction may not have been recorded server-side.", e), t({
|
|
29209
29382
|
lastInteractionPostResult: "error",
|
|
29210
|
-
lastError:
|
|
29383
|
+
lastError: QI(e).message
|
|
29211
29384
|
}, {
|
|
29212
29385
|
error: e,
|
|
29213
29386
|
operation: "canvas.bridge"
|
|
29214
29387
|
});
|
|
29215
29388
|
}
|
|
29216
|
-
function
|
|
29389
|
+
function yI(e) {
|
|
29217
29390
|
return e.content.some((e) => e.type === "text" && typeof e.text == "string" && e.text.trim() !== "");
|
|
29218
29391
|
}
|
|
29219
|
-
function
|
|
29392
|
+
function bI(e, t, n, r) {
|
|
29220
29393
|
(async () => {
|
|
29221
29394
|
let i;
|
|
29222
|
-
for (let a of
|
|
29395
|
+
for (let a of hI) {
|
|
29223
29396
|
await new Promise((e) => setTimeout(e, a));
|
|
29224
29397
|
try {
|
|
29225
|
-
await
|
|
29398
|
+
await gI(e, t, n), r({
|
|
29226
29399
|
lastInteractionPostResult: "recovered",
|
|
29227
29400
|
lastError: void 0
|
|
29228
29401
|
});
|
|
29229
29402
|
return;
|
|
29230
29403
|
} catch (e) {
|
|
29231
|
-
if (i = e,
|
|
29404
|
+
if (i = e, _I(e)) break;
|
|
29232
29405
|
}
|
|
29233
29406
|
}
|
|
29234
|
-
|
|
29407
|
+
vI(i, r);
|
|
29235
29408
|
})();
|
|
29236
29409
|
}
|
|
29237
|
-
var
|
|
29238
|
-
function
|
|
29239
|
-
return e.correct_answer === void 0 ?
|
|
29410
|
+
var xI = 2e3;
|
|
29411
|
+
function SI(e) {
|
|
29412
|
+
return e.correct_answer === void 0 ? mI : xI;
|
|
29240
29413
|
}
|
|
29241
|
-
var
|
|
29414
|
+
var CI = 48, wI = 24, TI = "ui-monospace, SFMono-Regular, Menlo, monospace", EI = 160, DI = () => {}, OI = "allow-scripts", kI = {
|
|
29242
29415
|
"canvas.scheduling_embed": "allow-scripts allow-same-origin allow-popups allow-forms",
|
|
29243
29416
|
"canvas.text": "allow-scripts allow-popups allow-popups-to-escape-sandbox"
|
|
29244
29417
|
};
|
|
29245
|
-
function
|
|
29418
|
+
function AI(e, t) {
|
|
29246
29419
|
if (!t.contentWindow || e.source !== t.contentWindow) return !1;
|
|
29247
29420
|
let n = e.data;
|
|
29248
29421
|
return !!n && typeof n == "object" && n?.jsonrpc === "2.0";
|
|
29249
29422
|
}
|
|
29250
|
-
var
|
|
29423
|
+
var jI = class {
|
|
29251
29424
|
onmessage;
|
|
29252
29425
|
onerror;
|
|
29253
29426
|
onclose;
|
|
@@ -29258,7 +29431,7 @@ var DI = class {
|
|
|
29258
29431
|
}
|
|
29259
29432
|
start() {
|
|
29260
29433
|
let e = (e) => {
|
|
29261
|
-
|
|
29434
|
+
AI(e, this.#e) && this.onmessage?.(e.data);
|
|
29262
29435
|
};
|
|
29263
29436
|
return this.#t = e, globalThis.addEventListener("message", e), Promise.resolve();
|
|
29264
29437
|
}
|
|
@@ -29269,12 +29442,12 @@ var DI = class {
|
|
|
29269
29442
|
return this.#t && globalThis.removeEventListener("message", this.#t), this.#t = void 0, this.onclose?.(), Promise.resolve();
|
|
29270
29443
|
}
|
|
29271
29444
|
};
|
|
29272
|
-
function
|
|
29273
|
-
for (let t of Pb) if (e.some((e) =>
|
|
29445
|
+
function MI(e) {
|
|
29446
|
+
for (let t of Pb) if (e.some((e) => JI(e) === t)) return t;
|
|
29274
29447
|
return null;
|
|
29275
29448
|
}
|
|
29276
|
-
function
|
|
29277
|
-
let { client: l, telemetry: u } = Dh(), { isDark: d, cssVars: f } = AM(), p = Yf(), m = Xf(), [h, g] = M([]), [_, v] = M(null), [y, b] = M(!1), x = P(null), S = P(null), C = P(null), [w, T] =
|
|
29449
|
+
function NI({ onLayoutEffectChange: e, onRenderedSlotChange: t, debugEnabled: n = YI(), callPresence: r, callControlsVisible: i, callControlsRect: a, gridConfigEnabled: o, gridStartEnabled: s, onStatusStripChange: c } = {}) {
|
|
29450
|
+
let { client: l, telemetry: u } = Dh(), { isDark: d, cssVars: f } = AM(), p = Yf(), m = Xf(), [h, g] = M([]), [_, v] = M(null), [y, b] = M(!1), x = P(null), S = P(null), C = P(null), [w, T] = WI(), E = L(gt)?.surface, D = iI(E, T.width), ee = ZF[D], O = y ? null : _, te = O ? ee + 8 : 0, k = I(() => {
|
|
29278
29451
|
S.current !== null && (clearTimeout(S.current), S.current = null);
|
|
29279
29452
|
}, []), A = I(() => {
|
|
29280
29453
|
C.current !== null && (clearTimeout(C.current), C.current = null);
|
|
@@ -29285,7 +29458,7 @@ function kI({ onLayoutEffectChange: e, onRenderedSlotChange: t, debugEnabled: n
|
|
|
29285
29458
|
}, [k, A]), re = I(() => {
|
|
29286
29459
|
x.current && (A(), C.current = setTimeout(() => {
|
|
29287
29460
|
C.current = null, ne();
|
|
29288
|
-
},
|
|
29461
|
+
}, QF));
|
|
29289
29462
|
}, [ne, A]);
|
|
29290
29463
|
N(() => () => {
|
|
29291
29464
|
k(), A();
|
|
@@ -29299,7 +29472,7 @@ function kI({ onLayoutEffectChange: e, onRenderedSlotChange: t, debugEnabled: n
|
|
|
29299
29472
|
let [ie, j] = M(() => ({
|
|
29300
29473
|
enabled: n,
|
|
29301
29474
|
iframeLifecycleState: "idle"
|
|
29302
|
-
})), ae =
|
|
29475
|
+
})), ae = GF({
|
|
29303
29476
|
instances: h,
|
|
29304
29477
|
viewport: T,
|
|
29305
29478
|
callControlsBandPx: 72,
|
|
@@ -29369,7 +29542,7 @@ function kI({ onLayoutEffectChange: e, onRenderedSlotChange: t, debugEnabled: n
|
|
|
29369
29542
|
let n = x.current, r = Qb(n, t);
|
|
29370
29543
|
if (r.consumed) {
|
|
29371
29544
|
let e = n !== null && r.strip !== null && n.tool_call_id === r.strip.tool_call_id && n.conversation_id === r.strip.conversation_id, t = C.current !== null;
|
|
29372
|
-
r.strip ?
|
|
29545
|
+
r.strip ? sI(r.strip.arguments) ? e && (cI(r.strip.arguments) && !t && (x.current = r.strip, v(r.strip)), re()) : e && t || (k(), A(), x.current = r.strip, b(!1), v(r.strip)) : ne();
|
|
29373
29546
|
} else g((e) => Jb(e, t));
|
|
29374
29547
|
oe({
|
|
29375
29548
|
lastToolCall: e.data,
|
|
@@ -29380,7 +29553,7 @@ function kI({ onLayoutEffectChange: e, onRenderedSlotChange: t, debugEnabled: n
|
|
|
29380
29553
|
} catch (e) {
|
|
29381
29554
|
oe({
|
|
29382
29555
|
iframeLifecycleState: "error",
|
|
29383
|
-
lastError:
|
|
29556
|
+
lastError: QI(e).message
|
|
29384
29557
|
}, {
|
|
29385
29558
|
error: e,
|
|
29386
29559
|
operation: "canvas.validate"
|
|
@@ -29418,7 +29591,7 @@ function kI({ onLayoutEffectChange: e, onRenderedSlotChange: t, debugEnabled: n
|
|
|
29418
29591
|
ue.safe_area?.width,
|
|
29419
29592
|
ue.safe_area?.height
|
|
29420
29593
|
]);
|
|
29421
|
-
let fe =
|
|
29594
|
+
let fe = MI(le.map(({ layout: e }) => e));
|
|
29422
29595
|
N(() => {
|
|
29423
29596
|
t?.(fe);
|
|
29424
29597
|
}, [t, fe]);
|
|
@@ -29427,7 +29600,7 @@ function kI({ onLayoutEffectChange: e, onRenderedSlotChange: t, debugEnabled: n
|
|
|
29427
29600
|
ref: w,
|
|
29428
29601
|
"data-magic-canvas-root": !0,
|
|
29429
29602
|
class: "pointer-events-none absolute inset-0 z-30",
|
|
29430
|
-
style: `--mc-strip-band: ${te}px; --cvi-status-strip-drop: ${80 -
|
|
29603
|
+
style: `--mc-strip-band: ${te}px; --cvi-status-strip-drop: ${80 - wI}px`,
|
|
29431
29604
|
children: [
|
|
29432
29605
|
pe && de && /* @__PURE__ */ R("div", { class: "absolute inset-0 bg-black/45" }),
|
|
29433
29606
|
pe && !de && ae.sheetBottomPx !== null && /* @__PURE__ */ R("div", {
|
|
@@ -29438,15 +29611,15 @@ function kI({ onLayoutEffectChange: e, onRenderedSlotChange: t, debugEnabled: n
|
|
|
29438
29611
|
backgroundImage: "linear-gradient(to bottom, rgb(0 0 0 / 0.45) calc(100% - 64px), rgb(0 0 0 / 0))"
|
|
29439
29612
|
}
|
|
29440
29613
|
}),
|
|
29441
|
-
pe && le.map(({ instance: e, layout: t, gridRect: n }) => /* @__PURE__ */ R(
|
|
29442
|
-
slot:
|
|
29614
|
+
pe && le.map(({ instance: e, layout: t, gridRect: n }) => /* @__PURE__ */ R(LI, {
|
|
29615
|
+
slot: JI(t),
|
|
29443
29616
|
safeAreaTop: ue.safe_area?.y,
|
|
29444
29617
|
frameWidth: T.width,
|
|
29445
29618
|
...n ? {
|
|
29446
29619
|
gridRect: n,
|
|
29447
29620
|
gridAnimate: ae.animate
|
|
29448
29621
|
} : {},
|
|
29449
|
-
children: (r) => /* @__PURE__ */ R(
|
|
29622
|
+
children: (r) => /* @__PURE__ */ R(RI, {
|
|
29450
29623
|
availableHeight: r,
|
|
29451
29624
|
client: l,
|
|
29452
29625
|
gridDriven: n !== null,
|
|
@@ -29472,7 +29645,7 @@ function kI({ onLayoutEffectChange: e, onRenderedSlotChange: t, debugEnabled: n
|
|
|
29472
29645
|
sendAppMessage: se
|
|
29473
29646
|
})
|
|
29474
29647
|
}, e.id)),
|
|
29475
|
-
_ && /* @__PURE__ */ R(
|
|
29648
|
+
_ && /* @__PURE__ */ R(PI, {
|
|
29476
29649
|
client: l,
|
|
29477
29650
|
controlsRect: a,
|
|
29478
29651
|
density: D,
|
|
@@ -29486,14 +29659,14 @@ function kI({ onLayoutEffectChange: e, onRenderedSlotChange: t, debugEnabled: n
|
|
|
29486
29659
|
}),
|
|
29487
29660
|
pe && /* @__PURE__ */ R("div", {
|
|
29488
29661
|
class: "absolute right-4 bottom-24 @max-mobile:right-3 @max-mobile:bottom-20",
|
|
29489
|
-
children: /* @__PURE__ */ R(
|
|
29662
|
+
children: /* @__PURE__ */ R(JF, { state: ie })
|
|
29490
29663
|
}),
|
|
29491
29664
|
ae.debug
|
|
29492
29665
|
]
|
|
29493
29666
|
});
|
|
29494
29667
|
}
|
|
29495
|
-
function
|
|
29496
|
-
let u =
|
|
29668
|
+
function PI({ client: e, controlsRect: t, density: n, exiting: r, frameWidth: i, hostTheme: a, instance: o, onComplete: s, onDebug: c, sendAppMessage: l }) {
|
|
29669
|
+
let u = ZF[n], d = {
|
|
29497
29670
|
...o.layout,
|
|
29498
29671
|
preferred_slot: "safe-area-bottom",
|
|
29499
29672
|
display_mode: "inline",
|
|
@@ -29502,7 +29675,7 @@ function AI({ client: e, controlsRect: t, density: n, exiting: r, frameWidth: i,
|
|
|
29502
29675
|
...a,
|
|
29503
29676
|
cssVars: {
|
|
29504
29677
|
...a.cssVars,
|
|
29505
|
-
"--font-mono":
|
|
29678
|
+
"--font-mono": TI
|
|
29506
29679
|
},
|
|
29507
29680
|
activity: {
|
|
29508
29681
|
density: n,
|
|
@@ -29511,13 +29684,13 @@ function AI({ client: e, controlsRect: t, density: n, exiting: r, frameWidth: i,
|
|
|
29511
29684
|
}), [n, a]);
|
|
29512
29685
|
return /* @__PURE__ */ R("div", {
|
|
29513
29686
|
class: "cvi-status-strip absolute flex justify-center",
|
|
29514
|
-
style:
|
|
29687
|
+
style: lI(t, 72, i),
|
|
29515
29688
|
"data-canvas-status-strip": !0,
|
|
29516
|
-
children: /* @__PURE__ */ R(
|
|
29689
|
+
children: /* @__PURE__ */ R(FI, {
|
|
29517
29690
|
exiting: r,
|
|
29518
29691
|
instanceId: o.id,
|
|
29519
|
-
children: /* @__PURE__ */ R(
|
|
29520
|
-
availableHeight:
|
|
29692
|
+
children: /* @__PURE__ */ R(RI, {
|
|
29693
|
+
availableHeight: EI,
|
|
29521
29694
|
client: e,
|
|
29522
29695
|
fixedHeightPx: u,
|
|
29523
29696
|
hostTheme: f,
|
|
@@ -29525,27 +29698,27 @@ function AI({ client: e, controlsRect: t, density: n, exiting: r, frameWidth: i,
|
|
|
29525
29698
|
layout: d,
|
|
29526
29699
|
onComplete: s,
|
|
29527
29700
|
onDebug: c,
|
|
29528
|
-
onDisplayModeChange:
|
|
29529
|
-
onNaturalHeightChange:
|
|
29701
|
+
onDisplayModeChange: DI,
|
|
29702
|
+
onNaturalHeightChange: DI,
|
|
29530
29703
|
sendAppMessage: l,
|
|
29531
29704
|
variant: "strip"
|
|
29532
29705
|
})
|
|
29533
29706
|
})
|
|
29534
29707
|
});
|
|
29535
29708
|
}
|
|
29536
|
-
function
|
|
29709
|
+
function FI({ exiting: e, instanceId: t, children: n }) {
|
|
29537
29710
|
let r = P(null);
|
|
29538
29711
|
return Ye(() => {
|
|
29539
29712
|
let t = r.current;
|
|
29540
29713
|
if (!t || e) return;
|
|
29541
29714
|
if (iS()) {
|
|
29542
|
-
t.style.transition = `opacity 300ms ${
|
|
29715
|
+
t.style.transition = `opacity 300ms ${$F}`, t.style.opacity = "0";
|
|
29543
29716
|
let e = globalThis.requestAnimationFrame(() => {
|
|
29544
29717
|
t.style.opacity = "1";
|
|
29545
29718
|
});
|
|
29546
29719
|
return () => globalThis.cancelAnimationFrame(e);
|
|
29547
29720
|
}
|
|
29548
|
-
let { stiffness: n, damping: i, mass: a } =
|
|
29721
|
+
let { stiffness: n, damping: i, mass: a } = eI, o = 0, s = 0, c = performance.now(), l = 0, u = () => {
|
|
29549
29722
|
let e = (1 - o) * 40;
|
|
29550
29723
|
t.style.transform = `translateY(${e.toFixed(2)}px)`, t.style.opacity = `${Math.min(Math.max(o, 0), 1)}`;
|
|
29551
29724
|
};
|
|
@@ -29561,7 +29734,7 @@ function jI({ exiting: e, instanceId: t, children: n }) {
|
|
|
29561
29734
|
return l = globalThis.requestAnimationFrame(d), () => globalThis.cancelAnimationFrame(l);
|
|
29562
29735
|
}, [e, t]), N(() => {
|
|
29563
29736
|
let t = r.current;
|
|
29564
|
-
t && e && (t.style.transition = `opacity 300ms ${
|
|
29737
|
+
t && e && (t.style.transition = `opacity 300ms ${$F}`, t.style.opacity = "0");
|
|
29565
29738
|
}, [e]), /* @__PURE__ */ R("div", {
|
|
29566
29739
|
ref: r,
|
|
29567
29740
|
class: "w-full",
|
|
@@ -29569,13 +29742,13 @@ function jI({ exiting: e, instanceId: t, children: n }) {
|
|
|
29569
29742
|
children: n
|
|
29570
29743
|
});
|
|
29571
29744
|
}
|
|
29572
|
-
var
|
|
29573
|
-
function
|
|
29574
|
-
let [o, s] =
|
|
29745
|
+
var II = 16;
|
|
29746
|
+
function LI({ slot: e, safeAreaTop: t, frameWidth: n, gridRect: r, gridAnimate: i = !1, children: a }) {
|
|
29747
|
+
let [o, s] = GI(), c = a(r ? r.height : e === "full" ? void 0 : s);
|
|
29575
29748
|
if (r) return /* @__PURE__ */ R("div", {
|
|
29576
29749
|
ref: o,
|
|
29577
29750
|
class: "pointer-events-auto absolute",
|
|
29578
|
-
style:
|
|
29751
|
+
style: qF(r, i),
|
|
29579
29752
|
"data-canvas-slot": e,
|
|
29580
29753
|
"data-grid-driven": "true",
|
|
29581
29754
|
children: /* @__PURE__ */ R("div", {
|
|
@@ -29587,7 +29760,7 @@ function NI({ slot: e, safeAreaTop: t, frameWidth: n, gridRect: r, gridAnimate:
|
|
|
29587
29760
|
let r = t == null ? "1rem" : `${t * 100}%`, i = n != null && n > 0 ? Math.max(0, n - 32) : void 0;
|
|
29588
29761
|
return /* @__PURE__ */ R("div", {
|
|
29589
29762
|
ref: o,
|
|
29590
|
-
class: `cvi-strip-lift ${
|
|
29763
|
+
class: `cvi-strip-lift ${qI(e)}`,
|
|
29591
29764
|
style: {
|
|
29592
29765
|
top: r,
|
|
29593
29766
|
bottom: "calc(72px + var(--mc-strip-band, 0px))",
|
|
@@ -29602,8 +29775,8 @@ function NI({ slot: e, safeAreaTop: t, frameWidth: n, gridRect: r, gridAnimate:
|
|
|
29602
29775
|
}
|
|
29603
29776
|
return e === "safe-area-bottom" ? /* @__PURE__ */ R("div", {
|
|
29604
29777
|
ref: o,
|
|
29605
|
-
class:
|
|
29606
|
-
style: { top: `${
|
|
29778
|
+
class: qI(e),
|
|
29779
|
+
style: { top: `${II}px` },
|
|
29607
29780
|
"data-canvas-slot": e,
|
|
29608
29781
|
children: /* @__PURE__ */ R("div", {
|
|
29609
29782
|
class: "contents",
|
|
@@ -29611,7 +29784,7 @@ function NI({ slot: e, safeAreaTop: t, frameWidth: n, gridRect: r, gridAnimate:
|
|
|
29611
29784
|
})
|
|
29612
29785
|
}) : /* @__PURE__ */ R("div", {
|
|
29613
29786
|
ref: o,
|
|
29614
|
-
class:
|
|
29787
|
+
class: qI(e),
|
|
29615
29788
|
"data-canvas-slot": e,
|
|
29616
29789
|
children: /* @__PURE__ */ R("div", {
|
|
29617
29790
|
class: "contents",
|
|
@@ -29619,7 +29792,7 @@ function NI({ slot: e, safeAreaTop: t, frameWidth: n, gridRect: r, gridAnimate:
|
|
|
29619
29792
|
})
|
|
29620
29793
|
});
|
|
29621
29794
|
}
|
|
29622
|
-
function
|
|
29795
|
+
function RI({ availableHeight: e, client: t, gridDriven: n = !1, gridKioskCard: r = !1, hostTheme: i, instance: a, layout: o, dimmed: s, onDebug: c, onComplete: l, onDisplayModeChange: u, onNaturalHeightChange: d, sendAppMessage: f, variant: p = "card", fixedHeightPx: m }) {
|
|
29623
29796
|
let h = p === "strip", g = m ?? 720, _ = P(null), v = P(null), y = P(e), b = P(r), x = P(m ?? 320), S = P({
|
|
29624
29797
|
fixed: m,
|
|
29625
29798
|
max: g
|
|
@@ -29632,17 +29805,17 @@ function PI({ availableHeight: e, client: t, gridDriven: n = !1, gridKioskCard:
|
|
|
29632
29805
|
}, [m, g]), N(() => {
|
|
29633
29806
|
w.current = a;
|
|
29634
29807
|
}, [a]), N(() => {
|
|
29635
|
-
x.current = k, v.current?.setHostContext(
|
|
29808
|
+
x.current = k, v.current?.setHostContext(HI(w.current, C.current, T.current, y.current, k, b.current));
|
|
29636
29809
|
}, [k]), N(() => {
|
|
29637
29810
|
y.current = e, b.current = r;
|
|
29638
|
-
let t =
|
|
29639
|
-
C.current = t, v.current?.setHostContext(
|
|
29811
|
+
let t = VI(i, _.current);
|
|
29812
|
+
C.current = t, v.current?.setHostContext(HI(w.current, t, T.current, e, x.current, r));
|
|
29640
29813
|
}, [
|
|
29641
29814
|
e,
|
|
29642
29815
|
i,
|
|
29643
29816
|
r
|
|
29644
29817
|
]), N(() => {
|
|
29645
|
-
T.current = o, v.current?.setHostContext(
|
|
29818
|
+
T.current = o, v.current?.setHostContext(HI(w.current, C.current, o, e, x.current, b.current));
|
|
29646
29819
|
}, [e, o]), N(() => {
|
|
29647
29820
|
D.current = l, ee.current = u, O.current = d, te.current = f;
|
|
29648
29821
|
}, [
|
|
@@ -29656,7 +29829,7 @@ function PI({ availableHeight: e, client: t, gridDriven: n = !1, gridKioskCard:
|
|
|
29656
29829
|
let n = !1, r = null, i = null, o = null, s = null, l = new URL(a.canvas_config.sandbox_url, globalThis.location.href).href, u = (e) => {
|
|
29657
29830
|
n || c({
|
|
29658
29831
|
iframeLifecycleState: "error",
|
|
29659
|
-
lastError:
|
|
29832
|
+
lastError: QI(e).message
|
|
29660
29833
|
}, {
|
|
29661
29834
|
error: e,
|
|
29662
29835
|
operation: "canvas.bridge"
|
|
@@ -29693,18 +29866,18 @@ function PI({ availableHeight: e, client: t, gridDriven: n = !1, gridKioskCard:
|
|
|
29693
29866
|
text: {},
|
|
29694
29867
|
structuredContent: {}
|
|
29695
29868
|
}
|
|
29696
|
-
}, { hostContext:
|
|
29869
|
+
}, { hostContext: HI(a, VI(C.current, e), T.current, y.current, x.current, b.current) });
|
|
29697
29870
|
r = f, v.current = f, f.oninitialized = () => {
|
|
29698
29871
|
n || (c({ iframeLifecycleState: "ready" }), E.current = w.current.revision, f.sendToolInput({ arguments: w.current.arguments }).catch(u));
|
|
29699
29872
|
}, f.onsizechange = ({ height: e }) => {
|
|
29700
29873
|
if (!n && typeof e == "number" && Number.isFinite(e)) {
|
|
29701
|
-
let { fixed: t, max: n } = S.current, r = t === void 0 ? Math.min(Math.max(e,
|
|
29874
|
+
let { fixed: t, max: n } = S.current, r = t === void 0 ? Math.min(Math.max(e, CI), n) : e === t ? t : Math.min(e, EI);
|
|
29702
29875
|
A(r), O.current(w.current.id, r);
|
|
29703
29876
|
}
|
|
29704
29877
|
}, f.onmessage = async (e) => {
|
|
29705
29878
|
let r = $b(e);
|
|
29706
29879
|
if (!r) {
|
|
29707
|
-
if (
|
|
29880
|
+
if (yI(e)) {
|
|
29708
29881
|
let e = "Magic Canvas message included text without interaction metadata; no interaction row was recorded.";
|
|
29709
29882
|
return c({
|
|
29710
29883
|
lastInteractionPostResult: "error",
|
|
@@ -29729,7 +29902,7 @@ function PI({ availableHeight: e, client: t, gridDriven: n = !1, gridKioskCard:
|
|
|
29729
29902
|
}
|
|
29730
29903
|
})();
|
|
29731
29904
|
if ("error" in a) {
|
|
29732
|
-
let e =
|
|
29905
|
+
let e = QI(a.error).message;
|
|
29733
29906
|
return c({
|
|
29734
29907
|
lastInteractionPostResult: "error",
|
|
29735
29908
|
lastError: e
|
|
@@ -29746,19 +29919,19 @@ function PI({ availableHeight: e, client: t, gridDriven: n = !1, gridKioskCard:
|
|
|
29746
29919
|
try {
|
|
29747
29920
|
u = nx(e, o);
|
|
29748
29921
|
} catch (e) {
|
|
29749
|
-
c({ lastError:
|
|
29922
|
+
c({ lastError: QI(e).message }), o.type === "submit" && console.warn("Magic Canvas dropped the response text of a submitted card.", e);
|
|
29750
29923
|
}
|
|
29751
29924
|
let d = !0;
|
|
29752
29925
|
try {
|
|
29753
|
-
await
|
|
29926
|
+
await gI(t, o.conversation_id, l.body);
|
|
29754
29927
|
} catch (e) {
|
|
29755
|
-
d = !1,
|
|
29928
|
+
d = !1, _I(e) ? vI(e, c) : (console.warn("Magic Canvas interaction POST failed; continuing without it and retrying in the background.", e), c({
|
|
29756
29929
|
lastInteractionPostResult: "failed_open",
|
|
29757
|
-
lastError:
|
|
29930
|
+
lastError: QI(e).message
|
|
29758
29931
|
}, {
|
|
29759
29932
|
error: e,
|
|
29760
29933
|
operation: "canvas.bridge"
|
|
29761
|
-
}),
|
|
29934
|
+
}), bI(t, o.conversation_id, l.body, c));
|
|
29762
29935
|
}
|
|
29763
29936
|
if (n) return {};
|
|
29764
29937
|
if (u) try {
|
|
@@ -29769,7 +29942,7 @@ function PI({ availableHeight: e, client: t, gridDriven: n = !1, gridKioskCard:
|
|
|
29769
29942
|
properties: { text: u }
|
|
29770
29943
|
});
|
|
29771
29944
|
} catch (e) {
|
|
29772
|
-
console.error("Magic Canvas respond send failed.", e), c({ lastError:
|
|
29945
|
+
console.error("Magic Canvas respond send failed.", e), c({ lastError: QI(e).message }, {
|
|
29773
29946
|
error: e,
|
|
29774
29947
|
operation: "canvas.bridge"
|
|
29775
29948
|
});
|
|
@@ -29779,18 +29952,18 @@ function PI({ availableHeight: e, client: t, gridDriven: n = !1, gridKioskCard:
|
|
|
29779
29952
|
lastError: void 0
|
|
29780
29953
|
}), tx(o) && (o.type === "submit" ? (s && clearTimeout(s), s = setTimeout(() => {
|
|
29781
29954
|
s = null, n || D.current();
|
|
29782
|
-
},
|
|
29955
|
+
}, SI(i.arguments))) : D.current()), {};
|
|
29783
29956
|
}, f.onupdatemodelcontext = async (e) => (i = e, o ||= setTimeout(() => {
|
|
29784
29957
|
o = null, d();
|
|
29785
|
-
},
|
|
29958
|
+
}, fI), {}), f.onrequestdisplaymode = async ({ mode: e }) => {
|
|
29786
29959
|
if (h) return { mode: "inline" };
|
|
29787
29960
|
let t = e === "fullscreen" ? "fullscreen" : "inline";
|
|
29788
29961
|
return ee.current(t), T.current = {
|
|
29789
29962
|
...T.current,
|
|
29790
29963
|
display_mode: t,
|
|
29791
29964
|
viable_slot: t === "fullscreen" ? "full" : T.current.viable_slot
|
|
29792
|
-
}, f.setHostContext(
|
|
29793
|
-
}, f.connect(new
|
|
29965
|
+
}, f.setHostContext(HI(w.current, C.current, T.current, y.current, x.current, b.current)), { mode: t };
|
|
29966
|
+
}, f.connect(new jI(e)).then(() => void 0).catch(u);
|
|
29794
29967
|
};
|
|
29795
29968
|
c({
|
|
29796
29969
|
iframeLifecycleState: "mounting",
|
|
@@ -29812,7 +29985,7 @@ function PI({ availableHeight: e, client: t, gridDriven: n = !1, gridKioskCard:
|
|
|
29812
29985
|
a.revision !== 0 && (a.revision <= E.current || (E.current = a.revision, v.current?.sendToolInput({ arguments: a.arguments }).catch((e) => {
|
|
29813
29986
|
c({
|
|
29814
29987
|
iframeLifecycleState: "error",
|
|
29815
|
-
lastError:
|
|
29988
|
+
lastError: QI(e).message
|
|
29816
29989
|
}, {
|
|
29817
29990
|
error: e,
|
|
29818
29991
|
operation: "canvas.bridge"
|
|
@@ -29823,7 +29996,7 @@ function PI({ availableHeight: e, client: t, gridDriven: n = !1, gridKioskCard:
|
|
|
29823
29996
|
a.revision,
|
|
29824
29997
|
c
|
|
29825
29998
|
]);
|
|
29826
|
-
let ne = o.viable_slot === "full" || o.display_mode === "fullscreen", re = ne ? null :
|
|
29999
|
+
let ne = o.viable_slot === "full" || o.display_mode === "fullscreen", re = ne ? null : UI(k, e, r), ie = re?.placeholderStyle, j = re?.cardStyle, ae = ne ? { height: "100%" } : re?.iframeStyle ?? {
|
|
29827
30000
|
width: "100%",
|
|
29828
30001
|
height: `${k}px`
|
|
29829
30002
|
}, oe = h ? "pointer-events-auto w-full overflow-hidden" : [
|
|
@@ -29831,7 +30004,7 @@ function PI({ availableHeight: e, client: t, gridDriven: n = !1, gridKioskCard:
|
|
|
29831
30004
|
r ? "" : "shadow-xl",
|
|
29832
30005
|
ne ? "fixed inset-4 z-10 max-w-none" : n ? "max-w-none" : "max-w-md",
|
|
29833
30006
|
s ? "scale-[0.98] opacity-40" : ""
|
|
29834
|
-
].filter(Boolean).join(" "), se =
|
|
30007
|
+
].filter(Boolean).join(" "), se = kI[a.canvas_config.component] ?? OI, ce = /* @__PURE__ */ R("div", {
|
|
29835
30008
|
class: oe,
|
|
29836
30009
|
style: j,
|
|
29837
30010
|
...h ? { "data-canvas-strip": o.viable_slot } : { "data-canvas-card": o.viable_slot },
|
|
@@ -29850,7 +30023,7 @@ function PI({ availableHeight: e, client: t, gridDriven: n = !1, gridKioskCard:
|
|
|
29850
30023
|
children: ce
|
|
29851
30024
|
});
|
|
29852
30025
|
}
|
|
29853
|
-
var
|
|
30026
|
+
var zI = [
|
|
29854
30027
|
"--color-base-100",
|
|
29855
30028
|
"--color-base-200",
|
|
29856
30029
|
"--color-base-300",
|
|
@@ -29860,17 +30033,17 @@ var FI = [
|
|
|
29860
30033
|
"--color-neutral",
|
|
29861
30034
|
"--color-neutral-content"
|
|
29862
30035
|
];
|
|
29863
|
-
function
|
|
30036
|
+
function BI(e) {
|
|
29864
30037
|
if (!e || typeof getComputedStyle != "function") return {};
|
|
29865
30038
|
let t = getComputedStyle(e), n = {};
|
|
29866
|
-
for (let e of
|
|
30039
|
+
for (let e of zI) {
|
|
29867
30040
|
let r = t.getPropertyValue(e).trim();
|
|
29868
30041
|
r && (n[e] = r);
|
|
29869
30042
|
}
|
|
29870
30043
|
return n;
|
|
29871
30044
|
}
|
|
29872
|
-
function
|
|
29873
|
-
let n =
|
|
30045
|
+
function VI(e, t) {
|
|
30046
|
+
let n = BI(t);
|
|
29874
30047
|
return Object.keys(n).length === 0 ? e : {
|
|
29875
30048
|
...e,
|
|
29876
30049
|
cssVars: {
|
|
@@ -29879,20 +30052,20 @@ function LI(e, t) {
|
|
|
29879
30052
|
}
|
|
29880
30053
|
};
|
|
29881
30054
|
}
|
|
29882
|
-
function
|
|
29883
|
-
let o = Ix(t, n), s = n.viable_slot === "full" || n.display_mode === "fullscreen", c = s ? void 0 :
|
|
30055
|
+
function HI(e, t, n, r, i, a = !1) {
|
|
30056
|
+
let o = Ix(t, n), s = n.viable_slot === "full" || n.display_mode === "fullscreen", c = s ? void 0 : XI(r), l = t.activity ? dI(t.cssVars, t.activity) : {}, u = s ? 1 : UI(i ?? 0, r, a)?.displayScale ?? 1;
|
|
29884
30057
|
return {
|
|
29885
30058
|
...e.canvas_config.host_context,
|
|
29886
30059
|
...o,
|
|
29887
30060
|
...l,
|
|
29888
30061
|
containerDimensions: {
|
|
29889
|
-
...
|
|
30062
|
+
...ZI(o.containerDimensions) ? o.containerDimensions : {},
|
|
29890
30063
|
...c === void 0 ? {} : { maxHeight: c },
|
|
29891
30064
|
displayScale: u
|
|
29892
30065
|
}
|
|
29893
30066
|
};
|
|
29894
30067
|
}
|
|
29895
|
-
function
|
|
30068
|
+
function UI(e, t, n = !1) {
|
|
29896
30069
|
if (t === void 0 || !Number.isFinite(t) || t <= 0) return null;
|
|
29897
30070
|
let r = Math.min(e, 720);
|
|
29898
30071
|
if (n) return {
|
|
@@ -29932,11 +30105,11 @@ function zI(e, t, n = !1) {
|
|
|
29932
30105
|
}
|
|
29933
30106
|
};
|
|
29934
30107
|
}
|
|
29935
|
-
function
|
|
29936
|
-
let e = P(null), [t, n] = M(() =>
|
|
30108
|
+
function WI() {
|
|
30109
|
+
let e = P(null), [t, n] = M(() => KI(null));
|
|
29937
30110
|
return N(() => {
|
|
29938
30111
|
let t = () => n((t) => {
|
|
29939
|
-
let n =
|
|
30112
|
+
let n = KI(e.current);
|
|
29940
30113
|
return t.width === n.width && t.height === n.height && t.visualViewportHeight === n.visualViewportHeight ? t : n;
|
|
29941
30114
|
});
|
|
29942
30115
|
t(), globalThis.addEventListener("resize", t), globalThis.visualViewport?.addEventListener("resize", t);
|
|
@@ -29946,7 +30119,7 @@ function BI() {
|
|
|
29946
30119
|
};
|
|
29947
30120
|
}, []), [e, t];
|
|
29948
30121
|
}
|
|
29949
|
-
function
|
|
30122
|
+
function GI() {
|
|
29950
30123
|
let e = P(null), [t, n] = M();
|
|
29951
30124
|
return N(() => {
|
|
29952
30125
|
let t = e.current;
|
|
@@ -29962,7 +30135,7 @@ function VI() {
|
|
|
29962
30135
|
return a.observe(t), () => a.disconnect();
|
|
29963
30136
|
}, []), [e, t];
|
|
29964
30137
|
}
|
|
29965
|
-
function
|
|
30138
|
+
function KI(e) {
|
|
29966
30139
|
let t = globalThis.visualViewport?.height, n = e?.getBoundingClientRect();
|
|
29967
30140
|
if (n && n.width > 0 && n.height > 0) {
|
|
29968
30141
|
let e = t === void 0 ? void 0 : Math.max(0, (globalThis.innerHeight || 0) - t);
|
|
@@ -29978,7 +30151,7 @@ function HI(e) {
|
|
|
29978
30151
|
visualViewportHeight: t
|
|
29979
30152
|
};
|
|
29980
30153
|
}
|
|
29981
|
-
function
|
|
30154
|
+
function qI(e) {
|
|
29982
30155
|
let t = "absolute flex gap-2";
|
|
29983
30156
|
switch (e) {
|
|
29984
30157
|
case "safe-area-left": return `${t} left-4 w-[28rem] flex-col overflow-y-auto [scrollbar-gutter:stable]`;
|
|
@@ -29987,24 +30160,24 @@ function UI(e) {
|
|
|
29987
30160
|
case "full": return `${t} inset-4 flex-col items-stretch justify-stretch`;
|
|
29988
30161
|
}
|
|
29989
30162
|
}
|
|
29990
|
-
function
|
|
30163
|
+
function JI(e) {
|
|
29991
30164
|
return e.display_mode === "fullscreen" && e.preferred_slot !== "full" ? e.preferred_slot : e.viable_slot;
|
|
29992
30165
|
}
|
|
29993
|
-
function
|
|
30166
|
+
function YI() {
|
|
29994
30167
|
return !1;
|
|
29995
30168
|
}
|
|
29996
|
-
function
|
|
30169
|
+
function XI(e) {
|
|
29997
30170
|
return e === void 0 || !Number.isFinite(e) || e <= 0 ? 720 : Math.min(Math.floor(e), 720);
|
|
29998
30171
|
}
|
|
29999
|
-
function
|
|
30172
|
+
function ZI(e) {
|
|
30000
30173
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
30001
30174
|
}
|
|
30002
|
-
function
|
|
30175
|
+
function QI(e) {
|
|
30003
30176
|
return e instanceof Error ? e : Error(String(e));
|
|
30004
30177
|
}
|
|
30005
30178
|
//#endregion
|
|
30006
30179
|
//#region ../core/src/magic-canvas/grid-error-boundary.tsx
|
|
30007
|
-
var
|
|
30180
|
+
var $I = class extends D {
|
|
30008
30181
|
state = { errored: !1 };
|
|
30009
30182
|
componentDidCatch(e) {
|
|
30010
30183
|
this.props.onError(e), this.setState({ errored: !0 });
|
|
@@ -30012,8 +30185,8 @@ var YI = class extends D {
|
|
|
30012
30185
|
render() {
|
|
30013
30186
|
return this.state.errored ? null : this.props.children;
|
|
30014
30187
|
}
|
|
30015
|
-
},
|
|
30016
|
-
function
|
|
30188
|
+
}, eL = 1e4;
|
|
30189
|
+
function tL(e, t = eL) {
|
|
30017
30190
|
let [n, r] = M(!1), i = P(!1);
|
|
30018
30191
|
return N(() => {
|
|
30019
30192
|
if (!e) {
|
|
@@ -30028,7 +30201,7 @@ function ZI(e, t = XI) {
|
|
|
30028
30201
|
}
|
|
30029
30202
|
//#endregion
|
|
30030
30203
|
//#region ../core/src/hooks/use-call-presence.ts
|
|
30031
|
-
function
|
|
30204
|
+
function nL(e) {
|
|
30032
30205
|
let t = Zf(), n = rp(t ?? ""), r = !ap(t ?? "").isOff, i = fb(e), a = i.phase === "ready" ? i.replicaId : "", o = ap(a), s = !r && (o.state === "playable" || o.state === "loading"), c = i.phase === "ready" && !e && !i.videoState.isOff, l = !e && t !== null && !n.isOff, u = i.phase !== "ready" || i.videoState.isOff;
|
|
30033
30206
|
return F(() => ({
|
|
30034
30207
|
presence: i,
|
|
@@ -30050,7 +30223,7 @@ function QI(e) {
|
|
|
30050
30223
|
}
|
|
30051
30224
|
//#endregion
|
|
30052
30225
|
//#region ../core/src/hooks/use-call-controls-visible.ts
|
|
30053
|
-
function
|
|
30226
|
+
function rL(e, t, n) {
|
|
30054
30227
|
let [r, i] = M(!0);
|
|
30055
30228
|
return N(() => {
|
|
30056
30229
|
if (!t) return;
|
|
@@ -30080,7 +30253,7 @@ function $I(e, t, n) {
|
|
|
30080
30253
|
}
|
|
30081
30254
|
//#endregion
|
|
30082
30255
|
//#region ../core/src/hooks/use-call-controls-rect.ts
|
|
30083
|
-
function
|
|
30256
|
+
function iL(e, t, n, r, i) {
|
|
30084
30257
|
let [a, o] = M(void 0);
|
|
30085
30258
|
return N(() => {
|
|
30086
30259
|
if (!r) return;
|
|
@@ -30114,8 +30287,8 @@ function eL(e, t, n, r, i) {
|
|
|
30114
30287
|
}
|
|
30115
30288
|
//#endregion
|
|
30116
30289
|
//#region ../core/src/hooks/use-replica-join-timeout.ts
|
|
30117
|
-
var
|
|
30118
|
-
function
|
|
30290
|
+
var aL = 1e4;
|
|
30291
|
+
function oL({ onTimeout: e, timeoutMs: t = aL, active: n = !0 }) {
|
|
30119
30292
|
let r = db().length > 0, [i, a] = M(!1), o = P(e);
|
|
30120
30293
|
return N(() => {
|
|
30121
30294
|
o.current = e;
|
|
@@ -30139,39 +30312,39 @@ function nL({ onTimeout: e, timeoutMs: t = tL, active: n = !0 }) {
|
|
|
30139
30312
|
}
|
|
30140
30313
|
//#endregion
|
|
30141
30314
|
//#region ../core/src/hooks/use-system-shutdown.ts
|
|
30142
|
-
function
|
|
30315
|
+
function sL(e) {
|
|
30143
30316
|
if (typeof e != "object" || !e) return !1;
|
|
30144
30317
|
let t = e;
|
|
30145
30318
|
return t.message_type === "system" && t.event_type === "system.shutdown";
|
|
30146
30319
|
}
|
|
30147
|
-
function
|
|
30320
|
+
function cL({ onShutdown: e }) {
|
|
30148
30321
|
let t = P(e);
|
|
30149
30322
|
N(() => {
|
|
30150
30323
|
t.current = e;
|
|
30151
30324
|
}, [e]), ep({ onAppMessage: I((e) => {
|
|
30152
|
-
|
|
30325
|
+
sL(e?.data) && t.current();
|
|
30153
30326
|
}, []) });
|
|
30154
30327
|
}
|
|
30155
30328
|
//#endregion
|
|
30156
30329
|
//#region ../core/src/hooks/use-picture-in-picture.ts
|
|
30157
|
-
var
|
|
30158
|
-
function
|
|
30330
|
+
var lL = dn("PiP"), uL = 360, dL = 280;
|
|
30331
|
+
function fL() {
|
|
30159
30332
|
return globalThis.window !== void 0 && "documentPictureInPicture" in globalThis.window;
|
|
30160
30333
|
}
|
|
30161
|
-
function
|
|
30162
|
-
let { enabled: t, active: n } = e, [r, i] = M(null), a =
|
|
30334
|
+
function pL(e) {
|
|
30335
|
+
let { enabled: t, active: n } = e, [r, i] = M(null), a = fL(), o = L(ng), s = I(() => {
|
|
30163
30336
|
i((e) => (e && !e.closed && e.close(), null));
|
|
30164
30337
|
}, []), c = I(async () => {
|
|
30165
30338
|
if (a && t && n && (!r || r.closed)) try {
|
|
30166
30339
|
let e = await globalThis.window.documentPictureInPicture.requestWindow({
|
|
30167
|
-
width:
|
|
30168
|
-
height:
|
|
30340
|
+
width: uL,
|
|
30341
|
+
height: dL
|
|
30169
30342
|
}), t = Ne.replace(/:host(?=[\s,{])/g, ":host, :root"), n = e.document.createElement("style");
|
|
30170
30343
|
n.textContent = t, e.document.head.appendChild(n), e.document.body.style.margin = "0", e.document.body.style.width = "100%", e.document.body.style.height = "100vh", e.document.body.style.overflow = "hidden", e.addEventListener("pagehide", () => {
|
|
30171
30344
|
i((t) => t === e ? null : t);
|
|
30172
30345
|
}, { once: !0 }), i(e);
|
|
30173
30346
|
} catch (e) {
|
|
30174
|
-
|
|
30347
|
+
lL.warn("Failed to open PiP window", e);
|
|
30175
30348
|
}
|
|
30176
30349
|
}, [
|
|
30177
30350
|
a,
|
|
@@ -30192,13 +30365,13 @@ function lL(e) {
|
|
|
30192
30365
|
try {
|
|
30193
30366
|
e.metadata = new MediaMetadata({ title: "Tavus conversation" }), e.playbackState = "playing", l = !0;
|
|
30194
30367
|
} catch (e) {
|
|
30195
|
-
|
|
30368
|
+
lL.warn("mediaSession metadata setup failed", e);
|
|
30196
30369
|
}
|
|
30197
30370
|
let t = (t, n) => {
|
|
30198
30371
|
try {
|
|
30199
30372
|
e.setActionHandler(t, n), r.push(t);
|
|
30200
30373
|
} catch (e) {
|
|
30201
|
-
|
|
30374
|
+
lL.info(`mediaSession.${t} not supported`, e);
|
|
30202
30375
|
}
|
|
30203
30376
|
};
|
|
30204
30377
|
t("enterpictureinpicture", () => {
|
|
@@ -30252,11 +30425,11 @@ function lL(e) {
|
|
|
30252
30425
|
}
|
|
30253
30426
|
//#endregion
|
|
30254
30427
|
//#region ../core/src/utils/device-preferences.ts
|
|
30255
|
-
var
|
|
30428
|
+
var mL = It(null), hL = {
|
|
30256
30429
|
active: !1,
|
|
30257
30430
|
video_shift_x: 0,
|
|
30258
30431
|
backdrop: { type: "snapshot_mirror" }
|
|
30259
|
-
},
|
|
30432
|
+
}, gL = dp(({ id: e, showAudioWave: t = !0 }) => {
|
|
30260
30433
|
let n = rp(e).isOff;
|
|
30261
30434
|
return /* @__PURE__ */ R("div", {
|
|
30262
30435
|
class: `relative aspect-square w-32 @max-mobile:w-24 rounded-box overflow-hidden bg-black/30 z-10 ${n ? "hidden" : ""}`,
|
|
@@ -30271,20 +30444,20 @@ var uL = It(null), dL = {
|
|
|
30271
30444
|
children: /* @__PURE__ */ R(ib, { id: e })
|
|
30272
30445
|
})]
|
|
30273
30446
|
});
|
|
30274
|
-
}),
|
|
30447
|
+
}), _L = dp(() => {
|
|
30275
30448
|
let e = Zf(), { isScreenSharing: t } = _y(), n = db()[0];
|
|
30276
|
-
return /* @__PURE__ */ R(E, { children: [t && n && /* @__PURE__ */ R(
|
|
30449
|
+
return /* @__PURE__ */ R(E, { children: [t && n && /* @__PURE__ */ R(gL, { id: n }), e && /* @__PURE__ */ R(gL, {
|
|
30277
30450
|
id: e,
|
|
30278
30451
|
showAudioWave: !1
|
|
30279
30452
|
})] });
|
|
30280
|
-
}),
|
|
30453
|
+
}), vL = dp(() => /* @__PURE__ */ R("div", {
|
|
30281
30454
|
class: "cvi-strip-lift absolute bottom-4 @max-mobile:bottom-[calc(5rem_+_var(--cvi-status-strip,0px))] left-4 flex flex-col items-end gap-2 z-20",
|
|
30282
|
-
children: /* @__PURE__ */ R(
|
|
30283
|
-
})),
|
|
30455
|
+
children: /* @__PURE__ */ R(_L, {})
|
|
30456
|
+
})), yL = dp(({ personaSessionId: e, localId: t, isScreenSharing: n, avatarOff: r, effect: i, animate: a }) => /* @__PURE__ */ R(E, { children: [
|
|
30284
30457
|
/* @__PURE__ */ R("div", { class: "absolute inset-0 bg-base-200" }),
|
|
30285
30458
|
i.content && /* @__PURE__ */ R("div", {
|
|
30286
30459
|
class: "absolute overflow-hidden rounded-box bg-black",
|
|
30287
|
-
style:
|
|
30460
|
+
style: qF(i.content, a),
|
|
30288
30461
|
children: /* @__PURE__ */ R(py, {
|
|
30289
30462
|
sessionId: n ? t ?? "" : e,
|
|
30290
30463
|
type: "screenVideo",
|
|
@@ -30293,8 +30466,8 @@ var uL = It(null), dL = {
|
|
|
30293
30466
|
})
|
|
30294
30467
|
}),
|
|
30295
30468
|
i.replica && /* @__PURE__ */ R("div", {
|
|
30296
|
-
class:
|
|
30297
|
-
style:
|
|
30469
|
+
class: PF("absolute overflow-hidden", i.replicaCollapsed && "rounded-box"),
|
|
30470
|
+
style: qF(i.replica, a),
|
|
30298
30471
|
children: /* @__PURE__ */ R(gb, {
|
|
30299
30472
|
personaSessionId: e,
|
|
30300
30473
|
localSessionId: t,
|
|
@@ -30302,11 +30475,11 @@ var uL = It(null), dL = {
|
|
|
30302
30475
|
avatarOff: r
|
|
30303
30476
|
})
|
|
30304
30477
|
})
|
|
30305
|
-
] })),
|
|
30306
|
-
let { effect: e, animate: t } =
|
|
30478
|
+
] })), bL = dp(() => {
|
|
30479
|
+
let { effect: e, animate: t } = zF.value, n = Zf();
|
|
30307
30480
|
return n === null || e.selfView === null ? null : /* @__PURE__ */ R("div", {
|
|
30308
30481
|
class: "absolute z-20 overflow-hidden rounded-box bg-black/30",
|
|
30309
|
-
style:
|
|
30482
|
+
style: qF(e.selfView, t),
|
|
30310
30483
|
children: /* @__PURE__ */ R(py, {
|
|
30311
30484
|
automirror: !0,
|
|
30312
30485
|
sessionId: n,
|
|
@@ -30315,23 +30488,23 @@ var uL = It(null), dL = {
|
|
|
30315
30488
|
className: "h-full w-full object-cover"
|
|
30316
30489
|
})
|
|
30317
30490
|
});
|
|
30318
|
-
}),
|
|
30319
|
-
let t =
|
|
30320
|
-
return t === "hidden" ? null : t === "engine" ? /* @__PURE__ */ R(
|
|
30321
|
-
onError:
|
|
30322
|
-
children: /* @__PURE__ */ R(
|
|
30323
|
-
}) : e === "safe-area-bottom" ? null : /* @__PURE__ */ R(
|
|
30324
|
-
}),
|
|
30491
|
+
}), xL = dp(({ canvasRenderedSlot: e }) => {
|
|
30492
|
+
let t = $N(zF.value.effect);
|
|
30493
|
+
return t === "hidden" ? null : t === "engine" ? /* @__PURE__ */ R($I, {
|
|
30494
|
+
onError: GN,
|
|
30495
|
+
children: /* @__PURE__ */ R(bL, {})
|
|
30496
|
+
}) : e === "safe-area-bottom" ? null : /* @__PURE__ */ R(vL, {});
|
|
30497
|
+
}), SL = dp(() => {
|
|
30325
30498
|
let e = db()[0];
|
|
30326
30499
|
return e ? /* @__PURE__ */ R(my, { sessionId: e }) : null;
|
|
30327
|
-
}),
|
|
30328
|
-
let { presence: i, localId: a, isScreenSharing: o, isPersonaPresenting: s } = t, c =
|
|
30500
|
+
}), CL = dp((e) => /* @__PURE__ */ R(E, { children: [/* @__PURE__ */ R(SL, {}), /* @__PURE__ */ R(wL, { ...e })] })), wL = dp(({ isAudioOnly: e, presence: t, canvasLayoutEffect: n, canvasRenderedSlot: r }) => {
|
|
30501
|
+
let { presence: i, localId: a, isScreenSharing: o, isPersonaPresenting: s } = t, c = zF.value, l = n.active && !o && (!e || s);
|
|
30329
30502
|
return i.phase === "left" ? /* @__PURE__ */ R(nb, {}) : i.phase === "connecting" ? /* @__PURE__ */ R(tb, {}) : e && !s ? /* @__PURE__ */ R("div", {
|
|
30330
30503
|
class: "absolute inset-0 flex items-center justify-center",
|
|
30331
30504
|
children: /* @__PURE__ */ R(cb, { sessionId: i.replicaId })
|
|
30332
|
-
}) : c.effect.driving ? /* @__PURE__ */ R(
|
|
30333
|
-
onError:
|
|
30334
|
-
children: /* @__PURE__ */ R(
|
|
30505
|
+
}) : c.effect.driving ? /* @__PURE__ */ R($I, {
|
|
30506
|
+
onError: GN,
|
|
30507
|
+
children: /* @__PURE__ */ R(yL, {
|
|
30335
30508
|
personaSessionId: i.replicaId,
|
|
30336
30509
|
localId: a,
|
|
30337
30510
|
isScreenSharing: o,
|
|
@@ -30345,7 +30518,7 @@ var uL = It(null), dL = {
|
|
|
30345
30518
|
avatarOff: i.videoState.isOff,
|
|
30346
30519
|
canvasLayoutEffect: n,
|
|
30347
30520
|
smartSidecarActive: l
|
|
30348
|
-
}) : /* @__PURE__ */ R(
|
|
30521
|
+
}) : /* @__PURE__ */ R(TL, {
|
|
30349
30522
|
personaSessionId: i.replicaId,
|
|
30350
30523
|
localId: a,
|
|
30351
30524
|
isScreenSharing: o,
|
|
@@ -30354,11 +30527,11 @@ var uL = It(null), dL = {
|
|
|
30354
30527
|
canvasLayoutEffect: n,
|
|
30355
30528
|
canvasRenderedSlot: r
|
|
30356
30529
|
});
|
|
30357
|
-
}),
|
|
30530
|
+
}), TL = dp(({ personaSessionId: e, localId: t, isScreenSharing: n, avatarOff: r, smartSidecarActive: i, canvasLayoutEffect: a, canvasRenderedSlot: o }) => /* @__PURE__ */ R(fS, {
|
|
30358
30531
|
canvasLayoutEffect: a,
|
|
30359
30532
|
smartSidecarActive: i,
|
|
30360
30533
|
isScreenSharing: n,
|
|
30361
|
-
captureSnapshot:
|
|
30534
|
+
captureSnapshot: kL,
|
|
30362
30535
|
personaMode: "auto",
|
|
30363
30536
|
renderedSlot: o,
|
|
30364
30537
|
fill: (i) => /* @__PURE__ */ R(gb, {
|
|
@@ -30368,7 +30541,7 @@ var uL = It(null), dL = {
|
|
|
30368
30541
|
avatarOff: r,
|
|
30369
30542
|
videoRef: i
|
|
30370
30543
|
})
|
|
30371
|
-
})),
|
|
30544
|
+
})), EL = dp(({ items: e }) => {
|
|
30372
30545
|
let [t, n] = M(!1), r = P(null);
|
|
30373
30546
|
return N(() => {
|
|
30374
30547
|
if (!t) return;
|
|
@@ -30398,8 +30571,8 @@ var uL = It(null), dL = {
|
|
|
30398
30571
|
children: e
|
|
30399
30572
|
})]
|
|
30400
30573
|
});
|
|
30401
|
-
}),
|
|
30402
|
-
let t = Xf(), { config: n } = Dh(), { session: r, state: i, end: a, endSession: o } = Hy(), s = Zf(), c = P(null), l = L(Jg)?.frameRef ?? c, [u, d] = M(!1), f = Wv() === "full-screen", [p, m] = M(!1), [h, g] = M(
|
|
30574
|
+
}), DL = dp(({ items: e }) => e.length <= 1 ? /* @__PURE__ */ R(E, { children: e }) : /* @__PURE__ */ R(EL, { items: e })), OL = dp(({ onLeave: e }) => {
|
|
30575
|
+
let t = Xf(), { config: n } = Dh(), { session: r, state: i, end: a, endSession: o } = Hy(), s = Zf(), c = P(null), l = L(Jg)?.frameRef ?? c, [u, d] = M(!1), f = Wv() === "full-screen", [p, m] = M(!1), [h, g] = M(hL), [_, v] = M(null), [y, b] = M(null), x = n.value.customization.conversation, S = tL(x.show_fullscreen_hint && _ !== null && !u && !f), C = P(null), w = P(null), T = r.value?.conversationUrl, E = r.value?.magicGrid === !0, D = rL(C, zN(x.magic_grid, E), T), ee = iL(C, w, 72, !0, T), O = x.modality === "audio", te = nL(O), k = x.modality === "chat", A = x.modality === "video", ne = x.enable_chat, re = x.enable_closed_captions, ie = x.enable_picture_in_picture, { pipWindow: j } = pL({
|
|
30403
30576
|
enabled: ie && !k,
|
|
30404
30577
|
active: t === "joined-meeting"
|
|
30405
30578
|
}), ae = P(null), oe = i.value === "connected" ? r.value?.conversationId : void 0;
|
|
@@ -30415,13 +30588,13 @@ var uL = It(null), dL = {
|
|
|
30415
30588
|
}, [se]);
|
|
30416
30589
|
let { camera: ce, requestCamera: le } = Vh(), { isCamMuted: ue } = hy(), de = ce.isGranted && !ue;
|
|
30417
30590
|
N(() => {
|
|
30418
|
-
A && t === "joined-meeting" && (
|
|
30591
|
+
A && t === "joined-meeting" && (mL.value = de);
|
|
30419
30592
|
}, [
|
|
30420
30593
|
A,
|
|
30421
30594
|
t,
|
|
30422
30595
|
de
|
|
30423
30596
|
]);
|
|
30424
|
-
let fe = P(A && !s &&
|
|
30597
|
+
let fe = P(A && !s && mL.value === !0);
|
|
30425
30598
|
N(() => {
|
|
30426
30599
|
t === "joined-meeting" && fe.current && (fe.current = !1, le());
|
|
30427
30600
|
}, [t, le]), N(() => {
|
|
@@ -30445,10 +30618,10 @@ var uL = It(null), dL = {
|
|
|
30445
30618
|
let me = I(() => {
|
|
30446
30619
|
se();
|
|
30447
30620
|
}, [se]);
|
|
30448
|
-
if (
|
|
30621
|
+
if (oL({
|
|
30449
30622
|
active: !k && t === "joined-meeting",
|
|
30450
30623
|
onTimeout: me
|
|
30451
|
-
}),
|
|
30624
|
+
}), cL({ onShutdown: me }), !T) return null;
|
|
30452
30625
|
if (k) return /* @__PURE__ */ R(Yy, {
|
|
30453
30626
|
defaultOpen: !0,
|
|
30454
30627
|
children: /* @__PURE__ */ R("div", {
|
|
@@ -30480,14 +30653,14 @@ var uL = It(null), dL = {
|
|
|
30480
30653
|
/* @__PURE__ */ R("div", {
|
|
30481
30654
|
class: "relative w-full h-full z-[5]",
|
|
30482
30655
|
children: [
|
|
30483
|
-
/* @__PURE__ */ R(
|
|
30656
|
+
/* @__PURE__ */ R(CL, {
|
|
30484
30657
|
isAudioOnly: O,
|
|
30485
30658
|
presence: te,
|
|
30486
30659
|
canvasLayoutEffect: h,
|
|
30487
30660
|
canvasRenderedSlot: _
|
|
30488
30661
|
}),
|
|
30489
|
-
!O && /* @__PURE__ */ R(
|
|
30490
|
-
/* @__PURE__ */ R(
|
|
30662
|
+
!O && /* @__PURE__ */ R(xL, { canvasRenderedSlot: _ }),
|
|
30663
|
+
/* @__PURE__ */ R(NI, {
|
|
30491
30664
|
debugEnabled: p,
|
|
30492
30665
|
callPresence: te,
|
|
30493
30666
|
callControlsVisible: D,
|
|
@@ -30525,7 +30698,7 @@ var uL = It(null), dL = {
|
|
|
30525
30698
|
/* @__PURE__ */ R(Iy, { level: !0 }),
|
|
30526
30699
|
!O && /* @__PURE__ */ R(Ry, {}),
|
|
30527
30700
|
re && /* @__PURE__ */ R(Ky, {}),
|
|
30528
|
-
/* @__PURE__ */ R(
|
|
30701
|
+
/* @__PURE__ */ R(DL, { items: he }),
|
|
30529
30702
|
/* @__PURE__ */ R("button", {
|
|
30530
30703
|
type: "button",
|
|
30531
30704
|
class: "btn btn-control btn-error",
|
|
@@ -30542,7 +30715,7 @@ var uL = It(null), dL = {
|
|
|
30542
30715
|
]
|
|
30543
30716
|
}), j && Tp(/* @__PURE__ */ R(mb, { onLeave: me }), j.document.body)] }) }) });
|
|
30544
30717
|
});
|
|
30545
|
-
function
|
|
30718
|
+
function kL(e) {
|
|
30546
30719
|
if (!e || e.readyState < 2 || !e.videoWidth || !e.videoHeight) return null;
|
|
30547
30720
|
let t = document.createElement("canvas"), n = Math.round(640 * (e.videoHeight / e.videoWidth));
|
|
30548
30721
|
t.width = 640, t.height = n;
|
|
@@ -30557,7 +30730,7 @@ function TL(e) {
|
|
|
30557
30730
|
}
|
|
30558
30731
|
//#endregion
|
|
30559
30732
|
//#region ../core/src/components/hair-check/index.tsx
|
|
30560
|
-
function
|
|
30733
|
+
function AL(e, t, n) {
|
|
30561
30734
|
switch (t) {
|
|
30562
30735
|
case "granted": return n ? e?.cameraOptional ?? "Camera is optional — turn it on anytime." : e?.ready ?? "You're all set — join whenever you're ready.";
|
|
30563
30736
|
case "blocked": return e?.denied ?? "Microphone is blocked. Click the mic to see how to allow it.";
|
|
@@ -30568,7 +30741,7 @@ function EL(e, t, n) {
|
|
|
30568
30741
|
default: return e?.loading ?? "Getting your microphone ready...";
|
|
30569
30742
|
}
|
|
30570
30743
|
}
|
|
30571
|
-
var
|
|
30744
|
+
var jL = dp(({ text: e, isJoining: t = !1, onJoin: n, onCancel: r }) => {
|
|
30572
30745
|
let i = Yf(), { config: a } = Dh(), { cameraOnStart: o } = L(gt), { localSessionId: s, isCamMuted: c } = hy(), { mic: l, camera: u, requestMic: d, requestCamera: f } = Vh(), p = a.value.customization.conversation.modality === "video", m = gv(a.value), h = hv(a.value);
|
|
30573
30746
|
N(() => {
|
|
30574
30747
|
d();
|
|
@@ -30584,7 +30757,7 @@ var DL = dp(({ text: e, isJoining: t = !1, onJoin: n, onCancel: r }) => {
|
|
|
30584
30757
|
u.isBlocked,
|
|
30585
30758
|
f
|
|
30586
30759
|
]);
|
|
30587
|
-
let v = p && g && !u.isGranted, y =
|
|
30760
|
+
let v = p && g && !u.isGranted, y = AL(e, l.status, v);
|
|
30588
30761
|
return /* @__PURE__ */ R(wy, { children: /* @__PURE__ */ R("div", {
|
|
30589
30762
|
class: "absolute inset-0 motion-safe:animate-[tavusFadeUp_280ms_ease-out]",
|
|
30590
30763
|
children: [u.isGranted && !c ? /* @__PURE__ */ R("div", {
|
|
@@ -30635,8 +30808,8 @@ var DL = dp(({ text: e, isJoining: t = !1, onJoin: n, onCancel: r }) => {
|
|
|
30635
30808
|
})]
|
|
30636
30809
|
})]
|
|
30637
30810
|
}) });
|
|
30638
|
-
}),
|
|
30639
|
-
function
|
|
30811
|
+
}), ML = "Password required", NL = "Enter the password to start this conversation.", PL = "Password", FL = "Continue";
|
|
30812
|
+
function IL({ onSubmit: e, text: t, isSubmitting: n = !1, errorMessage: r }) {
|
|
30640
30813
|
let [i, a] = M(""), o = Xe();
|
|
30641
30814
|
return /* @__PURE__ */ R("div", {
|
|
30642
30815
|
class: "absolute inset-0 z-30 flex items-center justify-center bg-black/50 backdrop-blur-sm p-4",
|
|
@@ -30656,18 +30829,18 @@ function ML({ onSubmit: e, text: t, isSubmitting: n = !1, errorMessage: r }) {
|
|
|
30656
30829
|
/* @__PURE__ */ R("h3", {
|
|
30657
30830
|
id: `${o}-title`,
|
|
30658
30831
|
class: "card-title text-base-content",
|
|
30659
|
-
children: t?.title ??
|
|
30832
|
+
children: t?.title ?? ML
|
|
30660
30833
|
}),
|
|
30661
30834
|
/* @__PURE__ */ R("p", {
|
|
30662
30835
|
class: "text-sm text-base-content/70",
|
|
30663
|
-
children: t?.description ??
|
|
30836
|
+
children: t?.description ?? NL
|
|
30664
30837
|
}),
|
|
30665
30838
|
/* @__PURE__ */ R("input", {
|
|
30666
30839
|
id: o,
|
|
30667
30840
|
type: "password",
|
|
30668
30841
|
autocomplete: "current-password",
|
|
30669
30842
|
class: "input input-bordered w-full",
|
|
30670
|
-
placeholder: t?.placeholder ??
|
|
30843
|
+
placeholder: t?.placeholder ?? PL,
|
|
30671
30844
|
value: i,
|
|
30672
30845
|
disabled: n,
|
|
30673
30846
|
onInput: (e) => a(e.target.value),
|
|
@@ -30683,7 +30856,7 @@ function ML({ onSubmit: e, text: t, isSubmitting: n = !1, errorMessage: r }) {
|
|
|
30683
30856
|
type: "submit",
|
|
30684
30857
|
disabled: !i.trim(),
|
|
30685
30858
|
loading: n,
|
|
30686
|
-
children: t?.submit ??
|
|
30859
|
+
children: t?.submit ?? FL
|
|
30687
30860
|
})
|
|
30688
30861
|
]
|
|
30689
30862
|
})
|
|
@@ -30692,7 +30865,7 @@ function ML({ onSubmit: e, text: t, isSubmitting: n = !1, errorMessage: r }) {
|
|
|
30692
30865
|
}
|
|
30693
30866
|
//#endregion
|
|
30694
30867
|
//#region ../core/src/components/welcome/index.tsx
|
|
30695
|
-
function
|
|
30868
|
+
function LL({ text: e, onStart: t, isStarting: n, permissionRequest: r }) {
|
|
30696
30869
|
let { config: i, deploymentId: a } = Dh(), o = Wv() === "full-screen", s = L(rh), c = gv(i.value), l = c.btn_title ?? e?.fallback_button ?? "Start the conversation", u = i.value.customization.terms_content?.trim() ?? "", d = i.value.customization.terms_enabled === !0, f = u.length > 0, p = f && d, m = F(() => p && km(a, u), [
|
|
30697
30870
|
p,
|
|
30698
30871
|
a,
|
|
@@ -30701,7 +30874,7 @@ function NL({ text: e, onStart: t, isStarting: n, permissionRequest: r }) {
|
|
|
30701
30874
|
return /* @__PURE__ */ R(ry, {
|
|
30702
30875
|
title: c.title,
|
|
30703
30876
|
description: c.description,
|
|
30704
|
-
overlay: v && s ? /* @__PURE__ */ R(
|
|
30877
|
+
overlay: v && s ? /* @__PURE__ */ R(IL, { onSubmit: s.setPassword }) : null,
|
|
30705
30878
|
children: [/* @__PURE__ */ R("div", {
|
|
30706
30879
|
class: "relative",
|
|
30707
30880
|
children: [r && /* @__PURE__ */ R(Kv, {
|
|
@@ -30739,28 +30912,28 @@ function NL({ text: e, onStart: t, isStarting: n, permissionRequest: r }) {
|
|
|
30739
30912
|
}
|
|
30740
30913
|
//#endregion
|
|
30741
30914
|
//#region ../core/src/hooks/use-haircheck-text.ts
|
|
30742
|
-
function
|
|
30915
|
+
function RL(...e) {
|
|
30743
30916
|
for (let t of e) {
|
|
30744
30917
|
let e = t?.trim();
|
|
30745
30918
|
if (e) return e;
|
|
30746
30919
|
}
|
|
30747
30920
|
}
|
|
30748
|
-
function
|
|
30921
|
+
function zL() {
|
|
30749
30922
|
let { config: e } = Dh(), { haircheck: t } = e.value.customization;
|
|
30750
30923
|
return F(() => ({
|
|
30751
|
-
prompt:
|
|
30752
|
-
ready:
|
|
30753
|
-
denied:
|
|
30754
|
-
join:
|
|
30755
|
-
cancel:
|
|
30924
|
+
prompt: RL(t.permission_request_description, t.permission_request_title),
|
|
30925
|
+
ready: RL(t.permission_granted_description, t.permission_granted_title),
|
|
30926
|
+
denied: RL(t.permission_denied_description, t.permission_denied_title),
|
|
30927
|
+
join: RL(t.join_button),
|
|
30928
|
+
cancel: RL(t.cancel_btn)
|
|
30756
30929
|
}), [t]);
|
|
30757
30930
|
}
|
|
30758
30931
|
//#endregion
|
|
30759
30932
|
//#region ../core/src/shells/flow-state-body.tsx
|
|
30760
|
-
function
|
|
30761
|
-
let r =
|
|
30933
|
+
function BL({ flow: e, welcomeText: t, onUnavailableCancel: n }) {
|
|
30934
|
+
let r = zL();
|
|
30762
30935
|
switch (e.state) {
|
|
30763
|
-
case "idle": return /* @__PURE__ */ R(
|
|
30936
|
+
case "idle": return /* @__PURE__ */ R(LL, {
|
|
30764
30937
|
text: t,
|
|
30765
30938
|
onStart: () => {
|
|
30766
30939
|
e.start();
|
|
@@ -30768,7 +30941,7 @@ function IL({ flow: e, welcomeText: t, onUnavailableCancel: n }) {
|
|
|
30768
30941
|
isStarting: e.isStarting,
|
|
30769
30942
|
permissionRequest: e.permissionRequest
|
|
30770
30943
|
});
|
|
30771
|
-
case "haircheck": return /* @__PURE__ */ R(
|
|
30944
|
+
case "haircheck": return /* @__PURE__ */ R(jL, {
|
|
30772
30945
|
text: r,
|
|
30773
30946
|
onJoin: () => {
|
|
30774
30947
|
e.join();
|
|
@@ -30776,7 +30949,7 @@ function IL({ flow: e, welcomeText: t, onUnavailableCancel: n }) {
|
|
|
30776
30949
|
onCancel: () => e.cancel(),
|
|
30777
30950
|
isJoining: e.isStarting
|
|
30778
30951
|
});
|
|
30779
|
-
case "call": return /* @__PURE__ */ R(
|
|
30952
|
+
case "call": return /* @__PURE__ */ R(OL, { onLeave: () => e.leave() });
|
|
30780
30953
|
case "ended": return /* @__PURE__ */ R(dy, {
|
|
30781
30954
|
isStarting: e.isStarting,
|
|
30782
30955
|
permissionRequest: e.permissionRequest,
|
|
@@ -30801,7 +30974,7 @@ function IL({ flow: e, welcomeText: t, onUnavailableCancel: n }) {
|
|
|
30801
30974
|
}
|
|
30802
30975
|
//#endregion
|
|
30803
30976
|
//#region ../core/src/shells/embed/embed-shell.tsx
|
|
30804
|
-
function
|
|
30977
|
+
function VL() {
|
|
30805
30978
|
let { config: e, configError: t } = Dh(), n = Uv(), r = Vv(), i = F(() => ({ fallback_button: n.start_button }), [n.start_button]), a = e.value.is_available, o = e.value.unavailable_reason;
|
|
30806
30979
|
return /* @__PURE__ */ R(Yg, { children: t.value ? /* @__PURE__ */ R(Bv, {
|
|
30807
30980
|
cause: "error",
|
|
@@ -30811,18 +30984,18 @@ function LL() {
|
|
|
30811
30984
|
cause: o ?? "daily_limit",
|
|
30812
30985
|
canRetry: !1,
|
|
30813
30986
|
onRetry: () => {}
|
|
30814
|
-
}) : /* @__PURE__ */ R(
|
|
30987
|
+
}) : /* @__PURE__ */ R(BL, {
|
|
30815
30988
|
flow: r,
|
|
30816
30989
|
welcomeText: i
|
|
30817
30990
|
}) });
|
|
30818
30991
|
}
|
|
30819
30992
|
//#endregion
|
|
30820
30993
|
//#region ../core/src/embed/tavus-embed.tsx
|
|
30821
|
-
var
|
|
30822
|
-
function
|
|
30994
|
+
var HL = ":host {\n display: block;\n /* Containing block for the captcha overlay, which is owned by a provider\n above the shells and so has no positioned ancestor of its own. */\n position: relative;\n width: 100%;\n height: 100%;\n max-height: 100vh;\n overflow: hidden;\n background: transparent;\n font-family: system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;\n}";
|
|
30995
|
+
function UL(e) {
|
|
30823
30996
|
return /* @__PURE__ */ R(E, { children: [
|
|
30824
30997
|
/* @__PURE__ */ R("style", { dangerouslySetInnerHTML: { __html: Ne } }),
|
|
30825
|
-
/* @__PURE__ */ R("style", { dangerouslySetInnerHTML: { __html:
|
|
30998
|
+
/* @__PURE__ */ R("style", { dangerouslySetInnerHTML: { __html: HL } }),
|
|
30826
30999
|
/* @__PURE__ */ R(vt, {
|
|
30827
31000
|
surface: "embed",
|
|
30828
31001
|
layout: e.layout,
|
|
@@ -30837,14 +31010,14 @@ function zL(e) {
|
|
|
30837
31010
|
token: e.token,
|
|
30838
31011
|
children: /* @__PURE__ */ R(Pr, {
|
|
30839
31012
|
fallback: /* @__PURE__ */ R(qg, {}),
|
|
30840
|
-
children: /* @__PURE__ */ R(Ir, { children: /* @__PURE__ */ R(ih, { children: /* @__PURE__ */ R(Eh, { children: /* @__PURE__ */ R(Xh, { children: /* @__PURE__ */ R(tg, { children: /* @__PURE__ */ R(rg, { children: /* @__PURE__ */ R(Rg, { children: /* @__PURE__ */ R(
|
|
31013
|
+
children: /* @__PURE__ */ R(Ir, { children: /* @__PURE__ */ R(ih, { children: /* @__PURE__ */ R(Eh, { children: /* @__PURE__ */ R(Xh, { children: /* @__PURE__ */ R(tg, { children: /* @__PURE__ */ R(rg, { children: /* @__PURE__ */ R(Rg, { children: /* @__PURE__ */ R(VL, {}) }) }) }) }) }) }) })
|
|
30841
31014
|
})
|
|
30842
31015
|
})
|
|
30843
31016
|
] });
|
|
30844
31017
|
}
|
|
30845
|
-
var
|
|
30846
|
-
function
|
|
30847
|
-
|
|
31018
|
+
var WL;
|
|
31019
|
+
function GL() {
|
|
31020
|
+
WL ||= Te(UL, "tavus-embed", [
|
|
30848
31021
|
"layout",
|
|
30849
31022
|
"camera-on-start",
|
|
30850
31023
|
"deployment-id",
|
|
@@ -30863,7 +31036,7 @@ function VL() {
|
|
|
30863
31036
|
dn("Widget");
|
|
30864
31037
|
//#endregion
|
|
30865
31038
|
//#region src/integration.ts
|
|
30866
|
-
var
|
|
31039
|
+
var KL = [
|
|
30867
31040
|
"tavus:chat-message",
|
|
30868
31041
|
"tavus:conversation-created",
|
|
30869
31042
|
"tavus:conversation-ended",
|
|
@@ -30875,7 +31048,7 @@ var HL = [
|
|
|
30875
31048
|
"tavus:ready",
|
|
30876
31049
|
"tavus:state-change",
|
|
30877
31050
|
"tavus:tool-call"
|
|
30878
|
-
],
|
|
31051
|
+
], qL = class {
|
|
30879
31052
|
element = null;
|
|
30880
31053
|
tagName;
|
|
30881
31054
|
constructor(e = "tavus-embed") {
|
|
@@ -30926,6 +31099,6 @@ var HL = [
|
|
|
30926
31099
|
};
|
|
30927
31100
|
//#endregion
|
|
30928
31101
|
//#region src/index.ts
|
|
30929
|
-
typeof window < "u" &&
|
|
31102
|
+
typeof window < "u" && GL();
|
|
30930
31103
|
//#endregion
|
|
30931
|
-
export {
|
|
31104
|
+
export { KL as TAVUS_EVENT_NAMES, qL as TavusIntegration };
|