@pluno/product-agent-web 0.1.115 → 0.1.116
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/product-agent-widget.js +356 -284
- package/package.json +1 -1
|
@@ -2,10 +2,10 @@ import { PlunoProductAgent as Si, getProductAgentOriginAccessErrorMessage as Ci
|
|
|
2
2
|
const Ei = "#7c3aed", kt = "M547 151 C516 151 493 169 485 199 L382 606 C373 641 396 666 431 666 L523 666 C552 666 568 684 563 713 L491 1028 C486 1054 510 1067 527 1044 L894 487 C915 455 894 432 856 432 L815 432 C784 432 773 411 789 382 L904 205 C922 171 901 145 859 145 Z", Lt = "#2c2a1e", Gn = [253, 250, 241], $n = 3.5;
|
|
3
3
|
function Lo(e) {
|
|
4
4
|
const t = To(e);
|
|
5
|
-
if (qn(
|
|
5
|
+
if (qn(st(t), Gn) >= $n)
|
|
6
6
|
return t;
|
|
7
|
-
let i =
|
|
8
|
-
const o =
|
|
7
|
+
let i = st(t);
|
|
8
|
+
const o = st(Lt);
|
|
9
9
|
for (let r = 0; r < 6; r += 1)
|
|
10
10
|
if (i = Ti(i, o, 0.22), qn(i, Gn) >= $n)
|
|
11
11
|
return dn(i);
|
|
@@ -14,13 +14,13 @@ function Lo(e) {
|
|
|
14
14
|
function ki() {
|
|
15
15
|
let n = "M 280 120", i = !1, o = 0;
|
|
16
16
|
for (let r = 150; r <= 1170; r += 62) {
|
|
17
|
-
const l = (o % 3 - 1) * 18,
|
|
18
|
-
n += ` L ${
|
|
17
|
+
const l = (o % 3 - 1) * 18, s = i ? 280 - l : 1020 + l;
|
|
18
|
+
n += ` L ${s} ${r}`, i = !i, o += 1;
|
|
19
19
|
}
|
|
20
20
|
return n;
|
|
21
21
|
}
|
|
22
22
|
function Li(e) {
|
|
23
|
-
const t = To(e), n = cn(
|
|
23
|
+
const t = To(e), n = cn(st(t));
|
|
24
24
|
return n > 0.86 ? {
|
|
25
25
|
top: "#ffffff",
|
|
26
26
|
middle: "#f6f6f6",
|
|
@@ -44,23 +44,23 @@ function Li(e) {
|
|
|
44
44
|
inner: "#4b4b4b",
|
|
45
45
|
shadow: "#000000"
|
|
46
46
|
} : {
|
|
47
|
-
top:
|
|
48
|
-
middle:
|
|
49
|
-
bottom:
|
|
50
|
-
edgeStart:
|
|
51
|
-
edgeMiddle:
|
|
52
|
-
edgeEnd:
|
|
53
|
-
glow:
|
|
54
|
-
highlight:
|
|
55
|
-
inner:
|
|
56
|
-
shadow:
|
|
47
|
+
top: pe(t, 0.28, -0.03),
|
|
48
|
+
middle: pe(t, 0.08, 0.04),
|
|
49
|
+
bottom: pe(t, -0.1, 0.02),
|
|
50
|
+
edgeStart: pe(t, 0.08, 0.08),
|
|
51
|
+
edgeMiddle: pe(t, -0.08, 0.08),
|
|
52
|
+
edgeEnd: pe(t, -0.18, 0.05),
|
|
53
|
+
glow: pe(t, 0.32, -0.12),
|
|
54
|
+
highlight: pe(t, 0.38, -0.18),
|
|
55
|
+
inner: pe(t, 0.24, -0.1),
|
|
56
|
+
shadow: pe(t, -0.25, -0.08)
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
59
|
function To(e) {
|
|
60
60
|
const t = e.trim();
|
|
61
61
|
return /^#[0-9a-f]{6}$/i.test(t) ? t.toLowerCase() : /^#[0-9a-f]{3}$/i.test(t) ? `#${t.slice(1).split("").map((n) => n + n).join("").toLowerCase()}` : Ei;
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function st(e) {
|
|
64
64
|
return [
|
|
65
65
|
Number.parseInt(e.slice(1, 3), 16),
|
|
66
66
|
Number.parseInt(e.slice(3, 5), 16),
|
|
@@ -90,16 +90,16 @@ function Ti(e, t, n) {
|
|
|
90
90
|
e[2] + (t[2] - e[2]) * i
|
|
91
91
|
];
|
|
92
92
|
}
|
|
93
|
-
function
|
|
94
|
-
const [i, o, r] = Ai(
|
|
93
|
+
function pe(e, t, n) {
|
|
94
|
+
const [i, o, r] = Ai(st(e));
|
|
95
95
|
return dn(Ii(i, un(o + n), un(r + t)));
|
|
96
96
|
}
|
|
97
97
|
function Ai([e, t, n]) {
|
|
98
|
-
const i = e / 255, o = t / 255, r = n / 255, l = Math.max(i, o, r),
|
|
99
|
-
if (l ===
|
|
100
|
-
return [0, 0,
|
|
101
|
-
const c = l -
|
|
102
|
-
return [(l === i ? (o - r) / c + (o < r ? 6 : 0) : l === o ? (r - i) / c + 2 : (i - o) / c + 4) / 6, g,
|
|
98
|
+
const i = e / 255, o = t / 255, r = n / 255, l = Math.max(i, o, r), s = Math.min(i, o, r), p = (l + s) / 2;
|
|
99
|
+
if (l === s)
|
|
100
|
+
return [0, 0, p];
|
|
101
|
+
const c = l - s, g = p > 0.5 ? c / (2 - l - s) : c / (l + s);
|
|
102
|
+
return [(l === i ? (o - r) / c + (o < r ? 6 : 0) : l === o ? (r - i) / c + 2 : (i - o) / c + 4) / 6, g, p];
|
|
103
103
|
}
|
|
104
104
|
function Ii(e, t, n) {
|
|
105
105
|
if (t === 0)
|
|
@@ -150,16 +150,16 @@ function jn(e, t, n) {
|
|
|
150
150
|
}
|
|
151
151
|
return null;
|
|
152
152
|
}
|
|
153
|
-
const Ri = "https://app.pluno.ai",
|
|
153
|
+
const Ri = "https://app.pluno.ai", zi = "/api/product-agent/embed/active-users", Mi = 1800, Di = 15e3, Oi = 250, Ui = 1e3, Bi = 3e4;
|
|
154
154
|
function Fi(e, t = {}) {
|
|
155
155
|
let n = !1, i = null, o = null, r = null;
|
|
156
156
|
const l = () => {
|
|
157
157
|
r !== null && (window.clearInterval(r), r = null);
|
|
158
|
-
},
|
|
158
|
+
}, s = (g) => {
|
|
159
159
|
n || (o !== null && window.clearTimeout(o), o = window.setTimeout(() => {
|
|
160
160
|
c();
|
|
161
161
|
}, Gi(g)));
|
|
162
|
-
},
|
|
162
|
+
}, p = (g) => {
|
|
163
163
|
if (l(), i === null) {
|
|
164
164
|
i = g, e(g);
|
|
165
165
|
return;
|
|
@@ -170,7 +170,7 @@ function Fi(e, t = {}) {
|
|
|
170
170
|
l();
|
|
171
171
|
return;
|
|
172
172
|
}
|
|
173
|
-
const v = Math.min(1, (performance.now() - m) /
|
|
173
|
+
const v = Math.min(1, (performance.now() - m) / Mi);
|
|
174
174
|
i = Math.round(h + (g - h) * $i(v)), e(i), v >= 1 && (i = g, e(g), l());
|
|
175
175
|
}, Oi);
|
|
176
176
|
}, c = async () => {
|
|
@@ -178,9 +178,9 @@ function Fi(e, t = {}) {
|
|
|
178
178
|
const g = await Wi(t);
|
|
179
179
|
if (n)
|
|
180
180
|
return;
|
|
181
|
-
|
|
181
|
+
p(g.count), s(g.refreshAfterMs);
|
|
182
182
|
} catch {
|
|
183
|
-
|
|
183
|
+
s(Di);
|
|
184
184
|
}
|
|
185
185
|
};
|
|
186
186
|
return c(), () => {
|
|
@@ -190,7 +190,7 @@ function Fi(e, t = {}) {
|
|
|
190
190
|
async function Wi(e) {
|
|
191
191
|
if (e.loader)
|
|
192
192
|
return e.loader();
|
|
193
|
-
const n = await (e.fetcher ?? fetch)(new URL(
|
|
193
|
+
const n = await (e.fetcher ?? fetch)(new URL(zi, Hi(e.backendUrl ?? Ri)).toString(), {
|
|
194
194
|
cache: "no-store",
|
|
195
195
|
credentials: "omit"
|
|
196
196
|
});
|
|
@@ -309,7 +309,7 @@ function Qi(e, t, n) {
|
|
|
309
309
|
e.slice(i, t)
|
|
310
310
|
);
|
|
311
311
|
}
|
|
312
|
-
const Io = 100, ea = 1e4, ta = 5e3, na = "product-agent:sdk-preview-socket-connect", oa = "product-agent:sdk-preview-socket-send", ia = "product-agent:sdk-preview-socket-close", aa = "product-agent:sdk-preview-socket-open", ra = "product-agent:sdk-preview-socket-message", la = "product-agent:sdk-preview-socket-error",
|
|
312
|
+
const Io = 100, ea = 1e4, ta = 5e3, na = "product-agent:sdk-preview-socket-connect", oa = "product-agent:sdk-preview-socket-send", ia = "product-agent:sdk-preview-socket-close", aa = "product-agent:sdk-preview-socket-open", ra = "product-agent:sdk-preview-socket-message", la = "product-agent:sdk-preview-socket-error", pa = "product-agent:sdk-preview-socket-closed", Xn = "product-agent:sdk-preview-socket-id", sa = "data-pluno-sdk-preview-channel", Po = "data-pluno-auto-mounted", be = "__plunoProductAgentAutoMountOwner", da = 1e4, ca = "Failed to load Pluno widget token", Zn = "Timed out loading Pluno widget token", ua = "pluno.productAgent.widgetClientId.", Jt = /* @__PURE__ */ new Set(), ga = "product-agent:preview-diagnostic", No = "pluno.productAgent.sharePromptsDisabled", ha = 3, Jn = 'dialog[open], [aria-modal="true"], [role="dialog"]', ma = 400, fa = 5e3, wa = 500, Qn = "Close the page's popup to chat", ba = "No recent chats for this page yet.", _e = {
|
|
313
313
|
launcherLabel: "Ask for anything...",
|
|
314
314
|
accentColor: "#7c3aed",
|
|
315
315
|
colorScheme: "light",
|
|
@@ -317,7 +317,7 @@ const Io = 100, ea = 1e4, ta = 5e3, na = "product-agent:sdk-preview-socket-conne
|
|
|
317
317
|
scribbleStyle: !0,
|
|
318
318
|
position: "bottom-right",
|
|
319
319
|
movableLauncher: !0
|
|
320
|
-
}, _a = '"Architects Daughter", "Bradley Hand", "Chalkboard SE", "Comic Sans MS", "Comic Sans", "Segoe Print", cursive', eo = "pluno-pa-scribble-font", Ro = 190,
|
|
320
|
+
}, _a = '"Architects Daughter", "Bradley Hand", "Chalkboard SE", "Comic Sans MS", "Comic Sans", "Segoe Print", cursive', eo = "pluno-pa-scribble-font", Ro = 190, zo = 41, to = 22, xa = 1, ya = 48, vn = 420, va = 520, Sa = 0.24, Sn = 680, Ca = 800, Ea = 0.76, N = 8, Ue = 50, Mo = "http://www.w3.org/2000/svg", gn = 26, hn = 8, ka = 36, mn = 16, La = 4, no = [
|
|
321
321
|
{
|
|
322
322
|
ellipseCx: "17.5",
|
|
323
323
|
ellipseCy: "24.5",
|
|
@@ -431,7 +431,7 @@ async function Na(e = {}) {
|
|
|
431
431
|
);
|
|
432
432
|
const n = document.createElement("div");
|
|
433
433
|
n.className = "pluno-pa-widget-host", n.setAttribute("data-pluno-product-agent-ui", "widget"), n.setAttribute("data-pluno-product-agent-layout", t.layout), t.sdkPreviewChannelId && n.setAttribute(
|
|
434
|
-
|
|
434
|
+
sa,
|
|
435
435
|
t.sdkPreviewChannelId
|
|
436
436
|
);
|
|
437
437
|
const i = n.attachShadow({ mode: "open" }), o = document.createElement("div");
|
|
@@ -447,14 +447,14 @@ async function Na(e = {}) {
|
|
|
447
447
|
t.movableLauncher,
|
|
448
448
|
t.showLauncherMinimizeButton
|
|
449
449
|
), i.appendChild(o);
|
|
450
|
-
const l = il(t),
|
|
451
|
-
So(t,
|
|
452
|
-
let
|
|
453
|
-
o.classList.add(`pluno-pa-widget--${t.colorScheme}`), t.scribbleStyle && o.classList.add("pluno-pa-widget--scribble"),
|
|
450
|
+
const l = il(t), s = t.layout === "floating" ? t.initialDisplayState ?? nl(t) : "shown";
|
|
451
|
+
So(t, s);
|
|
452
|
+
let p = t.movableLauncher ? l.launcherPosition : null, c = p !== null, g = l.panelSize, h = null;
|
|
453
|
+
o.classList.add(`pluno-pa-widget--${t.colorScheme}`), t.scribbleStyle && o.classList.add("pluno-pa-widget--scribble"), s === "minimized" && (o.classList.add("pluno-pa-widget--minimized"), Oe(
|
|
454
454
|
o,
|
|
455
455
|
en(
|
|
456
456
|
o,
|
|
457
|
-
|
|
457
|
+
p,
|
|
458
458
|
t.position
|
|
459
459
|
)
|
|
460
460
|
)), vo(i, t.accentColor), ao(o, r, {
|
|
@@ -473,7 +473,7 @@ async function Na(e = {}) {
|
|
|
473
473
|
".pluno-pa-widget__launcher-minimize"
|
|
474
474
|
), w = o.querySelector(".pluno-pa-widget__panel"), R = o.querySelector(
|
|
475
475
|
".pluno-pa-widget__scribble-spirals--panel"
|
|
476
|
-
),
|
|
476
|
+
), M = Array.from(
|
|
477
477
|
o.querySelectorAll(".pluno-pa-widget__resize-handle")
|
|
478
478
|
), L = o.querySelector(
|
|
479
479
|
".pluno-pa-widget__close"
|
|
@@ -509,7 +509,7 @@ async function Na(e = {}) {
|
|
|
509
509
|
".pluno-pa-widget__timeline-jump"
|
|
510
510
|
), ge = o.querySelector(
|
|
511
511
|
".pluno-pa-widget__active-users-counter"
|
|
512
|
-
),
|
|
512
|
+
), z = o.querySelector(
|
|
513
513
|
".pluno-pa-widget__timeline"
|
|
514
514
|
), Xe = o.querySelector(
|
|
515
515
|
".pluno-pa-widget__timeline-bottom-sentinel"
|
|
@@ -528,7 +528,7 @@ async function Na(e = {}) {
|
|
|
528
528
|
), ne = o.querySelector(
|
|
529
529
|
".pluno-pa-widget__tab-groups-suggestion-dismiss"
|
|
530
530
|
);
|
|
531
|
-
if (!E || !u || !w || !L || !te || !W || !Ye || !Be || !ce || !U || !y || !B || !$ || !X || !Le || !K || !ct || !Te || !ue || !ge || !
|
|
531
|
+
if (!E || !u || !w || !L || !te || !W || !Ye || !Be || !ce || !U || !y || !B || !$ || !X || !Le || !K || !ct || !Te || !ue || !ge || !z || !Xe)
|
|
532
532
|
throw new Error("Failed to mount Pluno widget");
|
|
533
533
|
if (t.movableLauncher && !O)
|
|
534
534
|
throw new Error("Failed to mount Pluno widget drag handle");
|
|
@@ -592,7 +592,7 @@ async function Na(e = {}) {
|
|
|
592
592
|
), Ze = new Set(Pe);
|
|
593
593
|
let Rt = l.sharePromptsDisabled || await al(t), oe = null, V = !1, ut = !(t.loginRequired || t.signupRequired), ve = !1, Ne = {
|
|
594
594
|
enabled: !0
|
|
595
|
-
}, Re = 0, Tn = "", Y = !1, he = !1, Se = [],
|
|
595
|
+
}, Re = 0, Tn = "", Y = !1, he = !1, Se = [], zt = null, Je = null;
|
|
596
596
|
const ie = (a, d) => {
|
|
597
597
|
Ne = { enabled: a, reason: d };
|
|
598
598
|
}, ae = () => {
|
|
@@ -600,7 +600,7 @@ async function Na(e = {}) {
|
|
|
600
600
|
}, ai = () => {
|
|
601
601
|
ue.hidden = !1;
|
|
602
602
|
}, ri = (a = "jump") => {
|
|
603
|
-
ie(!0, a), ae(),
|
|
603
|
+
ie(!0, a), ae(), pt(z, () => Ne.enabled), Re = z.scrollTop;
|
|
604
604
|
}, me = () => {
|
|
605
605
|
if (X.hidden = t.layout === "page" || t.loginRequired, Le.hidden = !Y, X.setAttribute("aria-expanded", String(Y)), K.classList.toggle(
|
|
606
606
|
"pluno-pa-widget__history-list--center",
|
|
@@ -634,7 +634,7 @@ async function Na(e = {}) {
|
|
|
634
634
|
he = !0, Je = null, me();
|
|
635
635
|
try {
|
|
636
636
|
const d = await _.listSessions({ cursor: a, limit: 20 });
|
|
637
|
-
Se = a ? [...Se, ...d.sessions] : d.sessions,
|
|
637
|
+
Se = a ? [...Se, ...d.sessions] : d.sessions, zt = d.nextCursor;
|
|
638
638
|
} catch (d) {
|
|
639
639
|
Z(
|
|
640
640
|
"web-sdk.widget",
|
|
@@ -648,7 +648,7 @@ async function Na(e = {}) {
|
|
|
648
648
|
}
|
|
649
649
|
}
|
|
650
650
|
}, li = () => {
|
|
651
|
-
!
|
|
651
|
+
!zt || he || K.scrollHeight - K.scrollTop - K.clientHeight <= 24 && An(zt);
|
|
652
652
|
}, In = () => {
|
|
653
653
|
V || typeof document > "u" || (vo(i, t.accentColor), n.isConnected || (t.mountTarget?.isConnected ? t.mountTarget.appendChild(n) : t.mountTarget || v.body?.appendChild(n)));
|
|
654
654
|
}, Pn = new MutationObserver(In);
|
|
@@ -660,7 +660,7 @@ async function Na(e = {}) {
|
|
|
660
660
|
const d = Tt(o, a);
|
|
661
661
|
return wn(
|
|
662
662
|
o,
|
|
663
|
-
|
|
663
|
+
p ? Ct(p, d) : Fa(
|
|
664
664
|
o,
|
|
665
665
|
t.position,
|
|
666
666
|
d
|
|
@@ -679,7 +679,7 @@ async function Na(e = {}) {
|
|
|
679
679
|
focusedInput: a,
|
|
680
680
|
focusedInputAt: a ? Date.now() : null,
|
|
681
681
|
openToolGroupKeys: [...Nt],
|
|
682
|
-
launcherPosition: c ?
|
|
682
|
+
launcherPosition: c ? p : null,
|
|
683
683
|
panelSize: g,
|
|
684
684
|
seenShareCandidateIds: [...Pe].slice(
|
|
685
685
|
-Io
|
|
@@ -697,14 +697,14 @@ async function Na(e = {}) {
|
|
|
697
697
|
o,
|
|
698
698
|
en(
|
|
699
699
|
o,
|
|
700
|
-
|
|
700
|
+
p,
|
|
701
701
|
t.position
|
|
702
702
|
)
|
|
703
703
|
), co(o), H(), d && gt("minimized");
|
|
704
|
-
},
|
|
704
|
+
}, ze = (a, d = {}) => {
|
|
705
705
|
qa(a, {
|
|
706
706
|
debugVersion: Ia,
|
|
707
|
-
launcherPosition:
|
|
707
|
+
launcherPosition: p,
|
|
708
708
|
rootClasses: o.className,
|
|
709
709
|
rootStyle: {
|
|
710
710
|
left: o.style.left,
|
|
@@ -721,13 +721,13 @@ async function Na(e = {}) {
|
|
|
721
721
|
...d
|
|
722
722
|
});
|
|
723
723
|
}, tt = (a = !0) => {
|
|
724
|
-
if (!
|
|
724
|
+
if (!p)
|
|
725
725
|
return Oe(o, null), Qe(a);
|
|
726
726
|
const d = Qe(a);
|
|
727
|
-
return Oe(o, d),
|
|
727
|
+
return Oe(o, d), ze("Applied stored closed launcher position", {
|
|
728
728
|
visibleLauncherPosition: d
|
|
729
729
|
}), d;
|
|
730
|
-
},
|
|
730
|
+
}, Mt = (a, d) => {
|
|
731
731
|
if (!a || !d) {
|
|
732
732
|
co(o);
|
|
733
733
|
return;
|
|
@@ -745,7 +745,7 @@ async function Na(e = {}) {
|
|
|
745
745
|
o,
|
|
746
746
|
en(
|
|
747
747
|
o,
|
|
748
|
-
|
|
748
|
+
p,
|
|
749
749
|
t.position
|
|
750
750
|
)
|
|
751
751
|
);
|
|
@@ -768,11 +768,11 @@ async function Na(e = {}) {
|
|
|
768
768
|
),
|
|
769
769
|
d
|
|
770
770
|
);
|
|
771
|
-
|
|
771
|
+
Mt(f, a), ze(
|
|
772
772
|
"Applied open panel position after viewport resize",
|
|
773
773
|
{ openPanelPosition: f }
|
|
774
774
|
);
|
|
775
|
-
} else
|
|
775
|
+
} else p && ze(
|
|
776
776
|
"Applied visible launcher position after viewport resize",
|
|
777
777
|
{ visibleLauncherPosition: a }
|
|
778
778
|
);
|
|
@@ -790,18 +790,18 @@ async function Na(e = {}) {
|
|
|
790
790
|
a,
|
|
791
791
|
f
|
|
792
792
|
);
|
|
793
|
-
|
|
793
|
+
p = so(
|
|
794
794
|
C,
|
|
795
795
|
f
|
|
796
|
-
), Oe(o, C),
|
|
796
|
+
), Oe(o, C), ze("Dragging closed launcher", {
|
|
797
797
|
requestedPosition: d
|
|
798
798
|
});
|
|
799
799
|
},
|
|
800
800
|
persist: () => {
|
|
801
|
-
c = !0, H(),
|
|
801
|
+
c = !0, H(), ze("Persisted closed launcher drag position");
|
|
802
802
|
}
|
|
803
803
|
})) : Oe(o, null), Qt(o, g);
|
|
804
|
-
const
|
|
804
|
+
const pi = () => {
|
|
805
805
|
const a = Ve(g), d = Qe();
|
|
806
806
|
return {
|
|
807
807
|
position: Et(
|
|
@@ -815,7 +815,7 @@ async function Na(e = {}) {
|
|
|
815
815
|
),
|
|
816
816
|
size: a
|
|
817
817
|
};
|
|
818
|
-
},
|
|
818
|
+
}, si = (a) => {
|
|
819
819
|
g = At(a.size), Qt(o, g), an(
|
|
820
820
|
R,
|
|
821
821
|
Dt()
|
|
@@ -824,22 +824,22 @@ async function Na(e = {}) {
|
|
|
824
824
|
a.position,
|
|
825
825
|
Ve(g)
|
|
826
826
|
);
|
|
827
|
-
h =
|
|
827
|
+
h = so(
|
|
828
828
|
d,
|
|
829
829
|
Ve(g)
|
|
830
830
|
);
|
|
831
831
|
const f = Qe();
|
|
832
|
-
|
|
833
|
-
}, di =
|
|
832
|
+
Mt(d, f);
|
|
833
|
+
}, di = M.length > 0 ? Ua({
|
|
834
834
|
root: o,
|
|
835
|
-
handles:
|
|
836
|
-
getBounds:
|
|
837
|
-
setBounds:
|
|
835
|
+
handles: M,
|
|
836
|
+
getBounds: pi,
|
|
837
|
+
setBounds: si,
|
|
838
838
|
persist: H
|
|
839
839
|
}) : () => {
|
|
840
840
|
};
|
|
841
841
|
let Ot = !1;
|
|
842
|
-
const
|
|
842
|
+
const zn = async () => {
|
|
843
843
|
if (!(!t.billingStatusLoader || Ot)) {
|
|
844
844
|
Ot = !0;
|
|
845
845
|
try {
|
|
@@ -866,7 +866,7 @@ async function Na(e = {}) {
|
|
|
866
866
|
}
|
|
867
867
|
}
|
|
868
868
|
}, fe = (a = "", d = !0, f = !0) => {
|
|
869
|
-
|
|
869
|
+
zn(), ot && (ot = !1, Ft()), o.classList.contains("pluno-pa-widget--open") || (h = null), oe !== null && (window.clearTimeout(oe), oe = null), et("shown", !1), w.hidden = !1, L.hidden = !1, an(
|
|
870
870
|
R,
|
|
871
871
|
Dt()
|
|
872
872
|
), o.classList.remove("pluno-pa-widget--closing");
|
|
@@ -876,20 +876,20 @@ async function Na(e = {}) {
|
|
|
876
876
|
t.position,
|
|
877
877
|
g
|
|
878
878
|
);
|
|
879
|
-
if (
|
|
879
|
+
if (Mt(I, C), ze("Opening launcher at clamped open panel position", {
|
|
880
880
|
openPanelPosition: I,
|
|
881
881
|
visibleLauncherPosition: C
|
|
882
882
|
}), ie(!0, "open"), ae(), !d) {
|
|
883
|
-
o.classList.add("pluno-pa-widget--open"), E.hidden = !0, a && (y.value = a, lt(y)),
|
|
883
|
+
o.classList.add("pluno-pa-widget--open"), E.hidden = !0, a && (y.value = a, lt(y)), pt(z, () => Ne.enabled), Re = z.scrollTop, f && (y.focus(), y.setSelectionRange(y.value.length, y.value.length)), H(), gt("shown"), t.onPanelOpenChange?.(!0);
|
|
884
884
|
return;
|
|
885
885
|
}
|
|
886
886
|
window.requestAnimationFrame(() => {
|
|
887
|
-
o.classList.add("pluno-pa-widget--open"), a && (y.value = a, lt(y)),
|
|
888
|
-
E.hidden = !0,
|
|
887
|
+
o.classList.add("pluno-pa-widget--open"), a && (y.value = a, lt(y)), pt(z, () => Ne.enabled), Re = z.scrollTop, f && (y.focus(), y.setSelectionRange(y.value.length, y.value.length)), H(), gt("shown"), t.onPanelOpenChange?.(!0), oe = window.setTimeout(() => {
|
|
888
|
+
E.hidden = !0, pt(z, () => Ne.enabled), Re = z.scrollTop;
|
|
889
889
|
}, 220);
|
|
890
890
|
});
|
|
891
891
|
}, Ut = () => {
|
|
892
|
-
oe !== null && (window.clearTimeout(oe), oe = null), E.hidden = !1,
|
|
892
|
+
oe !== null && (window.clearTimeout(oe), oe = null), E.hidden = !1, p && (tt(!1), ze("Closing launcher at stored position")), o.classList.remove("pluno-pa-widget--open"), o.classList.add("pluno-pa-widget--closing"), H(), t.onPanelOpenChange?.(!1), oe = window.setTimeout(() => {
|
|
893
893
|
w.hidden = !0, L.hidden = !0, h = null, o.classList.remove("pluno-pa-widget--closing");
|
|
894
894
|
}, 220);
|
|
895
895
|
};
|
|
@@ -907,8 +907,8 @@ async function Na(e = {}) {
|
|
|
907
907
|
const a = u.value;
|
|
908
908
|
fe(a), u.value = "";
|
|
909
909
|
});
|
|
910
|
-
let Bt = null, ht = null,
|
|
911
|
-
const
|
|
910
|
+
let Bt = null, ht = null, Me = null;
|
|
911
|
+
const Mn = (a) => a === u || a === y, ci = (a) => {
|
|
912
912
|
if (!(a instanceof Element) || a.getRootNode() === o.getRootNode())
|
|
913
913
|
return null;
|
|
914
914
|
let d = a;
|
|
@@ -935,17 +935,17 @@ async function Na(e = {}) {
|
|
|
935
935
|
We !== a && (We = a, o.classList.toggle(
|
|
936
936
|
"pluno-pa-widget--host-modal-conflict",
|
|
937
937
|
a !== null
|
|
938
|
-
), De(), a !== null ?
|
|
938
|
+
), De(), a !== null ? Me = window.setInterval(() => {
|
|
939
939
|
const d = We;
|
|
940
940
|
(!d || !ui(d)) && Dn(null);
|
|
941
|
-
}, wa) :
|
|
941
|
+
}, wa) : Me !== null && (window.clearInterval(Me), Me = null, ht = null));
|
|
942
942
|
}, gi = () => {
|
|
943
|
-
|
|
943
|
+
Me !== null && (window.clearInterval(Me), Me = null);
|
|
944
944
|
};
|
|
945
945
|
o.addEventListener("focusin", (a) => {
|
|
946
|
-
|
|
946
|
+
Mn(a.target) && (Bt = Date.now(), H());
|
|
947
947
|
}), o.addEventListener("focusout", (a) => {
|
|
948
|
-
if (!
|
|
948
|
+
if (!Mn(a.target) || We !== null)
|
|
949
949
|
return;
|
|
950
950
|
const d = Bt;
|
|
951
951
|
if (Bt = null, d === null || Date.now() - d > ma)
|
|
@@ -965,8 +965,8 @@ async function Na(e = {}) {
|
|
|
965
965
|
a.stopPropagation();
|
|
966
966
|
}), F?.addEventListener("click", (a) => {
|
|
967
967
|
a.preventDefault(), a.stopPropagation(), et("minimized");
|
|
968
|
-
}), L.addEventListener("click", Ut),
|
|
969
|
-
|
|
968
|
+
}), L.addEventListener("click", Ut), z.addEventListener("scroll", () => {
|
|
969
|
+
z.scrollTop < Re - 1 && ie(!1, "userScroll"), Re = z.scrollTop;
|
|
970
970
|
}), ue.addEventListener("click", () => {
|
|
971
971
|
ri();
|
|
972
972
|
});
|
|
@@ -974,7 +974,7 @@ async function Na(e = {}) {
|
|
|
974
974
|
([a]) => {
|
|
975
975
|
a?.isIntersecting && (ie(!0, "bottom"), ae());
|
|
976
976
|
},
|
|
977
|
-
{ root:
|
|
977
|
+
{ root: z, threshold: 0 }
|
|
978
978
|
);
|
|
979
979
|
On?.observe(Xe);
|
|
980
980
|
const nt = () => t.loginRequired || t.signupRequired;
|
|
@@ -1144,7 +1144,7 @@ async function Na(e = {}) {
|
|
|
1144
1144
|
return;
|
|
1145
1145
|
}
|
|
1146
1146
|
a.key !== "Escape" || !Y || (Y = !1, me(), q());
|
|
1147
|
-
}), l.composerValue && (y.value = l.composerValue, lt(y)), t.layout === "page" ? fe(y.value, !1) :
|
|
1147
|
+
}), l.composerValue && (y.value = l.composerValue, lt(y)), t.layout === "page" ? fe(y.value, !1) : s === "minimized" ? et("minimized", !1) : t.initialDisplayState === void 0 && l.isOpen && fe(y.value, !1, !1), Ka(l, o, u, y);
|
|
1148
1148
|
const mt = () => r;
|
|
1149
1149
|
let $t = _.getState().appearance !== null, ft = null, at = null, Un = _.getState().isThinking, He = null;
|
|
1150
1150
|
const rt = t.taskNotifications;
|
|
@@ -1195,7 +1195,7 @@ async function Na(e = {}) {
|
|
|
1195
1195
|
let je = null, Wn = () => {
|
|
1196
1196
|
};
|
|
1197
1197
|
const bi = !!(t.sdkPreviewChannelId && t.referralLinkLoader), qt = /* @__PURE__ */ new Map(), jt = () => y.value.trim().length > 0 || b.length > 0, _i = () => {
|
|
1198
|
-
const a = je !== null &&
|
|
1198
|
+
const a = je !== null && pn(_.getState(), jt());
|
|
1199
1199
|
ge.hidden = !a, a && je !== null && Wo(ge, je);
|
|
1200
1200
|
};
|
|
1201
1201
|
let Ke = null;
|
|
@@ -1234,7 +1234,7 @@ async function Na(e = {}) {
|
|
|
1234
1234
|
He
|
|
1235
1235
|
), t.loginRequired) {
|
|
1236
1236
|
qt.clear(), xo(
|
|
1237
|
-
|
|
1237
|
+
z,
|
|
1238
1238
|
B,
|
|
1239
1239
|
Vt,
|
|
1240
1240
|
mt,
|
|
@@ -1247,7 +1247,7 @@ async function Na(e = {}) {
|
|
|
1247
1247
|
}
|
|
1248
1248
|
if (t.signupRequired) {
|
|
1249
1249
|
qt.clear(), xo(
|
|
1250
|
-
|
|
1250
|
+
z,
|
|
1251
1251
|
B,
|
|
1252
1252
|
Vt,
|
|
1253
1253
|
mt,
|
|
@@ -1262,14 +1262,14 @@ async function Na(e = {}) {
|
|
|
1262
1262
|
Tn = d;
|
|
1263
1263
|
const C = ve || Ne.enabled;
|
|
1264
1264
|
ve = !1, Ir(
|
|
1265
|
-
|
|
1265
|
+
z,
|
|
1266
1266
|
Xe,
|
|
1267
1267
|
B,
|
|
1268
1268
|
Vt,
|
|
1269
1269
|
ge,
|
|
1270
1270
|
a,
|
|
1271
1271
|
je,
|
|
1272
|
-
je !== null &&
|
|
1272
|
+
je !== null && pn(a, jt()),
|
|
1273
1273
|
C,
|
|
1274
1274
|
() => Ne.enabled,
|
|
1275
1275
|
Nt,
|
|
@@ -1317,7 +1317,7 @@ async function Na(e = {}) {
|
|
|
1317
1317
|
Rt = !0, Pe.add(I.id), Ze.add(I.id), H(), rl(t, !0), at = null, D(_.getState());
|
|
1318
1318
|
}
|
|
1319
1319
|
} : void 0
|
|
1320
|
-
), C ? (Re =
|
|
1320
|
+
), C ? (Re = z.scrollTop, ae()) : f && Xa(a) && ai();
|
|
1321
1321
|
}, Hn = async (a) => {
|
|
1322
1322
|
if (!t.integrationAuthStatusLoader)
|
|
1323
1323
|
return;
|
|
@@ -1348,7 +1348,7 @@ async function Na(e = {}) {
|
|
|
1348
1348
|
};
|
|
1349
1349
|
return Wn = Fi(
|
|
1350
1350
|
(a) => {
|
|
1351
|
-
je = a, !V &&
|
|
1351
|
+
je = a, !V && pn(_.getState(), jt()) && D(_.getState());
|
|
1352
1352
|
},
|
|
1353
1353
|
{
|
|
1354
1354
|
backendUrl: t.backendUrl,
|
|
@@ -1374,7 +1374,7 @@ async function Na(e = {}) {
|
|
|
1374
1374
|
fallbackColorScheme: t.colorScheme,
|
|
1375
1375
|
fallbackFontFamily: t.fontFamily
|
|
1376
1376
|
}
|
|
1377
|
-
), Yt({}, "agent.state.appearance-cleared")), D(a), Hn(a), j(), d &&
|
|
1377
|
+
), Yt({}, "agent.state.appearance-cleared")), D(a), Hn(a), j(), d && zn();
|
|
1378
1378
|
}), D(_.getState()), Hn(_.getState()), j(), Wt(), {
|
|
1379
1379
|
agent: _,
|
|
1380
1380
|
startNewChat: Kt,
|
|
@@ -1475,10 +1475,10 @@ function io(e, t) {
|
|
|
1475
1475
|
return { accentColor: e, scribbleStyle: t };
|
|
1476
1476
|
}
|
|
1477
1477
|
function Ra(e) {
|
|
1478
|
-
const t =
|
|
1479
|
-
return t === null ? "#fafafa" :
|
|
1478
|
+
const t = za(e);
|
|
1479
|
+
return t === null ? "#fafafa" : Ma(t) > 0.5 ? "#18181b" : "#fafaf9";
|
|
1480
1480
|
}
|
|
1481
|
-
function
|
|
1481
|
+
function za(e) {
|
|
1482
1482
|
const t = e.trim();
|
|
1483
1483
|
return /^#[0-9a-f]{6}$/i.test(t) ? [
|
|
1484
1484
|
Number.parseInt(t.slice(1, 3), 16),
|
|
@@ -1490,7 +1490,7 @@ function Ma(e) {
|
|
|
1490
1490
|
Number.parseInt(t[3] + t[3], 16)
|
|
1491
1491
|
] : null;
|
|
1492
1492
|
}
|
|
1493
|
-
function
|
|
1493
|
+
function Ma([e, t, n]) {
|
|
1494
1494
|
const i = (o) => {
|
|
1495
1495
|
const r = o / 255;
|
|
1496
1496
|
return r <= 0.03928 ? r / 12.92 : ((r + 0.055) / 1.055) ** 2.4;
|
|
@@ -1541,17 +1541,17 @@ function Oa({
|
|
|
1541
1541
|
setPosition: o,
|
|
1542
1542
|
persist: r
|
|
1543
1543
|
}) {
|
|
1544
|
-
let l = null,
|
|
1544
|
+
let l = null, s = null, p = null, c = !1, g = null;
|
|
1545
1545
|
const h = () => {
|
|
1546
|
-
l = null,
|
|
1546
|
+
l = null, s = null, p = null, c = !1, e.classList.remove("pluno-pa-widget--dragging");
|
|
1547
1547
|
}, m = (w) => {
|
|
1548
|
-
e.classList.contains("pluno-pa-widget--open") || e.classList.contains("pluno-pa-widget--closing") || (w.preventDefault(), w.stopPropagation(), l = w.pointerId,
|
|
1548
|
+
e.classList.contains("pluno-pa-widget--open") || e.classList.contains("pluno-pa-widget--closing") || (w.preventDefault(), w.stopPropagation(), l = w.pointerId, s = { x: w.clientX, y: w.clientY }, p = i(), c = !1, t.setPointerCapture?.(w.pointerId));
|
|
1549
1549
|
}, v = (w) => {
|
|
1550
|
-
if (l !== w.pointerId || !
|
|
1550
|
+
if (l !== w.pointerId || !s || !p)
|
|
1551
1551
|
return;
|
|
1552
1552
|
w.preventDefault();
|
|
1553
|
-
const R = w.clientX -
|
|
1554
|
-
!c && Math.hypot(R,
|
|
1553
|
+
const R = w.clientX - s.x, M = w.clientY - s.y;
|
|
1554
|
+
!c && Math.hypot(R, M) < fn || (c = !0, e.classList.add("pluno-pa-widget--dragging"), o({ x: p.x + R, y: p.y + M }));
|
|
1555
1555
|
}, E = (w) => {
|
|
1556
1556
|
l === w.pointerId && (w.preventDefault(), w.stopPropagation(), c && (g = { x: w.clientX, y: w.clientY }, r()), h());
|
|
1557
1557
|
}, O = (w) => {
|
|
@@ -1567,9 +1567,9 @@ function Oa({
|
|
|
1567
1567
|
}, F = (w) => {
|
|
1568
1568
|
if (e.classList.contains("pluno-pa-widget--open") || e.classList.contains("pluno-pa-widget--closing"))
|
|
1569
1569
|
return;
|
|
1570
|
-
const R = w.shiftKey ? Oo : Do,
|
|
1570
|
+
const R = w.shiftKey ? Oo : Do, M = i();
|
|
1571
1571
|
let L = null;
|
|
1572
|
-
w.key === "ArrowUp" ? L = { x:
|
|
1572
|
+
w.key === "ArrowUp" ? L = { x: M.x, y: M.y - R } : w.key === "ArrowDown" ? L = { x: M.x, y: M.y + R } : w.key === "ArrowLeft" ? L = { x: M.x - R, y: M.y } : w.key === "ArrowRight" && (L = { x: M.x + R, y: M.y }), L && (w.preventDefault(), w.stopPropagation(), o(L), r());
|
|
1573
1573
|
};
|
|
1574
1574
|
return t.addEventListener("pointerdown", m), t.addEventListener("pointermove", v), t.addEventListener("pointerup", E), t.addEventListener("pointercancel", O), t.addEventListener("click", u, !0), n.addEventListener("keydown", F), () => {
|
|
1575
1575
|
t.removeEventListener("pointerdown", m), t.removeEventListener("pointermove", v), t.removeEventListener("pointerup", E), t.removeEventListener("pointercancel", O), t.removeEventListener("click", u, !0), n.removeEventListener("keydown", F);
|
|
@@ -1582,28 +1582,28 @@ function Ua({
|
|
|
1582
1582
|
setBounds: i,
|
|
1583
1583
|
persist: o
|
|
1584
1584
|
}) {
|
|
1585
|
-
let r = null, l = null,
|
|
1585
|
+
let r = null, l = null, s = null, p = null, c = !1;
|
|
1586
1586
|
const g = () => {
|
|
1587
|
-
r = null, l = null,
|
|
1587
|
+
r = null, l = null, s = null, p = null, c = !1, e.classList.remove("pluno-pa-widget--resizing");
|
|
1588
1588
|
}, h = (u) => {
|
|
1589
1589
|
const F = u.currentTarget, w = F.dataset.resizeDirection;
|
|
1590
|
-
!e.classList.contains("pluno-pa-widget--open") || !ro(w) || (u.preventDefault(), u.stopPropagation(), r = u.pointerId, l = w,
|
|
1590
|
+
!e.classList.contains("pluno-pa-widget--open") || !ro(w) || (u.preventDefault(), u.stopPropagation(), r = u.pointerId, l = w, s = { x: u.clientX, y: u.clientY }, p = n(), c = !1, F.setPointerCapture?.(u.pointerId));
|
|
1591
1591
|
}, m = (u) => {
|
|
1592
|
-
if (r !== u.pointerId || !l || !
|
|
1592
|
+
if (r !== u.pointerId || !l || !s || !p)
|
|
1593
1593
|
return;
|
|
1594
1594
|
u.preventDefault(), u.stopPropagation();
|
|
1595
|
-
const F = u.clientX -
|
|
1595
|
+
const F = u.clientX - s.x, w = u.clientY - s.y;
|
|
1596
1596
|
!c && Math.hypot(F, w) < fn || (c = !0, e.classList.add("pluno-pa-widget--resizing"), i(
|
|
1597
|
-
lo(
|
|
1597
|
+
lo(p, l, F, w)
|
|
1598
1598
|
));
|
|
1599
1599
|
}, v = (u) => {
|
|
1600
1600
|
r === u.pointerId && (u.preventDefault(), u.stopPropagation(), c && o(), g());
|
|
1601
1601
|
}, E = (u) => {
|
|
1602
1602
|
r === u.pointerId && (u.preventDefault(), g());
|
|
1603
1603
|
}, O = (u) => {
|
|
1604
|
-
const w = u.currentTarget.dataset.resizeDirection, R = u.shiftKey ? Oo : Do,
|
|
1604
|
+
const w = u.currentTarget.dataset.resizeDirection, R = u.shiftKey ? Oo : Do, M = n();
|
|
1605
1605
|
let L = 0, te = 0;
|
|
1606
|
-
ro(w) && (u.key === "ArrowLeft" ? L = -R : u.key === "ArrowRight" ? L = R : u.key === "ArrowUp" ? te = -R : u.key === "ArrowDown" && (te = R), !(L === 0 && te === 0) && (u.preventDefault(), u.stopPropagation(), i(lo(
|
|
1606
|
+
ro(w) && (u.key === "ArrowLeft" ? L = -R : u.key === "ArrowRight" ? L = R : u.key === "ArrowUp" ? te = -R : u.key === "ArrowDown" && (te = R), !(L === 0 && te === 0) && (u.preventDefault(), u.stopPropagation(), i(lo(M, w, L, te)), o()));
|
|
1607
1607
|
};
|
|
1608
1608
|
for (const u of t)
|
|
1609
1609
|
u.addEventListener("pointerdown", h), u.addEventListener("pointermove", m), u.addEventListener("pointerup", v), u.addEventListener("pointercancel", E), u.addEventListener("keydown", O);
|
|
@@ -1616,7 +1616,7 @@ function ro(e) {
|
|
|
1616
1616
|
return e === "left" || e === "right" || e === "top" || e === "bottom" || e === "top-left" || e === "top-right" || e === "bottom-left" || e === "bottom-right";
|
|
1617
1617
|
}
|
|
1618
1618
|
function lo(e, t, n, i) {
|
|
1619
|
-
const o = ee(), r =
|
|
1619
|
+
const o = ee(), r = po({
|
|
1620
1620
|
leading: e.position.x,
|
|
1621
1621
|
length: e.size.width,
|
|
1622
1622
|
delta: n,
|
|
@@ -1628,7 +1628,7 @@ function lo(e, t, n, i) {
|
|
|
1628
1628
|
vn,
|
|
1629
1629
|
o.width - N * 2
|
|
1630
1630
|
)
|
|
1631
|
-
}), l =
|
|
1631
|
+
}), l = po({
|
|
1632
1632
|
leading: e.position.y,
|
|
1633
1633
|
length: e.size.height,
|
|
1634
1634
|
delta: i,
|
|
@@ -1646,7 +1646,7 @@ function lo(e, t, n, i) {
|
|
|
1646
1646
|
size: { width: r.length, height: l.length }
|
|
1647
1647
|
};
|
|
1648
1648
|
}
|
|
1649
|
-
function
|
|
1649
|
+
function po({
|
|
1650
1650
|
leading: e,
|
|
1651
1651
|
length: t,
|
|
1652
1652
|
delta: n,
|
|
@@ -1654,32 +1654,32 @@ function so({
|
|
|
1654
1654
|
resizeTrailing: o,
|
|
1655
1655
|
minLeading: r,
|
|
1656
1656
|
maxTrailing: l,
|
|
1657
|
-
minLength:
|
|
1657
|
+
minLength: s
|
|
1658
1658
|
}) {
|
|
1659
|
-
const
|
|
1659
|
+
const p = e + t;
|
|
1660
1660
|
if (i) {
|
|
1661
1661
|
const c = e + n;
|
|
1662
1662
|
if (c >= r) {
|
|
1663
1663
|
const h = Q(
|
|
1664
1664
|
c,
|
|
1665
1665
|
r,
|
|
1666
|
-
|
|
1666
|
+
p - s
|
|
1667
1667
|
);
|
|
1668
|
-
return { leading: h, length:
|
|
1668
|
+
return { leading: h, length: p - h };
|
|
1669
1669
|
}
|
|
1670
1670
|
const g = Q(
|
|
1671
|
-
|
|
1672
|
-
|
|
1671
|
+
p + r - c,
|
|
1672
|
+
p,
|
|
1673
1673
|
l
|
|
1674
1674
|
);
|
|
1675
1675
|
return { leading: r, length: g - r };
|
|
1676
1676
|
}
|
|
1677
1677
|
if (o) {
|
|
1678
|
-
const c =
|
|
1678
|
+
const c = p + n;
|
|
1679
1679
|
if (c <= l) {
|
|
1680
1680
|
const h = Q(
|
|
1681
1681
|
c,
|
|
1682
|
-
e +
|
|
1682
|
+
e + s,
|
|
1683
1683
|
l
|
|
1684
1684
|
);
|
|
1685
1685
|
return { leading: e, length: h - e };
|
|
@@ -1700,7 +1700,7 @@ function Tt(e, t = !0) {
|
|
|
1700
1700
|
const i = e.getBoundingClientRect(), o = !e.classList.contains("pluno-pa-widget--open") && !e.classList.contains("pluno-pa-widget--closing");
|
|
1701
1701
|
return {
|
|
1702
1702
|
width: t && o && i.width > 0 ? i.width : Math.min(Ro, n.width - 36),
|
|
1703
|
-
height: t && o && i.height > 0 ? i.height : e.classList.contains("pluno-pa-widget--scribble") ? ya :
|
|
1703
|
+
height: t && o && i.height > 0 ? i.height : e.classList.contains("pluno-pa-widget--scribble") ? ya : zo
|
|
1704
1704
|
};
|
|
1705
1705
|
}
|
|
1706
1706
|
function Ba() {
|
|
@@ -1818,7 +1818,7 @@ function Ct(e, t) {
|
|
|
1818
1818
|
y: e.anchor.startsWith("bottom") ? n.height - t.height - e.y : e.y
|
|
1819
1819
|
};
|
|
1820
1820
|
}
|
|
1821
|
-
function
|
|
1821
|
+
function so(e, t) {
|
|
1822
1822
|
const n = Ha(e, t), i = ee();
|
|
1823
1823
|
return {
|
|
1824
1824
|
anchor: n,
|
|
@@ -1877,7 +1877,7 @@ function co(e) {
|
|
|
1877
1877
|
function ee() {
|
|
1878
1878
|
return {
|
|
1879
1879
|
width: window.innerWidth || document.documentElement.clientWidth || Ro + N * 2,
|
|
1880
|
-
height: window.innerHeight || document.documentElement.clientHeight ||
|
|
1880
|
+
height: window.innerHeight || document.documentElement.clientHeight || zo + N * 2
|
|
1881
1881
|
};
|
|
1882
1882
|
}
|
|
1883
1883
|
function nn(e) {
|
|
@@ -1932,7 +1932,7 @@ function Va(e) {
|
|
|
1932
1932
|
function lt(e) {
|
|
1933
1933
|
e.style.height = "0px", e.style.height = `${e.scrollHeight}px`, e.style.overflowY = e.scrollHeight > e.clientHeight ? "auto" : "hidden";
|
|
1934
1934
|
}
|
|
1935
|
-
function
|
|
1935
|
+
function pt(e, t = () => !0) {
|
|
1936
1936
|
e.scrollTop = e.scrollHeight, window.requestAnimationFrame(() => {
|
|
1937
1937
|
t() && (e.scrollTop = e.scrollHeight);
|
|
1938
1938
|
});
|
|
@@ -1976,8 +1976,8 @@ function Qa(e, t) {
|
|
|
1976
1976
|
];
|
|
1977
1977
|
for (const [r, l] of o)
|
|
1978
1978
|
if (i >= l) {
|
|
1979
|
-
const
|
|
1980
|
-
return r === "min" ? `${
|
|
1979
|
+
const s = Math.max(1, Math.floor(i / l));
|
|
1980
|
+
return r === "min" ? `${s} min` : `${s} ${r}${s === 1 ? "" : "s"}`;
|
|
1981
1981
|
}
|
|
1982
1982
|
return "now";
|
|
1983
1983
|
}
|
|
@@ -2001,8 +2001,8 @@ function er(e, t, n, i, o) {
|
|
|
2001
2001
|
function tr(e, t, n, i) {
|
|
2002
2002
|
const o = document.createElement("form");
|
|
2003
2003
|
if (o.className = "pluno-pa-widget__launcher", i && o.classList.add("pluno-pa-widget__launcher--minimizable"), n) {
|
|
2004
|
-
const
|
|
2005
|
-
|
|
2004
|
+
const p = document.createElement("button");
|
|
2005
|
+
p.type = "button", p.className = "pluno-pa-widget__launcher-drag-handle", p.setAttribute("aria-label", "Move Pluno launcher"), p.title = "Move Pluno launcher", o.appendChild(p);
|
|
2006
2006
|
}
|
|
2007
2007
|
o.appendChild(
|
|
2008
2008
|
Go(
|
|
@@ -2019,10 +2019,10 @@ function tr(e, t, n, i) {
|
|
|
2019
2019
|
r.className = "pluno-pa-widget__launcher-run-indicator", o.appendChild(r);
|
|
2020
2020
|
const l = document.createElement("input");
|
|
2021
2021
|
l.className = "pluno-pa-widget__launcher-input", l.type = "text", l.placeholder = e, l.setAttribute("aria-label", e), o.appendChild(l);
|
|
2022
|
-
const
|
|
2023
|
-
if (
|
|
2024
|
-
const
|
|
2025
|
-
|
|
2022
|
+
const s = dt("Working...");
|
|
2023
|
+
if (s.classList.add("pluno-pa-widget__status--launcher"), o.appendChild(s), i) {
|
|
2024
|
+
const p = document.createElement("button");
|
|
2025
|
+
p.type = "button", p.className = "pluno-pa-widget__launcher-minimize", p.textContent = "-", p.setAttribute("aria-label", "Minimize Pluno on this site"), p.title = "Minimize Pluno on this site", o.appendChild(p);
|
|
2026
2026
|
}
|
|
2027
2027
|
return o;
|
|
2028
2028
|
}
|
|
@@ -2041,15 +2041,15 @@ function nr(e) {
|
|
|
2041
2041
|
r.className = "pluno-pa-widget__active-users-counter", r.hidden = !0, n.appendChild(r);
|
|
2042
2042
|
const l = document.createElement("button");
|
|
2043
2043
|
l.type = "button", l.className = "pluno-pa-widget__timeline-jump", l.textContent = "New messages ↓", l.hidden = !0, n.appendChild(l);
|
|
2044
|
-
const
|
|
2045
|
-
return
|
|
2044
|
+
const s = document.createElement("div");
|
|
2045
|
+
return s.className = "pluno-pa-widget__top-actions", s.appendChild(
|
|
2046
2046
|
It(
|
|
2047
2047
|
"pluno-pa-widget__history",
|
|
2048
2048
|
bn(),
|
|
2049
2049
|
gr(),
|
|
2050
2050
|
!0
|
|
2051
2051
|
)
|
|
2052
|
-
), n.appendChild(
|
|
2052
|
+
), n.appendChild(s), n.appendChild(rr()), t.appendChild(n), t.appendChild(or()), t.appendChild(ir()), t.appendChild(ar()), t.appendChild(Ce("left", "Resize Pluno from left")), t.appendChild(
|
|
2053
2053
|
Ce("right", "Resize Pluno from right")
|
|
2054
2054
|
), t.appendChild(Ce("top", "Resize Pluno from top")), t.appendChild(
|
|
2055
2055
|
Ce("bottom", "Resize Pluno from bottom")
|
|
@@ -2111,10 +2111,10 @@ function ar() {
|
|
|
2111
2111
|
r.className = "pluno-pa-widget__attachment-input", r.type = "file", r.multiple = !0, r.tabIndex = -1, r.setAttribute("aria-hidden", "true"), o.appendChild(r);
|
|
2112
2112
|
const l = document.createElement("button");
|
|
2113
2113
|
l.type = "button", l.className = "pluno-pa-widget__attach", l.setAttribute("aria-label", "Attach files"), l.title = "Attach files", l.appendChild(mr()), l.appendChild(fr()), o.appendChild(l);
|
|
2114
|
-
const
|
|
2115
|
-
|
|
2116
|
-
const
|
|
2117
|
-
|
|
2114
|
+
const s = document.createElement("textarea");
|
|
2115
|
+
s.className = "pluno-pa-widget__input", s.rows = 1, s.placeholder = "Ask for anything...", o.appendChild(s);
|
|
2116
|
+
const p = document.createElement("button");
|
|
2117
|
+
p.type = "button", p.className = "pluno-pa-widget__send", p.setAttribute("aria-label", "Send"), p.appendChild(qo()), o.appendChild(p), e.appendChild(o);
|
|
2118
2118
|
const c = document.createElement("div");
|
|
2119
2119
|
c.className = "pluno-pa-widget__composer-meta";
|
|
2120
2120
|
const g = document.createElement("a");
|
|
@@ -2172,13 +2172,13 @@ function Wo(e, t) {
|
|
|
2172
2172
|
function ke(e, t) {
|
|
2173
2173
|
const n = `pluno-pa-character-${oo}`;
|
|
2174
2174
|
oo += 1;
|
|
2175
|
-
const i = t.scribbleStyle ?
|
|
2175
|
+
const i = t.scribbleStyle ? sr(t.accentColor, n) : pr(t.accentColor, n), o = e.split(/\s+/).filter(Boolean);
|
|
2176
2176
|
return i.setAttribute(
|
|
2177
2177
|
"class",
|
|
2178
2178
|
o.includes("pluno-pa-widget__character") ? e : `pluno-pa-widget__character ${e}`
|
|
2179
2179
|
), i.setAttribute("aria-hidden", "true"), i.setAttribute("focusable", "false"), i.removeAttribute("role"), i.removeAttribute("aria-label"), i;
|
|
2180
2180
|
}
|
|
2181
|
-
function
|
|
2181
|
+
function pr(e, t) {
|
|
2182
2182
|
const n = Li(e), i = {
|
|
2183
2183
|
boltFill: `${t}-boltFill`,
|
|
2184
2184
|
boltEdge: `${t}-boltEdge`,
|
|
@@ -2199,7 +2199,7 @@ function sr(e, t) {
|
|
|
2199
2199
|
gradientUnits: "userSpaceOnUse"
|
|
2200
2200
|
});
|
|
2201
2201
|
G(l, "0", n.top), G(l, "0.36", n.middle), G(l, "0.72", n.bottom), G(l, "1", n.bottom);
|
|
2202
|
-
const
|
|
2202
|
+
const s = x(r, "linearGradient", {
|
|
2203
2203
|
id: i.boltEdge,
|
|
2204
2204
|
x1: "470",
|
|
2205
2205
|
y1: "145",
|
|
@@ -2207,14 +2207,14 @@ function sr(e, t) {
|
|
|
2207
2207
|
y2: "980",
|
|
2208
2208
|
gradientUnits: "userSpaceOnUse"
|
|
2209
2209
|
});
|
|
2210
|
-
G(
|
|
2211
|
-
const
|
|
2210
|
+
G(s, "0", n.edgeStart), G(s, "0.32", n.edgeMiddle), G(s, "0.78", n.edgeEnd), G(s, "1", n.edgeEnd);
|
|
2211
|
+
const p = x(r, "radialGradient", {
|
|
2212
2212
|
id: i.boltGlow,
|
|
2213
2213
|
cx: "50%",
|
|
2214
2214
|
cy: "22%",
|
|
2215
2215
|
r: "82%"
|
|
2216
2216
|
});
|
|
2217
|
-
G(
|
|
2217
|
+
G(p, "0", n.glow, "0.72"), G(p, "0.5", n.middle, "0.44"), G(p, "1", n.bottom, "0");
|
|
2218
2218
|
const c = x(r, "radialGradient", {
|
|
2219
2219
|
id: i.eyeWhite,
|
|
2220
2220
|
cx: "35%",
|
|
@@ -2375,13 +2375,13 @@ function sr(e, t) {
|
|
|
2375
2375
|
i
|
|
2376
2376
|
), o;
|
|
2377
2377
|
}
|
|
2378
|
-
function
|
|
2378
|
+
function sr(e, t) {
|
|
2379
2379
|
const n = Lo(e), i = {
|
|
2380
2380
|
clip: `${t}-scribbleBoltClip`,
|
|
2381
2381
|
wobble: `${t}-scribbleBoltWobble`
|
|
2382
2382
|
}, o = Ho(), r = x(o, "defs"), l = x(r, "clipPath", { id: i.clip });
|
|
2383
2383
|
x(l, "path", { d: kt });
|
|
2384
|
-
const
|
|
2384
|
+
const s = x(r, "filter", {
|
|
2385
2385
|
id: i.wobble,
|
|
2386
2386
|
x: "-10%",
|
|
2387
2387
|
y: "-10%",
|
|
@@ -2389,20 +2389,20 @@ function pr(e, t) {
|
|
|
2389
2389
|
height: "120%",
|
|
2390
2390
|
"color-interpolation-filters": "sRGB"
|
|
2391
2391
|
});
|
|
2392
|
-
x(
|
|
2392
|
+
x(s, "feTurbulence", {
|
|
2393
2393
|
type: "fractalNoise",
|
|
2394
2394
|
baseFrequency: "0.011",
|
|
2395
2395
|
numOctaves: "3",
|
|
2396
2396
|
seed: "7",
|
|
2397
2397
|
result: "noise"
|
|
2398
|
-
}), x(
|
|
2398
|
+
}), x(s, "feDisplacementMap", {
|
|
2399
2399
|
in: "SourceGraphic",
|
|
2400
2400
|
in2: "noise",
|
|
2401
2401
|
scale: "16",
|
|
2402
2402
|
xChannelSelector: "R",
|
|
2403
2403
|
yChannelSelector: "G"
|
|
2404
2404
|
});
|
|
2405
|
-
const
|
|
2405
|
+
const p = x(o, "g", { filter: J(i.wobble) }), c = x(p, "g", {
|
|
2406
2406
|
"clip-path": J(i.clip)
|
|
2407
2407
|
});
|
|
2408
2408
|
return x(c, "path", {
|
|
@@ -2414,14 +2414,14 @@ function pr(e, t) {
|
|
|
2414
2414
|
"stroke-linejoin": "round",
|
|
2415
2415
|
opacity: "0.9",
|
|
2416
2416
|
transform: "rotate(-14 627 600)"
|
|
2417
|
-
}), x(
|
|
2417
|
+
}), x(p, "path", {
|
|
2418
2418
|
d: kt,
|
|
2419
2419
|
fill: "none",
|
|
2420
2420
|
stroke: Lt,
|
|
2421
2421
|
"stroke-width": "18",
|
|
2422
2422
|
"stroke-linejoin": "round"
|
|
2423
2423
|
}), go(
|
|
2424
|
-
|
|
2424
|
+
p,
|
|
2425
2425
|
"rotate(-2 528 463)",
|
|
2426
2426
|
"528",
|
|
2427
2427
|
"463",
|
|
@@ -2430,7 +2430,7 @@ function pr(e, t) {
|
|
|
2430
2430
|
"557",
|
|
2431
2431
|
"447"
|
|
2432
2432
|
), go(
|
|
2433
|
-
|
|
2433
|
+
p,
|
|
2434
2434
|
"rotate(2 717 462)",
|
|
2435
2435
|
"717",
|
|
2436
2436
|
"462",
|
|
@@ -2442,35 +2442,35 @@ function pr(e, t) {
|
|
|
2442
2442
|
}
|
|
2443
2443
|
function Ho() {
|
|
2444
2444
|
return A("svg", {
|
|
2445
|
-
xmlns:
|
|
2445
|
+
xmlns: Mo,
|
|
2446
2446
|
viewBox: "0 0 1254 1254"
|
|
2447
2447
|
});
|
|
2448
2448
|
}
|
|
2449
|
-
function uo(e, t, n, i, o, r, l,
|
|
2449
|
+
function uo(e, t, n, i, o, r, l, s, p) {
|
|
2450
2450
|
const c = x(e, "g", { transform: t });
|
|
2451
2451
|
x(c, "ellipse", {
|
|
2452
2452
|
cx: n,
|
|
2453
2453
|
cy: i,
|
|
2454
2454
|
rx: "73",
|
|
2455
2455
|
ry: "80",
|
|
2456
|
-
fill: J(
|
|
2456
|
+
fill: J(p.eyeWhite)
|
|
2457
2457
|
}), x(c, "ellipse", {
|
|
2458
2458
|
cx: o,
|
|
2459
2459
|
cy: r,
|
|
2460
2460
|
rx: "49",
|
|
2461
2461
|
ry: "57",
|
|
2462
|
-
fill: J(
|
|
2463
|
-
filter: J(
|
|
2462
|
+
fill: J(p.pupil),
|
|
2463
|
+
filter: J(p.pupilGloss)
|
|
2464
2464
|
}), x(c, "circle", {
|
|
2465
2465
|
cx: l,
|
|
2466
|
-
cy:
|
|
2466
|
+
cy: s,
|
|
2467
2467
|
r: "18",
|
|
2468
2468
|
fill: "#ffffff"
|
|
2469
2469
|
});
|
|
2470
2470
|
}
|
|
2471
|
-
function go(e, t, n, i, o, r, l,
|
|
2472
|
-
const
|
|
2473
|
-
x(
|
|
2471
|
+
function go(e, t, n, i, o, r, l, s) {
|
|
2472
|
+
const p = x(e, "g", { transform: t });
|
|
2473
|
+
x(p, "ellipse", {
|
|
2474
2474
|
cx: n,
|
|
2475
2475
|
cy: i,
|
|
2476
2476
|
rx: "73",
|
|
@@ -2478,15 +2478,15 @@ function go(e, t, n, i, o, r, l, p) {
|
|
|
2478
2478
|
fill: "#ffffff",
|
|
2479
2479
|
stroke: Lt,
|
|
2480
2480
|
"stroke-width": "13"
|
|
2481
|
-
}), x(
|
|
2481
|
+
}), x(p, "ellipse", {
|
|
2482
2482
|
cx: o,
|
|
2483
2483
|
cy: r,
|
|
2484
2484
|
rx: "45",
|
|
2485
2485
|
ry: "53",
|
|
2486
2486
|
fill: Lt
|
|
2487
|
-
}), x(
|
|
2487
|
+
}), x(p, "circle", {
|
|
2488
2488
|
cx: l,
|
|
2489
|
-
cy:
|
|
2489
|
+
cy: s,
|
|
2490
2490
|
r: "16",
|
|
2491
2491
|
fill: "#ffffff"
|
|
2492
2492
|
});
|
|
@@ -2776,7 +2776,7 @@ function de(e, t, n, i, o, r) {
|
|
|
2776
2776
|
return o && (l.stroke = o, l["stroke-linecap"] = "round", l["stroke-linejoin"] = "round"), r && (l["stroke-width"] = r), A("svg", l);
|
|
2777
2777
|
}
|
|
2778
2778
|
function A(e, t = {}) {
|
|
2779
|
-
const n = document.createElementNS(
|
|
2779
|
+
const n = document.createElementNS(Mo, e);
|
|
2780
2780
|
for (const [i, o] of Object.entries(t))
|
|
2781
2781
|
n.setAttribute(i, o);
|
|
2782
2782
|
return n;
|
|
@@ -2794,8 +2794,8 @@ function xr(e, t, n) {
|
|
|
2794
2794
|
r.className = "pluno-pa-widget__attachment", r.appendChild(yr(o));
|
|
2795
2795
|
const l = document.createElement("span");
|
|
2796
2796
|
l.textContent = o.name, r.appendChild(l);
|
|
2797
|
-
const
|
|
2798
|
-
|
|
2797
|
+
const s = document.createElement("button");
|
|
2798
|
+
s.type = "button", s.setAttribute("aria-label", `Remove ${o.name}`), s.appendChild(br()), s.addEventListener("click", () => n(i)), r.appendChild(s), e.appendChild(r);
|
|
2799
2799
|
}
|
|
2800
2800
|
}
|
|
2801
2801
|
function yr(e) {
|
|
@@ -2804,20 +2804,20 @@ function yr(e) {
|
|
|
2804
2804
|
const i = document.createElement("img");
|
|
2805
2805
|
return i.src = n, i.alt = "", i.setAttribute("aria-hidden", "true"), i.addEventListener(
|
|
2806
2806
|
"error",
|
|
2807
|
-
() => i.replaceWith(
|
|
2807
|
+
() => i.replaceWith(se(e))
|
|
2808
2808
|
), i;
|
|
2809
2809
|
}
|
|
2810
2810
|
if (t === "video" && n) {
|
|
2811
2811
|
const i = document.createElement("video");
|
|
2812
2812
|
return i.src = n, i.muted = !0, i.preload = "metadata", i.setAttribute("aria-hidden", "true"), i.addEventListener(
|
|
2813
2813
|
"error",
|
|
2814
|
-
() => i.replaceWith(
|
|
2814
|
+
() => i.replaceWith(se(e))
|
|
2815
2815
|
), i.addEventListener(
|
|
2816
2816
|
"stalled",
|
|
2817
|
-
() => i.replaceWith(
|
|
2817
|
+
() => i.replaceWith(se(e))
|
|
2818
2818
|
), i;
|
|
2819
2819
|
}
|
|
2820
|
-
return
|
|
2820
|
+
return se(e);
|
|
2821
2821
|
}
|
|
2822
2822
|
function vr(e, t) {
|
|
2823
2823
|
const n = Cn(e), i = jo(e);
|
|
@@ -2828,7 +2828,7 @@ function vr(e, t) {
|
|
|
2828
2828
|
o.addEventListener(
|
|
2829
2829
|
"error",
|
|
2830
2830
|
() => o.replaceWith(
|
|
2831
|
-
|
|
2831
|
+
se(e, "message")
|
|
2832
2832
|
),
|
|
2833
2833
|
{ once: !0 }
|
|
2834
2834
|
), o.src = l ?? i;
|
|
@@ -2843,23 +2843,23 @@ function vr(e, t) {
|
|
|
2843
2843
|
return o.className = "pluno-pa-widget__message-attachment-preview pluno-pa-widget__message-attachment-preview--pdf", o.data = i, o.type = "application/pdf", o.setAttribute("aria-label", e.name), o.addEventListener(
|
|
2844
2844
|
"error",
|
|
2845
2845
|
() => o.replaceWith(
|
|
2846
|
-
|
|
2846
|
+
se(e, "message")
|
|
2847
2847
|
)
|
|
2848
|
-
), o.appendChild(
|
|
2848
|
+
), o.appendChild(se(e, "message")), o;
|
|
2849
2849
|
}
|
|
2850
2850
|
if (n === "video" && i) {
|
|
2851
2851
|
const o = document.createElement("video");
|
|
2852
2852
|
return o.className = "pluno-pa-widget__message-attachment-preview", o.src = i, o.muted = !0, o.preload = "metadata", o.addEventListener(
|
|
2853
2853
|
"error",
|
|
2854
|
-
() => o.replaceWith(
|
|
2854
|
+
() => o.replaceWith(se(e, "message"))
|
|
2855
2855
|
), o.addEventListener(
|
|
2856
2856
|
"stalled",
|
|
2857
|
-
() => o.replaceWith(
|
|
2857
|
+
() => o.replaceWith(se(e, "message"))
|
|
2858
2858
|
), o;
|
|
2859
2859
|
}
|
|
2860
|
-
return
|
|
2860
|
+
return se(e, "message");
|
|
2861
2861
|
}
|
|
2862
|
-
function
|
|
2862
|
+
function se(e, t = "composer") {
|
|
2863
2863
|
if (t === "composer") {
|
|
2864
2864
|
const r = document.createElement("span");
|
|
2865
2865
|
return r.className = "pluno-pa-widget__attachment-file", r.textContent = mo(e), r;
|
|
@@ -2975,18 +2975,18 @@ function wo(e, t) {
|
|
|
2975
2975
|
t.trim().length !== 0 && window.open(t, "_blank", "noopener,noreferrer");
|
|
2976
2976
|
}), n;
|
|
2977
2977
|
}
|
|
2978
|
-
function
|
|
2978
|
+
function pn(e, t) {
|
|
2979
2979
|
return e.messages.filter(
|
|
2980
2980
|
(i) => !Xo(i)
|
|
2981
2981
|
).length === 0 && !e.assistantDraft && !e.lastError && !e.isThinking && !t;
|
|
2982
2982
|
}
|
|
2983
|
-
function Ir(e, t, n, i, o, r, l,
|
|
2984
|
-
const te =
|
|
2983
|
+
function Ir(e, t, n, i, o, r, l, s, p, c, g, h, m, v, E, O, u, F, w, R, M, L) {
|
|
2984
|
+
const te = Mr(r), W = Dr(
|
|
2985
2985
|
te.filter((S) => !Xo(S))
|
|
2986
2986
|
), Ye = e.scrollTop, Be = [], ce = /* @__PURE__ */ new Set(), U = (S) => {
|
|
2987
2987
|
Be.push(S);
|
|
2988
2988
|
};
|
|
2989
|
-
Qo(n, r.isThinking), o.hidden = !
|
|
2989
|
+
Qo(n, r.isThinking), o.hidden = !s, s && l !== null && Wo(o, l);
|
|
2990
2990
|
const y = W.length > 0 || !!r.assistantDraft || r.isThinking;
|
|
2991
2991
|
if (i(y), u || W.length === 0 && !r.assistantDraft && !r.lastError && !r.isThinking) {
|
|
2992
2992
|
const S = document.createElement("div");
|
|
@@ -3041,22 +3041,22 @@ function Ir(e, t, n, i, o, r, l, p, s, c, g, h, m, v, E, O, u, F, w, R, z, L) {
|
|
|
3041
3041
|
v()
|
|
3042
3042
|
);
|
|
3043
3043
|
return U(T), B = null, $ = T, X = [], ue = S, !0;
|
|
3044
|
-
},
|
|
3044
|
+
}, z = () => {
|
|
3045
3045
|
for (const S of Le)
|
|
3046
3046
|
U(S), B = null, $ = S;
|
|
3047
3047
|
Le = [];
|
|
3048
3048
|
};
|
|
3049
3049
|
for (let S = 0; S < W.length; S += 1) {
|
|
3050
3050
|
const T = W[S];
|
|
3051
|
-
if (T.role === "tool" && T.integrationAuthRequest &&
|
|
3051
|
+
if (T.role === "tool" && T.integrationAuthRequest && M) {
|
|
3052
3052
|
const b = Pr(
|
|
3053
3053
|
T.integrationAuthRequest,
|
|
3054
|
-
|
|
3054
|
+
M.states.get(
|
|
3055
3055
|
T.integrationAuthRequest.authRequestId
|
|
3056
3056
|
) ?? {
|
|
3057
|
-
status:
|
|
3057
|
+
status: M.initialStatus
|
|
3058
3058
|
},
|
|
3059
|
-
|
|
3059
|
+
M.onConnect
|
|
3060
3060
|
);
|
|
3061
3061
|
Le.push(b);
|
|
3062
3062
|
continue;
|
|
@@ -3089,11 +3089,11 @@ function Ir(e, t, n, i, o, r, l, p, s, c, g, h, m, v, E, O, u, F, w, R, z, L) {
|
|
|
3089
3089
|
const q = document.createElement("a");
|
|
3090
3090
|
q.className = "pluno-pa-widget__error-retry", q.href = T.securitySettingsUrl, q.target = "_blank", q.rel = "noreferrer", q.textContent = "Security settings", b.appendChild(q);
|
|
3091
3091
|
}
|
|
3092
|
-
U(b), B = k ? b : null, $ = k ? null : b,
|
|
3092
|
+
U(b), B = k ? b : null, $ = k ? null : b, z();
|
|
3093
3093
|
}
|
|
3094
3094
|
continue;
|
|
3095
3095
|
}
|
|
3096
|
-
T.role === "user" &&
|
|
3096
|
+
T.role === "user" && z();
|
|
3097
3097
|
const P = ge(), ye = yn(T.content);
|
|
3098
3098
|
if (T.role === "assistant" && !P) {
|
|
3099
3099
|
const b = Jo(v());
|
|
@@ -3106,7 +3106,7 @@ function Ir(e, t, n, i, o, r, l, p, s, c, g, h, m, v, E, O, u, F, w, R, z, L) {
|
|
|
3106
3106
|
ce,
|
|
3107
3107
|
R
|
|
3108
3108
|
);
|
|
3109
|
-
U(ne), B = ne, $ = null, T.role === "assistant" &&
|
|
3109
|
+
U(ne), B = ne, $ = null, T.role === "assistant" && z();
|
|
3110
3110
|
}
|
|
3111
3111
|
const Xe = ge(), Ae = W[W.length - 1]?.role === "assistant";
|
|
3112
3112
|
if (r.isThinking && !Ae && !ct)
|
|
@@ -3150,14 +3150,14 @@ function Ir(e, t, n, i, o, r, l, p, s, c, g, h, m, v, E, O, u, F, w, R, z, L) {
|
|
|
3150
3150
|
});
|
|
3151
3151
|
U(S), L.onSeen(Ie), B = null, $ = S;
|
|
3152
3152
|
}
|
|
3153
|
-
|
|
3153
|
+
z(), B?.classList.add(
|
|
3154
3154
|
"pluno-pa-widget__message--bottom-reserve"
|
|
3155
3155
|
), $?.classList.add(
|
|
3156
3156
|
"pluno-pa-widget__bottom-reserve-compact"
|
|
3157
|
-
), U(t),
|
|
3157
|
+
), U(t), zr(
|
|
3158
3158
|
h,
|
|
3159
3159
|
ce
|
|
3160
|
-
), bo(e, Be),
|
|
3160
|
+
), bo(e, Be), p ? pt(e, c) : e.scrollTop = Ye;
|
|
3161
3161
|
}
|
|
3162
3162
|
function Pr(e, t, n) {
|
|
3163
3163
|
const i = document.createElement("section");
|
|
@@ -3169,13 +3169,13 @@ function Pr(e, t, n) {
|
|
|
3169
3169
|
}
|
|
3170
3170
|
const r = document.createElement("div"), l = document.createElement("strong");
|
|
3171
3171
|
l.textContent = `Connect ${e.appName}`;
|
|
3172
|
-
const
|
|
3173
|
-
if (
|
|
3172
|
+
const s = document.createElement("span");
|
|
3173
|
+
if (s.textContent = "Authenticate in this browser so Pluno can continue your task.", r.append(l, s), o.appendChild(r), i.appendChild(o), t.error) {
|
|
3174
3174
|
const c = document.createElement("div");
|
|
3175
3175
|
c.className = "pluno-pa-widget__integration-auth-error", c.textContent = t.error, i.appendChild(c);
|
|
3176
3176
|
}
|
|
3177
|
-
const
|
|
3178
|
-
return
|
|
3177
|
+
const p = document.createElement("button");
|
|
3178
|
+
return p.type = "button", p.className = "pluno-pa-widget__integration-auth-button", p.disabled = t.status === "checking" || t.status === "connecting" || t.status === "completed", t.status === "checking" ? p.textContent = "Checking connection..." : t.status === "connecting" ? p.textContent = "Connecting..." : t.status === "completed" ? p.textContent = "Connected" : t.status === "expired" || t.status === "cancelled" ? p.textContent = `Reconnect ${e.appName}` : t.status === "error" ? p.textContent = "Try again" : p.textContent = `Connect ${e.appName}`, p.addEventListener("click", () => n(e)), i.appendChild(p), i;
|
|
3179
3179
|
}
|
|
3180
3180
|
function Nr(e, t, n, i, o) {
|
|
3181
3181
|
const r = Rr(e, t), l = r ? n.get(r) : void 0;
|
|
@@ -3183,17 +3183,17 @@ function Nr(e, t, n, i, o) {
|
|
|
3183
3183
|
return l.classList.remove(
|
|
3184
3184
|
"pluno-pa-widget__message--bottom-reserve"
|
|
3185
3185
|
), i.add(r), l;
|
|
3186
|
-
const
|
|
3187
|
-
if (
|
|
3186
|
+
const s = document.createElement("div");
|
|
3187
|
+
if (s.className = `pluno-pa-widget__message pluno-pa-widget__message--${e.role}`, e.role === "assistant" ? (e.phase && (s.dataset.phase = e.phase), Zr(s, t)) : s.textContent = t, e.role === "user" && e.attachments?.length && s.appendChild(
|
|
3188
3188
|
Fr(
|
|
3189
3189
|
e.attachments,
|
|
3190
3190
|
o
|
|
3191
3191
|
)
|
|
3192
3192
|
), e.phase !== "commentary") {
|
|
3193
|
-
const
|
|
3194
|
-
|
|
3193
|
+
const p = document.createElement("div");
|
|
3194
|
+
p.className = "pluno-pa-widget__message-actions", p.appendChild(Wr(t)), s.appendChild(p);
|
|
3195
3195
|
}
|
|
3196
|
-
return r && (n.set(r,
|
|
3196
|
+
return r && (n.set(r, s), i.add(r)), s;
|
|
3197
3197
|
}
|
|
3198
3198
|
function Rr(e, t) {
|
|
3199
3199
|
return e.role !== "user" || !e.attachments?.length ? null : JSON.stringify({
|
|
@@ -3213,7 +3213,7 @@ function Rr(e, t) {
|
|
|
3213
3213
|
})
|
|
3214
3214
|
});
|
|
3215
3215
|
}
|
|
3216
|
-
function
|
|
3216
|
+
function zr(e, t) {
|
|
3217
3217
|
for (const n of e.keys())
|
|
3218
3218
|
t.has(n) || e.delete(n);
|
|
3219
3219
|
}
|
|
@@ -3231,7 +3231,7 @@ function bo(e, t) {
|
|
|
3231
3231
|
n = n.nextSibling, e.removeChild(i);
|
|
3232
3232
|
}
|
|
3233
3233
|
}
|
|
3234
|
-
function
|
|
3234
|
+
function Mr(e) {
|
|
3235
3235
|
if (!e.assistantDraft)
|
|
3236
3236
|
return [...e.messages];
|
|
3237
3237
|
const t = {
|
|
@@ -3300,24 +3300,24 @@ function xn(e) {
|
|
|
3300
3300
|
function _o(e, t) {
|
|
3301
3301
|
return !e.runId || !t.runId ? !0 : e.runId === t.runId;
|
|
3302
3302
|
}
|
|
3303
|
-
function xo(e, t, n, i, o, r, l,
|
|
3303
|
+
function xo(e, t, n, i, o, r, l, s) {
|
|
3304
3304
|
e.replaceChildren(), Qo(t, !1), t.disabled = !0, n(!1);
|
|
3305
|
-
const
|
|
3306
|
-
|
|
3305
|
+
const p = document.createElement("div");
|
|
3306
|
+
p.className = "pluno-pa-widget__empty-state pluno-pa-widget__empty-state--starter";
|
|
3307
3307
|
const c = ke(
|
|
3308
3308
|
"pluno-pa-widget__character--empty",
|
|
3309
3309
|
i()
|
|
3310
3310
|
);
|
|
3311
|
-
|
|
3311
|
+
p.appendChild(c);
|
|
3312
3312
|
const g = document.createElement("div");
|
|
3313
|
-
if (g.className = "pluno-pa-widget__empty", g.textContent = o,
|
|
3313
|
+
if (g.className = "pluno-pa-widget__empty", g.textContent = o, p.appendChild(g), l) {
|
|
3314
3314
|
const h = document.createElement("a");
|
|
3315
|
-
h.className = "pluno-pa-widget__login", h.href = l, h.target = "_blank", h.rel = "noopener noreferrer", h.textContent = r,
|
|
3315
|
+
h.className = "pluno-pa-widget__login", h.href = l, h.target = "_blank", h.rel = "noopener noreferrer", h.textContent = r, p.appendChild(h);
|
|
3316
3316
|
} else {
|
|
3317
3317
|
const h = document.createElement("button");
|
|
3318
|
-
h.type = "button", h.className = "pluno-pa-widget__login", h.textContent = r, h.addEventListener("click", () =>
|
|
3318
|
+
h.type = "button", h.className = "pluno-pa-widget__login", h.textContent = r, h.addEventListener("click", () => s?.()), p.appendChild(h);
|
|
3319
3319
|
}
|
|
3320
|
-
e.appendChild(
|
|
3320
|
+
e.appendChild(p);
|
|
3321
3321
|
}
|
|
3322
3322
|
function Fr(e, t) {
|
|
3323
3323
|
const n = document.createElement("div");
|
|
@@ -3348,26 +3348,26 @@ function Hr(e, t) {
|
|
|
3348
3348
|
r.className = "pluno-pa-widget__share-prompt-copy";
|
|
3349
3349
|
const l = document.createElement("strong");
|
|
3350
3350
|
l.textContent = n === "referral" ? "Know someone who'd love this?" : "Share Pluno, earn 2,000 credits", r.appendChild(l);
|
|
3351
|
-
const
|
|
3351
|
+
const s = document.createElement("span");
|
|
3352
3352
|
if (n === "referral")
|
|
3353
|
-
|
|
3353
|
+
s.textContent = "Give them 2,000 free credits—and earn 2,000 when they try Pluno.";
|
|
3354
3354
|
else {
|
|
3355
|
-
if (
|
|
3355
|
+
if (s.appendChild(
|
|
3356
3356
|
document.createTextNode("Post on LinkedIn, X, or Instagram, then ")
|
|
3357
3357
|
), t.socialPostRewardsUrl) {
|
|
3358
3358
|
const m = document.createElement("a");
|
|
3359
|
-
m.className = "pluno-pa-widget__share-prompt-reward", m.href = t.socialPostRewardsUrl, m.target = "_blank", m.rel = "noopener noreferrer", m.textContent = "submit your post URL",
|
|
3359
|
+
m.className = "pluno-pa-widget__share-prompt-reward", m.href = t.socialPostRewardsUrl, m.target = "_blank", m.rel = "noopener noreferrer", m.textContent = "submit your post URL", s.appendChild(m);
|
|
3360
3360
|
} else
|
|
3361
|
-
|
|
3362
|
-
|
|
3361
|
+
s.appendChild(document.createTextNode("submit your post URL"));
|
|
3362
|
+
s.appendChild(document.createTextNode(" for approval."));
|
|
3363
3363
|
}
|
|
3364
|
-
if (r.appendChild(
|
|
3364
|
+
if (r.appendChild(s), t.error) {
|
|
3365
3365
|
const m = document.createElement("span");
|
|
3366
3366
|
m.className = "pluno-pa-widget__share-prompt-error", m.textContent = t.error, r.appendChild(m);
|
|
3367
3367
|
}
|
|
3368
3368
|
o.appendChild(r);
|
|
3369
|
-
const
|
|
3370
|
-
|
|
3369
|
+
const p = document.createElement("div");
|
|
3370
|
+
p.className = "pluno-pa-widget__share-prompt-actions";
|
|
3371
3371
|
const c = document.createElement("div");
|
|
3372
3372
|
if (c.className = "pluno-pa-widget__share-prompt-primary-actions", n === "referral") {
|
|
3373
3373
|
const m = document.createElement("button");
|
|
@@ -3380,9 +3380,9 @@ function Hr(e, t) {
|
|
|
3380
3380
|
v.className = "pluno-pa-widget__share-prompt-social", v.href = m.href, v.target = "_blank", v.rel = "noopener noreferrer", v.setAttribute("aria-label", `Open ${m.label}`), v.title = m.label, v.appendChild($r(m.id)), v.addEventListener("click", () => t.onSocialShare(e)), c.appendChild(v);
|
|
3381
3381
|
}
|
|
3382
3382
|
const g = document.createElement("button");
|
|
3383
|
-
g.type = "button", g.className = "pluno-pa-widget__share-prompt-dismiss", g.setAttribute("aria-label", "Dismiss share prompt"), g.title = "Dismiss", g.textContent = "Dismiss", g.addEventListener("click", () => t.onDismiss(e)), c.appendChild(g),
|
|
3383
|
+
g.type = "button", g.className = "pluno-pa-widget__share-prompt-dismiss", g.setAttribute("aria-label", "Dismiss share prompt"), g.title = "Dismiss", g.textContent = "Dismiss", g.addEventListener("click", () => t.onDismiss(e)), c.appendChild(g), p.appendChild(c);
|
|
3384
3384
|
const h = document.createElement("button");
|
|
3385
|
-
return h.type = "button", h.className = "pluno-pa-widget__share-prompt-disable", h.textContent = "Don't ask again", h.addEventListener("click", () => t.onDisable(e)),
|
|
3385
|
+
return h.type = "button", h.className = "pluno-pa-widget__share-prompt-disable", h.textContent = "Don't ask again", h.addEventListener("click", () => t.onDisable(e)), p.appendChild(h), o.appendChild(p), i.appendChild(o), i;
|
|
3386
3386
|
}
|
|
3387
3387
|
function Gr() {
|
|
3388
3388
|
const e = "https://pluno.ai/browser", t = `I just used @pluno_ai to get work done directly inside my tools. Worth trying: ${e}`;
|
|
@@ -3434,9 +3434,9 @@ function qr(e, t, n, i, o) {
|
|
|
3434
3434
|
const E = document.createElement("div");
|
|
3435
3435
|
return E.className = "pluno-pa-widget__tool-active-content", E.appendChild(dt()), E.appendChild(l), r.appendChild(E), r;
|
|
3436
3436
|
}
|
|
3437
|
-
const
|
|
3438
|
-
|
|
3439
|
-
r.classList.toggle("pluno-pa-widget__tool-group--open",
|
|
3437
|
+
const s = document.createElement("details"), p = Kr(e);
|
|
3438
|
+
s.open = n.has(p), r.classList.toggle("pluno-pa-widget__tool-group--open", s.open), s.addEventListener("toggle", () => {
|
|
3439
|
+
r.classList.toggle("pluno-pa-widget__tool-group--open", s.open), s.open ? n.add(p) : n.delete(p), i();
|
|
3440
3440
|
});
|
|
3441
3441
|
const c = document.createElement("summary");
|
|
3442
3442
|
c.className = "pluno-pa-widget__tool-summary";
|
|
@@ -3445,7 +3445,7 @@ function qr(e, t, n, i, o) {
|
|
|
3445
3445
|
), m = document.createElement("span");
|
|
3446
3446
|
m.className = "pluno-pa-widget__tool-summary-title";
|
|
3447
3447
|
const v = g ? Zo(g.content) : "Activity";
|
|
3448
|
-
return m.textContent = v, h && (m.classList.add("pluno-pa-widget__tool-summary-title--loading"), m.dataset.loadingText = v), c.appendChild(m),
|
|
3448
|
+
return m.textContent = v, h && (m.classList.add("pluno-pa-widget__tool-summary-title--loading"), m.dataset.loadingText = v), c.appendChild(m), s.appendChild(c), s.appendChild(l), r.appendChild(s), r;
|
|
3449
3449
|
}
|
|
3450
3450
|
function jr(e, t) {
|
|
3451
3451
|
const n = document.createElement("div");
|
|
@@ -3456,8 +3456,8 @@ function jr(e, t) {
|
|
|
3456
3456
|
r.className = "pluno-pa-widget__tool-line", r.dataset.eventType = o.phase === "commentary" ? "commentary" : "tool";
|
|
3457
3457
|
const l = document.createElement("span");
|
|
3458
3458
|
l.className = "pluno-pa-widget__tool-line-text";
|
|
3459
|
-
const
|
|
3460
|
-
t && o === i && o.phase !== "commentary" && (l.classList.add("pluno-pa-widget__tool-line-text--loading"), l.dataset.loadingText =
|
|
3459
|
+
const s = yn(o.content) || (o.phase === "commentary" ? "" : "Run tool"), p = o.phase === "commentary" ? s : Zo(s);
|
|
3460
|
+
t && o === i && o.phase !== "commentary" && (l.classList.add("pluno-pa-widget__tool-line-text--loading"), l.dataset.loadingText = p), l.textContent = p, r.appendChild(l), n.appendChild(r);
|
|
3461
3461
|
}
|
|
3462
3462
|
return n;
|
|
3463
3463
|
}
|
|
@@ -3496,7 +3496,7 @@ function Vr() {
|
|
|
3496
3496
|
function Qo(e, t) {
|
|
3497
3497
|
e.setAttribute("aria-label", t ? "Stop" : "Send"), e.classList.toggle("pluno-pa-widget__send--stop", t), e.replaceChildren(t ? wr() : qo());
|
|
3498
3498
|
}
|
|
3499
|
-
function
|
|
3499
|
+
function sn(e) {
|
|
3500
3500
|
let t = e.trim();
|
|
3501
3501
|
if (!t.includes("|"))
|
|
3502
3502
|
return null;
|
|
@@ -3515,7 +3515,7 @@ function Yr(e) {
|
|
|
3515
3515
|
return t.startsWith(":") && t.endsWith(":") ? "center" : t.endsWith(":") ? "right" : t.startsWith(":") ? "left" : null;
|
|
3516
3516
|
}
|
|
3517
3517
|
function Xr(e, t) {
|
|
3518
|
-
const n =
|
|
3518
|
+
const n = sn(e[t] ?? ""), i = sn(e[t + 1] ?? "");
|
|
3519
3519
|
if (!n || !i || n.length !== i.length)
|
|
3520
3520
|
return null;
|
|
3521
3521
|
const o = [];
|
|
@@ -3527,15 +3527,15 @@ function Xr(e, t) {
|
|
|
3527
3527
|
}
|
|
3528
3528
|
const r = document.createElement("div");
|
|
3529
3529
|
r.className = "pluno-pa-widget__table-scroll";
|
|
3530
|
-
const l = document.createElement("table"),
|
|
3530
|
+
const l = document.createElement("table"), s = document.createElement("thead"), p = document.createElement("tr");
|
|
3531
3531
|
n.forEach((h, m) => {
|
|
3532
3532
|
const v = document.createElement("th"), E = o[m];
|
|
3533
|
-
E && v.classList.add(`pluno-pa-widget__table-cell--${E}`), Ee(v, h),
|
|
3534
|
-
}),
|
|
3533
|
+
E && v.classList.add(`pluno-pa-widget__table-cell--${E}`), Ee(v, h), p.appendChild(v);
|
|
3534
|
+
}), s.appendChild(p), l.appendChild(s);
|
|
3535
3535
|
const c = document.createElement("tbody");
|
|
3536
3536
|
let g = t + 2;
|
|
3537
3537
|
for (; g < e.length && e[g].trim(); ) {
|
|
3538
|
-
const h =
|
|
3538
|
+
const h = sn(e[g]);
|
|
3539
3539
|
if (!h)
|
|
3540
3540
|
break;
|
|
3541
3541
|
const m = document.createElement("tr");
|
|
@@ -3572,10 +3572,10 @@ function Zr(e, t) {
|
|
|
3572
3572
|
e.appendChild(l.element), i = l.nextIndex;
|
|
3573
3573
|
continue;
|
|
3574
3574
|
}
|
|
3575
|
-
const
|
|
3576
|
-
if (
|
|
3577
|
-
const h = document.createElement(`h${
|
|
3578
|
-
Ee(h,
|
|
3575
|
+
const s = o.match(/^(#{1,3})\s+(.+)$/);
|
|
3576
|
+
if (s) {
|
|
3577
|
+
const h = document.createElement(`h${s[1].length + 2}`);
|
|
3578
|
+
Ee(h, s[2]), e.appendChild(h), i += 1;
|
|
3579
3579
|
continue;
|
|
3580
3580
|
}
|
|
3581
3581
|
if (/^\s*[-*+]\s+/.test(o)) {
|
|
@@ -3587,10 +3587,10 @@ function Zr(e, t) {
|
|
|
3587
3587
|
e.appendChild(h);
|
|
3588
3588
|
continue;
|
|
3589
3589
|
}
|
|
3590
|
-
const
|
|
3591
|
-
if (
|
|
3590
|
+
const p = o.match(/^\s*(\d+)\.\s+/);
|
|
3591
|
+
if (p) {
|
|
3592
3592
|
const h = document.createElement("ol");
|
|
3593
|
-
for (h.start = Number(
|
|
3593
|
+
for (h.start = Number(p[1]); i < n.length && /^\s*\d+\.\s+/.test(n[i]); ) {
|
|
3594
3594
|
const m = document.createElement("li");
|
|
3595
3595
|
Ee(m, n[i].replace(/^\s*\d+\.\s+/, "")), h.appendChild(m), i += 1;
|
|
3596
3596
|
}
|
|
@@ -3616,19 +3616,19 @@ function Ee(e, t) {
|
|
|
3616
3616
|
);
|
|
3617
3617
|
const l = o[0];
|
|
3618
3618
|
if (l.startsWith("`")) {
|
|
3619
|
-
const
|
|
3620
|
-
|
|
3619
|
+
const s = document.createElement("code");
|
|
3620
|
+
s.textContent = l.slice(1, -1), e.appendChild(s);
|
|
3621
3621
|
} else if (l.startsWith("**")) {
|
|
3622
|
-
const
|
|
3623
|
-
Ee(
|
|
3622
|
+
const s = document.createElement("strong");
|
|
3623
|
+
Ee(s, l.slice(2, -2)), e.appendChild(s);
|
|
3624
3624
|
} else if (l.startsWith("*")) {
|
|
3625
|
-
const
|
|
3626
|
-
Ee(
|
|
3625
|
+
const s = document.createElement("em");
|
|
3626
|
+
Ee(s, l.slice(1, -1)), e.appendChild(s);
|
|
3627
3627
|
} else {
|
|
3628
|
-
const
|
|
3629
|
-
if (
|
|
3630
|
-
const
|
|
3631
|
-
|
|
3628
|
+
const s = l.match(/^\[([^\]]+)\]\(([^)\s]+)\)$/);
|
|
3629
|
+
if (s && Jr(s[2])) {
|
|
3630
|
+
const p = document.createElement("a");
|
|
3631
|
+
p.href = s[2], p.target = "_top", p.rel = "noreferrer", p.textContent = s[1], e.appendChild(p);
|
|
3632
3632
|
} else
|
|
3633
3633
|
e.appendChild(document.createTextNode(l));
|
|
3634
3634
|
}
|
|
@@ -5399,8 +5399,18 @@ function vo(e, t) {
|
|
|
5399
5399
|
}
|
|
5400
5400
|
.pluno-pa-widget__empty-state--morning-report {
|
|
5401
5401
|
--pluno-pa-starter-edge-gap: 18px;
|
|
5402
|
-
|
|
5403
|
-
|
|
5402
|
+
position: relative;
|
|
5403
|
+
isolation: isolate;
|
|
5404
|
+
box-sizing: border-box;
|
|
5405
|
+
width: calc(100% - 12px);
|
|
5406
|
+
max-width: 380px;
|
|
5407
|
+
margin: auto 6px;
|
|
5408
|
+
gap: var(--pluno-pa-starter-edge-gap);
|
|
5409
|
+
padding: 52px 22px 22px;
|
|
5410
|
+
border: 1px solid var(--pluno-pa-divider);
|
|
5411
|
+
border-radius: 4px;
|
|
5412
|
+
background: var(--pluno-pa-surface);
|
|
5413
|
+
box-shadow: 0 18px 36px rgba(24, 24, 27, 0.14);
|
|
5404
5414
|
}
|
|
5405
5415
|
.pluno-pa-widget__error-retry {
|
|
5406
5416
|
display: block;
|
|
@@ -5421,6 +5431,19 @@ function vo(e, t) {
|
|
|
5421
5431
|
line-height: 1.34;
|
|
5422
5432
|
text-align: left;
|
|
5423
5433
|
}
|
|
5434
|
+
.pluno-pa-widget__empty-state--morning-report .pluno-pa-widget__empty-hero {
|
|
5435
|
+
position: absolute;
|
|
5436
|
+
top: -42px;
|
|
5437
|
+
left: 16px;
|
|
5438
|
+
z-index: 2;
|
|
5439
|
+
transform: rotate(-5deg);
|
|
5440
|
+
}
|
|
5441
|
+
.pluno-pa-widget__empty-state--morning-report .pluno-pa-widget__morning-report-title {
|
|
5442
|
+
width: 100%;
|
|
5443
|
+
font-size: 22px;
|
|
5444
|
+
font-weight: 600;
|
|
5445
|
+
line-height: 1.36;
|
|
5446
|
+
}
|
|
5424
5447
|
.pluno-pa-widget__morning-report-snooze {
|
|
5425
5448
|
justify-self: end;
|
|
5426
5449
|
margin-top: calc(var(--pluno-pa-starter-edge-gap) * -0.55);
|
|
@@ -5434,7 +5457,7 @@ function vo(e, t) {
|
|
|
5434
5457
|
cursor: pointer;
|
|
5435
5458
|
}
|
|
5436
5459
|
.pluno-pa-widget__empty-state--morning-report .pluno-pa-widget__morning-report-snooze {
|
|
5437
|
-
margin-top:
|
|
5460
|
+
margin-top: 0;
|
|
5438
5461
|
}
|
|
5439
5462
|
.pluno-pa-widget__empty-hero {
|
|
5440
5463
|
display: inline-flex;
|
|
@@ -5498,7 +5521,25 @@ function vo(e, t) {
|
|
|
5498
5521
|
width: 100%;
|
|
5499
5522
|
}
|
|
5500
5523
|
.pluno-pa-widget__empty-state--morning-report .pluno-pa-widget__starter-prompts {
|
|
5501
|
-
gap:
|
|
5524
|
+
gap: 4px;
|
|
5525
|
+
}
|
|
5526
|
+
.pluno-pa-widget__empty-state--morning-report .pluno-pa-widget__starter-prompt {
|
|
5527
|
+
position: relative;
|
|
5528
|
+
padding: 10px 8px 10px 30px;
|
|
5529
|
+
border-bottom: 1px dashed color-mix(in srgb, var(--pluno-pa-divider) 70%, transparent);
|
|
5530
|
+
border-radius: 4px;
|
|
5531
|
+
transition: color 120ms ease, background 120ms ease, transform 120ms ease;
|
|
5532
|
+
}
|
|
5533
|
+
.pluno-pa-widget__empty-state--morning-report .pluno-pa-widget__starter-prompt::before {
|
|
5534
|
+
content: "→";
|
|
5535
|
+
position: absolute;
|
|
5536
|
+
left: 8px;
|
|
5537
|
+
top: 10px;
|
|
5538
|
+
color: var(--pluno-pa-text);
|
|
5539
|
+
}
|
|
5540
|
+
.pluno-pa-widget__empty-state--morning-report .pluno-pa-widget__starter-prompt:hover {
|
|
5541
|
+
background: color-mix(in srgb, var(--pluno-pa-accent-soft) 68%, transparent);
|
|
5542
|
+
transform: translateX(2px);
|
|
5502
5543
|
}
|
|
5503
5544
|
.pluno-pa-widget__starter-prompts--empty {
|
|
5504
5545
|
pointer-events: none;
|
|
@@ -5704,6 +5745,37 @@ function vo(e, t) {
|
|
|
5704
5745
|
width: 96px;
|
|
5705
5746
|
height: 96px;
|
|
5706
5747
|
}
|
|
5748
|
+
.pluno-pa-widget--scribble .pluno-pa-widget__empty-state--morning-report {
|
|
5749
|
+
border: 2px solid var(--pluno-pa-divider);
|
|
5750
|
+
border-radius: 3px 1px 4px 2px;
|
|
5751
|
+
background: #fffdf5;
|
|
5752
|
+
box-shadow:
|
|
5753
|
+
6px 8px 0 rgba(44, 42, 30, 0.09),
|
|
5754
|
+
0 18px 30px rgba(44, 42, 30, 0.14);
|
|
5755
|
+
transform: rotate(-0.3deg);
|
|
5756
|
+
}
|
|
5757
|
+
.pluno-pa-widget--scribble .pluno-pa-widget__empty-state--morning-report::before,
|
|
5758
|
+
.pluno-pa-widget--scribble .pluno-pa-widget__empty-state--morning-report::after {
|
|
5759
|
+
content: "";
|
|
5760
|
+
position: absolute;
|
|
5761
|
+
z-index: 3;
|
|
5762
|
+
width: 72px;
|
|
5763
|
+
height: 20px;
|
|
5764
|
+
border: 1px solid rgba(113, 91, 45, 0.18);
|
|
5765
|
+
background: rgba(224, 199, 139, 0.72);
|
|
5766
|
+
box-shadow: 0 2px 3px rgba(44, 42, 30, 0.08);
|
|
5767
|
+
pointer-events: none;
|
|
5768
|
+
}
|
|
5769
|
+
.pluno-pa-widget--scribble .pluno-pa-widget__empty-state--morning-report::before {
|
|
5770
|
+
top: -7px;
|
|
5771
|
+
right: -17px;
|
|
5772
|
+
transform: rotate(34deg);
|
|
5773
|
+
}
|
|
5774
|
+
.pluno-pa-widget--scribble .pluno-pa-widget__empty-state--morning-report::after {
|
|
5775
|
+
bottom: -8px;
|
|
5776
|
+
left: -18px;
|
|
5777
|
+
transform: rotate(39deg);
|
|
5778
|
+
}
|
|
5707
5779
|
.pluno-pa-widget--scribble .pluno-pa-widget__character--tool-group {
|
|
5708
5780
|
width: 60px;
|
|
5709
5781
|
height: 60px;
|
|
@@ -6120,8 +6192,8 @@ function il(e) {
|
|
|
6120
6192
|
openToolGroupKeys: Array.isArray(n.openToolGroupKeys) ? n.openToolGroupKeys.filter(
|
|
6121
6193
|
(i) => typeof i == "string"
|
|
6122
6194
|
) : [],
|
|
6123
|
-
launcherPosition:
|
|
6124
|
-
panelSize:
|
|
6195
|
+
launcherPosition: pl(n.launcherPosition) ? n.launcherPosition : null,
|
|
6196
|
+
panelSize: sl(n.panelSize) ? At(n.panelSize) : null,
|
|
6125
6197
|
seenShareCandidateIds: Array.isArray(n.seenShareCandidateIds) ? n.seenShareCandidateIds.filter((i) => typeof i == "string").slice(-Io) : [],
|
|
6126
6198
|
sharePromptsDisabled: n.sharePromptsDisabled === !0
|
|
6127
6199
|
};
|
|
@@ -6175,13 +6247,13 @@ function ll(e, t) {
|
|
|
6175
6247
|
return;
|
|
6176
6248
|
}
|
|
6177
6249
|
}
|
|
6178
|
-
function
|
|
6250
|
+
function pl(e) {
|
|
6179
6251
|
if (!e || typeof e != "object")
|
|
6180
6252
|
return !1;
|
|
6181
6253
|
const t = e;
|
|
6182
6254
|
return Number.isFinite(t.x) && Number.isFinite(t.y) && (t.anchor === "top-left" || t.anchor === "top-right" || t.anchor === "bottom-left" || t.anchor === "bottom-right");
|
|
6183
6255
|
}
|
|
6184
|
-
function
|
|
6256
|
+
function sl(e) {
|
|
6185
6257
|
if (!e || typeof e != "object")
|
|
6186
6258
|
return !1;
|
|
6187
6259
|
const t = e;
|
|
@@ -6212,9 +6284,9 @@ function dl(e) {
|
|
|
6212
6284
|
const i = async () => {
|
|
6213
6285
|
const o = new AbortController();
|
|
6214
6286
|
let r = !1;
|
|
6215
|
-
const l = new Promise((
|
|
6287
|
+
const l = new Promise((s, p) => {
|
|
6216
6288
|
const c = window.setTimeout(() => {
|
|
6217
|
-
r = !0, o.abort(),
|
|
6289
|
+
r = !0, o.abort(), p(new Error(Zn));
|
|
6218
6290
|
}, da);
|
|
6219
6291
|
o.signal.addEventListener(
|
|
6220
6292
|
"abort",
|
|
@@ -6223,13 +6295,13 @@ function dl(e) {
|
|
|
6223
6295
|
);
|
|
6224
6296
|
});
|
|
6225
6297
|
try {
|
|
6226
|
-
const
|
|
6298
|
+
const s = await Promise.race([
|
|
6227
6299
|
ni(e, o.signal),
|
|
6228
6300
|
l
|
|
6229
6301
|
]);
|
|
6230
|
-
return o.abort(),
|
|
6231
|
-
} catch (
|
|
6232
|
-
throw o.abort(), r ? new Error(Zn) :
|
|
6302
|
+
return o.abort(), s;
|
|
6303
|
+
} catch (s) {
|
|
6304
|
+
throw o.abort(), r ? new Error(Zn) : s instanceof Error && s.message.startsWith("Pluno widget blocked on ") ? s : new Error(ca);
|
|
6233
6305
|
}
|
|
6234
6306
|
};
|
|
6235
6307
|
return {
|
|
@@ -6275,7 +6347,7 @@ class xe extends EventTarget {
|
|
|
6275
6347
|
);
|
|
6276
6348
|
}), this.addPreviewListener(la, () => {
|
|
6277
6349
|
this.readyState = xe.CLOSED, this.dispatchEvent(new Event("error")), this.cleanup();
|
|
6278
|
-
}), this.addPreviewListener(
|
|
6350
|
+
}), this.addPreviewListener(pa, (i) => {
|
|
6279
6351
|
const o = i;
|
|
6280
6352
|
this.readyState = xe.CLOSED, this.dispatchEvent(
|
|
6281
6353
|
new CloseEvent("close", {
|
|
@@ -6386,8 +6458,8 @@ function oi(e) {
|
|
|
6386
6458
|
if (n) {
|
|
6387
6459
|
if (n.host === null)
|
|
6388
6460
|
return n.mountPromise.catch(() => {
|
|
6389
|
-
const
|
|
6390
|
-
return
|
|
6461
|
+
const p = t[be];
|
|
6462
|
+
return p ? p.mountPromise : oi(e);
|
|
6391
6463
|
});
|
|
6392
6464
|
if (fl(n.host))
|
|
6393
6465
|
return n.retryPendingTokenFailureOnce?.(), n.mountPromise;
|
|
@@ -6395,7 +6467,7 @@ function oi(e) {
|
|
|
6395
6467
|
}
|
|
6396
6468
|
const i = e.dataset.plunoPreviewChannel, o = e.dataset.plunoTokenEndpoint, r = !e.dataset.plunoToken && !i && o ? dl(o) : null;
|
|
6397
6469
|
let l;
|
|
6398
|
-
const
|
|
6470
|
+
const s = Na({
|
|
6399
6471
|
token: e.dataset.plunoToken,
|
|
6400
6472
|
tokenProvider: r?.loadToken,
|
|
6401
6473
|
tokenEndpoint: o,
|
|
@@ -6407,24 +6479,24 @@ function oi(e) {
|
|
|
6407
6479
|
fontFamily: e.dataset.plunoFontFamily,
|
|
6408
6480
|
scribbleStyle: e.dataset.plunoScribbleStyle === void 0 ? void 0 : e.dataset.plunoScribbleStyle !== "false",
|
|
6409
6481
|
position: e.dataset.plunoPosition === "bottom-left" ? "bottom-left" : "bottom-right"
|
|
6410
|
-
}).then((
|
|
6482
|
+
}).then((p) => {
|
|
6411
6483
|
if (t[be] !== l) {
|
|
6412
|
-
|
|
6484
|
+
p.destroy();
|
|
6413
6485
|
return;
|
|
6414
6486
|
}
|
|
6415
|
-
const c =
|
|
6487
|
+
const c = p.host;
|
|
6416
6488
|
c.setAttribute(Po, "true"), l.host = c, l.destroy = () => {
|
|
6417
|
-
t[be] === l && delete t[be], l.host = null, l.destroy = null,
|
|
6489
|
+
t[be] === l && delete t[be], l.host = null, l.destroy = null, p.destroy();
|
|
6418
6490
|
};
|
|
6419
|
-
}).catch((
|
|
6420
|
-
throw t[be] === l && delete t[be],
|
|
6491
|
+
}).catch((p) => {
|
|
6492
|
+
throw t[be] === l && delete t[be], p;
|
|
6421
6493
|
});
|
|
6422
6494
|
return l = {
|
|
6423
|
-
mountPromise:
|
|
6495
|
+
mountPromise: s,
|
|
6424
6496
|
host: null,
|
|
6425
6497
|
destroy: null,
|
|
6426
6498
|
retryPendingTokenFailureOnce: r?.retryPendingFailureOnce ?? null
|
|
6427
|
-
}, t[be] = l,
|
|
6499
|
+
}, t[be] = l, s;
|
|
6428
6500
|
}
|
|
6429
6501
|
function fl(e) {
|
|
6430
6502
|
return e.isConnected && e.getAttribute(Po) === "true" && !!e.shadowRoot?.querySelector(".pluno-pa-widget__launcher") && !!e.shadowRoot?.querySelector(".pluno-pa-widget__panel");
|