@monetize.software/sdk-extension 3.0.0-alpha.8 → 3.0.0-alpha.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 (195) hide show
  1. package/dist/chunks/{ar-nh4l4WDE.js → ar-CHae8g-2.js} +4 -3
  2. package/dist/chunks/ar-CHae8g-2.js.map +1 -0
  3. package/dist/chunks/ar-E1mc8SO_.js +2 -0
  4. package/dist/chunks/ar-E1mc8SO_.js.map +1 -0
  5. package/dist/chunks/{chrome-port-PhlW29BV.js → chrome-port-BzNV1ahF.js} +2 -2
  6. package/dist/chunks/{chrome-port-PhlW29BV.js.map → chrome-port-BzNV1ahF.js.map} +1 -1
  7. package/dist/chunks/{chrome-port-CxW3Pwc2.js → chrome-port-rVd4zwU3.js} +21 -21
  8. package/dist/chunks/{chrome-port-CxW3Pwc2.js.map → chrome-port-rVd4zwU3.js.map} +1 -1
  9. package/dist/chunks/cs-Dccq6LAT.js +2 -0
  10. package/dist/chunks/cs-Dccq6LAT.js.map +1 -0
  11. package/dist/chunks/{cs-2UYO2rWf.js → cs-eZTedzaK.js} +2 -1
  12. package/dist/chunks/cs-eZTedzaK.js.map +1 -0
  13. package/dist/chunks/da-C_4MbEh5.js +2 -0
  14. package/dist/chunks/da-C_4MbEh5.js.map +1 -0
  15. package/dist/chunks/{da-BD0O_HfV.js → da-Dca6j8fp.js} +2 -1
  16. package/dist/chunks/da-Dca6j8fp.js.map +1 -0
  17. package/dist/chunks/{de-BkCiXPsn.js → de-BCjn3PUI.js} +3 -1
  18. package/dist/chunks/de-BCjn3PUI.js.map +1 -0
  19. package/dist/chunks/de-DulxcJj-.js +2 -0
  20. package/dist/chunks/de-DulxcJj-.js.map +1 -0
  21. package/dist/chunks/{el-cIcxTp07.js → el-BpXtDTez.js} +2 -1
  22. package/dist/chunks/el-BpXtDTez.js.map +1 -0
  23. package/dist/chunks/el-CVG_1iKB.js +2 -0
  24. package/dist/chunks/el-CVG_1iKB.js.map +1 -0
  25. package/dist/chunks/{es-CJBC_jrV.js → es-B3P4nlMw.js} +3 -1
  26. package/dist/chunks/es-B3P4nlMw.js.map +1 -0
  27. package/dist/chunks/es-ri0uKzUW.js +2 -0
  28. package/dist/chunks/es-ri0uKzUW.js.map +1 -0
  29. package/dist/chunks/{fi-DyV7ynBf.js → fi-BbQ_Bs0Z.js} +2 -1
  30. package/dist/chunks/fi-BbQ_Bs0Z.js.map +1 -0
  31. package/dist/chunks/fi-CNZqWHjw.js +2 -0
  32. package/dist/chunks/fi-CNZqWHjw.js.map +1 -0
  33. package/dist/chunks/{fr-BLQ4AIu7.js → fr-BKDUXceO.js} +3 -1
  34. package/dist/chunks/fr-BKDUXceO.js.map +1 -0
  35. package/dist/chunks/fr-CfFOw4hD.js +2 -0
  36. package/dist/chunks/fr-CfFOw4hD.js.map +1 -0
  37. package/dist/chunks/{he-Bg-Bqi7r.js → he-BVCHlTtT.js} +2 -1
  38. package/dist/chunks/he-BVCHlTtT.js.map +1 -0
  39. package/dist/chunks/he-DN2JEtQb.js +2 -0
  40. package/dist/chunks/he-DN2JEtQb.js.map +1 -0
  41. package/dist/chunks/hi-DxfOerNP.js +2 -0
  42. package/dist/chunks/hi-DxfOerNP.js.map +1 -0
  43. package/dist/chunks/{hi-wQeE43oY.js → hi-H_Hshh-7.js} +4 -3
  44. package/dist/chunks/hi-H_Hshh-7.js.map +1 -0
  45. package/dist/chunks/hu-BTImywuV.js +2 -0
  46. package/dist/chunks/{hu-DXtscQ8_.js.map → hu-BTImywuV.js.map} +1 -1
  47. package/dist/chunks/{hu-D9qxzu0r.js → hu-ZWiNfzvN.js} +2 -1
  48. package/dist/chunks/{hu-D9qxzu0r.js.map → hu-ZWiNfzvN.js.map} +1 -1
  49. package/dist/chunks/{id-Rx_wYvqy.js → id-DeiRYsJ1.js} +2 -1
  50. package/dist/chunks/id-DeiRYsJ1.js.map +1 -0
  51. package/dist/chunks/id-YFuArJA6.js +2 -0
  52. package/dist/chunks/id-YFuArJA6.js.map +1 -0
  53. package/dist/chunks/{it-B1SRPZ3e.js → it-UH9OzFhg.js} +3 -1
  54. package/dist/chunks/it-UH9OzFhg.js.map +1 -0
  55. package/dist/chunks/it-mhkzXBM9.js +2 -0
  56. package/dist/chunks/it-mhkzXBM9.js.map +1 -0
  57. package/dist/chunks/{ja-CMC3Parn.js → ja-6l_z_G9k.js} +2 -2
  58. package/dist/chunks/ja-6l_z_G9k.js.map +1 -0
  59. package/dist/chunks/{ja-DiItm8te.js → ja-BYC8FRN8.js} +3 -1
  60. package/dist/chunks/ja-BYC8FRN8.js.map +1 -0
  61. package/dist/chunks/{ko-CdGFWAKX.js → ko-Bjs2ZRcF.js} +3 -1
  62. package/dist/chunks/ko-Bjs2ZRcF.js.map +1 -0
  63. package/dist/chunks/ko-YAl4XwHu.js +2 -0
  64. package/dist/chunks/ko-YAl4XwHu.js.map +1 -0
  65. package/dist/chunks/nl-C-9zHtfb.js +2 -0
  66. package/dist/chunks/nl-C-9zHtfb.js.map +1 -0
  67. package/dist/chunks/{nl-CmZ3vEvj.js → nl-Ch5HFWQO.js} +3 -1
  68. package/dist/chunks/nl-Ch5HFWQO.js.map +1 -0
  69. package/dist/chunks/{no-BuxByZpq.js → no-CljpinWz.js} +2 -1
  70. package/dist/chunks/no-CljpinWz.js.map +1 -0
  71. package/dist/chunks/no-qzPitLlx.js +2 -0
  72. package/dist/chunks/no-qzPitLlx.js.map +1 -0
  73. package/dist/chunks/{pl-jZFCnDb8.js → pl-CUcSS0zZ.js} +2 -1
  74. package/dist/chunks/pl-CUcSS0zZ.js.map +1 -0
  75. package/dist/chunks/pl-MAIYeuhW.js +2 -0
  76. package/dist/chunks/pl-MAIYeuhW.js.map +1 -0
  77. package/dist/chunks/{pt-Cld7MwIW.js → pt-BHK0LwkC.js} +3 -1
  78. package/dist/chunks/pt-BHK0LwkC.js.map +1 -0
  79. package/dist/chunks/pt-DqDabE4v.js +2 -0
  80. package/dist/chunks/pt-DqDabE4v.js.map +1 -0
  81. package/dist/chunks/ro-BVs-lHH-.js +2 -0
  82. package/dist/chunks/ro-BVs-lHH-.js.map +1 -0
  83. package/dist/chunks/{ro-CuKDqj3C.js → ro-Bj8cwU2n.js} +2 -1
  84. package/dist/chunks/ro-Bj8cwU2n.js.map +1 -0
  85. package/dist/chunks/{ru-B7cjqJUm.js → ru-CgqNy0Gb.js} +10 -1
  86. package/dist/chunks/ru-CgqNy0Gb.js.map +1 -0
  87. package/dist/chunks/ru-DP7qDAmE.js +2 -0
  88. package/dist/chunks/ru-DP7qDAmE.js.map +1 -0
  89. package/dist/chunks/sv-B3QEYGgd.js +2 -0
  90. package/dist/chunks/sv-B3QEYGgd.js.map +1 -0
  91. package/dist/chunks/{sv-D9y-M1Fo.js → sv-H7jroOQ5.js} +2 -1
  92. package/dist/chunks/sv-H7jroOQ5.js.map +1 -0
  93. package/dist/chunks/{th-D9umBjEy.js → th-Dqm-gpGe.js} +2 -1
  94. package/dist/chunks/th-Dqm-gpGe.js.map +1 -0
  95. package/dist/chunks/th-DzQau9aW.js +2 -0
  96. package/dist/chunks/th-DzQau9aW.js.map +1 -0
  97. package/dist/chunks/{tr-BddMywiw.js → tr-D3zPcNtT.js} +2 -1
  98. package/dist/chunks/tr-D3zPcNtT.js.map +1 -0
  99. package/dist/chunks/tr-cG1YuE1E.js +2 -0
  100. package/dist/chunks/tr-cG1YuE1E.js.map +1 -0
  101. package/dist/chunks/{uk-Dbd31hFt.js → uk-CoIIs3QI.js} +10 -1
  102. package/dist/chunks/uk-CoIIs3QI.js.map +1 -0
  103. package/dist/chunks/uk-Cvbo0IBW.js +2 -0
  104. package/dist/chunks/uk-Cvbo0IBW.js.map +1 -0
  105. package/dist/chunks/vi-BRtYSBUp.js +2 -0
  106. package/dist/chunks/{vi-CJefLP_g.js.map → vi-BRtYSBUp.js.map} +1 -1
  107. package/dist/chunks/{vi-Do3BMOdh.js → vi-C_fruIbh.js} +2 -1
  108. package/dist/chunks/{vi-Do3BMOdh.js.map → vi-C_fruIbh.js.map} +1 -1
  109. package/dist/chunks/zh-CwczPMPp.js +2 -0
  110. package/dist/chunks/zh-CwczPMPp.js.map +1 -0
  111. package/dist/chunks/{zh-gQSYLZI3.js → zh-LDkEV2D9.js} +3 -1
  112. package/dist/chunks/zh-LDkEV2D9.js.map +1 -0
  113. package/dist/content.cjs +3 -3
  114. package/dist/content.cjs.map +1 -1
  115. package/dist/content.js +777 -813
  116. package/dist/content.js.map +1 -1
  117. package/dist/offscreen.cjs +1 -1
  118. package/dist/offscreen.js +1 -1
  119. package/package.json +3 -3
  120. package/dist/chunks/ar-BUQInJ5a.js +0 -2
  121. package/dist/chunks/ar-BUQInJ5a.js.map +0 -1
  122. package/dist/chunks/ar-nh4l4WDE.js.map +0 -1
  123. package/dist/chunks/cs-2UYO2rWf.js.map +0 -1
  124. package/dist/chunks/cs-i5K4KTFV.js +0 -2
  125. package/dist/chunks/cs-i5K4KTFV.js.map +0 -1
  126. package/dist/chunks/da-BD0O_HfV.js.map +0 -1
  127. package/dist/chunks/da-CZbhtVJO.js +0 -2
  128. package/dist/chunks/da-CZbhtVJO.js.map +0 -1
  129. package/dist/chunks/de-Bc-GoLgC.js +0 -2
  130. package/dist/chunks/de-Bc-GoLgC.js.map +0 -1
  131. package/dist/chunks/de-BkCiXPsn.js.map +0 -1
  132. package/dist/chunks/el-CcMEbl_F.js +0 -2
  133. package/dist/chunks/el-CcMEbl_F.js.map +0 -1
  134. package/dist/chunks/el-cIcxTp07.js.map +0 -1
  135. package/dist/chunks/es-BvYmomAz.js +0 -2
  136. package/dist/chunks/es-BvYmomAz.js.map +0 -1
  137. package/dist/chunks/es-CJBC_jrV.js.map +0 -1
  138. package/dist/chunks/fi-DyV7ynBf.js.map +0 -1
  139. package/dist/chunks/fi-aZR-qmZN.js +0 -2
  140. package/dist/chunks/fi-aZR-qmZN.js.map +0 -1
  141. package/dist/chunks/fr-BLQ4AIu7.js.map +0 -1
  142. package/dist/chunks/fr-BgbFAgHx.js +0 -2
  143. package/dist/chunks/fr-BgbFAgHx.js.map +0 -1
  144. package/dist/chunks/he-Bg-Bqi7r.js.map +0 -1
  145. package/dist/chunks/he-CQ4yCuja.js +0 -2
  146. package/dist/chunks/he-CQ4yCuja.js.map +0 -1
  147. package/dist/chunks/hi-DtUsj1c-.js +0 -2
  148. package/dist/chunks/hi-DtUsj1c-.js.map +0 -1
  149. package/dist/chunks/hi-wQeE43oY.js.map +0 -1
  150. package/dist/chunks/hu-DXtscQ8_.js +0 -2
  151. package/dist/chunks/id-BByOYpeo.js +0 -2
  152. package/dist/chunks/id-BByOYpeo.js.map +0 -1
  153. package/dist/chunks/id-Rx_wYvqy.js.map +0 -1
  154. package/dist/chunks/it-52Ip42pa.js +0 -2
  155. package/dist/chunks/it-52Ip42pa.js.map +0 -1
  156. package/dist/chunks/it-B1SRPZ3e.js.map +0 -1
  157. package/dist/chunks/ja-CMC3Parn.js.map +0 -1
  158. package/dist/chunks/ja-DiItm8te.js.map +0 -1
  159. package/dist/chunks/ko-3qY21q40.js +0 -2
  160. package/dist/chunks/ko-3qY21q40.js.map +0 -1
  161. package/dist/chunks/ko-CdGFWAKX.js.map +0 -1
  162. package/dist/chunks/nl-Borc5nw1.js +0 -2
  163. package/dist/chunks/nl-Borc5nw1.js.map +0 -1
  164. package/dist/chunks/nl-CmZ3vEvj.js.map +0 -1
  165. package/dist/chunks/no-BuxByZpq.js.map +0 -1
  166. package/dist/chunks/no-Do2iGedg.js +0 -2
  167. package/dist/chunks/no-Do2iGedg.js.map +0 -1
  168. package/dist/chunks/pl-jZFCnDb8.js.map +0 -1
  169. package/dist/chunks/pl-mRaky_7k.js +0 -2
  170. package/dist/chunks/pl-mRaky_7k.js.map +0 -1
  171. package/dist/chunks/pt-Cld7MwIW.js.map +0 -1
  172. package/dist/chunks/pt-DilDTXfs.js +0 -2
  173. package/dist/chunks/pt-DilDTXfs.js.map +0 -1
  174. package/dist/chunks/ro-CuKDqj3C.js.map +0 -1
  175. package/dist/chunks/ro-DF2uzPIB.js +0 -2
  176. package/dist/chunks/ro-DF2uzPIB.js.map +0 -1
  177. package/dist/chunks/ru-B7cjqJUm.js.map +0 -1
  178. package/dist/chunks/ru-YeaXnTO-.js +0 -2
  179. package/dist/chunks/ru-YeaXnTO-.js.map +0 -1
  180. package/dist/chunks/sv-2pHEvuSe.js +0 -2
  181. package/dist/chunks/sv-2pHEvuSe.js.map +0 -1
  182. package/dist/chunks/sv-D9y-M1Fo.js.map +0 -1
  183. package/dist/chunks/th-D9umBjEy.js.map +0 -1
  184. package/dist/chunks/th-u2QSDF0G.js +0 -2
  185. package/dist/chunks/th-u2QSDF0G.js.map +0 -1
  186. package/dist/chunks/tr-BddMywiw.js.map +0 -1
  187. package/dist/chunks/tr-Bhgm6_ti.js +0 -2
  188. package/dist/chunks/tr-Bhgm6_ti.js.map +0 -1
  189. package/dist/chunks/uk-7vwqsaVK.js +0 -2
  190. package/dist/chunks/uk-7vwqsaVK.js.map +0 -1
  191. package/dist/chunks/uk-Dbd31hFt.js.map +0 -1
  192. package/dist/chunks/vi-CJefLP_g.js +0 -2
  193. package/dist/chunks/zh-D5C3BzYL.js +0 -2
  194. package/dist/chunks/zh-D5C3BzYL.js.map +0 -1
  195. package/dist/chunks/zh-gQSYLZI3.js.map +0 -1
