@pluno/product-agent-web 0.1.54 → 0.1.55

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.
@@ -2,10 +2,10 @@ import { PlunoProductAgent as Jn } from "./product-agent-sdk.js";
2
2
  const Qn = "#7c3aed", $e = "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", qe = "#2c2a1e", zt = [253, 250, 241], Bt = 3.5;
3
3
  function hn(e) {
4
4
  const t = mn(e);
5
- if (Ut(Re(t), zt) >= Bt)
5
+ if (Ut(De(t), zt) >= Bt)
6
6
  return t;
7
- let n = Re(t);
8
- const i = Re(qe);
7
+ let n = De(t);
8
+ const i = De(qe);
9
9
  for (let a = 0; a < 6; a += 1)
10
10
  if (n = no(n, i, 0.22), Ut(n, zt) >= Bt)
11
11
  return ut(n);
@@ -20,7 +20,7 @@ function eo() {
20
20
  return o;
21
21
  }
22
22
  function to(e) {
23
- const t = mn(e), o = gt(Re(t));
23
+ const t = mn(e), o = gt(De(t));
24
24
  return o > 0.86 ? {
25
25
  top: "#ffffff",
26
26
  middle: "#f6f6f6",
@@ -44,23 +44,23 @@ function to(e) {
44
44
  inner: "#4b4b4b",
45
45
  shadow: "#000000"
46
46
  } : {
47
- top: Y(t, 0.28, -0.03),
48
- middle: Y(t, 0.08, 0.04),
49
- bottom: Y(t, -0.1, 0.02),
50
- edgeStart: Y(t, 0.08, 0.08),
51
- edgeMiddle: Y(t, -0.08, 0.08),
52
- edgeEnd: Y(t, -0.18, 0.05),
53
- glow: Y(t, 0.32, -0.12),
54
- highlight: Y(t, 0.38, -0.18),
55
- inner: Y(t, 0.24, -0.1),
56
- shadow: Y(t, -0.25, -0.08)
47
+ top: Z(t, 0.28, -0.03),
48
+ middle: Z(t, 0.08, 0.04),
49
+ bottom: Z(t, -0.1, 0.02),
50
+ edgeStart: Z(t, 0.08, 0.08),
51
+ edgeMiddle: Z(t, -0.08, 0.08),
52
+ edgeEnd: Z(t, -0.18, 0.05),
53
+ glow: Z(t, 0.32, -0.12),
54
+ highlight: Z(t, 0.38, -0.18),
55
+ inner: Z(t, 0.24, -0.1),
56
+ shadow: Z(t, -0.25, -0.08)
57
57
  };
58
58
  }
59
59
  function mn(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((o) => o + o).join("").toLowerCase()}` : Qn;
62
62
  }
63
- function Re(e) {
63
+ function De(e) {
64
64
  return [
65
65
  Number.parseInt(e.slice(1, 3), 16),
66
66
  Number.parseInt(e.slice(3, 5), 16),
@@ -90,8 +90,8 @@ function no(e, t, o) {
90
90
  e[2] + (t[2] - e[2]) * n
91
91
  ];
92
92
  }
93
- function Y(e, t, o) {
94
- const [n, i, a] = oo(Re(e));
93
+ function Z(e, t, o) {
94
+ const [n, i, a] = oo(De(e));
95
95
  return ut(io(n, ht(i + o), ht(a + t)));
96
96
  }
97
97
  function oo([e, t, o]) {
@@ -216,7 +216,7 @@ function _o(e) {
216
216
  function xo(e) {
217
217
  return e < 0.5 ? 4 * e * e * e : 1 - Math.pow(-2 * e + 2, 3) / 2;
218
218
  }
219
- const fn = 100, vo = "product-agent:sdk-preview-socket-connect", yo = "product-agent:sdk-preview-socket-send", Co = "product-agent:sdk-preview-socket-close", So = "product-agent:sdk-preview-socket-open", Eo = "product-agent:sdk-preview-socket-message", ko = "product-agent:sdk-preview-socket-error", Lo = "product-agent:sdk-preview-socket-closed", Ht = "product-agent:sdk-preview-socket-id", Po = "data-pluno-sdk-preview-channel", Io = "product-agent:preview-diagnostic", wn = "pluno.productAgent.sharePromptsDisabled", Ao = 3, No = "No recent chats for this page yet.", Z = {
219
+ const fn = 100, vo = "product-agent:sdk-preview-socket-connect", yo = "product-agent:sdk-preview-socket-send", Co = "product-agent:sdk-preview-socket-close", So = "product-agent:sdk-preview-socket-open", Eo = "product-agent:sdk-preview-socket-message", ko = "product-agent:sdk-preview-socket-error", Lo = "product-agent:sdk-preview-socket-closed", Ht = "product-agent:sdk-preview-socket-id", Io = "data-pluno-sdk-preview-channel", Po = "product-agent:preview-diagnostic", wn = "pluno.productAgent.sharePromptsDisabled", Ao = 3, No = "No recent chats for this page yet.", Q = {
220
220
  launcherLabel: "Ask for anything...",
221
221
  accentColor: "#7c3aed",
222
222
  colorScheme: "light",
@@ -224,7 +224,7 @@ const fn = 100, vo = "product-agent:sdk-preview-socket-connect", yo = "product-a
224
224
  scribbleStyle: !1,
225
225
  position: "bottom-right",
226
226
  movableLauncher: !1
227
- }, To = '"Architects Daughter", "Bradley Hand", "Chalkboard SE", "Comic Sans MS", "Comic Sans", "Segoe Print", cursive', Wt = "pluno-pa-scribble-font", _n = 190, xn = 41, Gt = 22, Do = 16, Ro = 24, Mo = 1, zo = 48, Bo = 420, Uo = 520, Oo = 0.24, Fo = 680, Ho = 800, Wo = 0.76, W = 8, mt = 50, vn = "http://www.w3.org/2000/svg", $t = 26, qt = 8, Go = 36, jt = [
227
+ }, To = '"Architects Daughter", "Bradley Hand", "Chalkboard SE", "Comic Sans MS", "Comic Sans", "Segoe Print", cursive', Wt = "pluno-pa-scribble-font", _n = 190, xn = 41, Gt = 22, Do = 16, Ro = 24, Mo = 1, zo = 48, Bo = 420, Uo = 520, Oo = 0.24, Fo = 680, Ho = 800, Wo = 0.76, H = 8, mt = 50, vn = "http://www.w3.org/2000/svg", $t = 26, qt = 8, Go = 36, jt = [
228
228
  {
229
229
  ellipseCx: "17.5",
230
230
  ellipseCy: "24.5",
@@ -264,17 +264,17 @@ const fn = 100, vo = "product-agent:sdk-preview-socket-connect", yo = "product-a
264
264
  ], $o = 11, qo = 13, Vt = 4, jo = 10, Vo = 40, Ko = "movable-launcher-position-v2", yn = "pluno-pa-widget-styles", Cn = "data-pluno-pa-widget-styles";
265
265
  let Kt = 0;
266
266
  function Yo(e) {
267
- return (t) => new oe(t, e);
267
+ return (t) => new ae(t, e);
268
268
  }
269
269
  async function Xo(e = {}) {
270
270
  const t = {
271
- launcherLabel: e.launcherLabel ?? Z.launcherLabel,
272
- accentColor: e.accentColor ?? Z.accentColor,
273
- colorScheme: e.colorScheme ?? Z.colorScheme,
274
- fontFamily: e.fontFamily ?? Z.fontFamily,
275
- scribbleStyle: e.scribbleStyle ?? Z.scribbleStyle,
276
- position: e.position ?? Z.position,
277
- movableLauncher: e.movableLauncher ?? Z.movableLauncher,
271
+ launcherLabel: e.launcherLabel ?? Q.launcherLabel,
272
+ accentColor: e.accentColor ?? Q.accentColor,
273
+ colorScheme: e.colorScheme ?? Q.colorScheme,
274
+ fontFamily: e.fontFamily ?? Q.fontFamily,
275
+ scribbleStyle: e.scribbleStyle ?? Q.scribbleStyle,
276
+ position: e.position ?? Q.position,
277
+ movableLauncher: e.movableLauncher ?? Q.movableLauncher,
278
278
  token: e.token,
279
279
  tokenProvider: e.tokenProvider,
280
280
  tokenEndpoint: e.tokenEndpoint,
@@ -307,7 +307,7 @@ async function Xo(e = {}) {
307
307
  onPanelOpenChange: e.onPanelOpenChange,
308
308
  showLauncherMinimizeButton: e.showLauncherMinimizeButton === !0
309
309
  };
310
- X(
310
+ J(
311
311
  "web-sdk.widget",
312
312
  "Mounting widget with merged options",
313
313
  {
@@ -324,7 +324,7 @@ async function Xo(e = {}) {
324
324
  );
325
325
  const o = document.createElement("div");
326
326
  o.className = "pluno-pa-widget-host", o.setAttribute("data-pluno-product-agent-ui", "widget"), t.sdkPreviewChannelId && o.setAttribute(
327
- Po,
327
+ Io,
328
328
  t.sdkPreviewChannelId
329
329
  );
330
330
  const n = o.attachShadow({ mode: "open" }), i = document.createElement("div");
@@ -356,7 +356,7 @@ async function Xo(e = {}) {
356
356
  scribbleStyle: t.scribbleStyle
357
357
  });
358
358
  const u = await da(), d = u.ownerDocument;
359
- u.appendChild(o), X(
359
+ u.appendChild(o), J(
360
360
  "web-sdk.widget",
361
361
  "Applied initial widget appearance",
362
362
  {
@@ -372,7 +372,7 @@ async function Xo(e = {}) {
372
372
  ".pluno-pa-widget__launcher-drag-handle"
373
373
  ), f = i.querySelector(
374
374
  ".pluno-pa-widget__launcher-input"
375
- ), F = i.querySelector(
375
+ ), O = i.querySelector(
376
376
  ".pluno-pa-widget__launcher-minimize"
377
377
  ), k = i.querySelector(".pluno-pa-widget__panel"), x = i.querySelector(
378
378
  ".pluno-pa-widget__close"
@@ -380,13 +380,13 @@ async function Xo(e = {}) {
380
380
  ".pluno-pa-widget__composer"
381
381
  ), h = i.querySelector(
382
382
  ".pluno-pa-widget__attachment-error"
383
- ), I = i.querySelector(
383
+ ), A = i.querySelector(
384
384
  ".pluno-pa-widget__billing-status"
385
385
  ), T = i.querySelector(
386
386
  ".pluno-pa-widget__attachments"
387
- ), P = i.querySelector(
387
+ ), I = i.querySelector(
388
388
  ".pluno-pa-widget__attachment-input"
389
- ), ke = i.querySelector(
389
+ ), Ee = i.querySelector(
390
390
  ".pluno-pa-widget__attach"
391
391
  ), b = i.querySelector(
392
392
  ".pluno-pa-widget__input"
@@ -398,35 +398,35 @@ async function Xo(e = {}) {
398
398
  ".pluno-pa-widget__history"
399
399
  ), we = i.querySelector(
400
400
  ".pluno-pa-widget__history-panel"
401
- ), G = i.querySelector(
401
+ ), W = i.querySelector(
402
402
  ".pluno-pa-widget__history-list"
403
- ), ie = i.querySelector(
403
+ ), Re = i.querySelector(
404
404
  ".pluno-pa-widget__history-close"
405
- ), _ = i.querySelector(
405
+ ), K = i.querySelector(
406
406
  ".pluno-pa-widget__history-status"
407
- ), M = i.querySelector(
407
+ ), _ = i.querySelector(
408
408
  ".pluno-pa-widget__timeline-jump"
409
- ), ae = i.querySelector(
409
+ ), M = i.querySelector(
410
410
  ".pluno-pa-widget__active-users-counter"
411
- ), L = i.querySelector(
411
+ ), P = i.querySelector(
412
412
  ".pluno-pa-widget__timeline"
413
- ), A = i.querySelector(
413
+ ), G = i.querySelector(
414
414
  ".pluno-pa-widget__timeline-bottom-sentinel"
415
415
  );
416
- if (!g || !f || !k || !x || !v || !h || !I || !T || !P || !ke || !b || !D || !de || !ce || !we || !G || !ie || !_ || !M || !ae || !L || !A)
416
+ if (!g || !f || !k || !x || !v || !h || !A || !T || !I || !Ee || !b || !D || !de || !ce || !we || !W || !Re || !K || !_ || !M || !P || !G)
417
417
  throw new Error("Failed to mount Pluno widget");
418
418
  if (t.movableLauncher && !S)
419
419
  throw new Error("Failed to mount Pluno widget drag handle");
420
420
  tn(f), tn(b);
421
- let y = [], B = null;
422
- const _e = () => {
421
+ let C = [], L = null;
422
+ const $ = () => {
423
423
  Ri(
424
424
  T,
425
- y,
425
+ C,
426
426
  (r) => {
427
- y = y.filter(
427
+ C = C.filter(
428
428
  (s, E) => E !== r
429
- ), _e(), O(w.getState()), $();
429
+ ), $(), U(w.getState()), q();
430
430
  }
431
431
  );
432
432
  }, On = t.loginRequired || t.signupRequired || t.token || t.webSocketFactory ? void 0 : t.tokenProvider ?? (async () => {
@@ -465,31 +465,31 @@ async function Xo(e = {}) {
465
465
  prepareAttachmentUpload: t.prepareAttachmentUpload,
466
466
  autoConnect: t.loginRequired || t.signupRequired ? !1 : void 0
467
467
  });
468
- const Ke = new Set(l.openToolGroupKeys), xe = new Set(
468
+ const Ke = new Set(l.openToolGroupKeys), _e = new Set(
469
469
  l.seenShareCandidateIds
470
- ), Me = new Set(xe);
471
- let Ye = l.sharePromptsDisabled || await ua(t), j = null, ze = !1, ue = !1, ge = {
470
+ ), Me = new Set(_e);
471
+ let Ye = l.sharePromptsDisabled || await ua(t), V = null, ze = !1, ue = !1, ge = {
472
472
  enabled: !0
473
- }, he = 0, Ct = "", re = !1, ne = !1, le = [], Xe = null, Le = null;
474
- const V = (r, s) => {
473
+ }, he = 0, Ct = "", re = !1, ie = !1, le = [], Xe = null, ke = null;
474
+ const Y = (r, s) => {
475
475
  ge = { enabled: r, reason: s };
476
- }, K = () => {
477
- M.hidden = !0;
476
+ }, X = () => {
477
+ _.hidden = !0;
478
478
  }, Hn = () => {
479
- M.hidden = !1;
479
+ _.hidden = !1;
480
480
  }, Wn = (r = "jump") => {
481
- V(!0, r), K(), De(L, () => ge.enabled), he = L.scrollTop;
481
+ Y(!0, r), X(), Te(P, () => ge.enabled), he = P.scrollTop;
482
482
  }, me = () => {
483
- if (ce.hidden = t.loginRequired, we.hidden = !re, ce.setAttribute("aria-expanded", String(re)), G.classList.toggle(
483
+ if (ce.hidden = t.loginRequired, we.hidden = !re, ce.setAttribute("aria-expanded", String(re)), W.classList.toggle(
484
484
  "pluno-pa-widget__history-list--center",
485
- ne && le.length === 0
486
- ), G.replaceChildren(), ne && le.length === 0) {
485
+ ie && le.length === 0
486
+ ), W.replaceChildren(), ie && le.length === 0) {
487
487
  const r = document.createElement("p");
488
- r.className = "pluno-pa-widget__history-loading", r.textContent = "Loading...", G.appendChild(r);
488
+ r.className = "pluno-pa-widget__history-loading", r.textContent = "Loading...", W.appendChild(r);
489
489
  }
490
490
  for (const r of le) {
491
491
  const s = document.createElement("button");
492
- s.type = "button", s.className = "pluno-pa-widget__history-item", s.disabled = ne;
492
+ s.type = "button", s.className = "pluno-pa-widget__history-item", s.disabled = ie;
493
493
  const E = document.createElement("span");
494
494
  E.className = "pluno-pa-widget__history-item-title", E.textContent = gi(r);
495
495
  const z = document.createElement("time");
@@ -499,34 +499,34 @@ async function Xo(e = {}) {
499
499
  );
500
500
  const N = document.createElement("small");
501
501
  N.className = "pluno-pa-widget__history-path", N.textContent = hi(r), s.append(E, z, N), s.addEventListener("click", () => {
502
- re = !1, Le = null, me(), V(!0, "newSession"), K(), w.loadSession(r.id), O(w.getState());
503
- }), G.appendChild(s);
502
+ re = !1, ke = null, me(), Y(!0, "newSession"), X(), w.loadSession(r.id), U(w.getState());
503
+ }), W.appendChild(s);
504
504
  }
505
- if (ne && le.length > 0) {
505
+ if (ie && le.length > 0) {
506
506
  const r = document.createElement("p");
507
- r.className = "pluno-pa-widget__history-loading pluno-pa-widget__history-loading--inline", r.textContent = "Loading...", G.appendChild(r);
507
+ r.className = "pluno-pa-widget__history-loading pluno-pa-widget__history-loading--inline", r.textContent = "Loading...", W.appendChild(r);
508
508
  }
509
- _.textContent = Le ?? (!ne && le.length === 0 ? "No recent chats for this page yet." : ""), _.hidden = _.textContent.length === 0;
509
+ K.textContent = ke ?? (!ie && le.length === 0 ? "No recent chats for this page yet." : ""), K.hidden = K.textContent.length === 0;
510
510
  }, St = async (r) => {
511
- if (!ne) {
512
- ne = !0, Le = null, me();
511
+ if (!ie) {
512
+ ie = !0, ke = null, me();
513
513
  try {
514
514
  const s = await w.listSessions({ cursor: r, limit: 20 });
515
515
  le = r ? [...le, ...s.sessions] : s.sessions, Xe = s.nextCursor;
516
516
  } catch (s) {
517
- X(
517
+ J(
518
518
  "web-sdk.widget",
519
519
  "Failed to load session history",
520
520
  {
521
521
  message: s instanceof Error ? s.message : String(s)
522
522
  }
523
- ), Le = No;
523
+ ), ke = No;
524
524
  } finally {
525
- ne = !1, me();
525
+ ie = !1, me();
526
526
  }
527
527
  }
528
528
  }, Gn = () => {
529
- !Xe || ne || G.scrollHeight - G.scrollTop - G.clientHeight <= 24 && St(Xe);
529
+ !Xe || ie || W.scrollHeight - W.scrollTop - W.clientHeight <= 24 && St(Xe);
530
530
  }, $n = () => {
531
531
  ze || typeof document > "u" || (dn(n, t.accentColor), o.isConnected || d.body?.appendChild(o));
532
532
  }, Et = new MutationObserver($n);
@@ -545,32 +545,32 @@ async function Xo(e = {}) {
545
545
  ),
546
546
  s
547
547
  );
548
- }, H = () => {
548
+ }, F = () => {
549
549
  ha(t, {
550
550
  isOpen: i.classList.contains("pluno-pa-widget--open"),
551
551
  composerValue: b.value,
552
552
  openToolGroupKeys: [...Ke],
553
553
  launcherPosition: c ? p : null,
554
- seenShareCandidateIds: [...xe].slice(
554
+ seenShareCandidateIds: [..._e].slice(
555
555
  -fn
556
556
  ),
557
557
  sharePromptsDisabled: Ye
558
558
  });
559
559
  }, Be = (r) => {
560
560
  t.onDisplayStateChange?.(r);
561
- }, Pe = (r, s = !0) => {
561
+ }, Le = (r, s = !0) => {
562
562
  if (r === "shown") {
563
563
  i.classList.remove("pluno-pa-widget--minimized"), g.removeAttribute("tabindex"), !i.classList.contains("pluno-pa-widget--open") && !i.classList.contains("pluno-pa-widget--closing") && Ie(!1), s && Be("shown");
564
564
  return;
565
565
  }
566
- j !== null && (window.clearTimeout(j), j = null), i.classList.remove("pluno-pa-widget--open"), i.classList.remove("pluno-pa-widget--closing"), i.classList.add("pluno-pa-widget--minimized"), g.hidden = !1, k.hidden = !0, x.hidden = !0, g.tabIndex = 0, b.value = "", fe(
566
+ V !== null && (window.clearTimeout(V), V = null), i.classList.remove("pluno-pa-widget--open"), i.classList.remove("pluno-pa-widget--closing"), i.classList.add("pluno-pa-widget--minimized"), g.hidden = !1, k.hidden = !0, x.hidden = !0, g.tabIndex = 0, b.value = "", fe(
567
567
  i,
568
568
  rt(
569
569
  i,
570
570
  p,
571
571
  t.position
572
572
  )
573
- ), Jt(i), H(), s && Be("minimized");
573
+ ), Jt(i), F(), s && Be("minimized");
574
574
  }, be = (r, s = {}) => {
575
575
  si(r, {
576
576
  debugVersion: Ko,
@@ -585,7 +585,7 @@ async function Xo(e = {}) {
585
585
  rootRect: lt(i),
586
586
  launcherRect: lt(g),
587
587
  panelRect: lt(k),
588
- viewport: ee(),
588
+ viewport: ne(),
589
589
  panelHidden: k.hidden,
590
590
  closeHidden: x.hidden,
591
591
  ...s
@@ -634,9 +634,9 @@ async function Xo(e = {}) {
634
634
  { visibleLauncherPosition: r }
635
635
  );
636
636
  };
637
- let Pt = () => {
637
+ let It = () => {
638
638
  };
639
- window.addEventListener("resize", Lt), t.movableLauncher && S ? (Ie(), Pt = ti({
639
+ window.addEventListener("resize", Lt), t.movableLauncher && S ? (Ie(), It = ti({
640
640
  root: i,
641
641
  launcher: g,
642
642
  launcherDragHandle: S,
@@ -655,11 +655,11 @@ async function Xo(e = {}) {
655
655
  });
656
656
  },
657
657
  persist: () => {
658
- c = !0, H(), be("Persisted closed launcher drag position");
658
+ c = !0, F(), be("Persisted closed launcher drag position");
659
659
  }
660
660
  })) : fe(i, null);
661
661
  let Je = !1;
662
- const It = async () => {
662
+ const Pt = async () => {
663
663
  if (!(!t.billingStatusLoader || Je)) {
664
664
  Je = !0;
665
665
  try {
@@ -669,16 +669,16 @@ async function Xo(e = {}) {
669
669
  r,
670
670
  w.getState().lastErrorCode
671
671
  ) && (t.billingStatus = r, dt(
672
- I,
672
+ A,
673
673
  t.billingStatus,
674
674
  w.getState().lastErrorCode
675
- ), $());
675
+ ), q());
676
676
  } finally {
677
677
  Je = !1;
678
678
  }
679
679
  }
680
680
  }, pe = (r = "", s = !0) => {
681
- It(), j !== null && (window.clearTimeout(j), j = null), Pe("shown", !1), k.hidden = !1, x.hidden = !1, i.classList.remove("pluno-pa-widget--closing");
681
+ Pt(), V !== null && (window.clearTimeout(V), V = null), Le("shown", !1), k.hidden = !1, x.hidden = !1, i.classList.remove("pluno-pa-widget--closing");
682
682
  const E = Ie(), z = Zt(
683
683
  i,
684
684
  E,
@@ -687,17 +687,17 @@ async function Xo(e = {}) {
687
687
  if (kt(z, E), be("Opening launcher at clamped open panel position", {
688
688
  openPanelPosition: z,
689
689
  visibleLauncherPosition: E
690
- }), V(!0, "open"), K(), !s) {
691
- i.classList.add("pluno-pa-widget--open"), g.hidden = !0, r && (b.value = r, Te(b)), De(L, () => ge.enabled), he = L.scrollTop, b.focus(), b.setSelectionRange(b.value.length, b.value.length), H(), Be("shown"), t.onPanelOpenChange?.(!0);
690
+ }), Y(!0, "open"), X(), !s) {
691
+ i.classList.add("pluno-pa-widget--open"), g.hidden = !0, r && (b.value = r, Ne(b)), Te(P, () => ge.enabled), he = P.scrollTop, b.focus(), b.setSelectionRange(b.value.length, b.value.length), F(), Be("shown"), t.onPanelOpenChange?.(!0);
692
692
  return;
693
693
  }
694
694
  window.requestAnimationFrame(() => {
695
- i.classList.add("pluno-pa-widget--open"), r && (b.value = r, Te(b)), De(L, () => ge.enabled), he = L.scrollTop, b.focus(), b.setSelectionRange(b.value.length, b.value.length), H(), Be("shown"), t.onPanelOpenChange?.(!0), j = window.setTimeout(() => {
696
- g.hidden = !0, De(L, () => ge.enabled), he = L.scrollTop;
695
+ i.classList.add("pluno-pa-widget--open"), r && (b.value = r, Ne(b)), Te(P, () => ge.enabled), he = P.scrollTop, b.focus(), b.setSelectionRange(b.value.length, b.value.length), F(), Be("shown"), t.onPanelOpenChange?.(!0), V = window.setTimeout(() => {
696
+ g.hidden = !0, Te(P, () => ge.enabled), he = P.scrollTop;
697
697
  }, 220);
698
698
  });
699
699
  }, qn = () => {
700
- j !== null && (window.clearTimeout(j), j = null), g.hidden = !1, p && (Ie(!1), be("Closing launcher at stored position")), i.classList.remove("pluno-pa-widget--open"), i.classList.add("pluno-pa-widget--closing"), H(), t.onPanelOpenChange?.(!1), j = window.setTimeout(() => {
700
+ V !== null && (window.clearTimeout(V), V = null), g.hidden = !1, p && (Ie(!1), be("Closing launcher at stored position")), i.classList.remove("pluno-pa-widget--open"), i.classList.add("pluno-pa-widget--closing"), F(), t.onPanelOpenChange?.(!1), V = window.setTimeout(() => {
701
701
  k.hidden = !0, x.hidden = !0, i.classList.remove("pluno-pa-widget--closing");
702
702
  }, 220);
703
703
  };
@@ -716,27 +716,27 @@ async function Xo(e = {}) {
716
716
  pe(r), f.value = "";
717
717
  }), g.addEventListener("keydown", (r) => {
718
718
  !i.classList.contains("pluno-pa-widget--minimized") || r.key !== "Enter" && r.key !== " " || (r.preventDefault(), pe());
719
- }), F?.addEventListener("pointerdown", (r) => {
719
+ }), O?.addEventListener("pointerdown", (r) => {
720
720
  r.stopPropagation();
721
- }), F?.addEventListener("click", (r) => {
722
- r.preventDefault(), r.stopPropagation(), Pe("minimized");
723
- }), x.addEventListener("click", qn), L.addEventListener("scroll", () => {
724
- L.scrollTop < he - 1 && V(!1, "userScroll"), he = L.scrollTop;
725
- }), M.addEventListener("click", () => {
721
+ }), O?.addEventListener("click", (r) => {
722
+ r.preventDefault(), r.stopPropagation(), Le("minimized");
723
+ }), x.addEventListener("click", qn), P.addEventListener("scroll", () => {
724
+ P.scrollTop < he - 1 && Y(!1, "userScroll"), he = P.scrollTop;
725
+ }), _.addEventListener("click", () => {
726
726
  Wn();
727
727
  });
728
728
  const At = typeof IntersectionObserver > "u" ? null : new IntersectionObserver(
729
729
  ([r]) => {
730
- r?.isIntersecting && (V(!0, "bottom"), K());
730
+ r?.isIntersecting && (Y(!0, "bottom"), X());
731
731
  },
732
- { root: L, threshold: 0 }
732
+ { root: P, threshold: 0 }
733
733
  );
734
- At?.observe(A);
734
+ At?.observe(G);
735
735
  const Ue = () => t.loginRequired || t.signupRequired, Nt = () => {
736
736
  const r = Ue();
737
- f.readOnly = r, f.placeholder = r ? t.signupRequired ? t.signupButtonLabel : t.loginButtonLabel : t.launcherLabel, b.placeholder = r ? t.signupRequired ? t.signupButtonLabel : t.loginButtonLabel : Z.launcherLabel, v.hidden = r;
738
- }, $ = () => {
739
- D.disabled = Q(t.billingStatus) || !w.getState().isThinking && b.value.trim().length === 0 && y.length === 0, ke.disabled = Ue() || Q(t.billingStatus);
737
+ f.readOnly = r, f.placeholder = r ? t.signupRequired ? t.signupButtonLabel : t.loginButtonLabel : t.launcherLabel, b.placeholder = r ? t.signupRequired ? t.signupButtonLabel : t.loginButtonLabel : Q.launcherLabel, v.hidden = r;
738
+ }, q = () => {
739
+ D.disabled = te(t.billingStatus) || !w.getState().isThinking && b.value.trim().length === 0 && C.length === 0, Ee.disabled = Ue() || te(t.billingStatus);
740
740
  };
741
741
  Nt(), v.addEventListener("submit", (r) => {
742
742
  if (r.preventDefault(), t.loginRequired) {
@@ -747,51 +747,51 @@ async function Xo(e = {}) {
747
747
  t.onSignupClick?.();
748
748
  return;
749
749
  }
750
- Q(t.billingStatus) || (ue = !0, V(!0, "send"), K(), y = pt(
750
+ te(t.billingStatus) || (ue = !0, Y(!0, "send"), X(), C = pt(
751
751
  w,
752
752
  b,
753
- y
754
- ), _e(), $());
753
+ C
754
+ ), $(), q());
755
755
  });
756
- let Ae = 0;
756
+ let Pe = 0;
757
757
  const jn = () => {
758
- Ae = 0, i.classList.remove("pluno-pa-widget--drag-over");
758
+ Pe = 0, i.classList.remove("pluno-pa-widget--drag-over");
759
759
  }, Tt = (r) => {
760
- B !== null && window.clearTimeout(B), h.textContent = r, h.hidden = !1, B = window.setTimeout(() => {
761
- h.textContent = "", h.hidden = !0, B = null;
760
+ L !== null && window.clearTimeout(L), h.textContent = r, h.hidden = !1, L = window.setTimeout(() => {
761
+ h.textContent = "", h.hidden = !0, L = null;
762
762
  }, 3e3);
763
763
  }, Vn = () => {
764
- B !== null && (window.clearTimeout(B), B = null), h.textContent = "", h.hidden = !0;
764
+ L !== null && (window.clearTimeout(L), L = null), h.textContent = "", h.hidden = !0;
765
765
  }, Dt = async (r) => {
766
766
  if (r.length === 0)
767
767
  return;
768
768
  const s = Bi(w, r);
769
- y = [...y, ...s], _e(), Vn(), $(), O(w.getState()), i.classList.contains("pluno-pa-widget--open") || pe();
769
+ C = [...C, ...s], $(), Vn(), q(), U(w.getState()), i.classList.contains("pluno-pa-widget--open") || pe();
770
770
  };
771
- ke.addEventListener("click", () => {
772
- t.loginRequired || Q(t.billingStatus) || P.click();
773
- }), P.addEventListener("change", () => {
774
- const r = Array.from(P.files ?? []);
775
- P.value = "", Dt(r).catch((s) => {
771
+ Ee.addEventListener("click", () => {
772
+ t.loginRequired || te(t.billingStatus) || I.click();
773
+ }), I.addEventListener("change", () => {
774
+ const r = Array.from(I.files ?? []);
775
+ I.value = "", Dt(r).catch((s) => {
776
776
  Tt(
777
777
  s instanceof Error ? s.message : "Failed to attach file"
778
- ), X("web-sdk.widget", "Attachment failed", {
778
+ ), J("web-sdk.widget", "Attachment failed", {
779
779
  message: s instanceof Error ? s.message : String(s)
780
780
  });
781
781
  });
782
782
  }), i.addEventListener("dragenter", (r) => {
783
- !He(r.dataTransfer) || t.loginRequired || (r.preventDefault(), r.stopPropagation(), Ae += 1, i.classList.add("pluno-pa-widget--drag-over"));
783
+ !He(r.dataTransfer) || t.loginRequired || (r.preventDefault(), r.stopPropagation(), Pe += 1, i.classList.add("pluno-pa-widget--drag-over"));
784
784
  }), i.addEventListener("dragover", (r) => {
785
785
  const s = r.dataTransfer;
786
786
  !He(s) || t.loginRequired || (r.preventDefault(), r.stopPropagation(), s.dropEffect = "copy");
787
787
  }), i.addEventListener("dragleave", (r) => {
788
- He(r.dataTransfer) && (r.stopPropagation(), Ae = Math.max(0, Ae - 1), Ae === 0 && i.classList.remove("pluno-pa-widget--drag-over"));
788
+ He(r.dataTransfer) && (r.stopPropagation(), Pe = Math.max(0, Pe - 1), Pe === 0 && i.classList.remove("pluno-pa-widget--drag-over"));
789
789
  }), i.addEventListener("drop", (r) => {
790
790
  const s = r.dataTransfer;
791
791
  !He(s) || t.loginRequired || (r.preventDefault(), r.stopPropagation(), jn(), Dt(s.files).catch((E) => {
792
792
  Tt(
793
793
  E instanceof Error ? E.message : "Failed to attach file"
794
- ), X("web-sdk.widget", "Attachment failed", {
794
+ ), J("web-sdk.widget", "Attachment failed", {
795
795
  message: E instanceof Error ? E.message : String(E)
796
796
  });
797
797
  }));
@@ -804,61 +804,61 @@ async function Xo(e = {}) {
804
804
  w.stop();
805
805
  return;
806
806
  }
807
- ue = !0, V(!0, "send"), K(), y = pt(
807
+ ue = !0, Y(!0, "send"), X(), C = pt(
808
808
  w,
809
809
  b,
810
- y
811
- ), _e(), $(), O(w.getState());
810
+ C
811
+ ), $(), q(), U(w.getState());
812
812
  }), ce.addEventListener("click", () => {
813
- re = !re, Le = null, me(), re && le.length === 0 && St(null);
814
- }), ie.addEventListener("click", () => {
813
+ re = !re, ke = null, me(), re && le.length === 0 && St(null);
814
+ }), Re.addEventListener("click", () => {
815
815
  re = !1, me();
816
- }), G.addEventListener("scroll", Gn), b.addEventListener("input", () => {
817
- Te(b), H(), $(), Yn();
816
+ }), W.addEventListener("scroll", Gn), b.addEventListener("input", () => {
817
+ Ne(b), F(), q(), Yn();
818
818
  }), b.addEventListener("keydown", (r) => {
819
819
  if (!(r.key !== "Enter" || r.shiftKey)) {
820
820
  if (r.preventDefault(), t.loginRequired) {
821
821
  t.onLoginClick?.();
822
822
  return;
823
823
  }
824
- ue = !0, V(!0, "send"), K(), y = pt(
824
+ ue = !0, Y(!0, "send"), X(), C = pt(
825
825
  w,
826
826
  b,
827
- y
828
- ), _e(), $(), O(w.getState());
827
+ C
828
+ ), $(), q(), U(w.getState());
829
829
  }
830
830
  }), i.addEventListener("click", (r) => {
831
- (r.target instanceof Element ? r.target : null)?.closest("a[href]") && H();
832
- }), l.composerValue && (b.value = l.composerValue, Te(b)), t.initialDisplayState === "minimized" ? Pe("minimized", !1) : t.initialDisplayState === void 0 && l.isOpen && pe(b.value, !1);
831
+ (r.target instanceof Element ? r.target : null)?.closest("a[href]") && F();
832
+ }), l.composerValue && (b.value = l.composerValue, Ne(b)), t.initialDisplayState === "minimized" ? Le("minimized", !1) : t.initialDisplayState === void 0 && l.isOpen && pe(b.value, !1);
833
833
  const Oe = () => a;
834
- let Qe = w.getState().appearance !== null, Fe = null, Ne = null, ve = null, Rt = w.getState().isThinking, ye = null, Ce = null, Mt = () => {
834
+ let Qe = w.getState().appearance !== null, Fe = null, Ae = null, xe = null, Rt = w.getState().isThinking, ve = null, ye = null, Mt = () => {
835
835
  };
836
- const Kn = !!t.socialPostDraftHandler, et = /* @__PURE__ */ new Map(), tt = () => b.value.trim().length > 0 || y.length > 0, Yn = () => {
837
- const r = Ce !== null && ct(w.getState(), tt());
838
- ae.hidden = !r, r && Ce !== null && Ln(ae, Ce);
836
+ const Kn = !!t.socialPostDraftHandler, et = /* @__PURE__ */ new Map(), tt = () => b.value.trim().length > 0 || C.length > 0, Yn = () => {
837
+ const r = ye !== null && ct(w.getState(), tt());
838
+ M.hidden = !r, r && ye !== null && Ln(M, ye);
839
839
  };
840
- let Se = null;
840
+ let Ce = null;
841
841
  const Xn = () => {
842
- ue = !0, V(!0, "newSession"), K(), re = !1, me(), w.startNewSession(), Ke.clear(), b.value = "", y = [], _e(), Te(b), H(), $(), b.focus(), O(w.getState());
842
+ ue = !0, Y(!0, "newSession"), X(), re = !1, me(), w.startNewSession(), Ke.clear(), b.value = "", C = [], $(), Ne(b), F(), q(), b.focus(), U(w.getState());
843
843
  }, nt = (r) => {
844
844
  if (!r) {
845
- Se?.remove(), Se = null;
845
+ Ce?.remove(), Ce = null;
846
846
  return;
847
847
  }
848
- Se || (Se = Ve(
848
+ Ce || (Ce = Ve(
849
849
  "pluno-pa-widget__new-chat",
850
850
  "New chat",
851
851
  ki(),
852
852
  !1
853
- ), Se.addEventListener("click", Xn), de.insertBefore(Se, ce));
854
- }, O = (r) => {
855
- if (me(), yt(r.lastErrorCode) ? ye = r.lastErrorCode : t.billingStatus?.creditsUsed !== null && !Q(t.billingStatus) && (ye = null), dt(
856
- I,
853
+ ), Ce.addEventListener("click", Xn), de.insertBefore(Ce, ce));
854
+ }, U = (r) => {
855
+ if (me(), yt(r.lastErrorCode) ? ve = r.lastErrorCode : t.billingStatus?.creditsUsed !== null && !te(t.billingStatus) && (ve = null), dt(
856
+ A,
857
857
  t.billingStatus,
858
- ye
858
+ ve
859
859
  ), t.loginRequired) {
860
860
  et.clear(), pn(
861
- L,
861
+ P,
862
862
  D,
863
863
  nt,
864
864
  Oe,
@@ -871,7 +871,7 @@ async function Xo(e = {}) {
871
871
  }
872
872
  if (t.signupRequired) {
873
873
  et.clear(), pn(
874
- L,
874
+ P,
875
875
  D,
876
876
  nt,
877
877
  Oe,
@@ -886,46 +886,46 @@ async function Xo(e = {}) {
886
886
  Ct = s;
887
887
  const z = ue || ge.enabled;
888
888
  ue = !1, $i(
889
- L,
890
- A,
889
+ P,
890
+ G,
891
891
  D,
892
892
  nt,
893
- ae,
893
+ M,
894
894
  r,
895
- Ce,
896
- Ce !== null && ct(r, tt()),
895
+ ye,
896
+ ye !== null && ct(r, tt()),
897
897
  z,
898
898
  () => ge.enabled,
899
899
  Ke,
900
900
  et,
901
- H,
901
+ F,
902
902
  Oe,
903
903
  (N) => {
904
- ue = !0, V(!0, "send"), K(), w.sendMessage(N);
904
+ ue = !0, Y(!0, "send"), X(), w.sendMessage(N);
905
905
  },
906
906
  Kn && !Ye ? {
907
907
  dismissedCandidateIds: Me,
908
908
  draftingCandidateId: Fe,
909
- error: Ne,
909
+ error: Ae,
910
910
  characterIconOptions: Oe(),
911
911
  onSeen: (N) => {
912
- xe.add(N.id), H();
912
+ _e.add(N.id), F();
913
913
  },
914
914
  onDraft: (N) => {
915
915
  Zn(N);
916
916
  },
917
917
  onDismiss: (N) => {
918
- xe.add(N.id), Me.add(N.id), H(), Ne = null, O(w.getState());
918
+ _e.add(N.id), Me.add(N.id), F(), Ae = null, U(w.getState());
919
919
  },
920
920
  onDisable: (N) => {
921
- Ye = !0, xe.add(N.id), Me.add(N.id), H(), ga(t, !0), Ne = null, O(w.getState());
921
+ Ye = !0, _e.add(N.id), Me.add(N.id), F(), ga(t, !0), Ae = null, U(w.getState());
922
922
  }
923
923
  } : void 0
924
- ), z ? (he = L.scrollTop, K()) : E && ui(r) && Hn();
924
+ ), z ? (he = P.scrollTop, X()) : E && ui(r) && Hn();
925
925
  };
926
926
  return Mt = bo(
927
927
  (r) => {
928
- Ce = r, !ze && ct(w.getState(), tt()) && O(w.getState());
928
+ ye = r, !ze && ct(w.getState(), tt()) && U(w.getState());
929
929
  },
930
930
  {
931
931
  backendUrl: t.backendUrl,
@@ -934,13 +934,13 @@ async function Xo(e = {}) {
934
934
  }
935
935
  ), w.on("state", (r) => {
936
936
  const s = Rt && !r.isThinking;
937
- Rt = r.isThinking, r.appearance ? (Qe = !0, X(
937
+ Rt = r.isThinking, r.appearance ? (Qe = !0, J(
938
938
  "web-sdk.widget",
939
939
  "Agent state supplied appearance",
940
940
  {
941
941
  appearance: r.appearance
942
942
  }
943
- ), ot(r.appearance, "agent.state.appearance")) : Qe && (Qe = !1, X(
943
+ ), ot(r.appearance, "agent.state.appearance")) : Qe && (Qe = !1, J(
944
944
  "web-sdk.widget",
945
945
  "Agent state cleared appearance; reverting to configured widget options",
946
946
  {
@@ -948,8 +948,8 @@ async function Xo(e = {}) {
948
948
  fallbackColorScheme: t.colorScheme,
949
949
  fallbackFontFamily: t.fontFamily
950
950
  }
951
- ), ot({}, "agent.state.appearance-cleared")), O(r), $(), s && It();
952
- }), O(w.getState()), $(), {
951
+ ), ot({}, "agent.state.appearance-cleared")), U(r), q(), s && Pt();
952
+ }), U(w.getState()), q(), {
953
953
  agent: w,
954
954
  updateAppearance: (r) => {
955
955
  r.scribbleStyle !== void 0 && (t.scribbleStyle = r.scribbleStyle), ot(r, "widgetHandle.updateAppearance");
@@ -959,17 +959,17 @@ async function Xo(e = {}) {
959
959
  on(
960
960
  t.billingStatus,
961
961
  s,
962
- ye
963
- ) && (t.billingStatus = s, t.billingStatus?.creditsUsed !== null && !Q(t.billingStatus) && (ye = null), dt(
962
+ ve
963
+ ) && (t.billingStatus = s, t.billingStatus?.creditsUsed !== null && !te(t.billingStatus) && (ve = null), dt(
964
964
  i.querySelector(".pluno-pa-widget__billing-status"),
965
965
  t.billingStatus,
966
- ye
967
- ), $());
966
+ ve
967
+ ), q());
968
968
  },
969
969
  updateAuthGate: (r) => {
970
970
  const s = Ue();
971
- t.loginRequired = r.loginRequired === !0, t.signupRequired = r.signupRequired === !0, r.loginButtonLabel !== void 0 && (t.loginButtonLabel = r.loginButtonLabel), r.loginUrl !== void 0 && (t.loginUrl = r.loginUrl), r.signupButtonLabel !== void 0 && (t.signupButtonLabel = r.signupButtonLabel), r.signupUrl !== void 0 && (t.signupUrl = r.signupUrl), Nt(), O(w.getState()), $(), s && !Ue() && w.connect().catch((E) => {
972
- X(
971
+ t.loginRequired = r.loginRequired === !0, t.signupRequired = r.signupRequired === !0, r.loginButtonLabel !== void 0 && (t.loginButtonLabel = r.loginButtonLabel), r.loginUrl !== void 0 && (t.loginUrl = r.loginUrl), r.signupButtonLabel !== void 0 && (t.signupButtonLabel = r.signupButtonLabel), r.signupUrl !== void 0 && (t.signupUrl = r.signupUrl), Nt(), U(w.getState()), q(), s && !Ue() && w.connect().catch((E) => {
972
+ J(
973
973
  "web-sdk.widget",
974
974
  "Failed to connect after auth gate cleared",
975
975
  {
@@ -983,34 +983,34 @@ async function Xo(e = {}) {
983
983
  },
984
984
  updateDisplayState: (r) => {
985
985
  if (r === "shown") {
986
- Pe("shown", !1);
986
+ Le("shown", !1);
987
987
  return;
988
988
  }
989
- Pe("minimized", !1);
989
+ Le("minimized", !1);
990
990
  },
991
991
  destroy: () => {
992
- ze || (ze = !0, Et.disconnect(), At?.disconnect(), window.removeEventListener("resize", Lt), Pt(), B !== null && window.clearTimeout(B), Mt(), ve?.remove(), w.destroy(), o.remove());
992
+ ze || (ze = !0, Et.disconnect(), At?.disconnect(), window.removeEventListener("resize", Lt), It(), L !== null && window.clearTimeout(L), Mt(), xe?.remove(), w.destroy(), o.remove());
993
993
  }
994
994
  };
995
995
  async function Zn(r) {
996
996
  if (!Fe) {
997
- Fe = r.id, Ne = null, O(w.getState());
997
+ Fe = r.id, Ae = null, U(w.getState());
998
998
  try {
999
999
  if (!t.socialPostDraftHandler)
1000
1000
  throw new Error("Social post drafting is not available here.");
1001
1001
  const s = await t.socialPostDraftHandler(r);
1002
1002
  if (!s.linkedinPost || !s.xPost)
1003
1003
  throw new Error("Pluno did not return a complete social post draft.");
1004
- xe.add(r.id), Me.add(r.id), H(), ve?.remove(), ve = Ji(s, {
1004
+ _e.add(r.id), Me.add(r.id), F(), xe?.remove(), xe = Ji(s, {
1005
1005
  socialPostRewardsUrl: t.socialPostRewardsUrl,
1006
1006
  onClose: () => {
1007
- ve?.remove(), ve = null;
1007
+ xe?.remove(), xe = null;
1008
1008
  }
1009
- }), i.appendChild(ve);
1009
+ }), i.appendChild(xe);
1010
1010
  } catch (s) {
1011
- Ne = s instanceof Error ? s.message : "Could not draft social post.";
1011
+ Ae = s instanceof Error ? s.message : "Could not draft social post.";
1012
1012
  } finally {
1013
- Fe = null, O(w.getState());
1013
+ Fe = null, U(w.getState());
1014
1014
  }
1015
1015
  }
1016
1016
  }
@@ -1024,7 +1024,7 @@ async function Xo(e = {}) {
1024
1024
  colorScheme: z,
1025
1025
  fontFamily: N,
1026
1026
  scribbleStyle: it
1027
- }), X("web-sdk.widget", "Updated widget appearance", {
1027
+ }), J("web-sdk.widget", "Updated widget appearance", {
1028
1028
  source: s,
1029
1029
  inputAppearance: r,
1030
1030
  appliedAccentColor: E,
@@ -1114,33 +1114,33 @@ function ti({
1114
1114
  if (l !== h.pointerId || !p || !c)
1115
1115
  return;
1116
1116
  h.preventDefault();
1117
- const I = h.clientX - p.x, T = h.clientY - p.y;
1118
- !u && Math.hypot(I, T) < Vt || (u = !0, e.classList.add("pluno-pa-widget--dragging"), i({ x: c.x + I, y: c.y + T }));
1119
- }, F = (h) => {
1117
+ const A = h.clientX - p.x, T = h.clientY - p.y;
1118
+ !u && Math.hypot(A, T) < Vt || (u = !0, e.classList.add("pluno-pa-widget--dragging"), i({ x: c.x + A, y: c.y + T }));
1119
+ }, O = (h) => {
1120
1120
  l === h.pointerId && (h.preventDefault(), h.stopPropagation(), u && (d = { x: h.clientX, y: h.clientY }, a()), g());
1121
1121
  }, k = (h) => {
1122
1122
  l === h.pointerId && (h.preventDefault(), g());
1123
1123
  }, x = (h) => {
1124
1124
  if (!d)
1125
1125
  return;
1126
- const I = Math.hypot(
1126
+ const A = Math.hypot(
1127
1127
  h.clientX - d.x,
1128
1128
  h.clientY - d.y
1129
1129
  ) <= Vt;
1130
- d = null, I && (h.preventDefault(), h.stopPropagation());
1130
+ d = null, A && (h.preventDefault(), h.stopPropagation());
1131
1131
  }, v = (h) => {
1132
1132
  if (e.classList.contains("pluno-pa-widget--open") || e.classList.contains("pluno-pa-widget--closing"))
1133
1133
  return;
1134
- const I = h.shiftKey ? Vo : jo, T = n();
1135
- let P = null;
1136
- h.key === "ArrowUp" ? P = { x: T.x, y: T.y - I } : h.key === "ArrowDown" ? P = { x: T.x, y: T.y + I } : h.key === "ArrowLeft" ? P = { x: T.x - I, y: T.y } : h.key === "ArrowRight" && (P = { x: T.x + I, y: T.y }), P && (h.preventDefault(), h.stopPropagation(), i(P), a());
1134
+ const A = h.shiftKey ? Vo : jo, T = n();
1135
+ let I = null;
1136
+ h.key === "ArrowUp" ? I = { x: T.x, y: T.y - A } : h.key === "ArrowDown" ? I = { x: T.x, y: T.y + A } : h.key === "ArrowLeft" ? I = { x: T.x - A, y: T.y } : h.key === "ArrowRight" && (I = { x: T.x + A, y: T.y }), I && (h.preventDefault(), h.stopPropagation(), i(I), a());
1137
1137
  };
1138
- return t.addEventListener("pointerdown", S), t.addEventListener("pointermove", f), t.addEventListener("pointerup", F), t.addEventListener("pointercancel", k), t.addEventListener("click", x, !0), o.addEventListener("keydown", v), () => {
1139
- t.removeEventListener("pointerdown", S), t.removeEventListener("pointermove", f), t.removeEventListener("pointerup", F), t.removeEventListener("pointercancel", k), t.removeEventListener("click", x, !0), o.removeEventListener("keydown", v);
1138
+ return t.addEventListener("pointerdown", S), t.addEventListener("pointermove", f), t.addEventListener("pointerup", O), t.addEventListener("pointercancel", k), t.addEventListener("click", x, !0), o.addEventListener("keydown", v), () => {
1139
+ t.removeEventListener("pointerdown", S), t.removeEventListener("pointermove", f), t.removeEventListener("pointerup", O), t.removeEventListener("pointercancel", k), t.removeEventListener("click", x, !0), o.removeEventListener("keydown", v);
1140
1140
  };
1141
1141
  }
1142
1142
  function je(e, t = !0) {
1143
- const o = ee();
1143
+ const o = ne();
1144
1144
  if (e.classList.contains("pluno-pa-widget--minimized"))
1145
1145
  return e.classList.contains("pluno-pa-widget--scribble") ? {
1146
1146
  width: Do,
@@ -1153,23 +1153,23 @@ function je(e, t = !0) {
1153
1153
  };
1154
1154
  }
1155
1155
  function Sn() {
1156
- const e = ee();
1156
+ const e = ne();
1157
1157
  return {
1158
1158
  width: Math.min(
1159
- Ee(
1159
+ Se(
1160
1160
  e.width * Oo,
1161
1161
  Bo,
1162
1162
  Uo
1163
1163
  ),
1164
- e.width - W * 2
1164
+ e.width - H * 2
1165
1165
  ),
1166
1166
  height: Math.min(
1167
- Ee(
1167
+ Se(
1168
1168
  e.height * Wo,
1169
1169
  Fo,
1170
1170
  Ho
1171
1171
  ),
1172
- e.height - mt - W
1172
+ e.height - mt - H
1173
1173
  )
1174
1174
  };
1175
1175
  }
@@ -1180,7 +1180,7 @@ function ni(e, t, o) {
1180
1180
  const a = e.getBoundingClientRect();
1181
1181
  if (a.width > 0 || a.height > 0)
1182
1182
  return { x: a.left, y: a.top };
1183
- const l = ee();
1183
+ const l = ne();
1184
1184
  return {
1185
1185
  x: t === "bottom-left" ? 26 : l.width - 26 - o.width,
1186
1186
  y: l.height - 24 - o.height
@@ -1195,42 +1195,42 @@ function rt(e, t, o) {
1195
1195
  ) : oi(o === "bottom-left" ? "bottom-left" : "bottom-right", n, Mo);
1196
1196
  }
1197
1197
  function oi(e, t, o) {
1198
- const n = ee();
1198
+ const n = ne();
1199
1199
  return {
1200
1200
  x: e.endsWith("right") ? Math.max(0, n.width - t.width - o) : o,
1201
1201
  y: e.startsWith("bottom") ? Math.max(0, n.height - t.height - o) : o
1202
1202
  };
1203
1203
  }
1204
1204
  function bt(e, t, o) {
1205
- const n = ee(), i = W + ri(e);
1205
+ const n = ne(), i = H + ri(e);
1206
1206
  return {
1207
- x: Ee(
1207
+ x: Se(
1208
1208
  t.x,
1209
- W,
1209
+ H,
1210
1210
  Math.max(
1211
- W,
1212
- n.width - o.width - W
1211
+ H,
1212
+ n.width - o.width - H
1213
1213
  )
1214
1214
  ),
1215
- y: Ee(
1215
+ y: Se(
1216
1216
  t.y,
1217
1217
  i,
1218
1218
  Math.max(
1219
1219
  i,
1220
- n.height - o.height - W
1220
+ n.height - o.height - H
1221
1221
  )
1222
1222
  )
1223
1223
  };
1224
1224
  }
1225
1225
  function En(e, t) {
1226
- const o = ee();
1226
+ const o = ne();
1227
1227
  return {
1228
1228
  x: e.anchor.endsWith("right") ? o.width - t.width - e.x : e.x,
1229
1229
  y: e.anchor.startsWith("bottom") ? o.height - t.height - e.y : e.y
1230
1230
  };
1231
1231
  }
1232
1232
  function ii(e, t) {
1233
- const o = ai(e, t), n = ee();
1233
+ const o = ai(e, t), n = ne();
1234
1234
  return {
1235
1235
  anchor: o,
1236
1236
  x: o.endsWith("right") ? n.width - e.x - t.width : e.x,
@@ -1238,7 +1238,7 @@ function ii(e, t) {
1238
1238
  };
1239
1239
  }
1240
1240
  function ai(e, t) {
1241
- const o = ee(), n = e.x + t.width / 2, a = e.y + t.height / 2 <= o.height / 2 ? "top" : "bottom", l = n <= o.width / 2 ? "left" : "right";
1241
+ const o = ne(), n = e.x + t.width / 2, a = e.y + t.height / 2 <= o.height / 2 ? "top" : "bottom", l = n <= o.width / 2 ? "left" : "right";
1242
1242
  return `${a}-${l}`;
1243
1243
  }
1244
1244
  function ri(e) {
@@ -1252,22 +1252,22 @@ function Zt(e, t, o) {
1252
1252
  return li(a);
1253
1253
  }
1254
1254
  function li(e) {
1255
- const t = ee(), o = Sn();
1255
+ const t = ne(), o = Sn();
1256
1256
  return {
1257
- x: Ee(
1257
+ x: Se(
1258
1258
  e.x,
1259
- W,
1259
+ H,
1260
1260
  Math.max(
1261
- W,
1262
- t.width - o.width - W
1261
+ H,
1262
+ t.width - o.width - H
1263
1263
  )
1264
1264
  ),
1265
- y: Ee(
1265
+ y: Se(
1266
1266
  e.y,
1267
1267
  mt,
1268
1268
  Math.max(
1269
1269
  mt,
1270
- t.height - o.height - W
1270
+ t.height - o.height - H
1271
1271
  )
1272
1272
  )
1273
1273
  };
@@ -1285,10 +1285,10 @@ function pi(e, t) {
1285
1285
  function Jt(e) {
1286
1286
  e.style.removeProperty("--pluno-pa-panel-offset-x"), e.style.removeProperty("--pluno-pa-panel-offset-y");
1287
1287
  }
1288
- function ee() {
1288
+ function ne() {
1289
1289
  return {
1290
- width: window.innerWidth || document.documentElement.clientWidth || _n + W * 2,
1291
- height: window.innerHeight || document.documentElement.clientHeight || xn + W * 2
1290
+ width: window.innerWidth || document.documentElement.clientWidth || _n + H * 2,
1291
+ height: window.innerHeight || document.documentElement.clientHeight || xn + H * 2
1292
1292
  };
1293
1293
  }
1294
1294
  function lt(e) {
@@ -1300,10 +1300,10 @@ function lt(e) {
1300
1300
  height: Math.round(t.height)
1301
1301
  };
1302
1302
  }
1303
- function Ee(e, t, o) {
1303
+ function Se(e, t, o) {
1304
1304
  return Math.min(Math.max(e, t), o);
1305
1305
  }
1306
- function X(e, t, o) {
1306
+ function J(e, t, o) {
1307
1307
  if (typeof window > "u")
1308
1308
  return;
1309
1309
  const n = window, i = {
@@ -1313,11 +1313,11 @@ function X(e, t, o) {
1313
1313
  details: o
1314
1314
  }, a = n.__plunoProductAgentDiagnostics__ ?? [];
1315
1315
  a.push(i), a.length > 120 && a.splice(0, a.length - 120), n.__plunoProductAgentDiagnostics__ = a, n.__PLUNO_PRODUCT_AGENT_DIAGNOSTICS__ = () => [...a], window.dispatchEvent(
1316
- new CustomEvent(Io, { detail: i })
1316
+ new CustomEvent(Po, { detail: i })
1317
1317
  );
1318
1318
  }
1319
1319
  function si(e, t) {
1320
- X("web-sdk.widget.position", e, t);
1320
+ J("web-sdk.widget.position", e, t);
1321
1321
  }
1322
1322
  function pt(e, t, o) {
1323
1323
  const n = t.value.trim();
@@ -1328,12 +1328,12 @@ function pt(e, t, o) {
1328
1328
  function di(e) {
1329
1329
  return e;
1330
1330
  }
1331
- function Te(e) {
1331
+ function Ne(e) {
1332
1332
  e.style.height = "0px";
1333
1333
  const t = Math.max(22, Math.min(e.scrollHeight, 140));
1334
1334
  e.style.height = `${t}px`, e.style.overflowY = e.scrollHeight > 140 ? "auto" : "hidden";
1335
1335
  }
1336
- function De(e, t = () => !0) {
1336
+ function Te(e, t = () => !0) {
1337
1337
  e.scrollTop = e.scrollHeight, window.requestAnimationFrame(() => {
1338
1338
  t() && (e.scrollTop = e.scrollHeight);
1339
1339
  });
@@ -1406,7 +1406,7 @@ function fi(e, t, o, n) {
1406
1406
  l.type = "button", l.className = "pluno-pa-widget__launcher-drag-handle", l.setAttribute("aria-label", "Move Pluno launcher"), l.title = "Move Pluno launcher", i.appendChild(l);
1407
1407
  }
1408
1408
  i.appendChild(
1409
- In(
1409
+ Pn(
1410
1410
  "pluno-pa-widget__scribble-spirals--launcher",
1411
1411
  10
1412
1412
  )
@@ -1426,7 +1426,7 @@ function fi(e, t, o, n) {
1426
1426
  function wi(e) {
1427
1427
  const t = document.createElement("section");
1428
1428
  t.className = "pluno-pa-widget__panel", t.hidden = !0, t.appendChild(
1429
- In("pluno-pa-widget__scribble-spirals--panel", 16)
1429
+ Pn("pluno-pa-widget__scribble-spirals--panel", 16)
1430
1430
  );
1431
1431
  const o = document.createElement("div");
1432
1432
  o.className = "pluno-pa-widget__timeline-wrap";
@@ -1462,7 +1462,7 @@ function _i() {
1462
1462
  const a = document.createElement("input");
1463
1463
  a.className = "pluno-pa-widget__attachment-input", a.type = "file", a.multiple = !0, a.tabIndex = -1, a.setAttribute("aria-hidden", "true"), i.appendChild(a);
1464
1464
  const l = document.createElement("button");
1465
- l.type = "button", l.className = "pluno-pa-widget__attach", l.setAttribute("aria-label", "Attach files"), l.title = "Attach files", l.appendChild(Ii()), l.appendChild(Ai()), i.appendChild(l);
1465
+ l.type = "button", l.className = "pluno-pa-widget__attach", l.setAttribute("aria-label", "Attach files"), l.title = "Attach files", l.appendChild(Pi()), l.appendChild(Ai()), i.appendChild(l);
1466
1466
  const p = document.createElement("textarea");
1467
1467
  p.className = "pluno-pa-widget__input", p.rows = 1, p.placeholder = "Ask for anything...", i.appendChild(p);
1468
1468
  const c = document.createElement("button");
@@ -1484,7 +1484,7 @@ function xi() {
1484
1484
  const n = Ve(
1485
1485
  "pluno-pa-widget__history-close",
1486
1486
  "Close recent chats",
1487
- Pi(),
1487
+ Ii(),
1488
1488
  !1
1489
1489
  );
1490
1490
  t.append(o, n);
@@ -1539,7 +1539,7 @@ function yi(e, t) {
1539
1539
  eyeShadow: `${t}-eyeShadow`,
1540
1540
  pupilGloss: `${t}-pupilGloss`,
1541
1541
  boltClip: `${t}-boltClip`
1542
- }, i = Pn(), a = m(i, "defs"), l = m(a, "linearGradient", {
1542
+ }, i = In(), a = m(i, "defs"), l = m(a, "linearGradient", {
1543
1543
  id: n.boltFill,
1544
1544
  x1: "420",
1545
1545
  y1: "180",
@@ -1641,7 +1641,7 @@ function yi(e, t) {
1641
1641
  "flood-color": o.shadow,
1642
1642
  "flood-opacity": "0.3"
1643
1643
  });
1644
- const F = m(a, "filter", {
1644
+ const O = m(a, "filter", {
1645
1645
  id: n.pupilGloss,
1646
1646
  x: "-15%",
1647
1647
  y: "-15%",
@@ -1649,7 +1649,7 @@ function yi(e, t) {
1649
1649
  height: "130%",
1650
1650
  "color-interpolation-filters": "sRGB"
1651
1651
  });
1652
- m(F, "feDropShadow", {
1652
+ m(O, "feDropShadow", {
1653
1653
  dx: "0",
1654
1654
  dy: "3",
1655
1655
  stdDeviation: "3",
@@ -1659,24 +1659,24 @@ function yi(e, t) {
1659
1659
  const k = m(a, "clipPath", { id: n.boltClip });
1660
1660
  m(k, "path", { d: $e });
1661
1661
  const x = m(i, "g", {
1662
- filter: q(n.softDropShadow)
1662
+ filter: j(n.softDropShadow)
1663
1663
  });
1664
1664
  m(x, "path", {
1665
1665
  d: $e,
1666
- fill: q(n.boltEdge)
1666
+ fill: j(n.boltEdge)
1667
1667
  });
1668
1668
  const v = "M546 166 C522 166 505 180 499 204 L397 606 C390 630 406 646 432 646 L526 646 C568 646 590 672 581 712 L512 1001 C510 1010 518 1014 524 1006 L875 475 C886 458 878 449 855 449 L814 449 C764 449 745 415 769 374 L884 200 C894 181 883 161 858 161 Z";
1669
1669
  m(x, "path", {
1670
1670
  d: v,
1671
- fill: q(n.boltFill),
1672
- filter: q(n.innerDepth)
1671
+ fill: j(n.boltFill),
1672
+ filter: j(n.innerDepth)
1673
1673
  }), m(x, "path", {
1674
1674
  d: v,
1675
- fill: q(n.boltGlow),
1675
+ fill: j(n.boltGlow),
1676
1676
  opacity: "0.74"
1677
1677
  });
1678
1678
  const h = m(x, "g", {
1679
- "clip-path": q(n.boltClip),
1679
+ "clip-path": j(n.boltClip),
1680
1680
  opacity: "0.42"
1681
1681
  });
1682
1682
  m(h, "path", {
@@ -1701,9 +1701,9 @@ function yi(e, t) {
1701
1701
  "stroke-linecap": "round",
1702
1702
  opacity: "0.48"
1703
1703
  });
1704
- const I = m(i, "g", { filter: q(n.eyeShadow) });
1704
+ const A = m(i, "g", { filter: j(n.eyeShadow) });
1705
1705
  return Qt(
1706
- I,
1706
+ A,
1707
1707
  "rotate(-2 528 463)",
1708
1708
  "528",
1709
1709
  "463",
@@ -1713,7 +1713,7 @@ function yi(e, t) {
1713
1713
  "447",
1714
1714
  n
1715
1715
  ), Qt(
1716
- I,
1716
+ A,
1717
1717
  "rotate(2 717 462)",
1718
1718
  "717",
1719
1719
  "462",
@@ -1728,7 +1728,7 @@ function Ci(e, t) {
1728
1728
  const o = hn(e), n = {
1729
1729
  clip: `${t}-scribbleBoltClip`,
1730
1730
  wobble: `${t}-scribbleBoltWobble`
1731
- }, i = Pn(), a = m(i, "defs"), l = m(a, "clipPath", { id: n.clip });
1731
+ }, i = In(), a = m(i, "defs"), l = m(a, "clipPath", { id: n.clip });
1732
1732
  m(l, "path", { d: $e });
1733
1733
  const p = m(a, "filter", {
1734
1734
  id: n.wobble,
@@ -1751,8 +1751,8 @@ function Ci(e, t) {
1751
1751
  xChannelSelector: "R",
1752
1752
  yChannelSelector: "G"
1753
1753
  });
1754
- const c = m(i, "g", { filter: q(n.wobble) }), u = m(c, "g", {
1755
- "clip-path": q(n.clip)
1754
+ const c = m(i, "g", { filter: j(n.wobble) }), u = m(c, "g", {
1755
+ "clip-path": j(n.clip)
1756
1756
  });
1757
1757
  return m(u, "path", {
1758
1758
  d: eo(),
@@ -1789,8 +1789,8 @@ function Ci(e, t) {
1789
1789
  "447"
1790
1790
  ), i;
1791
1791
  }
1792
- function Pn() {
1793
- return C("svg", {
1792
+ function In() {
1793
+ return y("svg", {
1794
1794
  xmlns: vn,
1795
1795
  viewBox: "0 0 1254 1254"
1796
1796
  });
@@ -1802,14 +1802,14 @@ function Qt(e, t, o, n, i, a, l, p, c) {
1802
1802
  cy: n,
1803
1803
  rx: "73",
1804
1804
  ry: "80",
1805
- fill: q(c.eyeWhite)
1805
+ fill: j(c.eyeWhite)
1806
1806
  }), m(u, "ellipse", {
1807
1807
  cx: i,
1808
1808
  cy: a,
1809
1809
  rx: "49",
1810
1810
  ry: "57",
1811
- fill: q(c.pupil),
1812
- filter: q(c.pupilGloss)
1811
+ fill: j(c.pupil),
1812
+ filter: j(c.pupilGloss)
1813
1813
  }), m(u, "circle", {
1814
1814
  cx: l,
1815
1815
  cy: p,
@@ -1841,14 +1841,14 @@ function en(e, t, o, n, i, a, l, p) {
1841
1841
  });
1842
1842
  }
1843
1843
  function m(e, t, o = {}) {
1844
- const n = C(t, o);
1844
+ const n = y(t, o);
1845
1845
  return e.appendChild(n), n;
1846
1846
  }
1847
1847
  function R(e, t, o, n) {
1848
1848
  const i = { offset: t, "stop-color": o };
1849
1849
  n !== void 0 && (i["stop-opacity"] = n), m(e, "stop", i);
1850
1850
  }
1851
- function q(e) {
1851
+ function j(e) {
1852
1852
  return `url(#${e})`;
1853
1853
  }
1854
1854
  function Ve(e, t, o, n) {
@@ -1856,21 +1856,21 @@ function Ve(e, t, o, n) {
1856
1856
  return i.type = "button", i.className = e, i.setAttribute("aria-label", t), i.title = t, i.hidden = n, i.appendChild(o), i;
1857
1857
  }
1858
1858
  function Si() {
1859
- const e = C("svg", {
1859
+ const e = y("svg", {
1860
1860
  class: "pluno-pa-widget__scribble-defs",
1861
1861
  "aria-hidden": "true",
1862
1862
  focusable: "false",
1863
1863
  width: "0",
1864
1864
  height: "0"
1865
- }), t = C("defs");
1865
+ }), t = y("defs");
1866
1866
  return t.appendChild(st("pluno-pa-scribble-wobble", "2", "12")), t.appendChild(
1867
1867
  st("pluno-pa-scribble-wobble-2", "5", "15")
1868
1868
  ), t.appendChild(
1869
1869
  st("pluno-pa-scribble-wobble-3", "9", "19")
1870
1870
  ), e.appendChild(t), e;
1871
1871
  }
1872
- function In(e, t) {
1873
- const o = t * $t + qt * 2, n = C("svg", {
1872
+ function Pn(e, t) {
1873
+ const o = t * $t + qt * 2, n = y("svg", {
1874
1874
  class: `pluno-pa-widget__scribble-spirals ${e}`,
1875
1875
  viewBox: `0 0 ${o} ${Go}`,
1876
1876
  preserveAspectRatio: "xMidYMid meet",
@@ -1878,11 +1878,11 @@ function In(e, t) {
1878
1878
  focusable: "false"
1879
1879
  });
1880
1880
  for (let i = 0; i < t; i += 1) {
1881
- const a = jt[i % jt.length], l = C("g", {
1881
+ const a = jt[i % jt.length], l = y("g", {
1882
1882
  transform: `translate(${qt + i * $t} 0)`
1883
1883
  });
1884
1884
  l.appendChild(
1885
- C("ellipse", {
1885
+ y("ellipse", {
1886
1886
  cx: a.ellipseCx,
1887
1887
  cy: a.ellipseCy,
1888
1888
  rx: a.ellipseRx,
@@ -1893,7 +1893,7 @@ function In(e, t) {
1893
1893
  opacity: "0.8"
1894
1894
  })
1895
1895
  ), l.appendChild(
1896
- C("path", {
1896
+ y("path", {
1897
1897
  d: a.path,
1898
1898
  fill: "none",
1899
1899
  stroke: "#2c2a1e",
@@ -1905,7 +1905,7 @@ function In(e, t) {
1905
1905
  return n;
1906
1906
  }
1907
1907
  function st(e, t, o) {
1908
- const n = C("filter", {
1908
+ const n = y("filter", {
1909
1909
  id: e,
1910
1910
  x: "-8%",
1911
1911
  y: "-8%",
@@ -1913,7 +1913,7 @@ function st(e, t, o) {
1913
1913
  height: "116%"
1914
1914
  });
1915
1915
  return n.appendChild(
1916
- C("feTurbulence", {
1916
+ y("feTurbulence", {
1917
1917
  type: "fractalNoise",
1918
1918
  baseFrequency: "0.012 0.028",
1919
1919
  numOctaves: "3",
@@ -1921,7 +1921,7 @@ function st(e, t, o) {
1921
1921
  result: "stroke-noise"
1922
1922
  })
1923
1923
  ), n.appendChild(
1924
- C("feDisplacementMap", {
1924
+ y("feDisplacementMap", {
1925
1925
  in: "SourceGraphic",
1926
1926
  in2: "stroke-noise",
1927
1927
  scale: "3.5",
@@ -1930,7 +1930,7 @@ function st(e, t, o) {
1930
1930
  result: "warped"
1931
1931
  })
1932
1932
  ), n.appendChild(
1933
- C("feTurbulence", {
1933
+ y("feTurbulence", {
1934
1934
  type: "fractalNoise",
1935
1935
  baseFrequency: "0.7",
1936
1936
  numOctaves: "1",
@@ -1938,7 +1938,7 @@ function st(e, t, o) {
1938
1938
  result: "ink-noise"
1939
1939
  })
1940
1940
  ), n.appendChild(
1941
- C("feDisplacementMap", {
1941
+ y("feDisplacementMap", {
1942
1942
  in: "warped",
1943
1943
  in2: "ink-noise",
1944
1944
  scale: "0.9",
@@ -1948,7 +1948,7 @@ function st(e, t, o) {
1948
1948
  ), n;
1949
1949
  }
1950
1950
  function Ei(e) {
1951
- const t = te(
1951
+ const t = oe(
1952
1952
  "0 0 24 24",
1953
1953
  e,
1954
1954
  e,
@@ -1956,10 +1956,10 @@ function Ei(e) {
1956
1956
  "currentColor",
1957
1957
  "2.25"
1958
1958
  );
1959
- return t.appendChild(C("path", { d: "m6 9 6 6 6-6" })), t;
1959
+ return t.appendChild(y("path", { d: "m6 9 6 6 6-6" })), t;
1960
1960
  }
1961
1961
  function ki() {
1962
- const e = te(
1962
+ const e = oe(
1963
1963
  "0 0 24 24",
1964
1964
  17,
1965
1965
  17,
@@ -1968,17 +1968,17 @@ function ki() {
1968
1968
  "2.25"
1969
1969
  );
1970
1970
  return e.appendChild(
1971
- C("path", {
1971
+ y("path", {
1972
1972
  d: "M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"
1973
1973
  })
1974
1974
  ), e.appendChild(
1975
- C("path", {
1975
+ y("path", {
1976
1976
  d: "M18.4 2.6a2.1 2.1 0 0 1 3 3L12 15l-4 1 1-4Z"
1977
1977
  })
1978
1978
  ), e;
1979
1979
  }
1980
1980
  function Li() {
1981
- const e = te(
1981
+ const e = oe(
1982
1982
  "0 0 24 24",
1983
1983
  17,
1984
1984
  17,
@@ -1986,10 +1986,10 @@ function Li() {
1986
1986
  "currentColor",
1987
1987
  "2.25"
1988
1988
  );
1989
- return e.appendChild(C("path", { d: "M3 12a9 9 0 1 0 3-6.7" })), e.appendChild(C("path", { d: "M3 4v5h5" })), e.appendChild(C("path", { d: "M12 7v5l3 2" })), e;
1989
+ return e.appendChild(y("path", { d: "M3 12a9 9 0 1 0 3-6.7" })), e.appendChild(y("path", { d: "M3 4v5h5" })), e.appendChild(y("path", { d: "M12 7v5l3 2" })), e;
1990
1990
  }
1991
- function Pi() {
1992
- const e = te(
1991
+ function Ii() {
1992
+ const e = oe(
1993
1993
  "0 0 24 24",
1994
1994
  15,
1995
1995
  15,
@@ -1997,10 +1997,10 @@ function Pi() {
1997
1997
  "currentColor",
1998
1998
  "2.4"
1999
1999
  );
2000
- return e.appendChild(C("path", { d: "M18 6 6 18" })), e.appendChild(C("path", { d: "m6 6 12 12" })), e;
2000
+ return e.appendChild(y("path", { d: "M18 6 6 18" })), e.appendChild(y("path", { d: "m6 6 12 12" })), e;
2001
2001
  }
2002
2002
  function An() {
2003
- const e = te(
2003
+ const e = oe(
2004
2004
  "0 0 24 24",
2005
2005
  14,
2006
2006
  14,
@@ -2009,11 +2009,11 @@ function An() {
2009
2009
  "2.75"
2010
2010
  );
2011
2011
  return e.appendChild(
2012
- C("line", { x1: "12", y1: "19", x2: "12", y2: "5" })
2013
- ), e.appendChild(C("polyline", { points: "5 12 12 5 19 12" })), e;
2012
+ y("line", { x1: "12", y1: "19", x2: "12", y2: "5" })
2013
+ ), e.appendChild(y("polyline", { points: "5 12 12 5 19 12" })), e;
2014
2014
  }
2015
- function Ii() {
2016
- const e = te(
2015
+ function Pi() {
2016
+ const e = oe(
2017
2017
  "0 0 24 24",
2018
2018
  16,
2019
2019
  16,
@@ -2025,18 +2025,18 @@ function Ii() {
2025
2025
  "class",
2026
2026
  "pluno-pa-widget__paperclip-icon pluno-pa-widget__paperclip-icon--standard"
2027
2027
  ), e.appendChild(
2028
- C("path", {
2028
+ y("path", {
2029
2029
  d: "m21.4 11.6-8.5 8.5a6 6 0 0 1-8.5-8.5l9.2-9.2a4 4 0 0 1 5.7 5.7l-9.2 9.2a2 2 0 0 1-2.8-2.8l8.5-8.5"
2030
2030
  })
2031
2031
  ), e;
2032
2032
  }
2033
2033
  function Ai() {
2034
- const e = te("0 0 24 24", 19, 19, "none", "currentColor");
2034
+ const e = oe("0 0 24 24", 19, 19, "none", "currentColor");
2035
2035
  return e.setAttribute(
2036
2036
  "class",
2037
2037
  "pluno-pa-widget__paperclip-icon pluno-pa-widget__paperclip-icon--scribble"
2038
2038
  ), e.appendChild(
2039
- C("path", {
2039
+ y("path", {
2040
2040
  d: "M7.1 15.6 15.2 7.7c1.9-1.8 4.9.8 2.7 3.2l-8.8 8.3c-3.2 3-8-1.1-4.6-4.8l10.1-9.1",
2041
2041
  stroke: "currentColor",
2042
2042
  "stroke-width": "2",
@@ -2046,9 +2046,9 @@ function Ai() {
2046
2046
  ), e;
2047
2047
  }
2048
2048
  function Ni() {
2049
- const e = te("0 0 24 24", 18, 18, "currentColor");
2049
+ const e = oe("0 0 24 24", 18, 18, "currentColor");
2050
2050
  return e.appendChild(
2051
- C("rect", {
2051
+ y("rect", {
2052
2052
  x: "6",
2053
2053
  y: "6",
2054
2054
  width: "12",
@@ -2058,7 +2058,7 @@ function Ni() {
2058
2058
  ), e;
2059
2059
  }
2060
2060
  function Ti() {
2061
- const e = te(
2061
+ const e = oe(
2062
2062
  "0 0 24 24",
2063
2063
  12,
2064
2064
  12,
@@ -2066,10 +2066,10 @@ function Ti() {
2066
2066
  "currentColor",
2067
2067
  "2.4"
2068
2068
  );
2069
- return e.appendChild(C("path", { d: "M18 6 6 18" })), e.appendChild(C("path", { d: "m6 6 12 12" })), e;
2069
+ return e.appendChild(y("path", { d: "M18 6 6 18" })), e.appendChild(y("path", { d: "m6 6 12 12" })), e;
2070
2070
  }
2071
2071
  function Di() {
2072
- const e = te(
2072
+ const e = oe(
2073
2073
  "0 0 24 24",
2074
2074
  13,
2075
2075
  13,
@@ -2078,7 +2078,7 @@ function Di() {
2078
2078
  "2.25"
2079
2079
  );
2080
2080
  return e.appendChild(
2081
- C("rect", {
2081
+ y("rect", {
2082
2082
  width: "14",
2083
2083
  height: "14",
2084
2084
  x: "8",
@@ -2087,12 +2087,12 @@ function Di() {
2087
2087
  ry: "2"
2088
2088
  })
2089
2089
  ), e.appendChild(
2090
- C("path", {
2090
+ y("path", {
2091
2091
  d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"
2092
2092
  })
2093
2093
  ), e;
2094
2094
  }
2095
- function te(e, t, o, n, i, a) {
2095
+ function oe(e, t, o, n, i, a) {
2096
2096
  const l = {
2097
2097
  viewBox: e,
2098
2098
  width: String(t),
@@ -2100,9 +2100,9 @@ function te(e, t, o, n, i, a) {
2100
2100
  fill: n,
2101
2101
  "aria-hidden": "true"
2102
2102
  };
2103
- return i && (l.stroke = i, l["stroke-linecap"] = "round", l["stroke-linejoin"] = "round"), a && (l["stroke-width"] = a), C("svg", l);
2103
+ return i && (l.stroke = i, l["stroke-linecap"] = "round", l["stroke-linejoin"] = "round"), a && (l["stroke-width"] = a), y("svg", l);
2104
2104
  }
2105
- function C(e, t = {}) {
2105
+ function y(e, t = {}) {
2106
2106
  const o = document.createElementNS(vn, e);
2107
2107
  for (const [n, i] of Object.entries(t))
2108
2108
  o.setAttribute(n, i);
@@ -2129,31 +2129,31 @@ function Mi(e) {
2129
2129
  const t = vt(e), o = Nn(e);
2130
2130
  if (t === "image" && o) {
2131
2131
  const n = document.createElement("img");
2132
- return n.src = o, n.alt = "", n.setAttribute("aria-hidden", "true"), n.addEventListener("error", () => n.replaceWith(J(e))), n;
2132
+ return n.src = o, n.alt = "", n.setAttribute("aria-hidden", "true"), n.addEventListener("error", () => n.replaceWith(ee(e))), n;
2133
2133
  }
2134
2134
  if (t === "video" && o) {
2135
2135
  const n = document.createElement("video");
2136
- return n.src = o, n.muted = !0, n.preload = "metadata", n.setAttribute("aria-hidden", "true"), n.addEventListener("error", () => n.replaceWith(J(e))), n.addEventListener("stalled", () => n.replaceWith(J(e))), n;
2136
+ return n.src = o, n.muted = !0, n.preload = "metadata", n.setAttribute("aria-hidden", "true"), n.addEventListener("error", () => n.replaceWith(ee(e))), n.addEventListener("stalled", () => n.replaceWith(ee(e))), n;
2137
2137
  }
2138
- return J(e);
2138
+ return ee(e);
2139
2139
  }
2140
2140
  function zi(e) {
2141
2141
  const t = vt(e), o = Nn(e);
2142
2142
  if (t === "image" && o) {
2143
2143
  const n = document.createElement("img");
2144
- return n.className = "pluno-pa-widget__message-attachment-preview", n.src = o, n.alt = e.name, n.addEventListener("error", () => n.replaceWith(J(e, "message"))), n;
2144
+ return n.className = "pluno-pa-widget__message-attachment-preview", n.src = o, n.alt = e.name, n.addEventListener("error", () => n.replaceWith(ee(e, "message"))), n;
2145
2145
  }
2146
2146
  if (t === "pdf" && o) {
2147
2147
  const n = document.createElement("object");
2148
- return n.className = "pluno-pa-widget__message-attachment-preview pluno-pa-widget__message-attachment-preview--pdf", n.data = o, n.type = "application/pdf", n.setAttribute("aria-label", e.name), n.addEventListener("error", () => n.replaceWith(J(e, "message"))), n.appendChild(J(e, "message")), n;
2148
+ return n.className = "pluno-pa-widget__message-attachment-preview pluno-pa-widget__message-attachment-preview--pdf", n.data = o, n.type = "application/pdf", n.setAttribute("aria-label", e.name), n.addEventListener("error", () => n.replaceWith(ee(e, "message"))), n.appendChild(ee(e, "message")), n;
2149
2149
  }
2150
2150
  if (t === "video" && o) {
2151
2151
  const n = document.createElement("video");
2152
- return n.className = "pluno-pa-widget__message-attachment-preview", n.src = o, n.muted = !0, n.preload = "metadata", n.addEventListener("error", () => n.replaceWith(J(e, "message"))), n.addEventListener("stalled", () => n.replaceWith(J(e, "message"))), n;
2152
+ return n.className = "pluno-pa-widget__message-attachment-preview", n.src = o, n.muted = !0, n.preload = "metadata", n.addEventListener("error", () => n.replaceWith(ee(e, "message"))), n.addEventListener("stalled", () => n.replaceWith(ee(e, "message"))), n;
2153
2153
  }
2154
- return J(e, "message");
2154
+ return ee(e, "message");
2155
2155
  }
2156
- function J(e, t = "composer") {
2156
+ function ee(e, t = "composer") {
2157
2157
  if (t === "composer") {
2158
2158
  const a = document.createElement("span");
2159
2159
  return a.className = "pluno-pa-widget__attachment-file", a.textContent = nn(e), a;
@@ -2192,7 +2192,7 @@ function dt(e, t, o = null) {
2192
2192
  e && (e.hidden = !0, e.replaceChildren());
2193
2193
  return;
2194
2194
  }
2195
- e.hidden = !1, e.replaceChildren(), e.className = "pluno-pa-widget__billing-status", Q(t) || yt(o) ? e.appendChild(
2195
+ e.hidden = !1, e.replaceChildren(), e.className = "pluno-pa-widget__billing-status", te(t) || yt(o) ? e.appendChild(
2196
2196
  Oi(t, o)
2197
2197
  ) : Tn(t) && e.appendChild(Fi(t));
2198
2198
  }
@@ -2225,22 +2225,22 @@ function Fi(e) {
2225
2225
  ), t;
2226
2226
  }
2227
2227
  function ft(e, t) {
2228
- return e !== null && (Q(e) || Tn(e) || yt(t));
2228
+ return e !== null && (te(e) || Tn(e) || yt(t));
2229
2229
  }
2230
2230
  function on(e, t, o) {
2231
2231
  return ft(t, o) || Hi(t) ? !0 : !ft(e, o);
2232
2232
  }
2233
2233
  function Hi(e) {
2234
- return e != null && (e.creditsUsed !== null || e.creditLimit !== null || e.creditsRemaining !== null || Q(e));
2234
+ return e != null && (e.creditsUsed !== null || e.creditLimit !== null || e.creditsRemaining !== null || te(e));
2235
2235
  }
2236
- function Q(e) {
2236
+ function te(e) {
2237
2237
  return e?.limitExceeded === !0 || !!e?.paymentIssue;
2238
2238
  }
2239
2239
  function yt(e) {
2240
2240
  return e === "limit_exceeded" || e === "subscription_required" || e === "subscription_inactive" || e === "payment_issue" || e === "subscription_invalid" || e === "payment_required";
2241
2241
  }
2242
2242
  function Tn(e) {
2243
- return !Q(e) && e.creditLimit !== null && e.creditLimit > 0 && e.creditsRemaining !== null && e.creditsRemaining > 0 && e.creditsRemaining / e.creditLimit <= 0.2;
2243
+ return !te(e) && e.creditLimit !== null && e.creditLimit > 0 && e.creditsRemaining !== null && e.creditsRemaining > 0 && e.creditsRemaining / e.creditLimit <= 0.2;
2244
2244
  }
2245
2245
  function Wi(e) {
2246
2246
  return e.creditsRemaining === null ? null : `${Gi(e.creditsRemaining)} credits left`;
@@ -2274,41 +2274,41 @@ function ct(e, t) {
2274
2274
  (n) => !Rn(n)
2275
2275
  ).length === 0 && !e.assistantDraft && !e.lastError && !e.isThinking && !t;
2276
2276
  }
2277
- function $i(e, t, o, n, i, a, l, p, c, u, d, g, S, f, F, k) {
2277
+ function $i(e, t, o, n, i, a, l, p, c, u, d, g, S, f, O, k) {
2278
2278
  const x = Ki(a), v = x.filter(
2279
2279
  (_) => !Rn(_)
2280
- ), h = e.scrollTop, I = [], T = /* @__PURE__ */ new Set(), P = (_) => {
2281
- I.push(_);
2280
+ ), h = e.scrollTop, A = [], T = /* @__PURE__ */ new Set(), I = (_) => {
2281
+ A.push(_);
2282
2282
  };
2283
2283
  zn(o, a.isThinking), i.hidden = !p, p && l !== null && Ln(i, l);
2284
- const ke = v.length > 0 || !!a.assistantDraft || a.isThinking;
2285
- if (n(ke), v.length === 0 && !a.assistantDraft && !a.lastError && !a.isThinking) {
2284
+ const Ee = v.length > 0 || !!a.assistantDraft || a.isThinking;
2285
+ if (n(Ee), v.length === 0 && !a.assistantDraft && !a.lastError && !a.isThinking) {
2286
2286
  const _ = document.createElement("div");
2287
2287
  _.className = "pluno-pa-widget__empty-state pluno-pa-widget__empty-state--starter";
2288
2288
  const M = document.createElement("div");
2289
2289
  M.className = "pluno-pa-widget__empty-hero";
2290
- const ae = se(
2290
+ const P = se(
2291
2291
  "pluno-pa-widget__character--empty",
2292
2292
  f()
2293
2293
  );
2294
- M.appendChild(ae), _.appendChild(M), _.appendChild(kn());
2295
- const L = document.createElement("div");
2296
- if (L.className = a.starterPrompts.length > 0 ? "pluno-pa-widget__starter-prompts" : "pluno-pa-widget__starter-prompts pluno-pa-widget__starter-prompts--empty", a.starterPrompts.length === 0 && !a.starterPromptsLoading && L.setAttribute("aria-hidden", "true"), a.starterPrompts.length > 0)
2297
- for (const A of a.starterPrompts) {
2298
- const y = document.createElement("button");
2299
- y.type = "button", y.className = "pluno-pa-widget__starter-prompt", y.textContent = `"${A}"`, y.addEventListener("click", () => {
2300
- F(A);
2301
- }), L.appendChild(y);
2294
+ M.appendChild(P), _.appendChild(M), _.appendChild(kn());
2295
+ const G = document.createElement("div");
2296
+ if (G.className = a.starterPrompts.length > 0 ? "pluno-pa-widget__starter-prompts" : "pluno-pa-widget__starter-prompts pluno-pa-widget__starter-prompts--empty", a.starterPrompts.length === 0 && !a.starterPromptsLoading && G.setAttribute("aria-hidden", "true"), a.starterPrompts.length > 0)
2297
+ for (const C of a.starterPrompts) {
2298
+ const L = document.createElement("button");
2299
+ L.type = "button", L.className = "pluno-pa-widget__starter-prompt", L.textContent = `"${C}"`, L.addEventListener("click", () => {
2300
+ O(C);
2301
+ }), G.appendChild(L);
2302
2302
  }
2303
2303
  else if (a.starterPromptsLoading) {
2304
- const A = document.createElement("button");
2305
- A.type = "button", A.className = "pluno-pa-widget__starter-prompt pluno-pa-widget__starter-prompt--placeholder pluno-pa-widget__starter-prompt--loading", A.disabled = !0, A.tabIndex = -1, A.textContent = "Generating example tasks...", L.appendChild(A);
2304
+ const C = document.createElement("button");
2305
+ C.type = "button", C.className = "pluno-pa-widget__starter-prompt pluno-pa-widget__starter-prompt--placeholder pluno-pa-widget__starter-prompt--loading", C.disabled = !0, C.tabIndex = -1, C.textContent = "Generating example tasks...", G.appendChild(C);
2306
2306
  } else
2307
- for (let A = 0; A < Ao; A += 1) {
2308
- const y = document.createElement("button");
2309
- y.type = "button", y.className = "pluno-pa-widget__starter-prompt pluno-pa-widget__starter-prompt--placeholder", y.disabled = !0, y.tabIndex = -1, y.textContent = "", L.appendChild(y);
2307
+ for (let C = 0; C < Ao; C += 1) {
2308
+ const L = document.createElement("button");
2309
+ L.type = "button", L.className = "pluno-pa-widget__starter-prompt pluno-pa-widget__starter-prompt--placeholder", L.disabled = !0, L.tabIndex = -1, L.textContent = "", G.appendChild(L);
2310
2310
  }
2311
- _.appendChild(L), g.clear(), P(_), P(t), rn(e, I);
2311
+ _.appendChild(G), g.clear(), I(_), I(t), rn(e, A);
2312
2312
  return;
2313
2313
  }
2314
2314
  let b = null, D = null, de = [];
@@ -2321,7 +2321,7 @@ function $i(e, t, o, n, i, a, l, p, c, u, d, g, S, f, F, k) {
2321
2321
  S,
2322
2322
  f()
2323
2323
  );
2324
- return P(_), b = null, D = _, de = [], !0;
2324
+ return I(_), b = null, D = _, de = [], !0;
2325
2325
  };
2326
2326
  for (let _ = 0; _ < v.length; _ += 1) {
2327
2327
  const M = v[_];
@@ -2331,50 +2331,50 @@ function $i(e, t, o, n, i, a, l, p, c, u, d, g, S, f, F, k) {
2331
2331
  }
2332
2332
  if (wt(M)) {
2333
2333
  if (we()) {
2334
- const B = _t();
2335
- P(B), b = null, D = B;
2334
+ const $ = _t();
2335
+ I($), b = null, D = $;
2336
2336
  } else {
2337
- const B = sn(f());
2338
- P(B), b = null, D = B;
2337
+ const $ = sn(f());
2338
+ I($), b = null, D = $;
2339
2339
  }
2340
2340
  continue;
2341
2341
  }
2342
2342
  if (M.role === "system")
2343
2343
  continue;
2344
- const ae = we(), L = oa(M.content);
2345
- if (M.role === "assistant" && !ae) {
2346
- const y = Mn(f());
2347
- P(y), b = null, D = y;
2344
+ const P = we(), G = oa(M.content);
2345
+ if (M.role === "assistant" && !P) {
2346
+ const L = Mn(f());
2347
+ I(L), b = null, D = L;
2348
2348
  }
2349
- const A = qi(M, L, g, T);
2350
- P(A), b = A, D = null;
2349
+ const C = qi(M, G, g, T);
2350
+ I(C), b = C, D = null;
2351
2351
  }
2352
- const G = we();
2353
- if (a.isThinking && !a.assistantDraft && !ce)
2354
- if (G) {
2352
+ const W = we(), Re = v[v.length - 1]?.id === "assistant-draft";
2353
+ if (a.isThinking && !Re && !ce)
2354
+ if (W) {
2355
2355
  const _ = _t();
2356
- P(_), b = null, D = _;
2356
+ I(_), b = null, D = _;
2357
2357
  } else {
2358
2358
  const _ = sn(f());
2359
- P(_), b = null, D = _;
2359
+ I(_), b = null, D = _;
2360
2360
  }
2361
2361
  if (a.lastError) {
2362
2362
  const _ = document.createElement("div");
2363
- _.className = "pluno-pa-widget__error", _.textContent = a.lastError, P(_), b = _, D = null;
2363
+ _.className = "pluno-pa-widget__error", _.textContent = a.lastError, I(_), b = _, D = null;
2364
2364
  }
2365
- const ie = k && !a.isThinking ? ao(x) : null;
2366
- if (k && ie && !k.dismissedCandidateIds.has(ie.id)) {
2367
- const _ = Zi(ie, {
2368
- isDrafting: k.draftingCandidateId === ie.id,
2365
+ const K = k && !a.isThinking ? ao(x) : null;
2366
+ if (k && K && !k.dismissedCandidateIds.has(K.id)) {
2367
+ const _ = Zi(K, {
2368
+ isDrafting: k.draftingCandidateId === K.id,
2369
2369
  error: k.error,
2370
2370
  characterIconOptions: k.characterIconOptions,
2371
2371
  onDraft: k.onDraft,
2372
2372
  onDismiss: k.onDismiss,
2373
2373
  onDisable: k.onDisable
2374
2374
  });
2375
- P(_), k.onSeen(ie), b = null, D = _;
2375
+ I(_), k.onSeen(K), b = null, D = _;
2376
2376
  }
2377
- b?.classList.add("pluno-pa-widget__message--bottom-reserve"), D?.classList.add("pluno-pa-widget__bottom-reserve-compact"), P(t), Vi(g, T), rn(e, I), c ? De(e, u) : e.scrollTop = h;
2377
+ b?.classList.add("pluno-pa-widget__message--bottom-reserve"), D?.classList.add("pluno-pa-widget__bottom-reserve-compact"), I(t), Vi(g, T), rn(e, A), c ? Te(e, u) : e.scrollTop = h;
2378
2378
  }
2379
2379
  function qi(e, t, o, n) {
2380
2380
  const i = ji(e, t), a = i ? o.get(i) : void 0;
@@ -2577,8 +2577,8 @@ function Ji(e, t) {
2577
2577
  S.className = "pluno-pa-widget__share-dialog-step";
2578
2578
  const f = document.createElement("strong");
2579
2579
  f.className = "pluno-pa-widget__share-dialog-step-title", f.textContent = "2) Share on", S.appendChild(f);
2580
- const F = document.createElement("p");
2581
- F.className = "pluno-pa-widget__share-dialog-hint", F.textContent = "Post draft opens prefilled on supported platforms.", S.appendChild(F);
2580
+ const O = document.createElement("p");
2581
+ O.className = "pluno-pa-widget__share-dialog-hint", O.textContent = "Post draft opens prefilled on supported platforms.", S.appendChild(O);
2582
2582
  const k = document.createElement("footer");
2583
2583
  k.className = "pluno-pa-widget__share-dialog-platforms";
2584
2584
  for (const x of ea(e)) {
@@ -2623,34 +2623,34 @@ function ea(e) {
2623
2623
  }
2624
2624
  function ta(e) {
2625
2625
  const t = document.createElementNS("http://www.w3.org/2000/svg", "svg");
2626
- return t.setAttribute("class", "pluno-pa-widget__share-dialog-platform-logo"), t.setAttribute("viewBox", "0 0 32 32"), t.setAttribute("aria-hidden", "true"), e === "linkedin" ? (U(t, "M6.7 13.2c.4 4.1.2 8.1.1 12.3"), U(
2626
+ return t.setAttribute("class", "pluno-pa-widget__share-dialog-platform-logo"), t.setAttribute("viewBox", "0 0 32 32"), t.setAttribute("aria-hidden", "true"), e === "linkedin" ? (B(t, "M6.7 13.2c.4 4.1.2 8.1.1 12.3"), B(
2627
2627
  t,
2628
2628
  "M6.4 6.9c.6-.5 1.6-.5 2.1.1.7.7.5 1.8-.2 2.3-.8.5-1.9.2-2.3-.6-.2-.6 0-1.3.4-1.8Z"
2629
- ), U(t, "M14.4 13.3c.1 3.8.1 7.8 0 11.9"), U(
2629
+ ), B(t, "M14.4 13.3c.1 3.8.1 7.8 0 11.9"), B(
2630
2630
  t,
2631
2631
  "M14.8 16.2c1.2-2 3-3.1 5.1-2.9 3.4.3 4.8 2.7 4.8 6.2 0 1.9-.1 3.8-.1 5.8"
2632
- ), U(t, "M20 18c.1 2.2.1 4.7 0 7.2"), t) : e === "x" ? (U(t, "M7.2 7.4c5.6 6.4 10.9 12.2 17.7 17.2"), U(t, "M24.4 7.2c-5.1 6.3-10.6 11.8-17 17.8"), U(t, "M9.1 8.2c5.1 5.6 9.7 10.8 15 15.5", "0.55"), t) : (U(
2632
+ ), B(t, "M20 18c.1 2.2.1 4.7 0 7.2"), t) : e === "x" ? (B(t, "M7.2 7.4c5.6 6.4 10.9 12.2 17.7 17.2"), B(t, "M24.4 7.2c-5.1 6.3-10.6 11.8-17 17.8"), B(t, "M9.1 8.2c5.1 5.6 9.7 10.8 15 15.5", "0.55"), t) : (B(
2633
2633
  t,
2634
2634
  "M10.2 6.4c3.8-.3 8-.3 11.6.1 2.5.3 3.8 1.8 4 4 .4 3.3.4 7.4 0 10.9-.3 2.4-1.7 3.8-4 4.1-3.8.4-8.2.4-11.8 0-2.3-.3-3.7-1.8-4-4.1-.4-3.5-.3-7.8.1-11.1.2-2.2 1.8-3.6 4.1-3.9Z"
2635
- ), U(
2635
+ ), B(
2636
2636
  t,
2637
2637
  "M11 7.3c3.4-.4 7.1-.4 10.2.1 2 .3 3.1 1.4 3.4 3.2.4 3 .4 6.6.1 9.9-.3 2.2-1.3 3.3-3.3 3.7-3.2.5-7.2.5-10.5.1",
2638
2638
  "0.48"
2639
- ), U(
2639
+ ), B(
2640
2640
  t,
2641
2641
  "M12.1 16.1c.1-2.4 1.8-4.1 4-4.2 2.4-.1 4.2 1.6 4.3 4 .1 2.3-1.6 4.1-3.9 4.2-2.6.2-4.3-1.5-4.4-4Z"
2642
- ), U(
2642
+ ), B(
2643
2643
  t,
2644
2644
  "M22 10.7c.3-.1.7 0 .9.3.2.4.1.8-.2 1-.4.2-.8.1-1-.2-.2-.4-.1-.8.3-1.1Z"
2645
2645
  ), t);
2646
2646
  }
2647
- function U(e, t, o) {
2647
+ function B(e, t, o) {
2648
2648
  const n = document.createElementNS("http://www.w3.org/2000/svg", "path");
2649
2649
  n.setAttribute("d", t), o && n.setAttribute("opacity", o), e.appendChild(n);
2650
2650
  }
2651
2651
  function na() {
2652
2652
  const e = document.createElementNS("http://www.w3.org/2000/svg", "svg");
2653
- return e.setAttribute("class", "pluno-pa-widget__share-dialog-external-icon"), e.setAttribute("viewBox", "0 0 24 24"), e.setAttribute("aria-hidden", "true"), U(e, "M14 5h5v5"), U(e, "M19 5l-8 8"), U(
2653
+ return e.setAttribute("class", "pluno-pa-widget__share-dialog-external-icon"), e.setAttribute("viewBox", "0 0 24 24"), e.setAttribute("aria-hidden", "true"), B(e, "M14 5h5v5"), B(e, "M19 5l-8 8"), B(
2654
2654
  e,
2655
2655
  "M18 13v5a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1h5"
2656
2656
  ), e;
@@ -2870,7 +2870,7 @@ function dn(e, t) {
2870
2870
  --pluno-pa-accent-contrast: #fafafa;
2871
2871
  position: fixed;
2872
2872
  z-index: 2147483645;
2873
- font-family: ${Z.fontFamily};
2873
+ font-family: ${Q.fontFamily};
2874
2874
  font-size: 14px;
2875
2875
  color: var(--pluno-pa-text);
2876
2876
  width: var(--pluno-pa-launcher-width);
@@ -3839,7 +3839,7 @@ function dn(e, t) {
3839
3839
  place-items: center;
3840
3840
  padding: 18px;
3841
3841
  background: rgba(24, 24, 27, 0.28);
3842
- font-family: var(--pluno-pa-font, ${Z.fontFamily});
3842
+ font-family: var(--pluno-pa-font, ${Q.fontFamily});
3843
3843
  color: var(--pluno-pa-text);
3844
3844
  }
3845
3845
  .pluno-pa-widget__share-dialog {
@@ -5038,20 +5038,20 @@ function fa(e, t) {
5038
5038
  const o = new URL(e.src, document.baseURI);
5039
5039
  return o.href === t.href || o.pathname === t.pathname ? !0 : gn(o) === gn(t);
5040
5040
  }
5041
- class oe extends EventTarget {
5041
+ class ae extends EventTarget {
5042
5042
  constructor(t, o) {
5043
5043
  super(), this.channelId = o, this.url = t, this.addPreviewListener(So, () => {
5044
- this.readyState = oe.OPEN, this.dispatchEvent(new Event("open"));
5044
+ this.readyState = ae.OPEN, this.dispatchEvent(new Event("open"));
5045
5045
  }), this.addPreviewListener(Eo, (n) => {
5046
5046
  const i = n;
5047
5047
  this.dispatchEvent(
5048
5048
  new MessageEvent("message", { data: i.detail?.data ?? "" })
5049
5049
  );
5050
5050
  }), this.addPreviewListener(ko, () => {
5051
- this.readyState = oe.CLOSED, this.dispatchEvent(new Event("error")), this.cleanup();
5051
+ this.readyState = ae.CLOSED, this.dispatchEvent(new Event("error")), this.cleanup();
5052
5052
  }), this.addPreviewListener(Lo, (n) => {
5053
5053
  const i = n;
5054
- this.readyState = oe.CLOSED, this.dispatchEvent(
5054
+ this.readyState = ae.CLOSED, this.dispatchEvent(
5055
5055
  new CloseEvent("close", {
5056
5056
  code: i.detail?.code ?? 1e3,
5057
5057
  reason: i.detail?.reason ?? "",
@@ -5080,11 +5080,11 @@ class oe extends EventTarget {
5080
5080
  extensions = "";
5081
5081
  binaryType = "blob";
5082
5082
  bufferedAmount = 0;
5083
- readyState = oe.CONNECTING;
5083
+ readyState = ae.CONNECTING;
5084
5084
  socketId = wa();
5085
5085
  listeners = /* @__PURE__ */ new Map();
5086
5086
  send(t) {
5087
- if (this.readyState !== oe.OPEN)
5087
+ if (this.readyState !== ae.OPEN)
5088
5088
  throw new DOMException(
5089
5089
  "Pluno preview websocket is not open",
5090
5090
  "InvalidStateError"
@@ -5102,7 +5102,7 @@ class oe extends EventTarget {
5102
5102
  );
5103
5103
  }
5104
5104
  close(t, o) {
5105
- this.readyState !== oe.CLOSED && (this.readyState = oe.CLOSING, window.dispatchEvent(
5105
+ this.readyState !== ae.CLOSED && (this.readyState = ae.CLOSING, window.dispatchEvent(
5106
5106
  new CustomEvent(
5107
5107
  Ge(Co, this.channelId),
5108
5108
  {