@commentkit/comment-kit 0.7.7 → 1.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/CHANGELOG.md +87 -0
  2. package/README.md +172 -732
  3. package/SECURITY.md +24 -14
  4. package/dist/npm/THIRD_PARTY_NOTICES.txt +73 -0
  5. package/dist/npm/chunks/Guest-CKoV6pEK.js +157 -0
  6. package/dist/npm/chunks/MarkupEditor-DAo4qppg.js +199 -0
  7. package/dist/npm/chunks/Panel-BRBDHlGg.js +399 -0
  8. package/dist/npm/chunks/Shortcuts-CHMcrjAM.js +56 -0
  9. package/dist/npm/chunks/ThreadCard-D8FzIxbs.js +570 -0
  10. package/dist/npm/chunks/anchor-DT-Ynhh1.js +270 -0
  11. package/dist/npm/chunks/ar-D3SPpN1T.js +195 -0
  12. package/dist/npm/chunks/client-D1NizpDK.js +627 -0
  13. package/dist/{shared/capture-colors-D0uLr-vZ.js → npm/chunks/colors-CX-IPjvb.js} +2 -0
  14. package/dist/npm/chunks/de-C8eC6c6f.js +187 -0
  15. package/dist/npm/chunks/es-Bczf42tm.js +187 -0
  16. package/dist/npm/chunks/extension--it1LAj-.js +54 -0
  17. package/dist/npm/chunks/extension-XfuRGu2o.js +26 -0
  18. package/dist/npm/chunks/format-Bw_tNOh9.js +524 -0
  19. package/dist/npm/chunks/fr-BaQw-v2e.js +187 -0
  20. package/dist/npm/chunks/hi-BamV-yXv.js +187 -0
  21. package/dist/npm/chunks/html2canvas-DfGb8yka.js +4024 -0
  22. package/dist/npm/chunks/it-DC14_EjN.js +187 -0
  23. package/dist/npm/chunks/ja-B1mmTN7Y.js +187 -0
  24. package/dist/npm/chunks/mount-5fFig0k6.js +1447 -0
  25. package/dist/npm/chunks/nl-BfhqUsmX.js +187 -0
  26. package/dist/npm/chunks/privacy-DLhezjyi.js +30 -0
  27. package/dist/npm/chunks/pt-BR-CEPu4W5U.js +187 -0
  28. package/dist/{shared/pusher-CnhQgAvF.js → npm/chunks/pusher-BSsQoE1K.js} +224 -222
  29. package/dist/npm/chunks/realtime-CBRW9BB3.js +34 -0
  30. package/dist/npm/chunks/report-Dh4fxd4J.js +27 -0
  31. package/dist/npm/chunks/rolldown-runtime-Y_bBpyJl.js +20 -0
  32. package/dist/npm/chunks/src-DujplxfI.js +517 -0
  33. package/dist/npm/chunks/zh-CN-kgqjYwHQ.js +187 -0
  34. package/dist/npm/element.js +41 -0
  35. package/dist/npm/headless.js +3 -0
  36. package/dist/npm/index.js +3 -0
  37. package/dist/npm/react.js +26 -0
  38. package/dist/npm/svelte.js +17 -0
  39. package/dist/npm/types/adapters/react.d.ts +11 -0
  40. package/dist/npm/types/adapters/svelte.d.ts +9 -0
  41. package/dist/npm/types/adapters/vue.d.ts +118 -0
  42. package/dist/npm/types/anchor/index.d.ts +49 -0
  43. package/dist/npm/types/core/api.d.ts +31 -0
  44. package/dist/npm/types/core/auth.d.ts +87 -0
  45. package/dist/npm/types/core/client.d.ts +114 -0
  46. package/dist/npm/types/core/store.d.ts +7 -0
  47. package/dist/npm/types/core/types.d.ts +303 -0
  48. package/dist/npm/types/element.d.ts +13 -0
  49. package/dist/npm/types/headless.d.ts +7 -0
  50. package/dist/npm/types/index.d.ts +32 -0
  51. package/dist/npm/vue.js +71 -0
  52. package/package.json +71 -173
  53. package/dist/THIRD_PARTY_NOTICES.txt +0 -284
  54. package/dist/angular.es.js +0 -321
  55. package/dist/comment-kit.es.js +0 -218
  56. package/dist/demo.es.js +0 -483
  57. package/dist/headless.es.js +0 -4
  58. package/dist/preact.es.js +0 -117
  59. package/dist/qwik.es.js +0 -1
  60. package/dist/qwik.qwik.mjs +0 -114
  61. package/dist/react.es.js +0 -98
  62. package/dist/shared/ShadowRootContext-DD6a0QaI.js +0 -11
  63. package/dist/shared/annotation-icons-Dh-bmNYK.js +0 -172
  64. package/dist/shared/annotation-toolbar-zeiCmKIr.js +0 -1086
  65. package/dist/shared/attachment-refresh-DAacLaRu.js +0 -94
  66. package/dist/shared/bridge-CJoGYngu.js +0 -177
  67. package/dist/shared/button-D4GHW6oZ.js +0 -474
  68. package/dist/shared/button-group-BVR7iT-S.js +0 -91
  69. package/dist/shared/capture-privacy-CiOrcAlt.js +0 -101
  70. package/dist/shared/comment-drawing-canvas-Btc12IsS.js +0 -124
  71. package/dist/shared/comment-icon-D8JTCEJ7.js +0 -607
  72. package/dist/shared/comment-image-lightbox--QpbcAtH.js +0 -190
  73. package/dist/shared/comment-images-content-C_r4SHM-.js +0 -214
  74. package/dist/shared/comment-kit-core-CmLUFujd.js +0 -3682
  75. package/dist/shared/comment-kit-ui-BHwYuSIi.js +0 -19391
  76. package/dist/shared/comment-screenshot-annotator-zJZyO-XM.js +0 -151
  77. package/dist/shared/comment-screenshot-overlay-CoKTYB0J.js +0 -205
  78. package/dist/shared/comment-shortcut-groups-CfEmkitU.js +0 -153
  79. package/dist/shared/createReactComponent-BZHeRbD0.js +0 -45
  80. package/dist/shared/dev-export-panel-Cnt6oCZU.js +0 -207
  81. package/dist/shared/dev-grab-B85jo9AS.js +0 -197
  82. package/dist/shared/dist-D9A5k-N4.js +0 -617
  83. package/dist/shared/dom-Bhf4WFtY.js +0 -223
  84. package/dist/shared/element-selector-Cng84xC7.js +0 -902
  85. package/dist/shared/error-boundary-D3PD74vI.js +0 -21
  86. package/dist/shared/errors-Bu5ajEmB.js +0 -22
  87. package/dist/shared/icons-nzMOLzrm.js +0 -266
  88. package/dist/shared/input-UPtAj0M6.js +0 -111
  89. package/dist/shared/mount-ui-Dz7FB_Ak.js +0 -208
  90. package/dist/shared/realtime-recovery-BjlV-ewc.js +0 -162
  91. package/dist/shared/realtime-yGLX4wMK.js +0 -334
  92. package/dist/shared/request-activity-DQrAUwfA.js +0 -11
  93. package/dist/shared/screenshot-B5-hwpmt.js +0 -199
  94. package/dist/shared/separator-UhJb0Row.js +0 -3955
  95. package/dist/shared/shadow-root-B58ZI2yz.js +0 -133
  96. package/dist/shared/styles-CnYsLS2f.js +0 -2
  97. package/dist/shared/text-B4HHZNaa.js +0 -23
  98. package/dist/shared/token-session-D92MYbNu.js +0 -25
  99. package/dist/shared/useLabelableId-8n0QmH8N.js +0 -154
  100. package/dist/shared/useRender-Uxk1OPK-.js +0 -5
  101. package/dist/shared/useValueChanged-DKq5cMot.js +0 -92
  102. package/dist/shared/validation-3wbbbuX0.js +0 -70
  103. package/dist/shared/websocket-manager-KhH4hL0Q.js +0 -381
  104. package/dist/solid.es.js +0 -98
  105. package/dist/svelte.es.js +0 -130
  106. package/dist/types/adapters/bridge.d.ts +0 -122
  107. package/dist/types/angular/index.d.ts +0 -145
  108. package/dist/types/core/agent-context.d.ts +0 -17
  109. package/dist/types/core/api-client.d.ts +0 -155
  110. package/dist/types/core/comment-kit-core.d.ts +0 -254
  111. package/dist/types/core/local-demo.d.ts +0 -60
  112. package/dist/types/core/types.d.ts +0 -770
  113. package/dist/types/core/websocket-manager.d.ts +0 -125
  114. package/dist/types/core/write-access.d.ts +0 -11
  115. package/dist/types/demo.d.ts +0 -17
  116. package/dist/types/headless.d.ts +0 -8
  117. package/dist/types/index.d.ts +0 -87
  118. package/dist/types/preact/index.d.ts +0 -25
  119. package/dist/types/qwik/index.d.ts +0 -73
  120. package/dist/types/react/client.d.ts +0 -31
  121. package/dist/types/react/index.d.ts +0 -4
  122. package/dist/types/solid/index.d.ts +0 -37
  123. package/dist/types/svelte/index.d.ts +0 -55
  124. package/dist/types/utils/dom.d.ts +0 -59
  125. package/dist/types/utils/event-emitter.d.ts +0 -11
  126. package/dist/types/vue/index.d.ts +0 -87
  127. package/dist/vue.es.js +0 -148
  128. package/docs/api-reference.md +0 -405
  129. package/docs/local-demo.md +0 -60