package/dist/content.js CHANGED
@@ -1,16 +1,16 @@
1
- import { P as j, B as Re, E as ze, c as De, A as ue, w as qe, a as K, r as Ne, b as Fe } from "./chunks/chrome-port-CxW3Pwc2.js";
2
- import { render as X, h as de, createContext as Ve } from "preact";
3
- import { jsx as o, jsxs as c, Fragment as Y } from "preact/jsx-runtime";
4
- import { useState as x, useEffect as T, useContext as $e, useRef as z, useMemo as _e, useLayoutEffect as He } from "preact/hooks";
5
- import { P as Ge } from "./chunks/port-name-BPfQKtdb.js";
6
- const Se = '@layer theme,base,components,utilities;@layer theme{@theme default{ --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif; --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --color-red-50: oklch(97.1% .013 17.38); --color-red-100: oklch(93.6% .032 17.717); --color-red-200: oklch(88.5% .062 18.334); --color-red-300: oklch(80.8% .114 19.571); --color-red-400: oklch(70.4% .191 22.216); --color-red-500: oklch(63.7% .237 25.331); --color-red-600: oklch(57.7% .245 27.325); --color-red-700: oklch(50.5% .213 27.518); --color-red-800: oklch(44.4% .177 26.899); --color-red-900: oklch(39.6% .141 25.723); --color-red-950: oklch(25.8% .092 26.042); --color-orange-50: oklch(98% .016 73.684); --color-orange-100: oklch(95.4% .038 75.164); --color-orange-200: oklch(90.1% .076 70.697); --color-orange-300: oklch(83.7% .128 66.29); --color-orange-400: oklch(75% .183 55.934); --color-orange-500: oklch(70.5% .213 47.604); --color-orange-600: oklch(64.6% .222 41.116); --color-orange-700: oklch(55.3% .195 38.402); --color-orange-800: oklch(47% .157 37.304); --color-orange-900: oklch(40.8% .123 38.172); --color-orange-950: oklch(26.6% .079 36.259); --color-amber-50: oklch(98.7% .022 95.277); --color-amber-100: oklch(96.2% .059 95.617); --color-amber-200: oklch(92.4% .12 95.746); --color-amber-300: oklch(87.9% .169 91.605); --color-amber-400: oklch(82.8% .189 84.429); --color-amber-500: oklch(76.9% .188 70.08); --color-amber-600: oklch(66.6% .179 58.318); --color-amber-700: oklch(55.5% .163 48.998); --color-amber-800: oklch(47.3% .137 46.201); --color-amber-900: oklch(41.4% .112 45.904); --color-amber-950: oklch(27.9% .077 45.635); --color-yellow-50: oklch(98.7% .026 102.212); --color-yellow-100: oklch(97.3% .071 103.193); --color-yellow-200: oklch(94.5% .129 101.54); --color-yellow-300: oklch(90.5% .182 98.111); --color-yellow-400: oklch(85.2% .199 91.936); --color-yellow-500: oklch(79.5% .184 86.047); --color-yellow-600: oklch(68.1% .162 75.834); --color-yellow-700: oklch(55.4% .135 66.442); --color-yellow-800: oklch(47.6% .114 61.907); --color-yellow-900: oklch(42.1% .095 57.708); --color-yellow-950: oklch(28.6% .066 53.813); --color-lime-50: oklch(98.6% .031 120.757); --color-lime-100: oklch(96.7% .067 122.328); --color-lime-200: oklch(93.8% .127 124.321); --color-lime-300: oklch(89.7% .196 126.665); --color-lime-400: oklch(84.1% .238 128.85); --color-lime-500: oklch(76.8% .233 130.85); --color-lime-600: oklch(64.8% .2 131.684); --color-lime-700: oklch(53.2% .157 131.589); --color-lime-800: oklch(45.3% .124 130.933); --color-lime-900: oklch(40.5% .101 131.063); --color-lime-950: oklch(27.4% .072 132.109); --color-green-50: oklch(98.2% .018 155.826); --color-green-100: oklch(96.2% .044 156.743); --color-green-200: oklch(92.5% .084 155.995); --color-green-300: oklch(87.1% .15 154.449); --color-green-400: oklch(79.2% .209 151.711); --color-green-500: oklch(72.3% .219 149.579); --color-green-600: oklch(62.7% .194 149.214); --color-green-700: oklch(52.7% .154 150.069); --color-green-800: oklch(44.8% .119 151.328); --color-green-900: oklch(39.3% .095 152.535); --color-green-950: oklch(26.6% .065 152.934); --color-emerald-50: oklch(97.9% .021 166.113); --color-emerald-100: oklch(95% .052 163.051); --color-emerald-200: oklch(90.5% .093 164.15); --color-emerald-300: oklch(84.5% .143 164.978); --color-emerald-400: oklch(76.5% .177 163.223); --color-emerald-500: oklch(69.6% .17 162.48); --color-emerald-600: oklch(59.6% .145 163.225); --color-emerald-700: oklch(50.8% .118 165.612); --color-emerald-800: oklch(43.2% .095 166.913); --color-emerald-900: oklch(37.8% .077 168.94); --color-emerald-950: oklch(26.2% .051 172.552); --color-teal-50: oklch(98.4% .014 180.72); --color-teal-100: oklch(95.3% .051 180.801); --color-teal-200: oklch(91% .096 180.426); --color-teal-300: oklch(85.5% .138 181.071); --color-teal-400: oklch(77.7% .152 181.912); --color-teal-500: oklch(70.4% .14 182.503); --color-teal-600: oklch(60% .118 184.704); --color-teal-700: oklch(51.1% .096 186.391); --color-teal-800: oklch(43.7% .078 188.216); --color-teal-900: oklch(38.6% .063 188.416); --color-teal-950: oklch(27.7% .046 192.524); --color-cyan-50: oklch(98.4% .019 200.873); --color-cyan-100: oklch(95.6% .045 203.388); --color-cyan-200: oklch(91.7% .08 205.041); --color-cyan-300: oklch(86.5% .127 207.078); --color-cyan-400: oklch(78.9% .154 211.53); --color-cyan-500: oklch(71.5% .143 215.221); --color-cyan-600: oklch(60.9% .126 221.723); --color-cyan-700: oklch(52% .105 223.128); --color-cyan-800: oklch(45% .085 224.283); --color-cyan-900: oklch(39.8% .07 227.392); --color-cyan-950: oklch(30.2% .056 229.695); --color-sky-50: oklch(97.7% .013 236.62); --color-sky-100: oklch(95.1% .026 236.824); --color-sky-200: oklch(90.1% .058 230.902); --color-sky-300: oklch(82.8% .111 230.318); --color-sky-400: oklch(74.6% .16 232.661); --color-sky-500: oklch(68.5% .169 237.323); --color-sky-600: oklch(58.8% .158 241.966); --color-sky-700: oklch(50% .134 242.749); --color-sky-800: oklch(44.3% .11 240.79); --color-sky-900: oklch(39.1% .09 240.876); --color-sky-950: oklch(29.3% .066 243.157); --color-blue-50: oklch(97% .014 254.604); --color-blue-100: oklch(93.2% .032 255.585); --color-blue-200: oklch(88.2% .059 254.128); --color-blue-300: oklch(80.9% .105 251.813); --color-blue-400: oklch(70.7% .165 254.624); --color-blue-500: oklch(62.3% .214 259.815); --color-blue-600: oklch(54.6% .245 262.881); --color-blue-700: oklch(48.8% .243 264.376); --color-blue-800: oklch(42.4% .199 265.638); --color-blue-900: oklch(37.9% .146 265.522); --color-blue-950: oklch(28.2% .091 267.935); --color-indigo-50: oklch(96.2% .018 272.314); --color-indigo-100: oklch(93% .034 272.788); --color-indigo-200: oklch(87% .065 274.039); --color-indigo-300: oklch(78.5% .115 274.713); --color-indigo-400: oklch(67.3% .182 276.935); --color-indigo-500: oklch(58.5% .233 277.117); --color-indigo-600: oklch(51.1% .262 276.966); --color-indigo-700: oklch(45.7% .24 277.023); --color-indigo-800: oklch(39.8% .195 277.366); --color-indigo-900: oklch(35.9% .144 278.697); --color-indigo-950: oklch(25.7% .09 281.288); --color-violet-50: oklch(96.9% .016 293.756); --color-violet-100: oklch(94.3% .029 294.588); --color-violet-200: oklch(89.4% .057 293.283); --color-violet-300: oklch(81.1% .111 293.571); --color-violet-400: oklch(70.2% .183 293.541); --color-violet-500: oklch(60.6% .25 292.717); --color-violet-600: oklch(54.1% .281 293.009); --color-violet-700: oklch(49.1% .27 292.581); --color-violet-800: oklch(43.2% .232 292.759); --color-violet-900: oklch(38% .189 293.745); --color-violet-950: oklch(28.3% .141 291.089); --color-purple-50: oklch(97.7% .014 308.299); --color-purple-100: oklch(94.6% .033 307.174); --color-purple-200: oklch(90.2% .063 306.703); --color-purple-300: oklch(82.7% .119 306.383); --color-purple-400: oklch(71.4% .203 305.504); --color-purple-500: oklch(62.7% .265 303.9); --color-purple-600: oklch(55.8% .288 302.321); --color-purple-700: oklch(49.6% .265 301.924); --color-purple-800: oklch(43.8% .218 303.724); --color-purple-900: oklch(38.1% .176 304.987); --color-purple-950: oklch(29.1% .149 302.717); --color-fuchsia-50: oklch(97.7% .017 320.058); --color-fuchsia-100: oklch(95.2% .037 318.852); --color-fuchsia-200: oklch(90.3% .076 319.62); --color-fuchsia-300: oklch(83.3% .145 321.434); --color-fuchsia-400: oklch(74% .238 322.16); --color-fuchsia-500: oklch(66.7% .295 322.15); --color-fuchsia-600: oklch(59.1% .293 322.896); --color-fuchsia-700: oklch(51.8% .253 323.949); --color-fuchsia-800: oklch(45.2% .211 324.591); --color-fuchsia-900: oklch(40.1% .17 325.612); --color-fuchsia-950: oklch(29.3% .136 325.661); --color-pink-50: oklch(97.1% .014 343.198); --color-pink-100: oklch(94.8% .028 342.258); --color-pink-200: oklch(89.9% .061 343.231); --color-pink-300: oklch(82.3% .12 346.018); --color-pink-400: oklch(71.8% .202 349.761); --color-pink-500: oklch(65.6% .241 354.308); --color-pink-600: oklch(59.2% .249 .584); --color-pink-700: oklch(52.5% .223 3.958); --color-pink-800: oklch(45.9% .187 3.815); --color-pink-900: oklch(40.8% .153 2.432); --color-pink-950: oklch(28.4% .109 3.907); --color-rose-50: oklch(96.9% .015 12.422); --color-rose-100: oklch(94.1% .03 12.58); --color-rose-200: oklch(89.2% .058 10.001); --color-rose-300: oklch(81% .117 11.638); --color-rose-400: oklch(71.2% .194 13.428); --color-rose-500: oklch(64.5% .246 16.439); --color-rose-600: oklch(58.6% .253 17.585); --color-rose-700: oklch(51.4% .222 16.935); --color-rose-800: oklch(45.5% .188 13.697); --color-rose-900: oklch(41% .159 10.272); --color-rose-950: oklch(27.1% .105 12.094); --color-slate-50: oklch(98.4% .003 247.858); --color-slate-100: oklch(96.8% .007 247.896); --color-slate-200: oklch(92.9% .013 255.508); --color-slate-300: oklch(86.9% .022 252.894); --color-slate-400: oklch(70.4% .04 256.788); --color-slate-500: oklch(55.4% .046 257.417); --color-slate-600: oklch(44.6% .043 257.281); --color-slate-700: oklch(37.2% .044 257.287); --color-slate-800: oklch(27.9% .041 260.031); --color-slate-900: oklch(20.8% .042 265.755); --color-slate-950: oklch(12.9% .042 264.695); --color-gray-50: oklch(98.5% .002 247.839); --color-gray-100: oklch(96.7% .003 264.542); --color-gray-200: oklch(92.8% .006 264.531); --color-gray-300: oklch(87.2% .01 258.338); --color-gray-400: oklch(70.7% .022 261.325); --color-gray-500: oklch(55.1% .027 264.364); --color-gray-600: oklch(44.6% .03 256.802); --color-gray-700: oklch(37.3% .034 259.733); --color-gray-800: oklch(27.8% .033 256.848); --color-gray-900: oklch(21% .034 264.665); --color-gray-950: oklch(13% .028 261.692); --color-zinc-50: oklch(98.5% 0 0); --color-zinc-100: oklch(96.7% .001 286.375); --color-zinc-200: oklch(92% .004 286.32); --color-zinc-300: oklch(87.1% .006 286.286); --color-zinc-400: oklch(70.5% .015 286.067); --color-zinc-500: oklch(55.2% .016 285.938); --color-zinc-600: oklch(44.2% .017 285.786); --color-zinc-700: oklch(37% .013 285.805); --color-zinc-800: oklch(27.4% .006 286.033); --color-zinc-900: oklch(21% .006 285.885); --color-zinc-950: oklch(14.1% .005 285.823); --color-neutral-50: oklch(98.5% 0 0); --color-neutral-100: oklch(97% 0 0); --color-neutral-200: oklch(92.2% 0 0); --color-neutral-300: oklch(87% 0 0); --color-neutral-400: oklch(70.8% 0 0); --color-neutral-500: oklch(55.6% 0 0); --color-neutral-600: oklch(43.9% 0 0); --color-neutral-700: oklch(37.1% 0 0); --color-neutral-800: oklch(26.9% 0 0); --color-neutral-900: oklch(20.5% 0 0); --color-neutral-950: oklch(14.5% 0 0); --color-stone-50: oklch(98.5% .001 106.423); --color-stone-100: oklch(97% .001 106.424); --color-stone-200: oklch(92.3% .003 48.717); --color-stone-300: oklch(86.9% .005 56.366); --color-stone-400: oklch(70.9% .01 56.259); --color-stone-500: oklch(55.3% .013 58.071); --color-stone-600: oklch(44.4% .011 73.639); --color-stone-700: oklch(37.4% .01 67.558); --color-stone-800: oklch(26.8% .007 34.298); --color-stone-900: oklch(21.6% .006 56.043); --color-stone-950: oklch(14.7% .004 49.25); --color-mauve-50: oklch(98.5% 0 0); --color-mauve-100: oklch(96% .003 325.6); --color-mauve-200: oklch(92.2% .005 325.62); --color-mauve-300: oklch(86.5% .012 325.68); --color-mauve-400: oklch(71.1% .019 323.02); --color-mauve-500: oklch(54.2% .034 322.5); --color-mauve-600: oklch(43.5% .029 321.78); --color-mauve-700: oklch(36.4% .029 323.89); --color-mauve-800: oklch(26.3% .024 320.12); --color-mauve-900: oklch(21.2% .019 322.12); --color-mauve-950: oklch(14.5% .008 326); --color-olive-50: oklch(98.8% .003 106.5); --color-olive-100: oklch(96.6% .005 106.5); --color-olive-200: oklch(93% .007 106.5); --color-olive-300: oklch(88% .011 106.6); --color-olive-400: oklch(73.7% .021 106.9); --color-olive-500: oklch(58% .031 107.3); --color-olive-600: oklch(46.6% .025 107.3); --color-olive-700: oklch(39.4% .023 107.4); --color-olive-800: oklch(28.6% .016 107.4); --color-olive-900: oklch(22.8% .013 107.4); --color-olive-950: oklch(15.3% .006 107.1); --color-mist-50: oklch(98.7% .002 197.1); --color-mist-100: oklch(96.3% .002 197.1); --color-mist-200: oklch(92.5% .005 214.3); --color-mist-300: oklch(87.2% .007 219.6); --color-mist-400: oklch(72.3% .014 214.4); --color-mist-500: oklch(56% .021 213.5); --color-mist-600: oklch(45% .017 213.2); --color-mist-700: oklch(37.8% .015 216); --color-mist-800: oklch(27.5% .011 216.9); --color-mist-900: oklch(21.8% .008 223.9); --color-mist-950: oklch(14.8% .004 228.8); --color-taupe-50: oklch(98.6% .002 67.8); --color-taupe-100: oklch(96% .002 17.2); --color-taupe-200: oklch(92.2% .005 34.3); --color-taupe-300: oklch(86.8% .007 39.5); --color-taupe-400: oklch(71.4% .014 41.2); --color-taupe-500: oklch(54.7% .021 43.1); --color-taupe-600: oklch(43.8% .017 39.3); --color-taupe-700: oklch(36.7% .016 35.7); --color-taupe-800: oklch(26.8% .011 36.5); --color-taupe-900: oklch(21.4% .009 43.1); --color-taupe-950: oklch(14.7% .004 49.3); --color-black: #000; --color-white: #fff; --spacing: .25rem; --breakpoint-sm: 40rem; --breakpoint-md: 48rem; --breakpoint-lg: 64rem; --breakpoint-xl: 80rem; --breakpoint-2xl: 96rem; --container-3xs: 16rem; --container-2xs: 18rem; --container-xs: 20rem; --container-sm: 24rem; --container-md: 28rem; --container-lg: 32rem; --container-xl: 36rem; --container-2xl: 42rem; --container-3xl: 48rem; --container-4xl: 56rem; --container-5xl: 64rem; --container-6xl: 72rem; --container-7xl: 80rem; --text-xs: .75rem; --text-xs--line-height: calc(1 / .75); --text-sm: .875rem; --text-sm--line-height: calc(1.25 / .875); --text-base: 1rem; --text-base--line-height: 1.5 ; --text-lg: 1.125rem; --text-lg--line-height: calc(1.75 / 1.125); --text-xl: 1.25rem; --text-xl--line-height: calc(1.75 / 1.25); --text-2xl: 1.5rem; --text-2xl--line-height: calc(2 / 1.5); --text-3xl: 1.875rem; --text-3xl--line-height: 1.2 ; --text-4xl: 2.25rem; --text-4xl--line-height: calc(2.5 / 2.25); --text-5xl: 3rem; --text-5xl--line-height: 1; --text-6xl: 3.75rem; --text-6xl--line-height: 1; --text-7xl: 4.5rem; --text-7xl--line-height: 1; --text-8xl: 6rem; --text-8xl--line-height: 1; --text-9xl: 8rem; --text-9xl--line-height: 1; --font-weight-thin: 100; --font-weight-extralight: 200; --font-weight-light: 300; --font-weight-normal: 400; --font-weight-medium: 500; --font-weight-semibold: 600; --font-weight-bold: 700; --font-weight-extrabold: 800; --font-weight-black: 900; --tracking-tighter: -.05em; --tracking-tight: -.025em; --tracking-normal: 0em; --tracking-wide: .025em; --tracking-wider: .05em; --tracking-widest: .1em; --leading-tight: 1.25; --leading-snug: 1.375; --leading-normal: 1.5; --leading-relaxed: 1.625; --leading-loose: 2; --radius-xs: .125rem; --radius-sm: .25rem; --radius-md: .375rem; --radius-lg: .5rem; --radius-xl: .75rem; --radius-2xl: 1rem; --radius-3xl: 1.5rem; --radius-4xl: 2rem; --shadow-2xs: 0 1px rgb(0 0 0 / .05); --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / .05); --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1); --shadow-md: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1); --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1); --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1); --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / .25); --inset-shadow-2xs: inset 0 1px rgb(0 0 0 / .05); --inset-shadow-xs: inset 0 1px 1px rgb(0 0 0 / .05); --inset-shadow-sm: inset 0 2px 4px rgb(0 0 0 / .05); --drop-shadow-xs: 0 1px 1px rgb(0 0 0 / .05); --drop-shadow-sm: 0 1px 2px rgb(0 0 0 / .15); --drop-shadow-md: 0 3px 3px rgb(0 0 0 / .12); --drop-shadow-lg: 0 4px 4px rgb(0 0 0 / .15); --drop-shadow-xl: 0 9px 7px rgb(0 0 0 / .1); --drop-shadow-2xl: 0 25px 25px rgb(0 0 0 / .15); --text-shadow-2xs: 0px 1px 0px rgb(0 0 0 / .15); --text-shadow-xs: 0px 1px 1px rgb(0 0 0 / .2); --text-shadow-sm: 0px 1px 0px rgb(0 0 0 / .075), 0px 1px 1px rgb(0 0 0 / .075), 0px 2px 2px rgb(0 0 0 / .075); --text-shadow-md: 0px 1px 1px rgb(0 0 0 / .1), 0px 1px 2px rgb(0 0 0 / .1), 0px 2px 4px rgb(0 0 0 / .1); --text-shadow-lg: 0px 1px 2px rgb(0 0 0 / .1), 0px 3px 2px rgb(0 0 0 / .1), 0px 4px 8px rgb(0 0 0 / .1); --ease-in: cubic-bezier(.4, 0, 1, 1); --ease-out: cubic-bezier(0, 0, .2, 1); --ease-in-out: cubic-bezier(.4, 0, .2, 1); --animate-spin: spin 1s linear infinite; --animate-ping: ping 1s cubic-bezier(0, 0, .2, 1) infinite; --animate-pulse: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite; --animate-bounce: bounce 1s infinite; @keyframes spin { to { transform: rotate(360deg); } } @keyframes ping { 75%, 100% { transform: scale(2); opacity: 0; } } @keyframes pulse { 50% { opacity: .5; } } @keyframes bounce { 0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(.8, 0, 1, 1); } 50% { transform: none; animation-timing-function: cubic-bezier(0, 0, .2, 1); } } --blur-xs: 4px; --blur-sm: 8px; --blur-md: 12px; --blur-lg: 16px; --blur-xl: 24px; --blur-2xl: 40px; --blur-3xl: 64px; --perspective-dramatic: 100px; --perspective-near: 300px; --perspective-normal: 500px; --perspective-midrange: 800px; --perspective-distant: 1200px; --aspect-video: 16 / 9; --default-transition-duration: .15s; --default-transition-timing-function: cubic-bezier(.4, 0, .2, 1); --default-font-family: --theme(--font-sans, initial); --default-font-feature-settings: --theme( --font-sans--font-feature-settings, initial ); --default-font-variation-settings: --theme( --font-sans--font-variation-settings, initial ); --default-mono-font-family: --theme(--font-mono, initial); --default-mono-font-feature-settings: --theme( --font-mono--font-feature-settings, initial ); --default-mono-font-variation-settings: --theme( --font-mono--font-variation-settings, initial ); }@theme default inline reference{ --blur: 8px; --shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1); --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / .05); --drop-shadow: 0 1px 2px rgb(0 0 0 / .1), 0 1px 1px rgb(0 0 0 / .06); --radius: .25rem; --max-width-prose: 65ch; }}@layer base{*,:after,:before,::backdrop,::file-selector-button{box-sizing:border-box;margin:0;padding:0;border:0 solid}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;tab-size:4;font-family:--theme(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:--theme(--default-font-feature-settings,normal);font-variation-settings:--theme(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:--theme(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:--theme(--default-mono-font-feature-settings,normal);font-variation-settings:--theme(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea,::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]),::file-selector-button{appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{@tailwind utilities;}@source "../**/*.{ts,tsx,js,jsx}";@layer base{:host{all:initial;color-scheme:light;font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}*,*:before,*:after{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*,*:before,*:after{box-sizing:border-box}button{font-family:inherit;cursor:pointer}button:disabled{cursor:not-allowed}[role=button],[role=radio]{cursor:pointer}}.pw-cta-shimmer:before{content:"";position:absolute;top:0;left:-100%;width:100%;height:100%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.35) 50%,transparent);animation:pw-cta-shimmer 3s infinite;z-index:1}@keyframes pw-cta-shimmer{0%{left:-100%}to{left:100%}}';
7
- let he = !1;
8
- function We() {
9
- if (he || (he = !0, typeof CSS > "u" || typeof CSS.registerProperty != "function")) return;
1
+ import { P as B, B as Ue, E as je, c as Re, A as le, w as ze, a as K, r as De, b as qe } from "./chunks/chrome-port-rVd4zwU3.js";
2
+ import { render as X, h as ce, createContext as Ne } from "preact";
3
+ import { jsx as o, jsxs as u, Fragment as oe } from "preact/jsx-runtime";
4
+ import { useState as x, useEffect as O, useContext as Fe, useRef as z, useMemo as Ve, useLayoutEffect as $e } from "preact/hooks";
5
+ import { P as He } from "./chunks/port-name-BPfQKtdb.js";
6
+ const ve = '@layer theme,base,components,utilities;@layer theme{@theme default{ --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif; --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --color-red-50: oklch(97.1% .013 17.38); --color-red-100: oklch(93.6% .032 17.717); --color-red-200: oklch(88.5% .062 18.334); --color-red-300: oklch(80.8% .114 19.571); --color-red-400: oklch(70.4% .191 22.216); --color-red-500: oklch(63.7% .237 25.331); --color-red-600: oklch(57.7% .245 27.325); --color-red-700: oklch(50.5% .213 27.518); --color-red-800: oklch(44.4% .177 26.899); --color-red-900: oklch(39.6% .141 25.723); --color-red-950: oklch(25.8% .092 26.042); --color-orange-50: oklch(98% .016 73.684); --color-orange-100: oklch(95.4% .038 75.164); --color-orange-200: oklch(90.1% .076 70.697); --color-orange-300: oklch(83.7% .128 66.29); --color-orange-400: oklch(75% .183 55.934); --color-orange-500: oklch(70.5% .213 47.604); --color-orange-600: oklch(64.6% .222 41.116); --color-orange-700: oklch(55.3% .195 38.402); --color-orange-800: oklch(47% .157 37.304); --color-orange-900: oklch(40.8% .123 38.172); --color-orange-950: oklch(26.6% .079 36.259); --color-amber-50: oklch(98.7% .022 95.277); --color-amber-100: oklch(96.2% .059 95.617); --color-amber-200: oklch(92.4% .12 95.746); --color-amber-300: oklch(87.9% .169 91.605); --color-amber-400: oklch(82.8% .189 84.429); --color-amber-500: oklch(76.9% .188 70.08); --color-amber-600: oklch(66.6% .179 58.318); --color-amber-700: oklch(55.5% .163 48.998); --color-amber-800: oklch(47.3% .137 46.201); --color-amber-900: oklch(41.4% .112 45.904); --color-amber-950: oklch(27.9% .077 45.635); --color-yellow-50: oklch(98.7% .026 102.212); --color-yellow-100: oklch(97.3% .071 103.193); --color-yellow-200: oklch(94.5% .129 101.54); --color-yellow-300: oklch(90.5% .182 98.111); --color-yellow-400: oklch(85.2% .199 91.936); --color-yellow-500: oklch(79.5% .184 86.047); --color-yellow-600: oklch(68.1% .162 75.834); --color-yellow-700: oklch(55.4% .135 66.442); --color-yellow-800: oklch(47.6% .114 61.907); --color-yellow-900: oklch(42.1% .095 57.708); --color-yellow-950: oklch(28.6% .066 53.813); --color-lime-50: oklch(98.6% .031 120.757); --color-lime-100: oklch(96.7% .067 122.328); --color-lime-200: oklch(93.8% .127 124.321); --color-lime-300: oklch(89.7% .196 126.665); --color-lime-400: oklch(84.1% .238 128.85); --color-lime-500: oklch(76.8% .233 130.85); --color-lime-600: oklch(64.8% .2 131.684); --color-lime-700: oklch(53.2% .157 131.589); --color-lime-800: oklch(45.3% .124 130.933); --color-lime-900: oklch(40.5% .101 131.063); --color-lime-950: oklch(27.4% .072 132.109); --color-green-50: oklch(98.2% .018 155.826); --color-green-100: oklch(96.2% .044 156.743); --color-green-200: oklch(92.5% .084 155.995); --color-green-300: oklch(87.1% .15 154.449); --color-green-400: oklch(79.2% .209 151.711); --color-green-500: oklch(72.3% .219 149.579); --color-green-600: oklch(62.7% .194 149.214); --color-green-700: oklch(52.7% .154 150.069); --color-green-800: oklch(44.8% .119 151.328); --color-green-900: oklch(39.3% .095 152.535); --color-green-950: oklch(26.6% .065 152.934); --color-emerald-50: oklch(97.9% .021 166.113); --color-emerald-100: oklch(95% .052 163.051); --color-emerald-200: oklch(90.5% .093 164.15); --color-emerald-300: oklch(84.5% .143 164.978); --color-emerald-400: oklch(76.5% .177 163.223); --color-emerald-500: oklch(69.6% .17 162.48); --color-emerald-600: oklch(59.6% .145 163.225); --color-emerald-700: oklch(50.8% .118 165.612); --color-emerald-800: oklch(43.2% .095 166.913); --color-emerald-900: oklch(37.8% .077 168.94); --color-emerald-950: oklch(26.2% .051 172.552); --color-teal-50: oklch(98.4% .014 180.72); --color-teal-100: oklch(95.3% .051 180.801); --color-teal-200: oklch(91% .096 180.426); --color-teal-300: oklch(85.5% .138 181.071); --color-teal-400: oklch(77.7% .152 181.912); --color-teal-500: oklch(70.4% .14 182.503); --color-teal-600: oklch(60% .118 184.704); --color-teal-700: oklch(51.1% .096 186.391); --color-teal-800: oklch(43.7% .078 188.216); --color-teal-900: oklch(38.6% .063 188.416); --color-teal-950: oklch(27.7% .046 192.524); --color-cyan-50: oklch(98.4% .019 200.873); --color-cyan-100: oklch(95.6% .045 203.388); --color-cyan-200: oklch(91.7% .08 205.041); --color-cyan-300: oklch(86.5% .127 207.078); --color-cyan-400: oklch(78.9% .154 211.53); --color-cyan-500: oklch(71.5% .143 215.221); --color-cyan-600: oklch(60.9% .126 221.723); --color-cyan-700: oklch(52% .105 223.128); --color-cyan-800: oklch(45% .085 224.283); --color-cyan-900: oklch(39.8% .07 227.392); --color-cyan-950: oklch(30.2% .056 229.695); --color-sky-50: oklch(97.7% .013 236.62); --color-sky-100: oklch(95.1% .026 236.824); --color-sky-200: oklch(90.1% .058 230.902); --color-sky-300: oklch(82.8% .111 230.318); --color-sky-400: oklch(74.6% .16 232.661); --color-sky-500: oklch(68.5% .169 237.323); --color-sky-600: oklch(58.8% .158 241.966); --color-sky-700: oklch(50% .134 242.749); --color-sky-800: oklch(44.3% .11 240.79); --color-sky-900: oklch(39.1% .09 240.876); --color-sky-950: oklch(29.3% .066 243.157); --color-blue-50: oklch(97% .014 254.604); --color-blue-100: oklch(93.2% .032 255.585); --color-blue-200: oklch(88.2% .059 254.128); --color-blue-300: oklch(80.9% .105 251.813); --color-blue-400: oklch(70.7% .165 254.624); --color-blue-500: oklch(62.3% .214 259.815); --color-blue-600: oklch(54.6% .245 262.881); --color-blue-700: oklch(48.8% .243 264.376); --color-blue-800: oklch(42.4% .199 265.638); --color-blue-900: oklch(37.9% .146 265.522); --color-blue-950: oklch(28.2% .091 267.935); --color-indigo-50: oklch(96.2% .018 272.314); --color-indigo-100: oklch(93% .034 272.788); --color-indigo-200: oklch(87% .065 274.039); --color-indigo-300: oklch(78.5% .115 274.713); --color-indigo-400: oklch(67.3% .182 276.935); --color-indigo-500: oklch(58.5% .233 277.117); --color-indigo-600: oklch(51.1% .262 276.966); --color-indigo-700: oklch(45.7% .24 277.023); --color-indigo-800: oklch(39.8% .195 277.366); --color-indigo-900: oklch(35.9% .144 278.697); --color-indigo-950: oklch(25.7% .09 281.288); --color-violet-50: oklch(96.9% .016 293.756); --color-violet-100: oklch(94.3% .029 294.588); --color-violet-200: oklch(89.4% .057 293.283); --color-violet-300: oklch(81.1% .111 293.571); --color-violet-400: oklch(70.2% .183 293.541); --color-violet-500: oklch(60.6% .25 292.717); --color-violet-600: oklch(54.1% .281 293.009); --color-violet-700: oklch(49.1% .27 292.581); --color-violet-800: oklch(43.2% .232 292.759); --color-violet-900: oklch(38% .189 293.745); --color-violet-950: oklch(28.3% .141 291.089); --color-purple-50: oklch(97.7% .014 308.299); --color-purple-100: oklch(94.6% .033 307.174); --color-purple-200: oklch(90.2% .063 306.703); --color-purple-300: oklch(82.7% .119 306.383); --color-purple-400: oklch(71.4% .203 305.504); --color-purple-500: oklch(62.7% .265 303.9); --color-purple-600: oklch(55.8% .288 302.321); --color-purple-700: oklch(49.6% .265 301.924); --color-purple-800: oklch(43.8% .218 303.724); --color-purple-900: oklch(38.1% .176 304.987); --color-purple-950: oklch(29.1% .149 302.717); --color-fuchsia-50: oklch(97.7% .017 320.058); --color-fuchsia-100: oklch(95.2% .037 318.852); --color-fuchsia-200: oklch(90.3% .076 319.62); --color-fuchsia-300: oklch(83.3% .145 321.434); --color-fuchsia-400: oklch(74% .238 322.16); --color-fuchsia-500: oklch(66.7% .295 322.15); --color-fuchsia-600: oklch(59.1% .293 322.896); --color-fuchsia-700: oklch(51.8% .253 323.949); --color-fuchsia-800: oklch(45.2% .211 324.591); --color-fuchsia-900: oklch(40.1% .17 325.612); --color-fuchsia-950: oklch(29.3% .136 325.661); --color-pink-50: oklch(97.1% .014 343.198); --color-pink-100: oklch(94.8% .028 342.258); --color-pink-200: oklch(89.9% .061 343.231); --color-pink-300: oklch(82.3% .12 346.018); --color-pink-400: oklch(71.8% .202 349.761); --color-pink-500: oklch(65.6% .241 354.308); --color-pink-600: oklch(59.2% .249 .584); --color-pink-700: oklch(52.5% .223 3.958); --color-pink-800: oklch(45.9% .187 3.815); --color-pink-900: oklch(40.8% .153 2.432); --color-pink-950: oklch(28.4% .109 3.907); --color-rose-50: oklch(96.9% .015 12.422); --color-rose-100: oklch(94.1% .03 12.58); --color-rose-200: oklch(89.2% .058 10.001); --color-rose-300: oklch(81% .117 11.638); --color-rose-400: oklch(71.2% .194 13.428); --color-rose-500: oklch(64.5% .246 16.439); --color-rose-600: oklch(58.6% .253 17.585); --color-rose-700: oklch(51.4% .222 16.935); --color-rose-800: oklch(45.5% .188 13.697); --color-rose-900: oklch(41% .159 10.272); --color-rose-950: oklch(27.1% .105 12.094); --color-slate-50: oklch(98.4% .003 247.858); --color-slate-100: oklch(96.8% .007 247.896); --color-slate-200: oklch(92.9% .013 255.508); --color-slate-300: oklch(86.9% .022 252.894); --color-slate-400: oklch(70.4% .04 256.788); --color-slate-500: oklch(55.4% .046 257.417); --color-slate-600: oklch(44.6% .043 257.281); --color-slate-700: oklch(37.2% .044 257.287); --color-slate-800: oklch(27.9% .041 260.031); --color-slate-900: oklch(20.8% .042 265.755); --color-slate-950: oklch(12.9% .042 264.695); --color-gray-50: oklch(98.5% .002 247.839); --color-gray-100: oklch(96.7% .003 264.542); --color-gray-200: oklch(92.8% .006 264.531); --color-gray-300: oklch(87.2% .01 258.338); --color-gray-400: oklch(70.7% .022 261.325); --color-gray-500: oklch(55.1% .027 264.364); --color-gray-600: oklch(44.6% .03 256.802); --color-gray-700: oklch(37.3% .034 259.733); --color-gray-800: oklch(27.8% .033 256.848); --color-gray-900: oklch(21% .034 264.665); --color-gray-950: oklch(13% .028 261.692); --color-zinc-50: oklch(98.5% 0 0); --color-zinc-100: oklch(96.7% .001 286.375); --color-zinc-200: oklch(92% .004 286.32); --color-zinc-300: oklch(87.1% .006 286.286); --color-zinc-400: oklch(70.5% .015 286.067); --color-zinc-500: oklch(55.2% .016 285.938); --color-zinc-600: oklch(44.2% .017 285.786); --color-zinc-700: oklch(37% .013 285.805); --color-zinc-800: oklch(27.4% .006 286.033); --color-zinc-900: oklch(21% .006 285.885); --color-zinc-950: oklch(14.1% .005 285.823); --color-neutral-50: oklch(98.5% 0 0); --color-neutral-100: oklch(97% 0 0); --color-neutral-200: oklch(92.2% 0 0); --color-neutral-300: oklch(87% 0 0); --color-neutral-400: oklch(70.8% 0 0); --color-neutral-500: oklch(55.6% 0 0); --color-neutral-600: oklch(43.9% 0 0); --color-neutral-700: oklch(37.1% 0 0); --color-neutral-800: oklch(26.9% 0 0); --color-neutral-900: oklch(20.5% 0 0); --color-neutral-950: oklch(14.5% 0 0); --color-stone-50: oklch(98.5% .001 106.423); --color-stone-100: oklch(97% .001 106.424); --color-stone-200: oklch(92.3% .003 48.717); --color-stone-300: oklch(86.9% .005 56.366); --color-stone-400: oklch(70.9% .01 56.259); --color-stone-500: oklch(55.3% .013 58.071); --color-stone-600: oklch(44.4% .011 73.639); --color-stone-700: oklch(37.4% .01 67.558); --color-stone-800: oklch(26.8% .007 34.298); --color-stone-900: oklch(21.6% .006 56.043); --color-stone-950: oklch(14.7% .004 49.25); --color-mauve-50: oklch(98.5% 0 0); --color-mauve-100: oklch(96% .003 325.6); --color-mauve-200: oklch(92.2% .005 325.62); --color-mauve-300: oklch(86.5% .012 325.68); --color-mauve-400: oklch(71.1% .019 323.02); --color-mauve-500: oklch(54.2% .034 322.5); --color-mauve-600: oklch(43.5% .029 321.78); --color-mauve-700: oklch(36.4% .029 323.89); --color-mauve-800: oklch(26.3% .024 320.12); --color-mauve-900: oklch(21.2% .019 322.12); --color-mauve-950: oklch(14.5% .008 326); --color-olive-50: oklch(98.8% .003 106.5); --color-olive-100: oklch(96.6% .005 106.5); --color-olive-200: oklch(93% .007 106.5); --color-olive-300: oklch(88% .011 106.6); --color-olive-400: oklch(73.7% .021 106.9); --color-olive-500: oklch(58% .031 107.3); --color-olive-600: oklch(46.6% .025 107.3); --color-olive-700: oklch(39.4% .023 107.4); --color-olive-800: oklch(28.6% .016 107.4); --color-olive-900: oklch(22.8% .013 107.4); --color-olive-950: oklch(15.3% .006 107.1); --color-mist-50: oklch(98.7% .002 197.1); --color-mist-100: oklch(96.3% .002 197.1); --color-mist-200: oklch(92.5% .005 214.3); --color-mist-300: oklch(87.2% .007 219.6); --color-mist-400: oklch(72.3% .014 214.4); --color-mist-500: oklch(56% .021 213.5); --color-mist-600: oklch(45% .017 213.2); --color-mist-700: oklch(37.8% .015 216); --color-mist-800: oklch(27.5% .011 216.9); --color-mist-900: oklch(21.8% .008 223.9); --color-mist-950: oklch(14.8% .004 228.8); --color-taupe-50: oklch(98.6% .002 67.8); --color-taupe-100: oklch(96% .002 17.2); --color-taupe-200: oklch(92.2% .005 34.3); --color-taupe-300: oklch(86.8% .007 39.5); --color-taupe-400: oklch(71.4% .014 41.2); --color-taupe-500: oklch(54.7% .021 43.1); --color-taupe-600: oklch(43.8% .017 39.3); --color-taupe-700: oklch(36.7% .016 35.7); --color-taupe-800: oklch(26.8% .011 36.5); --color-taupe-900: oklch(21.4% .009 43.1); --color-taupe-950: oklch(14.7% .004 49.3); --color-black: #000; --color-white: #fff; --spacing: .25rem; --breakpoint-sm: 40rem; --breakpoint-md: 48rem; --breakpoint-lg: 64rem; --breakpoint-xl: 80rem; --breakpoint-2xl: 96rem; --container-3xs: 16rem; --container-2xs: 18rem; --container-xs: 20rem; --container-sm: 24rem; --container-md: 28rem; --container-lg: 32rem; --container-xl: 36rem; --container-2xl: 42rem; --container-3xl: 48rem; --container-4xl: 56rem; --container-5xl: 64rem; --container-6xl: 72rem; --container-7xl: 80rem; --text-xs: .75rem; --text-xs--line-height: calc(1 / .75); --text-sm: .875rem; --text-sm--line-height: calc(1.25 / .875); --text-base: 1rem; --text-base--line-height: 1.5 ; --text-lg: 1.125rem; --text-lg--line-height: calc(1.75 / 1.125); --text-xl: 1.25rem; --text-xl--line-height: calc(1.75 / 1.25); --text-2xl: 1.5rem; --text-2xl--line-height: calc(2 / 1.5); --text-3xl: 1.875rem; --text-3xl--line-height: 1.2 ; --text-4xl: 2.25rem; --text-4xl--line-height: calc(2.5 / 2.25); --text-5xl: 3rem; --text-5xl--line-height: 1; --text-6xl: 3.75rem; --text-6xl--line-height: 1; --text-7xl: 4.5rem; --text-7xl--line-height: 1; --text-8xl: 6rem; --text-8xl--line-height: 1; --text-9xl: 8rem; --text-9xl--line-height: 1; --font-weight-thin: 100; --font-weight-extralight: 200; --font-weight-light: 300; --font-weight-normal: 400; --font-weight-medium: 500; --font-weight-semibold: 600; --font-weight-bold: 700; --font-weight-extrabold: 800; --font-weight-black: 900; --tracking-tighter: -.05em; --tracking-tight: -.025em; --tracking-normal: 0em; --tracking-wide: .025em; --tracking-wider: .05em; --tracking-widest: .1em; --leading-tight: 1.25; --leading-snug: 1.375; --leading-normal: 1.5; --leading-relaxed: 1.625; --leading-loose: 2; --radius-xs: .125rem; --radius-sm: .25rem; --radius-md: .375rem; --radius-lg: .5rem; --radius-xl: .75rem; --radius-2xl: 1rem; --radius-3xl: 1.5rem; --radius-4xl: 2rem; --shadow-2xs: 0 1px rgb(0 0 0 / .05); --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / .05); --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1); --shadow-md: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1); --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1); --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1); --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / .25); --inset-shadow-2xs: inset 0 1px rgb(0 0 0 / .05); --inset-shadow-xs: inset 0 1px 1px rgb(0 0 0 / .05); --inset-shadow-sm: inset 0 2px 4px rgb(0 0 0 / .05); --drop-shadow-xs: 0 1px 1px rgb(0 0 0 / .05); --drop-shadow-sm: 0 1px 2px rgb(0 0 0 / .15); --drop-shadow-md: 0 3px 3px rgb(0 0 0 / .12); --drop-shadow-lg: 0 4px 4px rgb(0 0 0 / .15); --drop-shadow-xl: 0 9px 7px rgb(0 0 0 / .1); --drop-shadow-2xl: 0 25px 25px rgb(0 0 0 / .15); --text-shadow-2xs: 0px 1px 0px rgb(0 0 0 / .15); --text-shadow-xs: 0px 1px 1px rgb(0 0 0 / .2); --text-shadow-sm: 0px 1px 0px rgb(0 0 0 / .075), 0px 1px 1px rgb(0 0 0 / .075), 0px 2px 2px rgb(0 0 0 / .075); --text-shadow-md: 0px 1px 1px rgb(0 0 0 / .1), 0px 1px 2px rgb(0 0 0 / .1), 0px 2px 4px rgb(0 0 0 / .1); --text-shadow-lg: 0px 1px 2px rgb(0 0 0 / .1), 0px 3px 2px rgb(0 0 0 / .1), 0px 4px 8px rgb(0 0 0 / .1); --ease-in: cubic-bezier(.4, 0, 1, 1); --ease-out: cubic-bezier(0, 0, .2, 1); --ease-in-out: cubic-bezier(.4, 0, .2, 1); --animate-spin: spin 1s linear infinite; --animate-ping: ping 1s cubic-bezier(0, 0, .2, 1) infinite; --animate-pulse: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite; --animate-bounce: bounce 1s infinite; @keyframes spin { to { transform: rotate(360deg); } } @keyframes ping { 75%, 100% { transform: scale(2); opacity: 0; } } @keyframes pulse { 50% { opacity: .5; } } @keyframes bounce { 0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(.8, 0, 1, 1); } 50% { transform: none; animation-timing-function: cubic-bezier(0, 0, .2, 1); } } --blur-xs: 4px; --blur-sm: 8px; --blur-md: 12px; --blur-lg: 16px; --blur-xl: 24px; --blur-2xl: 40px; --blur-3xl: 64px; --perspective-dramatic: 100px; --perspective-near: 300px; --perspective-normal: 500px; --perspective-midrange: 800px; --perspective-distant: 1200px; --aspect-video: 16 / 9; --default-transition-duration: .15s; --default-transition-timing-function: cubic-bezier(.4, 0, .2, 1); --default-font-family: --theme(--font-sans, initial); --default-font-feature-settings: --theme( --font-sans--font-feature-settings, initial ); --default-font-variation-settings: --theme( --font-sans--font-variation-settings, initial ); --default-mono-font-family: --theme(--font-mono, initial); --default-mono-font-feature-settings: --theme( --font-mono--font-feature-settings, initial ); --default-mono-font-variation-settings: --theme( --font-mono--font-variation-settings, initial ); }@theme default inline reference{ --blur: 8px; --shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1); --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / .05); --drop-shadow: 0 1px 2px rgb(0 0 0 / .1), 0 1px 1px rgb(0 0 0 / .06); --radius: .25rem; --max-width-prose: 65ch; }}@layer base{*,:after,:before,::backdrop,::file-selector-button{box-sizing:border-box;margin:0;padding:0;border:0 solid}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;tab-size:4;font-family:--theme(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:--theme(--default-font-feature-settings,normal);font-variation-settings:--theme(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:--theme(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:--theme(--default-mono-font-feature-settings,normal);font-variation-settings:--theme(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea,::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]),::file-selector-button{appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{@tailwind utilities;}@source "../**/*.{ts,tsx,js,jsx}";@layer base{:host{all:initial;color-scheme:light;font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}*,*:before,*:after{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*,*:before,*:after{box-sizing:border-box}button{font-family:inherit;cursor:pointer}button:disabled{cursor:not-allowed}[role=button],[role=radio]{cursor:pointer}}.pw-cta-shimmer:before{content:"";position:absolute;top:0;left:-100%;width:100%;height:100%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.35) 50%,transparent);animation:pw-cta-shimmer 3s infinite;z-index:1}@keyframes pw-cta-shimmer{0%{left:-100%}to{left:100%}}';
7
+ let ue = !1;
8
+ function Ge() {
9
+ if (ue || (ue = !0, typeof CSS > "u" || typeof CSS.registerProperty != "function")) return;
10
10
  let r;
11
11
  try {
12
12
  const e = new CSSStyleSheet();
13
- e.replaceSync(Se), r = e.cssRules;
13
+ e.replaceSync(ve), r = e.cssRules;
14
14
  } catch {
15
15
  return;
16
16
  }
@@ -28,10 +28,10 @@ function We() {
28
28
  }
29
29
  }
30
30
  }
