@commentkit/comment-kit 1.5.1 → 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.
- package/CHANGELOG.md +15 -0
- package/dist/npm/THIRD_PARTY_NOTICES.txt +2 -2
- package/dist/npm/chunks/{AgentSend-DjFZSC0S.js → AgentSend-2JPDseOo.js} +4 -5
- package/dist/npm/chunks/{Checklist-BEz4IZdT.js → Checklist-BpDXQebo.js} +77 -79
- package/dist/npm/chunks/Composer-CAyj-c8e.js +677 -0
- package/dist/npm/chunks/Guest-ZdFmTcXI.js +187 -0
- package/dist/npm/chunks/{MarkupEditor-CPH4yKx4.js → MarkupEditor-BFplZwFy.js} +3 -5
- package/dist/npm/chunks/{Panel-DSoUAlbQ.js → Panel-BhZ4XRDR.js} +300 -302
- package/dist/npm/chunks/{Settings-C_qV4n7J.js → Settings-SPG9EHUZ.js} +70 -72
- package/dist/npm/chunks/{Shortcuts-ChnaribX.js → Shortcuts-C28HVDw6.js} +3 -5
- package/dist/npm/chunks/{StyleEditor-DqZd6C5o.js → StyleEditor-ByZMtq10.js} +4 -5
- package/dist/npm/chunks/{StylePanel-DMC3riYK.js → StylePanel-Iwhce2tE.js} +62 -64
- package/dist/npm/chunks/{TaskFields-BfjjllMx.js → TaskFields-BsP_fVJg.js} +7 -6
- package/dist/npm/chunks/{ThreadCard-DmKAelSL.js → ThreadCard-BzVZdDCb.js} +407 -403
- package/dist/npm/chunks/{Viewer-mw69qSI5.js → Viewer-CqtGrdD8.js} +29 -31
- package/dist/npm/chunks/{agent-CqDO3JMA.js → agent-BDMQtOzH.js} +14 -15
- package/dist/npm/chunks/{anchor-OCQnjp_6.js → anchor-BsradQhn.js} +1 -2
- package/dist/npm/chunks/{ar-BQ9K9Oqf.js → ar-8tPch6W4.js} +5 -2
- package/dist/npm/chunks/{card-bits-C7bIk5KX.js → card-bits-Bna-g3Py.js} +24 -26
- package/dist/npm/chunks/{client-dZeNdizE.js → client-EFTWxHbJ.js} +76 -61
- package/dist/npm/chunks/{colors-CAjY4jxf.js → colors-CWAn_swA.js} +1 -2
- package/dist/npm/chunks/{confetti-DKeKR7-6.js → confetti-DTKpwF3O.js} +1 -2
- package/dist/npm/chunks/{de-CcPi8xdC.js → de-C63897uD.js} +5 -2
- package/dist/npm/chunks/{drafts-CpQdHhcK.js → drafts-akdBsOd0.js} +1 -2
- package/dist/npm/chunks/{es-DXgkjDCG.js → es-CI2bSpvB.js} +5 -2
- package/dist/npm/chunks/{extension-BFkXOmX5.js → extension-BST6LH1q.js} +2 -3
- package/dist/npm/chunks/{extension-Gvei3opb.js → extension-D-V3utTm.js} +3 -4
- package/dist/npm/chunks/{fr-IjJaUbWh.js → fr-rsVe-Lqk.js} +5 -2
- package/dist/npm/chunks/{hi-BhKQK2MU.js → hi-cvwbSaWP.js} +5 -2
- package/dist/npm/chunks/{html2canvas-pro.esm-lgs6tb4C.js → html2canvas-pro.esm-B7b8p5Wr.js} +608 -528
- package/dist/npm/chunks/{i18n-DAJGndZ2.js → i18n-C4v0M-6z.js} +254 -257
- package/dist/npm/chunks/{it-DKiSCkiD.js → it-C8tnV0BF.js} +5 -2
- package/dist/npm/chunks/{ja-BI1WagDg.js → ja-BWxDfC2f.js} +5 -2
- package/dist/npm/chunks/{live-MvvBdoGd.js → live-BCpJVBeN.js} +2 -3
- package/dist/npm/chunks/{lock-C82sC17d.js → lock-B1JLlOhz.js} +0 -1
- package/dist/npm/chunks/{nl-CJw3VUQ5.js → nl-DNQ6eCht.js} +5 -2
- package/dist/npm/chunks/{pick-dDDLxCDI.js → pick-CLyOdjnD.js} +3 -4
- package/dist/npm/chunks/{pt-BR-CjBolC5g.js → pt-BR-CkG7vpU2.js} +5 -2
- package/dist/npm/chunks/{realtime-D22tI_AS.js → realtime-DIo-Wth4.js} +2 -3
- package/dist/npm/chunks/{report-DoDVi1qT.js → report-BBrT3r89.js} +1 -2
- package/dist/npm/chunks/{rolldown-runtime-Y_bBpyJl.js → rolldown-runtime-QGRDbDUS.js} +1 -2
- package/dist/npm/chunks/{source-BQS2_xfB.js → source-CS7C6wJA.js} +2 -3
- package/dist/npm/chunks/{src-C_oUnL0i.js → src-C4FsVoUp.js} +22 -24
- package/dist/npm/chunks/{start-C5-rebEU.js → start-i9M-r3aH.js} +374 -357
- package/dist/npm/chunks/{upload-CzPAjktW.js → upload-DSv7EyBD.js} +2 -3
- package/dist/npm/chunks/uploads-I01kdqQF.js +1103 -0
- package/dist/npm/chunks/{zh-CN-BrZGx2S0.js → zh-CN-BKuZOLBE.js} +5 -2
- package/dist/npm/element.js +2 -3
- package/dist/npm/headless.js +2 -2
- package/dist/npm/index.js +2 -2
- package/dist/npm/react.js +2 -3
- package/dist/npm/svelte.js +2 -3
- package/dist/npm/types/core/auth.d.ts +14 -0
- package/dist/npm/vue.js +2 -3
- package/package.json +8 -8
- package/dist/npm/chunks/Composer-D1wbmdjF.js +0 -681
- package/dist/npm/chunks/Guest-CtyRy8Kz.js +0 -170
- package/dist/npm/chunks/uploads-tpLjiJdH.js +0 -541
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { n as e } from "./rolldown-runtime-
|
|
2
|
-
import { i as t, p as n } from "./client-
|
|
3
|
-
import { a as r, i, n as a, r as o, t as s } from "./anchor-
|
|
4
|
-
import { _ as c, a as l, c as u, f as d, g as f, h as p, i as m, l as h, m as g, n as _, o as v, p as y, s as b, u as x, v as S } from "./i18n-
|
|
5
|
-
import { n as C, t as w } from "./drafts-
|
|
6
|
-
|
|
1
|
+
import { n as e } from "./rolldown-runtime-QGRDbDUS.js";
|
|
2
|
+
import { i as t, p as n } from "./client-EFTWxHbJ.js";
|
|
3
|
+
import { a as r, i, n as a, r as o, t as s } from "./anchor-BsradQhn.js";
|
|
4
|
+
import { _ as c, a as l, c as u, f as d, g as f, h as p, i as m, l as h, m as g, n as _, o as v, p as y, s as b, u as x, v as S } from "./i18n-C4v0M-6z.js";
|
|
5
|
+
import { n as C, t as w } from "./drafts-akdBsOd0.js";
|
|
6
|
+
// src/capture/diagnostics.ts
|
|
7
7
|
var T = 20, E = /token|key|secret|passw|^pass$|auth|code|session|sig|credential|^x-amz-|ck_invite/i, D = /[\w.%+-]{1,64}@[A-Za-z0-9-]{1,63}(?:\.[A-Za-z0-9-]{1,63}){0,8}\.[A-Za-z]{2,24}/g, O = 1e3, k = [], A = [], j = !1, M = "";
|
|
8
8
|
function N(e) {
|
|
9
9
|
if (j) return () => void 0;
|
|
@@ -15,18 +15,18 @@ function N(e) {
|
|
|
15
15
|
console[e] = (...t) => {
|
|
16
16
|
I(k, {
|
|
17
17
|
level: e,
|
|
18
|
-
message:
|
|
18
|
+
message: R(t.map(ne).join(" ")),
|
|
19
19
|
at: (/* @__PURE__ */ new Date()).toISOString()
|
|
20
20
|
}), n.apply(console, t);
|
|
21
21
|
}, t.push(() => console[e] = n);
|
|
22
22
|
}
|
|
23
23
|
let e = (e) => I(k, {
|
|
24
24
|
level: "error",
|
|
25
|
-
message:
|
|
25
|
+
message: R(e.message || String(e.error)),
|
|
26
26
|
at: (/* @__PURE__ */ new Date()).toISOString()
|
|
27
27
|
}), n = (e) => I(k, {
|
|
28
28
|
level: "error",
|
|
29
|
-
message:
|
|
29
|
+
message: R(`Unhandled promise rejection: ${ne(e.reason)}`),
|
|
30
30
|
at: (/* @__PURE__ */ new Date()).toISOString()
|
|
31
31
|
});
|
|
32
32
|
addEventListener("error", e), addEventListener("unhandledrejection", n), t.push(() => removeEventListener("error", e), () => removeEventListener("unhandledrejection", n));
|
|
@@ -75,7 +75,7 @@ function F(e, t, n, r) {
|
|
|
75
75
|
} catch {}
|
|
76
76
|
I(A, {
|
|
77
77
|
method: e.slice(0, 10),
|
|
78
|
-
url:
|
|
78
|
+
url: ee(t).slice(0, 2e3),
|
|
79
79
|
status: n,
|
|
80
80
|
duration_ms: Math.round(performance.now() - r)
|
|
81
81
|
});
|
|
@@ -91,7 +91,7 @@ function L(e) {
|
|
|
91
91
|
for (let r of t.values()) n -= r / e.length * Math.log2(r / e.length);
|
|
92
92
|
return n >= 3.5;
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function ee(e) {
|
|
95
95
|
try {
|
|
96
96
|
let t = new URL(e, location.href);
|
|
97
97
|
t.username = "", t.password = "";
|
|
@@ -101,13 +101,13 @@ function R(e) {
|
|
|
101
101
|
return "[unparseable url]";
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
function
|
|
105
|
-
return e.replace(/Bearer\s+[A-Za-z0-9._~+/-]+=*/gi, "Bearer [redacted]").replace(/eyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+/g, "[redacted-jwt]").replace(/https?:\/\/[^\s"'<>]+/g, (e) =>
|
|
104
|
+
function te(e) {
|
|
105
|
+
return e.replace(/Bearer\s+[A-Za-z0-9._~+/-]+=*/gi, "Bearer [redacted]").replace(/eyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+/g, "[redacted-jwt]").replace(/https?:\/\/[^\s"'<>]+/g, (e) => ee(e)).replace(/\b((?:[\w-]*[_-])?(?:token|secret|password|passwd|pwd|api[_-]?key|access[_-]?key|private[_-]?key|session[_-]?id|signature|authorization|auth[_-]?code))(["']?\s*[:=]\s*["']?)(?!\[redacted)[^\s"'&,;]+/gi, "$1$2[redacted]").replace(/[\w~+=-]{24,}/g, (e) => L(e) ? "[redacted]" : e);
|
|
106
106
|
}
|
|
107
|
-
function
|
|
108
|
-
return
|
|
107
|
+
function R(e) {
|
|
108
|
+
return te(e.slice(0, O)).replace(D, "[email]").slice(0, O);
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function ne(e) {
|
|
111
111
|
if (e instanceof Error) return `${e.name}: ${e.message}`;
|
|
112
112
|
if (typeof e == "string") return e;
|
|
113
113
|
try {
|
|
@@ -116,93 +116,92 @@ function te(e) {
|
|
|
116
116
|
return String(e);
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
function ne(e, t) {
|
|
119
|
+
// src/ui/format.tsx
|
|
120
|
+
function re(e, t) {
|
|
122
121
|
return !!t && e.id !== null && e.id === t.person.id && e.type === t.person.type;
|
|
123
122
|
}
|
|
124
|
-
function
|
|
123
|
+
function ie(e, t = innerWidth) {
|
|
125
124
|
return !!e.breakpoint && Math.abs(e.breakpoint - t) > 200;
|
|
126
125
|
}
|
|
127
|
-
var
|
|
128
|
-
left:
|
|
129
|
-
top:
|
|
130
|
-
...n === void 0 ? {} : { width:
|
|
131
|
-
...r === void 0 ? {} : { height:
|
|
126
|
+
var ae = (e) => e < 600 ? "phone" : e < 1024 ? "tablet" : "wide", z = (e) => `${Math.round(e * 100) / 100}px`, B = (e, t, n, r) => ({
|
|
127
|
+
left: z(e),
|
|
128
|
+
top: z(t),
|
|
129
|
+
...n === void 0 ? {} : { width: z(n) },
|
|
130
|
+
...r === void 0 ? {} : { height: z(r) }
|
|
132
131
|
});
|
|
133
|
-
function
|
|
134
|
-
let n =
|
|
135
|
-
for (let t of e.matchAll(
|
|
132
|
+
function V({ text: e, people: t = [] }) {
|
|
133
|
+
let n = fe(t), r = [], i = 0;
|
|
134
|
+
for (let t of e.matchAll(H)) {
|
|
136
135
|
let a = t.index ?? 0;
|
|
137
|
-
a > i && r.push(
|
|
136
|
+
a > i && r.push(U(e.slice(i, a), n)), r.push(/* @__PURE__ */ h("pre", {
|
|
138
137
|
class: "ck-pre",
|
|
139
|
-
children: /* @__PURE__ */ h("code", { children: t[
|
|
138
|
+
children: /* @__PURE__ */ h("code", { children: t[2].replace(/^\n|\n$/g, "") })
|
|
140
139
|
})), i = a + t[0].length;
|
|
141
140
|
}
|
|
142
|
-
return i < e.length && r.push(
|
|
141
|
+
return i < e.length && r.push(U(e.slice(i), n)), /* @__PURE__ */ h(c, { children: r });
|
|
143
142
|
}
|
|
144
|
-
var
|
|
145
|
-
function
|
|
143
|
+
var H = /```([\w-]*)\n?([\s\S]*?)```/g;
|
|
144
|
+
function U(e, t) {
|
|
146
145
|
let n = e.replace(/^\n/, "").split("\n");
|
|
147
|
-
return n.map((e, r) => /* @__PURE__ */ h(
|
|
146
|
+
return n.map((e, r) => /* @__PURE__ */ h(c, { children: [q(e, t), r < n.length - 1 ? /* @__PURE__ */ h("br", {}) : null] }));
|
|
148
147
|
}
|
|
149
|
-
var
|
|
150
|
-
function
|
|
151
|
-
|
|
148
|
+
var W = null;
|
|
149
|
+
function G(e) {
|
|
150
|
+
W = e;
|
|
152
151
|
}
|
|
153
152
|
function oe(e) {
|
|
154
153
|
return [...e.includes("") ? e : e.replace(/\ufe0f/g, "")].map((e) => e.codePointAt(0).toString(16)).join("-");
|
|
155
154
|
}
|
|
156
155
|
function se({ char: e }) {
|
|
157
156
|
let [t, n] = g(!1);
|
|
158
|
-
return !
|
|
157
|
+
return !W || t ? /* @__PURE__ */ h(c, { children: e }) : /* @__PURE__ */ h("img", {
|
|
159
158
|
class: "ck-emoji",
|
|
160
|
-
src: `${
|
|
159
|
+
src: `${W}/emoji/${oe(e)}.svg`,
|
|
161
160
|
alt: e,
|
|
162
161
|
draggable: !1,
|
|
163
162
|
loading: "lazy",
|
|
164
163
|
onError: () => n(!0)
|
|
165
164
|
});
|
|
166
165
|
}
|
|
167
|
-
var ce = String.raw`\p{Extended_Pictographic}(?:\ufe0f|\p{Emoji_Modifier}|\u200d\p{Extended_Pictographic}\ufe0f?)*`, le = String.raw`\*\*[^*\n]+\*\*|~~[^~\n]+~~|\x60[^\x60\n]+\x60|\*[^*\s][^*\n]*\*|(?:^|[\s(\[])_[^_\n]+_(?![\p{L}\p{N}_])
|
|
168
|
-
function
|
|
166
|
+
var ce = String.raw`\p{Extended_Pictographic}(?:\ufe0f|\p{Emoji_Modifier}|\u200d\p{Extended_Pictographic}\ufe0f?)*`, le = String.raw`\*\*[^*\n]+\*\*|~~[^~\n]+~~|\x60[^\x60\n]+\x60|\*[^*\s][^*\n]*\*|(?:^|[\s(\[])_[^_\n]+_(?![\p{L}\p{N}_])`, ue = String.raw`https?:\/\/[^\s<>"')\u200b-\u200f\u202a-\u202e\u2060-\u2069\ufeff]+`, de = `${le}|${ue}`, K = /* @__PURE__ */ new Map();
|
|
167
|
+
function fe(e) {
|
|
169
168
|
let t = e.join("\0"), n = K.get(t);
|
|
170
169
|
if (!n) {
|
|
171
170
|
let r = [...e].filter(Boolean).sort((e, t) => t.length - e.length).map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")), i = `(?:^|[\\s(\\[])@(?:${r.length ? `${r.join("|")}|` : ""}[\\p{L}\\p{N}._-]+)`;
|
|
172
|
-
n = RegExp(`${
|
|
171
|
+
n = RegExp(`${de}|${i}|${ce}`, "gu"), K.set(t, n);
|
|
173
172
|
}
|
|
174
173
|
return n;
|
|
175
174
|
}
|
|
176
|
-
function
|
|
175
|
+
function pe(e, t) {
|
|
177
176
|
let n = /* @__PURE__ */ new Set(), r = [...new Set(t)].filter(Boolean).sort((e, t) => t.length - e.length);
|
|
178
177
|
if (!r.length) return n;
|
|
179
178
|
let i = r.map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")), a = RegExp(`(?:^|[\\s(\\[])@(${i.join("|")})(?![\\p{L}\\p{N}_-])`, "gu");
|
|
180
179
|
for (let t of e.matchAll(a)) n.add(t[1]);
|
|
181
180
|
return n;
|
|
182
181
|
}
|
|
183
|
-
function
|
|
182
|
+
function q(e, t) {
|
|
184
183
|
let n = [], r = 0;
|
|
185
184
|
for (let i of e.matchAll(t)) {
|
|
186
|
-
let
|
|
187
|
-
if (/^[\s(\[]/.test(
|
|
188
|
-
else if (
|
|
189
|
-
else if (
|
|
190
|
-
else if (
|
|
191
|
-
else if (
|
|
185
|
+
let a = i[0], o = i.index ?? 0;
|
|
186
|
+
if (/^[\s(\[]/.test(a) && /[_@]/.test(a[1] ?? "") && (o += 1, a = a.slice(1)), o > r && n.push(e.slice(r, o)), a.startsWith("**")) n.push(/* @__PURE__ */ h("strong", { children: q(a.slice(2, -2), t) }));
|
|
187
|
+
else if (a.startsWith("~~")) n.push(/* @__PURE__ */ h("s", { children: q(a.slice(2, -2), t) }));
|
|
188
|
+
else if (a.startsWith("`")) n.push(/* @__PURE__ */ h("code", { children: a.slice(1, -1) }));
|
|
189
|
+
else if (a.startsWith("*") || a.startsWith("_")) n.push(/* @__PURE__ */ h("em", { children: q(a.slice(1, -1), t) }));
|
|
190
|
+
else if (a.startsWith("@")) n.push(/* @__PURE__ */ h("span", {
|
|
192
191
|
class: "ck-mention",
|
|
193
|
-
children: /* @__PURE__ */ h("bdi", { children:
|
|
192
|
+
children: /* @__PURE__ */ h("bdi", { children: a })
|
|
194
193
|
}));
|
|
195
|
-
else if (/^\p{Extended_Pictographic}/u.test(
|
|
194
|
+
else if (/^\p{Extended_Pictographic}/u.test(a)) n.push(/* @__PURE__ */ h(se, { char: a }));
|
|
196
195
|
else {
|
|
197
|
-
let e = J(
|
|
196
|
+
let e = J(a);
|
|
198
197
|
n.push(e ? /* @__PURE__ */ h("a", {
|
|
199
198
|
href: e,
|
|
200
199
|
target: "_blank",
|
|
201
200
|
rel: "noopener noreferrer nofollow ugc",
|
|
202
|
-
children:
|
|
203
|
-
}) :
|
|
201
|
+
children: a
|
|
202
|
+
}) : a);
|
|
204
203
|
}
|
|
205
|
-
r =
|
|
204
|
+
r = o + a.length;
|
|
206
205
|
}
|
|
207
206
|
return r < e.length && n.push(e.slice(r)), n;
|
|
208
207
|
}
|
|
@@ -279,10 +278,10 @@ function Z({ name: e, size: t = 18 }) {
|
|
|
279
278
|
}[e] })
|
|
280
279
|
});
|
|
281
280
|
}
|
|
282
|
-
function
|
|
281
|
+
function me(e) {
|
|
283
282
|
e?.focus({ preventScroll: !0 });
|
|
284
283
|
}
|
|
285
|
-
function
|
|
284
|
+
function he(e) {
|
|
286
285
|
if (!e) return;
|
|
287
286
|
let t = e.getBoundingClientRect(), n = e.parentElement?.closest(".ck-panel, .ck-card")?.getBoundingClientRect() ?? {
|
|
288
287
|
left: 0,
|
|
@@ -290,8 +289,7 @@ function pe(e) {
|
|
|
290
289
|
}, r = Math.min(0, n.right - 8 - t.right);
|
|
291
290
|
t.left + r < n.left + 8 && (r = n.left + 8 - t.left), r && (e.style.translate = `${Math.round(r)}px 0`);
|
|
292
291
|
}
|
|
293
|
-
|
|
294
|
-
//#region src/ui/errors.ts
|
|
292
|
+
// src/ui/errors.ts
|
|
295
293
|
var Q = {
|
|
296
294
|
network_error: "networkError",
|
|
297
295
|
upload_failed: "uploadFailed",
|
|
@@ -308,26 +306,24 @@ var Q = {
|
|
|
308
306
|
rate_limited: "tooFast",
|
|
309
307
|
edit_conflict: "editConflict",
|
|
310
308
|
internal_error: "serverError"
|
|
311
|
-
},
|
|
312
|
-
function
|
|
309
|
+
}, ge = /* @__PURE__ */ new Set(["file_rejected", "thread_not_found"]);
|
|
310
|
+
function _e(e) {
|
|
313
311
|
if (!(e instanceof n)) return b("errorGeneric");
|
|
314
|
-
if (
|
|
312
|
+
if (ge.has(e.code)) return e.message;
|
|
315
313
|
let t = Q[e.code] ?? (e.status === 410 ? "shareExpired" : e.status === 429 ? "tooFast" : null);
|
|
316
314
|
return t ? b(t) : _() === "en" && e.status >= 400 && e.message ? e.message : b("errorGeneric");
|
|
317
315
|
}
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
function _e(e, n) {
|
|
316
|
+
// src/ui/draft-key.ts
|
|
317
|
+
var ve = "commentkit:pending-compose";
|
|
318
|
+
function ye(e, n) {
|
|
322
319
|
return C(e.options.project, t(), n.type, n.selector, n.ck_id, n.source, n.quote);
|
|
323
320
|
}
|
|
324
|
-
|
|
325
|
-
//#region src/ui/hooks.ts
|
|
321
|
+
// src/ui/hooks.ts
|
|
326
322
|
function $(e, t) {
|
|
327
323
|
let [n, r] = g(() => t(e.get()));
|
|
328
324
|
return x(() => (r(t(e.get())), e.subscribe((e) => r(() => t(e)))), [e]), n;
|
|
329
325
|
}
|
|
330
|
-
function
|
|
326
|
+
function be(e) {
|
|
331
327
|
let [, t] = g(0), [n] = g(() => ({
|
|
332
328
|
version: 0,
|
|
333
329
|
watch: () => void 0
|
|
@@ -380,7 +376,7 @@ function ve(e) {
|
|
|
380
376
|
};
|
|
381
377
|
}, [e]), n;
|
|
382
378
|
}
|
|
383
|
-
function
|
|
379
|
+
function xe() {
|
|
384
380
|
let [e, t] = g(() => typeof navigator > "u" || navigator.onLine !== !1);
|
|
385
381
|
return x(() => {
|
|
386
382
|
let e = () => t(!0), n = () => t(!1);
|
|
@@ -389,7 +385,7 @@ function ye() {
|
|
|
389
385
|
};
|
|
390
386
|
}, []), e;
|
|
391
387
|
}
|
|
392
|
-
function
|
|
388
|
+
function Se(e, t, n = !1) {
|
|
393
389
|
let r = !n && getComputedStyle(e.currentTarget).direction === "rtl", i = n ? [
|
|
394
390
|
"ArrowDown",
|
|
395
391
|
"j",
|
|
@@ -406,16 +402,15 @@ function be(e, t, n = !1) {
|
|
|
406
402
|
let l = c.indexOf(s.getRootNode().activeElement);
|
|
407
403
|
c[o === "first" ? 0 : o === "last" ? c.length - 1 : (Math.max(l, o > 0 ? -1 : 0) + o + c.length) % c.length]?.focus();
|
|
408
404
|
}
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
Se = e, e && xe.forEach((t) => Te(e, t));
|
|
405
|
+
// src/ui/sheet.ts
|
|
406
|
+
var Ce = [], we = null;
|
|
407
|
+
function Te(e) {
|
|
408
|
+
we = e, e && Ce.forEach((t) => De(e, t));
|
|
414
409
|
}
|
|
415
|
-
function
|
|
416
|
-
|
|
410
|
+
function Ee(e) {
|
|
411
|
+
Ce.includes(e) || (Ce.push(e), we && De(we, e));
|
|
417
412
|
}
|
|
418
|
-
function
|
|
413
|
+
function De(e, t) {
|
|
419
414
|
if ("adoptedStyleSheets" in e && "replaceSync" in CSSStyleSheet.prototype) {
|
|
420
415
|
let n = new CSSStyleSheet();
|
|
421
416
|
n.replaceSync(t), e.adoptedStyleSheets = [...e.adoptedStyleSheets, n];
|
|
@@ -424,14 +419,13 @@ function Te(e, t) {
|
|
|
424
419
|
n.textContent = t, e.insertBefore(n, e.querySelector(".ck-root"));
|
|
425
420
|
}
|
|
426
421
|
}
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
let v = $(e.state, (e) => e.config?.read_only ?? !1), y = $(e.state, (e) => e.session), x = $(e.state, (e) => e.unread), [C, w] = g(!1), [T, E] = g(null), D = d(null), O = d(null);
|
|
422
|
+
// src/ui/Launcher.tsx
|
|
423
|
+
function Oe({ client: e, position: t, onMove: n, commenting: r, panelOpen: i, onComment: a, onPanel: o, onSignIn: s, onSignOut: l, onShortcuts: u, onHide: f, onSettings: p, waiting: m, onCode: _, covered: v }) {
|
|
424
|
+
let y = $(e.state, (e) => e.config?.read_only ?? !1), x = $(e.state, (e) => e.session), S = $(e.state, (e) => e.unread), [C, w] = g(!1), [T, E] = g(null), D = d(null), O = d(null);
|
|
431
425
|
return /* @__PURE__ */ h("div", {
|
|
432
426
|
class: "ck-launcher",
|
|
433
427
|
"data-pos": t,
|
|
434
|
-
"data-covered":
|
|
428
|
+
"data-covered": v,
|
|
435
429
|
"data-dragging": T ? "true" : void 0,
|
|
436
430
|
"data-commentkit-ui": !0,
|
|
437
431
|
style: T ? {
|
|
@@ -442,19 +436,19 @@ function Ee({ client: e, position: t, onMove: n, commenting: r, panelOpen: i, on
|
|
|
442
436
|
transform: "none"
|
|
443
437
|
} : void 0,
|
|
444
438
|
children: [
|
|
445
|
-
C ? null :
|
|
439
|
+
C ? null : m ? /* @__PURE__ */ h("div", {
|
|
446
440
|
class: "ck-note ck-launcher-note",
|
|
447
441
|
role: "status",
|
|
448
442
|
children: [
|
|
449
|
-
b("pendingNote", { email:
|
|
443
|
+
b("pendingNote", { email: m }),
|
|
450
444
|
" ",
|
|
451
445
|
/* @__PURE__ */ h("button", {
|
|
452
446
|
class: "ck-btn",
|
|
453
|
-
onClick:
|
|
447
|
+
onClick: _,
|
|
454
448
|
children: b("enterCode")
|
|
455
449
|
})
|
|
456
450
|
]
|
|
457
|
-
}) :
|
|
451
|
+
}) : y ? /* @__PURE__ */ h("div", {
|
|
458
452
|
class: "ck-note ck-launcher-note",
|
|
459
453
|
role: "status",
|
|
460
454
|
children: b("readOnlyShort")
|
|
@@ -470,21 +464,21 @@ function Ee({ client: e, position: t, onMove: n, commenting: r, panelOpen: i, on
|
|
|
470
464
|
"aria-pressed": r,
|
|
471
465
|
onClick: a,
|
|
472
466
|
title: b("commentHint"),
|
|
473
|
-
"aria-keyshortcuts":
|
|
467
|
+
"aria-keyshortcuts": u ? "C" : void 0,
|
|
474
468
|
children: [/* @__PURE__ */ h(Z, { name: "comment" }), /* @__PURE__ */ h("span", {
|
|
475
469
|
class: "ck-label",
|
|
476
470
|
children: b("comment")
|
|
477
471
|
})]
|
|
478
472
|
}),
|
|
479
|
-
|
|
473
|
+
x ? /* @__PURE__ */ h("button", {
|
|
480
474
|
class: "ck-bar-btn ck-icon-btn",
|
|
481
475
|
"aria-pressed": i,
|
|
482
476
|
onClick: o,
|
|
483
477
|
title: b("inbox"),
|
|
484
|
-
"aria-label": `${b("inbox")}${
|
|
485
|
-
children: [/* @__PURE__ */ h(Z, { name: "inbox" }),
|
|
478
|
+
"aria-label": `${b("inbox")}${S ? ` (${S})` : ""}`,
|
|
479
|
+
children: [/* @__PURE__ */ h(Z, { name: "inbox" }), S > 0 ? /* @__PURE__ */ h("span", {
|
|
486
480
|
class: "ck-badge",
|
|
487
|
-
children:
|
|
481
|
+
children: S > 99 ? "99+" : S
|
|
488
482
|
}) : null]
|
|
489
483
|
}) : null,
|
|
490
484
|
/* @__PURE__ */ h("button", {
|
|
@@ -518,11 +512,11 @@ function Ee({ client: e, position: t, onMove: n, commenting: r, panelOpen: i, on
|
|
|
518
512
|
onPointerUp: (e) => {
|
|
519
513
|
let t = D.current;
|
|
520
514
|
if (D.current = null, !t || !T) return E(null);
|
|
521
|
-
E(null), n(
|
|
515
|
+
E(null), n(ke(e.clientX, e.clientY));
|
|
522
516
|
},
|
|
523
517
|
onPointerCancel: () => (D.current = null, E(null)),
|
|
524
518
|
onKeyDown: (e) => {
|
|
525
|
-
let r =
|
|
519
|
+
let r = Ae(t, e.key);
|
|
526
520
|
r && (e.preventDefault(), n(r));
|
|
527
521
|
},
|
|
528
522
|
children: /* @__PURE__ */ h("svg", {
|
|
@@ -570,25 +564,25 @@ function Ee({ client: e, position: t, onMove: n, commenting: r, panelOpen: i, on
|
|
|
570
564
|
class: "ck-menu",
|
|
571
565
|
role: "menu",
|
|
572
566
|
onClick: () => w(!1),
|
|
573
|
-
onKeyDown: (e) => e.key === "Escape" ? (e.stopPropagation(), w(!1)) :
|
|
567
|
+
onKeyDown: (e) => e.key === "Escape" ? (e.stopPropagation(), w(!1)) : Se(e, "[role=menuitem]", !0),
|
|
574
568
|
children: [
|
|
575
|
-
|
|
569
|
+
x ? /* @__PURE__ */ h(c, { children: [
|
|
576
570
|
/* @__PURE__ */ h("div", {
|
|
577
571
|
class: "ck-menu-head",
|
|
578
572
|
children: [
|
|
579
|
-
/* @__PURE__ */ h("bdi", { children:
|
|
573
|
+
/* @__PURE__ */ h("bdi", { children: x.person.name }),
|
|
580
574
|
" · ",
|
|
581
|
-
/* @__PURE__ */ h("bdi", { children:
|
|
575
|
+
/* @__PURE__ */ h("bdi", { children: x.project.name })
|
|
582
576
|
]
|
|
583
577
|
}),
|
|
584
578
|
/* @__PURE__ */ h("button", {
|
|
585
579
|
role: "menuitem",
|
|
586
|
-
onClick:
|
|
580
|
+
onClick: p,
|
|
587
581
|
children: b("settings")
|
|
588
582
|
}),
|
|
589
583
|
/* @__PURE__ */ h("button", {
|
|
590
584
|
role: "menuitem",
|
|
591
|
-
onClick:
|
|
585
|
+
onClick: l,
|
|
592
586
|
children: b("signOut")
|
|
593
587
|
})
|
|
594
588
|
] }) : /* @__PURE__ */ h("button", {
|
|
@@ -596,17 +590,17 @@ function Ee({ client: e, position: t, onMove: n, commenting: r, panelOpen: i, on
|
|
|
596
590
|
onClick: s,
|
|
597
591
|
children: b("signInMember")
|
|
598
592
|
}),
|
|
599
|
-
|
|
593
|
+
u ? /* @__PURE__ */ h("button", {
|
|
600
594
|
role: "menuitem",
|
|
601
595
|
"aria-keyshortcuts": "?",
|
|
602
|
-
onClick:
|
|
596
|
+
onClick: u,
|
|
603
597
|
children: b("shortcutsTitle")
|
|
604
598
|
}) : null,
|
|
605
599
|
/* @__PURE__ */ h("button", {
|
|
606
600
|
role: "menuitem",
|
|
607
601
|
class: "ck-menu-two",
|
|
608
602
|
"aria-keyshortcuts": "Meta+Shift+K",
|
|
609
|
-
onClick:
|
|
603
|
+
onClick: f,
|
|
610
604
|
children: [b("hideWidget"), /* @__PURE__ */ h("span", {
|
|
611
605
|
class: "ck-muted",
|
|
612
606
|
children: b("hideWidgetHint", { keys: /Mac|iPhone|iPad/.test(navigator.platform || navigator.userAgent) ? "⌘ Shift K" : "Ctrl Shift K" })
|
|
@@ -617,10 +611,10 @@ function Ee({ client: e, position: t, onMove: n, commenting: r, panelOpen: i, on
|
|
|
617
611
|
]
|
|
618
612
|
});
|
|
619
613
|
}
|
|
620
|
-
function
|
|
614
|
+
function ke(e, t) {
|
|
621
615
|
return `${t < innerHeight / 2 ? "top" : "bottom"}-${e < innerWidth / 3 ? "left" : e > innerWidth * 2 / 3 ? "right" : "center"}`;
|
|
622
616
|
}
|
|
623
|
-
function
|
|
617
|
+
function Ae(e, t) {
|
|
624
618
|
let [n, r] = e.split("-"), i = [
|
|
625
619
|
"left",
|
|
626
620
|
"center",
|
|
@@ -628,21 +622,21 @@ function Oe(e, t) {
|
|
|
628
622
|
], a = i.indexOf(r);
|
|
629
623
|
return t === "ArrowLeft" && a > 0 ? `${n}-${i[a - 1]}` : t === "ArrowRight" && a < 2 ? `${n}-${i[a + 1]}` : t === "ArrowUp" && n === "bottom" ? `top-${r}` : t === "ArrowDown" && n === "top" ? `bottom-${r}` : null;
|
|
630
624
|
}
|
|
631
|
-
function
|
|
625
|
+
function je({ onCancel: e, onPick: t, quote: n = !0 }) {
|
|
632
626
|
let [r] = g(() => {
|
|
633
627
|
let e = document.activeElement;
|
|
634
628
|
return e && e !== document.body && e !== document.documentElement && !o(e) ? e : null;
|
|
635
|
-
}), a =
|
|
629
|
+
}), a = p(() => matchMedia("(pointer: coarse)").matches, []), [l, u] = g(null), f = d(null);
|
|
636
630
|
x(() => {
|
|
637
631
|
let e = !0;
|
|
638
|
-
return import("./pick-
|
|
632
|
+
return import("./pick-CLyOdjnD.js").then((r) => {
|
|
639
633
|
if (!e) return;
|
|
640
|
-
|
|
634
|
+
f.current = r, r.prepare();
|
|
641
635
|
let a = n ? r.selected() : null, o = a?.toString().trim();
|
|
642
636
|
if (a && o) {
|
|
643
637
|
let e = i(a.startContainer, a.getBoundingClientRect()), n = a.commonAncestorContainer.nodeType === 1 ? a.commonAncestorContainer : a.commonAncestorContainer.parentElement;
|
|
644
638
|
t({
|
|
645
|
-
anchor:
|
|
639
|
+
anchor: m({
|
|
646
640
|
element: n,
|
|
647
641
|
clientX: e.left,
|
|
648
642
|
clientY: e.top,
|
|
@@ -662,10 +656,10 @@ function ke({ onCancel: e, onPick: t, quote: n = !0 }) {
|
|
|
662
656
|
}
|
|
663
657
|
}, () => {}), () => void (e = !1);
|
|
664
658
|
}, []);
|
|
665
|
-
let
|
|
659
|
+
let m = (e) => s({
|
|
666
660
|
...e,
|
|
667
|
-
extra:
|
|
668
|
-
}), [
|
|
661
|
+
extra: f.current?.extra
|
|
662
|
+
}), [_, v] = g(null), y = d(null), S = d(null), [C, w] = g([]), T = d(null), E = d(null);
|
|
669
663
|
x(() => E.current?.focus({ preventScroll: !0 }), []);
|
|
670
664
|
let D = d(null), O = d({
|
|
671
665
|
timer: null,
|
|
@@ -677,7 +671,7 @@ function ke({ onCancel: e, onPick: t, quote: n = !0 }) {
|
|
|
677
671
|
let A = (e, t) => {
|
|
678
672
|
let n = T.current;
|
|
679
673
|
if (!n) return null;
|
|
680
|
-
let r =
|
|
674
|
+
let r = f.current;
|
|
681
675
|
n.style.pointerEvents = "none";
|
|
682
676
|
let i = r ? r.deepAt(e, t) : document.elementsFromPoint(e, t).find((e) => !o(e) && e !== document.documentElement && e !== document.body) ?? document.body;
|
|
683
677
|
return n.style.pointerEvents = "auto", r ? r.paintedAt(i, (n) => {
|
|
@@ -687,7 +681,7 @@ function ke({ onCancel: e, onPick: t, quote: n = !0 }) {
|
|
|
687
681
|
}, j = (e) => {
|
|
688
682
|
let n = i(e), r = n.left + Math.min(n.width / 2, 24), a = n.top + Math.min(n.height / 2, 24);
|
|
689
683
|
t({
|
|
690
|
-
anchor:
|
|
684
|
+
anchor: m({
|
|
691
685
|
element: e,
|
|
692
686
|
clientX: r,
|
|
693
687
|
clientY: a
|
|
@@ -714,7 +708,7 @@ function ke({ onCancel: e, onPick: t, quote: n = !0 }) {
|
|
|
714
708
|
region: null
|
|
715
709
|
});
|
|
716
710
|
}, N = (e, t) => {
|
|
717
|
-
let n = T.current, r =
|
|
711
|
+
let n = T.current, r = f.current;
|
|
718
712
|
if (!n || !r) return null;
|
|
719
713
|
n.style.pointerEvents = "none";
|
|
720
714
|
try {
|
|
@@ -728,7 +722,7 @@ function ke({ onCancel: e, onPick: t, quote: n = !0 }) {
|
|
|
728
722
|
t.key === "Escape" ? e() : t.key === "Enter" && !t.composedPath().some((e) => e instanceof HTMLButtonElement) && (t.preventDefault(), r ? j(r) : M());
|
|
729
723
|
};
|
|
730
724
|
return addEventListener("keydown", t), () => removeEventListener("keydown", t);
|
|
731
|
-
}, [e]), /* @__PURE__ */ h(
|
|
725
|
+
}, [e]), /* @__PURE__ */ h(c, { children: [
|
|
732
726
|
/* @__PURE__ */ h("div", {
|
|
733
727
|
class: "ck-mode-frame",
|
|
734
728
|
"aria-hidden": "true",
|
|
@@ -768,16 +762,16 @@ function ke({ onCancel: e, onPick: t, quote: n = !0 }) {
|
|
|
768
762
|
t && (Math.abs(e.clientX - t.x) > 8 || Math.abs(e.clientY - t.y) > 8) && k();
|
|
769
763
|
return;
|
|
770
764
|
}
|
|
771
|
-
if (D.current &&
|
|
765
|
+
if (D.current && y.current) {
|
|
772
766
|
let t = N(e.clientX, e.clientY);
|
|
773
767
|
if (!t) return;
|
|
774
|
-
let n =
|
|
768
|
+
let n = f.current, r = n.between(y.current, t);
|
|
775
769
|
if (!r) return;
|
|
776
|
-
|
|
770
|
+
S.current = r, w(n.boxesOf(r).filter((e) => e.width > 0 && e.height > 0).slice(0, 200));
|
|
777
771
|
return;
|
|
778
772
|
}
|
|
779
773
|
if (D.current) {
|
|
780
|
-
|
|
774
|
+
v({
|
|
781
775
|
x: D.current.x,
|
|
782
776
|
y: D.current.y,
|
|
783
777
|
x2: e.clientX,
|
|
@@ -786,7 +780,7 @@ function ke({ onCancel: e, onPick: t, quote: n = !0 }) {
|
|
|
786
780
|
return;
|
|
787
781
|
}
|
|
788
782
|
let t = A(e.clientX, e.clientY);
|
|
789
|
-
|
|
783
|
+
u(t ? i(t) : null);
|
|
790
784
|
},
|
|
791
785
|
onPointerDown: (e) => {
|
|
792
786
|
if (e.button !== 0) return;
|
|
@@ -796,14 +790,14 @@ function ke({ onCancel: e, onPick: t, quote: n = !0 }) {
|
|
|
796
790
|
x: e.clientX,
|
|
797
791
|
y: e.clientY,
|
|
798
792
|
target: r
|
|
799
|
-
}, O.current.fired = !1,
|
|
793
|
+
}, O.current.fired = !1, y.current = null, S.current = null, n && e.pointerType !== "touch" && !e.shiftKey) {
|
|
800
794
|
let t = N(e.clientX, e.clientY);
|
|
801
|
-
t &&
|
|
795
|
+
t && f.current.overText(e.clientX, e.clientY, t) && (y.current = t);
|
|
802
796
|
}
|
|
803
797
|
e.pointerType === "touch" && (k(), O.current.timer = setTimeout(() => {
|
|
804
798
|
let e = D.current;
|
|
805
|
-
O.current.timer = null, e && (O.current.fired = !0, D.current = null,
|
|
806
|
-
anchor:
|
|
799
|
+
O.current.timer = null, e && (O.current.fired = !0, D.current = null, Me(e.x, e.y), t({
|
|
800
|
+
anchor: m({
|
|
807
801
|
element: e.target,
|
|
808
802
|
clientX: e.x,
|
|
809
803
|
clientY: e.y
|
|
@@ -820,14 +814,14 @@ function ke({ onCancel: e, onPick: t, quote: n = !0 }) {
|
|
|
820
814
|
onPointerUp: (e) => {
|
|
821
815
|
k();
|
|
822
816
|
let n = D.current;
|
|
823
|
-
if (D.current = null,
|
|
824
|
-
let r =
|
|
825
|
-
|
|
817
|
+
if (D.current = null, v(null), w([]), !n) return;
|
|
818
|
+
let r = S.current;
|
|
819
|
+
y.current = null, S.current = null;
|
|
826
820
|
let a = r?.toString().trim();
|
|
827
821
|
if (r && a) {
|
|
828
822
|
let e = i(r.startContainer, r.getBoundingClientRect()), o = r.commonAncestorContainer.nodeType === 1 ? r.commonAncestorContainer : r.commonAncestorContainer.parentElement ?? n.target;
|
|
829
823
|
t({
|
|
830
|
-
anchor:
|
|
824
|
+
anchor: m({
|
|
831
825
|
element: o,
|
|
832
826
|
clientX: e.left,
|
|
833
827
|
clientY: e.top,
|
|
@@ -848,10 +842,10 @@ function ke({ onCancel: e, onPick: t, quote: n = !0 }) {
|
|
|
848
842
|
}
|
|
849
843
|
let o = Math.abs(e.clientX - n.x) > 8 || Math.abs(e.clientY - n.y) > 8;
|
|
850
844
|
if (e.pointerType === "touch" && o) return;
|
|
851
|
-
e.pointerType === "touch" &&
|
|
852
|
-
let s = e.pointerType !== "touch" && Math.abs(e.clientX - n.x) > 8 && Math.abs(e.clientY - n.y) > 8, c = s ?
|
|
845
|
+
e.pointerType === "touch" && Me(e.clientX, e.clientY);
|
|
846
|
+
let s = e.pointerType !== "touch" && Math.abs(e.clientX - n.x) > 8 && Math.abs(e.clientY - n.y) > 8, c = s ? Ne(n.target, A(e.clientX, e.clientY) ?? n.target) : n.target;
|
|
853
847
|
t({
|
|
854
|
-
anchor:
|
|
848
|
+
anchor: m({
|
|
855
849
|
element: c,
|
|
856
850
|
clientX: n.x,
|
|
857
851
|
clientY: n.y,
|
|
@@ -873,46 +867,45 @@ function ke({ onCancel: e, onPick: t, quote: n = !0 }) {
|
|
|
873
867
|
});
|
|
874
868
|
},
|
|
875
869
|
onPointerCancel: () => {
|
|
876
|
-
k(), D.current = null,
|
|
870
|
+
k(), D.current = null, v(null);
|
|
877
871
|
},
|
|
878
872
|
onContextMenu: (t) => {
|
|
879
|
-
t.preventDefault(),
|
|
873
|
+
t.preventDefault(), O.current.timer || O.current.fired || a || e();
|
|
880
874
|
}
|
|
881
875
|
}),
|
|
882
|
-
|
|
876
|
+
l && !_ && !C.length ? /* @__PURE__ */ h("div", {
|
|
883
877
|
class: "ck-outline",
|
|
884
|
-
style:
|
|
878
|
+
style: B(l.left - 2, l.top - 2, l.width + 4, l.height + 4)
|
|
885
879
|
}) : null,
|
|
886
880
|
C.map((e) => /* @__PURE__ */ h("div", {
|
|
887
881
|
class: "ck-text-box",
|
|
888
|
-
style:
|
|
882
|
+
style: B(e.left, e.top, e.width, e.height)
|
|
889
883
|
})),
|
|
890
|
-
|
|
884
|
+
_ && !y.current ? /* @__PURE__ */ h("div", {
|
|
891
885
|
class: "ck-region",
|
|
892
|
-
style:
|
|
886
|
+
style: B(Math.min(_.x, _.x2), Math.min(_.y, _.y2), Math.abs(_.x2 - _.x), Math.abs(_.y2 - _.y))
|
|
893
887
|
}) : null
|
|
894
888
|
] });
|
|
895
889
|
}
|
|
896
|
-
function
|
|
890
|
+
function Me(e, t) {
|
|
897
891
|
let n = (r) => {
|
|
898
892
|
Math.abs(r.clientX - e) > 24 || Math.abs(r.clientY - t) > 24 || (r.preventDefault(), r.stopPropagation(), removeEventListener("click", n, !0));
|
|
899
893
|
};
|
|
900
894
|
addEventListener("click", n, !0), setTimeout(() => removeEventListener("click", n, !0), 700);
|
|
901
895
|
}
|
|
902
|
-
function
|
|
896
|
+
function Ne(e, t) {
|
|
903
897
|
if (e.contains(t)) return e;
|
|
904
898
|
for (let n = t; n; n = n.parentElement) if (n.contains(e)) return n;
|
|
905
899
|
return document.body;
|
|
906
900
|
}
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
function Me(e, t, n) {
|
|
901
|
+
// src/ui/nav.ts
|
|
902
|
+
function Pe(e, t, n) {
|
|
910
903
|
let r = J(e);
|
|
911
|
-
if (!r || !/^https?:$/.test(new URL(r).protocol) ||
|
|
904
|
+
if (!r || !/^https?:$/.test(new URL(r).protocol) || Fe(r)) return n(t);
|
|
912
905
|
let i = new URL(r);
|
|
913
906
|
i.searchParams.set("ck_thread", t), location.assign(i.toString());
|
|
914
907
|
}
|
|
915
|
-
function
|
|
908
|
+
function Fe(e) {
|
|
916
909
|
try {
|
|
917
910
|
let n = new URL(e), r = new URL(t());
|
|
918
911
|
return n.origin === r.origin && n.pathname === r.pathname && n.search === r.search && (n.hash === r.hash || !n.hash.startsWith("#/"));
|
|
@@ -920,13 +913,12 @@ function Ne(e) {
|
|
|
920
913
|
return !1;
|
|
921
914
|
}
|
|
922
915
|
}
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
function Pe() {
|
|
916
|
+
// src/ui/placement.ts
|
|
917
|
+
function Ie() {
|
|
926
918
|
let e = /* @__PURE__ */ new Map();
|
|
927
919
|
return (t, n, o) => {
|
|
928
920
|
let s = e.get(t), c;
|
|
929
|
-
if (!s || s.a !== n || s.v !== o && !
|
|
921
|
+
if (!s || s.a !== n || s.v !== o && !Le(s)) {
|
|
930
922
|
c = r(n);
|
|
931
923
|
let i = c.state === "detached" ? null : c.element;
|
|
932
924
|
e.set(t, s = {
|
|
@@ -937,9 +929,9 @@ function Pe() {
|
|
|
937
929
|
},
|
|
938
930
|
fp: i && a(i),
|
|
939
931
|
v: o,
|
|
940
|
-
...
|
|
932
|
+
...Re(i)
|
|
941
933
|
});
|
|
942
|
-
} else s.v !== o && Object.assign(s, { v: o },
|
|
934
|
+
} else s.v !== o && Object.assign(s, { v: o }, Re(s.f.element));
|
|
943
935
|
if (!s.f) return null;
|
|
944
936
|
c ?? (c = r(n, document, s.f));
|
|
945
937
|
let l = c.point.x - scrollX, u = c.point.y - scrollY, d = s.clips.map((e) => {
|
|
@@ -957,11 +949,11 @@ function Pe() {
|
|
|
957
949
|
};
|
|
958
950
|
};
|
|
959
951
|
}
|
|
960
|
-
function
|
|
952
|
+
function Le(e) {
|
|
961
953
|
let t = e.f?.element;
|
|
962
954
|
return !!t?.isConnected && t.getClientRects().length > 0 && a(t) === e.fp;
|
|
963
955
|
}
|
|
964
|
-
function
|
|
956
|
+
function Re(e) {
|
|
965
957
|
let t = [], n = !1;
|
|
966
958
|
for (let r = e; r && r !== document.body;) {
|
|
967
959
|
let i = getComputedStyle(r);
|
|
@@ -974,13 +966,12 @@ function Ie(e) {
|
|
|
974
966
|
fixed: n
|
|
975
967
|
};
|
|
976
968
|
}
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
let c = $(e.state, (e) => e.threads), l = $(e.state, (e) => !!e.session?.capabilities.triage && !e.config?.read_only), u = ve(c.length > 0), [f] = g(Pe), [p] = g(() => /* @__PURE__ */ new Map()), m = d(null), _ = d(null), v = typeof matchMedia == "function" && matchMedia("(hover: hover)").matches, y = c.map((e) => ({
|
|
969
|
+
// src/ui/Pins.tsx
|
|
970
|
+
var ze = "M31.5 4.8C17.3 4.4 7 15.2 7 29c0 13 8.5 21.2 20.9 23 1.6.2 2.1 1.2 2.1 2.5v6.9c0 1.7 1.2 2.1 2.5.9 5.7-4.9 16-13.6 21.1-22.1 3.5-5.8 4.7-11.8 3.2-18.1C54.3 11.5 44.7 4.6 31.5 4.8Z", Be = 6;
|
|
971
|
+
function Ve({ client: e, activeId: t, onOpen: n, notify: r, onError: a }) {
|
|
972
|
+
let l = $(e.state, (e) => e.threads), u = $(e.state, (e) => !!e.session?.capabilities.triage && !e.config?.read_only), f = be(l.length > 0), [p] = g(Ie), [m] = g(() => /* @__PURE__ */ new Map()), _ = d(null), v = d(null), y = typeof matchMedia == "function" && matchMedia("(hover: hover)").matches, S = l.map((e) => ({
|
|
982
973
|
thread: e,
|
|
983
|
-
at:
|
|
974
|
+
at: p(e.id, e.anchor, f.version)
|
|
984
975
|
})), C = (e) => {
|
|
985
976
|
let t = e?.getBoundingClientRect() ?? {
|
|
986
977
|
left: -scrollX,
|
|
@@ -991,11 +982,11 @@ function ze({ client: e, activeId: t, onOpen: n, notify: r, onError: a }) {
|
|
|
991
982
|
x: (e - t.left) / (t.width / 100 || 1),
|
|
992
983
|
y: (n - t.top) / (t.width / 100 || 1)
|
|
993
984
|
});
|
|
994
|
-
}, w = C(
|
|
985
|
+
}, w = C(_.current), T = C(v.current), E = S.flatMap(({ thread: e, at: t }) => {
|
|
995
986
|
let n = e.anchor.quote;
|
|
996
987
|
if (!t || e.anchor.type !== "text" || !n) return [];
|
|
997
|
-
let r =
|
|
998
|
-
r?.[0] !==
|
|
988
|
+
let r = m.get(e.id);
|
|
989
|
+
r?.[0] !== f.version && m.set(e.id, r = [f.version, Ge(t.element, n)]);
|
|
999
990
|
let a = t.element.getBoundingClientRect(), o = i(t.element);
|
|
1000
991
|
return [...r[1]?.getClientRects() ?? []].map((e) => new DOMRect(e.x + o.x - a.x, e.y + o.y - a.y, e.width, e.height)).filter((e) => e.width > 0 && e.height > 0 && t.inView(e.left + e.width / 2, e.top + e.height / 2)).slice(0, 50).map((n) => ({
|
|
1001
992
|
id: e.id,
|
|
@@ -1006,8 +997,8 @@ function ze({ client: e, activeId: t, onOpen: n, notify: r, onError: a }) {
|
|
|
1006
997
|
h: n.height
|
|
1007
998
|
}));
|
|
1008
999
|
}), D = d(E);
|
|
1009
|
-
D.current = E, x(() =>
|
|
1010
|
-
if (!
|
|
1000
|
+
D.current = E, x(() => f.watch(S.flatMap(({ at: e }) => e?.element ? [e.element] : []))), x(() => {
|
|
1001
|
+
if (!y) return;
|
|
1011
1002
|
let e = 0, t = null, n = (n) => {
|
|
1012
1003
|
e || (e = requestAnimationFrame(() => {
|
|
1013
1004
|
e = 0;
|
|
@@ -1058,37 +1049,37 @@ function ze({ client: e, activeId: t, onOpen: n, notify: r, onError: a }) {
|
|
|
1058
1049
|
L[e.fixed ? "fixed" : "page"].push(/* @__PURE__ */ h("div", {
|
|
1059
1050
|
class: "ck-shade",
|
|
1060
1051
|
"data-active": e.id === t || e.id === O || void 0,
|
|
1061
|
-
style:
|
|
1052
|
+
style: B(n.x, n.y, e.w, e.h),
|
|
1062
1053
|
"aria-hidden": "true"
|
|
1063
1054
|
}));
|
|
1064
1055
|
}
|
|
1065
|
-
for (let { thread: e, at: r } of
|
|
1056
|
+
for (let { thread: e, at: r } of S) {
|
|
1066
1057
|
if (!r) continue;
|
|
1067
|
-
let i = r.fixed ? T : w, a = A?.id === e.id, o = a ? A.x : r.x, s = a ? A.y : r.y,
|
|
1068
|
-
L[r.fixed ? "fixed" : "page"].push(/* @__PURE__ */ h(
|
|
1069
|
-
|
|
1058
|
+
let i = r.fixed ? T : w, a = A?.id === e.id, o = a ? A.x : r.x, s = a ? A.y : r.y, l = !a && r.clipped, d = l || !a && e.id !== t && He(r.element, o, s), f = O === e.id && !A && e.id !== t && !d, p = i(o, s), m = r.resolved.rect && e.id === t && !l ? i(r.resolved.rect.x - scrollX, r.resolved.rect.y - scrollY) : null;
|
|
1059
|
+
L[r.fixed ? "fixed" : "page"].push(/* @__PURE__ */ h(c, { children: [
|
|
1060
|
+
m ? /* @__PURE__ */ h("div", {
|
|
1070
1061
|
class: "ck-pin-region",
|
|
1071
|
-
style:
|
|
1062
|
+
style: B(m.x, m.y, r.resolved.rect.w, r.resolved.rect.h)
|
|
1072
1063
|
}) : null,
|
|
1073
1064
|
/* @__PURE__ */ h("button", {
|
|
1074
1065
|
class: "ck-pin",
|
|
1075
|
-
style:
|
|
1066
|
+
style: B(p.x, p.y),
|
|
1076
1067
|
"data-status": e.status,
|
|
1077
1068
|
"data-state": r.resolved.state,
|
|
1078
1069
|
"data-dragging": a || void 0,
|
|
1079
|
-
"data-covered":
|
|
1080
|
-
"data-clipped":
|
|
1081
|
-
tabIndex:
|
|
1082
|
-
"data-movable":
|
|
1070
|
+
"data-covered": d || void 0,
|
|
1071
|
+
"data-clipped": l || void 0,
|
|
1072
|
+
tabIndex: d ? -1 : void 0,
|
|
1073
|
+
"data-movable": u || void 0,
|
|
1083
1074
|
"aria-expanded": e.id === t,
|
|
1084
1075
|
"aria-label": `${e.reference}: ${e.first_message?.body.slice(0, 80) ?? ""}`,
|
|
1085
|
-
"aria-roledescription":
|
|
1086
|
-
onPointerEnter: () =>
|
|
1087
|
-
onPointerLeave: () =>
|
|
1076
|
+
"aria-roledescription": u ? b("pinMovable") : void 0,
|
|
1077
|
+
onPointerEnter: () => y && F(e.id, 250),
|
|
1078
|
+
onPointerLeave: () => y && F(null, 120),
|
|
1088
1079
|
onFocus: () => F(e.id, 0),
|
|
1089
1080
|
onBlur: () => F(null, 0),
|
|
1090
1081
|
onPointerDown: (t) => {
|
|
1091
|
-
|
|
1082
|
+
u && t.button === 0 && (M.current = {
|
|
1092
1083
|
id: e.id,
|
|
1093
1084
|
x: t.clientX,
|
|
1094
1085
|
y: t.clientY,
|
|
@@ -1097,7 +1088,7 @@ function ze({ client: e, activeId: t, onOpen: n, notify: r, onError: a }) {
|
|
|
1097
1088
|
},
|
|
1098
1089
|
onPointerMove: (t) => {
|
|
1099
1090
|
let n = M.current;
|
|
1100
|
-
n && n.id === e.id && (!n.moved && Math.hypot(t.clientX - n.x, t.clientY - n.y) <
|
|
1091
|
+
n && n.id === e.id && (!n.moved && Math.hypot(t.clientX - n.x, t.clientY - n.y) < Be || (n.moved = !0, k(null), j({
|
|
1101
1092
|
id: e.id,
|
|
1102
1093
|
x: t.clientX,
|
|
1103
1094
|
y: t.clientY
|
|
@@ -1118,10 +1109,10 @@ function ze({ client: e, activeId: t, onOpen: n, notify: r, onError: a }) {
|
|
|
1118
1109
|
children: [/* @__PURE__ */ h("svg", {
|
|
1119
1110
|
viewBox: "5 3 54 62",
|
|
1120
1111
|
"aria-hidden": "true",
|
|
1121
|
-
children: /* @__PURE__ */ h("path", { d:
|
|
1112
|
+
children: /* @__PURE__ */ h("path", { d: ze })
|
|
1122
1113
|
}), /* @__PURE__ */ h("span", { children: e.number })]
|
|
1123
1114
|
}),
|
|
1124
|
-
|
|
1115
|
+
f ? /* @__PURE__ */ h(We, {
|
|
1125
1116
|
thread: e,
|
|
1126
1117
|
x: o,
|
|
1127
1118
|
y: s,
|
|
@@ -1129,34 +1120,34 @@ function ze({ client: e, activeId: t, onOpen: n, notify: r, onError: a }) {
|
|
|
1129
1120
|
}) : null
|
|
1130
1121
|
] }, e.id));
|
|
1131
1122
|
}
|
|
1132
|
-
return /* @__PURE__ */ h(
|
|
1123
|
+
return /* @__PURE__ */ h(c, { children: [/* @__PURE__ */ h("div", {
|
|
1133
1124
|
class: "ck-pins",
|
|
1134
|
-
ref:
|
|
1125
|
+
ref: _,
|
|
1135
1126
|
"data-commentkit-ui": !0,
|
|
1136
1127
|
children: L.page
|
|
1137
1128
|
}), /* @__PURE__ */ h("div", {
|
|
1138
1129
|
class: "ck-pins",
|
|
1139
|
-
ref:
|
|
1130
|
+
ref: v,
|
|
1140
1131
|
"data-fixed": !0,
|
|
1141
1132
|
"data-commentkit-ui": !0,
|
|
1142
1133
|
children: L.fixed
|
|
1143
1134
|
})] });
|
|
1144
1135
|
}
|
|
1145
|
-
function
|
|
1136
|
+
function He(e, t, n) {
|
|
1146
1137
|
if (!e?.isConnected || t < 0 || n < 0 || t >= innerWidth || n >= innerHeight) return !1;
|
|
1147
|
-
let r = document.elementsFromPoint(t, n).find((e) => !o(e)), i =
|
|
1138
|
+
let r = document.elementsFromPoint(t, n).find((e) => !o(e)), i = Ue(e), a = r && Ue(r);
|
|
1148
1139
|
return !!a && a !== document.documentElement && a !== document.body && !i.contains(a) && !a.contains(i);
|
|
1149
1140
|
}
|
|
1150
|
-
function
|
|
1141
|
+
function Ue(e) {
|
|
1151
1142
|
for (let t; t = e.getRootNode().host ?? (e.ownerDocument !== document && e.ownerDocument.defaultView?.frameElement);) e = t;
|
|
1152
1143
|
return e;
|
|
1153
1144
|
}
|
|
1154
|
-
function
|
|
1145
|
+
function We({ thread: e, x: t, y: n, to: r }) {
|
|
1155
1146
|
let i = n > 180, a = r(Math.min(Math.max(8, t + 18), innerWidth - 260 - 8), i ? n - 16 : n + 24);
|
|
1156
1147
|
return /* @__PURE__ */ h("div", {
|
|
1157
1148
|
class: "ck-peek",
|
|
1158
1149
|
style: {
|
|
1159
|
-
...
|
|
1150
|
+
...B(a.x, a.y, 260),
|
|
1160
1151
|
transform: i ? "translateY(-100%)" : "none"
|
|
1161
1152
|
},
|
|
1162
1153
|
"aria-hidden": "true",
|
|
@@ -1194,7 +1185,7 @@ function He({ thread: e, x: t, y: n, to: r }) {
|
|
|
1194
1185
|
]
|
|
1195
1186
|
});
|
|
1196
1187
|
}
|
|
1197
|
-
function
|
|
1188
|
+
function Ge(e, t) {
|
|
1198
1189
|
let n = t.replace(/\s+/g, " ").trim().toLowerCase();
|
|
1199
1190
|
if (!n) return null;
|
|
1200
1191
|
let r = [], i = "", a = e.ownerDocument, o = a.createTreeWalker(e, NodeFilter.SHOW_TEXT);
|
|
@@ -1213,25 +1204,24 @@ function Ue(e, t) {
|
|
|
1213
1204
|
let c = r[s], l = r[s + n.length - 1], u = a.createRange();
|
|
1214
1205
|
return u.setStart(c.node, c.offset), u.setEnd(l.node, l.offset + 1), u;
|
|
1215
1206
|
}
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
return e.endsWith("center") ? Object.assign(i, {
|
|
1207
|
+
// src/ui/Welcome.tsx
|
|
1208
|
+
function Ke({ id: e, position: t, title: n, body: r, primary: i, secondary: a, onPrimary: o, onSecondary: s }) {
|
|
1209
|
+
let c = t.startsWith("top") ? { top: "76px" } : { bottom: "76px" };
|
|
1210
|
+
return t.endsWith("center") ? Object.assign(c, {
|
|
1221
1211
|
left: "50%",
|
|
1222
1212
|
transform: "translateX(-50%)"
|
|
1223
|
-
}) :
|
|
1213
|
+
}) : c[t.endsWith("left") ? "left" : "right"] = "20px", /* @__PURE__ */ h("div", {
|
|
1224
1214
|
class: "ck-welcome",
|
|
1225
|
-
style:
|
|
1215
|
+
style: c,
|
|
1226
1216
|
role: "region",
|
|
1227
|
-
"aria-labelledby":
|
|
1217
|
+
"aria-labelledby": e,
|
|
1228
1218
|
"data-commentkit-ui": !0,
|
|
1229
1219
|
children: [
|
|
1230
1220
|
/* @__PURE__ */ h("h2", {
|
|
1231
|
-
id:
|
|
1232
|
-
children:
|
|
1221
|
+
id: e,
|
|
1222
|
+
children: n
|
|
1233
1223
|
}),
|
|
1234
|
-
/* @__PURE__ */ h("p", { children:
|
|
1224
|
+
/* @__PURE__ */ h("p", { children: r }),
|
|
1235
1225
|
/* @__PURE__ */ h("div", {
|
|
1236
1226
|
style: {
|
|
1237
1227
|
display: "flex",
|
|
@@ -1239,22 +1229,45 @@ function We({ position: e, project: t, onStart: n, onDismiss: r }) {
|
|
|
1239
1229
|
},
|
|
1240
1230
|
children: [/* @__PURE__ */ h("button", {
|
|
1241
1231
|
class: "ck-btn ck-primary",
|
|
1242
|
-
onClick:
|
|
1243
|
-
children:
|
|
1232
|
+
onClick: o,
|
|
1233
|
+
children: i
|
|
1244
1234
|
}), /* @__PURE__ */ h("button", {
|
|
1245
1235
|
class: "ck-btn",
|
|
1246
|
-
onClick:
|
|
1247
|
-
children:
|
|
1236
|
+
onClick: s,
|
|
1237
|
+
children: a
|
|
1248
1238
|
})]
|
|
1249
1239
|
})
|
|
1250
1240
|
]
|
|
1251
1241
|
});
|
|
1252
1242
|
}
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1243
|
+
function qe({ position: e, project: t, onStart: n, onDismiss: r }) {
|
|
1244
|
+
return /* @__PURE__ */ h(Ke, {
|
|
1245
|
+
id: "ck-welcome-title",
|
|
1246
|
+
position: e,
|
|
1247
|
+
title: b("welcomeTitle", { project: t }),
|
|
1248
|
+
body: b(matchMedia("(pointer: coarse)").matches ? "welcomeBodyTouch" : "welcomeBody"),
|
|
1249
|
+
primary: b("comment"),
|
|
1250
|
+
secondary: b("gotIt"),
|
|
1251
|
+
onPrimary: n,
|
|
1252
|
+
onSecondary: r
|
|
1253
|
+
});
|
|
1254
|
+
}
|
|
1255
|
+
function Je({ position: e, project: t, onContinue: n, onDismiss: r }) {
|
|
1256
|
+
return /* @__PURE__ */ h(Ke, {
|
|
1257
|
+
id: "ck-signin-link-title",
|
|
1258
|
+
position: e,
|
|
1259
|
+
title: b("signInLinkTitle", { project: t }),
|
|
1260
|
+
body: b("signInLinkBody"),
|
|
1261
|
+
primary: b("signIn"),
|
|
1262
|
+
secondary: b("notNow"),
|
|
1263
|
+
onPrimary: n,
|
|
1264
|
+
onSecondary: r
|
|
1265
|
+
});
|
|
1266
|
+
}
|
|
1267
|
+
// src/ui/App.tsx
|
|
1268
|
+
var Ye = 3, Xe = "commentkit:share", Ze = "commentkit:dblclick-hint", Qe = "commentkit:dock", $e = 200, et = /* @__PURE__ */ new WeakSet(), tt = "commentkit:welcomed";
|
|
1269
|
+
function nt({ client: e, onHide: t = () => void 0 }) {
|
|
1270
|
+
return $(e.state, (e) => e.config?.enabled !== !1) ? /* @__PURE__ */ h(rt, {
|
|
1258
1271
|
client: e,
|
|
1259
1272
|
onHide: t
|
|
1260
1273
|
}) : /* @__PURE__ */ h("div", {
|
|
@@ -1263,103 +1276,103 @@ function Qe({ client: e, onHide: t = () => void 0 }) {
|
|
|
1263
1276
|
children: b("paused")
|
|
1264
1277
|
});
|
|
1265
1278
|
}
|
|
1266
|
-
function
|
|
1267
|
-
let r = $(e.state, (e) => e.config), i = $(e.state, (e) => e.session), [a, o] = g({ name: "idle" }), [s,
|
|
1268
|
-
|
|
1279
|
+
function rt({ client: e, onHide: t }) {
|
|
1280
|
+
let r = $(e.state, (e) => e.config), i = $(e.state, (e) => e.session), [a, o] = g({ name: "idle" }), [s, l] = g([]), u = y((e, t = !1) => {
|
|
1281
|
+
l((t) => t.filter((t) => t !== e)), !t && e.onExpire && !et.has(e) && (et.add(e), e.onExpire());
|
|
1269
1282
|
}, []);
|
|
1270
1283
|
x(() => {
|
|
1271
1284
|
let e = s.filter((e) => (e.tone === "error" || e.action) && !e.expires);
|
|
1272
1285
|
if (!e.length) return;
|
|
1273
1286
|
let t = (t) => {
|
|
1274
|
-
t.composedPath().some((e) => e instanceof HTMLElement && e.classList.contains("ck-toast")) || e.forEach((e) =>
|
|
1287
|
+
t.composedPath().some((e) => e instanceof HTMLElement && e.classList.contains("ck-toast")) || e.forEach((e) => u(e));
|
|
1275
1288
|
};
|
|
1276
1289
|
return addEventListener("pointerdown", t, !0), () => removeEventListener("pointerdown", t, !0);
|
|
1277
1290
|
}, [s]);
|
|
1278
|
-
let
|
|
1279
|
-
|
|
1280
|
-
let e = () =>
|
|
1291
|
+
let f = d(s);
|
|
1292
|
+
f.current = s, x(() => {
|
|
1293
|
+
let e = () => f.current.forEach((e) => u(e));
|
|
1281
1294
|
return addEventListener("pagehide", e), () => {
|
|
1282
1295
|
removeEventListener("pagehide", e), e();
|
|
1283
1296
|
};
|
|
1284
1297
|
}, []);
|
|
1285
|
-
let [
|
|
1298
|
+
let [p, m] = g(!1), [_, v] = g(!1), [S, C] = g(null);
|
|
1286
1299
|
x(() => {
|
|
1287
|
-
_ && !
|
|
1300
|
+
_ && !S && import("./Settings-SPG9EHUZ.js").then((e) => C(() => e.Settings), G);
|
|
1288
1301
|
}, [_]);
|
|
1289
1302
|
let [T, E] = g(null), [D, O] = g(null);
|
|
1290
1303
|
x(() => {
|
|
1291
|
-
|
|
1292
|
-
}, [
|
|
1304
|
+
p && !D && import("./Shortcuts-C28HVDw6.js").then((e) => O(() => e.Shortcuts), G);
|
|
1305
|
+
}, [p]);
|
|
1293
1306
|
let [k, A] = g(null);
|
|
1294
1307
|
x(() => {
|
|
1295
|
-
|
|
1308
|
+
a.name !== "commenting" && a.name !== "composing" || k || import("./Composer-CAyj-c8e.js").then((t) => {
|
|
1296
1309
|
A(() => t.Composer), e.state.get().config?.features.screenshots !== !1 && t.warmCapture();
|
|
1297
|
-
},
|
|
1310
|
+
}, G);
|
|
1298
1311
|
}, [a.name]);
|
|
1299
|
-
let [j, M] = g(null), [N, P] = g(null), F = $(e.state, (e) => e.opening), [I] = g(() =>
|
|
1312
|
+
let [j, M] = g(null), [N, P] = g(null), F = $(e.state, (e) => e.opening), [I] = g(() => st()), [L, ee] = g(() => !!I && !lt(tt)), [te, R] = g(() => e.auth.hasSignInLink()), ne = d(null), [re, ie] = g(null), ae = e.options.shortcuts !== !1;
|
|
1300
1313
|
x(() => {
|
|
1301
1314
|
if (a.name === "idle") {
|
|
1302
|
-
let e =
|
|
1303
|
-
|
|
1315
|
+
let e = ne.current;
|
|
1316
|
+
ne.current = null, e?.isConnected && e.focus({ preventScroll: !0 });
|
|
1304
1317
|
}
|
|
1305
1318
|
}, [a.name]);
|
|
1306
|
-
let [
|
|
1307
|
-
if (!
|
|
1319
|
+
let [z, B] = g(!1), V = d(null), H = y(() => {
|
|
1320
|
+
if (!V.current) {
|
|
1308
1321
|
if (matchMedia("(prefers-reduced-motion: reduce)").matches) return o({ name: "idle" });
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
},
|
|
1322
|
+
B(!0), V.current = setTimeout(() => {
|
|
1323
|
+
V.current = null, B(!1), o({ name: "idle" });
|
|
1324
|
+
}, $e);
|
|
1312
1325
|
}
|
|
1313
1326
|
}, []);
|
|
1314
|
-
x(() => () => void (
|
|
1315
|
-
let
|
|
1327
|
+
x(() => () => void (V.current && clearTimeout(V.current)), []);
|
|
1328
|
+
let U = (e) => {
|
|
1316
1329
|
if (a.name === "idle") {
|
|
1317
1330
|
let e = document.querySelector("[data-commentkit-host]")?.shadowRoot?.activeElement;
|
|
1318
|
-
|
|
1331
|
+
ne.current = e instanceof HTMLElement ? e : null;
|
|
1319
1332
|
}
|
|
1320
|
-
|
|
1321
|
-
},
|
|
1322
|
-
|
|
1323
|
-
let n = t.filter((t) => t.text !== e.text), r = n.slice(0, Math.max(0, n.length -
|
|
1324
|
-
return r.forEach((e) => queueMicrotask(() =>
|
|
1325
|
-
}), (e.expires || e.tone !== "error" && !e.action) && setTimeout(() =>
|
|
1326
|
-
}, []),
|
|
1333
|
+
V.current && (clearTimeout(V.current), V.current = null, B(!1)), o(e);
|
|
1334
|
+
}, W = y((e) => {
|
|
1335
|
+
l((t) => {
|
|
1336
|
+
let n = t.filter((t) => t.text !== e.text), r = n.slice(0, Math.max(0, n.length - Ye + 1));
|
|
1337
|
+
return r.forEach((e) => queueMicrotask(() => u(e))), [...n.slice(r.length), e];
|
|
1338
|
+
}), (e.expires || e.tone !== "error" && !e.action) && setTimeout(() => u(e), e.expires ?? 4e3);
|
|
1339
|
+
}, []), G = y((t) => {
|
|
1327
1340
|
let r = e.auth.pending();
|
|
1328
1341
|
if (t instanceof n && t.code === "verification_required" && r) return o({
|
|
1329
1342
|
name: "verify",
|
|
1330
1343
|
email: r.email,
|
|
1331
1344
|
draft: null
|
|
1332
1345
|
});
|
|
1333
|
-
|
|
1334
|
-
text:
|
|
1346
|
+
W({
|
|
1347
|
+
text: _e(t),
|
|
1335
1348
|
tone: "error"
|
|
1336
1349
|
});
|
|
1337
|
-
}, [
|
|
1338
|
-
|
|
1339
|
-
let [
|
|
1340
|
-
x(() => () =>
|
|
1350
|
+
}, [W]), oe = d(null), se = d(null);
|
|
1351
|
+
se.current = a.name === "thread" ? a.threadId : a.name === "panel" ? a.threadId ?? null : null;
|
|
1352
|
+
let [ce, le] = g(0);
|
|
1353
|
+
x(() => () => oe.current?.stop(), []), x(() => {
|
|
1341
1354
|
let t = () => {
|
|
1342
1355
|
let e = new URL(location.href), t = e.searchParams.get("ck_thread");
|
|
1343
|
-
t && /^[0-9a-f-]{36}$/i.test(t) && (e.searchParams.delete("ck_thread"), history.replaceState(history.state, "", e.toString()), i ?
|
|
1356
|
+
t && /^[0-9a-f-]{36}$/i.test(t) && (e.searchParams.delete("ck_thread"), history.replaceState(history.state, "", e.toString()), i ? U({
|
|
1344
1357
|
name: "thread",
|
|
1345
1358
|
threadId: t
|
|
1346
|
-
}) :
|
|
1347
|
-
}, n = () => i && void e.loadPageThreads().catch(
|
|
1359
|
+
}) : ut("commentkit:pending-thread", t));
|
|
1360
|
+
}, n = () => i && void e.loadPageThreads().catch(G);
|
|
1348
1361
|
if (n(), t(), i) {
|
|
1349
1362
|
e.inbox().catch(() => void 0);
|
|
1350
1363
|
let t = e.state.get().config;
|
|
1351
|
-
t?.features.realtime && t.realtime && import("./live-
|
|
1364
|
+
t?.features.realtime && t.realtime && import("./live-BCpJVBeN.js").then((t) => (oe.current ?? (oe.current = t.liveUpdates(e, () => se.current, () => le((e) => e + 1))), e.connectRealtime((e) => oe.current?.onPing(e)))).catch(() => void 0);
|
|
1352
1365
|
}
|
|
1353
|
-
return
|
|
1366
|
+
return ct(() => (n(), t()));
|
|
1354
1367
|
}, [
|
|
1355
1368
|
e,
|
|
1356
1369
|
i,
|
|
1357
|
-
|
|
1370
|
+
G
|
|
1358
1371
|
]), x(() => {
|
|
1359
1372
|
if (!i) return;
|
|
1360
1373
|
let e = null;
|
|
1361
1374
|
try {
|
|
1362
|
-
e = JSON.parse(sessionStorage.getItem("commentkit:pending-compose") ?? "null"), sessionStorage.removeItem(
|
|
1375
|
+
e = JSON.parse(sessionStorage.getItem("commentkit:pending-compose") ?? "null"), sessionStorage.removeItem(ve);
|
|
1363
1376
|
} catch {
|
|
1364
1377
|
e = null;
|
|
1365
1378
|
}
|
|
@@ -1372,8 +1385,8 @@ function $e({ client: e, onHide: t }) {
|
|
|
1372
1385
|
}));
|
|
1373
1386
|
}, [i]), x(() => {
|
|
1374
1387
|
if (!i) return;
|
|
1375
|
-
let e =
|
|
1376
|
-
e && (
|
|
1388
|
+
let e = lt("commentkit:pending-thread");
|
|
1389
|
+
e && (dt("commentkit:pending-thread"), o({
|
|
1377
1390
|
name: "thread",
|
|
1378
1391
|
threadId: e
|
|
1379
1392
|
}));
|
|
@@ -1385,9 +1398,9 @@ function $e({ client: e, onHide: t }) {
|
|
|
1385
1398
|
draft: null
|
|
1386
1399
|
});
|
|
1387
1400
|
}, []), x(() => {
|
|
1388
|
-
a.name === "verify" && !T && import("./Guest-
|
|
1401
|
+
a.name === "verify" && !T && import("./Guest-ZdFmTcXI.js").then((e) => E(() => e.GuestVerify), G);
|
|
1389
1402
|
}, [a.name]), x(() => {
|
|
1390
|
-
a.name === "panel" && !j && import("./Panel-
|
|
1403
|
+
a.name === "panel" && !j && import("./Panel-BhZ4XRDR.js").then((e) => M(() => e.Panel), G), (a.name === "thread" || a.name === "panel" && a.threadId) && !N && import("./ThreadCard-BzVZdDCb.js").then((e) => P(() => e.ThreadCard), G);
|
|
1391
1404
|
}, [a.name, a.name === "panel" ? a.threadId : null]), x(() => {
|
|
1392
1405
|
if (!F || !i) return;
|
|
1393
1406
|
if (e.state.set({ opening: null }), /^[0-9a-f-]{36}$/i.test(F)) return Y(F);
|
|
@@ -1399,21 +1412,21 @@ function $e({ client: e, onHide: t }) {
|
|
|
1399
1412
|
limit: 5
|
|
1400
1413
|
}).then((e) => {
|
|
1401
1414
|
let n = e.data.find((e) => e.reference.toUpperCase() === t);
|
|
1402
|
-
n ?
|
|
1415
|
+
n ? Pe(n.page.url, n.id, Y) : W({
|
|
1403
1416
|
text: b("threadNotFound"),
|
|
1404
1417
|
tone: "error"
|
|
1405
1418
|
});
|
|
1406
|
-
},
|
|
1419
|
+
}, G);
|
|
1407
1420
|
}, [F, i]), x(() => {
|
|
1408
1421
|
let t = (t) => {
|
|
1409
|
-
if (!(t.defaultPrevented ||
|
|
1410
|
-
if (
|
|
1422
|
+
if (!(t.defaultPrevented || ot(t) || it(t) || !ae && t.key !== "Escape")) {
|
|
1423
|
+
if (p) t.key === "Escape" && m(!1);
|
|
1411
1424
|
else if (t.key === "?" && !t.metaKey && !t.ctrlKey && !t.altKey) t.preventDefault(), m(!0);
|
|
1412
|
-
else if (t.key === "Escape" && a.name !== "idle") t.preventDefault(), a.name === "commenting" ? o({ name: "idle" }) :
|
|
1413
|
-
else if ((t.key === "c" || t.key === "C") && !t.metaKey && !t.ctrlKey && !t.altKey && a.name === "idle") t.preventDefault(),
|
|
1425
|
+
else if (t.key === "Escape" && a.name !== "idle") t.preventDefault(), a.name === "commenting" ? o({ name: "idle" }) : H();
|
|
1426
|
+
else if ((t.key === "c" || t.key === "C") && !t.metaKey && !t.ctrlKey && !t.altKey && a.name === "idle") t.preventDefault(), fe();
|
|
1414
1427
|
else if ((t.key === "j" || t.key === "k") && !t.metaKey && !t.ctrlKey && !t.altKey && i && (a.name === "idle" || a.name === "thread")) {
|
|
1415
1428
|
let n = e.state.get().threads;
|
|
1416
|
-
if (!n.length ||
|
|
1429
|
+
if (!n.length || at(t)) return;
|
|
1417
1430
|
t.preventDefault();
|
|
1418
1431
|
let r = a.name === "thread" ? n.findIndex((e) => e.id === a.threadId) : -1, i = n[(r + (t.key === "j" ? 1 : n.length - 1 + +(r < 0))) % n.length];
|
|
1419
1432
|
i && Y(i);
|
|
@@ -1422,17 +1435,17 @@ function $e({ client: e, onHide: t }) {
|
|
|
1422
1435
|
};
|
|
1423
1436
|
return addEventListener("keydown", t, !0), () => removeEventListener("keydown", t, !0);
|
|
1424
1437
|
});
|
|
1425
|
-
let
|
|
1426
|
-
if (
|
|
1427
|
-
text:
|
|
1438
|
+
let ue = r?.read_only ?? !1, de = b(i && i.role !== "guest" ? "readOnly" : "readOnlyGuest"), K = !i && a.name === "idle" ? e.auth.pending() : null, fe = () => {
|
|
1439
|
+
if (ue) return W({
|
|
1440
|
+
text: de,
|
|
1428
1441
|
tone: "error"
|
|
1429
1442
|
});
|
|
1430
|
-
|
|
1443
|
+
ee(!1), U({ name: "commenting" });
|
|
1431
1444
|
};
|
|
1432
1445
|
x(() => {
|
|
1433
1446
|
if (a.name !== "panel") return;
|
|
1434
|
-
let e = (e) => !e.composedPath().some((e) => e instanceof HTMLElement && e.hasAttribute("data-commentkit-ui")), t = (t) => e(t) &&
|
|
1435
|
-
e(t) && t.button === 0 && !
|
|
1447
|
+
let e = (e) => !e.composedPath().some((e) => e instanceof HTMLElement && e.hasAttribute("data-commentkit-ui")), t = (t) => e(t) && H(), n = (t) => {
|
|
1448
|
+
e(t) && t.button === 0 && !lt(Ze) && (ut(Ze, "1"), W({
|
|
1436
1449
|
text: b("doubleClickHint"),
|
|
1437
1450
|
tone: "info"
|
|
1438
1451
|
}));
|
|
@@ -1441,36 +1454,36 @@ function $e({ client: e, onHide: t }) {
|
|
|
1441
1454
|
removeEventListener("dblclick", t, !0), removeEventListener("pointerdown", n, !0);
|
|
1442
1455
|
};
|
|
1443
1456
|
}, [a.name]);
|
|
1444
|
-
let
|
|
1457
|
+
let pe = a.name === "commenting", q = d(!1);
|
|
1445
1458
|
x(() => {
|
|
1446
|
-
(
|
|
1447
|
-
}, [
|
|
1459
|
+
(q.current || pe) && e.emit("mode", { commenting: pe }), q.current = !0;
|
|
1460
|
+
}, [pe]);
|
|
1448
1461
|
let J = $(e.state, (e) => e.request);
|
|
1449
1462
|
x(() => {
|
|
1450
|
-
J && (e.state.set({ request: null }), J.kind === "comment" ? a.name !== "commenting" &&
|
|
1463
|
+
J && (e.state.set({ request: null }), J.kind === "comment" ? a.name !== "commenting" && fe() : J.kind === "stop" ? a.name === "commenting" && o({ name: "idle" }) : i ? a.name === "panel" ? H() : U({ name: "panel" }) : X());
|
|
1451
1464
|
}, [J]);
|
|
1452
|
-
let Y = (e) =>
|
|
1465
|
+
let Y = (e) => U({
|
|
1453
1466
|
name: "thread",
|
|
1454
1467
|
threadId: typeof e == "string" ? e : e.id
|
|
1455
1468
|
}), X = async () => {
|
|
1456
1469
|
let t = await e.signIn(I);
|
|
1457
|
-
return t === "signed_in" || (t === "redirecting" ||
|
|
1470
|
+
return t === "signed_in" || (t === "redirecting" || W({
|
|
1458
1471
|
text: b(t === "popup_blocked" ? "popupBlocked" : "signInCancelled"),
|
|
1459
1472
|
tone: "error"
|
|
1460
1473
|
}), !1);
|
|
1461
|
-
}, [
|
|
1462
|
-
let e =
|
|
1474
|
+
}, [me, he] = g(() => {
|
|
1475
|
+
let e = lt(Qe);
|
|
1463
1476
|
return e && /^(top|bottom)-(left|center|right)$/.test(e) ? e : null;
|
|
1464
|
-
}), Q =
|
|
1465
|
-
return /* @__PURE__ */ h(
|
|
1466
|
-
i ? /* @__PURE__ */ h(
|
|
1477
|
+
}), Q = me ?? e.options.position ?? r?.appearance.position ?? "bottom-right";
|
|
1478
|
+
return /* @__PURE__ */ h(c, { children: [
|
|
1479
|
+
i ? /* @__PURE__ */ h(Ve, {
|
|
1467
1480
|
client: e,
|
|
1468
|
-
activeId:
|
|
1481
|
+
activeId: se.current,
|
|
1469
1482
|
onOpen: Y,
|
|
1470
|
-
notify:
|
|
1471
|
-
onError:
|
|
1483
|
+
notify: W,
|
|
1484
|
+
onError: G
|
|
1472
1485
|
}) : null,
|
|
1473
|
-
a.name === "commenting" ? /* @__PURE__ */ h(
|
|
1486
|
+
a.name === "commenting" ? /* @__PURE__ */ h(je, {
|
|
1474
1487
|
quote: e.options.tools?.text !== !1,
|
|
1475
1488
|
onCancel: () => o({ name: "idle" }),
|
|
1476
1489
|
onPick: (e) => o({
|
|
@@ -1480,7 +1493,7 @@ function $e({ client: e, onHide: t }) {
|
|
|
1480
1493
|
}) : null,
|
|
1481
1494
|
/* @__PURE__ */ h("div", {
|
|
1482
1495
|
class: "ck-layer",
|
|
1483
|
-
"data-closing":
|
|
1496
|
+
"data-closing": z || void 0,
|
|
1484
1497
|
"data-pos": Q,
|
|
1485
1498
|
children: [
|
|
1486
1499
|
a.name === "composing" && k ? /* @__PURE__ */ h(k, {
|
|
@@ -1488,28 +1501,28 @@ function $e({ client: e, onHide: t }) {
|
|
|
1488
1501
|
draft: a.draft,
|
|
1489
1502
|
signedIn: !!i,
|
|
1490
1503
|
onSignIn: X,
|
|
1491
|
-
onCancel:
|
|
1504
|
+
onCancel: H,
|
|
1492
1505
|
onSent: (e, t) => {
|
|
1493
|
-
|
|
1506
|
+
W({
|
|
1494
1507
|
text: t ? b(t === "screenshot" ? "sentWithoutScreenshot" : "sentWithoutFiles") : i?.role === "guest" || !i ? b("sentGuest") : b("sent"),
|
|
1495
1508
|
tone: t ? "info" : "success"
|
|
1496
1509
|
}), Y(e);
|
|
1497
1510
|
},
|
|
1498
1511
|
share: I,
|
|
1499
1512
|
onPending: (e) => {
|
|
1500
|
-
|
|
1513
|
+
ie(a.draft), o({
|
|
1501
1514
|
name: "verify",
|
|
1502
1515
|
email: e,
|
|
1503
1516
|
draft: a.draft
|
|
1504
1517
|
});
|
|
1505
1518
|
},
|
|
1506
|
-
onError:
|
|
1519
|
+
onError: G
|
|
1507
1520
|
}) : null,
|
|
1508
1521
|
a.name === "verify" && T ? /* @__PURE__ */ h(T, {
|
|
1509
1522
|
client: e,
|
|
1510
1523
|
email: a.email,
|
|
1511
1524
|
onDone: (t) => {
|
|
1512
|
-
a.draft && w(
|
|
1525
|
+
a.draft && w(ye(e, a.draft.anchor)), W({
|
|
1513
1526
|
text: b("sentGuest"),
|
|
1514
1527
|
tone: "success"
|
|
1515
1528
|
}), t[0] ? Y(t[0]) : o({ name: "idle" });
|
|
@@ -1518,28 +1531,28 @@ function $e({ client: e, onHide: t }) {
|
|
|
1518
1531
|
name: "composing",
|
|
1519
1532
|
draft: a.draft
|
|
1520
1533
|
} : { name: "commenting" }),
|
|
1521
|
-
onClose:
|
|
1534
|
+
onClose: H
|
|
1522
1535
|
}) : null,
|
|
1523
1536
|
a.name === "thread" && N ? /* @__PURE__ */ h(N, {
|
|
1524
1537
|
client: e,
|
|
1525
1538
|
threadId: a.threadId,
|
|
1526
|
-
version:
|
|
1527
|
-
onClose:
|
|
1528
|
-
onError:
|
|
1529
|
-
notify:
|
|
1539
|
+
version: ce,
|
|
1540
|
+
onClose: H,
|
|
1541
|
+
onError: G,
|
|
1542
|
+
notify: W
|
|
1530
1543
|
}) : null,
|
|
1531
1544
|
a.name === "panel" && j ? /* @__PURE__ */ h(j, {
|
|
1532
1545
|
client: e,
|
|
1533
1546
|
side: Q.endsWith("left") ? "left" : "right",
|
|
1534
1547
|
dock: Q.startsWith("top") ? "top" : "bottom",
|
|
1535
|
-
onClose:
|
|
1548
|
+
onClose: H,
|
|
1536
1549
|
onOpen: (e, t) => o({
|
|
1537
1550
|
name: "panel",
|
|
1538
1551
|
threadId: typeof e == "string" ? e : e.id,
|
|
1539
1552
|
order: t
|
|
1540
1553
|
}),
|
|
1541
|
-
onError:
|
|
1542
|
-
notify:
|
|
1554
|
+
onError: G,
|
|
1555
|
+
notify: W,
|
|
1543
1556
|
detail: a.threadId && N ? (() => {
|
|
1544
1557
|
let t = a.order ?? [], n = t.indexOf(a.threadId), r = (e) => n < 0 ? void 0 : () => o({
|
|
1545
1558
|
...a,
|
|
@@ -1548,10 +1561,10 @@ function $e({ client: e, onHide: t }) {
|
|
|
1548
1561
|
return /* @__PURE__ */ h(N, {
|
|
1549
1562
|
client: e,
|
|
1550
1563
|
threadId: a.threadId,
|
|
1551
|
-
version:
|
|
1552
|
-
onClose:
|
|
1553
|
-
onError:
|
|
1554
|
-
notify:
|
|
1564
|
+
version: ce,
|
|
1565
|
+
onClose: H,
|
|
1566
|
+
onError: G,
|
|
1567
|
+
notify: W,
|
|
1555
1568
|
embedded: {
|
|
1556
1569
|
onBack: () => o({
|
|
1557
1570
|
name: "panel",
|
|
@@ -1564,7 +1577,7 @@ function $e({ client: e, onHide: t }) {
|
|
|
1564
1577
|
total: t.length
|
|
1565
1578
|
},
|
|
1566
1579
|
onShow: (e) => {
|
|
1567
|
-
o({ name: "idle" }),
|
|
1580
|
+
o({ name: "idle" }), Pe(e.page.url, e.id, Y);
|
|
1568
1581
|
}
|
|
1569
1582
|
}
|
|
1570
1583
|
});
|
|
@@ -1572,49 +1585,56 @@ function $e({ client: e, onHide: t }) {
|
|
|
1572
1585
|
}) : null
|
|
1573
1586
|
]
|
|
1574
1587
|
}),
|
|
1575
|
-
|
|
1588
|
+
te && !i && !K && a.name === "idle" ? /* @__PURE__ */ h(Je, {
|
|
1576
1589
|
position: Q,
|
|
1577
1590
|
project: r?.project.name ?? "",
|
|
1578
|
-
|
|
1591
|
+
onContinue: () => {
|
|
1592
|
+
R(!1), X().then(() => R(e.auth.hasSignInLink()));
|
|
1593
|
+
},
|
|
1594
|
+
onDismiss: () => R(!1)
|
|
1595
|
+
}) : L && !i && a.name === "idle" ? /* @__PURE__ */ h(qe, {
|
|
1596
|
+
position: Q,
|
|
1597
|
+
project: r?.project.name ?? "",
|
|
1598
|
+
onStart: fe,
|
|
1579
1599
|
onDismiss: () => {
|
|
1580
|
-
|
|
1600
|
+
ee(!1), ut(tt, "1");
|
|
1581
1601
|
}
|
|
1582
1602
|
}) : null,
|
|
1583
|
-
/* @__PURE__ */ h(
|
|
1603
|
+
/* @__PURE__ */ h(Oe, {
|
|
1584
1604
|
client: e,
|
|
1585
1605
|
position: Q,
|
|
1586
1606
|
onMove: (e) => {
|
|
1587
|
-
|
|
1607
|
+
he(e), ut(Qe, e);
|
|
1588
1608
|
},
|
|
1589
1609
|
commenting: a.name === "commenting",
|
|
1590
1610
|
panelOpen: a.name === "panel",
|
|
1591
|
-
onComment: () => a.name === "commenting" ? o({ name: "idle" }) :
|
|
1592
|
-
onPanel: () => a.name === "panel" ?
|
|
1611
|
+
onComment: () => a.name === "commenting" ? o({ name: "idle" }) : fe(),
|
|
1612
|
+
onPanel: () => a.name === "panel" ? H() : U({ name: "panel" }),
|
|
1593
1613
|
onSignIn: () => void X(),
|
|
1594
1614
|
onSignOut: () => void e.signOut(),
|
|
1595
|
-
onShortcuts:
|
|
1615
|
+
onShortcuts: ae ? () => m(!0) : null,
|
|
1596
1616
|
onSettings: () => v(!0),
|
|
1597
1617
|
onHide: t,
|
|
1598
1618
|
waiting: K?.email ?? null,
|
|
1599
|
-
onCode: () => K &&
|
|
1619
|
+
onCode: () => K && U({
|
|
1600
1620
|
name: "verify",
|
|
1601
1621
|
email: K.email,
|
|
1602
|
-
draft:
|
|
1622
|
+
draft: re
|
|
1603
1623
|
}),
|
|
1604
|
-
covered: a.name !== "idle" && a.name !== "commenting" ||
|
|
1624
|
+
covered: a.name !== "idle" && a.name !== "commenting" || p || _
|
|
1605
1625
|
}),
|
|
1606
|
-
|
|
1607
|
-
_ &&
|
|
1626
|
+
p && D ? /* @__PURE__ */ h(D, { onClose: () => m(!1) }) : null,
|
|
1627
|
+
_ && S ? /* @__PURE__ */ h(S, {
|
|
1608
1628
|
client: e,
|
|
1609
1629
|
onClose: () => v(!1),
|
|
1610
|
-
onShortcuts:
|
|
1630
|
+
onShortcuts: ae ? () => m(!0) : null,
|
|
1611
1631
|
onHide: t,
|
|
1612
1632
|
onSignOut: () => void e.signOut()
|
|
1613
1633
|
}) : null,
|
|
1614
|
-
|
|
1634
|
+
ue && a.name === "commenting" ? /* @__PURE__ */ h("div", {
|
|
1615
1635
|
class: "ck-toast",
|
|
1616
1636
|
role: "status",
|
|
1617
|
-
children:
|
|
1637
|
+
children: de
|
|
1618
1638
|
}) : null,
|
|
1619
1639
|
/* @__PURE__ */ h("div", {
|
|
1620
1640
|
class: "ck-toast-region",
|
|
@@ -1634,13 +1654,13 @@ function $e({ client: e, onHide: t }) {
|
|
|
1634
1654
|
}) : null,
|
|
1635
1655
|
/* @__PURE__ */ h("span", { children: e.text }),
|
|
1636
1656
|
e.action ? /* @__PURE__ */ h("button", {
|
|
1637
|
-
onClick: () => (
|
|
1657
|
+
onClick: () => (u(e, !0), e.action.run()),
|
|
1638
1658
|
children: e.action.label
|
|
1639
1659
|
}) : null,
|
|
1640
1660
|
e.tone === "error" || e.action ? /* @__PURE__ */ h("button", {
|
|
1641
1661
|
class: "ck-toast-close",
|
|
1642
1662
|
"aria-label": b("close"),
|
|
1643
|
-
onClick: () =>
|
|
1663
|
+
onClick: () => u(e),
|
|
1644
1664
|
children: /* @__PURE__ */ h(Z, {
|
|
1645
1665
|
name: "close",
|
|
1646
1666
|
size: 14
|
|
@@ -1651,35 +1671,35 @@ function $e({ client: e, onHide: t }) {
|
|
|
1651
1671
|
})
|
|
1652
1672
|
] });
|
|
1653
1673
|
}
|
|
1654
|
-
function
|
|
1674
|
+
function it(e) {
|
|
1655
1675
|
return e.composedPath().some((e) => e instanceof HTMLElement && e.classList.contains("ck-markup"));
|
|
1656
1676
|
}
|
|
1657
|
-
function
|
|
1677
|
+
function at(e) {
|
|
1658
1678
|
return e.composedPath().some((e) => e instanceof HTMLElement && e.classList.contains("ck-panel"));
|
|
1659
1679
|
}
|
|
1660
|
-
function
|
|
1680
|
+
function ot(e) {
|
|
1661
1681
|
return e.composedPath().some((e) => e instanceof HTMLElement && (e.isContentEditable || [
|
|
1662
1682
|
"INPUT",
|
|
1663
1683
|
"TEXTAREA",
|
|
1664
1684
|
"SELECT"
|
|
1665
1685
|
].includes(e.tagName)));
|
|
1666
1686
|
}
|
|
1667
|
-
function
|
|
1687
|
+
function st() {
|
|
1668
1688
|
let e = new URL(location.href), t = e.searchParams.get("ck");
|
|
1669
1689
|
if (t && /^[A-Za-z0-9]{16,128}$/.test(t)) {
|
|
1670
1690
|
e.searchParams.delete("ck"), history.replaceState(history.state, "", e.toString());
|
|
1671
1691
|
try {
|
|
1672
|
-
sessionStorage.setItem(
|
|
1692
|
+
sessionStorage.setItem(Xe, t);
|
|
1673
1693
|
} catch {}
|
|
1674
1694
|
return t;
|
|
1675
1695
|
}
|
|
1676
1696
|
try {
|
|
1677
|
-
return sessionStorage.getItem(
|
|
1697
|
+
return sessionStorage.getItem(Xe);
|
|
1678
1698
|
} catch {
|
|
1679
1699
|
return null;
|
|
1680
1700
|
}
|
|
1681
1701
|
}
|
|
1682
|
-
function
|
|
1702
|
+
function ct(e) {
|
|
1683
1703
|
let t = location.href, n = () => {
|
|
1684
1704
|
location.href !== t && (t = location.href, e());
|
|
1685
1705
|
}, r = setInterval(n, 500);
|
|
@@ -1687,41 +1707,39 @@ function it(e) {
|
|
|
1687
1707
|
clearInterval(r), removeEventListener("popstate", n), removeEventListener("hashchange", n);
|
|
1688
1708
|
};
|
|
1689
1709
|
}
|
|
1690
|
-
function
|
|
1710
|
+
function lt(e) {
|
|
1691
1711
|
try {
|
|
1692
1712
|
return localStorage.getItem(e);
|
|
1693
1713
|
} catch {
|
|
1694
1714
|
return null;
|
|
1695
1715
|
}
|
|
1696
1716
|
}
|
|
1697
|
-
function
|
|
1717
|
+
function ut(e, t) {
|
|
1698
1718
|
try {
|
|
1699
1719
|
localStorage.setItem(e, t);
|
|
1700
1720
|
} catch {}
|
|
1701
1721
|
}
|
|
1702
|
-
function
|
|
1722
|
+
function dt(e) {
|
|
1703
1723
|
try {
|
|
1704
1724
|
localStorage.removeItem(e);
|
|
1705
1725
|
} catch {}
|
|
1706
1726
|
}
|
|
1707
|
-
|
|
1708
|
-
//#region src/ui/styles.css?inline
|
|
1709
|
-
var ct = ":host{all:initial;--ck-accent:#ff5733;--ck-accent-ink:#121316;--ck-accent-soft:color-mix(in srgb, var(--ck-accent) 12%, var(--ck-bg));--ck-bg:#fff;--ck-bg-muted:#f6f5f2;--ck-bg-hover:#efede8;--ck-border:#e6e4de;--ck-hairline:#12131614;--ck-text:#121316;--ck-text-muted:#6b6a64;--ck-danger:#c2341b;--ck-success:#16794c;--ck-warning:#a15c00;--ck-review:#e5a400;--ck-progress:#3b82f6;--ck-shadow-sm:0 0 0 1px var(--ck-hairline), 0 1px 2px #1213160f, 0 2px 6px #1213160d;--ck-shadow:0 0 0 1px var(--ck-hairline), 0 4px 10px #1213160f, 0 16px 40px -6px #1213162e;--ck-radius:14px;--ck-radius-sm:8px;--ck-radius-md:10px;--ck-ease:cubic-bezier(.2, .8, .2, 1);--ck-font:ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;--ck-mono:ui-monospace, SFMono-Regular, Menlo, monospace;--ck-z:2147480000;--ck-img-outline:#0000001a;font-family:var(--ck-font);color:var(--ck-text);font-size:14px;line-height:1.45}@supports (color:color(display-p3 0 0 0)){:host{--ck-img-outline:color(display-p3 0 0 0/.1)}}@supports (color:lab(0% 0 0)){:host{--ck-img-outline:lab(0% 0 0/.1)}}:host([data-theme=dark]){--ck-bg:#1a1b1e;--ck-bg-muted:#222327;--ck-bg-hover:#2b2c31;--ck-border:#33343a;--ck-hairline:#ffffff14;--ck-text:#f2f1ec;--ck-text-muted:#a3a29b;--ck-img-outline:#ffffff1a;--ck-danger:#f0715a;--ck-success:#4cc38a;--ck-warning:#e3a33f;--ck-shadow-sm:0 0 0 1px var(--ck-hairline), 0 1px 2px #0006, 0 2px 6px #0000004d;--ck-shadow:0 0 0 1px var(--ck-hairline), 0 4px 10px #0000004d, 0 16px 40px -6px #0009}@supports (color:color(display-p3 0 0 0)){:host([data-theme=dark]){--ck-img-outline:color(display-p3 1 1 1/.1)}}@supports (color:lab(0% 0 0)){:host([data-theme=dark]){--ck-img-outline:lab(100% 0 0/.1)}}.ck-root{all:initial;font-family:var(--ck-font);letter-spacing:normal;word-spacing:normal;text-align:start;text-transform:none;text-indent:0;text-shadow:none;white-space:normal;color:var(--ck-text);cursor:auto;visibility:visible;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:14px;font-style:normal;font-weight:400;line-height:1.45;display:block}*,:before,:after{box-sizing:border-box}button,input,textarea,select{font:inherit;color:inherit}button{cursor:pointer;-webkit-tap-highlight-color:transparent}:focus-visible{outline:2px solid var(--ck-accent);outline-offset:2px}::placeholder{color:var(--ck-text-muted);opacity:.8}.ck-root *{scrollbar-width:thin;scrollbar-color:var(--ck-border) transparent}@keyframes ck-pop{0%{opacity:0;transform:translateY(6px)scale(.98)}}@keyframes ck-fade{0%{opacity:0}}@keyframes ck-sheet{0%{opacity:0;transform:translateY(32px)}}.ck-launcher{z-index:var(--ck-z);align-items:center;gap:8px;display:flex;position:fixed}.ck-launcher[data-pos=bottom-right]{right:20px;bottom:calc(20px + env(safe-area-inset-bottom,0px))}.ck-launcher[data-pos=bottom-left]{left:20px;bottom:calc(20px + env(safe-area-inset-bottom,0px))}.ck-launcher[data-pos=top-right]{top:20px;right:20px}.ck-launcher[data-pos=top-left]{top:20px;left:20px}.ck-bar{background:color-mix(in srgb, var(--ck-bg) 86%, transparent);-webkit-backdrop-filter:blur(14px)saturate(1.4);backdrop-filter:blur(14px)saturate(1.4);box-shadow:var(--ck-shadow);animation:ck-pop .22s var(--ck-ease);border-radius:999px;align-items:center;gap:2px;padding:4px;display:flex}.ck-bar-btn{letter-spacing:-.005em;white-space:nowrap;background:0 0;border:0;border-radius:999px;align-items:center;gap:6px;height:34px;padding:0 12px;font-size:13.5px;font-weight:600;transition:background-color .12s,color .12s,scale .15s ease-out;display:inline-flex}.ck-bar-btn:not(:disabled):active,.ck-btn:not(:disabled):active,.ck-chip:not(:disabled):active{scale:.96}.ck-bar-btn svg,.ck-btn svg,.ck-ghost svg{flex:none}.ck-bar-btn[aria-pressed=true],.ck-primary{background:var(--ck-accent);color:var(--ck-accent-ink);box-shadow:inset 0 1px 0 #ffffff38, 0 1px 2px color-mix(in srgb, var(--ck-accent) 40%, transparent)}.ck-icon-btn{width:34px;color:var(--ck-text-muted);justify-content:center;padding:0;position:relative}.ck-badge{background:var(--ck-danger);color:#fff;min-width:16px;height:16px;box-shadow:0 0 0 2px var(--ck-bg);border-radius:999px;place-items:center;padding:0 4px;font-size:10px;font-weight:700;line-height:1;display:grid;position:absolute;top:2px;right:2px}.ck-mode-hint{z-index:var(--ck-z);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);color:#f2f1ec;background:#121316e0;border-radius:18px;flex-wrap:wrap;justify-content:center;align-items:center;gap:6px 10px;max-width:calc(100vw - 24px);padding:8px 8px 8px 16px;font-size:13px;font-weight:600;animation:.16s ease-out ck-fade;display:flex;position:fixed;top:16px;left:50%;transform:translate(-50%);box-shadow:0 8px 24px #00000038}.ck-mode-hint .ck-chip{color:inherit;background:#ffffff14;border-color:#ffffff2e}.ck-mode-frame{z-index:calc(var(--ck-z) - 1);pointer-events:none;box-shadow:inset 0 0 0 1.5px color-mix(in srgb, var(--ck-accent) 75%, transparent), inset 0 0 14px 2px color-mix(in srgb, var(--ck-accent) 16%, transparent);animation:.24s ease-out ck-fade,3.2s ease-in-out .24s infinite ck-breathe;position:fixed;top:0;bottom:0;left:0;right:0}@keyframes ck-breathe{50%{opacity:.5}}@media (prefers-reduced-motion:reduce){.ck-mode-frame{animation:.24s ease-out ck-fade}}.ck-catcher{z-index:calc(var(--ck-z) - 2);cursor:crosshair;touch-action:pan-x pan-y pinch-zoom;background:0 0;position:fixed;top:0;bottom:0;left:0;right:0}.ck-outline{z-index:calc(var(--ck-z) - 1);pointer-events:none;border:2px solid var(--ck-accent);background:color-mix(in srgb, var(--ck-accent) 8%, transparent);box-shadow:0 0 0 4px color-mix(in srgb, var(--ck-accent) 14%, transparent);border-radius:6px;transition-property:left,top,width,height;transition-duration:70ms;transition-timing-function:ease-out;position:fixed}.ck-region{z-index:calc(var(--ck-z) - 1);pointer-events:none;border-radius:6px;position:fixed}.ck-region,.ck-pending-region{--ck-dash:linear-gradient(90deg, var(--ck-accent) 50%, transparent 0);--ck-dash-v:linear-gradient(0deg, var(--ck-accent) 50%, transparent 0);background:var(--ck-dash) 0 0 / 12px 2px repeat-x, var(--ck-dash) 0 100% / 12px 2px repeat-x, var(--ck-dash-v) 0 0 / 2px 12px repeat-y, var(--ck-dash-v) 100% 0 / 2px 12px repeat-y, color-mix(in srgb, var(--ck-accent) 8%, transparent);animation:.6s linear infinite ck-ants}@keyframes ck-ants{to{background-position:12px 0,-12px 100%,0 -12px,100% 12px,0 0}}@media (prefers-reduced-motion:reduce){.ck-region,.ck-pending-region{animation:none}}.ck-pins{width:100px;height:0;z-index:calc(var(--ck-z) - 3);position:absolute;top:0;left:0}.ck-pins[data-fixed]{position:fixed}.ck-pin{--ck-pin:var(--ck-accent);transform-origin:49% 97%;width:28px;height:32px;color:var(--ck-accent-ink);font-variant-numeric:tabular-nums;filter:drop-shadow(0 0 .6px #fff)drop-shadow(0 0 .6px #fff)drop-shadow(0 3px 6px #12131647);transition:scale .14s var(--ck-ease), filter .14s;background:0 0;border:0;padding:0;font-size:11px;font-weight:800;animation:.2s ease-out ck-fade;position:absolute;transform:translate(-49%,-97%)}.ck-pin svg{width:100%;height:100%;position:absolute;top:0;bottom:0;left:0;right:0;overflow:visible}.ck-pin path{fill:var(--ck-pin);stroke:#121316;stroke-width:3px;stroke-linejoin:round}.ck-pin>span{left:0;right:0;text-align:center;line-height:1;position:absolute;top:41%;translate:0 -50%}.ck-pin[data-status=in_review]{--ck-pin:var(--ck-review);color:#121316}.ck-pin[data-status=in_progress]{--ck-pin:var(--ck-progress);color:#fff}.ck-pin[data-status=resolved]{--ck-pin:var(--ck-success);color:#fff}.ck-pin[data-state=moved]{opacity:.85}.ck-pin[data-covered]{opacity:0;pointer-events:none;transition:opacity .12s ease-out}.ck-pin[data-clipped]{display:none}.ck-pin[aria-expanded=true]{filter:drop-shadow(0 0 .6px #fff) drop-shadow(0 0 .6px #fff) drop-shadow(0 0 5px color-mix(in srgb, var(--ck-pin) 60%, transparent)) drop-shadow(0 4px 8px #1213164d);scale:1.14}.ck-pin:focus-visible{outline-offset:3px;border-radius:50%}.ck-pin-region{pointer-events:none;border:2px dashed var(--ck-accent);border-radius:6px;position:absolute}.ck-card{z-index:calc(var(--ck-z) + 1);background:var(--ck-bg);border-radius:var(--ck-radius);width:min(380px,100vw - 24px);max-height:min(560px,100dvh - 24px);box-shadow:var(--ck-shadow);animation:ck-pop .18s var(--ck-ease);flex-direction:column;display:flex;position:fixed;overflow:hidden}.ck-card-head{border-bottom:1px solid var(--ck-hairline);align-items:center;gap:6px;min-height:46px;padding:7px 8px 7px 14px;display:flex}.ck-card-title{letter-spacing:-.01em;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;font-weight:650;overflow:hidden}.ck-card-body{flex:1;min-height:0;padding:12px 14px;overflow:auto}.ck-card>:not(.ck-card-body){flex-shrink:0}.ck-card-foot{border-top:1px solid var(--ck-hairline);background:color-mix(in srgb, var(--ck-bg-muted) 50%, var(--ck-bg));align-items:center;gap:8px;padding:8px 10px 10px 14px;display:flex}.ck-ghost{border-radius:var(--ck-radius-sm);color:var(--ck-text-muted);background:0 0;border:0;padding:6px 8px;font-weight:600;transition:background-color .12s,color .12s}.ck-card-head .ck-ghost{flex:none;place-items:center;width:32px;height:32px;padding:0;display:inline-grid}.ck-ghost-sm{padding:0 4px;font-size:12px}.ck-btn{border-radius:var(--ck-radius-sm);background:var(--ck-bg);height:32px;box-shadow:var(--ck-shadow-sm);white-space:nowrap;border:0;justify-content:center;align-items:center;gap:6px;padding:0 12px;font-size:13.5px;font-weight:600;transition:background-color .12s,filter .12s,scale .15s ease-out;display:inline-flex}.ck-btn.ck-primary{background:var(--ck-accent);color:var(--ck-accent-ink);box-shadow:inset 0 1px 0 #ffffff38, 0 0 0 1px color-mix(in srgb, var(--ck-accent) 80%, #000), 0 1px 2px #1213161f}.ck-btn:disabled,.ck-btn.ck-primary:disabled{background:var(--ck-bg-muted);color:color-mix(in srgb, var(--ck-text-muted) 80%, transparent);box-shadow:0 0 0 1px var(--ck-hairline);cursor:not-allowed;filter:none;transform:none}.ck-spacer{flex:1}.ck-input:focus{border-color:var(--ck-accent);box-shadow:0 0 0 3px color-mix(in srgb, var(--ck-accent) 18%, transparent);outline:none}.ck-input{border-radius:var(--ck-radius-sm);border:1px solid var(--ck-border);background:var(--ck-bg);width:100%;height:34px;padding:0 11px;transition:border-color .12s,box-shadow .12s}.ck-input[aria-invalid=true]{border-color:var(--ck-danger)}.ck-muted{color:var(--ck-text-muted);font-size:12px}.ck-note{border-radius:var(--ck-radius-md);background:var(--ck-bg-muted);margin:8px 0 0;padding:10px 12px;font-size:13px;line-height:1.45}.ck-note[data-tone=warning]{background:color-mix(in srgb, var(--ck-review) 16%, var(--ck-bg))}.ck-note[data-tone=error]{background:color-mix(in srgb, var(--ck-danger) 10%, var(--ck-bg));color:var(--ck-danger)}.ck-avatar img{outline:1px solid var(--ck-img-outline);outline-offset:-1px}.ck-avatar{background:var(--ck-accent-soft);width:28px;height:28px;color:color-mix(in srgb, var(--ck-accent) 70%, var(--ck-text));letter-spacing:.02em;box-shadow:0 0 0 1px var(--ck-hairline);border-radius:50%;flex:none;place-items:center;font-size:11px;font-weight:700;display:grid;overflow:hidden}.ck-avatar img{object-fit:cover;width:100%;height:100%}.ck-msg-name{color:var(--ck-text);font-size:13px;font-weight:650}.ck-status{--ck-tone:var(--ck-accent);background:color-mix(in srgb, var(--ck-tone) 12%, var(--ck-bg));color:color-mix(in srgb, var(--ck-tone) 45%, var(--ck-text));white-space:nowrap;border-radius:999px;align-items:center;gap:6px;padding:2px 9px 2px 8px;font-size:12px;font-weight:650;display:inline-flex}.ck-status:before{content:\"\";background:var(--ck-tone);border-radius:50%;width:7px;height:7px}.ck-status[data-status=in_progress]{--ck-tone:var(--ck-progress)}.ck-status[data-status=in_review]{--ck-tone:var(--ck-review)}.ck-status[data-status=resolved]{--ck-tone:var(--ck-success)}.ck-status[data-status=closed]{--ck-tone:var(--ck-text-muted)}.ck-actions{flex-wrap:wrap;gap:6px;margin-top:10px;display:flex}.ck-menu{z-index:2;background:var(--ck-bg);min-width:210px;box-shadow:var(--ck-shadow);animation:ck-pop .14s var(--ck-ease);border-radius:12px;padding:4px;position:absolute;top:48px;right:8px}.ck-menu button{text-align:start;border-radius:var(--ck-radius-sm);background:0 0;border:0;align-items:center;gap:8px;width:100%;padding:8px 10px;font-size:13.5px;display:flex}.ck-menu .ck-danger{color:var(--ck-danger)}.ck-menu-head{border-bottom:1px solid var(--ck-hairline);color:var(--ck-text-muted);text-overflow:ellipsis;white-space:nowrap;margin-bottom:4px;padding:6px 10px 8px;font-size:12px;overflow:hidden}.ck-panel{z-index:var(--ck-z);background:var(--ck-bg);border-radius:var(--ck-radius);width:min(400px,100vw - 24px);box-shadow:var(--ck-shadow);animation:ck-pop .2s var(--ck-ease);flex-direction:column;display:flex;position:fixed;top:12px;bottom:12px;overflow:hidden}.ck-panel[data-side=right]{right:12px}.ck-panel[data-side=left]{left:12px}@media (min-width:521px){.ck-panel[data-dock=bottom]{bottom:calc(76px + env(safe-area-inset-bottom,0px))}.ck-panel[data-dock=top]{top:76px}}.ck-time{white-space:nowrap;font-variant-numeric:tabular-nums;flex:none;line-height:20px}.ck-empty{text-align:center;color:var(--ck-text-muted);padding:32px 20px}.ck-empty strong{color:var(--ck-text);margin-bottom:4px;font-weight:650;display:block}.ck-art{margin:0 auto 10px;display:block;overflow:visible}.ck-art *{vector-effect:non-scaling-stroke;stroke-linecap:round;stroke-linejoin:round}.ck-art-w,.ck-art-a,path.ck-art-m{stroke:var(--ck-text);stroke-width:2px}.ck-art-w{fill:var(--ck-bg)}.ck-art-a{fill:var(--ck-accent)}.ck-art-m{fill:var(--ck-bg-hover)}.ck-art-line{fill:none;stroke:var(--ck-text);stroke-width:2px}.ck-art-bold{stroke-width:4.5px}.ck-art-tick{fill:none;stroke:#fff;stroke-width:2.6px}.ck-art-dot{fill:var(--ck-border)}.ck-art-ink{fill:var(--ck-text)}.ck-art-spark{fill:none;stroke:var(--ck-accent);stroke-width:2.4px}.ck-art-ghost{fill:none;stroke:var(--ck-text-muted);stroke-width:2px;stroke-dasharray:5 5}.ck-art-shadow{fill:var(--ck-bg-hover)}.ck-empty .ck-hint{margin-top:2px;font-size:13px;display:block}.ck-toast{z-index:calc(var(--ck-z) + 1);background:var(--ck-bg);max-width:min(360px,100vw - 24px);color:var(--ck-text);box-shadow:var(--ck-shadow);animation:ck-pop .18s var(--ck-ease);border-radius:12px;align-items:center;gap:10px;padding:10px 10px 10px 12px;font-size:13px;font-weight:500;line-height:1.4;display:flex;position:fixed;bottom:84px;left:50%;transform:translate(-50%);border-color:var(--ck-hairline)!important}.ck-toast-region:empty{display:none}.ck-toast-region{z-index:calc(var(--ck-z) + 1);pointer-events:none;flex-direction:column;align-items:center;gap:8px;width:max-content;max-width:calc(100vw - 24px);display:flex;position:fixed;bottom:84px;left:50%;transform:translate(-50%)}.ck-toast-region .ck-toast{pointer-events:auto;position:relative;bottom:auto;left:auto;transform:none}.ck-layer:has(.ck-card,.ck-panel)~.ck-toast-region{flex-direction:column-reverse;top:12px;bottom:auto}.ck-toast-icon{width:20px;height:20px;color:var(--ck-text-muted);border-radius:50%;flex:none;place-items:center;display:grid}.ck-toast[data-tone=success] .ck-toast-icon{color:var(--ck-success)}.ck-toast .ck-toast-close{width:24px;height:24px;color:var(--ck-text-muted);background:0 0;place-items:center;padding:0;display:grid}.ck-toast[data-tone=error] .ck-toast-icon{color:var(--ck-danger)}.ck-toast button{color:var(--ck-accent);background:0 0;border:0;border-radius:6px;flex:none;padding:4px 8px;font-weight:650}.ck-welcome{z-index:var(--ck-z);background:var(--ck-bg);border-radius:var(--ck-radius);width:min(340px,100vw - 24px);box-shadow:var(--ck-shadow);animation:ck-pop .22s var(--ck-ease);padding:18px;position:fixed}.ck-welcome h2{letter-spacing:-.01em;margin:0 0 6px;font-size:15px;font-weight:650}.ck-welcome p{color:var(--ck-text-muted);margin:0 0 14px;line-height:1.5}.ck-markup{z-index:calc(var(--ck-z) + 2);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);background:#0a0a0c4d;flex-direction:column;justify-content:center;align-items:center;gap:12px;padding:16px;display:flex;position:fixed;top:0;bottom:0;left:0;right:0}.ck-card:has(.ck-markup,.ck-viewer){z-index:calc(var(--ck-z) + 3)}.ck-panel:has(.ck-viewer){z-index:calc(var(--ck-z) + 3)}.ck-markup canvas{border-radius:var(--ck-radius-md);cursor:crosshair;touch-action:none;background:#fff;max-width:min(100%,1100px);max-height:calc(100dvh - 110px);box-shadow:0 0 0 1px #0000000d,0 20px 50px #00000040}.ck-root .ck-date-input:focus-visible{outline:none}.ck-task .ck-chip{cursor:default}.ck-task button.ck-chip{cursor:pointer}.ck-chip{border:1px solid var(--ck-border);background:var(--ck-bg);height:26px;color:var(--ck-text-muted);cursor:pointer;text-overflow:ellipsis;white-space:nowrap;border-radius:999px;align-items:center;gap:5px;max-width:100%;padding:0 10px;font-size:12px;font-weight:600;transition:background-color .12s,border-color .12s,color .12s,scale .15s ease-out;display:inline-flex;overflow:hidden}.ck-chip[aria-pressed=true],.ck-chip[aria-expanded=true]{background:var(--ck-accent-soft);color:color-mix(in srgb, var(--ck-accent) 55%, var(--ck-text));border-color:color-mix(in srgb, var(--ck-accent) 45%, var(--ck-border))}.ck-chip:focus-visible{outline:2px solid var(--ck-accent);outline-offset:1px}.ck-card-body>p.ck-muted{margin:0 0 8px;line-height:1.4}.ck-skeleton{background:linear-gradient(90deg, var(--ck-bg-muted), var(--ck-bg-hover), var(--ck-bg-muted));background-size:200% 100%;border-radius:6px;height:12px;margin:10px 0;animation:1.2s linear infinite ck-shimmer}@keyframes ck-shimmer{to{background-position:-200% 0}}.ck-msg-skeleton .ck-skeleton:not(.ck-skeleton-avatar){margin:4px 0 10px}.ck-msg-skeleton .ck-skeleton:first-child{width:34%}.ck-msg-skeleton .ck-skeleton:nth-child(2){width:92%}.ck-msg-skeleton .ck-skeleton:nth-child(3){width:64%}.ck-loading-row .ck-skeleton{margin:0 0 8px}.ck-loading-row .ck-skeleton:first-child{width:38%}.ck-loading-row .ck-skeleton:nth-child(2){width:86%}.ck-loading-row .ck-skeleton:last-child{width:52%;height:10px;margin:0}.ck-input::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none}.ck-empty .ck-btn{margin:12px auto 0;display:flex}.ck-root :focus{outline:none}.ck-root :focus-visible{outline:2px solid var(--ck-accent);outline-offset:2px}.ck-root .ck-input:focus-visible{outline:none}.ck-root .ck-textarea:focus-visible{outline:none}.ck-root [dir=rtl],.ck-root[dir=rtl]{direction:rtl}@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}.ck-launcher-note{background:var(--ck-bg);width:max-content;max-width:min(300px,100vw - 40px);box-shadow:var(--ck-shadow);animation:ck-pop .2s var(--ck-ease);margin:0;position:absolute;bottom:calc(100% + 8px);right:0}.ck-launcher[data-pos$=left] .ck-launcher-note{left:0;right:auto}.ck-launcher[data-pos^=top] .ck-launcher-note{top:calc(100% + 8px);bottom:auto}.ck-launcher .ck-menu{top:auto;bottom:52px;right:0}.ck-launcher[data-pos^=top] .ck-menu{top:52px;bottom:auto}.ck-launcher[data-pos$=left] .ck-menu{left:0;right:auto}.ck-scrim{z-index:calc(var(--ck-z) + 3);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);background:#0a0a0c73;place-items:center;padding:12px;animation:.14s ease-out ck-fade;display:grid;position:fixed;top:0;bottom:0;left:0;right:0}.ck-dialog h2{text-wrap:balance;margin:0;font-size:15px;font-weight:650}.ck-scrim .ck-card{max-height:calc(100dvh - 24px);position:static!important}kbd{font-family:var(--ck-mono);border:1px solid var(--ck-border);background:var(--ck-bg-muted);white-space:nowrap;border-bottom-width:2px;border-radius:6px;padding:2px 6px;font-size:11.5px}.ck-ghost.ck-danger{color:var(--ck-danger)}.ck-btn.ck-danger-btn,.ck-danger-btn{background:var(--ck-danger);color:#fff;box-shadow:inset 0 1px 0 #ffffff2e, 0 0 0 1px color-mix(in srgb, var(--ck-danger) 80%, #000)}.ck-check{cursor:pointer;align-items:flex-start;gap:8px;margin-top:10px;font-size:13px;display:flex}.ck-check input{width:16px;height:16px;accent-color:var(--ck-accent);flex:none;margin:2px 0 0}.ck-label-box .ck-input{width:200px;font-weight:650}.ck-field{color:var(--ck-text-muted);gap:5px;font-size:12.5px;font-weight:600;display:grid}.ck-field .ck-input{color:var(--ck-text);font-size:14px;font-weight:400}.ck-card h2.ck-card-title{margin:0;font-size:14px}.ck-catcher{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}@media (max-width:520px){.ck-launcher[data-covered=true]{display:none}.ck-card{width:auto;max-height:min(70dvh, calc(100dvh - 24px - var(--ck-kb,0px)));border-radius:16px;animation-name:ck-sheet;left:12px!important;right:12px!important;bottom:calc(12px + var(--ck-kb,0px) + env(safe-area-inset-bottom,0px))!important;top:auto!important}.ck-panel{width:100%;height:80dvh;padding-bottom:env(safe-area-inset-bottom,0px);border-radius:18px 18px 0 0;animation-name:ck-sheet;top:auto;bottom:0;left:0!important;right:0!important}.ck-panel:before{content:\"\";background:var(--ck-border);border-radius:2px;flex:none;width:36px;height:4px;margin:8px auto 0;display:block}.ck-mode-hint{top:auto;bottom:calc(84px + env(safe-area-inset-bottom,0px))}}@media (pointer:coarse){.ck-bar-btn,.ck-btn,.ck-ghost{min-width:44px;min-height:44px}.ck-chip{min-width:36px;min-height:36px}.ck-input{font-size:16px}.ck-pin:after{content:\"\";position:absolute;top:-10px;bottom:-10px;left:-10px;right:-10px}}@media (hover:hover){.ck-bar-btn:hover{background:var(--ck-bg-hover)}.ck-bar-btn[aria-pressed=true]:hover,.ck-primary:hover{background:var(--ck-accent);filter:brightness(.96)}.ck-icon-btn:hover{color:var(--ck-text)}.ck-mode-hint .ck-chip:hover{background:#ffffff29}.ck-pin:hover{scale:1.08}.ck-ghost:hover{background:var(--ck-bg-hover);color:var(--ck-text)}.ck-btn:hover{background:var(--ck-bg-muted)}.ck-btn.ck-primary:hover{background:var(--ck-accent);filter:brightness(.96)}.ck-input:hover{border-color:color-mix(in srgb, var(--ck-text-muted) 45%, var(--ck-border))}.ck-menu button:hover,.ck-toast button:hover{background:var(--ck-bg-hover)}.ck-chip:hover{color:var(--ck-text);background:var(--ck-bg-muted)}.ck-danger-btn:hover{background:var(--ck-danger);filter:brightness(.95)}}.ck-card-body,.ck-menu,.ck-markup{overscroll-behavior:contain}.ck-card,.ck-panel,.ck-menu,.ck-bar,.ck-toast,.ck-welcome,.ck-btn,.ck-launcher-note{border:1px solid #0000}@media (forced-colors:active){.ck-root .ck-input:focus,.ck-root .ck-textarea:focus{outline-offset:1px;outline:2px solid highlight}.ck-root .ck-input:focus-visible{outline-offset:1px;outline:2px solid highlight}.ck-root .ck-textarea:focus-visible{outline-offset:1px;outline:2px solid highlight}}.ck-note,.ck-empty,.ck-toast span,.ck-welcome p{text-wrap:pretty}.ck-empty strong,.ck-welcome h2{text-wrap:balance}.ck-badge,.ck-time{font-variant-numeric:tabular-nums}.ck-ghost-sm{min-height:24px}.ck-format .ck-ghost{place-items:center;width:26px;height:24px;padding:0;display:grid}.ck-msg-actions .ck-ghost{place-items:center;min-width:24px;display:inline-grid}.ck-mention{color:color-mix(in srgb, var(--ck-accent) 78%, var(--ck-text));font-weight:600}.ck-pre{overscroll-behavior-x:contain;border-radius:var(--ck-radius-sm);background:var(--ck-bg-muted);box-shadow:0 0 0 1px var(--ck-hairline);white-space:pre;margin:6px 0;padding:10px 12px;overflow-x:auto}.ck-msg-body .ck-pre code{box-shadow:none;background:0 0;padding:0;font-size:12px;line-height:1.55}.ck-quote{border-radius:var(--ck-radius-sm);border-inline-start:3px solid color-mix(in srgb, var(--ck-accent) 70%, var(--ck-border));background:var(--ck-bg-muted);color:var(--ck-text-muted);overflow-wrap:anywhere;margin:0 0 8px;padding:6px 10px;font-size:12.5px;line-height:1.45;display:block}.ck-search .ck-input{padding-inline-start:32px;padding-inline-end:30px}.ck-search .ck-ghost{place-items:center;width:24px;height:24px;padding:0;display:grid;position:absolute}.ck-search .ck-ghost: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))){right:4px}.ck-search .ck-ghost: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))){right:4px}.ck-search .ck-ghost:-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:4px}.ck-search .ck-ghost: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:4px}.ck-chip .ck-count{margin-inline-start:2px}.ck-item-meta .ck-avatar{width:16px;height:16px;margin-inline-end:2px;font-size:8px}.ck-live-note .ck-btn{flex:none;margin-inline-start:auto}.ck-menu-two{flex-direction:column;align-items:flex-start!important;gap:0!important}.ck-menu-two .ck-muted{font-size:11.5px}.ck-pin[data-movable]{touch-action:none}.ck-pin[data-dragging]{cursor:grabbing;filter:drop-shadow(0 0 .6px #fff)drop-shadow(0 8px 14px #12131659);z-index:2;transition:none;scale:1.18}.ck-peek{z-index:3;background:var(--ck-bg);box-shadow:var(--ck-shadow);pointer-events:none;animation:ck-pop .14s var(--ck-ease);border:1px solid #0000;border-radius:12px;padding:10px 12px;font-size:13px;position:absolute}.ck-peek-top{align-items:center;gap:6px;display:flex}.ck-peek-top .ck-avatar{width:20px;height:20px;font-size:9px}.ck-peek-top .ck-time{color:var(--ck-text-muted);margin-inline-start:auto;font-size:12px}.ck-peek-quote{-webkit-line-clamp:2;-webkit-box-orient:vertical;margin:8px 0 0;display:-webkit-box;overflow:hidden}.ck-peek-text{-webkit-line-clamp:3;overflow-wrap:anywhere;-webkit-box-orient:vertical;margin-top:6px;line-height:1.45;display:-webkit-box;overflow:hidden}.ck-peek-foot{align-items:center;gap:8px;margin-top:8px;font-size:12px;display:flex}@media (hover:hover){.ck-pin[data-movable]:hover{cursor:grab}.ck-format .ck-ghost:hover,.ck-msg-actions .ck-ghost:hover{color:var(--ck-text)}}@media (pointer:coarse){.ck-format .ck-ghost,.ck-msg-actions .ck-ghost,.ck-search .ck-ghost{min-width:36px;min-height:36px}}.ck-emoji{vertical-align:-.2em;width:1.15em;height:1.15em;margin:0 .04em;display:inline-block}.ck-reaction .ck-emoji{vertical-align:-2px;width:14px;height:14px}.ck-extra-add .ck-ghost{padding:2px 6px}.ck-draft-list .ck-input{height:30px;font-size:13px}.ck-panel{transform-origin:100% 100%;animation:ck-grow .24s var(--ck-ease)}.ck-panel[data-side=left]{transform-origin:0 100%}.ck-panel[data-dock=top][data-side=right]{transform-origin:100% 0}.ck-panel[data-dock=top][data-side=left]{transform-origin:0 0}@keyframes ck-grow{0%{opacity:0;scale:.86}}@keyframes ck-panel-out{to{opacity:0;filter:blur(2px);scale:.6}}@keyframes ck-out{to{opacity:0;translate:0 6px;scale:.97}}.ck-layer[data-closing] .ck-panel{pointer-events:none;animation:.2s cubic-bezier(.4,0,1,1) forwards ck-panel-out}.ck-layer[data-closing] .ck-card:not(.ck-card-embedded){pointer-events:none;animation:.16s ease-in forwards ck-out}@keyframes ck-sheet-out{to{translate:0 100%}}@media (max-width:520px){.ck-panel{animation-name:ck-sheet}.ck-layer[data-closing] .ck-panel,.ck-layer[data-closing] .ck-card:not(.ck-card-embedded){animation:.2s ease-in forwards ck-sheet-out}}.ck-confetti{width:100vw;height:100vh;z-index:calc(var(--ck-z) + 4);pointer-events:none;position:fixed;top:0;bottom:0;left:0;right:0}.ck-pin[aria-expanded=true]:before{content:\"\";width:28px;height:28px;box-shadow:0 0 0 2px var(--ck-pin);pointer-events:none;opacity:0;border-radius:50%;margin:-14px 0 0 -14px;animation:.9s ease-out 2 ck-ping;position:absolute;top:40%;left:50%}@keyframes ck-ping{0%{opacity:.8;scale:.6}to{opacity:0;scale:2.2}}.ck-pending-pin .ck-avatar{color:#121316;width:20px;height:20px;box-shadow:none;background:#fff;font-size:8px;position:absolute;top:41%;left:50%;translate:-50% -50%}@keyframes ck-pin-drop{0%{opacity:0;translate:0 -8px;scale:.4}}.ck-text-box{z-index:var(--ck-z);pointer-events:none;background:color-mix(in srgb, var(--ck-accent) 30%, transparent);border-radius:2px;position:fixed}.ck-shade{pointer-events:none;background:color-mix(in srgb, var(--ck-accent) 16%, transparent);box-shadow:inset 0 -2px 0 color-mix(in srgb, var(--ck-accent) 55%, transparent);border-radius:2px;transition:background-color .15s;position:absolute}.ck-shade[data-active]{background:color-mix(in srgb, var(--ck-accent) 28%, transparent)}.ck-launcher[data-pos=bottom-center]{left:50%;bottom:calc(20px + env(safe-area-inset-bottom,0px));transform:translate(-50%)}.ck-launcher[data-pos=top-center]{top:20px;left:50%;transform:translate(-50%)}.ck-launcher[data-pos$=center] .ck-launcher-note,.ck-launcher[data-pos$=center] .ck-menu{left:50%;right:auto;translate:-50%}.ck-launcher[data-dragging]{opacity:.92;transition:none}.ck-launcher:not([data-dragging]){transition:left .2s var(--ck-ease), right .2s var(--ck-ease), top .2s var(--ck-ease), bottom .2s var(--ck-ease)}.ck-grip{width:18px;height:32px;color:var(--ck-text-muted);cursor:grab;touch-action:none;opacity:.55;background:0 0;border:0;border-radius:6px;place-items:center;margin-inline-start:-2px;margin-inline-end:2px;padding:0;transition:opacity .12s;display:grid}.ck-grip svg{fill:currentColor}.ck-launcher[data-dragging] .ck-grip{cursor:grabbing}@media (hover:hover){.ck-grip:hover{opacity:1}}@media (pointer:coarse){.ck-grip{display:none}}";
|
|
1710
|
-
|
|
1711
|
-
//#region src/ui/mount.tsx
|
|
1712
|
-
function lt(e, t = () => void 0, n = t) {
|
|
1727
|
+
// src/ui/styles.css?inline
|
|
1728
|
+
var ft = ":host{all:initial;--ck-accent:#ff5733;--ck-accent-ink:#121316;--ck-accent-soft:color-mix(in srgb, var(--ck-accent) 12%, var(--ck-bg));--ck-bg:#fff;--ck-bg-muted:#f6f5f2;--ck-bg-hover:#efede8;--ck-border:#e6e4de;--ck-hairline:#12131614;--ck-text:#121316;--ck-text-muted:#6b6a64;--ck-danger:#c2341b;--ck-success:#16794c;--ck-warning:#a15c00;--ck-review:#e5a400;--ck-progress:#3b82f6;--ck-shadow-sm:0 0 0 1px var(--ck-hairline), 0 1px 2px #1213160f, 0 2px 6px #1213160d;--ck-shadow:0 0 0 1px var(--ck-hairline), 0 4px 10px #1213160f, 0 16px 40px -6px #1213162e;--ck-radius:14px;--ck-radius-sm:8px;--ck-radius-md:10px;--ck-ease:cubic-bezier(.2, .8, .2, 1);--ck-font:ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;--ck-mono:ui-monospace, SFMono-Regular, Menlo, monospace;--ck-z:2147480000;--ck-img-outline:#0000001a;font-family:var(--ck-font);color:var(--ck-text);font-size:14px;line-height:1.45}@supports (color:color(display-p3 0 0 0)){:host{--ck-img-outline:color(display-p3 0 0 0/.1)}}@supports (color:lab(0% 0 0)){:host{--ck-img-outline:lab(0% 0 0/.1)}}:host([data-theme=dark]){--ck-bg:#1a1b1e;--ck-bg-muted:#222327;--ck-bg-hover:#2b2c31;--ck-border:#33343a;--ck-hairline:#ffffff14;--ck-text:#f2f1ec;--ck-text-muted:#a3a29b;--ck-img-outline:#ffffff1a;--ck-danger:#f0715a;--ck-success:#4cc38a;--ck-warning:#e3a33f;--ck-shadow-sm:0 0 0 1px var(--ck-hairline), 0 1px 2px #0006, 0 2px 6px #0000004d;--ck-shadow:0 0 0 1px var(--ck-hairline), 0 4px 10px #0000004d, 0 16px 40px -6px #0009}@supports (color:color(display-p3 0 0 0)){:host([data-theme=dark]){--ck-img-outline:color(display-p3 1 1 1/.1)}}@supports (color:lab(0% 0 0)){:host([data-theme=dark]){--ck-img-outline:lab(100% 0 0/.1)}}.ck-root{all:initial;font-family:var(--ck-font);letter-spacing:normal;word-spacing:normal;text-align:start;text-transform:none;text-indent:0;text-shadow:none;white-space:normal;color:var(--ck-text);cursor:auto;visibility:visible;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:14px;font-style:normal;font-weight:400;line-height:1.45;display:block}*,:before,:after{box-sizing:border-box}button,input,textarea,select{font:inherit;color:inherit}button{cursor:pointer;-webkit-tap-highlight-color:transparent}:focus-visible{outline:2px solid var(--ck-accent);outline-offset:2px}::placeholder{color:var(--ck-text-muted);opacity:.8}.ck-root *{scrollbar-width:thin;scrollbar-color:var(--ck-border) transparent}@keyframes ck-pop{0%{opacity:0;transform:translateY(6px)scale(.98)}}@keyframes ck-fade{0%{opacity:0}}@keyframes ck-sheet{0%{opacity:0;transform:translateY(32px)}}.ck-launcher{z-index:var(--ck-z);align-items:center;gap:8px;display:flex;position:fixed}.ck-launcher[data-pos=bottom-right]{right:20px;bottom:calc(20px + env(safe-area-inset-bottom,0px))}.ck-launcher[data-pos=bottom-left]{left:20px;bottom:calc(20px + env(safe-area-inset-bottom,0px))}.ck-launcher[data-pos=top-right]{top:20px;right:20px}.ck-launcher[data-pos=top-left]{top:20px;left:20px}.ck-bar{background:color-mix(in srgb, var(--ck-bg) 86%, transparent);-webkit-backdrop-filter:blur(14px)saturate(1.4);backdrop-filter:blur(14px)saturate(1.4);box-shadow:var(--ck-shadow);animation:ck-pop .22s var(--ck-ease);border-radius:999px;align-items:center;gap:2px;padding:4px;display:flex}.ck-bar-btn{letter-spacing:-.005em;white-space:nowrap;background:0 0;border:0;border-radius:999px;align-items:center;gap:6px;height:34px;padding:0 12px;font-size:13.5px;font-weight:600;transition:background-color .12s,color .12s,scale .15s ease-out;display:inline-flex}.ck-bar-btn:not(:disabled):active,.ck-btn:not(:disabled):active,.ck-chip:not(:disabled):active{scale:.96}.ck-bar-btn svg,.ck-btn svg,.ck-ghost svg{flex:none}.ck-bar-btn[aria-pressed=true],.ck-primary{background:var(--ck-accent);color:var(--ck-accent-ink);box-shadow:inset 0 1px 0 #ffffff38, 0 1px 2px color-mix(in srgb, var(--ck-accent) 40%, transparent)}.ck-icon-btn{width:34px;color:var(--ck-text-muted);justify-content:center;padding:0;position:relative}.ck-badge{background:var(--ck-danger);color:#fff;min-width:16px;height:16px;box-shadow:0 0 0 2px var(--ck-bg);border-radius:999px;place-items:center;padding:0 4px;font-size:10px;font-weight:700;line-height:1;display:grid;position:absolute;top:2px;right:2px}.ck-mode-hint{z-index:var(--ck-z);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);color:#f2f1ec;background:#121316e0;border-radius:18px;flex-wrap:wrap;justify-content:center;align-items:center;gap:6px 10px;max-width:calc(100vw - 24px);padding:8px 8px 8px 16px;font-size:13px;font-weight:600;animation:.16s ease-out ck-fade;display:flex;position:fixed;top:16px;left:50%;transform:translate(-50%);box-shadow:0 8px 24px #00000038}.ck-mode-hint .ck-chip{color:inherit;background:#ffffff14;border-color:#ffffff2e}.ck-mode-frame{z-index:calc(var(--ck-z) - 1);pointer-events:none;box-shadow:inset 0 0 0 1.5px color-mix(in srgb, var(--ck-accent) 75%, transparent), inset 0 0 14px 2px color-mix(in srgb, var(--ck-accent) 16%, transparent);animation:.24s ease-out ck-fade,3.2s ease-in-out .24s infinite ck-breathe;position:fixed;top:0;bottom:0;left:0;right:0}@keyframes ck-breathe{50%{opacity:.5}}@media (prefers-reduced-motion:reduce){.ck-mode-frame{animation:.24s ease-out ck-fade}}.ck-catcher{z-index:calc(var(--ck-z) - 2);cursor:crosshair;touch-action:pan-x pan-y pinch-zoom;background:0 0;position:fixed;top:0;bottom:0;left:0;right:0}.ck-outline{z-index:calc(var(--ck-z) - 1);pointer-events:none;border:2px solid var(--ck-accent);background:color-mix(in srgb, var(--ck-accent) 8%, transparent);box-shadow:0 0 0 4px color-mix(in srgb, var(--ck-accent) 14%, transparent);border-radius:6px;transition-property:left,top,width,height;transition-duration:70ms;transition-timing-function:ease-out;position:fixed}.ck-region{z-index:calc(var(--ck-z) - 1);pointer-events:none;border-radius:6px;position:fixed}.ck-region,.ck-pending-region{--ck-dash:linear-gradient(90deg, var(--ck-accent) 50%, transparent 0);--ck-dash-v:linear-gradient(0deg, var(--ck-accent) 50%, transparent 0);background:var(--ck-dash) 0 0 / 12px 2px repeat-x, var(--ck-dash) 0 100% / 12px 2px repeat-x, var(--ck-dash-v) 0 0 / 2px 12px repeat-y, var(--ck-dash-v) 100% 0 / 2px 12px repeat-y, color-mix(in srgb, var(--ck-accent) 8%, transparent);animation:.6s linear infinite ck-ants}@keyframes ck-ants{to{background-position:12px 0,-12px 100%,0 -12px,100% 12px,0 0}}@media (prefers-reduced-motion:reduce){.ck-region,.ck-pending-region{animation:none}}.ck-pins{width:100px;height:0;z-index:calc(var(--ck-z) - 3);position:absolute;top:0;left:0}.ck-pins[data-fixed]{position:fixed}.ck-pin{--ck-pin:var(--ck-accent);transform-origin:49% 97%;width:28px;height:32px;color:var(--ck-accent-ink);font-variant-numeric:tabular-nums;filter:drop-shadow(0 0 .6px #fff)drop-shadow(0 0 .6px #fff)drop-shadow(0 3px 6px #12131647);transition:scale .14s var(--ck-ease), filter .14s;background:0 0;border:0;padding:0;font-size:11px;font-weight:800;animation:.2s ease-out ck-fade;position:absolute;transform:translate(-49%,-97%)}.ck-pin svg{width:100%;height:100%;position:absolute;top:0;bottom:0;left:0;right:0;overflow:visible}.ck-pin path{fill:var(--ck-pin);stroke:#121316;stroke-width:3px;stroke-linejoin:round}.ck-pin>span{left:0;right:0;text-align:center;line-height:1;position:absolute;top:41%;translate:0 -50%}.ck-pin[data-status=in_review]{--ck-pin:var(--ck-review);color:#121316}.ck-pin[data-status=in_progress]{--ck-pin:var(--ck-progress);color:#fff}.ck-pin[data-status=resolved]{--ck-pin:var(--ck-success);color:#fff}.ck-pin[data-state=moved]{opacity:.85}.ck-pin[data-covered]{opacity:0;pointer-events:none;transition:opacity .12s ease-out}.ck-pin[data-clipped]{display:none}.ck-pin[aria-expanded=true]{filter:drop-shadow(0 0 .6px #fff) drop-shadow(0 0 .6px #fff) drop-shadow(0 0 5px color-mix(in srgb, var(--ck-pin) 60%, transparent)) drop-shadow(0 4px 8px #1213164d);scale:1.14}.ck-pin:focus-visible{outline-offset:3px;border-radius:50%}.ck-pin-region{pointer-events:none;border:2px dashed var(--ck-accent);border-radius:6px;position:absolute}.ck-card{z-index:calc(var(--ck-z) + 1);background:var(--ck-bg);border-radius:var(--ck-radius);width:min(380px,100vw - 24px);max-height:min(560px,100dvh - 24px);box-shadow:var(--ck-shadow);animation:ck-pop .18s var(--ck-ease);flex-direction:column;display:flex;position:fixed;overflow:hidden}.ck-card-head{border-bottom:1px solid var(--ck-hairline);align-items:center;gap:6px;min-height:46px;padding:7px 8px 7px 14px;display:flex}.ck-card-title{letter-spacing:-.01em;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;font-weight:650;overflow:hidden}.ck-card-body{flex:1;min-height:0;padding:12px 14px;overflow:auto}.ck-card>:not(.ck-card-body){flex-shrink:0}.ck-card-foot{border-top:1px solid var(--ck-hairline);background:color-mix(in srgb, var(--ck-bg-muted) 50%, var(--ck-bg));align-items:center;gap:8px;padding:8px 10px 10px 14px;display:flex}.ck-ghost{border-radius:var(--ck-radius-sm);color:var(--ck-text-muted);background:0 0;border:0;padding:6px 8px;font-weight:600;transition:background-color .12s,color .12s}.ck-card-head .ck-ghost{flex:none;place-items:center;width:32px;height:32px;padding:0;display:inline-grid}.ck-ghost-sm{padding:0 4px;font-size:12px}.ck-btn{border-radius:var(--ck-radius-sm);background:var(--ck-bg);height:32px;box-shadow:var(--ck-shadow-sm);white-space:nowrap;border:0;justify-content:center;align-items:center;gap:6px;padding:0 12px;font-size:13.5px;font-weight:600;transition:background-color .12s,filter .12s,scale .15s ease-out;display:inline-flex}.ck-btn.ck-primary{background:var(--ck-accent);color:var(--ck-accent-ink);box-shadow:inset 0 1px 0 #ffffff38, 0 0 0 1px color-mix(in srgb, var(--ck-accent) 80%, #000), 0 1px 2px #1213161f}.ck-btn:disabled,.ck-btn.ck-primary:disabled{background:var(--ck-bg-muted);color:color-mix(in srgb, var(--ck-text-muted) 80%, transparent);box-shadow:0 0 0 1px var(--ck-hairline);cursor:not-allowed;filter:none;transform:none}.ck-spacer{flex:1}.ck-input:focus{border-color:var(--ck-accent);box-shadow:0 0 0 3px color-mix(in srgb, var(--ck-accent) 18%, transparent);outline:none}.ck-input{border-radius:var(--ck-radius-sm);border:1px solid var(--ck-border);background:var(--ck-bg);width:100%;height:34px;padding:0 11px;transition:border-color .12s,box-shadow .12s}.ck-input[aria-invalid=true]{border-color:var(--ck-danger)}.ck-muted{color:var(--ck-text-muted);font-size:12px}.ck-note{border-radius:var(--ck-radius-md);background:var(--ck-bg-muted);margin:8px 0 0;padding:10px 12px;font-size:13px;line-height:1.45}.ck-note[data-tone=warning]{background:color-mix(in srgb, var(--ck-review) 16%, var(--ck-bg))}.ck-note[data-tone=error]{background:color-mix(in srgb, var(--ck-danger) 10%, var(--ck-bg));color:var(--ck-danger)}.ck-avatar img{outline:1px solid var(--ck-img-outline);outline-offset:-1px}.ck-avatar{background:var(--ck-accent-soft);width:28px;height:28px;color:color-mix(in srgb, var(--ck-accent) 70%, var(--ck-text));letter-spacing:.02em;box-shadow:0 0 0 1px var(--ck-hairline);border-radius:50%;flex:none;place-items:center;font-size:11px;font-weight:700;display:grid;overflow:hidden}.ck-avatar img{object-fit:cover;width:100%;height:100%}.ck-msg-name{color:var(--ck-text);font-size:13px;font-weight:650}.ck-status{--ck-tone:var(--ck-accent);background:color-mix(in srgb, var(--ck-tone) 12%, var(--ck-bg));color:color-mix(in srgb, var(--ck-tone) 45%, var(--ck-text));white-space:nowrap;border-radius:999px;align-items:center;gap:6px;padding:2px 9px 2px 8px;font-size:12px;font-weight:650;display:inline-flex}.ck-status:before{content:\"\";background:var(--ck-tone);border-radius:50%;width:7px;height:7px}.ck-status[data-status=in_progress]{--ck-tone:var(--ck-progress)}.ck-status[data-status=in_review]{--ck-tone:var(--ck-review)}.ck-status[data-status=resolved]{--ck-tone:var(--ck-success)}.ck-status[data-status=closed]{--ck-tone:var(--ck-text-muted)}.ck-actions{flex-wrap:wrap;gap:6px;margin-top:10px;display:flex}.ck-menu{z-index:2;background:var(--ck-bg);min-width:210px;box-shadow:var(--ck-shadow);animation:ck-pop .14s var(--ck-ease);border-radius:12px;padding:4px;position:absolute;top:48px;right:8px}.ck-menu button{text-align:start;border-radius:var(--ck-radius-sm);background:0 0;border:0;align-items:center;gap:8px;width:100%;padding:8px 10px;font-size:13.5px;display:flex}.ck-menu .ck-danger{color:var(--ck-danger)}.ck-menu-head{border-bottom:1px solid var(--ck-hairline);color:var(--ck-text-muted);text-overflow:ellipsis;white-space:nowrap;margin-bottom:4px;padding:6px 10px 8px;font-size:12px;overflow:hidden}.ck-panel{z-index:var(--ck-z);background:var(--ck-bg);border-radius:var(--ck-radius);width:min(400px,100vw - 24px);box-shadow:var(--ck-shadow);animation:ck-pop .2s var(--ck-ease);flex-direction:column;display:flex;position:fixed;top:12px;bottom:12px;overflow:hidden}.ck-panel[data-side=right]{right:12px}.ck-panel[data-side=left]{left:12px}@media (min-width:521px){.ck-panel[data-dock=bottom]{bottom:calc(76px + env(safe-area-inset-bottom,0px))}.ck-panel[data-dock=top]{top:76px}}.ck-time{white-space:nowrap;font-variant-numeric:tabular-nums;flex:none;line-height:20px}.ck-empty{text-align:center;color:var(--ck-text-muted);padding:32px 20px}.ck-empty strong{color:var(--ck-text);margin-bottom:4px;font-weight:650;display:block}.ck-art{margin:0 auto 10px;display:block;overflow:visible}.ck-art *{vector-effect:non-scaling-stroke;stroke-linecap:round;stroke-linejoin:round}.ck-art-w,.ck-art-a,path.ck-art-m{stroke:var(--ck-text);stroke-width:2px}.ck-art-w{fill:var(--ck-bg)}.ck-art-a{fill:var(--ck-accent)}.ck-art-m{fill:var(--ck-bg-hover)}.ck-art-line{fill:none;stroke:var(--ck-text);stroke-width:2px}.ck-art-bold{stroke-width:4.5px}.ck-art-tick{fill:none;stroke:#fff;stroke-width:2.6px}.ck-art-dot{fill:var(--ck-border)}.ck-art-ink{fill:var(--ck-text)}.ck-art-spark{fill:none;stroke:var(--ck-accent);stroke-width:2.4px}.ck-art-ghost{fill:none;stroke:var(--ck-text-muted);stroke-width:2px;stroke-dasharray:5 5}.ck-art-shadow{fill:var(--ck-bg-hover)}.ck-empty .ck-hint{margin-top:2px;font-size:13px;display:block}.ck-toast{z-index:calc(var(--ck-z) + 1);background:var(--ck-bg);max-width:min(360px,100vw - 24px);color:var(--ck-text);box-shadow:var(--ck-shadow);animation:ck-pop .18s var(--ck-ease);border-radius:12px;align-items:center;gap:10px;padding:10px 10px 10px 12px;font-size:13px;font-weight:500;line-height:1.4;display:flex;position:fixed;bottom:84px;left:50%;transform:translate(-50%);border-color:var(--ck-hairline)!important}.ck-toast-region:empty{display:none}.ck-toast-region{z-index:calc(var(--ck-z) + 1);pointer-events:none;flex-direction:column;align-items:center;gap:8px;width:max-content;max-width:calc(100vw - 24px);display:flex;position:fixed;bottom:84px;left:50%;transform:translate(-50%)}.ck-toast-region .ck-toast{pointer-events:auto;position:relative;bottom:auto;left:auto;transform:none}.ck-layer:has(.ck-card,.ck-panel)~.ck-toast-region{flex-direction:column-reverse;top:12px;bottom:auto}.ck-toast-icon{width:20px;height:20px;color:var(--ck-text-muted);border-radius:50%;flex:none;place-items:center;display:grid}.ck-toast[data-tone=success] .ck-toast-icon{color:var(--ck-success)}.ck-toast .ck-toast-close{width:24px;height:24px;color:var(--ck-text-muted);background:0 0;place-items:center;padding:0;display:grid}.ck-toast[data-tone=error] .ck-toast-icon{color:var(--ck-danger)}.ck-toast button{color:var(--ck-accent);background:0 0;border:0;border-radius:6px;flex:none;padding:4px 8px;font-weight:650}.ck-welcome{z-index:var(--ck-z);background:var(--ck-bg);border-radius:var(--ck-radius);width:min(340px,100vw - 24px);box-shadow:var(--ck-shadow);animation:ck-pop .22s var(--ck-ease);padding:18px;position:fixed}.ck-welcome h2{letter-spacing:-.01em;margin:0 0 6px;font-size:15px;font-weight:650}.ck-welcome p{color:var(--ck-text-muted);margin:0 0 14px;line-height:1.5}.ck-markup{z-index:calc(var(--ck-z) + 2);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);background:#0a0a0c4d;flex-direction:column;justify-content:center;align-items:center;gap:12px;padding:16px;display:flex;position:fixed;top:0;bottom:0;left:0;right:0}.ck-card:has(.ck-markup,.ck-viewer){z-index:calc(var(--ck-z) + 3)}.ck-panel:has(.ck-viewer){z-index:calc(var(--ck-z) + 3)}.ck-markup canvas{border-radius:var(--ck-radius-md);cursor:crosshair;touch-action:none;background:#fff;max-width:min(100%,1100px);max-height:calc(100dvh - 110px);box-shadow:0 0 0 1px #0000000d,0 20px 50px #00000040}.ck-root .ck-date-input:focus-visible{outline:none}.ck-task .ck-chip{cursor:default}.ck-task button.ck-chip{cursor:pointer}.ck-chip{border:1px solid var(--ck-border);background:var(--ck-bg);height:26px;color:var(--ck-text-muted);cursor:pointer;text-overflow:ellipsis;white-space:nowrap;border-radius:999px;align-items:center;gap:5px;max-width:100%;padding:0 10px;font-size:12px;font-weight:600;transition:background-color .12s,border-color .12s,color .12s,scale .15s ease-out;display:inline-flex;overflow:hidden}.ck-chip[aria-pressed=true],.ck-chip[aria-expanded=true]{background:var(--ck-accent-soft);color:color-mix(in srgb, var(--ck-accent) 55%, var(--ck-text));border-color:color-mix(in srgb, var(--ck-accent) 45%, var(--ck-border))}.ck-chip:focus-visible{outline:2px solid var(--ck-accent);outline-offset:1px}.ck-card-body>p.ck-muted{margin:0 0 8px;line-height:1.4}.ck-skeleton{background:linear-gradient(90deg, var(--ck-bg-muted), var(--ck-bg-hover), var(--ck-bg-muted));background-size:200% 100%;border-radius:6px;height:12px;margin:10px 0;animation:1.2s linear infinite ck-shimmer}@keyframes ck-shimmer{to{background-position:-200% 0}}.ck-msg-skeleton .ck-skeleton:not(.ck-skeleton-avatar){margin:4px 0 10px}.ck-msg-skeleton .ck-skeleton:first-child{width:34%}.ck-msg-skeleton .ck-skeleton:nth-child(2){width:92%}.ck-msg-skeleton .ck-skeleton:nth-child(3){width:64%}.ck-loading-row .ck-skeleton{margin:0 0 8px}.ck-loading-row .ck-skeleton:first-child{width:38%}.ck-loading-row .ck-skeleton:nth-child(2){width:86%}.ck-loading-row .ck-skeleton:last-child{width:52%;height:10px;margin:0}.ck-input::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none}.ck-empty .ck-btn{margin:12px auto 0;display:flex}.ck-root :focus{outline:none}.ck-root :focus-visible{outline:2px solid var(--ck-accent);outline-offset:2px}.ck-root .ck-input:focus-visible{outline:none}.ck-root .ck-textarea:focus-visible{outline:none}.ck-root [dir=rtl],.ck-root[dir=rtl]{direction:rtl}@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}.ck-launcher-note{background:var(--ck-bg);width:max-content;max-width:min(300px,100vw - 40px);box-shadow:var(--ck-shadow);animation:ck-pop .2s var(--ck-ease);margin:0;position:absolute;bottom:calc(100% + 8px);right:0}.ck-launcher[data-pos$=left] .ck-launcher-note{left:0;right:auto}.ck-launcher[data-pos^=top] .ck-launcher-note{top:calc(100% + 8px);bottom:auto}.ck-launcher .ck-menu{top:auto;bottom:52px;right:0}.ck-launcher[data-pos^=top] .ck-menu{top:52px;bottom:auto}.ck-launcher[data-pos$=left] .ck-menu{left:0;right:auto}.ck-scrim{z-index:calc(var(--ck-z) + 3);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);background:#0a0a0c73;place-items:center;padding:12px;animation:.14s ease-out ck-fade;display:grid;position:fixed;top:0;bottom:0;left:0;right:0}.ck-dialog h2{text-wrap:balance;margin:0;font-size:15px;font-weight:650}.ck-scrim .ck-card{max-height:calc(100dvh - 24px);position:static!important}kbd{font-family:var(--ck-mono);border:1px solid var(--ck-border);background:var(--ck-bg-muted);white-space:nowrap;border-bottom-width:2px;border-radius:6px;padding:2px 6px;font-size:11.5px}.ck-ghost.ck-danger{color:var(--ck-danger)}.ck-btn.ck-danger-btn,.ck-danger-btn{background:var(--ck-danger);color:#fff;box-shadow:inset 0 1px 0 #ffffff2e, 0 0 0 1px color-mix(in srgb, var(--ck-danger) 80%, #000)}.ck-check{cursor:pointer;align-items:flex-start;gap:8px;margin-top:10px;font-size:13px;display:flex}.ck-check input{width:16px;height:16px;accent-color:var(--ck-accent);flex:none;margin:2px 0 0}.ck-label-box .ck-input{width:200px;font-weight:650}.ck-field{color:var(--ck-text-muted);gap:5px;font-size:12.5px;font-weight:600;display:grid}.ck-field .ck-input{color:var(--ck-text);font-size:14px;font-weight:400}.ck-card h2.ck-card-title{margin:0;font-size:14px}.ck-catcher{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}@media (max-width:520px){.ck-launcher[data-covered=true]{display:none}.ck-card{width:auto;max-height:min(70dvh, calc(100dvh - 24px - var(--ck-kb,0px)));border-radius:16px;animation-name:ck-sheet;left:12px!important;right:12px!important;bottom:calc(12px + var(--ck-kb,0px) + env(safe-area-inset-bottom,0px))!important;top:auto!important}.ck-panel{width:100%;height:80dvh;padding-bottom:env(safe-area-inset-bottom,0px);border-radius:18px 18px 0 0;animation-name:ck-sheet;top:auto;bottom:0;left:0!important;right:0!important}.ck-panel:before{content:\"\";background:var(--ck-border);border-radius:2px;flex:none;width:36px;height:4px;margin:8px auto 0;display:block}.ck-mode-hint{top:auto;bottom:calc(84px + env(safe-area-inset-bottom,0px))}}@media (pointer:coarse){.ck-bar-btn,.ck-btn,.ck-ghost{min-width:44px;min-height:44px}.ck-chip{min-width:36px;min-height:36px}.ck-input{font-size:16px}.ck-pin:after{content:\"\";position:absolute;top:-10px;bottom:-10px;left:-10px;right:-10px}}@media (hover:hover){.ck-bar-btn:hover{background:var(--ck-bg-hover)}.ck-bar-btn[aria-pressed=true]:hover,.ck-primary:hover{background:var(--ck-accent);filter:brightness(.96)}.ck-icon-btn:hover{color:var(--ck-text)}.ck-mode-hint .ck-chip:hover{background:#ffffff29}.ck-pin:hover{scale:1.08}.ck-ghost:hover{background:var(--ck-bg-hover);color:var(--ck-text)}.ck-btn:hover{background:var(--ck-bg-muted)}.ck-btn.ck-primary:hover{background:var(--ck-accent);filter:brightness(.96)}.ck-input:hover{border-color:color-mix(in srgb, var(--ck-text-muted) 45%, var(--ck-border))}.ck-menu button:hover,.ck-toast button:hover{background:var(--ck-bg-hover)}.ck-chip:hover{color:var(--ck-text);background:var(--ck-bg-muted)}.ck-danger-btn:hover{background:var(--ck-danger);filter:brightness(.95)}}.ck-card-body,.ck-menu,.ck-markup{overscroll-behavior:contain}.ck-card,.ck-panel,.ck-menu,.ck-bar,.ck-toast,.ck-welcome,.ck-btn,.ck-launcher-note{border:1px solid #0000}@media (forced-colors:active){.ck-root .ck-input:focus,.ck-root .ck-textarea:focus{outline-offset:1px;outline:2px solid highlight}.ck-root .ck-input:focus-visible{outline-offset:1px;outline:2px solid highlight}.ck-root .ck-textarea:focus-visible{outline-offset:1px;outline:2px solid highlight}}.ck-note,.ck-empty,.ck-toast span,.ck-welcome p{text-wrap:pretty}.ck-empty strong,.ck-welcome h2{text-wrap:balance}.ck-badge,.ck-time{font-variant-numeric:tabular-nums}.ck-ghost-sm{min-height:24px}.ck-format .ck-ghost{place-items:center;width:26px;height:24px;padding:0;display:grid}.ck-msg-actions .ck-ghost{place-items:center;min-width:24px;display:inline-grid}.ck-mention{color:color-mix(in srgb, var(--ck-accent) 78%, var(--ck-text));font-weight:600}.ck-pre{overscroll-behavior-x:contain;border-radius:var(--ck-radius-sm);background:var(--ck-bg-muted);box-shadow:0 0 0 1px var(--ck-hairline);white-space:pre;margin:6px 0;padding:10px 12px;overflow-x:auto}.ck-msg-body .ck-pre code{box-shadow:none;background:0 0;padding:0;font-size:12px;line-height:1.55}.ck-quote{border-radius:var(--ck-radius-sm);border-inline-start:3px solid color-mix(in srgb, var(--ck-accent) 70%, var(--ck-border));background:var(--ck-bg-muted);color:var(--ck-text-muted);overflow-wrap:anywhere;margin:0 0 8px;padding:6px 10px;font-size:12.5px;line-height:1.45;display:block}.ck-search .ck-input{padding-inline-start:32px;padding-inline-end:30px}.ck-search .ck-ghost{place-items:center;width:24px;height:24px;padding:0;display:grid;position:absolute}.ck-search .ck-ghost: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))){right:4px}.ck-search .ck-ghost: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))){right:4px}.ck-search .ck-ghost:-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:4px}.ck-search .ck-ghost: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:4px}.ck-chip .ck-count{margin-inline-start:2px}.ck-item-meta .ck-avatar{width:16px;height:16px;margin-inline-end:2px;font-size:8px}.ck-live-note .ck-btn{flex:none;margin-inline-start:auto}.ck-menu-two{flex-direction:column;align-items:flex-start!important;gap:0!important}.ck-menu-two .ck-muted{font-size:11.5px}.ck-pin[data-movable]{touch-action:none}.ck-pin[data-dragging]{cursor:grabbing;filter:drop-shadow(0 0 .6px #fff)drop-shadow(0 8px 14px #12131659);z-index:2;transition:none;scale:1.18}.ck-peek{z-index:3;background:var(--ck-bg);box-shadow:var(--ck-shadow);pointer-events:none;animation:ck-pop .14s var(--ck-ease);border:1px solid #0000;border-radius:12px;padding:10px 12px;font-size:13px;position:absolute}.ck-peek-top{align-items:center;gap:6px;display:flex}.ck-peek-top .ck-avatar{width:20px;height:20px;font-size:9px}.ck-peek-top .ck-time{color:var(--ck-text-muted);margin-inline-start:auto;font-size:12px}.ck-peek-quote{-webkit-line-clamp:2;-webkit-box-orient:vertical;margin:8px 0 0;display:-webkit-box;overflow:hidden}.ck-peek-text{-webkit-line-clamp:3;overflow-wrap:anywhere;-webkit-box-orient:vertical;margin-top:6px;line-height:1.45;display:-webkit-box;overflow:hidden}.ck-peek-foot{align-items:center;gap:8px;margin-top:8px;font-size:12px;display:flex}@media (hover:hover){.ck-pin[data-movable]:hover{cursor:grab}.ck-format .ck-ghost:hover,.ck-msg-actions .ck-ghost:hover{color:var(--ck-text)}}@media (pointer:coarse){.ck-format .ck-ghost,.ck-msg-actions .ck-ghost,.ck-search .ck-ghost{min-width:36px;min-height:36px}}.ck-emoji{vertical-align:-.2em;width:1.15em;height:1.15em;margin:0 .04em;display:inline-block}.ck-reaction .ck-emoji{vertical-align:-2px;width:14px;height:14px}.ck-extra-add .ck-ghost{padding:2px 6px}.ck-draft-list .ck-input{height:30px;font-size:13px}.ck-panel{transform-origin:100% 100%;animation:ck-grow .24s var(--ck-ease)}.ck-panel[data-side=left]{transform-origin:0 100%}.ck-panel[data-dock=top][data-side=right]{transform-origin:100% 0}.ck-panel[data-dock=top][data-side=left]{transform-origin:0 0}@keyframes ck-grow{0%{opacity:0;scale:.86}}@keyframes ck-panel-out{to{opacity:0;filter:blur(2px);scale:.6}}@keyframes ck-out{to{opacity:0;translate:0 6px;scale:.97}}.ck-layer[data-closing] .ck-panel{pointer-events:none;animation:.2s cubic-bezier(.4,0,1,1) forwards ck-panel-out}.ck-layer[data-closing] .ck-card:not(.ck-card-embedded){pointer-events:none;animation:.16s ease-in forwards ck-out}@keyframes ck-sheet-out{to{translate:0 100%}}@media (max-width:520px){.ck-panel{animation-name:ck-sheet}.ck-layer[data-closing] .ck-panel,.ck-layer[data-closing] .ck-card:not(.ck-card-embedded){animation:.2s ease-in forwards ck-sheet-out}}.ck-confetti{width:100vw;height:100vh;z-index:calc(var(--ck-z) + 4);pointer-events:none;position:fixed;top:0;bottom:0;left:0;right:0}.ck-pin[aria-expanded=true]:before{content:\"\";width:28px;height:28px;box-shadow:0 0 0 2px var(--ck-pin);pointer-events:none;opacity:0;border-radius:50%;margin:-14px 0 0 -14px;animation:.9s ease-out 2 ck-ping;position:absolute;top:40%;left:50%}@keyframes ck-ping{0%{opacity:.8;scale:.6}to{opacity:0;scale:2.2}}.ck-pending-pin .ck-avatar{color:#121316;width:20px;height:20px;box-shadow:none;background:#fff;font-size:8px;position:absolute;top:41%;left:50%;translate:-50% -50%}@keyframes ck-pin-drop{0%{opacity:0;translate:0 -8px;scale:.4}}.ck-text-box{z-index:var(--ck-z);pointer-events:none;background:color-mix(in srgb, var(--ck-accent) 30%, transparent);border-radius:2px;position:fixed}.ck-shade{pointer-events:none;background:color-mix(in srgb, var(--ck-accent) 16%, transparent);box-shadow:inset 0 -2px 0 color-mix(in srgb, var(--ck-accent) 55%, transparent);border-radius:2px;transition:background-color .15s;position:absolute}.ck-shade[data-active]{background:color-mix(in srgb, var(--ck-accent) 28%, transparent)}.ck-launcher[data-pos=bottom-center]{left:50%;bottom:calc(20px + env(safe-area-inset-bottom,0px));transform:translate(-50%)}.ck-launcher[data-pos=top-center]{top:20px;left:50%;transform:translate(-50%)}.ck-launcher[data-pos$=center] .ck-launcher-note,.ck-launcher[data-pos$=center] .ck-menu{left:50%;right:auto;translate:-50%}.ck-launcher[data-dragging]{opacity:.92;transition:none}.ck-launcher:not([data-dragging]){transition:left .2s var(--ck-ease), right .2s var(--ck-ease), top .2s var(--ck-ease), bottom .2s var(--ck-ease)}.ck-grip{width:18px;height:32px;color:var(--ck-text-muted);cursor:grab;touch-action:none;opacity:.55;background:0 0;border:0;border-radius:6px;place-items:center;margin-inline-start:-2px;margin-inline-end:2px;padding:0;transition:opacity .12s;display:grid}.ck-grip svg{fill:currentColor}.ck-launcher[data-dragging] .ck-grip{cursor:grabbing}@media (hover:hover){.ck-grip:hover{opacity:1}}@media (pointer:coarse){.ck-grip{display:none}}";
|
|
1729
|
+
// src/ui/mount.tsx
|
|
1730
|
+
function pt(e, t = () => void 0, n = t) {
|
|
1713
1731
|
let r = document.createElement("div");
|
|
1714
1732
|
r.setAttribute("data-commentkit-host", ""), r.style.cssText = "position:absolute;top:0;left:0;width:0;height:0;z-index:2147483000;";
|
|
1715
1733
|
let i = r.attachShadow({ mode: "open" });
|
|
1716
1734
|
if ("adoptedStyleSheets" in Document.prototype && "replaceSync" in CSSStyleSheet.prototype) {
|
|
1717
1735
|
let e = new CSSStyleSheet();
|
|
1718
|
-
e.replaceSync(
|
|
1736
|
+
e.replaceSync(ft), i.adoptedStyleSheets = [e];
|
|
1719
1737
|
} else {
|
|
1720
1738
|
let e = document.createElement("style");
|
|
1721
|
-
e.textContent =
|
|
1739
|
+
e.textContent = ft, i.appendChild(e);
|
|
1722
1740
|
}
|
|
1723
1741
|
let a = document.createElement("div");
|
|
1724
|
-
a.className = "ck-root", a.dir = u(), a.lang = _(), i.appendChild(a),
|
|
1742
|
+
a.className = "ck-root", a.dir = u(), a.lang = _(), i.appendChild(a), Te(i), G(e.assets), document.documentElement.appendChild(r);
|
|
1725
1743
|
let o = () => {
|
|
1726
1744
|
let t = e.state.get().theme ?? e.options.theme ?? e.state.get().config?.appearance.theme ?? "auto", n = t === "dark" || t === "auto" && matchMedia("(prefers-color-scheme: dark)").matches;
|
|
1727
1745
|
r.setAttribute("data-theme", n ? "dark" : "light");
|
|
@@ -1742,19 +1760,19 @@ function lt(e, t = () => void 0, n = t) {
|
|
|
1742
1760
|
o();
|
|
1743
1761
|
let s = matchMedia("(prefers-color-scheme: dark)");
|
|
1744
1762
|
s.addEventListener?.("change", o);
|
|
1745
|
-
let
|
|
1746
|
-
return
|
|
1763
|
+
let c = e.state.subscribe(o), l = window.visualViewport, d = () => l && r.style.setProperty("--ck-kb", z(Math.max(0, innerHeight - l.height - l.offsetTop)));
|
|
1764
|
+
return l?.addEventListener("resize", d), l?.addEventListener("scroll", d), f(/* @__PURE__ */ h(ht, {
|
|
1747
1765
|
onCrash: t,
|
|
1748
1766
|
onError: (t) => e.reportCrash(t),
|
|
1749
|
-
children: /* @__PURE__ */ h(
|
|
1767
|
+
children: /* @__PURE__ */ h(nt, {
|
|
1750
1768
|
client: e,
|
|
1751
1769
|
onHide: n
|
|
1752
1770
|
})
|
|
1753
1771
|
}), a), () => {
|
|
1754
|
-
|
|
1772
|
+
f(null, a), Te(null), c(), s.removeEventListener?.("change", o), l?.removeEventListener("resize", d), l?.removeEventListener("scroll", d), r.remove();
|
|
1755
1773
|
};
|
|
1756
1774
|
}
|
|
1757
|
-
var
|
|
1775
|
+
var mt = !1, ht = class extends S {
|
|
1758
1776
|
constructor(...e) {
|
|
1759
1777
|
super(...e), this.state = { crashed: !1 };
|
|
1760
1778
|
}
|
|
@@ -1764,7 +1782,7 @@ var ut = !1, dt = class extends f {
|
|
|
1764
1782
|
try {
|
|
1765
1783
|
this.props.onError?.(e);
|
|
1766
1784
|
} catch {}
|
|
1767
|
-
|
|
1785
|
+
mt || (mt = !0, console.warn("[CommentKit] The widget stopped after an error and was removed. Your page is not affected.", e)), setTimeout(() => {
|
|
1768
1786
|
try {
|
|
1769
1787
|
this.props.onCrash();
|
|
1770
1788
|
} catch {}
|
|
@@ -1774,10 +1792,9 @@ var ut = !1, dt = class extends f {
|
|
|
1774
1792
|
render() {
|
|
1775
1793
|
return this.state.crashed ? null : this.props.children;
|
|
1776
1794
|
}
|
|
1777
|
-
},
|
|
1795
|
+
}, gt = /* @__PURE__ */ e({
|
|
1778
1796
|
installDiagnostics: () => N,
|
|
1779
|
-
mountWidget: () =>
|
|
1797
|
+
mountWidget: () => pt,
|
|
1780
1798
|
setLocale: () => v
|
|
1781
1799
|
});
|
|
1782
|
-
|
|
1783
|
-
export { z as C, P as S, pe as _, $ as a, J as b, he as c, Z as d, H as f, ne as g, fe as h, ye as i, N as installDiagnostics, Y as l, V as m, lt as mountWidget, we as n, ge as o, X as p, be as r, _e as s, v as setLocale, ft as t, se as u, ue as v, R as w, ie as x, re as y };
|
|
1800
|
+
export { J as C, ee as D, te as E, ie as S, P as T, B as _, $ as a, he as b, _e as c, H as d, Z as f, X as g, V as h, xe as i, N as installDiagnostics, Y as l, le as m, pt as mountWidget, Ee as n, ve as o, ue as p, Se as r, ye as s, v as setLocale, gt as t, se as u, me as v, ae as w, pe as x, re as y };
|