@tavus/embed 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.iife.js +13 -13
- package/dist/index.mjs +871 -700
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -28270,6 +28270,7 @@ var mF = {
|
|
|
28270
28270
|
pendingSinceMs: null,
|
|
28271
28271
|
lastResolution: null
|
|
28272
28272
|
}, hF = {
|
|
28273
|
+
composition: { stackedMaxAspect: 1 },
|
|
28273
28274
|
classes: {
|
|
28274
28275
|
widthCompactMaxPx: 767,
|
|
28275
28276
|
widthMediumMaxPx: 1023,
|
|
@@ -28331,7 +28332,8 @@ function gF(e, t) {
|
|
|
28331
28332
|
let n = Math.round(e.widthPx), r = Math.round(e.heightPx);
|
|
28332
28333
|
return {
|
|
28333
28334
|
width: n <= t.classes.widthCompactMaxPx ? "compact" : n <= t.classes.widthMediumMaxPx ? "medium" : "expanded",
|
|
28334
|
-
height: r <= t.classes.heightShortMaxPx ? "short" : "regular"
|
|
28335
|
+
height: r <= t.classes.heightShortMaxPx ? "short" : "regular",
|
|
28336
|
+
composition: n <= r * t.composition.stackedMaxAspect ? "stacked" : "side-by-side"
|
|
28335
28337
|
};
|
|
28336
28338
|
}
|
|
28337
28339
|
//#endregion
|
|
@@ -28401,7 +28403,7 @@ var _F = {
|
|
|
28401
28403
|
{
|
|
28402
28404
|
name: "canvasBand",
|
|
28403
28405
|
x: { fraction: 0 },
|
|
28404
|
-
y: { fraction:
|
|
28406
|
+
y: { fraction: .62 },
|
|
28405
28407
|
width: { fraction: 1 },
|
|
28406
28408
|
height: { fraction: .38 },
|
|
28407
28409
|
accepts: ["card"],
|
|
@@ -28410,7 +28412,7 @@ var _F = {
|
|
|
28410
28412
|
{
|
|
28411
28413
|
name: "stage",
|
|
28412
28414
|
x: { fraction: 0 },
|
|
28413
|
-
y: { fraction:
|
|
28415
|
+
y: { fraction: 0 },
|
|
28414
28416
|
width: { fraction: 1 },
|
|
28415
28417
|
height: { fraction: .62 },
|
|
28416
28418
|
accepts: ["replica"],
|
|
@@ -28419,7 +28421,7 @@ var _F = {
|
|
|
28419
28421
|
{
|
|
28420
28422
|
name: "pip",
|
|
28421
28423
|
x: { fraction: .72 },
|
|
28422
|
-
y: { fraction: .
|
|
28424
|
+
y: { fraction: .38 },
|
|
28423
28425
|
width: { fraction: .24 },
|
|
28424
28426
|
height: { fraction: .2 },
|
|
28425
28427
|
accepts: ["selfView"],
|
|
@@ -28427,6 +28429,40 @@ var _F = {
|
|
|
28427
28429
|
}
|
|
28428
28430
|
]
|
|
28429
28431
|
},
|
|
28432
|
+
"canvas-kiosk-overlay": {
|
|
28433
|
+
id: "canvas-kiosk-overlay",
|
|
28434
|
+
soloVariant: "canvas-solo",
|
|
28435
|
+
regions: [
|
|
28436
|
+
{
|
|
28437
|
+
name: "stage",
|
|
28438
|
+
x: { fraction: 0 },
|
|
28439
|
+
y: { fraction: 0 },
|
|
28440
|
+
width: { fraction: 1 },
|
|
28441
|
+
height: { fraction: 1 },
|
|
28442
|
+
accepts: ["replica"],
|
|
28443
|
+
zBase: 0
|
|
28444
|
+
},
|
|
28445
|
+
{
|
|
28446
|
+
name: "cardSheet",
|
|
28447
|
+
x: { fraction: 0 },
|
|
28448
|
+
y: { fraction: .6 },
|
|
28449
|
+
width: { fraction: 1 },
|
|
28450
|
+
height: { fraction: .4 },
|
|
28451
|
+
accepts: ["card"],
|
|
28452
|
+
zBase: 100,
|
|
28453
|
+
sheetAnchor: "bottom"
|
|
28454
|
+
},
|
|
28455
|
+
{
|
|
28456
|
+
name: "pip",
|
|
28457
|
+
x: { fraction: .72 },
|
|
28458
|
+
y: { fraction: .72 },
|
|
28459
|
+
width: { fraction: .24 },
|
|
28460
|
+
height: { fraction: .24 },
|
|
28461
|
+
accepts: ["selfView"],
|
|
28462
|
+
zBase: 110
|
|
28463
|
+
}
|
|
28464
|
+
]
|
|
28465
|
+
},
|
|
28430
28466
|
"canvas-sheet": {
|
|
28431
28467
|
id: "canvas-sheet",
|
|
28432
28468
|
soloVariant: "canvas-solo",
|
|
@@ -28725,7 +28761,7 @@ var _F = {
|
|
|
28725
28761
|
{
|
|
28726
28762
|
name: "canvasStage",
|
|
28727
28763
|
x: { fraction: 0 },
|
|
28728
|
-
y: { fraction:
|
|
28764
|
+
y: { fraction: .22 },
|
|
28729
28765
|
width: { fraction: 1 },
|
|
28730
28766
|
height: { fraction: .78 },
|
|
28731
28767
|
accepts: ["card"],
|
|
@@ -28734,7 +28770,7 @@ var _F = {
|
|
|
28734
28770
|
{
|
|
28735
28771
|
name: "replicaStrip",
|
|
28736
28772
|
x: { fraction: 0 },
|
|
28737
|
-
y: { fraction:
|
|
28773
|
+
y: { fraction: 0 },
|
|
28738
28774
|
width: { fraction: 1 },
|
|
28739
28775
|
height: { fraction: .22 },
|
|
28740
28776
|
accepts: ["replica"],
|
|
@@ -28743,7 +28779,7 @@ var _F = {
|
|
|
28743
28779
|
{
|
|
28744
28780
|
name: "pip",
|
|
28745
28781
|
x: { fraction: .66 },
|
|
28746
|
-
y: { fraction: .
|
|
28782
|
+
y: { fraction: .04 },
|
|
28747
28783
|
width: { fraction: .3 },
|
|
28748
28784
|
height: { fraction: .16 },
|
|
28749
28785
|
accepts: ["selfView"],
|
|
@@ -28900,20 +28936,105 @@ var _F = {
|
|
|
28900
28936
|
regular: "canvas-takeover-columns"
|
|
28901
28937
|
}
|
|
28902
28938
|
}
|
|
28939
|
+
}, yF = {
|
|
28940
|
+
idle: {
|
|
28941
|
+
compact: {
|
|
28942
|
+
stacked: "idle",
|
|
28943
|
+
"side-by-side": "idle"
|
|
28944
|
+
},
|
|
28945
|
+
medium: {
|
|
28946
|
+
stacked: "idle",
|
|
28947
|
+
"side-by-side": "idle"
|
|
28948
|
+
},
|
|
28949
|
+
expanded: {
|
|
28950
|
+
stacked: "idle",
|
|
28951
|
+
"side-by-side": "idle"
|
|
28952
|
+
}
|
|
28953
|
+
},
|
|
28954
|
+
conversation: {
|
|
28955
|
+
compact: {
|
|
28956
|
+
stacked: "conversation-full",
|
|
28957
|
+
"side-by-side": "conversation-full"
|
|
28958
|
+
},
|
|
28959
|
+
medium: {
|
|
28960
|
+
stacked: "conversation-full",
|
|
28961
|
+
"side-by-side": "conversation-full"
|
|
28962
|
+
},
|
|
28963
|
+
expanded: {
|
|
28964
|
+
stacked: "conversation-full",
|
|
28965
|
+
"side-by-side": "conversation-full"
|
|
28966
|
+
}
|
|
28967
|
+
},
|
|
28968
|
+
"conversation-canvas": {
|
|
28969
|
+
compact: {
|
|
28970
|
+
stacked: "canvas-sheet",
|
|
28971
|
+
"side-by-side": "canvas-sheet"
|
|
28972
|
+
},
|
|
28973
|
+
medium: {
|
|
28974
|
+
stacked: "canvas-stack",
|
|
28975
|
+
"side-by-side": "canvas-rail"
|
|
28976
|
+
},
|
|
28977
|
+
expanded: {
|
|
28978
|
+
stacked: "canvas-stack",
|
|
28979
|
+
"side-by-side": "canvas-rail"
|
|
28980
|
+
}
|
|
28981
|
+
},
|
|
28982
|
+
"content-focus": {
|
|
28983
|
+
compact: {
|
|
28984
|
+
stacked: "content-stack-compact",
|
|
28985
|
+
"side-by-side": "content-stack-compact"
|
|
28986
|
+
},
|
|
28987
|
+
medium: {
|
|
28988
|
+
stacked: "content-stack",
|
|
28989
|
+
"side-by-side": "content-columns"
|
|
28990
|
+
},
|
|
28991
|
+
expanded: {
|
|
28992
|
+
stacked: "content-stack",
|
|
28993
|
+
"side-by-side": "content-columns"
|
|
28994
|
+
}
|
|
28995
|
+
},
|
|
28996
|
+
"content-plus-canvas": {
|
|
28997
|
+
compact: {
|
|
28998
|
+
stacked: "content-sheet-compact",
|
|
28999
|
+
"side-by-side": "content-sheet-compact"
|
|
29000
|
+
},
|
|
29001
|
+
medium: {
|
|
29002
|
+
stacked: "content-stack-canvas",
|
|
29003
|
+
"side-by-side": "content-rail"
|
|
29004
|
+
},
|
|
29005
|
+
expanded: {
|
|
29006
|
+
stacked: "content-stack-canvas",
|
|
29007
|
+
"side-by-side": "content-rail"
|
|
29008
|
+
}
|
|
29009
|
+
},
|
|
29010
|
+
"canvas-dominant": {
|
|
29011
|
+
compact: {
|
|
29012
|
+
stacked: "canvas-takeover-strip",
|
|
29013
|
+
"side-by-side": "canvas-takeover-strip"
|
|
29014
|
+
},
|
|
29015
|
+
medium: {
|
|
29016
|
+
stacked: "canvas-takeover-strip",
|
|
29017
|
+
"side-by-side": "canvas-takeover-columns"
|
|
29018
|
+
},
|
|
29019
|
+
expanded: {
|
|
29020
|
+
stacked: "canvas-takeover-strip",
|
|
29021
|
+
"side-by-side": "canvas-takeover-columns"
|
|
29022
|
+
}
|
|
29023
|
+
}
|
|
28903
29024
|
};
|
|
28904
|
-
function
|
|
28905
|
-
let
|
|
28906
|
-
if (!
|
|
28907
|
-
if (!i &&
|
|
28908
|
-
let e = n[
|
|
28909
|
-
if (!e) throw Error(`soloVariant references missing template id: ${
|
|
29025
|
+
function bF(e, t, n = _F, r = vF, i = !0, a = !1) {
|
|
29026
|
+
let o = a && r === vF && e === "conversation-canvas" && t.composition === "stacked" && t.width !== "compact" ? "canvas-kiosk-overlay" : t.composition !== void 0 && r === vF ? yF[e][t.width][t.composition] : r[e][t.width][t.height], s = n[o];
|
|
29027
|
+
if (!s) throw Error(`Template matrix references missing template id: ${o}`);
|
|
29028
|
+
if (!i && s.soloVariant !== void 0) {
|
|
29029
|
+
let e = n[s.soloVariant];
|
|
29030
|
+
if (!e) throw Error(`soloVariant references missing template id: ${s.soloVariant}`);
|
|
28910
29031
|
return e;
|
|
28911
29032
|
}
|
|
28912
|
-
return
|
|
29033
|
+
return s;
|
|
28913
29034
|
}
|
|
28914
29035
|
//#endregion
|
|
28915
29036
|
//#region ../../node_modules/@tavus-engineering/magic-grid-core/dist/states.js
|
|
28916
|
-
function
|
|
29037
|
+
function xF(e, t, n) {
|
|
28917
29038
|
let r = [], { prefs: i } = e, a = e.userShare ? "userShare" : e.presentation ? "presentation" : null, o = e.cards.length > 0, s = t.width === "compact";
|
|
28918
29039
|
return i.pipCorner !== void 0 && s && r.push("pipCorner"), a === null ? (i.expandCanvas && !o && r.push("expandCanvas"), o && (i.expandCanvas || s) ? {
|
|
28919
29040
|
state: "canvas-dominant",
|
|
@@ -28939,7 +29060,7 @@ function bF(e, t, n) {
|
|
|
28939
29060
|
}
|
|
28940
29061
|
//#endregion
|
|
28941
29062
|
//#region ../../node_modules/@tavus-engineering/magic-grid-core/dist/components.js
|
|
28942
|
-
var
|
|
29063
|
+
var SF = {
|
|
28943
29064
|
alert: {
|
|
28944
29065
|
minWidthPx: 220,
|
|
28945
29066
|
sizeClass: () => "S",
|
|
@@ -28990,25 +29111,25 @@ var xF = {
|
|
|
28990
29111
|
sizeClass: () => "L",
|
|
28991
29112
|
estimateHeightPx: () => 640
|
|
28992
29113
|
}
|
|
28993
|
-
},
|
|
29114
|
+
}, CF = {
|
|
28994
29115
|
minWidthPx: 240,
|
|
28995
29116
|
sizeClass: () => "M",
|
|
28996
29117
|
estimateHeightPx: (e) => e.coldDefaultHeightPx ?? 320
|
|
28997
|
-
},
|
|
28998
|
-
function
|
|
28999
|
-
return e.startsWith(
|
|
29118
|
+
}, wF = "canvas.";
|
|
29119
|
+
function TF(e) {
|
|
29120
|
+
return e.startsWith(wF) ? e.slice(7) : e;
|
|
29000
29121
|
}
|
|
29001
|
-
function
|
|
29002
|
-
let n =
|
|
29122
|
+
function EF(e, t) {
|
|
29123
|
+
let n = TF(e), r = SF[n] ?? CF, i = t?.[n] ?? t?.[e];
|
|
29003
29124
|
return i === void 0 ? r : {
|
|
29004
29125
|
...r,
|
|
29005
29126
|
minWidthPx: i.minWidthPx ?? r.minWidthPx,
|
|
29006
29127
|
...i.hardMinHeightPx === void 0 ? r.hardMinHeightPx === void 0 ? {} : { hardMinHeightPx: r.hardMinHeightPx } : { hardMinHeightPx: i.hardMinHeightPx }
|
|
29007
29128
|
};
|
|
29008
29129
|
}
|
|
29009
|
-
Object.keys(
|
|
29010
|
-
function
|
|
29011
|
-
let r =
|
|
29130
|
+
Object.keys(SF);
|
|
29131
|
+
function DF(e, t, n) {
|
|
29132
|
+
let r = EF(e, n), i = (t.naturalHeightPx !== void 0 && Number.isFinite(t.naturalHeightPx) ? t.naturalHeightPx : void 0) ?? r.estimateHeightPx(t), a = r.hardMinHeightPx === void 0 ? i : Math.max(r.hardMinHeightPx, i);
|
|
29012
29133
|
return {
|
|
29013
29134
|
sizeClass: r.sizeClass(t),
|
|
29014
29135
|
minWidthPx: r.minWidthPx,
|
|
@@ -29016,18 +29137,18 @@ function EF(e, t, n) {
|
|
|
29016
29137
|
hardMinHeightPx: r.hardMinHeightPx
|
|
29017
29138
|
};
|
|
29018
29139
|
}
|
|
29019
|
-
function DF(e, t) {
|
|
29020
|
-
let n = wF(e);
|
|
29021
|
-
return xF[n] === void 0 ? (t?.[n] ?? t?.[e])?.hardMinHeightPx : TF(e, t).hardMinHeightPx;
|
|
29022
|
-
}
|
|
29023
29140
|
function OF(e, t) {
|
|
29024
|
-
|
|
29141
|
+
let n = TF(e);
|
|
29142
|
+
return SF[n] === void 0 ? (t?.[n] ?? t?.[e])?.hardMinHeightPx : EF(e, t).hardMinHeightPx;
|
|
29025
29143
|
}
|
|
29026
29144
|
function kF(e, t) {
|
|
29145
|
+
return EF(e, t).minWidthPx;
|
|
29146
|
+
}
|
|
29147
|
+
function AF(e, t) {
|
|
29027
29148
|
let n = Number.isFinite(e) ? e : t.card.coldDefaultHeightPx;
|
|
29028
29149
|
return Math.min(t.card.maxHeightPx, Math.max(t.card.reportedHeightFloorPx, Math.round(n)));
|
|
29029
29150
|
}
|
|
29030
|
-
function
|
|
29151
|
+
function jF(e, t, n) {
|
|
29031
29152
|
if (t >= e) return { kind: "natural" };
|
|
29032
29153
|
if (t <= 0 || e <= 0) return { kind: "scroll" };
|
|
29033
29154
|
let r = t / e;
|
|
@@ -29036,14 +29157,14 @@ function AF(e, t, n) {
|
|
|
29036
29157
|
factor: r
|
|
29037
29158
|
} : { kind: "scroll" };
|
|
29038
29159
|
}
|
|
29039
|
-
function
|
|
29160
|
+
function MF(e, t) {
|
|
29040
29161
|
return e.width > 0 && e.height > 0 && t.width > 0 && t.height > 0 && e.x < t.x + t.width && t.x < e.x + e.width && e.y < t.y + t.height && t.y < e.y + e.height;
|
|
29041
29162
|
}
|
|
29042
|
-
function
|
|
29163
|
+
function NF(e, t) {
|
|
29043
29164
|
return t.x >= e.x && t.y >= e.y && t.x + t.width <= e.x + e.width && t.y + t.height <= e.y + e.height;
|
|
29044
29165
|
}
|
|
29045
|
-
function
|
|
29046
|
-
let r = [], i = e.find((e) => e.kind === "replica"), a = (e) => e.kind === "selfView" && e.layer === "overlay" && i !== void 0 &&
|
|
29166
|
+
function PF(e, t, n) {
|
|
29167
|
+
let r = [], i = e.find((e) => e.kind === "replica"), a = (e) => e.kind === "selfView" && e.layer === "overlay" && i !== void 0 && NF(i.rect, e.rect), o = (e) => e.kind === "card" && e.layer === "overlay" && e.sheet === !0;
|
|
29047
29168
|
for (let a of e) {
|
|
29048
29169
|
let e = a.rect;
|
|
29049
29170
|
if (Number.isInteger(e.x) && Number.isInteger(e.y) && Number.isInteger(e.width) && Number.isInteger(e.height) || r.push({
|
|
@@ -29058,7 +29179,7 @@ function NF(e, t, n) {
|
|
|
29058
29179
|
kind: "overlay-legality",
|
|
29059
29180
|
tileId: a.id,
|
|
29060
29181
|
message: `only selfView or a sheet card may ride the overlay layer, got ${a.kind}`
|
|
29061
|
-
}), a.kind === "selfView" && a.layer === "overlay" && i !== void 0 && !
|
|
29182
|
+
}), a.kind === "selfView" && a.layer === "overlay" && i !== void 0 && !NF(i.rect, a.rect) && r.push({
|
|
29062
29183
|
kind: "overlay-legality",
|
|
29063
29184
|
tileId: a.id,
|
|
29064
29185
|
message: "selfView escapes the replica rect"
|
|
@@ -29076,13 +29197,13 @@ function NF(e, t, n) {
|
|
|
29076
29197
|
tileId: a.id,
|
|
29077
29198
|
message: `card ${a.id} box ${e.height}px is below the ${n.card.reportedHeightFloorPx}px report floor`
|
|
29078
29199
|
});
|
|
29079
|
-
let t = a.component === void 0 ? void 0 :
|
|
29200
|
+
let t = a.component === void 0 ? void 0 : OF(a.component, n.card.componentOverrides);
|
|
29080
29201
|
t !== void 0 && e.height < t && a.fit.kind !== "scroll" && r.push({
|
|
29081
29202
|
kind: "min-content",
|
|
29082
29203
|
tileId: a.id,
|
|
29083
29204
|
message: `card ${a.id} box ${e.height}px is below its ${t}px hard min without scroll`
|
|
29084
29205
|
});
|
|
29085
|
-
let i = a.component === void 0 ? void 0 :
|
|
29206
|
+
let i = a.component === void 0 ? void 0 : kF(a.component, n.card.componentOverrides);
|
|
29086
29207
|
i !== void 0 && e.width < i && r.push({
|
|
29087
29208
|
kind: "min-content",
|
|
29088
29209
|
tileId: a.id,
|
|
@@ -29090,7 +29211,7 @@ function NF(e, t, n) {
|
|
|
29090
29211
|
});
|
|
29091
29212
|
}
|
|
29092
29213
|
}
|
|
29093
|
-
for (let t of e) if (!(t.kind !== "content" && t.kind !== "card")) for (let n of e) n.id !== t.id &&
|
|
29214
|
+
for (let t of e) if (!(t.kind !== "content" && t.kind !== "card")) for (let n of e) n.id !== t.id && MF(t.rect, n.rect) && (a(n) && !o(t) || o(n) && !o(t) || o(t) && n.layer === "grid" || r.push({
|
|
29094
29215
|
kind: "never-covered",
|
|
29095
29216
|
tileId: t.id,
|
|
29096
29217
|
otherTileId: n.id,
|
|
@@ -29100,27 +29221,27 @@ function NF(e, t, n) {
|
|
|
29100
29221
|
}
|
|
29101
29222
|
//#endregion
|
|
29102
29223
|
//#region ../../node_modules/@tavus-engineering/magic-grid-core/dist/constraints.js
|
|
29103
|
-
var
|
|
29104
|
-
function
|
|
29224
|
+
var FF = (e, t, n) => Math.min(n, Math.max(t, e));
|
|
29225
|
+
function IF(e, t) {
|
|
29105
29226
|
let n = t === "compact";
|
|
29106
29227
|
return {
|
|
29107
29228
|
surfacePad: Math.round(n ? e.insets.compactSurfacePadPx : e.insets.surfacePadPx),
|
|
29108
29229
|
cardsPad: Math.round(n ? e.insets.compactCardsPadPx : e.insets.cardsPadPx)
|
|
29109
29230
|
};
|
|
29110
29231
|
}
|
|
29111
|
-
function
|
|
29232
|
+
function LF(e, t, n) {
|
|
29112
29233
|
return e === "canvas-dominant" && t.width === "compact" ? n.eviction.compactTakeoverMaxCards : n.eviction.maxVisibleCards;
|
|
29113
29234
|
}
|
|
29114
|
-
function
|
|
29235
|
+
function RF(e, t, n) {
|
|
29115
29236
|
let r = [...e].sort((e, t) => e.dispatchSeq - t.dispatchSeq), i = Math.floor(t);
|
|
29116
29237
|
return r.length <= i ? r : n === "evict-newest" ? r.slice(0, i) : r.slice(r.length - i);
|
|
29117
29238
|
}
|
|
29118
|
-
function
|
|
29119
|
-
let o = i ??
|
|
29239
|
+
function zF(e, t, n, r, i, a) {
|
|
29240
|
+
let o = i ?? IF(n, r).cardsPad, s = Math.round(a ?? n.rail.widthPx), c = Math.max(1, Math.min(t - 2 * o, s - 2 * o));
|
|
29120
29241
|
return {
|
|
29121
29242
|
innerW: c,
|
|
29122
29243
|
entries: e.map((e) => {
|
|
29123
|
-
let t =
|
|
29244
|
+
let t = DF(e.component, {
|
|
29124
29245
|
...e.contentOpts,
|
|
29125
29246
|
naturalHeightPx: e.naturalHeightPx,
|
|
29126
29247
|
widthPx: c,
|
|
@@ -29129,25 +29250,25 @@ function RF(e, t, n, r, i, a) {
|
|
|
29129
29250
|
return {
|
|
29130
29251
|
card: e,
|
|
29131
29252
|
constraints: t,
|
|
29132
|
-
clampedHeightPx:
|
|
29253
|
+
clampedHeightPx: AF(t.naturalHeightPx, n)
|
|
29133
29254
|
};
|
|
29134
29255
|
})
|
|
29135
29256
|
};
|
|
29136
29257
|
}
|
|
29137
|
-
function
|
|
29258
|
+
function BF(e, t) {
|
|
29138
29259
|
return "fraction" in e ? e.fraction * t : e.px >= 0 ? e.px : t + e.px;
|
|
29139
29260
|
}
|
|
29140
|
-
function
|
|
29261
|
+
function VF(e, t, n, r) {
|
|
29141
29262
|
return e.name !== "rail" || "fraction" in t ? t : r === "width" ? { px: n.rail.widthPx } : { px: t.px < 0 ? -n.rail.widthPx : t.px };
|
|
29142
29263
|
}
|
|
29143
|
-
function
|
|
29144
|
-
let o = n === "x" ? t.width : t.height, s = [...e].sort((e, t) =>
|
|
29264
|
+
function HF(e, t, n, r, i, a) {
|
|
29265
|
+
let o = n === "x" ? t.width : t.height, s = [...e].sort((e, t) => BF(n === "x" ? e.x : e.y, o) - BF(n === "x" ? t.x : t.y, o)), c = s.map((e) => n === "x" ? VF(e, e.width, r, "width") : e.height), l = 0, u = 0;
|
|
29145
29266
|
for (let e of c) "px" in e ? l += e.px : u += e.fraction;
|
|
29146
29267
|
let d = Math.max(0, o - l), f = c.map((e) => "px" in e ? e.px : u > 0 ? e.fraction / u * d : 0);
|
|
29147
29268
|
if (n === "y" && i !== void 0) {
|
|
29148
29269
|
let e = s.findIndex((e, t) => e.accepts.includes("card") && "fraction" in (c[t] ?? e.height));
|
|
29149
29270
|
if (e !== -1) {
|
|
29150
|
-
let t = f[e] ?? 0, n = i.shrinkToContent ? Math.min(i.neededPx, Math.max(t, i.capPx)) :
|
|
29271
|
+
let t = f[e] ?? 0, n = i.shrinkToContent ? Math.min(i.neededPx, Math.max(t, i.capPx)) : FF(i.neededPx, t, Math.max(t, i.capPx)), r = 0, a = 0;
|
|
29151
29272
|
c.forEach((t, n) => {
|
|
29152
29273
|
n !== e && ("px" in t ? r += t.px : a += f[n] ?? 0);
|
|
29153
29274
|
});
|
|
@@ -29172,7 +29293,7 @@ function VF(e, t, n, r, i, a) {
|
|
|
29172
29293
|
f = g.map((t, n) => (p[n] ?? 0) * h + (e[n] ?? 0) * r);
|
|
29173
29294
|
} else f = g;
|
|
29174
29295
|
let _ = [0], v = 0;
|
|
29175
|
-
for (let e of f) v += e, _.push(
|
|
29296
|
+
for (let e of f) v += e, _.push(FF(Math.round(v), 0, o));
|
|
29176
29297
|
return s.map((e, r) => {
|
|
29177
29298
|
let i = _[r] ?? 0, a = _[r + 1] ?? i;
|
|
29178
29299
|
return {
|
|
@@ -29191,36 +29312,36 @@ function VF(e, t, n, r, i, a) {
|
|
|
29191
29312
|
};
|
|
29192
29313
|
});
|
|
29193
29314
|
}
|
|
29194
|
-
function
|
|
29195
|
-
let r = t.width, i = t.height, a =
|
|
29315
|
+
function UF(e, t, n) {
|
|
29316
|
+
let r = t.width, i = t.height, a = VF(e, e.width, n, "width"), o = VF(e, e.x, n, "x"), s = FF(Math.round(BF(o, r)), 0, r), c = FF(Math.round(BF(e.y, i)), 0, i);
|
|
29196
29317
|
return {
|
|
29197
29318
|
x: s,
|
|
29198
29319
|
y: c,
|
|
29199
|
-
width:
|
|
29200
|
-
height:
|
|
29320
|
+
width: FF(Math.round("fraction" in a ? a.fraction * r : a.px), 0, r - s),
|
|
29321
|
+
height: FF(Math.round("fraction" in e.height ? e.height.fraction * i : e.height.px), 0, i - c)
|
|
29201
29322
|
};
|
|
29202
29323
|
}
|
|
29203
|
-
function
|
|
29324
|
+
function WF(e, t, n, r, i) {
|
|
29204
29325
|
let a = e.regions.filter((e) => e.zBase < 100), o = (e) => "fraction" in e && e.fraction === 1;
|
|
29205
|
-
return a.length > 1 && a.every((e) => o(e.height)) ?
|
|
29326
|
+
return a.length > 1 && a.every((e) => o(e.height)) ? HF(a, t, "x", n) : a.length > 1 && a.every((e) => o(e.width)) ? HF(a, t, "y", n, r, i) : a.map((e) => ({
|
|
29206
29327
|
region: e,
|
|
29207
|
-
rect:
|
|
29328
|
+
rect: UF(e, t, n)
|
|
29208
29329
|
}));
|
|
29209
29330
|
}
|
|
29210
|
-
function
|
|
29331
|
+
function GF(e, t, n, r, i, a, o, s, c, l, u) {
|
|
29211
29332
|
if (n !== null) return;
|
|
29212
29333
|
let d = e.regions.filter((e) => e.zBase < 100);
|
|
29213
29334
|
if (!(d.length > 1 && d.every((e) => "fraction" in e.width && e.width.fraction === 1))) return;
|
|
29214
29335
|
let f = d.find((e) => e.accepts.includes("card") && "fraction" in e.height);
|
|
29215
29336
|
if (f === void 0 || r.cards.length === 0) return;
|
|
29216
|
-
let { innerW: p, entries: m } = RF(
|
|
29337
|
+
let { innerW: p, entries: m } = zF(RF(r.cards, u, c.eviction.policy), i.width, c, l, void 0, c.card.stackMaxWidthPx), h = m.reduce((e, t) => t.constraints.minWidthPx > p ? e : Math.max(e, t.clampedHeightPx), 0), { cardsPad: g } = IF(c, l), _ = BF(f.y, i.height), v = d.every((e) => BF(e.y, i.height) <= _) ? Math.max(0, o - s) : 0, y = h > 0;
|
|
29217
29338
|
return {
|
|
29218
|
-
neededPx: h + 2 * g +
|
|
29339
|
+
neededPx: h + 2 * g + v,
|
|
29219
29340
|
capPx: Math.round(c.card.stackBandMaxFraction * a.height),
|
|
29220
|
-
...
|
|
29341
|
+
...y && { shrinkToContent: y }
|
|
29221
29342
|
};
|
|
29222
29343
|
}
|
|
29223
|
-
function
|
|
29344
|
+
function KF(e, t, n, r) {
|
|
29224
29345
|
if (t === null) return;
|
|
29225
29346
|
let i = e.regions.filter((e) => e.zBase < 100);
|
|
29226
29347
|
if (!(i.length > 1 && i.every((e) => "fraction" in e.width && e.width.fraction === 1))) return;
|
|
@@ -29229,8 +29350,8 @@ function GF(e, t, n, r) {
|
|
|
29229
29350
|
let s = r.content.stackedAspect;
|
|
29230
29351
|
if (!(!Number.isFinite(s) || s <= 0)) return { maxPx: Math.round(n.width / s) };
|
|
29231
29352
|
}
|
|
29232
|
-
var
|
|
29233
|
-
function
|
|
29353
|
+
var qF = "bottom-left";
|
|
29354
|
+
function JF(e, t, n, r, i) {
|
|
29234
29355
|
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;
|
|
29235
29356
|
return {
|
|
29236
29357
|
x: Math.round(a),
|
|
@@ -29239,20 +29360,20 @@ function qF(e, t, n, r, i) {
|
|
|
29239
29360
|
height: i
|
|
29240
29361
|
};
|
|
29241
29362
|
}
|
|
29242
|
-
function
|
|
29363
|
+
function YF(e, t, n, r) {
|
|
29243
29364
|
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);
|
|
29244
29365
|
return o < n.pip.minWidthPx || o <= 0 || s <= 0 ? null : {
|
|
29245
29366
|
w: o,
|
|
29246
29367
|
h: s
|
|
29247
29368
|
};
|
|
29248
29369
|
}
|
|
29249
|
-
function
|
|
29250
|
-
return t === null || !
|
|
29370
|
+
function XF(e, t, n) {
|
|
29371
|
+
return t === null || !MF(e, t) ? e : {
|
|
29251
29372
|
...e,
|
|
29252
29373
|
y: Math.round(t.y) - n - e.height
|
|
29253
29374
|
};
|
|
29254
29375
|
}
|
|
29255
|
-
function
|
|
29376
|
+
function ZF(e) {
|
|
29256
29377
|
if (typeof e != "object" || !e) return !1;
|
|
29257
29378
|
let t = e;
|
|
29258
29379
|
return [
|
|
@@ -29262,48 +29383,48 @@ function XF(e) {
|
|
|
29262
29383
|
"height"
|
|
29263
29384
|
].every((e) => typeof t[e] == "number" && Number.isFinite(t[e]));
|
|
29264
29385
|
}
|
|
29265
|
-
function
|
|
29386
|
+
function QF(e, t, n) {
|
|
29266
29387
|
let r = e;
|
|
29267
|
-
for (let e of t.filter(
|
|
29388
|
+
for (let e of t.filter(ZF).sort((e, t) => t.y - e.y)) r = XF(r, e, n);
|
|
29268
29389
|
return r;
|
|
29269
29390
|
}
|
|
29270
|
-
function
|
|
29391
|
+
function $F(e, t, n) {
|
|
29271
29392
|
if (t <= 0) return e;
|
|
29272
29393
|
let r = Math.min(t, e.length);
|
|
29273
29394
|
return n === "evict-newest" ? e.slice(0, e.length - r) : e.slice(r);
|
|
29274
29395
|
}
|
|
29275
|
-
function
|
|
29276
|
-
let o = n.callControls === !0 ? Math.round(a.insets.callControlsBottomPx) : 0, s = i.height - o, c = n.selfView && n.prefs.hideSelfView !== !0, l =
|
|
29277
|
-
width: Math.max(0, i.width - 2 *
|
|
29278
|
-
height: Math.max(0, i.height - 2 *
|
|
29279
|
-
},
|
|
29396
|
+
function eI(e, t, n, r, i, a) {
|
|
29397
|
+
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 ? IF(a, r.width).surfacePad : 0, f = {
|
|
29398
|
+
width: Math.max(0, i.width - 2 * d),
|
|
29399
|
+
height: Math.max(0, i.height - 2 * d)
|
|
29400
|
+
}, p = n.callControlsRect ?? (o > 0 ? {
|
|
29280
29401
|
x: 0,
|
|
29281
29402
|
y: s,
|
|
29282
29403
|
width: i.width,
|
|
29283
29404
|
height: o
|
|
29284
29405
|
} : null);
|
|
29285
29406
|
return {
|
|
29286
|
-
regions:
|
|
29407
|
+
regions: WF(e, f, a, GF(e, t.state, t.contentKind, n, f, i, o, d, a, r.width, LF(t.state, r, a)), KF(e, t.contentKind, f, a)).map((e) => ({
|
|
29287
29408
|
...e,
|
|
29288
29409
|
rect: {
|
|
29289
29410
|
...e.rect,
|
|
29290
|
-
x: e.rect.x +
|
|
29291
|
-
y: e.rect.y +
|
|
29411
|
+
x: e.rect.x + d,
|
|
29412
|
+
y: e.rect.y + d
|
|
29292
29413
|
}
|
|
29293
|
-
})).map((e) =>
|
|
29414
|
+
})).map((e) => p === null || !e.region.accepts.includes("card") || !(e.rect.x < p.x + p.width && e.rect.x + e.rect.width > p.x) ? e : {
|
|
29294
29415
|
...e,
|
|
29295
29416
|
rect: {
|
|
29296
29417
|
...e.rect,
|
|
29297
29418
|
height: Math.max(0, Math.min(e.rect.height, s - e.rect.y))
|
|
29298
29419
|
}
|
|
29299
29420
|
}),
|
|
29300
|
-
surfacePad:
|
|
29421
|
+
surfacePad: d,
|
|
29301
29422
|
controlsInset: o,
|
|
29302
29423
|
bandTopY: s
|
|
29303
29424
|
};
|
|
29304
29425
|
}
|
|
29305
|
-
function
|
|
29306
|
-
let o = n.selfView && n.prefs.hideSelfView !== !0, { regions: s, surfacePad: c, controlsInset: l, bandTopY: u } =
|
|
29426
|
+
function tI(e, t, n, r, i, a) {
|
|
29427
|
+
let o = n.selfView && n.prefs.hideSelfView !== !0, { regions: s, surfacePad: c, controlsInset: l, bandTopY: u } = eI(t, e, n, r, i, a), d = s.find((e) => e.region.accepts.includes("replica")), f = s.find((e) => e.region.accepts.includes("content")), p = s.find((e) => e.region.accepts.includes("card")), m = t.regions.find((e) => e.zBase >= 100 && e.accepts.includes("selfView")), h = t.regions.find((e) => e.zBase >= 100 && e.accepts.includes("card")), g = Math.round(a.rail.gutterPx), _ = Math.round(a.pip.gapPaddingPx), v = [...n.cards].sort((e, t) => e.dispatchSeq - t.dispatchSeq), y = LF(e.state, r, a), b = p ? RF(n.cards, y, a.eviction.policy) : h === void 0 ? [] : RF(n.cards, 1, a.eviction.policy), x = (s) => {
|
|
29307
29428
|
let y = {
|
|
29308
29429
|
evictedCardIds: [],
|
|
29309
29430
|
selfViewDropped: !1,
|
|
@@ -29382,9 +29503,9 @@ function eI(e, t, n, r, i, a) {
|
|
|
29382
29503
|
fit: { kind: "natural" },
|
|
29383
29504
|
region: f.region.name
|
|
29384
29505
|
});
|
|
29385
|
-
let T =
|
|
29506
|
+
let T = $F(b, s.extraEvictions, a.eviction.policy), ee = new Set(T.map((e) => e.id));
|
|
29386
29507
|
if (y.evictedCardIds = v.filter((e) => !ee.has(e.id)).map((e) => e.id), p && T.length > 0) {
|
|
29387
|
-
let e = p.rect, n = t.regions.filter((e) => e.zBase < 100), i = n.length > 1 && n.every((e) => "fraction" in e.width && e.width.fraction === 1), { innerW: o, entries: s } =
|
|
29508
|
+
let e = p.rect, n = t.regions.filter((e) => e.zBase < 100), i = n.length > 1 && n.every((e) => "fraction" in e.width && e.width.fraction === 1), { innerW: o, entries: s } = zF(T, e.width, a, r.width, void 0, i ? a.card.stackMaxWidthPx : void 0), c = e.x + Math.round((e.width - o) / 2), l = e.height - g * (s.length - 1), u = s.reduce((e, t) => e + t.clampedHeightPx, 0), d;
|
|
29388
29509
|
if (u <= l) d = s.map((e) => e.clampedHeightPx);
|
|
29389
29510
|
else {
|
|
29390
29511
|
let e = l > 0 ? l / u : 0;
|
|
@@ -29402,7 +29523,7 @@ function eI(e, t, n, r, i, a) {
|
|
|
29402
29523
|
}
|
|
29403
29524
|
let f = d.reduce((e, t) => e + t, 0) + g * (s.length - 1), m = e.y + Math.max(0, Math.round((e.height - f) / 2));
|
|
29404
29525
|
s.forEach((t, n) => {
|
|
29405
|
-
let r = Math.min(m, e.y + e.height), i = Math.max(0, Math.min(d[n] ?? 0, e.y + e.height - r)), s =
|
|
29526
|
+
let r = Math.min(m, e.y + e.height), i = Math.max(0, Math.min(d[n] ?? 0, e.y + e.height - r)), s = jF(t.clampedHeightPx, i, a), l = t.constraints.hardMinHeightPx;
|
|
29406
29527
|
l !== void 0 && i < l && s.kind !== "scroll" && (s = { kind: "scroll" }), x.push({
|
|
29407
29528
|
id: t.card.id,
|
|
29408
29529
|
kind: "card",
|
|
@@ -29426,37 +29547,40 @@ function eI(e, t, n, r, i, a) {
|
|
|
29426
29547
|
let e = {
|
|
29427
29548
|
width: Math.max(0, i.width - 2 * c),
|
|
29428
29549
|
height: Math.max(0, i.height - 2 * c)
|
|
29429
|
-
}, t =
|
|
29550
|
+
}, t = UF(h, e, a), o = h.sheetAnchor === "bottom", s = IF(a, r.width).cardsPad, l = o ? Math.min(u, n.callControlsRect?.y ?? u) - s : u, d = {
|
|
29430
29551
|
x: t.x + c,
|
|
29431
29552
|
y: t.y + c,
|
|
29432
29553
|
width: t.width,
|
|
29433
|
-
height: Math.max(0, Math.min(t.height,
|
|
29434
|
-
}, { innerW:
|
|
29435
|
-
if (
|
|
29436
|
-
let e =
|
|
29437
|
-
|
|
29438
|
-
|
|
29554
|
+
height: Math.max(0, Math.min(t.height, l - (t.y + c)))
|
|
29555
|
+
}, { innerW: f, entries: p } = zF(T, d.width, a, r.width, o ? s : 0, a.card.stackMaxWidthPx), m = p[0];
|
|
29556
|
+
if (m !== void 0) {
|
|
29557
|
+
let e = d.x + Math.round((d.width - f) / 2), t = Math.max(0, Math.min(m.clampedHeightPx, d.height)), n = jF(m.clampedHeightPx, t, a);
|
|
29558
|
+
o && m.constraints.naturalHeightPx > t && (n = { kind: "scroll" });
|
|
29559
|
+
let r = m.constraints.hardMinHeightPx;
|
|
29560
|
+
r !== void 0 && t < r && n.kind !== "scroll" && (n = { kind: "scroll" }), E = {
|
|
29561
|
+
id: m.card.id,
|
|
29439
29562
|
kind: "card",
|
|
29440
|
-
component:
|
|
29441
|
-
cardSizeClass:
|
|
29563
|
+
component: m.card.component,
|
|
29564
|
+
cardSizeClass: m.constraints.sizeClass,
|
|
29442
29565
|
rect: {
|
|
29443
29566
|
x: e,
|
|
29444
|
-
y:
|
|
29445
|
-
width:
|
|
29567
|
+
y: o ? d.y + d.height - t : d.y,
|
|
29568
|
+
width: f,
|
|
29446
29569
|
height: t
|
|
29447
29570
|
},
|
|
29448
29571
|
layer: "overlay",
|
|
29449
29572
|
order: h.zBase,
|
|
29450
|
-
fit:
|
|
29573
|
+
fit: n,
|
|
29451
29574
|
region: h.name,
|
|
29452
|
-
sheet: !0
|
|
29575
|
+
sheet: !0,
|
|
29576
|
+
...o && { sheetAnchor: "bottom" }
|
|
29453
29577
|
}, x.push(E);
|
|
29454
29578
|
}
|
|
29455
29579
|
}
|
|
29456
29580
|
if (!C) {
|
|
29457
29581
|
if (o && s.selfViewDropped) y.selfViewDropped = !0;
|
|
29458
29582
|
else if (o) {
|
|
29459
|
-
let t = e.suppressedPrefs.includes("pipCorner") ?
|
|
29583
|
+
let t = e.suppressedPrefs.includes("pipCorner") ? qF : n.prefs.pipCorner ?? "bottom-left", o = n.callControlsVisible === !1 ? null : n.callControlsRect ?? (l > 0 ? {
|
|
29460
29584
|
x: 0,
|
|
29461
29585
|
y: u,
|
|
29462
29586
|
width: i.width,
|
|
@@ -29467,7 +29591,7 @@ function eI(e, t, n, r, i, a) {
|
|
|
29467
29591
|
...n.chromeObstacles ?? []
|
|
29468
29592
|
];
|
|
29469
29593
|
if (S) {
|
|
29470
|
-
let e = S.rect, n =
|
|
29594
|
+
let e = S.rect, n = YF(e, _, a, r.width === "compact"), i = n === null ? null : JF(e, t, _, n.w, n.h), o = i === null ? null : QF(i, s, _), c = n !== null && o !== null && o.y >= e.y && n.w + _ <= e.width && n.h + _ <= e.height, l = n !== null && e.width > 0 && e.height > 0 ? n.w * n.h / (e.width * e.height) : Infinity;
|
|
29471
29595
|
o !== null && c && l <= a.pip.maxAreaRatio ? x.push({
|
|
29472
29596
|
id: "selfView",
|
|
29473
29597
|
kind: "selfView",
|
|
@@ -29483,7 +29607,7 @@ function eI(e, t, n, r, i, a) {
|
|
|
29483
29607
|
y: 0,
|
|
29484
29608
|
width: i.width,
|
|
29485
29609
|
height: i.height
|
|
29486
|
-
}, c =
|
|
29610
|
+
}, c = QF(JF(o, t, _, e, n), s, _), l = c.y >= 0 && e + _ <= o.width && n + _ <= o.height, u = x.some((e) => (e.kind === "content" || e.kind === "card") && MF(e.rect, c));
|
|
29487
29611
|
l && !u ? x.push({
|
|
29488
29612
|
id: "selfView",
|
|
29489
29613
|
kind: "selfView",
|
|
@@ -29504,74 +29628,82 @@ function eI(e, t, n, r, i, a) {
|
|
|
29504
29628
|
extraEvictions: 0,
|
|
29505
29629
|
selfViewDropped: !1,
|
|
29506
29630
|
replicaCollapsed: !1
|
|
29507
|
-
}, C = x(S), w =
|
|
29631
|
+
}, C = x(S), w = PF(C.tiles, i, a);
|
|
29508
29632
|
for (let e of a.degradationLadder) {
|
|
29509
29633
|
if (w.length === 0) break;
|
|
29510
29634
|
if (e === "evict-cards") for (; w.length > 0 && S.extraEvictions < b.length;) S = {
|
|
29511
29635
|
...S,
|
|
29512
29636
|
extraEvictions: S.extraEvictions + 1
|
|
29513
|
-
}, C = x(S), w =
|
|
29637
|
+
}, C = x(S), w = PF(C.tiles, i, a);
|
|
29514
29638
|
else e === "drop-self-view" ? C.tiles.some((e) => e.kind === "selfView") && (S = {
|
|
29515
29639
|
...S,
|
|
29516
29640
|
selfViewDropped: !0
|
|
29517
|
-
}, C = x(S), w =
|
|
29641
|
+
}, C = x(S), w = PF(C.tiles, i, a)) : e === "collapse-replica" && !S.replicaCollapsed && C.tiles.some((e) => e.kind === "replica") && (S = {
|
|
29518
29642
|
...S,
|
|
29519
29643
|
replicaCollapsed: !0
|
|
29520
|
-
}, C = x(S), w =
|
|
29644
|
+
}, C = x(S), w = PF(C.tiles, i, a));
|
|
29521
29645
|
}
|
|
29522
29646
|
return C;
|
|
29523
29647
|
}
|
|
29524
29648
|
//#endregion
|
|
29525
29649
|
//#region ../../node_modules/@tavus-engineering/magic-grid-core/dist/resolveCore.js
|
|
29526
|
-
function
|
|
29650
|
+
function nI(e) {
|
|
29527
29651
|
if (!(e === void 0 || e.length === 0)) return {
|
|
29528
29652
|
..._F,
|
|
29529
29653
|
...Object.fromEntries(e.map((e) => [e.id, e]))
|
|
29530
29654
|
};
|
|
29531
29655
|
}
|
|
29532
|
-
function
|
|
29533
|
-
let i = {
|
|
29534
|
-
|
|
29535
|
-
|
|
29536
|
-
|
|
29656
|
+
function rI(e, t, n, r) {
|
|
29657
|
+
let i = e.callControlsRect, a = i === void 0 ? e : {
|
|
29658
|
+
...e,
|
|
29659
|
+
callControlsRect: {
|
|
29660
|
+
x: Math.round(i.x),
|
|
29661
|
+
y: Math.round(i.y),
|
|
29662
|
+
width: Math.max(0, Math.round(i.width)),
|
|
29663
|
+
height: Math.max(0, Math.round(i.height))
|
|
29664
|
+
}
|
|
29665
|
+
}, o = {
|
|
29666
|
+
width: Math.max(0, Math.round(a.container.widthPx)),
|
|
29667
|
+
height: Math.max(0, Math.round(a.container.heightPx))
|
|
29668
|
+
}, s = xF(a, t, n), c = a.replica || a.selfView && a.prefs.hideSelfView !== !0, l = bF(s.state, t, nI(r?.templates), void 0, c, a.kioskMode === !0), { tiles: u, degradations: d } = tI(s, l, a, t, o, n);
|
|
29537
29669
|
return {
|
|
29538
|
-
state:
|
|
29670
|
+
state: s.state,
|
|
29539
29671
|
sizeClass: t,
|
|
29540
|
-
containerPx:
|
|
29541
|
-
templateId:
|
|
29542
|
-
tiles:
|
|
29543
|
-
degradations:
|
|
29544
|
-
suppressedPrefs: [...
|
|
29672
|
+
containerPx: o,
|
|
29673
|
+
templateId: l.id,
|
|
29674
|
+
tiles: u,
|
|
29675
|
+
degradations: d,
|
|
29676
|
+
suppressedPrefs: [...s.suppressedPrefs]
|
|
29545
29677
|
};
|
|
29546
29678
|
}
|
|
29547
29679
|
//#endregion
|
|
29548
29680
|
//#region ../../node_modules/@tavus-engineering/magic-grid-core/dist/transitions.js
|
|
29549
|
-
var
|
|
29681
|
+
var iI = {
|
|
29550
29682
|
compact: 0,
|
|
29551
29683
|
medium: 1,
|
|
29552
29684
|
expanded: 2
|
|
29553
29685
|
};
|
|
29554
|
-
function
|
|
29555
|
-
return e.width === t.width && e.height === t.height;
|
|
29686
|
+
function aI(e, t) {
|
|
29687
|
+
return e.width === t.width && e.height === t.height && e.composition === t.composition;
|
|
29556
29688
|
}
|
|
29557
|
-
function
|
|
29689
|
+
function oI(e, t, n, r, i) {
|
|
29558
29690
|
let a = e.committedClass;
|
|
29559
|
-
if (a === null) return {
|
|
29691
|
+
if (a === null || a.composition === void 0) return {
|
|
29560
29692
|
committedClass: t,
|
|
29561
29693
|
pendingClass: null,
|
|
29562
29694
|
pendingSinceMs: null
|
|
29563
29695
|
};
|
|
29564
|
-
if (
|
|
29696
|
+
if (aI(t, a)) return {
|
|
29565
29697
|
committedClass: a,
|
|
29566
29698
|
pendingClass: null,
|
|
29567
29699
|
pendingSinceMs: null
|
|
29568
29700
|
};
|
|
29569
|
-
let o = Math.abs(
|
|
29570
|
-
return o > 1 || s ===
|
|
29701
|
+
let o = Math.abs(iI[t.width] - iI[a.width]), s = e.lastResolution?.containerPx;
|
|
29702
|
+
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 ? {
|
|
29571
29703
|
committedClass: t,
|
|
29572
29704
|
pendingClass: null,
|
|
29573
29705
|
pendingSinceMs: null
|
|
29574
|
-
} : e.pendingClass !== null && e.pendingSinceMs !== null &&
|
|
29706
|
+
} : e.pendingClass !== null && e.pendingSinceMs !== null && aI(e.pendingClass, t) ? r - e.pendingSinceMs >= i.hysteresis.windowMs ? {
|
|
29575
29707
|
committedClass: t,
|
|
29576
29708
|
pendingClass: null,
|
|
29577
29709
|
pendingSinceMs: null
|
|
@@ -29585,15 +29717,15 @@ function aI(e, t, n, r, i) {
|
|
|
29585
29717
|
pendingSinceMs: r
|
|
29586
29718
|
};
|
|
29587
29719
|
}
|
|
29588
|
-
var
|
|
29589
|
-
function
|
|
29720
|
+
var sI = (e, t) => e < t ? -1 : +(e > t);
|
|
29721
|
+
function cI(e, t) {
|
|
29590
29722
|
let n = new Map((e?.tiles ?? []).map((e) => [e.id, e])), r = new Map(t.tiles.map((e) => [e.id, e])), i = [];
|
|
29591
|
-
for (let e of [...n.keys()].sort(
|
|
29723
|
+
for (let e of [...n.keys()].sort(sI)) r.has(e) || i.push({
|
|
29592
29724
|
type: "exit",
|
|
29593
29725
|
tileId: e
|
|
29594
29726
|
});
|
|
29595
29727
|
let a = [], o = [], s = [];
|
|
29596
|
-
for (let e of [...r.keys()].sort(
|
|
29728
|
+
for (let e of [...r.keys()].sort(sI)) {
|
|
29597
29729
|
let t = n.get(e);
|
|
29598
29730
|
if (t === void 0) {
|
|
29599
29731
|
a.push({
|
|
@@ -29635,11 +29767,11 @@ function sI(e, t) {
|
|
|
29635
29767
|
...s
|
|
29636
29768
|
];
|
|
29637
29769
|
}
|
|
29638
|
-
function
|
|
29639
|
-
let a =
|
|
29770
|
+
function lI(e, t, n, r, i) {
|
|
29771
|
+
let a = oI(e, gF(t.container, r), t.container, n, r), o = rI(t, a.committedClass, r, i);
|
|
29640
29772
|
return {
|
|
29641
29773
|
resolution: o,
|
|
29642
|
-
transitions:
|
|
29774
|
+
transitions: cI(e.lastResolution, o),
|
|
29643
29775
|
nextState: {
|
|
29644
29776
|
committedClass: a.committedClass,
|
|
29645
29777
|
pendingClass: a.pendingClass,
|
|
@@ -29650,73 +29782,78 @@ function cI(e, t, n, r, i) {
|
|
|
29650
29782
|
}
|
|
29651
29783
|
//#endregion
|
|
29652
29784
|
//#region ../../node_modules/@tavus-engineering/magic-grid-core/dist/index.js
|
|
29653
|
-
var
|
|
29785
|
+
var uI = "0.1.13", dI = mF, fI = (() => {
|
|
29654
29786
|
try {
|
|
29655
29787
|
return new URLSearchParams(globalThis.location?.search ?? "").get("grid_enabled") === "1";
|
|
29656
29788
|
} catch {
|
|
29657
29789
|
return !1;
|
|
29658
29790
|
}
|
|
29659
|
-
})(),
|
|
29791
|
+
})(), pI = (() => {
|
|
29660
29792
|
try {
|
|
29661
29793
|
return new URLSearchParams(globalThis.location?.search ?? "").get("grid_debug") === "1";
|
|
29662
29794
|
} catch {
|
|
29663
29795
|
return !1;
|
|
29664
29796
|
}
|
|
29665
29797
|
})();
|
|
29666
|
-
function
|
|
29667
|
-
return
|
|
29798
|
+
function mI(e, t) {
|
|
29799
|
+
return fI || e === !0 || t === !0;
|
|
29800
|
+
}
|
|
29801
|
+
function hI(e = globalThis.location?.search ?? "") {
|
|
29802
|
+
return new URLSearchParams(e).get("kiosk") === "1";
|
|
29668
29803
|
}
|
|
29669
|
-
function
|
|
29804
|
+
function gI({ kioskMode: e = !1, instances: t, viewport: n, presence: r, callControlsBandPx: i, callControlsVisible: a, callControlsRect: o, reportedHeights: s }) {
|
|
29670
29805
|
return {
|
|
29806
|
+
kioskMode: e,
|
|
29671
29807
|
container: {
|
|
29672
|
-
widthPx:
|
|
29673
|
-
heightPx: Math.round(Math.min(
|
|
29674
|
-
},
|
|
29675
|
-
replica:
|
|
29676
|
-
selfView:
|
|
29677
|
-
presentation:
|
|
29678
|
-
userShare:
|
|
29679
|
-
cards:
|
|
29808
|
+
widthPx: n.width,
|
|
29809
|
+
heightPx: Math.round(Math.min(n.height, n.visualViewportHeight ?? n.height))
|
|
29810
|
+
},
|
|
29811
|
+
replica: r.hasPersonaVideo,
|
|
29812
|
+
selfView: r.hasSelfView,
|
|
29813
|
+
presentation: r.isPersonaPresenting ? {} : null,
|
|
29814
|
+
userShare: r.isScreenSharing ? {} : null,
|
|
29815
|
+
cards: t.map((e, t) => ({
|
|
29680
29816
|
id: e.id,
|
|
29681
29817
|
component: e.canvas_config.component,
|
|
29682
29818
|
dispatchSeq: t + 1,
|
|
29683
|
-
...
|
|
29819
|
+
...s[e.id] === void 0 ? {} : { naturalHeightPx: s[e.id] }
|
|
29684
29820
|
})),
|
|
29685
29821
|
prefs: {},
|
|
29686
|
-
callControls:
|
|
29687
|
-
callControlsVisible:
|
|
29688
|
-
...
|
|
29822
|
+
callControls: i > 0,
|
|
29823
|
+
callControlsVisible: a ?? !0,
|
|
29824
|
+
...o === void 0 ? {} : { callControlsRect: o }
|
|
29689
29825
|
};
|
|
29690
29826
|
}
|
|
29691
|
-
var
|
|
29692
|
-
function
|
|
29693
|
-
|
|
29827
|
+
var _I = 16, vI = 200, yI = Xt(null);
|
|
29828
|
+
function bI(e) {
|
|
29829
|
+
yI.peek() === null && (console.error("Magic Grid engine error; rendering the legacy layout.", e), yI.value = (e instanceof Error ? `${e.name}: ${e.message}` : String(e)).slice(0, vI));
|
|
29694
29830
|
}
|
|
29695
|
-
function
|
|
29696
|
-
|
|
29831
|
+
function xI() {
|
|
29832
|
+
yI.peek() !== null && (yI.value = null);
|
|
29697
29833
|
}
|
|
29698
|
-
function
|
|
29699
|
-
let
|
|
29700
|
-
|
|
29834
|
+
function SI({ kioskMode: e = !1, instances: t, viewport: n, presence: r, callControlsBandPx: i, callControlsVisible: a, callControlsRect: o, enabled: s }) {
|
|
29835
|
+
let c = N(dI), l = N(null), [u, d] = j({}), [f, p] = j(null), m = F((e, t) => {
|
|
29836
|
+
s && d((n) => n[e] === t ? n : {
|
|
29701
29837
|
...n,
|
|
29702
29838
|
[e]: t
|
|
29703
29839
|
});
|
|
29704
|
-
}, [
|
|
29840
|
+
}, [s]);
|
|
29705
29841
|
M(() => {
|
|
29706
|
-
|
|
29707
|
-
let n = new Set(
|
|
29708
|
-
for (let [
|
|
29709
|
-
return Object.keys(r).length === Object.keys(
|
|
29842
|
+
d((e) => {
|
|
29843
|
+
let n = new Set(t.map((e) => e.id)), r = {};
|
|
29844
|
+
for (let [t, i] of Object.entries(e)) n.has(t) && (r[t] = i);
|
|
29845
|
+
return Object.keys(r).length === Object.keys(e).length ? e : r;
|
|
29710
29846
|
});
|
|
29711
|
-
}, [
|
|
29712
|
-
let
|
|
29713
|
-
|
|
29714
|
-
|
|
29715
|
-
|
|
29716
|
-
|
|
29717
|
-
|
|
29718
|
-
|
|
29719
|
-
|
|
29847
|
+
}, [t]);
|
|
29848
|
+
let h = P(() => gI({
|
|
29849
|
+
kioskMode: e,
|
|
29850
|
+
instances: t,
|
|
29851
|
+
viewport: n,
|
|
29852
|
+
presence: r,
|
|
29853
|
+
callControlsBandPx: i,
|
|
29854
|
+
callControlsVisible: a,
|
|
29855
|
+
callControlsRect: o,
|
|
29856
|
+
reportedHeights: u
|
|
29720
29857
|
}), [
|
|
29721
29858
|
e,
|
|
29722
29859
|
t,
|
|
@@ -29724,45 +29861,49 @@ function bI({ instances: e, viewport: t, presence: n, callControlsBandPx: r, cal
|
|
|
29724
29861
|
r,
|
|
29725
29862
|
i,
|
|
29726
29863
|
a,
|
|
29727
|
-
|
|
29864
|
+
o,
|
|
29865
|
+
u
|
|
29728
29866
|
]);
|
|
29729
29867
|
return M(() => {
|
|
29730
|
-
if (!
|
|
29731
|
-
|
|
29868
|
+
if (!s || yI.peek() !== null) return;
|
|
29869
|
+
l.current === null && (l.current = Date.now());
|
|
29732
29870
|
let e = null, t = () => {
|
|
29733
|
-
if (e = null,
|
|
29734
|
-
let n = Date.now() - (
|
|
29871
|
+
if (e = null, yI.peek() !== null) return;
|
|
29872
|
+
let n = Date.now() - (l.current ?? 0), r;
|
|
29735
29873
|
try {
|
|
29736
|
-
r =
|
|
29874
|
+
r = lI(c.current, h, n, hF);
|
|
29737
29875
|
} catch (e) {
|
|
29738
|
-
|
|
29876
|
+
bI(e);
|
|
29739
29877
|
return;
|
|
29740
29878
|
}
|
|
29741
|
-
if (
|
|
29879
|
+
if (c.current = r.nextState, p(r), r.nextState.pendingClass !== null) {
|
|
29742
29880
|
let i = r.nextState.pendingSinceMs === null ? 0 : Math.max(0, n - r.nextState.pendingSinceMs);
|
|
29743
|
-
e = setTimeout(t, Math.max(
|
|
29881
|
+
e = setTimeout(t, Math.max(_I, hF.hysteresis.windowMs - i + _I));
|
|
29744
29882
|
}
|
|
29745
29883
|
};
|
|
29746
29884
|
return t(), () => {
|
|
29747
29885
|
e !== null && clearTimeout(e);
|
|
29748
29886
|
};
|
|
29749
|
-
}, [
|
|
29750
|
-
resolution:
|
|
29751
|
-
inputs:
|
|
29752
|
-
transitions:
|
|
29753
|
-
reportedHeights:
|
|
29754
|
-
recordNaturalHeight:
|
|
29887
|
+
}, [s, h]), {
|
|
29888
|
+
resolution: s ? f?.resolution ?? null : null,
|
|
29889
|
+
inputs: s ? h : null,
|
|
29890
|
+
transitions: s ? f?.transitions ?? [] : [],
|
|
29891
|
+
reportedHeights: u,
|
|
29892
|
+
recordNaturalHeight: m
|
|
29755
29893
|
};
|
|
29756
29894
|
}
|
|
29757
|
-
function
|
|
29758
|
-
return
|
|
29895
|
+
function CI(e) {
|
|
29896
|
+
return e.kind === "card" && e.sheet === !0 && e.sheetAnchor === "bottom";
|
|
29897
|
+
}
|
|
29898
|
+
function wI(e, t, n) {
|
|
29899
|
+
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" && !CI(e)) ? "card-overflow" : null : "no-persona-video" : "flag-off";
|
|
29759
29900
|
}
|
|
29760
|
-
function
|
|
29901
|
+
function TI(e, t) {
|
|
29761
29902
|
if (t !== null || e === null) return null;
|
|
29762
|
-
let n = e.tiles.find((e) => e.kind === "card" && e.sheet === !0);
|
|
29903
|
+
let n = e.tiles.find((e) => e.kind === "card" && e.sheet === !0 && !CI(e));
|
|
29763
29904
|
return n === void 0 ? null : n.rect.y + n.rect.height;
|
|
29764
29905
|
}
|
|
29765
|
-
var
|
|
29906
|
+
var EI = {
|
|
29766
29907
|
driving: !1,
|
|
29767
29908
|
containerPx: null,
|
|
29768
29909
|
replica: null,
|
|
@@ -29770,10 +29911,10 @@ var CI = {
|
|
|
29770
29911
|
content: null,
|
|
29771
29912
|
replicaCollapsed: !1
|
|
29772
29913
|
};
|
|
29773
|
-
function
|
|
29774
|
-
if (e === null) return
|
|
29914
|
+
function DI(e, t, n) {
|
|
29915
|
+
if (e === null) return EI;
|
|
29775
29916
|
let r = t === null;
|
|
29776
|
-
if (!r && !(t === "no-persona-video" && n)) return
|
|
29917
|
+
if (!r && !(t === "no-persona-video" && n)) return EI;
|
|
29777
29918
|
let i = (t) => e.tiles.find((e) => e.kind === t)?.rect ?? null;
|
|
29778
29919
|
return {
|
|
29779
29920
|
driving: r,
|
|
@@ -29784,30 +29925,38 @@ function wI(e, t, n) {
|
|
|
29784
29925
|
replicaCollapsed: r ? e.degradations.replicaCollapsed : !1
|
|
29785
29926
|
};
|
|
29786
29927
|
}
|
|
29787
|
-
function
|
|
29928
|
+
function OI(e) {
|
|
29788
29929
|
return e.selfView === null ? e.driving ? "hidden" : "legacy" : "engine";
|
|
29789
29930
|
}
|
|
29790
|
-
function
|
|
29931
|
+
function kI(e, t) {
|
|
29791
29932
|
return e.containerPx === null || t.containerPx === null ? !1 : e.containerPx.width === t.containerPx.width && e.containerPx.height === t.containerPx.height;
|
|
29792
29933
|
}
|
|
29793
29934
|
//#endregion
|
|
29935
|
+
//#region ../core/src/magic-canvas/grid-composition.ts
|
|
29936
|
+
function AI(e) {
|
|
29937
|
+
let t = "composition" in e ? e.composition : void 0;
|
|
29938
|
+
return t === "stacked" || t === "side-by-side" ? t : void 0;
|
|
29939
|
+
}
|
|
29940
|
+
//#endregion
|
|
29794
29941
|
//#region ../core/src/magic-canvas/grid-telemetry.ts
|
|
29795
|
-
var
|
|
29796
|
-
function
|
|
29942
|
+
var jI = "conversation.grid_status", MI = 6e4;
|
|
29943
|
+
function NI(e, t, n) {
|
|
29797
29944
|
return n ? e && t ? "url+config+start" : e ? "url+start" : t ? "config+start" : "start" : e && t ? "both" : e ? "url" : "config";
|
|
29798
29945
|
}
|
|
29799
|
-
function
|
|
29946
|
+
function PI(e, t) {
|
|
29800
29947
|
return {
|
|
29801
29948
|
message_type: "conversation",
|
|
29802
|
-
event_type:
|
|
29949
|
+
event_type: jI,
|
|
29803
29950
|
conversation_id: e,
|
|
29804
29951
|
properties: t
|
|
29805
29952
|
};
|
|
29806
29953
|
}
|
|
29807
|
-
function
|
|
29954
|
+
function FI(e) {
|
|
29955
|
+
let t = AI(e.sizeClass);
|
|
29808
29956
|
return {
|
|
29809
29957
|
template_id: e.templateId,
|
|
29810
29958
|
size_class: `${e.sizeClass.width}/${e.sizeClass.height}`,
|
|
29959
|
+
...t === void 0 ? {} : { composition: t },
|
|
29811
29960
|
container: {
|
|
29812
29961
|
w: e.containerPx.width,
|
|
29813
29962
|
h: e.containerPx.height
|
|
@@ -29815,8 +29964,8 @@ function jI(e) {
|
|
|
29815
29964
|
cards: e.tiles.filter((e) => e.kind === "card").length
|
|
29816
29965
|
};
|
|
29817
29966
|
}
|
|
29818
|
-
function
|
|
29819
|
-
let { send: t, enabledVia: n, engineVersion: r =
|
|
29967
|
+
function II(e) {
|
|
29968
|
+
let { send: t, enabledVia: n, engineVersion: r = uI, now: i = Date.now, transitionDebounceMs: a = 500, summaryIntervalMs: o = MI } = e, s = i(), c = !1, l = !1, u, d = null, f = null, p = !1, m = null, h = 0, g = 0, _ = {}, v = null, y = (e) => {
|
|
29820
29969
|
try {
|
|
29821
29970
|
t(e);
|
|
29822
29971
|
} catch {}
|
|
@@ -29853,7 +30002,7 @@ function MI(e) {
|
|
|
29853
30002
|
return {
|
|
29854
30003
|
update(e, t) {
|
|
29855
30004
|
if (c) return;
|
|
29856
|
-
t !== null && (v =
|
|
30005
|
+
t !== null && (v = FI(t));
|
|
29857
30006
|
let n = f === null ? u : d;
|
|
29858
30007
|
n !== void 0 && e === n || (d = e, f !== null && clearTimeout(f), f = setTimeout(() => x(e), a));
|
|
29859
30008
|
},
|
|
@@ -29868,7 +30017,7 @@ function MI(e) {
|
|
|
29868
30017
|
}
|
|
29869
30018
|
};
|
|
29870
30019
|
}
|
|
29871
|
-
function
|
|
30020
|
+
function LI({ enabled: e, enabledVia: t, bail: n, resolution: r, engineError: i }) {
|
|
29872
30021
|
let a = kh(), o = c_(), s = st(Ov), c = N({
|
|
29873
30022
|
daily: a,
|
|
29874
30023
|
meetingState: o,
|
|
@@ -29882,7 +30031,7 @@ function NI({ enabled: e, enabledVia: t, bail: n, resolution: r, engineError: i
|
|
|
29882
30031
|
let l = N(null);
|
|
29883
30032
|
M(() => {
|
|
29884
30033
|
if (!e) return;
|
|
29885
|
-
let n =
|
|
30034
|
+
let n = II({
|
|
29886
30035
|
enabledVia: t,
|
|
29887
30036
|
send: (e) => {
|
|
29888
30037
|
try {
|
|
@@ -29890,7 +30039,7 @@ function NI({ enabled: e, enabledVia: t, bail: n, resolution: r, engineError: i
|
|
|
29890
30039
|
if (!t.daily || t.meetingState !== "joined-meeting") return;
|
|
29891
30040
|
let n = t.conversation?.session.peek()?.conversationId;
|
|
29892
30041
|
if (!n) return;
|
|
29893
|
-
t.daily.sendAppMessage(
|
|
30042
|
+
t.daily.sendAppMessage(PI(n, e), "*");
|
|
29894
30043
|
} catch {}
|
|
29895
30044
|
}
|
|
29896
30045
|
});
|
|
@@ -29905,100 +30054,100 @@ function NI({ enabled: e, enabledVia: t, bail: n, resolution: r, engineError: i
|
|
|
29905
30054
|
}
|
|
29906
30055
|
//#endregion
|
|
29907
30056
|
//#region ../../node_modules/tailwind-merge/dist/bundle-mjs.mjs
|
|
29908
|
-
var
|
|
30057
|
+
var RI = (e, t) => {
|
|
29909
30058
|
let n = Array(e.length + t.length);
|
|
29910
30059
|
for (let t = 0; t < e.length; t++) n[t] = e[t];
|
|
29911
30060
|
for (let r = 0; r < t.length; r++) n[e.length + r] = t[r];
|
|
29912
30061
|
return n;
|
|
29913
|
-
},
|
|
30062
|
+
}, zI = (e, t) => ({
|
|
29914
30063
|
classGroupId: e,
|
|
29915
30064
|
validator: t
|
|
29916
|
-
}),
|
|
30065
|
+
}), BI = (e = /* @__PURE__ */ new Map(), t = null, n) => ({
|
|
29917
30066
|
nextPart: e,
|
|
29918
30067
|
validators: t,
|
|
29919
30068
|
classGroupId: n
|
|
29920
|
-
}),
|
|
29921
|
-
let t =
|
|
30069
|
+
}), VI = "-", HI = [], UI = "arbitrary..", WI = (e) => {
|
|
30070
|
+
let t = qI(e), { conflictingClassGroups: n, conflictingClassGroupModifiers: r } = e;
|
|
29922
30071
|
return {
|
|
29923
30072
|
getClassGroupId: (e) => {
|
|
29924
|
-
if (e.startsWith("[") && e.endsWith("]")) return
|
|
29925
|
-
let n = e.split(
|
|
29926
|
-
return
|
|
30073
|
+
if (e.startsWith("[") && e.endsWith("]")) return KI(e);
|
|
30074
|
+
let n = e.split(VI);
|
|
30075
|
+
return GI(n, +(n[0] === "" && n.length > 1), t);
|
|
29927
30076
|
},
|
|
29928
30077
|
getConflictingClassGroupIds: (e, t) => {
|
|
29929
30078
|
if (t) {
|
|
29930
30079
|
let t = r[e], i = n[e];
|
|
29931
|
-
return t ? i ?
|
|
30080
|
+
return t ? i ? RI(i, t) : t : i || HI;
|
|
29932
30081
|
}
|
|
29933
|
-
return n[e] ||
|
|
30082
|
+
return n[e] || HI;
|
|
29934
30083
|
}
|
|
29935
30084
|
};
|
|
29936
|
-
},
|
|
30085
|
+
}, GI = (e, t, n) => {
|
|
29937
30086
|
if (e.length - t === 0) return n.classGroupId;
|
|
29938
30087
|
let r = e[t], i = n.nextPart.get(r);
|
|
29939
30088
|
if (i) {
|
|
29940
|
-
let n =
|
|
30089
|
+
let n = GI(e, t + 1, i);
|
|
29941
30090
|
if (n) return n;
|
|
29942
30091
|
}
|
|
29943
30092
|
let a = n.validators;
|
|
29944
30093
|
if (a === null) return;
|
|
29945
|
-
let o = t === 0 ? e.join(
|
|
30094
|
+
let o = t === 0 ? e.join(VI) : e.slice(t).join(VI), s = a.length;
|
|
29946
30095
|
for (let e = 0; e < s; e++) {
|
|
29947
30096
|
let t = a[e];
|
|
29948
30097
|
if (t.validator(o)) return t.classGroupId;
|
|
29949
30098
|
}
|
|
29950
|
-
},
|
|
30099
|
+
}, KI = (e) => e.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
|
|
29951
30100
|
let t = e.slice(1, -1), n = t.indexOf(":"), r = t.slice(0, n);
|
|
29952
|
-
return r ?
|
|
29953
|
-
})(),
|
|
30101
|
+
return r ? UI + r : void 0;
|
|
30102
|
+
})(), qI = (e) => {
|
|
29954
30103
|
let { theme: t, classGroups: n } = e;
|
|
29955
|
-
return
|
|
29956
|
-
},
|
|
29957
|
-
let n =
|
|
30104
|
+
return JI(n, t);
|
|
30105
|
+
}, JI = (e, t) => {
|
|
30106
|
+
let n = BI();
|
|
29958
30107
|
for (let r in e) {
|
|
29959
30108
|
let i = e[r];
|
|
29960
|
-
|
|
30109
|
+
YI(i, n, r, t);
|
|
29961
30110
|
}
|
|
29962
30111
|
return n;
|
|
29963
|
-
},
|
|
30112
|
+
}, YI = (e, t, n, r) => {
|
|
29964
30113
|
let i = e.length;
|
|
29965
30114
|
for (let a = 0; a < i; a++) {
|
|
29966
30115
|
let i = e[a];
|
|
29967
|
-
|
|
30116
|
+
XI(i, t, n, r);
|
|
29968
30117
|
}
|
|
29969
|
-
},
|
|
30118
|
+
}, XI = (e, t, n, r) => {
|
|
29970
30119
|
if (typeof e == "string") {
|
|
29971
|
-
|
|
30120
|
+
ZI(e, t, n);
|
|
29972
30121
|
return;
|
|
29973
30122
|
}
|
|
29974
30123
|
if (typeof e == "function") {
|
|
29975
|
-
|
|
30124
|
+
QI(e, t, n, r);
|
|
29976
30125
|
return;
|
|
29977
30126
|
}
|
|
29978
|
-
|
|
29979
|
-
},
|
|
29980
|
-
let r = e === "" ? t :
|
|
30127
|
+
$I(e, t, n, r);
|
|
30128
|
+
}, ZI = (e, t, n) => {
|
|
30129
|
+
let r = e === "" ? t : eL(t, e);
|
|
29981
30130
|
r.classGroupId = n;
|
|
29982
|
-
},
|
|
29983
|
-
if (
|
|
29984
|
-
|
|
30131
|
+
}, QI = (e, t, n, r) => {
|
|
30132
|
+
if (tL(e)) {
|
|
30133
|
+
YI(e(r), t, n, r);
|
|
29985
30134
|
return;
|
|
29986
30135
|
}
|
|
29987
|
-
t.validators === null && (t.validators = []), t.validators.push(
|
|
29988
|
-
},
|
|
30136
|
+
t.validators === null && (t.validators = []), t.validators.push(zI(n, e));
|
|
30137
|
+
}, $I = (e, t, n, r) => {
|
|
29989
30138
|
let i = Object.entries(e), a = i.length;
|
|
29990
30139
|
for (let e = 0; e < a; e++) {
|
|
29991
30140
|
let [a, o] = i[e];
|
|
29992
|
-
|
|
30141
|
+
YI(o, eL(t, a), n, r);
|
|
29993
30142
|
}
|
|
29994
|
-
},
|
|
29995
|
-
let n = e, r = t.split(
|
|
30143
|
+
}, eL = (e, t) => {
|
|
30144
|
+
let n = e, r = t.split(VI), i = r.length;
|
|
29996
30145
|
for (let e = 0; e < i; e++) {
|
|
29997
30146
|
let t = r[e], i = n.nextPart.get(t);
|
|
29998
|
-
i || (i =
|
|
30147
|
+
i || (i = BI(), n.nextPart.set(t, i)), n = i;
|
|
29999
30148
|
}
|
|
30000
30149
|
return n;
|
|
30001
|
-
},
|
|
30150
|
+
}, tL = (e) => "isThemeGetter" in e && e.isThemeGetter === !0, nL = (e) => {
|
|
30002
30151
|
if (e < 1) return {
|
|
30003
30152
|
get: () => void 0,
|
|
30004
30153
|
set: () => {}
|
|
@@ -30016,19 +30165,19 @@ var PI = (e, t) => {
|
|
|
30016
30165
|
e in n ? n[e] = t : i(e, t);
|
|
30017
30166
|
}
|
|
30018
30167
|
};
|
|
30019
|
-
},
|
|
30168
|
+
}, rL = "!", iL = ":", aL = [], oL = (e, t, n, r, i) => ({
|
|
30020
30169
|
modifiers: e,
|
|
30021
30170
|
hasImportantModifier: t,
|
|
30022
30171
|
baseClassName: n,
|
|
30023
30172
|
maybePostfixModifierPosition: r,
|
|
30024
30173
|
isExternal: i
|
|
30025
|
-
}),
|
|
30174
|
+
}), sL = (e) => {
|
|
30026
30175
|
let { prefix: t, experimentalParseClassName: n } = e, r = (e) => {
|
|
30027
30176
|
let t = [], n = 0, r = 0, i = 0, a, o = e.length;
|
|
30028
30177
|
for (let s = 0; s < o; s++) {
|
|
30029
30178
|
let o = e[s];
|
|
30030
30179
|
if (n === 0 && r === 0) {
|
|
30031
|
-
if (o ===
|
|
30180
|
+
if (o === iL) {
|
|
30032
30181
|
t.push(e.slice(i, s)), i = s + 1;
|
|
30033
30182
|
continue;
|
|
30034
30183
|
}
|
|
@@ -30040,13 +30189,13 @@ var PI = (e, t) => {
|
|
|
30040
30189
|
o === "[" ? n++ : o === "]" ? n-- : o === "(" ? r++ : o === ")" && r--;
|
|
30041
30190
|
}
|
|
30042
30191
|
let s = t.length === 0 ? e : e.slice(i), c = s, l = !1;
|
|
30043
|
-
s.endsWith(
|
|
30192
|
+
s.endsWith(rL) ? (c = s.slice(0, -1), l = !0) : s.startsWith(rL) && (c = s.slice(1), l = !0);
|
|
30044
30193
|
let u = a && a > i ? a - i : void 0;
|
|
30045
|
-
return
|
|
30194
|
+
return oL(t, l, c, u);
|
|
30046
30195
|
};
|
|
30047
30196
|
if (t) {
|
|
30048
|
-
let e = t +
|
|
30049
|
-
r = (t) => t.startsWith(e) ? n(t.slice(e.length)) :
|
|
30197
|
+
let e = t + iL, n = r;
|
|
30198
|
+
r = (t) => t.startsWith(e) ? n(t.slice(e.length)) : oL(aL, !1, t, void 0, !0);
|
|
30050
30199
|
}
|
|
30051
30200
|
if (n) {
|
|
30052
30201
|
let e = r;
|
|
@@ -30056,7 +30205,7 @@ var PI = (e, t) => {
|
|
|
30056
30205
|
});
|
|
30057
30206
|
}
|
|
30058
30207
|
return r;
|
|
30059
|
-
},
|
|
30208
|
+
}, cL = (e) => {
|
|
30060
30209
|
let t = /* @__PURE__ */ new Map();
|
|
30061
30210
|
return e.orderSensitiveModifiers.forEach((e, n) => {
|
|
30062
30211
|
t.set(e, 1e6 + n);
|
|
@@ -30068,18 +30217,18 @@ var PI = (e, t) => {
|
|
|
30068
30217
|
}
|
|
30069
30218
|
return r.length > 0 && (r.sort(), n.push(...r)), n;
|
|
30070
30219
|
};
|
|
30071
|
-
},
|
|
30072
|
-
cache:
|
|
30073
|
-
parseClassName:
|
|
30074
|
-
sortModifiers:
|
|
30075
|
-
postfixLookupClassGroupIds:
|
|
30076
|
-
...
|
|
30077
|
-
}),
|
|
30220
|
+
}, lL = (e) => ({
|
|
30221
|
+
cache: nL(e.cacheSize),
|
|
30222
|
+
parseClassName: sL(e),
|
|
30223
|
+
sortModifiers: cL(e),
|
|
30224
|
+
postfixLookupClassGroupIds: uL(e),
|
|
30225
|
+
...WI(e)
|
|
30226
|
+
}), uL = (e) => {
|
|
30078
30227
|
let t = Object.create(null), n = e.postfixLookupClassGroups;
|
|
30079
30228
|
if (n) for (let e = 0; e < n.length; e++) t[n[e]] = !0;
|
|
30080
30229
|
return t;
|
|
30081
|
-
},
|
|
30082
|
-
let { parseClassName: n, getClassGroupId: r, getConflictingClassGroupIds: i, sortModifiers: a, postfixLookupClassGroupIds: o } = t, s = [], c = e.trim().split(
|
|
30230
|
+
}, dL = /\s+/, fL = (e, t) => {
|
|
30231
|
+
let { parseClassName: n, getClassGroupId: r, getConflictingClassGroupIds: i, sortModifiers: a, postfixLookupClassGroupIds: o } = t, s = [], c = e.trim().split(dL), l = "";
|
|
30083
30232
|
for (let e = c.length - 1; e >= 0; --e) {
|
|
30084
30233
|
let t = c[e], { isExternal: u, modifiers: d, hasImportantModifier: f, baseClassName: p, maybePostfixModifierPosition: m } = n(t);
|
|
30085
30234
|
if (u) {
|
|
@@ -30103,7 +30252,7 @@ var PI = (e, t) => {
|
|
|
30103
30252
|
}
|
|
30104
30253
|
h = !1;
|
|
30105
30254
|
}
|
|
30106
|
-
let _ = d.length === 0 ? "" : d.length === 1 ? d[0] : a(d).join(":"), v = f ? _ +
|
|
30255
|
+
let _ = d.length === 0 ? "" : d.length === 1 ? d[0] : a(d).join(":"), v = f ? _ + rL : _, y = v + g;
|
|
30107
30256
|
if (s.indexOf(y) > -1) continue;
|
|
30108
30257
|
s.push(y);
|
|
30109
30258
|
let b = i(g, h);
|
|
@@ -30114,34 +30263,34 @@ var PI = (e, t) => {
|
|
|
30114
30263
|
l = t + (l.length > 0 ? " " + l : l);
|
|
30115
30264
|
}
|
|
30116
30265
|
return l;
|
|
30117
|
-
},
|
|
30266
|
+
}, pL = (...e) => {
|
|
30118
30267
|
let t = 0, n, r, i = "";
|
|
30119
|
-
for (; t < e.length;) (n = e[t++]) && (r =
|
|
30268
|
+
for (; t < e.length;) (n = e[t++]) && (r = mL(n)) && (i && (i += " "), i += r);
|
|
30120
30269
|
return i;
|
|
30121
|
-
},
|
|
30270
|
+
}, mL = (e) => {
|
|
30122
30271
|
if (typeof e == "string") return e;
|
|
30123
30272
|
let t, n = "";
|
|
30124
|
-
for (let r = 0; r < e.length; r++) e[r] && (t =
|
|
30273
|
+
for (let r = 0; r < e.length; r++) e[r] && (t = mL(e[r])) && (n && (n += " "), n += t);
|
|
30125
30274
|
return n;
|
|
30126
|
-
},
|
|
30127
|
-
let n, r, i, a, o = (o) => (n =
|
|
30275
|
+
}, hL = (e, ...t) => {
|
|
30276
|
+
let n, r, i, a, o = (o) => (n = lL(t.reduce((e, t) => t(e), e())), r = n.cache.get, i = n.cache.set, a = s, s(o)), s = (e) => {
|
|
30128
30277
|
let t = r(e);
|
|
30129
30278
|
if (t) return t;
|
|
30130
|
-
let a =
|
|
30279
|
+
let a = fL(e, n);
|
|
30131
30280
|
return i(e, a), a;
|
|
30132
30281
|
};
|
|
30133
|
-
return a = o, (...e) => a(
|
|
30134
|
-
},
|
|
30135
|
-
let t = (t) => t[e] ||
|
|
30282
|
+
return a = o, (...e) => a(pL(...e));
|
|
30283
|
+
}, gL = [], _L = (e) => {
|
|
30284
|
+
let t = (t) => t[e] || gL;
|
|
30136
30285
|
return t.isThemeGetter = !0, t;
|
|
30137
|
-
},
|
|
30138
|
-
let r =
|
|
30286
|
+
}, vL = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, yL = /^\((?:(\w[\w-]*):)?(.+)\)$/i, bL = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/, xL = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, SL = /\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$/, CL = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, wL = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, TL = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, EL = (e) => bL.test(e), DL = (e) => !!e && !Number.isNaN(Number(e)), OL = (e) => !!e && Number.isInteger(Number(e)), kL = (e) => e.endsWith("%") && DL(e.slice(0, -1)), AL = (e) => xL.test(e), jL = () => !0, ML = (e) => SL.test(e) && !CL.test(e), NL = () => !1, PL = (e) => wL.test(e), FL = (e) => TL.test(e), IL = (e) => !Q(e) && !$(e), LL = (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)), RL = (e) => $L(e, rR, NL), Q = (e) => vL.test(e), zL = (e) => $L(e, iR, ML), BL = (e) => $L(e, aR, DL), VL = (e) => $L(e, sR, jL), HL = (e) => $L(e, oR, NL), UL = (e) => $L(e, tR, NL), WL = (e) => $L(e, nR, FL), GL = (e) => $L(e, cR, PL), $ = (e) => yL.test(e), KL = (e) => eR(e, iR), qL = (e) => eR(e, oR), JL = (e) => eR(e, tR), YL = (e) => eR(e, rR), XL = (e) => eR(e, nR), ZL = (e) => eR(e, cR, !0), QL = (e) => eR(e, sR, !0), $L = (e, t, n) => {
|
|
30287
|
+
let r = vL.exec(e);
|
|
30139
30288
|
return r ? r[1] ? t(r[1]) : n(r[2]) : !1;
|
|
30140
|
-
},
|
|
30141
|
-
let r =
|
|
30289
|
+
}, eR = (e, t, n = !1) => {
|
|
30290
|
+
let r = yL.exec(e);
|
|
30142
30291
|
return r ? r[1] ? t(r[1]) : n : !1;
|
|
30143
|
-
},
|
|
30144
|
-
let e =
|
|
30292
|
+
}, tR = (e) => e === "position" || e === "percentage", nR = (e) => e === "image" || e === "url", rR = (e) => e === "length" || e === "size" || e === "bg-size", iR = (e) => e === "length", aR = (e) => e === "number", oR = (e) => e === "family-name", sR = (e) => e === "number" || e === "weight", cR = (e) => e === "shadow", lR = /* @__PURE__ */ hL(() => {
|
|
30293
|
+
let e = _L("color"), t = _L("font"), n = _L("text"), r = _L("font-weight"), i = _L("tracking"), a = _L("leading"), o = _L("breakpoint"), s = _L("container"), c = _L("spacing"), l = _L("radius"), u = _L("shadow"), d = _L("inset-shadow"), f = _L("text-shadow"), p = _L("drop-shadow"), m = _L("blur"), h = _L("perspective"), g = _L("aspect"), _ = _L("ease"), v = _L("animate"), y = () => [
|
|
30145
30294
|
"auto",
|
|
30146
30295
|
"avoid",
|
|
30147
30296
|
"all",
|
|
@@ -30183,12 +30332,12 @@ var PI = (e, t) => {
|
|
|
30183
30332
|
Q,
|
|
30184
30333
|
c
|
|
30185
30334
|
], T = () => [
|
|
30186
|
-
|
|
30335
|
+
EL,
|
|
30187
30336
|
"full",
|
|
30188
30337
|
"auto",
|
|
30189
30338
|
...w()
|
|
30190
30339
|
], ee = () => [
|
|
30191
|
-
|
|
30340
|
+
OL,
|
|
30192
30341
|
"none",
|
|
30193
30342
|
"subgrid",
|
|
30194
30343
|
$,
|
|
@@ -30197,15 +30346,15 @@ var PI = (e, t) => {
|
|
|
30197
30346
|
"auto",
|
|
30198
30347
|
{ span: [
|
|
30199
30348
|
"full",
|
|
30200
|
-
|
|
30349
|
+
OL,
|
|
30201
30350
|
$,
|
|
30202
30351
|
Q
|
|
30203
30352
|
] },
|
|
30204
|
-
|
|
30353
|
+
OL,
|
|
30205
30354
|
$,
|
|
30206
30355
|
Q
|
|
30207
30356
|
], D = () => [
|
|
30208
|
-
|
|
30357
|
+
OL,
|
|
30209
30358
|
"auto",
|
|
30210
30359
|
$,
|
|
30211
30360
|
Q
|
|
@@ -30235,7 +30384,7 @@ var PI = (e, t) => {
|
|
|
30235
30384
|
"center-safe",
|
|
30236
30385
|
"end-safe"
|
|
30237
30386
|
], O = () => ["auto", ...w()], ie = () => [
|
|
30238
|
-
|
|
30387
|
+
EL,
|
|
30239
30388
|
"auto",
|
|
30240
30389
|
"full",
|
|
30241
30390
|
"dvw",
|
|
@@ -30249,7 +30398,7 @@ var PI = (e, t) => {
|
|
|
30249
30398
|
"fit",
|
|
30250
30399
|
...w()
|
|
30251
30400
|
], ae = () => [
|
|
30252
|
-
|
|
30401
|
+
EL,
|
|
30253
30402
|
"screen",
|
|
30254
30403
|
"full",
|
|
30255
30404
|
"dvw",
|
|
@@ -30260,7 +30409,7 @@ var PI = (e, t) => {
|
|
|
30260
30409
|
"fit",
|
|
30261
30410
|
...w()
|
|
30262
30411
|
], k = () => [
|
|
30263
|
-
|
|
30412
|
+
EL,
|
|
30264
30413
|
"screen",
|
|
30265
30414
|
"full",
|
|
30266
30415
|
"lh",
|
|
@@ -30277,8 +30426,8 @@ var PI = (e, t) => {
|
|
|
30277
30426
|
Q
|
|
30278
30427
|
], oe = () => [
|
|
30279
30428
|
...b(),
|
|
30280
|
-
|
|
30281
|
-
|
|
30429
|
+
JL,
|
|
30430
|
+
UL,
|
|
30282
30431
|
{ position: [$, Q] }
|
|
30283
30432
|
], se = () => ["no-repeat", { repeat: [
|
|
30284
30433
|
"",
|
|
@@ -30290,13 +30439,13 @@ var PI = (e, t) => {
|
|
|
30290
30439
|
"auto",
|
|
30291
30440
|
"cover",
|
|
30292
30441
|
"contain",
|
|
30293
|
-
|
|
30294
|
-
|
|
30442
|
+
YL,
|
|
30443
|
+
RL,
|
|
30295
30444
|
{ size: [$, Q] }
|
|
30296
30445
|
], le = () => [
|
|
30297
|
-
|
|
30298
|
-
|
|
30299
|
-
|
|
30446
|
+
kL,
|
|
30447
|
+
KL,
|
|
30448
|
+
zL
|
|
30300
30449
|
], ue = () => [
|
|
30301
30450
|
"",
|
|
30302
30451
|
"none",
|
|
@@ -30306,9 +30455,9 @@ var PI = (e, t) => {
|
|
|
30306
30455
|
Q
|
|
30307
30456
|
], de = () => [
|
|
30308
30457
|
"",
|
|
30309
|
-
|
|
30310
|
-
|
|
30311
|
-
|
|
30458
|
+
DL,
|
|
30459
|
+
KL,
|
|
30460
|
+
zL
|
|
30312
30461
|
], fe = () => [
|
|
30313
30462
|
"solid",
|
|
30314
30463
|
"dashed",
|
|
@@ -30332,10 +30481,10 @@ var PI = (e, t) => {
|
|
|
30332
30481
|
"color",
|
|
30333
30482
|
"luminosity"
|
|
30334
30483
|
], me = () => [
|
|
30335
|
-
|
|
30336
|
-
|
|
30337
|
-
|
|
30338
|
-
|
|
30484
|
+
DL,
|
|
30485
|
+
kL,
|
|
30486
|
+
JL,
|
|
30487
|
+
UL
|
|
30339
30488
|
], he = () => [
|
|
30340
30489
|
"",
|
|
30341
30490
|
"none",
|
|
@@ -30344,20 +30493,20 @@ var PI = (e, t) => {
|
|
|
30344
30493
|
Q
|
|
30345
30494
|
], ge = () => [
|
|
30346
30495
|
"none",
|
|
30347
|
-
|
|
30496
|
+
DL,
|
|
30348
30497
|
$,
|
|
30349
30498
|
Q
|
|
30350
30499
|
], _e = () => [
|
|
30351
30500
|
"none",
|
|
30352
|
-
|
|
30501
|
+
DL,
|
|
30353
30502
|
$,
|
|
30354
30503
|
Q
|
|
30355
30504
|
], ve = () => [
|
|
30356
|
-
|
|
30505
|
+
DL,
|
|
30357
30506
|
$,
|
|
30358
30507
|
Q
|
|
30359
30508
|
], ye = () => [
|
|
30360
|
-
|
|
30509
|
+
EL,
|
|
30361
30510
|
"full",
|
|
30362
30511
|
...w()
|
|
30363
30512
|
];
|
|
@@ -30371,17 +30520,17 @@ var PI = (e, t) => {
|
|
|
30371
30520
|
"bounce"
|
|
30372
30521
|
],
|
|
30373
30522
|
aspect: ["video"],
|
|
30374
|
-
blur: [
|
|
30375
|
-
breakpoint: [
|
|
30376
|
-
color: [
|
|
30377
|
-
container: [
|
|
30378
|
-
"drop-shadow": [
|
|
30523
|
+
blur: [AL],
|
|
30524
|
+
breakpoint: [AL],
|
|
30525
|
+
color: [jL],
|
|
30526
|
+
container: [AL],
|
|
30527
|
+
"drop-shadow": [AL],
|
|
30379
30528
|
ease: [
|
|
30380
30529
|
"in",
|
|
30381
30530
|
"out",
|
|
30382
30531
|
"in-out"
|
|
30383
30532
|
],
|
|
30384
|
-
font: [
|
|
30533
|
+
font: [IL],
|
|
30385
30534
|
"font-weight": [
|
|
30386
30535
|
"thin",
|
|
30387
30536
|
"extralight",
|
|
@@ -30393,7 +30542,7 @@ var PI = (e, t) => {
|
|
|
30393
30542
|
"extrabold",
|
|
30394
30543
|
"black"
|
|
30395
30544
|
],
|
|
30396
|
-
"inset-shadow": [
|
|
30545
|
+
"inset-shadow": [AL],
|
|
30397
30546
|
leading: [
|
|
30398
30547
|
"none",
|
|
30399
30548
|
"tight",
|
|
@@ -30410,11 +30559,11 @@ var PI = (e, t) => {
|
|
|
30410
30559
|
"distant",
|
|
30411
30560
|
"none"
|
|
30412
30561
|
],
|
|
30413
|
-
radius: [
|
|
30414
|
-
shadow: [
|
|
30415
|
-
spacing: ["px",
|
|
30416
|
-
text: [
|
|
30417
|
-
"text-shadow": [
|
|
30562
|
+
radius: [AL],
|
|
30563
|
+
shadow: [AL],
|
|
30564
|
+
spacing: ["px", DL],
|
|
30565
|
+
text: [AL],
|
|
30566
|
+
"text-shadow": [AL],
|
|
30418
30567
|
tracking: [
|
|
30419
30568
|
"tighter",
|
|
30420
30569
|
"tight",
|
|
@@ -30428,7 +30577,7 @@ var PI = (e, t) => {
|
|
|
30428
30577
|
aspect: [{ aspect: [
|
|
30429
30578
|
"auto",
|
|
30430
30579
|
"square",
|
|
30431
|
-
|
|
30580
|
+
EL,
|
|
30432
30581
|
Q,
|
|
30433
30582
|
$,
|
|
30434
30583
|
g
|
|
@@ -30441,9 +30590,9 @@ var PI = (e, t) => {
|
|
|
30441
30590
|
$,
|
|
30442
30591
|
Q
|
|
30443
30592
|
] }],
|
|
30444
|
-
"container-named": [
|
|
30593
|
+
"container-named": [LL],
|
|
30445
30594
|
columns: [{ columns: [
|
|
30446
|
-
|
|
30595
|
+
DL,
|
|
30447
30596
|
Q,
|
|
30448
30597
|
$,
|
|
30449
30598
|
s
|
|
@@ -30542,13 +30691,13 @@ var PI = (e, t) => {
|
|
|
30542
30691
|
"collapse"
|
|
30543
30692
|
],
|
|
30544
30693
|
z: [{ z: [
|
|
30545
|
-
|
|
30694
|
+
OL,
|
|
30546
30695
|
"auto",
|
|
30547
30696
|
$,
|
|
30548
30697
|
Q
|
|
30549
30698
|
] }],
|
|
30550
30699
|
basis: [{ basis: [
|
|
30551
|
-
|
|
30700
|
+
EL,
|
|
30552
30701
|
"full",
|
|
30553
30702
|
"auto",
|
|
30554
30703
|
s,
|
|
@@ -30566,8 +30715,8 @@ var PI = (e, t) => {
|
|
|
30566
30715
|
"wrap-reverse"
|
|
30567
30716
|
] }],
|
|
30568
30717
|
flex: [{ flex: [
|
|
30569
|
-
|
|
30570
|
-
|
|
30718
|
+
DL,
|
|
30719
|
+
EL,
|
|
30571
30720
|
"auto",
|
|
30572
30721
|
"initial",
|
|
30573
30722
|
"none",
|
|
@@ -30575,18 +30724,18 @@ var PI = (e, t) => {
|
|
|
30575
30724
|
] }],
|
|
30576
30725
|
grow: [{ grow: [
|
|
30577
30726
|
"",
|
|
30578
|
-
|
|
30727
|
+
DL,
|
|
30579
30728
|
$,
|
|
30580
30729
|
Q
|
|
30581
30730
|
] }],
|
|
30582
30731
|
shrink: [{ shrink: [
|
|
30583
30732
|
"",
|
|
30584
|
-
|
|
30733
|
+
DL,
|
|
30585
30734
|
$,
|
|
30586
30735
|
Q
|
|
30587
30736
|
] }],
|
|
30588
30737
|
order: [{ order: [
|
|
30589
|
-
|
|
30738
|
+
OL,
|
|
30590
30739
|
"first",
|
|
30591
30740
|
"last",
|
|
30592
30741
|
"none",
|
|
@@ -30697,15 +30846,15 @@ var PI = (e, t) => {
|
|
|
30697
30846
|
"font-size": [{ text: [
|
|
30698
30847
|
"base",
|
|
30699
30848
|
n,
|
|
30700
|
-
|
|
30701
|
-
|
|
30849
|
+
KL,
|
|
30850
|
+
zL
|
|
30702
30851
|
] }],
|
|
30703
30852
|
"font-smoothing": ["antialiased", "subpixel-antialiased"],
|
|
30704
30853
|
"font-style": ["italic", "not-italic"],
|
|
30705
30854
|
"font-weight": [{ font: [
|
|
30706
30855
|
r,
|
|
30707
|
-
|
|
30708
|
-
|
|
30856
|
+
QL,
|
|
30857
|
+
VL
|
|
30709
30858
|
] }],
|
|
30710
30859
|
"font-stretch": [{ "font-stretch": [
|
|
30711
30860
|
"ultra-condensed",
|
|
@@ -30717,12 +30866,12 @@ var PI = (e, t) => {
|
|
|
30717
30866
|
"expanded",
|
|
30718
30867
|
"extra-expanded",
|
|
30719
30868
|
"ultra-expanded",
|
|
30720
|
-
|
|
30869
|
+
kL,
|
|
30721
30870
|
Q
|
|
30722
30871
|
] }],
|
|
30723
30872
|
"font-family": [{ font: [
|
|
30724
|
-
|
|
30725
|
-
|
|
30873
|
+
qL,
|
|
30874
|
+
HL,
|
|
30726
30875
|
t
|
|
30727
30876
|
] }],
|
|
30728
30877
|
"font-features": [{ "font-features": [Q] }],
|
|
@@ -30738,10 +30887,10 @@ var PI = (e, t) => {
|
|
|
30738
30887
|
Q
|
|
30739
30888
|
] }],
|
|
30740
30889
|
"line-clamp": [{ "line-clamp": [
|
|
30741
|
-
|
|
30890
|
+
DL,
|
|
30742
30891
|
"none",
|
|
30743
30892
|
$,
|
|
30744
|
-
|
|
30893
|
+
BL
|
|
30745
30894
|
] }],
|
|
30746
30895
|
leading: [{ leading: [a, ...w()] }],
|
|
30747
30896
|
"list-image": [{ "list-image": [
|
|
@@ -30775,15 +30924,15 @@ var PI = (e, t) => {
|
|
|
30775
30924
|
],
|
|
30776
30925
|
"text-decoration-style": [{ decoration: [...fe(), "wavy"] }],
|
|
30777
30926
|
"text-decoration-thickness": [{ decoration: [
|
|
30778
|
-
|
|
30927
|
+
DL,
|
|
30779
30928
|
"from-font",
|
|
30780
30929
|
"auto",
|
|
30781
30930
|
$,
|
|
30782
|
-
|
|
30931
|
+
zL
|
|
30783
30932
|
] }],
|
|
30784
30933
|
"text-decoration-color": [{ decoration: A() }],
|
|
30785
30934
|
"underline-offset": [{ "underline-offset": [
|
|
30786
|
-
|
|
30935
|
+
DL,
|
|
30787
30936
|
"auto",
|
|
30788
30937
|
$,
|
|
30789
30938
|
Q
|
|
@@ -30807,7 +30956,7 @@ var PI = (e, t) => {
|
|
|
30807
30956
|
] }],
|
|
30808
30957
|
indent: [{ indent: w() }],
|
|
30809
30958
|
"tab-size": [{ tab: [
|
|
30810
|
-
|
|
30959
|
+
OL,
|
|
30811
30960
|
$,
|
|
30812
30961
|
Q
|
|
30813
30962
|
] }],
|
|
@@ -30885,7 +31034,7 @@ var PI = (e, t) => {
|
|
|
30885
31034
|
"l",
|
|
30886
31035
|
"tl"
|
|
30887
31036
|
] },
|
|
30888
|
-
|
|
31037
|
+
OL,
|
|
30889
31038
|
$,
|
|
30890
31039
|
Q
|
|
30891
31040
|
],
|
|
@@ -30895,13 +31044,13 @@ var PI = (e, t) => {
|
|
|
30895
31044
|
Q
|
|
30896
31045
|
],
|
|
30897
31046
|
conic: [
|
|
30898
|
-
|
|
31047
|
+
OL,
|
|
30899
31048
|
$,
|
|
30900
31049
|
Q
|
|
30901
31050
|
]
|
|
30902
31051
|
},
|
|
30903
|
-
|
|
30904
|
-
|
|
31052
|
+
XL,
|
|
31053
|
+
WL
|
|
30905
31054
|
] }],
|
|
30906
31055
|
"bg-color": [{ bg: A() }],
|
|
30907
31056
|
"gradient-from-pos": [{ from: le() }],
|
|
@@ -30968,48 +31117,48 @@ var PI = (e, t) => {
|
|
|
30968
31117
|
"hidden"
|
|
30969
31118
|
] }],
|
|
30970
31119
|
"outline-offset": [{ "outline-offset": [
|
|
30971
|
-
|
|
31120
|
+
DL,
|
|
30972
31121
|
$,
|
|
30973
31122
|
Q
|
|
30974
31123
|
] }],
|
|
30975
31124
|
"outline-w": [{ outline: [
|
|
30976
31125
|
"",
|
|
30977
|
-
|
|
30978
|
-
|
|
30979
|
-
|
|
31126
|
+
DL,
|
|
31127
|
+
KL,
|
|
31128
|
+
zL
|
|
30980
31129
|
] }],
|
|
30981
31130
|
"outline-color": [{ outline: A() }],
|
|
30982
31131
|
shadow: [{ shadow: [
|
|
30983
31132
|
"",
|
|
30984
31133
|
"none",
|
|
30985
31134
|
u,
|
|
30986
|
-
|
|
30987
|
-
|
|
31135
|
+
ZL,
|
|
31136
|
+
GL
|
|
30988
31137
|
] }],
|
|
30989
31138
|
"shadow-color": [{ shadow: A() }],
|
|
30990
31139
|
"inset-shadow": [{ "inset-shadow": [
|
|
30991
31140
|
"none",
|
|
30992
31141
|
d,
|
|
30993
|
-
|
|
30994
|
-
|
|
31142
|
+
ZL,
|
|
31143
|
+
GL
|
|
30995
31144
|
] }],
|
|
30996
31145
|
"inset-shadow-color": [{ "inset-shadow": A() }],
|
|
30997
31146
|
"ring-w": [{ ring: de() }],
|
|
30998
31147
|
"ring-w-inset": ["ring-inset"],
|
|
30999
31148
|
"ring-color": [{ ring: A() }],
|
|
31000
|
-
"ring-offset-w": [{ "ring-offset": [
|
|
31149
|
+
"ring-offset-w": [{ "ring-offset": [DL, zL] }],
|
|
31001
31150
|
"ring-offset-color": [{ "ring-offset": A() }],
|
|
31002
31151
|
"inset-ring-w": [{ "inset-ring": de() }],
|
|
31003
31152
|
"inset-ring-color": [{ "inset-ring": A() }],
|
|
31004
31153
|
"text-shadow": [{ "text-shadow": [
|
|
31005
31154
|
"none",
|
|
31006
31155
|
f,
|
|
31007
|
-
|
|
31008
|
-
|
|
31156
|
+
ZL,
|
|
31157
|
+
GL
|
|
31009
31158
|
] }],
|
|
31010
31159
|
"text-shadow-color": [{ "text-shadow": A() }],
|
|
31011
31160
|
opacity: [{ opacity: [
|
|
31012
|
-
|
|
31161
|
+
DL,
|
|
31013
31162
|
$,
|
|
31014
31163
|
Q
|
|
31015
31164
|
] }],
|
|
@@ -31033,7 +31182,7 @@ var PI = (e, t) => {
|
|
|
31033
31182
|
"intersect",
|
|
31034
31183
|
"exclude"
|
|
31035
31184
|
] }],
|
|
31036
|
-
"mask-image-linear-pos": [{ "mask-linear": [
|
|
31185
|
+
"mask-image-linear-pos": [{ "mask-linear": [DL] }],
|
|
31037
31186
|
"mask-image-linear-from-pos": [{ "mask-linear-from": me() }],
|
|
31038
31187
|
"mask-image-linear-to-pos": [{ "mask-linear-to": me() }],
|
|
31039
31188
|
"mask-image-linear-from-color": [{ "mask-linear-from": A() }],
|
|
@@ -31073,7 +31222,7 @@ var PI = (e, t) => {
|
|
|
31073
31222
|
farthest: ["side", "corner"]
|
|
31074
31223
|
}] }],
|
|
31075
31224
|
"mask-image-radial-pos": [{ "mask-radial-at": b() }],
|
|
31076
|
-
"mask-image-conic-pos": [{ "mask-conic": [
|
|
31225
|
+
"mask-image-conic-pos": [{ "mask-conic": [DL] }],
|
|
31077
31226
|
"mask-image-conic-from-pos": [{ "mask-conic-from": me() }],
|
|
31078
31227
|
"mask-image-conic-to-pos": [{ "mask-conic-to": me() }],
|
|
31079
31228
|
"mask-image-conic-from-color": [{ "mask-conic-from": A() }],
|
|
@@ -31108,12 +31257,12 @@ var PI = (e, t) => {
|
|
|
31108
31257
|
] }],
|
|
31109
31258
|
blur: [{ blur: he() }],
|
|
31110
31259
|
brightness: [{ brightness: [
|
|
31111
|
-
|
|
31260
|
+
DL,
|
|
31112
31261
|
$,
|
|
31113
31262
|
Q
|
|
31114
31263
|
] }],
|
|
31115
31264
|
contrast: [{ contrast: [
|
|
31116
|
-
|
|
31265
|
+
DL,
|
|
31117
31266
|
$,
|
|
31118
31267
|
Q
|
|
31119
31268
|
] }],
|
|
@@ -31121,35 +31270,35 @@ var PI = (e, t) => {
|
|
|
31121
31270
|
"",
|
|
31122
31271
|
"none",
|
|
31123
31272
|
p,
|
|
31124
|
-
|
|
31125
|
-
|
|
31273
|
+
ZL,
|
|
31274
|
+
GL
|
|
31126
31275
|
] }],
|
|
31127
31276
|
"drop-shadow-color": [{ "drop-shadow": A() }],
|
|
31128
31277
|
grayscale: [{ grayscale: [
|
|
31129
31278
|
"",
|
|
31130
|
-
|
|
31279
|
+
DL,
|
|
31131
31280
|
$,
|
|
31132
31281
|
Q
|
|
31133
31282
|
] }],
|
|
31134
31283
|
"hue-rotate": [{ "hue-rotate": [
|
|
31135
|
-
|
|
31284
|
+
DL,
|
|
31136
31285
|
$,
|
|
31137
31286
|
Q
|
|
31138
31287
|
] }],
|
|
31139
31288
|
invert: [{ invert: [
|
|
31140
31289
|
"",
|
|
31141
|
-
|
|
31290
|
+
DL,
|
|
31142
31291
|
$,
|
|
31143
31292
|
Q
|
|
31144
31293
|
] }],
|
|
31145
31294
|
saturate: [{ saturate: [
|
|
31146
|
-
|
|
31295
|
+
DL,
|
|
31147
31296
|
$,
|
|
31148
31297
|
Q
|
|
31149
31298
|
] }],
|
|
31150
31299
|
sepia: [{ sepia: [
|
|
31151
31300
|
"",
|
|
31152
|
-
|
|
31301
|
+
DL,
|
|
31153
31302
|
$,
|
|
31154
31303
|
Q
|
|
31155
31304
|
] }],
|
|
@@ -31161,45 +31310,45 @@ var PI = (e, t) => {
|
|
|
31161
31310
|
] }],
|
|
31162
31311
|
"backdrop-blur": [{ "backdrop-blur": he() }],
|
|
31163
31312
|
"backdrop-brightness": [{ "backdrop-brightness": [
|
|
31164
|
-
|
|
31313
|
+
DL,
|
|
31165
31314
|
$,
|
|
31166
31315
|
Q
|
|
31167
31316
|
] }],
|
|
31168
31317
|
"backdrop-contrast": [{ "backdrop-contrast": [
|
|
31169
|
-
|
|
31318
|
+
DL,
|
|
31170
31319
|
$,
|
|
31171
31320
|
Q
|
|
31172
31321
|
] }],
|
|
31173
31322
|
"backdrop-grayscale": [{ "backdrop-grayscale": [
|
|
31174
31323
|
"",
|
|
31175
|
-
|
|
31324
|
+
DL,
|
|
31176
31325
|
$,
|
|
31177
31326
|
Q
|
|
31178
31327
|
] }],
|
|
31179
31328
|
"backdrop-hue-rotate": [{ "backdrop-hue-rotate": [
|
|
31180
|
-
|
|
31329
|
+
DL,
|
|
31181
31330
|
$,
|
|
31182
31331
|
Q
|
|
31183
31332
|
] }],
|
|
31184
31333
|
"backdrop-invert": [{ "backdrop-invert": [
|
|
31185
31334
|
"",
|
|
31186
|
-
|
|
31335
|
+
DL,
|
|
31187
31336
|
$,
|
|
31188
31337
|
Q
|
|
31189
31338
|
] }],
|
|
31190
31339
|
"backdrop-opacity": [{ "backdrop-opacity": [
|
|
31191
|
-
|
|
31340
|
+
DL,
|
|
31192
31341
|
$,
|
|
31193
31342
|
Q
|
|
31194
31343
|
] }],
|
|
31195
31344
|
"backdrop-saturate": [{ "backdrop-saturate": [
|
|
31196
|
-
|
|
31345
|
+
DL,
|
|
31197
31346
|
$,
|
|
31198
31347
|
Q
|
|
31199
31348
|
] }],
|
|
31200
31349
|
"backdrop-sepia": [{ "backdrop-sepia": [
|
|
31201
31350
|
"",
|
|
31202
|
-
|
|
31351
|
+
DL,
|
|
31203
31352
|
$,
|
|
31204
31353
|
Q
|
|
31205
31354
|
] }],
|
|
@@ -31222,7 +31371,7 @@ var PI = (e, t) => {
|
|
|
31222
31371
|
] }],
|
|
31223
31372
|
"transition-behavior": [{ transition: ["normal", "discrete"] }],
|
|
31224
31373
|
duration: [{ duration: [
|
|
31225
|
-
|
|
31374
|
+
DL,
|
|
31226
31375
|
"initial",
|
|
31227
31376
|
$,
|
|
31228
31377
|
Q
|
|
@@ -31235,7 +31384,7 @@ var PI = (e, t) => {
|
|
|
31235
31384
|
Q
|
|
31236
31385
|
] }],
|
|
31237
31386
|
delay: [{ delay: [
|
|
31238
|
-
|
|
31387
|
+
DL,
|
|
31239
31388
|
$,
|
|
31240
31389
|
Q
|
|
31241
31390
|
] }],
|
|
@@ -31280,7 +31429,7 @@ var PI = (e, t) => {
|
|
|
31280
31429
|
"translate-z": [{ "translate-z": ye() }],
|
|
31281
31430
|
"translate-none": ["translate-none"],
|
|
31282
31431
|
zoom: [{ zoom: [
|
|
31283
|
-
|
|
31432
|
+
OL,
|
|
31284
31433
|
$,
|
|
31285
31434
|
Q
|
|
31286
31435
|
] }],
|
|
@@ -31424,10 +31573,10 @@ var PI = (e, t) => {
|
|
|
31424
31573
|
] }],
|
|
31425
31574
|
fill: [{ fill: ["none", ...A()] }],
|
|
31426
31575
|
"stroke-w": [{ stroke: [
|
|
31427
|
-
|
|
31428
|
-
|
|
31429
|
-
|
|
31430
|
-
|
|
31576
|
+
DL,
|
|
31577
|
+
KL,
|
|
31578
|
+
zL,
|
|
31579
|
+
BL
|
|
31431
31580
|
] }],
|
|
31432
31581
|
stroke: [{ stroke: ["none", ...A()] }],
|
|
31433
31582
|
"forced-color-adjust": [{ "forced-color-adjust": ["auto", "none"] }]
|
|
@@ -31618,11 +31767,11 @@ var PI = (e, t) => {
|
|
|
31618
31767
|
});
|
|
31619
31768
|
//#endregion
|
|
31620
31769
|
//#region ../core/src/magic-canvas/grid-overlay.tsx
|
|
31621
|
-
function
|
|
31770
|
+
function uR({ resolution: e, inputs: t, config: n, bailReason: r }) {
|
|
31622
31771
|
if (e === null || t === null) return null;
|
|
31623
31772
|
let i = _F[e.templateId];
|
|
31624
31773
|
if (i === void 0) return null;
|
|
31625
|
-
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 } =
|
|
31774
|
+
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 } = eI(i, {
|
|
31626
31775
|
state: e.state,
|
|
31627
31776
|
contentKind: u
|
|
31628
31777
|
}, t, e.sizeClass, e.containerPx, n);
|
|
@@ -31635,7 +31784,7 @@ function oR({ resolution: e, inputs: t, config: n, bailReason: r }) {
|
|
|
31635
31784
|
children: ["engine plan only · legacy: ", r]
|
|
31636
31785
|
}),
|
|
31637
31786
|
d.map((e) => /* @__PURE__ */ I("div", {
|
|
31638
|
-
class:
|
|
31787
|
+
class: lR("absolute rounded-box border border-dashed", o),
|
|
31639
31788
|
style: {
|
|
31640
31789
|
left: `${e.rect.x}px`,
|
|
31641
31790
|
top: `${e.rect.y}px`,
|
|
@@ -31643,7 +31792,7 @@ function oR({ resolution: e, inputs: t, config: n, bailReason: r }) {
|
|
|
31643
31792
|
height: `${e.rect.height}px`
|
|
31644
31793
|
},
|
|
31645
31794
|
children: /* @__PURE__ */ I("span", {
|
|
31646
|
-
class:
|
|
31795
|
+
class: lR("absolute top-1 left-1 flex flex-col rounded px-1.5 py-0.5 font-mono text-[10px] leading-tight", s),
|
|
31647
31796
|
children: [/* @__PURE__ */ I("span", { children: e.region.name }), /* @__PURE__ */ I("span", {
|
|
31648
31797
|
class: "opacity-75",
|
|
31649
31798
|
children: e.region.accepts.join(" · ")
|
|
@@ -31651,7 +31800,7 @@ function oR({ resolution: e, inputs: t, config: n, bailReason: r }) {
|
|
|
31651
31800
|
})
|
|
31652
31801
|
}, e.region.name)),
|
|
31653
31802
|
e.tiles.map((e) => /* @__PURE__ */ I("div", {
|
|
31654
|
-
class:
|
|
31803
|
+
class: lR("absolute border", c),
|
|
31655
31804
|
style: {
|
|
31656
31805
|
left: `${e.rect.x}px`,
|
|
31657
31806
|
top: `${e.rect.y}px`,
|
|
@@ -31659,7 +31808,7 @@ function oR({ resolution: e, inputs: t, config: n, bailReason: r }) {
|
|
|
31659
31808
|
height: `${e.rect.height}px`
|
|
31660
31809
|
},
|
|
31661
31810
|
children: /* @__PURE__ */ I("span", {
|
|
31662
|
-
class:
|
|
31811
|
+
class: lR("absolute right-1 bottom-1 rounded px-1.5 py-0.5 font-mono text-[10px]", l),
|
|
31663
31812
|
children: [
|
|
31664
31813
|
e.kind,
|
|
31665
31814
|
" ",
|
|
@@ -31674,11 +31823,11 @@ function oR({ resolution: e, inputs: t, config: n, bailReason: r }) {
|
|
|
31674
31823
|
}
|
|
31675
31824
|
//#endregion
|
|
31676
31825
|
//#region ../core/src/magic-canvas/grid-readout.tsx
|
|
31677
|
-
function
|
|
31826
|
+
function dR(e) {
|
|
31678
31827
|
return {
|
|
31679
31828
|
version: 1,
|
|
31680
|
-
buildSha:
|
|
31681
|
-
engineVersion:
|
|
31829
|
+
buildSha: uI,
|
|
31830
|
+
engineVersion: uI,
|
|
31682
31831
|
config: hF,
|
|
31683
31832
|
session: {
|
|
31684
31833
|
containerPx: {
|
|
@@ -31686,6 +31835,7 @@ function sR(e) {
|
|
|
31686
31835
|
height: Math.round(e.container.heightPx)
|
|
31687
31836
|
},
|
|
31688
31837
|
slots: {
|
|
31838
|
+
...e.kioskMode === !0 ? { kioskMode: !0 } : {},
|
|
31689
31839
|
replica: e.replica,
|
|
31690
31840
|
selfView: e.selfView,
|
|
31691
31841
|
presentation: e.presentation !== null,
|
|
@@ -31699,7 +31849,7 @@ function sR(e) {
|
|
|
31699
31849
|
}
|
|
31700
31850
|
};
|
|
31701
31851
|
}
|
|
31702
|
-
function
|
|
31852
|
+
function fR({ resolution: e, inputs: t, shadowing: n, bailReason: r, engineError: i = null }) {
|
|
31703
31853
|
let [a, o] = j(!1), s = N(null);
|
|
31704
31854
|
if (M(() => () => {
|
|
31705
31855
|
s.current !== null && clearTimeout(s.current);
|
|
@@ -31737,11 +31887,11 @@ function cR({ resolution: e, inputs: t, shadowing: n, bailReason: r, engineError
|
|
|
31737
31887
|
})]
|
|
31738
31888
|
});
|
|
31739
31889
|
let c = () => {
|
|
31740
|
-
let e = JSON.stringify(
|
|
31890
|
+
let e = JSON.stringify(dR(t), null, 2);
|
|
31741
31891
|
s.current !== null && clearTimeout(s.current), navigator.clipboard?.writeText(e).then(() => {
|
|
31742
31892
|
o(!0), s.current = setTimeout(() => o(!1), 1500);
|
|
31743
31893
|
}, () => o(!1));
|
|
31744
|
-
}, l = e.degradations.evictedCardIds;
|
|
31894
|
+
}, l = e.degradations.evictedCardIds, u = AI(e.sizeClass);
|
|
31745
31895
|
return /* @__PURE__ */ I("div", {
|
|
31746
31896
|
class: "pointer-events-auto max-w-[22rem] rounded-box bg-base-100/95 p-3 font-mono text-[10px] leading-relaxed shadow-lg",
|
|
31747
31897
|
children: [
|
|
@@ -31777,6 +31927,10 @@ function cR({ resolution: e, inputs: t, shadowing: n, bailReason: r, engineError
|
|
|
31777
31927
|
" / ",
|
|
31778
31928
|
e.sizeClass.height
|
|
31779
31929
|
] }),
|
|
31930
|
+
u !== void 0 && /* @__PURE__ */ I(k, { children: [/* @__PURE__ */ I("dt", {
|
|
31931
|
+
class: "opacity-60",
|
|
31932
|
+
children: "composition"
|
|
31933
|
+
}), /* @__PURE__ */ I("dd", { children: u })] }),
|
|
31780
31934
|
/* @__PURE__ */ I("dt", {
|
|
31781
31935
|
class: "opacity-60",
|
|
31782
31936
|
children: "container"
|
|
@@ -31835,10 +31989,10 @@ function cR({ resolution: e, inputs: t, shadowing: n, bailReason: r, engineError
|
|
|
31835
31989
|
}
|
|
31836
31990
|
//#endregion
|
|
31837
31991
|
//#region ../core/src/magic-canvas/grid-host.tsx
|
|
31838
|
-
var
|
|
31839
|
-
effect:
|
|
31992
|
+
var pR = {
|
|
31993
|
+
effect: EI,
|
|
31840
31994
|
animate: !1
|
|
31841
|
-
},
|
|
31995
|
+
}, mR = Xt(pR), hR = {
|
|
31842
31996
|
presence: { phase: "connecting" },
|
|
31843
31997
|
localId: null,
|
|
31844
31998
|
isScreenSharing: !1,
|
|
@@ -31846,16 +32000,17 @@ var lR = {
|
|
|
31846
32000
|
hasPersonaVideo: !1,
|
|
31847
32001
|
hasSelfView: !1
|
|
31848
32002
|
};
|
|
31849
|
-
function
|
|
32003
|
+
function gR(e, t) {
|
|
31850
32004
|
return e === null || t === null ? e === t : e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
31851
32005
|
}
|
|
31852
|
-
function
|
|
32006
|
+
function _R(e, t) {
|
|
31853
32007
|
let n = e.containerPx === null || t.containerPx === null ? e.containerPx === t.containerPx : e.containerPx.width === t.containerPx.width && e.containerPx.height === t.containerPx.height;
|
|
31854
|
-
return e.driving === t.driving && e.replicaCollapsed === t.replicaCollapsed && n &&
|
|
32008
|
+
return e.driving === t.driving && e.replicaCollapsed === t.replicaCollapsed && n && gR(e.replica, t.replica) && gR(e.selfView, t.selfView) && gR(e.content, t.content);
|
|
31855
32009
|
}
|
|
31856
|
-
var
|
|
31857
|
-
function
|
|
31858
|
-
let c =
|
|
32010
|
+
var vR = /* @__PURE__ */ new Map(), yR = /* @__PURE__ */ new Set();
|
|
32011
|
+
function bR({ instances: e, viewport: t, callControlsBandPx: n, callPresence: r, callControlsVisible: i, callControlsRect: a, gridConfigEnabled: o, gridStartEnabled: s }) {
|
|
32012
|
+
let c = mI(o, s) && r !== void 0, l = r ?? hR, u = globalThis.location?.search ?? "", d = SI({
|
|
32013
|
+
kioskMode: P(() => hI(u), [u]),
|
|
31859
32014
|
instances: e,
|
|
31860
32015
|
viewport: t,
|
|
31861
32016
|
presence: l,
|
|
@@ -31863,87 +32018,88 @@ function hR({ instances: e, viewport: t, callControlsBandPx: n, callPresence: r,
|
|
|
31863
32018
|
callControlsVisible: i,
|
|
31864
32019
|
callControlsRect: a,
|
|
31865
32020
|
enabled: c
|
|
31866
|
-
}),
|
|
31867
|
-
|
|
32021
|
+
}), f = c ? yI.value : null, p = f === null ? wI(d.resolution, l, c) : "engine-error";
|
|
32022
|
+
LI({
|
|
31868
32023
|
enabled: c,
|
|
31869
|
-
enabledVia:
|
|
31870
|
-
bail:
|
|
31871
|
-
resolution:
|
|
31872
|
-
engineError:
|
|
32024
|
+
enabledVia: NI(fI, o === !0, s === !0),
|
|
32025
|
+
bail: p,
|
|
32026
|
+
resolution: d.resolution,
|
|
32027
|
+
engineError: f
|
|
31873
32028
|
});
|
|
31874
|
-
let
|
|
31875
|
-
l.presence.phase === "ready" ? l.hasPersonaVideo && (
|
|
31876
|
-
let
|
|
32029
|
+
let m = N(!1);
|
|
32030
|
+
l.presence.phase === "ready" ? l.hasPersonaVideo && (m.current = !0) : m.current = !1;
|
|
32031
|
+
let h = !m.current, g;
|
|
31877
32032
|
try {
|
|
31878
|
-
|
|
32033
|
+
g = DI(d.resolution, p, h);
|
|
31879
32034
|
} catch (e) {
|
|
31880
|
-
|
|
32035
|
+
bI(e), g = EI;
|
|
31881
32036
|
}
|
|
31882
|
-
let
|
|
32037
|
+
let _ = N(EI), v = kI(_.current, g);
|
|
31883
32038
|
M(() => {
|
|
31884
|
-
|
|
31885
|
-
effect:
|
|
31886
|
-
animate:
|
|
32039
|
+
_.current = g, _R(mR.peek().effect, g) || (mR.value = {
|
|
32040
|
+
effect: g,
|
|
32041
|
+
animate: v
|
|
31887
32042
|
});
|
|
31888
32043
|
}), M(() => () => {
|
|
31889
|
-
|
|
32044
|
+
xI(), mR.peek() !== pR && (mR.value = pR);
|
|
31890
32045
|
}, []);
|
|
31891
|
-
let
|
|
31892
|
-
if (
|
|
32046
|
+
let y = d.resolution, b = P(() => {
|
|
32047
|
+
if (p !== null || y === null) return vR;
|
|
31893
32048
|
try {
|
|
31894
32049
|
let e = /* @__PURE__ */ new Map();
|
|
31895
|
-
for (let t of
|
|
32050
|
+
for (let t of y.tiles) t.kind === "card" && e.set(t.id, t.rect);
|
|
31896
32051
|
return e;
|
|
31897
32052
|
} catch (e) {
|
|
31898
|
-
return
|
|
32053
|
+
return bI(e), vR;
|
|
31899
32054
|
}
|
|
31900
|
-
}, [
|
|
32055
|
+
}, [p, y]), x = P(() => p !== null || y === null ? yR : new Set(y.tiles.filter(CI).map((e) => e.id)), [p, y]), S = pI ? /* @__PURE__ */ I("div", {
|
|
31901
32056
|
class: "contents",
|
|
31902
32057
|
"data-grid-debug": !0,
|
|
31903
|
-
children: [/* @__PURE__ */ I(
|
|
31904
|
-
resolution:
|
|
31905
|
-
inputs:
|
|
32058
|
+
children: [/* @__PURE__ */ I(uR, {
|
|
32059
|
+
resolution: d.resolution,
|
|
32060
|
+
inputs: d.inputs,
|
|
31906
32061
|
config: hF,
|
|
31907
|
-
bailReason:
|
|
32062
|
+
bailReason: p
|
|
31908
32063
|
}), /* @__PURE__ */ I("div", {
|
|
31909
32064
|
class: "pointer-events-none absolute bottom-4 left-4 z-50",
|
|
31910
|
-
children: /* @__PURE__ */ I(
|
|
31911
|
-
resolution:
|
|
31912
|
-
inputs:
|
|
31913
|
-
shadowing:
|
|
31914
|
-
bailReason:
|
|
31915
|
-
engineError:
|
|
32065
|
+
children: /* @__PURE__ */ I(fR, {
|
|
32066
|
+
resolution: d.resolution,
|
|
32067
|
+
inputs: d.inputs,
|
|
32068
|
+
shadowing: p !== null,
|
|
32069
|
+
bailReason: p,
|
|
32070
|
+
engineError: f
|
|
31916
32071
|
})
|
|
31917
32072
|
})]
|
|
31918
32073
|
}) : null;
|
|
31919
32074
|
return {
|
|
31920
|
-
cardRects:
|
|
31921
|
-
|
|
31922
|
-
|
|
31923
|
-
|
|
31924
|
-
|
|
32075
|
+
cardRects: b,
|
|
32076
|
+
kioskCardIds: x,
|
|
32077
|
+
sheetBottomPx: TI(y, p),
|
|
32078
|
+
animate: v,
|
|
32079
|
+
recordNaturalHeight: d.recordNaturalHeight,
|
|
32080
|
+
debug: S
|
|
31925
32081
|
};
|
|
31926
32082
|
}
|
|
31927
32083
|
//#endregion
|
|
31928
32084
|
//#region ../core/src/magic-canvas/grid-motion.ts
|
|
31929
|
-
var
|
|
32085
|
+
var xR = [
|
|
31930
32086
|
"left",
|
|
31931
32087
|
"top",
|
|
31932
32088
|
"width",
|
|
31933
32089
|
"height"
|
|
31934
32090
|
].map((e) => `${e} ${jw}`).join(", ");
|
|
31935
|
-
function
|
|
32091
|
+
function SR(e, t) {
|
|
31936
32092
|
return {
|
|
31937
32093
|
left: `${e.x}px`,
|
|
31938
32094
|
top: `${e.y}px`,
|
|
31939
32095
|
width: `${e.width}px`,
|
|
31940
32096
|
height: `${e.height}px`,
|
|
31941
|
-
transition: t && !Vw() ?
|
|
32097
|
+
transition: t && !Vw() ? xR : "none"
|
|
31942
32098
|
};
|
|
31943
32099
|
}
|
|
31944
32100
|
//#endregion
|
|
31945
32101
|
//#region ../core/src/magic-canvas/debug-panel.tsx
|
|
31946
|
-
function
|
|
32102
|
+
function CR({ state: e }) {
|
|
31947
32103
|
return e.enabled ? /* @__PURE__ */ I("details", {
|
|
31948
32104
|
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",
|
|
31949
32105
|
children: [/* @__PURE__ */ I("summary", {
|
|
@@ -31952,27 +32108,27 @@ function vR({ state: e }) {
|
|
|
31952
32108
|
}), /* @__PURE__ */ I("dl", {
|
|
31953
32109
|
class: "mt-2 grid gap-2",
|
|
31954
32110
|
children: [
|
|
31955
|
-
/* @__PURE__ */ I(
|
|
32111
|
+
/* @__PURE__ */ I(wR, {
|
|
31956
32112
|
label: "iframe",
|
|
31957
32113
|
value: e.iframeLifecycleState
|
|
31958
32114
|
}),
|
|
31959
|
-
/* @__PURE__ */ I(
|
|
32115
|
+
/* @__PURE__ */ I(wR, {
|
|
31960
32116
|
label: "post",
|
|
31961
32117
|
value: e.lastInteractionPostResult
|
|
31962
32118
|
}),
|
|
31963
|
-
/* @__PURE__ */ I(
|
|
32119
|
+
/* @__PURE__ */ I(wR, {
|
|
31964
32120
|
label: "context",
|
|
31965
32121
|
value: e.lastModelContextUpdate
|
|
31966
32122
|
}),
|
|
31967
|
-
/* @__PURE__ */ I(
|
|
32123
|
+
/* @__PURE__ */ I(wR, {
|
|
31968
32124
|
label: "error",
|
|
31969
32125
|
value: e.lastError
|
|
31970
32126
|
}),
|
|
31971
|
-
/* @__PURE__ */ I(
|
|
32127
|
+
/* @__PURE__ */ I(TR, {
|
|
31972
32128
|
label: "tool_call",
|
|
31973
32129
|
value: e.lastToolCall
|
|
31974
32130
|
}),
|
|
31975
|
-
/* @__PURE__ */ I(
|
|
32131
|
+
/* @__PURE__ */ I(TR, {
|
|
31976
32132
|
label: "canvas_config",
|
|
31977
32133
|
value: e.parsedCanvasConfig
|
|
31978
32134
|
})
|
|
@@ -31980,7 +32136,7 @@ function vR({ state: e }) {
|
|
|
31980
32136
|
})]
|
|
31981
32137
|
}) : null;
|
|
31982
32138
|
}
|
|
31983
|
-
function
|
|
32139
|
+
function wR({ label: e, value: t }) {
|
|
31984
32140
|
return t ? /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ I("dt", {
|
|
31985
32141
|
class: "font-semibold",
|
|
31986
32142
|
children: e
|
|
@@ -31989,7 +32145,7 @@ function yR({ label: e, value: t }) {
|
|
|
31989
32145
|
children: t
|
|
31990
32146
|
})] }) : null;
|
|
31991
32147
|
}
|
|
31992
|
-
function
|
|
32148
|
+
function TR({ label: e, value: t }) {
|
|
31993
32149
|
return t === void 0 ? null : /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ I("dt", {
|
|
31994
32150
|
class: "font-semibold",
|
|
31995
32151
|
children: e
|
|
@@ -32000,56 +32156,56 @@ function bR({ label: e, value: t }) {
|
|
|
32000
32156
|
}
|
|
32001
32157
|
//#endregion
|
|
32002
32158
|
//#region ../core/src/magic-canvas/magic-canvas.tsx
|
|
32003
|
-
var
|
|
32004
|
-
async function
|
|
32005
|
-
let r = new AbortController(), i = globalThis.setTimeout(() => r.abort(),
|
|
32159
|
+
var ER = 1e3, DR = 5e3, OR = 1200, kR = [2e3, 6e3];
|
|
32160
|
+
async function AR(e, t, n) {
|
|
32161
|
+
let r = new AbortController(), i = globalThis.setTimeout(() => r.abort(), DR);
|
|
32006
32162
|
try {
|
|
32007
32163
|
await Mn(e, t, n, { signal: r.signal });
|
|
32008
32164
|
} finally {
|
|
32009
32165
|
globalThis.clearTimeout(i);
|
|
32010
32166
|
}
|
|
32011
32167
|
}
|
|
32012
|
-
function
|
|
32168
|
+
function jR(e) {
|
|
32013
32169
|
return e instanceof On && e.status >= 400 && e.status < 500 && e.status !== 408 && e.status !== 429;
|
|
32014
32170
|
}
|
|
32015
|
-
function
|
|
32171
|
+
function MR(e, t) {
|
|
32016
32172
|
console.error("Magic Canvas interaction POST failed; this interaction may not have been recorded server-side.", e), t({
|
|
32017
32173
|
lastInteractionPostResult: "error",
|
|
32018
|
-
lastError:
|
|
32174
|
+
lastError: az(e).message
|
|
32019
32175
|
});
|
|
32020
32176
|
}
|
|
32021
|
-
function
|
|
32177
|
+
function NR(e, t, n, r) {
|
|
32022
32178
|
(async () => {
|
|
32023
32179
|
let i;
|
|
32024
|
-
for (let a of
|
|
32180
|
+
for (let a of kR) {
|
|
32025
32181
|
await new Promise((e) => setTimeout(e, a));
|
|
32026
32182
|
try {
|
|
32027
|
-
await
|
|
32183
|
+
await AR(e, t, n), r({
|
|
32028
32184
|
lastInteractionPostResult: "recovered",
|
|
32029
32185
|
lastError: void 0
|
|
32030
32186
|
});
|
|
32031
32187
|
return;
|
|
32032
32188
|
} catch (e) {
|
|
32033
|
-
if (i = e,
|
|
32189
|
+
if (i = e, jR(e)) break;
|
|
32034
32190
|
}
|
|
32035
32191
|
}
|
|
32036
|
-
|
|
32192
|
+
MR(i, r);
|
|
32037
32193
|
})();
|
|
32038
32194
|
}
|
|
32039
|
-
var
|
|
32040
|
-
function
|
|
32041
|
-
return e.correct_answer === void 0 ?
|
|
32195
|
+
var PR = 2e3;
|
|
32196
|
+
function FR(e) {
|
|
32197
|
+
return e.correct_answer === void 0 ? OR : PR;
|
|
32042
32198
|
}
|
|
32043
|
-
var
|
|
32199
|
+
var IR = 48, LR = "allow-scripts", RR = {
|
|
32044
32200
|
"canvas.scheduling_embed": "allow-scripts allow-same-origin allow-popups allow-forms",
|
|
32045
32201
|
"canvas.text": "allow-scripts allow-popups allow-popups-to-escape-sandbox"
|
|
32046
32202
|
};
|
|
32047
|
-
function
|
|
32203
|
+
function zR(e, t) {
|
|
32048
32204
|
if (!t.contentWindow || e.source !== t.contentWindow) return !1;
|
|
32049
32205
|
let n = e.data;
|
|
32050
32206
|
return !!n && typeof n == "object" && n?.jsonrpc === "2.0";
|
|
32051
32207
|
}
|
|
32052
|
-
var
|
|
32208
|
+
var BR = class {
|
|
32053
32209
|
onmessage;
|
|
32054
32210
|
onerror;
|
|
32055
32211
|
onclose;
|
|
@@ -32060,7 +32216,7 @@ var FR = class {
|
|
|
32060
32216
|
}
|
|
32061
32217
|
start() {
|
|
32062
32218
|
let e = (e) => {
|
|
32063
|
-
|
|
32219
|
+
zR(e, this.#e) && this.onmessage?.(e.data);
|
|
32064
32220
|
};
|
|
32065
32221
|
return this.#t = e, globalThis.addEventListener("message", e), Promise.resolve();
|
|
32066
32222
|
}
|
|
@@ -32071,15 +32227,15 @@ var FR = class {
|
|
|
32071
32227
|
return this.#t && globalThis.removeEventListener("message", this.#t), this.#t = void 0, this.onclose?.(), Promise.resolve();
|
|
32072
32228
|
}
|
|
32073
32229
|
};
|
|
32074
|
-
function
|
|
32075
|
-
for (let t of CC) if (e.some((e) =>
|
|
32230
|
+
function VR(e) {
|
|
32231
|
+
for (let t of CC) if (e.some((e) => tz(e) === t)) return t;
|
|
32076
32232
|
return null;
|
|
32077
32233
|
}
|
|
32078
|
-
function
|
|
32079
|
-
let { client: c } = Qv(), { dataTheme: l, cssVars: u } = pF(), d = kh(), f = c_(), [p, m] = j([]), [h, g] =
|
|
32234
|
+
function HR({ onLayoutEffectChange: e, onRenderedSlotChange: t, debugEnabled: n = nz(), callPresence: r, callControlsVisible: i, callControlsRect: a, gridConfigEnabled: o, gridStartEnabled: s } = {}) {
|
|
32235
|
+
let { client: c } = Qv(), { dataTheme: l, cssVars: u } = pF(), d = kh(), f = c_(), [p, m] = j([]), [h, g] = ZR(), [_, v] = j(() => ({
|
|
32080
32236
|
enabled: n,
|
|
32081
32237
|
iframeLifecycleState: "idle"
|
|
32082
|
-
})), y =
|
|
32238
|
+
})), y = bR({
|
|
32083
32239
|
instances: p,
|
|
32084
32240
|
viewport: g,
|
|
32085
32241
|
callControlsBandPx: 72,
|
|
@@ -32133,7 +32289,7 @@ function LR({ onLayoutEffectChange: e, onRenderedSlotChange: t, debugEnabled: n
|
|
|
32133
32289
|
} catch (e) {
|
|
32134
32290
|
b({
|
|
32135
32291
|
iframeLifecycleState: "error",
|
|
32136
|
-
lastError:
|
|
32292
|
+
lastError: az(e).message
|
|
32137
32293
|
});
|
|
32138
32294
|
}
|
|
32139
32295
|
}, [f, b]) });
|
|
@@ -32161,7 +32317,7 @@ function LR({ onLayoutEffectChange: e, onRenderedSlotChange: t, debugEnabled: n
|
|
|
32161
32317
|
w.safe_area?.width,
|
|
32162
32318
|
w.safe_area?.height
|
|
32163
32319
|
]);
|
|
32164
|
-
let ee =
|
|
32320
|
+
let ee = VR(C.map(({ layout: e }) => e));
|
|
32165
32321
|
M(() => {
|
|
32166
32322
|
t?.(ee);
|
|
32167
32323
|
}, [t, ee]);
|
|
@@ -32180,18 +32336,19 @@ function LR({ onLayoutEffectChange: e, onRenderedSlotChange: t, debugEnabled: n
|
|
|
32180
32336
|
backgroundImage: "linear-gradient(to bottom, rgb(0 0 0 / 0.45) calc(100% - 64px), rgb(0 0 0 / 0))"
|
|
32181
32337
|
}
|
|
32182
32338
|
}),
|
|
32183
|
-
E && C.map(({ instance: e, layout: t, gridRect: n }) => /* @__PURE__ */ I(
|
|
32184
|
-
slot:
|
|
32339
|
+
E && C.map(({ instance: e, layout: t, gridRect: n }) => /* @__PURE__ */ I(WR, {
|
|
32340
|
+
slot: tz(t),
|
|
32185
32341
|
safeAreaTop: w.safe_area?.y,
|
|
32186
32342
|
frameWidth: g.width,
|
|
32187
32343
|
...n ? {
|
|
32188
32344
|
gridRect: n,
|
|
32189
32345
|
gridAnimate: y.animate
|
|
32190
32346
|
} : {},
|
|
32191
|
-
children: (r) => /* @__PURE__ */ I(
|
|
32347
|
+
children: (r) => /* @__PURE__ */ I(GR, {
|
|
32192
32348
|
availableHeight: r,
|
|
32193
32349
|
client: c,
|
|
32194
32350
|
gridDriven: n !== null,
|
|
32351
|
+
gridKioskCard: n !== null && y.kioskCardIds.has(e.id),
|
|
32195
32352
|
hostTheme: S,
|
|
32196
32353
|
instance: e,
|
|
32197
32354
|
layout: t,
|
|
@@ -32215,19 +32372,19 @@ function LR({ onLayoutEffectChange: e, onRenderedSlotChange: t, debugEnabled: n
|
|
|
32215
32372
|
}, e.id)),
|
|
32216
32373
|
E && /* @__PURE__ */ I("div", {
|
|
32217
32374
|
class: "absolute right-4 bottom-24 @max-mobile:right-3 @max-mobile:bottom-20",
|
|
32218
|
-
children: /* @__PURE__ */ I(
|
|
32375
|
+
children: /* @__PURE__ */ I(CR, { state: _ })
|
|
32219
32376
|
}),
|
|
32220
32377
|
y.debug
|
|
32221
32378
|
]
|
|
32222
32379
|
});
|
|
32223
32380
|
}
|
|
32224
|
-
var
|
|
32225
|
-
function
|
|
32226
|
-
let [o, s] =
|
|
32381
|
+
var UR = 16;
|
|
32382
|
+
function WR({ slot: e, safeAreaTop: t, frameWidth: n, gridRect: r, gridAnimate: i = !1, children: a }) {
|
|
32383
|
+
let [o, s] = QR(), c = a(r ? r.height : e === "full" ? void 0 : s);
|
|
32227
32384
|
if (r) return /* @__PURE__ */ I("div", {
|
|
32228
32385
|
ref: o,
|
|
32229
32386
|
class: "pointer-events-auto absolute",
|
|
32230
|
-
style:
|
|
32387
|
+
style: SR(r, i),
|
|
32231
32388
|
"data-canvas-slot": e,
|
|
32232
32389
|
"data-grid-driven": "true",
|
|
32233
32390
|
children: /* @__PURE__ */ I("div", {
|
|
@@ -32236,10 +32393,10 @@ function zR({ slot: e, safeAreaTop: t, frameWidth: n, gridRect: r, gridAnimate:
|
|
|
32236
32393
|
})
|
|
32237
32394
|
});
|
|
32238
32395
|
if (e === "safe-area-left" || e === "safe-area-right") {
|
|
32239
|
-
let r = t == null ? "1rem" : `${t * 100}%`, i = n != null && n > 0 ? Math.max(0, n -
|
|
32396
|
+
let r = t == null ? "1rem" : `${t * 100}%`, i = n != null && n > 0 ? Math.max(0, n - UR * 2) : void 0;
|
|
32240
32397
|
return /* @__PURE__ */ I("div", {
|
|
32241
32398
|
ref: o,
|
|
32242
|
-
class:
|
|
32399
|
+
class: ez(e),
|
|
32243
32400
|
style: {
|
|
32244
32401
|
top: r,
|
|
32245
32402
|
bottom: "72px",
|
|
@@ -32254,7 +32411,7 @@ function zR({ slot: e, safeAreaTop: t, frameWidth: n, gridRect: r, gridAnimate:
|
|
|
32254
32411
|
}
|
|
32255
32412
|
return /* @__PURE__ */ I("div", {
|
|
32256
32413
|
ref: o,
|
|
32257
|
-
class:
|
|
32414
|
+
class: ez(e),
|
|
32258
32415
|
"data-canvas-slot": e,
|
|
32259
32416
|
children: /* @__PURE__ */ I("div", {
|
|
32260
32417
|
class: "contents",
|
|
@@ -32262,46 +32419,50 @@ function zR({ slot: e, safeAreaTop: t, frameWidth: n, gridRect: r, gridAnimate:
|
|
|
32262
32419
|
})
|
|
32263
32420
|
});
|
|
32264
32421
|
}
|
|
32265
|
-
function
|
|
32266
|
-
let
|
|
32422
|
+
function GR({ 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 }) {
|
|
32423
|
+
let p = N(null), m = N(null), h = N(e), g = N(r), _ = N(320), v = N(i), y = N(a), b = N(o), x = N(-1), S = N(l), C = N(u), w = N(d), T = N(f), [ee, E] = j(720);
|
|
32267
32424
|
M(() => {
|
|
32268
|
-
|
|
32269
|
-
}, [
|
|
32270
|
-
|
|
32271
|
-
}, [
|
|
32272
|
-
|
|
32273
|
-
let t =
|
|
32274
|
-
|
|
32275
|
-
}, [
|
|
32276
|
-
|
|
32277
|
-
|
|
32278
|
-
|
|
32425
|
+
y.current = a;
|
|
32426
|
+
}, [a]), M(() => {
|
|
32427
|
+
_.current = ee, m.current?.setHostContext(YR(y.current, v.current, b.current, h.current, ee, g.current));
|
|
32428
|
+
}, [ee]), M(() => {
|
|
32429
|
+
h.current = e, g.current = r;
|
|
32430
|
+
let t = JR(i, p.current);
|
|
32431
|
+
v.current = t, m.current?.setHostContext(YR(y.current, t, b.current, e, _.current, r));
|
|
32432
|
+
}, [
|
|
32433
|
+
e,
|
|
32434
|
+
i,
|
|
32435
|
+
r
|
|
32436
|
+
]), M(() => {
|
|
32437
|
+
b.current = o, m.current?.setHostContext(YR(y.current, v.current, o, e, _.current, g.current));
|
|
32438
|
+
}, [e, o]), M(() => {
|
|
32439
|
+
S.current = l, C.current = u, w.current = d, T.current = f;
|
|
32279
32440
|
}, [
|
|
32280
|
-
c,
|
|
32281
32441
|
l,
|
|
32282
32442
|
u,
|
|
32283
|
-
d
|
|
32443
|
+
d,
|
|
32444
|
+
f
|
|
32284
32445
|
]), M(() => {
|
|
32285
|
-
let e =
|
|
32446
|
+
let e = p.current;
|
|
32286
32447
|
if (!e) return;
|
|
32287
|
-
let n = !1, r = null,
|
|
32288
|
-
n ||
|
|
32448
|
+
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) => {
|
|
32449
|
+
n || c({
|
|
32289
32450
|
iframeLifecycleState: "error",
|
|
32290
|
-
lastError:
|
|
32451
|
+
lastError: az(e).message
|
|
32291
32452
|
});
|
|
32292
32453
|
}, d = () => {
|
|
32293
|
-
if (n || !
|
|
32294
|
-
let e =
|
|
32295
|
-
|
|
32454
|
+
if (n || !i) return;
|
|
32455
|
+
let e = y.current, t = BC(e, i);
|
|
32456
|
+
i = null, T.current({
|
|
32296
32457
|
message_type: "conversation",
|
|
32297
32458
|
event_type: "conversation.append_llm_context",
|
|
32298
32459
|
conversation_id: e.conversation_id,
|
|
32299
32460
|
properties: { context: t }
|
|
32300
|
-
}),
|
|
32461
|
+
}), c({
|
|
32301
32462
|
lastModelContextUpdate: e.canvas_config.component,
|
|
32302
32463
|
lastError: void 0
|
|
32303
32464
|
});
|
|
32304
|
-
},
|
|
32465
|
+
}, f = () => {
|
|
32305
32466
|
if (r) return;
|
|
32306
32467
|
if (e.src !== l) {
|
|
32307
32468
|
e.src;
|
|
@@ -32321,20 +32482,20 @@ function BR({ availableHeight: e, client: t, gridDriven: n = !1, hostTheme: r, i
|
|
|
32321
32482
|
text: {},
|
|
32322
32483
|
structuredContent: {}
|
|
32323
32484
|
}
|
|
32324
|
-
}, { hostContext:
|
|
32325
|
-
r = f,
|
|
32326
|
-
n || (
|
|
32485
|
+
}, { hostContext: YR(a, JR(v.current, e), b.current, h.current, _.current, g.current) });
|
|
32486
|
+
r = f, m.current = f, f.oninitialized = () => {
|
|
32487
|
+
n || (c({ iframeLifecycleState: "ready" }), x.current = y.current.revision, f.sendToolInput({ arguments: y.current.arguments }).catch(u));
|
|
32327
32488
|
}, f.onsizechange = ({ height: e }) => {
|
|
32328
32489
|
if (!n && typeof e == "number" && Number.isFinite(e)) {
|
|
32329
|
-
let t = Math.min(Math.max(e,
|
|
32330
|
-
|
|
32490
|
+
let t = Math.min(Math.max(e, IR), 720);
|
|
32491
|
+
E(t), w.current(y.current.id, t);
|
|
32331
32492
|
}
|
|
32332
32493
|
}, f.onmessage = async (e) => {
|
|
32333
32494
|
let r = IC(e), i = zC(e);
|
|
32334
32495
|
if (!r) {
|
|
32335
32496
|
if (i) {
|
|
32336
32497
|
let e = "Magic Canvas message included text without interaction metadata; no interaction row was recorded.";
|
|
32337
|
-
return
|
|
32498
|
+
return c({
|
|
32338
32499
|
lastInteractionPostResult: "error",
|
|
32339
32500
|
lastError: e
|
|
32340
32501
|
}), {
|
|
@@ -32345,7 +32506,7 @@ function BR({ availableHeight: e, client: t, gridDriven: n = !1, hostTheme: r, i
|
|
|
32345
32506
|
}
|
|
32346
32507
|
return {};
|
|
32347
32508
|
}
|
|
32348
|
-
let a =
|
|
32509
|
+
let a = y.current, o = (() => {
|
|
32349
32510
|
try {
|
|
32350
32511
|
let e = LC(a, r);
|
|
32351
32512
|
return {
|
|
@@ -32357,8 +32518,8 @@ function BR({ availableHeight: e, client: t, gridDriven: n = !1, hostTheme: r, i
|
|
|
32357
32518
|
}
|
|
32358
32519
|
})();
|
|
32359
32520
|
if ("error" in o) {
|
|
32360
|
-
let e =
|
|
32361
|
-
return
|
|
32521
|
+
let e = az(o.error).message;
|
|
32522
|
+
return c({
|
|
32362
32523
|
lastInteractionPostResult: "error",
|
|
32363
32524
|
lastError: e
|
|
32364
32525
|
}), {
|
|
@@ -32369,91 +32530,92 @@ function BR({ availableHeight: e, client: t, gridDriven: n = !1, hostTheme: r, i
|
|
|
32369
32530
|
}
|
|
32370
32531
|
let { interaction: l, request: u } = o, d = !0;
|
|
32371
32532
|
try {
|
|
32372
|
-
await
|
|
32533
|
+
await AR(t, l.conversation_id, u.body);
|
|
32373
32534
|
} catch (e) {
|
|
32374
|
-
d = !1,
|
|
32535
|
+
d = !1, jR(e) ? MR(e, c) : (console.warn("Magic Canvas interaction POST failed; continuing without it and retrying in the background.", e), c({
|
|
32375
32536
|
lastInteractionPostResult: "failed_open",
|
|
32376
|
-
lastError:
|
|
32377
|
-
}),
|
|
32537
|
+
lastError: az(e).message
|
|
32538
|
+
}), NR(t, l.conversation_id, u.body, c));
|
|
32378
32539
|
}
|
|
32379
32540
|
if (n) return {};
|
|
32380
32541
|
if (i) try {
|
|
32381
|
-
|
|
32542
|
+
T.current({
|
|
32382
32543
|
message_type: "conversation",
|
|
32383
32544
|
event_type: "conversation.respond",
|
|
32384
32545
|
conversation_id: a.conversation_id,
|
|
32385
32546
|
properties: { text: i }
|
|
32386
32547
|
});
|
|
32387
32548
|
} catch (e) {
|
|
32388
|
-
console.error("Magic Canvas respond send failed.", e),
|
|
32549
|
+
console.error("Magic Canvas respond send failed.", e), c({ lastError: az(e).message });
|
|
32389
32550
|
}
|
|
32390
|
-
return d &&
|
|
32551
|
+
return d && c({
|
|
32391
32552
|
lastInteractionPostResult: "success",
|
|
32392
32553
|
lastError: void 0
|
|
32393
|
-
}), RC(l) && (l.type === "submit" ? (
|
|
32394
|
-
|
|
32395
|
-
},
|
|
32396
|
-
}, f.onupdatemodelcontext = async (e) => (
|
|
32554
|
+
}), RC(l) && (l.type === "submit" ? (s && clearTimeout(s), s = setTimeout(() => {
|
|
32555
|
+
s = null, n || S.current();
|
|
32556
|
+
}, FR(a.arguments))) : S.current()), {};
|
|
32557
|
+
}, f.onupdatemodelcontext = async (e) => (i = e, o ||= setTimeout(() => {
|
|
32397
32558
|
o = null, d();
|
|
32398
|
-
},
|
|
32559
|
+
}, ER), {}), f.onrequestdisplaymode = async ({ mode: e }) => {
|
|
32399
32560
|
let t = e === "fullscreen" ? "fullscreen" : "inline";
|
|
32400
|
-
return
|
|
32401
|
-
...
|
|
32561
|
+
return C.current(t), b.current = {
|
|
32562
|
+
...b.current,
|
|
32402
32563
|
display_mode: t,
|
|
32403
|
-
viable_slot: t === "fullscreen" ? "full" :
|
|
32404
|
-
}, f.setHostContext(
|
|
32405
|
-
}, f.connect(new
|
|
32564
|
+
viable_slot: t === "fullscreen" ? "full" : b.current.viable_slot
|
|
32565
|
+
}, f.setHostContext(YR(y.current, v.current, b.current, h.current, _.current, g.current)), { mode: t };
|
|
32566
|
+
}, f.connect(new BR(e)).then(() => void 0).catch(u);
|
|
32406
32567
|
};
|
|
32407
|
-
|
|
32568
|
+
c({
|
|
32408
32569
|
iframeLifecycleState: "mounting",
|
|
32409
32570
|
lastInteractionPostResult: void 0
|
|
32410
|
-
}),
|
|
32571
|
+
}), a.canvas_config.sandbox_url, e.src = a.canvas_config.sandbox_url;
|
|
32411
32572
|
let ee = () => {
|
|
32412
|
-
|
|
32573
|
+
f();
|
|
32413
32574
|
};
|
|
32414
|
-
return e.addEventListener("load", ee),
|
|
32415
|
-
o &&= (clearTimeout(o), null),
|
|
32575
|
+
return e.addEventListener("load", ee), f(), () => {
|
|
32576
|
+
o &&= (clearTimeout(o), null), s &&= (clearTimeout(s), null), d(), n = !0, e.removeEventListener("load", ee), m.current = null, c({ iframeLifecycleState: "closed" }), r && xC(r);
|
|
32416
32577
|
};
|
|
32417
32578
|
}, [
|
|
32418
32579
|
t,
|
|
32419
|
-
|
|
32420
|
-
|
|
32421
|
-
|
|
32580
|
+
a.id,
|
|
32581
|
+
a.canvas_config.sandbox_url,
|
|
32582
|
+
c
|
|
32422
32583
|
]), M(() => {
|
|
32423
|
-
|
|
32424
|
-
|
|
32584
|
+
a.revision !== 0 && (a.revision <= x.current || (x.current = a.revision, m.current?.sendToolInput({ arguments: a.arguments }).catch((e) => {
|
|
32585
|
+
c({
|
|
32425
32586
|
iframeLifecycleState: "error",
|
|
32426
|
-
lastError:
|
|
32587
|
+
lastError: az(e).message
|
|
32427
32588
|
});
|
|
32428
32589
|
})));
|
|
32429
32590
|
}, [
|
|
32430
|
-
|
|
32431
|
-
|
|
32432
|
-
|
|
32591
|
+
a.arguments,
|
|
32592
|
+
a.revision,
|
|
32593
|
+
c
|
|
32433
32594
|
]);
|
|
32434
|
-
let
|
|
32435
|
-
"pointer-events-auto w-full overflow-hidden rounded-box border-[length:var(--border)] border-base-300 bg-base-100
|
|
32436
|
-
|
|
32437
|
-
|
|
32438
|
-
|
|
32439
|
-
|
|
32440
|
-
|
|
32441
|
-
|
|
32595
|
+
let D = o.viable_slot === "full" || o.display_mode === "fullscreen", te = D ? null : XR(ee, e, r), ne = te?.placeholderStyle, re = te?.cardStyle, O = D ? { height: "100%" } : te?.iframeStyle ?? { height: `${ee}px` }, ie = [
|
|
32596
|
+
"pointer-events-auto w-full overflow-hidden rounded-box border-[length:var(--border)] border-base-300 bg-base-100 transition-[opacity,transform]",
|
|
32597
|
+
r ? "" : "shadow-xl",
|
|
32598
|
+
D ? "fixed inset-4 z-10 max-w-none" : n ? "max-w-none" : "max-w-md",
|
|
32599
|
+
s ? "scale-[0.98] opacity-40" : ""
|
|
32600
|
+
].filter(Boolean).join(" "), ae = RR[a.canvas_config.component] ?? LR, k = /* @__PURE__ */ I("div", {
|
|
32601
|
+
class: ie,
|
|
32602
|
+
style: re,
|
|
32603
|
+
"data-canvas-card": o.viable_slot,
|
|
32442
32604
|
children: /* @__PURE__ */ I("iframe", {
|
|
32443
|
-
ref:
|
|
32444
|
-
title: `${
|
|
32445
|
-
class:
|
|
32446
|
-
sandbox:
|
|
32447
|
-
style:
|
|
32605
|
+
ref: p,
|
|
32606
|
+
title: `${a.canvas_config.component} ${a.canvas_config.component_version}`,
|
|
32607
|
+
class: D ? "block h-full w-full border-0 bg-transparent" : "block border-0 bg-transparent",
|
|
32608
|
+
sandbox: ae,
|
|
32609
|
+
style: O
|
|
32448
32610
|
})
|
|
32449
32611
|
});
|
|
32450
|
-
return
|
|
32612
|
+
return D ? k : /* @__PURE__ */ I("div", {
|
|
32451
32613
|
class: "block w-full",
|
|
32452
|
-
style:
|
|
32453
|
-
children:
|
|
32614
|
+
style: ne,
|
|
32615
|
+
children: k
|
|
32454
32616
|
});
|
|
32455
32617
|
}
|
|
32456
|
-
var
|
|
32618
|
+
var KR = [
|
|
32457
32619
|
"--color-base-100",
|
|
32458
32620
|
"--color-base-200",
|
|
32459
32621
|
"--color-base-300",
|
|
@@ -32461,17 +32623,17 @@ var VR = [
|
|
|
32461
32623
|
"--color-primary",
|
|
32462
32624
|
"--color-error"
|
|
32463
32625
|
];
|
|
32464
|
-
function
|
|
32626
|
+
function qR(e) {
|
|
32465
32627
|
if (!e || typeof getComputedStyle != "function") return {};
|
|
32466
32628
|
let t = getComputedStyle(e), n = {};
|
|
32467
|
-
for (let e of
|
|
32629
|
+
for (let e of KR) {
|
|
32468
32630
|
let r = t.getPropertyValue(e).trim();
|
|
32469
32631
|
r && (n[e] = r);
|
|
32470
32632
|
}
|
|
32471
32633
|
return n;
|
|
32472
32634
|
}
|
|
32473
|
-
function
|
|
32474
|
-
let n =
|
|
32635
|
+
function JR(e, t) {
|
|
32636
|
+
let n = qR(t);
|
|
32475
32637
|
return Object.keys(n).length === 0 ? e : {
|
|
32476
32638
|
...e,
|
|
32477
32639
|
cssVars: {
|
|
@@ -32480,54 +32642,63 @@ function UR(e, t) {
|
|
|
32480
32642
|
}
|
|
32481
32643
|
};
|
|
32482
32644
|
}
|
|
32483
|
-
function
|
|
32484
|
-
let
|
|
32645
|
+
function YR(e, t, n, r, i, a = !1) {
|
|
32646
|
+
let o = vw(t, n), s = n.viable_slot === "full" || n.display_mode === "fullscreen", c = s ? void 0 : rz(r), l = s ? 1 : XR(i ?? 0, r, a)?.displayScale ?? 1;
|
|
32485
32647
|
return {
|
|
32486
32648
|
...e.canvas_config.host_context,
|
|
32487
|
-
...
|
|
32649
|
+
...o,
|
|
32488
32650
|
containerDimensions: {
|
|
32489
|
-
|
|
32490
|
-
...
|
|
32491
|
-
displayScale:
|
|
32651
|
+
...iz(o.containerDimensions) ? o.containerDimensions : {},
|
|
32652
|
+
...c === void 0 ? {} : { maxHeight: c },
|
|
32653
|
+
displayScale: l
|
|
32492
32654
|
}
|
|
32493
32655
|
};
|
|
32494
32656
|
}
|
|
32495
|
-
function
|
|
32657
|
+
function XR(e, t, n = !1) {
|
|
32496
32658
|
if (t === void 0 || !Number.isFinite(t) || t <= 0) return null;
|
|
32497
|
-
let
|
|
32498
|
-
if (n
|
|
32659
|
+
let r = Math.min(e, 720);
|
|
32660
|
+
if (n) return {
|
|
32661
|
+
displayScale: 1,
|
|
32662
|
+
placeholderStyle: { height: `${t}px` },
|
|
32663
|
+
cardStyle: { height: "100%" },
|
|
32664
|
+
iframeStyle: {
|
|
32665
|
+
width: "100%",
|
|
32666
|
+
height: "100%"
|
|
32667
|
+
}
|
|
32668
|
+
};
|
|
32669
|
+
if (r <= t) return {
|
|
32499
32670
|
displayScale: 1,
|
|
32500
32671
|
placeholderStyle: { maxHeight: `${t}px` },
|
|
32501
32672
|
cardStyle: void 0,
|
|
32502
32673
|
iframeStyle: {
|
|
32503
32674
|
width: "100%",
|
|
32504
|
-
height: `${
|
|
32675
|
+
height: `${r}px`
|
|
32505
32676
|
}
|
|
32506
32677
|
};
|
|
32507
|
-
let
|
|
32678
|
+
let i = t / r;
|
|
32508
32679
|
return {
|
|
32509
|
-
displayScale:
|
|
32680
|
+
displayScale: i,
|
|
32510
32681
|
placeholderStyle: {
|
|
32511
|
-
height: `${
|
|
32682
|
+
height: `${r * i}px`,
|
|
32512
32683
|
maxHeight: `${t}px`,
|
|
32513
32684
|
overflow: "hidden"
|
|
32514
32685
|
},
|
|
32515
32686
|
cardStyle: {
|
|
32516
|
-
height: `${
|
|
32517
|
-
transform: `scale(${
|
|
32687
|
+
height: `${r}px`,
|
|
32688
|
+
transform: `scale(${i})`,
|
|
32518
32689
|
transformOrigin: "top center"
|
|
32519
32690
|
},
|
|
32520
32691
|
iframeStyle: {
|
|
32521
32692
|
width: "100%",
|
|
32522
|
-
height: `${
|
|
32693
|
+
height: `${r}px`
|
|
32523
32694
|
}
|
|
32524
32695
|
};
|
|
32525
32696
|
}
|
|
32526
|
-
function
|
|
32527
|
-
let e = N(null), [t, n] = j(() =>
|
|
32697
|
+
function ZR() {
|
|
32698
|
+
let e = N(null), [t, n] = j(() => $R(null));
|
|
32528
32699
|
return M(() => {
|
|
32529
32700
|
let t = () => n((t) => {
|
|
32530
|
-
let n =
|
|
32701
|
+
let n = $R(e.current);
|
|
32531
32702
|
return t.width === n.width && t.height === n.height && t.visualViewportHeight === n.visualViewportHeight ? t : n;
|
|
32532
32703
|
});
|
|
32533
32704
|
t(), globalThis.addEventListener("resize", t), globalThis.visualViewport?.addEventListener("resize", t);
|
|
@@ -32537,7 +32708,7 @@ function KR() {
|
|
|
32537
32708
|
};
|
|
32538
32709
|
}, []), [e, t];
|
|
32539
32710
|
}
|
|
32540
|
-
function
|
|
32711
|
+
function QR() {
|
|
32541
32712
|
let e = N(null), [t, n] = j();
|
|
32542
32713
|
return M(() => {
|
|
32543
32714
|
let t = e.current;
|
|
@@ -32553,7 +32724,7 @@ function qR() {
|
|
|
32553
32724
|
return a.observe(t), () => a.disconnect();
|
|
32554
32725
|
}, []), [e, t];
|
|
32555
32726
|
}
|
|
32556
|
-
function
|
|
32727
|
+
function $R(e) {
|
|
32557
32728
|
let t = globalThis.visualViewport?.height, n = e?.getBoundingClientRect();
|
|
32558
32729
|
if (n && n.width > 0 && n.height > 0) {
|
|
32559
32730
|
let e = t === void 0 ? void 0 : Math.max(0, (globalThis.innerHeight || 0) - t);
|
|
@@ -32569,7 +32740,7 @@ function JR(e) {
|
|
|
32569
32740
|
visualViewportHeight: t
|
|
32570
32741
|
};
|
|
32571
32742
|
}
|
|
32572
|
-
function
|
|
32743
|
+
function ez(e) {
|
|
32573
32744
|
let t = "absolute flex gap-2";
|
|
32574
32745
|
switch (e) {
|
|
32575
32746
|
case "safe-area-left": return `${t} left-4 w-[28rem] flex-col overflow-y-auto [scrollbar-gutter:stable]`;
|
|
@@ -32578,24 +32749,24 @@ function YR(e) {
|
|
|
32578
32749
|
case "full": return `${t} inset-4 flex-col items-stretch justify-stretch`;
|
|
32579
32750
|
}
|
|
32580
32751
|
}
|
|
32581
|
-
function
|
|
32752
|
+
function tz(e) {
|
|
32582
32753
|
return e.display_mode === "fullscreen" && e.preferred_slot !== "full" ? e.preferred_slot : e.viable_slot;
|
|
32583
32754
|
}
|
|
32584
|
-
function
|
|
32755
|
+
function nz() {
|
|
32585
32756
|
return !1;
|
|
32586
32757
|
}
|
|
32587
|
-
function
|
|
32758
|
+
function rz(e) {
|
|
32588
32759
|
return e === void 0 || !Number.isFinite(e) || e <= 0 ? 720 : Math.min(Math.floor(e), 720);
|
|
32589
32760
|
}
|
|
32590
|
-
function
|
|
32761
|
+
function iz(e) {
|
|
32591
32762
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
32592
32763
|
}
|
|
32593
|
-
function
|
|
32764
|
+
function az(e) {
|
|
32594
32765
|
return e instanceof Error ? e : Error(String(e));
|
|
32595
32766
|
}
|
|
32596
32767
|
//#endregion
|
|
32597
32768
|
//#region ../core/src/magic-canvas/grid-error-boundary.tsx
|
|
32598
|
-
var
|
|
32769
|
+
var oz = class extends A {
|
|
32599
32770
|
state = { errored: !1 };
|
|
32600
32771
|
componentDidCatch(e) {
|
|
32601
32772
|
this.props.onError(e), this.setState({ errored: !0 });
|
|
@@ -32603,8 +32774,8 @@ var tz = class extends A {
|
|
|
32603
32774
|
render() {
|
|
32604
32775
|
return this.state.errored ? null : this.props.children;
|
|
32605
32776
|
}
|
|
32606
|
-
},
|
|
32607
|
-
function
|
|
32777
|
+
}, sz = 1e4;
|
|
32778
|
+
function cz(e, t = sz) {
|
|
32608
32779
|
let [n, r] = j(!1), i = N(!1);
|
|
32609
32780
|
return M(() => {
|
|
32610
32781
|
if (!e) {
|
|
@@ -32619,7 +32790,7 @@ function rz(e, t = nz) {
|
|
|
32619
32790
|
}
|
|
32620
32791
|
//#endregion
|
|
32621
32792
|
//#region ../core/src/hooks/use-call-presence.ts
|
|
32622
|
-
function
|
|
32793
|
+
function lz(e) {
|
|
32623
32794
|
let t = pg(), n = N_(t ?? ""), r = !j_(t ?? "").isOff, i = sC(e), a = i.phase === "ready" ? i.replicaId : "", o = j_(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;
|
|
32624
32795
|
return P(() => ({
|
|
32625
32796
|
presence: i,
|
|
@@ -32641,7 +32812,7 @@ function iz(e) {
|
|
|
32641
32812
|
}
|
|
32642
32813
|
//#endregion
|
|
32643
32814
|
//#region ../core/src/hooks/use-call-controls-visible.ts
|
|
32644
|
-
function
|
|
32815
|
+
function uz(e, t, n) {
|
|
32645
32816
|
let [r, i] = j(!0);
|
|
32646
32817
|
return M(() => {
|
|
32647
32818
|
if (!t) return;
|
|
@@ -32671,7 +32842,7 @@ function az(e, t, n) {
|
|
|
32671
32842
|
}
|
|
32672
32843
|
//#endregion
|
|
32673
32844
|
//#region ../core/src/hooks/use-call-controls-rect.ts
|
|
32674
|
-
function
|
|
32845
|
+
function dz(e, t, n, r, i) {
|
|
32675
32846
|
let [a, o] = j(void 0);
|
|
32676
32847
|
return M(() => {
|
|
32677
32848
|
if (!r) return;
|
|
@@ -32705,8 +32876,8 @@ function oz(e, t, n, r, i) {
|
|
|
32705
32876
|
}
|
|
32706
32877
|
//#endregion
|
|
32707
32878
|
//#region ../core/src/hooks/use-replica-join-timeout.ts
|
|
32708
|
-
var
|
|
32709
|
-
function
|
|
32879
|
+
var fz = 1e4;
|
|
32880
|
+
function pz({ onTimeout: e, timeoutMs: t = fz, active: n = !0 }) {
|
|
32710
32881
|
let r = oC().length > 0, [i, a] = j(!1), o = N(e);
|
|
32711
32882
|
return M(() => {
|
|
32712
32883
|
o.current = e;
|
|
@@ -32730,39 +32901,39 @@ function cz({ onTimeout: e, timeoutMs: t = sz, active: n = !0 }) {
|
|
|
32730
32901
|
}
|
|
32731
32902
|
//#endregion
|
|
32732
32903
|
//#region ../core/src/hooks/use-system-shutdown.ts
|
|
32733
|
-
function
|
|
32904
|
+
function mz(e) {
|
|
32734
32905
|
if (typeof e != "object" || !e) return !1;
|
|
32735
32906
|
let t = e;
|
|
32736
32907
|
return t.message_type === "system" && t.event_type === "system.shutdown";
|
|
32737
32908
|
}
|
|
32738
|
-
function
|
|
32909
|
+
function hz({ onShutdown: e }) {
|
|
32739
32910
|
let t = N(e);
|
|
32740
32911
|
M(() => {
|
|
32741
32912
|
t.current = e;
|
|
32742
32913
|
}, [e]), b_({ onAppMessage: F((e) => {
|
|
32743
|
-
|
|
32914
|
+
mz(e?.data) && t.current();
|
|
32744
32915
|
}, []) });
|
|
32745
32916
|
}
|
|
32746
32917
|
//#endregion
|
|
32747
32918
|
//#region ../core/src/hooks/use-picture-in-picture.ts
|
|
32748
|
-
var
|
|
32749
|
-
function
|
|
32919
|
+
var gz = Tn("PiP"), _z = 360, vz = 280;
|
|
32920
|
+
function yz() {
|
|
32750
32921
|
return globalThis.window !== void 0 && "documentPictureInPicture" in globalThis.window;
|
|
32751
32922
|
}
|
|
32752
|
-
function
|
|
32753
|
-
let { enabled: t, active: n } = e, [r, i] = j(null), a =
|
|
32923
|
+
function bz(e) {
|
|
32924
|
+
let { enabled: t, active: n } = e, [r, i] = j(null), a = yz(), o = st(by), s = F(() => {
|
|
32754
32925
|
i((e) => (e && !e.closed && e.close(), null));
|
|
32755
32926
|
}, []), c = F(async () => {
|
|
32756
32927
|
if (a && !(!t || !n) && !(r && !r.closed)) try {
|
|
32757
32928
|
let e = await globalThis.window.documentPictureInPicture.requestWindow({
|
|
32758
|
-
width:
|
|
32759
|
-
height:
|
|
32929
|
+
width: _z,
|
|
32930
|
+
height: vz
|
|
32760
32931
|
}), t = Ue.replace(/:host(?=[\s,{])/g, ":host, :root"), n = e.document.createElement("style");
|
|
32761
32932
|
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", () => {
|
|
32762
32933
|
i((t) => t === e ? null : t);
|
|
32763
32934
|
}, { once: !0 }), i(e);
|
|
32764
32935
|
} catch (e) {
|
|
32765
|
-
|
|
32936
|
+
gz.warn("Failed to open PiP window", e);
|
|
32766
32937
|
}
|
|
32767
32938
|
}, [
|
|
32768
32939
|
a,
|
|
@@ -32783,13 +32954,13 @@ function hz(e) {
|
|
|
32783
32954
|
try {
|
|
32784
32955
|
e.metadata = new MediaMetadata({ title: "Tavus conversation" }), e.playbackState = "playing", l = !0;
|
|
32785
32956
|
} catch (e) {
|
|
32786
|
-
|
|
32957
|
+
gz.warn("mediaSession metadata setup failed", e);
|
|
32787
32958
|
}
|
|
32788
32959
|
let t = (t, n) => {
|
|
32789
32960
|
try {
|
|
32790
32961
|
e.setActionHandler(t, n), r.push(t);
|
|
32791
32962
|
} catch (e) {
|
|
32792
|
-
|
|
32963
|
+
gz.info(`mediaSession.${t} not supported`, e);
|
|
32793
32964
|
}
|
|
32794
32965
|
};
|
|
32795
32966
|
t("enterpictureinpicture", () => {
|
|
@@ -32843,11 +33014,11 @@ function hz(e) {
|
|
|
32843
33014
|
}
|
|
32844
33015
|
//#endregion
|
|
32845
33016
|
//#region ../core/src/utils/device-preferences.ts
|
|
32846
|
-
var
|
|
33017
|
+
var xz = Xt(null), Sz = {
|
|
32847
33018
|
active: !1,
|
|
32848
33019
|
video_shift_x: 0,
|
|
32849
33020
|
backdrop: { type: "snapshot_mirror" }
|
|
32850
|
-
},
|
|
33021
|
+
}, Cz = Da(({ id: e, showAudioWave: t = !0 }) => {
|
|
32851
33022
|
let n = N_(e).isOff;
|
|
32852
33023
|
return /* @__PURE__ */ I("div", {
|
|
32853
33024
|
class: `relative aspect-square w-32 @max-mobile:w-24 rounded-box overflow-hidden bg-black/30 z-10 ${n ? "hidden" : ""}`,
|
|
@@ -32862,20 +33033,20 @@ var gz = Xt(null), _z = {
|
|
|
32862
33033
|
children: /* @__PURE__ */ I($S, { id: e })
|
|
32863
33034
|
})]
|
|
32864
33035
|
});
|
|
32865
|
-
}),
|
|
33036
|
+
}), wz = Da(() => {
|
|
32866
33037
|
let e = pg(), { isScreenSharing: t } = fS(), n = oC()[0];
|
|
32867
|
-
return /* @__PURE__ */ I(k, { children: [t && n && /* @__PURE__ */ I(
|
|
33038
|
+
return /* @__PURE__ */ I(k, { children: [t && n && /* @__PURE__ */ I(Cz, { id: n }), e && /* @__PURE__ */ I(Cz, {
|
|
32868
33039
|
id: e,
|
|
32869
33040
|
showAudioWave: !1
|
|
32870
33041
|
})] });
|
|
32871
|
-
}),
|
|
33042
|
+
}), Tz = Da(() => /* @__PURE__ */ I("div", {
|
|
32872
33043
|
class: "absolute bottom-4 @max-mobile:bottom-20 left-4 flex flex-col items-end gap-2 z-20",
|
|
32873
|
-
children: /* @__PURE__ */ I(
|
|
32874
|
-
})),
|
|
33044
|
+
children: /* @__PURE__ */ I(wz, {})
|
|
33045
|
+
})), Ez = Da(({ personaSessionId: e, localId: t, isScreenSharing: n, avatarOff: r, effect: i, animate: a }) => /* @__PURE__ */ I(k, { children: [
|
|
32875
33046
|
/* @__PURE__ */ I("div", { class: "absolute inset-0 bg-base-200" }),
|
|
32876
33047
|
i.content && /* @__PURE__ */ I("div", {
|
|
32877
33048
|
class: "absolute overflow-hidden rounded-box bg-black",
|
|
32878
|
-
style:
|
|
33049
|
+
style: SR(i.content, a),
|
|
32879
33050
|
children: /* @__PURE__ */ I(Dg, {
|
|
32880
33051
|
sessionId: n ? t ?? "" : e,
|
|
32881
33052
|
type: "screenVideo",
|
|
@@ -32884,8 +33055,8 @@ var gz = Xt(null), _z = {
|
|
|
32884
33055
|
})
|
|
32885
33056
|
}),
|
|
32886
33057
|
i.replica && /* @__PURE__ */ I("div", {
|
|
32887
|
-
class:
|
|
32888
|
-
style:
|
|
33058
|
+
class: lR("absolute overflow-hidden", i.replicaCollapsed && "rounded-box"),
|
|
33059
|
+
style: SR(i.replica, a),
|
|
32889
33060
|
children: /* @__PURE__ */ I(dC, {
|
|
32890
33061
|
personaSessionId: e,
|
|
32891
33062
|
localSessionId: t,
|
|
@@ -32893,11 +33064,11 @@ var gz = Xt(null), _z = {
|
|
|
32893
33064
|
avatarOff: r
|
|
32894
33065
|
})
|
|
32895
33066
|
})
|
|
32896
|
-
] })),
|
|
32897
|
-
let { effect: e, animate: t } =
|
|
33067
|
+
] })), Dz = Da(() => {
|
|
33068
|
+
let { effect: e, animate: t } = mR.value, n = pg();
|
|
32898
33069
|
return n === null || e.selfView === null ? null : /* @__PURE__ */ I("div", {
|
|
32899
33070
|
class: "absolute z-20 overflow-hidden rounded-box bg-black/30",
|
|
32900
|
-
style:
|
|
33071
|
+
style: SR(e.selfView, t),
|
|
32901
33072
|
children: /* @__PURE__ */ I(Dg, {
|
|
32902
33073
|
automirror: !0,
|
|
32903
33074
|
sessionId: n,
|
|
@@ -32906,23 +33077,23 @@ var gz = Xt(null), _z = {
|
|
|
32906
33077
|
className: "h-full w-full object-cover"
|
|
32907
33078
|
})
|
|
32908
33079
|
});
|
|
32909
|
-
}),
|
|
32910
|
-
let t =
|
|
32911
|
-
return t === "hidden" ? null : t === "engine" ? /* @__PURE__ */ I(
|
|
32912
|
-
onError:
|
|
32913
|
-
children: /* @__PURE__ */ I(
|
|
32914
|
-
}) : e === "safe-area-bottom" ? null : /* @__PURE__ */ I(
|
|
32915
|
-
}),
|
|
33080
|
+
}), Oz = Da(({ canvasRenderedSlot: e }) => {
|
|
33081
|
+
let t = OI(mR.value.effect);
|
|
33082
|
+
return t === "hidden" ? null : t === "engine" ? /* @__PURE__ */ I(oz, {
|
|
33083
|
+
onError: bI,
|
|
33084
|
+
children: /* @__PURE__ */ I(Dz, {})
|
|
33085
|
+
}) : e === "safe-area-bottom" ? null : /* @__PURE__ */ I(Tz, {});
|
|
33086
|
+
}), kz = Da(() => {
|
|
32916
33087
|
let e = oC()[0];
|
|
32917
33088
|
return e ? /* @__PURE__ */ I(Tg, { sessionId: e }) : null;
|
|
32918
|
-
}),
|
|
32919
|
-
let { presence: i, localId: a, isScreenSharing: o, isPersonaPresenting: s } = t, c =
|
|
33089
|
+
}), Az = Da((e) => /* @__PURE__ */ I(k, { children: [/* @__PURE__ */ I(kz, {}), /* @__PURE__ */ I(jz, { ...e })] })), jz = Da(({ isAudioOnly: e, presence: t, canvasLayoutEffect: n, canvasRenderedSlot: r }) => {
|
|
33090
|
+
let { presence: i, localId: a, isScreenSharing: o, isPersonaPresenting: s } = t, c = mR.value, l = n.active && !o && (!e || s);
|
|
32920
33091
|
return i.phase === "left" ? /* @__PURE__ */ I(ZS, {}) : i.phase === "connecting" ? /* @__PURE__ */ I(XS, {}) : e && !s ? /* @__PURE__ */ I("div", {
|
|
32921
33092
|
class: "absolute inset-0 flex items-center justify-center",
|
|
32922
33093
|
children: /* @__PURE__ */ I(rC, { sessionId: i.replicaId })
|
|
32923
|
-
}) : c.effect.driving ? /* @__PURE__ */ I(
|
|
32924
|
-
onError:
|
|
32925
|
-
children: /* @__PURE__ */ I(
|
|
33094
|
+
}) : c.effect.driving ? /* @__PURE__ */ I(oz, {
|
|
33095
|
+
onError: bI,
|
|
33096
|
+
children: /* @__PURE__ */ I(Ez, {
|
|
32926
33097
|
personaSessionId: i.replicaId,
|
|
32927
33098
|
localId: a,
|
|
32928
33099
|
isScreenSharing: o,
|
|
@@ -32936,7 +33107,7 @@ var gz = Xt(null), _z = {
|
|
|
32936
33107
|
avatarOff: i.videoState.isOff,
|
|
32937
33108
|
canvasLayoutEffect: n,
|
|
32938
33109
|
smartSidecarActive: l
|
|
32939
|
-
}) : /* @__PURE__ */ I(
|
|
33110
|
+
}) : /* @__PURE__ */ I(Mz, {
|
|
32940
33111
|
personaSessionId: i.replicaId,
|
|
32941
33112
|
localId: a,
|
|
32942
33113
|
isScreenSharing: o,
|
|
@@ -32945,11 +33116,11 @@ var gz = Xt(null), _z = {
|
|
|
32945
33116
|
canvasLayoutEffect: n,
|
|
32946
33117
|
canvasRenderedSlot: r
|
|
32947
33118
|
});
|
|
32948
|
-
}),
|
|
33119
|
+
}), Mz = Da(({ personaSessionId: e, localId: t, isScreenSharing: n, avatarOff: r, smartSidecarActive: i, canvasLayoutEffect: a, canvasRenderedSlot: o }) => /* @__PURE__ */ I(Yw, {
|
|
32949
33120
|
canvasLayoutEffect: a,
|
|
32950
33121
|
smartSidecarActive: i,
|
|
32951
33122
|
isScreenSharing: n,
|
|
32952
|
-
captureSnapshot:
|
|
33123
|
+
captureSnapshot: Iz,
|
|
32953
33124
|
personaMode: "auto",
|
|
32954
33125
|
renderedSlot: o,
|
|
32955
33126
|
fill: (i) => /* @__PURE__ */ I(dC, {
|
|
@@ -32959,7 +33130,7 @@ var gz = Xt(null), _z = {
|
|
|
32959
33130
|
avatarOff: r,
|
|
32960
33131
|
videoRef: i
|
|
32961
33132
|
})
|
|
32962
|
-
})),
|
|
33133
|
+
})), Nz = Da(({ items: e }) => {
|
|
32963
33134
|
let [t, n] = j(!1), r = N(null);
|
|
32964
33135
|
return M(() => {
|
|
32965
33136
|
if (!t) return;
|
|
@@ -32989,8 +33160,8 @@ var gz = Xt(null), _z = {
|
|
|
32989
33160
|
children: e
|
|
32990
33161
|
})]
|
|
32991
33162
|
});
|
|
32992
|
-
}),
|
|
32993
|
-
let t = c_(), { config: n } = Qv(), { session: r, end: i } = LS(), a = pg(), o = N(null), s = st(lb)?.frameRef ?? o, [c, l] = j(!1), u = Hx() === "full-screen", [d, f] = j(!1), [p, m] = j(
|
|
33163
|
+
}), Pz = Da(({ items: e }) => e.length <= 1 ? /* @__PURE__ */ I(k, { children: e }) : /* @__PURE__ */ I(Nz, { items: e })), Fz = Da(({ onLeave: e }) => {
|
|
33164
|
+
let t = c_(), { config: n } = Qv(), { session: r, end: i } = LS(), a = pg(), o = N(null), s = st(lb)?.frameRef ?? o, [c, l] = j(!1), u = Hx() === "full-screen", [d, f] = j(!1), [p, m] = j(Sz), [h, g] = j(null), _ = n.value.customization.conversation, v = cz(_.show_fullscreen_hint && h !== null && !c && !u), y = N(null), b = N(null), x = r.value?.conversationUrl, S = r.value?.magicGrid === !0, C = mI(_.magic_grid, S), w = uz(y, C, x), T = dz(y, b, 72, C, x), ee = _.modality === "audio", E = lz(ee), D = _.modality === "chat", te = _.modality === "video", ne = _.enable_chat, re = _.enable_closed_captions, O = _.enable_picture_in_picture, { pipWindow: ie } = bz({
|
|
32994
33165
|
enabled: O && !D,
|
|
32995
33166
|
active: t === "joined-meeting"
|
|
32996
33167
|
});
|
|
@@ -32999,13 +33170,13 @@ var gz = Xt(null), _z = {
|
|
|
32999
33170
|
}, [i]);
|
|
33000
33171
|
let { camera: ae, requestCamera: k } = fy(), { isCamMuted: A } = uS(), oe = ae.isGranted && !A;
|
|
33001
33172
|
M(() => {
|
|
33002
|
-
te && t === "joined-meeting" && (
|
|
33173
|
+
te && t === "joined-meeting" && (xz.value = oe);
|
|
33003
33174
|
}, [
|
|
33004
33175
|
te,
|
|
33005
33176
|
t,
|
|
33006
33177
|
oe
|
|
33007
33178
|
]);
|
|
33008
|
-
let se = N(te && !a &&
|
|
33179
|
+
let se = N(te && !a && xz.value === !0);
|
|
33009
33180
|
M(() => {
|
|
33010
33181
|
t === "joined-meeting" && se.current && (se.current = !1, k());
|
|
33011
33182
|
}, [t, k]), M(() => {
|
|
@@ -33029,10 +33200,10 @@ var gz = Xt(null), _z = {
|
|
|
33029
33200
|
let le = F(() => {
|
|
33030
33201
|
i();
|
|
33031
33202
|
}, [i]);
|
|
33032
|
-
if (
|
|
33203
|
+
if (pz({
|
|
33033
33204
|
active: !D && t === "joined-meeting",
|
|
33034
33205
|
onTimeout: le
|
|
33035
|
-
}),
|
|
33206
|
+
}), hz({ onShutdown: le }), !x) return null;
|
|
33036
33207
|
if (D) return /* @__PURE__ */ I(WS, {
|
|
33037
33208
|
defaultOpen: !0,
|
|
33038
33209
|
children: /* @__PURE__ */ I("div", {
|
|
@@ -33063,14 +33234,14 @@ var gz = Xt(null), _z = {
|
|
|
33063
33234
|
/* @__PURE__ */ I("div", {
|
|
33064
33235
|
class: "relative w-full h-full z-[5]",
|
|
33065
33236
|
children: [
|
|
33066
|
-
/* @__PURE__ */ I(
|
|
33237
|
+
/* @__PURE__ */ I(Az, {
|
|
33067
33238
|
isAudioOnly: ee,
|
|
33068
33239
|
presence: E,
|
|
33069
33240
|
canvasLayoutEffect: p,
|
|
33070
33241
|
canvasRenderedSlot: h
|
|
33071
33242
|
}),
|
|
33072
|
-
!ee && /* @__PURE__ */ I(
|
|
33073
|
-
/* @__PURE__ */ I(
|
|
33243
|
+
!ee && /* @__PURE__ */ I(Oz, { canvasRenderedSlot: h }),
|
|
33244
|
+
/* @__PURE__ */ I(HR, {
|
|
33074
33245
|
debugEnabled: d,
|
|
33075
33246
|
callPresence: E,
|
|
33076
33247
|
callControlsVisible: w,
|
|
@@ -33107,7 +33278,7 @@ var gz = Xt(null), _z = {
|
|
|
33107
33278
|
/* @__PURE__ */ I(jS, { level: !0 }),
|
|
33108
33279
|
!ee && /* @__PURE__ */ I(NS, {}),
|
|
33109
33280
|
re && /* @__PURE__ */ I(VS, {}),
|
|
33110
|
-
/* @__PURE__ */ I(
|
|
33281
|
+
/* @__PURE__ */ I(Pz, { items: ue }),
|
|
33111
33282
|
/* @__PURE__ */ I("button", {
|
|
33112
33283
|
type: "button",
|
|
33113
33284
|
class: "btn btn-control btn-error",
|
|
@@ -33124,7 +33295,7 @@ var gz = Xt(null), _z = {
|
|
|
33124
33295
|
]
|
|
33125
33296
|
}), ie && Wa(/* @__PURE__ */ I(lC, { onLeave: le }), ie.document.body)] }) }) });
|
|
33126
33297
|
});
|
|
33127
|
-
function
|
|
33298
|
+
function Iz(e) {
|
|
33128
33299
|
if (!e || e.readyState < 2 || !e.videoWidth || !e.videoHeight) return null;
|
|
33129
33300
|
let t = document.createElement("canvas"), n = Math.round(640 * (e.videoHeight / e.videoWidth));
|
|
33130
33301
|
t.width = 640, t.height = n;
|
|
@@ -33139,7 +33310,7 @@ function jz(e) {
|
|
|
33139
33310
|
}
|
|
33140
33311
|
//#endregion
|
|
33141
33312
|
//#region ../core/src/components/hair-check/index.tsx
|
|
33142
|
-
function
|
|
33313
|
+
function Lz(e, t, n) {
|
|
33143
33314
|
switch (t) {
|
|
33144
33315
|
case "granted": return n ? e?.cameraOptional ?? "Camera is optional — turn it on anytime." : e?.ready ?? "You're all set — join whenever you're ready.";
|
|
33145
33316
|
case "blocked": return e?.denied ?? "Microphone is blocked. Click the mic to see how to allow it.";
|
|
@@ -33150,7 +33321,7 @@ function Mz(e, t, n) {
|
|
|
33150
33321
|
default: return e?.loading ?? "Getting your microphone ready...";
|
|
33151
33322
|
}
|
|
33152
33323
|
}
|
|
33153
|
-
var
|
|
33324
|
+
var Rz = Da(({ text: e, isJoining: t = !1, onJoin: n, onCancel: r }) => {
|
|
33154
33325
|
let i = kh(), { config: a } = Qv(), { cameraOnStart: o } = st(At), { localSessionId: s, isCamMuted: c } = uS(), { mic: l, camera: u, requestMic: d, requestCamera: f } = fy(), p = a.value.customization.conversation.modality === "video", m = Cx(a.value), h = Sx(a.value);
|
|
33155
33326
|
M(() => {
|
|
33156
33327
|
d();
|
|
@@ -33166,7 +33337,7 @@ var Nz = Da(({ text: e, isJoining: t = !1, onJoin: n, onCancel: r }) => {
|
|
|
33166
33337
|
u.isBlocked,
|
|
33167
33338
|
f
|
|
33168
33339
|
]);
|
|
33169
|
-
let v = p && g && !u.isGranted, y =
|
|
33340
|
+
let v = p && g && !u.isGranted, y = Lz(e, l.status, v);
|
|
33170
33341
|
return /* @__PURE__ */ I(yS, { children: /* @__PURE__ */ I("div", {
|
|
33171
33342
|
class: "absolute inset-0 motion-safe:animate-[tavusFadeUp_280ms_ease-out]",
|
|
33172
33343
|
children: [u.isGranted && !c ? /* @__PURE__ */ I("div", {
|
|
@@ -33217,8 +33388,8 @@ var Nz = Da(({ text: e, isJoining: t = !1, onJoin: n, onCancel: r }) => {
|
|
|
33217
33388
|
})]
|
|
33218
33389
|
})]
|
|
33219
33390
|
}) });
|
|
33220
|
-
}),
|
|
33221
|
-
function
|
|
33391
|
+
}), zz = "Password required", Bz = "Enter the password to start this conversation.", Vz = "Password", Hz = "Continue";
|
|
33392
|
+
function Uz({ onSubmit: e, text: t, isSubmitting: n = !1, errorMessage: r }) {
|
|
33222
33393
|
let [i, a] = j(""), o = lt();
|
|
33223
33394
|
return /* @__PURE__ */ I("div", {
|
|
33224
33395
|
class: "absolute inset-0 z-30 flex items-center justify-center bg-black/50 backdrop-blur-sm p-4",
|
|
@@ -33238,18 +33409,18 @@ function Rz({ onSubmit: e, text: t, isSubmitting: n = !1, errorMessage: r }) {
|
|
|
33238
33409
|
/* @__PURE__ */ I("h3", {
|
|
33239
33410
|
id: `${o}-title`,
|
|
33240
33411
|
class: "card-title text-base-content",
|
|
33241
|
-
children: t?.title ??
|
|
33412
|
+
children: t?.title ?? zz
|
|
33242
33413
|
}),
|
|
33243
33414
|
/* @__PURE__ */ I("p", {
|
|
33244
33415
|
class: "text-sm text-base-content/70",
|
|
33245
|
-
children: t?.description ??
|
|
33416
|
+
children: t?.description ?? Bz
|
|
33246
33417
|
}),
|
|
33247
33418
|
/* @__PURE__ */ I("input", {
|
|
33248
33419
|
id: o,
|
|
33249
33420
|
type: "password",
|
|
33250
33421
|
autocomplete: "current-password",
|
|
33251
33422
|
class: "input input-bordered w-full",
|
|
33252
|
-
placeholder: t?.placeholder ??
|
|
33423
|
+
placeholder: t?.placeholder ?? Vz,
|
|
33253
33424
|
value: i,
|
|
33254
33425
|
disabled: n,
|
|
33255
33426
|
onInput: (e) => a(e.target.value),
|
|
@@ -33265,7 +33436,7 @@ function Rz({ onSubmit: e, text: t, isSubmitting: n = !1, errorMessage: r }) {
|
|
|
33265
33436
|
type: "submit",
|
|
33266
33437
|
disabled: !i.trim(),
|
|
33267
33438
|
loading: n,
|
|
33268
|
-
children: t?.submit ??
|
|
33439
|
+
children: t?.submit ?? Hz
|
|
33269
33440
|
})
|
|
33270
33441
|
]
|
|
33271
33442
|
})
|
|
@@ -33274,7 +33445,7 @@ function Rz({ onSubmit: e, text: t, isSubmitting: n = !1, errorMessage: r }) {
|
|
|
33274
33445
|
}
|
|
33275
33446
|
//#endregion
|
|
33276
33447
|
//#region ../core/src/components/welcome/index.tsx
|
|
33277
|
-
function
|
|
33448
|
+
function Wz({ text: e, onStart: t, isStarting: n, permissionRequest: r }) {
|
|
33278
33449
|
let { config: i, deploymentId: a } = Qv(), o = Hx() === "full-screen", s = st(Ov), c = Cx(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 = P(() => p && rv(a, u), [
|
|
33279
33450
|
p,
|
|
33280
33451
|
a,
|
|
@@ -33283,7 +33454,7 @@ function zz({ text: e, onStart: t, isStarting: n, permissionRequest: r }) {
|
|
|
33283
33454
|
return /* @__PURE__ */ I(tS, {
|
|
33284
33455
|
title: c.title,
|
|
33285
33456
|
description: c.description,
|
|
33286
|
-
overlay: v && s ? /* @__PURE__ */ I(
|
|
33457
|
+
overlay: v && s ? /* @__PURE__ */ I(Uz, { onSubmit: s.setPassword }) : null,
|
|
33287
33458
|
children: [/* @__PURE__ */ I("div", {
|
|
33288
33459
|
class: "relative",
|
|
33289
33460
|
children: [r && /* @__PURE__ */ I(Wx, {
|
|
@@ -33321,28 +33492,28 @@ function zz({ text: e, onStart: t, isStarting: n, permissionRequest: r }) {
|
|
|
33321
33492
|
}
|
|
33322
33493
|
//#endregion
|
|
33323
33494
|
//#region ../core/src/hooks/use-haircheck-text.ts
|
|
33324
|
-
function
|
|
33495
|
+
function Gz(...e) {
|
|
33325
33496
|
for (let t of e) {
|
|
33326
33497
|
let e = t?.trim();
|
|
33327
33498
|
if (e) return e;
|
|
33328
33499
|
}
|
|
33329
33500
|
}
|
|
33330
|
-
function
|
|
33501
|
+
function Kz() {
|
|
33331
33502
|
let { config: e } = Qv(), { haircheck: t } = e.value.customization;
|
|
33332
33503
|
return P(() => ({
|
|
33333
|
-
prompt:
|
|
33334
|
-
ready:
|
|
33335
|
-
denied:
|
|
33336
|
-
join:
|
|
33337
|
-
cancel:
|
|
33504
|
+
prompt: Gz(t.permission_request_description, t.permission_request_title),
|
|
33505
|
+
ready: Gz(t.permission_granted_description, t.permission_granted_title),
|
|
33506
|
+
denied: Gz(t.permission_denied_description, t.permission_denied_title),
|
|
33507
|
+
join: Gz(t.join_button),
|
|
33508
|
+
cancel: Gz(t.cancel_btn)
|
|
33338
33509
|
}), [t]);
|
|
33339
33510
|
}
|
|
33340
33511
|
//#endregion
|
|
33341
33512
|
//#region ../core/src/shells/flow-state-body.tsx
|
|
33342
|
-
function
|
|
33343
|
-
let r =
|
|
33513
|
+
function qz({ flow: e, welcomeText: t, onUnavailableCancel: n }) {
|
|
33514
|
+
let r = Kz();
|
|
33344
33515
|
switch (e.state) {
|
|
33345
|
-
case "idle": return /* @__PURE__ */ I(
|
|
33516
|
+
case "idle": return /* @__PURE__ */ I(Wz, {
|
|
33346
33517
|
text: t,
|
|
33347
33518
|
onStart: () => {
|
|
33348
33519
|
e.start();
|
|
@@ -33350,7 +33521,7 @@ function Hz({ flow: e, welcomeText: t, onUnavailableCancel: n }) {
|
|
|
33350
33521
|
isStarting: e.isStarting,
|
|
33351
33522
|
permissionRequest: e.permissionRequest
|
|
33352
33523
|
});
|
|
33353
|
-
case "haircheck": return /* @__PURE__ */ I(
|
|
33524
|
+
case "haircheck": return /* @__PURE__ */ I(Rz, {
|
|
33354
33525
|
text: r,
|
|
33355
33526
|
onJoin: () => {
|
|
33356
33527
|
e.join();
|
|
@@ -33358,7 +33529,7 @@ function Hz({ flow: e, welcomeText: t, onUnavailableCancel: n }) {
|
|
|
33358
33529
|
onCancel: () => e.cancel(),
|
|
33359
33530
|
isJoining: e.isStarting
|
|
33360
33531
|
});
|
|
33361
|
-
case "call": return /* @__PURE__ */ I(
|
|
33532
|
+
case "call": return /* @__PURE__ */ I(Fz, { onLeave: () => e.leave() });
|
|
33362
33533
|
case "ended": return /* @__PURE__ */ I(lS, {
|
|
33363
33534
|
isStarting: e.isStarting,
|
|
33364
33535
|
permissionRequest: e.permissionRequest,
|
|
@@ -33383,7 +33554,7 @@ function Hz({ flow: e, welcomeText: t, onUnavailableCancel: n }) {
|
|
|
33383
33554
|
}
|
|
33384
33555
|
//#endregion
|
|
33385
33556
|
//#region ../core/src/shells/embed/embed-shell.tsx
|
|
33386
|
-
function
|
|
33557
|
+
function Jz() {
|
|
33387
33558
|
let { config: e, configError: t } = Qv(), n = Vx(), r = zx(), i = P(() => ({ fallback_button: n.start_button }), [n.start_button]), a = e.value.is_available, o = e.value.unavailable_reason;
|
|
33388
33559
|
return /* @__PURE__ */ I(ub, { children: t.value ? /* @__PURE__ */ I(Rx, {
|
|
33389
33560
|
cause: "error",
|
|
@@ -33393,18 +33564,18 @@ function Uz() {
|
|
|
33393
33564
|
cause: o ?? "daily_limit",
|
|
33394
33565
|
canRetry: !1,
|
|
33395
33566
|
onRetry: () => {}
|
|
33396
|
-
}) : /* @__PURE__ */ I(
|
|
33567
|
+
}) : /* @__PURE__ */ I(qz, {
|
|
33397
33568
|
flow: r,
|
|
33398
33569
|
welcomeText: i
|
|
33399
33570
|
}) });
|
|
33400
33571
|
}
|
|
33401
33572
|
//#endregion
|
|
33402
33573
|
//#region ../core/src/embed/tavus-embed.tsx
|
|
33403
|
-
var
|
|
33404
|
-
function
|
|
33574
|
+
var Yz = ":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}";
|
|
33575
|
+
function Xz(e) {
|
|
33405
33576
|
return /* @__PURE__ */ I(k, { children: [
|
|
33406
33577
|
/* @__PURE__ */ I("style", { dangerouslySetInnerHTML: { __html: Ue } }),
|
|
33407
|
-
/* @__PURE__ */ I("style", { dangerouslySetInnerHTML: { __html:
|
|
33578
|
+
/* @__PURE__ */ I("style", { dangerouslySetInnerHTML: { __html: Yz } }),
|
|
33408
33579
|
/* @__PURE__ */ I(Mt, {
|
|
33409
33580
|
layout: e.layout,
|
|
33410
33581
|
"camera-on-start": e["camera-on-start"],
|
|
@@ -33418,14 +33589,14 @@ function Gz(e) {
|
|
|
33418
33589
|
token: e.token,
|
|
33419
33590
|
children: /* @__PURE__ */ I(ki, {
|
|
33420
33591
|
fallback: /* @__PURE__ */ I(cb, {}),
|
|
33421
|
-
children: /* @__PURE__ */ I(ji, { children: /* @__PURE__ */ I(kv, { children: /* @__PURE__ */ I(Zv, { children: /* @__PURE__ */ I(hy, { children: /* @__PURE__ */ I(yy, { children: /* @__PURE__ */ I(xy, { children: /* @__PURE__ */ I($y, { children: /* @__PURE__ */ I(
|
|
33592
|
+
children: /* @__PURE__ */ I(ji, { children: /* @__PURE__ */ I(kv, { children: /* @__PURE__ */ I(Zv, { children: /* @__PURE__ */ I(hy, { children: /* @__PURE__ */ I(yy, { children: /* @__PURE__ */ I(xy, { children: /* @__PURE__ */ I($y, { children: /* @__PURE__ */ I(Jz, {}) }) }) }) }) }) }) })
|
|
33422
33593
|
})
|
|
33423
33594
|
})
|
|
33424
33595
|
] });
|
|
33425
33596
|
}
|
|
33426
|
-
var
|
|
33427
|
-
function
|
|
33428
|
-
|
|
33597
|
+
var Zz;
|
|
33598
|
+
function Qz() {
|
|
33599
|
+
Zz ||= Fe(Xz, "tavus-embed", [
|
|
33429
33600
|
"layout",
|
|
33430
33601
|
"camera-on-start",
|
|
33431
33602
|
"deployment-id",
|
|
@@ -33444,7 +33615,7 @@ function qz() {
|
|
|
33444
33615
|
Ae(null), Tn("Widget");
|
|
33445
33616
|
//#endregion
|
|
33446
33617
|
//#region src/integration.ts
|
|
33447
|
-
var
|
|
33618
|
+
var $z = [
|
|
33448
33619
|
"tavus:chat-message",
|
|
33449
33620
|
"tavus:conversation-ended",
|
|
33450
33621
|
"tavus:conversation-started",
|
|
@@ -33455,7 +33626,7 @@ var Jz = [
|
|
|
33455
33626
|
"tavus:ready",
|
|
33456
33627
|
"tavus:state-change",
|
|
33457
33628
|
"tavus:tool-call"
|
|
33458
|
-
],
|
|
33629
|
+
], eB = class {
|
|
33459
33630
|
element = null;
|
|
33460
33631
|
tagName;
|
|
33461
33632
|
constructor(e = "tavus-embed") {
|
|
@@ -33502,6 +33673,6 @@ var Jz = [
|
|
|
33502
33673
|
};
|
|
33503
33674
|
//#endregion
|
|
33504
33675
|
//#region src/index.ts
|
|
33505
|
-
typeof window < "u" &&
|
|
33676
|
+
typeof window < "u" && Qz();
|
|
33506
33677
|
//#endregion
|
|
33507
|
-
export {
|
|
33678
|
+
export { $z as TAVUS_EVENT_NAMES, eB as TavusIntegration };
|