reactjs-tiptap-editor 1.0.7 → 1.0.9

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 (160) hide show
  1. package/lib/{ActionMenuButton-fTe9ka2F.js → ActionMenuButton-C4aNFFa8.js} +2 -2
  2. package/lib/{ActionMenuButton-wU6jxKJv.cjs → ActionMenuButton-CmDopTWt.cjs} +1 -1
  3. package/lib/Attachment.cjs +1 -1
  4. package/lib/Attachment.js +3 -3
  5. package/lib/Blockquote.cjs +1 -1
  6. package/lib/Blockquote.js +3 -3
  7. package/lib/Bold.cjs +1 -1
  8. package/lib/Bold.js +3 -3
  9. package/lib/BulletList.cjs +1 -1
  10. package/lib/BulletList.js +3 -3
  11. package/lib/Clear.cjs +1 -1
  12. package/lib/Clear.js +3 -3
  13. package/lib/Code.cjs +1 -1
  14. package/lib/Code.js +3 -3
  15. package/lib/CodeBlock.cjs +39 -39
  16. package/lib/CodeBlock.js +945 -837
  17. package/lib/CodeView.cjs +1 -1
  18. package/lib/CodeView.js +3 -3
  19. package/lib/Color.cjs +1 -1
  20. package/lib/Color.js +8 -8
  21. package/lib/Column.cjs +1 -1
  22. package/lib/Column.js +3 -3
  23. package/lib/{Drawer-BGSwHoka.cjs → Drawer-CTr2snNd.cjs} +1 -1
  24. package/lib/{Drawer-DmtILKW4.js → Drawer-DG0gPU_U.js} +14 -14
  25. package/lib/Drawer.cjs +1 -1
  26. package/lib/Drawer.js +3 -3
  27. package/lib/Emoji.cjs +1 -1
  28. package/lib/Emoji.js +15 -15
  29. package/lib/{Excalidraw-CrG8fW-7.js → Excalidraw-DpgdxOsc.js} +18 -18
  30. package/lib/{Excalidraw-BG2U9i30.cjs → Excalidraw-DtezFdjR.cjs} +1 -1
  31. package/lib/Excalidraw.cjs +1 -1
  32. package/lib/Excalidraw.js +2 -2
  33. package/lib/ExportPdf.cjs +2 -2
  34. package/lib/ExportPdf.js +26 -26
  35. package/lib/ExportWord.cjs +1 -1
  36. package/lib/ExportWord.js +3 -3
  37. package/lib/FontFamily.cjs +1 -1
  38. package/lib/FontFamily.js +5 -5
  39. package/lib/FontSize.cjs +1 -1
  40. package/lib/FontSize.js +5 -5
  41. package/lib/Heading.cjs +1 -1
  42. package/lib/Heading.js +13 -13
  43. package/lib/Highlight.cjs +1 -1
  44. package/lib/Highlight.js +8 -8
  45. package/lib/History.cjs +1 -1
  46. package/lib/History.js +4 -4
  47. package/lib/HorizontalRule.cjs +1 -1
  48. package/lib/HorizontalRule.js +3 -3
  49. package/lib/{Icon-CysGlJkv.js → Icon-C_buGjWy.js} +1 -1
  50. package/lib/{Icon-C3j4ls73.cjs → Icon-b6HQAURz.cjs} +1 -1
  51. package/lib/{Iframe-CXDghI6m.cjs → Iframe-CUrXCDxj.cjs} +1 -1
  52. package/lib/{Iframe-BmqguWbj.js → Iframe-De88TYvj.js} +11 -11
  53. package/lib/Iframe.cjs +1 -1
  54. package/lib/Iframe.js +2 -2
  55. package/lib/Image.cjs +1 -1
  56. package/lib/Image.js +46 -46
  57. package/lib/ImageGif.cjs +1 -1
  58. package/lib/ImageGif.js +9 -9
  59. package/lib/ImportWord.cjs +2 -2
  60. package/lib/ImportWord.js +8 -8
  61. package/lib/{Indent-BhnGkEaY.js → Indent-Bensb2nf.js} +3 -3
  62. package/lib/{Indent-B1glTHHl.cjs → Indent-D_KtZNHW.cjs} +1 -1
  63. package/lib/Indent.cjs +1 -1
  64. package/lib/Indent.js +2 -2
  65. package/lib/Italic.cjs +1 -1
  66. package/lib/Italic.js +3 -3
  67. package/lib/{Katex-D4eBjS34.js → Katex-C0dtqznb.js} +974 -941
  68. package/lib/Katex-NqelWRoi.cjs +4 -0
  69. package/lib/Katex.cjs +1 -1
  70. package/lib/Katex.js +2 -2
  71. package/lib/LineHeight.cjs +1 -1
  72. package/lib/LineHeight.js +13 -13
  73. package/lib/Link.cjs +1 -1
  74. package/lib/Link.js +2 -2
  75. package/lib/{LinkEditBlock-DW17TyCA.cjs → LinkEditBlock-BSZ-vgNB.cjs} +2 -2
  76. package/lib/{LinkEditBlock-D1eSM0kn.js → LinkEditBlock-Bv12sKvW.js} +29 -29
  77. package/lib/Mention.cjs +1 -1
  78. package/lib/Mention.js +138 -132
  79. package/lib/Mermaid.cjs +2 -2
  80. package/lib/Mermaid.js +20 -20
  81. package/lib/MoreMark.cjs +1 -1
  82. package/lib/MoreMark.js +12 -12
  83. package/lib/OrderedList.cjs +1 -1
  84. package/lib/OrderedList.js +3 -3
  85. package/lib/SearchAndReplace.cjs +1 -1
  86. package/lib/SearchAndReplace.js +20 -20
  87. package/lib/SlashCommand.cjs +1 -1
  88. package/lib/SlashCommand.js +14 -14
  89. package/lib/Strike.cjs +1 -1
  90. package/lib/Strike.js +3 -3
  91. package/lib/{Table-BIZppoiY.js → Table-D9ckv6Tb.js} +5 -5
  92. package/lib/{Table-CIzgfvr9.cjs → Table-cy1mUM2X.cjs} +1 -1
  93. package/lib/Table.cjs +1 -1
  94. package/lib/Table.js +1 -1
  95. package/lib/TaskList.cjs +1 -1
  96. package/lib/TaskList.js +3 -3
  97. package/lib/TextAlign.cjs +1 -1
  98. package/lib/TextAlign.js +10 -10
  99. package/lib/TextDirection.cjs +1 -1
  100. package/lib/TextDirection.js +10 -10
  101. package/lib/TextUnderline.cjs +1 -1
  102. package/lib/TextUnderline.js +3 -3
  103. package/lib/Twitter-Bvs3sW8F.cjs +1 -0
  104. package/lib/{Twitter-DhczYjbR.js → Twitter-KUvyySA0.js} +566 -524
  105. package/lib/Twitter.cjs +1 -1
  106. package/lib/Twitter.js +2 -2
  107. package/lib/Video.cjs +1 -1
  108. package/lib/Video.js +22 -22
  109. package/lib/bubble.cjs +4 -4
  110. package/lib/bubble.js +1342 -1314
  111. package/lib/{button-C81t4pb1.js → button-D8SI-g7p.js} +1 -1
  112. package/lib/{button-B6ukqDUf.cjs → button-U6XpZt2X.cjs} +1 -1
  113. package/lib/{checkbox-ZdxysUFa.cjs → checkbox-DaIBNthL.cjs} +1 -1
  114. package/lib/{checkbox-CUE9ex4D.js → checkbox-xrY2c5yo.js} +1 -1
  115. package/lib/{dialog-Cfx8yjkr.cjs → dialog-DgnnVCfv.cjs} +1 -1
  116. package/lib/{dialog-DMJStzBb.js → dialog-DjnkASYP.js} +1 -1
  117. package/lib/{dropdown-menu-Busg3FNn.cjs → dropdown-menu-BvVMltdB.cjs} +1 -1
  118. package/lib/{dropdown-menu-B8iyTZcP.js → dropdown-menu-bI14Gyw4.js} +1 -1
  119. package/lib/extensions/Katex/Katex.d.ts +1 -1
  120. package/lib/extensions/Mention/Mention.d.ts +3 -1
  121. package/lib/extensions/Mention/components/NodeViewMentionList.d.ts +7 -1
  122. package/lib/{index-DCJheRBq.cjs → index--nUS7Y66.cjs} +1 -1
  123. package/lib/{index--knBGB61.js → index-4pRt5Vqu.js} +680 -791
  124. package/lib/{index-DLqogznp.cjs → index-BBNITgNi.cjs} +7 -7
  125. package/lib/{index-ccgHvIfu.js → index-BQ6ZdLsu.js} +1 -1
  126. package/lib/{index-DylewabB.cjs → index-BZ6DfR2r.cjs} +1 -1
  127. package/lib/{index-Dwt9--mS.js → index-BimeTI7q.js} +1 -1
  128. package/lib/{index-TMqmkmT6.cjs → index-CApXPpjF.cjs} +1 -1
  129. package/lib/{index-BvYjBPF9.js → index-CbIQPoF6.js} +12 -11
  130. package/lib/index-DvvMf6Wu.cjs +7 -0
  131. package/lib/{index-RKufd2EL.js → index-EKFybgpP.js} +1 -1
  132. package/lib/index.cjs +1 -1
  133. package/lib/index.js +2 -2
  134. package/lib/{input-BxzQAIRv.cjs → input-BtDj0NeF.cjs} +1 -1
  135. package/lib/{input-DR_5pbuA.js → input-C5zU49Q1.js} +1 -1
  136. package/lib/{isNumber-1y3eeW-y.js → isNumber-8HKEgTkA.js} +1 -1
  137. package/lib/{isNumber-C2saEiG2.cjs → isNumber-Bv1Qhmw8.cjs} +1 -1
  138. package/lib/{label-D-0oXKCn.js → label-BEUVs-IA.js} +1 -1
  139. package/lib/{label-BfWfLggp.cjs → label-C8BonzOY.cjs} +1 -1
  140. package/lib/{popover-D3spkemr.js → popover-CPY5lMCj.js} +1 -1
  141. package/lib/{popover-sP8CwbV-.cjs → popover-DjL0De8d.cjs} +1 -1
  142. package/lib/{separator-rM48NeAo.js → separator-BlIlS7LP.js} +18 -18
  143. package/lib/{separator-yycaNdlI.cjs → separator-BzMkiI_c.cjs} +1 -1
  144. package/lib/{store-BajRl43v.cjs → store-BSCjQxMK.cjs} +1 -1
  145. package/lib/{store-NKeQOve_.js → store-D_GvIPxo.js} +1 -1
  146. package/lib/style.css +1 -1
  147. package/lib/{tabs-D2nCIOVL.cjs → tabs-CHy82_rs.cjs} +1 -1
  148. package/lib/{tabs-Cb6Bmpbb.js → tabs-tQpXIzfV.js} +1 -1
  149. package/lib/{textarea-Cbwi_h4h.cjs → textarea-B-qfanCT.cjs} +1 -1
  150. package/lib/{textarea-BYZu1lUC.js → textarea-CMDYVXYo.js} +1 -1
  151. package/lib/{throttle-CjwXmkIY.js → throttle-BIkZV3Y_.js} +1 -1
  152. package/lib/{throttle-DXN-aiH5.cjs → throttle-BM3Bmbf_.cjs} +1 -1
  153. package/lib/{updatePosition-BAGpT34H.js → updatePosition-GLTrgcib.js} +1 -1
  154. package/lib/{updatePosition-C17CDdjq.cjs → updatePosition-u2mTh3mG.cjs} +1 -1
  155. package/lib/{useButtonProps-TfmRCM9r.cjs → useButtonProps-BqBGuqoP.cjs} +1 -1
  156. package/lib/{useButtonProps-BIH_9bXT.js → useButtonProps-DTngjZge.js} +2 -2
  157. package/package.json +55 -55
  158. package/lib/Katex-BKL_6NWF.cjs +0 -4
  159. package/lib/Twitter-DwWVNAV5.cjs +0 -1
  160. package/lib/index-D42xFOzI.cjs +0 -7