31
- function Ze(r, e, t = {}) {
31
+ function We(r, e, t = {}) {
32
32
  if (typeof document > "u")
33
33
  throw new Error("mountShadow called in non-DOM environment");
34
- We();
34
+ Ge();
35
35
  const n = t.host ?? document.createElement("div");
36
36
  n.setAttribute("data-paywall-host", ""), n.style.cssText = t.inline ? "all: initial; position: absolute; inset: 0; z-index: 1; pointer-events: none;" : "all: initial; position: fixed; inset: 0; z-index: 2147483647; pointer-events: none;", !n.isConnected && !t.inline && document.body.appendChild(n);
37
37
  const i = n.attachShadow({ mode: t.shadowMode ?? "closed" }), s = `
@@ -53,21 +53,21 @@ function Ze(r, e, t = {}) {
53
53
  visibility: visible !important;
54
54
  }
55
55
  `, a = document.createElement("style");
56
- a.textContent = s + Se + (t.injectCss ?? ""), i.appendChild(a);
57
- const l = document.createElement("div");
58
- l.style.pointerEvents = "auto", i.appendChild(l);
59
- let d = e;
60
- return X(de(r, d), l), {
56
+ a.textContent = s + ve + (t.injectCss ?? ""), i.appendChild(a);
57
+ const c = document.createElement("div");
58
+ c.style.pointerEvents = "auto", i.appendChild(c);
59
+ let l = e;
60
+ return X(ce(r, l), c), {
61
61
  shadowRoot: i,
62
- update(p) {
63
- d = { ...d, ...p }, X(de(r, d), l);
62
+ update(f) {
63
+ l = { ...l, ...f }, X(ce(r, l), c);
64
64
  },
65
65
  unmount() {
66
- X(null, l), n.remove();
66
+ X(null, c), n.remove();
67
67
  }
68
68
  };
69
69
  }
70
- const Ye = (r, e, t) => {
70
+ const Ze = (r, e, t) => {
71
71
  const n = r[e];
72
72
  return n ? typeof n == "function" ? n() : Promise.resolve(n) : new Promise((i, s) => {
73
73
  (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
@@ -79,7 +79,7 @@ const Ye = (r, e, t) => {
79
79
  )
80
80
  );
81
81
  });
82
- }, Ke = [
82
+ }, Ye = [
83
83
  "ru",
84
84
  "uk",
85
85
  "de",
@@ -107,8 +107,8 @@ const Ye = (r, e, t) => {
107
107
  "th",
108
108
  "vi",
109
109
  "he"
110
- ], Ce = (r, e, t) => Le(e, t), Ie = Ve({ t: Ce, locale: "en" });
111
- function Le(r, e) {
110
+ ], _e = (r, e, t) => Ce(e, t), Se = Ne({ t: _e, locale: "en" });
111
+ function Ce(r, e) {
112
112
  if (!e) return r;
113
113
  let t = r;
114
114
  for (const [n, i] of Object.entries(e))
@@ -116,10 +116,10 @@ function Le(r, e) {
116
116
  return t;
117
117
  }
118
118
  const J = /* @__PURE__ */ new Map(), Q = /* @__PURE__ */ new Map();
119
- function Ae(r) {
120
- return Ke.includes(r);
119
+ function Ie(r) {
120
+ return Ye.includes(r);
121
121
  }
122
- function Xe(r) {
122
+ function Ke(r) {
123
123
  const e = [];
124
124
  if (typeof navigator < "u" && navigator.language) {
125
125
  e.push(navigator.language);
@@ -133,18 +133,18 @@ function Xe(r) {
133
133
  n && n !== t && e.push(n);
134
134
  }
135
135
  for (const n of e)
136
- if (Ae(n)) return n;
136
+ if (Ie(n)) return n;
137
137
  return null;
138
138
  }
139
- function Je(r) {
140
- return !!r.locales && Object.keys(r.locales).length > 0;
139
+ function Xe(r, e) {
140
+ return !!r.locales && r.locales[e] !== void 0;
141
141
  }
142
- async function Qe(r) {
142
+ async function Je(r) {
143
143
  const e = J.get(r);
144
144
  if (e) return e;
145
145
  const t = Q.get(r);
146
146
  if (t) return t;
147
- const n = Ye(/* @__PURE__ */ Object.assign({ "./locales/ar.ts": () => import("./chunks/ar-nh4l4WDE.js"), "./locales/cs.ts": () => import("./chunks/cs-2UYO2rWf.js"), "./locales/da.ts": () => import("./chunks/da-BD0O_HfV.js"), "./locales/de.ts": () => import("./chunks/de-BkCiXPsn.js"), "./locales/el.ts": () => import("./chunks/el-cIcxTp07.js"), "./locales/es.ts": () => import("./chunks/es-CJBC_jrV.js"), "./locales/fi.ts": () => import("./chunks/fi-DyV7ynBf.js"), "./locales/fr.ts": () => import("./chunks/fr-BLQ4AIu7.js"), "./locales/he.ts": () => import("./chunks/he-Bg-Bqi7r.js"), "./locales/hi.ts": () => import("./chunks/hi-wQeE43oY.js"), "./locales/hu.ts": () => import("./chunks/hu-D9qxzu0r.js"), "./locales/id.ts": () => import("./chunks/id-Rx_wYvqy.js"), "./locales/it.ts": () => import("./chunks/it-B1SRPZ3e.js"), "./locales/ja.ts": () => import("./chunks/ja-DiItm8te.js"), "./locales/ko.ts": () => import("./chunks/ko-CdGFWAKX.js"), "./locales/nl.ts": () => import("./chunks/nl-CmZ3vEvj.js"), "./locales/no.ts": () => import("./chunks/no-BuxByZpq.js"), "./locales/pl.ts": () => import("./chunks/pl-jZFCnDb8.js"), "./locales/pt.ts": () => import("./chunks/pt-Cld7MwIW.js"), "./locales/ro.ts": () => import("./chunks/ro-CuKDqj3C.js"), "./locales/ru.ts": () => import("./chunks/ru-B7cjqJUm.js"), "./locales/sv.ts": () => import("./chunks/sv-D9y-M1Fo.js"), "./locales/th.ts": () => import("./chunks/th-D9umBjEy.js"), "./locales/tr.ts": () => import("./chunks/tr-BddMywiw.js"), "./locales/uk.ts": () => import("./chunks/uk-Dbd31hFt.js"), "./locales/vi.ts": () => import("./chunks/vi-Do3BMOdh.js"), "./locales/zh.ts": () => import("./chunks/zh-gQSYLZI3.js") }), `./locales/${r}.ts`, 3).then((i) => {
147
+ const n = Ze(/* @__PURE__ */ Object.assign({ "./locales/ar.ts": () => import("./chunks/ar-CHae8g-2.js"), "./locales/cs.ts": () => import("./chunks/cs-eZTedzaK.js"), "./locales/da.ts": () => import("./chunks/da-Dca6j8fp.js"), "./locales/de.ts": () => import("./chunks/de-BCjn3PUI.js"), "./locales/el.ts": () => import("./chunks/el-BpXtDTez.js"), "./locales/es.ts": () => import("./chunks/es-B3P4nlMw.js"), "./locales/fi.ts": () => import("./chunks/fi-BbQ_Bs0Z.js"), "./locales/fr.ts": () => import("./chunks/fr-BKDUXceO.js"), "./locales/he.ts": () => import("./chunks/he-BVCHlTtT.js"), "./locales/hi.ts": () => import("./chunks/hi-H_Hshh-7.js"), "./locales/hu.ts": () => import("./chunks/hu-ZWiNfzvN.js"), "./locales/id.ts": () => import("./chunks/id-DeiRYsJ1.js"), "./locales/it.ts": () => import("./chunks/it-UH9OzFhg.js"), "./locales/ja.ts": () => import("./chunks/ja-BYC8FRN8.js"), "./locales/ko.ts": () => import("./chunks/ko-Bjs2ZRcF.js"), "./locales/nl.ts": () => import("./chunks/nl-Ch5HFWQO.js"), "./locales/no.ts": () => import("./chunks/no-CljpinWz.js"), "./locales/pl.ts": () => import("./chunks/pl-CUcSS0zZ.js"), "./locales/pt.ts": () => import("./chunks/pt-BHK0LwkC.js"), "./locales/ro.ts": () => import("./chunks/ro-Bj8cwU2n.js"), "./locales/ru.ts": () => import("./chunks/ru-CgqNy0Gb.js"), "./locales/sv.ts": () => import("./chunks/sv-H7jroOQ5.js"), "./locales/th.ts": () => import("./chunks/th-Dqm-gpGe.js"), "./locales/tr.ts": () => import("./chunks/tr-D3zPcNtT.js"), "./locales/uk.ts": () => import("./chunks/uk-CoIIs3QI.js"), "./locales/vi.ts": () => import("./chunks/vi-C_fruIbh.js"), "./locales/zh.ts": () => import("./chunks/zh-LDkEV2D9.js") }), `./locales/${r}.ts`, 3).then((i) => {
148
148
  const s = i.default ?? {};
149
149
  return J.set(r, s), s;
150
150
  }).catch((i) => {
@@ -156,33 +156,37 @@ async function Qe(r) {
156
156
  });
157
157
  return Q.set(r, n), n;
158
158
  }
159
- function et({ bootstrap: r, forceLocale: e, children: t }) {
159
+ function Qe({ bootstrap: r, forceLocale: e, children: t }) {
160
160
  const [n, i] = x("en"), [s, a] = x(null);
161
- T(() => {
162
- const p = (e && Ae(e) ? e : null) ?? (!r || !Je(r) ? null : Xe(r));
163
- if (!p) {
161
+ O(() => {
162
+ const f = (e && Ie(e) ? e : null) ?? (() => {
163
+ if (!r) return null;
164
+ const d = Ke(r);
165
+ return !d || !Xe(r, d) ? null : d;
166
+ })();
167
+ if (!f) {
164
168
  (s !== null || n !== "en") && (i("en"), a(null));
165
169
  return;
166
170
  }
167
- if (p === n && s) return;
168
- let u = !1;
169
- return Qe(p).then((h) => {
170
- u || (i(p), a(h));
171
+ if (f === n && s) return;
172
+ let h = !1;
173
+ return Je(f).then((d) => {
174
+ h || (i(f), a(d));
171
175
  }), () => {
172
- u = !0;
176
+ h = !0;
173
177
  };
174
178
  }, [r, e]);
175
- const l = {
179
+ const c = {
176
180
  locale: n,
177
- t: s ? (d, p, u) => Le(s[d] ?? p, u) : Ce
181
+ t: s ? (l, f, h) => Ce(s[l] ?? f, h) : _e
178
182
  };
179
- return /* @__PURE__ */ o(Ie.Provider, { value: l, children: t });
183
+ return /* @__PURE__ */ o(Se.Provider, { value: c, children: t });
180
184
  }
181
- function w() {
182
- return $e(Ie);
185
+ function k() {
186
+ return Fe(Se);
183
187
  }
184
- const pe = 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';
185
- function tt({
188
+ const de = 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';
189
+ function et({
186
190
  open: r,
187
191
  onClose: e,
188
192
  labelledBy: t,
@@ -190,57 +194,57 @@ function tt({
190
194
  topBanner: i,
191
195
  allowClose: s = !0,
192
196
  hideCloseButton: a = !1,
193
- inline: l = !1,
194
- children: d
197
+ inline: c = !1,
198
+ children: l
195
199
  }) {
196
- const { t: p } = w(), u = z(null), h = z(null);
197
- return T(() => {
200
+ const { t: f } = k(), h = z(null), d = z(null);
201
+ return O(() => {
198
202
  if (!r) return;
199
- h.current = document.activeElement ?? null;
200
- const g = u.current;
201
- g && (g.querySelector(pe) ?? g).focus({ preventScroll: !0 });
202
- const A = (k) => {
203
- if (k.key === "Escape") {
203
+ d.current = document.activeElement ?? null;
204
+ const p = h.current;
205
+ p && (p.querySelector(de) ?? p).focus({ preventScroll: !0 });
206
+ const y = (_) => {
207
+ if (_.key === "Escape") {
204
208
  if (!s) return;
205
- k.stopPropagation(), e();
209
+ _.stopPropagation(), e();
206
210
  return;
207
211
  }
208
- if (k.key !== "Tab" || !u.current) return;
209
- const E = Array.from(
210
- u.current.querySelectorAll(pe)
211
- ).filter((R) => !R.hasAttribute("disabled") && R.tabIndex !== -1);
212
- if (E.length === 0) {
213
- k.preventDefault();
212
+ if (_.key !== "Tab" || !h.current) return;
213
+ const S = Array.from(
214
+ h.current.querySelectorAll(de)
215
+ ).filter((T) => !T.hasAttribute("disabled") && T.tabIndex !== -1);
216
+ if (S.length === 0) {
217
+ _.preventDefault();
214
218
  return;
215
219
  }
216
- const I = E[0], O = E[E.length - 1], B = document.activeElement;
217
- k.shiftKey && B === I ? (k.preventDefault(), O.focus()) : !k.shiftKey && B === O && (k.preventDefault(), I.focus());
220
+ const P = S[0], M = S[S.length - 1], j = document.activeElement;
221
+ _.shiftKey && j === P ? (_.preventDefault(), M.focus()) : !_.shiftKey && j === M && (_.preventDefault(), P.focus());
218
222
  };
219
- document.addEventListener("keydown", A, !0);
220
- const M = document.body.style.overflow;
221
- return l || (document.body.style.overflow = "hidden"), () => {
222
- document.removeEventListener("keydown", A, !0), l || (document.body.style.overflow = M), h.current?.focus?.({ preventScroll: !0 });
223
+ document.addEventListener("keydown", y, !0);
224
+ const U = document.body.style.overflow;
225
+ return c || (document.body.style.overflow = "hidden"), () => {
226
+ document.removeEventListener("keydown", y, !0), c || (document.body.style.overflow = U), d.current?.focus?.({ preventScroll: !0 });
223
227
  };
224
- }, [r, e, s, l]), r ? /* @__PURE__ */ c(
228
+ }, [r, e, s, c]), r ? /* @__PURE__ */ u(
225
229
  "div",
226
230
  {
227
- class: `${l ? "absolute z-[1]" : "fixed z-[2147483647]"} inset-0 flex items-center justify-center bg-slate-950/50 p-2 sm:p-4 backdrop-blur-md animate-[pw-fade-in_180ms_ease-out]`,
228
- onClick: (g) => {
229
- s && g.target === g.currentTarget && e();
231
+ class: `${c ? "absolute z-[1]" : "fixed z-[2147483647]"} inset-0 flex items-center justify-center bg-slate-950/50 p-2 sm:p-4 backdrop-blur-md animate-[pw-fade-in_180ms_ease-out]`,
232
+ onClick: (p) => {
233
+ s && p.target === p.currentTarget && e();
230
234
  },
231
235
  "data-pw-root": !0,
232
236
  children: [
233
- /* @__PURE__ */ c(
237
+ /* @__PURE__ */ u(
234
238
  "div",
235
239
  {
236
240
  class: "relative flex w-full max-w-[400px] flex-col animate-[pw-scale-in_220ms_cubic-bezier(0.16,1,0.3,1)]",
237
241
  style: { "--pw-accent": n ?? "#3b82f6" },
238
242
  children: [
239
243
  i,
240
- /* @__PURE__ */ c(
244
+ /* @__PURE__ */ u(
241
245
  "div",
242
246
  {
243
- ref: u,
247
+ ref: h,
244
248
  role: "dialog",
245
249
  "aria-modal": "true",
246
250
  "aria-labelledby": t,
@@ -250,13 +254,13 @@ function tt({
250
254
  boxShadow: "0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)"
251
255
  },
252
256
  children: [
253
- d,
257
+ l,
254
258
  s && !a ? /* @__PURE__ */ o(
255
259
  "button",
256
260
  {
257
261
  type: "button",
258
262
  onClick: e,
259
- "aria-label": p("modal.close_aria", "Close"),
263
+ "aria-label": f("modal.close_aria", "Close"),
260
264
  class: "absolute right-3 top-3 z-10 flex h-8 w-8 items-center justify-center rounded-full bg-white/80 text-gray-500 backdrop-blur-sm transition-colors hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]",
261
265
  children: /* @__PURE__ */ o("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ o(
262
266
  "path",
@@ -286,7 +290,7 @@ function tt({
286
290
  }
287
291
  ) : null;
288
292
  }
289
- function rt(r, e) {
293
+ function tt(r, e) {
290
294
  switch (r) {
291
295
  case "google":
292
296
  return e("auth.continue_with_google", "Continue with Google");
@@ -298,9 +302,9 @@ function rt(r, e) {
298
302
  return e("auth.continue_with_facebook", "Continue with Facebook");
299
303
  }
300
304
  }
301
- function fe(r, e, t) {
305
+ function he(r, e, t) {
302
306
  const n = e === "signup" ? t("auth.signup_failed", "Sign-up failed") : t("auth.signin_failed", "Sign-in failed");
303
- if (!(r instanceof j)) return n;
307
+ if (!(r instanceof B)) return n;
304
308
  switch (r.code) {
305
309
  case "invalid_credentials":
306
310
  return t("auth.invalid_credentials", "Invalid email or password");
@@ -332,14 +336,14 @@ function fe(r, e, t) {
332
336
  return n;
333
337
  }
334
338
  }
335
- function Ee({ block: r, ctx: e }) {
339
+ function Ae({ block: r, ctx: e }) {
336
340
  const t = e.auth, n = e.authSession, i = r.allow_signup !== !1, s = r.allow_password_reset !== !1, a = r.hide_when_authenticated !== !1;
337
341
  if (!t)
338
342
  return typeof console < "u" && console.warn("[paywall] auth_panel rendered without AuthClient — pass `auth: true` to PaywallUI"), null;
339
- const l = n && !n.user.is_anonymous ? n : null;
340
- return l && a ? null : l ? /* @__PURE__ */ o(nt, { email: l.user.email ?? "", onSignOut: () => t.signOut().catch(() => {
343
+ const c = n && !n.user.is_anonymous ? n : null;
344
+ return c && a ? null : c ? /* @__PURE__ */ o(rt, { email: c.user.email ?? "", onSignOut: () => t.signOut().catch(() => {
341
345
  }) }) : /* @__PURE__ */ o(
342
- it,
346
+ nt,
343
347
  {
344
348
  block: r,
345
349
  allowSignup: i,
@@ -348,10 +352,10 @@ function Ee({ block: r, ctx: e }) {
348
352
  }
349
353
  );
350
354
  }
351
- function nt({ email: r, onSignOut: e }) {
352
- const { t } = w();
353
- return /* @__PURE__ */ c("div", { class: "flex items-center justify-between gap-3 rounded-2xl bg-gray-100 px-4 py-3", children: [
354
- /* @__PURE__ */ c("div", { class: "flex flex-col", children: [
355
+ function rt({ email: r, onSignOut: e }) {
356
+ const { t } = k();
357
+ return /* @__PURE__ */ u("div", { class: "flex items-center justify-between gap-3 rounded-2xl bg-gray-100 px-4 py-3", children: [
358
+ /* @__PURE__ */ u("div", { class: "flex flex-col", children: [
355
359
  /* @__PURE__ */ o("span", { class: "text-[10px] font-semibold uppercase tracking-wider text-gray-500", children: t("auth.signed_in", "Signed in") }),
356
360
  /* @__PURE__ */ o("span", { class: "text-sm font-medium text-gray-900", children: r })
357
361
  ] }),
@@ -366,182 +370,177 @@ function nt({ email: r, onSignOut: e }) {
366
370
  )
367
371
  ] });
368
372
  }
369
- function it({ block: r, allowSignup: e, allowReset: t, ctx: n }) {
370
- const { t: i } = w(), s = n.auth, a = r.providers ?? [], [l, d] = x("signin"), [p, u] = x(""), [h, b] = x(""), [_, f] = x(""), [g, A] = x(""), [M, k] = x(null), [E, I] = x(null), [O, B] = x(null), [R, q] = x(!1), [D, N] = x(null);
371
- T(() => {
373
+ function nt({ block: r, allowSignup: e, allowReset: t, ctx: n }) {
374
+ const { t: i } = k(), s = n.auth, a = r.providers ?? [], c = n.initialAuthMode === "signup" && e ? "signup" : "signin", [l, f] = x(c), [h, d] = x(""), [b, w] = x(""), [v, p] = x(""), [y, U] = x(""), [_, S] = x(null), [P, M] = x(null), [j, T] = x(null), [D, q] = x(!1), [E, L] = x(null);
375
+ O(() => {
372
376
  if (typeof s.getLastLogin != "function") return;
373
- let S = !1;
377
+ let I = !1;
374
378
  return s.getLastLogin().then(
375
- (P) => {
376
- S || !P || (N(P), P.email && u((V) => V === "" ? P.email : V));
379
+ (A) => {
380
+ I || !A || (L(A), A.email && d((V) => V === "" ? A.email : V));
377
381
  },
378
382
  () => {
379
383
  }
380
384
  ), () => {
381
- S = !0;
385
+ I = !0;
382
386
  };
383
387
  }, [s]);
384
- const L = (S) => {
385
- d(S), I(null), B(null), q(!1);
386
- }, C = async (S) => {
387
- if (S.preventDefault(), !M) {
388
- if (I(null), B(null), l === "signup" && !R) {
389
- if (!p.trim()) return;
388
+ const R = (I) => {
389
+ f(I), M(null), T(null), q(!1);
390
+ }, N = async (I) => {
391
+ if (I.preventDefault(), !_) {
392
+ if (M(null), T(null), l === "signup" && !D) {
393
+ if (!h.trim()) return;
390
394
  q(!0);
391
395
  return;
392
396
  }
393
- if (l === "signup" && h !== _) {
394
- I(i("auth.passwords_mismatch", "Passwords don't match"));
397
+ if (l === "signup" && b !== v) {
398
+ M(i("auth.passwords_mismatch", "Passwords don't match"));
395
399
  return;
396
400
  }
397
- k("email");
401
+ S("email");
398
402
  try {
399
- l === "signin" ? await s.signInWithEmail({ email: p, password: h }) : l === "signup" ? (await s.signUp({ email: p, password: h })).kind === "confirmation_required" && (d("reset_verify"), B(i("auth.check_email_message", "Check your email for a confirmation code."))) : l === "forgot" ? (await s.requestPasswordReset({ email: p }), d("reset_sent"), B(
403
+ l === "signin" ? await s.signInWithEmail({ email: h, password: b }) : l === "signup" ? (await s.signUp({ email: h, password: b })).kind === "confirmation_required" && (w(""), f("signup_verify"), T(i("auth.check_email_message", "Check your email for a confirmation code."))) : l === "forgot" ? (await s.requestPasswordReset({ email: h }), f("reset_sent"), T(
400
404
  i("auth.reset_sent_message", "If that email exists, a reset code has been sent.")
401
- )) : l === "reset_verify" && (await s.verifyOtp({
402
- email: p,
403
- token: g,
404
- type: h ? "recovery" : "email"
405
- }), h && await s.updatePassword({ password: h }));
406
- } catch (P) {
407
- I(fe(P, l === "signup" ? "signup" : l === "reset_verify" ? "otp" : l === "forgot" ? "reset" : "signin", i));
405
+ )) : l === "signup_verify" ? await s.verifyOtp({ email: h, token: y, type: "email" }) : l === "reset_verify" && (await s.verifyOtp({
406
+ email: h,
407
+ token: y,
408
+ type: b ? "recovery" : "email"
409
+ }), b && await s.updatePassword({ password: b }));
410
+ } catch (A) {
411
+ M(he(A, l === "signup" ? "signup" : l === "signup_verify" || l === "reset_verify" ? "otp" : l === "forgot" ? "reset" : "signin", i));
408
412
  } finally {
409
- k(null);
413
+ S(null);
410
414
  }
411
415
  }
412
- }, U = async (S) => {
413
- if (!M) {
414
- k(S), I(null), B(null);
416
+ }, Y = async (I) => {
417
+ if (!_) {
418
+ S(I), M(null), T(null);
415
419
  try {
416
420
  await s.signInWithOAuth({
417
- provider: S,
418
- onPopupOpened: () => k(null)
421
+ provider: I,
422
+ onPopupOpened: () => S(null)
419
423
  });
420
- } catch (P) {
421
- if (P instanceof j && (P.code === "oauth_cancelled" || P.code === "oauth_timeout"))
424
+ } catch (A) {
425
+ if (A instanceof B && (A.code === "oauth_cancelled" || A.code === "oauth_timeout"))
422
426
  return;
423
- I(fe(P, "signin", i));
427
+ M(he(A, "signin", i));
424
428
  } finally {
425
- k(null);
429
+ S(null);
426
430
  }
427
431
  }
428
- }, m = a.length > 0 && (l === "signin" || l === "signup"), y = l === "signin" || l === "signup" || l === "forgot", v = l === "signin" || l === "signup" && R;
429
- return /* @__PURE__ */ c("div", { class: "flex flex-col gap-5", children: [
430
- /* @__PURE__ */ o(ot, { mode: l, customHeading: r.heading, customSubheading: r.subheading }),
431
- m ? /* @__PURE__ */ c("div", { class: "flex flex-col gap-2.5", children: [
432
- a.map((S) => /* @__PURE__ */ c("div", { class: "relative", children: [
433
- /* @__PURE__ */ c(
432
+ }, m = a.length > 0 && (l === "signin" || l === "signup"), g = l === "signin" || l === "signup" || l === "forgot", C = l === "signin" || l === "signup" && D;
433
+ return /* @__PURE__ */ u("div", { class: "flex flex-col gap-5", children: [
434
+ /* @__PURE__ */ o(it, { mode: l, customHeading: r.heading, customSubheading: r.subheading }),
435
+ m ? /* @__PURE__ */ u("div", { class: "flex flex-col gap-2.5", children: [
436
+ a.map((I) => /* @__PURE__ */ u("div", { class: "relative", children: [
437
+ /* @__PURE__ */ u(
434
438
  "button",
435
439
  {
436
440
  type: "button",
437
- onClick: () => U(S),
438
- disabled: M !== null,
441
+ onClick: () => Y(I),
442
+ disabled: _ !== null,
439
443
  class: "flex h-12 w-full items-center justify-center gap-2.5 rounded-full border-1 border-gray-200 bg-white px-5 text-base font-medium text-gray-900 transition-all hover:border-gray-300 hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-60 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]",
440
444
  children: [
441
- M === S ? /* @__PURE__ */ o("span", { class: "inline-block h-4 w-4 animate-spin rounded-full border-2 border-gray-300 border-t-gray-700" }) : /* @__PURE__ */ o(ft, { provider: S }),
442
- /* @__PURE__ */ o("span", { children: rt(S, i) })
445
+ _ === I ? /* @__PURE__ */ o("span", { class: "inline-block h-4 w-4 animate-spin rounded-full border-2 border-gray-300 border-t-gray-700" }) : /* @__PURE__ */ o(ft, { provider: I }),
446
+ /* @__PURE__ */ o("span", { children: tt(I, i) })
443
447
  ]
444
448
  }
445
449
  ),
446
- D?.method === S ? /* @__PURE__ */ o(me, { email: D.email }) : null
447
- ] }, S)),
450
+ E?.method === I ? /* @__PURE__ */ o(dt, { email: E.email }) : null
451
+ ] }, I)),
448
452
  /* @__PURE__ */ o(pt, {})
449
453
  ] }) : null,
450
- /* @__PURE__ */ c("form", { onSubmit: C, class: "flex flex-col gap-3", children: [
451
- y && /* @__PURE__ */ o(
452
- ge,
454
+ /* @__PURE__ */ u("form", { onSubmit: N, class: "flex flex-col gap-3", children: [
455
+ g && /* @__PURE__ */ o(
456
+ pe,
453
457
  {
454
458
  type: "email",
455
459
  placeholder: i("auth.email", "Email address"),
456
- value: p,
457
- onInput: u,
460
+ value: h,
461
+ onInput: d,
458
462
  autocomplete: "email",
459
463
  required: !0
460
464
  }
461
465
  ),
462
- v && /* @__PURE__ */ o(
466
+ C && /* @__PURE__ */ o(
463
467
  ee,
464
468
  {
465
469
  placeholder: i("auth.password", "Password"),
466
- value: h,
467
- onInput: b,
470
+ value: b,
471
+ onInput: w,
468
472
  autocomplete: l === "signin" ? "current-password" : "new-password",
469
473
  required: !0
470
474
  }
471
475
  ),
472
- l === "signup" && R && /* @__PURE__ */ o(
476
+ l === "signup" && D && /* @__PURE__ */ o(
473
477
  ee,
474
478
  {
475
479
  placeholder: i("auth.repeat_password", "Repeat password"),
476
- value: _,
477
- onInput: f,
480
+ value: v,
481
+ onInput: p,
478
482
  autocomplete: "new-password",
479
483
  required: !0
480
484
  }
481
485
  ),
482
- l === "reset_verify" && /* @__PURE__ */ c(Y, { children: [
483
- /* @__PURE__ */ o(
484
- ge,
485
- {
486
- type: "text",
487
- placeholder: i("auth.confirmation_code", "Confirmation code"),
488
- value: g,
489
- onInput: A,
490
- autocomplete: "one-time-code",
491
- inputMode: "numeric",
492
- required: !0
493
- }
494
- ),
495
- /* @__PURE__ */ o(
496
- ee,
497
- {
498
- placeholder: i(
499
- "auth.new_password_optional",
500
- "New password (optional — only for password reset)"
501
- ),
502
- value: h,
503
- onInput: b,
504
- autocomplete: "new-password"
505
- }
506
- )
507
- ] }),
508
- l === "reset_sent" && O && /* @__PURE__ */ o("p", { class: "rounded-2xl bg-gray-100 px-4 py-3 text-sm text-gray-600", children: O }),
509
- l === "signin" && t && /* @__PURE__ */ o("div", { class: "flex justify-end text-sm", children: /* @__PURE__ */ o(Z, { onClick: () => L("forgot"), children: i("auth.forgot_password", "Forgot password?") }) }),
510
- E && /* @__PURE__ */ o("p", { class: "text-sm text-red-600", children: E }),
511
- O && l !== "reset_sent" && /* @__PURE__ */ o("p", { class: "text-sm text-gray-500", children: O }),
512
- l !== "reset_sent" && /* @__PURE__ */ c("div", { class: "relative", children: [
513
- /* @__PURE__ */ o(
514
- ct,
515
- {
516
- busy: M === "email",
517
- label: at(l, R, r.submit_label ?? r.heading, i)
518
- }
519
- ),
520
- l === "signin" && D?.method === "email" ? /* @__PURE__ */ o(me, { email: D.email }) : null
521
- ] })
486
+ (l === "signup_verify" || l === "reset_verify") && /* @__PURE__ */ o(
487
+ pe,
488
+ {
489
+ type: "text",
490
+ placeholder: i("auth.confirmation_code", "Confirmation code"),
491
+ value: y,
492
+ onInput: U,
493
+ autocomplete: "one-time-code",
494
+ inputMode: "numeric",
495
+ required: !0
496
+ }
497
+ ),
498
+ l === "reset_verify" && /* @__PURE__ */ o(
499
+ ee,
500
+ {
501
+ placeholder: i(
502
+ "auth.new_password_optional",
503
+ "New password (optional — only for password reset)"
504
+ ),
505
+ value: b,
506
+ onInput: w,
507
+ autocomplete: "new-password"
508
+ }
509
+ ),
510
+ l === "reset_sent" && j && /* @__PURE__ */ o("p", { class: "rounded-2xl bg-gray-100 px-4 py-3 text-sm text-gray-600", children: j }),
511
+ l === "signin" && t && /* @__PURE__ */ o("div", { class: "flex justify-end text-sm", children: /* @__PURE__ */ o(Z, { onClick: () => R("forgot"), children: i("auth.forgot_password", "Forgot password?") }) }),
512
+ P && /* @__PURE__ */ o("p", { class: "text-sm text-red-600", children: P }),
513
+ j && l !== "reset_sent" && /* @__PURE__ */ o("p", { class: "text-sm text-gray-500", children: j }),
514
+ l !== "reset_sent" && /* @__PURE__ */ o(
515
+ lt,
516
+ {
517
+ busy: _ === "email",
518
+ label: st(l, D, r.submit_label ?? r.heading, i)
519
+ }
520
+ )
522
521
  ] }),
523
522
  /* @__PURE__ */ o(
524
- lt,
523
+ at,
525
524
  {
526
525
  mode: l,
527
526
  allowSignup: e,
528
- onSwitch: L
527
+ onSwitch: R
529
528
  }
530
529
  )
531
530
  ] });
532
531
  }
533
- function ot({
532
+ function it({
534
533
  mode: r,
535
534
  customHeading: e,
536
535
  customSubheading: t
537
536
  }) {
538
- const { t: n } = w(), i = st(r, n), s = r === "signin" || r === "signup", a = s && e ? e : i.title, l = s && t !== void 0 ? t || null : i.subtitle;
539
- return /* @__PURE__ */ c("div", { class: "flex flex-col gap-2", children: [
537
+ const { t: n } = k(), i = ot(r, n), s = r === "signin" || r === "signup", a = s && e ? e : i.title, c = s && t !== void 0 ? t || null : i.subtitle;
538
+ return /* @__PURE__ */ u("div", { class: "flex flex-col gap-2", children: [
540
539
  /* @__PURE__ */ o("h2", { class: "text-3xl font-bold tracking-tight text-gray-900", children: a }),
541
- l ? /* @__PURE__ */ o("p", { class: "text-base leading-relaxed text-gray-600", children: l }) : null
540
+ c ? /* @__PURE__ */ o("p", { class: "text-base leading-relaxed text-gray-600", children: c }) : null
542
541
  ] });
543
542
  }
544
- function st(r, e) {
543
+ function ot(r, e) {
545
544
  switch (r) {
546
545
  case "signin":
547
546
  return {
@@ -574,9 +573,17 @@ function st(r, e) {
574
573
  "Enter the code from your email and a new password."
575
574
  )
576
575
  };
576
+ case "signup_verify":
577
+ return {
578
+ title: e("auth.confirm_email_title", "Confirm your email"),
579
+ subtitle: e(
580
+ "auth.confirm_email_subtitle",
581
+ "Enter the code we sent to your email to finish creating your account."
582
+ )
583
+ };
577
584
  }
578
585
  }
579
- function at(r, e, t, n) {
586
+ function st(r, e, t, n) {
580
587
  if (r === "signin" && t) return t;
581
588
  switch (r) {
582
589
  case "signin":
@@ -585,27 +592,28 @@ function at(r, e, t, n) {
585
592
  return e ? n("auth.create_account", "Create Account") : n("auth.sign_up", "Sign Up");
586
593
  case "forgot":
587
594
  return n("auth.send_reset", "Send Reset Email");
595
+ case "signup_verify":
588
596
  case "reset_verify":
589
597
  return n("auth.verify", "Verify");
590
598
  default:
591
599
  return n("cta.continue", "Continue");
592
600
  }
593
601
  }
594
- function lt({
602
+ function at({
595
603
  mode: r,
596
604
  allowSignup: e,
597
605
  onSwitch: t
598
606
  }) {
599
- const { t: n } = w();
600
- return r === "signin" && e ? /* @__PURE__ */ c("p", { class: "text-center text-sm text-gray-600", children: [
607
+ const { t: n } = k();
608
+ return r === "signin" && e ? /* @__PURE__ */ u("p", { class: "text-center text-sm text-gray-600", children: [
601
609
  n("auth.no_account", "Don't have an account?"),
602
610
  " ",
603
611
  /* @__PURE__ */ o(Z, { onClick: () => t("signup"), children: n("auth.sign_up_link", "Sign Up") })
604
- ] }) : r === "signup" ? /* @__PURE__ */ c("p", { class: "text-center text-sm text-gray-600", children: [
612
+ ] }) : r === "signup" || r === "signup_verify" ? /* @__PURE__ */ u("p", { class: "text-center text-sm text-gray-600", children: [
605
613
  n("auth.have_account", "Already have an account?"),
606
614
  " ",
607
615
  /* @__PURE__ */ o(Z, { onClick: () => t("signin"), children: n("auth.log_in_link", "Log In") })
608
- ] }) : r === "forgot" || r === "reset_sent" || r === "reset_verify" ? /* @__PURE__ */ c("p", { class: "text-center text-sm text-gray-600", children: [
616
+ ] }) : r === "forgot" || r === "reset_sent" || r === "reset_verify" ? /* @__PURE__ */ u("p", { class: "text-center text-sm text-gray-600", children: [
609
617
  n("auth.no_account", "Don't have an account?"),
610
618
  " ",
611
619
  /* @__PURE__ */ o(Z, { onClick: () => t("signup"), children: n("auth.sign_up_link", "Sign Up") })
@@ -626,7 +634,7 @@ function Z({
626
634
  }
627
635
  );
628
636
  }
629
- function ct({ busy: r, label: e }) {
637
+ function lt({ busy: r, label: e }) {
630
638
  return /* @__PURE__ */ o(
631
639
  "button",
632
640
  {
@@ -641,14 +649,14 @@ function ct({ busy: r, label: e }) {
641
649
  }
642
650
  );
643
651
  }
644
- function ge({ type: r, placeholder: e, value: t, onInput: n, autocomplete: i, inputMode: s, required: a }) {
652
+ function pe({ type: r, placeholder: e, value: t, onInput: n, autocomplete: i, inputMode: s, required: a }) {
645
653
  return /* @__PURE__ */ o(
646
654
  "input",
647
655
  {
648
656
  type: r,
649
657
  value: t,
650
658
  placeholder: e,
651
- onInput: (l) => n(l.target.value),
659
+ onInput: (c) => n(c.target.value),
652
660
  autocomplete: i,
653
661
  inputMode: s,
654
662
  required: a,
@@ -657,21 +665,21 @@ function ge({ type: r, placeholder: e, value: t, onInput: n, autocomplete: i, in
657
665
  );
658
666
  }
659
667
  function ee({ placeholder: r, value: e, onInput: t, autocomplete: n, required: i }) {
660
- const { t: s } = w(), [a, l] = x(!1), d = z(null);
661
- T(() => {
662
- const h = d.current;
663
- h && h.value !== e && (h.value = e);
668
+ const { t: s } = k(), [a, c] = x(!1), l = z(null);
669
+ O(() => {
670
+ const d = l.current;
671
+ d && d.value !== e && (d.value = e);
664
672
  }, [a, e]);
665
- const p = s("auth.show_password", "Show password"), u = s("auth.hide_password", "Hide password");
666
- return /* @__PURE__ */ c("div", { class: "relative", children: [
673
+ const f = s("auth.show_password", "Show password"), h = s("auth.hide_password", "Hide password");
674
+ return /* @__PURE__ */ u("div", { class: "relative", children: [
667
675
  /* @__PURE__ */ o(
668
676
  "input",
669
677
  {
670
- ref: d,
678
+ ref: l,
671
679
  type: a ? "text" : "password",
672
680
  value: e,
673
681
  placeholder: r,
674
- onInput: (h) => t(h.target.value),
682
+ onInput: (d) => t(d.target.value),
675
683
  autocomplete: n,
676
684
  required: i,
677
685
  class: "h-14 w-full rounded-2xl bg-gray-100 pl-5 pr-12 text-base text-gray-900 outline-none transition-all placeholder:text-gray-500 hover:bg-gray-200/60 focus:bg-gray-200/60 focus:shadow-[0_0_0_2px_color-mix(in_srgb,var(--pw-accent)_30%,transparent)]"
@@ -681,17 +689,17 @@ function ee({ placeholder: r, value: e, onInput: t, autocomplete: n, required: i
681
689
  "button",
682
690
  {
683
691
  type: "button",
684
- onClick: () => l((h) => !h),
685
- "aria-label": a ? u : p,
692
+ onClick: () => c((d) => !d),
693
+ "aria-label": a ? h : f,
686
694
  tabIndex: -1,
687
695
  class: "absolute right-4 top-1/2 -translate-y-1/2 flex h-6 w-6 items-center justify-center rounded text-gray-500 transition-colors hover:text-gray-700 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]",
688
- children: a ? /* @__PURE__ */ o(dt, {}) : /* @__PURE__ */ o(ut, {})
696
+ children: a ? /* @__PURE__ */ o(ut, {}) : /* @__PURE__ */ o(ct, {})
689
697
  }
690
698
  )
691
699
  ] });
692
700
  }
693
- function ut() {
694
- return /* @__PURE__ */ c("svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
701
+ function ct() {
702
+ return /* @__PURE__ */ u("svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
695
703
  /* @__PURE__ */ o(
696
704
  "path",
697
705
  {
@@ -705,8 +713,8 @@ function ut() {
705
713
  /* @__PURE__ */ o("circle", { cx: "10", cy: "10", r: "2.5", stroke: "currentColor", "stroke-width": "1.5" })
706
714
  ] });
707
715
  }
708
- function dt() {
709
- return /* @__PURE__ */ c("svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
716
+ function ut() {
717
+ return /* @__PURE__ */ u("svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
710
718
  /* @__PURE__ */ o(
711
719
  "path",
712
720
  {
@@ -729,8 +737,8 @@ function dt() {
729
737
  )
730
738
  ] });
731
739
  }
732
- function me({ email: r }) {
733
- const { t: e } = w(), t = r ? e("auth.last_used", "Last · {email}", { email: ht(r) }) : e("auth.last_used_no_email", "Last");
740
+ function dt({ email: r }) {
741
+ const { t: e } = k(), t = r ? e("auth.last_used", "Last · {email}", { email: ht(r) }) : e("auth.last_used_no_email", "Last");
734
742
  return /* @__PURE__ */ o("span", { class: "pointer-events-none absolute -top-2 right-3 max-w-[75%] truncate rounded-full bg-gray-900 px-2 py-0.5 text-[10px] font-semibold tracking-wide text-white shadow-sm", children: t });
735
743
  }
736
744
  function ht(r) {
@@ -738,15 +746,15 @@ function ht(r) {
738
746
  return t ? `${e.slice(0, 3)}*****@${t}` : r;
739
747
  }
740
748
  function pt() {
741
- const { t: r } = w();
742
- return /* @__PURE__ */ c("div", { class: "flex items-center gap-3 py-1 text-sm text-gray-400", children: [
749
+ const { t: r } = k();
750
+ return /* @__PURE__ */ u("div", { class: "flex items-center gap-3 py-1 text-sm text-gray-400", children: [
743
751
  /* @__PURE__ */ o("div", { class: "h-px flex-1 bg-gray-200" }),
744
752
  /* @__PURE__ */ o("span", { children: r("auth.or", "or") }),
745
753
  /* @__PURE__ */ o("div", { class: "h-px flex-1 bg-gray-200" })
746
754
  ] });
747
755
  }
748
756
  function ft({ provider: r }) {
749
- return r === "google" ? /* @__PURE__ */ c("svg", { width: "20", height: "20", viewBox: "0 0 18 18", "aria-hidden": "true", children: [
757
+ return r === "google" ? /* @__PURE__ */ u("svg", { width: "20", height: "20", viewBox: "0 0 18 18", "aria-hidden": "true", children: [
750
758
  /* @__PURE__ */ o("path", { fill: "#4285F4", d: "M17.64 9.2c0-.64-.06-1.25-.16-1.84H9v3.49h4.84a4.14 4.14 0 0 1-1.79 2.71v2.26h2.9c1.7-1.56 2.69-3.87 2.69-6.62Z" }),
751
759
  /* @__PURE__ */ o("path", { fill: "#34A853", d: "M9 18c2.43 0 4.47-.8 5.96-2.18l-2.9-2.26c-.8.54-1.83.86-3.06.86-2.36 0-4.36-1.59-5.07-3.74H.92v2.33A9 9 0 0 0 9 18Z" }),
752
760
  /* @__PURE__ */ o("path", { fill: "#FBBC05", d: "M3.93 10.68a5.4 5.4 0 0 1 0-3.36V4.99H.92a9 9 0 0 0 0 8.02l3-2.33Z" }),
@@ -765,9 +773,10 @@ function gt({
765
773
  authSession: n,
766
774
  onBack: i,
767
775
  showBack: s = !0,
768
- intent: a = "preauth"
776
+ intent: a = "preauth",
777
+ initialMode: c
769
778
  }) {
770
- const { t: l } = w(), d = {
779
+ const { t: l } = k(), f = {
771
780
  bootstrap: e,
772
781
  selectedPriceId: null,
773
782
  setSelectedPriceId: () => {
@@ -775,8 +784,9 @@ function gt({
775
784
  onAction: () => {
776
785
  },
777
786
  auth: t,
778
- authSession: n
779
- }, p = a === "restore" ? {
787
+ authSession: n,
788
+ initialAuthMode: c
789
+ }, h = a === "restore" ? {
780
790
  ...r,
781
791
  heading: l("auth.restore_purchases_heading", "Restore Purchases"),
782
792
  subheading: l(
@@ -796,9 +806,9 @@ function gt({
796
806
  // переносятся на 2 строки. Явный короткий submit_label решает.
797
807
  submit_label: l("auth.log_in", "Sign In")
798
808
  } : r;
799
- return /* @__PURE__ */ c("div", { class: "relative flex-1 min-h-0 overflow-y-auto p-6 sm:p-8", children: [
809
+ return /* @__PURE__ */ u("div", { class: "relative flex-1 min-h-0 overflow-y-auto p-6 sm:p-8", children: [
800
810
  s ? /* @__PURE__ */ o(mt, { onClick: i, ariaLabel: l("nav.back_aria", "Back") }) : null,
801
- /* @__PURE__ */ o(Ee, { block: p, ctx: d })
811
+ /* @__PURE__ */ o(Ae, { block: h, ctx: f })
802
812
  ] });
803
813
  }
804
814
  function mt({ onClick: r, ariaLabel: e }) {
@@ -809,7 +819,7 @@ function mt({ onClick: r, ariaLabel: e }) {
809
819
  onClick: r,
810
820
  "aria-label": e,
811
821
  class: "absolute right-4 top-4 z-10 flex h-8 w-8 items-center justify-center rounded-full text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-700 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]",
812
- children: /* @__PURE__ */ c("svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
822
+ children: /* @__PURE__ */ u("svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
813
823
  /* @__PURE__ */ o(
814
824
  "path",
815
825
  {
@@ -834,70 +844,7 @@ function mt({ onClick: r, ariaLabel: e }) {
834
844
  }
835
845
  );
836
846
  }
837
- function yt({
838
- auth: r,
839
- onSuccess: e,
840
- onBack: t,
841
- heading: n,
842
- description: i
843
- }) {
844
- const { t: s } = w(), a = n ?? s("anon.heading_default", "Continue as guest"), l = i ?? s("anon.description_default", "Setting up your guest session…"), [d, p] = x({ kind: "signing-in" }), u = z(!0);
845
- T(() => () => {
846
- u.current = !1;
847
- }, []);
848
- const h = () => {
849
- p({ kind: "signing-in" }), (async () => {
850
- try {
851
- const b = await r.signInAnonymously();
852
- if (!u.current) return;
853
- e(b);
854
- } catch (b) {
855
- if (!u.current) return;
856
- p({
857
- kind: "error",
858
- message: b instanceof Error ? b.message : "Anonymous sign-in failed"
859
- });
860
- }
861
- })();
862
- };
863
- return T(() => {
864
- h();
865
- }, []), /* @__PURE__ */ c("div", { class: "flex flex-col gap-3", children: [
866
- t ? /* @__PURE__ */ o(
867
- "button",
868
- {
869
- type: "button",
870
- onClick: t,
871
- class: "-ml-1 self-start rounded-md px-1.5 py-0.5 text-xs font-medium text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]",
872
- children: s("nav.back", "← Back")
873
- }
874
- ) : null,
875
- /* @__PURE__ */ c("div", { class: "flex flex-col gap-1", children: [
876
- /* @__PURE__ */ o("h2", { class: "text-xl font-semibold text-gray-900", children: a }),
877
- /* @__PURE__ */ o("p", { class: "text-sm text-gray-500", children: l })
878
- ] }),
879
- d.kind === "signing-in" ? /* @__PURE__ */ o("div", { class: "flex items-center justify-center py-6", children: /* @__PURE__ */ o(xt, {}) }) : null,
880
- d.kind === "error" ? /* @__PURE__ */ c("div", { class: "flex flex-col gap-3", children: [
881
- /* @__PURE__ */ o("div", { class: "rounded-lg bg-red-50 px-3 py-2 text-sm text-red-700", children: d.message }),
882
- /* @__PURE__ */ o(
883
- "button",
884
- {
885
- type: "button",
886
- onClick: h,
887
- class: "self-start rounded-md bg-[var(--pw-accent)] px-3 py-1.5 text-sm font-medium text-white hover:opacity-90 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)] focus-visible:ring-offset-2",
888
- children: s("anon.try_again", "Try again")
889
- }
890
- )
891
- ] }) : null
892
- ] });
893
- }
894
- function xt() {
895
- return /* @__PURE__ */ c("svg", { class: "h-5 w-5 animate-spin text-[var(--pw-accent)]", viewBox: "0 0 24 24", fill: "none", children: [
896
- /* @__PURE__ */ o("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", "stroke-width": "3", "stroke-opacity": "0.2" }),
897
- /* @__PURE__ */ o("path", { d: "M22 12a10 10 0 0 0-10-10", stroke: "currentColor", "stroke-width": "3", "stroke-linecap": "round" })
898
- ] });
899
- }
900
- const Pe = (r) => `pw-offer-${r}-start`;
847
+ const Le = (r) => `pw-offer-${r}-start`;
901
848
  function te(r) {
902
849
  const e = r - Date.now();
903
850
  return e <= 0 ? { days: 0, hours: 0, minutes: 0, seconds: 0, expired: !0 } : {
@@ -908,7 +855,7 @@ function te(r) {
908
855
  expired: !1
909
856
  };
910
857
  }
911
- function bt(r) {
858
+ function yt(r) {
912
859
  if (r.expires_at) {
913
860
  const e = Date.parse(r.expires_at);
914
861
  return Number.isFinite(e) ? e : null;
@@ -916,7 +863,7 @@ function bt(r) {
916
863
  if (r.duration_minutes && r.duration_minutes > 0) {
917
864
  if (typeof window > "u") return null;
918
865
  try {
919
- const e = Pe(r.id);
866
+ const e = Le(r.id);
920
867
  let t = window.localStorage.getItem(e);
921
868
  return t || (t = (/* @__PURE__ */ new Date()).toISOString(), window.localStorage.setItem(e, t)), Date.parse(t) + r.duration_minutes * 6e4;
922
869
  } catch {
@@ -925,7 +872,7 @@ function bt(r) {
925
872
  }
926
873
  return null;
927
874
  }
928
- function Te(r, e) {
875
+ function Me(r, e) {
929
876
  if (!r || r.length === 0) return null;
930
877
  if (e) {
931
878
  const t = r.find((n) => n.id === e);
@@ -933,11 +880,11 @@ function Te(r, e) {
933
880
  }
934
881
  return r.find((t) => t.expires_at || t.duration_minutes) ?? null;
935
882
  }
936
- function Me(r) {
937
- const e = r ? bt(r) : null, [t, n] = x(
883
+ function Ee(r) {
884
+ const e = r ? yt(r) : null, [t, n] = x(
938
885
  () => e !== null ? te(e) : null
939
886
  ), i = z(e);
940
- return i.current = e, T(() => {
887
+ return i.current = e, O(() => {
941
888
  if (e === null) {
942
889
  n(null);
943
890
  return;
@@ -947,18 +894,18 @@ function Me(r) {
947
894
  const a = te(i.current ?? 0);
948
895
  if (n(a), a.expired && (clearInterval(s), r?.duration_minutes && typeof window < "u"))
949
896
  try {
950
- window.localStorage.removeItem(Pe(r.id));
897
+ window.localStorage.removeItem(Le(r.id));
951
898
  } catch {
952
899
  }
953
900
  }, 1e3);
954
901
  return () => clearInterval(s);
955
902
  }, [e, r?.duration_minutes, r?.id]), t;
956
903
  }
957
- function wt({ block: r, ctx: e }) {
958
- const { t } = w(), n = Te(e.bootstrap.offers, r.offer_id), i = Me(n);
904
+ function xt({ block: r, ctx: e }) {
905
+ const { t } = k(), n = Me(e.bootstrap.offers, r.offer_id), i = Ee(n);
959
906
  if (!n || i === null || i.expired && !r.force) return null;
960
907
  const s = r.title ?? n.label ?? t("offer.limited_time", "Limited-time offer"), a = n.discount_percent ? `${s} ${n.discount_percent}%` : s;
961
- return /* @__PURE__ */ c(
908
+ return /* @__PURE__ */ u(
962
909
  "div",
963
910
  {
964
911
  class: "flex flex-wrap items-center justify-center gap-2 rounded-2xl px-4 py-3 text-[15px] font-semibold leading-tight text-white",
@@ -968,16 +915,16 @@ function wt({ block: r, ctx: e }) {
968
915
  },
969
916
  role: "status",
970
917
  children: [
971
- /* @__PURE__ */ o(Oe, {}),
918
+ /* @__PURE__ */ o(Te, {}),
972
919
  /* @__PURE__ */ o("span", { children: a }),
973
- /* @__PURE__ */ o(Be, { value: i, t })
920
+ /* @__PURE__ */ o(Pe, { value: i, t })
974
921
  ]
975
922
  }
976
923
  );
977
924
  }
978
- function Be({ value: r, t: e }) {
979
- return /* @__PURE__ */ c("div", { class: "flex items-center gap-1 font-mono text-sm", children: [
980
- r.days > 0 ? /* @__PURE__ */ c(Y, { children: [
925
+ function Pe({ value: r, t: e }) {
926
+ return /* @__PURE__ */ u("div", { class: "flex items-center gap-1 font-mono text-sm", children: [
927
+ r.days > 0 ? /* @__PURE__ */ u(oe, { children: [
981
928
  /* @__PURE__ */ o($, { children: String(r.days) }),
982
929
  /* @__PURE__ */ o("span", { class: "text-xs", children: e("countdown.d", "d") })
983
930
  ] }) : null,
@@ -992,11 +939,11 @@ function Be({ value: r, t: e }) {
992
939
  function $({ children: r }) {
993
940
  return /* @__PURE__ */ o("span", { class: "rounded bg-black/20 px-1.5 py-0.5 text-xs font-bold", children: r });
994
941
  }
995
- function kt({ offer: r }) {
996
- const { t: e } = w(), t = Me(r);
942
+ function bt({ offer: r }) {
943
+ const { t: e } = k(), t = Ee(r);
997
944
  if (t === null || t.expired) return null;
998
945
  const n = r.label ?? e("offer.limited_time", "Limited-time offer"), i = r.discount_percent ? `${n} ${r.discount_percent}%` : n;
999
- return /* @__PURE__ */ c(
946
+ return /* @__PURE__ */ u(
1000
947
  "div",
1001
948
  {
1002
949
  class: "-mb-2 flex flex-wrap items-center justify-center gap-2 rounded-t-xl px-4 pb-5 pt-3 text-[15px] font-semibold leading-tight text-white",
@@ -1006,14 +953,14 @@ function kt({ offer: r }) {
1006
953
  },
1007
954
  role: "status",
1008
955
  children: [
1009
- /* @__PURE__ */ o(Oe, {}),
956
+ /* @__PURE__ */ o(Te, {}),
1010
957
  /* @__PURE__ */ o("span", { children: i }),
1011
- /* @__PURE__ */ o(Be, { value: t, t: e })
958
+ /* @__PURE__ */ o(Pe, { value: t, t: e })
1012
959
  ]
1013
960
  }
1014
961
  );
1015
962
  }
1016
- function Oe() {
963
+ function Te() {
1017
964
  return /* @__PURE__ */ o(
1018
965
  "svg",
1019
966
  {
@@ -1032,43 +979,40 @@ function Oe() {
1032
979
  }
1033
980
  );
1034
981
  }
1035
- const re = 3, ne = 200, ie = 5e3, oe = 5, vt = 10 * 1024 * 1024, ye = ["image/jpeg", "image/png", "image/webp"], xe = /.+@.+\..+/;
1036
- function _t({ client: r, authSession: e, origin: t, onBack: n }) {
1037
- const { t: i } = w(), s = e?.user.email ?? "", a = s || null, [l, d] = x(s), [p, u] = x(""), [h, b] = x(""), [_, f] = x([]), [g, A] = x(!1), [M, k] = x(null), [E, I] = x({}), O = _e(() => {
1038
- const L = (a ?? l).trim().toLowerCase(), C = p.trim(), U = h.trim();
1039
- return xe.test(L) && C.length >= re && C.length <= ne && U.length >= 1 && U.length <= ie;
1040
- }, [a, l, p, h]), B = () => {
1041
- const L = {}, C = (a ?? l).trim(), U = p.trim(), m = h.trim();
1042
- return C ? xe.test(C.toLowerCase()) || (L.email = i("support.invalid_email", "Invalid email")) : L.email = i("support.required", "Required"), (U.length < re || U.length > ne) && (L.subject = i("support.subject_length", "{min}–{max} characters", {
1043
- min: re,
1044
- max: ne
1045
- })), (m.length < 1 || m.length > ie) && (L.message = i("support.message_length", "{min}–{max} characters", {
982
+ const fe = 3, ge = 200, me = 5e3, re = 5, wt = 10 * 1024 * 1024, ye = ["image/jpeg", "image/png", "image/webp"], kt = /.+@.+\..+/;
983
+ function vt({ client: r, authSession: e, origin: t, onBack: n }) {
984
+ const { t: i } = k(), s = e?.user.email ?? "", a = s || null, [c, l] = x(s), [f, h] = x(""), [d, b] = x(""), [w, v] = x([]), [p, y] = x(!1), [U, _] = x(null), [S, P] = x({}), M = () => {
985
+ const E = {}, L = (a ?? c).trim(), R = f.trim(), N = d.trim();
986
+ return L ? kt.test(L.toLowerCase()) || (E.email = i("support.invalid_email", "Invalid email")) : E.email = i("support.required", "Required"), (R.length < fe || R.length > ge) && (E.subject = i("support.subject_length", "{min}–{max} characters", {
987
+ min: fe,
988
+ max: ge
989
+ })), (N.length < 1 || N.length > me) && (E.message = i("support.message_length", "{min}–{max} characters", {
1046
990
  min: 1,
1047
- max: ie
1048
- })), I(L), Object.keys(L).length === 0;
1049
- }, R = async (L) => {
1050
- if (L.preventDefault(), !g && B()) {
1051
- A(!0), I((C) => ({ ...C, submit: void 0 }));
991
+ max: me
992
+ })), P(E), Object.keys(E).length === 0;
993
+ }, j = async (E) => {
994
+ if (E.preventDefault(), !p && M()) {
995
+ y(!0), P((L) => ({ ...L, submit: void 0 }));
1052
996
  try {
1053
- const C = (a ?? l).trim();
997
+ const L = (a ?? c).trim();
1054
998
  await r.createSupportTicket({
1055
- subject: p.trim(),
1056
- content: h.trim(),
1057
- email: C || void 0,
1058
- files: _.length > 0 ? _ : void 0
1059
- }), k(C);
1060
- } catch (C) {
1061
- const U = C instanceof j && C.message || "Failed to send. Please try again.";
1062
- I((m) => ({ ...m, submit: U }));
999
+ subject: f.trim(),
1000
+ content: d.trim(),
1001
+ email: L || void 0,
1002
+ files: w.length > 0 ? w : void 0
1003
+ }), _(L);
1004
+ } catch (L) {
1005
+ const R = L instanceof B && L.message || "Failed to send. Please try again.";
1006
+ P((N) => ({ ...N, submit: R }));
1063
1007
  } finally {
1064
- A(!1);
1008
+ y(!1);
1065
1009
  }
1066
1010
  }
1067
- }, q = () => {
1068
- u(""), b(""), f([]), I({}), k(null);
1069
- }, D = "flex flex-col gap-3 bg-white px-6 pb-6 pt-3 sm:px-8", N = { boxShadow: "0 -4px 12px -4px rgba(15,23,42,0.06)" };
1070
- return M ? /* @__PURE__ */ c("div", { class: "relative flex-1 min-h-0 flex flex-col", children: [
1071
- /* @__PURE__ */ c("div", { class: "flex-1 min-h-0 overflow-y-auto flex flex-col items-center gap-4 px-6 pb-3 pt-6 sm:px-8 sm:pb-4 sm:pt-8 text-center", children: [
1011
+ }, T = () => {
1012
+ h(""), b(""), v([]), P({}), _(null);
1013
+ }, D = "flex flex-col gap-3 bg-white px-6 pb-6 pt-3 sm:px-8", q = { boxShadow: "0 -4px 12px -4px rgba(15,23,42,0.06)" };
1014
+ return U ? /* @__PURE__ */ u("div", { class: "relative flex-1 min-h-0 flex flex-col", children: [
1015
+ /* @__PURE__ */ u("div", { class: "flex-1 min-h-0 overflow-y-auto flex flex-col items-center gap-4 px-6 pb-3 pt-6 sm:px-8 sm:pb-4 sm:pt-8 text-center", children: [
1072
1016
  /* @__PURE__ */ o(
1073
1017
  "div",
1074
1018
  {
@@ -1089,17 +1033,17 @@ function _t({ client: r, authSession: e, origin: t, onBack: n }) {
1089
1033
  }
1090
1034
  ),
1091
1035
  /* @__PURE__ */ o("div", { class: "text-lg font-semibold tracking-tight text-gray-900", children: i("support.success_heading", "Request submitted") }),
1092
- /* @__PURE__ */ c("div", { class: "max-w-[320px] text-sm leading-relaxed text-gray-500", children: [
1036
+ /* @__PURE__ */ u("div", { class: "max-w-[320px] text-sm leading-relaxed text-gray-500", children: [
1093
1037
  i(
1094
1038
  "support.success_message_prefix",
1095
1039
  "We've received your message and will respond to"
1096
1040
  ),
1097
1041
  " ",
1098
- /* @__PURE__ */ o("b", { class: "text-gray-700", children: M }),
1042
+ /* @__PURE__ */ o("b", { class: "text-gray-700", children: U }),
1099
1043
  "."
1100
1044
  ] })
1101
1045
  ] }),
1102
- /* @__PURE__ */ o("div", { class: D, style: N, children: /* @__PURE__ */ c("div", { class: "flex items-center justify-center gap-3", children: [
1046
+ /* @__PURE__ */ o("div", { class: D, style: q, children: /* @__PURE__ */ u("div", { class: "flex items-center justify-center gap-3", children: [
1103
1047
  /* @__PURE__ */ o(
1104
1048
  "button",
1105
1049
  {
@@ -1113,7 +1057,7 @@ function _t({ client: r, authSession: e, origin: t, onBack: n }) {
1113
1057
  "button",
1114
1058
  {
1115
1059
  type: "button",
1116
- onClick: q,
1060
+ onClick: T,
1117
1061
  class: "flex h-10 items-center justify-center rounded-xl px-4 text-sm font-semibold text-white transition-all hover:-translate-y-px hover:brightness-105 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[var(--pw-accent)]",
1118
1062
  style: {
1119
1063
  background: "linear-gradient(180deg, color-mix(in srgb, var(--pw-accent) 92%, white), var(--pw-accent))",
@@ -1123,63 +1067,63 @@ function _t({ client: r, authSession: e, origin: t, onBack: n }) {
1123
1067
  }
1124
1068
  )
1125
1069
  ] }) })
1126
- ] }) : /* @__PURE__ */ c("form", { onSubmit: R, class: "relative flex-1 min-h-0 flex flex-col", children: [
1127
- /* @__PURE__ */ o(St, { onClick: n, ariaLabel: i("nav.back_aria", "Back") }),
1128
- /* @__PURE__ */ o("div", { class: "flex-1 min-h-0 overflow-y-auto px-6 pb-3 pt-6 sm:px-8 sm:pb-4 sm:pt-8", children: /* @__PURE__ */ c("div", { class: "flex flex-col gap-5", children: [
1129
- /* @__PURE__ */ c("div", { class: "flex flex-col gap-2 pr-10", children: [
1070
+ ] }) : /* @__PURE__ */ u("form", { onSubmit: j, class: "relative flex-1 min-h-0 flex flex-col", children: [
1071
+ /* @__PURE__ */ o(_t, { onClick: n, ariaLabel: i("nav.back_aria", "Back") }),
1072
+ /* @__PURE__ */ o("div", { class: "flex-1 min-h-0 overflow-y-auto px-6 pb-3 pt-6 sm:px-8 sm:pb-4 sm:pt-8", children: /* @__PURE__ */ u("div", { class: "flex flex-col gap-5", children: [
1073
+ /* @__PURE__ */ u("div", { class: "flex flex-col gap-2 pr-10", children: [
1130
1074
  /* @__PURE__ */ o("h2", { class: "text-3xl font-bold tracking-tight text-gray-900", children: i("support.heading", "Support") }),
1131
1075
  /* @__PURE__ */ o("p", { class: "text-base leading-relaxed text-gray-600", children: i("support.instruction", "Please fill out the form below to submit your support request.") })
1132
1076
  ] }),
1133
- /* @__PURE__ */ c("div", { class: "flex flex-col gap-3", children: [
1134
- a ? /* @__PURE__ */ c("div", { class: "rounded-2xl bg-gray-100 px-5 py-3 text-sm text-gray-600", children: [
1077
+ /* @__PURE__ */ u("div", { class: "flex flex-col gap-3", children: [
1078
+ a ? /* @__PURE__ */ u("div", { class: "rounded-2xl bg-gray-100 px-5 py-3 text-sm text-gray-600", children: [
1135
1079
  i("support.sending_as", "Sending as"),
1136
1080
  " ",
1137
1081
  /* @__PURE__ */ o("b", { class: "font-medium text-gray-900", children: a })
1138
1082
  ] }) : /* @__PURE__ */ o(
1139
- be,
1083
+ xe,
1140
1084
  {
1141
1085
  type: "email",
1142
1086
  placeholder: i("support.email_placeholder", "Enter your email *"),
1143
- value: l,
1144
- onInput: d,
1145
- error: E.email,
1087
+ value: c,
1088
+ onInput: l,
1089
+ error: S.email,
1146
1090
  autocomplete: "email",
1147
1091
  required: !0
1148
1092
  }
1149
1093
  ),
1150
1094
  /* @__PURE__ */ o(
1151
- be,
1095
+ xe,
1152
1096
  {
1153
1097
  type: "text",
1154
1098
  placeholder: i("support.subject_placeholder", "Enter your subject *"),
1155
- value: p,
1156
- onInput: u,
1157
- error: E.subject,
1099
+ value: f,
1100
+ onInput: h,
1101
+ error: S.subject,
1158
1102
  required: !0
1159
1103
  }
1160
1104
  ),
1161
1105
  /* @__PURE__ */ o(
1162
- Ct,
1106
+ St,
1163
1107
  {
1164
1108
  placeholder: i("support.message_placeholder", "Enter your message *"),
1165
- value: h,
1109
+ value: d,
1166
1110
  onInput: b,
1167
- error: E.message,
1111
+ error: S.message,
1168
1112
  required: !0
1169
1113
  }
1170
1114
  ),
1171
- /* @__PURE__ */ o(It, { files: _, onChange: f, disabled: g })
1115
+ /* @__PURE__ */ o(Ct, { files: w, onChange: v, disabled: p })
1172
1116
  ] })
1173
1117
  ] }) }),
1174
- /* @__PURE__ */ c("div", { class: D, style: N, children: [
1175
- E.submit && /* @__PURE__ */ o("p", { class: "text-sm text-red-600", children: E.submit }),
1176
- /* @__PURE__ */ c("div", { class: "flex items-center justify-end gap-3", children: [
1118
+ /* @__PURE__ */ u("div", { class: D, style: q, children: [
1119
+ S.submit && /* @__PURE__ */ o("p", { class: "text-sm text-red-600", children: S.submit }),
1120
+ /* @__PURE__ */ u("div", { class: "flex items-center justify-end gap-3", children: [
1177
1121
  /* @__PURE__ */ o(
1178
1122
  "button",
1179
1123
  {
1180
1124
  type: "button",
1181
1125
  onClick: n,
1182
- disabled: g,
1126
+ disabled: p,
1183
1127
  class: "rounded-full px-4 py-2 text-base font-medium text-gray-700 transition-colors hover:bg-gray-100 disabled:cursor-not-allowed disabled:opacity-60 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]",
1184
1128
  children: t === "standalone" ? i("support.close_button", "Close") : i("nav.back_aria", "Back")
1185
1129
  }
@@ -1188,20 +1132,20 @@ function _t({ client: r, authSession: e, origin: t, onBack: n }) {
1188
1132
  "button",
1189
1133
  {
1190
1134
  type: "submit",
1191
- disabled: !O || g,
1135
+ disabled: p,
1192
1136
  class: "pw-cta-shimmer relative flex h-12 items-center justify-center overflow-hidden rounded-full px-8 text-base font-semibold text-white transition-transform duration-150 active:scale-[0.98] disabled:cursor-not-allowed disabled:opacity-60 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[var(--pw-accent)]",
1193
1137
  style: {
1194
1138
  background: "linear-gradient(135deg, color-mix(in srgb, var(--pw-accent) 55%, white) 0%, var(--pw-accent) 55%, color-mix(in srgb, var(--pw-accent) 90%, black) 100%)",
1195
1139
  boxShadow: "0 0 20px 0 color-mix(in srgb, var(--pw-accent) 25%, transparent), inset 0 0 8px 0 color-mix(in srgb, white 25%, transparent)"
1196
1140
  },
1197
- children: g ? /* @__PURE__ */ o("span", { class: "relative z-10 inline-block h-4 w-4 animate-spin rounded-full border-2 border-white/40 border-t-white" }) : /* @__PURE__ */ o("span", { class: "relative z-10", children: i("support.send_button", "Send") })
1141
+ children: p ? /* @__PURE__ */ o("span", { class: "relative z-10 inline-block h-4 w-4 animate-spin rounded-full border-2 border-white/40 border-t-white" }) : /* @__PURE__ */ o("span", { class: "relative z-10", children: i("support.send_button", "Send") })
1198
1142
  }
1199
1143
  )
1200
1144
  ] })
1201
1145
  ] })
1202
1146
  ] });
1203
1147
  }
1204
- function St({ onClick: r, ariaLabel: e }) {
1148
+ function _t({ onClick: r, ariaLabel: e }) {
1205
1149
  return /* @__PURE__ */ o(
1206
1150
  "button",
1207
1151
  {
@@ -1209,7 +1153,7 @@ function St({ onClick: r, ariaLabel: e }) {
1209
1153
  onClick: r,
1210
1154
  "aria-label": e,
1211
1155
  class: "absolute right-4 top-4 z-10 flex h-8 w-8 items-center justify-center rounded-full text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-700 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]",
1212
- children: /* @__PURE__ */ c("svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
1156
+ children: /* @__PURE__ */ u("svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
1213
1157
  /* @__PURE__ */ o(
1214
1158
  "path",
1215
1159
  {
@@ -1234,7 +1178,7 @@ function St({ onClick: r, ariaLabel: e }) {
1234
1178
  }
1235
1179
  );
1236
1180
  }
1237
- function be({
1181
+ function xe({
1238
1182
  type: r,
1239
1183
  placeholder: e,
1240
1184
  value: t,
@@ -1243,14 +1187,14 @@ function be({
1243
1187
  autocomplete: s,
1244
1188
  required: a
1245
1189
  }) {
1246
- return /* @__PURE__ */ c("div", { children: [
1190
+ return /* @__PURE__ */ u("div", { children: [
1247
1191
  /* @__PURE__ */ o(
1248
1192
  "input",
1249
1193
  {
1250
1194
  type: r,
1251
1195
  value: t,
1252
1196
  placeholder: e,
1253
- onInput: (l) => n(l.target.value),
1197
+ onInput: (c) => n(c.target.value),
1254
1198
  autocomplete: s,
1255
1199
  required: a,
1256
1200
  class: `h-14 w-full rounded-2xl bg-gray-100 px-5 text-base text-gray-900 outline-none transition-all placeholder:text-gray-500 hover:bg-gray-200/60 focus:bg-gray-200/60 ${i ? "shadow-[0_0_0_2px_rgba(239,68,68,0.5)]" : "focus:shadow-[0_0_0_2px_color-mix(in_srgb,var(--pw-accent)_30%,transparent)]"}`
@@ -1259,14 +1203,14 @@ function be({
1259
1203
  i && /* @__PURE__ */ o("span", { class: "mt-1 ml-2 block text-sm text-red-600", children: i })
1260
1204
  ] });
1261
1205
  }
1262
- function Ct({
1206
+ function St({
1263
1207
  placeholder: r,
1264
1208
  value: e,
1265
1209
  onInput: t,
1266
1210
  error: n,
1267
1211
  required: i
1268
1212
  }) {
1269
- return /* @__PURE__ */ c("div", { children: [
1213
+ return /* @__PURE__ */ u("div", { children: [
1270
1214
  /* @__PURE__ */ o(
1271
1215
  "textarea",
1272
1216
  {
@@ -1281,45 +1225,45 @@ function Ct({
1281
1225
  n && /* @__PURE__ */ o("span", { class: "mt-1 ml-2 block text-sm text-red-600", children: n })
1282
1226
  ] });
1283
1227
  }
1284
- function It({ files: r, onChange: e, disabled: t }) {
1285
- const { t: n } = w(), i = z(null), [s, a] = x(!1), [l, d] = x(null), p = (u) => {
1286
- if (!u || t) return;
1287
- d(null);
1288
- const h = Array.from(u);
1289
- if (r.length + h.length > oe) {
1290
- d(n("support.too_many_files", "Up to {max} files", { max: oe }));
1228
+ function Ct({ files: r, onChange: e, disabled: t }) {
1229
+ const { t: n } = k(), i = z(null), [s, a] = x(!1), [c, l] = x(null), f = (h) => {
1230
+ if (!h || t) return;
1231
+ l(null);
1232
+ const d = Array.from(h);
1233
+ if (r.length + d.length > re) {
1234
+ l(n("support.too_many_files", "Up to {max} files", { max: re }));
1291
1235
  return;
1292
1236
  }
1293
- const b = h.filter(
1294
- (_) => ye.includes(_.type) && _.size <= vt
1237
+ const b = d.filter(
1238
+ (w) => ye.includes(w.type) && w.size <= wt
1295
1239
  );
1296
- if (b.length !== h.length) {
1297
- d(n("support.invalid_file", "Only JPEG/PNG/WebP, ≤ 10MB each"));
1240
+ if (b.length !== d.length) {
1241
+ l(n("support.invalid_file", "Only JPEG/PNG/WebP, ≤ 10MB each"));
1298
1242
  return;
1299
1243
  }
1300
1244
  e([...r, ...b]);
1301
1245
  };
1302
- return /* @__PURE__ */ c("div", { children: [
1246
+ return /* @__PURE__ */ u("div", { children: [
1303
1247
  /* @__PURE__ */ o("span", { class: "text-xs font-medium text-gray-700", children: n("support.attachments_label", "Attachments (optional)") }),
1304
- /* @__PURE__ */ c(
1248
+ /* @__PURE__ */ u(
1305
1249
  "div",
1306
1250
  {
1307
1251
  role: "button",
1308
1252
  tabIndex: 0,
1309
1253
  "aria-label": n("support.attachments_aria", "Attachments upload"),
1310
1254
  onClick: () => !t && i.current?.click(),
1311
- onDragOver: (u) => {
1312
- u.preventDefault(), t || a(!0);
1255
+ onDragOver: (h) => {
1256
+ h.preventDefault(), t || a(!0);
1313
1257
  },
1314
1258
  onDragLeave: () => a(!1),
1315
- onDrop: (u) => {
1316
- u.preventDefault(), a(!1), p(u.dataTransfer?.files ?? null);
1259
+ onDrop: (h) => {
1260
+ h.preventDefault(), a(!1), f(h.dataTransfer?.files ?? null);
1317
1261
  },
1318
1262
  class: `mt-1.5 cursor-pointer rounded-2xl border border-dashed p-3.5 text-center transition-all ${s ? "border-[var(--pw-accent)] bg-[color-mix(in_srgb,var(--pw-accent)_6%,white)]" : "border-gray-300 hover:border-gray-400 hover:bg-gray-50/60"} ${t ? "cursor-not-allowed opacity-60" : ""}`,
1319
1263
  children: [
1320
1264
  /* @__PURE__ */ o("div", { class: "text-xs text-gray-500", children: n("support.dropzone_text", "Drop images here or click to select") }),
1321
1265
  /* @__PURE__ */ o("div", { class: "mt-0.5 text-[11px] text-gray-400", children: n("support.file_requirements", "JPEG/PNG/WebP, up to {max} files, ≤ 10MB each", {
1322
- max: oe
1266
+ max: re
1323
1267
  }) })
1324
1268
  ]
1325
1269
  }
@@ -1332,39 +1276,39 @@ function It({ files: r, onChange: e, disabled: t }) {
1332
1276
  multiple: !0,
1333
1277
  accept: ye.join(","),
1334
1278
  class: "hidden",
1335
- onChange: (u) => {
1336
- p(u.target.files), u.currentTarget.value = "";
1279
+ onChange: (h) => {
1280
+ f(h.target.files), h.currentTarget.value = "";
1337
1281
  }
1338
1282
  }
1339
1283
  ),
1340
- l && /* @__PURE__ */ o("p", { class: "mt-1 text-xs text-red-600", children: l }),
1341
- r.length > 0 && /* @__PURE__ */ o("ul", { class: "mt-2 flex flex-col gap-1", children: r.map((u, h) => /* @__PURE__ */ c(
1284
+ c && /* @__PURE__ */ o("p", { class: "mt-1 text-xs text-red-600", children: c }),
1285
+ r.length > 0 && /* @__PURE__ */ o("ul", { class: "mt-2 flex flex-col gap-1", children: r.map((h, d) => /* @__PURE__ */ u(
1342
1286
  "li",
1343
1287
  {
1344
1288
  class: "flex items-center justify-between gap-2 rounded bg-gray-50 px-2 py-1 text-xs",
1345
1289
  children: [
1346
- /* @__PURE__ */ o("span", { class: "truncate text-gray-700", children: u.name }),
1290
+ /* @__PURE__ */ o("span", { class: "truncate text-gray-700", children: h.name }),
1347
1291
  /* @__PURE__ */ o(
1348
1292
  "button",
1349
1293
  {
1350
1294
  type: "button",
1351
1295
  onClick: () => {
1352
1296
  const b = [...r];
1353
- b.splice(h, 1), e(b);
1297
+ b.splice(d, 1), e(b);
1354
1298
  },
1355
1299
  disabled: t,
1356
1300
  class: "text-gray-500 hover:text-red-600 disabled:cursor-not-allowed disabled:opacity-60",
1357
- "aria-label": n("support.remove_file_aria", "Remove {filename}", { filename: u.name }),
1301
+ "aria-label": n("support.remove_file_aria", "Remove {filename}", { filename: h.name }),
1358
1302
  children: "✕"
1359
1303
  }
1360
1304
  )
1361
1305
  ]
1362
1306
  },
1363
- `${u.name}-${u.size}-${h}`
1307
+ `${h.name}-${h.size}-${d}`
1364
1308
  )) })
1365
1309
  ] });
1366
1310
  }
1367
- const Lt = {
1311
+ const It = {
1368
1312
  day: "cta.get_plan_daily",
1369
1313
  week: "cta.get_plan_weekly",
1370
1314
  month: "cta.get_plan_monthly",
@@ -1375,24 +1319,24 @@ const Lt = {
1375
1319
  month: "Get Monthly Plan",
1376
1320
  year: "Get Yearly Plan"
1377
1321
  };
1378
- function Et(r, e, t, n) {
1322
+ function Lt(r, e, t, n) {
1379
1323
  if (e === "close") return n("cta.close", "Close");
1380
1324
  if (!r) return n("cta.continue", "Continue");
1381
1325
  if (!t && r.trial_days && r.interval && r.interval !== "lifetime")
1382
1326
  return n("cta.start_trial", "Start {days}-Day Free Trial", { days: r.trial_days });
1383
1327
  if (!r.interval || r.interval === "lifetime")
1384
1328
  return n("cta.get_lifetime_access", "Get Lifetime Access");
1385
- const i = Lt[r.interval];
1329
+ const i = It[r.interval];
1386
1330
  return i ? n(i, At[r.interval]) : n("cta.get_plan_generic", "Get {interval} Plan", {
1387
- interval: Pt(r.interval)
1331
+ interval: Mt(r.interval)
1388
1332
  });
1389
1333
  }
1390
- function Pt(r) {
1334
+ function Mt(r) {
1391
1335
  return r.length ? r[0].toUpperCase() + r.slice(1) : r;
1392
1336
  }
1393
- function Tt({ block: r, ctx: e }) {
1394
- const { t } = w(), [n, i] = x(!1), s = r.priceId ?? e.selectedPriceId, a = n || r.action === "checkout" && !s, l = s ? e.bootstrap.prices.find((h) => h.id === s) ?? null : null, d = e.bootstrap.user?.had_previous_trial ?? !1, p = r.label ?? Et(l, r.action, d, t);
1395
- return /* @__PURE__ */ c(
1337
+ function Et({ block: r, ctx: e }) {
1338
+ const { t } = k(), [n, i] = x(!1), s = r.priceId ?? e.selectedPriceId, a = n || r.action === "checkout" && !s, c = s ? e.bootstrap.prices.find((d) => d.id === s) ?? null : null, l = e.bootstrap.user?.had_previous_trial ?? !1, f = r.label ?? Lt(c, r.action, l, t);
1339
+ return /* @__PURE__ */ u(
1396
1340
  "button",
1397
1341
  {
1398
1342
  type: "button",
@@ -1423,15 +1367,15 @@ function Tt({ block: r, ctx: e }) {
1423
1367
  "aria-hidden": "true"
1424
1368
  }
1425
1369
  ),
1426
- n ? /* @__PURE__ */ o("span", { class: "relative z-10 inline-block h-4 w-4 animate-spin rounded-full border-2 border-white/40 border-t-white" }) : /* @__PURE__ */ o("span", { class: "relative z-10", children: p })
1370
+ n ? /* @__PURE__ */ o("span", { class: "relative z-10 inline-block h-4 w-4 animate-spin rounded-full border-2 border-white/40 border-t-white" }) : /* @__PURE__ */ o("span", { class: "relative z-10", children: f })
1427
1371
  ]
1428
1372
  }
1429
1373
  );
1430
1374
  }
1431
- function Mt({ ctx: r }) {
1432
- const { t: e } = w(), t = r.authSession, n = r.auth, [i, s] = x(!1), a = () => r.onAction("support");
1375
+ function Pt({ ctx: r }) {
1376
+ const { t: e } = k(), t = r.authSession, n = r.auth, [i, s] = x(!1), a = () => r.onAction("support");
1433
1377
  if (t && !t.user.is_anonymous) {
1434
- const l = async () => {
1378
+ const c = async () => {
1435
1379
  if (!(!n || i)) {
1436
1380
  s(!0);
1437
1381
  try {
@@ -1442,22 +1386,22 @@ function Mt({ ctx: r }) {
1442
1386
  }
1443
1387
  }
1444
1388
  };
1445
- return /* @__PURE__ */ c("div", { class: "-mt-3 flex flex-col items-center gap-1.5 pt-1 text-center text-[13px] text-gray-500", children: [
1446
- /* @__PURE__ */ c("span", { children: [
1389
+ return /* @__PURE__ */ u("div", { class: "-mt-3 flex flex-col items-center gap-1.5 pt-1 text-center text-[13px] text-gray-500", children: [
1390
+ /* @__PURE__ */ u("span", { children: [
1447
1391
  e("session.signed_in_as_prefix", "Signed in as"),
1448
1392
  " ",
1449
1393
  /* @__PURE__ */ o("b", { class: "font-medium text-gray-700", children: t.user.email })
1450
1394
  ] }),
1451
- /* @__PURE__ */ c("div", { class: "flex items-center justify-center gap-3", children: [
1452
- /* @__PURE__ */ o(H, { onClick: l, disabled: !n || i, children: i ? e("session.signing_out", "Signing out…") : e("session.sign_out", "Sign Out") }),
1453
- /* @__PURE__ */ o(we, {}),
1395
+ /* @__PURE__ */ u("div", { class: "flex items-center justify-center gap-3", children: [
1396
+ /* @__PURE__ */ o(H, { onClick: c, disabled: !n || i, children: i ? e("session.signing_out", "Signing out…") : e("session.sign_out", "Sign Out") }),
1397
+ /* @__PURE__ */ o(be, {}),
1454
1398
  /* @__PURE__ */ o(H, { onClick: a, children: e("session.contact_support", "Contact Support") })
1455
1399
  ] })
1456
1400
  ] });
1457
1401
  }
1458
- return /* @__PURE__ */ c("div", { class: "-mt-3 flex items-center justify-center gap-3 pt-1 text-center text-[13px]", children: [
1402
+ return /* @__PURE__ */ u("div", { class: "-mt-3 flex items-center justify-center gap-3 pt-1 text-center text-[13px]", children: [
1459
1403
  /* @__PURE__ */ o(H, { onClick: () => r.onAction("restore"), children: e("session.restore_purchases", "Restore purchases") }),
1460
- /* @__PURE__ */ o(we, {}),
1404
+ /* @__PURE__ */ o(be, {}),
1461
1405
  /* @__PURE__ */ o(H, { onClick: a, children: e("session.contact_support", "Contact Support") })
1462
1406
  ] });
1463
1407
  }
@@ -1478,11 +1422,11 @@ function H({
1478
1422
  }
1479
1423
  );
1480
1424
  }
1481
- function we() {
1425
+ function be() {
1482
1426
  return /* @__PURE__ */ o("span", { class: "h-1 w-1 rounded-full bg-gray-300", "aria-hidden": "true" });
1483
1427
  }
1484
- function Bt({ block: r }) {
1485
- return r.items.length ? /* @__PURE__ */ o("ul", { class: "flex flex-col gap-2.5", role: "list", children: r.items.map((e) => /* @__PURE__ */ c("li", { class: "flex items-start gap-3 text-sm text-gray-700", children: [
1428
+ function Tt({ block: r }) {
1429
+ return r.items.length ? /* @__PURE__ */ o("ul", { class: "flex flex-col gap-2.5", role: "list", children: r.items.map((e) => /* @__PURE__ */ u("li", { class: "flex items-start gap-3 text-sm text-gray-700", children: [
1486
1430
  /* @__PURE__ */ o(
1487
1431
  "svg",
1488
1432
  {
@@ -1504,18 +1448,18 @@ function Bt({ block: r }) {
1504
1448
  )
1505
1449
  }
1506
1450
  ),
1507
- /* @__PURE__ */ c("div", { class: "flex flex-col gap-0.5", children: [
1451
+ /* @__PURE__ */ u("div", { class: "flex flex-col gap-0.5", children: [
1508
1452
  /* @__PURE__ */ o("span", { class: "font-medium leading-snug text-gray-900", children: e.name }),
1509
1453
  e.desc ? /* @__PURE__ */ o("span", { class: "text-xs leading-relaxed text-gray-400", children: e.desc }) : null
1510
1454
  ] })
1511
1455
  ] }, e.id)) }) : null;
1512
1456
  }
1513
- function Ot({ block: r }) {
1514
- const { t: e } = w(), t = r.title ?? e("pricing.money_back", "30-day money-back guarantee"), n = r.subtitle, i = (r.icon ?? "dollar_shield") !== "none", s = Ut(t);
1515
- return /* @__PURE__ */ c("div", { class: "flex flex-col items-center gap-1.5 border-b-1 pb-4 mb-1 border-gray-100", children: [
1516
- /* @__PURE__ */ c("div", { class: "inline-flex items-center gap-2 text-[12px] text-gray-700", children: [
1517
- i ? /* @__PURE__ */ o(jt, {}) : null,
1518
- s ? /* @__PURE__ */ c("span", { children: [
1457
+ function Bt({ block: r }) {
1458
+ const { t: e } = k(), t = r.title ?? e("pricing.money_back", "30-day money-back guarantee"), n = r.subtitle, i = (r.icon ?? "dollar_shield") !== "none", s = Ot(t);
1459
+ return /* @__PURE__ */ u("div", { class: "flex flex-col items-center gap-1.5 border-b-1 pb-4 mb-1 border-gray-100", children: [
1460
+ /* @__PURE__ */ u("div", { class: "inline-flex items-center gap-2 text-[12px] text-gray-700", children: [
1461
+ i ? /* @__PURE__ */ o(Ut, {}) : null,
1462
+ s ? /* @__PURE__ */ u("span", { children: [
1519
1463
  /* @__PURE__ */ o("b", { class: "font-bold text-gray-900", children: s.bold }),
1520
1464
  " ",
1521
1465
  /* @__PURE__ */ o("span", { class: "font-medium", children: s.rest })
@@ -1524,12 +1468,12 @@ function Ot({ block: r }) {
1524
1468
  n ? /* @__PURE__ */ o("span", { class: "text-center text-xs leading-relaxed text-gray-500", children: n }) : null
1525
1469
  ] });
1526
1470
  }
1527
- function Ut(r) {
1471
+ function Ot(r) {
1528
1472
  const e = r.match(/^(\d+[-\s]?days?)\s+(.+)$/i);
1529
1473
  return e ? { bold: e[1], rest: e[2] } : null;
1530
1474
  }
1531
- function jt() {
1532
- return /* @__PURE__ */ c(
1475
+ function Ut() {
1476
+ return /* @__PURE__ */ u(
1533
1477
  "svg",
1534
1478
  {
1535
1479
  xmlns: "http://www.w3.org/2000/svg",
@@ -1563,22 +1507,22 @@ function jt() {
1563
1507
  }
1564
1508
  );
1565
1509
  }
1566
- const Ue = 24, Rt = 16, zt = 2;
1567
- function Dt(r, e) {
1568
- const t = e * zt;
1569
- let n = Ue;
1570
- for (r.style.fontSize = `${n}px`; r.scrollHeight > t && n > Rt; )
1510
+ const Be = 24, jt = 16, Rt = 2;
1511
+ function zt(r, e) {
1512
+ const t = e * Rt;
1513
+ let n = Be;
1514
+ for (r.style.fontSize = `${n}px`; r.scrollHeight > t && n > jt; )
1571
1515
  n -= 1, r.style.fontSize = `${n}px`;
1572
1516
  }
1573
- function qt({ block: r, ctx: e }) {
1517
+ function Dt({ block: r, ctx: e }) {
1574
1518
  const t = r.level ?? 1, n = `h${t}`, i = t === 1 ? "text-[22px] sm:text-2xl font-semibold leading-tight text-center text-balance text-gray-800" : t === 2 ? "text-xl font-semibold leading-snug text-gray-900 tracking-tight" : "text-base font-medium text-gray-900", s = z(null), a = t === 1 && !!e.bootstrap.settings.title_auto_fit;
1575
- return T(() => {
1519
+ return O(() => {
1576
1520
  if (!a || !s.current) return;
1577
- const l = getComputedStyle(s.current), d = parseFloat(l.lineHeight) || Ue * 1.5;
1578
- Dt(s.current, d);
1521
+ const c = getComputedStyle(s.current), l = parseFloat(c.lineHeight) || Be * 1.5;
1522
+ zt(s.current, l);
1579
1523
  }, [a, r.text]), /* @__PURE__ */ o(n, { ref: s, class: i, children: r.text });
1580
1524
  }
1581
- function Nt(r) {
1525
+ function qt(r) {
1582
1526
  const e = r.local ?? { currency: r.currency, amount: r.amount };
1583
1527
  if (r.interval === "year") {
1584
1528
  const t = (r.interval_count ?? 1) * 12;
@@ -1586,7 +1530,7 @@ function Nt(r) {
1586
1530
  }
1587
1531
  return { amount: e.amount, currency: e.currency };
1588
1532
  }
1589
- function se(r, e) {
1533
+ function ne(r, e) {
1590
1534
  const t = r % 1 !== 0 ? 2 : 0;
1591
1535
  try {
1592
1536
  const n = new Intl.NumberFormat(void 0, {
@@ -1604,13 +1548,13 @@ function se(r, e) {
1604
1548
  return { currency: e, amount: String(r) };
1605
1549
  }
1606
1550
  }
1607
- function le(r, e) {
1608
- const { amount: t, currency: n } = Nt(r);
1551
+ function se(r, e) {
1552
+ const { amount: t, currency: n } = qt(r);
1609
1553
  if (!e) {
1610
- const { currency: l, amount: d } = se(t, n);
1611
- return { currency: l, amount: d, originalAmount: null };
1554
+ const { currency: c, amount: l } = ne(t, n);
1555
+ return { currency: c, amount: l, originalAmount: null };
1612
1556
  }
1613
- const i = t * (1 - e / 100), s = se(i, n), a = se(t, n);
1557
+ const i = t * (1 - e / 100), s = ne(i, n), a = ne(t, n);
1614
1558
  return {
1615
1559
  currency: s.currency,
1616
1560
  amount: s.amount,
@@ -1626,7 +1570,7 @@ function G(r, e) {
1626
1570
  (i) => i.price_id == null && i.discount_percent && i.discount_percent > 0
1627
1571
  ) ?? null);
1628
1572
  }
1629
- function je(r, e) {
1573
+ function Oe(r, e) {
1630
1574
  if (r.label) return r.label.toUpperCase();
1631
1575
  if (!r.interval || r.interval === "lifetime")
1632
1576
  return e("pricing.plan_label.lifetime", "LIFETIME");
@@ -1638,15 +1582,15 @@ function je(r, e) {
1638
1582
  }[r.interval];
1639
1583
  return n ? e(n.key, n.fallback) : `${r.interval.toUpperCase()} PLAN`;
1640
1584
  }
1641
- function ce(r, e) {
1585
+ function ae(r, e) {
1642
1586
  if (!r.interval || r.interval === "lifetime")
1643
1587
  return e("pricing.interval.lifetime_short", "lifetime");
1644
1588
  if (r.interval === "year") return e("pricing.interval.month", "month");
1645
1589
  const t = r.interval_count ?? 1;
1646
1590
  return t === 1 ? e(`pricing.interval.${r.interval}`, r.interval) : `${t} ${r.interval}s`;
1647
1591
  }
1648
- function Ft({ block: r, ctx: e }) {
1649
- const { t } = w(), n = r.priceIds && r.priceIds.length > 0 ? new Set(r.priceIds) : null, i = e.bootstrap.prices.filter((a) => !n || n.has(a.id));
1592
+ function Nt({ block: r, ctx: e }) {
1593
+ const { t } = k(), n = r.priceIds && r.priceIds.length > 0 ? new Set(r.priceIds) : null, i = e.bootstrap.prices.filter((a) => !n || n.has(a.id));
1650
1594
  if (i.length === 0)
1651
1595
  return /* @__PURE__ */ o("p", { class: "text-sm text-gray-500", children: t("pricing.no_prices", "No prices available.") });
1652
1596
  const s = r.popular_label ?? t("pricing.most_popular", "Most popular");
@@ -1657,11 +1601,11 @@ function Ft({ block: r, ctx: e }) {
1657
1601
  class: "flex w-full flex-col rounded-xl border border-gray-200 bg-gray-50",
1658
1602
  role: "radiogroup",
1659
1603
  "aria-label": t("pricing.plans_aria", "Plans"),
1660
- children: i.map((a, l) => /* @__PURE__ */ o(
1661
- $t,
1604
+ children: i.map((a, c) => /* @__PURE__ */ o(
1605
+ Vt,
1662
1606
  {
1663
1607
  price: a,
1664
- isLast: l === i.length - 1,
1608
+ isLast: c === i.length - 1,
1665
1609
  isPopular: r.popular_price_id === a.id,
1666
1610
  popularLabel: s,
1667
1611
  offer: G(e.bootstrap.offers, a.id),
@@ -1676,8 +1620,8 @@ function Ft({ block: r, ctx: e }) {
1676
1620
  }
1677
1621
  );
1678
1622
  if (r.view === "horizontal") {
1679
- const a = Math.min(i.length, 3), l = i.some(
1680
- (d) => (G(e.bootstrap.offers, d.id)?.discount_percent ?? 0) > 0
1623
+ const a = Math.min(i.length, 3), c = i.some(
1624
+ (l) => (G(e.bootstrap.offers, l.id)?.discount_percent ?? 0) > 0
1681
1625
  );
1682
1626
  return /* @__PURE__ */ o(
1683
1627
  "div",
@@ -1686,21 +1630,21 @@ function Ft({ block: r, ctx: e }) {
1686
1630
  style: { gridTemplateColumns: `repeat(${a}, minmax(0, 1fr))` },
1687
1631
  role: "radiogroup",
1688
1632
  "aria-label": t("pricing.plans_aria", "Plans"),
1689
- children: i.map((d) => /* @__PURE__ */ o(
1690
- Ht,
1633
+ children: i.map((l) => /* @__PURE__ */ o(
1634
+ $t,
1691
1635
  {
1692
- price: d,
1693
- isPopular: r.popular_price_id === d.id,
1636
+ price: l,
1637
+ isPopular: r.popular_price_id === l.id,
1694
1638
  popularLabel: s,
1695
- offer: G(e.bootstrap.offers, d.id),
1696
- reserveStrikeRow: l,
1697
- selected: e.selectedPriceId === d.id,
1639
+ offer: G(e.bootstrap.offers, l.id),
1640
+ reserveStrikeRow: c,
1641
+ selected: e.selectedPriceId === l.id,
1698
1642
  onSelect: () => {
1699
- e.setSelectedPriceId(d.id), e.onAction("price_selected", { priceId: d.id, price: d });
1643
+ e.setSelectedPriceId(l.id), e.onAction("price_selected", { priceId: l.id, price: l });
1700
1644
  },
1701
1645
  t
1702
1646
  },
1703
- d.id
1647
+ l.id
1704
1648
  ))
1705
1649
  }
1706
1650
  );
@@ -1712,13 +1656,13 @@ function Ft({ block: r, ctx: e }) {
1712
1656
  role: "radiogroup",
1713
1657
  "aria-label": t("pricing.plans_aria", "Plans"),
1714
1658
  children: i.map((a) => {
1715
- const l = e.selectedPriceId === a.id, d = r.popular_price_id === a.id, u = G(e.bootstrap.offers, a.id)?.discount_percent ?? null, { currency: h, amount: b, originalAmount: _ } = le(a, u);
1716
- return /* @__PURE__ */ c(
1659
+ const c = e.selectedPriceId === a.id, l = r.popular_price_id === a.id, h = G(e.bootstrap.offers, a.id)?.discount_percent ?? null, { currency: d, amount: b, originalAmount: w } = se(a, h);
1660
+ return /* @__PURE__ */ u(
1717
1661
  "button",
1718
1662
  {
1719
1663
  type: "button",
1720
1664
  role: "radio",
1721
- "aria-checked": l,
1665
+ "aria-checked": c,
1722
1666
  onClick: () => {
1723
1667
  e.setSelectedPriceId(a.id), e.onAction("price_selected", { priceId: a.id, price: a });
1724
1668
  },
@@ -1727,7 +1671,7 @@ function Ft({ block: r, ctx: e }) {
1727
1671
  // Везде border 2px — selection выражается только цветом, layout
1728
1672
  // не прыгает (равная толщина у selected/unselected). Цветовая
1729
1673
  // разница accent vs gray достаточно сильная для visual hierarchy.
1730
- l ? "border-[var(--pw-accent)] bg-transparent" : "border-gray-200 bg-transparent hover:bg-gray-50"
1674
+ c ? "border-[var(--pw-accent)] bg-transparent" : "border-gray-200 bg-transparent hover:bg-gray-50"
1731
1675
  ].join(" "),
1732
1676
  children: [
1733
1677
  /* @__PURE__ */ o(
@@ -1735,14 +1679,14 @@ function Ft({ block: r, ctx: e }) {
1735
1679
  {
1736
1680
  class: [
1737
1681
  "flex h-6.5 w-6.5 flex-shrink-0 items-center justify-center rounded-full border transition-colors",
1738
- l ? "border-[var(--pw-accent)] text-white" : "border-gray-300 bg-transparent text-transparent",
1682
+ c ? "border-[var(--pw-accent)] text-white" : "border-gray-300 bg-transparent text-transparent",
1739
1683
  // Popular-label badge сидит absolute сверху-справа карточки и
1740
1684
  // визуально сдвигает центр content'а вниз. flex items-center
1741
1685
  // на карточке держит галочку по геометрическому центру, что
1742
1686
  // делает её визуально выше — компенсируем небольшим mt'ом.
1743
- d ? "mt-3" : ""
1687
+ l ? "mt-3" : ""
1744
1688
  ].join(" "),
1745
- style: l ? {
1689
+ style: c ? {
1746
1690
  background: "linear-gradient(135deg, color-mix(in srgb, var(--pw-accent) 70%, white) 0%, var(--pw-accent) 50%, color-mix(in srgb, var(--pw-accent) 85%, black) 100%)"
1747
1691
  } : void 0,
1748
1692
  "aria-hidden": "true",
@@ -1754,7 +1698,7 @@ function Ft({ block: r, ctx: e }) {
1754
1698
  viewBox: "0 0 17 12",
1755
1699
  fill: "none",
1756
1700
  xmlns: "http://www.w3.org/2000/svg",
1757
- class: l ? "opacity-100" : "opacity-0",
1701
+ class: c ? "opacity-100" : "opacity-0",
1758
1702
  children: /* @__PURE__ */ o(
1759
1703
  "path",
1760
1704
  {
@@ -1766,37 +1710,37 @@ function Ft({ block: r, ctx: e }) {
1766
1710
  )
1767
1711
  }
1768
1712
  ),
1769
- /* @__PURE__ */ c("div", { class: "flex flex-1 flex-col gap-0.5", children: [
1770
- /* @__PURE__ */ c("div", { class: "flex flex-wrap items-center gap-x-2 gap-y-1", children: [
1771
- /* @__PURE__ */ o("span", { class: "text-xs font-normal uppercase tracking-normal text-gray-800/70", children: je(a, t) }),
1772
- _ ? (
1713
+ /* @__PURE__ */ u("div", { class: "flex flex-1 flex-col gap-0.5", children: [
1714
+ /* @__PURE__ */ u("div", { class: "flex flex-wrap items-center gap-x-2 gap-y-1", children: [
1715
+ /* @__PURE__ */ o("span", { class: "text-xs font-normal uppercase tracking-normal text-gray-800/70", children: Oe(a, t) }),
1716
+ w ? (
1773
1717
  // opacity-60 приглушает strike: глаз сначала ловит label
1774
1718
  // и discount-badge, потом main price; original «бывшая цена»
1775
1719
  // — третичная информация, не должна конкурировать с label.
1776
- /* @__PURE__ */ o("span", { class: "text-[15px] font-normal text-gray-400 opacity-60 line-through decoration-gray-400 decoration-[1.5px]", children: _ })
1720
+ /* @__PURE__ */ o("span", { class: "text-[15px] font-normal text-gray-400 opacity-60 line-through decoration-gray-400 decoration-[1.5px]", children: w })
1777
1721
  ) : null,
1778
- u ? (
1722
+ h ? (
1779
1723
  // Emerald pill — фиксированный «успех/выгода», не зависит от
1780
1724
  // brand_color. Читается даже на тёмных бренд-акцентах.
1781
- /* @__PURE__ */ c("span", { class: "rounded-full bg-emerald-100 px-2.5 py-1 text-xs font-bold leading-none text-emerald-700", children: [
1725
+ /* @__PURE__ */ u("span", { class: "rounded-full bg-emerald-100 px-2.5 py-1 text-xs font-bold leading-none text-emerald-700", children: [
1782
1726
  "-",
1783
- u,
1727
+ h,
1784
1728
  "%"
1785
1729
  ] })
1786
1730
  ) : null
1787
1731
  ] }),
1788
- /* @__PURE__ */ o("div", { class: "flex items-baseline gap-2 flex-wrap", children: /* @__PURE__ */ c("span", { class: "text-[26px] leading-tight whitespace-nowrap text-gray-800 font-medium", children: [
1789
- /* @__PURE__ */ o("span", { class: "opacity-90", children: h }),
1732
+ /* @__PURE__ */ o("div", { class: "flex items-baseline gap-2 flex-wrap", children: /* @__PURE__ */ u("span", { class: "text-[26px] leading-tight whitespace-nowrap text-gray-800 font-medium", children: [
1733
+ /* @__PURE__ */ o("span", { class: "opacity-90", children: d }),
1790
1734
  b,
1791
- /* @__PURE__ */ c("span", { class: "text-sm font-normal text-gray-500", children: [
1735
+ /* @__PURE__ */ u("span", { class: "text-sm font-normal text-gray-500", children: [
1792
1736
  " ",
1793
1737
  "/ ",
1794
- ce(a, t)
1738
+ ae(a, t)
1795
1739
  ] })
1796
1740
  ] }) }),
1797
1741
  a.description ? /* @__PURE__ */ o("span", { class: "mt-1 text-xs leading-relaxed text-gray-500", children: a.description }) : null
1798
1742
  ] }),
1799
- d ? /* @__PURE__ */ o(
1743
+ l ? /* @__PURE__ */ o(
1800
1744
  "span",
1801
1745
  {
1802
1746
  class: "absolute -top-[9px] -right-[6px] rounded-[11px] border-[5px] border-white px-2 py-1 text-[12px] font-semibold text-white",
@@ -1812,10 +1756,10 @@ function Ft({ block: r, ctx: e }) {
1812
1756
  }
1813
1757
  );
1814
1758
  }
1815
- function Vt(r, e) {
1759
+ function Ft(r, e) {
1816
1760
  return r.label ? r.label : !r.interval || r.interval === "lifetime" ? e("pricing.interval.lifetime_short", "lifetime") : e(`pricing.interval.${r.interval}`, r.interval);
1817
1761
  }
1818
- function $t({
1762
+ function Vt({
1819
1763
  price: r,
1820
1764
  isLast: e,
1821
1765
  isPopular: t,
@@ -1823,10 +1767,10 @@ function $t({
1823
1767
  offer: i,
1824
1768
  selected: s,
1825
1769
  onSelect: a,
1826
- t: l
1770
+ t: c
1827
1771
  }) {
1828
- const d = i?.discount_percent ?? null, { currency: p, amount: u, originalAmount: h } = le(r, d);
1829
- return /* @__PURE__ */ c(
1772
+ const l = i?.discount_percent ?? null, { currency: f, amount: h, originalAmount: d } = se(r, l);
1773
+ return /* @__PURE__ */ u(
1830
1774
  "button",
1831
1775
  {
1832
1776
  type: "button",
@@ -1866,7 +1810,7 @@ function $t({
1866
1810
  )
1867
1811
  }
1868
1812
  ),
1869
- /* @__PURE__ */ c(
1813
+ /* @__PURE__ */ u(
1870
1814
  "div",
1871
1815
  {
1872
1816
  class: [
@@ -1874,8 +1818,8 @@ function $t({
1874
1818
  e ? "" : "border-b border-gray-200"
1875
1819
  ].join(" "),
1876
1820
  children: [
1877
- /* @__PURE__ */ c("div", { class: "flex flex-wrap items-center gap-1 gap-x-1.5", children: [
1878
- /* @__PURE__ */ o("span", { class: "text-base font-normal capitalize text-gray-800", children: Vt(r, l) }),
1821
+ /* @__PURE__ */ u("div", { class: "flex flex-wrap items-center gap-1 gap-x-1.5", children: [
1822
+ /* @__PURE__ */ o("span", { class: "text-base font-normal capitalize text-gray-800", children: Ft(r, c) }),
1879
1823
  t ? (
1880
1824
  // Pastel brand-mix pill — точно как `badge` в TelegramPricingRadio.
1881
1825
  // Низкий visual weight: pill про "имя плана" (most popular), а не
@@ -1892,22 +1836,22 @@ function $t({
1892
1836
  }
1893
1837
  )
1894
1838
  ) : null,
1895
- d ? /* @__PURE__ */ c("span", { class: "rounded-md bg-emerald-100 px-1.5 py-0.5 text-[10px] font-bold leading-none text-emerald-700", children: [
1839
+ l ? /* @__PURE__ */ u("span", { class: "rounded-md bg-emerald-100 px-1.5 py-0.5 text-[10px] font-bold leading-none text-emerald-700", children: [
1896
1840
  "-",
1897
- d,
1841
+ l,
1898
1842
  "%"
1899
1843
  ] }) : null
1900
1844
  ] }),
1901
1845
  /* @__PURE__ */ o("div", { class: "flex-1" }),
1902
- /* @__PURE__ */ c("span", { class: "flex items-baseline gap-1.5 text-base font-normal text-gray-600", children: [
1903
- h ? /* @__PURE__ */ o("span", { class: "text-xs text-gray-400 line-through decoration-gray-400 decoration-[1.5px]", children: h }) : null,
1904
- /* @__PURE__ */ c("span", { class: "whitespace-nowrap", children: [
1905
- /* @__PURE__ */ o("span", { class: "opacity-90", children: p }),
1906
- u,
1907
- /* @__PURE__ */ c("span", { class: "text-xs text-gray-400", children: [
1846
+ /* @__PURE__ */ u("span", { class: "flex items-baseline gap-1.5 text-base font-normal text-gray-600", children: [
1847
+ d ? /* @__PURE__ */ o("span", { class: "text-xs text-gray-400 line-through decoration-gray-400 decoration-[1.5px]", children: d }) : null,
1848
+ /* @__PURE__ */ u("span", { class: "whitespace-nowrap", children: [
1849
+ /* @__PURE__ */ o("span", { class: "opacity-90", children: f }),
1850
+ h,
1851
+ /* @__PURE__ */ u("span", { class: "text-xs text-gray-400", children: [
1908
1852
  " ",
1909
1853
  "/ ",
1910
- ce(r, l)
1854
+ ae(r, c)
1911
1855
  ] })
1912
1856
  ] })
1913
1857
  ] })
@@ -1918,7 +1862,7 @@ function $t({
1918
1862
  }
1919
1863
  );
1920
1864
  }
1921
- function Ht({
1865
+ function $t({
1922
1866
  price: r,
1923
1867
  isPopular: e,
1924
1868
  popularLabel: t,
@@ -1926,10 +1870,10 @@ function Ht({
1926
1870
  reserveStrikeRow: i,
1927
1871
  selected: s,
1928
1872
  onSelect: a,
1929
- t: l
1873
+ t: c
1930
1874
  }) {
1931
- const d = n?.discount_percent ?? null, { currency: p, amount: u, originalAmount: h } = le(r, d);
1932
- return /* @__PURE__ */ c(
1875
+ const l = n?.discount_percent ?? null, { currency: f, amount: h, originalAmount: d } = se(r, l);
1876
+ return /* @__PURE__ */ u(
1933
1877
  "button",
1934
1878
  {
1935
1879
  type: "button",
@@ -1942,22 +1886,22 @@ function Ht({
1942
1886
  ].join(" "),
1943
1887
  style: s ? { background: "color-mix(in srgb, var(--pw-accent) 6%, transparent)" } : void 0,
1944
1888
  children: [
1945
- /* @__PURE__ */ o("span", { class: "flex min-h-[2.4em] items-center text-[10px] font-normal uppercase leading-tight text-gray-800/70", children: je(r, l) }),
1946
- i ? /* @__PURE__ */ c("div", { class: "flex h-[22px] items-center justify-center gap-1.5", children: [
1947
- h ? /* @__PURE__ */ o("span", { class: "text-[12px] text-gray-400 line-through decoration-gray-400 decoration-[1.5px]", children: h }) : null,
1948
- d ? /* @__PURE__ */ c("span", { class: "rounded-md bg-emerald-100 px-1.5 py-0.5 text-[10px] font-bold leading-none text-emerald-700", children: [
1889
+ /* @__PURE__ */ o("span", { class: "flex min-h-[2.4em] items-center text-[10px] font-normal uppercase leading-tight text-gray-800/70", children: Oe(r, c) }),
1890
+ i ? /* @__PURE__ */ u("div", { class: "flex h-[22px] items-center justify-center gap-1.5", children: [
1891
+ d ? /* @__PURE__ */ o("span", { class: "text-[12px] text-gray-400 line-through decoration-gray-400 decoration-[1.5px]", children: d }) : null,
1892
+ l ? /* @__PURE__ */ u("span", { class: "rounded-md bg-emerald-100 px-1.5 py-0.5 text-[10px] font-bold leading-none text-emerald-700", children: [
1949
1893
  "-",
1950
- d,
1894
+ l,
1951
1895
  "%"
1952
1896
  ] }) : null
1953
1897
  ] }) : null,
1954
- /* @__PURE__ */ c("span", { class: "text-[26px] leading-none whitespace-nowrap text-gray-800 font-medium", children: [
1955
- /* @__PURE__ */ o("span", { class: "opacity-90", children: p }),
1956
- u
1898
+ /* @__PURE__ */ u("span", { class: "text-[26px] leading-none whitespace-nowrap text-gray-800 font-medium", children: [
1899
+ /* @__PURE__ */ o("span", { class: "opacity-90", children: f }),
1900
+ h
1957
1901
  ] }),
1958
- /* @__PURE__ */ c("span", { class: "text-xs font-normal text-gray-500", children: [
1902
+ /* @__PURE__ */ u("span", { class: "text-xs font-normal text-gray-500", children: [
1959
1903
  "/ ",
1960
- ce(r, l)
1904
+ ae(r, c)
1961
1905
  ] }),
1962
1906
  e ? /* @__PURE__ */ o(
1963
1907
  "span",
@@ -1971,28 +1915,28 @@ function Ht({
1971
1915
  }
1972
1916
  );
1973
1917
  }
1974
- function Gt({ block: r }) {
1918
+ function Ht({ block: r }) {
1975
1919
  return /* @__PURE__ */ o("p", { class: "text-[0.9375rem] leading-relaxed text-gray-600", children: r.text });
1976
1920
  }
1977
- const Wt = {
1921
+ const Gt = {
1978
1922
  week: 0.25,
1979
1923
  month: 1,
1980
1924
  year: 12
1981
1925
  };
1982
- function Zt(r, e) {
1926
+ function Wt(r, e) {
1983
1927
  return r ? e(`pricing.interval.${r}`, r) : e("pricing.interval.period", "period");
1984
1928
  }
1985
- function Yt({ block: r, ctx: e }) {
1986
- const { t } = w();
1929
+ function Zt({ block: r, ctx: e }) {
1930
+ const { t } = k();
1987
1931
  if (!r.queries.length) return null;
1988
- const i = e.bootstrap.prices.find((a) => a.id === e.selectedPriceId)?.interval ?? null, s = i ? Wt[i] : void 0;
1989
- return /* @__PURE__ */ c("div", { class: "flex flex-col gap-2", children: [
1932
+ const i = e.bootstrap.prices.find((a) => a.id === e.selectedPriceId)?.interval ?? null, s = i ? Gt[i] : void 0;
1933
+ return /* @__PURE__ */ u("div", { class: "flex flex-col gap-2", children: [
1990
1934
  /* @__PURE__ */ o("div", { class: "text-sm font-semibold text-gray-800", children: !i || i === "lifetime" ? t("pricing.included_total", "Included for lifetime:") : t("pricing.included_per", "Included per {interval}:", {
1991
- interval: Zt(i, t)
1935
+ interval: Wt(i, t)
1992
1936
  }) }),
1993
1937
  /* @__PURE__ */ o("ul", { class: "flex flex-col gap-2", role: "list", children: r.queries.map((a) => {
1994
- const l = Number.isFinite(a.count) ? a.count : 0, d = s !== void 0 ? Math.round(l * s) : l;
1995
- return /* @__PURE__ */ c("li", { class: `flex gap-3 ${a.desc ? "items-start" : "items-center"}`, children: [
1938
+ const c = Number.isFinite(a.count) ? a.count : 0, l = s !== void 0 ? Math.round(c * s) : c;
1939
+ return /* @__PURE__ */ u("li", { class: `flex gap-3 ${a.desc ? "items-start" : "items-center"}`, children: [
1996
1940
  /* @__PURE__ */ o(
1997
1941
  "svg",
1998
1942
  {
@@ -2014,11 +1958,11 @@ function Yt({ block: r, ctx: e }) {
2014
1958
  )
2015
1959
  }
2016
1960
  ),
2017
- /* @__PURE__ */ c("div", { children: [
2018
- /* @__PURE__ */ o("span", { class: "font-semibold text-gray-900 text-sm", children: d }),
1961
+ /* @__PURE__ */ u("div", { children: [
1962
+ /* @__PURE__ */ o("span", { class: "font-semibold text-gray-900 text-sm", children: l }),
2019
1963
  " ",
2020
1964
  /* @__PURE__ */ o("span", { class: "text-sm text-gray-800", children: a.name }),
2021
- a.desc ? /* @__PURE__ */ c(Y, { children: [
1965
+ a.desc ? /* @__PURE__ */ u(oe, { children: [
2022
1966
  /* @__PURE__ */ o("br", {}),
2023
1967
  /* @__PURE__ */ o("span", { class: "text-xs text-gray-400", children: a.desc })
2024
1968
  ] }) : null
@@ -2027,37 +1971,37 @@ function Yt({ block: r, ctx: e }) {
2027
1971
  }) })
2028
1972
  ] });
2029
1973
  }
2030
- const Kt = {
2031
- heading: qt,
2032
- text: Gt,
2033
- price_grid: Ft,
2034
- cta_button: Tt,
2035
- auth_panel: Ee,
2036
- current_session: Mt,
2037
- features_list: Bt,
2038
- tokenization_gate: Yt,
2039
- guarantee_badge: Ot,
2040
- offer_banner: wt
1974
+ const Yt = {
1975
+ heading: Dt,
1976
+ text: Ht,
1977
+ price_grid: Nt,
1978
+ cta_button: Et,
1979
+ auth_panel: Ae,
1980
+ current_session: Pt,
1981
+ features_list: Tt,
1982
+ tokenization_gate: Zt,
1983
+ guarantee_badge: Bt,
1984
+ offer_banner: xt
2041
1985
  };
2042
- function Xt({ layout: r, bootstrap: e, onAction: t, auth: n, authSession: i, hasTopBanner: s }) {
2043
- const a = _e(() => {
2044
- for (const f of r.blocks)
2045
- if (f.type === "price_grid" && f.popular_price_id && e.prices.some((g) => g.id === f.popular_price_id))
2046
- return f.popular_price_id;
1986
+ function Kt({ layout: r, bootstrap: e, onAction: t, auth: n, authSession: i, hasTopBanner: s }) {
1987
+ const a = Ve(() => {
1988
+ for (const v of r.blocks)
1989
+ if (v.type === "price_grid" && v.popular_price_id && e.prices.some((p) => p.id === v.popular_price_id))
1990
+ return v.popular_price_id;
2047
1991
  return e.prices[0]?.id ?? null;
2048
- }, [r.blocks, e.prices]), [l, d] = x(a), p = {
1992
+ }, [r.blocks, e.prices]), [c, l] = x(a), f = {
2049
1993
  bootstrap: e,
2050
- selectedPriceId: l,
2051
- setSelectedPriceId: d,
1994
+ selectedPriceId: c,
1995
+ setSelectedPriceId: l,
2052
1996
  onAction: t,
2053
1997
  auth: n,
2054
1998
  authSession: i
2055
- }, u = r.blocks.findIndex((f) => f.type === "cta_button"), h = u === -1 ? r.blocks : r.blocks.slice(0, u), b = u === -1 ? [] : r.blocks.slice(u), _ = (f, g) => {
2056
- const A = Kt[f.type];
2057
- return A ? /* @__PURE__ */ o(A, { block: f, ctx: p }, `${f.type}-${g}`) : (typeof console < "u" && console.warn(`[paywall] unknown block type: ${f.type}`), null);
1999
+ }, h = r.blocks.findIndex((v) => v.type === "cta_button"), d = h === -1 ? r.blocks : r.blocks.slice(0, h), b = h === -1 ? [] : r.blocks.slice(h), w = (v, p) => {
2000
+ const y = Yt[v.type];
2001
+ return y ? /* @__PURE__ */ o(y, { block: v, ctx: f }, `${v.type}-${p}`) : (typeof console < "u" && console.warn(`[paywall] unknown block type: ${v.type}`), null);
2058
2002
  };
2059
- return /* @__PURE__ */ c(Y, { children: [
2060
- /* @__PURE__ */ o("div", { class: "flex-1 min-h-0 overflow-y-auto px-6 pb-3 pt-6 sm:px-8 sm:pb-4 sm:pt-8", children: /* @__PURE__ */ o("div", { class: "flex flex-col gap-6", children: h.map(_) }) }),
2003
+ return /* @__PURE__ */ u(oe, { children: [
2004
+ /* @__PURE__ */ o("div", { class: "flex-1 min-h-0 overflow-y-auto px-6 pb-3 pt-6 sm:px-8 sm:pb-4 sm:pt-8", children: /* @__PURE__ */ o("div", { class: "flex flex-col gap-6", children: d.map(w) }) }),
2061
2005
  b.length > 0 ? (
2062
2006
  // Тонкий shadow-top вместо border-t — создаёт depth, читается как
2063
2007
  // «footer закреплён к низу dialog'а». Линия выглядела как divider
@@ -2067,169 +2011,170 @@ function Xt({ layout: r, bootstrap: e, onAction: t, auth: n, authSession: i, has
2067
2011
  {
2068
2012
  class: "flex flex-col gap-4 bg-white px-6 pb-6 pt-3 sm:px-8",
2069
2013
  style: { boxShadow: "0 -4px 12px -4px rgba(15,23,42,0.06)" },
2070
- children: b.map((f, g) => _(f, h.length + g))
2014
+ children: b.map((v, p) => w(v, d.length + p))
2071
2015
  }
2072
2016
  )
2073
2017
  ) : null
2074
2018
  ] });
2075
2019
  }
2076
- function Jt(r, e, t, n) {
2077
- return r ? n ? { open: !0, view: "purchased", error: null } : e.status === "idle" || e.status === "loading" ? { open: !0, view: "loading", error: null } : e.status === "error" ? { open: !0, view: "error", error: e.error } : t.kind === "support" ? { open: !0, view: "support", error: null } : t.kind === "auth_gate" ? { open: !0, view: "auth", error: null } : t.kind === "anon_gate" ? { open: !0, view: "anon", error: null } : t.kind === "awaiting_payment" ? { open: !0, view: "awaiting_payment", error: null } : t.kind === "popup_blocked" ? { open: !0, view: "popup_blocked", error: null } : t.kind === "purchase_success" ? { open: !0, view: "purchased", error: null } : t.kind === "verifying" ? { open: !0, view: "loading", error: null } : { open: !0, view: "layout", error: null } : { open: !1, view: null, error: null };
2020
+ function Xt(r, e, t, n) {
2021
+ return r ? n ? { open: !0, view: "purchased", error: null } : e.status === "idle" || e.status === "loading" ? { open: !0, view: "loading", error: null } : e.status === "error" ? { open: !0, view: "error", error: e.error } : t.kind === "support" ? { open: !0, view: "support", error: null } : t.kind === "auth_gate" ? { open: !0, view: "auth", error: null } : t.kind === "awaiting_payment" ? { open: !0, view: "awaiting_payment", error: null } : t.kind === "popup_blocked" ? { open: !0, view: "popup_blocked", error: null } : t.kind === "purchase_success" ? { open: !0, view: "purchased", error: null } : t.kind === "verifying" ? { open: !0, view: "loading", error: null } : { open: !0, view: "layout", error: null } : { open: !1, view: null, error: null };
2078
2022
  }
2079
- function Qt(r, e) {
2023
+ function Jt(r, e) {
2080
2024
  return r.open === e.open && r.view === e.view && r.error === e.error;
2081
2025
  }
2082
- function er({
2026
+ function Qt({
2083
2027
  client: r,
2084
2028
  open: e,
2085
2029
  onClose: t,
2086
2030
  onEvent: n,
2087
2031
  initialView: i,
2088
- purchased: s,
2089
- renew: a,
2032
+ initialAuthMode: s,
2033
+ purchased: a,
2034
+ renew: c,
2090
2035
  onState: l,
2091
- inline: d,
2092
- locale: p
2036
+ inline: f,
2037
+ locale: h
2093
2038
  }) {
2094
- const [u, h] = x({ status: "idle" }), [b, _] = x(
2039
+ const [d, b] = x({ status: "idle" }), [w, v] = x(
2095
2040
  () => r.auth?.getCachedSession() ?? null
2096
- ), [f, g] = x(() => i === "support" ? { kind: "support", origin: "standalone" } : i === "auth" ? { kind: "auth_gate", origin: "standalone" } : i === "anon" ? { kind: "anon_gate", origin: "standalone" } : { kind: "layout" }), A = z(!1), M = z(null);
2097
- T(() => {
2041
+ ), [p, y] = x(() => i === "support" ? { kind: "support", origin: "standalone" } : i === "auth" ? { kind: "auth_gate", origin: "standalone" } : { kind: "layout" }), U = z(!1), _ = z(null);
2042
+ O(() => {
2098
2043
  if (!l) return;
2099
- const m = Jt(e, u, f, s), y = M.current;
2100
- y && Qt(y, m) || (M.current = m, l(m));
2101
- }, [e, u, f, s, l]), T(() => {
2044
+ const m = Xt(e, d, p, a), g = _.current;
2045
+ g && Jt(g, m) || (_.current = m, l(m));
2046
+ }, [e, d, p, a, l]), O(() => {
2102
2047
  if (r.auth)
2103
- return r.auth.onAuthChange((m, y) => _(y));
2104
- }, [r.auth]), T(() => {
2048
+ return r.auth.onAuthChange((m, g) => v(g));
2049
+ }, [r.auth]), O(() => {
2105
2050
  if (typeof r.onBootstrapChange == "function")
2106
2051
  return r.onBootstrapChange((m) => {
2107
- h(
2108
- (y) => y.status === "ready" ? { status: "ready", data: m } : y
2052
+ b(
2053
+ (g) => g.status === "ready" ? { status: "ready", data: m } : g
2109
2054
  );
2110
2055
  });
2111
- }, [r]), T(() => {
2112
- if (!e || u.status === "ready" || u.status === "loading") return;
2056
+ }, [r]), O(() => {
2057
+ if (!e || d.status === "ready" || d.status === "loading") return;
2113
2058
  let m = !1;
2114
- return h({ status: "loading" }), r.bootstrap().then((y) => {
2115
- m || (h({ status: "ready", data: y }), n("ready", y), y.user?.has_active_subscription && !a && (n("purchase_completed", {
2059
+ return b({ status: "loading" }), r.bootstrap().then((g) => {
2060
+ m || (b({ status: "ready", data: g }), n("ready", g), g.user?.has_active_subscription && !c && !i && (n("purchase_completed", {
2116
2061
  priceId: null,
2117
2062
  sessionId: null,
2118
2063
  restored: !0
2119
- }), g({ kind: "purchase_success", restored: !0 })));
2120
- }).catch((y) => {
2064
+ }), y({ kind: "purchase_success", restored: !0 })));
2065
+ }).catch((g) => {
2121
2066
  if (m) return;
2122
- const v = y instanceof j ? y : new j("unknown", "Failed to load paywall", { cause: y });
2123
- h({ status: "error", error: v }), n("error", v);
2067
+ const C = g instanceof B ? g : new B("unknown", "Failed to load paywall", { cause: g });
2068
+ b({ status: "error", error: C }), n("error", C);
2124
2069
  }), () => {
2125
2070
  m = !0;
2126
2071
  };
2127
- }, [e, r]), He(() => {
2072
+ }, [e, r]), $e(() => {
2128
2073
  if (!e) {
2129
- g({ kind: "layout" }), A.current = !1;
2074
+ y({ kind: "layout" }), U.current = !1;
2130
2075
  return;
2131
2076
  }
2132
- i === "support" ? g({ kind: "support", origin: "standalone" }) : i === "auth" ? g({ kind: "auth_gate", origin: "standalone" }) : i === "anon" && g({ kind: "anon_gate", origin: "standalone" });
2077
+ i === "support" ? y({ kind: "support", origin: "standalone" }) : i === "auth" && y({ kind: "auth_gate", origin: "standalone" });
2133
2078
  }, [e, i]);
2134
- const k = async (m) => {
2079
+ const S = async (m) => {
2135
2080
  try {
2136
- const y = await r.createCheckout({
2081
+ const g = await r.createCheckout({
2137
2082
  priceId: m,
2138
- ignoreActivePurchase: a === !0
2083
+ ignoreActivePurchase: c === !0
2139
2084
  });
2140
- if (n("checkout_started", { priceId: m, url: y.url, acquiring: y.acquiring }), typeof window > "u" || !y.url) return;
2141
- const v = window.open(y.url, "_blank");
2142
- if (v) {
2085
+ if (n("checkout_started", { priceId: m, url: g.url, acquiring: g.acquiring }), typeof window > "u" || !g.url) return;
2086
+ const C = window.open(g.url, "_blank");
2087
+ if (C) {
2143
2088
  try {
2144
- v.opener = null;
2089
+ C.opener = null;
2145
2090
  } catch {
2146
2091
  }
2147
- g({ kind: "awaiting_payment", priceId: m, url: y.url });
2092
+ y({ kind: "awaiting_payment", priceId: m, url: g.url });
2148
2093
  } else
2149
- g({ kind: "popup_blocked", priceId: m, url: y.url });
2150
- } catch (y) {
2151
- if (y instanceof j && y.code === "already_purchased") {
2094
+ y({ kind: "popup_blocked", priceId: m, url: g.url });
2095
+ } catch (g) {
2096
+ if (g instanceof B && g.code === "already_purchased") {
2152
2097
  try {
2153
2098
  await r.getUser({ force: !0 });
2154
2099
  } catch {
2155
2100
  }
2156
- n("purchase_completed", { priceId: m, sessionId: null, restored: !0 }), g({ kind: "purchase_success", restored: !0 });
2101
+ n("purchase_completed", { priceId: m, sessionId: null, restored: !0 }), y({ kind: "purchase_success", restored: !0 });
2157
2102
  return;
2158
2103
  }
2159
- const v = y instanceof j ? y : new j("checkout_failed", "Checkout failed", { cause: y });
2160
- n("error", v), g({ kind: "layout" });
2104
+ const C = g instanceof B ? g : new B("checkout_failed", "Checkout failed", { cause: g });
2105
+ n("error", C), y({ kind: "layout" });
2161
2106
  }
2162
- }, E = (m, y) => {
2107
+ }, P = (m, g) => {
2163
2108
  if (typeof window > "u") return;
2164
- const v = window.open(y, "_blank");
2165
- if (v) {
2109
+ const C = window.open(g, "_blank");
2110
+ if (C) {
2166
2111
  try {
2167
- v.opener = null;
2112
+ C.opener = null;
2168
2113
  } catch {
2169
2114
  }
2170
- g({ kind: "awaiting_payment", priceId: m, url: y });
2115
+ y({ kind: "awaiting_payment", priceId: m, url: g });
2171
2116
  }
2172
2117
  };
2173
- T(() => {
2174
- if (f.kind !== "auth_gate" || !b || b.user.is_anonymous || A.current) return;
2175
- A.current = !0;
2176
- const m = f.pendingCheckout, y = f.origin;
2177
- g({ kind: "verifying" }), (async () => {
2178
- if (!a)
2118
+ O(() => {
2119
+ if (p.kind !== "auth_gate" || !w || w.user.is_anonymous || U.current) return;
2120
+ U.current = !0;
2121
+ const m = p.pendingCheckout, g = p.origin;
2122
+ y({ kind: "verifying" }), (async () => {
2123
+ if (!c)
2179
2124
  try {
2180
2125
  if ((await r.getUser({ force: !0 })).has_active_subscription) {
2181
2126
  n("purchase_completed", {
2182
2127
  priceId: m?.priceId ?? null,
2183
2128
  sessionId: null,
2184
2129
  restored: !0
2185
- }), g({ kind: "purchase_success", restored: !0 });
2130
+ }), y({ kind: "purchase_success", restored: !0 });
2186
2131
  return;
2187
2132
  }
2188
2133
  } catch {
2189
2134
  }
2190
2135
  if (!m) {
2191
- y === "standalone" ? t() : g({ kind: "layout" });
2136
+ g === "standalone" ? t() : y({ kind: "layout" });
2192
2137
  return;
2193
2138
  }
2194
- await k(m.priceId);
2139
+ await S(m.priceId);
2195
2140
  })().finally(() => {
2196
- A.current = !1;
2141
+ U.current = !1;
2197
2142
  });
2198
- }, [b, f]);
2199
- const I = async (m, y) => {
2143
+ }, [w, p]);
2144
+ const M = async (m, g) => {
2200
2145
  if (m === "close") {
2201
2146
  t();
2202
2147
  return;
2203
2148
  }
2204
2149
  if (m === "price_selected") {
2205
- n("price_selected", y);
2150
+ n("price_selected", g);
2206
2151
  return;
2207
2152
  }
2208
2153
  if (m === "restore") {
2209
2154
  if (!r.auth) return;
2210
- const v = r.auth.getCachedSession();
2211
- if (v && !v.user.is_anonymous) return;
2212
- g({ kind: "auth_gate", intent: "restore" });
2155
+ const C = r.auth.getCachedSession();
2156
+ if (C && !C.user.is_anonymous) return;
2157
+ y({ kind: "auth_gate", intent: "restore" });
2213
2158
  return;
2214
2159
  }
2215
2160
  if (m === "support") {
2216
- g({ kind: "support", origin: "layout" });
2161
+ y({ kind: "support", origin: "layout" });
2217
2162
  return;
2218
2163
  }
2219
- if (m === "checkout" && u.status === "ready") {
2220
- const v = y?.priceId;
2221
- if (!v) {
2222
- n("error", new j("no_price", "No price selected"));
2164
+ if (m === "checkout" && d.status === "ready") {
2165
+ const C = g?.priceId;
2166
+ if (!C) {
2167
+ n("error", new B("no_price", "No price selected"));
2223
2168
  return;
2224
2169
  }
2225
- const S = u.data.settings.checkout_mode ?? "guest", P = r.auth?.getCachedSession() ?? null, V = !!P && !P.user.is_anonymous;
2226
- if (S === "preauth" && !!r.auth && !V) {
2227
- g({ kind: "auth_gate", pendingCheckout: { priceId: v } });
2170
+ const I = d.data.settings.checkout_mode ?? "guest", A = r.auth?.getCachedSession() ?? null, V = !!A && !A.user.is_anonymous;
2171
+ if (I === "preauth" && !!r.auth && !V) {
2172
+ y({ kind: "auth_gate", pendingCheckout: { priceId: C } });
2228
2173
  return;
2229
2174
  }
2230
- await k(v);
2175
+ await S(C);
2231
2176
  }
2232
- }, O = u.status === "ready" ? u.data.settings.brand_color : null, B = u.status === "ready" ? u.data.settings.allow_close !== !1 : !0, q = f.kind === "layout" && u.status === "ready" ? Te(u.data.offers) : null, D = q ? /* @__PURE__ */ o(kt, { offer: q }) : null, N = {
2177
+ }, j = d.status === "ready" ? d.data.settings.brand_color : null, T = d.status === "ready" ? d.data.settings.allow_close !== !1 : !0, q = p.kind === "layout" && d.status === "ready" ? Me(d.data.offers) : null, E = q ? /* @__PURE__ */ o(bt, { offer: q }) : null, L = {
2233
2178
  type: "auth_panel",
2234
2179
  // Заголовок не задаём — AuthGate сам решит по intent'у (restore →
2235
2180
  // "Restore Purchases", остальные → дефолтный "Welcome back!").
@@ -2238,91 +2183,83 @@ function er({
2238
2183
  // Не скрываем при наличии сессии — auto-resume useEffect отрабатывает быстрее,
2239
2184
  // чем хотим показывать "Signed in as ..." промежуточным экраном.
2240
2185
  hide_when_authenticated: !1,
2241
- providers: u.status === "ready" ? u.data.settings.auth_providers : void 0
2242
- }, L = f.kind === "support" ? /* @__PURE__ */ o(
2243
- _t,
2186
+ providers: d.status === "ready" ? d.data.settings.auth_providers : void 0
2187
+ }, R = p.kind === "support" ? /* @__PURE__ */ o(
2188
+ vt,
2244
2189
  {
2245
2190
  client: r,
2246
- authSession: b,
2247
- origin: f.origin,
2191
+ authSession: w,
2192
+ origin: p.origin,
2248
2193
  onBack: () => {
2249
- f.origin === "standalone" ? t() : g({ kind: "layout" });
2194
+ p.origin === "standalone" ? t() : y({ kind: "layout" });
2250
2195
  }
2251
2196
  }
2252
- ) : null, C = f.kind === "auth_gate" && f.origin !== "standalone" || f.kind === "support", U = u.status === "ready" ? u.data : null;
2253
- return /* @__PURE__ */ o(et, { bootstrap: U, forceLocale: p, children: /* @__PURE__ */ o(
2254
- tt,
2197
+ ) : null, N = p.kind === "auth_gate" && p.origin !== "standalone" || p.kind === "support", Y = d.status === "ready" ? d.data : null;
2198
+ return /* @__PURE__ */ o(Qe, { bootstrap: Y, forceLocale: h, children: /* @__PURE__ */ o(
2199
+ et,
2255
2200
  {
2256
2201
  open: e,
2257
2202
  onClose: t,
2258
- brandColor: O,
2259
- topBanner: D,
2260
- allowClose: B,
2261
- hideCloseButton: C,
2262
- inline: d,
2203
+ brandColor: j,
2204
+ topBanner: E,
2205
+ allowClose: T,
2206
+ hideCloseButton: N,
2207
+ inline: f,
2263
2208
  labelledBy: "pw-title",
2264
- children: s ? /* @__PURE__ */ o(ke, { onContinue: t }) : f.kind === "purchase_success" ? /* @__PURE__ */ o(ke, { restored: f.restored, onContinue: t }) : L || (u.status === "loading" || u.status === "idle" || f.kind === "verifying" ? /* @__PURE__ */ o(tr, { verifying: f.kind === "verifying" }) : u.status === "error" ? /* @__PURE__ */ o(rr, { message: u.error.message }) : f.kind === "auth_gate" && r.auth ? /* @__PURE__ */ o(
2209
+ children: a ? /* @__PURE__ */ o(we, { onContinue: t }) : p.kind === "purchase_success" ? /* @__PURE__ */ o(we, { restored: p.restored, onContinue: t }) : R || (d.status === "loading" || d.status === "idle" || p.kind === "verifying" ? /* @__PURE__ */ o(er, { verifying: p.kind === "verifying" }) : d.status === "error" ? /* @__PURE__ */ o(tr, { message: d.error.message }) : p.kind === "auth_gate" && r.auth ? /* @__PURE__ */ o(
2265
2210
  gt,
2266
2211
  {
2267
- block: N,
2268
- bootstrap: u.data,
2212
+ block: L,
2213
+ bootstrap: d.data,
2269
2214
  auth: r.auth,
2270
- authSession: b,
2271
- showBack: f.origin !== "standalone",
2272
- intent: f.intent ?? (f.origin === "standalone" ? "standalone" : "preauth"),
2215
+ authSession: w,
2216
+ showBack: p.origin !== "standalone",
2217
+ intent: p.intent ?? (p.origin === "standalone" ? "standalone" : "preauth"),
2218
+ initialMode: p.origin === "standalone" ? s : void 0,
2273
2219
  onBack: () => {
2274
- f.origin === "standalone" ? t() : g({ kind: "layout" });
2220
+ p.origin === "standalone" ? t() : y({ kind: "layout" });
2275
2221
  }
2276
2222
  }
2277
- ) : f.kind === "anon_gate" && r.auth ? /* @__PURE__ */ o(
2278
- yt,
2279
- {
2280
- auth: r.auth,
2281
- onSuccess: () => {
2282
- f.origin === "standalone" ? t() : g({ kind: "layout" });
2283
- },
2284
- onBack: f.origin === "standalone" ? void 0 : () => g({ kind: "layout" })
2285
- }
2286
- ) : f.kind === "awaiting_payment" ? /* @__PURE__ */ o(
2287
- ir,
2223
+ ) : p.kind === "awaiting_payment" ? /* @__PURE__ */ o(
2224
+ nr,
2288
2225
  {
2289
2226
  client: r,
2290
- onBack: () => g({ kind: "layout" }),
2227
+ onBack: () => y({ kind: "layout" }),
2291
2228
  onReopen: () => {
2292
2229
  if (typeof window > "u") return;
2293
- const m = window.open(f.url, "_blank");
2230
+ const m = window.open(p.url, "_blank");
2294
2231
  if (m)
2295
2232
  try {
2296
2233
  m.opener = null;
2297
2234
  } catch {
2298
2235
  }
2299
2236
  },
2300
- onRetry: () => k(f.priceId)
2237
+ onRetry: () => S(p.priceId)
2301
2238
  }
2302
- ) : f.kind === "popup_blocked" ? /* @__PURE__ */ o(nr, { onReopen: () => E(f.priceId, f.url) }) : /* @__PURE__ */ o(
2303
- Xt,
2239
+ ) : p.kind === "popup_blocked" ? /* @__PURE__ */ o(rr, { onReopen: () => P(p.priceId, p.url) }) : /* @__PURE__ */ o(
2240
+ Kt,
2304
2241
  {
2305
- layout: u.data.layout,
2306
- bootstrap: u.data,
2307
- onAction: I,
2242
+ layout: d.data.layout,
2243
+ bootstrap: d.data,
2244
+ onAction: M,
2308
2245
  auth: r.auth,
2309
- authSession: b
2246
+ authSession: w
2310
2247
  }
2311
2248
  ))
2312
2249
  }
2313
2250
  ) });
2314
2251
  }
2315
- function tr({ verifying: r }) {
2316
- const { t: e } = w();
2317
- return /* @__PURE__ */ c("div", { class: "flex flex-col items-center justify-center gap-3 py-12", children: [
2252
+ function er({ verifying: r }) {
2253
+ const { t: e } = k();
2254
+ return /* @__PURE__ */ u("div", { class: "flex flex-col items-center justify-center gap-3 py-12", children: [
2318
2255
  /* @__PURE__ */ o("span", { class: "inline-block h-7 w-7 animate-spin rounded-full border-[2.5px] border-gray-200 border-t-[var(--pw-accent)]" }),
2319
2256
  /* @__PURE__ */ o("span", { class: "text-xs font-medium tracking-wide text-gray-500", children: r ? e("modal.verifying_subscription", "Checking your subscription…") : e("modal.loading", "Loading…") })
2320
2257
  ] });
2321
2258
  }
2322
- function rr({ message: r }) {
2323
- const { t: e } = w();
2324
- return /* @__PURE__ */ c("div", { class: "flex flex-col items-center gap-2 py-8 text-center", children: [
2325
- /* @__PURE__ */ o("div", { class: "flex h-11 w-11 items-center justify-center rounded-full bg-red-50", children: /* @__PURE__ */ c("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
2259
+ function tr({ message: r }) {
2260
+ const { t: e } = k();
2261
+ return /* @__PURE__ */ u("div", { class: "flex flex-col items-center gap-2 py-8 text-center", children: [
2262
+ /* @__PURE__ */ o("div", { class: "flex h-11 w-11 items-center justify-center rounded-full bg-red-50", children: /* @__PURE__ */ u("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
2326
2263
  /* @__PURE__ */ o("path", { d: "M10 6v5M10 14h.01", stroke: "#dc2626", "stroke-width": "2", "stroke-linecap": "round" }),
2327
2264
  /* @__PURE__ */ o("circle", { cx: "10", cy: "10", r: "8", stroke: "#dc2626", "stroke-width": "1.75" })
2328
2265
  ] }) }),
@@ -2330,16 +2267,16 @@ function rr({ message: r }) {
2330
2267
  /* @__PURE__ */ o("p", { class: "text-xs leading-relaxed text-gray-500", children: r })
2331
2268
  ] });
2332
2269
  }
2333
- function nr({ onReopen: r }) {
2334
- const { t: e } = w();
2335
- return /* @__PURE__ */ c("div", { class: "flex flex-col items-center gap-3 py-8 text-center", children: [
2270
+ function rr({ onReopen: r }) {
2271
+ const { t: e } = k();
2272
+ return /* @__PURE__ */ u("div", { class: "flex flex-col items-center gap-3 py-8 text-center", children: [
2336
2273
  /* @__PURE__ */ o(
2337
2274
  "div",
2338
2275
  {
2339
2276
  class: "flex h-11 w-11 items-center justify-center rounded-full",
2340
2277
  style: { background: "color-mix(in srgb, var(--pw-accent) 12%, white)", color: "var(--pw-accent)" },
2341
2278
  "aria-hidden": "true",
2342
- children: /* @__PURE__ */ c("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", children: [
2279
+ children: /* @__PURE__ */ u("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", children: [
2343
2280
  /* @__PURE__ */ o("path", { d: "M4 5h12v10H4z", stroke: "currentColor", "stroke-width": "1.75", "stroke-linejoin": "round" }),
2344
2281
  /* @__PURE__ */ o("path", { d: "M7 9l3 3 4-5", stroke: "currentColor", "stroke-width": "1.75", "stroke-linecap": "round", "stroke-linejoin": "round" })
2345
2282
  ] })
@@ -2362,35 +2299,35 @@ function nr({ onReopen: r }) {
2362
2299
  )
2363
2300
  ] });
2364
2301
  }
2365
- function ir({
2302
+ function nr({
2366
2303
  client: r,
2367
2304
  onBack: e,
2368
2305
  onReopen: t,
2369
2306
  onRetry: n
2370
2307
  }) {
2371
- const { t: i } = w(), [s, a] = x(!1), [l, d] = x(!1), p = z(null);
2372
- T(() => () => {
2373
- p.current !== null && clearTimeout(p.current);
2308
+ const { t: i } = k(), [s, a] = x(!1), [c, l] = x(!1), f = z(null);
2309
+ O(() => () => {
2310
+ f.current !== null && clearTimeout(f.current);
2374
2311
  }, []);
2375
- const u = async () => {
2312
+ const h = async () => {
2376
2313
  if (!s) {
2377
- a(!0), d(!1);
2314
+ a(!0), l(!1);
2378
2315
  try {
2379
2316
  if ((await r.getUser({ force: !0 })).has_active_subscription) {
2380
2317
  typeof window < "u" && window.postMessage({ type: "paywall_purchase" }, "*");
2381
2318
  return;
2382
2319
  }
2383
- d(!0), p.current !== null && clearTimeout(p.current), p.current = setTimeout(() => {
2384
- d(!1), p.current = null;
2320
+ l(!0), f.current !== null && clearTimeout(f.current), f.current = setTimeout(() => {
2321
+ l(!1), f.current = null;
2385
2322
  }, 5e3);
2386
2323
  } catch {
2387
- d(!0);
2324
+ l(!0);
2388
2325
  } finally {
2389
2326
  a(!1);
2390
2327
  }
2391
2328
  }
2392
2329
  };
2393
- return /* @__PURE__ */ c("div", { class: "flex flex-col gap-3", children: [
2330
+ return /* @__PURE__ */ u("div", { class: "flex flex-col gap-3 px-6 pb-6 pt-4 sm:px-8 sm:pb-8 sm:pt-5", children: [
2394
2331
  /* @__PURE__ */ o(
2395
2332
  "button",
2396
2333
  {
@@ -2400,8 +2337,8 @@ function ir({
2400
2337
  children: i("nav.back", "← Back")
2401
2338
  }
2402
2339
  ),
2403
- /* @__PURE__ */ c("div", { class: "flex flex-col items-center gap-3 py-6 text-center", children: [
2404
- /* @__PURE__ */ c("div", { class: "relative flex h-12 w-12 items-center justify-center", children: [
2340
+ /* @__PURE__ */ u("div", { class: "flex flex-col items-center gap-3 py-6 text-center", children: [
2341
+ /* @__PURE__ */ u("div", { class: "relative flex h-12 w-12 items-center justify-center", children: [
2405
2342
  /* @__PURE__ */ o(
2406
2343
  "span",
2407
2344
  {
@@ -2421,7 +2358,7 @@ function ir({
2421
2358
  "button",
2422
2359
  {
2423
2360
  type: "button",
2424
- onClick: u,
2361
+ onClick: h,
2425
2362
  disabled: s,
2426
2363
  class: "mt-1 rounded-xl px-5 py-2.5 text-sm font-semibold text-white transition-all hover:-translate-y-px hover:brightness-105 disabled:cursor-not-allowed disabled:opacity-60 disabled:hover:translate-y-0 disabled:hover:brightness-100 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[var(--pw-accent)]",
2427
2364
  style: {
@@ -2431,9 +2368,9 @@ function ir({
2431
2368
  children: s ? i("payment.checking", "Checking…") : i("payment.ive_paid", "I've paid")
2432
2369
  }
2433
2370
  ),
2434
- l ? /* @__PURE__ */ o("p", { class: "text-xs leading-relaxed text-gray-500", children: i("payment.still_processing", "Payment is still being processed. Please try again in a moment.") }) : null
2371
+ c ? /* @__PURE__ */ o("p", { class: "text-xs leading-relaxed text-gray-500", children: i("payment.still_processing", "Payment is still being processed. Please try again in a moment.") }) : null
2435
2372
  ] }),
2436
- /* @__PURE__ */ c("div", { class: "rounded-2xl border border-gray-200 bg-gray-50/60 p-3.5", children: [
2373
+ /* @__PURE__ */ u("div", { class: "rounded-2xl border border-gray-200 bg-gray-50/60 p-3.5", children: [
2437
2374
  /* @__PURE__ */ o("p", { class: "text-xs leading-relaxed text-gray-600", children: i("payment.popup_help_text", "Checkout window didn't open or got blocked? Click here to open it again.") }),
2438
2375
  /* @__PURE__ */ o(
2439
2376
  "button",
@@ -2456,12 +2393,12 @@ function ir({
2456
2393
  )
2457
2394
  ] });
2458
2395
  }
2459
- function ke({
2396
+ function we({
2460
2397
  onContinue: r,
2461
2398
  restored: e = !1
2462
2399
  }) {
2463
- const { t } = w();
2464
- return /* @__PURE__ */ c("div", { class: "flex flex-col items-center gap-3 py-8 text-center", children: [
2400
+ const { t } = k();
2401
+ return /* @__PURE__ */ u("div", { class: "flex flex-col items-center gap-3 py-8 text-center", children: [
2465
2402
  /* @__PURE__ */ o(
2466
2403
  "div",
2467
2404
  {
@@ -2505,17 +2442,17 @@ function ke({
2505
2442
  )
2506
2443
  ] });
2507
2444
  }
2508
- const or = 10 * 6e4, sr = 5e3, ar = 3e4;
2509
- class lr {
2445
+ const ir = 10 * 6e4, or = 5e3, sr = 3e4;
2446
+ class ar {
2510
2447
  constructor(e) {
2511
2448
  this.timer = null, this.timeoutTimer = null, this.visibilityHandler = null, this.focusHandler = null, this.messageHandler = null, this.stopped = !1, this.checking = !1, this.opts = {
2512
2449
  client: e.client,
2513
2450
  onActive: e.onActive,
2514
2451
  onTimeout: e.onTimeout ?? (() => {
2515
2452
  }),
2516
- timeoutMs: e.timeoutMs ?? or,
2517
- visibleIntervalMs: e.visibleIntervalMs ?? sr,
2518
- hiddenIntervalMs: e.hiddenIntervalMs ?? ar
2453
+ timeoutMs: e.timeoutMs ?? ir,
2454
+ visibleIntervalMs: e.visibleIntervalMs ?? or,
2455
+ hiddenIntervalMs: e.hiddenIntervalMs ?? sr
2519
2456
  };
2520
2457
  }
2521
2458
  start() {
@@ -2554,19 +2491,19 @@ class lr {
2554
2491
  !t || typeof t != "object" || t.type === "paywall_purchase" && this.check();
2555
2492
  }
2556
2493
  }
2557
- function cr() {
2494
+ function lr() {
2558
2495
  return !(typeof document > "u" || typeof window > "u" || typeof location < "u" && location.protocol === "chrome-extension:");
2559
2496
  }
2560
- const ae = { open: !1, view: null, error: null }, F = {
2497
+ const ie = { open: !1, view: null, error: null }, F = {
2561
2498
  status: "paywall_status",
2562
2499
  priceId: "paywall_price_id",
2563
2500
  sessionId: "paywall_session_id"
2564
2501
  };
2565
- let ur = class {
2502
+ let cr = class {
2566
2503
  constructor(e) {
2567
- this.handle = null, this.isOpen = !1, this.listeners = /* @__PURE__ */ new Map(), this.userUnsub = null, this.authUnsub = null, this.watcher = null, this.tracker = null, this.purchased = !1, this.trialStore = null, this.trialStoreConfig = null, this.lastTrialStatus = null, this.trialExpiredFired = !1, this.lastVisibility = null, this.currentState = ae, this.stateListeners = /* @__PURE__ */ new Set();
2568
- const { auth: t, ownsAuth: n } = dr(e);
2569
- this.auth = t, this.ownsAuth = n, this.billing = e.client ?? new Re({ ...e, auth: this.auth }), this.host = e.host, this.shadowMode = e.shadowMode ?? "closed", this.mountThenLoad = e.mountThenLoad ?? !0, this.inline = e.inline === !0, this.forceLocale = e.locale ?? null, this.userUnsub = this.billing.onUserChange((i) => {
2504
+ this.handle = null, this.isOpen = !1, this.listeners = /* @__PURE__ */ new Map(), this.userUnsub = null, this.authUnsub = null, this.watcher = null, this.tracker = null, this.purchased = !1, this.trialStore = null, this.trialStoreConfig = null, this.lastTrialStatus = null, this.trialExpiredFired = !1, this.lastVisibility = null, this.currentState = ie, this.stateListeners = /* @__PURE__ */ new Set();
2505
+ const { auth: t, ownsAuth: n } = ur(e);
2506
+ this.auth = t, this.ownsAuth = n, this.billing = e.client ?? new Ue({ ...e, auth: this.auth }), this.host = e.host, this.shadowMode = e.shadowMode ?? "closed", this.mountThenLoad = e.mountThenLoad ?? !0, this.inline = e.inline === !0, this.forceLocale = e.locale ?? null, this.userUnsub = this.billing.onUserChange((i) => {
2570
2507
  this.emit("userChange", i);
2571
2508
  }), this.auth && (this.authUnsub = this.auth.onAuthChange((i, s) => {
2572
2509
  this.emit("authChange", { event: i, session: s });
@@ -2577,7 +2514,7 @@ let ur = class {
2577
2514
  const t = typeof e == "object" && e !== null ? e : {};
2578
2515
  if (t.enabled === !1) return;
2579
2516
  const n = t.endpoint ?? `${this.billing.apiOrigin}/api/v1/paywall/${this.billing.paywallId}/events`;
2580
- this.tracker = new ze({
2517
+ this.tracker = new je({
2581
2518
  endpoint: n,
2582
2519
  paywallId: this.billing.paywallId,
2583
2520
  capabilities: this.billing.capabilities,
@@ -2744,30 +2681,50 @@ let ur = class {
2744
2681
  this.auth && this.openInternal("auth", { ...e, skipTrial: !0 });
2745
2682
  }
2746
2683
  /**
2747
- * Открывает модалку с anonymous-gate. AnonGate сразу зовёт
2748
- * `auth.signInAnonymously()`:
2749
- * - если в storage есть `anonRefreshToken` silent resume через
2750
- * /auth/refresh, модалка схлопывается мгновенно (юзер видит лёгкий
2751
- * спиннер ~100мс);
2752
- * - иначе — fresh POST /auth/anonymous/signin без captcha (защита от
2753
- * abuse держится на Supabase per-real-IP rate-limit + CF Bot Fight Mode).
2754
- *
2755
- * После успешного signIn'а модалка закрывается; host подхватывает свежую
2756
- * session через `auth.onAuthChange` или `paywall.onUserChange`. Для UX
2757
- * "просто залогиниться чтобы api-gateway работал, без покупок".
2684
+ * Шорткат над `openAuth()` открывает модалку сразу на signin-форме.
2685
+ * Эквивалент `openAuth()` (signin — дефолт). Существует для симметрии с
2686
+ * `openSignup()` и читаемости host-кода:
2687
+ * - `paywall.openSignin()` «вход в существующий аккаунт»
2688
+ * - `paywall.openSignup()` — «новая регистрация»
2689
+ * Без managed-auth no-op.
2690
+ */
2691
+ openSignin(e = {}) {
2692
+ this.auth && this.openInternal("auth", { ...e, skipTrial: !0, authMode: "signin" });
2693
+ }
2694
+ /**
2695
+ * Открывает модалку с auth-gate сразу в режиме регистрации (signup-mode
2696
+ * AuthPanel'а — email/password/repeat). Если в paywall layout админ
2697
+ * отключил allow_signup, AuthPanel игнорит mode и стартует с signin —
2698
+ * соблюдается admin-конфиг.
2699
+ * Без managed-auth — no-op.
2700
+ */
2701
+ openSignup(e = {}) {
2702
+ this.auth && this.openInternal("auth", { ...e, skipTrial: !0, authMode: "signup" });
2703
+ }
2704
+ /**
2705
+ * Headless anonymous signin без открытия модалки. Внутри:
2706
+ * idempotent (если уже анон — instant return) → resume через сохранённый
2707
+ * refresh_token → fresh /auth/anonymous/signin. Дедуплицирует
2708
+ * параллельные вызовы внутри AuthClient'а.
2758
2709
  *
2759
- * Без managed-auth (`auth` не подключён) методno-op. Триал и
2760
- * visibility-таргетинг этот flow обходит: анон-логин не должен зависеть
2761
- * от страны юзера или trial-стейджа.
2710
+ * Удобно для host-кнопок типа «Continue as guest» host сам управляет
2711
+ * loading-стейтом на своей кнопке, без полупустой модалки со спиннером.
2712
+ * Без managed-auth резолвится rejected promise'ом (нет AuthClient'а
2713
+ * чтобы делать signin).
2762
2714
  */
2763
- openAnonGate(e = {}) {
2764
- this.auth && this.openInternal("anon", { ...e, skipTrial: !0, skipVisibility: !0 });
2715
+ signInAnonymously() {
2716
+ return this.auth ? this.auth.signInAnonymously() : Promise.reject(
2717
+ new B(
2718
+ "invalid_config",
2719
+ "signInAnonymously requires managed-auth. Pass `auth: true` to PaywallUI."
2720
+ )
2721
+ );
2765
2722
  }
2766
2723
  openInternal(e, t) {
2767
2724
  t.identity && this.billing.setIdentity(t.identity), this.purchased = !1;
2768
- const n = t.skipTrial === !0 || e === "support", i = t.skipVisibility === !0 || e === "support" || e === "auth" || e === "anon", s = t.renew === !0;
2725
+ const n = t.skipTrial === !0 || e === "support", i = t.skipVisibility === !0 || e === "support" || e === "auth", s = t.renew === !0;
2769
2726
  if (n && i) {
2770
- this.mountAndShow(e, { renew: s });
2727
+ this.mountAndShow(e, { renew: s, authMode: t.authMode });
2771
2728
  return;
2772
2729
  }
2773
2730
  const a = this.billing.getCachedBootstrap();
@@ -2776,11 +2733,11 @@ let ur = class {
2776
2733
  return;
2777
2734
  }
2778
2735
  if (this.mountThenLoad) {
2779
- this.mountAndShow(e, { renew: s }), this.billing.bootstrap().then((l) => this.runDelayedGates(l, { skipTrial: n, skipVisibility: i })).catch(() => {
2736
+ this.mountAndShow(e, { renew: s }), this.billing.bootstrap().then((c) => this.runDelayedGates(c, { skipTrial: n, skipVisibility: i })).catch(() => {
2780
2737
  });
2781
2738
  return;
2782
2739
  }
2783
- this.billing.bootstrap().then((l) => this.runOpenGates(e, l, { skipTrial: n, skipVisibility: i, renew: s })).catch(() => {
2740
+ this.billing.bootstrap().then((c) => this.runOpenGates(e, c, { skipTrial: n, skipVisibility: i, renew: s })).catch(() => {
2784
2741
  this.mountAndShow(e, { renew: s });
2785
2742
  });
2786
2743
  }
@@ -2845,8 +2802,8 @@ let ur = class {
2845
2802
  return;
2846
2803
  }
2847
2804
  if (a.blocked) {
2848
- const l = await s.recordBlock();
2849
- this.lastTrialStatus = l, this.emit("trial_blocked", l);
2805
+ const c = await s.recordBlock();
2806
+ this.lastTrialStatus = c, this.emit("trial_blocked", c);
2850
2807
  return;
2851
2808
  }
2852
2809
  this.trialExpiredFired || (this.trialExpiredFired = !0, this.emit("trial_expired")), this.mountAndShow(e, { renew: n });
@@ -2855,31 +2812,38 @@ let ur = class {
2855
2812
  });
2856
2813
  }
2857
2814
  ensureTrialStore(e) {
2858
- if (this.trialStore && this.trialStoreConfig && fr(this.trialStoreConfig, e))
2815
+ if (this.trialStore && this.trialStoreConfig && pr(this.trialStoreConfig, e))
2859
2816
  return this.trialStore;
2860
2817
  this.trialStoreConfig = e;
2861
2818
  const t = this.billing.createTrialStore;
2862
- return this.trialStore = typeof t == "function" ? t.call(this.billing, e) : De(this.billing.getStorage(), this.billing.paywallId, e), this.trialStore;
2819
+ return this.trialStore = typeof t == "function" ? t.call(this.billing, e) : Re(this.billing.getStorage(), this.billing.paywallId, e), this.trialStore;
2863
2820
  }
2864
2821
  mountAndShow(e, t = {}) {
2865
- const n = t.renew === !0;
2822
+ const n = t.renew === !0, i = t.authMode;
2866
2823
  if (this.handle) {
2867
- this.isOpen = !0, this.handle.update({ open: !0, initialView: e, purchased: !1, renew: n }), this.emit("open");
2824
+ this.isOpen = !0, this.handle.update({
2825
+ open: !0,
2826
+ initialView: e,
2827
+ initialAuthMode: i,
2828
+ purchased: !1,
2829
+ renew: n
2830
+ }), this.emit("open");
2868
2831
  return;
2869
2832
  }
2870
- this.isOpen = !0, this.handle = Ze(
2871
- er,
2833
+ this.isOpen = !0, this.handle = We(
2834
+ Qt,
2872
2835
  {
2873
2836
  client: this.billing,
2874
2837
  open: !0,
2875
2838
  initialView: e,
2839
+ initialAuthMode: i,
2876
2840
  purchased: !1,
2877
2841
  renew: n,
2878
2842
  onClose: () => this.close(),
2879
- onEvent: (i, s) => {
2880
- this.emit(i, s), i === "checkout_started" && this.startUserWatcher();
2843
+ onEvent: (s, a) => {
2844
+ this.emit(s, a), s === "checkout_started" && this.startUserWatcher();
2881
2845
  },
2882
- onState: (i) => this.applyState(i),
2846
+ onState: (s) => this.applyState(s),
2883
2847
  inline: this.inline,
2884
2848
  locale: this.forceLocale
2885
2849
  },
@@ -2887,7 +2851,7 @@ let ur = class {
2887
2851
  ), this.emit("open");
2888
2852
  }
2889
2853
  applyState(e) {
2890
- if (!pr(this.currentState, e)) {
2854
+ if (!hr(this.currentState, e)) {
2891
2855
  this.currentState = e;
2892
2856
  for (const t of this.stateListeners)
2893
2857
  try {
@@ -3035,8 +2999,8 @@ let ur = class {
3035
2999
  try {
3036
3000
  if (s = await this.ensureTrialStore(a).check(), this.lastTrialStatus = s, s.blocked)
3037
3001
  return { access: "granted", reason: "trial_blocked", visibility: i, trial: s, user: n };
3038
- } catch (l) {
3039
- typeof console < "u" && console.warn("[paywall] getAccess: trial check failed", l);
3002
+ } catch (c) {
3003
+ typeof console < "u" && console.warn("[paywall] getAccess: trial check failed", c);
3040
3004
  }
3041
3005
  }
3042
3006
  return { access: "blocked", reason: "no_subscription", visibility: i, trial: s, user: n };
@@ -3053,7 +3017,7 @@ let ur = class {
3053
3017
  // В extension popup runtime — no-op (popup не доживёт). Там полагаемся на
3054
3018
  // bootstrap при следующем открытии.
3055
3019
  startUserWatcher() {
3056
- this.watcher || cr() && (this.watcher = new lr({
3020
+ this.watcher || lr() && (this.watcher = new ar({
3057
3021
  client: this.billing,
3058
3022
  onActive: (e) => {
3059
3023
  this.watcher = null, this.emit("purchase_completed", { priceId: null, sessionId: null });
@@ -3072,7 +3036,7 @@ let ur = class {
3072
3036
  }), this.watcher.start());
3073
3037
  }
3074
3038
  close() {
3075
- !this.isOpen || !this.handle || (this.isOpen = !1, this.purchased = !1, this.handle.update({ open: !1, purchased: !1 }), this.applyState(ae), this.emit("close"));
3039
+ !this.isOpen || !this.handle || (this.isOpen = !1, this.purchased = !1, this.handle.update({ open: !1, purchased: !1 }), this.applyState(ie), this.emit("close"));
3076
3040
  }
3077
3041
  /**
3078
3042
  * Сканирует текущий URL на маркеры возврата с checkout и эмитит
@@ -3082,23 +3046,23 @@ let ur = class {
3082
3046
  */
3083
3047
  checkReturn() {
3084
3048
  if (typeof window > "u") return;
3085
- const e = new URL(window.location.href), t = ve(e.hash.replace(/^#/, "")), n = ve(e.search.replace(/^\?/, "")), i = t ?? n;
3049
+ const e = new URL(window.location.href), t = ke(e.hash.replace(/^#/, "")), n = ke(e.search.replace(/^\?/, "")), i = t ?? n;
3086
3050
  i && (i.status === "paid" ? (this.emit("purchase_completed", {
3087
3051
  priceId: i.priceId,
3088
3052
  sessionId: i.sessionId
3089
- }), gr(i)) : (i.status === "failed" || i.status === "cancelled") && this.emit("purchase_failed", { reason: i.status }), mr(e));
3053
+ }), fr(i)) : (i.status === "failed" || i.status === "cancelled") && this.emit("purchase_failed", { reason: i.status }), gr(e));
3090
3054
  }
3091
3055
  destroy() {
3092
- this.tracker?.destroy(), this.tracker = null, this.listeners.clear(), this.stateListeners.clear(), this.watcher?.stop(), this.watcher = null, this.userUnsub?.(), this.userUnsub = null, this.authUnsub?.(), this.authUnsub = null, this.ownsAuth && this.auth && this.auth.destroy?.(), this.ownsAuth = !1, this.billing.destroy?.(), this.handle?.unmount(), this.handle = null, this.isOpen = !1, this.currentState = ae;
3056
+ this.tracker?.destroy(), this.tracker = null, this.listeners.clear(), this.stateListeners.clear(), this.watcher?.stop(), this.watcher = null, this.userUnsub?.(), this.userUnsub = null, this.authUnsub?.(), this.authUnsub = null, this.ownsAuth && this.auth && this.auth.destroy?.(), this.ownsAuth = !1, this.billing.destroy?.(), this.handle?.unmount(), this.handle = null, this.isOpen = !1, this.currentState = ie;
3093
3057
  }
3094
3058
  };
3095
- function dr(r) {
3059
+ function ur(r) {
3096
3060
  if (!r.auth) return { auth: void 0, ownsAuth: !1 };
3097
- if (r.auth instanceof ue || hr(r.auth))
3061
+ if (r.auth instanceof le || dr(r.auth))
3098
3062
  return { auth: r.auth, ownsAuth: !1 };
3099
3063
  const e = r.auth === !0 ? {} : r.auth;
3100
3064
  return {
3101
- auth: new ue({
3065
+ auth: new le({
3102
3066
  paywallId: r.paywallId,
3103
3067
  apiOrigin: e.apiOrigin ?? r.apiOrigin,
3104
3068
  storage: e.storage ?? r.storage,
@@ -3108,18 +3072,18 @@ function dr(r) {
3108
3072
  ownsAuth: !0
3109
3073
  };
3110
3074
  }
3111
- function hr(r) {
3075
+ function dr(r) {
3112
3076
  if (typeof r != "object" || r === null) return !1;
3113
3077
  const e = r;
3114
3078
  return typeof e.onAuthChange == "function" && typeof e.getCachedSession == "function" && typeof e.signOut == "function";
3115
3079
  }
3116
- function pr(r, e) {
3080
+ function hr(r, e) {
3117
3081
  return r.open === e.open && r.view === e.view && r.error === e.error;
3118
3082
  }
3119
- function fr(r, e) {
3083
+ function pr(r, e) {
3120
3084
  return r.mode === e.mode && r.payload === e.payload && r.storage === e.storage;
3121
3085
  }
3122
- function ve(r) {
3086
+ function ke(r) {
3123
3087
  if (!r) return null;
3124
3088
  const e = new URLSearchParams(r), t = e.get(F.status);
3125
3089
  return t ? {
@@ -3128,7 +3092,7 @@ function ve(r) {
3128
3092
  sessionId: e.get(F.sessionId)
3129
3093
  } : null;
3130
3094
  }
3131
- function gr(r) {
3095
+ function fr(r) {
3132
3096
  if (!(typeof window > "u" || !window.opener))
3133
3097
  try {
3134
3098
  window.opener.postMessage(
@@ -3143,7 +3107,7 @@ function gr(r) {
3143
3107
  } catch {
3144
3108
  }
3145
3109
  }
3146
- function mr(r) {
3110
+ function gr(r) {
3147
3111
  const e = (n, i) => {
3148
3112
  if (!n) return "";
3149
3113
  const s = new URLSearchParams(n.replace(/^[?#]/, ""));
@@ -3153,7 +3117,7 @@ function mr(r) {
3153
3117
  }, t = r.pathname + e(r.search, "?") + e(r.hash, "#");
3154
3118
  window.history.replaceState(null, "", t);
3155
3119
  }
3156
- class yr {
3120
+ class mr {
3157
3121
  constructor(e, t, n) {
3158
3122
  this.transport = e, this.paywallId = t, this.config = n;
3159
3123
  }
@@ -3176,7 +3140,7 @@ class yr {
3176
3140
  });
3177
3141
  }
3178
3142
  }
3179
- class xr {
3143
+ class yr {
3180
3144
  constructor(e, t) {
3181
3145
  this.transport = e, this.cachedBootstrap = null, this.cachedUser = null, this.cachedBalances = null, this.identity = null, this.userListeners = /* @__PURE__ */ new Set(), this.balanceListeners = /* @__PURE__ */ new Set(), this.bootstrapListeners = /* @__PURE__ */ new Set(), this.unsubUserBroadcast = null, this.unsubBalancesBroadcast = null, this.paywallId = t.paywallId, this.apiOrigin = t.apiOrigin, this.remoteStorageAdapter = {
3182
3146
  getItem: (n) => this.transport.request("storage.get", { key: n }),
@@ -3357,7 +3321,7 @@ class xr {
3357
3321
  * read-modify-write. PaywallUI duck-types этот метод и предпочитает его
3358
3322
  * локальной фабрике, если он есть. */
3359
3323
  createTrialStore(e) {
3360
- return new yr(this.transport, this.paywallId, e);
3324
+ return new mr(this.transport, this.paywallId, e);
3361
3325
  }
3362
3326
  // === Identity ===
3363
3327
  getIdentity() {
@@ -3390,10 +3354,10 @@ class xr {
3390
3354
  * broadcast'ов от offscreen — чтобы host'овский onUserChange handler
3391
3355
  * получил signal независимо от того, кто триггернул обновление. */
3392
3356
  applyUser(e) {
3393
- br(this.cachedUser, e) || (this.cachedUser = e, this.fireUserListeners(e));
3357
+ xr(this.cachedUser, e) || (this.cachedUser = e, this.fireUserListeners(e));
3394
3358
  }
3395
3359
  applyBalances(e) {
3396
- wr(this.cachedBalances, e) || (this.cachedBalances = e, this.fireBalanceListeners(e));
3360
+ br(this.cachedBalances, e) || (this.cachedBalances = e, this.fireBalanceListeners(e));
3397
3361
  }
3398
3362
  fireUserListeners(e) {
3399
3363
  for (const t of [...this.userListeners])
@@ -3412,17 +3376,17 @@ class xr {
3412
3376
  }
3413
3377
  }
3414
3378
  }
3415
- function br(r, e) {
3379
+ function xr(r, e) {
3416
3380
  return r === e ? !0 : !r || !e ? !1 : r.has_active_subscription === e.has_active_subscription && (r.purchases?.length ?? 0) === (e.purchases?.length ?? 0);
3417
3381
  }
3418
- function wr(r, e) {
3382
+ function br(r, e) {
3419
3383
  if (r === e) return !0;
3420
3384
  if (!r || !e || r.length !== e.length) return !1;
3421
3385
  for (let t = 0; t < r.length; t++)
3422
3386
  if (r[t].type !== e[t].type || r[t].count !== e[t].count) return !1;
3423
3387
  return !0;
3424
3388
  }
3425
- class kr {
3389
+ class wr {
3426
3390
  constructor(e, t) {
3427
3391
  this.transport = e, this.session = null, this.listeners = /* @__PURE__ */ new Set(), this.unsubBroadcast = null, this.paywallId = t.paywallId, this.apiOrigin = t.apiOrigin, this.unsubBroadcast = this.transport.on("authChange", ({ event: n, session: i }) => {
3428
3392
  this.applySession(n, i);
@@ -3533,14 +3497,14 @@ class kr {
3533
3497
  */
3534
3498
  async signInWithOAuth(e) {
3535
3499
  if (typeof window > "u")
3536
- throw new j("oauth_unavailable", "window is required for OAuth");
3500
+ throw new B("oauth_unavailable", "window is required for OAuth");
3537
3501
  const t = `pw-oauth-pending-${Math.random().toString(36).slice(2, 10)}`, n = window.open("about:blank", t, "width=480,height=640,popup=yes");
3538
3502
  if (!n)
3539
- throw new j(
3503
+ throw new B(
3540
3504
  "popup_blocked",
3541
3505
  "browser blocked auth popup — call from a user gesture"
3542
3506
  );
3543
- Sr(n, e.provider);
3507
+ _r(n, e.provider);
3544
3508
  try {
3545
3509
  const { authorizeUrl: i, state: s } = await this.transport.request("auth.oauthStart", {
3546
3510
  provider: e.provider,
@@ -3548,8 +3512,8 @@ class kr {
3548
3512
  userMeta: e.userMeta
3549
3513
  });
3550
3514
  n.name = `pw-oauth-${s}`, n.location.replace(i), e.onPopupOpened?.();
3551
- const a = await qe(n, s), l = await this.transport.request("auth.oauthExchange", { state: s, code: a });
3552
- return this.applySession("SIGNED_IN", l), l;
3515
+ const a = await ze(n, s), c = await this.transport.request("auth.oauthExchange", { state: s, code: a });
3516
+ return this.applySession("SIGNED_IN", c), c;
3553
3517
  } catch (i) {
3554
3518
  try {
3555
3519
  n.close();
@@ -3562,7 +3526,7 @@ class kr {
3562
3526
  this.unsubBroadcast?.(), this.unsubBroadcast = null, this.listeners.clear(), this.session = null;
3563
3527
  }
3564
3528
  applySession(e, t) {
3565
- if (!vr(this.session, t)) {
3529
+ if (!kr(this.session, t)) {
3566
3530
  this.session = t;
3567
3531
  for (const n of [...this.listeners])
3568
3532
  try {
@@ -3573,17 +3537,17 @@ class kr {
3573
3537
  }
3574
3538
  }
3575
3539
  }
3576
- function vr(r, e) {
3540
+ function kr(r, e) {
3577
3541
  return r === e ? !0 : !r || !e ? !1 : r.access_token === e.access_token && r.refresh_token === e.refresh_token && r.expires_at === e.expires_at && r.user.id === e.user.id;
3578
3542
  }
3579
- const _r = {
3543
+ const vr = {
3580
3544
  google: "Google",
3581
3545
  apple: "Apple",
3582
3546
  github: "GitHub",
3583
3547
  facebook: "Facebook"
3584
3548
  };
3585
- function Sr(r, e) {
3586
- const t = _r[e] ?? e;
3549
+ function _r(r, e) {
3550
+ const t = vr[e] ?? e;
3587
3551
  try {
3588
3552
  const n = r.document;
3589
3553
  n.title = `Sign in with ${t}`;
@@ -3593,12 +3557,12 @@ function Sr(r, e) {
3593
3557
  s.className = "pw-oauth-wrap";
3594
3558
  const a = n.createElement("div");
3595
3559
  a.className = "pw-oauth-spinner";
3596
- const l = n.createElement("div");
3597
- l.className = "pw-oauth-label", l.textContent = `Connecting to ${t}…`, s.appendChild(a), s.appendChild(l), n.body.appendChild(s);
3560
+ const c = n.createElement("div");
3561
+ c.className = "pw-oauth-label", c.textContent = `Connecting to ${t}…`, s.appendChild(a), s.appendChild(c), n.body.appendChild(s);
3598
3562
  } catch {
3599
3563
  }
3600
3564
  }
3601
- class Cr {
3565
+ class Sr {
3602
3566
  constructor(e) {
3603
3567
  this.transport = e;
3604
3568
  }
@@ -3610,7 +3574,7 @@ class Cr {
3610
3574
  });
3611
3575
  }
3612
3576
  }
3613
- class Ir {
3577
+ class Cr {
3614
3578
  constructor(e) {
3615
3579
  this.factory = e, this.channel = null, this.channelDisposers = [], this.pending = /* @__PURE__ */ new Map(), this.listeners = /* @__PURE__ */ new Map(), this.destroyed = !1, this.nextId = 0, this.clientId = `c-${Math.random().toString(36).slice(2, 10)}`;
3616
3580
  }
@@ -3638,7 +3602,7 @@ class Ir {
3638
3602
  if (e.type === "response") {
3639
3603
  const t = this.pending.get(e.id);
3640
3604
  if (!t) return;
3641
- this.pending.delete(e.id), t.signal?.removeEventListener("abort", t.abortListener), e.ok ? t.resolve(e.result) : t.reject(Ne(e.error));
3605
+ this.pending.delete(e.id), t.signal?.removeEventListener("abort", t.abortListener), e.ok ? t.resolve(e.result) : t.reject(De(e.error));
3642
3606
  return;
3643
3607
  }
3644
3608
  if (e.type === "event") {
@@ -3659,7 +3623,7 @@ class Ir {
3659
3623
  const e = Array.from(this.pending.values());
3660
3624
  this.pending.clear();
3661
3625
  for (const t of e)
3662
- t.signal?.removeEventListener("abort", t.abortListener), t.reject(new Lr());
3626
+ t.signal?.removeEventListener("abort", t.abortListener), t.reject(new Ir());
3663
3627
  }
3664
3628
  request(e, t, n = {}) {
3665
3629
  if (this.destroyed)
@@ -3667,31 +3631,31 @@ class Ir {
3667
3631
  if (n.signal?.aborted)
3668
3632
  return Promise.reject(new DOMException("Aborted", "AbortError"));
3669
3633
  const i = this.ensureChannel(), s = `r${++this.nextId}`;
3670
- return new Promise((a, l) => {
3671
- const d = {
3634
+ return new Promise((a, c) => {
3635
+ const l = {
3672
3636
  resolve: a,
3673
- reject: l,
3637
+ reject: c,
3674
3638
  signal: n.signal
3675
3639
  };
3676
- n.signal && (d.abortListener = () => {
3640
+ n.signal && (l.abortListener = () => {
3677
3641
  if (this.pending.delete(s)) {
3678
- l(new DOMException("Aborted", "AbortError"));
3642
+ c(new DOMException("Aborted", "AbortError"));
3679
3643
  try {
3680
3644
  i.send({ type: "cancel", id: s });
3681
3645
  } catch {
3682
3646
  }
3683
3647
  }
3684
- }, n.signal.addEventListener("abort", d.abortListener)), this.pending.set(s, d);
3685
- const p = {
3648
+ }, n.signal.addEventListener("abort", l.abortListener)), this.pending.set(s, l);
3649
+ const f = {
3686
3650
  type: "request",
3687
3651
  id: s,
3688
3652
  kind: e,
3689
3653
  params: t
3690
3654
  };
3691
3655
  try {
3692
- i.send(p);
3693
- } catch (u) {
3694
- this.pending.delete(s), n.signal?.removeEventListener("abort", d.abortListener), l(u);
3656
+ i.send(f);
3657
+ } catch (h) {
3658
+ this.pending.delete(s), n.signal?.removeEventListener("abort", l.abortListener), c(h);
3695
3659
  }
3696
3660
  });
3697
3661
  }
@@ -3715,7 +3679,7 @@ class Ir {
3715
3679
  this.channel?.close(), this.channel = null;
3716
3680
  }
3717
3681
  }
3718
- class Lr extends Error {
3682
+ class Ir extends Error {
3719
3683
  constructor() {
3720
3684
  super("Transport channel disconnected mid-request"), this.code = "transport_disconnected", this.name = "TransportDisconnectedError";
3721
3685
  }
@@ -3726,17 +3690,17 @@ function Ar(r) {
3726
3690
  return e === "request" || e === "response" || e === "event";
3727
3691
  }
3728
3692
  let W = null;
3729
- function Er() {
3730
- return W || (W = new Ir(() => Fe(Ge)), W);
3693
+ function Lr() {
3694
+ return W || (W = new Cr(() => qe(He)), W);
3731
3695
  }
3732
- class Rr extends ur {
3696
+ class jr extends cr {
3733
3697
  constructor(e) {
3734
- const t = Er(), n = new xr(t, {
3698
+ const t = Lr(), n = new yr(t, {
3735
3699
  paywallId: e.paywallId,
3736
3700
  apiOrigin: e.apiOrigin
3737
3701
  });
3738
3702
  let i;
3739
- e.auth === !0 ? i = new kr(t, {
3703
+ e.auth === !0 ? i = new wr(t, {
3740
3704
  paywallId: e.paywallId,
3741
3705
  apiOrigin: e.apiOrigin
3742
3706
  }) : e.auth && console.warn(
@@ -3752,7 +3716,7 @@ class Rr extends ur {
3752
3716
  // Внутренний EventTracker отключаем — единственный tracker живёт в
3753
3717
  // offscreen'е. Манчиально подписываемся ниже.
3754
3718
  analytics: !1
3755
- }), this.remoteTracker = null, this.trackerUnsubs = [], e.analytics !== !1 && (this.remoteTracker = new Cr(t), this.bindAnalytics());
3719
+ }), this.remoteTracker = null, this.trackerUnsubs = [], e.analytics !== !1 && (this.remoteTracker = new Sr(t), this.bindAnalytics());
3756
3720
  }
3757
3721
  /** Зеркало sdk/PaywallUI.initTracker'овских биндингов, но с RemoteEventTracker.
3758
3722
  * Когда @monetize.software/sdk экспоузнет публичный hook для inject'а tracker'а,
@@ -3811,10 +3775,10 @@ class Rr extends ur {
3811
3775
  }
3812
3776
  export {
3813
3777
  K as PROTOCOL_VERSION,
3814
- Rr as PaywallUI,
3815
- kr as RemoteAuthClient,
3816
- xr as RemoteBillingClient,
3817
- Cr as RemoteEventTracker,
3818
- Er as getContentTransport
3778
+ jr as PaywallUI,
3779
+ wr as RemoteAuthClient,
3780
+ yr as RemoteBillingClient,
3781
+ Sr as RemoteEventTracker,
3782
+ Lr as getContentTransport
3819
3783
  };
3820
3784
  //# sourceMappingURL=content.js.map