reactjs-tiptap-editor 0.2.29 → 0.3.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 (255) hide show
  1. package/lib/ActionMenuButton-Bycn676n.js +33 -0
  2. package/lib/ActionMenuButton-CpFNwSUZ.cjs +1 -0
  3. package/lib/Attachment.cjs +19 -0
  4. package/lib/Attachment.d.cts +344 -0
  5. package/lib/Attachment.d.ts +344 -0
  6. package/lib/Attachment.js +259 -0
  7. package/lib/Blockquote.cjs +1 -0
  8. package/lib/Blockquote.d.cts +343 -0
  9. package/lib/Blockquote.d.ts +343 -0
  10. package/lib/Blockquote.js +65 -0
  11. package/lib/Bold.cjs +1 -0
  12. package/lib/Bold.d.cts +343 -0
  13. package/lib/Bold.d.ts +343 -0
  14. package/lib/Bold.js +90 -0
  15. package/lib/BulletList.cjs +1 -0
  16. package/lib/BulletList.d.cts +343 -0
  17. package/lib/BulletList.d.ts +343 -0
  18. package/lib/BulletList.js +72 -0
  19. package/lib/Clear.cjs +1 -0
  20. package/lib/Clear.d.cts +342 -0
  21. package/lib/Clear.d.ts +342 -0
  22. package/lib/Clear.js +23 -0
  23. package/lib/Code.cjs +1 -0
  24. package/lib/Code.d.cts +343 -0
  25. package/lib/Code.d.ts +343 -0
  26. package/lib/Code.js +70 -0
  27. package/lib/CodeBlock.cjs +39 -0
  28. package/lib/CodeBlock.d.cts +352 -0
  29. package/lib/CodeBlock.d.ts +352 -0
  30. package/lib/CodeBlock.js +3639 -0
  31. package/lib/Color.cjs +1 -0
  32. package/lib/Color.d.cts +350 -0
  33. package/lib/Color.d.ts +350 -0
  34. package/lib/Color.js +141 -0
  35. package/lib/Document.cjs +1 -0
  36. package/lib/Document.d.cts +272 -0
  37. package/lib/Document.d.ts +272 -0
  38. package/lib/Document.js +13 -0
  39. package/lib/Drawer-BZadE1gM.js +1367 -0
  40. package/lib/Drawer-rwnFvgZR.cjs +1 -0
  41. package/lib/Drawer.cjs +1 -0
  42. package/lib/Drawer.d.cts +344 -0
  43. package/lib/Drawer.d.ts +344 -0
  44. package/lib/Drawer.js +7 -0
  45. package/lib/Emoji.cjs +1 -0
  46. package/lib/Emoji.d.cts +277 -0
  47. package/lib/Emoji.d.ts +277 -0
  48. package/lib/Emoji.js +2168 -0
  49. package/lib/Excalidraw-B2414Smc.js +651 -0
  50. package/lib/Excalidraw-D21vMFe0.cjs +1 -0
  51. package/lib/Excalidraw.cjs +1 -0
  52. package/lib/Excalidraw.d.cts +278 -0
  53. package/lib/Excalidraw.d.ts +278 -0
  54. package/lib/Excalidraw.js +6 -0
  55. package/lib/ExportPdf.cjs +15 -0
  56. package/lib/ExportPdf.d.cts +270 -0
  57. package/lib/ExportPdf.d.ts +270 -0
  58. package/lib/ExportPdf.js +67 -0
  59. package/lib/ExportWord.cjs +1 -0
  60. package/lib/ExportWord.d.cts +341 -0
  61. package/lib/ExportWord.d.ts +341 -0
  62. package/lib/ExportWord.js +72 -0
  63. package/lib/FontFamily.cjs +1 -0
  64. package/lib/FontFamily.d.cts +354 -0
  65. package/lib/FontFamily.d.ts +354 -0
  66. package/lib/FontFamily.js +136 -0
  67. package/lib/FontSize.cjs +1 -0
  68. package/lib/FontSize.d.cts +359 -0
  69. package/lib/FontSize.d.ts +359 -0
  70. package/lib/FontSize.js +110 -0
  71. package/lib/FormatPainter.cjs +1 -0
  72. package/lib/FormatPainter.d.cts +353 -0
  73. package/lib/FormatPainter.d.ts +353 -0
  74. package/lib/FormatPainter.js +74 -0
  75. package/lib/Heading.cjs +1 -0
  76. package/lib/Heading.d.cts +343 -0
  77. package/lib/Heading.d.ts +343 -0
  78. package/lib/Heading.js +147 -0
  79. package/lib/Highlight.cjs +1 -0
  80. package/lib/Highlight.d.cts +344 -0
  81. package/lib/Highlight.d.ts +344 -0
  82. package/lib/Highlight.js +85 -0
  83. package/lib/History.cjs +1 -0
  84. package/lib/History.d.cts +343 -0
  85. package/lib/History.d.ts +343 -0
  86. package/lib/History.js +431 -0
  87. package/lib/HorizontalRule.cjs +1 -0
  88. package/lib/HorizontalRule.d.cts +343 -0
  89. package/lib/HorizontalRule.d.ts +343 -0
  90. package/lib/HorizontalRule.js +87 -0
  91. package/lib/Iframe.cjs +1 -0
  92. package/lib/Iframe.d.cts +277 -0
  93. package/lib/Iframe.d.ts +277 -0
  94. package/lib/Iframe.js +6 -0
  95. package/lib/Image.cjs +1 -0
  96. package/lib/Image.d.cts +370 -0
  97. package/lib/Image.d.ts +370 -0
  98. package/lib/Image.js +7 -0
  99. package/lib/ImageGif.cjs +1 -0
  100. package/lib/ImageGif.d.cts +292 -0
  101. package/lib/ImageGif.d.ts +292 -0
  102. package/lib/ImageGif.js +7 -0
  103. package/lib/ImportWord.cjs +231 -0
  104. package/lib/ImportWord.d.cts +353 -0
  105. package/lib/ImportWord.d.ts +353 -0
  106. package/lib/ImportWord.js +16620 -0
  107. package/lib/Indent.cjs +1 -0
  108. package/lib/Indent.d.cts +344 -0
  109. package/lib/Indent.d.ts +344 -0
  110. package/lib/Indent.js +78 -0
  111. package/lib/Italic.cjs +1 -0
  112. package/lib/Italic.d.cts +343 -0
  113. package/lib/Italic.d.ts +343 -0
  114. package/lib/Italic.js +91 -0
  115. package/lib/Katex.cjs +1 -0
  116. package/lib/Katex.d.cts +279 -0
  117. package/lib/Katex.d.ts +279 -0
  118. package/lib/Katex.js +197 -0
  119. package/lib/LineHeight.cjs +1 -0
  120. package/lib/LineHeight.d.cts +347 -0
  121. package/lib/LineHeight.d.ts +347 -0
  122. package/lib/LineHeight.js +137 -0
  123. package/lib/Link.cjs +5 -0
  124. package/lib/Link.d.cts +343 -0
  125. package/lib/Link.d.ts +343 -0
  126. package/lib/Link.js +1048 -0
  127. package/lib/ListItem.cjs +1 -0
  128. package/lib/ListItem.d.cts +269 -0
  129. package/lib/ListItem.d.ts +269 -0
  130. package/lib/ListItem.js +33 -0
  131. package/lib/Mention.cjs +1 -0
  132. package/lib/Mention.d.cts +272 -0
  133. package/lib/Mention.d.ts +272 -0
  134. package/lib/Mention.js +233 -0
  135. package/lib/Mermaid.cjs +2 -0
  136. package/lib/Mermaid.d.cts +344 -0
  137. package/lib/Mermaid.d.ts +344 -0
  138. package/lib/Mermaid.js +390 -0
  139. package/lib/MoreMark.cjs +1 -0
  140. package/lib/MoreMark.d.cts +355 -0
  141. package/lib/MoreMark.d.ts +355 -0
  142. package/lib/MoreMark.js +95 -0
  143. package/lib/MultiColumn.cjs +1 -0
  144. package/lib/MultiColumn.d.cts +277 -0
  145. package/lib/MultiColumn.d.ts +277 -0
  146. package/lib/MultiColumn.js +8 -0
  147. package/lib/OrderedList.cjs +1 -0
  148. package/lib/OrderedList.d.cts +343 -0
  149. package/lib/OrderedList.d.ts +343 -0
  150. package/lib/OrderedList.js +90 -0
  151. package/lib/RichTextEditor-Cy9XKEI5.js +11178 -0
  152. package/lib/RichTextEditor-DkpDEr5U.cjs +137 -0
  153. package/lib/SearchAndReplace.cjs +1 -0
  154. package/lib/SearchAndReplace.d.cts +358 -0
  155. package/lib/SearchAndReplace.d.ts +358 -0
  156. package/lib/SearchAndReplace.js +339 -0
  157. package/lib/Selection.cjs +1 -0
  158. package/lib/Selection.d.cts +272 -0
  159. package/lib/Selection.d.ts +272 -0
  160. package/lib/Selection.js +25 -0
  161. package/lib/SlashCommand.cjs +1 -0
  162. package/lib/SlashCommand.d.cts +299 -0
  163. package/lib/SlashCommand.d.ts +299 -0
  164. package/lib/SlashCommand.js +369 -0
  165. package/lib/Strike.cjs +1 -0
  166. package/lib/Strike.d.cts +343 -0
  167. package/lib/Strike.d.ts +343 -0
  168. package/lib/Strike.js +80 -0
  169. package/lib/SubAndSuperScript.cjs +1 -0
  170. package/lib/SubAndSuperScript.d.cts +358 -0
  171. package/lib/SubAndSuperScript.d.ts +358 -0
  172. package/lib/SubAndSuperScript.js +41 -0
  173. package/lib/Table.cjs +1 -0
  174. package/lib/Table.d.cts +366 -0
  175. package/lib/Table.d.ts +366 -0
  176. package/lib/Table.js +2165 -0
  177. package/lib/TableOfContent.cjs +1 -0
  178. package/lib/TableOfContent.d.cts +274 -0
  179. package/lib/TableOfContent.d.ts +274 -0
  180. package/lib/TableOfContent.js +184 -0
  181. package/lib/TaskList.cjs +1 -0
  182. package/lib/TaskList.d.cts +349 -0
  183. package/lib/TaskList.d.ts +349 -0
  184. package/lib/TaskList.js +175 -0
  185. package/lib/TextAlign.cjs +1 -0
  186. package/lib/TextAlign.d.cts +353 -0
  187. package/lib/TextAlign.d.ts +353 -0
  188. package/lib/TextAlign.js +165 -0
  189. package/lib/TextBubble.cjs +1 -0
  190. package/lib/TextBubble.d.cts +343 -0
  191. package/lib/TextBubble.d.ts +343 -0
  192. package/lib/TextBubble.js +131 -0
  193. package/lib/TextDirection.cjs +1 -0
  194. package/lib/TextDirection.d.cts +270 -0
  195. package/lib/TextDirection.d.ts +270 -0
  196. package/lib/TextDirection.js +142 -0
  197. package/lib/TextUnderline.cjs +1 -0
  198. package/lib/TextUnderline.d.cts +343 -0
  199. package/lib/TextUnderline.d.ts +343 -0
  200. package/lib/TextUnderline.js +61 -0
  201. package/lib/TrailingNode.cjs +1 -0
  202. package/lib/TrailingNode.d.cts +280 -0
  203. package/lib/TrailingNode.d.ts +280 -0
  204. package/lib/TrailingNode.js +41 -0
  205. package/lib/Twitter-B_tSItrW.js +1743 -0
  206. package/lib/Twitter-CfDC4bFV.cjs +17 -0
  207. package/lib/Twitter.cjs +1 -0
  208. package/lib/Twitter.d.cts +295 -0
  209. package/lib/Twitter.d.ts +295 -0
  210. package/lib/Twitter.js +6 -0
  211. package/lib/Video.cjs +1 -0
  212. package/lib/Video.d.cts +371 -0
  213. package/lib/Video.d.ts +371 -0
  214. package/lib/Video.js +6 -0
  215. package/lib/bubble-extra.cjs +2 -0
  216. package/lib/bubble-extra.d.cts +294 -0
  217. package/lib/bubble-extra.d.ts +294 -0
  218. package/lib/bubble-extra.js +623 -0
  219. package/lib/dom-dataset-CAXnsjYE.cjs +33 -0
  220. package/lib/dom-dataset-CJ7GyQ2E.js +999 -0
  221. package/lib/index-COecBbaE.cjs +89 -0
  222. package/lib/index-ClFtfQ0J.cjs +1 -0
  223. package/lib/index-CvYIX2-x.js +129 -0
  224. package/lib/index-CySbCeQd.cjs +1 -0
  225. package/lib/{index-CO-iymkb.js → index-D9llIWB5.js} +442 -101
  226. package/lib/index-DXBa3JBo.js +46 -0
  227. package/lib/index-DjP7Onch.cjs +1 -0
  228. package/lib/index-Drmyqk9P.js +12322 -0
  229. package/lib/index-DuhDIOel.js +76 -0
  230. package/lib/index-LbrE7K9i.cjs +1 -0
  231. package/lib/index.cjs +2 -1
  232. package/lib/index.d.cts +290 -108
  233. package/lib/index.d.ts +290 -108
  234. package/lib/index.js +587 -13
  235. package/lib/locale-bundle.cjs +1 -1
  236. package/lib/locale-bundle.d.cts +108 -108
  237. package/lib/locale-bundle.d.ts +108 -108
  238. package/lib/locale-bundle.js +1 -1
  239. package/lib/shortId-Bfj8TyNr.cjs +2 -0
  240. package/lib/shortId-WJVkrvml.js +30 -0
  241. package/lib/style.css +1 -1
  242. package/lib/textarea-B45fP3gP.cjs +1 -0
  243. package/lib/textarea-DXTdXr2y.js +20 -0
  244. package/package.json +678 -15
  245. package/lib/RichTextEditor-Ce2IeNE6.js +0 -8265
  246. package/lib/RichTextEditor-hDDApaDD.cjs +0 -136
  247. package/lib/extension-bundle.cjs +0 -33
  248. package/lib/extension-bundle.d.cts +0 -951
  249. package/lib/extension-bundle.d.ts +0 -951
  250. package/lib/extension-bundle.js +0 -5982
  251. package/lib/index-CJ6Hb9MN.cjs +0 -1
  252. package/lib/tiptap-DOP8lVCQ.js +0 -5950
  253. package/lib/tiptap-Dq62HiQ9.cjs +0 -113
  254. package/lib/vendor-BbgkyoD-.js +0 -40297
  255. package/lib/vendor-DdwtMmSr.cjs +0 -302