@@ -1,17 +1,17 @@
1
- import { C as U, aa as rt, s as At, N as Vt, m as Mt, ab as jt, R as Wt } from "./index-BvYjBPF9.js";
2
- import { jsx as r, jsxs as h, Fragment as Bt } from "react/jsx-runtime";
3
- import Be, { useState as se, Fragment as Ft, useEffect as Fe, useMemo as Pe, createContext as Pt, useLayoutEffect as Ut, useContext as zt, useRef as K, useCallback as be, useDebugValue as Ht } from "react";
4
- import { A as Gt } from "./index--knBGB61.js";
5
- import { I as Xt } from "./Icon-CysGlJkv.js";
6
- import { P as Kt, a as Qt, b as Jt } from "./popover-D3spkemr.js";
7
- import { B as Yt } from "./button-C81t4pb1.js";
8
- import { I as Zt } from "./input-DR_5pbuA.js";
9
- import { L as en } from "./label-D-0oXKCn.js";
10
- import { u as tn } from "./index-0OnGZkVF.js";
11
- import { c as nn, u as rn, a as on } from "./useButtonProps-BIH_9bXT.js";
12
- const sn = "_verified_lvyh0_1", Ue = {
13
- verified: sn
14
- }, an = () => /* @__PURE__ */ r("svg", {
1
+ import { C as U, aa as rt, s as Mt, N as jt, m as Wt, ab as Bt, R as Ft } from "./index-CbIQPoF6.js";
2
+ import { jsx as r, jsxs as h, Fragment as Pt } from "react/jsx-runtime";
3
+ import Be, { useState as se, Fragment as Ut, useEffect as Fe, useMemo as Pe, createContext as zt, useLayoutEffect as Ht, useContext as Gt, useRef as K, useCallback as Te, useDebugValue as Xt } from "react";
4
+ import { A as Kt } from "./index-4pRt5Vqu.js";
5
+ import { u as Qt } from "./index-0OnGZkVF.js";
6
+ import { L as Jt } from "./label-BEUVs-IA.js";
7
+ import { I as Yt } from "./input-C5zU49Q1.js";
8
+ import { B as Zt } from "./button-D8SI-g7p.js";
9
+ import { c as en, u as tn, a as nn } from "./useButtonProps-DTngjZge.js";
10
+ import { P as rn, a as on, b as an } from "./popover-CPY5lMCj.js";
11
+ import { I as sn } from "./Icon-C_buGjWy.js";
12
+ const cn = "_verified_lvyh0_1", Ue = {
13
+ verified: cn
14
+ }, ln = () => /* @__PURE__ */ r("svg", {
15
15
  viewBox: "0 0 24 24",
16
16
  "aria-label": "Verified account",
17
17
  role: "img",
@@ -21,7 +21,7 @@ const sn = "_verified_lvyh0_1", Ue = {
21
21
  d: "M22.25 12c0-1.43-.88-2.67-2.19-3.34.46-1.39.2-2.9-.81-3.91s-2.52-1.27-3.91-.81c-.66-1.31-1.91-2.19-3.34-2.19s-2.67.88-3.33 2.19c-1.4-.46-2.91-.2-3.92.81s-1.26 2.52-.8 3.91c-1.31.67-2.2 1.91-2.2 3.34s.89 2.67 2.2 3.34c-.46 1.39-.21 2.9.8 3.91s2.52 1.26 3.91.81c.67 1.31 1.91 2.19 3.34 2.19s2.68-.88 3.34-2.19c1.39.45 2.9.2 3.91-.81s1.27-2.52.81-3.91c1.31-.67 2.19-1.91 2.19-3.34zm-11.71 4.2L6.8 12.46l1.41-1.42 2.26 2.26 4.8-5.23 1.47 1.36-6.2 6.77z"
22
22
  })
23
23
  })
24
- }), cn = () => /* @__PURE__ */ r("svg", {
24
+ }), dn = () => /* @__PURE__ */ r("svg", {
25
25
  viewBox: "0 0 22 22",
26
26
  "aria-label": "Verified account",
27
27
  role: "img",
@@ -100,7 +100,7 @@ const sn = "_verified_lvyh0_1", Ue = {
100
100
  })
101
101
  ]
102
102
  })
103
- }), ln = () => /* @__PURE__ */ r("svg", {
103
+ }), un = () => /* @__PURE__ */ r("svg", {
104
104
  viewBox: "0 0 22 22",
105
105
  "aria-label": "Verified account",
106
106
  role: "img",
@@ -112,9 +112,9 @@ const sn = "_verified_lvyh0_1", Ue = {
112
112
  fillRule: "evenodd"
113
113
  })
114
114
  })
