@alfadocs/ui-kit-debug 1.39.0 → 1.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/dist/_chunks/{ai-consent-banner-DvtaM3yg.js → ai-consent-banner-D7I2U-cz.js} +37 -36
  2. package/dist/_chunks/ai-consent-banner-D7I2U-cz.js.map +1 -0
  3. package/dist/_chunks/{booking-Dn3jvv3K.js → booking-D43ASl8y.js} +1109 -1103
  4. package/dist/_chunks/booking-D43ASl8y.js.map +1 -0
  5. package/dist/_chunks/{calendar-workspace-B-fUbm62.js → calendar-workspace-SN23GsXX.js} +2154 -2148
  6. package/dist/_chunks/calendar-workspace-SN23GsXX.js.map +1 -0
  7. package/dist/_chunks/{notes-panel-CAD1Ytcj.js → notes-panel-CmTqIWlS.js} +76 -73
  8. package/dist/_chunks/notes-panel-CmTqIWlS.js.map +1 -0
  9. package/dist/_chunks/{rich-text-editor-C6fE-uP4.js → rich-text-editor-BJ1-Lkao.js} +1023 -931
  10. package/dist/_chunks/rich-text-editor-BJ1-Lkao.js.map +1 -0
  11. package/dist/agent-catalog.json +1 -1
  12. package/dist/components/ai-consent-banner/ai-consent-banner.d.ts +9 -0
  13. package/dist/components/ai-consent-banner/ai-consent-banner.d.ts.map +1 -1
  14. package/dist/components/ai-consent-banner/index.d.ts +1 -1
  15. package/dist/components/ai-consent-banner/index.d.ts.map +1 -1
  16. package/dist/components/ai-consent-banner/index.js +1 -1
  17. package/dist/components/booking/booking-types.d.ts +6 -0
  18. package/dist/components/booking/booking-types.d.ts.map +1 -1
  19. package/dist/components/booking/booking.d.ts.map +1 -1
  20. package/dist/components/booking/cascade.d.ts +6 -0
  21. package/dist/components/booking/cascade.d.ts.map +1 -1
  22. package/dist/components/booking/index.js +1 -1
  23. package/dist/components/notes-panel/index.d.ts +1 -0
  24. package/dist/components/notes-panel/index.d.ts.map +1 -1
  25. package/dist/components/notes-panel/index.js +1 -1
  26. package/dist/components/notes-panel/notes-panel.d.ts +8 -1
  27. package/dist/components/notes-panel/notes-panel.d.ts.map +1 -1
  28. package/dist/components/rich-text-editor/index.d.ts +1 -1
  29. package/dist/components/rich-text-editor/index.d.ts.map +1 -1
  30. package/dist/components/rich-text-editor/index.js +1 -1
  31. package/dist/components/rich-text-editor/rich-text-editor.d.ts +48 -0
  32. package/dist/components/rich-text-editor/rich-text-editor.d.ts.map +1 -1
  33. package/dist/i18n/locales/ar.d.ts +13 -11
  34. package/dist/i18n/locales/ar.d.ts.map +1 -1
  35. package/dist/i18n/locales/ar.js +14 -12
  36. package/dist/i18n/locales/ar.js.map +1 -1
  37. package/dist/i18n/locales/de.d.ts +13 -11
  38. package/dist/i18n/locales/de.d.ts.map +1 -1
  39. package/dist/i18n/locales/de.js +14 -12
  40. package/dist/i18n/locales/de.js.map +1 -1
  41. package/dist/i18n/locales/el.d.ts +13 -11
  42. package/dist/i18n/locales/el.d.ts.map +1 -1
  43. package/dist/i18n/locales/el.js +14 -12
  44. package/dist/i18n/locales/el.js.map +1 -1
  45. package/dist/i18n/locales/en.d.ts +2 -0
  46. package/dist/i18n/locales/en.d.ts.map +1 -1
  47. package/dist/i18n/locales/en.js +3 -1
  48. package/dist/i18n/locales/en.js.map +1 -1
  49. package/dist/i18n/locales/es.d.ts +13 -11
  50. package/dist/i18n/locales/es.d.ts.map +1 -1
  51. package/dist/i18n/locales/es.js +14 -12
  52. package/dist/i18n/locales/es.js.map +1 -1
  53. package/dist/i18n/locales/fr.d.ts +13 -11
  54. package/dist/i18n/locales/fr.d.ts.map +1 -1
  55. package/dist/i18n/locales/fr.js +14 -12
  56. package/dist/i18n/locales/fr.js.map +1 -1
  57. package/dist/i18n/locales/hi.d.ts +13 -11
  58. package/dist/i18n/locales/hi.d.ts.map +1 -1
  59. package/dist/i18n/locales/hi.js +14 -12
  60. package/dist/i18n/locales/hi.js.map +1 -1
  61. package/dist/i18n/locales/it.d.ts +13 -11
  62. package/dist/i18n/locales/it.d.ts.map +1 -1
  63. package/dist/i18n/locales/it.js +14 -12
  64. package/dist/i18n/locales/it.js.map +1 -1
  65. package/dist/i18n/locales/ja.d.ts +13 -11
  66. package/dist/i18n/locales/ja.d.ts.map +1 -1
  67. package/dist/i18n/locales/ja.js +14 -12
  68. package/dist/i18n/locales/ja.js.map +1 -1
  69. package/dist/i18n/locales/nl.d.ts +13 -11
  70. package/dist/i18n/locales/nl.d.ts.map +1 -1
  71. package/dist/i18n/locales/nl.js +14 -12
  72. package/dist/i18n/locales/nl.js.map +1 -1
  73. package/dist/i18n/locales/pl.d.ts +13 -11
  74. package/dist/i18n/locales/pl.d.ts.map +1 -1
  75. package/dist/i18n/locales/pl.js +14 -12
  76. package/dist/i18n/locales/pl.js.map +1 -1
  77. package/dist/i18n/locales/pt.d.ts +13 -11
  78. package/dist/i18n/locales/pt.d.ts.map +1 -1
  79. package/dist/i18n/locales/pt.js +14 -12
  80. package/dist/i18n/locales/pt.js.map +1 -1
  81. package/dist/i18n/locales/ro.d.ts +13 -11
  82. package/dist/i18n/locales/ro.d.ts.map +1 -1
  83. package/dist/i18n/locales/ro.js +14 -12
  84. package/dist/i18n/locales/ro.js.map +1 -1
  85. package/dist/i18n/locales/ru.d.ts +13 -11
  86. package/dist/i18n/locales/ru.d.ts.map +1 -1
  87. package/dist/i18n/locales/ru.js +14 -12
  88. package/dist/i18n/locales/ru.js.map +1 -1
  89. package/dist/i18n/locales/sq.d.ts +13 -11
  90. package/dist/i18n/locales/sq.d.ts.map +1 -1
  91. package/dist/i18n/locales/sq.js +14 -12
  92. package/dist/i18n/locales/sq.js.map +1 -1
  93. package/dist/i18n/locales/sv.d.ts +13 -11
  94. package/dist/i18n/locales/sv.d.ts.map +1 -1
  95. package/dist/i18n/locales/sv.js +14 -12
  96. package/dist/i18n/locales/sv.js.map +1 -1
  97. package/dist/i18n/locales/tr.d.ts +13 -11
  98. package/dist/i18n/locales/tr.d.ts.map +1 -1
  99. package/dist/i18n/locales/tr.js +14 -12
  100. package/dist/i18n/locales/tr.js.map +1 -1
  101. package/dist/i18n/locales/zh.d.ts +13 -11
  102. package/dist/i18n/locales/zh.d.ts.map +1 -1
  103. package/dist/i18n/locales/zh.js +14 -12
  104. package/dist/i18n/locales/zh.js.map +1 -1
  105. package/dist/index.js +5 -5
  106. package/dist/locales/ar.json +14 -12
  107. package/dist/locales/de.json +14 -12
  108. package/dist/locales/el.json +14 -12
  109. package/dist/locales/en.json +3 -1
  110. package/dist/locales/es.json +14 -12
  111. package/dist/locales/fr.json +14 -12
  112. package/dist/locales/hi.json +14 -12
  113. package/dist/locales/it.json +14 -12
  114. package/dist/locales/ja.json +14 -12
  115. package/dist/locales/nl.json +14 -12
  116. package/dist/locales/pl.json +14 -12
  117. package/dist/locales/pt.json +14 -12
  118. package/dist/locales/ro.json +14 -12
  119. package/dist/locales/ru.json +14 -12
  120. package/dist/locales/sq.json +14 -12
  121. package/dist/locales/sv.json +14 -12
  122. package/dist/locales/tr.json +14 -12
  123. package/dist/locales/zh.json +14 -12
  124. package/dist/patterns/calendar/calendar-workspace.d.ts.map +1 -1
  125. package/dist/patterns/calendar/calendar.journey.d.ts +9 -1
  126. package/dist/patterns/calendar/calendar.journey.d.ts.map +1 -1
  127. package/dist/patterns/calendar/calendar.sheets.d.ts +6 -1
  128. package/dist/patterns/calendar/calendar.sheets.d.ts.map +1 -1
  129. package/dist/patterns/calendar/index.js +1 -1
  130. package/package.json +1 -1
  131. package/dist/_chunks/ai-consent-banner-DvtaM3yg.js.map +0 -1
  132. package/dist/_chunks/booking-Dn3jvv3K.js.map +0 -1
  133. package/dist/_chunks/calendar-workspace-B-fUbm62.js.map +0 -1
  134. package/dist/_chunks/notes-panel-CAD1Ytcj.js.map +0 -1
  135. package/dist/_chunks/rich-text-editor-C6fE-uP4.js.map +0 -1
@@ -1,193 +1,195 @@
1
- import { jsx as e, jsxs as v, Fragment as ke } from "react/jsx-runtime";
2
- import { useId as de, useState as _, useRef as D, useCallback as k, useEffect as Z, Fragment as He, forwardRef as Pt, useMemo as st, useImperativeHandle as Ot } from "react";
3
- import { c as Ge } from "./index-D2ZczOXr.js";
4
- import { useTranslation as ee } from "react-i18next";
5
- import { SafeHtml as qt, sanitiseHtml as jt } from "../safe-html/index.js";
6
- import { u as Ft } from "./registry-DvAUVLHh.js";
7
- import { S as gt } from "./spinner-hbwuKwMf.js";
8
- import { I as F } from "./icon-button-CehAeZoP.js";
9
- import { T as Bt } from "./text-area-Bt3p7Pt0.js";
10
- import { E as Kt } from "./editor-overlay-9tcPXNWt.js";
11
- import { X as lt } from "./x-B5YnXwCz.js";
12
- import { R as Vt } from "./rotate-ccw-BBQnIVTr.js";
13
- import { C as Gt } from "./check-DrFSN__t.js";
14
- import { S as Se } from "./square-DASBRZ0U.js";
15
- import { M as ft } from "./mic-CUklMZGF.js";
16
- import { S as Wt } from "./send-C5kDJ-Mz.js";
17
- import { B as ie } from "./button-CaUe1uyd.js";
18
- import { a as pt } from "./tooltip-Cp-PLePW.js";
1
+ import { jsx as e, jsxs as y, Fragment as le } from "react/jsx-runtime";
2
+ import { useId as pe, useState as A, useRef as H, useCallback as w, useEffect as G, Fragment as Ke, forwardRef as er, useMemo as Ye, useImperativeHandle as tr } from "react";
3
+ import { c as nt } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as re } from "react-i18next";
5
+ import { SafeHtml as rr, sanitiseHtml as nr } from "../safe-html/index.js";
6
+ import { u as or } from "./registry-DvAUVLHh.js";
7
+ import { S as Nt } from "./spinner-hbwuKwMf.js";
8
+ import { B as ce } from "./button-CaUe1uyd.js";
9
+ import { T as ir } from "./timestamp-BV2lC-wV.js";
10
+ import { A as ar } from "./ai-consent-banner-D7I2U-cz.js";
11
+ import { I as j } from "./icon-button-CehAeZoP.js";
12
+ import { T as sr } from "./text-area-Bt3p7Pt0.js";
13
+ import { E as Ct } from "./editor-overlay-9tcPXNWt.js";
14
+ import { X as bt } from "./x-B5YnXwCz.js";
15
+ import { R as lr } from "./rotate-ccw-BBQnIVTr.js";
16
+ import { C as cr } from "./check-DrFSN__t.js";
17
+ import { S as je } from "./square-DASBRZ0U.js";
18
+ import { M as Mt } from "./mic-CUklMZGF.js";
19
+ import { S as dr } from "./send-C5kDJ-Mz.js";
20
+ import { a as zt } from "./tooltip-Cp-PLePW.js";
19
21
  import { P as q } from "./popover-DO-pssF3.js";
20
- import { D as Ae } from "./dropdown-menu-DU-Hrf33.js";
21
- import { D as B } from "./dialog-BJiLqhx6.js";
22
- import { C as We } from "./color-picker-Bl5f0iK1.js";
23
- import { T as Ie } from "./text-input-CUvCb6ST.js";
24
- import { C as Xt } from "./checkbox-CZkipDn7.js";
25
- import { F as Ut } from "./file-upload-BDpb08GM.js";
22
+ import { D as qe } from "./dropdown-menu-DU-Hrf33.js";
23
+ import { D as K } from "./dialog-BJiLqhx6.js";
24
+ import { C as ot } from "./color-picker-Bl5f0iK1.js";
25
+ import { T as Fe } from "./text-input-CUvCb6ST.js";
26
+ import { C as ur } from "./checkbox-CZkipDn7.js";
27
+ import { F as mr } from "./file-upload-BDpb08GM.js";
26
28
  import { c as T } from "./createLucideIcon-DhHxpK9K.js";
27
- import { E as Qt } from "./ellipsis-dRo9ouSU.js";
28
- import { H as Zt } from "./highlighter-DSkckT2Q.js";
29
- import { I as Yt } from "./image-B_5MNK0x.js";
30
- import { C as Jt } from "./chevron-down-DWE7GSq9.js";
31
- import { T as er } from "./trash-2-uumy3fy1.js";
32
- import { A as tr } from "./astroid-BN4f5VXU.js";
29
+ import { E as hr } from "./ellipsis-dRo9ouSU.js";
30
+ import { H as gr } from "./highlighter-DSkckT2Q.js";
31
+ import { I as fr } from "./image-B_5MNK0x.js";
32
+ import { C as pr } from "./chevron-down-DWE7GSq9.js";
33
+ import { T as br } from "./trash-2-uumy3fy1.js";
34
+ import { A as yr } from "./astroid-BN4f5VXU.js";
33
35
  /**
34
36
  * @license lucide-react v1.22.0 - ISC
35
37
  *
36
38
  * This source code is licensed under the ISC license.
37
39
  * See the LICENSE file in the root directory of this source tree.
38
40
  */
39
- const rr = [
41
+ const vr = [
40
42
  ["path", { d: "M4 20h16", key: "14thso" }],
41
43
  ["path", { d: "m6 16 6-12 6 12", key: "1b4byz" }],
42
44
  ["path", { d: "M8 12h8", key: "1wcyev" }]
43
- ], nr = T("baseline", rr);
45
+ ], wr = T("baseline", vr);
44
46
  /**
45
47
  * @license lucide-react v1.22.0 - ISC
46
48
  *
47
49
  * This source code is licensed under the ISC license.
48
50
  * See the LICENSE file in the root directory of this source tree.
49
51
  */
50
- const or = [
52
+ const kr = [
51
53
  ["rect", { width: "13", height: "7", x: "3", y: "3", rx: "1", key: "11xb64" }],
52
54
  ["path", { d: "m22 15-3-3 3-3", key: "26chmm" }],
53
55
  ["rect", { width: "13", height: "7", x: "3", y: "14", rx: "1", key: "k6ky7n" }]
54
- ], ir = T("between-horizontal-end", or);
56
+ ], xr = T("between-horizontal-end", kr);
55
57
  /**
56
58
  * @license lucide-react v1.22.0 - ISC
57
59
  *
58
60
  * This source code is licensed under the ISC license.
59
61
  * See the LICENSE file in the root directory of this source tree.
60
62
  */
61
- const ar = [
63
+ const Nr = [
62
64
  ["rect", { width: "13", height: "7", x: "8", y: "3", rx: "1", key: "pkso9a" }],
63
65
  ["path", { d: "m2 9 3 3-3 3", key: "1agib5" }],
64
66
  ["rect", { width: "13", height: "7", x: "8", y: "14", rx: "1", key: "1q5fc1" }]
65
- ], sr = T("between-horizontal-start", ar);
67
+ ], Cr = T("between-horizontal-start", Nr);
66
68
  /**
67
69
  * @license lucide-react v1.22.0 - ISC
68
70
  *
69
71
  * This source code is licensed under the ISC license.
70
72
  * See the LICENSE file in the root directory of this source tree.
71
73
  */
72
- const lr = [
74
+ const Mr = [
73
75
  ["rect", { width: "7", height: "13", x: "3", y: "3", rx: "1", key: "1fdu0f" }],
74
76
  ["path", { d: "m9 22 3-3 3 3", key: "17z65a" }],
75
77
  ["rect", { width: "7", height: "13", x: "14", y: "3", rx: "1", key: "1squn4" }]
76
- ], cr = T("between-vertical-end", lr);
78
+ ], zr = T("between-vertical-end", Mr);
77
79
  /**
78
80
  * @license lucide-react v1.22.0 - ISC
79
81
  *
80
82
  * This source code is licensed under the ISC license.
81
83
  * See the LICENSE file in the root directory of this source tree.
82
84
  */
83
- const dr = [
85
+ const Tr = [
84
86
  ["rect", { width: "7", height: "13", x: "3", y: "8", rx: "1", key: "1fjrkv" }],
85
87
  ["path", { d: "m15 2-3 3-3-3", key: "1uh6eb" }],
86
88
  ["rect", { width: "7", height: "13", x: "14", y: "8", rx: "1", key: "w3fjg8" }]
87
- ], ur = T("between-vertical-start", dr);
89
+ ], _r = T("between-vertical-start", Tr);
88
90
  /**
89
91
  * @license lucide-react v1.22.0 - ISC
90
92
  *
91
93
  * This source code is licensed under the ISC license.
92
94
  * See the LICENSE file in the root directory of this source tree.
93
95
  */
94
- const mr = [
96
+ const Ar = [
95
97
  [
96
98
  "path",
97
99
  { d: "M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8", key: "mg9rjx" }
98
100
  ]
99
- ], hr = T("bold", mr);
101
+ ], Rr = T("bold", Ar);
100
102
  /**
101
103
  * @license lucide-react v1.22.0 - ISC
102
104
  *
103
105
  * This source code is licensed under the ISC license.
104
106
  * See the LICENSE file in the root directory of this source tree.
105
107
  */
106
- const gr = [
108
+ const Er = [
107
109
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
108
110
  ["path", { d: "M12 3v18", key: "108xh3" }]
109
- ], fr = T("columns-2", gr);
111
+ ], Sr = T("columns-2", Er);
110
112
  /**
111
113
  * @license lucide-react v1.22.0 - ISC
112
114
  *
113
115
  * This source code is licensed under the ISC license.
114
116
  * See the LICENSE file in the root directory of this source tree.
115
117
  */
116
- const pr = [
118
+ const Ir = [
117
119
  ["path", { d: "M4 12h8", key: "17cfdx" }],
118
120
  ["path", { d: "M4 18V6", key: "1rz3zl" }],
119
121
  ["path", { d: "M12 18V6", key: "zqpxq5" }],
120
122
  ["path", { d: "M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1", key: "9jr5yi" }]
121
- ], br = T("heading-2", pr);
123
+ ], Lr = T("heading-2", Ir);
122
124
  /**
123
125
  * @license lucide-react v1.22.0 - ISC
124
126
  *
125
127
  * This source code is licensed under the ISC license.
126
128
  * See the LICENSE file in the root directory of this source tree.
127
129
  */
128
- const yr = [
130
+ const Hr = [
129
131
  ["path", { d: "M4 12h8", key: "17cfdx" }],
130
132
  ["path", { d: "M4 18V6", key: "1rz3zl" }],
131
133
  ["path", { d: "M12 18V6", key: "zqpxq5" }],
132
134
  ["path", { d: "M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2", key: "68ncm8" }],
133
135
  ["path", { d: "M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2", key: "1ejuhz" }]
134
- ], vr = T("heading-3", yr);
136
+ ], $r = T("heading-3", Hr);
135
137
  /**
136
138
  * @license lucide-react v1.22.0 - ISC
137
139
  *
138
140
  * This source code is licensed under the ISC license.
139
141
  * See the LICENSE file in the root directory of this source tree.
140
142
  */
141
- const wr = [
143
+ const Pr = [
142
144
  ["line", { x1: "19", x2: "10", y1: "4", y2: "4", key: "15jd3p" }],
143
145
  ["line", { x1: "14", x2: "5", y1: "20", y2: "20", key: "bu0au3" }],
144
146
  ["line", { x1: "15", x2: "9", y1: "4", y2: "20", key: "uljnxc" }]
145
- ], kr = T("italic", wr);
147
+ ], Dr = T("italic", Pr);
146
148
  /**
147
149
  * @license lucide-react v1.22.0 - ISC
148
150
  *
149
151
  * This source code is licensed under the ISC license.
150
152
  * See the LICENSE file in the root directory of this source tree.
151
153
  */
152
- const xr = [
154
+ const Or = [
153
155
  ["path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71", key: "1cjeqo" }],
154
156
  ["path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71", key: "19qd67" }]
155
- ], Cr = T("link", xr);
157
+ ], qr = T("link", Or);
156
158
  /**
157
159
  * @license lucide-react v1.22.0 - ISC
158
160
  *
159
161
  * This source code is licensed under the ISC license.
160
162
  * See the LICENSE file in the root directory of this source tree.
161
163
  */
162
- const Nr = [
164
+ const Br = [
163
165
  ["path", { d: "M11 5h10", key: "1cz7ny" }],
164
166
  ["path", { d: "M11 12h10", key: "1438ji" }],
165
167
  ["path", { d: "M11 19h10", key: "11t30w" }],
166
168
  ["path", { d: "M4 4h1v5", key: "10yrso" }],
167
169
  ["path", { d: "M4 9h2", key: "r1h2o0" }],
168
170
  ["path", { d: "M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02", key: "xtkcd5" }]
169
- ], Mr = T("list-ordered", Nr);
171
+ ], jr = T("list-ordered", Br);
170
172
  /**
171
173
  * @license lucide-react v1.22.0 - ISC
172
174
  *
173
175
  * This source code is licensed under the ISC license.
174
176
  * See the LICENSE file in the root directory of this source tree.
175
177
  */