@@ -1,9 +1,8 @@
1
- var p = Object.defineProperty;
2
- var s = (e, t, o) => t in e ? p(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
3
- var a = (e, t, o) => s(e, typeof t != "symbol" ? t + "" : t, o);
4
- import { useMemo as m, useEffect as g } from "react";
5
- import { aj as u, ak as c } from "./vendor-BbgkyoD-.js";
6
- const h = "en", b = 200, E = b - 80, L = 20, S = 1e5, w = 16, B = 10, R = 10, I = 2, W = [
1
+ var D = Object.defineProperty;
2
+ var S = (t, o, n) => o in t ? D(t, o, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[o] = n;
3
+ var F = (t, o, n) => S(t, typeof o != "symbol" ? o + "" : o, n);
4
+ import { useSyncExternalStore as y, useMemo as E, useEffect as L } from "react";
5
+ const w = "en", B = 200, it = B - 80, rt = 20, lt = 1e5, dt = 16, at = 10, nt = 10, st = 2, pt = [
7
6
  "#000000",
8
7
  "#262626",
9
8
  "#595959",
@@ -74,7 +73,7 @@ const h = "en", b = 200, E = b - 80, L = 20, S = 1e5, w = 16, B = 10, R = 10, I
74
73
  "#061178",
75
74
  "#22075E",
76
75
  "#780650"
77
- ], U = [
76
+ ], ut = [
78
77
  "Inter",
79
78
  "Comic Sans MS, Comic Sans",
80
79
  "serif",
@@ -90,7 +89,7 @@ const h = "en", b = 200, E = b - 80, L = 20, S = 1e5, w = 16, B = 10, R = 10, I
90
89
  "Lucida Console",
91
90
  "Monaco",
92
91
  "monospace"
93
- ], j = [
92
+ ], gt = [
94
93
  "10px",
95
94
  "11px",
96
95
  "12px",
@@ -105,9 +104,9 @@ const h = "en", b = 200, E = b - 80, L = 20, S = 1e5, w = 16, B = 10, R = 10, I
105
104
  "36px",
106
105
  "48px",
107
106
  "72px"
108
- ], P = "default";
109
- var f = /* @__PURE__ */ ((e) => (e[e["size-small"] = 200] = "size-small", e[e["size-medium"] = 500] = "size-medium", e["size-large"] = "100%", e))(f || {}), k = /* @__PURE__ */ ((e) => (e[e["size-small"] = 480] = "size-small", e[e["size-medium"] = 640] = "size-medium", e["size-large"] = "100%", e))(k || {});
110
- const N = ["100%", "115%", "150%", "200%", "250%", "300%"], M = "1", H = [
107
+ ], mt = "default";
108
+ var R = /* @__PURE__ */ ((t) => (t[t["size-small"] = 200] = "size-small", t[t["size-medium"] = 500] = "size-medium", t["size-large"] = "100%", t))(R || {}), I = /* @__PURE__ */ ((t) => (t[t["size-small"] = 480] = "size-small", t[t["size-medium"] = 640] = "size-medium", t["size-large"] = "100%", t))(I || {});
109
+ const ct = ["100%", "115%", "150%", "200%", "250%", "300%"], ht = "1", ft = [
111
110
  "bold",
112
111
  "italic",
113
112
  "underline",
@@ -118,7 +117,348 @@ const N = ["100%", "115%", "150%", "200%", "250%", "300%"], M = "1", H = [
118
117
  "color",
119
118
  "highlight",
120
119
  "textAlign"
121
- ], F = {
120
+ ];
121
+ function W({
122
+ updateComputed: t,
123
+ notifyEffect: o
124
+ }) {
125
+ let n, s;
126
+ return {
127
+ /**
128
+ * Links a given dependency and subscriber if they are not already linked.
129
+ *
130
+ * @param dep - The dependency to be linked.
131
+ * @param sub - The subscriber that depends on this dependency.
132
+ * @returns The newly created link object if the two are not already linked; otherwise `undefined`.
133
+ */
134
+ link(e, i) {
135
+ const r = i.depsTail;
136
+ if (r !== void 0 && r.dep === e)
137
+ return;
138
+ const d = r !== void 0 ? r.nextDep : i.deps;
139
+ if (d !== void 0 && d.dep === e) {
140
+ i.depsTail = d;
141
+ return;
142
+ }
143
+ const l = e.subsTail;
144
+ if (!(l !== void 0 && l.sub === i && h(l, i)))
145
+ return p(e, i, d, r);
146
+ },
147
+ /**
148
+ * Traverses and marks subscribers starting from the provided link.
149
+ *
150
+ * It sets flags (e.g., Dirty, PendingComputed, PendingEffect) on each subscriber
151
+ * to indicate which ones require re-computation or effect processing.
152
+ * This function should be called after a signal's value changes.
153
+ *
154
+ * @param link - The starting link from which propagation begins.
155
+ */
156
+ propagate(e) {
157
+ let i = 32, r = e, d = 0;
158
+ t: do {
159
+ const l = e.sub, a = l.flags;
160
+ if (!(a & 244) && (l.flags = a | i | 8, !0) || a & 16 && !(a & 4) && (l.flags = a & -17 | i | 8, !0) || !(a & 224) && h(e, l) && (l.flags = a | 16 | i | 8, l.subs !== void 0)) {
161
+ const g = l.subs;
162
+ if (g !== void 0) {
163
+ g.nextSub !== void 0 ? (g.prevSub = r, e = r = g, i = 64, ++d) : (e = g, i = a & 2 ? 128 : 64);
164
+ continue;
165
+ }
166
+ a & 2 && (s !== void 0 ? s.depsTail.nextDep = l.deps : n = l, s = l);
167
+ } else a & (4 | i) ? !(a & i) && a & 224 && h(e, l) && (l.flags = a | i) : (l.flags = a | i | 8, (a & 10) === 2 && (s !== void 0 ? s.depsTail.nextDep = l.deps : n = l, s = l));
168
+ if ((e = r.nextSub) !== void 0) {
169
+ r = e, i = d ? 64 : 32;
170
+ continue;
171
+ }
172
+ for (; d; ) {
173
+ --d;
174
+ const x = r.dep.subs;
175
+ if (r = x.prevSub, x.prevSub = void 0, (e = r.nextSub) !== void 0) {
176
+ r = e, i = d ? 64 : 32;
177
+ continue t;
178
+ }
179
+ }
180
+ break;
181
+ } while (!0);
182
+ },
183
+ /**
184
+ * Prepares the given subscriber to track new dependencies.
185
+ *
186
+ * It resets the subscriber's internal pointers (e.g., depsTail) and
187
+ * sets its flags to indicate it is now tracking dependency links.
188
+ *
189
+ * @param sub - The subscriber to start tracking.
190
+ */
191
+ startTracking(e) {
192
+ e.depsTail = void 0, e.flags = e.flags & -249 | 4;
193
+ },
194
+ /**
195
+ * Concludes tracking of dependencies for the specified subscriber.
196
+ *
197
+ * It clears or unlinks any tracked dependency information, then
198
+ * updates the subscriber's flags to indicate tracking is complete.
199
+ *
200
+ * @param sub - The subscriber whose tracking is ending.
201
+ */
202
+ endTracking(e) {
203
+ const i = e.depsTail;
204
+ if (i !== void 0) {
205
+ const r = i.nextDep;
206
+ r !== void 0 && (T(r), i.nextDep = void 0);
207
+ } else e.deps !== void 0 && (T(e.deps), e.deps = void 0);
208
+ e.flags &= -5;
209
+ },
210
+ /**
211
+ * Updates the dirty flag for the given subscriber based on its dependencies.
212
+ *
213
+ * If the subscriber has any pending computeds, this function sets the Dirty flag
214
+ * and returns `true`. Otherwise, it clears the PendingComputed flag and returns `false`.
215
+ *
216
+ * @param sub - The subscriber to update.
217
+ * @param flags - The current flag set for this subscriber.
218
+ * @returns `true` if the subscriber is marked as Dirty; otherwise `false`.
219
+ */
220
+ updateDirtyFlag(e, i) {
221
+ return v(e.deps) ? (e.flags = i | 32, !0) : (e.flags = i & -65, !1);
222
+ },
223
+ /**
224
+ * Updates the computed subscriber if necessary before its value is accessed.
225
+ *
226
+ * If the subscriber is marked Dirty or PendingComputed, this function runs
227
+ * the provided updateComputed logic and triggers a shallowPropagate for any
228
+ * downstream subscribers if an actual update occurs.
229
+ *
230
+ * @param computed - The computed subscriber to update.
231
+ * @param flags - The current flag set for this subscriber.
232
+ */
233
+ processComputedUpdate(e, i) {
234
+ if ((i & 32 || (v(e.deps) || (e.flags = i & -65, !1))) && t(e)) {
235
+ const r = e.subs;
236
+ r !== void 0 && c(r);
237
+ }
238
+ },
239
+ /**
240
+ * Ensures all pending internal effects for the given subscriber are processed.
241
+ *
242
+ * This should be called after an effect decides not to re-run itself but may still
243
+ * have dependencies flagged with PendingEffect. If the subscriber is flagged with
244
+ * PendingEffect, this function clears that flag and invokes `notifyEffect` on any
245
+ * related dependencies marked as Effect and Propagated, processing pending effects.
246
+ *
247
+ * @param sub - The subscriber which may have pending effects.
248
+ * @param flags - The current flags on the subscriber to check.
249
+ */
250
+ processPendingInnerEffects(e, i) {
251
+ if (i & 128) {
252
+ e.flags = i & -129;
253
+ let r = e.deps;
254
+ do {
255
+ const d = r.dep;
256
+ "flags" in d && d.flags & 2 && d.flags & 224 && o(d), r = r.nextDep;
257
+ } while (r !== void 0);
258
+ }
259
+ },
260
+ /**
261
+ * Processes queued effect notifications after a batch operation finishes.
262
+ *
263
+ * Iterates through all queued effects, calling notifyEffect on each.
264
+ * If an effect remains partially handled, its flags are updated, and future
265
+ * notifications may be triggered until fully handled.
266
+ */
267
+ processEffectNotifications() {
268
+ for (; n !== void 0; ) {
269
+ const e = n, i = e.depsTail, r = i.nextDep;
270
+ r !== void 0 ? (i.nextDep = void 0, n = r.sub) : (n = void 0, s = void 0), o(e) || (e.flags &= -9);
271
+ }
272
+ }
273
+ };
274
+ function p(e, i, r, d) {
275
+ const l = {
276
+ dep: e,
277
+ sub: i,
278
+ nextDep: r,
279
+ prevSub: void 0,
280
+ nextSub: void 0
281
+ };
282
+ if (d === void 0 ? i.deps = l : d.nextDep = l, e.subs === void 0)
283
+ e.subs = l;
284
+ else {
285
+ const a = e.subsTail;
286
+ l.prevSub = a, a.nextSub = l;
287
+ }
288
+ return i.depsTail = l, e.subsTail = l, l;
289
+ }
290
+ function v(e) {
291
+ let i = 0, r;
292
+ t: do {
293
+ r = !1;
294
+ const d = e.dep;
295
+ if ("flags" in d) {
296
+ const l = d.flags;
297
+ if ((l & 33) === 33) {
298
+ if (t(d)) {
299
+ const a = d.subs;
300
+ a.nextSub !== void 0 && c(a), r = !0;
301
+ }
302
+ } else if ((l & 65) === 65) {
303
+ const a = d.subs;
304
+ a.nextSub !== void 0 && (a.prevSub = e), e = d.deps, ++i;
305
+ continue;
306
+ }
307
+ }
308
+ if (!r && e.nextDep !== void 0) {
309
+ e = e.nextDep;
310
+ continue;
311
+ }
312
+ if (i) {
313
+ let l = e.sub;
314
+ do {
315
+ --i;
316
+ const a = l.subs;
317
+ if (r) {
318
+ if (t(l)) {
319
+ (e = a.prevSub) !== void 0 ? (a.prevSub = void 0, c(l.subs), l = e.sub) : l = a.sub;
320
+ continue;
321
+ }
322
+ } else
323
+ l.flags &= -65;
324
+ if ((e = a.prevSub) !== void 0) {
325
+ if (a.prevSub = void 0, e.nextDep !== void 0) {
326
+ e = e.nextDep;
327
+ continue t;
328
+ }
329
+ l = e.sub;
330
+ } else {
331
+ if ((e = a.nextDep) !== void 0)
332
+ continue t;
333
+ l = a.sub;
334
+ }
335
+ r = !1;
336
+ } while (i);
337
+ }
338
+ return r;
339
+ } while (!0);
340
+ }
341
+ function c(e) {
342
+ do {
343
+ const i = e.sub, r = i.flags;
344
+ (r & 96) === 64 && (i.flags = r | 32 | 8, (r & 10) === 2 && (s !== void 0 ? s.depsTail.nextDep = i.deps : n = i, s = i)), e = e.nextSub;
345
+ } while (e !== void 0);
346
+ }
347
+ function h(e, i) {
348
+ const r = i.depsTail;
349
+ if (r !== void 0) {
350
+ let d = i.deps;
351
+ do {
352
+ if (d === e)
353
+ return !0;
354
+ if (d === r)
355
+ break;
356
+ d = d.nextDep;
357
+ } while (d !== void 0);
358
+ }
359
+ return !1;
360
+ }
361
+ function T(e) {
362
+ do {
363
+ const i = e.dep, r = e.nextDep, d = e.nextSub, l = e.prevSub;
364
+ if (d !== void 0 ? d.prevSub = l : i.subsTail = l, l !== void 0 ? l.nextSub = d : i.subs = d, i.subs === void 0 && "deps" in i) {
365
+ const a = i.flags;
366
+ a & 32 || (i.flags = a | 32);
367
+ const g = i.deps;
368
+ if (g !== void 0) {
369
+ e = g, i.depsTail.nextDep = r, i.deps = void 0, i.depsTail = void 0;
370
+ continue;
371
+ }
372
+ }
373
+ e = r;
374
+ } while (e !== void 0);
375
+ }
376
+ }
377
+ var {
378
+ link: C,
379
+ propagate: N,
380
+ updateDirtyFlag: P,
381
+ startTracking: b,
382
+ endTracking: k,
383
+ processEffectNotifications: U,
384
+ processComputedUpdate: bt,
385
+ processPendingInnerEffects: _
386
+ } = W({
387
+ updateComputed(t) {
388
+ const o = u;
389
+ u = t, b(t);
390
+ try {
391
+ const n = t.currentValue, s = t.getter(n);
392
+ return n !== s ? (t.currentValue = s, !0) : !1;
393
+ } finally {
394
+ u = o, k(t);
395
+ }
396
+ },
397
+ notifyEffect(t) {
398
+ return "isScope" in t ? H(t) : q(t);
399
+ }
400
+ }), u;
401
+ function j(t) {
402
+ return K.bind({
403
+ currentValue: t,
404
+ subs: void 0,
405
+ subsTail: void 0
406
+ });
407
+ }
408
+ function M(t) {
409
+ const o = {
410
+ fn: t,
411
+ subs: void 0,
412
+ subsTail: void 0,
413
+ deps: void 0,
414
+ depsTail: void 0,
415
+ flags: 2
416
+ /* Effect */
417
+ };
418
+ return u !== void 0 && C(o, u), z(o), O.bind(o);
419
+ }
420
+ function z(t) {
421
+ const o = u;
422
+ u = t, b(t);
423
+ try {
424
+ t.fn();
425
+ } finally {
426
+ u = o, k(t);
427
+ }
428
+ }
429
+ function q(t) {
430
+ const o = t.flags;
431
+ return o & 32 || o & 64 && P(t, o) ? z(t) : _(t, t.flags), !0;
432
+ }
433
+ function H(t) {
434
+ return t.flags & 128 ? (_(t, t.flags), !0) : !1;
435
+ }
436
+ function K(...t) {
437
+ if (t.length) {
438
+ if (this.currentValue !== (this.currentValue = t[0])) {
439
+ const o = this.subs;
440
+ o !== void 0 && (N(o), U());
441
+ }
442
+ } else
443
+ return u !== void 0 && C(this, u), this.currentValue;
444
+ }
445
+ function O() {
446
+ b(this), k(this);
447
+ }
448
+ function G(t) {
449
+ return j(t);
450
+ }
451
+ function V(t) {
452
+ return [y((o) => {
453
+ let n = M(() => {
454
+ t(), o();
455
+ });
456
+ return () => n();
457
+ }, () => t(), () => t()), (o) => {
458
+ t(typeof o == "function" ? o(t()) : o);
459
+ }];
460
+ }
461
+ const X = {
122
462
  "editor.remove": "Remove",
123
463
  "editor.copy": "Copy",
124
464
  "editor.words": "WORDS",
@@ -288,7 +628,7 @@ const N = ["100%", "115%", "150%", "200%", "250%", "300%"], M = "1", H = [
288
628
  "editor.twitter.tooltip": "Twitter",
289
629
  "editor.tooltip.flipX": "Flip Horizontal",
290
630
  "editor.tooltip.flipY": "Flip Vertical"
291
- }, C = {
631
+ }, $ = {
292
632
  "editor.remove": "Remover",
293
633
  "editor.copy": "Copiar",
294
634
  "editor.words": "PALAVRAS",
@@ -458,7 +798,7 @@ const N = ["100%", "115%", "150%", "200%", "250%", "300%"], M = "1", H = [
458
798
  "editor.twitter.tooltip": "Twitter",
459
799
  "editor.tooltip.flipX": "Inverter Horizontal",
460
800
  "editor.tooltip.flipY": "Inverter Vertical"
461
- }, T = {
801
+ }, Y = {
462
802
  "editor.remove": "Xóa",
463
803
  "editor.copy": "Sao chép",
464
804
  "editor.words": "TỪ",
@@ -628,7 +968,7 @@ const N = ["100%", "115%", "150%", "200%", "250%", "300%"], M = "1", H = [
628
968
  "editor.twitter.tooltip": "Twitter",
629
969
  "editor.tooltip.flipX": "Lật Ngang",
630
970
  "editor.tooltip.flipY": "Lật Dọc"
631
- }, x = {
971
+ }, J = {
632
972
  "editor.remove": "移除",
633
973
  "editor.copy": "复制",
634
974
  "editor.words": "字数",
@@ -798,7 +1138,7 @@ const N = ["100%", "115%", "150%", "200%", "250%", "300%"], M = "1", H = [
798
1138
  "editor.twitter.tooltip": "Twitter",
799
1139
  "editor.tooltip.flipX": "水平翻转",
800
1140
  "editor.tooltip.flipY": "垂直翻转"
801
- }, _ = {
1141
+ }, Q = {
802
1142
  "editor.remove": "Eltávolítás",
803
1143
  "editor.copy": "Másolás",
804
1144
  "editor.words": "SZAVAK",
@@ -969,12 +1309,12 @@ const N = ["100%", "115%", "150%", "200%", "250%", "300%"], M = "1", H = [
969
1309
  "editor.tooltip.flipX": "Vízszintes tükrözés",
970
1310
  "editor.tooltip.flipY": "Függőleges tükrözés"
971
1311
  };
972
- function v(e) {
973
- return e = e || /* @__PURE__ */ new Map(), {
1312
+ function Z(t) {
1313
+ return t = t || /* @__PURE__ */ new Map(), {
974
1314
  /**
975
1315
  * A Map of event names to registered handler functions.
976
1316
  */
977
- all: e,
1317
+ all: t,
978
1318
  /**
979
1319
  * Register an event handler for the given type.
980
1320
  * @param {string|symbol} type Type of event to listen for, or `'*'` for all events
@@ -982,9 +1322,9 @@ function v(e) {
982
1322
  * @memberOf mitt
983
1323
  */
984
1324
  //@ts-expect-error
985
- on(t, o) {
986
- const i = e.get(t);
987
- i ? i.push(o) : e.set(t, [o]);
1325
+ on(o, n) {
1326
+ const s = t.get(o);
1327
+ s ? s.push(n) : t.set(o, [n]);
988
1328
  },
989
1329
  /**
990
1330
  * Remove an event handler for the given type.
@@ -994,9 +1334,9 @@ function v(e) {
994
1334
  * @memberOf mitt
995
1335
  */
996
1336
  //@ts-expect-error
997
- off(t, o) {
998
- const i = e.get(t);
999
- i && (o ? i.splice(i.indexOf(o) >>> 0, 1) : e.set(t, []));
1337
+ off(o, n) {
1338
+ const s = t.get(o);
1339
+ s && (n ? s.splice(s.indexOf(n) >>> 0, 1) : t.set(o, []));
1000
1340
  },
1001
1341
  /**
1002
1342
  * Invoke all handlers for the given type.
@@ -1008,126 +1348,127 @@ function v(e) {
1008
1348
  * @param {Any} [evt] Any value (object is recommended and powerful), passed to each handler
1009
1349
  * @memberOf mitt
1010
1350
  */
1011
- emit(t, o) {
1012
- let i = e.get(t);
1013
- i && [...i].map((r) => {
1014
- r(o);
1015
- }), i = e.get("*"), i && [...i].map((r) => {
1016
- r(t, o);
1351
+ emit(o, n) {
1352
+ let s = t.get(o);
1353
+ s && [...s].map((p) => {
1354
+ p(n);
1355
+ }), s = t.get("*"), s && [...s].map((p) => {
1356
+ p(o, n);
1017
1357
  });
1018
1358
  }
1019
1359
  };
1020
1360
  }
1021
- const l = {
1022
- lang: h,
1361
+ const m = {
1362
+ lang: w,
1023
1363
  message: {
1024
- en: F,
1025
- hu_HU: _,
1026
- vi: T,
1027
- zh_CN: x,
1028
- pt_BR: C
1364
+ en: X,
1365
+ hu_HU: Q,
1366
+ vi: Y,
1367
+ zh_CN: J,
1368
+ pt_BR: $
1029
1369
  }
1030
1370
  };
1031
- class z {
1371
+ class tt {
1032
1372
  constructor() {
1033
- a(this, "emitter");
1034
- this.emitter = v();
1373
+ F(this, "emitter");
1374
+ this.emitter = Z();
1035
1375
  }
1036
1376
  // Getter and setter for current language
1037
1377
  get lang() {
1038
- return l.lang;
1378
+ return m.lang;
1039
1379
  }
1040
- set lang(t) {
1041
- if (!this.isLangSupported(t)) {
1380
+ set lang(o) {
1381
+ if (!this.isLangSupported(o)) {
1042
1382
  console.warn(
1043
- `Can't find the current language "${t}", Using language "${l.lang}" by default`
1383
+ `Can't find the current language "${o}", Using language "${m.lang}" by default`
1044
1384
  );
1045
1385
  return;
1046
1386
  }
1047
- l.lang = t, this.emitter.emit("lang", t);
1387
+ m.lang = o, this.emitter.emit("lang", o);
1048
1388
  }
1049
1389
  // Getter and setter for messages
1050
1390
  get message() {
1051
- return l.message;
1391
+ return m.message;
1052
1392
  }
1053
- set message(t) {
1054
- l.message = t;
1393
+ set message(o) {
1394
+ m.message = o;
1055
1395
  }
1056
1396
  // Load messages for a specific language
1057
- loadLangMessage(t) {
1058
- return this.message[t];
1397
+ loadLangMessage(o) {
1398
+ return this.message[o];
1059
1399
  }
1060
1400
  // Check if a language is supported
1061
- isLangSupported(t) {
1062
- return Object.keys(this.message).includes(t);
1401
+ isLangSupported(o) {
1402
+ return Object.keys(this.message).includes(o);
1063
1403
  }
1064
1404
  // Set the current language
1065
- setLang(t) {
1066
- this.lang = t;
1405
+ setLang(o) {
1406
+ this.lang = o;
1067
1407
  }
1068
1408
  // Register a language change watcher
1069
- registerWatchLang(t) {
1070
- return this.emitter.on("lang", t), {
1409
+ registerWatchLang(o) {
1410
+ return this.emitter.on("lang", o), {
1071
1411
  unsubscribe: () => {
1072
- this.emitter.off("lang", t);
1412
+ this.emitter.off("lang", o);
1073
1413
  }
1074
1414
  };
1075
1415
  }
1076
1416
  // Set messages for a specific language
1077
- setMessage(t, o) {
1078
- this.message[t] = o;
1417
+ setMessage(o, n) {
1418
+ this.message[o] = n;
1079
1419
  }
1080
1420
  // Build a translation function for a given language
1081
- buildLocalesHandler(t) {
1082
- t || (t = this.lang);
1083
- const o = this.loadLangMessage(t);
1084
- return function(r) {
1085
- return o[r] || r;
1421
+ buildLocalesHandler(o) {
1422
+ o || (o = this.lang);
1423
+ const n = this.loadLangMessage(o);
1424
+ return function(p) {
1425
+ return n[p] || p;
1086
1426
  };
1087
1427
  }
1088
1428
  }
1089
- const d = new z(), n = c(l.lang);
1090
- function q() {
1091
- const [e, t] = u(n), o = m(() => d.buildLocalesHandler(e), [e]);
1092
- return g(() => {
1093
- const i = d.registerWatchLang((r) => {
1094
- t(r);
1429
+ const f = new tt(), A = G(m.lang);
1430
+ function kt() {
1431
+ const [t, o] = V(A), n = E(() => f.buildLocalesHandler(t), [t]);
1432
+ return L(() => {
1433
+ const s = f.registerWatchLang((p) => {
1434
+ o(p);
1095
1435
  });
1096
1436
  return () => {
1097
- i.unsubscribe();
1437
+ s.unsubscribe();
1098
1438
  };
1099
1439
  }, []), {
1100
- lang: e,
1101
- t: o
1440
+ lang: t,
1441
+ t: n
1102
1442
  };
1103
1443
  }
1104
- const K = {
1105
- t: (e) => d.buildLocalesHandler(n())(e)
1444
+ const vt = {
1445
+ t: (t) => f.buildLocalesHandler(A())(t)
1106
1446
  };
1107
1447
  export {
1108
- H as B,
1109
- W as C,
1110
- U as D,
1111
- E,
1112
- S as I,
1113
- R as T,
1114
- k as V,
1115
- F as a,
1116
- _ as b,
1117
- T as c,
1118
- x as d,
1119
- C as e,
1120
- j as f,
1121
- P as g,
1122
- K as h,
1123
- M as i,
1124
- N as j,
1125
- B as k,
1126
- d as l,
1127
- I as m,
1128
- w as n,
1129
- L as o,
1130
- v as p,
1131
- f as q,
1132
- q as u
1448
+ ft as B,
1449
+ pt as C,
1450
+ gt as D,
1451
+ it as E,
1452
+ lt as I,
1453
+ nt as T,
1454
+ I as V,
1455
+ X as a,
1456
+ Q as b,
1457
+ Y as c,
1458
+ J as d,
1459
+ $ as e,
1460
+ mt as f,
1461
+ ut as g,
1462
+ ht as h,
1463
+ ct as i,
1464
+ rt as j,
1465
+ dt as k,
1466
+ f as l,
1467
+ vt as m,
1468
+ Z as n,
1469
+ at as o,
1470
+ st as p,
1471
+ R as q,
1472
+ G as r,
1473
+ kt as u
1133
1474
  };