115
- }), dn = "_root_98iqw_1", un = "_article_98iqw_21", ot = {
116
- root: dn,
117
- article: un
115
+ }), fn = "_root_98iqw_1", hn = "_article_98iqw_21", ot = {
116
+ root: fn,
117
+ article: hn
118
118
  }, ze = ({ className: e, children: t }) => /* @__PURE__ */ r("div", {
119
119
  className: U("react-tweet-theme", ot.root, e),
120
120
  children: /* @__PURE__ */ r("article", {
@@ -123,46 +123,60 @@ const sn = "_verified_lvyh0_1", Ue = {
123
123
  })
124
124
  }), vt = (e) => /* @__PURE__ */ r("img", {
125
125
  ...e
126
- }), fn = "_header_nqq4j_1", hn = "_avatar_nqq4j_11", _n = "_avatarOverflow_nqq4j_16", mn = "_avatarSquare_nqq4j_23", pn = "_avatarShadow_nqq4j_26", vn = "_author_nqq4j_37", gn = "_authorLink_nqq4j_44", wn = "_authorVerified_nqq4j_53", yn = "_authorLinkText_nqq4j_56", Tn = "_authorMeta_nqq4j_63", bn = "_authorFollow_nqq4j_66", xn = "_username_nqq4j_69", Nn = "_follow_nqq4j_74", Rn = "_separator_nqq4j_82", In = "_brand_nqq4j_86", kn = "_twitterIcon_nqq4j_90", N = {
127
- header: fn,
128
- avatar: hn,
129
- avatarOverflow: _n,
130
- avatarSquare: mn,
131
- avatarShadow: pn,
132
- author: vn,
133
- authorLink: gn,
134
- authorVerified: wn,
135
- authorLinkText: yn,
136
- authorMeta: Tn,
137
- authorFollow: bn,
138
- username: xn,
139
- follow: Nn,
140
- separator: Rn,
141
- brand: In,
142
- twitterIcon: kn
143
- }, Sn = "_verifiedOld_lcna5_1", En = "_verifiedBlue_lcna5_4", Cn = "_verifiedGovernment_lcna5_7", xe = {
144
- verifiedOld: Sn,
145
- verifiedBlue: En,
146
- verifiedGovernment: Cn
126
+ }), _n = "_verifiedOld_lcna5_1", mn = "_verifiedBlue_lcna5_4", pn = "_verifiedGovernment_lcna5_7", xe = {
127
+ verifiedOld: _n,
128
+ verifiedBlue: mn,
129
+ verifiedGovernment: pn
147
130
  }, gt = ({ user: e, className: t }) => {
148
131
  const n = e.verified || e.is_blue_verified || e.verified_type;
149
- let o = /* @__PURE__ */ r(an, {}), i = xe.verifiedBlue;
132
+ let o = /* @__PURE__ */ r(ln, {}), a = xe.verifiedBlue;
150
133
  if (n)
151
- switch (e.is_blue_verified || (i = xe.verifiedOld), e.verified_type) {
134
+ switch (e.is_blue_verified || (a = xe.verifiedOld), e.verified_type) {
152
135
  case "Government":
153
- o = /* @__PURE__ */ r(ln, {}), i = xe.verifiedGovernment;
136
+ o = /* @__PURE__ */ r(un, {}), a = xe.verifiedGovernment;
154
137
  break;
155
138
  case "Business":
156
- o = /* @__PURE__ */ r(cn, {}), i = null;
139
+ o = /* @__PURE__ */ r(dn, {}), a = null;
157
140
  break;
158
141
  }
159
142
  return n ? /* @__PURE__ */ r("div", {
160
- className: U(t, i),
143
+ className: U(t, a),
161
144
  children: o
162
145
  }) : null;
163
- }, Ln = ({ tweet: e, components: t }) => {
146
+ }, vn = "_label_36ucz_1", gn = {
147
+ label: vn
148
+ }, wt = ({ user: e, className: t }) => {
164
149
  var n;
165
- const o = (n = t == null ? void 0 : t.AvatarImg) != null ? n : vt, { user: i } = e;
150
+ const o = e.highlighted_label;
151
+ if (!o) return null;
152
+ const a = (n = o.badge) == null ? void 0 : n.url;
153
+ return a ? /* @__PURE__ */ r("div", {
154
+ className: U(gn.label, t),
155
+ children: /* @__PURE__ */ r("img", {
156
+ src: a,
157
+ alt: o.description
158
+ })
159
+ }) : null;
160
+ }, wn = "_header_nqq4j_1", yn = "_avatar_nqq4j_11", bn = "_avatarOverflow_nqq4j_16", Tn = "_avatarSquare_nqq4j_23", xn = "_avatarShadow_nqq4j_26", Nn = "_author_nqq4j_37", In = "_authorLink_nqq4j_44", Rn = "_authorVerified_nqq4j_53", Sn = "_authorLinkText_nqq4j_56", kn = "_authorMeta_nqq4j_63", En = "_authorFollow_nqq4j_66", Cn = "_username_nqq4j_69", On = "_follow_nqq4j_74", Ln = "_separator_nqq4j_82", $n = "_brand_nqq4j_86", qn = "_twitterIcon_nqq4j_90", N = {
161
+ header: wn,
162
+ avatar: yn,
163
+ avatarOverflow: bn,
164
+ avatarSquare: Tn,
165
+ avatarShadow: xn,
166
+ author: Nn,
167
+ authorLink: In,
168
+ authorVerified: Rn,
169
+ authorLinkText: Sn,
170
+ authorMeta: kn,
171
+ authorFollow: En,
172
+ username: Cn,
173
+ follow: On,
174
+ separator: Ln,
175
+ brand: $n,
176
+ twitterIcon: qn
177
+ }, Dn = ({ tweet: e, components: t }) => {
178
+ var n;
179
+ const o = (n = t == null ? void 0 : t.AvatarImg) != null ? n : vt, { user: a } = e;
166
180
  return /* @__PURE__ */ h("div", {
167
181
  className: N.header,
168
182
  children: [
@@ -173,10 +187,10 @@ const sn = "_verified_lvyh0_1", Ue = {
173
187
  rel: "noopener noreferrer",
174
188
  children: [
175
189
  /* @__PURE__ */ r("div", {
176
- className: U(N.avatarOverflow, i.profile_image_shape === "Square" && N.avatarSquare),
190
+ className: U(N.avatarOverflow, a.profile_image_shape === "Square" && N.avatarSquare),
177
191
  children: /* @__PURE__ */ r(o, {
178
- src: i.profile_image_url_https,
179
- alt: i.name,
192
+ src: a.profile_image_url_https,
193
+ alt: a.name,
180
194
  width: 48,
181
195
  height: 48
182
196
  })
@@ -201,13 +215,16 @@ const sn = "_verified_lvyh0_1", Ue = {
201
215
  /* @__PURE__ */ r("div", {
202
216
  className: N.authorLinkText,
203
217
  children: /* @__PURE__ */ r("span", {
204
- title: i.name,
205
- children: i.name
218
+ title: a.name,
219
+ children: a.name
206
220
  })
207
221
  }),
208
222
  /* @__PURE__ */ r(gt, {
209
- user: i,
223
+ user: a,
210
224
  className: N.authorVerified
225
+ }),
226
+ /* @__PURE__ */ r(wt, {
227
+ user: a
211
228
  })
212
229
  ]
213
230
  }),
@@ -220,10 +237,10 @@ const sn = "_verified_lvyh0_1", Ue = {
220
237
  target: "_blank",
221
238
  rel: "noopener noreferrer",
222
239
  children: /* @__PURE__ */ h("span", {
223
- title: `@${i.screen_name}`,
240
+ title: `@${a.screen_name}`,
224
241
  children: [
225
242
  "@",
226
- i.screen_name
243
+ a.screen_name
227
244
  ]
228
245
  })
229
246
  }),
@@ -235,7 +252,7 @@ const sn = "_verified_lvyh0_1", Ue = {
235
252
  children: "·"
236
253
  }),
237
254
  /* @__PURE__ */ r("a", {
238
- href: i.follow_url,
255
+ href: a.follow_url,
239
256
  className: N.follow,
240
257
  target: "_blank",
241
258
  rel: "noopener noreferrer",
@@ -266,64 +283,97 @@ const sn = "_verified_lvyh0_1", Ue = {
266
283
  })
267
284
  ]
268
285
  });
269
- }, On = "_root_1ec15_1", qn = {
270
- root: On
271
- }, Dn = ({ tweet: e }) => /* @__PURE__ */ h("a", {
286
+ }, An = "_root_1ec15_1", Vn = {
287
+ root: An
288
+ }, Mn = ({ tweet: e }) => /* @__PURE__ */ h("a", {
272
289
  href: e.in_reply_to_url,
273
- className: qn.root,
290
+ className: Vn.root,
274
291
  target: "_blank",
275
292
  rel: "noopener noreferrer",
276
293
  children: [
277
294
  "Replying to @",
278
295
  e.in_reply_to_screen_name
279
296
  ]
280
- }), $n = "_root_eihfa_1", An = {
281
- root: $n
282
- }, Vn = ({ href: e, children: t }) => /* @__PURE__ */ r("a", {
297
+ }), jn = "_root_eihfa_1", Wn = {
298
+ root: jn
299
+ }, yt = ({ href: e, children: t }) => /* @__PURE__ */ r("a", {
283
300
  href: e,
284
- className: An.root,
301
+ className: Wn.root,
285
302
  target: "_blank",
286
303
  rel: "noopener noreferrer nofollow",
287
304
  children: t
288
- }), Mn = "_root_1xq52_1", jn = {
289
- root: Mn
290
- }, Wn = ({ tweet: e }) => /* @__PURE__ */ r("p", {
291
- className: jn.root,
305
+ }), Bn = "_root_1xq52_1", Fn = {
306
+ root: Bn
307
+ }, Pn = ({ tweet: e }) => /* @__PURE__ */ h("p", {
308
+ className: Fn.root,
292
309
  lang: e.lang,
293
310
  dir: "auto",
294
- children: e.entities.map((t, n) => {
295
- switch (t.type) {
296
- case "hashtag":
297
- case "mention":
298
- case "url":
299
- case "symbol":
300
- return /* @__PURE__ */ r(Vn, {
301
- href: t.href,
302
- children: t.text
303
- }, n);
304
- case "media":
305
- return;
306
- default:
307
- return /* @__PURE__ */ r("span", {
308
- dangerouslySetInnerHTML: {
309
- __html: t.text
310
- }
311
- }, n);
312
- }
313
- })
314
- }), it = (e) => `https://x.com/${e.user.screen_name}/status/${e.id_str}`, wt = (e) => `https://x.com/${typeof e == "string" ? e : e.user.screen_name}`, Bn = (e) => `https://x.com/intent/like?tweet_id=${e.id_str}`, Fn = (e) => `https://x.com/intent/tweet?in_reply_to=${e.id_str}`, Pn = (e) => `https://x.com/intent/follow?screen_name=${e.user.screen_name}`, Un = (e) => `https://x.com/hashtag/${e.text}`, zn = (e) => `https://x.com/search?q=%24${e.text}`, Hn = (e) => `https://x.com/${e.in_reply_to_screen_name}/status/${e.in_reply_to_status_id_str}`, yt = (e, t) => {
311
+ children: [
312
+ e.entities.map((t, n) => {
313
+ switch (t.type) {
314
+ case "hashtag":
315
+ case "mention":
316
+ case "url":
317
+ case "symbol":
318
+ return /* @__PURE__ */ r(yt, {
319
+ href: t.href,
320
+ children: t.text
321
+ }, n);
322
+ case "media":
323
+ return;
324
+ default:
325
+ return /* @__PURE__ */ r("span", {
326
+ dangerouslySetInnerHTML: {
327
+ __html: t.text
328
+ }
329
+ }, n);
330
+ }
331
+ }),
332
+ e.note_tweet ? /* @__PURE__ */ r(Un, {
333
+ tweet: e
334
+ }) : null
335
+ ]
336
+ });
337
+ function Un({ tweet: e }) {
338
+ return /* @__PURE__ */ h(yt, {
339
+ href: e.url,
340
+ children: [
341
+ /* @__PURE__ */ r("span", {
342
+ children: " "
343
+ }),
344
+ "Show more"
345
+ ]
346
+ });
347
+ }
348
+ const zn = {
349
+ hour: "numeric",
350
+ minute: "2-digit",
351
+ hour12: !0,
352
+ weekday: "short",
353
+ month: "short",
354
+ day: "numeric",
355
+ year: "numeric"
356
+ }, Hn = new Intl.DateTimeFormat("en-US", zn), Gn = (e) => {
357
+ const t = {};
358
+ for (const n of e)
359
+ t[n.type] = n.value;
360
+ return t;
361
+ }, Xn = (e) => {
362
+ const t = Gn(Hn.formatToParts(e)), n = `${t.hour}:${t.minute} ${t.dayPeriod}`, o = `${t.month} ${t.day}, ${t.year}`;
363
+ return `${n} · ${o}`;
364
+ }, at = (e) => `https://x.com/${e.user.screen_name}/status/${e.id_str}`, bt = (e) => `https://x.com/${typeof e == "string" ? e : e.user.screen_name}`, Kn = (e) => `https://x.com/intent/like?tweet_id=${e.id_str}`, Qn = (e) => `https://x.com/intent/tweet?in_reply_to=${e.id_str}`, Jn = (e) => `https://x.com/intent/follow?screen_name=${e.user.screen_name}`, Yn = (e) => `https://x.com/hashtag/${e.text}`, Zn = (e) => `https://x.com/search?q=%24${e.text}`, er = (e) => `https://x.com/${e.in_reply_to_screen_name}/status/${e.in_reply_to_status_id_str}`, Tt = (e, t) => {
315
365
  const n = new URL(e.media_url_https), o = n.pathname.split(".").pop();
316
366
  return o ? (n.pathname = n.pathname.replace(`.${o}`, ""), n.searchParams.set("format", o), n.searchParams.set("name", t), n.toString()) : e.media_url_https;
317
- }, Gn = (e) => {
367
+ }, tr = (e) => {
318
368
  const { variants: t } = e.video_info;
319
- return t.filter((o) => o.content_type === "video/mp4").sort((o, i) => {
320
- var a, s;
321
- return ((a = i.bitrate) != null ? a : 0) - ((s = o.bitrate) != null ? s : 0);
369
+ return t.filter((o) => o.content_type === "video/mp4").sort((o, a) => {
370
+ var i, s;
371
+ return ((i = a.bitrate) != null ? i : 0) - ((s = o.bitrate) != null ? s : 0);
322
372
  });
323
- }, Xn = (e) => {
324
- const t = Gn(e);
373
+ }, nr = (e) => {
374
+ const t = tr(e);
325
375
  return t.length > 1 ? t[1] : t[0];
326
- }, Oe = (e) => e > 999999 ? `${(e / 1e6).toFixed(1)}M` : e > 999 ? `${(e / 1e3).toFixed(1)}K` : e.toString();
376
+ }, Le = (e) => e > 999999 ? `${(e / 1e6).toFixed(1)}M` : e > 999 ? `${(e / 1e3).toFixed(1)}K` : e.toString();
327
377
  function st(e) {
328
378
  const t = Array.from(e.text), n = [
329
379
  {
@@ -331,18 +381,18 @@ function st(e) {
331
381
  type: "text"
332
382
  }
333
383
  ];
334
- return de(n, "hashtag", e.entities.hashtags), de(n, "mention", e.entities.user_mentions), de(n, "url", e.entities.urls), de(n, "symbol", e.entities.symbols), e.entities.media && de(n, "media", e.entities.media), Kn(e, n), n.map((o) => {
335
- const i = t.slice(o.indices[0], o.indices[1]).join("");
384
+ return de(n, "hashtag", e.entities.hashtags), de(n, "mention", e.entities.user_mentions), de(n, "url", e.entities.urls), de(n, "symbol", e.entities.symbols), e.entities.media && de(n, "media", e.entities.media), rr(e, n), n.map((o) => {
385
+ const a = t.slice(o.indices[0], o.indices[1]).join("");
336
386
  switch (o.type) {
337
387
  case "hashtag":
338
388
  return Object.assign(o, {
339
- href: Un(o),
340
- text: i
389
+ href: Yn(o),
390
+ text: a
341
391
  });
342
392
  case "mention":
343
393
  return Object.assign(o, {
344
- href: wt(o.screen_name),
345
- text: i
394
+ href: bt(o.screen_name),
395
+ text: a
346
396
  });
347
397
  case "url":
348
398
  case "media":
@@ -352,20 +402,20 @@ function st(e) {
352
402
  });
353
403
  case "symbol":
354
404
  return Object.assign(o, {
355
- href: zn(o),
356
- text: i
405
+ href: Zn(o),
406
+ text: a
357
407
  });
358
408
  default:
359
409
  return Object.assign(o, {
360
- text: i
410
+ text: a
361
411
  });
362
412
  }
363
413
  });
364
414
  }
365
415
  function de(e, t, n) {
366
416
  for (const o of n)
367
- for (const [i, a] of e.entries()) {
368
- if (a.indices[0] > o.indices[0] || a.indices[1] < o.indices[1])
417
+ for (const [a, i] of e.entries()) {
418
+ if (i.indices[0] > o.indices[0] || i.indices[1] < o.indices[1])
369
419
  continue;
370
420
  const s = [
371
421
  {
@@ -373,79 +423,79 @@ function de(e, t, n) {
373
423
  type: t
374
424
  }
375
425
  ];
376
- a.indices[0] < o.indices[0] && s.unshift({
426
+ i.indices[0] < o.indices[0] && s.unshift({
377
427
  indices: [
378
- a.indices[0],
428
+ i.indices[0],
379
429
  o.indices[0]
380
430
  ],
381
431
  type: "text"
382
- }), a.indices[1] > o.indices[1] && s.push({
432
+ }), i.indices[1] > o.indices[1] && s.push({
383
433
  indices: [
384
434
  o.indices[1],
385
- a.indices[1]
435
+ i.indices[1]
386
436
  ],
387
437
  type: "text"
388
- }), e.splice(i, 1, ...s);
438
+ }), e.splice(a, 1, ...s);
389
439
  break;
390
440
  }
391
441
  }
392
- function Kn(e, t) {
442
+ function rr(e, t) {
393
443
  e.entities.media && e.entities.media[0].indices[0] < e.display_text_range[1] && (e.display_text_range[1] = e.entities.media[0].indices[0]);
394
444
  const n = t.at(-1);
395
445
  n && n.indices[1] > e.display_text_range[1] && (n.indices[1] = e.display_text_range[1]);
396
446
  }
397
- const Qn = (e) => ({
447
+ const or = (e) => ({
398
448
  ...e,
399
- url: it(e),
449
+ url: at(e),
400
450
  user: {
401
451
  ...e.user,
402
- url: wt(e),
403
- follow_url: Pn(e)
452
+ url: bt(e),
453
+ follow_url: Jn(e)
404
454
  },
405
- like_url: Bn(e),
406
- reply_url: Fn(e),
407
- in_reply_to_url: e.in_reply_to_screen_name ? Hn(e) : void 0,
455
+ like_url: Kn(e),
456
+ reply_url: Qn(e),
457
+ in_reply_to_url: e.in_reply_to_screen_name ? er(e) : void 0,
408
458
  entities: st(e),
409
459
  quoted_tweet: e.quoted_tweet ? {
410
460
  ...e.quoted_tweet,
411
- url: it(e.quoted_tweet),
461
+ url: at(e.quoted_tweet),
412
462
  entities: st(e.quoted_tweet)
413
463
  } : void 0
414
- }), Jn = "_root_g9tkv_1", Yn = "_rounded_g9tkv_6", Zn = "_mediaWrapper_g9tkv_10", er = "_grid2Columns_g9tkv_17", tr = "_grid3_g9tkv_20", nr = "_grid2x2_g9tkv_23", rr = "_mediaContainer_g9tkv_26", or = "_mediaLink_g9tkv_34", ir = "_skeleton_g9tkv_38", sr = "_image_g9tkv_43", C = {
415
- root: Jn,
416
- rounded: Yn,
417
- mediaWrapper: Zn,
418
- grid2Columns: er,
419
- grid3: tr,
420
- grid2x2: nr,
421
- mediaContainer: rr,
422
- mediaLink: or,
423
- skeleton: ir,
424
- image: sr
425
- }, ar = "_anchor_fp31d_1", cr = "_videoButton_fp31d_17", lr = "_videoButtonIcon_fp31d_35", dr = "_watchOnTwitter_fp31d_44", ur = "_viewReplies_fp31d_60", ie = {
426
- anchor: ar,
427
- videoButton: cr,
428
- videoButtonIcon: lr,
429
- watchOnTwitter: dr,
430
- viewReplies: ur
431
- }, fr = ({ tweet: e, media: t }) => {
432
- const [n, o] = se(!0), [i, a] = se(!1), [s, c] = se(!1), f = Xn(t);
464
+ }), ar = "_root_g9tkv_1", sr = "_rounded_g9tkv_6", ir = "_mediaWrapper_g9tkv_10", cr = "_grid2Columns_g9tkv_17", lr = "_grid3_g9tkv_20", dr = "_grid2x2_g9tkv_23", ur = "_mediaContainer_g9tkv_26", fr = "_mediaLink_g9tkv_34", hr = "_skeleton_g9tkv_38", _r = "_image_g9tkv_43", C = {
465
+ root: ar,
466
+ rounded: sr,
467
+ mediaWrapper: ir,
468
+ grid2Columns: cr,
469
+ grid3: lr,
470
+ grid2x2: dr,
471
+ mediaContainer: ur,
472
+ mediaLink: fr,
473
+ skeleton: hr,
474
+ image: _r
475
+ }, mr = "_anchor_fp31d_1", pr = "_videoButton_fp31d_17", vr = "_videoButtonIcon_fp31d_35", gr = "_watchOnTwitter_fp31d_44", wr = "_viewReplies_fp31d_60", ae = {
476
+ anchor: mr,
477
+ videoButton: pr,
478
+ videoButtonIcon: vr,
479
+ watchOnTwitter: gr,
480
+ viewReplies: wr
481
+ }, yr = ({ tweet: e, media: t }) => {
482
+ const [n, o] = se(!0), [a, i] = se(!1), [s, c] = se(!1), f = nr(t);
433
483
  let d = 0;
434
- return /* @__PURE__ */ h(Bt, {
484
+ return /* @__PURE__ */ h(Pt, {
435
485
  children: [
436
486
  /* @__PURE__ */ r("video", {
437
487
  className: C.image,
438
- poster: yt(t, "small"),
488
+ poster: Tt(t, "small"),
439
489
  controls: !n,
440
490
  playsInline: !0,
441
491
  preload: "none",
442
492
  tabIndex: n ? -1 : 0,
443
493
  onPlay: () => {
444
- d && window.clearTimeout(d), i || a(!0), s && c(!1);
494
+ d && window.clearTimeout(d), a || i(!0), s && c(!1);
445
495
  },
446
496
  onPause: () => {
447
497
  d && window.clearTimeout(d), d = window.setTimeout(() => {
448
- i && a(!1), d = 0;
498
+ a && i(!1), d = 0;
449
499
  }, 100);
450
500
  },
451
501
  onEnded: () => {
@@ -458,19 +508,19 @@ const Qn = (e) => ({
458
508
  }),
459
509
  n && /* @__PURE__ */ r("button", {
460
510
  type: "button",
461
- className: ie.videoButton,
511
+ className: ae.videoButton,
462
512
  "aria-label": "View video on X",
463
513
  onClick: (g) => {
464
514
  const m = g.currentTarget.previousSibling;
465
515
  g.preventDefault(), o(!1), m.load(), m.play().then(() => {
466
- a(!0), m.focus();
467
- }).catch((T) => {
468
- console.error("Error playing video:", T), o(!0), a(!1);
516
+ i(!0), m.focus();
517
+ }).catch((b) => {
518
+ console.error("Error playing video:", b), o(!0), i(!1);
469
519
  });
470
520
  },
471
521
  children: /* @__PURE__ */ r("svg", {
472
522
  viewBox: "0 0 24 24",
473
- className: ie.videoButtonIcon,
523
+ className: ae.videoButtonIcon,
474
524
  "aria-hidden": "true",
475
525
  children: /* @__PURE__ */ r("g", {
476
526
  children: /* @__PURE__ */ r("path", {
@@ -479,11 +529,11 @@ const Qn = (e) => ({
479
529
  })
480
530
  })
481
531
  }),
482
- !i && !s && /* @__PURE__ */ r("div", {
483
- className: ie.watchOnTwitter,
532
+ !a && !s && /* @__PURE__ */ r("div", {
533
+ className: ae.watchOnTwitter,
484
534
  children: /* @__PURE__ */ r("a", {
485
535
  href: e.url,
486
- className: ie.anchor,
536
+ className: ae.anchor,
487
537
  target: "_blank",
488
538
  rel: "noopener noreferrer",
489
539
  children: n ? "Watch on X" : "Continue watching on X"
@@ -491,31 +541,31 @@ const Qn = (e) => ({
491
541
  }),
492
542
  s && /* @__PURE__ */ r("a", {
493
543
  href: e.url,
494
- className: U(ie.anchor, ie.viewReplies),
544
+ className: U(ae.anchor, ae.viewReplies),
495
545
  target: "_blank",
496
546
  rel: "noopener noreferrer",
497
547
  children: "View replies"
498
548
  })
499
549
  ]
500
550
  });
501
- }, hr = (e) => /* @__PURE__ */ r("img", {
551
+ }, br = (e) => /* @__PURE__ */ r("img", {
502
552
  ...e
503
- }), at = (e, t) => {
553
+ }), it = (e, t) => {
504
554
  let n = 56.25;
505
555
  return t === 1 && (n = 100 / e.original_info.width * e.original_info.height), t === 2 && (n = n * 2), {
506
556
  width: e.type === "photo" ? void 0 : "unset",
507
557
  paddingBottom: `${n}%`
508
558
  };
509
- }, Tt = ({ tweet: e, components: t, quoted: n }) => {
510
- var o, i, a;
511
- const s = (a = (o = e.mediaDetails) == null ? void 0 : o.length) != null ? a : 0;
559
+ }, xt = ({ tweet: e, components: t, quoted: n }) => {
560
+ var o, a, i;
561
+ const s = (i = (o = e.mediaDetails) == null ? void 0 : o.length) != null ? i : 0;
512
562
  var c;
513
- const f = (c = t == null ? void 0 : t.MediaImg) != null ? c : hr;
563
+ const f = (c = t == null ? void 0 : t.MediaImg) != null ? c : br;
514
564
  return /* @__PURE__ */ r("div", {
515
565
  className: U(C.root, !n && C.rounded),
516
566
  children: /* @__PURE__ */ r("div", {
517
567
  className: U(C.mediaWrapper, s > 1 && C.grid2Columns, s === 3 && C.grid3, s > 4 && C.grid2x2),
518
- children: (i = e.mediaDetails) == null ? void 0 : i.map((d) => /* @__PURE__ */ r(Ft, {
568
+ children: (a = e.mediaDetails) == null ? void 0 : a.map((d) => /* @__PURE__ */ r(Ut, {
519
569
  children: d.type === "photo" ? /* @__PURE__ */ h("a", {
520
570
  href: e.url,
521
571
  className: U(C.mediaContainer, C.mediaLink),
@@ -524,10 +574,10 @@ const Qn = (e) => ({
524
574
  children: [
525
575
  /* @__PURE__ */ r("div", {
526
576
  className: C.skeleton,
527
- style: at(d, s)
577
+ style: it(d, s)
528
578
  }),
529
579
  /* @__PURE__ */ r(f, {
530
- src: yt(d, "small"),
580
+ src: Tt(d, "small"),
531
581
  alt: d.ext_alt_text || "Image",
532
582
  className: C.image,
533
583
  draggable: !0
@@ -538,9 +588,9 @@ const Qn = (e) => ({
538
588
  children: [
539
589
  /* @__PURE__ */ r("div", {
540
590
  className: C.skeleton,
541
- style: at(d, s)
591
+ style: it(d, s)
542
592
  }),
543
- /* @__PURE__ */ r(fr, {
593
+ /* @__PURE__ */ r(yr, {
544
594
  tweet: e,
545
595
  media: d
546
596
  })
@@ -549,28 +599,12 @@ const Qn = (e) => ({
549
599
  }, d.media_url_https))
550
600
  })
551
601
  });
552
- }, _r = {
553
- hour: "numeric",
554
- minute: "2-digit",
555
- hour12: !0,
556
- weekday: "short",
557
- month: "short",
558
- day: "numeric",
559
- year: "numeric"
560
- }, mr = new Intl.DateTimeFormat("en-US", _r), pr = (e) => {
561
- const t = {};
562
- for (const n of e)
563
- t[n.type] = n.value;
564
- return t;
565
- }, vr = (e) => {
566
- const t = pr(mr.formatToParts(e)), n = `${t.hour}:${t.minute} ${t.dayPeriod}`, o = `${t.month} ${t.day}, ${t.year}`;
567
- return `${n} · ${o}`;
568
- }, gr = "_root_i24yn_1", wr = {
569
- root: gr
570
- }, yr = ({ tweet: e }) => {
571
- const t = new Date(e.created_at), n = vr(t);
602
+ }, Tr = "_root_i24yn_1", xr = {
603
+ root: Tr
604
+ }, Nr = ({ tweet: e }) => {
605
+ const t = new Date(e.created_at), n = Xn(t);
572
606
  return /* @__PURE__ */ r("a", {
573
- className: wr.root,
607
+ className: xr.root,
574
608
  href: e.url,
575
609
  target: "_blank",
576
610
  rel: "noopener noreferrer",
@@ -580,14 +614,14 @@ const Qn = (e) => ({
580
614
  children: n
581
615
  })
582
616
  });
583
- }, Tr = "_info_19qcj_1", br = "_infoLink_19qcj_10", xr = "_infoIcon_19qcj_30", Ne = {
584
- info: Tr,
585
- infoLink: br,
586
- infoIcon: xr
587
- }, Nr = ({ tweet: e }) => /* @__PURE__ */ h("div", {
617
+ }, Ir = "_info_19qcj_1", Rr = "_infoLink_19qcj_10", Sr = "_infoIcon_19qcj_30", Ne = {
618
+ info: Ir,
619
+ infoLink: Rr,
620
+ infoIcon: Sr
621
+ }, kr = ({ tweet: e }) => /* @__PURE__ */ h("div", {
588
622
  className: Ne.info,
589
623
  children: [
590
- /* @__PURE__ */ r(yr, {
624
+ /* @__PURE__ */ r(Nr, {
591
625
  tweet: e
592
626
  }),
593
627
  /* @__PURE__ */ r("a", {
@@ -608,44 +642,44 @@ const Qn = (e) => ({
608
642
  })
609
643
  })
610
644
  ]
611
- }), Rr = "_actions_n2anf_1", Ir = "_like_n2anf_13", kr = "_reply_n2anf_14", Sr = "_copy_n2anf_15", Er = "_likeIconWrapper_n2anf_27", Cr = "_likeCount_n2anf_30", Lr = "_replyIconWrapper_n2anf_35", Or = "_copyIconWrapper_n2anf_36", qr = "_likeIcon_n2anf_27", Dr = "_replyIcon_n2anf_35", $r = "_copyIcon_n2anf_36", Ar = "_replyText_n2anf_56", Vr = "_copyText_n2anf_57", S = {
612
- actions: Rr,
613
- like: Ir,
614
- reply: kr,
615
- copy: Sr,
616
- likeIconWrapper: Er,
617
- likeCount: Cr,
618
- replyIconWrapper: Lr,
619
- copyIconWrapper: Or,
620
- likeIcon: qr,
621
- replyIcon: Dr,
622
- copyIcon: $r,
623
- replyText: Ar,
624
- copyText: Vr
625
- }, Mr = ({ tweet: e }) => {
645
+ }), Er = "_actions_n2anf_1", Cr = "_like_n2anf_13", Or = "_reply_n2anf_14", Lr = "_copy_n2anf_15", $r = "_likeIconWrapper_n2anf_27", qr = "_likeCount_n2anf_30", Dr = "_replyIconWrapper_n2anf_35", Ar = "_copyIconWrapper_n2anf_36", Vr = "_likeIcon_n2anf_27", Mr = "_replyIcon_n2anf_35", jr = "_copyIcon_n2anf_36", Wr = "_replyText_n2anf_56", Br = "_copyText_n2anf_57", k = {
646
+ actions: Er,
647
+ like: Cr,
648
+ reply: Or,
649
+ copy: Lr,
650
+ likeIconWrapper: $r,
651
+ likeCount: qr,
652
+ replyIconWrapper: Dr,
653
+ copyIconWrapper: Ar,
654
+ likeIcon: Vr,
655
+ replyIcon: Mr,
656
+ copyIcon: jr,
657
+ replyText: Wr,
658
+ copyText: Br
659
+ }, Fr = ({ tweet: e }) => {
626
660
  const [t, n] = se(!1), o = () => {
627
661
  navigator.clipboard.writeText(e.url), n(!0);
628
662
  };
629
663
  return Fe(() => {
630
664
  if (t) {
631
- const i = setTimeout(() => {
665
+ const a = setTimeout(() => {
632
666
  n(!1);
633
667
  }, 6e3);
634
- return () => clearTimeout(i);
668
+ return () => clearTimeout(a);
635
669
  }
636
670
  }, [
637
671
  t
638
672
  ]), /* @__PURE__ */ h("button", {
639
673
  type: "button",
640
- className: S.copy,
674
+ className: k.copy,
641
675
  "aria-label": "Copy link",
642
676
  onClick: o,
643
677
  children: [
644
678
  /* @__PURE__ */ r("div", {
645
- className: S.copyIconWrapper,
679
+ className: k.copyIconWrapper,
646
680
  children: t ? /* @__PURE__ */ r("svg", {
647
681
  viewBox: "0 0 24 24",
648
- className: S.copyIcon,
682
+ className: k.copyIcon,
649
683
  "aria-hidden": "true",
650
684
  children: /* @__PURE__ */ r("g", {
651
685
  children: /* @__PURE__ */ r("path", {
@@ -654,7 +688,7 @@ const Qn = (e) => ({
654
688
  })
655
689
  }) : /* @__PURE__ */ r("svg", {
656
690
  viewBox: "0 0 24 24",
657
- className: S.copyIcon,
691
+ className: k.copyIcon,
658
692
  "aria-hidden": "true",
659
693
  children: /* @__PURE__ */ r("g", {
660
694
  children: /* @__PURE__ */ r("path", {
@@ -664,28 +698,28 @@ const Qn = (e) => ({
664
698
  })
665
699
  }),
666
700
  /* @__PURE__ */ r("span", {
667
- className: S.copyText,
701
+ className: k.copyText,
668
702
  children: t ? "Copied!" : "Copy link"
669
703
  })
670
704
  ]
671
705
  });
672
- }, jr = ({ tweet: e }) => {
673
- const t = Oe(e.favorite_count);
706
+ }, Pr = ({ tweet: e }) => {
707
+ const t = Le(e.favorite_count);
674
708
  return /* @__PURE__ */ h("div", {
675
- className: S.actions,
709
+ className: k.actions,
676
710
  children: [
677
711
  /* @__PURE__ */ h("a", {
678
- className: S.like,
712
+ className: k.like,
679
713
  href: e.like_url,
680
714
  target: "_blank",
681
715
  rel: "noopener noreferrer",
682
716
  "aria-label": `Like. This Tweet has ${t} likes`,
683
717
  children: [
684
718
  /* @__PURE__ */ r("div", {
685
- className: S.likeIconWrapper,
719
+ className: k.likeIconWrapper,
686
720
  children: /* @__PURE__ */ r("svg", {
687
721
  viewBox: "0 0 24 24",
688
- className: S.likeIcon,
722
+ className: k.likeIcon,
689
723
  "aria-hidden": "true",
690
724
  children: /* @__PURE__ */ r("g", {
691
725
  children: /* @__PURE__ */ r("path", {
@@ -695,23 +729,23 @@ const Qn = (e) => ({
695
729
  })
696
730
  }),
697
731
  /* @__PURE__ */ r("span", {
698
- className: S.likeCount,
732
+ className: k.likeCount,
699
733
  children: t
700
734
  })
701
735
  ]
702
736
  }),
703
737
  /* @__PURE__ */ h("a", {
704
- className: S.reply,
738
+ className: k.reply,
705
739
  href: e.reply_url,
706
740
  target: "_blank",
707
741
  rel: "noopener noreferrer",
708
742
  "aria-label": "Reply to this Tweet on Twitter",
709
743
  children: [
710
744
  /* @__PURE__ */ r("div", {
711
- className: S.replyIconWrapper,
745
+ className: k.replyIconWrapper,
712
746
  children: /* @__PURE__ */ r("svg", {
713
747
  viewBox: "0 0 24 24",
714
- className: S.replyIcon,
748
+ className: k.replyIcon,
715
749
  "aria-hidden": "true",
716
750
  children: /* @__PURE__ */ r("g", {
717
751
  children: /* @__PURE__ */ r("path", {
@@ -721,36 +755,36 @@ const Qn = (e) => ({
721
755
  })
722
756
  }),
723
757
  /* @__PURE__ */ r("span", {
724
- className: S.replyText,
758
+ className: k.replyText,
725
759
  children: "Reply"
726
760
  })
727
761
  ]
728
762
  }),
729
- /* @__PURE__ */ r(Mr, {
763
+ /* @__PURE__ */ r(Fr, {
730
764
  tweet: e
731
765
  })
732
766
  ]
733
767
  });
734
- }, Wr = "_replies_1cutb_1", Br = "_link_1cutb_4", Fr = "_text_1cutb_23", Re = {
735
- replies: Wr,
736
- link: Br,
737
- text: Fr
738
- }, Pr = ({ tweet: e }) => /* @__PURE__ */ r("div", {
739
- className: Re.replies,
768
+ }, Ur = "_replies_1cutb_1", zr = "_link_1cutb_4", Hr = "_text_1cutb_23", Ie = {
769
+ replies: Ur,
770
+ link: zr,
771
+ text: Hr
772
+ }, Gr = ({ tweet: e }) => /* @__PURE__ */ r("div", {
773
+ className: Ie.replies,
740
774
  children: /* @__PURE__ */ r("a", {
741
- className: Re.link,
775
+ className: Ie.link,
742
776
  href: e.url,
743
777
  target: "_blank",
744
778
  rel: "noopener noreferrer",
745
779
  children: /* @__PURE__ */ r("span", {
746
- className: Re.text,
747
- children: e.conversation_count === 0 ? "Read more on X" : e.conversation_count === 1 ? `Read ${Oe(e.conversation_count)} reply` : `Read ${Oe(e.conversation_count)} replies`
780
+ className: Ie.text,
781
+ children: e.conversation_count === 0 ? "Read more on X" : e.conversation_count === 1 ? `Read ${Le(e.conversation_count)} reply` : `Read ${Le(e.conversation_count)} replies`
748
782
  })
749
783
  })
750
- }), Ur = "_root_q5799_1", zr = "_article_q5799_16", ct = {
751
- root: Ur,
752
- article: zr
753
- }, Hr = ({ tweet: e, children: t }) => /* @__PURE__ */ r("div", {
784
+ }), Xr = "_root_q5799_1", Kr = "_article_q5799_16", ct = {
785
+ root: Xr,
786
+ article: Kr
787
+ }, Qr = ({ tweet: e, children: t }) => /* @__PURE__ */ r("div", {
754
788
  className: ct.root,
755
789
  onClick: (n) => {
756
790
  n.preventDefault(), window.open(e.url, "_blank");
@@ -759,15 +793,18 @@ const Qn = (e) => ({
759
793
  className: ct.article,
760
794
  children: t
761
795
  })
762
- }), Gr = "_header_r31i5_1", Xr = "_avatar_r31i5_11", Kr = "_avatarSquare_r31i5_17", Qr = "_author_r31i5_21", Jr = "_authorText_r31i5_26", Yr = "_username_r31i5_33", Q = {
763
- header: Gr,
764
- avatar: Xr,
765
- avatarSquare: Kr,
766
- author: Qr,
767
- authorText: Jr,
768
- username: Yr
769
- }, Zr = ({ tweet: e }) => {
770
- const { user: t } = e;
796
+ }), Jr = "_header_f00ab_1", Yr = "_avatar_f00ab_11", Zr = "_avatarOverflow_f00ab_16", eo = "_avatarSquare_f00ab_23", to = "_author_f00ab_27", no = "_authorText_f00ab_33", ro = "_username_f00ab_40", Q = {
797
+ header: Jr,
798
+ avatar: Yr,
799
+ avatarOverflow: Zr,
800
+ avatarSquare: eo,
801
+ author: to,
802
+ authorText: no,
803
+ username: ro
804
+ }, oo = ({ tweet: e, components: t }) => {
805
+ const { user: n } = e;
806
+ var o;
807
+ const a = (o = t == null ? void 0 : t.AvatarImg) != null ? o : vt;
771
808
  return /* @__PURE__ */ h("div", {
772
809
  className: Q.header,
773
810
  children: [
@@ -777,10 +814,10 @@ const Qn = (e) => ({
777
814
  target: "_blank",
778
815
  rel: "noopener noreferrer",
779
816
  children: /* @__PURE__ */ r("div", {
780
- className: U(Q.avatarOverflow, t.profile_image_shape === "Square" && Q.avatarSquare),
781
- children: /* @__PURE__ */ r(vt, {
782
- src: t.profile_image_url_https,
783
- alt: t.name,
817
+ className: U(Q.avatarOverflow, n.profile_image_shape === "Square" && Q.avatarSquare),
818
+ children: /* @__PURE__ */ r(a, {
819
+ src: n.profile_image_url_https,
820
+ alt: n.name,
784
821
  width: 20,
785
822
  height: 20
786
823
  })
@@ -792,20 +829,23 @@ const Qn = (e) => ({
792
829
  /* @__PURE__ */ r("div", {
793
830
  className: Q.authorText,
794
831
  children: /* @__PURE__ */ r("span", {
795
- title: t.name,
796
- children: t.name
832
+ title: n.name,
833
+ children: n.name
797
834
  })
798
835
  }),
799
836
  /* @__PURE__ */ r(gt, {
800
- user: t
837
+ user: n
838
+ }),
839
+ /* @__PURE__ */ r(wt, {
840
+ user: n
801
841
  }),
802
842
  /* @__PURE__ */ r("div", {
803
843
  className: Q.username,
804
844
  children: /* @__PURE__ */ h("span", {
805
- title: `@${t.screen_name}`,
845
+ title: `@${n.screen_name}`,
806
846
  children: [
807
847
  "@",
808
- t.screen_name
848
+ n.screen_name
809
849
  ]
810
850
  })
811
851
  })
@@ -813,10 +853,10 @@ const Qn = (e) => ({
813
853
  })
814
854
  ]
815
855
  });
816
- }, eo = "_root_175ot_1", to = {
817
- root: eo
818
- }, no = ({ tweet: e }) => /* @__PURE__ */ r("p", {
819
- className: to.root,
856
+ }, ao = "_root_175ot_1", so = {
857
+ root: ao
858
+ }, io = ({ tweet: e }) => /* @__PURE__ */ r("p", {
859
+ className: so.root,
820
860
  lang: e.lang,
821
861
  dir: "auto",
822
862
  children: e.entities.map((t, n) => /* @__PURE__ */ r("span", {
@@ -824,63 +864,65 @@ const Qn = (e) => ({
824
864
  __html: t.text
825
865
  }
826
866
  }, n))
827
- }), ro = ({ tweet: e }) => {
828
- var t;
829
- return /* @__PURE__ */ h(Hr, {
867
+ }), co = ({ tweet: e, components: t }) => {
868
+ var n;
869
+ return /* @__PURE__ */ h(Qr, {
830
870
  tweet: e,
831
871
  children: [
832
- /* @__PURE__ */ r(Zr, {
833
- tweet: e
872
+ /* @__PURE__ */ r(oo, {
873
+ tweet: e,
874
+ components: t
834
875
  }),
835
- /* @__PURE__ */ r(no, {
876
+ /* @__PURE__ */ r(io, {
836
877
  tweet: e
837
878
  }),
838
- (t = e.mediaDetails) != null && t.length ? /* @__PURE__ */ r(Tt, {
879
+ (n = e.mediaDetails) != null && n.length ? /* @__PURE__ */ r(xt, {
839
880
  quoted: !0,
840
881
  tweet: e
841
882
  }) : null
842
883
  ]
843
884
  });
844
- }, oo = ({ tweet: e, components: t }) => {
885
+ }, lo = ({ tweet: e, components: t }) => {
845
886
  var n;
846
- const o = Pe(() => Qn(e), [
887
+ const o = Pe(() => or(e), [
847
888
  e
848
889
  ]);
849
890
  return /* @__PURE__ */ h(ze, {
850
891
  children: [
851
- /* @__PURE__ */ r(Ln, {
892
+ /* @__PURE__ */ r(Dn, {
852
893
  tweet: o,
853
894
  components: t
854
895
  }),
855
- o.in_reply_to_status_id_str && /* @__PURE__ */ r(Dn, {
896
+ o.in_reply_to_status_id_str && /* @__PURE__ */ r(Mn, {
856
897
  tweet: o
857
898
  }),
858
- /* @__PURE__ */ r(Wn, {
899
+ /* @__PURE__ */ r(Pn, {
859
900
  tweet: o
860
901
  }),
861
- (n = o.mediaDetails) != null && n.length ? /* @__PURE__ */ r(Tt, {
902
+ (n = o.mediaDetails) != null && n.length ? /* @__PURE__ */ r(xt, {
862
903
  tweet: o,
863
904
  components: t
864
905
  }) : null,
865
- o.quoted_tweet && /* @__PURE__ */ r(ro, {
866
- tweet: o.quoted_tweet
906
+ o.quoted_tweet && /* @__PURE__ */ r(co, {
907
+ tweet: o.quoted_tweet,
908
+ components: t
867
909
  }),
868
- /* @__PURE__ */ r(Nr, {
910
+ /* @__PURE__ */ r(kr, {
869
911
  tweet: o
870
912
  }),
871
- /* @__PURE__ */ r(jr, {
913
+ /* @__PURE__ */ r(Pr, {
872
914
  tweet: o
873
915
  }),
874
- /* @__PURE__ */ r(Pr, {
916
+ /* @__PURE__ */ r(Gr, {
875
917
  tweet: o
876
918
  })
877
919
  ]
878
920
  });
879
- }, io = "_root_16yxa_1", so = {
880
- root: io
881
- }, ao = (e) => /* @__PURE__ */ r(ze, {
921
+ }, uo = "_root_16yxa_1", fo = {
922
+ root: uo
923
+ }, ho = (e) => /* @__PURE__ */ r(ze, {
882
924
  children: /* @__PURE__ */ h("div", {
883
- className: so.root,
925
+ className: fo.root,
884
926
  children: [
885
927
  /* @__PURE__ */ r("h3", {
886
928
  children: "Tweet not found"
@@ -890,15 +932,15 @@ const Qn = (e) => ({
890
932
  })
891
933
  ]
892
934
  })
893
- }), co = "_skeleton_oi7hr_1", lo = {
894
- skeleton: co
935
+ }), _o = "_skeleton_oi7hr_1", mo = {
936
+ skeleton: _o
895
937
  }, pe = ({ style: e }) => /* @__PURE__ */ r("span", {
896
- className: lo.skeleton,
938
+ className: mo.skeleton,
897
939
  style: e
898
- }), uo = "_root_17qqv_1", fo = {
899
- root: uo
900
- }, ho = () => /* @__PURE__ */ h(ze, {
901
- className: fo.root,
940
+ }), po = "_root_17qqv_1", vo = {
941
+ root: po
942
+ }, go = () => /* @__PURE__ */ h(ze, {
943
+ className: vo.root,
902
944
  children: [
903
945
  /* @__PURE__ */ r(pe, {
904
946
  style: {
@@ -931,9 +973,9 @@ const Qn = (e) => ({
931
973
  }
932
974
  })
933
975
  ]
934
- }), bt = 0, xt = 1, Nt = 2, lt = 3;
976
+ }), Nt = 0, It = 1, Rt = 2, lt = 3;
935
977
  var dt = Object.prototype.hasOwnProperty;
936
- function qe(e, t) {
978
+ function $e(e, t) {
937
979
  var n, o;
938
980
  if (e === t) return !0;
939
981
  if (e && t && (n = e.constructor) === t.constructor) {
@@ -941,56 +983,56 @@ function qe(e, t) {
941
983
  if (n === RegExp) return e.toString() === t.toString();
942
984
  if (n === Array) {
943
985
  if ((o = e.length) === t.length)
944
- for (; o-- && qe(e[o], t[o]); ) ;
986
+ for (; o-- && $e(e[o], t[o]); ) ;
945
987
  return o === -1;
946
988
  }
947
989
  if (!n || typeof e == "object") {
948
990
  o = 0;
949
991
  for (n in e)
950
- if (dt.call(e, n) && ++o && !dt.call(t, n) || !(n in t) || !qe(e[n], t[n])) return !1;
992
+ if (dt.call(e, n) && ++o && !dt.call(t, n) || !(n in t) || !$e(e[n], t[n])) return !1;
951
993
  return Object.keys(t).length === o;
952
994
  }
953
995
  }
954
996
  return e !== e && t !== t;
955
997
  }
956
998
  const F = /* @__PURE__ */ new WeakMap(), P = () => {
957
- }, I = (
999
+ }, R = (
958
1000
  /*#__NOINLINE__*/
959
1001
  P()
960
- ), De = Object, u = (e) => e === I, j = (e) => typeof e == "function", z = (e, t) => ({
1002
+ ), qe = Object, u = (e) => e === R, j = (e) => typeof e == "function", z = (e, t) => ({
961
1003
  ...e,
962
1004
  ...t
963
- }), Rt = (e) => j(e.then), Ie = {}, ve = {}, He = "undefined", ue = typeof window != He, $e = typeof document != He, _o = ue && "Deno" in window, mo = () => ue && typeof window.requestAnimationFrame != He, It = (e, t) => {
1005
+ }), St = (e) => j(e.then), Re = {}, ve = {}, He = "undefined", ue = typeof window != He, De = typeof document != He, wo = ue && "Deno" in window, yo = () => ue && typeof window.requestAnimationFrame != He, kt = (e, t) => {
964
1006
  const n = F.get(e);
965
1007
  return [
966
1008
  // Getter
967
- () => !u(t) && e.get(t) || Ie,
1009
+ () => !u(t) && e.get(t) || Re,
968
1010
  // Setter
969
1011
  (o) => {
970
1012
  if (!u(t)) {
971
- const i = e.get(t);
972
- t in ve || (ve[t] = i), n[5](t, z(i, o), i || Ie);
1013
+ const a = e.get(t);
1014
+ t in ve || (ve[t] = a), n[5](t, z(a, o), a || Re);
973
1015
  }
974
1016
  },
975
1017
  // Subscriber
976
1018
  n[6],
977
1019
  // Get server cache snapshot
978
- () => !u(t) && t in ve ? ve[t] : !u(t) && e.get(t) || Ie
1020
+ () => !u(t) && t in ve ? ve[t] : !u(t) && e.get(t) || Re
979
1021
  ];
980
1022
  };
981
1023
  let Ae = !0;
982
- const po = () => Ae, [Ve, Me] = ue && window.addEventListener ? [
1024
+ const bo = () => Ae, [Ve, Me] = ue && window.addEventListener ? [
983
1025
  window.addEventListener.bind(window),
984
1026
  window.removeEventListener.bind(window)
985
1027
  ] : [
986
1028
  P,
987
1029
  P
988
- ], vo = () => {
989
- const e = $e && document.visibilityState;
1030
+ ], To = () => {
1031
+ const e = De && document.visibilityState;
990
1032
  return u(e) || e !== "hidden";
991
- }, go = (e) => ($e && document.addEventListener("visibilitychange", e), Ve("focus", e), () => {
992
- $e && document.removeEventListener("visibilitychange", e), Me("focus", e);
993
- }), wo = (e) => {
1033
+ }, xo = (e) => (De && document.addEventListener("visibilitychange", e), Ve("focus", e), () => {
1034
+ De && document.removeEventListener("visibilitychange", e), Me("focus", e);
1035
+ }), No = (e) => {
994
1036
  const t = () => {
995
1037
  Ae = !0, e();
996
1038
  }, n = () => {
@@ -999,30 +1041,30 @@ const po = () => Ae, [Ve, Me] = ue && window.addEventListener ? [
999
1041
  return Ve("online", t), Ve("offline", n), () => {
1000
1042
  Me("online", t), Me("offline", n);
1001
1043
  };
1002
- }, yo = {
1003
- isOnline: po,
1004
- isVisible: vo
1005
- }, To = {
1006
- initFocus: go,
1007
- initReconnect: wo
1008
- }, ut = !Be.useId, ae = !ue || _o, bo = (e) => mo() ? window.requestAnimationFrame(e) : setTimeout(e, 1), ke = ae ? Fe : Ut, Se = typeof navigator < "u" && navigator.connection, ft = !ae && Se && ([
1044
+ }, Io = {
1045
+ isOnline: bo,
1046
+ isVisible: To
1047
+ }, Ro = {
1048
+ initFocus: xo,
1049
+ initReconnect: No
1050
+ }, ut = !Be.useId, ie = !ue || wo, So = (e) => yo() ? window.requestAnimationFrame(e) : setTimeout(e, 1), Se = ie ? Fe : Ht, ke = typeof navigator < "u" && navigator.connection, ft = !ie && ke && ([
1009
1051
  "slow-2g",
1010
1052
  "2g"
1011
- ].includes(Se.effectiveType) || Se.saveData), ge = /* @__PURE__ */ new WeakMap(), xo = (e) => De.prototype.toString.call(e), Ee = (e, t) => e === `[object ${t}]`;
1012
- let No = 0;
1053
+ ].includes(ke.effectiveType) || ke.saveData), ge = /* @__PURE__ */ new WeakMap(), ko = (e) => qe.prototype.toString.call(e), Ee = (e, t) => e === `[object ${t}]`;
1054
+ let Eo = 0;
1013
1055
  const je = (e) => {
1014
- const t = typeof e, n = xo(e), o = Ee(n, "Date"), i = Ee(n, "RegExp"), a = Ee(n, "Object");
1056
+ const t = typeof e, n = ko(e), o = Ee(n, "Date"), a = Ee(n, "RegExp"), i = Ee(n, "Object");
1015
1057
  let s, c;
1016
- if (De(e) === e && !o && !i) {
1058
+ if (qe(e) === e && !o && !a) {
1017
1059
  if (s = ge.get(e), s) return s;
1018
- if (s = ++No + "~", ge.set(e, s), Array.isArray(e)) {
1060
+ if (s = ++Eo + "~", ge.set(e, s), Array.isArray(e)) {
1019
1061
  for (s = "@", c = 0; c < e.length; c++)
1020
1062
  s += je(e[c]) + ",";
1021
1063
  ge.set(e, s);
1022
1064
  }
1023
- if (a) {
1065
+ if (i) {
1024
1066
  s = "#";
1025
- const f = De.keys(e).sort();
1067
+ const f = qe.keys(e).sort();
1026
1068
  for (; !u(c = f.pop()); )
1027
1069
  u(e[c]) || (s += c + ":" + je(e[c]) + ",");
1028
1070
  ge.set(e, s);
@@ -1043,140 +1085,140 @@ const je = (e) => {
1043
1085
  t
1044
1086
  ];
1045
1087
  };
1046
- let Ro = 0;
1047
- const We = () => ++Ro;
1048
- async function kt(...e) {
1049
- const [t, n, o, i] = e, a = z({
1088
+ let Co = 0;
1089
+ const We = () => ++Co;
1090
+ async function Et(...e) {
1091
+ const [t, n, o, a] = e, i = z({
1050
1092
  populateCache: !0,
1051
1093
  throwOnError: !0
1052
- }, typeof i == "boolean" ? {
1053
- revalidate: i
1054
- } : i || {});
1055
- let s = a.populateCache;
1056
- const c = a.rollbackOnError;
1057
- let f = a.optimisticData;
1058
- const d = (T) => typeof c == "function" ? c(T) : c !== !1, g = a.throwOnError;
1094
+ }, typeof a == "boolean" ? {
1095
+ revalidate: a
1096
+ } : a || {});
1097
+ let s = i.populateCache;
1098
+ const c = i.rollbackOnError;
1099
+ let f = i.optimisticData;
1100
+ const d = (b) => typeof c == "function" ? c(b) : c !== !1, g = i.throwOnError;
1059
1101
  if (j(n)) {
1060
- const T = n, R = [], E = t.keys();
1061
- for (const O of E)
1102
+ const b = n, I = [], E = t.keys();
1103
+ for (const L of E)
1062
1104
  // Skip the special useSWRInfinite and useSWRSubscription keys.
1063
- !/^\$(inf|sub)\$/.test(O) && T(t.get(O)._k) && R.push(O);
1064
- return Promise.all(R.map(m));
1105
+ !/^\$(inf|sub)\$/.test(L) && b(t.get(L)._k) && I.push(L);
1106
+ return Promise.all(I.map(m));
1065
1107
  }
1066
1108
  return m(n);
1067
- async function m(T) {
1068
- const [R] = Ge(T);
1069
- if (!R) return;
1070
- const [E, O] = It(t, R), [$, ce, l, fe] = F.get(t), J = () => {
1071
- const q = $[R];
1072
- return (j(a.revalidate) ? a.revalidate(E().data, T) : a.revalidate !== !1) && (delete l[R], delete fe[R], q && q[0]) ? q[0](Nt).then(() => E().data) : E().data;
1109
+ async function m(b) {
1110
+ const [I] = Ge(b);
1111
+ if (!I) return;
1112
+ const [E, L] = kt(t, I), [D, ce, l, fe] = F.get(t), J = () => {
1113
+ const $ = D[I];
1114
+ return (j(i.revalidate) ? i.revalidate(E().data, b) : i.revalidate !== !1) && (delete l[I], delete fe[I], $ && $[0]) ? $[0](Rt).then(() => E().data) : E().data;
1073
1115
  };
1074
1116
  if (e.length < 3)
1075
1117
  return J();
1076
- let b = o, A, V = !1;
1118
+ let T = o, A, V = !1;
1077
1119
  const Y = We();
1078
- ce[R] = [
1120
+ ce[I] = [
1079
1121
  Y,
1080
1122
  0
1081
1123
  ];
1082
1124
  const p = !u(f), Z = E(), M = Z.data, ee = Z._c, H = u(ee) ? M : ee;
1083
- if (p && (f = j(f) ? f(H, M) : f, O({
1125
+ if (p && (f = j(f) ? f(H, M) : f, L({
1084
1126
  data: f,
1085
1127
  _c: H
1086
- })), j(b))
1128
+ })), j(T))
1087
1129
  try {
1088
- b = b(H);
1089
- } catch (q) {
1090
- A = q, V = !0;
1130
+ T = T(H);
1131
+ } catch ($) {
1132
+ A = $, V = !0;
1091
1133
  }
1092
- if (b && Rt(b))
1093
- if (b = await b.catch((q) => {
1094
- A = q, V = !0;
1095
- }), Y !== ce[R][0]) {
1134
+ if (T && St(T))
1135
+ if (T = await T.catch(($) => {
1136
+ A = $, V = !0;
1137
+ }), Y !== ce[I][0]) {
1096
1138
  if (V) throw A;
1097
- return b;
1098
- } else V && p && d(A) && (s = !0, O({
1139
+ return T;
1140
+ } else V && p && d(A) && (s = !0, L({
1099
1141
  data: H,
1100
- _c: I
1142
+ _c: R
1101
1143
  }));
1102
1144
  if (s && !V)
1103
1145
  if (j(s)) {
1104
- const q = s(b, H);
1105
- O({
1106
- data: q,
1107
- error: I,
1108
- _c: I
1146
+ const $ = s(T, H);
1147
+ L({
1148
+ data: $,
1149
+ error: R,
1150
+ _c: R
1109
1151
  });
1110
1152
  } else
1111
- O({
1112
- data: b,
1113
- error: I,
1114
- _c: I
1153
+ L({
1154
+ data: T,
1155
+ error: R,
1156
+ _c: R
1115
1157
  });
1116
- if (ce[R][1] = We(), Promise.resolve(J()).then(() => {
1117
- O({
1118
- _c: I
1158
+ if (ce[I][1] = We(), Promise.resolve(J()).then(() => {
1159
+ L({
1160
+ _c: R
1119
1161
  });
1120
1162
  }), V) {
1121
1163
  if (g) throw A;
1122
1164
  return;
1123
1165
  }
1124
- return b;
1166
+ return T;
1125
1167
  }
1126
1168
  }
1127
1169
  const ht = (e, t) => {
1128
1170
  for (const n in e)
1129
1171
  e[n][0] && e[n][0](t);
1130
- }, Io = (e, t) => {
1172
+ }, Oo = (e, t) => {
1131
1173
  if (!F.has(e)) {
1132
- const n = z(To, t), o = /* @__PURE__ */ Object.create(null), i = kt.bind(I, e);
1133
- let a = P;
1174
+ const n = z(Ro, t), o = /* @__PURE__ */ Object.create(null), a = Et.bind(R, e);
1175
+ let i = P;
1134
1176
  const s = /* @__PURE__ */ Object.create(null), c = (g, m) => {
1135
- const T = s[g] || [];
1136
- return s[g] = T, T.push(m), () => T.splice(T.indexOf(m), 1);
1137
- }, f = (g, m, T) => {
1177
+ const b = s[g] || [];
1178
+ return s[g] = b, b.push(m), () => b.splice(b.indexOf(m), 1);
1179
+ }, f = (g, m, b) => {
1138
1180
  e.set(g, m);
1139
- const R = s[g];
1140
- if (R)
1141
- for (const E of R)
1142
- E(m, T);
1181
+ const I = s[g];
1182
+ if (I)
1183
+ for (const E of I)
1184
+ E(m, b);
1143
1185
  }, d = () => {
1144
1186
  if (!F.has(e) && (F.set(e, [
1145
1187
  o,
1146
1188
  /* @__PURE__ */ Object.create(null),
1147
1189
  /* @__PURE__ */ Object.create(null),
1148
1190
  /* @__PURE__ */ Object.create(null),
1149
- i,
1191
+ a,
1150
1192
  f,
1151
1193
  c
1152
- ]), !ae)) {
1153
- const g = n.initFocus(setTimeout.bind(I, ht.bind(I, o, bt))), m = n.initReconnect(setTimeout.bind(I, ht.bind(I, o, xt)));
1154
- a = () => {
1194
+ ]), !ie)) {
1195
+ const g = n.initFocus(setTimeout.bind(R, ht.bind(R, o, Nt))), m = n.initReconnect(setTimeout.bind(R, ht.bind(R, o, It)));
1196
+ i = () => {
1155
1197
  g && g(), m && m(), F.delete(e);
1156
1198
  };
1157
1199
  }
1158
1200
  };
1159
1201
  return d(), [
1160
1202
  e,
1161
- i,
1203
+ a,
1162
1204
  d,
1163
- a
1205
+ i
1164
1206
  ];
1165
1207
  }
1166
1208
  return [
1167
1209
  e,
1168
1210
  F.get(e)[4]
1169
1211
  ];
1170
- }, ko = (e, t, n, o, i) => {
1171
- const a = n.errorRetryCount, s = i.retryCount, c = ~~((Math.random() + 0.5) * (1 << (s < 8 ? s : 8))) * n.errorRetryInterval;
1172
- !u(a) && s > a || setTimeout(o, c, i);
1173
- }, So = qe, [St, Eo] = Io(/* @__PURE__ */ new Map()), Co = z(
1212
+ }, Lo = (e, t, n, o, a) => {
1213
+ const i = n.errorRetryCount, s = a.retryCount, c = ~~((Math.random() + 0.5) * (1 << (s < 8 ? s : 8))) * n.errorRetryInterval;
1214
+ !u(i) && s > i || setTimeout(o, c, a);
1215
+ }, $o = $e, [Ct, qo] = Oo(/* @__PURE__ */ new Map()), Do = z(
1174
1216
  {
1175
1217
  // events
1176
1218
  onLoadingSlow: P,
1177
1219
  onSuccess: P,
1178
1220
  onError: P,
1179
- onErrorRetry: ko,
1221
+ onErrorRetry: Lo,
1180
1222
  onDiscarded: P,
1181
1223
  // switches
1182
1224
  revalidateOnFocus: !0,
@@ -1189,24 +1231,24 @@ const ht = (e, t) => {
1189
1231
  dedupingInterval: 2 * 1e3,
1190
1232
  loadingTimeout: ft ? 5e3 : 3e3,
1191
1233
  // providers
1192
- compare: So,
1234
+ compare: $o,
1193
1235
  isPaused: () => !1,
1194
- cache: St,
1195
- mutate: Eo,
1236
+ cache: Ct,
1237
+ mutate: qo,
1196
1238
  fallback: {}
1197
1239
  },
1198
1240
  // use web preset by default
1199
- yo
1200
- ), Lo = (e, t) => {
1241
+ Io
1242
+ ), Ao = (e, t) => {
1201
1243
  const n = z(e, t);
1202
1244
  if (t) {
1203
- const { use: o, fallback: i } = e, { use: a, fallback: s } = t;
1204
- o && a && (n.use = o.concat(a)), i && s && (n.fallback = z(i, s));
1245
+ const { use: o, fallback: a } = e, { use: i, fallback: s } = t;
1246
+ o && i && (n.use = o.concat(i)), a && s && (n.fallback = z(a, s));
1205
1247
  }
1206
1248
  return n;
1207
- }, Oo = Pt({}), qo = "$inf$", Et = ue && window.__SWR_DEVTOOLS_USE__, Do = Et ? window.__SWR_DEVTOOLS_USE__ : [], $o = () => {
1208
- Et && (window.__SWR_DEVTOOLS_REACT__ = Be);
1209
- }, Ao = (e) => j(e[1]) ? [
1249
+ }, Vo = zt({}), Mo = "$inf$", Ot = ue && window.__SWR_DEVTOOLS_USE__, jo = Ot ? window.__SWR_DEVTOOLS_USE__ : [], Wo = () => {
1250
+ Ot && (window.__SWR_DEVTOOLS_REACT__ = Be);
1251
+ }, Bo = (e) => j(e[1]) ? [
1210
1252
  e[0],
1211
1253
  e[1],
1212
1254
  e[2] || {}
@@ -1214,32 +1256,32 @@ const ht = (e, t) => {
1214
1256
  e[0],
1215
1257
  null,
1216
1258
  (e[1] === null ? e[2] : e[1]) || {}
1217
- ], Vo = () => {
1218
- const e = zt(Oo);
1219
- return Pe(() => z(Co, e), [
1259
+ ], Fo = () => {
1260
+ const e = Gt(Vo);
1261
+ return Pe(() => z(Do, e), [
1220
1262
  e
1221
1263
  ]);
1222
- }, Mo = (e) => (t, n, o) => e(t, n && ((...a) => {
1223
- const [s] = Ge(t), [, , , c] = F.get(St);
1224
- if (s.startsWith(qo))
1225
- return n(...a);
1264
+ }, Po = (e) => (t, n, o) => e(t, n && ((...i) => {
1265
+ const [s] = Ge(t), [, , , c] = F.get(Ct);
1266
+ if (s.startsWith(Mo))
1267
+ return n(...i);
1226
1268
  const f = c[s];
1227
- return u(f) ? n(...a) : (delete c[s], f);
1228
- }), o), jo = Do.concat(Mo), Wo = (e) => function(...n) {
1229
- const o = Vo(), [i, a, s] = Ao(n), c = Lo(o, s);
1269
+ return u(f) ? n(...i) : (delete c[s], f);
1270
+ }), o), Uo = jo.concat(Po), zo = (e) => function(...n) {
1271
+ const o = Fo(), [a, i, s] = Bo(n), c = Ao(o, s);
1230
1272
  let f = e;
1231
- const { use: d } = c, g = (d || []).concat(jo);
1273
+ const { use: d } = c, g = (d || []).concat(Uo);
1232
1274
  for (let m = g.length; m--; )
1233
1275
  f = g[m](f);
1234
- return f(i, a || c.fetcher || null, c);
1235
- }, Bo = (e, t, n) => {
1276
+ return f(a, i || c.fetcher || null, c);
1277
+ }, Ho = (e, t, n) => {
1236
1278
  const o = t[e] || (t[e] = []);
1237
1279
  return o.push(n), () => {
1238
- const i = o.indexOf(n);
1239
- i >= 0 && (o[i] = o[o.length - 1], o.pop());
1280
+ const a = o.indexOf(n);
1281
+ a >= 0 && (o[a] = o[o.length - 1], o.pop());
1240
1282
  };
1241
1283
  };
1242
- $o();
1284
+ Wo();
1243
1285
  const Ce = Be.use || // This extra generic is to avoid TypeScript mixing up the generic and JSX sytax
1244
1286
  // and emitting an error.
1245
1287
  // We assume that this is only for the `use(thenable)` case, not `use(context)`.
@@ -1259,40 +1301,40 @@ const Ce = Be.use || // This extra generic is to avoid TypeScript mixing up the
1259
1301
  e.status = "rejected", e.reason = t;
1260
1302
  }), e;
1261
1303
  }
1262
- }), Le = {
1304
+ }), Oe = {
1263
1305
  dedupe: !0
1264
- }, _t = Promise.resolve(I), Fo = (e, t, n) => {
1265
- const { cache: o, compare: i, suspense: a, fallbackData: s, revalidateOnMount: c, revalidateIfStale: f, refreshInterval: d, refreshWhenHidden: g, refreshWhenOffline: m, keepPreviousData: T, strictServerPrefetchWarning: R } = n, [E, O, $, ce] = F.get(o), [l, fe] = Ge(e), J = K(!1), b = K(!1), A = K(l), V = K(t), Y = K(n), p = () => Y.current, Z = () => p().isVisible() && p().isOnline(), [M, ee, H, q] = It(o, l), te = K({}).current, he = u(s) ? u(n.fallback) ? I : n.fallback[l] : s, Xe = (_, v) => {
1306
+ }, _t = Promise.resolve(R), Go = (e, t, n) => {
1307
+ const { cache: o, compare: a, suspense: i, fallbackData: s, revalidateOnMount: c, revalidateIfStale: f, refreshInterval: d, refreshWhenHidden: g, refreshWhenOffline: m, keepPreviousData: b, strictServerPrefetchWarning: I } = n, [E, L, D, ce] = F.get(o), [l, fe] = Ge(e), J = K(!1), T = K(!1), A = K(l), V = K(t), Y = K(n), p = () => Y.current, Z = () => p().isVisible() && p().isOnline(), [M, ee, H, $] = kt(o, l), te = K({}).current, he = u(s) ? u(n.fallback) ? R : n.fallback[l] : s, Xe = (_, v) => {
1266
1308
  for (const y in te) {
1267
1309
  const w = y;
1268
1310
  if (w === "data") {
1269
- if (!i(_[w], v[w]) && (!u(_[w]) || !i(me, v[w])))
1311
+ if (!a(_[w], v[w]) && (!u(_[w]) || !a(me, v[w])))
1270
1312
  return !1;
1271
1313
  } else if (v[w] !== _[w])
1272
1314
  return !1;
1273
1315
  }
1274
1316
  return !0;
1275
1317
  }, Ke = Pe(() => {
1276
- const _ = !l || !t ? !1 : u(c) ? p().isPaused() || a ? !1 : f !== !1 : c, v = (k) => {
1277
- const W = z(k);
1318
+ const _ = !l || !t ? !1 : u(c) ? p().isPaused() || i ? !1 : f !== !1 : c, v = (S) => {
1319
+ const W = z(S);
1278
1320
  return delete W._k, _ ? {
1279
1321
  isValidating: !0,
1280
1322
  isLoading: !0,
1281
1323
  ...W
1282
1324
  } : W;
1283
- }, y = M(), w = q(), D = v(y), oe = y === w ? D : v(w);
1284
- let x = D;
1325
+ }, y = M(), w = $(), q = v(y), oe = y === w ? q : v(w);
1326
+ let x = q;
1285
1327
  return [
1286
1328
  () => {
1287
- const k = v(M());
1288
- return Xe(k, x) ? (x.data = k.data, x.isLoading = k.isLoading, x.isValidating = k.isValidating, x.error = k.error, x) : (x = k, k);
1329
+ const S = v(M());
1330
+ return Xe(S, x) ? (x.data = S.data, x.isLoading = S.isLoading, x.isValidating = S.isValidating, x.error = S.error, x) : (x = S, S);
1289
1331
  },
1290
1332
  () => oe
1291
1333
  ];
1292
1334
  }, [
1293
1335
  o,
1294
1336
  l
1295
- ]), ne = rt.useSyncExternalStore(be(
1337
+ ]), ne = rt.useSyncExternalStore(Te(
1296
1338
  (_) => H(l, (v, y) => {
1297
1339
  Xe(y, v) || _();
1298
1340
  }),
@@ -1301,56 +1343,56 @@ const Ce = Be.use || // This extra generic is to avoid TypeScript mixing up the
1301
1343
  o,
1302
1344
  l
1303
1345
  ]
1304
- ), Ke[0], Ke[1]), Qe = !J.current, Lt = E[l] && E[l].length > 0, re = ne.data, G = u(re) ? he && Rt(he) ? Ce(he) : he : re, _e = ne.error, we = K(G), me = T ? u(re) ? u(we.current) ? G : we.current : re : G, X = l && u(G), Ot = !ae && // eslint-disable-next-line react-hooks/rules-of-hooks
1346
+ ), Ke[0], Ke[1]), Qe = !J.current, $t = E[l] && E[l].length > 0, re = ne.data, G = u(re) ? he && St(he) ? Ce(he) : he : re, _e = ne.error, we = K(G), me = b ? u(re) ? u(we.current) ? G : we.current : re : G, X = l && u(G), qt = !ie && // eslint-disable-next-line react-hooks/rules-of-hooks
1305
1347
  rt.useSyncExternalStore(() => P, () => !1, () => !0);
1306
- R && Ot && !a && X && console.warn(`Missing pre-initiated data for serialized key "${l}" during server-side rendering. Data fethcing should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);
1307
- const Je = Lt && !u(_e) ? !1 : Qe && !u(c) ? c : p().isPaused() ? !1 : a ? u(G) ? !1 : f : u(G) || f, Ye = !!(l && t && Qe && Je), qt = u(ne.isValidating) ? Ye : ne.isValidating, Dt = u(ne.isLoading) ? Ye : ne.isLoading, le = be(
1348
+ I && qt && !i && X && console.warn(`Missing pre-initiated data for serialized key "${l}" during server-side rendering. Data fethcing should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);
1349
+ const Je = $t && !u(_e) ? !1 : Qe && !u(c) ? c : p().isPaused() ? !1 : i ? u(G) ? !1 : f : u(G) || f, Ye = !!(l && t && Qe && Je), Dt = u(ne.isValidating) ? Ye : ne.isValidating, At = u(ne.isLoading) ? Ye : ne.isLoading, le = Te(
1308
1350
  async (_) => {
1309
1351
  const v = V.current;
1310
- if (!l || !v || b.current || p().isPaused())
1352
+ if (!l || !v || T.current || p().isPaused())
1311
1353
  return !1;
1312
- let y, w, D = !0;
1313
- const oe = _ || {}, x = !$[l] || !oe.dedupe, k = () => ut ? !b.current && l === A.current && J.current : l === A.current, W = {
1354
+ let y, w, q = !0;
1355
+ const oe = _ || {}, x = !D[l] || !oe.dedupe, S = () => ut ? !T.current && l === A.current && J.current : l === A.current, W = {
1314
1356
  isValidating: !1,
1315
1357
  isLoading: !1
1316
1358
  }, et = () => {
1317
1359
  ee(W);
1318
1360
  }, tt = () => {
1319
- const L = $[l];
1320
- L && L[1] === w && delete $[l];
1361
+ const O = D[l];
1362
+ O && O[1] === w && delete D[l];
1321
1363
  }, nt = {
1322
1364
  isValidating: !0
1323
1365
  };
1324
1366
  u(M().data) && (nt.isLoading = !0);
1325
1367
  try {
1326
1368
  if (x && (ee(nt), n.loadingTimeout && u(M().data) && setTimeout(() => {
1327
- D && k() && p().onLoadingSlow(l, n);
1328
- }, n.loadingTimeout), $[l] = [
1369
+ q && S() && p().onLoadingSlow(l, n);
1370
+ }, n.loadingTimeout), D[l] = [
1329
1371
  v(fe),
1330
1372
  We()
1331
- ]), [y, w] = $[l], y = await y, x && setTimeout(tt, n.dedupingInterval), !$[l] || $[l][1] !== w)
1332
- return x && k() && p().onDiscarded(l), !1;
1333
- W.error = I;
1334
- const L = O[l];
1335
- if (!u(L) && // case 1
1336
- (w <= L[0] || // case 2
1337
- w <= L[1] || // case 3
1338
- L[1] === 0))
1339
- return et(), x && k() && p().onDiscarded(l), !1;
1373
+ ]), [y, w] = D[l], y = await y, x && setTimeout(tt, n.dedupingInterval), !D[l] || D[l][1] !== w)
1374
+ return x && S() && p().onDiscarded(l), !1;
1375
+ W.error = R;
1376
+ const O = L[l];
1377
+ if (!u(O) && // case 1
1378
+ (w <= O[0] || // case 2
1379
+ w <= O[1] || // case 3
1380
+ O[1] === 0))
1381
+ return et(), x && S() && p().onDiscarded(l), !1;
1340
1382
  const B = M().data;
1341
- W.data = i(B, y) ? B : y, x && k() && p().onSuccess(y, l, n);
1342
- } catch (L) {
1383
+ W.data = a(B, y) ? B : y, x && S() && p().onSuccess(y, l, n);
1384
+ } catch (O) {
1343
1385
  tt();
1344
1386
  const B = p(), { shouldRetryOnError: ye } = B;
1345
- B.isPaused() || (W.error = L, x && k() && (B.onError(L, l, B), (ye === !0 || j(ye) && ye(L)) && (!p().revalidateOnFocus || !p().revalidateOnReconnect || Z()) && B.onErrorRetry(L, l, B, ($t) => {
1346
- const Te = E[l];
1347
- Te && Te[0] && Te[0](lt, $t);
1387
+ B.isPaused() || (W.error = O, x && S() && (B.onError(O, l, B), (ye === !0 || j(ye) && ye(O)) && (!p().revalidateOnFocus || !p().revalidateOnReconnect || Z()) && B.onErrorRetry(O, l, B, (Vt) => {
1388
+ const be = E[l];
1389
+ be && be[0] && be[0](lt, Vt);
1348
1390
  }, {
1349
1391
  retryCount: (oe.retryCount || 0) + 1,
1350
1392
  dedupe: !0
1351
1393
  })));
1352
1394
  }
1353
- return D = !1, et(), !0;
1395
+ return q = !1, et(), !0;
1354
1396
  },
1355
1397
  // `setState` is immutable, and `eventsCallback`, `fnArg`, and
1356
1398
  // `keyValidating` are depending on `key`, so we can exclude them from
@@ -1367,47 +1409,47 @@ const Ce = Be.use || // This extra generic is to avoid TypeScript mixing up the
1367
1409
  l,
1368
1410
  o
1369
1411
  ]
1370
- ), Ze = be(
1412
+ ), Ze = Te(
1371
1413
  // Use callback to make sure `keyRef.current` returns latest result every time
1372
- (..._) => kt(o, A.current, ..._),
1414
+ (..._) => Et(o, A.current, ..._),
1373
1415
  // eslint-disable-next-line react-hooks/exhaustive-deps
1374
1416
  []
1375
1417
  );
1376
- if (ke(() => {
1418
+ if (Se(() => {
1377
1419
  V.current = t, Y.current = n, u(re) || (we.current = re);
1378
- }), ke(() => {
1420
+ }), Se(() => {
1379
1421
  if (!l) return;
1380
- const _ = le.bind(I, Le);
1422
+ const _ = le.bind(R, Oe);
1381
1423
  let v = 0;
1382
1424
  p().revalidateOnFocus && (v = Date.now() + p().focusThrottleInterval);
1383
- const w = Bo(l, E, (D, oe = {}) => {
1384
- if (D == bt) {
1425
+ const w = Ho(l, E, (q, oe = {}) => {
1426
+ if (q == Nt) {
1385
1427
  const x = Date.now();
1386
1428
  p().revalidateOnFocus && x > v && Z() && (v = x + p().focusThrottleInterval, _());
1387
- } else if (D == xt)
1429
+ } else if (q == It)
1388
1430
  p().revalidateOnReconnect && Z() && _();
1389
1431
  else {
1390
- if (D == Nt)
1432
+ if (q == Rt)
1391
1433
  return le();
1392
- if (D == lt)
1434
+ if (q == lt)
1393
1435
  return le(oe);
1394
1436
  }
1395
1437
  });
1396
- return b.current = !1, A.current = l, J.current = !0, ee({
1438
+ return T.current = !1, A.current = l, J.current = !0, ee({
1397
1439
  _k: fe
1398
- }), Je && ($[l] || (u(G) || ae ? _() : bo(_))), () => {
1399
- b.current = !0, w();
1440
+ }), Je && (D[l] || (u(G) || ie ? _() : So(_))), () => {
1441
+ T.current = !0, w();
1400
1442
  };
1401
1443
  }, [
1402
1444
  l
1403
- ]), ke(() => {
1445
+ ]), Se(() => {
1404
1446
  let _;
1405
1447
  function v() {
1406
1448
  const w = j(d) ? d(M().data) : d;
1407
1449
  w && _ !== -1 && (_ = setTimeout(y, w));
1408
1450
  }
1409
1451
  function y() {
1410
- !M().error && (g || p().isVisible()) && (m || p().isOnline()) ? le(Le).then(v) : v();
1452
+ !M().error && (g || p().isVisible()) && (m || p().isOnline()) ? le(Oe).then(v) : v();
1411
1453
  }
1412
1454
  return v(), () => {
1413
1455
  _ && (clearTimeout(_), _ = -1);
@@ -1417,14 +1459,14 @@ const Ce = Be.use || // This extra generic is to avoid TypeScript mixing up the
1417
1459
  g,
1418
1460
  m,
1419
1461
  l
1420
- ]), Ht(me), a) {
1421
- if (!ut && ae && X)
1462
+ ]), Xt(me), i) {
1463
+ if (!ut && ie && X)
1422
1464
  throw new Error("Fallback data is required when using Suspense in SSR.");
1423
- X && (V.current = t, Y.current = n, b.current = !1);
1465
+ X && (V.current = t, Y.current = n, T.current = !1);
1424
1466
  const _ = ce[l], v = !u(_) && X ? Ze(_) : _t;
1425
1467
  if (Ce(v), !u(_e) && X)
1426
1468
  throw _e;
1427
- const y = X ? le(Le) : _t;
1469
+ const y = X ? le(Oe) : _t;
1428
1470
  !u(me) && X && (y.status = "fulfilled", y.value = !0), Ce(y);
1429
1471
  }
1430
1472
  return {
@@ -1436,33 +1478,33 @@ const Ce = Be.use || // This extra generic is to avoid TypeScript mixing up the
1436
1478
  return te.error = !0, _e;
1437
1479
  },
1438
1480
  get isValidating() {
1439
- return te.isValidating = !0, qt;
1481
+ return te.isValidating = !0, Dt;
1440
1482
  },
1441
1483
  get isLoading() {
1442
- return te.isLoading = !0, Dt;
1484
+ return te.isLoading = !0, At;
1443
1485
  }
1444
1486
  };
1445
- }, mt = Wo(Fo);
1446
- class Po extends Error {
1487
+ }, mt = zo(Go);
1488
+ class Xo extends Error {
1447
1489
  constructor({ message: t, status: n, data: o }) {
1448
1490
  super(t), this.name = "TwitterApiError", this.status = n, this.data = o;
1449
1491
  }
1450
1492
  }
1451
- const Uo = mt.default || mt, zo = "https://react-tweet.vercel.app";
1452
- async function Ho([e, t]) {
1493
+ const Ko = mt.default || mt, Qo = "https://react-tweet.vercel.app";
1494
+ async function Jo([e, t]) {
1453
1495
  const n = await fetch(e, t), o = await n.json();
1454
1496
  if (n.ok) return o.data || null;
1455
- throw new Po({
1497
+ throw new Xo({
1456
1498
  message: `Failed to fetch tweet at "${e}" with "${n.status}".`,
1457
1499
  data: o,
1458
1500
  status: n.status
1459
1501
  });
1460
1502
  }
1461
- const Go = (e, t, n) => {
1462
- const { isLoading: o, data: i, error: a } = Uo(() => t || e ? [
1463
- t || e && `${zo}/api/tweet/${e}`,
1503
+ const Yo = (e, t, n) => {
1504
+ const { isLoading: o, data: a, error: i } = Ko(() => t || e ? [
1505
+ t || e && `${Qo}/api/tweet/${e}`,
1464
1506
  n
1465
- ] : null, Ho, {
1507
+ ] : null, Jo, {
1466
1508
  revalidateIfStale: !1,
1467
1509
  revalidateOnFocus: !1,
1468
1510
  shouldRetryOnError: !1
@@ -1470,53 +1512,53 @@ const Go = (e, t, n) => {
1470
1512
  return {
1471
1513
  // If data is `undefined` then it might be the first render where SWR hasn't started doing
1472
1514
  // any work, so we set `isLoading` to `true`.
1473
- isLoading: !!(o || i === void 0 && !a),
1474
- data: i,
1475
- error: a
1515
+ isLoading: !!(o || a === void 0 && !i),
1516
+ data: a,
1517
+ error: i
1476
1518
  };
1477
- }, Xo = ({ id: e, apiUrl: t, fallback: n = /* @__PURE__ */ r(ho, {}), components: o, fetchOptions: i, onError: a }) => {
1478
- const { data: s, error: c, isLoading: f } = Go(e, t, i);
1519
+ }, Zo = ({ id: e, apiUrl: t, fallback: n = /* @__PURE__ */ r(go, {}), components: o, fetchOptions: a, onError: i }) => {
1520
+ const { data: s, error: c, isLoading: f } = Yo(e, t, a);
1479
1521
  if (f) return n;
1480
1522
  if (c || !s) {
1481
- const d = (o == null ? void 0 : o.TweetNotFound) || ao;
1523
+ const d = (o == null ? void 0 : o.TweetNotFound) || ho;
1482
1524
  return /* @__PURE__ */ r(d, {
1483
- error: a ? a(c) : c
1525
+ error: i ? i(c) : c
1484
1526
  });
1485
1527
  }
1486
- return /* @__PURE__ */ r(oo, {
1528
+ return /* @__PURE__ */ r(lo, {
1487
1529
  tweet: s,
1488
1530
  components: o
1489
1531
  });
1490
1532
  };
1491
- function Ko({ node: e }) {
1533
+ function ea({ node: e }) {
1492
1534
  var o;
1493
1535
  const t = ((o = e == null ? void 0 : e.attrs) == null ? void 0 : o.src) || "", n = t == null ? void 0 : t.split("/").pop();
1494
- return n ? /* @__PURE__ */ r(At, { children: /* @__PURE__ */ r("div", { "data-twitter": "", children: /* @__PURE__ */ r(Xo, { id: n }) }) }) : null;
1536
+ return n ? /* @__PURE__ */ r(Mt, { children: /* @__PURE__ */ r("div", { "data-twitter": "", children: /* @__PURE__ */ r(Zo, { id: n }) }) }) : null;
1495
1537
  }
1496
- function Qo(e) {
1497
- const { t } = tn(), [n, o] = se("");
1538
+ function ta(e) {
1539
+ const { t } = Qt(), [n, o] = se("");
1498
1540
  Fe(() => {
1499
- var a;
1541
+ var i;
1500
1542
  if (e != null && e.editor) {
1501
- const { src: s } = (a = e.editor) == null ? void 0 : a.getAttributes(Ct.name);
1543
+ const { src: s } = (i = e.editor) == null ? void 0 : i.getAttributes(Lt.name);
1502
1544
  s && o(s);
1503
1545
  }
1504
1546
  }, [e == null ? void 0 : e.editor]);
1505
- function i(a) {
1506
- a.preventDefault(), a.stopPropagation(), e == null || e.onSetLink(n);
1547
+ function a(i) {
1548
+ i.preventDefault(), i.stopPropagation(), e == null || e.onSetLink(n);
1507
1549
  }
1508
1550
  return /* @__PURE__ */ h(
1509
1551
  "form",
1510
1552
  {
1511
1553
  className: "richtext-flex richtext-flex-col richtext-gap-2",
1512
- onSubmit: i,
1554
+ onSubmit: a,
1513
1555
  children: [
1514
- /* @__PURE__ */ r(en, { className: "mb-[6px]", children: t("editor.link.dialog.text") }),
1556
+ /* @__PURE__ */ r(Jt, { className: "mb-[6px]", children: t("editor.link.dialog.text") }),
1515
1557
  /* @__PURE__ */ r("div", { className: "richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5", children: /* @__PURE__ */ r("div", { className: "richtext-relative richtext-w-full richtext-max-w-sm richtext-items-center", children: /* @__PURE__ */ r(
1516
- Zt,
1558
+ Yt,
1517
1559
  {
1518
1560
  className: "richtext-w-80",
1519
- onChange: (a) => o(a.target.value),
1561
+ onChange: (i) => o(i.target.value),
1520
1562
  placeholder: "Text",
1521
1563
  required: !0,
1522
1564
  type: "text",
@@ -1524,7 +1566,7 @@ function Qo(e) {
1524
1566
  }
1525
1567
  ) }) }),
1526
1568
  /* @__PURE__ */ r(
1527
- Yt,
1569
+ Zt,
1528
1570
  {
1529
1571
  className: "richtext-mt-2 richtext-self-end",
1530
1572
  type: "submit",
@@ -1535,43 +1577,43 @@ function Qo(e) {
1535
1577
  }
1536
1578
  );
1537
1579
  }
1538
- function ui() {
1539
- const [e, t] = se(!1), n = nn(), o = rn(Ct.name), {
1540
- icon: i = void 0,
1541
- tooltip: a = void 0,
1580
+ function pa() {
1581
+ const [e, t] = se(!1), n = en(), o = tn(Lt.name), {
1582
+ icon: a = void 0,
1583
+ tooltip: i = void 0,
1542
1584
  tooltipOptions: s = {},
1543
1585
  action: c = void 0,
1544
1586
  isActive: f = void 0
1545
- } = (o == null ? void 0 : o.componentProps) ?? {}, { editorDisabled: d } = on(f);
1587
+ } = (o == null ? void 0 : o.componentProps) ?? {}, { editorDisabled: d } = nn(f);
1546
1588
  function g(m) {
1547
1589
  d || c && (c(m), t(!1));
1548
1590
  }
1549
1591
  return /* @__PURE__ */ h(
1550
- Kt,
1592
+ rn,
1551
1593
  {
1552
1594
  modal: !0,
1553
1595
  onOpenChange: t,
1554
1596
  open: e,
1555
1597
  children: [
1556
- /* @__PURE__ */ r(Qt, { asChild: !0, children: /* @__PURE__ */ r(
1557
- Gt,
1598
+ /* @__PURE__ */ r(on, { asChild: !0, children: /* @__PURE__ */ r(
1599
+ Kt,
1558
1600
  {
1559
1601
  disabled: d,
1560
1602
  isActive: f,
1561
- tooltip: a,
1603
+ tooltip: i,
1562
1604
  tooltipOptions: s,
1563
- children: /* @__PURE__ */ r(Xt, { name: i })
1605
+ children: /* @__PURE__ */ r(sn, { name: a })
1564
1606
  }
1565
1607
  ) }),
1566
1608
  /* @__PURE__ */ r(
1567
- Jt,
1609
+ an,
1568
1610
  {
1569
1611
  align: "start",
1570
1612
  className: "richtext-w-full",
1571
1613
  hideWhenDetached: !0,
1572
1614
  side: "bottom",
1573
1615
  children: /* @__PURE__ */ r(
1574
- Qo,
1616
+ ta,
1575
1617
  {
1576
1618
  editor: n,
1577
1619
  onSetLink: g
@@ -1583,11 +1625,11 @@ function ui() {
1583
1625
  }
1584
1626
  );
1585
1627
  }
1586
- const Jo = /(https?:\/\/)?(www\.)?x\.com\/(\w{1,15})(\/status\/(\d+))?(\/\S*)?/g, Yo = /^https?:\/\/(www\.)?x\.com\/(\w{1,15})(\/status\/(\d+))?(\/\S*)?$/;
1628
+ const na = /(https?:\/\/)?(www\.)?x\.com\/(\w{1,15})(\/status\/(\d+))?(\/\S*)?/g, ra = /^https?:\/\/(www\.)?x\.com\/(\w{1,15})(\/status\/(\d+))?(\/\S*)?$/;
1587
1629
  function pt(e) {
1588
- return e.match(Yo);
1630
+ return e.match(ra);
1589
1631
  }
1590
- const Ct = /* @__PURE__ */ Vt.create({
1632
+ const Lt = /* @__PURE__ */ jt.create({
1591
1633
  name: "twitter",
1592
1634
  draggable: !0,
1593
1635
  selectable: !0,
@@ -1612,7 +1654,7 @@ const Ct = /* @__PURE__ */ Vt.create({
1612
1654
  };
1613
1655
  },
1614
1656
  addNodeView() {
1615
- return Wt(Ko, { attrs: this.options.HTMLAttributes });
1657
+ return Ft(ea, { attrs: this.options.HTMLAttributes });
1616
1658
  },
1617
1659
  inline() {
1618
1660
  return this.options.inline;
@@ -1645,19 +1687,19 @@ const Ct = /* @__PURE__ */ Vt.create({
1645
1687
  },
1646
1688
  addPasteRules() {
1647
1689
  return this.options.addPasteHandler ? [
1648
- jt({
1649
- find: Jo,
1690
+ Bt({
1691
+ find: na,
1650
1692
  type: this.type,
1651
1693
  getAttributes: (e) => ({ src: e.input })
1652
1694
  })
1653
1695
  ] : [];
1654
1696
  },
1655
1697
  renderHTML({ HTMLAttributes: e }) {
1656
- return ["div", Mt({ "data-twitter": "" }, e)];
1698
+ return ["div", Wt({ "data-twitter": "" }, e)];
1657
1699
  }
1658
1700
  });
1659
1701
  export {
1660
- Qo as F,
1661
- ui as R,
1662
- Ct as T
1702
+ ta as F,
1703
+ pa as R,
1704
+ Lt as T
1663
1705
  };