176
- const zr = [
178
+ const Fr = [
177
179
  ["path", { d: "M3 5h.01", key: "18ugdj" }],
178
180
  ["path", { d: "M3 12h.01", key: "nlz23k" }],
179
181
  ["path", { d: "M3 19h.01", key: "noohij" }],
180
182
  ["path", { d: "M8 5h13", key: "1pao27" }],
181
183
  ["path", { d: "M8 12h13", key: "1za7za" }],
182
184
  ["path", { d: "M8 19h13", key: "m83p4d" }]
183
- ], Tr = T("list", zr);
185
+ ], Gr = T("list", Fr);
184
186
  /**
185
187
  * @license lucide-react v1.22.0 - ISC
186
188
  *
187
189
  * This source code is licensed under the ISC license.
188
190
  * See the LICENSE file in the root directory of this source tree.
189
191
  */
190
- const _r = [
192
+ const Kr = [
191
193
  ["path", { d: "M11 7 6 2", key: "1jwth8" }],
192
194
  ["path", { d: "M18.992 12H2.041", key: "xw1gg" }],
193
195
  [
@@ -204,25 +206,25 @@ const _r = [
204
206
  key: "1nk1rd"
205
207
  }
206
208
  ]
207
- ], Er = T("paint-bucket", _r);
209
+ ], Vr = T("paint-bucket", Kr);
208
210
  /**
209
211
  * @license lucide-react v1.22.0 - ISC
210
212
  *
211
213
  * This source code is licensed under the ISC license.
212
214
  * See the LICENSE file in the root directory of this source tree.
213
215
  */
214
- const Ar = [
216
+ const Wr = [
215
217
  ["rect", { width: "16", height: "6", x: "2", y: "2", rx: "2", key: "jcyz7m" }],
216
218
  ["path", { d: "M10 16v-2a2 2 0 0 1 2-2h8a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2", key: "1b9h7c" }],
217
219
  ["rect", { width: "4", height: "6", x: "8", y: "16", rx: "1", key: "d6e7yl" }]
218
- ], Rr = T("paint-roller", Ar);
220
+ ], Xr = T("paint-roller", Wr);
219
221
  /**
220
222
  * @license lucide-react v1.22.0 - ISC
221
223
  *
222
224
  * This source code is licensed under the ISC license.
223
225
  * See the LICENSE file in the root directory of this source tree.
224
226
  */
