@commentkit/comment-kit 1.5.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/CHANGELOG.md +20 -2
  2. package/dist/npm/THIRD_PARTY_NOTICES.txt +2 -2
  3. package/dist/npm/chunks/{AgentSend-DyWxNQ0p.js → AgentSend-2JPDseOo.js} +4 -5
  4. package/dist/npm/chunks/{Checklist-VYkSl6Q9.js → Checklist-BpDXQebo.js} +77 -79
  5. package/dist/npm/chunks/Composer-CAyj-c8e.js +677 -0
  6. package/dist/npm/chunks/Guest-ZdFmTcXI.js +187 -0
  7. package/dist/npm/chunks/{MarkupEditor-DxTI9nJH.js → MarkupEditor-BFplZwFy.js} +3 -5
  8. package/dist/npm/chunks/{Panel-riaMYxt-.js → Panel-BhZ4XRDR.js} +300 -302
  9. package/dist/npm/chunks/{Settings-CB4zxQAL.js → Settings-SPG9EHUZ.js} +70 -72
  10. package/dist/npm/chunks/{Shortcuts-D1cbajg_.js → Shortcuts-C28HVDw6.js} +3 -5
  11. package/dist/npm/chunks/{StyleEditor-BtTv3I8_.js → StyleEditor-ByZMtq10.js} +4 -5
  12. package/dist/npm/chunks/{StylePanel-BI-n5Me1.js → StylePanel-Iwhce2tE.js} +62 -64
  13. package/dist/npm/chunks/{TaskFields-HwrD0FrH.js → TaskFields-BsP_fVJg.js} +7 -6
  14. package/dist/npm/chunks/{ThreadCard-CjaC8BTa.js → ThreadCard-BzVZdDCb.js} +407 -403
  15. package/dist/npm/chunks/{Viewer-BnWshSXb.js → Viewer-CqtGrdD8.js} +29 -31
  16. package/dist/npm/chunks/{agent-Cr6NB6We.js → agent-BDMQtOzH.js} +14 -15
  17. package/dist/npm/chunks/{anchor-OCQnjp_6.js → anchor-BsradQhn.js} +1 -2
  18. package/dist/npm/chunks/{ar-BQ9K9Oqf.js → ar-8tPch6W4.js} +5 -2
  19. package/dist/npm/chunks/{card-bits-CxteYiZ9.js → card-bits-Bna-g3Py.js} +24 -26
  20. package/dist/npm/chunks/{client-CJ1tpI62.js → client-EFTWxHbJ.js} +76 -61
  21. package/dist/npm/chunks/{colors-0Ied7PE2.js → colors-CWAn_swA.js} +39 -4
  22. package/dist/npm/chunks/{confetti-DKeKR7-6.js → confetti-DTKpwF3O.js} +1 -2
  23. package/dist/npm/chunks/{de-CcPi8xdC.js → de-C63897uD.js} +5 -2
  24. package/dist/npm/chunks/{drafts-CpQdHhcK.js → drafts-akdBsOd0.js} +1 -2
  25. package/dist/npm/chunks/{es-DXgkjDCG.js → es-CI2bSpvB.js} +5 -2
  26. package/dist/npm/chunks/{extension-BIGfr4Gh.js → extension-BST6LH1q.js} +2 -3
  27. package/dist/npm/chunks/{extension-DkDSW4qw.js → extension-D-V3utTm.js} +3 -4
  28. package/dist/npm/chunks/{fr-IjJaUbWh.js → fr-rsVe-Lqk.js} +5 -2
  29. package/dist/npm/chunks/{hi-BhKQK2MU.js → hi-cvwbSaWP.js} +5 -2
  30. package/dist/npm/chunks/{html2canvas-pro.esm-lgs6tb4C.js → html2canvas-pro.esm-B7b8p5Wr.js} +608 -528
  31. package/dist/npm/chunks/{i18n-DAJGndZ2.js → i18n-C4v0M-6z.js} +254 -257
  32. package/dist/npm/chunks/{it-DKiSCkiD.js → it-C8tnV0BF.js} +5 -2
  33. package/dist/npm/chunks/{ja-BI1WagDg.js → ja-BWxDfC2f.js} +5 -2
  34. package/dist/npm/chunks/{live-B-mo27Qq.js → live-BCpJVBeN.js} +2 -3
  35. package/dist/npm/chunks/{lock-C82sC17d.js → lock-B1JLlOhz.js} +0 -1
  36. package/dist/npm/chunks/{nl-CJw3VUQ5.js → nl-DNQ6eCht.js} +5 -2
  37. package/dist/npm/chunks/{pick-CYPkLLFJ.js → pick-CLyOdjnD.js} +3 -4
  38. package/dist/npm/chunks/{pt-BR-CjBolC5g.js → pt-BR-CkG7vpU2.js} +5 -2
  39. package/dist/npm/chunks/{realtime-D22tI_AS.js → realtime-DIo-Wth4.js} +2 -3
  40. package/dist/npm/chunks/{report-DoDVi1qT.js → report-BBrT3r89.js} +1 -2
  41. package/dist/npm/chunks/{rolldown-runtime-Y_bBpyJl.js → rolldown-runtime-QGRDbDUS.js} +1 -2
  42. package/dist/npm/chunks/{source-CTQmAh0Y.js → source-CS7C6wJA.js} +2 -3
  43. package/dist/npm/chunks/{src-CgBEoWl0.js → src-C4FsVoUp.js} +22 -24
  44. package/dist/npm/chunks/{start-DW9_DKmf.js → start-i9M-r3aH.js} +375 -358
  45. package/dist/npm/chunks/{upload-BmrpZE5G.js → upload-DSv7EyBD.js} +2 -3
  46. package/dist/npm/chunks/uploads-I01kdqQF.js +1103 -0
  47. package/dist/npm/chunks/{zh-CN-BrZGx2S0.js → zh-CN-BKuZOLBE.js} +5 -2
  48. package/dist/npm/element.js +2 -3
  49. package/dist/npm/headless.js +2 -2
  50. package/dist/npm/index.js +2 -2
  51. package/dist/npm/react.js +2 -3
  52. package/dist/npm/svelte.js +2 -3
  53. package/dist/npm/types/core/auth.d.ts +14 -0
  54. package/dist/npm/vue.js +2 -3
  55. package/package.json +8 -8
  56. package/dist/npm/chunks/Composer-CnsGQirF.js +0 -679
  57. package/dist/npm/chunks/Guest-DkIvY5zt.js +0 -170
  58. package/dist/npm/chunks/uploads-CipONvCy.js +0 -541