@@ -0,0 +1,524 @@
1
+ import { a as e } from "./src-DujplxfI.js";
2
+ //#region node_modules/preact/dist/preact.mjs
3
+ var t, n, r, i, a, o, s, c, l, u, d = {}, f = [], p = /^m(i|n|o|s|text|space)$/, m = Array.isArray, h = f.slice, g = Object.assign;
4
+ function _(e) {
5
+ e && e.parentNode && e.remove();
6
+ }
7
+ function v(e, r, i, a, o) {
8
+ var s = {
9
+ type: e,
10
+ props: r,
11
+ key: i,
12
+ ref: a,
13
+ __k: null,
14
+ __: null,
15
+ __b: 0,
16
+ __e: null,
17
+ __c: null,
18
+ constructor: void 0,
19
+ __v: o || ++n,
20
+ __i: -1,
21
+ __u: 0
22
+ };
23
+ return !o && t.vnode && t.vnode(s), s;
24
+ }
25
+ function y(e) {
26
+ return e.children;
27
+ }
28
+ function b(e, t) {
29
+ this.props = e, this.context = t, this.__g = 0;
30
+ }
31
+ function x(e, t) {
32
+ if (t == null) return e.__ ? x(e.__, e.__i + 1) : null;
33
+ for (var n; t < e.__k.length; t++) if ((n = e.__k[t]) && n.__e) return n.__e;
34
+ return typeof e.type != "function" || e.props.__P ? null : x(e);
35
+ }
36
+ function S(e) {
37
+ if ((e = e.__) && e.__c && !e.props.__P) return e.__e = null, e.__k.some(function(t) {
38
+ return t && (e.__e = t.__e);
39
+ }), S(e);
40
+ }
41
+ function C(e) {
42
+ (8 & e.__g || !(e.__g |= 8) || !r.push(e) || a++) && i == t.debounceRendering || ((i = t.debounceRendering) || queueMicrotask)(w);
43
+ }
44
+ function w() {
45
+ var e, n, i, s, c, l, u, d, f;
46
+ try {
47
+ for (n = 1; r.length;) r.length > n && r.sort(o), e = r.shift(), n = r.length, 8 & e.__g && (s = void 0, c = void 0, l = (c = (i = e).__v).__e, u = [], d = [], (f = i.__P) && ((s = g({ constructor: void 0 }, c)).__v = c.__v + 1, t.vnode && t.vnode(s), j(f, s, c, i.__n, f.namespaceURI, 32 & c.__u ? [l] : null, u, l || x(c), 32 & c.__u, d), s.__v = c.__v, s.__.__k[s.__i] = s, N(u, s, d), c.__ = c.__e = null, s.__e != l && S(s)));
48
+ } finally {
49
+ r.length = a = 0;
50
+ }
51
+ }
52
+ function ee(e, t, n, r, i, a, o, s, c, l, u) {
53
+ var p, m, h, g, _, v, y = r.__k || f, b = t.length;
54
+ for (c = T(n, t, y, c, b), p = 0; p < b; p++) (h = n.__k[p]) != null && (m = ~h.__i && y[h.__i] || d, h.__i = p, v = j(e, h, m, i, a, o, s, c, l, u), g = h.__e, (m.ref != h.ref || 8 & m.__u) && (m.ref && P(m.ref, null, h, m), h.ref && u.push(h.ref, h.__c || g, h)), _ = _ || g, 4 & h.__u ? (c = E(h, c, e, !m.__v), m.__e && (m.__e = null)) : typeof h.type == "function" && v !== void 0 ? c = v : g && (c = g.nextSibling), h.__u &= -7);
55
+ return n.__e = _, c;
56
+ }
57
+ function T(e, t, n, r, i) {
58
+ var a, o, s, c, l, u, d, f, p, h, g = n.length, _ = g, b = 0, S = !1, C = e.__k = Array(i);
59
+ for (a = 0; a < i; a++) (o = t[a]) != null && typeof o != "boolean" && typeof o != "function" ? (typeof o != "object" || o.constructor == String ? o = C[a] = v(null, o) : m(o) ? o = C[a] = v(y, { children: o }) : o.constructor === void 0 && o.__b ? o = C[a] = v(o.type, o.props, o.key, o.ref, o.__v) : C[a] = o, c = a + b, o.__ = e, o.__b = e.__b + 1, s = null, ~(l = o.__i = D(o, n, c, _)) && (_--, (s = n[l]) && (s.__u |= 2)), s && s.__v ? (o.__u |= 2, l == c - 1 ? b-- : l == c + 1 ? b++ : l != c && (l > c ? b-- : b++, S = !0)) : (~l || (i > g ? b-- : i < g && b++), typeof o.type != "function" && (o.__u |= 4))) : C[a] = null;
60
+ if (S) {
61
+ for (u = [], d = [], a = 0; a < i; a++) if ((o = C[a]) && 2 & o.__u) {
62
+ for (f = 0, p = u.length; f < p;) u[h = f + p >> 1] < o.__i ? f = h + 1 : p = h;
63
+ u[f] = o.__i, d[a] = f + 1;
64
+ }
65
+ for (b = u.length; a--;) d[a] && (d[a] == b ? b-- : C[a].__u |= 4);
66
+ }
67
+ if (_) for (a = 0; a < g; a++) !(s = n[a]) || 2 & s.__u || (s.__e == r && (r = x(s)), F(s, s));
68
+ return r;
69
+ }
70
+ function E(e, t, n, r) {
71
+ var i, a, o;
72
+ if (typeof e.type == "function") {
73
+ if (e.props.__P) return t;
74
+ if (i = e.__k) for (a = 0; a < i.length; a++) i[a] && (i[a].__ = e, t = E(i[a], t, n, !1));
75
+ return t;
76
+ }
77
+ for (t && !t.parentNode && (t = x(e)) && !t.parentNode && (t = null), o = t; o && o.nodeType == 8;) o = o.nextSibling;
78
+ for (e.__e != o && (!r && n.moveBefore && e.__e.parentNode ? n.moveBefore(e.__e, t) : n.insertBefore(e.__e, t || null)), t = e.__e; (t = t && t.nextSibling) && t.nodeType == 8;);
79
+ return t;
80
+ }
81
+ function D(e, t, n, r) {
82
+ var i, a, o, s = e.key, c = e.type, l = t[n], u = l && !(2 & l.__u);
83
+ if (l === null && s == null || u && s == l.key && c == l.type) return n;
84
+ if (r > +!!u) {
85
+ for (i = n - 1, a = n + 1; i >= 0 || a < t.length;) if ((l = t[o = i >= 0 ? i-- : a++]) && !(2 & l.__u) && s == l.key && c == l.type) return o;
86
+ }
87
+ return -1;
88
+ }
89
+ function O(e, t, n) {
90
+ n ?? (n = ""), t[0] == "-" ? e.setProperty(t, n) : e[t] = n;
91
+ }
92
+ function k(e, t, n, r, i) {
93
+ var a, o;
94
+ n: if (t == "style") {
95
+ if (typeof n == "string") e.style.cssText = n;
96
+ else {
97
+ if (typeof r == "string" && (e.style.cssText = r = ""), r) for (t in r) n && t in n || O(e.style, t, "");
98
+ if (n) for (t in n) r && n[t] == r[t] || O(e.style, t, n[t]);
99
+ }
100
+ } else if (t[0] == "o" && t[1] == "n") (e.__e || (e.__e = {}))[t] = n, n && r || (o = u[t] || (u[t] = A(t)), (e.__a || (e.__a = {}))[t] = l, a = t != (t = t.replace(c, "$1")), (t = t.slice(2))[0] < "a" && (t = t.toLowerCase()), n ? e.addEventListener(t, o, a) : e.removeEventListener(t, o, a));
101
+ else {
102
+ if (i == "http://www.w3.org/2000/svg") t = t.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
103
+ else if (t != "width" && t != "height" && t != "href" && t != "list" && t != "form" && t != "tabIndex" && t != "download" && t != "rowSpan" && t != "colSpan" && t != "role" && t != "popover" && t in e) try {
104
+ e[t] = n ?? "";
105
+ break n;
106
+ } catch {}
107
+ typeof n == "function" || (n == null || !1 === n && t[4] != "-" ? e.removeAttribute(t) : e.setAttribute(t, t == "popover" && n == 1 ? "" : n));
108
+ }
109
+ }
110
+ function A(e) {
111
+ return function(n) {
112
+ if (this.__e) {
113
+ var r = this.__e[e];
114
+ if (n[s] == null) n[s] = l++;
115
+ else if (n[s] < this.__a[e]) return;
116
+ return r(t.event ? t.event(n) : n);
117
+ }
118
+ };
119
+ }
120
+ function j(e, n, r, i, a, o, s, c, l, u) {
121
+ var d, p, h, v, S, C, w, T, E, D, O, k, A, j, N, P, I, L, R, z, B = n.type;
122
+ if (n.constructor !== void 0) return null;
123
+ if (128 & r.__u && (l = 32 & r.__u, d = r.__c.__z)) {
124
+ if (n.__u |= l, p = o = [], d.nodeType == 8) for (h = 1, v = d.nextSibling; v; v = v.nextSibling) {
125
+ if (v.nodeType == 8) {
126
+ if (v.data.startsWith("$s")) h++;
127
+ else if (v.data.startsWith("/$s") && !--h) break;
128
+ }
129
+ o.push(v);
130
+ }
131
+ else o.push(d);
132
+ c = o[0];
133
+ }
134
+ (d = t.__b) && d(n);
135
+ n: if (typeof B == "function") {
136
+ S = s.length;
137
+ try {
138
+ if (D = n.props, O = (d = B.prototype) && d.render, k = (d = B.contextType) && i[d.__c], A = d ? k ? k.props.value : d.__ : i, r.__c ? 2 & (C = n.__c = r.__c).__g && (C.__g |= 1) : (O ? n.__c = C = new B(D, A) : (n.__c = C = new b(D, A), C.constructor = B, C.render = ne), k && k.sub(C), C.state || (C.state = {}), C.__n = i, C.__g |= 8, C.__h = [], C.__k = []), O && (C.__s || (C.__s = C.state), B.getDerivedStateFromProps && (C.__s == C.state && (C.__s = g({}, C.__s)), g(C.__s, B.getDerivedStateFromProps(D, C.__s)))), w = C.props, T = C.state, C.__v = n, r.__c) {
139
+ if (O && !B.getDerivedStateFromProps && D !== w && C.componentWillReceiveProps && C.componentWillReceiveProps(D, A), n.__v == r.__v && !(8 & C.__g) || !(4 & C.__g) && C.shouldComponentUpdate && !1 === C.shouldComponentUpdate(D, C.__s, A)) {
140
+ n.__v != r.__v && (C.props = D, C.state = C.__s, C.__g &= -9), n.__e = r.__e, n.__k = r.__k, n.__k.some(function(e) {
141
+ e && (e.__ = n);
142
+ }), f.push.apply(C.__h, C.__k), C.__k = [], C.__h.length && s.push(C), c = x(r);
143
+ break n;
144
+ }
145
+ C.componentWillUpdate && C.componentWillUpdate(D, C.__s, A), O && C.componentDidUpdate && C.__h.push(function() {
146
+ C.componentDidUpdate(w, T, E);
147
+ });
148
+ } else O && !B.getDerivedStateFromProps && C.componentWillMount && C.componentWillMount(), O && C.componentDidMount && C.__h.push(C.componentDidMount);
149
+ if (C.context = A, C.props = D, C.__P = e, C.__g &= -5, j = t.__r, N = 0, O) C.state = C.__s, C.__g &= -9, j && j(n), d = C.render(C.props, C.state, C.context), f.push.apply(C.__h, C.__k), C.__k = [];
150
+ else do
151
+ C.__g &= -9, j && j(n), d = C.render(C.props, C.state, C.context), C.state = C.__s;
152
+ while (8 & C.__g && ++N < 25);
153
+ C.state = C.__s, C.getChildContext && (i = g({}, i, C.getChildContext())), O && r.__c && C.getSnapshotBeforeUpdate && (E = C.getSnapshotBeforeUpdate(w, T)), P = d && d.type === y && d.key == null ? d.props.children : d, D.__P && (d = c, a = (e = D.__P).namespaceURI, l = o = null, r.props && r.props.__P != e && (r.__k.some(function(e) {
154
+ e && F(e, e);
155
+ }), r.__k = null), c = r.__k ? x(r, 0) : null), c = ee(e, m(P) ? P : [P], n, r, i, a, o, s, c, l, u), D.__P && (n.__e = null, c = d), n.__u &= -161, 128 & r.__u && (C.__z = null), p && p.some(_), C.__h.length && s.push(C), 1 & C.__g && (C.__g &= -4);
156
+ } catch (e) {
157
+ if (s.length = S, n.__v = null, l || o) {
158
+ if (e.then) {
159
+ if (I = 0, n.__u |= l ? 160 : 128, o) {
160
+ for (~(R = o.indexOf(c || void 0)) || (R = o.length); (z = o[R - 1]) && z.nodeType == 8;) R--;
161
+ for (; R < o.length; R++) if (z = o[R]) {
162
+ if (o[R] = null, z.nodeType == 8) {
163
+ if (z.data.startsWith("$s")) I++ || (L = z);
164
+ else if (I && z.data.startsWith("/$s") && !--I) {
165
+ c = z;
166
+ break;
167
+ }
168
+ } else if (!I) break;
169
+ }
170
+ }
171
+ if (!L) {
172
+ for (; c && c.nodeType == 8 && c.nextSibling;) c = c.nextSibling;
173
+ L = c;
174
+ }
175
+ n.__c.__z || (n.__c.__z = L), n.__e = c;
176
+ } else o && o.some(_);
177
+ } else n.__e = r.__e;
178
+ n.__k || (n.__k = r.__k || []), e.then || M(n), t.__e(e, n, r);
179
+ }
180
+ } else c = n.__e = te(r.__e, n, r, i, a, o, s, l, u, e);
181
+ return (d = t.diffed) && d(n), 128 & n.__u ? void 0 : c;
182
+ }
183
+ function M(e) {
184
+ e && (e.__c && (e.__c.__g |= 4), e.__k && e.__k.some(M));
185
+ }
186
+ function N(e, n, r) {
187
+ for (var i = 0; i < r.length;) P(r[i++], r[i++], r[i++]);
188
+ t.__c && t.__c(n, e), e.some(function(n) {
189
+ try {
190
+ e = n.__h, n.__h = [], e.some(function(e) {
191
+ e.call(n);
192
+ });
193
+ } catch (e) {
194
+ t.__e(e, n.__v);
195
+ }
196
+ });
197
+ }
198
+ function te(e, n, r, i, a, o, s, c, l, u) {
199
+ var f, g, v, y, b, S, C, w, T, E = r.props || d, D = n.props, O = n.type;
200
+ if (O == "svg" ? a = "http://www.w3.org/2000/svg" : O == "math" ? a = "http://www.w3.org/1998/Math/MathML" : a || (a = "http://www.w3.org/1999/xhtml"), o) {
201
+ for (f = 0; f < o.length; f++) if ((b = o[f]) && (O ? b.localName == O : b.nodeType == 3)) {
202
+ e = b, o[f] = null;
203
+ break;
204
+ }
205
+ }
206
+ if (!e) {
207
+ if (w = u.ownerDocument || document, !O) return w.createTextNode(D);
208
+ e = w.createElementNS(a, O, D.is && D), c && (t.__m && t.__m(n, o), c = !1), o = null;
209
+ }
210
+ if (O) {
211
+ if (u = O == "template" ? e.content : e, o = O == "textarea" && D.defaultValue != null ? null : o && h.call(u.childNodes), !c && o) for (E = {}, f = 0; f < e.attributes.length; f++) E[(b = e.attributes[f]).name] = b.value;
212
+ for (f in E) b = E[f], f == "dangerouslySetInnerHTML" ? v = b : f == "children" || f in D || f == "value" && "defaultValue" in D || f == "checked" && "defaultChecked" in D || k(e, f, null, b, a);
213
+ for (f in T = 1 & r.__u, D) b = D[f], f == "children" ? y = b : f == "dangerouslySetInnerHTML" ? g = b : f == "value" ? S = b : f == "checked" ? C = b : c && typeof b != "function" || !(E[f] !== b || T && b != null) || k(e, f, b, E[f], a);
214
+ g ? (c || v && (g.__html == v.__html || g.__html == e.innerHTML) || (e.innerHTML = g.__html), n.__k = []) : (v && (e.textContent = ""), (O == "foreignObject" || a == "http://www.w3.org/1998/Math/MathML" && p.test(O)) && (a = "http://www.w3.org/1999/xhtml"), ee(u, m(y) ? y : [y], n, r, i, a, o, s, o ? o[0] : r.__k && x(r, 0), c, l), o && o.some(_)), c && O != "textarea" || (f = "value", O == "progress" && S == null ? e.removeAttribute(f) : S == null || S === e[f] && (O != "progress" || S) || k(e, f, S, E[f], a), f = "checked", C != null && C != e[f] && k(e, f, C, E[f], a));
215
+ } else E === D || c && e.data == D || (e.data = D);
216
+ return e;
217
+ }
218
+ function P(e, n, r, i) {
219
+ try {
220
+ typeof e == "function" ? n ? n.__x = e(n) || 1 : i && (i = i.__c || i.__e) && (n = i.__x) && (i.__x = null, typeof n == "function" ? n() : e(null)) : e.current = n;
221
+ } catch (e) {
222
+ t.__e(e, r);
223
+ }
224
+ }
225
+ function F(e, n, r) {
226
+ var i, a;
227
+ if (t.unmount && t.unmount(e), !(i = e.ref) || i.current && i.current != e.__e || P(i, null, n, e), i = e.__c) {
228
+ if (i.componentWillUnmount) try {
229
+ i.componentWillUnmount();
230
+ } catch (e) {
231
+ t.__e(e, n);
232
+ }
233
+ i.__P = i.__n = null;
234
+ }
235
+ if (i = e.__k) for (a = 0; a < i.length; a++) i[a] && F(i[a], n, typeof e.type != "function" || r && !e.props.__P);
236
+ (i = e.__e) && (r || _(i), i.__e && (i.__e = null)), e.__e = e.__c = e.__ = null;
237
+ }
238
+ function ne(e, t, n) {
239
+ return this.constructor(e, n);
240
+ }
241
+ function I(e, n) {
242
+ var r, i, a, o;
243
+ t.__ && t.__(e, n), n.nodeType == 9 && (n = n.documentElement), i = (r = e && 32 & e.__u) ? null : n.__k, n.__k = v(y, { children: [e] }), a = [], o = [], j(n, n.__k, i || d, d, n.namespaceURI, i ? null : n.firstChild ? h.call(n.childNodes) : null, a, i ? i.__e : n.firstChild, r, o), N(a, n.__k, o), n.__k.props.children = null;
244
+ }
245
+ t = { __e: function(e, t, n, r) {
246
+ for (var i, o, s; t = t.__;) if ((i = t.__c) && !(1 & i.__g)) {
247
+ i.__g |= 4;
248
+ try {
249
+ if ((o = i.constructor) && o.getDerivedStateFromError && (i.setState(o.getDerivedStateFromError(e)), s = 8 & i.__g), i.componentDidCatch && (i.componentDidCatch(e, r || {}), s = 8 & i.__g), s) return void (i.__g |= 2);
250
+ } catch (t) {
251
+ e = t, s = 0;
252
+ }
253
+ }
254
+ throw a = 0, e;
255
+ } }, n = 0, b.prototype.setState = function(e, t) {
256
+ var n = this.__s;
257
+ n && n != this.state || (n = this.__s = g({}, this.state)), typeof e == "function" && (e = e(g({}, n), this.props)), e && (g(n, e), this.__v && (t && this.__k.push(t), C(this)));
258
+ }, b.prototype.forceUpdate = function(e) {
259
+ this.__v && (this.__g |= 4, e && this.__h.push(e), C(this));
260
+ }, b.prototype.render = y, r = [], a = 0, o = function(e, t) {
261
+ return e.__v.__b - t.__v.__b;
262
+ }, s = Symbol(), c = /(PointerCapture)$|Capture$/i, l = 0, u = {};
263
+ //#endregion
264
+ //#region node_modules/preact/hooks/dist/hooks.mjs
265
+ var L, R, z, B, V = Object.is, H = 0, U = [], W = [], G = t, K = G.__b, q = G.__r, re = G.diffed, ie = G.__c, ae = G.unmount, oe = G.__;
266
+ function J(e, t) {
267
+ G.__h && G.__h(R, e, H || t), H = 0;
268
+ var n = R.__H || (R.__H = {
269
+ __: [],
270
+ __h: []
271
+ });
272
+ return e >= n.__.length && n.__.push({}), n.__[e];
273
+ }
274
+ function se(e) {
275
+ return H = 1, ce(_e, e);
276
+ }
277
+ function ce(e, t, n) {
278
+ var r = J(L++, 2);
279
+ if (r.t = e, !r.__c && (r.__ = [n ? n(t) : _e(void 0, t), function(e) {
280
+ var t = r.__N ? r.__N[0] : r.__[0], n = r.t(t, e);
281
+ V(t, n) || (r.__N = [n, r.__[1]], r.__c.setState({}));
282
+ }], r.__c = R, !R.__f)) {
283
+ R.__f = !0;
284
+ var i = R.shouldComponentUpdate;
285
+ R.shouldComponentUpdate = function(e, t, n) {
286
+ var r = this.__H;
287
+ if (!r) return !0;
288
+ var a = !1, o = this.props != e;
289
+ if (r.__.some(function(e) {
290
+ e.__N && (a = !0, V(e.__[0], e.__N[0]) || (o = !0));
291
+ }), i) {
292
+ var s = i.call(this, e, t, n);
293
+ return a ? s || o : s;
294
+ }
295
+ return !a || o;
296
+ };
297
+ }
298
+ return r.__;
299
+ }
300
+ function le(e, t) {
301
+ var n = J(L++, 3);
302
+ !G.__s && ge(n.__H, t) && (n.__P = !0, n.__ = e, n.u = t, R.__H.__h.push(n));
303
+ }
304
+ function ue(e) {
305
+ return H = 5, Y(function() {
306
+ return { current: e };
307
+ }, []);
308
+ }
309
+ function Y(e, t) {
310
+ var n = J(L++, 7);
311
+ return ge(n.__H, t) && (n.__ = e(), n.__H = t), n.__;
312
+ }
313
+ function de(e, t) {
314
+ return H = 8, Y(function() {
315
+ return e;
316
+ }, t);
317
+ }
318
+ function fe() {
319
+ var e;
320
+ do {
321
+ for (; e = W.shift();) try {
322
+ X(e);
323
+ } catch (t) {
324
+ G.__e(t, { __: (e = e.__P) && e.__v });
325
+ }
326
+ for (; e = U.shift();) {
327
+ var t = e.__H;
328
+ if (e.__P && t) try {
329
+ t.__h.some(X), t.__h.some(Z), t.__h = [];
330
+ } catch (n) {
331
+ t.__h = [], G.__e(n, e.__v);
332
+ }
333
+ }
334
+ } while (W.length);
335
+ }
336
+ G.__b = function(e) {
337
+ R = null, K && K(e);
338
+ }, G.__ = function(e, t) {
339
+ e && t.__k && t.__k.__m && (e.__m = t.__k.__m), oe && oe(e, t);
340
+ }, G.__r = function(e) {
341
+ q && q(e), L = 0;
342
+ var t = (R = e.__c).__H;
343
+ t && (z == R ? R.__h = [] : (t.__h.some(X), t.__h.some(Z), L = 0), t.__h = [], t.__.some(function(e) {
344
+ e.__N && (e.__ = e.__N), e.u = e.__N = void 0;
345
+ })), z = R;
346
+ }, G.diffed = function(e) {
347
+ re && re(e);
348
+ var t = e.__c;
349
+ t && t.__H && (t.__H.__h.length && he(U.push(t)), t.__H.__.some(function(e) {
350
+ e.u && (e.__H = e.u);
351
+ })), z = R = null;
352
+ }, G.__c = function(e, t) {
353
+ t.some(function(e) {
354
+ try {
355
+ e.__h.some(X), e.__h = e.__h.filter(function(e) {
356
+ return !e.__ || Z(e);
357
+ });
358
+ } catch (n) {
359
+ t.some(function(e) {
360
+ e.__h && (e.__h = []);
361
+ }), t = [], G.__e(n, e.__v);
362
+ }
363
+ }), ie && ie(e, t);
364
+ }, G.unmount = function(e) {
365
+ ae && ae(e);
366
+ var t, n, r = e.__c;
367
+ r && r.__H && (r.__H.__.some(function(r) {
368
+ try {
369
+ if (r.__P && r.__c) {
370
+ if (n === void 0) {
371
+ for (n = e.__; n && (!n.__c || !n.__c.__P);) n = n.__;
372
+ n = n && n.__c;
373
+ }
374
+ r.__P = n, he(W.push(r));
375
+ } else X(r);
376
+ } catch (e) {
377
+ t = e;
378
+ }
379
+ }), r.__H = void 0, t && G.__e(t, r.__v));
380
+ };
381
+ var pe = typeof requestAnimationFrame == "function";
382
+ function me(e) {
383
+ var t, n = function() {
384
+ clearTimeout(r), pe && cancelAnimationFrame(t), setTimeout(e);
385
+ }, r = setTimeout(n, 35);
386
+ pe && (t = requestAnimationFrame(n));
387
+ }
388
+ function he(e) {
389
+ e != 1 && B == G.requestAnimationFrame || ((B = G.requestAnimationFrame) || me)(fe);
390
+ }
391
+ function X(e) {
392
+ var t = R, n = e.__c;
393
+ typeof n == "function" && (e.__c = void 0, n()), R = t;
394
+ }
395
+ function Z(e) {
396
+ var t = R;
397
+ e.__c = e.__(), R = t;
398
+ }
399
+ function ge(e, t) {
400
+ return !e || e.length != t.length || t.some(function(t, n) {
401
+ return !V(t, e[n]);
402
+ });
403
+ }
404
+ function _e(e, t) {
405
+ return typeof t == "function" ? t(e) : t;
406
+ }
407
+ //#endregion
408
+ //#region node_modules/preact/jsx-runtime/dist/jsxRuntime.mjs
409
+ var ve = 0;
410
+ Array.isArray;
411
+ function Q(e, n, r, i, a, o) {
412
+ n || (n = {});
413
+ var s, c, l = n;
414
+ if ("ref" in l && typeof e != "function") for (c in l = {}, n) c == "ref" ? s = n[c] : l[c] = n[c];
415
+ var u = {
416
+ type: e,
417
+ props: l,
418
+ key: r,
419
+ ref: s,
420
+ __k: null,
421
+ __: null,
422
+ __b: 0,
423
+ __e: null,
424
+ __c: null,
425
+ constructor: void 0,
426
+ __v: --ve,
427
+ __i: -1,
428
+ __u: 0
429
+ };
430
+ return (a || o) && (u.__source = a, u.__self = o), t.vnode && t.vnode(u), u;
431
+ }
432
+ //#endregion
433
+ //#region src/ui/format.tsx
434
+ function ye(e, t) {
435
+ return !!t && e.id !== null && e.id === t.person.id && e.type === t.person.type;
436
+ }
437
+ function be(e, t = innerWidth) {
438
+ return !!e.breakpoint && Math.abs(e.breakpoint - t) > 200;
439
+ }
440
+ var xe = (e) => e < 600 ? "phone" : e < 1024 ? "tablet" : "wide", $ = (e) => `${Math.round(e * 100) / 100}px`, Se = (e, t, n, r) => ({
441
+ left: $(e),
442
+ top: $(t),
443
+ ...n === void 0 ? {} : { width: $(n) },
444
+ ...r === void 0 ? {} : { height: $(r) }
445
+ });
446
+ function Ce({ text: e }) {
447
+ let t = e.split("\n");
448
+ return /* @__PURE__ */ Q(y, { children: t.map((e, n) => /* @__PURE__ */ Q(y, { children: [Ee(e), n < t.length - 1 ? /* @__PURE__ */ Q("br", {}) : null] })) });
449
+ }
450
+ var we = /(\*\*[^*]+\*\*|\*[^*]+\*|`[^`]+`|https?:\/\/[^\s<>"')\u200b-\u200f\u202a-\u202e\u2060-\u2069\ufeff]+)/g;
451
+ function Te(e, t = "link") {
452
+ if (!e) return null;
453
+ try {
454
+ let n = new URL(e);
455
+ return n.protocol === "https:" || n.protocol === "http:" || t === "link" && n.protocol === "mailto:" ? n.href : null;
456
+ } catch {
457
+ return null;
458
+ }
459
+ }
460
+ function Ee(e) {
461
+ let t = [], n = 0;
462
+ for (let r of e.matchAll(we)) {
463
+ let i = r[0], a = r.index ?? 0;
464
+ if (a > n && t.push(e.slice(n, a)), i.startsWith("**")) t.push(/* @__PURE__ */ Q("strong", { children: i.slice(2, -2) }));
465
+ else if (i.startsWith("`")) t.push(/* @__PURE__ */ Q("code", { children: i.slice(1, -1) }));
466
+ else if (i.startsWith("*")) t.push(/* @__PURE__ */ Q("em", { children: i.slice(1, -1) }));
467
+ else {
468
+ let e = Te(i);
469
+ t.push(e ? /* @__PURE__ */ Q("a", {
470
+ href: e,
471
+ target: "_blank",
472
+ rel: "noopener noreferrer nofollow ugc",
473
+ children: i
474
+ }) : i);
475
+ }
476
+ n = a + i.length;
477
+ }
478
+ return n < e.length && t.push(e.slice(n)), t;
479
+ }
480
+ function De({ person: e }) {
481
+ let t = e.name.split(/\s+/).map((e) => e[0]).slice(0, 2).join("").toUpperCase() || "?";
482
+ return /* @__PURE__ */ Q("span", {
483
+ class: "ck-avatar",
484
+ "aria-hidden": "true",
485
+ children: e.avatar_url && /^https:\/\//.test(e.avatar_url) ? /* @__PURE__ */ Q("img", {
486
+ src: e.avatar_url,
487
+ alt: "",
488
+ referrerPolicy: "no-referrer"
489
+ }) : t
490
+ });
491
+ }
492
+ function Oe({ status: t }) {
493
+ return /* @__PURE__ */ Q("span", {
494
+ class: "ck-status",
495
+ "data-status": t,
496
+ children: e(`status_${t}`)
497
+ });
498
+ }
499
+ function ke({ name: e, size: t = 18 }) {
500
+ return /* @__PURE__ */ Q("svg", {
501
+ width: t,
502
+ height: t,
503
+ viewBox: "0 0 24 24",
504
+ fill: "none",
505
+ stroke: "currentColor",
506
+ "stroke-width": "2",
507
+ "stroke-linecap": "round",
508
+ "stroke-linejoin": "round",
509
+ "aria-hidden": "true",
510
+ children: /* @__PURE__ */ Q("path", { d: {
511
+ comment: "M4 5h16v11H8l-4 4z",
512
+ inbox: "M4 13l2-8h12l2 8M4 13v6h16v-6M4 13h5l1 2h4l1-2h5",
513
+ close: "M6 6l12 12M18 6L6 18",
514
+ more: "M5 12h.01M12 12h.01M19 12h.01",
515
+ image: "M4 5h16v14H4zM4 15l4-4 4 4 3-3 5 5M15 9h.01",
516
+ paperclip: "M8 12l6-6a3 3 0 0 1 4 4l-8 8a5 5 0 0 1-7-7l7-7",
517
+ pen: "M4 20l4-1 11-11-3-3L5 16zM14 6l3 3",
518
+ check: "M5 12l4 4 10-10",
519
+ user: "M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM4 20a8 8 0 0 1 16 0"
520
+ }[e] })
521
+ });
522
+ }
523
+ //#endregion
524
+ export { b as _, Se as a, $ as c, Q as d, le as f, de as g, se as h, Oe as i, Te as l, Y as m, ke as n, ye as o, ue as p, Ce as r, be as s, De as t, xe as u, I as v, y };