225
- const Sr = [
227
+ const Ur = [
226
228
  [
227
229
  "path",
228
230
  {
@@ -234,68 +236,68 @@ const Sr = [
234
236
  ["circle", { cx: "17.5", cy: "10.5", r: ".5", fill: "currentColor", key: "f64h9f" }],
235
237
  ["circle", { cx: "6.5", cy: "12.5", r: ".5", fill: "currentColor", key: "qy21gx" }],
236
238
  ["circle", { cx: "8.5", cy: "7.5", r: ".5", fill: "currentColor", key: "fotxhn" }]
237
- ], Ir = T("palette", Sr);
239
+ ], Qr = T("palette", Ur);
238
240
  /**
239
241
  * @license lucide-react v1.22.0 - ISC
240
242
  *
241
243
  * This source code is licensed under the ISC license.
242
244
  * See the LICENSE file in the root directory of this source tree.
243
245
  */
244
- const Lr = [
246
+ const Zr = [
245
247
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
246
248
  ["path", { d: "M9 3v18", key: "fh3hqa" }]
247
- ], Hr = T("panel-left", Lr);
249
+ ], Yr = T("panel-left", Zr);
248
250
  /**
249
251
  * @license lucide-react v1.22.0 - ISC
250
252
  *
251
253
  * This source code is licensed under the ISC license.
252
254
  * See the LICENSE file in the root directory of this source tree.
253
255
  */
254
- const $r = [
256
+ const Jr = [
255
257
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
256
258
  ["path", { d: "M15 3v18", key: "14nvp0" }]
257
- ], Dr = T("panel-right", $r);
259
+ ], en = T("panel-right", Jr);
258
260
  /**
259
261
  * @license lucide-react v1.22.0 - ISC
260
262
  *
261
263
  * This source code is licensed under the ISC license.
262
264
  * See the LICENSE file in the root directory of this source tree.
263
265
  */
264
- const Pr = [
266
+ const tn = [
265
267
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
266
268
  ["path", { d: "M14 9h1", key: "l0svgy" }],
267
269
  ["path", { d: "M19 9h2", key: "te2zfg" }],
268
270
  ["path", { d: "M3 9h2", key: "1h4ldw" }],
269
271
  ["path", { d: "M9 9h1", key: "15jzuz" }]
270
- ], Or = T("panel-top-dashed", Pr);
272
+ ], rn = T("panel-top-dashed", tn);
271
273
  /**
272
274
  * @license lucide-react v1.22.0 - ISC
273
275
  *
274
276
  * This source code is licensed under the ISC license.
275
277
  * See the LICENSE file in the root directory of this source tree.
276
278
  */
277
- const qr = [
279
+ const nn = [
278
280
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
279
281
  ["path", { d: "M3 9h18", key: "1pudct" }]
280
- ], jr = T("panel-top", qr);
282
+ ], on = T("panel-top", nn);
281
283
  /**
282
284
  * @license lucide-react v1.22.0 - ISC
283
285
  *
284
286
  * This source code is licensed under the ISC license.
285
287
  * See the LICENSE file in the root directory of this source tree.
286
288
  */
287
- const Fr = [
289
+ const an = [
288
290
  ["path", { d: "M13 4v16", key: "8vvj80" }],
289
291
  ["path", { d: "M17 4v16", key: "7dpous" }],
290
292
  ["path", { d: "M19 4H9.5a4.5 4.5 0 0 0 0 9H13", key: "sh4n9v" }]
291
- ], Br = T("pilcrow", Fr);
293
+ ], sn = T("pilcrow", an);
292
294
  /**
293
295
  * @license lucide-react v1.22.0 - ISC
294
296
  *
295
297
  * This source code is licensed under the ISC license.
296
298
  * See the LICENSE file in the root directory of this source tree.
297
299
  */
298
- const Kr = [
300
+ const ln = [
299
301
  [
300
302
  "path",
301
303
  {
@@ -310,101 +312,101 @@ const Kr = [
310
312
  key: "1ymkrd"
311
313
  }
312
314
  ]
313
- ], Vr = T("quote", Kr);
315
+ ], cn = T("quote", ln);
314
316
  /**
315
317
  * @license lucide-react v1.22.0 - ISC
316
318
  *
317
319
  * This source code is licensed under the ISC license.
318
320
  * See the LICENSE file in the root directory of this source tree.
319
321
  */
320
- const Gr = [
322
+ const dn = [
321
323
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
322
324
  ["path", { d: "M3 12h18", key: "1i2n21" }]
323
- ], Wr = T("rows-2", Gr);
325
+ ], un = T("rows-2", dn);
324
326
  /**
325
327
  * @license lucide-react v1.22.0 - ISC
326
328
  *
327
329
  * This source code is licensed under the ISC license.
328
330
  * See the LICENSE file in the root directory of this source tree.
329
331
  */
330
- const Xr = [
332
+ const mn = [
331
333
  ["path", { d: "m6 16 6-12 6 12", key: "1b4byz" }],
332
334
  ["path", { d: "M8 12h8", key: "1wcyev" }],
333
335
  ["path", { d: "m16 20 2 2 4-4", key: "13tcca" }]
334
- ], Ur = T("spell-check", Xr);
336
+ ], hn = T("spell-check", mn);
335
337
  /**
336
338
  * @license lucide-react v1.22.0 - ISC
337
339
  *
338
340
  * This source code is licensed under the ISC license.
339
341
  * See the LICENSE file in the root directory of this source tree.
340
342
  */
341
- const Qr = [
343
+ const gn = [
342
344
  ["path", { d: "M16 4H9a3 3 0 0 0-2.83 4", key: "43sutm" }],
343
345
  ["path", { d: "M14 12a4 4 0 0 1 0 8H6", key: "nlfj13" }],
344
346
  ["line", { x1: "4", x2: "20", y1: "12", y2: "12", key: "1e0a9i" }]
345
- ], Zr = T("strikethrough", Qr);
347
+ ], fn = T("strikethrough", gn);
346
348
  /**
347
349
  * @license lucide-react v1.22.0 - ISC
348
350
  *
349
351
  * This source code is licensed under the ISC license.
350
352
  * See the LICENSE file in the root directory of this source tree.
351
353
  */
352
- const Yr = [
354
+ const pn = [
353
355
  ["path", { d: "M12 3v18", key: "108xh3" }],
354
356
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
355
357
  ["path", { d: "M3 9h18", key: "1pudct" }],
356
358
  ["path", { d: "M3 15h18", key: "5xshup" }]
357
- ], Jr = T("table", Yr);
359
+ ], bn = T("table", pn);
358
360
  /**
359
361
  * @license lucide-react v1.22.0 - ISC
360
362
  *
361
363
  * This source code is licensed under the ISC license.
362
364
  * See the LICENSE file in the root directory of this source tree.
363
365
  */
364
- const en = [
366
+ const yn = [
365
367
  ["path", { d: "M21 5H3", key: "1fi0y6" }],
366
368
  ["path", { d: "M17 12H7", key: "16if0g" }],
367
369
  ["path", { d: "M19 19H5", key: "vjpgq2" }]
368
- ], tn = T("text-align-center", en);
370
+ ], vn = T("text-align-center", yn);
369
371
  /**
370
372
  * @license lucide-react v1.22.0 - ISC
371
373
  *
372
374
  * This source code is licensed under the ISC license.
373
375
  * See the LICENSE file in the root directory of this source tree.
374
376
  */
375
- const rn = [
377
+ const wn = [
376
378
  ["path", { d: "M21 5H3", key: "1fi0y6" }],
377
379
  ["path", { d: "M21 12H9", key: "dn1m92" }],
378
380
  ["path", { d: "M21 19H7", key: "4cu937" }]
379
- ], nn = T("text-align-end", rn);
381
+ ], kn = T("text-align-end", wn);
380
382
  /**
381
383
  * @license lucide-react v1.22.0 - ISC
382
384
  *
383
385
  * This source code is licensed under the ISC license.
384
386
  * See the LICENSE file in the root directory of this source tree.
385
387
  */
386
- const on = [
388
+ const xn = [
387
389
  ["path", { d: "M21 5H3", key: "1fi0y6" }],
388
390
  ["path", { d: "M15 12H3", key: "6jk70r" }],
389
391
  ["path", { d: "M17 19H3", key: "z6ezky" }]
390
- ], an = T("text-align-start", on);
392
+ ], Nn = T("text-align-start", xn);
391
393
  /**
392
394
  * @license lucide-react v1.22.0 - ISC
393
395
  *
394
396
  * This source code is licensed under the ISC license.
395
397
  * See the LICENSE file in the root directory of this source tree.
396
398
  */
397
- const sn = [
399
+ const Cn = [
398
400
  ["path", { d: "M6 4v6a6 6 0 0 0 12 0V4", key: "9kb039" }],
399
401
  ["line", { x1: "4", x2: "20", y1: "20", y2: "20", key: "nun2al" }]
400
- ], ln = T("underline", sn);
402
+ ], Mn = T("underline", Cn);
401
403
  /**
402
404
  * @license lucide-react v1.22.0 - ISC
403
405
  *
404
406
  * This source code is licensed under the ISC license.
405
407
  * See the LICENSE file in the root directory of this source tree.
406
408
  */
407
- const cn = [
409
+ const zn = [
408
410
  [
409
411
  "path",
410
412
  {
@@ -419,14 +421,14 @@ const cn = [
419
421
  ["path", { d: "M7 8H3", key: "zfb6yr" }],
420
422
  ["path", { d: "M21 16h-4", key: "1cnmox" }],
421
423
  ["path", { d: "M11 3H9", key: "1obp7u" }]
422
- ], dn = T("wand-sparkles", cn);
424
+ ], Tn = T("wand-sparkles", zn);
423
425
  /**
424
426
  * @license lucide-react v1.22.0 - ISC
425
427
  *
426
428
  * This source code is licensed under the ISC license.
427
429
  * See the LICENSE file in the root directory of this source tree.
428
430
  */
429
- const un = [
431
+ const _n = [
430
432
  [
431
433
  "path",
432
434
  {
@@ -434,7 +436,7 @@ const un = [
434
436
  key: "1ngwbx"
435
437
  }
436
438
  ]
437
- ], mn = T("wrench", un), hn = {
439
+ ], An = T("wrench", _n), Rn = {
438
440
  id: "rich-text-editor",
439
441
  capabilities: ["edit_inline"],
440
442
  state: {
@@ -571,7 +573,7 @@ const un = [
571
573
  description: "Sourced from the id prop."
572
574
  }
573
575
  }
574
- }, gn = "ds:aria-pressed:!bg-[var(--destructive)] ds:aria-pressed:!text-[var(--destructive-foreground)]", ce = "ds:!size-[var(--min-target-size)]", fn = "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--muted-foreground)]", pn = "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--destructive)]", ct = [
576
+ }, En = "ds:aria-pressed:!bg-[var(--destructive)] ds:aria-pressed:!text-[var(--destructive-foreground)]", fe = "ds:!size-[var(--min-target-size)]", Sn = "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--muted-foreground)]", In = "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--destructive)]", yt = [
575
577
  "ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
576
578
  "ds:bg-[color-mix(in_srgb,var(--background)_70%,transparent)]",
577
579
  "ds:p-[var(--spacing-sm)] ds:[max-block-size:10rem] ds:overflow-y-auto",
@@ -585,91 +587,91 @@ const un = [
585
587
  "ds:[&_ul]:list-disc ds:[&_ol]:list-decimal",
586
588
  "ds:[&_ul]:ps-[var(--spacing-md)] ds:[&_ol]:ps-[var(--spacing-md)]"
587
589
  ].join(" ");
588
- function dt(o, i) {
590
+ function vt(o, i) {
589
591
  return i ? o ? /\s$/.test(o) ? `${o}${i}` : `${o} ${i}` : i : o;
590
592
  }
591
- function bn({
593
+ function Ln({
592
594
  open: o,
593
595
  onClose: i,
594
- onRequestAiDraft: g,
596
+ onRequestAiDraft: f,
595
597
  onInsert: c,
596
- previewAsHtml: m = !0,
598
+ previewAsHtml: h = !0,
597
599
  privacyNotice: d,
598
- onDictate: b
600
+ onDictate: v
599
601
  }) {
600
- const { t: u } = ee(), w = de(), C = de(), [E, L] = _(""), [I, N] = _(!1), [$, l] = _(!1), [a, f] = _(null), A = D(null), [x, S] = _(!1), [Y, H] = _(""), [X, R] = _(""), K = D(null), U = k(() => {
601
- var M;
602
- (M = K.current) == null || M.abort();
603
- }, []), P = k(() => {
604
- if (!b) return;
605
- const M = new AbortController();
606
- K.current = M, S(!0), H(""), R(u("editor.ai.listening")), b({
607
- signal: M.signal,
602
+ const { t: m } = re(), k = pe(), N = pe(), [R, $] = A(""), [I, C] = A(!1), [P, l] = A(!1), [a, p] = A(null), E = H(null), [x, u] = A(!1), [Y, S] = A(""), [V, F] = A(""), W = H(null), M = w(() => {
603
+ var L;
604
+ (L = W.current) == null || L.abort();
605
+ }, []), B = w(() => {
606
+ if (!v) return;
607
+ const L = new AbortController();
608
+ W.current = L, u(!0), S(""), F(m("editor.ai.listening")), v({
609
+ signal: L.signal,
608
610
  onPartialTranscript: (O) => {
609
- M.signal.aborted || H(O);
611
+ L.signal.aborted || S(O);
610
612
  },
611
613
  onFinalTranscript: (O) => {
612
- if (M.signal.aborted) return;
613
- const j = O.trim();
614
- H(""), j && (L((te) => dt(te, j)), R(j));
614
+ if (L.signal.aborted) return;
615
+ const D = O.trim();
616
+ S(""), D && ($((ee) => vt(ee, D)), F(D));
615
617
  }
616
618
  }).catch(() => {
617
619
  }).finally(() => {
618
- H(""), K.current === M && (K.current = null, S(!1), R(""));
620
+ S(""), W.current === L && (W.current = null, u(!1), F(""));
619
621
  });
620
- }, [b, u]), y = k(() => {
621
- x ? U() : P();
622
- }, [x, P, U]);
623
- Z(() => {
624
- var M, O;
625
- o ? (L(""), N(!1), l(!1), f(null), H(""), R("")) : ((M = A.current) == null || M.abort(), A.current = null, (O = K.current) == null || O.abort());
626
- }, [o]), Z(
622
+ }, [v, m]), Q = w(() => {
623
+ x ? M() : B();
624
+ }, [x, B, M]);
625
+ G(() => {
626
+ var L, O;
627
+ o ? ($(""), C(!1), l(!1), p(null), S(""), F("")) : ((L = E.current) == null || L.abort(), E.current = null, (O = W.current) == null || O.abort());
628
+ }, [o]), G(
627
629
  () => () => {
628
- var M, O;
629
- (M = A.current) == null || M.abort(), (O = K.current) == null || O.abort();
630
+ var L, O;
631
+ (L = E.current) == null || L.abort(), (O = W.current) == null || O.abort();
630
632
  },
631
633
  []
632
634
  );
633
- const V = k(() => {
634
- var j;
635
- const M = E.trim();
636
- if (!M || I) return;
637
- U(), (j = A.current) == null || j.abort();
635
+ const de = w(() => {
636
+ var D;
637
+ const L = R.trim();
638
+ if (!L || I) return;
639
+ M(), (D = E.current) == null || D.abort();
638
640
  const O = new AbortController();
639
- A.current = O, l(!1), N(!0), g({ prompt: M, signal: O.signal }).then((te) => {
640
- O.signal.aborted || (f(te), N(!1));
641
- }).catch((te) => {
642
- O.signal.aborted || te && typeof te == "object" && "name" in te && te.name === "AbortError" || (l(!0), N(!1));
641
+ E.current = O, l(!1), C(!0), f({ prompt: L, signal: O.signal }).then((ee) => {
642
+ O.signal.aborted || (p(ee), C(!1));
643
+ }).catch((ee) => {
644
+ O.signal.aborted || ee && typeof ee == "object" && "name" in ee && ee.name === "AbortError" || (l(!0), C(!1));
643
645
  });
644
- }, [E, I, g, U]), G = k(() => {
646
+ }, [R, I, f, M]), _ = w(() => {
645
647
  a != null && (c(a), i());
646
- }, [a, c, i]), he = a != null, ge = x ? dt(E, Y) : E;
648
+ }, [a, c, i]), J = a != null, X = x ? vt(R, Y) : R;
647
649
  return /* @__PURE__ */ e(
648
- Kt,
650
+ Ct,
649
651
  {
650
652
  open: o,
651
653
  onClose: i,
652
- ariaLabel: u("editor.ai.dialogTitle"),
653
- children: he ? /* @__PURE__ */ v("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
654
+ ariaLabel: m("editor.ai.dialogTitle"),
655
+ children: J ? /* @__PURE__ */ y("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
654
656
  /* @__PURE__ */ e(
655
- F,
657
+ j,
656
658
  {
657
659
  size: "md",
658
660
  intent: "outline",
659
- className: ce,
660
- icon: /* @__PURE__ */ e(lt, {}),
661
- "aria-label": u("common.close"),
661
+ className: fe,
662
+ icon: /* @__PURE__ */ e(bt, {}),
663
+ "aria-label": m("common.close"),
662
664
  onClick: i
663
665
  }
664
666
  ),
665
- /* @__PURE__ */ e("div", { className: "ds:min-w-0 ds:flex-1", children: m ? /* @__PURE__ */ e(
666
- qt,
667
+ /* @__PURE__ */ e("div", { className: "ds:min-w-0 ds:flex-1", children: h ? /* @__PURE__ */ e(
668
+ rr,
667
669
  {
668
670
  html: a,
669
671
  profile: "rich-text",
670
- className: ct,
672
+ className: yt,
671
673
  tabIndex: 0,
672
- "aria-label": u("editor.ai.dialogTitle")
674
+ "aria-label": m("editor.ai.dialogTitle")
673
675
  }
674
676
  ) : (
675
677
  // Focusable so a keyboard user can scroll a long draft preview
@@ -677,161 +679,161 @@ function bn({
677
679
  // tabIndex allowlist doesn't cover a scrollable, non-interactive
678
680
  // text region.
679
681
  // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
680
- /* @__PURE__ */ e("p", { className: ct, tabIndex: 0, children: a })
682
+ /* @__PURE__ */ e("p", { className: yt, tabIndex: 0, children: a })
681
683
  ) }),
682
684
  /* @__PURE__ */ e(
683
- F,
685
+ j,
684
686
  {
685
687
  size: "md",
686
688
  intent: "outline",
687
- className: `${ce} ds:rounded-full`,
688
- icon: /* @__PURE__ */ e(Vt, {}),
689
- "aria-label": u("editor.ai.retry"),
690
- onClick: () => f(null)
689
+ className: `${fe} ds:rounded-full`,
690
+ icon: /* @__PURE__ */ e(lr, {}),
691
+ "aria-label": m("editor.ai.retry"),
692
+ onClick: () => p(null)
691
693
  }
692
694
  ),
693
695
  /* @__PURE__ */ e(
694
- F,
696
+ j,
695
697
  {
696
698
  size: "md",
697
699
  intent: "primary",
698
- className: `${ce} ds:bg-[image:var(--gradient-brand)] ds:rounded-full`,
699
- icon: /* @__PURE__ */ e(Gt, {}),
700
- "aria-label": u("common.confirm"),
701
- onClick: G
700
+ className: `${fe} ds:bg-[image:var(--gradient-brand)] ds:rounded-full`,
701
+ icon: /* @__PURE__ */ e(cr, {}),
702
+ "aria-label": m("common.confirm"),
703
+ onClick: _
702
704
  }
703
705
  )
704
- ] }) : /* @__PURE__ */ v(ke, { children: [
705
- /* @__PURE__ */ v("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
706
+ ] }) : /* @__PURE__ */ y(le, { children: [
707
+ /* @__PURE__ */ y("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
706
708
  /* @__PURE__ */ e(
707
- F,
709
+ j,
708
710
  {
709
711
  size: "md",
710
712
  intent: "outline",
711
- className: ce,
712
- icon: /* @__PURE__ */ e(lt, {}),
713
- "aria-label": u("common.close"),
713
+ className: fe,
714
+ icon: /* @__PURE__ */ e(bt, {}),
715
+ "aria-label": m("common.close"),
714
716
  onClick: i
715
717
  }
716
718
  ),
717
719
  /* @__PURE__ */ e("div", { className: "ds:min-w-0 ds:flex-1", children: /* @__PURE__ */ e(
718
- Bt,
720
+ sr,
719
721
  {
720
- id: w,
722
+ id: k,
721
723
  size: "md",
722
- value: ge,
723
- onChange: (M) => L(M.target.value),
724
- placeholder: u("editor.ai.promptPlaceholder"),
725
- "aria-label": u("editor.ai.promptLabel"),
724
+ value: X,
725
+ onChange: (L) => $(L.target.value),
726
+ placeholder: m("editor.ai.promptPlaceholder"),
727
+ "aria-label": m("editor.ai.promptLabel"),
726
728
  autoResize: !0,
727
729
  minRows: 1,
728
730
  maxRows: 3,
729
731
  readOnly: x,
730
- tone: $ ? "error" : "default",
731
- "aria-describedby": $ ? C : void 0
732
+ tone: P ? "error" : "default",
733
+ "aria-describedby": P ? N : void 0
732
734
  }
733
735
  ) }),
734
- b ? /* @__PURE__ */ e(
735
- F,
736
+ v ? /* @__PURE__ */ e(
737
+ j,
736
738
  {
737
739
  size: "md",
738
740
  intent: "outline",
739
- className: x ? `${ce} ${gn}` : ce,
740
- icon: x ? /* @__PURE__ */ e(Se, { className: "ds:fill-current" }) : /* @__PURE__ */ e(ft, {}),
741
+ className: x ? `${fe} ${En}` : fe,
742
+ icon: x ? /* @__PURE__ */ e(je, { className: "ds:fill-current" }) : /* @__PURE__ */ e(Mt, {}),
741
743
  "aria-pressed": x,
742
- "aria-label": u(x ? "editor.ai.dictateStop" : "editor.ai.dictateStart"),
743
- onClick: y
744
+ "aria-label": m(x ? "editor.ai.dictateStop" : "editor.ai.dictateStart"),
745
+ onClick: Q
744
746
  }
745
747
  ) : null,
746
748
  /* @__PURE__ */ e(
747
- F,
749
+ j,
748
750
  {
749
751
  size: "md",
750
752
  intent: "primary",
751
- icon: I ? /* @__PURE__ */ e(gt, { size: "sm", variant: "pulse" }) : /* @__PURE__ */ e(Wt, {}),
752
- className: `${ce} ds:bg-[image:var(--gradient-brand)] ds:rounded-full`,
753
- disabled: I || !E.trim(),
753
+ icon: I ? /* @__PURE__ */ e(Nt, { size: "sm", variant: "pulse" }) : /* @__PURE__ */ e(dr, {}),
754
+ className: `${fe} ds:bg-[image:var(--gradient-brand)] ds:rounded-full`,
755
+ disabled: I || !R.trim(),
754
756
  "aria-busy": I || void 0,
755
- "aria-label": u("editor.ai.generate"),
756
- onClick: V
757
+ "aria-label": m("editor.ai.generate"),
758
+ onClick: de
757
759
  }
758
760
  )
759
761
  ] }),
760
- b ? /* @__PURE__ */ e("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: X }) : null,
761
- $ ? /* @__PURE__ */ e("p", { id: C, role: "alert", className: pn, children: u("editor.ai.error") }) : d ? /* @__PURE__ */ e("p", { className: fn, children: d }) : null
762
+ v ? /* @__PURE__ */ e("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: V }) : null,
763
+ P ? /* @__PURE__ */ e("p", { id: N, role: "alert", className: In, children: m("editor.ai.error") }) : d ? /* @__PURE__ */ e("p", { className: Sn, children: d }) : null
762
764
  ] })
763
765
  }
764
766
  );
765
767
  }
766
- const yn = {
768
+ const Hn = {
767
769
  bold: {
768
770
  id: "bold",
769
- icon: /* @__PURE__ */ e(hr, {}),
771
+ icon: /* @__PURE__ */ e(Rr, {}),
770
772
  label: ["editor.bold", "Bold"],
771
773
  command: ["module.inline.format", { tag: "b" }],
772
774
  toggle: "bold"
773
775
  },
774
776
  italic: {
775
777
  id: "italic",
776
- icon: /* @__PURE__ */ e(kr, {}),
778
+ icon: /* @__PURE__ */ e(Dr, {}),
777
779
  label: ["editor.italic", "Italic"],
778
780
  command: ["module.inline.format", { tag: "i" }],
779
781
  toggle: "italic"
780
782
  },
781
783
  underline: {
782
784
  id: "underline",
783
- icon: /* @__PURE__ */ e(ln, {}),
785
+ icon: /* @__PURE__ */ e(Mn, {}),
784
786
  label: ["editor.underline", "Underline"],
785
787
  command: ["module.inline.format", { tag: "u" }],
786
788
  toggle: "underline"
787
789
  },
788
790
  strike: {
789
791
  id: "strike",
790
- icon: /* @__PURE__ */ e(Zr, {}),
792
+ icon: /* @__PURE__ */ e(fn, {}),
791
793
  label: ["editor.strike", "Strikethrough"],
792
794
  command: ["module.inline.format", { tag: "del" }],
793
795
  toggle: "strike"
794
796
  },
795
797
  ul: {
796
798
  id: "ul",
797
- icon: /* @__PURE__ */ e(Tr, {}),
799
+ icon: /* @__PURE__ */ e(Gr, {}),
798
800
  label: ["editor.list.bullet", "Bulleted list"],
799
801
  command: ["module.list.toggle", "ul"],
800
802
  toggle: "ul"
801
803
  },
802
804
  ol: {
803
805
  id: "ol",
804
- icon: /* @__PURE__ */ e(Mr, {}),
806
+ icon: /* @__PURE__ */ e(jr, {}),
805
807
  label: ["editor.list.ordered", "Numbered list"],
806
808
  command: ["module.list.toggle", "ol"],
807
809
  toggle: "ol"
808
810
  }
809
- }, Fe = [
811
+ }, Je = [
810
812
  {
811
813
  id: "paragraph",
812
814
  tag: "p",
813
- icon: /* @__PURE__ */ e(Br, {}),
815
+ icon: /* @__PURE__ */ e(sn, {}),
814
816
  label: ["editor.paragraph", "Paragraph"]
815
817
  },
816
818
  {
817
819
  id: "h2",
818
820
  tag: "h2",
819
- icon: /* @__PURE__ */ e(br, {}),
821
+ icon: /* @__PURE__ */ e(Lr, {}),
820
822
  label: ["editor.heading2", "Heading 2"]
821
823
  },
822
824
  {
823
825
  id: "h3",
824
826
  tag: "h3",
825
- icon: /* @__PURE__ */ e(vr, {}),
827
+ icon: /* @__PURE__ */ e($r, {}),
826
828
  label: ["editor.heading3", "Heading 3"]
827
829
  },
828
830
  {
829
831
  id: "quote",
830
832
  tag: "blockquote",
831
- icon: /* @__PURE__ */ e(Vr, {}),
833
+ icon: /* @__PURE__ */ e(cn, {}),
832
834
  label: ["editor.quote", "Quote"]
833
835
  }
834
- ], vn = {
836
+ ], $n = {
835
837
  minimal: ["bold", "italic", "underline", "link"],
836
838
  standard: [
837
839
  "format",
@@ -844,96 +846,96 @@ const yn = {
844
846
  "link"
845
847
  ],
846
848
  full: ["format", "bold", "italic", "underline", "strike", "ul", "ol", "link"]
847
- }, bt = [
849
+ }, Tt = [
848
850
  {
849
851
  id: "rowAbove",
850
852
  command: "plugin.table.addRowAbove",
851
- icon: /* @__PURE__ */ e(sr, {}),
853
+ icon: /* @__PURE__ */ e(Cr, {}),
852
854
  label: ["editor.table.rowAbove", "Add row above"]
853
855
  },
854
856
  {
855
857
  id: "rowBelow",
856
858
  command: "plugin.table.addRowBelow",
857
- icon: /* @__PURE__ */ e(ir, {}),
859
+ icon: /* @__PURE__ */ e(xr, {}),
858
860
  label: ["editor.table.rowBelow", "Add row below"]
859
861
  },
860
862
  {
861
863
  id: "colLeft",
862
864
  command: "plugin.table.addColumnLeft",
863
- icon: /* @__PURE__ */ e(ur, {}),
865
+ icon: /* @__PURE__ */ e(_r, {}),
864
866
  label: ["editor.table.columnLeft", "Add column left"]
865
867
  },
866
868
  {
867
869
  id: "colRight",
868
870
  command: "plugin.table.addColumnRight",
869
- icon: /* @__PURE__ */ e(cr, {}),
871
+ icon: /* @__PURE__ */ e(zr, {}),
870
872
  label: ["editor.table.columnRight", "Add column right"]
871
873
  },
872
874
  {
873
875
  id: "addHead",
874
876
  command: "plugin.table.addHead",
875
- icon: /* @__PURE__ */ e(jr, {}),
877
+ icon: /* @__PURE__ */ e(on, {}),
876
878
  label: ["editor.table.addHeader", "Add header row"]
877
879
  },
878
880
  {
879
881
  id: "deleteHead",
880
882
  command: "plugin.table.deleteHead",
881
- icon: /* @__PURE__ */ e(Or, {}),
883
+ icon: /* @__PURE__ */ e(rn, {}),
882
884
  label: ["editor.table.deleteHeader", "Remove header row"]
883
885
  },
884
886
  {
885
887
  id: "deleteRow",
886
888
  command: "plugin.table.deleteRow",
887
- icon: /* @__PURE__ */ e(Wr, {}),
889
+ icon: /* @__PURE__ */ e(un, {}),
888
890
  label: ["editor.table.deleteRow", "Delete row"]
889
891
  },
890
892
  {
891
893
  id: "deleteColumn",
892
894
  command: "plugin.table.deleteColumn",
893
- icon: /* @__PURE__ */ e(fr, {}),
895
+ icon: /* @__PURE__ */ e(Sr, {}),
894
896
  label: ["editor.table.deleteColumn", "Delete column"]
895
897
  },
896
898
  {
897
899
  id: "deleteTable",
898
900
  command: "plugin.table.deleteTable",
899
- icon: /* @__PURE__ */ e(er, {}),
901
+ icon: /* @__PURE__ */ e(br, {}),
900
902
  label: ["editor.table.deleteTable", "Delete table"]
901
903
  }
902
- ], Re = 6, wn = Ge(
904
+ ], Be = 6, Pn = nt(
903
905
  [
904
906
  "ds:@container/toolbar",
905
907
  "ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
906
908
  "ds:bg-[var(--background)] ds:p-[var(--spacing-xs)]",
907
909
  "ds:shadow-[var(--shadow-md)]"
908
910
  ].join(" ")
909
- ), kn = "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", Xe = "ds:self-stretch ds:[inline-size:var(--border-width-sm)] ds:bg-[var(--border)] ds:[margin-inline:var(--spacing-2xs)]", ve = "ds:text-[length:var(--font-size-sm)] ds:font-medium ds:text-[color:var(--foreground)]";
910
- function Le(o) {
911
+ ), Dn = "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", it = "ds:self-stretch ds:[inline-size:var(--border-width-sm)] ds:bg-[var(--border)] ds:[margin-inline:var(--spacing-2xs)]", Ce = "ds:text-[length:var(--font-size-sm)] ds:font-medium ds:text-[color:var(--foreground)]";
912
+ function Ge(o) {
911
913
  return o.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
912
914
  }
913
- function xn({
915
+ function On({
914
916
  run: o,
915
917
  active: i,
916
- onTriggerDown: g
918
+ onTriggerDown: f
917
919
  }) {
918
- const { t: c } = ee(), m = Fe.find((d) => i.has(d.id)) ?? Fe[0];
919
- return /* @__PURE__ */ v(Ae.Root, { children: [
920
- /* @__PURE__ */ e(Ae.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
921
- ie,
920
+ const { t: c } = re(), h = Je.find((d) => i.has(d.id)) ?? Je[0];
921
+ return /* @__PURE__ */ y(qe.Root, { children: [
922
+ /* @__PURE__ */ e(qe.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
923
+ ce,
922
924
  {
923
925
  size: "sm",
924
926
  intent: "ghost",
925
- startIcon: m.icon,
926
- endIcon: /* @__PURE__ */ e(Jt, {}),
927
+ startIcon: h.icon,
928
+ endIcon: /* @__PURE__ */ e(pr, {}),
927
929
  "aria-label": `${c("editor.format", "Paragraph style")}: ${c(
928
- m.label[0],
929
- m.label[1]
930
+ h.label[0],
931
+ h.label[1]
930
932
  )}`,
931
- onMouseDown: g,
932
- children: /* @__PURE__ */ e("span", { className: "ds:hidden ds:@[448px]/toolbar:inline", children: c(m.label[0], m.label[1]) })
933
+ onMouseDown: f,
934
+ children: /* @__PURE__ */ e("span", { className: "ds:hidden ds:@[448px]/toolbar:inline", children: c(h.label[0], h.label[1]) })
933
935
  }
934
936
  ) }),
935
- /* @__PURE__ */ e(Ae.Content, { align: "start", children: Fe.map((d) => /* @__PURE__ */ e(
936
- Ae.Item,
937
+ /* @__PURE__ */ e(qe.Content, { align: "start", children: Je.map((d) => /* @__PURE__ */ e(
938
+ qe.Item,
937
939
  {
938
940
  startIcon: d.icon,
939
941
  onSelect: () => o("module.block.format", { tag: d.tag }),
@@ -943,112 +945,112 @@ function xn({
943
945
  )) })
944
946
  ] });
945
947
  }
946
- function Cn({
948
+ function qn({
947
949
  insertHtml: o,
948
950
  saveSelection: i,
949
- restoreSelection: g,
951
+ restoreSelection: f,
950
952
  getSelectedText: c
951
953
  }) {
952
- const { t: m } = ee(), [d, b] = _(!1), [u, w] = _(""), [C, E] = _(""), [L, I] = _(!1), N = de(), $ = de(), l = () => {
953
- w(""), E(""), I(!1);
954
+ const { t: h } = re(), [d, v] = A(!1), [m, k] = A(""), [N, R] = A(""), [$, I] = A(!1), C = pe(), P = pe(), l = () => {
955
+ k(""), R(""), I(!1);
954
956
  }, a = () => {
955
- const f = u.trim();
956
- if (!f) return;
957
- const A = C.trim() || f, x = L ? ' target="_blank" rel="noopener noreferrer"' : "", S = `<a href="${Le(f)}"${x}>${Le(A)}</a>`;
958
- b(!1), l(), window.requestAnimationFrame(() => {
959
- g(), o(S);
957
+ const p = m.trim();
958
+ if (!p) return;
959
+ const E = N.trim() || p, x = $ ? ' target="_blank" rel="noopener noreferrer"' : "", u = `<a href="${Ge(p)}"${x}>${Ge(E)}</a>`;
960
+ v(!1), l(), window.requestAnimationFrame(() => {
961
+ f(), o(u);
960
962
  });
961
963
  };
962
- return /* @__PURE__ */ v(B.Root, { open: d, onOpenChange: b, children: [
963
- /* @__PURE__ */ e(B.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
964
- F,
964
+ return /* @__PURE__ */ y(K.Root, { open: d, onOpenChange: v, children: [
965
+ /* @__PURE__ */ e(K.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
966
+ j,
965
967
  {
966
968
  size: "sm",
967
969
  intent: "ghost",
968
- icon: /* @__PURE__ */ e(Cr, {}),
969
- "aria-label": m("editor.link.insert", "Insert link"),
970
+ icon: /* @__PURE__ */ e(qr, {}),
971
+ "aria-label": h("editor.link.insert", "Insert link"),
970
972
  onMouseDown: () => {
971
- i(), E(c());
973
+ i(), R(c());
972
974
  }
973
975
  }
974
976
  ) }),
975
- /* @__PURE__ */ v(B.Content, { children: [
976
- /* @__PURE__ */ e(B.Header, { children: /* @__PURE__ */ e(B.Title, { children: m("editor.link.insert", "Insert link") }) }),
977
- /* @__PURE__ */ v(B.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
978
- /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
979
- /* @__PURE__ */ e("label", { htmlFor: N, className: ve, children: m("editor.link.url", "URL") }),
977
+ /* @__PURE__ */ y(K.Content, { children: [
978
+ /* @__PURE__ */ e(K.Header, { children: /* @__PURE__ */ e(K.Title, { children: h("editor.link.insert", "Insert link") }) }),
979
+ /* @__PURE__ */ y(K.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
980
+ /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
981
+ /* @__PURE__ */ e("label", { htmlFor: C, className: Ce, children: h("editor.link.url", "URL") }),
980
982
  /* @__PURE__ */ e(
981
- Ie,
983
+ Fe,
982
984
  {
983
- id: N,
985
+ id: C,
984
986
  type: "url",
985
- value: u,
986
- onChange: (f) => w(f.target.value),
987
+ value: m,
988
+ onChange: (p) => k(p.target.value),
987
989
  placeholder: "https://…"
988
990
  }
989
991
  )
990
992
  ] }),
991
- /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
992
- /* @__PURE__ */ e("label", { htmlFor: $, className: ve, children: m("editor.link.text", "Text to display") }),
993
+ /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
994
+ /* @__PURE__ */ e("label", { htmlFor: P, className: Ce, children: h("editor.link.text", "Text to display") }),
993
995
  /* @__PURE__ */ e(
994
- Ie,
996
+ Fe,
995
997
  {
996
- id: $,
997
- value: C,
998
- onChange: (f) => E(f.target.value),
999
- placeholder: m("editor.link.textPlaceholder", "Link text")
998
+ id: P,
999
+ value: N,
1000
+ onChange: (p) => R(p.target.value),
1001
+ placeholder: h("editor.link.textPlaceholder", "Link text")
1000
1002
  }
1001
1003
  )
1002
1004
  ] }),
1003
1005
  /* @__PURE__ */ e(
1004
- Xt,
1006
+ ur,
1005
1007
  {
1006
- checked: L,
1007
- onCheckedChange: (f) => I(f === !0),
1008
- label: m("editor.link.newTab", "Open in new tab")
1008
+ checked: $,
1009
+ onCheckedChange: (p) => I(p === !0),
1010
+ label: h("editor.link.newTab", "Open in new tab")
1009
1011
  }
1010
1012
  )
1011
1013
  ] }),
1012
- /* @__PURE__ */ v(B.Footer, { children: [
1013
- /* @__PURE__ */ e(B.Close, { asChild: !0, children: /* @__PURE__ */ e(ie, { intent: "secondary", children: m("common.cancel") }) }),
1014
- /* @__PURE__ */ e(ie, { onClick: a, disabled: !u.trim(), children: m("editor.link.insertAction", "Insert") })
1014
+ /* @__PURE__ */ y(K.Footer, { children: [
1015
+ /* @__PURE__ */ e(K.Close, { asChild: !0, children: /* @__PURE__ */ e(ce, { intent: "secondary", children: h("common.cancel") }) }),
1016
+ /* @__PURE__ */ e(ce, { onClick: a, disabled: !m.trim(), children: h("editor.link.insertAction", "Insert") })
1015
1017
  ] })
1016
1018
  ] })
1017
1019
  ] });
1018
1020
  }
1019
- function Nn({
1021
+ function Bn({
1020
1022
  insertHtml: o,
1021
1023
  saveSelection: i,
1022
- restoreSelection: g,
1024
+ restoreSelection: f,
1023
1025
  uploadImage: c
1024
1026
  }) {
1025
- const { t: m } = ee(), [d, b] = _(!1), [u, w] = _(""), [C, E] = _(""), L = de(), I = de(), N = (l, a) => {
1026
- const f = `<img src="${Le(l)}" alt="${Le(a)}" loading="lazy">`;
1027
- b(!1), w(""), E(""), window.requestAnimationFrame(() => {
1028
- g(), o(f);
1027
+ const { t: h } = re(), [d, v] = A(!1), [m, k] = A(""), [N, R] = A(""), $ = pe(), I = pe(), C = (l, a) => {
1028
+ const p = `<img src="${Ge(l)}" alt="${Ge(a)}" loading="lazy">`;
1029
+ v(!1), k(""), R(""), window.requestAnimationFrame(() => {
1030
+ f(), o(p);
1029
1031
  });
1030
- }, $ = () => {
1031
- const l = u.trim();
1032
- l && N(l, C.trim());
1032
+ }, P = () => {
1033
+ const l = m.trim();
1034
+ l && C(l, N.trim());
1033
1035
  };
1034
- return /* @__PURE__ */ v(B.Root, { open: d, onOpenChange: b, children: [
1035
- /* @__PURE__ */ e(B.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
1036
- F,
1036
+ return /* @__PURE__ */ y(K.Root, { open: d, onOpenChange: v, children: [
1037
+ /* @__PURE__ */ e(K.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
1038
+ j,
1037
1039
  {
1038
1040
  size: "sm",
1039
1041
  intent: "ghost",
1040
- icon: /* @__PURE__ */ e(Yt, {}),
1041
- "aria-label": m("editor.image.insert", "Insert image"),
1042
+ icon: /* @__PURE__ */ e(fr, {}),
1043
+ "aria-label": h("editor.image.insert", "Insert image"),
1042
1044
  onMouseDown: () => i()
1043
1045
  }
1044
1046
  ) }),
1045
- /* @__PURE__ */ v(B.Content, { children: [
1046
- /* @__PURE__ */ e(B.Header, { children: /* @__PURE__ */ e(B.Title, { children: m("editor.image.insert", "Insert image") }) }),
1047
- /* @__PURE__ */ v(B.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1048
- c ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
1049
- /* @__PURE__ */ e("span", { className: ve, children: m("editor.image.upload", "Upload") }),
1047
+ /* @__PURE__ */ y(K.Content, { children: [
1048
+ /* @__PURE__ */ e(K.Header, { children: /* @__PURE__ */ e(K.Title, { children: h("editor.image.insert", "Insert image") }) }),
1049
+ /* @__PURE__ */ y(K.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1050
+ c ? /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
1051
+ /* @__PURE__ */ e("span", { className: Ce, children: h("editor.image.upload", "Upload") }),
1050
1052
  /* @__PURE__ */ e(
1051
- Ut,
1053
+ mr,
1052
1054
  {
1053
1055
  variant: "dropzone",
1054
1056
  accept: {
@@ -1056,35 +1058,35 @@ function Nn({
1056
1058
  },
1057
1059
  maxFiles: 1,
1058
1060
  onUpload: async (l, { signal: a }) => {
1059
- const f = await c(l, a);
1060
- N(f, l.name);
1061
+ const p = await c(l, a);
1062
+ C(p, l.name);
1061
1063
  }
1062
1064
  }
1063
1065
  ),
1064
- /* @__PURE__ */ e("span", { className: "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--muted-foreground)]", children: m("editor.image.orUrl", "Or paste an image URL") })
1066
+ /* @__PURE__ */ e("span", { className: "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--muted-foreground)]", children: h("editor.image.orUrl", "Or paste an image URL") })
1065
1067
  ] }) : null,
1066
- /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
1067
- /* @__PURE__ */ e("label", { htmlFor: L, className: ve, children: m("editor.image.url", "Image URL") }),
1068
+ /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
1069
+ /* @__PURE__ */ e("label", { htmlFor: $, className: Ce, children: h("editor.image.url", "Image URL") }),
1068
1070
  /* @__PURE__ */ e(
1069
- Ie,
1071
+ Fe,
1070
1072
  {
1071
- id: L,
1073
+ id: $,
1072
1074
  type: "url",
1073
- value: u,
1074
- onChange: (l) => w(l.target.value),
1075
+ value: m,
1076
+ onChange: (l) => k(l.target.value),
1075
1077
  placeholder: "https://…"
1076
1078
  }
1077
1079
  )
1078
1080
  ] }),
1079
- /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
1080
- /* @__PURE__ */ e("label", { htmlFor: I, className: ve, children: m("editor.image.alt", "Alt text") }),
1081
+ /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
1082
+ /* @__PURE__ */ e("label", { htmlFor: I, className: Ce, children: h("editor.image.alt", "Alt text") }),
1081
1083
  /* @__PURE__ */ e(
1082
- Ie,
1084
+ Fe,
1083
1085
  {
1084
1086
  id: I,
1085
- value: C,
1086
- onChange: (l) => E(l.target.value),
1087
- placeholder: m(
1087
+ value: N,
1088
+ onChange: (l) => R(l.target.value),
1089
+ placeholder: h(
1088
1090
  "editor.image.altPlaceholder",
1089
1091
  "Describe the image"
1090
1092
  )
@@ -1092,127 +1094,127 @@ function Nn({
1092
1094
  )
1093
1095
  ] })
1094
1096
  ] }),
1095
- /* @__PURE__ */ v(B.Footer, { children: [
1096
- /* @__PURE__ */ e(B.Close, { asChild: !0, children: /* @__PURE__ */ e(ie, { intent: "secondary", children: m("common.cancel") }) }),
1097
- /* @__PURE__ */ e(ie, { onClick: $, disabled: !u.trim(), children: m("editor.image.insertAction", "Insert") })
1097
+ /* @__PURE__ */ y(K.Footer, { children: [
1098
+ /* @__PURE__ */ e(K.Close, { asChild: !0, children: /* @__PURE__ */ e(ce, { intent: "secondary", children: h("common.cancel") }) }),
1099
+ /* @__PURE__ */ e(ce, { onClick: P, disabled: !m.trim(), children: h("editor.image.insertAction", "Insert") })
1098
1100
  ] })
1099
1101
  ] })
1100
1102
  ] });
1101
1103
  }
1102
- function Mn({
1104
+ function jn({
1103
1105
  run: o,
1104
1106
  saveSelection: i,
1105
- restoreSelection: g
1107
+ restoreSelection: f
1106
1108
  }) {
1107
- const { t: c } = ee(), [m, d] = _("#1f2a5c"), b = (w) => {
1108
- d(w), g(), o("module.inline.format", {
1109
+ const { t: c } = re(), [h, d] = A("#1f2a5c"), v = (k) => {
1110
+ d(k), f(), o("module.inline.format", {
1109
1111
  tag: "span",
1110
- style: { color: w },
1112
+ style: { color: k },
1111
1113
  type: "toggle"
1112
1114
  });
1113
- }, u = () => {
1114
- g(), o("module.inline.remove", { style: "color" });
1115
+ }, m = () => {
1116
+ f(), o("module.inline.remove", { style: "color" });
1115
1117
  };
1116
- return /* @__PURE__ */ v(q, { onOpenChange: (w) => w && i(), children: [
1118
+ return /* @__PURE__ */ y(q, { onOpenChange: (k) => k && i(), children: [
1117
1119
  /* @__PURE__ */ e(q.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
1118
- F,
1120
+ j,
1119
1121
  {
1120
1122
  size: "sm",
1121
1123
  intent: "ghost",
1122
- icon: /* @__PURE__ */ e(Ir, {}),
1124
+ icon: /* @__PURE__ */ e(Qr, {}),
1123
1125
  "aria-label": c("editor.textColor", "Text colour"),
1124
- onMouseDown: (w) => {
1125
- w.preventDefault(), i();
1126
+ onMouseDown: (k) => {
1127
+ k.preventDefault(), i();
1126
1128
  }
1127
1129
  }
1128
1130
  ) }),
1129
- /* @__PURE__ */ v(q.Content, { side: "bottom", align: "start", children: [
1131
+ /* @__PURE__ */ y(q.Content, { side: "bottom", align: "start", children: [
1130
1132
  /* @__PURE__ */ e(q.Heading, { children: c("editor.textColor", "Text colour") }),
1131
1133
  /* @__PURE__ */ e("div", { className: "ds:pt-[var(--spacing-sm)]", children: /* @__PURE__ */ e(
1132
- We,
1134
+ ot,
1133
1135
  {
1134
1136
  variant: "inline",
1135
1137
  size: "sm",
1136
- value: m,
1137
- onChange: b
1138
+ value: h,
1139
+ onChange: v
1138
1140
  }
1139
1141
  ) }),
1140
- /* @__PURE__ */ e("div", { className: "ds:mt-[var(--spacing-sm)] ds:flex ds:items-center ds:justify-end", children: /* @__PURE__ */ e(ie, { size: "sm", intent: "secondary", onClick: u, children: c("editor.color.remove", "Remove colour") }) })
1142
+ /* @__PURE__ */ e("div", { className: "ds:mt-[var(--spacing-sm)] ds:flex ds:items-center ds:justify-end", children: /* @__PURE__ */ e(ce, { size: "sm", intent: "secondary", onClick: m, children: c("editor.color.remove", "Remove colour") }) })
1141
1143
  ] })
1142
1144
  ] });
1143
1145
  }
1144
- function zn({
1146
+ function Fn({
1145
1147
  run: o,
1146
1148
  saveSelection: i,
1147
- restoreSelection: g
1149
+ restoreSelection: f
1148
1150
  }) {
1149
- const { t: c } = ee(), [m, d] = _("#fff3a3"), b = (w) => {
1150
- d(w), g(), o("module.inline.format", {
1151
+ const { t: c } = re(), [h, d] = A("#fff3a3"), v = (k) => {
1152
+ d(k), f(), o("module.inline.format", {
1151
1153
  tag: "span",
1152
- style: { "background-color": w },
1154
+ style: { "background-color": k },
1153
1155
  type: "toggle"
1154
1156
  });
1155
- }, u = () => {
1156
- g(), o("module.inline.remove", { style: "background-color" });
1157
+ }, m = () => {
1158
+ f(), o("module.inline.remove", { style: "background-color" });
1157
1159
  };
1158
- return /* @__PURE__ */ v(q, { onOpenChange: (w) => w && i(), children: [
1160
+ return /* @__PURE__ */ y(q, { onOpenChange: (k) => k && i(), children: [
1159
1161
  /* @__PURE__ */ e(q.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
1160
- F,
1162
+ j,
1161
1163
  {
1162
1164
  size: "sm",
1163
1165
  intent: "ghost",
1164
- icon: /* @__PURE__ */ e(Zt, {}),
1166
+ icon: /* @__PURE__ */ e(gr, {}),
1165
1167
  "aria-label": c("editor.highlightColor", "Highlight"),
1166
- onMouseDown: (w) => {
1167
- w.preventDefault(), i();
1168
+ onMouseDown: (k) => {
1169
+ k.preventDefault(), i();
1168
1170
  }
1169
1171
  }
1170
1172
  ) }),
1171
- /* @__PURE__ */ v(q.Content, { side: "bottom", align: "start", children: [
1173
+ /* @__PURE__ */ y(q.Content, { side: "bottom", align: "start", children: [
1172
1174
  /* @__PURE__ */ e(q.Heading, { children: c("editor.highlightColor", "Highlight") }),
1173
1175
  /* @__PURE__ */ e("div", { className: "ds:pt-[var(--spacing-sm)]", children: /* @__PURE__ */ e(
1174
- We,
1176
+ ot,
1175
1177
  {
1176
1178
  variant: "inline",
1177
1179
  size: "sm",
1178
- value: m,
1179
- onChange: b
1180
+ value: h,
1181
+ onChange: v
1180
1182
  }
1181
1183
  ) }),
1182
- /* @__PURE__ */ e("div", { className: "ds:mt-[var(--spacing-sm)] ds:flex ds:items-center ds:justify-end", children: /* @__PURE__ */ e(ie, { size: "sm", intent: "secondary", onClick: u, children: c("editor.highlight.remove", "Remove highlight") }) })
1184
+ /* @__PURE__ */ e("div", { className: "ds:mt-[var(--spacing-sm)] ds:flex ds:items-center ds:justify-end", children: /* @__PURE__ */ e(ce, { size: "sm", intent: "secondary", onClick: m, children: c("editor.highlight.remove", "Remove highlight") }) })
1183
1185
  ] })
1184
1186
  ] });
1185
1187
  }
1186
- function Tn(o, i) {
1187
- const g = Array.from({ length: i }, () => "<td><br></td>").join("");
1188
- return `<table><tbody>${Array.from({ length: o }, () => `<tr>${g}</tr>`).join("")}</tbody></table>`;
1188
+ function Gn(o, i) {
1189
+ const f = Array.from({ length: i }, () => "<td><br></td>").join("");
1190
+ return `<table><tbody>${Array.from({ length: o }, () => `<tr>${f}</tr>`).join("")}</tbody></table>`;
1189
1191
  }
1190
- function _n({
1192
+ function Kn({
1191
1193
  run: o,
1192
1194
  insertTable: i,
1193
- active: g
1195
+ active: f
1194
1196
  }) {
1195
- const { t: c } = ee(), [m, d] = _({ r: 0, c: 0 }), b = g.has("table");
1196
- return /* @__PURE__ */ v(q, { onOpenChange: (u) => !u && d({ r: 0, c: 0 }), children: [
1197
+ const { t: c } = re(), [h, d] = A({ r: 0, c: 0 }), v = f.has("table");
1198
+ return /* @__PURE__ */ y(q, { onOpenChange: (m) => !m && d({ r: 0, c: 0 }), children: [
1197
1199
  /* @__PURE__ */ e(q.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
1198
- F,
1200
+ j,
1199
1201
  {
1200
1202
  size: "sm",
1201
1203
  intent: "ghost",
1202
- icon: /* @__PURE__ */ e(Jr, {}),
1204
+ icon: /* @__PURE__ */ e(bn, {}),
1203
1205
  "aria-label": c("editor.table.insert", "Insert table"),
1204
- onMouseDown: (u) => u.preventDefault()
1206
+ onMouseDown: (m) => m.preventDefault()
1205
1207
  }
1206
1208
  ) }),
1207
- /* @__PURE__ */ e(q.Content, { side: "bottom", align: "start", children: b ? (
1209
+ /* @__PURE__ */ e(q.Content, { side: "bottom", align: "start", children: v ? (
1208
1210
  // Caret is already inside a table — offer the manage ops only, never
1209
1211
  // a nested-table insert (mirrors Redactor's native dropdown, which
1210
1212
  // disables "insert table" while the caret is in a table).
1211
- /* @__PURE__ */ e("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: bt.map((u) => /* @__PURE__ */ v(
1213
+ /* @__PURE__ */ e("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: Tt.map((m) => /* @__PURE__ */ y(
1212
1214
  "button",
1213
1215
  {
1214
1216
  type: "button",
1215
- onClick: () => o(u.command),
1217
+ onClick: () => o(m.command),
1216
1218
  className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)] ds:rounded-[var(--radius-sm)] ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-2xs)] ds:text-start ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--foreground)] ds:hover:bg-[var(--muted)]",
1217
1219
  children: [
1218
1220
  /* @__PURE__ */ e(
@@ -1220,15 +1222,15 @@ function _n({
1220
1222
  {
1221
1223
  "aria-hidden": "true",
1222
1224
  className: "ds:inline-flex ds:size-4 ds:shrink-0 ds:items-center ds:justify-center ds:text-[color:var(--muted-foreground)]",
1223
- children: u.icon
1225
+ children: m.icon
1224
1226
  }
1225
1227
  ),
1226
- c(u.label[0], u.label[1])
1228
+ c(m.label[0], m.label[1])
1227
1229
  ]
1228
1230
  },
1229
- u.id
1231
+ m.id
1230
1232
  )) })
1231
- ) : /* @__PURE__ */ v(ke, { children: [
1233
+ ) : /* @__PURE__ */ y(le, { children: [
1232
1234
  /* @__PURE__ */ e(q.Heading, { children: c("editor.table.insert", "Insert table") }),
1233
1235
  /* @__PURE__ */ e(
1234
1236
  "div",
@@ -1237,84 +1239,84 @@ function _n({
1237
1239
  "aria-label": c("editor.table.sizePicker", "Table size"),
1238
1240
  className: "ds:mt-[var(--spacing-sm)] ds:grid ds:w-fit ds:grid-cols-6 ds:gap-[var(--spacing-2xs)]",
1239
1241
  onMouseLeave: () => d({ r: 0, c: 0 }),
1240
- children: Array.from({ length: Re * Re }, (u, w) => {
1241
- const C = Math.floor(w / Re) + 1, E = w % Re + 1, L = C <= m.r && E <= m.c;
1242
+ children: Array.from({ length: Be * Be }, (m, k) => {
1243
+ const N = Math.floor(k / Be) + 1, R = k % Be + 1, $ = N <= h.r && R <= h.c;
1242
1244
  return /* @__PURE__ */ e(
1243
1245
  "button",
1244
1246
  {
1245
1247
  type: "button",
1246
1248
  "aria-label": c("editor.table.sizeCell", "{{r}}×{{c}}", {
1247
- r: C,
1248
- c: E
1249
+ r: N,
1250
+ c: R
1249
1251
  }),
1250
- onMouseEnter: () => d({ r: C, c: E }),
1251
- onClick: () => i(Tn(C, E)),
1252
- className: `ds:size-5 ds:rounded-[var(--radius-sm)] ds:border ds:border-[color:var(--border)] ${L ? "ds:bg-[var(--primary)]" : "ds:bg-[var(--muted)]"}`
1252
+ onMouseEnter: () => d({ r: N, c: R }),
1253
+ onClick: () => i(Gn(N, R)),
1254
+ className: `ds:size-5 ds:rounded-[var(--radius-sm)] ds:border ds:border-[color:var(--border)] ${$ ? "ds:bg-[var(--primary)]" : "ds:bg-[var(--muted)]"}`
1253
1255
  },
1254
- w
1256
+ k
1255
1257
  );
1256
1258
  })
1257
1259
  }
1258
1260
  ),
1259
- /* @__PURE__ */ e("p", { className: "ds:mt-[var(--spacing-xs)] ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--muted-foreground)]", children: m.r > 0 ? c("editor.table.sizeCell", "{{r}}×{{c}}", {
1260
- r: m.r,
1261
- c: m.c
1261
+ /* @__PURE__ */ e("p", { className: "ds:mt-[var(--spacing-xs)] ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--muted-foreground)]", children: h.r > 0 ? c("editor.table.sizeCell", "{{r}}×{{c}}", {
1262
+ r: h.r,
1263
+ c: h.c
1262
1264
  }) : c("editor.table.sizeHint", "Pick a size") })
1263
1265
  ] }) })
1264
1266
  ] });
1265
1267
  }
1266
- const En = Object.fromEntries(bt.map((o) => [o.id, o])), An = [
1268
+ const Vn = Object.fromEntries(Tt.map((o) => [o.id, o])), Wn = [
1267
1269
  "ds:absolute ds:z-20 ds:flex ds:items-center ds:gap-[var(--spacing-2xs)]",
1268
1270
  "ds:[inset-block-start:var(--rte-tt-top)] ds:[inset-inline-start:var(--rte-tt-start)]",
1269
1271
  "ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
1270
1272
  "ds:bg-[var(--popover)] ds:p-[var(--spacing-2xs)] ds:shadow-[var(--shadow-lg)]"
1271
- ].join(" "), Rn = "#fde68a";
1272
- function ut({
1273
+ ].join(" "), Xn = "#fde68a";
1274
+ function wt({
1273
1275
  scope: o,
1274
1276
  icon: i,
1275
- label: g,
1277
+ label: f,
1276
1278
  onOpenChange: c,
1277
- saveTableCell: m,
1279
+ saveTableCell: h,
1278
1280
  applyTableBackground: d
1279
1281
  }) {
1280
- const { t: b } = ee(), [u, w] = _(Rn);
1281
- return /* @__PURE__ */ v(
1282
+ const { t: v } = re(), [m, k] = A(Xn);
1283
+ return /* @__PURE__ */ y(
1282
1284
  q,
1283
1285
  {
1284
- onOpenChange: (C) => {
1285
- c(C), C && m();
1286
+ onOpenChange: (N) => {
1287
+ c(N), N && h();
1286
1288
  },
1287
1289
  children: [
1288
1290
  /* @__PURE__ */ e(q.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
1289
- F,
1291
+ j,
1290
1292
  {
1291
1293
  size: "sm",
1292
1294
  intent: "ghost",
1293
1295
  icon: i,
1294
- tooltip: g,
1295
- onMouseDown: (C) => C.preventDefault()
1296
+ tooltip: f,
1297
+ onMouseDown: (N) => N.preventDefault()
1296
1298
  }
1297
1299
  ) }),
1298
- /* @__PURE__ */ v(q.Content, { side: "bottom", align: "center", children: [
1300
+ /* @__PURE__ */ y(q.Content, { side: "bottom", align: "center", children: [
1299
1301
  /* @__PURE__ */ e(
1300
- We,
1302
+ ot,
1301
1303
  {
1302
1304
  variant: "inline",
1303
1305
  size: "sm",
1304
- value: u,
1305
- onChange: (C) => {
1306
- w(C), d(o, C);
1306
+ value: m,
1307
+ onChange: (N) => {
1308
+ k(N), d(o, N);
1307
1309
  }
1308
1310
  }
1309
1311
  ),
1310
1312
  /* @__PURE__ */ e(
1311
- ie,
1313
+ ce,
1312
1314
  {
1313
1315
  size: "sm",
1314
1316
  intent: "ghost",
1315
1317
  className: "ds:mt-[var(--spacing-xs)] ds:w-full",
1316
1318
  onClick: () => d(o, null),
1317
- children: b("editor.table.clearColor", "Clear colour")
1319
+ children: v("editor.table.clearColor", "Clear colour")
1318
1320
  }
1319
1321
  )
1320
1322
  ] })
@@ -1322,47 +1324,47 @@ function ut({
1322
1324
  }
1323
1325
  );
1324
1326
  }
1325
- function Sn({
1327
+ function Un({
1326
1328
  active: o,
1327
1329
  run: i,
1328
- areaRef: g,
1330
+ areaRef: f,
1329
1331
  getActiveTableEl: c,
1330
- enableColor: m = !1,
1332
+ enableColor: h = !1,
1331
1333
  saveTableCell: d,
1332
- applyTableBackground: b
1334
+ applyTableBackground: v
1333
1335
  }) {
1334
- const { t: u } = ee(), w = o.has("table"), [C, E] = _(null), L = D(0), [I, N] = _(!1), $ = k((a) => {
1335
- L.current = Math.max(
1336
+ const { t: m } = re(), k = o.has("table"), [N, R] = A(null), $ = H(0), [I, C] = A(!1), P = w((a) => {
1337
+ $.current = Math.max(
1336
1338
  0,
1337
- L.current + (a ? 1 : -1)
1338
- ), N(L.current > 0);
1339
+ $.current + (a ? 1 : -1)
1340
+ ), C($.current > 0);
1339
1341
  }, []);
1340
- if (Z(() => {
1342
+ if (G(() => {
1341
1343
  if (I) return;
1342
- if (!w || typeof window > "u") {
1343
- E(null);
1344
+ if (!k || typeof window > "u") {
1345
+ R(null);
1344
1346
  return;
1345
1347
  }
1346
1348
  const a = () => {
1347
- const S = g.current, Y = c();
1348
- if (!S || !Y) {
1349
- E(null);
1349
+ const u = f.current, Y = c();
1350
+ if (!u || !Y) {
1351
+ R(null);
1350
1352
  return;
1351
1353
  }
1352
- const H = S.getBoundingClientRect(), X = Y.getBoundingClientRect(), R = getComputedStyle(S).direction === "rtl", K = Math.max(0, X.top - H.top - 44), U = R ? H.right - X.right + X.width / 2 : X.left - H.left + X.width / 2;
1353
- E({ top: K, start: Math.max(0, U), rtl: R });
1354
+ const S = u.getBoundingClientRect(), V = Y.getBoundingClientRect(), F = getComputedStyle(u).direction === "rtl", W = Math.max(0, V.top - S.top - 44), M = F ? S.right - V.right + V.width / 2 : V.left - S.left + V.width / 2;
1355
+ R({ top: W, start: Math.max(0, M), rtl: F });
1354
1356
  };
1355
1357
  a();
1356
- const f = new ResizeObserver(a), A = g.current, x = c();
1357
- return A && f.observe(A), x && f.observe(x), window.addEventListener("scroll", a, !0), window.addEventListener("resize", a), () => {
1358
- f.disconnect(), window.removeEventListener("scroll", a, !0), window.removeEventListener("resize", a);
1358
+ const p = new ResizeObserver(a), E = f.current, x = c();
1359
+ return E && p.observe(E), x && p.observe(x), window.addEventListener("scroll", a, !0), window.addEventListener("resize", a), () => {
1360
+ p.disconnect(), window.removeEventListener("scroll", a, !0), window.removeEventListener("resize", a);
1359
1361
  };
1360
- }, [w, I, g, c]), !w && !I || !C) return null;
1362
+ }, [k, I, f, c]), !k && !I || !N) return null;
1361
1363
  const l = [
1362
1364
  ["rowAbove", "rowBelow"],
1363
1365
  ["colLeft", "colRight"],
1364
1366
  ["addHead"],
1365
- ...m ? ["colour"] : [],
1367
+ ...h ? ["colour"] : [],
1366
1368
  ["deleteRow", "deleteColumn"],
1367
1369
  ["deleteTable"]
1368
1370
  ];
@@ -1370,54 +1372,54 @@ function Sn({
1370
1372
  // Tooltips disambiguate the icon-only ops on hover (and provide each
1371
1373
  // button's accessible name via IconButton's `tooltip` prop). Radix Tooltip
1372
1374
  // needs a provider ancestor, so scope one to the bar.
1373
- /* @__PURE__ */ e(pt, { children: /* @__PURE__ */ e(
1375
+ /* @__PURE__ */ e(zt, { children: /* @__PURE__ */ e(
1374
1376
  "div",
1375
1377
  {
1376
1378
  role: "group",
1377
- "aria-label": u("editor.table.toolbar", "Table tools"),
1378
- className: `${An} ${C.rtl ? "ds:translate-x-1/2" : "ds:-translate-x-1/2"}`,
1379
+ "aria-label": m("editor.table.toolbar", "Table tools"),
1380
+ className: `${Wn} ${N.rtl ? "ds:translate-x-1/2" : "ds:-translate-x-1/2"}`,
1379
1381
  style: {
1380
- "--rte-tt-top": `${C.top}px`,
1381
- "--rte-tt-start": `${C.start}px`
1382
+ "--rte-tt-top": `${N.top}px`,
1383
+ "--rte-tt-start": `${N.start}px`
1382
1384
  },
1383
- children: l.map((a, f) => /* @__PURE__ */ v(He, { children: [
1384
- f > 0 ? /* @__PURE__ */ e("span", { "aria-hidden": "true", className: Xe }) : null,
1385
- a === "colour" ? /* @__PURE__ */ v(ke, { children: [
1385
+ children: l.map((a, p) => /* @__PURE__ */ y(Ke, { children: [
1386
+ p > 0 ? /* @__PURE__ */ e("span", { "aria-hidden": "true", className: it }) : null,
1387
+ a === "colour" ? /* @__PURE__ */ y(le, { children: [
1386
1388
  /* @__PURE__ */ e(
1387
- ut,
1389
+ wt,
1388
1390
  {
1389
1391
  scope: "cell",
1390
- icon: /* @__PURE__ */ e(Er, {}),
1391
- label: u("editor.table.cellColor", "Cell colour"),
1392
- onOpenChange: $,
1392
+ icon: /* @__PURE__ */ e(Vr, {}),
1393
+ label: m("editor.table.cellColor", "Cell colour"),
1394
+ onOpenChange: P,
1393
1395
  saveTableCell: d,
1394
- applyTableBackground: b
1396
+ applyTableBackground: v
1395
1397
  }
1396
1398
  ),
1397
1399
  /* @__PURE__ */ e(
1398
- ut,
1400
+ wt,
1399
1401
  {
1400
1402
  scope: "row",
1401
- icon: /* @__PURE__ */ e(Rr, {}),
1402
- label: u("editor.table.rowColor", "Row colour"),
1403
- onOpenChange: $,
1403
+ icon: /* @__PURE__ */ e(Xr, {}),
1404
+ label: m("editor.table.rowColor", "Row colour"),
1405
+ onOpenChange: P,
1404
1406
  saveTableCell: d,
1405
- applyTableBackground: b
1407
+ applyTableBackground: v
1406
1408
  }
1407
1409
  )
1408
- ] }) : a.map((A) => {
1409
- const x = En[A];
1410
+ ] }) : a.map((E) => {
1411
+ const x = Vn[E];
1410
1412
  return /* @__PURE__ */ e(
1411
- F,
1413
+ j,
1412
1414
  {
1413
1415
  size: "sm",
1414
1416
  intent: "ghost",
1415
1417
  icon: x.icon,
1416
- tooltip: u(x.label[0], x.label[1]),
1417
- onMouseDown: (S) => S.preventDefault(),
1418
+ tooltip: m(x.label[0], x.label[1]),
1419
+ onMouseDown: (u) => u.preventDefault(),
1418
1420
  onClick: () => i(x.command)
1419
1421
  },
1420
- A
1422
+ E
1421
1423
  );
1422
1424
  })
1423
1425
  ] }, a === "colour" ? "colour" : a[0]))
@@ -1425,55 +1427,55 @@ function Sn({
1425
1427
  ) })
1426
1428
  );
1427
1429
  }
1428
- const Ke = [
1430
+ const tt = [
1429
1431
  "wysiwyg-img-inline",
1430
1432
  "wysiwyg-img-wrap-left",
1431
1433
  "wysiwyg-img-wrap-right"
1432
- ], yt = [
1434
+ ], _t = [
1433
1435
  "wysiwyg-img-align-left",
1434
1436
  "wysiwyg-img-align-center",
1435
1437
  "wysiwyg-img-align-right"
1436
1438
  ];
1437
- function mt(o, i) {
1438
- return i.find((g) => o.classList.contains(g)) ?? "";
1439
+ function kt(o, i) {
1440
+ return i.find((f) => o.classList.contains(f)) ?? "";
1439
1441
  }
1440
- function In(o) {
1441
- const i = o.closest(".redactor-in"), g = i instanceof HTMLElement ? i.clientWidth : 0, c = o.getBoundingClientRect().width;
1442
- return g <= 0 || c <= 0 ? we : Math.round(Math.min(we, c / g * 100));
1442
+ function Qn(o) {
1443
+ const i = o.closest(".redactor-in"), f = i instanceof HTMLElement ? i.clientWidth : 0, c = o.getBoundingClientRect().width;
1444
+ return f <= 0 || c <= 0 ? Me : Math.round(Math.min(Me, c / f * 100));
1443
1445
  }
1444
- const Ve = 10, we = 100, Ln = 5, Hn = 10, ht = (o) => Math.min(we, Math.max(Ve, Math.round(o))), $n = [
1446
+ const rt = 10, Me = 100, Zn = 5, Yn = 10, xt = (o) => Math.min(Me, Math.max(rt, Math.round(o))), Jn = [
1445
1447
  {
1446
1448
  id: "wysiwyg-img-inline",
1447
- icon: /* @__PURE__ */ e(nr, {}),
1449
+ icon: /* @__PURE__ */ e(wr, {}),
1448
1450
  label: ["editor.image.inline", "Inline with text"]
1449
1451
  },
1450
1452
  {
1451
1453
  id: "wysiwyg-img-wrap-left",
1452
- icon: /* @__PURE__ */ e(Hr, {}),
1454
+ icon: /* @__PURE__ */ e(Yr, {}),
1453
1455
  label: ["editor.image.wrapLeft", "Wrap left"]
1454
1456
  },
1455
1457
  {
1456
1458
  id: "wysiwyg-img-wrap-right",
1457
- icon: /* @__PURE__ */ e(Dr, {}),
1459
+ icon: /* @__PURE__ */ e(en, {}),
1458
1460
  label: ["editor.image.wrapRight", "Wrap right"]
1459
1461
  }
1460
- ], Dn = [
1462
+ ], eo = [
1461
1463
  {
1462
1464
  id: "wysiwyg-img-align-left",
1463
- icon: /* @__PURE__ */ e(an, {}),
1465
+ icon: /* @__PURE__ */ e(Nn, {}),
1464
1466
  label: ["editor.image.alignLeft", "Align left"]
1465
1467
  },
1466
1468
  {
1467
1469
  id: "wysiwyg-img-align-center",
1468
- icon: /* @__PURE__ */ e(tn, {}),
1470
+ icon: /* @__PURE__ */ e(vn, {}),
1469
1471
  label: ["editor.image.alignCenter", "Align centre"]
1470
1472
  },
1471
1473
  {
1472
1474
  id: "wysiwyg-img-align-right",
1473
- icon: /* @__PURE__ */ e(nn, {}),
1475
+ icon: /* @__PURE__ */ e(kn, {}),
1474
1476
  label: ["editor.image.alignRight", "Align right"]
1475
1477
  }
1476
- ], Pn = [
1478
+ ], to = [
1477
1479
  {
1478
1480
  id: "tl",
1479
1481
  pos: "ds:[inset-block-start:calc(var(--spacing-md)*-0.5)] ds:[inset-inline-start:calc(var(--spacing-md)*-0.5)]",
@@ -1506,14 +1508,14 @@ const Ve = 10, we = 100, Ln = 5, Hn = 10, ht = (o) => Math.min(we, Math.max(Ve,
1506
1508
  labelKey: "editor.image.resizeBottomEnd",
1507
1509
  labelFallback: "Resize image, bottom-end corner"
1508
1510
  }
1509
- ], On = [
1511
+ ], ro = [
1510
1512
  "ds:absolute ds:z-20 ds:pointer-events-none",
1511
1513
  "ds:[inset-block-start:var(--rte-img-top)] ds:[inset-inline-start:var(--rte-img-start)]",
1512
1514
  "ds:[inline-size:var(--rte-img-width)] ds:[block-size:var(--rte-img-height)]",
1513
1515
  "ds:rounded-[var(--radius-2xs)]",
1514
1516
  "ds:[outline-style:solid] ds:[outline-width:var(--border-width-md)]",
1515
1517
  "ds:[outline-color:var(--accent)] ds:[outline-offset:var(--focus-ring-offset)]"
1516
- ].join(" "), qn = [
1518
+ ].join(" "), no = [
1517
1519
  "ds:absolute ds:pointer-events-auto ds:touch-none",
1518
1520
  "ds:[inline-size:var(--spacing-md)] ds:[block-size:var(--spacing-md)]",
1519
1521
  "ds:rounded-[var(--radius-2xs)] ds:shadow-[var(--shadow-sm)]",
@@ -1522,50 +1524,50 @@ const Ve = 10, we = 100, Ln = 5, Hn = 10, ht = (o) => Math.min(we, Math.max(Ve,
1522
1524
  "ds:focus-visible:outline-solid ds:focus-visible:outline-[var(--ring)]",
1523
1525
  "ds:focus-visible:[outline-offset:var(--focus-ring-offset)]",
1524
1526
  "ds:forced-colors:bg-[CanvasText]"
1525
- ].join(" "), jn = [
1527
+ ].join(" "), oo = [
1526
1528
  "ds:absolute ds:z-20 ds:flex ds:items-center ds:gap-[var(--spacing-2xs)]",
1527
1529
  "ds:[inset-block-start:var(--rte-img-bar-top)] ds:[inset-inline-start:var(--rte-img-center)]",
1528
1530
  "ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
1529
1531
  "ds:bg-[var(--popover)] ds:p-[var(--spacing-2xs)] ds:shadow-[var(--shadow-lg)]"
1530
1532
  ].join(" ");
1531
- function Fn({
1533
+ function io({
1532
1534
  areaRef: o,
1533
1535
  activeImageEl: i,
1534
- applyImageClass: g,
1536
+ applyImageClass: f,
1535
1537
  setImageWidth: c
1536
1538
  }) {
1537
- const { t: m } = ee(), [d, b] = _(null), u = D(null);
1538
- Z(() => {
1539
+ const { t: h } = re(), [d, v] = A(null), m = H(null);
1540
+ G(() => {
1539
1541
  if (!i || typeof window > "u") {
1540
- b(null);
1542
+ v(null);
1541
1543
  return;
1542
1544
  }
1543
1545
  const l = () => {
1544
- const S = o.current;
1545
- if (!S) {
1546
- b(null);
1546
+ const u = o.current;
1547
+ if (!u) {
1548
+ v(null);
1547
1549
  return;
1548
1550
  }
1549
- const Y = S.getBoundingClientRect(), H = i.getBoundingClientRect(), X = getComputedStyle(S).direction === "rtl", R = H.top - Y.top, K = X ? Y.right - H.right : H.left - Y.left, U = K + H.width / 2, P = Math.max(0, R - 44);
1550
- b({
1551
- top: R,
1552
- start: Math.max(0, K),
1553
- width: H.width,
1554
- height: H.height,
1555
- center: Math.max(0, U),
1556
- barTop: P,
1557
- pct: In(i),
1558
- rtl: X
1551
+ const Y = u.getBoundingClientRect(), S = i.getBoundingClientRect(), V = getComputedStyle(u).direction === "rtl", F = S.top - Y.top, W = V ? Y.right - S.right : S.left - Y.left, M = W + S.width / 2, B = Math.max(0, F - 44);
1552
+ v({
1553
+ top: F,
1554
+ start: Math.max(0, W),
1555
+ width: S.width,
1556
+ height: S.height,
1557
+ center: Math.max(0, M),
1558
+ barTop: B,
1559
+ pct: Qn(i),
1560
+ rtl: V
1559
1561
  });
1560
1562
  };
1561
1563
  l();
1562
1564
  const a = new ResizeObserver(l);
1563
1565
  a.observe(i);
1564
- const f = o.current;
1565
- f && a.observe(f);
1566
- const A = i.closest(".redactor-in");
1566
+ const p = o.current;
1567
+ p && a.observe(p);
1568
+ const E = i.closest(".redactor-in");
1567
1569
  let x = null;
1568
- return A && (x = new MutationObserver(l), x.observe(A, {
1570
+ return E && (x = new MutationObserver(l), x.observe(E, {
1569
1571
  subtree: !0,
1570
1572
  childList: !0,
1571
1573
  characterData: !0,
@@ -1575,9 +1577,9 @@ function Fn({
1575
1577
  a.disconnect(), x == null || x.disconnect(), window.removeEventListener("scroll", l, !0), window.removeEventListener("resize", l);
1576
1578
  };
1577
1579
  }, [i, o]);
1578
- const w = k(
1580
+ const k = w(
1579
1581
  (l) => (a) => {
1580
- !a.isPrimary || !d || (a.preventDefault(), a.currentTarget.setPointerCapture(a.pointerId), u.current = {
1582
+ !a.isPrimary || !d || (a.preventDefault(), a.currentTarget.setPointerCapture(a.pointerId), m.current = {
1581
1583
  pointerId: a.pointerId,
1582
1584
  startX: a.clientX,
1583
1585
  startPct: d.pct,
@@ -1585,115 +1587,115 @@ function Fn({
1585
1587
  });
1586
1588
  },
1587
1589
  [d]
1588
- ), C = k(
1590
+ ), N = w(
1589
1591
  (l) => {
1590
- const a = u.current;
1592
+ const a = m.current;
1591
1593
  if (!a || l.pointerId !== a.pointerId || !i) return;
1592
- const f = i.closest(".redactor-in"), A = f instanceof HTMLElement ? f.clientWidth : 0;
1593
- if (A <= 0) return;
1594
- const x = a.sign * (l.clientX - a.startX) / A * 100;
1595
- c(ht(a.startPct + x));
1594
+ const p = i.closest(".redactor-in"), E = p instanceof HTMLElement ? p.clientWidth : 0;
1595
+ if (E <= 0) return;
1596
+ const x = a.sign * (l.clientX - a.startX) / E * 100;
1597
+ c(xt(a.startPct + x));
1596
1598
  },
1597
1599
  [i, c]
1598
- ), E = k(
1600
+ ), R = w(
1599
1601
  (l) => {
1600
- const a = u.current;
1601
- !a || l.pointerId !== a.pointerId || (l.currentTarget.releasePointerCapture(l.pointerId), u.current = null);
1602
+ const a = m.current;
1603
+ !a || l.pointerId !== a.pointerId || (l.currentTarget.releasePointerCapture(l.pointerId), m.current = null);
1602
1604
  },
1603
1605
  []
1604
- ), L = k(
1606
+ ), $ = w(
1605
1607
  (l) => {
1606
1608
  if (!d) return;
1607
1609
  let a = null;
1608
- const f = l.shiftKey ? Hn : Ln;
1610
+ const p = l.shiftKey ? Yn : Zn;
1609
1611
  switch (l.key) {
1610
1612
  // Up / right always grow; down / left always shrink — independent of
1611
1613
  // which corner has focus, so the gesture reads the same everywhere.
1612
1614
  case "ArrowRight":
1613
1615
  case "ArrowUp":
1614
- a = d.pct + f;
1616
+ a = d.pct + p;
1615
1617
  break;
1616
1618
  case "ArrowLeft":
1617
1619
  case "ArrowDown":
1618
- a = d.pct - f;
1620
+ a = d.pct - p;
1619
1621
  break;
1620
1622
  case "Home":
1621
- a = Ve;
1623
+ a = rt;
1622
1624
  break;
1623
1625
  case "End":
1624
- a = we;
1626
+ a = Me;
1625
1627
  break;
1626
1628
  default:
1627
1629
  return;
1628
1630
  }
1629
- l.preventDefault(), c(ht(a));
1631
+ l.preventDefault(), c(xt(a));
1630
1632
  },
1631
1633
  [d, c]
1632
1634
  );
1633
1635
  if (!i || !d) return null;
1634
- const I = mt(i, Ke), N = mt(i, yt), $ = m("editor.image.widthAnnounce", {
1636
+ const I = kt(i, tt), C = kt(i, _t), P = h("editor.image.widthAnnounce", {
1635
1637
  width: d.pct,
1636
1638
  defaultValue: "{{width}} percent"
1637
1639
  });
1638
- return /* @__PURE__ */ v(ke, { children: [
1640
+ return /* @__PURE__ */ y(le, { children: [
1639
1641
  /* @__PURE__ */ e(
1640
1642
  "div",
1641
1643
  {
1642
- className: On,
1644
+ className: ro,
1643
1645
  style: {
1644
1646
  "--rte-img-top": `${d.top}px`,
1645
1647
  "--rte-img-start": `${d.start}px`,
1646
1648
  "--rte-img-width": `${d.width}px`,
1647
1649
  "--rte-img-height": `${d.height}px`
1648
1650
  },
1649
- children: Pn.map((l) => /* @__PURE__ */ e(
1651
+ children: to.map((l) => /* @__PURE__ */ e(
1650
1652
  "div",
1651
1653
  {
1652
1654
  role: "slider",
1653
1655
  tabIndex: 0,
1654
- "aria-label": m(l.labelKey, l.labelFallback),
1656
+ "aria-label": h(l.labelKey, l.labelFallback),
1655
1657
  "aria-orientation": "horizontal",
1656
- "aria-valuemin": Ve,
1657
- "aria-valuemax": we,
1658
+ "aria-valuemin": rt,
1659
+ "aria-valuemax": Me,
1658
1660
  "aria-valuenow": d.pct,
1659
- "aria-valuetext": $,
1660
- className: `${qn} ${l.pos} ${l.cursor}`,
1661
- onPointerDown: w(l),
1662
- onPointerMove: C,
1663
- onPointerUp: E,
1664
- onPointerCancel: E,
1665
- onKeyDown: L
1661
+ "aria-valuetext": P,
1662
+ className: `${no} ${l.pos} ${l.cursor}`,
1663
+ onPointerDown: k(l),
1664
+ onPointerMove: N,
1665
+ onPointerUp: R,
1666
+ onPointerCancel: R,
1667
+ onKeyDown: $
1666
1668
  },
1667
1669
  l.id
1668
1670
  ))
1669
1671
  }
1670
1672
  ),
1671
- /* @__PURE__ */ e(pt, { children: /* @__PURE__ */ e(
1673
+ /* @__PURE__ */ e(zt, { children: /* @__PURE__ */ e(
1672
1674
  "div",
1673
1675
  {
1674
1676
  role: "group",
1675
- "aria-label": m("editor.image.toolbar", "Image tools"),
1676
- className: `${jn} ${d.rtl ? "ds:translate-x-1/2" : "ds:-translate-x-1/2"}`,
1677
+ "aria-label": h("editor.image.toolbar", "Image tools"),
1678
+ className: `${oo} ${d.rtl ? "ds:translate-x-1/2" : "ds:-translate-x-1/2"}`,
1677
1679
  style: {
1678
1680
  "--rte-img-bar-top": `${d.barTop}px`,
1679
1681
  "--rte-img-center": `${d.center}px`
1680
1682
  },
1681
- children: [$n, Dn].map((l, a) => /* @__PURE__ */ v(He, { children: [
1682
- a > 0 ? /* @__PURE__ */ e("span", { "aria-hidden": "true", className: Xe }) : null,
1683
- l.map((f) => {
1684
- const A = a === 0 ? I === f.id : N === f.id;
1683
+ children: [Jn, eo].map((l, a) => /* @__PURE__ */ y(Ke, { children: [
1684
+ a > 0 ? /* @__PURE__ */ e("span", { "aria-hidden": "true", className: it }) : null,
1685
+ l.map((p) => {
1686
+ const E = a === 0 ? I === p.id : C === p.id;
1685
1687
  return /* @__PURE__ */ e(
1686
- F,
1688
+ j,
1687
1689
  {
1688
1690
  size: "sm",
1689
1691
  intent: "ghost",
1690
- icon: f.icon,
1691
- "aria-pressed": A,
1692
- tooltip: m(f.label[0], f.label[1]),
1692
+ icon: p.icon,
1693
+ "aria-pressed": E,
1694
+ tooltip: h(p.label[0], p.label[1]),
1693
1695
  onMouseDown: (x) => x.preventDefault(),
1694
- onClick: () => g(f.id)
1696
+ onClick: () => f(p.id)
1695
1697
  },
1696
- f.id
1698
+ p.id
1697
1699
  );
1698
1700
  })
1699
1701
  ] }, a === 0 ? "flow" : "align"))
@@ -1701,139 +1703,139 @@ function Fn({
1701
1703
  ) })
1702
1704
  ] });
1703
1705
  }
1704
- function Bn({
1706
+ function ao({
1705
1707
  run: o,
1706
1708
  active: i,
1707
- preset: g,
1709
+ preset: f,
1708
1710
  insertHtml: c,
1709
- insertTable: m,
1711
+ insertTable: h,
1710
1712
  saveSelection: d,
1711
- restoreSelection: b,
1712
- getSelectedText: u,
1713
- uploadImage: w,
1714
- enableColor: C = !1,
1715
- enableImage: E = !1,
1716
- enableTable: L = !1,
1713
+ restoreSelection: v,
1714
+ getSelectedText: m,
1715
+ uploadImage: k,
1716
+ enableColor: N = !1,
1717
+ enableImage: R = !1,
1718
+ enableTable: $ = !1,
1717
1719
  showExtensions: I = !1
1718
1720
  }) {
1719
- const { t: N } = ee(), $ = (P) => P.preventDefault(), l = (P) => vn[g].includes(P), a = (P) => {
1720
- if (!l(P)) return null;
1721
- const y = yn[P];
1721
+ const { t: C } = re(), P = (B) => B.preventDefault(), l = (B) => $n[f].includes(B), a = (B) => {
1722
+ if (!l(B)) return null;
1723
+ const Q = Hn[B];
1722
1724
  return /* @__PURE__ */ e(
1723
- F,
1725
+ j,
1724
1726
  {
1725
1727
  size: "sm",
1726
1728
  intent: "ghost",
1727
- icon: y.icon,
1728
- "aria-label": N(y.label[0], y.label[1]),
1729
- "aria-pressed": y.toggle ? i.has(y.toggle) : void 0,
1730
- onMouseDown: $,
1731
- onClick: () => o(...y.command)
1729
+ icon: Q.icon,
1730
+ "aria-label": C(Q.label[0], Q.label[1]),
1731
+ "aria-pressed": Q.toggle ? i.has(Q.toggle) : void 0,
1732
+ onMouseDown: P,
1733
+ onClick: () => o(...Q.command)
1732
1734
  },
1733
- y.id
1735
+ Q.id
1734
1736
  );
1735
- }, f = () => /* @__PURE__ */ e("span", { "aria-hidden": "true", className: Xe }), A = l("format"), x = [
1737
+ }, p = () => /* @__PURE__ */ e("span", { "aria-hidden": "true", className: it }), E = l("format"), x = [
1736
1738
  a("bold"),
1737
1739
  a("italic"),
1738
1740
  a("underline"),
1739
1741
  a("strike"),
1740
- C ? /* @__PURE__ */ e(
1741
- Mn,
1742
+ N ? /* @__PURE__ */ e(
1743
+ jn,
1742
1744
  {
1743
1745
  run: o,
1744
1746
  saveSelection: d,
1745
- restoreSelection: b
1747
+ restoreSelection: v
1746
1748
  },
1747
1749
  "colour"
1748
1750
  ) : null,
1749
- C ? /* @__PURE__ */ e(
1750
- zn,
1751
+ N ? /* @__PURE__ */ e(
1752
+ Fn,
1751
1753
  {
1752
1754
  run: o,
1753
1755
  saveSelection: d,
1754
- restoreSelection: b
1756
+ restoreSelection: v
1755
1757
  },
1756
1758
  "highlight"
1757
1759
  ) : null
1758
- ].filter(Boolean), S = A || x.length > 0, Y = [a("ul"), a("ol")].filter(Boolean), H = [
1760
+ ].filter(Boolean), u = E || x.length > 0, Y = [a("ul"), a("ol")].filter(Boolean), S = [
1759
1761
  l("link") ? /* @__PURE__ */ e(
1760
- Cn,
1762
+ qn,
1761
1763
  {
1762
1764
  insertHtml: c,
1763
1765
  saveSelection: d,
1764
- restoreSelection: b,
1765
- getSelectedText: u
1766
+ restoreSelection: v,
1767
+ getSelectedText: m
1766
1768
  },
1767
1769
  "link"
1768
1770
  ) : null,
1769
- E ? /* @__PURE__ */ e(
1770
- Nn,
1771
+ R ? /* @__PURE__ */ e(
1772
+ Bn,
1771
1773
  {
1772
1774
  insertHtml: c,
1773
1775
  saveSelection: d,
1774
- restoreSelection: b,
1775
- uploadImage: w
1776
+ restoreSelection: v,
1777
+ uploadImage: k
1776
1778
  },
1777
1779
  "image"
1778
1780
  ) : null,
1779
- L ? /* @__PURE__ */ e(
1780
- _n,
1781
+ $ ? /* @__PURE__ */ e(
1782
+ Kn,
1781
1783
  {
1782
1784
  run: o,
1783
- insertTable: m,
1785
+ insertTable: h,
1784
1786
  active: i
1785
1787
  },
1786
1788
  "table"
1787
1789
  ) : null
1788
- ].filter(Boolean), X = I ? [
1790
+ ].filter(Boolean), V = I ? [
1789
1791
  /* @__PURE__ */ e(
1790
- F,
1792
+ j,
1791
1793
  {
1792
1794
  size: "sm",
1793
1795
  intent: "ghost",
1794
- icon: /* @__PURE__ */ e(mn, {}),
1795
- "aria-label": N("editor.extensions", "Editor extensions"),
1796
+ icon: /* @__PURE__ */ e(An, {}),
1797
+ "aria-label": C("editor.extensions", "Editor extensions"),
1796
1798
  disabled: !0,
1797
- onMouseDown: $
1799
+ onMouseDown: P
1798
1800
  },
1799
1801
  "extensions"
1800
1802
  )
1801
- ] : [], R = [Y, H, X].filter(
1802
- (P) => P.length > 0
1803
- ), K = R.length > 0, U = (P) => R.map((y, V) => /* @__PURE__ */ v(He, { children: [
1804
- V > 0 || P ? /* @__PURE__ */ e(f, {}) : null,
1805
- y
1806
- ] }, V));
1803
+ ] : [], F = [Y, S, V].filter(
1804
+ (B) => B.length > 0
1805
+ ), W = F.length > 0, M = (B) => F.map((Q, de) => /* @__PURE__ */ y(Ke, { children: [
1806
+ de > 0 || B ? /* @__PURE__ */ e(p, {}) : null,
1807
+ Q
1808
+ ] }, de));
1807
1809
  return (
1808
1810
  // Outer element is the query container + visual chrome; the flex row is an
1809
1811
  // inner child so `container-type` never lands on the flex parent (which
1810
1812
  // would blockify the inline controls).
1811
- /* @__PURE__ */ e("div", { className: wn(), "data-component": "editor-toolbar", children: /* @__PURE__ */ v(
1813
+ /* @__PURE__ */ e("div", { className: Pn(), "data-component": "editor-toolbar", children: /* @__PURE__ */ y(
1812
1814
  "div",
1813
1815
  {
1814
1816
  role: "group",
1815
- "aria-label": N("editor.toolbarLabel"),
1816
- className: kn,
1817
+ "aria-label": C("editor.toolbarLabel"),
1818
+ className: Dn,
1817
1819
  children: [
1818
- A ? /* @__PURE__ */ e(xn, { run: o, active: i, onTriggerDown: $ }) : null,
1819
- A && x.length > 0 ? /* @__PURE__ */ e(f, {}) : null,
1820
+ E ? /* @__PURE__ */ e(On, { run: o, active: i, onTriggerDown: P }) : null,
1821
+ E && x.length > 0 ? /* @__PURE__ */ e(p, {}) : null,
1820
1822
  x,
1821
- K ? /* @__PURE__ */ v(ke, { children: [
1822
- /* @__PURE__ */ e("div", { className: "ds:hidden ds:@[384px]/toolbar:contents", children: U(S) }),
1823
- /* @__PURE__ */ v("div", { className: "ds:contents ds:@[384px]/toolbar:hidden", children: [
1824
- S ? /* @__PURE__ */ e(f, {}) : null,
1825
- /* @__PURE__ */ v(q, { children: [
1823
+ W ? /* @__PURE__ */ y(le, { children: [
1824
+ /* @__PURE__ */ e("div", { className: "ds:hidden ds:@[384px]/toolbar:contents", children: M(u) }),
1825
+ /* @__PURE__ */ y("div", { className: "ds:contents ds:@[384px]/toolbar:hidden", children: [
1826
+ u ? /* @__PURE__ */ e(p, {}) : null,
1827
+ /* @__PURE__ */ y(q, { children: [
1826
1828
  /* @__PURE__ */ e(q.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
1827
- F,
1829
+ j,
1828
1830
  {
1829
1831
  size: "sm",
1830
1832
  intent: "ghost",
1831
- icon: /* @__PURE__ */ e(Qt, {}),
1832
- "aria-label": N("editor.more", "More options"),
1833
- onMouseDown: $
1833
+ icon: /* @__PURE__ */ e(hr, {}),
1834
+ "aria-label": C("editor.more", "More options"),
1835
+ onMouseDown: P
1834
1836
  }
1835
1837
  ) }),
1836
- /* @__PURE__ */ e(q.Content, { side: "bottom", align: "end", children: /* @__PURE__ */ e("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: U(!1) }) })
1838
+ /* @__PURE__ */ e(q.Content, { side: "bottom", align: "end", children: /* @__PURE__ */ e("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: M(!1) }) })
1837
1839
  ] })
1838
1840
  ] })
1839
1841
  ] }) : null
@@ -1842,39 +1844,39 @@ function Bn({
1842
1844
  ) })
1843
1845
  );
1844
1846
  }
1845
- function oe(o) {
1846
- return jt(o, "rich-text");
1847
+ function se(o) {
1848
+ return nr(o, "rich-text");
1847
1849
  }
1848
- function Be(o = "") {
1850
+ function et(o = "") {
1849
1851
  const i = String(o).trim();
1850
1852
  if (i === "" || i === "<p><br></p>" || i === "<p>&nbsp;</p>")
1851
1853
  return "";
1852
- const g = i.replace(/<br\s*\/?>/gi, "").replace(/&nbsp;/gi, "").replace(/<[^>]+>/g, "").trim();
1853
- return g === "" && /<img\b[^>]*>/i.test(i) ? i : g === "" ? "" : i;
1854
+ const f = i.replace(/<br\s*\/?>/gi, "").replace(/&nbsp;/gi, "").replace(/<[^>]+>/g, "").trim();
1855
+ return f === "" && /<img\b[^>]*>/i.test(i) ? i : f === "" ? "" : i;
1854
1856
  }
1855
- function Kn(o) {
1857
+ function so(o) {
1856
1858
  return o.replace(
1857
1859
  /<img(?![^>]*\sloading=)([^>]*)>/gi,
1858
1860
  '<img loading="lazy"$1>'
1859
1861
  );
1860
1862
  }
1861
- function Vn(o) {
1863
+ function lo(o) {
1862
1864
  if (!o || typeof o != "object") return;
1863
- const i = o, g = (c) => {
1865
+ const i = o, f = (c) => {
1864
1866
  if (c && typeof c == "object" && "url" in c) {
1865
- const m = c.url;
1866
- return typeof m == "string" ? m : void 0;
1867
+ const h = c.url;
1868
+ return typeof h == "string" ? h : void 0;
1867
1869
  }
1868
1870
  };
1869
- return typeof i.url == "string" ? i.url : g(i.file) ?? g(i.data) ?? Object.values(i).map(g).find(Boolean);
1871
+ return typeof i.url == "string" ? i.url : f(i.file) ?? f(i.data) ?? Object.values(i).map(f).find(Boolean);
1870
1872
  }
1871
- function Gn(o) {
1873
+ function co(o) {
1872
1874
  if (o) return o;
1873
1875
  if (typeof window > "u") return null;
1874
1876
  const i = window;
1875
1877
  return i.$R ?? i.Redactor ?? null;
1876
1878
  }
1877
- const Wn = {
1879
+ const uo = {
1878
1880
  bold: ["module.inline.format", { tag: "b" }],
1879
1881
  italic: ["module.inline.format", { tag: "i" }],
1880
1882
  strikethrough: ["module.inline.format", { tag: "del" }],
@@ -1883,17 +1885,17 @@ const Wn = {
1883
1885
  heading: ["module.block.format", { tag: "h2" }],
1884
1886
  quote: ["module.block.format", { tag: "blockquote" }],
1885
1887
  paragraph: ["module.block.format", { tag: "p" }]
1886
- }, Xn = {
1888
+ }, mo = {
1887
1889
  zh: "zh_cn",
1888
1890
  pt: "pt_br"
1889
1891
  };
1890
- function Un(o) {
1892
+ function ho(o) {
1891
1893
  const i = o.split("-")[0];
1892
- return Xn[i] ?? i ?? "en";
1894
+ return mo[i] ?? i ?? "en";
1893
1895
  }
1894
- const Qn = Ge(
1896
+ const go = nt(
1895
1897
  "redactor-theme-alfadocs ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]"
1896
- ), Zn = Ge(
1898
+ ), fo = nt(
1897
1899
  [
1898
1900
  "ds:block ds:[inline-size:100%]",
1899
1901
  "ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
@@ -1907,7 +1909,7 @@ const Qn = Ge(
1907
1909
  "ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
1908
1910
  "ds:forced-colors:focus-visible:outline-[CanvasText]"
1909
1911
  ].join(" ")
1910
- ), vt = [
1912
+ ), At = [
1911
1913
  "ds:inline-flex ds:items-center ds:justify-center",
1912
1914
  "ds:[min-block-size:var(--min-target-size)] ds:[min-inline-size:var(--min-target-size)]",
1913
1915
  "ds:text-[color:var(--primary-foreground)]",
@@ -1916,127 +1918,129 @@ const Qn = Ge(
1916
1918
  "ds:focus-visible:outline-solid",
1917
1919
  "ds:focus-visible:outline-[var(--primary-foreground)]",
1918
1920
  "ds:focus-visible:[outline-offset:calc(var(--focus-ring-width)*-1)]"
1919
- ].join(" "), Yn = `${vt} ds:hover:bg-[color-mix(in_srgb,var(--primary-foreground)_15%,transparent)]`, Jn = `${vt} ds:bg-[var(--destructive)] ds:hover:bg-[color-mix(in_srgb,var(--destructive)_88%,var(--primary-foreground))]`, eo = Pt(
1921
+ ].join(" "), po = `${At} ds:hover:bg-[color-mix(in_srgb,var(--primary-foreground)_15%,transparent)]`, bo = `${At} ds:bg-[var(--destructive)] ds:hover:bg-[color-mix(in_srgb,var(--destructive)_88%,var(--primary-foreground))]`, yo = er(
1920
1922
  ({
1921
1923
  id: o,
1922
1924
  defaultValue: i,
1923
- value: g,
1925
+ value: f,
1924
1926
  onChange: c,
1925
- toolbar: m = "standard",
1927
+ toolbar: h = "standard",
1926
1928
  placeholder: d,
1927
- readOnly: b = !1,
1928
- ariaLabel: u,
1929
- minHeight: w,
1930
- showExtensions: C,
1931
- className: E,
1932
- redactor: L,
1929
+ readOnly: v = !1,
1930
+ ariaLabel: m,
1931
+ minHeight: k,
1932
+ showExtensions: N,
1933
+ className: R,
1934
+ redactor: $,
1933
1935
  options: I,
1934
- plugins: N,
1935
- lang: $,
1936
+ plugins: C,
1937
+ lang: P,
1936
1938
  imageUploadUrl: l,
1937
1939
  onKeyDown: a,
1938
- onRequestAiDraft: f,
1939
- aiDraftFormat: A = "html",
1940
+ onRequestAiDraft: p,
1941
+ aiDraftFormat: E = "html",
1940
1942
  aiPrivacyNotice: x,
1943
+ aiConsent: u,
1944
+ aiConsentHeadingLevel: Y,
1941
1945
  onDictate: S,
1942
- onProofread: Y,
1943
- onAutoFormat: H
1944
- }, X) => {
1945
- const { t: R, i18n: K } = ee(), U = de(), P = st(
1946
- () => `rte-${U.replace(/[^a-zA-Z0-9-_]/g, "")}`,
1947
- [U]
1948
- ), y = `#${P}`, V = D(null), G = D(null), he = D(!1), ge = D(b), M = D(null), O = D(null), [j, te] = _(!1), [wt, Ue] = _(!1), [Qe, kt] = _(
1946
+ onProofread: V,
1947
+ onAutoFormat: F
1948
+ }, W) => {
1949
+ const { t: M, i18n: B } = re(), Q = pe(), de = Ye(
1950
+ () => `rte-${Q.replace(/[^a-zA-Z0-9-_]/g, "")}`,
1951
+ [Q]
1952
+ ), _ = `#${de}`, J = H(null), X = H(null), L = H(!1), O = H(v), D = H(null), ee = H(null), [oe, at] = A(!1), [Rt, ze] = A(!1), [st, Et] = A(
1949
1953
  () => /* @__PURE__ */ new Set()
1950
- ), xe = D(null), [xt, Ct] = _(
1954
+ ), Te = H(null), [St, It] = A(
1951
1955
  null
1952
- ), Ce = k((t) => {
1953
- xe.current = t, Ct(t);
1954
- }, []), fe = D(null), Q = D(c), Ne = D(a);
1955
- Z(() => {
1956
- Q.current = c, Ne.current = a;
1956
+ ), _e = w((t) => {
1957
+ Te.current = t, It(t);
1958
+ }, []), we = H(null), Z = H(c), Ae = H(a);
1959
+ G(() => {
1960
+ Z.current = c, Ae.current = a;
1957
1961
  }, [c, a]);
1958
- const Nt = D(
1962
+ const Lt = H(
1959
1963
  (() => {
1960
- const t = g ?? i ?? "";
1961
- return t ? oe(t) : "";
1964
+ const t = f ?? i ?? "";
1965
+ return t ? se(t) : "";
1962
1966
  })()
1963
- ), ae = k(() => {
1967
+ ), ue = w(() => {
1964
1968
  var r;
1965
- const t = G.current;
1969
+ const t = X.current;
1966
1970
  if (t)
1967
1971
  try {
1968
- const n = t(y, "source.getCode");
1972
+ const n = t(_, "source.getCode");
1969
1973
  if (typeof n == "string") return n;
1970
1974
  } catch {
1971
1975
  }
1972
- return ((r = V.current) == null ? void 0 : r.value) ?? "";
1973
- }, [y]), re = k(
1976
+ return ((r = J.current) == null ? void 0 : r.value) ?? "";
1977
+ }, [_]), ne = w(
1974
1978
  (t, ...r) => {
1975
- const n = G.current;
1979
+ const n = X.current;
1976
1980
  if (!n) return !1;
1977
- const s = ge.current;
1981
+ const s = O.current;
1978
1982
  if (s)
1979
1983
  try {
1980
- n(y, "disableReadOnly");
1984
+ n(_, "disableReadOnly");
1981
1985
  } catch {
1982
1986
  }
1983
1987
  try {
1984
- return n(y, t, ...r), !0;
1988
+ return n(_, t, ...r), !0;
1985
1989
  } catch {
1986
1990
  return !1;
1987
1991
  } finally {
1988
1992
  if (s)
1989
1993
  try {
1990
- n(y, "enableReadOnly");
1994
+ n(_, "enableReadOnly");
1991
1995
  } catch {
1992
1996
  }
1993
1997
  }
1994
1998
  },
1995
- [y]
1996
- ), se = k(
1999
+ [_]
2000
+ ), me = w(
1997
2001
  (t, r) => {
1998
- var ye;
1999
- const n = (r == null ? void 0 : r.asHtml) ?? !0, s = n ? oe(t) : t;
2000
- if (re(n ? "insertion.insertHtml" : "insertion.insertText", s)) return;
2001
- const p = V.current;
2002
- if (!p) return;
2003
- const z = p.selectionStart ?? p.value.length, W = p.selectionEnd ?? p.value.length;
2004
- p.value = p.value.slice(0, z) + s + p.value.slice(W);
2005
- const Ee = z + s.length;
2002
+ var Ne;
2003
+ const n = (r == null ? void 0 : r.asHtml) ?? !0, s = n ? se(t) : t;
2004
+ if (ne(n ? "insertion.insertHtml" : "insertion.insertText", s)) return;
2005
+ const b = J.current;
2006
+ if (!b) return;
2007
+ const z = b.selectionStart ?? b.value.length, U = b.selectionEnd ?? b.value.length;
2008
+ b.value = b.value.slice(0, z) + s + b.value.slice(U);
2009
+ const Oe = z + s.length;
2006
2010
  try {
2007
- p.setSelectionRange(Ee, Ee);
2011
+ b.setSelectionRange(Oe, Oe);
2008
2012
  } catch {
2009
2013
  }
2010
- (ye = Q.current) == null || ye.call(Q, { html: oe(p.value), markdown: "" });
2014
+ (Ne = Z.current) == null || Ne.call(Z, { html: se(b.value), markdown: "" });
2011
2015
  },
2012
- [re]
2013
- ), $e = D(null), J = k(() => {
2016
+ [ne]
2017
+ ), Ve = H(null), te = w(() => {
2014
2018
  var s;
2015
- const t = (s = M.current) == null ? void 0 : s.querySelector(".redactor-in"), r = typeof window < "u" ? window.getSelection() : null, n = /* @__PURE__ */ new Set();
2019
+ const t = (s = D.current) == null ? void 0 : s.querySelector(".redactor-in"), r = typeof window < "u" ? window.getSelection() : null, n = /* @__PURE__ */ new Set();
2016
2020
  if (t && r && r.anchorNode && t.contains(r.anchorNode) && typeof document.queryCommandState == "function") {
2017
- r.rangeCount > 0 && ($e.current = r.getRangeAt(0).cloneRange());
2021
+ r.rangeCount > 0 && (Ve.current = r.getRangeAt(0).cloneRange());
2018
2022
  try {
2019
2023
  document.queryCommandState("bold") && n.add("bold"), document.queryCommandState("italic") && n.add("italic"), document.queryCommandState("underline") && n.add("underline"), document.queryCommandState("strikeThrough") && n.add("strike"), document.queryCommandState("insertUnorderedList") && n.add("ul"), document.queryCommandState("insertOrderedList") && n.add("ol");
2020
- const h = String(
2024
+ const g = String(
2021
2025
  document.queryCommandValue("formatBlock") || ""
2022
2026
  ).toLowerCase();
2023
- /^h[1-6]$/.test(h) ? (n.add("heading"), n.add(h)) : h === "blockquote" ? n.add("quote") : n.add("paragraph");
2024
- const p = r.anchorNode.nodeType === Node.TEXT_NODE ? r.anchorNode.parentElement : r.anchorNode;
2025
- p && t.contains(p) && p.closest("table") && n.add("table");
2027
+ /^h[1-6]$/.test(g) ? (n.add("heading"), n.add(g)) : g === "blockquote" ? n.add("quote") : n.add("paragraph");
2028
+ const b = r.anchorNode.nodeType === Node.TEXT_NODE ? r.anchorNode.parentElement : r.anchorNode;
2029
+ b && t.contains(b) && b.closest("table") && n.add("table");
2026
2030
  } catch {
2027
2031
  }
2028
2032
  }
2029
- kt(
2030
- (h) => h.size === n.size && [...n].every((p) => h.has(p)) ? h : n
2033
+ Et(
2034
+ (g) => g.size === n.size && [...n].every((b) => g.has(b)) ? g : n
2031
2035
  );
2032
- }, []), ue = k(
2036
+ }, []), be = w(
2033
2037
  (t, ...r) => {
2034
- re(t, ...r), typeof window < "u" ? window.requestAnimationFrame(() => J()) : J();
2038
+ ne(t, ...r), typeof window < "u" ? window.requestAnimationFrame(() => te()) : te();
2035
2039
  },
2036
- [re, J]
2040
+ [ne, te]
2037
2041
  );
2038
- Z(() => {
2039
- const t = M.current;
2042
+ G(() => {
2043
+ const t = D.current;
2040
2044
  if (!t) return;
2041
2045
  const r = {
2042
2046
  b: ["module.inline.format", { tag: "b" }],
@@ -2044,36 +2048,36 @@ const Qn = Ge(
2044
2048
  u: ["module.inline.format", { tag: "u" }]
2045
2049
  }, n = (s) => {
2046
2050
  if (!(s.metaKey || s.ctrlKey) || s.altKey || s.shiftKey || s.isComposing) return;
2047
- const h = r[s.key.toLowerCase()];
2048
- if (!h) return;
2049
- const p = t.querySelector(".redactor-in");
2050
- !p || !(s.target instanceof Node) || !p.contains(s.target) || ge.current || (s.preventDefault(), s.stopImmediatePropagation(), ue(...h));
2051
+ const g = r[s.key.toLowerCase()];
2052
+ if (!g) return;
2053
+ const b = t.querySelector(".redactor-in");
2054
+ !b || !(s.target instanceof Node) || !b.contains(s.target) || O.current || (s.preventDefault(), s.stopImmediatePropagation(), be(...g));
2051
2055
  };
2052
2056
  return t.addEventListener("keydown", n, !0), () => t.removeEventListener("keydown", n, !0);
2053
- }, [ue]);
2054
- const De = k(
2057
+ }, [be]);
2058
+ const We = w(
2055
2059
  (t) => {
2056
- se(t, { asHtml: !0 }), typeof window < "u" && window.requestAnimationFrame(() => J());
2060
+ me(t, { asHtml: !0 }), typeof window < "u" && window.requestAnimationFrame(() => te());
2057
2061
  },
2058
- [se, J]
2059
- ), Ze = k(() => {
2062
+ [me, te]
2063
+ ), ke = w(() => {
2060
2064
  var r;
2061
2065
  if (typeof window < "u") {
2062
- const n = (r = M.current) == null ? void 0 : r.querySelector(".redactor-in"), s = window.getSelection();
2063
- n && s && s.rangeCount > 0 && s.anchorNode && n.contains(s.anchorNode) && ($e.current = s.getRangeAt(0).cloneRange());
2066
+ const n = (r = D.current) == null ? void 0 : r.querySelector(".redactor-in"), s = window.getSelection();
2067
+ n && s && s.rangeCount > 0 && s.anchorNode && n.contains(s.anchorNode) && (Ve.current = s.getRangeAt(0).cloneRange());
2064
2068
  }
2065
- const t = G.current;
2069
+ const t = X.current;
2066
2070
  if (t)
2067
2071
  try {
2068
- t(y, "selection.save");
2072
+ t(_, "selection.save");
2069
2073
  } catch {
2070
2074
  }
2071
- }, [y]), Ye = k(() => {
2072
- const t = G.current;
2075
+ }, [_]), Re = w(() => {
2076
+ const t = X.current;
2073
2077
  if (!t) return;
2074
- const r = $e.current;
2078
+ const r = Ve.current;
2075
2079
  try {
2076
- t(y, "editor.focus");
2080
+ t(_, "editor.focus");
2077
2081
  } catch {
2078
2082
  }
2079
2083
  if (r && typeof window < "u") {
@@ -2086,138 +2090,138 @@ const Qn = Ge(
2086
2090
  }
2087
2091
  }
2088
2092
  try {
2089
- t(y, "selection.restore");
2093
+ t(_, "selection.restore");
2090
2094
  } catch {
2091
2095
  }
2092
- }, [y]), Mt = k(() => {
2096
+ }, [_]), Ht = w(() => {
2093
2097
  var n;
2094
2098
  if (typeof window > "u") return "";
2095
- const t = (n = M.current) == null ? void 0 : n.querySelector(".redactor-in"), r = window.getSelection();
2099
+ const t = (n = D.current) == null ? void 0 : n.querySelector(".redactor-in"), r = window.getSelection();
2096
2100
  return !t || !r || !r.anchorNode || !t.contains(r.anchorNode) ? "" : r.toString();
2097
- }, []), zt = k(() => {
2098
- var h;
2101
+ }, []), $t = w(() => {
2102
+ var g;
2099
2103
  if (typeof window > "u") return null;
2100
- const t = (h = M.current) == null ? void 0 : h.querySelector(".redactor-in"), r = window.getSelection();
2104
+ const t = (g = D.current) == null ? void 0 : g.querySelector(".redactor-in"), r = window.getSelection();
2101
2105
  if (!t || !r || r.rangeCount === 0) return null;
2102
2106
  const n = r.anchorNode, s = n && n.nodeType === Node.TEXT_NODE ? n.parentElement : n;
2103
2107
  return !s || !t.contains(s) ? null : s.closest("table");
2104
- }, []), Je = D(null), Me = k(() => {
2105
- var h;
2108
+ }, []), lt = H(null), Ee = w(() => {
2109
+ var g;
2106
2110
  if (typeof window > "u") return null;
2107
- const t = (h = M.current) == null ? void 0 : h.querySelector(".redactor-in"), r = window.getSelection();
2111
+ const t = (g = D.current) == null ? void 0 : g.querySelector(".redactor-in"), r = window.getSelection();
2108
2112
  if (!t || !r || r.rangeCount === 0) return null;
2109
2113
  const n = r.anchorNode, s = n && n.nodeType === Node.TEXT_NODE ? n.parentElement : n;
2110
2114
  return !s || !t.contains(s) ? null : s.closest("td,th");
2111
- }, []), Tt = k(() => {
2112
- Je.current = Me();
2113
- }, [Me]), _t = k(
2115
+ }, []), Pt = w(() => {
2116
+ lt.current = Ee();
2117
+ }, [Ee]), Dt = w(
2114
2118
  (t, r) => {
2115
- var p;
2116
- const n = Je.current ?? Me();
2119
+ var b;
2120
+ const n = lt.current ?? Ee();
2117
2121
  if (!n) return;
2118
- const s = t === "row" ? Array.from(((p = n.closest("tr")) == null ? void 0 : p.children) ?? [n]).filter(
2122
+ const s = t === "row" ? Array.from(((b = n.closest("tr")) == null ? void 0 : b.children) ?? [n]).filter(
2119
2123
  (z) => z instanceof HTMLElement && (z.tagName === "TD" || z.tagName === "TH")
2120
- ) : [n], h = G.current;
2121
- if (h)
2124
+ ) : [n], g = X.current;
2125
+ if (g)
2122
2126
  try {
2123
- h(y, "module.buffer.trigger");
2127
+ g(_, "module.buffer.trigger");
2124
2128
  } catch {
2125
2129
  }
2126
2130
  for (const z of s)
2127
2131
  r ? z.style.setProperty("background-color", r) : z.style.removeProperty("background-color");
2128
- if (h)
2132
+ if (g)
2129
2133
  try {
2130
- h(y, "broadcast", "hardsync");
2134
+ g(_, "broadcast", "hardsync");
2131
2135
  } catch {
2132
2136
  }
2133
- typeof window < "u" && window.requestAnimationFrame(() => J());
2137
+ typeof window < "u" && window.requestAnimationFrame(() => te());
2134
2138
  },
2135
- [Me, y, J]
2139
+ [Ee, _, te]
2136
2140
  );
2137
- Z(() => {
2138
- const t = M.current;
2141
+ G(() => {
2142
+ const t = D.current;
2139
2143
  if (typeof window > "u" || !t) return;
2140
- const r = (h) => {
2141
- const p = t.querySelector(".redactor-in"), z = h.target;
2142
- if (!p || !(z instanceof Node) || !p.contains(z))
2144
+ const r = (g) => {
2145
+ const b = t.querySelector(".redactor-in"), z = g.target;
2146
+ if (!b || !(z instanceof Node) || !b.contains(z))
2143
2147
  return;
2144
- const W = z instanceof Element ? z.closest("img") : null;
2145
- Ce(W && p.contains(W) ? W : null);
2146
- }, n = (h) => {
2147
- h.key === "Escape" && xe.current && Ce(null);
2148
- }, s = (h) => {
2149
- const p = h.relatedTarget;
2150
- (!(p instanceof Node) || !t.contains(p)) && Ce(null);
2148
+ const U = z instanceof Element ? z.closest("img") : null;
2149
+ _e(U && b.contains(U) ? U : null);
2150
+ }, n = (g) => {
2151
+ g.key === "Escape" && Te.current && _e(null);
2152
+ }, s = (g) => {
2153
+ const b = g.relatedTarget;
2154
+ (!(b instanceof Node) || !t.contains(b)) && _e(null);
2151
2155
  };
2152
2156
  return t.addEventListener("click", r), t.addEventListener("keydown", n), t.addEventListener("focusout", s), () => {
2153
2157
  t.removeEventListener("click", r), t.removeEventListener("keydown", n), t.removeEventListener("focusout", s);
2154
2158
  };
2155
- }, [Ce]);
2156
- const Et = k(
2159
+ }, [_e]);
2160
+ const Ot = w(
2157
2161
  (t) => {
2158
- const r = xe.current;
2162
+ const r = Te.current;
2159
2163
  if (!r) return;
2160
- const n = Ke.includes(
2164
+ const n = tt.includes(
2161
2165
  t
2162
- ) ? Ke : yt, s = G.current;
2166
+ ) ? tt : _t, s = X.current;
2163
2167
  if (s)
2164
2168
  try {
2165
- s(y, "module.buffer.trigger");
2169
+ s(_, "module.buffer.trigger");
2166
2170
  } catch {
2167
2171
  }
2168
- for (const h of n) r.classList.remove(h);
2172
+ for (const g of n) r.classList.remove(g);
2169
2173
  if (r.classList.add(t), s)
2170
2174
  try {
2171
- s(y, "broadcast", "hardsync");
2175
+ s(_, "broadcast", "hardsync");
2172
2176
  } catch {
2173
2177
  }
2174
- typeof window < "u" && window.requestAnimationFrame(() => J());
2178
+ typeof window < "u" && window.requestAnimationFrame(() => te());
2175
2179
  },
2176
- [y, J]
2177
- ), At = k(
2180
+ [_, te]
2181
+ ), qt = w(
2178
2182
  (t) => {
2179
- const r = xe.current;
2183
+ const r = Te.current;
2180
2184
  if (!r) return;
2181
- const n = G.current;
2185
+ const n = X.current;
2182
2186
  if (n)
2183
2187
  try {
2184
- n(y, "module.buffer.trigger");
2188
+ n(_, "module.buffer.trigger");
2185
2189
  } catch {
2186
2190
  }
2187
2191
  if (r.style.setProperty("width", `${t}%`), n)
2188
2192
  try {
2189
- n(y, "broadcast", "hardsync");
2193
+ n(_, "broadcast", "hardsync");
2190
2194
  } catch {
2191
2195
  }
2192
- typeof window < "u" && window.requestAnimationFrame(() => J());
2196
+ typeof window < "u" && window.requestAnimationFrame(() => te());
2193
2197
  },
2194
- [y, J]
2195
- ), Rt = k(
2198
+ [_, te]
2199
+ ), Bt = w(
2196
2200
  (t) => {
2197
2201
  var n;
2198
- const r = G.current;
2202
+ const r = X.current;
2199
2203
  if (r && typeof window < "u") {
2200
- const s = (n = M.current) == null ? void 0 : n.querySelector(".redactor-in"), h = window.getSelection(), p = h == null ? void 0 : h.anchorNode, z = p && p.nodeType === Node.TEXT_NODE ? p.parentElement : p, W = z && (s != null && s.contains(z)) ? z.closest("ul,ol") : null;
2201
- if (W)
2204
+ const s = (n = D.current) == null ? void 0 : n.querySelector(".redactor-in"), g = window.getSelection(), b = g == null ? void 0 : g.anchorNode, z = b && b.nodeType === Node.TEXT_NODE ? b.parentElement : b, U = z && (s != null && s.contains(z)) ? z.closest("ul,ol") : null;
2205
+ if (U)
2202
2206
  try {
2203
- r(y, "caret.setAfter", W);
2207
+ r(_, "caret.setAfter", U);
2204
2208
  } catch {
2205
2209
  }
2206
2210
  }
2207
- De(t), typeof window < "u" && window.requestAnimationFrame(() => {
2208
- var h;
2209
- const s = (h = M.current) == null ? void 0 : h.querySelector(".redactor-in");
2210
- s == null || s.querySelectorAll("table td, table th").forEach((p) => {
2211
- let z = p.lastChild;
2211
+ We(t), typeof window < "u" && window.requestAnimationFrame(() => {
2212
+ var g;
2213
+ const s = (g = D.current) == null ? void 0 : g.querySelector(".redactor-in");
2214
+ s == null || s.querySelectorAll("table td, table th").forEach((b) => {
2215
+ let z = b.lastChild;
2212
2216
  for (; z && z.nodeType === Node.TEXT_NODE && !(z.textContent ?? "").trim(); ) {
2213
- const W = z.previousSibling;
2214
- p.removeChild(z), z = W;
2217
+ const U = z.previousSibling;
2218
+ b.removeChild(z), z = U;
2215
2219
  }
2216
2220
  });
2217
2221
  });
2218
2222
  },
2219
- [De, y]
2220
- ), St = k(
2223
+ [We, _]
2224
+ ), jt = w(
2221
2225
  async (t, r) => {
2222
2226
  if (!l) throw new Error("No image upload URL configured.");
2223
2227
  const n = new FormData();
@@ -2229,104 +2233,166 @@ const Qn = Ge(
2229
2233
  signal: r
2230
2234
  });
2231
2235
  if (!s.ok) throw new Error(`Image upload failed (${s.status}).`);
2232
- const h = Vn(await s.json());
2233
- if (!h) throw new Error("Image upload response contained no URL.");
2234
- return h;
2236
+ const g = lo(await s.json());
2237
+ if (!g) throw new Error("Image upload response contained no URL.");
2238
+ return g;
2235
2239
  },
2236
2240
  [l]
2237
- ), pe = D(null), ze = D(null), [be, et] = _(!1), [It, tt] = _(!1), [Lt, Pe] = _(""), Te = k(() => {
2238
- const t = ze.current;
2239
- t != null && t.parentNode && t.parentNode.removeChild(t), ze.current = null;
2240
- }, []), rt = k((t) => {
2241
+ ), xe = H(null), Se = H(null), [he, ct] = A(!1), [Ft, dt] = A(!1), [Gt, Xe] = A(""), Ie = w(() => {
2242
+ const t = Se.current;
2243
+ t != null && t.parentNode && t.parentNode.removeChild(t), Se.current = null;
2244
+ }, []), ut = w((t) => {
2241
2245
  var s;
2242
- const r = (s = M.current) == null ? void 0 : s.querySelector(
2246
+ const r = (s = D.current) == null ? void 0 : s.querySelector(
2243
2247
  ".redactor-in"
2244
2248
  );
2245
2249
  if (!r) return;
2246
- let n = ze.current;
2250
+ let n = Se.current;
2247
2251
  if (!n || !r.contains(n)) {
2248
2252
  n = document.createElement("span"), n.setAttribute("data-rte-interim", ""), n.setAttribute("contenteditable", "false");
2249
- const h = window.getSelection();
2250
- if (h && h.rangeCount > 0 && r.contains(h.anchorNode)) {
2251
- const p = h.getRangeAt(0);
2252
- p.collapse(!1), p.insertNode(n);
2253
+ const g = window.getSelection();
2254
+ if (g && g.rangeCount > 0 && r.contains(g.anchorNode)) {
2255
+ const b = g.getRangeAt(0);
2256
+ b.collapse(!1), b.insertNode(n);
2253
2257
  } else
2254
2258
  r.appendChild(n);
2255
- ze.current = n;
2259
+ Se.current = n;
2256
2260
  }
2257
2261
  n.textContent = t;
2258
- }, []), nt = k(() => {
2262
+ }, []), Le = w(() => {
2259
2263
  var t;
2260
- (t = pe.current) == null || t.abort();
2261
- }, []), ot = k(() => {
2262
- if (!S) return;
2264
+ (t = xe.current) == null || t.abort();
2265
+ }, []), ie = u !== void 0 && !u.granted, He = w(() => {
2266
+ if (!S || ie) return;
2263
2267
  const t = new AbortController();
2264
- pe.current = t, tt(!1), et(!0), Pe(R("editor.ai.listening")), Te(), S({
2268
+ xe.current = t, dt(!1), ct(!0), Xe(M("editor.ai.listening")), Ie(), S({
2265
2269
  signal: t.signal,
2266
2270
  // Interim text shows live in the editor (grey + caret); each final
2267
2271
  // replaces it with committed text at the caret.
2268
2272
  onPartialTranscript: (r) => {
2269
- t.signal.aborted || rt(r);
2273
+ t.signal.aborted || ut(r);
2270
2274
  },
2271
2275
  onFinalTranscript: (r) => {
2272
2276
  if (t.signal.aborted) return;
2273
- Te();
2277
+ Ie();
2274
2278
  const n = r.trim();
2275
- n && (se(`${n} `, { asHtml: !1 }), Pe(n));
2279
+ n && (me(`${n} `, { asHtml: !1 }), Xe(n));
2276
2280
  }
2277
2281
  }).catch((r) => {
2278
- t.signal.aborted || r && typeof r == "object" && "name" in r && r.name === "AbortError" || tt(!0);
2282
+ t.signal.aborted || r && typeof r == "object" && "name" in r && r.name === "AbortError" || dt(!0);
2279
2283
  }).finally(() => {
2280
- Te(), pe.current === t && (pe.current = null, et(!1), Pe(""));
2284
+ Ie(), xe.current === t && (xe.current = null, ct(!1), Xe(""));
2281
2285
  });
2282
- }, [S, se, Te, rt, R]), Ht = k(() => {
2283
- be ? nt() : ot();
2284
- }, [be, ot, nt]);
2285
- Z(() => () => {
2286
+ }, [S, ie, me, Ie, ut, M]);
2287
+ G(() => () => {
2286
2288
  var t;
2287
- return (t = pe.current) == null ? void 0 : t.abort();
2289
+ return (t = xe.current) == null ? void 0 : t.abort();
2288
2290
  }, []);
2289
- const [ne, Oe] = _(null), le = D(null), it = k(
2291
+ const [Kt, $e] = A(null), ye = H(null), [Vt, mt] = A(!1), Wt = ((u == null ? void 0 : u.pending) ?? !1) || Vt, Pe = H(!1), ht = w(() => {
2292
+ ye.current = null, Pe.current = !1, $e(null);
2293
+ }, []), Xt = w(() => {
2294
+ var r;
2295
+ Pe.current = !0;
2296
+ const t = (r = u == null ? void 0 : u.onGrant) == null ? void 0 : r.call(u);
2297
+ t && typeof t.then == "function" && (mt(!0), Promise.resolve(t).catch(() => {
2298
+ }).finally(() => mt(!1)));
2299
+ }, [u]), gt = H((u == null ? void 0 : u.granted) ?? !0);
2300
+ G(() => {
2301
+ const t = gt.current;
2302
+ if (gt.current = (u == null ? void 0 : u.granted) ?? !0, !t && (u != null && u.granted) && ye.current) {
2303
+ const r = ye.current, n = Pe.current;
2304
+ if (ye.current = null, Pe.current = !1, $e(null), !n) return;
2305
+ r === "write" ? ze(!0) : (Re(), He());
2306
+ }
2307
+ }, [u == null ? void 0 : u.granted, Re, He]), G(() => {
2308
+ ie && (ze(!1), he && Le());
2309
+ }, [ie, he, Le]);
2310
+ const Ut = w(() => {
2311
+ if (he) {
2312
+ Le();
2313
+ return;
2314
+ }
2315
+ if (ie) {
2316
+ ke(), ye.current = "dictate", $e("dictate");
2317
+ return;
2318
+ }
2319
+ He();
2320
+ }, [he, Le, ie, ke, He]), Qt = w(() => {
2321
+ if (ke(), ie) {
2322
+ ye.current = "write", $e("write");
2323
+ return;
2324
+ }
2325
+ ze(!0);
2326
+ }, [ke, ie]), Zt = Ye(() => u != null && u.granted ? /* @__PURE__ */ y(le, { children: [
2327
+ M(
2328
+ "editor.ai.consentRecorded",
2329
+ "AI assistance consent has been recorded."
2330
+ ),
2331
+ u.grantedAt !== void 0 ? /* @__PURE__ */ y(le, { children: [
2332
+ " ",
2333
+ M("aiConsentBanner.grantedAtPrefix", "Granted"),
2334
+ " ",
2335
+ /* @__PURE__ */ e(
2336
+ ir,
2337
+ {
2338
+ value: u.grantedAt,
2339
+ format: "relative",
2340
+ shape: "inline"
2341
+ }
2342
+ )
2343
+ ] }) : null,
2344
+ u.grantedBy ? /* @__PURE__ */ y(le, { children: [
2345
+ " ",
2346
+ M("aiConsentBanner.grantedBy", {
2347
+ name: u.grantedBy,
2348
+ defaultValue: "By {{name}}"
2349
+ })
2350
+ ] }) : null,
2351
+ x ? /* @__PURE__ */ y(le, { children: [
2352
+ " ",
2353
+ x
2354
+ ] }) : null
2355
+ ] }) : x, [u, x, M]), [ae, Ue] = A(null), ge = H(null), ft = w(
2290
2356
  (t, r) => {
2291
- if (le.current) return;
2357
+ if (ge.current) return;
2292
2358
  const n = new AbortController();
2293
- le.current = n, Oe(t);
2294
- const s = ae();
2295
- Promise.resolve(r({ html: s, signal: n.signal })).then((h) => {
2359
+ ge.current = n, Ue(t);
2360
+ const s = ue();
2361
+ Promise.resolve(r({ html: s, signal: n.signal })).then((g) => {
2296
2362
  var z;
2297
2363
  if (n.signal.aborted) return;
2298
- const p = oe(String(h ?? ""));
2299
- re("source.setCode", p), (z = Q.current) == null || z.call(Q, { html: p, markdown: "" });
2364
+ const b = se(String(g ?? ""));
2365
+ ne("source.setCode", b), (z = Z.current) == null || z.call(Z, { html: b, markdown: "" });
2300
2366
  }).catch(() => {
2301
2367
  }).finally(() => {
2302
- le.current === n && (le.current = null, Oe(null));
2368
+ ge.current === n && (ge.current = null, Ue(null));
2303
2369
  });
2304
2370
  },
2305
- [ae, re]
2306
- ), at = k(() => {
2371
+ [ue, ne]
2372
+ ), pt = w(() => {
2307
2373
  var t;
2308
- (t = le.current) == null || t.abort(), le.current = null, Oe(null);
2374
+ (t = ge.current) == null || t.abort(), ge.current = null, Ue(null);
2309
2375
  }, []);
2310
- Z(() => () => {
2376
+ G(() => () => {
2311
2377
  var t;
2312
- return (t = le.current) == null ? void 0 : t.abort();
2313
- }, []), Z(() => {
2314
- const t = V.current;
2378
+ return (t = ge.current) == null ? void 0 : t.abort();
2379
+ }, []), G(() => {
2380
+ const t = J.current;
2315
2381
  if (!t) return;
2316
- t.value = Nt.current;
2317
- const r = Gn(L);
2382
+ t.value = Lt.current;
2383
+ const r = co($);
2318
2384
  if (!r) {
2319
- te(!0);
2385
+ at(!0);
2320
2386
  return;
2321
2387
  }
2322
- G.current = r;
2388
+ X.current = r;
2323
2389
  const n = {
2324
- lang: $ ?? Un(K.language || "en"),
2390
+ lang: P ?? ho(B.language || "en"),
2325
2391
  // The kit renders its OWN toolbar (EditorToolbar) and drives Redactor
2326
2392
  // via the command API, so Redactor's native toolbar is suppressed.
2327
2393
  toolbar: !1,
2328
- plugins: N ?? [],
2329
- placeholder: d ?? R("editor.placeholder"),
2394
+ plugins: C ?? [],
2395
+ placeholder: d ?? M("editor.placeholder"),
2330
2396
  toolbarFixed: !1,
2331
2397
  // Platform parity (RedactorWysiwyg.js:84): no inline shortcode expansion.
2332
2398
  shortcodes: !1,
@@ -2336,7 +2402,7 @@ const Qn = Ge(
2336
2402
  // second, untokenised, mouse-only UI competing with ours.
2337
2403
  imageEditable: !1,
2338
2404
  imageResizable: !1
2339
- }, s = l ? { imageUpload: l } : {}, h = (I == null ? void 0 : I.callbacks) ?? {}, p = {
2405
+ }, s = l ? { imageUpload: l } : {}, g = (I == null ? void 0 : I.callbacks) ?? {}, b = {
2340
2406
  ...n,
2341
2407
  ...s,
2342
2408
  ...I ?? {},
@@ -2346,118 +2412,118 @@ const Qn = Ge(
2346
2412
  imageEditable: !1,
2347
2413
  imageResizable: !1,
2348
2414
  callbacks: {
2349
- ...h,
2415
+ ...g,
2350
2416
  changed(z) {
2351
- const W = Be(Kn(z)), Ee = oe(W);
2352
- he.current = !0, Q.current && (fe.current && clearTimeout(fe.current), fe.current = setTimeout(() => {
2353
- var ye;
2354
- (ye = Q.current) == null || ye.call(Q, { html: Ee, markdown: "" });
2417
+ const U = et(so(z)), Oe = se(U);
2418
+ L.current = !0, Z.current && (we.current && clearTimeout(we.current), we.current = setTimeout(() => {
2419
+ var Ne;
2420
+ (Ne = Z.current) == null || Ne.call(Z, { html: Oe, markdown: "" });
2355
2421
  }, 100));
2356
2422
  },
2357
2423
  keydown(z) {
2358
- var W;
2359
- (W = Ne.current) == null || W.call(Ne, z);
2424
+ var U;
2425
+ (U = Ae.current) == null || U.call(Ae, z);
2360
2426
  },
2361
2427
  observe() {
2362
- J();
2428
+ te();
2363
2429
  }
2364
2430
  }
2365
2431
  };
2366
2432
  try {
2367
- if (r(y, p), b)
2433
+ if (r(_, b), v)
2368
2434
  try {
2369
- r(y, "enableReadOnly");
2435
+ r(_, "enableReadOnly");
2370
2436
  } catch {
2371
2437
  }
2372
2438
  } catch {
2373
- te(!0);
2439
+ at(!0);
2374
2440
  }
2375
2441
  return () => {
2376
- fe.current && clearTimeout(fe.current);
2442
+ we.current && clearTimeout(we.current);
2377
2443
  try {
2378
- r(y, "destroy");
2444
+ r(_, "destroy");
2379
2445
  } catch {
2380
2446
  }
2381
- G.current = null;
2447
+ X.current = null;
2382
2448
  };
2383
- }, []), Z(() => {
2384
- if (!G.current || g === void 0) return;
2385
- if (he.current) {
2386
- he.current = !1;
2449
+ }, []), G(() => {
2450
+ if (!X.current || f === void 0) return;
2451
+ if (L.current) {
2452
+ L.current = !1;
2387
2453
  return;
2388
2454
  }
2389
- const t = oe(Be(g));
2390
- Be(ae()) !== t && re("source.setCode", t);
2391
- }, [g, ae, re]), Z(() => {
2392
- ge.current = b;
2393
- const t = G.current;
2455
+ const t = se(et(f));
2456
+ et(ue()) !== t && ne("source.setCode", t);
2457
+ }, [f, ue, ne]), G(() => {
2458
+ O.current = v;
2459
+ const t = X.current;
2394
2460
  if (t)
2395
2461
  try {
2396
- t(y, b ? "enableReadOnly" : "disableReadOnly");
2462
+ t(_, v ? "enableReadOnly" : "disableReadOnly");
2397
2463
  } catch {
2398
2464
  }
2399
- }, [b, y]), Z(() => {
2400
- if (!j || g === void 0) return;
2401
- const t = V.current;
2465
+ }, [v, _]), G(() => {
2466
+ if (!oe || f === void 0) return;
2467
+ const t = J.current;
2402
2468
  if (!t) return;
2403
- const r = oe(g);
2469
+ const r = se(f);
2404
2470
  t.value !== r && document.activeElement !== t && (t.value = r);
2405
- }, [j, g]);
2406
- const qe = st(
2471
+ }, [oe, f]);
2472
+ const Qe = Ye(
2407
2473
  () => ({
2408
2474
  getHTML() {
2409
- return ae();
2475
+ return ue();
2410
2476
  },
2411
2477
  getText() {
2412
- return ae().replace(/<[^>]*>/g, " ").replace(/&nbsp;/gi, " ").replace(/\s+/g, " ").trim();
2478
+ return ue().replace(/<[^>]*>/g, " ").replace(/&nbsp;/gi, " ").replace(/\s+/g, " ").trim();
2413
2479
  },
2414
2480
  getMarkdown() {
2415
2481
  return "";
2416
2482
  },
2417
2483
  setContent(t) {
2418
- const r = oe(t);
2419
- re("source.setCode", r) || V.current && (V.current.value = r);
2484
+ const r = se(t);
2485
+ ne("source.setCode", r) || J.current && (J.current.value = r);
2420
2486
  },
2421
- insertAtCursor: se,
2487
+ insertAtCursor: me,
2422
2488
  applyFormat(t) {
2423
- const r = Wn[t];
2424
- r && ue(...r);
2489
+ const r = uo[t];
2490
+ r && be(...r);
2425
2491
  },
2426
2492
  focus() {
2427
2493
  var r;
2428
- const t = G.current;
2494
+ const t = X.current;
2429
2495
  if (t)
2430
2496
  try {
2431
- t(y, "editor.focus");
2497
+ t(_, "editor.focus");
2432
2498
  return;
2433
2499
  } catch {
2434
2500
  }
2435
- (r = V.current) == null || r.focus();
2501
+ (r = J.current) == null || r.focus();
2436
2502
  },
2437
2503
  clear() {
2438
- re("source.setCode", "") || V.current && (V.current.value = "");
2504
+ ne("source.setCode", "") || J.current && (J.current.value = "");
2439
2505
  }
2440
2506
  }),
2441
- [y, ae, re, se, ue]
2507
+ [_, ue, ne, me, be]
2442
2508
  );
2443
- Ot(X, () => qe, [qe]), Ft(hn, qe, o);
2444
- const $t = k(
2509
+ tr(W, () => Qe, [Qe]), or(Rn, Qe, o);
2510
+ const Yt = w(
2445
2511
  (t) => {
2446
2512
  var r;
2447
- (r = Q.current) == null || r.call(Q, {
2448
- html: oe(t.target.value),
2513
+ (r = Z.current) == null || r.call(Z, {
2514
+ html: se(t.target.value),
2449
2515
  markdown: ""
2450
2516
  });
2451
2517
  },
2452
2518
  []
2453
- ), _e = u ?? R("editor.regionLabel"), Dt = d ?? R("editor.placeholder");
2454
- Z(() => {
2519
+ ), De = m ?? M("editor.regionLabel"), Jt = d ?? M("editor.placeholder");
2520
+ G(() => {
2455
2521
  var s;
2456
- if (j) return;
2457
- const t = (s = M.current) == null ? void 0 : s.querySelector(".redactor-in");
2522
+ if (oe) return;
2523
+ const t = (s = D.current) == null ? void 0 : s.querySelector(".redactor-in");
2458
2524
  if (!t) return;
2459
2525
  const r = () => {
2460
- t.getAttribute("role") !== "textbox" && t.setAttribute("role", "textbox"), t.getAttribute("aria-multiline") !== "true" && t.setAttribute("aria-multiline", "true"), t.getAttribute("aria-label") !== _e && t.setAttribute("aria-label", _e), t.hasAttribute("aria-labelledby") && t.removeAttribute("aria-labelledby");
2526
+ t.getAttribute("role") !== "textbox" && t.setAttribute("role", "textbox"), t.getAttribute("aria-multiline") !== "true" && t.setAttribute("aria-multiline", "true"), t.getAttribute("aria-label") !== De && t.setAttribute("aria-label", De), t.hasAttribute("aria-labelledby") && t.removeAttribute("aria-labelledby");
2461
2527
  };
2462
2528
  r();
2463
2529
  const n = new MutationObserver(r);
@@ -2465,87 +2531,85 @@ const Qn = Ge(
2465
2531
  attributes: !0,
2466
2532
  attributeFilter: ["role", "aria-labelledby"]
2467
2533
  }), () => n.disconnect();
2468
- }, [j, _e]);
2469
- const je = ne !== null, me = [];
2470
- return S && me.push({
2534
+ }, [oe, De]);
2535
+ const Ze = ae !== null, ve = [];
2536
+ return S && ve.push({
2471
2537
  key: "dictate",
2472
- icon: be ? /* @__PURE__ */ e(Se, { "aria-hidden": "true", className: "ds:size-5 ds:fill-current" }) : /* @__PURE__ */ e(ft, { "aria-hidden": "true", className: "ds:size-5" }),
2473
- label: R(be ? "editor.ai.dictateStop" : "editor.ai.dictateStart"),
2474
- onClick: Ht,
2475
- recording: be
2476
- }), Y && me.push({
2538
+ icon: he ? /* @__PURE__ */ e(je, { "aria-hidden": "true", className: "ds:size-5 ds:fill-current" }) : /* @__PURE__ */ e(Mt, { "aria-hidden": "true", className: "ds:size-5" }),
2539
+ label: M(he ? "editor.ai.dictateStop" : "editor.ai.dictateStart"),
2540
+ onClick: Ut,
2541
+ recording: he
2542
+ }), V && ve.push({
2477
2543
  key: "proofread",
2478
2544
  // While running, the segment becomes a STOP/cancel button (progress is
2479
2545
  // shown by the scrim spinner).
2480
- icon: ne === "proofread" ? /* @__PURE__ */ e(Se, { "aria-hidden": "true", className: "ds:size-5 ds:fill-current" }) : /* @__PURE__ */ e(Ur, { "aria-hidden": "true", className: "ds:size-5" }),
2481
- label: ne === "proofread" ? R("common.cancel") : R("editor.ai.proofread", "Check spelling & grammar"),
2482
- onClick: ne === "proofread" ? at : () => it("proofread", Y),
2483
- running: ne === "proofread"
2484
- }), H && me.push({
2546
+ icon: ae === "proofread" ? /* @__PURE__ */ e(je, { "aria-hidden": "true", className: "ds:size-5 ds:fill-current" }) : /* @__PURE__ */ e(hn, { "aria-hidden": "true", className: "ds:size-5" }),
2547
+ label: ae === "proofread" ? M("common.cancel") : M("editor.ai.proofread", "Check spelling & grammar"),
2548
+ onClick: ae === "proofread" ? pt : () => ft("proofread", V),
2549
+ running: ae === "proofread"
2550
+ }), F && ve.push({
2485
2551
  key: "format",
2486
- icon: ne === "format" ? /* @__PURE__ */ e(Se, { "aria-hidden": "true", className: "ds:size-5 ds:fill-current" }) : /* @__PURE__ */ e(dn, { "aria-hidden": "true", className: "ds:size-5" }),
2487
- label: ne === "format" ? R("common.cancel") : R("editor.ai.autoFormat", "Auto-format document"),
2488
- onClick: ne === "format" ? at : () => it("format", H),
2489
- running: ne === "format"
2490
- }), f && me.push({
2552
+ icon: ae === "format" ? /* @__PURE__ */ e(je, { "aria-hidden": "true", className: "ds:size-5 ds:fill-current" }) : /* @__PURE__ */ e(Tn, { "aria-hidden": "true", className: "ds:size-5" }),
2553
+ label: ae === "format" ? M("common.cancel") : M("editor.ai.autoFormat", "Auto-format document"),
2554
+ onClick: ae === "format" ? pt : () => ft("format", F),
2555
+ running: ae === "format"
2556
+ }), p && ve.push({
2491
2557
  key: "write",
2492
- icon: /* @__PURE__ */ e(tr, { "aria-hidden": "true", className: "ds:size-5" }),
2493
- label: R("editor.ai.helpMeWrite"),
2494
- onClick: () => {
2495
- Ze(), Ue(!0);
2496
- }
2497
- }), /* @__PURE__ */ v(
2558
+ icon: /* @__PURE__ */ e(yr, { "aria-hidden": "true", className: "ds:size-5" }),
2559
+ label: M("editor.ai.helpMeWrite"),
2560
+ onClick: Qt
2561
+ }), /* @__PURE__ */ y(
2498
2562
  "div",
2499
2563
  {
2500
- ref: M,
2501
- className: [Qn(), E].filter(Boolean).join(" "),
2564
+ ref: D,
2565
+ className: [go(), R].filter(Boolean).join(" "),
2502
2566
  "data-component": "rich-text-editor",
2503
2567
  "data-component-id": o,
2504
- "data-min-height": w,
2568
+ "data-min-height": k,
2505
2569
  children: [
2506
- !j && !b ? /* @__PURE__ */ e(
2507
- Bn,
2570
+ !oe && !v ? /* @__PURE__ */ e(
2571
+ ao,
2508
2572
  {
2509
- run: ue,
2510
- active: Qe,
2511
- preset: m,
2512
- insertHtml: De,
2513
- insertTable: Rt,
2514
- saveSelection: Ze,
2515
- restoreSelection: Ye,
2516
- getSelectedText: Mt,
2517
- uploadImage: l ? St : void 0,
2518
- enableColor: (N == null ? void 0 : N.includes("fontcolor")) ?? !1,
2573
+ run: be,
2574
+ active: st,
2575
+ preset: h,
2576
+ insertHtml: We,
2577
+ insertTable: Bt,
2578
+ saveSelection: ke,
2579
+ restoreSelection: Re,
2580
+ getSelectedText: Ht,
2581
+ uploadImage: l ? jt : void 0,
2582
+ enableColor: (C == null ? void 0 : C.includes("fontcolor")) ?? !1,
2519
2583
  enableImage: !!l,
2520
- enableTable: (N == null ? void 0 : N.includes("table")) ?? !1,
2521
- showExtensions: C
2584
+ enableTable: (C == null ? void 0 : C.includes("table")) ?? !1,
2585
+ showExtensions: N
2522
2586
  }
2523
2587
  ) : null,
2524
- /* @__PURE__ */ v("div", { className: "ds:relative", ref: O, children: [
2588
+ /* @__PURE__ */ y("div", { className: "ds:relative", ref: ee, children: [
2525
2589
  /* @__PURE__ */ e(
2526
2590
  "textarea",
2527
2591
  {
2528
- ref: V,
2529
- id: P,
2530
- "aria-label": _e,
2592
+ ref: J,
2593
+ id: de,
2594
+ "aria-label": De,
2531
2595
  "aria-multiline": "true",
2532
- "aria-busy": je || void 0,
2533
- placeholder: Dt,
2534
- onChange: j ? $t : void 0,
2535
- readOnly: j ? b : void 0,
2536
- className: j ? Zn() : void 0
2596
+ "aria-busy": Ze || void 0,
2597
+ placeholder: Jt,
2598
+ onChange: oe ? Yt : void 0,
2599
+ readOnly: oe ? v : void 0,
2600
+ className: oe ? fo() : void 0
2537
2601
  }
2538
2602
  ),
2539
- je ? /* @__PURE__ */ e(
2603
+ Ze ? /* @__PURE__ */ e(
2540
2604
  "div",
2541
2605
  {
2542
2606
  "aria-hidden": "true",
2543
2607
  className: "ds:absolute ds:inset-0 ds:z-[5] ds:flex ds:items-center ds:justify-center ds:cursor-wait ds:rounded-[var(--radius-md)] ds:bg-[color-mix(in_srgb,var(--background)_40%,transparent)]",
2544
- children: /* @__PURE__ */ e(gt, { size: "lg", variant: "prism" })
2608
+ children: /* @__PURE__ */ e(Nt, { size: "lg", variant: "prism" })
2545
2609
  }
2546
2610
  ) : null,
2547
- /* @__PURE__ */ v("div", { className: "ds:sticky ds:bottom-0 ds:z-10", children: [
2548
- me.length > 0 ? /* @__PURE__ */ e("div", { className: "ds:absolute ds:[inset-block-end:var(--spacing-md)] ds:[inset-inline-end:var(--spacing-md)] ds:z-10 ds:flex ds:items-center ds:overflow-hidden ds:rounded-full ds:bg-[var(--primary)] ds:bg-[image:var(--gradient-brand)] ds:shadow-[0_8px_24px_color-mix(in_srgb,var(--primary)_35%,transparent)]", children: me.map((t, r) => /* @__PURE__ */ v(He, { children: [
2611
+ /* @__PURE__ */ y("div", { className: "ds:sticky ds:bottom-0 ds:z-10", children: [
2612
+ ve.length > 0 ? /* @__PURE__ */ e("div", { className: "ds:absolute ds:[inset-block-end:var(--spacing-md)] ds:[inset-inline-end:var(--spacing-md)] ds:z-10 ds:flex ds:items-center ds:overflow-hidden ds:rounded-full ds:bg-[var(--primary)] ds:bg-[image:var(--gradient-brand)] ds:shadow-[0_8px_24px_color-mix(in_srgb,var(--primary)_35%,transparent)]", children: ve.map((t, r) => /* @__PURE__ */ y(Ke, { children: [
2549
2613
  r > 0 ? /* @__PURE__ */ e(
2550
2614
  "span",
2551
2615
  {
@@ -2560,57 +2624,85 @@ const Qn = Ge(
2560
2624
  onClick: t.onClick,
2561
2625
  "aria-pressed": t.recording || void 0,
2562
2626
  "aria-busy": t.running || void 0,
2563
- disabled: je && !t.running || void 0,
2627
+ disabled: Ze && !t.running || void 0,
2564
2628
  "aria-label": t.label,
2565
- className: t.recording ? Jn : Yn,
2629
+ className: t.recording ? bo : po,
2566
2630
  children: t.icon
2567
2631
  }
2568
2632
  )
2569
2633
  ] }, t.key)) }) : null,
2570
- f ? /* @__PURE__ */ e(
2571
- bn,
2634
+ p ? /* @__PURE__ */ e(
2635
+ Ln,
2572
2636
  {
2573
- open: wt,
2574
- onClose: () => Ue(!1),
2575
- onRequestAiDraft: f,
2637
+ open: Rt && !ie,
2638
+ onClose: () => ze(!1),
2639
+ onRequestAiDraft: p,
2576
2640
  onInsert: (t) => {
2577
- Ye(), se(t, { asHtml: A !== "text" });
2641
+ Re(), me(t, { asHtml: E !== "text" });
2578
2642
  },
2579
- previewAsHtml: A !== "text",
2580
- privacyNotice: x,
2643
+ previewAsHtml: E !== "text",
2644
+ privacyNotice: Zt,
2581
2645
  onDictate: S
2582
2646
  }
2647
+ ) : null,
2648
+ u ? /* @__PURE__ */ e(
2649
+ Ct,
2650
+ {
2651
+ open: Kt !== null,
2652
+ onClose: ht,
2653
+ ariaLabel: M(
2654
+ "editor.ai.consentRegionLabel",
2655
+ "AI assistance consent for this document"
2656
+ ),
2657
+ footer: /* @__PURE__ */ e(ce, { intent: "ghost", size: "sm", onClick: ht, children: M("common.close") }),
2658
+ children: /* @__PURE__ */ e(
2659
+ ar,
2660
+ {
2661
+ granted: u.granted,
2662
+ grantedAt: u.grantedAt,
2663
+ grantedBy: u.grantedBy,
2664
+ canGrant: (u.canGrant ?? !0) && u.onGrant !== void 0,
2665
+ pending: Wt,
2666
+ onGrantConsent: Xt,
2667
+ headingLevel: Y,
2668
+ "aria-label": M(
2669
+ "editor.ai.consentRegionLabel",
2670
+ "AI assistance consent for this document"
2671
+ )
2672
+ }
2673
+ )
2674
+ }
2583
2675
  ) : null
2584
2676
  ] }),
2585
- !j && !b && ((N == null ? void 0 : N.includes("table")) ?? !1) ? /* @__PURE__ */ e(
2586
- Sn,
2677
+ !oe && !v && ((C == null ? void 0 : C.includes("table")) ?? !1) ? /* @__PURE__ */ e(
2678
+ Un,
2587
2679
  {
2588
- active: Qe,
2589
- run: ue,
2590
- areaRef: O,
2591
- getActiveTableEl: zt,
2592
- enableColor: (N == null ? void 0 : N.includes("fontcolor")) ?? !1,
2593
- saveTableCell: Tt,
2594
- applyTableBackground: _t
2680
+ active: st,
2681
+ run: be,
2682
+ areaRef: ee,
2683
+ getActiveTableEl: $t,
2684
+ enableColor: (C == null ? void 0 : C.includes("fontcolor")) ?? !1,
2685
+ saveTableCell: Pt,
2686
+ applyTableBackground: Dt
2595
2687
  }
2596
2688
  ) : null,
2597
- !j && !b ? /* @__PURE__ */ e(
2598
- Fn,
2689
+ !oe && !v ? /* @__PURE__ */ e(
2690
+ io,
2599
2691
  {
2600
- areaRef: O,
2601
- activeImageEl: xt,
2602
- applyImageClass: Et,
2603
- setImageWidth: At
2692
+ areaRef: ee,
2693
+ activeImageEl: St,
2694
+ applyImageClass: Ot,
2695
+ setImageWidth: qt
2604
2696
  }
2605
2697
  ) : null
2606
2698
  ] }),
2607
- S ? /* @__PURE__ */ e("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: Lt }) : null,
2608
- S && It ? /* @__PURE__ */ e(
2699
+ S ? /* @__PURE__ */ e("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: Gt }) : null,
2700
+ S && Ft ? /* @__PURE__ */ e(
2609
2701
  "p",
2610
2702
  {
2611
2703
  role: "alert",
2612
2704
  className: "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--destructive)]",
2613
- children: R("editor.ai.dictationError")
2705
+ children: M("editor.ai.dictationError")
2614
2706
  }
2615
2707
  ) : null
2616
2708
  ]
@@ -2618,10 +2710,10 @@ const Qn = Ge(
2618
2710
  );
2619
2711
  }
2620
2712
  );
2621
- eo.displayName = "RichTextEditor";
2713
+ yo.displayName = "RichTextEditor";
2622
2714
  export {
2623
- eo as R,
2624
- hn as r,
2625
- Qn as w
2715
+ yo as R,
2716
+ Rn as r,
2717
+ go as w
2626
2718
  };
2627
- //# sourceMappingURL=rich-text-editor-C6fE-uP4.js.map
2719
+ //# sourceMappingURL=rich-text-editor-BJ1-Lkao.js.map