@@ -1,291 +1,290 @@
1
- import { p as e } from "./client-CJ1tpI62.js";
2
- import { a as t } from "./anchor-OCQnjp_6.js";
3
- import { a as n, d as r, f as i, i as a, l as o, m as s, p as c, r as l, s as u, u as d, v as f } from "./i18n-DAJGndZ2.js";
4
- import { r as p } from "./agent-Cr6NB6We.js";
5
- import { i as m, n as ee, o as te, r as h, s as g, t as ne } from "./card-bits-CxteYiZ9.js";
6
- import { i as re, n as _, r as ie, t as ae } from "./drafts-CpQdHhcK.js";
7
- import { a as v, c as y, i as b, l as oe, n as se, t as ce, u as le } from "./uploads-CipONvCy.js";
8
- import { r as ue, t as de } from "./Checklist-VYkSl6Q9.js";
9
- import { TaskFields as fe } from "./TaskFields-HwrD0FrH.js";
10
- import { _ as pe, a as me, b as x, c as he, d as S, f as ge, g as _e, i as ve, l as ye, n as C, p as be, r as xe, u as Se, v as Ce, x as we, y as Te } from "./start-DW9_DKmf.js";
11
- //#region src/ui/StyleChanges.tsx
12
- function Ee({ thread: e, element: t, editable: n, client: a, onChange: l, onError: f = () => void 0 }) {
13
- let p = c(() => v(e.style_changes), [e.style_changes]), [m, ee] = s(!1), [te, h] = s(!1), [g, ne] = s(null), re = i(null), _ = t instanceof HTMLElement || t instanceof SVGElement ? t : null;
14
- return r(() => {
15
- if (!m || !_) return;
16
- let e = re.current = new b(_);
17
- return e.apply(p), () => e.revert();
1
+ import { p as e } from "./client-EFTWxHbJ.js";
2
+ import { a as t } from "./anchor-BsradQhn.js";
3
+ import { _ as n, a as r, d as i, f as a, h as o, i as ee, l as s, m as c, r as l, s as u, u as d } from "./i18n-C4v0M-6z.js";
4
+ import { r as f } from "./agent-BDMQtOzH.js";
5
+ import { i as p, n as te, o as ne, r as m, s as h, t as re } from "./card-bits-Bna-g3Py.js";
6
+ import { i as ie, n as g, r as ae, t as oe } from "./drafts-akdBsOd0.js";
7
+ import { a as _, c as v, i as y, l as se, n as ce, t as le, u as ue } from "./uploads-I01kdqQF.js";
8
+ import { r as de, t as fe } from "./Checklist-BpDXQebo.js";
9
+ import { TaskFields as pe } from "./TaskFields-BsP_fVJg.js";
10
+ import { C as b, S as me, a as he, b as ge, c as _e, f as x, g as ve, h as ye, i as be, l as xe, n as S, r as Se, u as Ce, w as we, x as Te, y as Ee } from "./start-i9M-r3aH.js";
11
+ // src/ui/StyleChanges.tsx
12
+ function De({ thread: e, element: t, editable: n, client: r, onChange: ee, onError: l = () => void 0 }) {
13
+ let f = o(() => _(e.style_changes), [e.style_changes]), [p, te] = c(!1), [ne, m] = c(!1), [h, re] = c(null), ie = a(null), g = t instanceof HTMLElement || t instanceof SVGElement ? t : null;
14
+ return i(() => {
15
+ if (!p || !g) return;
16
+ let e = ie.current = new y(g);
17
+ return e.apply(f), () => e.revert();
18
18
  }, [
19
- m,
20
- _,
21
- p
19
+ p,
20
+ g,
21
+ f
22
22
  ]), d(() => {
23
- ee(!1), h(!1);
24
- }, [e.id]), te && _ && a && g ? /* @__PURE__ */ o(g, {
25
- client: a,
23
+ te(!1), m(!1);
24
+ }, [e.id]), ne && g && r && h ? /* @__PURE__ */ s(h, {
25
+ client: r,
26
26
  thread: e,
27
- element: _,
28
- onSaved: (e) => l?.(e),
29
- onClose: () => h(!1),
30
- onError: f
31
- }) : p.length ? /* @__PURE__ */ o("section", {
27
+ element: g,
28
+ onSaved: (e) => ee?.(e),
29
+ onClose: () => m(!1),
30
+ onError: l
31
+ }) : f.length ? /* @__PURE__ */ s("section", {
32
32
  class: "ck-style-card",
33
33
  "aria-label": u("styleSuggested"),
34
- children: [/* @__PURE__ */ o("div", {
34
+ children: [/* @__PURE__ */ s("div", {
35
35
  class: "ck-style-card-head",
36
- children: [/* @__PURE__ */ o("span", { children: u("styleSuggested") }), _ ? /* @__PURE__ */ o("span", { children: [n && a ? /* @__PURE__ */ o("button", {
36
+ children: [/* @__PURE__ */ s("span", { children: u("styleSuggested") }), g ? /* @__PURE__ */ s("span", { children: [n && r ? /* @__PURE__ */ s("button", {
37
37
  class: "ck-ghost ck-ghost-sm",
38
38
  "aria-label": u("styleEdit"),
39
- disabled: te,
39
+ disabled: ne,
40
40
  onClick: () => {
41
- re.current?.revert(), ee(!1), h(!0), g || import("./StyleEditor-BtTv3I8_.js").then((e) => ne(() => e.StyleEditor), f);
41
+ ie.current?.revert(), te(!1), m(!0), h || import("./StyleEditor-ByZMtq10.js").then((e) => re(() => e.StyleEditor), l);
42
42
  },
43
43
  children: u("edit")
44
- }) : null, /* @__PURE__ */ o("button", {
44
+ }) : null, /* @__PURE__ */ s("button", {
45
45
  class: "ck-chip",
46
- "aria-pressed": m,
47
- onClick: () => ee(!m),
46
+ "aria-pressed": p,
47
+ onClick: () => te(!p),
48
48
  children: u("stylePreview")
49
49
  })] }) : null]
50
- }), /* @__PURE__ */ o("ul", { children: p.map((e) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ o("code", { children: y(e) }) })) })]
50
+ }), /* @__PURE__ */ s("ul", { children: f.map((e) => /* @__PURE__ */ s("li", { children: /* @__PURE__ */ s("code", { children: v(e) }) })) })]
51
51
  }) : null;
52
52
  }
53
- //#endregion
54
- //#region src/ui/ThreadCard.tsx
55
- C(".ck-msg{gap:10px;padding:6px 0;display:flex}.ck-msg+.ck-msg{border-top:1px solid var(--ck-hairline);padding-top:10px}.ck-msg-main{flex:1;min-width:0}.ck-msg-meta{color:var(--ck-text-muted);align-items:baseline;gap:6px;font-size:12px;display:flex}.ck-msg-body{white-space:pre-wrap;overflow-wrap:anywhere;margin-top:2px;line-height:1.5}.ck-msg-body a{color:color-mix(in srgb, var(--ck-accent) 80%, var(--ck-text));text-underline-offset:2px}.ck-msg-body code{font-family:var(--ck-mono);background:var(--ck-bg-muted);box-shadow:0 0 0 1px var(--ck-hairline);border-radius:5px;padding:1px 5px;font-size:12px}.ck-reactions{flex-wrap:wrap;gap:4px;margin-top:6px;display:flex}.ck-reaction{border:1px solid var(--ck-border);background:var(--ck-bg);font-variant-numeric:tabular-nums;border-radius:999px;height:24px;padding:0 8px;font-size:12px;transition:background-color .12s,border-color .12s}.ck-reaction[aria-pressed=true]{border-color:color-mix(in srgb, var(--ck-accent) 60%, var(--ck-border));background:var(--ck-accent-soft)}.ck-review-ask{border-radius:var(--ck-radius-md);background:color-mix(in srgb, var(--ck-review) 14%, var(--ck-bg));box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--ck-review) 30%, transparent);margin-bottom:10px;padding:12px}.ck-build{overflow-wrap:anywhere}.ck-msg-skeleton{gap:10px;display:flex}.ck-msg-skeleton>div{flex:1}.ck-skeleton-avatar{border-radius:50%;flex:none;width:28px;height:28px;margin:0;display:block}@media (pointer:coarse){.ck-reaction{min-width:36px;min-height:36px}}@media (hover:hover){.ck-reaction:hover{background:var(--ck-bg-muted)}}.ck-msg-body,.ck-review-ask{text-wrap:pretty}.ck-quoting{border-radius:var(--ck-radius-sm);background:var(--ck-bg-muted);border-inline-start:3px solid var(--ck-accent);color:var(--ck-text-muted);align-items:center;gap:8px;margin-bottom:6px;padding:6px 6px 6px 10px;font-size:12.5px;display:flex}.ck-quoting>span{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.ck-quoting strong{color:var(--ck-text);font-weight:650}.ck-msg-meta{flex-wrap:wrap}.ck-msg-meta time{cursor:default}.ck-msg-actions{opacity:0;gap:2px;margin-inline-start:auto;transition:opacity .12s;display:inline-flex}.ck-msg:hover .ck-msg-actions,.ck-msg:focus-within .ck-msg-actions{opacity:1}.ck-msg-body s{color:var(--ck-text-muted)}.ck-quote-msg{border-top:0;border-bottom:0;text-align:start;text-overflow:ellipsis;white-space:nowrap;border-inline-end:0;width:100%;margin:4px 0 6px;overflow:hidden}.ck-quote-msg strong{color:var(--ck-text);font-weight:650}.ck-reaction-add{opacity:.55}.ck-no-replies{margin:8px 0 0;font-size:12.5px}.ck-jump{box-shadow:var(--ck-shadow-sm);animation:ck-pop .14s var(--ck-ease);z-index:1;position:absolute;top:-38px;left:50%;transform:translate(-50%)}.ck-details{margin:0 0 8px;font-size:12.5px}.ck-details-toggle{color:var(--ck-text-muted);background:0 0;border:0;border-radius:6px;align-items:center;gap:6px;padding:2px 0;font-size:12.5px;font-weight:600;display:inline-flex}.ck-details-toggle:after{content:\"\";border-inline-end:1.5px solid;width:5px;height:5px;transition:transform .15s var(--ck-ease);border-bottom:1.5px solid;transform:rotate(45deg)translateY(-2px)}.ck-details-toggle[aria-expanded=true]:after{transform:rotate(225deg)translate(-1px,-1px)}.ck-details dl{border-radius:var(--ck-radius-sm);background:var(--ck-bg-muted);gap:4px;margin:6px 0 0;padding:8px 10px;display:grid}.ck-details dl>div{grid-template-columns:72px 1fr;gap:8px;display:grid}.ck-details dt{color:var(--ck-text-muted)}.ck-details dd{overflow-wrap:anywhere;font-variant-numeric:tabular-nums;min-width:0;margin:0}.ck-details a{color:inherit;text-underline-offset:2px}@media (hover:hover){.ck-quote-msg:hover{color:var(--ck-text)}}@media (hover:none){.ck-msg-actions{opacity:1}}button.ck-shot{cursor:zoom-in;text-align:start;background:0 0;border:0;width:100%;padding:0;display:block}.ck-grid{border-radius:var(--ck-radius-md);grid-template-columns:repeat(2,1fr);gap:4px;margin-top:8px;display:grid;overflow:hidden}.ck-grid[data-count=\"3\"] .ck-grid-item:first-child{grid-row:span 2}.ck-grid-item{aspect-ratio:4/3;background:var(--ck-bg-muted);cursor:zoom-in;border:0;padding:0;position:relative;overflow:hidden}.ck-grid[data-count=\"3\"] .ck-grid-item:first-child{aspect-ratio:auto}.ck-grid-item img{object-fit:cover;outline:1px solid var(--ck-img-outline);outline-offset:-1px;width:100%;height:100%;transition:scale .2s var(--ck-ease);display:block}.ck-grid-more{color:#fff;font-variant-numeric:tabular-nums;background:#1213168c;place-items:center;font-size:18px;font-weight:700;display:grid;position:absolute;top:0;bottom:0;left:0;right:0}@media (hover:hover){.ck-grid-item:hover img,button.ck-shot:hover img{scale:1.02}}.ck-picker-wrap{display:inline-flex;position:relative}.ck-reaction-more{width:30px;color:var(--ck-text-muted);place-items:center;padding:0;display:inline-grid}.ck-picker{z-index:4;bottom:calc(100% + 6px);background:var(--ck-bg);box-shadow:var(--ck-shadow);animation:ck-pop .14s var(--ck-ease);border:1px solid #0000;border-radius:12px;grid-template-columns:repeat(8,32px);gap:2px;padding:6px;display:grid;position:absolute}.ck-picker:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:0}.ck-picker:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:0}.ck-picker:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:0}.ck-picker:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:0}.ck-picker button{background:0 0;border:0;border-radius:8px;place-items:center;width:32px;height:32px;padding:0;font-size:18px;transition:background-color .12s,scale .15s ease-out;display:grid}.ck-picker button[aria-pressed=true]{background:var(--ck-accent-soft)}.ck-picker button:active{scale:.92}.ck-picker .ck-emoji{width:20px;height:20px}@media (hover:hover){.ck-picker button:hover{background:var(--ck-bg-hover)}.ck-reaction-more:hover{color:var(--ck-text)}}@media (max-width:520px){.ck-picker{grid-template-columns:repeat(6,36px)}.ck-picker button{width:36px;height:36px}}.ck-extra{gap:8px;margin:0 0 10px;display:grid}.ck-description{border-radius:var(--ck-radius-sm);background:var(--ck-bg-muted);margin:0 0 8px;padding:8px 10px;font-size:13px}.ck-description summary{cursor:pointer;color:var(--ck-text-muted);font-size:12.5px;font-weight:600}.ck-description p{white-space:pre-wrap;overflow-wrap:anywhere;max-height:240px;margin:6px 0 0;overflow:auto}.ck-extra-add{gap:8px;display:flex}.ck-extra-add .ck-ghost{padding:2px 6px}.ck-checklist{border-radius:var(--ck-radius-sm);background:var(--ck-bg-muted);padding:8px 10px}.ck-checklist-head{font-variant-numeric:tabular-nums;align-items:center;gap:10px;font-size:12px;display:flex}.ck-checklist-bar{background:var(--ck-border);border-radius:2px;flex:1;height:4px;overflow:hidden}.ck-checklist-bar>span{background:var(--ck-success);height:100%;transition:width .2s var(--ck-ease);display:block}.ck-checklist ul{gap:2px;margin:6px 0 0;padding:0;list-style:none;display:grid}.ck-checklist li{align-items:center;gap:4px;display:flex}.ck-checklist li .ck-check{flex:1;min-width:0;margin:0;font-size:13px}.ck-checklist li[data-done] bdi{color:var(--ck-text-muted);text-decoration:line-through}.ck-checklist li .ck-ghost{opacity:0;flex:none;place-items:center;width:24px;height:24px;min-height:0;padding:0;transition:opacity .12s;display:grid}.ck-checklist li:hover .ck-ghost,.ck-checklist li:focus-within .ck-ghost{opacity:1}@media (hover:none){.ck-checklist li .ck-ghost{opacity:1}}.ck-checklist-add .ck-input{height:30px;font-size:13px}.ck-previews{gap:6px;margin-top:6px;display:grid}.ck-preview{border-inline-start:3px solid var(--ck-border);border-radius:var(--ck-radius-sm);background:var(--ck-bg-muted);color:var(--ck-text);gap:1px;padding:8px 10px;font-size:12.5px;text-decoration:none;transition:background-color .12s;display:grid}.ck-preview strong{text-overflow:ellipsis;white-space:nowrap;font-weight:650;overflow:hidden}.ck-preview-site{color:var(--ck-text-muted);font-size:11.5px}.ck-preview-text{color:var(--ck-text-muted);-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}@media (hover:hover){.ck-preview:hover{background:var(--ck-bg-hover)}}.ck-card-embedded{width:auto;height:100%;max-height:none;box-shadow:none;animation:ck-slide-in .22s var(--ck-ease);border:0;border-radius:0;flex-direction:column;display:flex;position:static;top:auto;bottom:auto;left:auto;right:auto}.ck-card-embedded .ck-card-body{flex:1;min-height:0}.ck-back svg{scale:-1 1}.ck-root[dir=rtl] .ck-back svg{scale:1}.ck-step svg{rotate:-90deg}.ck-step[data-dir=next] svg{rotate:90deg}.ck-card-pos{font-variant-numeric:tabular-nums;white-space:nowrap;font-size:12px}@keyframes ck-slide-in{0%{opacity:0;translate:24px}}.ck-root[dir=rtl] .ck-card-embedded{animation-name:ck-slide-in-rtl}@keyframes ck-slide-in-rtl{0%{opacity:0;translate:-24px}}.ck-msg[data-reply] .ck-msg-body{background:var(--ck-bg-muted);border-radius:4px 12px 12px;max-width:100%;padding:6px 10px;display:inline-block}.ck-msg[data-reply][data-mine]{flex-direction:row-reverse}.ck-msg[data-reply][data-mine] .ck-msg-main{flex-direction:column;align-items:flex-end;display:flex}.ck-msg[data-reply][data-mine] .ck-msg-meta{flex-direction:row-reverse}.ck-msg[data-reply][data-mine] .ck-msg-actions{margin-inline-start:0;margin-inline-end:auto}.ck-msg[data-reply][data-mine] .ck-msg-body{background:var(--ck-accent-soft);border-radius:12px 4px 12px 12px}.ck-msg[data-reply][data-mine] .ck-reactions{justify-content:flex-end}.ck-msg+.ck-msg[data-reply]{border-top:0;padding-top:6px}.ck-msg[data-new]{animation:ck-reply-in .24s var(--ck-ease)}@keyframes ck-reply-in{0%{opacity:0;translate:0 8px}}.ck-mention-card{z-index:5;background:var(--ck-bg);box-shadow:var(--ck-shadow);pointer-events:none;animation:ck-pop .12s var(--ck-ease);border:1px solid #0000;border-radius:10px;align-items:center;gap:8px;padding:6px 10px 6px 6px;font-size:13px;display:flex;position:fixed}.ck-mention-card .ck-avatar{width:22px;height:22px;font-size:9px}.ck-thread-skeleton{gap:14px;display:grid}.ck-skeleton-meta{width:40%;height:10px}.ck-thread-skeleton .ck-msg-skeleton:nth-child(3){opacity:.7}.ck-thread-skeleton .ck-msg-skeleton:nth-child(4){opacity:.45}");
56
- var De = g.slice(0, 6), Oe = /* @__PURE__ */ new Map();
57
- function w({ client: r, threadId: v, version: y = 0, onClose: b, onError: C, notify: w, embedded: T }) {
58
- let E = me(r.state, (e) => e.session), Ne = me(r.state, (e) => e.config?.read_only ?? !1), Pe = ve(), Fe = i(null), D = me(r.state, (e) => e.threads.find((e) => e.id === v) ?? null), [O, k] = s(D), [A, j] = s([]), [M, Ie] = s(null), Le = _(r.options.project, "reply", v), [N, Re] = s(() => ie(Le)), ze = (e) => {
59
- e !== N && (I.current = null), Re(e), re(Le, e);
60
- }, P = se(r, (t) => C(new e(0, "file_rejected", t))), [Be, Ve] = s(null), [He, Ue] = s(null), We = (e, t) => {
53
+ // src/ui/ThreadCard.tsx
54
+ S(".ck-msg{gap:10px;padding:6px 0;display:flex}.ck-msg+.ck-msg{border-top:1px solid var(--ck-hairline);padding-top:10px}.ck-msg-main{flex:1;min-width:0}.ck-msg-meta{color:var(--ck-text-muted);align-items:baseline;gap:6px;font-size:12px;display:flex}.ck-msg-body{white-space:pre-wrap;overflow-wrap:anywhere;margin-top:2px;line-height:1.5}.ck-msg-body a{color:color-mix(in srgb, var(--ck-accent) 80%, var(--ck-text));text-underline-offset:2px}.ck-msg-body code{font-family:var(--ck-mono);background:var(--ck-bg-muted);box-shadow:0 0 0 1px var(--ck-hairline);border-radius:5px;padding:1px 5px;font-size:12px}.ck-reactions{flex-wrap:wrap;gap:4px;margin-top:6px;display:flex}.ck-reaction{border:1px solid var(--ck-border);background:var(--ck-bg);font-variant-numeric:tabular-nums;border-radius:999px;height:24px;padding:0 8px;font-size:12px;transition:background-color .12s,border-color .12s}.ck-reaction[aria-pressed=true]{border-color:color-mix(in srgb, var(--ck-accent) 60%, var(--ck-border));background:var(--ck-accent-soft)}.ck-review-ask{border-radius:var(--ck-radius-md);background:color-mix(in srgb, var(--ck-review) 14%, var(--ck-bg));box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--ck-review) 30%, transparent);margin-bottom:10px;padding:12px}.ck-build{overflow-wrap:anywhere}.ck-msg-skeleton{gap:10px;display:flex}.ck-msg-skeleton>div{flex:1}.ck-skeleton-avatar{border-radius:50%;flex:none;width:28px;height:28px;margin:0;display:block}@media (pointer:coarse){.ck-reaction{min-width:36px;min-height:36px}}@media (hover:hover){.ck-reaction:hover{background:var(--ck-bg-muted)}}.ck-msg-body,.ck-review-ask{text-wrap:pretty}.ck-quoting{border-radius:var(--ck-radius-sm);background:var(--ck-bg-muted);border-inline-start:3px solid var(--ck-accent);color:var(--ck-text-muted);align-items:center;gap:8px;margin-bottom:6px;padding:6px 6px 6px 10px;font-size:12.5px;display:flex}.ck-quoting>span{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.ck-quoting strong{color:var(--ck-text);font-weight:650}.ck-msg-meta{flex-wrap:wrap}.ck-msg-meta time{cursor:default}.ck-msg-actions{opacity:0;gap:2px;margin-inline-start:auto;transition:opacity .12s;display:inline-flex}.ck-msg:hover .ck-msg-actions,.ck-msg:focus-within .ck-msg-actions{opacity:1}.ck-msg-body s{color:var(--ck-text-muted)}.ck-quote-msg{border-top:0;border-bottom:0;text-align:start;text-overflow:ellipsis;white-space:nowrap;border-inline-end:0;width:100%;margin:4px 0 6px;overflow:hidden}.ck-quote-msg strong{color:var(--ck-text);font-weight:650}.ck-reaction-add{opacity:.55}.ck-no-replies{margin:8px 0 0;font-size:12.5px}.ck-jump{box-shadow:var(--ck-shadow-sm);animation:ck-pop .14s var(--ck-ease);z-index:1;position:absolute;top:-38px;left:50%;transform:translate(-50%)}.ck-details{margin:0 0 8px;font-size:12.5px}.ck-details-toggle{color:var(--ck-text-muted);background:0 0;border:0;border-radius:6px;align-items:center;gap:6px;padding:2px 0;font-size:12.5px;font-weight:600;display:inline-flex}.ck-details-toggle:after{content:\"\";border-inline-end:1.5px solid;width:5px;height:5px;transition:transform .15s var(--ck-ease);border-bottom:1.5px solid;transform:rotate(45deg)translateY(-2px)}.ck-details-toggle[aria-expanded=true]:after{transform:rotate(225deg)translate(-1px,-1px)}.ck-details dl{border-radius:var(--ck-radius-sm);background:var(--ck-bg-muted);gap:4px;margin:6px 0 0;padding:8px 10px;display:grid}.ck-details dl>div{grid-template-columns:72px 1fr;gap:8px;display:grid}.ck-details dt{color:var(--ck-text-muted)}.ck-details dd{overflow-wrap:anywhere;font-variant-numeric:tabular-nums;min-width:0;margin:0}.ck-details a{color:inherit;text-underline-offset:2px}@media (hover:hover){.ck-quote-msg:hover{color:var(--ck-text)}}@media (hover:none){.ck-msg-actions{opacity:1}}button.ck-shot{cursor:zoom-in;text-align:start;background:0 0;border:0;width:100%;padding:0;display:block}.ck-grid{border-radius:var(--ck-radius-md);grid-template-columns:repeat(2,1fr);gap:4px;margin-top:8px;display:grid;overflow:hidden}.ck-grid[data-count=\"3\"] .ck-grid-item:first-child{grid-row:span 2}.ck-grid-item{aspect-ratio:4/3;background:var(--ck-bg-muted);cursor:zoom-in;border:0;padding:0;position:relative;overflow:hidden}.ck-grid[data-count=\"3\"] .ck-grid-item:first-child{aspect-ratio:auto}.ck-grid-item img{object-fit:cover;outline:1px solid var(--ck-img-outline);outline-offset:-1px;width:100%;height:100%;transition:scale .2s var(--ck-ease);display:block}.ck-grid-more{color:#fff;font-variant-numeric:tabular-nums;background:#1213168c;place-items:center;font-size:18px;font-weight:700;display:grid;position:absolute;top:0;bottom:0;left:0;right:0}@media (hover:hover){.ck-grid-item:hover img,button.ck-shot:hover img{scale:1.02}}.ck-picker-wrap{display:inline-flex;position:relative}.ck-reaction-more{width:30px;color:var(--ck-text-muted);place-items:center;padding:0;display:inline-grid}.ck-picker{z-index:4;bottom:calc(100% + 6px);background:var(--ck-bg);box-shadow:var(--ck-shadow);animation:ck-pop .14s var(--ck-ease);border:1px solid #0000;border-radius:12px;grid-template-columns:repeat(8,32px);gap:2px;padding:6px;display:grid;position:absolute}.ck-picker:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:0}.ck-picker:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:0}.ck-picker:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:0}.ck-picker:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:0}.ck-picker button{background:0 0;border:0;border-radius:8px;place-items:center;width:32px;height:32px;padding:0;font-size:18px;transition:background-color .12s,scale .15s ease-out;display:grid}.ck-picker button[aria-pressed=true]{background:var(--ck-accent-soft)}.ck-picker button:active{scale:.92}.ck-picker .ck-emoji{width:20px;height:20px}@media (hover:hover){.ck-picker button:hover{background:var(--ck-bg-hover)}.ck-reaction-more:hover{color:var(--ck-text)}}@media (max-width:520px){.ck-picker{grid-template-columns:repeat(6,36px)}.ck-picker button{width:36px;height:36px}}.ck-extra{gap:8px;margin:0 0 10px;display:grid}.ck-description{border-radius:var(--ck-radius-sm);background:var(--ck-bg-muted);margin:0 0 8px;padding:8px 10px;font-size:13px}.ck-description summary{cursor:pointer;color:var(--ck-text-muted);font-size:12.5px;font-weight:600}.ck-description p{white-space:pre-wrap;overflow-wrap:anywhere;max-height:240px;margin:6px 0 0;overflow:auto}.ck-extra-add{gap:8px;display:flex}.ck-extra-add .ck-ghost{padding:2px 6px}.ck-checklist{border-radius:var(--ck-radius-sm);background:var(--ck-bg-muted);padding:8px 10px}.ck-checklist-head{font-variant-numeric:tabular-nums;align-items:center;gap:10px;font-size:12px;display:flex}.ck-checklist-bar{background:var(--ck-border);border-radius:2px;flex:1;height:4px;overflow:hidden}.ck-checklist-bar>span{background:var(--ck-success);height:100%;transition:width .2s var(--ck-ease);display:block}.ck-checklist ul{gap:2px;margin:6px 0 0;padding:0;list-style:none;display:grid}.ck-checklist li{align-items:center;gap:4px;display:flex}.ck-checklist li .ck-check{flex:1;min-width:0;margin:0;font-size:13px}.ck-checklist li[data-done] bdi{color:var(--ck-text-muted);text-decoration:line-through}.ck-checklist li .ck-ghost{opacity:0;flex:none;place-items:center;width:24px;height:24px;min-height:0;padding:0;transition:opacity .12s;display:grid}.ck-checklist li:hover .ck-ghost,.ck-checklist li:focus-within .ck-ghost{opacity:1}@media (hover:none){.ck-checklist li .ck-ghost{opacity:1}}.ck-checklist-add .ck-input{height:30px;font-size:13px}.ck-previews{gap:6px;margin-top:6px;display:grid}.ck-preview{border-inline-start:3px solid var(--ck-border);border-radius:var(--ck-radius-sm);background:var(--ck-bg-muted);color:var(--ck-text);gap:1px;padding:8px 10px;font-size:12.5px;text-decoration:none;transition:background-color .12s;display:grid}.ck-preview strong{text-overflow:ellipsis;white-space:nowrap;font-weight:650;overflow:hidden}.ck-preview-site{color:var(--ck-text-muted);font-size:11.5px}.ck-preview-text{color:var(--ck-text-muted);-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}@media (hover:hover){.ck-preview:hover{background:var(--ck-bg-hover)}}.ck-card-embedded{width:auto;height:100%;max-height:none;box-shadow:none;animation:ck-slide-in .22s var(--ck-ease);border:0;border-radius:0;flex-direction:column;display:flex;position:static;top:auto;bottom:auto;left:auto;right:auto}.ck-card-embedded .ck-card-body{flex:1;min-height:0}.ck-back svg{scale:-1 1}.ck-root[dir=rtl] .ck-back svg{scale:1}.ck-step svg{rotate:-90deg}.ck-step[data-dir=next] svg{rotate:90deg}.ck-card-pos{font-variant-numeric:tabular-nums;white-space:nowrap;font-size:12px}@keyframes ck-slide-in{0%{opacity:0;translate:24px}}.ck-root[dir=rtl] .ck-card-embedded{animation-name:ck-slide-in-rtl}@keyframes ck-slide-in-rtl{0%{opacity:0;translate:-24px}}.ck-msg[data-reply] .ck-msg-body{background:var(--ck-bg-muted);border-radius:4px 12px 12px;max-width:100%;padding:6px 10px;display:inline-block}.ck-msg[data-reply][data-mine]{flex-direction:row-reverse}.ck-msg[data-reply][data-mine] .ck-msg-main{flex-direction:column;align-items:flex-end;display:flex}.ck-msg[data-reply][data-mine] .ck-msg-meta{flex-direction:row-reverse}.ck-msg[data-reply][data-mine] .ck-msg-actions{margin-inline-start:0;margin-inline-end:auto}.ck-msg[data-reply][data-mine] .ck-msg-body{background:var(--ck-accent-soft);border-radius:12px 4px 12px 12px}.ck-msg[data-reply][data-mine] .ck-reactions{justify-content:flex-end}.ck-msg+.ck-msg[data-reply]{border-top:0;padding-top:6px}.ck-msg[data-new]{animation:ck-reply-in .24s var(--ck-ease)}@keyframes ck-reply-in{0%{opacity:0;translate:0 8px}}.ck-mention-card{z-index:5;background:var(--ck-bg);box-shadow:var(--ck-shadow);pointer-events:none;animation:ck-pop .12s var(--ck-ease);border:1px solid #0000;border-radius:10px;align-items:center;gap:8px;padding:6px 10px 6px 6px;font-size:13px;display:flex;position:fixed}.ck-mention-card .ck-avatar{width:22px;height:22px;font-size:9px}.ck-thread-skeleton{gap:14px;display:grid}.ck-skeleton-meta{width:40%;height:10px}.ck-thread-skeleton .ck-msg-skeleton:nth-child(3){opacity:.7}.ck-thread-skeleton .ck-msg-skeleton:nth-child(4){opacity:.45}");
55
+ var Oe = h.slice(0, 6), ke = /* @__PURE__ */ new Map();
56
+ function C({ client: i, threadId: _, version: v = 0, onClose: y, onError: S, notify: C, embedded: w }) {
57
+ let T = he(i.state, (e) => e.session), Pe = he(i.state, (e) => e.config?.read_only ?? !1), Fe = be(), Ie = a(null), E = he(i.state, (e) => e.threads.find((e) => e.id === _) ?? null), [D, O] = c(E), [k, A] = c([]), [j, Le] = c(null), M = g(i.options.project, "reply", _), [N, Re] = c(() => ae(M)), ze = (e) => {
58
+ e !== N && (I.current = null), Re(e), ie(M, e);
59
+ }, P = ce(i, (t) => S(new e(0, "file_rejected", t))), [Be, Ve] = c(null), [He, Ue] = c(null), We = (e, t) => {
61
60
  Ve({
62
61
  images: e,
63
62
  start: t
64
- }), He || import("./Viewer-BnWshSXb.js").then((e) => Ue(() => e.Viewer), C);
65
- }, Ge = i(null), [Ke, qe] = s([]), [F, Je] = s(!1), [Ye, Xe] = s(!1), I = i(null), [Ze, Qe] = s(!1), [L, R] = s(null), [z, $e] = s(null), [et, B] = s(!1), [tt, nt] = s(!1), [V, rt] = s(null);
63
+ }), He || import("./Viewer-CqtGrdD8.js").then((e) => Ue(() => e.Viewer), S);
64
+ }, Ge = a(null), [Ke, qe] = c([]), [F, Je] = c(!1), [Ye, Xe] = c(!1), I = a(null), [Ze, Qe] = c(!1), [L, R] = c(null), [z, B] = c(null), [$e, V] = c(!1), [et, tt] = c(!1), [H, nt] = c(null);
66
65
  d(() => {
67
- if (!V) return;
66
+ if (!H) return;
68
67
  let e = (e) => {
69
- e.composedPath().some((e) => e instanceof HTMLElement && e.classList.contains("ck-picker-wrap")) || rt(null);
68
+ e.composedPath().some((e) => e instanceof HTMLElement && e.classList.contains("ck-picker-wrap")) || nt(null);
70
69
  };
71
70
  return addEventListener("pointerdown", e, !0), () => removeEventListener("pointerdown", e, !0);
72
- }, [V]);
73
- let [H, it] = s([]), at = c(() => H.map((e) => e.name), [H]), [U, W] = s(null), ot = i(/* @__PURE__ */ new Set()), [st, ct] = s(!1), [lt, ut] = s(!0), G = i(null), dt = (e = !1) => G.current?.scrollTo({
74
- top: G.current.scrollHeight,
75
- behavior: e && !Ae() ? "smooth" : "auto"
71
+ }, [H]);
72
+ let [U, rt] = c([]), it = o(() => U.map((e) => e.name), [U]), [W, G] = c(null), at = a(/* @__PURE__ */ new Set()), [ot, st] = c(!1), [ct, lt] = c(!0), ut = a(null), dt = (e = !1) => ut.current?.scrollTo({
73
+ top: ut.current.scrollHeight,
74
+ behavior: e && !je() ? "smooth" : "auto"
76
75
  });
77
76
  d(() => {
78
- et || dt();
79
- }, [A.length]);
80
- let ft = () => !et && dt();
77
+ $e || dt();
78
+ }, [k.length]);
79
+ let ft = () => !$e && dt();
81
80
  d(() => {
82
- E && le(r).then(it);
83
- }, [E?.person.id]);
84
- let K = i(v);
85
- K.current = v;
86
- let q = i(null), pt = (e) => {
81
+ T && ue(i).then(rt);
82
+ }, [T?.person.id]);
83
+ let K = a(_);
84
+ K.current = _;
85
+ let q = a(null), pt = (e) => {
87
86
  q.current?.(), q.current = null;
88
87
  let t = () => {
89
- K.current === e && r.state.get().unread > 0 && r.markRead({ threadId: e }).catch(() => void 0);
88
+ K.current === e && i.state.get().unread > 0 && i.markRead({ threadId: e }).catch(() => void 0);
90
89
  };
91
- if (r.inboxLoaded || r.state.get().unread > 0) return t();
92
- let n = r.state.subscribe(() => {
93
- r.inboxLoaded && (n(), q.current = null, t());
90
+ if (i.inboxLoaded || i.state.get().unread > 0) return t();
91
+ let n = i.state.subscribe(() => {
92
+ i.inboxLoaded && (n(), q.current = null, t());
94
93
  });
95
94
  q.current = n;
96
95
  };
97
96
  d(() => () => q.current?.(), []);
98
97
  let J = async (t = !1) => {
99
- let n = v;
98
+ let n = _;
100
99
  try {
101
- let [e, i] = await Promise.all([r.getThread(n), r.allMessages(n, { refresh: t })]);
100
+ let [e, r] = await Promise.all([i.getThread(n), i.allMessages(n, { refresh: t })]);
102
101
  if (K.current !== n) return;
103
- k(e), ot.current.size || i.forEach((e) => ot.current.add(e.id)), j(i), !Oe.has(n) && typeof e.watching == "boolean" && ut(e.watching), pt(n);
102
+ O(e), at.current.size || r.forEach((e) => at.current.add(e.id)), A(r), !ke.has(n) && typeof e.watching == "boolean" && lt(e.watching), pt(n);
104
103
  } catch (t) {
105
104
  if (K.current !== n) return;
106
105
  let r = t instanceof e && (t.status === 404 || t.status === 403);
107
- if (D && !r) {
108
- C(t);
106
+ if (E && !r) {
107
+ S(t);
109
108
  return;
110
109
  }
111
- if (D) {
112
- C(new e(404, "thread_not_found", u("threadNotFound"))), b();
110
+ if (E) {
111
+ S(new e(404, "thread_not_found", u("threadNotFound"))), y();
113
112
  return;
114
113
  }
115
- Ie({
114
+ Le({
116
115
  gone: r,
117
- text: r ? u("threadNotFound") : he(t)
116
+ text: r ? u("threadNotFound") : _e(t)
118
117
  });
119
118
  }
120
119
  };
121
120
  d(() => {
122
- k(D), j([]), Re(ie(Le)), P.clear(), $e(null), B(!1), W(null), ot.current = /* @__PURE__ */ new Set(), ct(!1), Xe(!1), I.current = null, ut(Oe.get(v) ?? D?.watching ?? !0), J();
123
- }, [v]), d(() => {
124
- D && O && D.updated_at !== O.updated_at && J(!0);
125
- }, [D?.updated_at]);
126
- let mt = i(y);
121
+ O(E), A([]), Re(ae(M)), P.clear(), B(null), V(!1), G(null), at.current = /* @__PURE__ */ new Set(), st(!1), Xe(!1), I.current = null, lt(ke.get(_) ?? E?.watching ?? !0), J();
122
+ }, [_]), d(() => {
123
+ E && D && E.updated_at !== D.updated_at && J(!0);
124
+ }, [E?.updated_at]);
125
+ let mt = a(v);
127
126
  d(() => {
128
- y !== mt.current && (mt.current = y, J(!0));
129
- }, [y]);
130
- let Y = c(() => O ? t(O.anchor) : null, [O]);
127
+ v !== mt.current && (mt.current = v, J(!0));
128
+ }, [v]);
129
+ let Y = o(() => D ? t(D.anchor) : null, [D]);
131
130
  if (d(() => {
132
- !T && Y?.element && Y.state !== "detached" && Y.element.scrollIntoView({
131
+ !w && Y?.element && Y.state !== "detached" && Y.element.scrollIntoView({
133
132
  block: "center",
134
- behavior: Ae() ? "auto" : "smooth"
133
+ behavior: je() ? "auto" : "smooth"
135
134
  });
136
135
  }, [Y?.element]), d(() => {
137
- O && Fe.current?.focus({ preventScroll: !0 });
138
- }, [O?.id]), d(() => {
136
+ D && Ie.current?.focus({ preventScroll: !0 });
137
+ }, [D?.id]), d(() => {
139
138
  let e = (e) => {
140
- if (T && (e.key === "j" || e.key === "k") && !e.metaKey && !e.ctrlKey && !e.altKey && r.options.shortcuts !== !1 && !e.composedPath().some((e) => e instanceof HTMLElement && (e.isContentEditable || [
139
+ if (w && (e.key === "j" || e.key === "k") && !e.metaKey && !e.ctrlKey && !e.altKey && i.options.shortcuts !== !1 && !e.composedPath().some((e) => e instanceof HTMLElement && (e.isContentEditable || [
141
140
  "INPUT",
142
141
  "TEXTAREA",
143
142
  "SELECT"
144
143
  ].includes(e.tagName)))) {
145
- let t = e.key === "j" ? T.onNext : T.onPrev;
144
+ let t = e.key === "j" ? w.onNext : w.onPrev;
146
145
  t && (e.preventDefault(), t());
147
- } else e.key !== "e" && e.key !== "E" || e.metaKey || e.ctrlKey || e.altKey || !O || r.options.shortcuts === !1 || e.composedPath().some((e) => e instanceof HTMLElement && (e.isContentEditable || [
146
+ } else e.key !== "e" && e.key !== "E" || e.metaKey || e.ctrlKey || e.altKey || !D || i.options.shortcuts === !1 || e.composedPath().some((e) => e instanceof HTMLElement && (e.isContentEditable || [
148
147
  "INPUT",
149
148
  "TEXTAREA",
150
149
  "SELECT"
151
- ].includes(e.tagName))) || E?.capabilities.comment && !Ne && O.status !== "resolved" && (e.preventDefault(), Q("resolved"));
150
+ ].includes(e.tagName))) || T?.capabilities.comment && !Pe && D.status !== "resolved" && (e.preventDefault(), Q("resolved"));
152
151
  };
153
152
  return addEventListener("keydown", e), () => removeEventListener("keydown", e);
154
- }), !O) return /* @__PURE__ */ o("div", {
155
- class: T ? "ck-card ck-card-embedded" : "ck-card",
156
- style: T ? void 0 : h({
153
+ }), !D) return /* @__PURE__ */ s("div", {
154
+ class: w ? "ck-card ck-card-embedded" : "ck-card",
155
+ style: w ? void 0 : m({
157
156
  x: innerWidth - 400,
158
157
  y: 80
159
158
  }),
160
- role: T ? "region" : "dialog",
159
+ role: w ? "region" : "dialog",
161
160
  "aria-label": u("loadingThread"),
162
- "aria-busy": !M,
161
+ "aria-busy": !j,
163
162
  "data-commentkit-ui": !0,
164
- children: [/* @__PURE__ */ o("div", {
163
+ children: [/* @__PURE__ */ s("div", {
165
164
  class: "ck-card-head",
166
165
  children: [
167
- T ? /* @__PURE__ */ o("button", {
166
+ w ? /* @__PURE__ */ s("button", {
168
167
  class: "ck-ghost ck-back",
169
168
  "aria-label": u("backToList"),
170
- onClick: T.onBack,
171
- children: /* @__PURE__ */ o(S, {
169
+ onClick: w.onBack,
170
+ children: /* @__PURE__ */ s(x, {
172
171
  name: "chevron",
173
172
  size: 16
174
173
  })
175
174
  }) : null,
176
- /* @__PURE__ */ o("span", {
175
+ /* @__PURE__ */ s("span", {
177
176
  class: "ck-card-title",
178
- children: M ? "" : u("loadingThread")
177
+ children: j ? "" : u("loadingThread")
179
178
  }),
180
- /* @__PURE__ */ o("button", {
179
+ /* @__PURE__ */ s("button", {
181
180
  class: "ck-ghost",
182
181
  "aria-label": u("close"),
183
- onClick: T ? T.onBack : b,
184
- children: /* @__PURE__ */ o(S, { name: "close" })
182
+ onClick: w ? w.onBack : y,
183
+ children: /* @__PURE__ */ s(x, { name: "close" })
185
184
  })
186
185
  ]
187
- }), M ? /* @__PURE__ */ o("div", {
186
+ }), j ? /* @__PURE__ */ s("div", {
188
187
  class: "ck-card-body ck-empty",
189
188
  role: "alert",
190
189
  children: [
191
- /* @__PURE__ */ o(ue, { name: M.gone ? "gone" : "error" }),
192
- /* @__PURE__ */ o("span", { children: M.text }),
193
- /* @__PURE__ */ o("button", {
190
+ /* @__PURE__ */ s(de, { name: j.gone ? "gone" : "error" }),
191
+ /* @__PURE__ */ s("span", { children: j.text }),
192
+ /* @__PURE__ */ s("button", {
194
193
  class: "ck-btn",
195
- onClick: M.gone ? b : () => {
196
- Ie(null), J();
194
+ onClick: j.gone ? y : () => {
195
+ Le(null), J();
197
196
  },
198
- children: u(M.gone ? "close" : "retry")
197
+ children: u(j.gone ? "close" : "retry")
199
198
  })
200
199
  ]
201
- }) : /* @__PURE__ */ o("div", {
200
+ }) : /* @__PURE__ */ s("div", {
202
201
  class: "ck-card-body ck-thread-skeleton",
203
- children: [/* @__PURE__ */ o("div", { class: "ck-skeleton ck-skeleton-meta" }), [
202
+ children: [/* @__PURE__ */ s("div", { class: "ck-skeleton ck-skeleton-meta" }), [
204
203
  0,
205
204
  1,
206
205
  2
207
- ].map(() => /* @__PURE__ */ o("div", {
206
+ ].map(() => /* @__PURE__ */ s("div", {
208
207
  class: "ck-msg-skeleton",
209
- children: [/* @__PURE__ */ o("span", { class: "ck-skeleton ck-skeleton-avatar" }), /* @__PURE__ */ o("div", { children: [
210
- /* @__PURE__ */ o("div", { class: "ck-skeleton" }),
211
- /* @__PURE__ */ o("div", { class: "ck-skeleton" }),
212
- /* @__PURE__ */ o("div", { class: "ck-skeleton" })
208
+ children: [/* @__PURE__ */ s("span", { class: "ck-skeleton ck-skeleton-avatar" }), /* @__PURE__ */ s("div", { children: [
209
+ /* @__PURE__ */ s("div", { class: "ck-skeleton" }),
210
+ /* @__PURE__ */ s("div", { class: "ck-skeleton" }),
211
+ /* @__PURE__ */ s("div", { class: "ck-skeleton" })
213
212
  ] })]
214
213
  }))]
215
214
  })]
216
215
  });
217
- let X = E?.capabilities, Z = !!X?.comment && !Ne, ht = r.options.tools?.attachments !== !1, gt = E && O.author.id === E.person.id && O.author.type === (E.person.type === "guest" ? "guest" : "user"), _t = Y ? {
216
+ let X = T?.capabilities, Z = !!X?.comment && !Pe, ht = i.options.tools?.attachments !== !1, gt = T && D.author.id === T.person.id && D.author.type === (T.person.type === "guest" ? "guest" : "user"), _t = Y ? {
218
217
  x: Y.point.x - scrollX,
219
218
  y: Y.point.y - scrollY
220
219
  } : {
221
220
  x: innerWidth - 400,
222
221
  y: 80
223
- }, vt = h({
222
+ }, vt = m({
224
223
  x: Math.min(Math.max(_t.x, 0), innerWidth),
225
224
  y: Math.min(Math.max(_t.y, 0), innerHeight - 40)
226
- }), yt = E?.role === "guest" ? u("feedbackRef", { ref: O.reference }) : O.reference, bt = (t) => {
227
- if (!(t instanceof e && t.status === 412)) return C(t);
228
- R(null), w({
225
+ }), yt = T?.role === "guest" ? u("feedbackRef", { ref: D.reference }) : D.reference, bt = (t) => {
226
+ if (!(t instanceof e && t.status === 412)) return S(t);
227
+ R(null), C({
229
228
  text: u("editConflict"),
230
229
  tone: "info"
231
230
  }), J();
232
231
  }, Q = async (e) => {
233
- let t = O;
232
+ let t = D;
234
233
  try {
235
- k(await r.updateThread(O.id, { status: e })), e === "resolved" && import("./confetti-DKeKR7-6.js").then((e) => e.celebrate(G.current)).catch(() => void 0), e === "resolved" ? w({
236
- text: u("resolvedToast", { ref: O.reference }),
234
+ O(await i.updateThread(D.id, { status: e })), e === "resolved" && import("./confetti-DTKpwF3O.js").then((e) => e.celebrate(ut.current)).catch(() => void 0), e === "resolved" ? C({
235
+ text: u("resolvedToast", { ref: D.reference }),
237
236
  tone: "success",
238
237
  action: {
239
238
  label: u("undo"),
240
- run: () => void m(r, t, w, C).then((e) => e && K.current === e.id && k(e))
239
+ run: () => void p(i, t, C, S).then((e) => e && K.current === e.id && O(e))
241
240
  }
242
- }) : e === "open" && (t.status === "resolved" || t.status === "closed") && w({
243
- text: u("reopenedToast", { ref: O.reference }),
241
+ }) : e === "open" && (t.status === "resolved" || t.status === "closed") && C({
242
+ text: u("reopenedToast", { ref: D.reference }),
244
243
  tone: "info"
245
244
  });
246
245
  } catch (e) {
247
246
  bt(e);
248
247
  }
249
- }, xt = () => r.watch(O.id, !lt).then((e) => {
250
- let t = e?.watching ?? !lt;
251
- Oe.set(O.id, t), ut(t), w({ text: u(t ? "followed" : "muted", { ref: O.reference }) });
252
- }, C), St = () => {
248
+ }, xt = () => i.watch(D.id, !ct).then((e) => {
249
+ let t = e?.watching ?? !ct;
250
+ ke.set(D.id, t), lt(t), C({ text: u(t ? "followed" : "muted", { ref: D.reference }) });
251
+ }, S), St = () => {
253
252
  if (!L || F) return;
254
253
  Je(!0);
255
- let e = Ce(L.body, H.map((e) => e.name)), t = H.filter((t) => /^\d+$/.test(t.id ?? "") && e.has(t.name)).map((e) => Number(e.id));
256
- r.editMessage(L.id, L.body, ...t.length ? [{ mentionIds: t }] : []).then((e) => {
257
- j((t) => t.map((t) => t.id === e.id ? e : t)), R(null), w({
254
+ let e = Te(L.body, U.map((e) => e.name)), t = U.filter((t) => /^\d+$/.test(t.id ?? "") && e.has(t.name)).map((e) => Number(e.id));
255
+ i.editMessage(L.id, L.body, ...t.length ? [{ mentionIds: t }] : []).then((e) => {
256
+ A((t) => t.map((t) => t.id === e.id ? e : t)), R(null), C({
258
257
  text: u("editedToast"),
259
258
  tone: "success"
260
- }), e.id === A[0]?.id && r.refreshThread(O.id);
259
+ }), e.id === k[0]?.id && i.refreshThread(D.id);
261
260
  }, bt).finally(() => Je(!1));
262
261
  }, Ct = async () => {
263
262
  if (N.trim() && !F) {
264
263
  Je(!0), Xe(!1);
265
264
  try {
266
265
  let e = await P.ready(), t = e.ids;
267
- e.missing && w({
266
+ e.missing && C({
268
267
  text: u("sentWithoutFiles"),
269
268
  tone: "info"
270
269
  });
271
- let n = await r.reply(O.id, N.trim(), {
270
+ let n = await i.reply(D.id, N.trim(), {
272
271
  replyTo: z?.id ?? null,
273
272
  mentionIds: Ke,
274
273
  attachmentIds: t,
275
274
  idempotencyKey: I.current ?? (I.current = crypto.randomUUID())
276
275
  });
277
- I.current = null, j((e) => e.some((e) => e.id === n.id) ? e : [...e, n]), $e(null), B(!1), Re(""), P.clear(), ae(Le), (O.status === "resolved" || O.status === "closed") && k({
278
- ...O,
276
+ I.current = null, A((e) => e.some((e) => e.id === n.id) ? e : [...e, n]), B(null), V(!1), Re(""), P.clear(), oe(M), (D.status === "resolved" || D.status === "closed") && O({
277
+ ...D,
279
278
  status: "open"
280
279
  });
281
280
  } catch (e) {
282
- Xe(ee(e) ?? !0);
281
+ Xe(te(e) ?? !0);
283
282
  } finally {
284
283
  Je(!1);
285
284
  }
286
285
  }
287
286
  }, wt = async (e, t) => {
288
- let n = e.reactions?.find((e) => e.emoji === t)?.mine ?? !1, i = (e) => {
287
+ let n = e.reactions?.find((e) => e.emoji === t)?.mine ?? !1, r = (e) => {
289
288
  let r = (e.reactions ?? []).map((e) => e.emoji === t ? {
290
289
  ...e,
291
290
  count: e.count + (n ? -1 : 1),
@@ -300,191 +299,191 @@ function w({ client: r, threadId: v, version: y = 0, onClose: b, onError: C, not
300
299
  reactions: r
301
300
  };
302
301
  };
303
- j(A.map((t) => t.id === e.id ? i(t) : t));
302
+ A(k.map((t) => t.id === e.id ? r(t) : t));
304
303
  try {
305
- await r.react(e.id, t, !n);
304
+ await i.react(e.id, t, !n);
306
305
  } catch (e) {
307
- C(e), J();
306
+ S(e), J();
308
307
  }
309
308
  }, Tt = (e) => P.add(e), Et = (e) => {
310
- let t = A.findIndex((t) => t.id === e.id);
311
- j((t) => t.filter((t) => t.id !== e.id)), w({
309
+ let t = k.findIndex((t) => t.id === e.id);
310
+ A((t) => t.filter((t) => t.id !== e.id)), C({
312
311
  text: u("replyDeleted"),
313
312
  action: {
314
313
  label: u("undo"),
315
- run: () => K.current === O.id && j((n) => n.some((t) => t.id === e.id) ? n : [
314
+ run: () => K.current === D.id && A((n) => n.some((t) => t.id === e.id) ? n : [
316
315
  ...n.slice(0, t),
317
316
  e,
318
317
  ...n.slice(t)
319
318
  ])
320
319
  },
321
- expires: ke,
322
- onExpire: () => void r.deleteMessage(e.id).then(() => r.refreshThread(O.id), (e) => {
323
- C(e), K.current === O.id && J();
320
+ expires: Ae,
321
+ onExpire: () => void i.deleteMessage(e.id).then(() => i.refreshThread(D.id), (e) => {
322
+ S(e), K.current === D.id && J();
324
323
  })
325
324
  });
326
325
  }, Dt = () => {
327
- let e = r.state.get().threads;
328
- r.state.set((e) => ({ threads: e.threads.filter((e) => e.id !== O.id) })), b(), w({
329
- text: u("threadDeleted", { ref: O.reference }),
326
+ let e = i.state.get().threads;
327
+ i.state.set((e) => ({ threads: e.threads.filter((e) => e.id !== D.id) })), y(), C({
328
+ text: u("threadDeleted", { ref: D.reference }),
330
329
  action: {
331
330
  label: u("undo"),
332
- run: () => r.state.set((t) => ({ threads: t.threads.some((e) => e.id === O.id) ? t.threads : e.filter((e) => e.id === O.id).concat(t.threads) }))
331
+ run: () => i.state.set((t) => ({ threads: t.threads.some((e) => e.id === D.id) ? t.threads : e.filter((e) => e.id === D.id).concat(t.threads) }))
333
332
  },
334
- expires: ke,
335
- onExpire: () => void r.deleteThread(O.id).catch((e) => {
336
- C(e), r.refreshThread(O.id);
333
+ expires: Ae,
334
+ onExpire: () => void i.deleteThread(D.id).catch((e) => {
335
+ S(e), i.refreshThread(D.id);
337
336
  })
338
337
  });
339
338
  }, Ot = async (e, t) => {
340
339
  try {
341
- await navigator.clipboard.writeText(e), w({ text: t });
340
+ await navigator.clipboard.writeText(e), C({ text: t });
342
341
  } catch {
343
- C(Error(u("errorGeneric")));
342
+ S(Error(u("errorGeneric")));
344
343
  }
345
344
  }, kt = (() => {
346
- let e = x(O.page.url);
345
+ let e = b(D.page.url);
347
346
  if (!e) return "";
348
347
  let t = new URL(e);
349
- return t.searchParams.set("ck_thread", O.id), t.toString();
350
- })(), At = x(O.capture?.screenshot?.thumbnail_url, "image"), jt = x(O.capture?.screenshot?.url), Mt = O.status === "resolved" || O.status === "closed", Nt = x(O.page.url), $ = O.capture?.device, Pt = O.capture?.viewport, Ft = [
351
- [u("detailCreated"), /* @__PURE__ */ o("time", {
352
- dateTime: O.created_at,
353
- children: l(O.created_at)
348
+ return t.searchParams.set("ck_thread", D.id), t.toString();
349
+ })(), At = b(D.capture?.screenshot?.thumbnail_url, "image"), jt = b(D.capture?.screenshot?.url), Mt = D.status === "resolved" || D.status === "closed", Nt = b(D.page.url), $ = D.capture?.device, Pt = D.capture?.viewport, Ft = [
350
+ [u("detailCreated"), /* @__PURE__ */ s("time", {
351
+ dateTime: D.created_at,
352
+ children: l(D.created_at)
354
353
  })],
355
- ...O.resolved_at && O.status === "resolved" ? [[u("detailResolved"), /* @__PURE__ */ o("time", {
356
- dateTime: O.resolved_at,
357
- children: l(O.resolved_at)
354
+ ...D.resolved_at && D.status === "resolved" ? [[u("detailResolved"), /* @__PURE__ */ s("time", {
355
+ dateTime: D.resolved_at,
356
+ children: l(D.resolved_at)
358
357
  })]] : [],
359
- ...Nt ? [[u("detailPage"), /* @__PURE__ */ o("a", {
358
+ ...Nt ? [[u("detailPage"), /* @__PURE__ */ s("a", {
360
359
  href: Nt,
361
360
  target: "_blank",
362
361
  rel: "noopener noreferrer",
363
- children: /* @__PURE__ */ o("bdi", { children: O.page.title || O.page.path })
362
+ children: /* @__PURE__ */ s("bdi", { children: D.page.title || D.page.path })
364
363
  })]] : [],
365
- ...$?.browser || $?.os ? [[u("detailBrowser"), /* @__PURE__ */ o("bdi", { children: [$.browser && `${$.browser}${$.browser_version ? ` ${$.browser_version.split(".")[0]}` : ""}`, $.os && `${$.os}${$.os_version ? ` ${$.os_version}` : ""}`].filter(Boolean).join(" · ") })]] : [],
366
- ...Pt?.width ? [[u("detailWindow"), /* @__PURE__ */ o("bdi", {
364
+ ...$?.browser || $?.os ? [[u("detailBrowser"), /* @__PURE__ */ s("bdi", { children: [$.browser && `${$.browser}${$.browser_version ? ` ${$.browser_version.split(".")[0]}` : ""}`, $.os && `${$.os}${$.os_version ? ` ${$.os_version}` : ""}`].filter(Boolean).join(" · ") })]] : [],
365
+ ...Pt?.width ? [[u("detailWindow"), /* @__PURE__ */ s("bdi", {
367
366
  dir: "ltr",
368
367
  children: `${Pt.width} × ${Pt.height}`
369
368
  })]] : []
370
369
  ];
371
- return /* @__PURE__ */ o("div", {
372
- class: T ? "ck-card ck-card-embedded" : "ck-card",
373
- style: T ? void 0 : vt,
374
- role: T ? "region" : "dialog",
370
+ return /* @__PURE__ */ s("div", {
371
+ class: w ? "ck-card ck-card-embedded" : "ck-card",
372
+ style: w ? void 0 : vt,
373
+ role: w ? "region" : "dialog",
375
374
  "aria-label": yt,
376
375
  "data-commentkit-ui": !0,
377
- onKeyDown: T ? (e) => e.key === "Escape" && !e.defaultPrevented && (e.stopPropagation(), T.onBack()) : void 0,
376
+ onKeyDown: w ? (e) => e.key === "Escape" && !e.defaultPrevented && (e.stopPropagation(), w.onBack()) : void 0,
378
377
  children: [
379
- /* @__PURE__ */ o("div", {
378
+ /* @__PURE__ */ s("div", {
380
379
  class: "ck-card-head",
381
380
  style: { position: "relative" },
382
381
  children: [
383
- T ? /* @__PURE__ */ o("button", {
382
+ w ? /* @__PURE__ */ s("button", {
384
383
  class: "ck-ghost ck-back",
385
384
  "aria-label": u("backToList"),
386
385
  title: u("backToList"),
387
- onClick: T.onBack,
388
- children: /* @__PURE__ */ o(S, {
386
+ onClick: w.onBack,
387
+ children: /* @__PURE__ */ s(x, {
389
388
  name: "chevron",
390
389
  size: 16
391
390
  })
392
391
  }) : null,
393
- /* @__PURE__ */ o("span", {
392
+ /* @__PURE__ */ s("span", {
394
393
  class: "ck-card-title",
395
- ref: Fe,
394
+ ref: Ie,
396
395
  tabIndex: -1,
397
396
  children: yt
398
397
  }),
399
- /* @__PURE__ */ o(be, { status: O.status }),
400
- T?.position ? /* @__PURE__ */ o("span", {
398
+ /* @__PURE__ */ s(ve, { status: D.status }),
399
+ w?.position ? /* @__PURE__ */ s("span", {
401
400
  class: "ck-muted ck-card-pos",
402
401
  children: u("countOf", {
403
- n: T.position.n,
404
- total: T.position.total
402
+ n: w.position.n,
403
+ total: w.position.total
405
404
  })
406
405
  }) : null,
407
- T?.onPrev ? /* @__PURE__ */ o("button", {
406
+ w?.onPrev ? /* @__PURE__ */ s("button", {
408
407
  class: "ck-ghost ck-step",
409
408
  "aria-label": u("previousThread"),
410
409
  title: `${u("previousThread")} (K)`,
411
410
  "aria-keyshortcuts": "K",
412
- onClick: T.onPrev,
413
- children: /* @__PURE__ */ o(S, {
411
+ onClick: w.onPrev,
412
+ children: /* @__PURE__ */ s(x, {
414
413
  name: "chevron",
415
414
  size: 15
416
415
  })
417
416
  }) : null,
418
- T?.onNext ? /* @__PURE__ */ o("button", {
417
+ w?.onNext ? /* @__PURE__ */ s("button", {
419
418
  class: "ck-ghost ck-step",
420
419
  "data-dir": "next",
421
420
  "aria-label": u("nextThread"),
422
421
  title: `${u("nextThread")} (J)`,
423
422
  "aria-keyshortcuts": "J",
424
- onClick: T.onNext,
425
- children: /* @__PURE__ */ o(S, {
423
+ onClick: w.onNext,
424
+ children: /* @__PURE__ */ s(x, {
426
425
  name: "chevron",
427
426
  size: 15
428
427
  })
429
428
  }) : null,
430
- /* @__PURE__ */ o("button", {
429
+ /* @__PURE__ */ s("button", {
431
430
  class: "ck-ghost",
432
431
  "aria-label": u("more"),
433
432
  "aria-haspopup": "menu",
434
433
  "aria-expanded": Ze,
435
434
  onClick: () => Qe(!Ze),
436
- children: /* @__PURE__ */ o(S, { name: "more" })
435
+ children: /* @__PURE__ */ s(x, { name: "more" })
437
436
  }),
438
- T ? null : /* @__PURE__ */ o("button", {
437
+ w ? null : /* @__PURE__ */ s("button", {
439
438
  class: "ck-ghost",
440
439
  "aria-label": u("close"),
441
- onClick: b,
442
- children: /* @__PURE__ */ o(S, { name: "close" })
440
+ onClick: y,
441
+ children: /* @__PURE__ */ s(x, { name: "close" })
443
442
  }),
444
- Ze ? /* @__PURE__ */ o("div", {
443
+ Ze ? /* @__PURE__ */ s("div", {
445
444
  class: "ck-menu",
446
445
  role: "menu",
447
446
  onClick: () => Qe(!1),
448
- onKeyDown: (e) => e.key === "Escape" ? (e.stopPropagation(), Qe(!1)) : xe(e, "[role=menuitem]", !0),
447
+ onKeyDown: (e) => e.key === "Escape" ? (e.stopPropagation(), Qe(!1)) : Se(e, "[role=menuitem]", !0),
449
448
  children: [
450
- T ? /* @__PURE__ */ o("button", {
449
+ w ? /* @__PURE__ */ s("button", {
451
450
  role: "menuitem",
452
- onClick: () => T.onShow(O),
451
+ onClick: () => w.onShow(D),
453
452
  children: u("showOnPage")
454
453
  }) : null,
455
- kt ? /* @__PURE__ */ o("button", {
454
+ kt ? /* @__PURE__ */ s("button", {
456
455
  role: "menuitem",
457
456
  onClick: () => void Ot(kt, u("copied")),
458
457
  children: u("copyLink")
459
458
  }) : null,
460
- X?.export_for_agents ? /* @__PURE__ */ o("button", {
459
+ X?.export_for_agents ? /* @__PURE__ */ s("button", {
461
460
  role: "menuitem",
462
- onClick: () => void Ot(p(O, A), u("copiedForAgent")),
461
+ onClick: () => void Ot(f(D, k), u("copiedForAgent")),
463
462
  children: u("copyForAgent")
464
463
  }) : null,
465
- X?.set_any_status && Z ? /* @__PURE__ */ o(f, { children: [
466
- /* @__PURE__ */ o("button", {
464
+ X?.set_any_status && Z ? /* @__PURE__ */ s(n, { children: [
465
+ /* @__PURE__ */ s("button", {
467
466
  role: "menuitem",
468
467
  onClick: () => void Q("in_progress"),
469
468
  children: u("markInProgress")
470
469
  }),
471
- /* @__PURE__ */ o("button", {
470
+ /* @__PURE__ */ s("button", {
472
471
  role: "menuitem",
473
472
  onClick: () => void Q("in_review"),
474
473
  children: u("markInReview")
475
474
  }),
476
- /* @__PURE__ */ o("button", {
475
+ /* @__PURE__ */ s("button", {
477
476
  role: "menuitem",
478
477
  onClick: () => void Q("closed"),
479
478
  children: u("closeThread")
480
479
  })
481
480
  ] }) : null,
482
- /* @__PURE__ */ o("button", {
481
+ /* @__PURE__ */ s("button", {
483
482
  role: "menuitem",
484
483
  onClick: () => void xt(),
485
- children: u(lt ? "mute" : "unmute")
484
+ children: u(ct ? "mute" : "unmute")
486
485
  }),
487
- Z && (X?.manage || gt && O.message_count <= 1) ? /* @__PURE__ */ o("button", {
486
+ Z && (X?.manage || gt && D.message_count <= 1) ? /* @__PURE__ */ s("button", {
488
487
  role: "menuitem",
489
488
  class: "ck-danger",
490
489
  onClick: Dt,
@@ -494,166 +493,166 @@ function w({ client: r, threadId: v, version: y = 0, onClose: b, onError: C, not
494
493
  }) : null
495
494
  ]
496
495
  }),
497
- /* @__PURE__ */ o(fe, {
498
- client: r,
499
- thread: O,
496
+ /* @__PURE__ */ s(pe, {
497
+ client: i,
498
+ thread: D,
500
499
  editable: !!X?.triage && Z,
501
- onChange: (e) => K.current === e.id && k(e),
500
+ onChange: (e) => K.current === e.id && O(e),
502
501
  onError: bt
503
502
  }),
504
- /* @__PURE__ */ o("div", {
503
+ /* @__PURE__ */ s("div", {
505
504
  class: "ck-card-body",
506
- ref: G,
505
+ ref: ut,
507
506
  onScroll: (e) => {
508
507
  let t = e.currentTarget;
509
- B(t.scrollHeight - t.scrollTop - t.clientHeight > 120), W(null);
508
+ V(t.scrollHeight - t.scrollTop - t.clientHeight > 120), G(null);
510
509
  },
511
510
  onMouseOver: (e) => {
512
511
  let t = e.target.closest?.(".ck-mention");
513
- if (!t) return W(null);
514
- let n = t.textContent?.replace(/^@/, "") ?? "", r = H.find((e) => e.name === n) ?? H.find((e) => n.startsWith(e.name));
512
+ if (!t) return G(null);
513
+ let n = t.textContent?.replace(/^@/, "") ?? "", r = U.find((e) => e.name === n) ?? U.find((e) => n.startsWith(e.name));
515
514
  if (!r) return;
516
515
  let i = t.getBoundingClientRect();
517
- W({
516
+ G({
518
517
  person: r,
519
518
  x: i.left,
520
519
  y: i.bottom + 6
521
520
  });
522
521
  },
523
- onMouseLeave: () => W(null),
522
+ onMouseLeave: () => G(null),
524
523
  children: [
525
- Y?.state === "detached" ? /* @__PURE__ */ o("div", {
524
+ Y?.state === "detached" ? /* @__PURE__ */ s("div", {
526
525
  class: "ck-note",
527
526
  "data-tone": "warning",
528
527
  children: u("detached")
529
528
  }) : null,
530
- Y?.state === "moved" ? /* @__PURE__ */ o("p", {
529
+ Y?.state === "moved" ? /* @__PURE__ */ s("p", {
531
530
  class: "ck-muted",
532
531
  children: u("moved")
533
532
  }) : null,
534
- Te(O) ? /* @__PURE__ */ o("p", {
533
+ me(D) ? /* @__PURE__ */ s("p", {
535
534
  class: "ck-muted",
536
- title: `${O.breakpoint}px`,
537
- children: u(`screen_${we(O.breakpoint)}`)
535
+ title: `${D.breakpoint}px`,
536
+ children: u(`screen_${we(D.breakpoint)}`)
538
537
  }) : null,
539
- O.page.branch && r.options.branch ? /* @__PURE__ */ o("p", {
538
+ D.page.branch && i.options.branch ? /* @__PURE__ */ s("p", {
540
539
  class: "ck-muted ck-build",
541
540
  children: u("leftOnBranch", {
542
- branch: O.page.branch,
543
- commit: O.page.commit_sha ? ` @ ${O.page.commit_sha.slice(0, 7)}` : ""
541
+ branch: D.page.branch,
542
+ commit: D.page.commit_sha ? ` @ ${D.page.commit_sha.slice(0, 7)}` : ""
544
543
  })
545
544
  }) : null,
546
- O.anchor.quote ? /* @__PURE__ */ o("blockquote", {
545
+ D.anchor.quote ? /* @__PURE__ */ s("blockquote", {
547
546
  class: "ck-quote",
548
547
  "aria-label": u("quotedText"),
549
- children: /* @__PURE__ */ o("bdi", { children: O.anchor.quote })
548
+ children: /* @__PURE__ */ s("bdi", { children: D.anchor.quote })
550
549
  }) : null,
551
- O.description?.trim() ? /* @__PURE__ */ o("details", {
550
+ D.description?.trim() ? /* @__PURE__ */ s("details", {
552
551
  class: "ck-description",
553
- open: O.description.length <= 280,
554
- children: [/* @__PURE__ */ o("summary", { children: u("description") }), /* @__PURE__ */ o("p", { children: /* @__PURE__ */ o("bdi", { children: O.description }) })]
552
+ open: D.description.length <= 280,
553
+ children: [/* @__PURE__ */ s("summary", { children: u("description") }), /* @__PURE__ */ s("p", { children: /* @__PURE__ */ s("bdi", { children: D.description }) })]
555
554
  }) : null,
556
- /* @__PURE__ */ o(de, {
557
- client: r,
558
- thread: O,
555
+ /* @__PURE__ */ s(fe, {
556
+ client: i,
557
+ thread: D,
559
558
  editable: Z && (!!X?.triage || !!gt),
560
- onChange: (e) => K.current === e.id && k(e),
561
- onError: C
559
+ onChange: (e) => K.current === e.id && O(e),
560
+ onError: S
562
561
  }),
563
- O.style_changes?.length ? /* @__PURE__ */ o(Ee, {
564
- thread: O,
562
+ D.style_changes?.length ? /* @__PURE__ */ s(De, {
563
+ thread: D,
565
564
  element: Y?.state === "detached" ? null : Y?.element ?? null,
566
565
  editable: Z && (!!X?.triage || !!gt),
567
- client: r,
568
- onChange: (e) => K.current === e.id && k(e),
566
+ client: i,
567
+ onChange: (e) => K.current === e.id && O(e),
569
568
  onError: bt
570
569
  }) : null,
571
- /* @__PURE__ */ o("div", {
570
+ /* @__PURE__ */ s("div", {
572
571
  class: "ck-details",
573
- children: [/* @__PURE__ */ o("button", {
572
+ children: [/* @__PURE__ */ s("button", {
574
573
  class: "ck-details-toggle",
575
- "aria-expanded": tt,
574
+ "aria-expanded": et,
576
575
  "aria-controls": "ck-details",
577
- onClick: () => nt(!tt),
576
+ onClick: () => tt(!et),
578
577
  children: u("details")
579
- }), tt ? /* @__PURE__ */ o("dl", {
578
+ }), et ? /* @__PURE__ */ s("dl", {
580
579
  id: "ck-details",
581
- children: Ft.map(([e, t]) => /* @__PURE__ */ o("div", { children: [/* @__PURE__ */ o("dt", { children: e }), /* @__PURE__ */ o("dd", { children: t })] }))
580
+ children: Ft.map(([e, t]) => /* @__PURE__ */ s("div", { children: [/* @__PURE__ */ s("dt", { children: e }), /* @__PURE__ */ s("dd", { children: t })] }))
582
581
  }) : null]
583
582
  }),
584
- O.status === "in_review" && !X?.set_any_status && Z ? /* @__PURE__ */ o("div", {
583
+ D.status === "in_review" && !X?.set_any_status && Z ? /* @__PURE__ */ s("div", {
585
584
  class: "ck-review-ask",
586
- children: [/* @__PURE__ */ o("div", { children: u("reviewAsk") }), /* @__PURE__ */ o("div", {
585
+ children: [/* @__PURE__ */ s("div", { children: u("reviewAsk") }), /* @__PURE__ */ s("div", {
587
586
  class: "ck-actions",
588
- children: [/* @__PURE__ */ o("button", {
587
+ children: [/* @__PURE__ */ s("button", {
589
588
  class: "ck-btn ck-primary",
590
589
  onClick: () => void Q("resolved"),
591
590
  children: [
592
- /* @__PURE__ */ o(S, {
591
+ /* @__PURE__ */ s(x, {
593
592
  name: "check",
594
593
  size: 14
595
594
  }),
596
595
  " ",
597
596
  u("looksGood")
598
597
  ]
599
- }), /* @__PURE__ */ o("button", {
598
+ }), /* @__PURE__ */ s("button", {
600
599
  class: "ck-btn",
601
- onClick: () => ct(!0),
600
+ onClick: () => st(!0),
602
601
  children: u("notYet")
603
602
  })]
604
603
  })]
605
604
  }) : null,
606
- A.map((e, t) => {
607
- let i = _e(e.author, E), s = t === 0;
608
- return /* @__PURE__ */ o("div", {
605
+ k.map((e, t) => {
606
+ let a = Ee(e.author, T), o = t === 0;
607
+ return /* @__PURE__ */ s("div", {
609
608
  class: "ck-msg",
610
609
  id: `ck-msg-${e.id}`,
611
- "data-mine": i || void 0,
612
- "data-reply": !s || void 0,
613
- "data-new": !ot.current.has(e.id) || void 0,
614
- children: [/* @__PURE__ */ o(ye, { person: e.author }), /* @__PURE__ */ o("div", {
610
+ "data-mine": a || void 0,
611
+ "data-reply": !o || void 0,
612
+ "data-new": !at.current.has(e.id) || void 0,
613
+ children: [/* @__PURE__ */ s(xe, { person: e.author }), /* @__PURE__ */ s("div", {
615
614
  class: "ck-msg-main",
616
615
  children: [
617
- /* @__PURE__ */ o("div", {
616
+ /* @__PURE__ */ s("div", {
618
617
  class: "ck-msg-meta",
619
618
  children: [
620
- /* @__PURE__ */ o("bdi", {
619
+ /* @__PURE__ */ s("bdi", {
621
620
  class: "ck-msg-name",
622
621
  children: e.author.name
623
622
  }),
624
- /* @__PURE__ */ o("time", {
623
+ /* @__PURE__ */ s("time", {
625
624
  dateTime: e.created_at,
626
625
  title: l(e.created_at),
627
- children: n(e.created_at)
626
+ children: r(e.created_at)
628
627
  }),
629
- e.edited_at ? /* @__PURE__ */ o("span", {
628
+ e.edited_at ? /* @__PURE__ */ s("span", {
630
629
  title: l(e.edited_at),
631
630
  children: ["· ", u("edited")]
632
631
  }) : null,
633
- L?.id === e.id ? null : /* @__PURE__ */ o("span", {
632
+ L?.id === e.id ? null : /* @__PURE__ */ s("span", {
634
633
  class: "ck-msg-actions",
635
634
  children: [
636
- Z ? /* @__PURE__ */ o("button", {
635
+ Z ? /* @__PURE__ */ s("button", {
637
636
  class: "ck-ghost ck-ghost-sm",
638
637
  "aria-label": u("replyTo", { name: e.author.name }),
639
638
  title: u("quoteReply"),
640
- onClick: () => $e(e),
641
- children: /* @__PURE__ */ o(S, {
639
+ onClick: () => B(e),
640
+ children: /* @__PURE__ */ s(x, {
642
641
  name: "reply",
643
642
  size: 14
644
643
  })
645
644
  }) : null,
646
- /* @__PURE__ */ o("button", {
645
+ /* @__PURE__ */ s("button", {
647
646
  class: "ck-ghost ck-ghost-sm",
648
647
  "aria-label": u("copyText"),
649
648
  title: u("copyText"),
650
649
  onClick: () => void Ot(e.body, u("copiedText")),
651
- children: /* @__PURE__ */ o(S, {
650
+ children: /* @__PURE__ */ s(x, {
652
651
  name: "copy",
653
652
  size: 14
654
653
  })
655
654
  }),
656
- Z && i ? /* @__PURE__ */ o("button", {
655
+ Z && a ? /* @__PURE__ */ s("button", {
657
656
  class: "ck-ghost ck-ghost-sm",
658
657
  onClick: () => R({
659
658
  id: e.id,
@@ -661,7 +660,7 @@ function w({ client: r, threadId: v, version: y = 0, onClose: b, onError: C, not
661
660
  }),
662
661
  children: u("edit")
663
662
  }) : null,
664
- Z && (i || X?.manage) && !s ? /* @__PURE__ */ o("button", {
663
+ Z && (a || X?.manage) && !o ? /* @__PURE__ */ s("button", {
665
664
  class: "ck-ghost ck-ghost-sm ck-danger",
666
665
  onClick: () => Et(e),
667
666
  children: u("delete")
@@ -670,169 +669,175 @@ function w({ client: r, threadId: v, version: y = 0, onClose: b, onError: C, not
670
669
  })
671
670
  ]
672
671
  }),
673
- e.reply_to ? /* @__PURE__ */ o("button", {
672
+ e.reply_to ? /* @__PURE__ */ s("button", {
674
673
  class: "ck-quote ck-quote-msg",
675
674
  onClick: () => document.querySelector("[data-commentkit-host]")?.shadowRoot?.getElementById(`ck-msg-${e.reply_to.id}`)?.scrollIntoView({
676
675
  block: "center",
677
- behavior: Ae() ? "auto" : "smooth"
676
+ behavior: je() ? "auto" : "smooth"
678
677
  }),
679
678
  children: [
680
- /* @__PURE__ */ o("strong", { children: /* @__PURE__ */ o("bdi", { children: e.reply_to.author.name }) }),
679
+ /* @__PURE__ */ s("strong", { children: /* @__PURE__ */ s("bdi", { children: e.reply_to.author.name }) }),
681
680
  " ",
682
- /* @__PURE__ */ o("bdi", { children: e.reply_to.excerpt })
681
+ /* @__PURE__ */ s("bdi", { children: e.reply_to.excerpt })
683
682
  ]
684
683
  }) : null,
685
- L?.id === e.id ? /* @__PURE__ */ o("div", { children: [/* @__PURE__ */ o("textarea", {
686
- class: "ck-textarea",
687
- "aria-label": u("edit"),
688
- value: L.body,
689
- disabled: F,
690
- onInput: (t) => R({
691
- id: e.id,
692
- body: t.target.value
693
- }),
684
+ L?.id === e.id ? /* @__PURE__ */ s("div", { children: [/* @__PURE__ */ s("div", {
694
685
  onKeyDown: (e) => {
695
- e.stopPropagation(), e.key === "Escape" ? R(null) : e.key === "Enter" && !e.shiftKey && !e.isComposing && (e.preventDefault(), St());
696
- }
697
- }), /* @__PURE__ */ o("div", {
686
+ e.key === "Escape" && (e.stopPropagation(), R(null));
687
+ },
688
+ children: /* @__PURE__ */ s(se, {
689
+ client: i,
690
+ value: L.body,
691
+ onChange: (t) => R({
692
+ id: e.id,
693
+ body: t
694
+ }),
695
+ onMentions: () => void 0,
696
+ onSubmit: St,
697
+ placeholder: u("edit"),
698
+ autofocus: !0,
699
+ disabled: F,
700
+ canMention: !0
701
+ })
702
+ }), /* @__PURE__ */ s("div", {
698
703
  class: "ck-actions",
699
- children: [/* @__PURE__ */ o("button", {
704
+ children: [/* @__PURE__ */ s("button", {
700
705
  class: "ck-btn",
701
706
  onClick: () => R(null),
702
707
  children: u("cancel")
703
- }), /* @__PURE__ */ o("button", {
708
+ }), /* @__PURE__ */ s("button", {
704
709
  class: "ck-btn ck-primary",
705
710
  disabled: F || !L.body.trim(),
706
711
  onClick: St,
707
712
  children: u(F ? "saving" : "save")
708
713
  })]
709
- })] }) : /* @__PURE__ */ o("div", {
714
+ })] }) : /* @__PURE__ */ s("div", {
710
715
  class: "ck-msg-body",
711
716
  dir: "auto",
712
- children: /* @__PURE__ */ o(ge, {
717
+ children: /* @__PURE__ */ s(ye, {
713
718
  text: e.body,
714
- people: at
719
+ people: it
715
720
  })
716
721
  }),
717
- L?.id === e.id ? null : /* @__PURE__ */ o(Me, {
718
- client: r,
722
+ L?.id === e.id ? null : /* @__PURE__ */ s(Ne, {
723
+ client: i,
719
724
  text: e.body
720
725
  }),
721
726
  (() => {
722
- let t = (e.attachments ?? []).filter((e) => e.kind !== "screenshot"), n = [...s && At ? [{
727
+ let t = (e.attachments ?? []).filter((e) => e.kind !== "screenshot"), r = [...o && At ? [{
723
728
  src: jt ?? At,
724
729
  name: u("screenshot"),
725
730
  href: jt
726
- }] : [], ...t.filter(je).map((e) => ({
727
- src: x(e.url, "image") ?? x(e.thumbnail_url, "image"),
731
+ }] : [], ...t.filter(Me).map((e) => ({
732
+ src: b(e.url, "image") ?? b(e.thumbnail_url, "image"),
728
733
  name: e.name,
729
- href: x(e.url)
730
- }))], r = [...s && At ? [At] : [], ...t.filter(je).map((e) => x(e.thumbnail_url, "image") ?? x(e.url, "image"))], i = t.filter((e) => !je(e));
731
- return /* @__PURE__ */ o(f, { children: [r.length === 1 ? /* @__PURE__ */ o("button", {
734
+ href: b(e.url)
735
+ }))], i = [...o && At ? [At] : [], ...t.filter(Me).map((e) => b(e.thumbnail_url, "image") ?? b(e.url, "image"))], a = t.filter((e) => !Me(e));
736
+ return /* @__PURE__ */ s(n, { children: [i.length === 1 ? /* @__PURE__ */ s("button", {
732
737
  class: "ck-shot",
733
- "aria-label": u("openImage", { name: n[0].name }),
734
- onClick: () => We(n, 0),
735
- children: /* @__PURE__ */ o("img", {
736
- src: r[0],
737
- alt: n[0].name,
738
+ "aria-label": u("openImage", { name: r[0].name }),
739
+ onClick: () => We(r, 0),
740
+ children: /* @__PURE__ */ s("img", {
741
+ src: i[0],
742
+ alt: r[0].name,
738
743
  loading: "lazy",
739
744
  onLoad: ft
740
745
  })
741
- }) : r.length ? /* @__PURE__ */ o("div", {
746
+ }) : i.length ? /* @__PURE__ */ s("div", {
742
747
  class: "ck-grid",
743
- "data-count": Math.min(r.length, 4),
744
- children: r.slice(0, 4).map((e, t) => /* @__PURE__ */ o("button", {
748
+ "data-count": Math.min(i.length, 4),
749
+ children: i.slice(0, 4).map((e, t) => /* @__PURE__ */ s("button", {
745
750
  class: "ck-grid-item",
746
- "aria-label": u("openImage", { name: n[t].name }),
747
- onClick: () => We(n, t),
748
- children: [/* @__PURE__ */ o("img", {
751
+ "aria-label": u("openImage", { name: r[t].name }),
752
+ onClick: () => We(r, t),
753
+ children: [/* @__PURE__ */ s("img", {
749
754
  src: e,
750
- alt: n[t].name,
755
+ alt: r[t].name,
751
756
  loading: "lazy",
752
757
  onLoad: ft
753
- }), t === 3 && r.length > 4 ? /* @__PURE__ */ o("span", {
758
+ }), t === 3 && i.length > 4 ? /* @__PURE__ */ s("span", {
754
759
  class: "ck-grid-more",
755
760
  "aria-hidden": "true",
756
- children: ["+", r.length - 4]
761
+ children: ["+", i.length - 4]
757
762
  }) : null]
758
763
  }))
759
- }) : null, i.length ? /* @__PURE__ */ o("div", {
764
+ }) : null, a.length ? /* @__PURE__ */ s("div", {
760
765
  class: "ck-files",
761
- children: i.map((e) => {
762
- let t = x(e.url);
763
- return t ? /* @__PURE__ */ o("a", {
766
+ children: a.map((e) => {
767
+ let t = b(e.url);
768
+ return t ? /* @__PURE__ */ s("a", {
764
769
  class: "ck-file",
765
770
  href: t,
766
771
  target: "_blank",
767
772
  rel: "noopener noreferrer",
768
- children: /* @__PURE__ */ o("bdi", { children: e.name })
769
- }) : /* @__PURE__ */ o("span", {
773
+ children: /* @__PURE__ */ s("bdi", { children: e.name })
774
+ }) : /* @__PURE__ */ s("span", {
770
775
  class: "ck-file",
771
- children: /* @__PURE__ */ o("bdi", { children: e.name })
776
+ children: /* @__PURE__ */ s("bdi", { children: e.name })
772
777
  });
773
778
  })
774
779
  }) : null] });
775
780
  })(),
776
- /* @__PURE__ */ o("div", {
781
+ /* @__PURE__ */ s("div", {
777
782
  class: "ck-reactions",
778
783
  children: [
779
784
  (e.reactions ?? []).map((t) => {
780
- let n = `${a("reactionLabel", t.count, { emoji: t.emoji })}${t.mine ? `, ${u("youReacted")}` : ""}`;
781
- return /* @__PURE__ */ o("button", {
785
+ let n = `${ee("reactionLabel", t.count, { emoji: t.emoji })}${t.mine ? `, ${u("youReacted")}` : ""}`;
786
+ return /* @__PURE__ */ s("button", {
782
787
  class: "ck-reaction",
783
788
  "aria-pressed": t.mine,
784
789
  "aria-label": n,
785
790
  title: n,
786
791
  onClick: () => void wt(e, t.emoji),
787
792
  children: [
788
- /* @__PURE__ */ o(Se, { char: t.emoji }),
793
+ /* @__PURE__ */ s(Ce, { char: t.emoji }),
789
794
  " ",
790
795
  t.count
791
796
  ]
792
797
  });
793
798
  }),
794
- Z && De.filter((t) => !(e.reactions ?? []).some((e) => e.emoji === t)).slice(0, 3).map((t) => /* @__PURE__ */ o("button", {
799
+ Z && Oe.filter((t) => !(e.reactions ?? []).some((e) => e.emoji === t)).slice(0, 3).map((t) => /* @__PURE__ */ s("button", {
795
800
  class: "ck-reaction ck-reaction-add",
796
801
  "aria-label": u("reactWith", { emoji: t }),
797
802
  title: u("reactWith", { emoji: t }),
798
803
  onClick: () => void wt(e, t),
799
- children: /* @__PURE__ */ o(Se, { char: t })
804
+ children: /* @__PURE__ */ s(Ce, { char: t })
800
805
  })),
801
- Z ? /* @__PURE__ */ o("span", {
806
+ Z ? /* @__PURE__ */ s("span", {
802
807
  class: "ck-picker-wrap",
803
- children: [/* @__PURE__ */ o("button", {
808
+ children: [/* @__PURE__ */ s("button", {
804
809
  class: "ck-reaction ck-reaction-more",
805
810
  "aria-label": u("moreReactions"),
806
811
  title: u("moreReactions"),
807
- "aria-expanded": V === e.id,
812
+ "aria-expanded": H === e.id,
808
813
  "aria-haspopup": "true",
809
- onClick: () => rt(V === e.id ? null : e.id),
810
- children: /* @__PURE__ */ o(S, {
814
+ onClick: () => nt(H === e.id ? null : e.id),
815
+ children: /* @__PURE__ */ s(x, {
811
816
  name: "smile",
812
817
  size: 14
813
818
  })
814
- }), V === e.id ? /* @__PURE__ */ o("div", {
819
+ }), H === e.id ? /* @__PURE__ */ s("div", {
815
820
  class: "ck-picker",
816
821
  role: "group",
817
822
  "aria-label": u("moreReactions"),
818
- ref: pe,
823
+ ref: ge,
819
824
  onKeyDown: (e) => {
820
- e.key === "Escape" ? (e.stopPropagation(), rt(null)) : xe(e, "button", !1);
825
+ e.key === "Escape" ? (e.stopPropagation(), nt(null)) : Se(e, "button", !1);
821
826
  },
822
- children: g.map((t) => {
827
+ children: h.map((t) => {
823
828
  let n = (e.reactions ?? []).some((e) => e.emoji === t && e.mine);
824
- return /* @__PURE__ */ o("button", {
829
+ return /* @__PURE__ */ s("button", {
825
830
  "aria-pressed": n,
826
831
  "aria-label": u("reactWith", { emoji: t }),
827
- onClick: () => (rt(null), void wt(e, t)),
828
- children: /* @__PURE__ */ o(Se, { char: t })
832
+ onClick: () => (nt(null), void wt(e, t)),
833
+ children: /* @__PURE__ */ s(Ce, { char: t })
829
834
  });
830
835
  })
831
836
  }) : null]
832
837
  }) : null
833
838
  ]
834
839
  }),
835
- s && A.length === 1 ? /* @__PURE__ */ o("p", {
840
+ o && k.length === 1 ? /* @__PURE__ */ s("p", {
836
841
  class: "ck-muted ck-no-replies",
837
842
  children: u("noReplies")
838
843
  }) : null
@@ -842,36 +847,36 @@ function w({ client: r, threadId: v, version: y = 0, onClose: b, onError: C, not
842
847
  })
843
848
  ]
844
849
  }),
845
- /* @__PURE__ */ o("div", {
850
+ /* @__PURE__ */ s("div", {
846
851
  class: "ck-card-foot",
847
852
  style: {
848
853
  flexDirection: "column",
849
854
  alignItems: "stretch",
850
855
  position: "relative"
851
856
  },
852
- ...Z && ht ? te(Tt) : {},
853
- children: [et ? /* @__PURE__ */ o("button", {
857
+ ...Z && ht ? ne(Tt) : {},
858
+ children: [$e ? /* @__PURE__ */ s("button", {
854
859
  class: "ck-chip ck-jump",
855
- onClick: () => (B(!1), dt(!0)),
856
- children: [/* @__PURE__ */ o(S, {
860
+ onClick: () => (V(!1), dt(!0)),
861
+ children: [/* @__PURE__ */ s(x, {
857
862
  name: "down",
858
863
  size: 14
859
864
  }), u("jumpToLatest")]
860
- }) : null, Z ? /* @__PURE__ */ o(f, { children: [
861
- Pe ? null : /* @__PURE__ */ o("div", {
865
+ }) : null, Z ? /* @__PURE__ */ s(n, { children: [
866
+ Fe ? null : /* @__PURE__ */ s("div", {
862
867
  class: "ck-note",
863
868
  "data-tone": "warning",
864
869
  role: "status",
865
870
  children: u("offline")
866
871
  }),
867
- Ye && Pe ? /* @__PURE__ */ o("div", {
872
+ Ye && Fe ? /* @__PURE__ */ s("div", {
868
873
  class: "ck-note",
869
874
  "data-tone": "warning",
870
875
  role: "alert",
871
- children: Ye === !0 ? /* @__PURE__ */ o(f, { children: [
876
+ children: Ye === !0 ? /* @__PURE__ */ s(n, { children: [
872
877
  u("replyFailed"),
873
878
  " ",
874
- /* @__PURE__ */ o("button", {
879
+ /* @__PURE__ */ s("button", {
875
880
  class: "ck-btn",
876
881
  disabled: F,
877
882
  onClick: () => void Ct(),
@@ -879,34 +884,34 @@ function w({ client: r, threadId: v, version: y = 0, onClose: b, onError: C, not
879
884
  })
880
885
  ] }) : Ye
881
886
  }) : null,
882
- /* @__PURE__ */ o(oe, {
883
- client: r,
887
+ /* @__PURE__ */ s(se, {
888
+ client: i,
884
889
  value: N,
885
890
  onChange: ze,
886
891
  onMentions: qe,
887
892
  onSubmit: () => void Ct(),
888
- placeholder: u(st ? "notYetPlaceholder" : Mt ? "replyToReopen" : "replyPlaceholder"),
889
- autofocus: st || !!z,
893
+ placeholder: u(ot ? "notYetPlaceholder" : Mt ? "replyToReopen" : "replyPlaceholder"),
894
+ autofocus: ot || !!z,
890
895
  disabled: F,
891
896
  canMention: !0,
892
- above: z ? /* @__PURE__ */ o("div", {
897
+ above: z ? /* @__PURE__ */ s("div", {
893
898
  class: "ck-quoting",
894
899
  role: "status",
895
900
  children: [
896
- /* @__PURE__ */ o(S, {
901
+ /* @__PURE__ */ s(x, {
897
902
  name: "reply",
898
903
  size: 14
899
904
  }),
900
- /* @__PURE__ */ o("span", { children: [
901
- /* @__PURE__ */ o("strong", { children: /* @__PURE__ */ o("bdi", { children: z.author.name }) }),
905
+ /* @__PURE__ */ s("span", { children: [
906
+ /* @__PURE__ */ s("strong", { children: /* @__PURE__ */ s("bdi", { children: z.author.name }) }),
902
907
  " ",
903
- /* @__PURE__ */ o("bdi", { children: z.body.slice(0, 140) })
908
+ /* @__PURE__ */ s("bdi", { children: z.body.slice(0, 140) })
904
909
  ] }),
905
- /* @__PURE__ */ o("button", {
910
+ /* @__PURE__ */ s("button", {
906
911
  class: "ck-ghost ck-ghost-sm",
907
912
  "aria-label": u("quoteCancel"),
908
- onClick: () => $e(null),
909
- children: /* @__PURE__ */ o(S, {
913
+ onClick: () => B(null),
914
+ children: /* @__PURE__ */ s(x, {
910
915
  name: "close",
911
916
  size: 14
912
917
  })
@@ -914,7 +919,7 @@ function w({ client: r, threadId: v, version: y = 0, onClose: b, onError: C, not
914
919
  ]
915
920
  }) : null
916
921
  }),
917
- /* @__PURE__ */ o(ce, {
922
+ /* @__PURE__ */ s(le, {
918
923
  items: P.items,
919
924
  onRemove: P.remove,
920
925
  onRetry: P.retry,
@@ -923,25 +928,25 @@ function w({ client: r, threadId: v, version: y = 0, onClose: b, onError: C, not
923
928
  name: e.file.name
924
929
  })), e)
925
930
  }),
926
- /* @__PURE__ */ o("div", {
931
+ /* @__PURE__ */ s("div", {
927
932
  class: "ck-actions",
928
933
  style: { marginTop: 0 },
929
934
  children: [
930
- ht ? /* @__PURE__ */ o(ne, {
935
+ ht ? /* @__PURE__ */ s(re, {
931
936
  input: Ge,
932
937
  onFiles: Tt
933
938
  }) : null,
934
- Mt ? /* @__PURE__ */ o("button", {
939
+ Mt ? /* @__PURE__ */ s("button", {
935
940
  class: "ck-btn",
936
941
  onClick: () => void Q("open"),
937
942
  children: u("reopen")
938
- }) : /* @__PURE__ */ o("button", {
943
+ }) : /* @__PURE__ */ s("button", {
939
944
  class: "ck-btn",
940
945
  title: u("resolveHint"),
941
- "aria-keyshortcuts": r.options.shortcuts === !1 ? void 0 : "E",
946
+ "aria-keyshortcuts": i.options.shortcuts === !1 ? void 0 : "E",
942
947
  onClick: () => void Q("resolved"),
943
948
  children: [
944
- /* @__PURE__ */ o(S, {
949
+ /* @__PURE__ */ s(x, {
945
950
  name: "check",
946
951
  size: 14
947
952
  }),
@@ -949,78 +954,77 @@ function w({ client: r, threadId: v, version: y = 0, onClose: b, onError: C, not
949
954
  u("resolve")
950
955
  ]
951
956
  }),
952
- /* @__PURE__ */ o("span", { class: "ck-spacer" }),
953
- /* @__PURE__ */ o("button", {
957
+ /* @__PURE__ */ s("span", { class: "ck-spacer" }),
958
+ /* @__PURE__ */ s("button", {
954
959
  class: "ck-btn ck-primary",
955
- disabled: F || !N.trim() || !Pe,
960
+ disabled: F || !N.trim() || !Fe,
956
961
  onClick: () => void Ct(),
957
962
  children: u(F ? "sending" : "reply")
958
963
  })
959
964
  ]
960
965
  })
961
- ] }) : /* @__PURE__ */ o("div", {
966
+ ] }) : /* @__PURE__ */ s("div", {
962
967
  class: "ck-note",
963
968
  role: "status",
964
- children: u(Ne ? "readOnlyReply" : "noReplyAccess")
969
+ children: u(Pe ? "readOnlyReply" : "noReplyAccess")
965
970
  })]
966
971
  }),
967
- Be && He ? /* @__PURE__ */ o(He, {
972
+ Be && He ? /* @__PURE__ */ s(He, {
968
973
  images: Be.images,
969
974
  start: Be.start,
970
975
  onClose: () => Ve(null)
971
976
  }) : null,
972
- U ? /* @__PURE__ */ o("div", {
977
+ W ? /* @__PURE__ */ s("div", {
973
978
  class: "ck-mention-card",
974
979
  style: {
975
- left: `${Math.min(U.x, innerWidth - 220)}px`,
976
- top: `${U.y}px`
980
+ left: `${Math.min(W.x, innerWidth - 220)}px`,
981
+ top: `${W.y}px`
977
982
  },
978
983
  "aria-hidden": "true",
979
- children: [/* @__PURE__ */ o(ye, { person: U.person }), /* @__PURE__ */ o("bdi", {
984
+ children: [/* @__PURE__ */ s(xe, { person: W.person }), /* @__PURE__ */ s("bdi", {
980
985
  class: "ck-msg-name",
981
- children: U.person.name
986
+ children: W.person.name
982
987
  })]
983
988
  }) : null
984
989
  ]
985
990
  });
986
991
  }
987
- var ke = 6e3;
988
- function Ae() {
992
+ var Ae = 6e3;
993
+ function je() {
989
994
  return matchMedia("(prefers-reduced-motion: reduce)").matches;
990
995
  }
991
- function je(e) {
992
- return e.mime.startsWith("image/") && !!(x(e.url, "image") || x(e.thumbnail_url, "image"));
996
+ function Me(e) {
997
+ return e.mime.startsWith("image/") && !!(b(e.url, "image") || b(e.thumbnail_url, "image"));
993
998
  }
994
- function Me({ client: e, text: t }) {
995
- let n = c(() => [...new Set([...t.matchAll(/https?:\/\/[^\s<>"')\u200b-\u200f\u202a-\u202e\u2060-\u2069\ufeff]+/g)].map((e) => x(e[0])).filter((e) => !!e))].slice(0, 2), [t]), [r, i] = s([]);
999
+ function Ne({ client: e, text: t }) {
1000
+ let n = o(() => [...new Set([...t.matchAll(/https?:\/\/[^\s<>"')\u200b-\u200f\u202a-\u202e\u2060-\u2069\ufeff]+/g)].map((e) => b(e[0])).filter((e) => !!e))].slice(0, 2), [t]), [r, i] = c([]);
996
1001
  return d(() => {
997
1002
  let t = !0;
998
1003
  return i([]), n.length && Promise.all(n.map((t) => e.linkPreview(t))).then((e) => t && i(e.filter((e) => !!e))), () => {
999
1004
  t = !1;
1000
1005
  };
1001
- }, [n.join(" ")]), r.length ? /* @__PURE__ */ o("div", {
1006
+ }, [n.join(" ")]), r.length ? /* @__PURE__ */ s("div", {
1002
1007
  class: "ck-previews",
1003
1008
  children: r.map((e) => {
1004
- let t = x(e.url);
1005
- return t ? /* @__PURE__ */ o("a", {
1009
+ let t = b(e.url);
1010
+ return t ? /* @__PURE__ */ s("a", {
1006
1011
  class: "ck-preview",
1007
1012
  href: t,
1008
1013
  target: "_blank",
1009
1014
  rel: "noopener noreferrer nofollow ugc",
1010
1015
  children: [
1011
- /* @__PURE__ */ o("span", {
1016
+ /* @__PURE__ */ s("span", {
1012
1017
  class: "ck-preview-site",
1013
- children: /* @__PURE__ */ o("bdi", { children: e.site })
1018
+ children: /* @__PURE__ */ s("bdi", { children: e.site })
1014
1019
  }),
1015
- /* @__PURE__ */ o("strong", { children: /* @__PURE__ */ o("bdi", { children: e.title }) }),
1016
- e.description ? /* @__PURE__ */ o("span", {
1020
+ /* @__PURE__ */ s("strong", { children: /* @__PURE__ */ s("bdi", { children: e.title }) }),
1021
+ e.description ? /* @__PURE__ */ s("span", {
1017
1022
  class: "ck-preview-text",
1018
- children: /* @__PURE__ */ o("bdi", { children: e.description })
1023
+ children: /* @__PURE__ */ s("bdi", { children: e.description })
1019
1024
  }) : null
1020
1025
  ]
1021
1026
  }) : null;
1022
1027
  })
1023
1028
  }) : null;
1024
1029
  }
1025
- //#endregion
1026
- export { w as ThreadCard };
1030
+ export { C as ThreadCard };