@burdenoff/website-sdk 2026.1101.1 → 2026.1101.3

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 (276) hide show
  1. package/README.md +52 -11
  2. package/dist/analytics/index.js +19 -69
  3. package/dist/analytics/index.js.map +1 -1
  4. package/dist/analytics/index.mjs +3 -69
  5. package/dist/analytics/index.mjs.map +1 -1
  6. package/dist/avatar-live/index.js +1 -0
  7. package/dist/avatar-live/index.js.map +1 -1
  8. package/dist/avatar-live/index.mjs +1 -0
  9. package/dist/avatar-live/index.mjs.map +1 -1
  10. package/dist/avatar-live-view/index.js +25 -30
  11. package/dist/avatar-live-view/index.js.map +1 -1
  12. package/dist/avatar-live-view/index.mjs +20 -25
  13. package/dist/avatar-live-view/index.mjs.map +1 -1
  14. package/dist/chunk-23H4JUL4.js +41 -0
  15. package/dist/chunk-23H4JUL4.js.map +1 -0
  16. package/dist/chunk-34RX5P75.mjs +25 -0
  17. package/dist/chunk-34RX5P75.mjs.map +1 -0
  18. package/dist/chunk-3LFFY7AZ.js +184 -0
  19. package/dist/chunk-3LFFY7AZ.js.map +1 -0
  20. package/dist/chunk-3X26GE4S.js +2794 -0
  21. package/dist/chunk-3X26GE4S.js.map +1 -0
  22. package/dist/chunk-45GCA4GG.js +85 -0
  23. package/dist/chunk-45GCA4GG.js.map +1 -0
  24. package/dist/chunk-4SAGVLHN.js +876 -0
  25. package/dist/chunk-4SAGVLHN.js.map +1 -0
  26. package/dist/chunk-4U6YAII5.js +218 -0
  27. package/dist/chunk-4U6YAII5.js.map +1 -0
  28. package/dist/chunk-5GMTBOO6.js +21 -0
  29. package/dist/chunk-5GMTBOO6.js.map +1 -0
  30. package/dist/chunk-5JRJ57CL.mjs +329 -0
  31. package/dist/chunk-5JRJ57CL.mjs.map +1 -0
  32. package/dist/chunk-6C2DKIC7.js +4 -0
  33. package/dist/chunk-6C2DKIC7.js.map +1 -0
  34. package/dist/chunk-6IBFBWC5.mjs +17 -0
  35. package/dist/chunk-6IBFBWC5.mjs.map +1 -0
  36. package/dist/chunk-6KY2ZRVI.js +116 -0
  37. package/dist/chunk-6KY2ZRVI.js.map +1 -0
  38. package/dist/chunk-6VJT3SM4.mjs +182 -0
  39. package/dist/chunk-6VJT3SM4.mjs.map +1 -0
  40. package/dist/chunk-6YZUFMK2.mjs +40 -0
  41. package/dist/chunk-6YZUFMK2.mjs.map +1 -0
  42. package/dist/chunk-7A6R7CGG.js +47 -0
  43. package/dist/chunk-7A6R7CGG.js.map +1 -0
  44. package/dist/chunk-7PWL4V2R.js +4 -0
  45. package/dist/chunk-7PWL4V2R.js.map +1 -0
  46. package/dist/chunk-AA33WDYS.js +161 -0
  47. package/dist/chunk-AA33WDYS.js.map +1 -0
  48. package/dist/chunk-AHRGFXV2.js +525 -0
  49. package/dist/chunk-AHRGFXV2.js.map +1 -0
  50. package/dist/chunk-B63XLDZH.mjs +109 -0
  51. package/dist/chunk-B63XLDZH.mjs.map +1 -0
  52. package/dist/chunk-BX2USEWF.mjs +35 -0
  53. package/dist/chunk-BX2USEWF.mjs.map +1 -0
  54. package/dist/chunk-BYSZT35R.js +150 -0
  55. package/dist/chunk-BYSZT35R.js.map +1 -0
  56. package/dist/chunk-C6OJIHNO.js +12 -0
  57. package/dist/chunk-C6OJIHNO.js.map +1 -0
  58. package/dist/chunk-COOELBX7.mjs +63 -0
  59. package/dist/chunk-COOELBX7.mjs.map +1 -0
  60. package/dist/chunk-D2TW7MNC.mjs +2771 -0
  61. package/dist/chunk-D2TW7MNC.mjs.map +1 -0
  62. package/dist/chunk-D5KEZ6V6.mjs +3 -0
  63. package/dist/chunk-D5KEZ6V6.mjs.map +1 -0
  64. package/dist/chunk-E3GUGJMY.js +46 -0
  65. package/dist/chunk-E3GUGJMY.js.map +1 -0
  66. package/dist/chunk-EBZ2HGJ2.mjs +52 -0
  67. package/dist/chunk-EBZ2HGJ2.mjs.map +1 -0
  68. package/dist/chunk-EDLTUOIA.mjs +210 -0
  69. package/dist/chunk-EDLTUOIA.mjs.map +1 -0
  70. package/dist/chunk-EJQSOT4X.js +4 -0
  71. package/dist/chunk-EJQSOT4X.js.map +1 -0
  72. package/dist/chunk-EUPFS6MZ.mjs +2019 -0
  73. package/dist/chunk-EUPFS6MZ.mjs.map +1 -0
  74. package/dist/chunk-F3XWDC3B.js +77 -0
  75. package/dist/chunk-F3XWDC3B.js.map +1 -0
  76. package/dist/chunk-FFADMVIK.mjs +5127 -0
  77. package/dist/chunk-FFADMVIK.mjs.map +1 -0
  78. package/dist/chunk-FJWS7BKT.mjs +3 -0
  79. package/dist/chunk-FJWS7BKT.mjs.map +1 -0
  80. package/dist/chunk-FJZJDUOR.mjs +3 -0
  81. package/dist/chunk-FJZJDUOR.mjs.map +1 -0
  82. package/dist/chunk-GCFLCO2Z.mjs +145 -0
  83. package/dist/chunk-GCFLCO2Z.mjs.map +1 -0
  84. package/dist/chunk-GEXC4LRP.js +61 -0
  85. package/dist/chunk-GEXC4LRP.js.map +1 -0
  86. package/dist/chunk-GTRAXQGC.mjs +3 -0
  87. package/dist/chunk-GTRAXQGC.mjs.map +1 -0
  88. package/dist/chunk-IKOIRUKW.js +270 -0
  89. package/dist/chunk-IKOIRUKW.js.map +1 -0
  90. package/dist/chunk-IXTWOPRN.js +45 -0
  91. package/dist/chunk-IXTWOPRN.js.map +1 -0
  92. package/dist/chunk-JDXOXGOK.js +547 -0
  93. package/dist/chunk-JDXOXGOK.js.map +1 -0
  94. package/dist/chunk-JSLDWYV7.mjs +558 -0
  95. package/dist/chunk-JSLDWYV7.mjs.map +1 -0
  96. package/dist/chunk-JXLSTVBK.js +336 -0
  97. package/dist/chunk-JXLSTVBK.js.map +1 -0
  98. package/dist/chunk-KHYXK7FG.mjs +49 -0
  99. package/dist/chunk-KHYXK7FG.mjs.map +1 -0
  100. package/dist/chunk-KSMBOWQQ.js +2034 -0
  101. package/dist/chunk-KSMBOWQQ.js.map +1 -0
  102. package/dist/chunk-KU2PXHGB.mjs +83 -0
  103. package/dist/chunk-KU2PXHGB.mjs.map +1 -0
  104. package/dist/chunk-KZANIV3S.mjs +37 -0
  105. package/dist/chunk-KZANIV3S.mjs.map +1 -0
  106. package/dist/chunk-L4BP6YOB.js +20 -0
  107. package/dist/chunk-L4BP6YOB.js.map +1 -0
  108. package/dist/chunk-MRKA2OAF.mjs +75 -0
  109. package/dist/chunk-MRKA2OAF.mjs.map +1 -0
  110. package/dist/chunk-N5EC53MH.mjs +80 -0
  111. package/dist/chunk-N5EC53MH.mjs.map +1 -0
  112. package/dist/chunk-NZANQGDM.mjs +34 -0
  113. package/dist/chunk-NZANQGDM.mjs.map +1 -0
  114. package/dist/chunk-O4GS3XPZ.js +10 -0
  115. package/dist/chunk-O4GS3XPZ.js.map +1 -0
  116. package/dist/chunk-O76QDGRM.js +5154 -0
  117. package/dist/chunk-O76QDGRM.js.map +1 -0
  118. package/dist/chunk-OYEUNZJY.js +114 -0
  119. package/dist/chunk-OYEUNZJY.js.map +1 -0
  120. package/dist/chunk-PHXAGQNB.js +74 -0
  121. package/dist/chunk-PHXAGQNB.js.map +1 -0
  122. package/dist/chunk-PIHHPP7J.mjs +16 -0
  123. package/dist/chunk-PIHHPP7J.mjs.map +1 -0
  124. package/dist/chunk-PXRHVVOU.mjs +499 -0
  125. package/dist/chunk-PXRHVVOU.mjs.map +1 -0
  126. package/dist/chunk-QMA6U6AU.js +36 -0
  127. package/dist/chunk-QMA6U6AU.js.map +1 -0
  128. package/dist/chunk-R6J7IULF.js +44 -0
  129. package/dist/chunk-R6J7IULF.js.map +1 -0
  130. package/dist/chunk-R7G6TWIS.mjs +10 -0
  131. package/dist/chunk-R7G6TWIS.mjs.map +1 -0
  132. package/dist/chunk-RUMGFI6L.mjs +544 -0
  133. package/dist/chunk-RUMGFI6L.mjs.map +1 -0
  134. package/dist/chunk-S54JWSJF.js +565 -0
  135. package/dist/chunk-S54JWSJF.js.map +1 -0
  136. package/dist/chunk-SK5UGG6A.js +2041 -0
  137. package/dist/chunk-SK5UGG6A.js.map +1 -0
  138. package/dist/chunk-SKIYDKIS.mjs +70 -0
  139. package/dist/chunk-SKIYDKIS.mjs.map +1 -0
  140. package/dist/chunk-SZNS5IK6.mjs +322 -0
  141. package/dist/chunk-SZNS5IK6.mjs.map +1 -0
  142. package/dist/chunk-T7JIPZAC.js +66 -0
  143. package/dist/chunk-T7JIPZAC.js.map +1 -0
  144. package/dist/chunk-TGYQHO2E.mjs +864 -0
  145. package/dist/chunk-TGYQHO2E.mjs.map +1 -0
  146. package/dist/chunk-TT3MHN42.mjs +8 -0
  147. package/dist/chunk-TT3MHN42.mjs.map +1 -0
  148. package/dist/chunk-UM55U65W.mjs +268 -0
  149. package/dist/chunk-UM55U65W.mjs.map +1 -0
  150. package/dist/chunk-UQ2HALUD.js +72 -0
  151. package/dist/chunk-UQ2HALUD.js.map +1 -0
  152. package/dist/chunk-UXWT7G77.js +82 -0
  153. package/dist/chunk-UXWT7G77.js.map +1 -0
  154. package/dist/chunk-VNS5WDWO.mjs +7 -0
  155. package/dist/chunk-VNS5WDWO.mjs.map +1 -0
  156. package/dist/chunk-VRWZLGR7.js +4 -0
  157. package/dist/chunk-VRWZLGR7.js.map +1 -0
  158. package/dist/chunk-VZLDSNH4.mjs +22 -0
  159. package/dist/chunk-VZLDSNH4.mjs.map +1 -0
  160. package/dist/chunk-W6P3YETJ.js +92 -0
  161. package/dist/chunk-W6P3YETJ.js.map +1 -0
  162. package/dist/chunk-WPKFFQCR.mjs +90 -0
  163. package/dist/chunk-WPKFFQCR.mjs.map +1 -0
  164. package/dist/chunk-WTVTI5TO.mjs +22 -0
  165. package/dist/chunk-WTVTI5TO.mjs.map +1 -0
  166. package/dist/chunk-XJOBZ4RJ.js +44 -0
  167. package/dist/chunk-XJOBZ4RJ.js.map +1 -0
  168. package/dist/chunk-XP2JDNDU.js +325 -0
  169. package/dist/chunk-XP2JDNDU.js.map +1 -0
  170. package/dist/chunk-Y4V5CEWD.mjs +112 -0
  171. package/dist/chunk-Y4V5CEWD.mjs.map +1 -0
  172. package/dist/chunk-YERN2UWM.js +116 -0
  173. package/dist/chunk-YERN2UWM.js.map +1 -0
  174. package/dist/chunk-ZKJQWFAA.mjs +114 -0
  175. package/dist/chunk-ZKJQWFAA.mjs.map +1 -0
  176. package/dist/chunk-ZOON3S3Y.mjs +138 -0
  177. package/dist/chunk-ZOON3S3Y.mjs.map +1 -0
  178. package/dist/chunk-ZP6QRAYC.mjs +2024 -0
  179. package/dist/chunk-ZP6QRAYC.mjs.map +1 -0
  180. package/dist/chunk-ZSTFX7FV.js +9 -0
  181. package/dist/chunk-ZSTFX7FV.js.map +1 -0
  182. package/dist/client/index.js +23 -331
  183. package/dist/client/index.js.map +1 -1
  184. package/dist/client/index.mjs +3 -330
  185. package/dist/client/index.mjs.map +1 -1
  186. package/dist/comparison/index.js +28 -111
  187. package/dist/comparison/index.js.map +1 -1
  188. package/dist/comparison/index.mjs +2 -107
  189. package/dist/comparison/index.mjs.map +1 -1
  190. package/dist/components/contact.js +21 -931
  191. package/dist/components/contact.js.map +1 -1
  192. package/dist/components/contact.mjs +12 -909
  193. package/dist/components/contact.mjs.map +1 -1
  194. package/dist/components/electron-download.js +12 -124
  195. package/dist/components/electron-download.js.map +1 -1
  196. package/dist/components/electron-download.mjs +4 -106
  197. package/dist/components/electron-download.mjs.map +1 -1
  198. package/dist/components/explore-cta.js +8 -112
  199. package/dist/components/explore-cta.js.map +1 -1
  200. package/dist/components/explore-cta.mjs +3 -114
  201. package/dist/components/explore-cta.mjs.map +1 -1
  202. package/dist/components/explore.js +62 -7833
  203. package/dist/components/explore.js.map +1 -1
  204. package/dist/components/explore.mjs +13 -7800
  205. package/dist/components/explore.mjs.map +1 -1
  206. package/dist/components/launch-countdown.js +8 -83
  207. package/dist/components/launch-countdown.js.map +1 -1
  208. package/dist/components/launch-countdown.mjs +3 -85
  209. package/dist/components/launch-countdown.mjs.map +1 -1
  210. package/dist/components/newsletter.js +20 -993
  211. package/dist/components/newsletter.js.map +1 -1
  212. package/dist/components/newsletter.mjs +11 -971
  213. package/dist/components/newsletter.mjs.map +1 -1
  214. package/dist/components/partners.js +24 -1302
  215. package/dist/components/partners.js.map +1 -1
  216. package/dist/components/partners.mjs +15 -1276
  217. package/dist/components/partners.mjs.map +1 -1
  218. package/dist/components/pricing.js +49 -1249
  219. package/dist/components/pricing.js.map +1 -1
  220. package/dist/components/pricing.mjs +8 -1226
  221. package/dist/components/pricing.mjs.map +1 -1
  222. package/dist/components/problems-solved.js +8 -150
  223. package/dist/components/problems-solved.js.map +1 -1
  224. package/dist/components/problems-solved.mjs +4 -133
  225. package/dist/components/problems-solved.mjs.map +1 -1
  226. package/dist/components/resource-links.js +8 -304
  227. package/dist/components/resource-links.js.map +1 -1
  228. package/dist/components/resource-links.mjs +5 -308
  229. package/dist/components/resource-links.mjs.map +1 -1
  230. package/dist/components/social-links.js +8 -343
  231. package/dist/components/social-links.js.map +1 -1
  232. package/dist/components/social-links.mjs +5 -347
  233. package/dist/components/social-links.mjs.map +1 -1
  234. package/dist/components/unsubscribe.js +10 -627
  235. package/dist/components/unsubscribe.js.map +1 -1
  236. package/dist/components/unsubscribe.mjs +6 -611
  237. package/dist/components/unsubscribe.mjs.map +1 -1
  238. package/dist/components/waitlist.js +21 -1001
  239. package/dist/components/waitlist.js.map +1 -1
  240. package/dist/components/waitlist.mjs +12 -982
  241. package/dist/components/waitlist.mjs.map +1 -1
  242. package/dist/components/website-switcher.js +12 -175
  243. package/dist/components/website-switcher.js.map +1 -1
  244. package/dist/components/website-switcher.mjs +4 -157
  245. package/dist/components/website-switcher.mjs.map +1 -1
  246. package/dist/content/index.js +118 -3616
  247. package/dist/content/index.js.map +1 -1
  248. package/dist/content/index.mjs +12 -3567
  249. package/dist/content/index.mjs.map +1 -1
  250. package/dist/hooks/index.js +37 -2321
  251. package/dist/hooks/index.js.map +1 -1
  252. package/dist/hooks/index.mjs +6 -2318
  253. package/dist/hooks/index.mjs.map +1 -1
  254. package/dist/index.d.mts +1 -1
  255. package/dist/index.d.ts +1 -1
  256. package/dist/index.js +4145 -20599
  257. package/dist/index.js.map +1 -1
  258. package/dist/index.mjs +3766 -20567
  259. package/dist/index.mjs.map +1 -1
  260. package/dist/product/index.js +20 -393
  261. package/dist/product/index.js.map +1 -1
  262. package/dist/product/index.mjs +5 -394
  263. package/dist/product/index.mjs.map +1 -1
  264. package/dist/seo/index.js +8 -76
  265. package/dist/seo/index.js.map +1 -1
  266. package/dist/seo/index.mjs +3 -78
  267. package/dist/seo/index.mjs.map +1 -1
  268. package/dist/store/index.js +51 -2650
  269. package/dist/store/index.js.map +1 -1
  270. package/dist/store/index.mjs +13 -2619
  271. package/dist/store/index.mjs.map +1 -1
  272. package/dist/utils/index.js +69 -134
  273. package/dist/utils/index.js.map +1 -1
  274. package/dist/utils/index.mjs +5 -122
  275. package/dist/utils/index.mjs.map +1 -1
  276. package/package.json +2 -1
@@ -0,0 +1,876 @@
1
+ 'use strict';
2
+
3
+ var chunkUXWT7G77_js = require('./chunk-UXWT7G77.js');
4
+ var chunkUQ2HALUD_js = require('./chunk-UQ2HALUD.js');
5
+ var chunkBYSZT35R_js = require('./chunk-BYSZT35R.js');
6
+ var chunkJXLSTVBK_js = require('./chunk-JXLSTVBK.js');
7
+ var react = require('react');
8
+ var jsxRuntime = require('react/jsx-runtime');
9
+
10
+ // src/components/pricing-catalog.ts
11
+ var UUID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
12
+ function isUuidLike(value) {
13
+ return UUID_PATTERN.test(value.trim());
14
+ }
15
+ var PricingProductKeyError = class extends Error {
16
+ constructor(productId) {
17
+ super(
18
+ `PricingPage was given the product id "${productId}", which matches no public product. publicPlans(productId) expects the product slug (for example "vibecontrols"); pass product.slug.`
19
+ );
20
+ this.name = "PricingProductKeyError";
21
+ }
22
+ };
23
+ function resolvePricingProductKey(productId, candidates) {
24
+ const trimmed = productId.trim();
25
+ if (!isUuidLike(trimmed)) return trimmed;
26
+ const wanted = trimmed.toLowerCase();
27
+ const match = candidates.find(
28
+ (c) => !!c && c.id.toLowerCase() === wanted && c.slug.trim().length > 0
29
+ );
30
+ return match ? match.slug.trim() : null;
31
+ }
32
+ var PERIOD_SUFFIX = /\s*[([]\s*(monthly|month|annual|annually|yearly|year)\s*[)\]]\s*$/i;
33
+ var PRODUCT_PREFIX = /^\S.*?\s[-–—]\s+(?=\S)/;
34
+ function cleanPlanDisplayName(name) {
35
+ const withoutPeriod = name.replace(PERIOD_SUFFIX, "").trim();
36
+ const withoutProduct = withoutPeriod.replace(PRODUCT_PREFIX, "").trim();
37
+ if (withoutProduct.length > 0) return withoutProduct;
38
+ if (withoutPeriod.length > 0) return withoutPeriod;
39
+ return name.trim();
40
+ }
41
+ function isFiniteNumber(value) {
42
+ return typeof value === "number" && Number.isFinite(value);
43
+ }
44
+ function planPriceIn(plan, currency) {
45
+ const code = currency.toUpperCase();
46
+ if (plan.price === 0) return 0;
47
+ if (plan.currency.toUpperCase() === code) return plan.price;
48
+ const prices = plan.currencyPrices;
49
+ if (!prices) return null;
50
+ const direct = prices[code];
51
+ if (isFiniteNumber(direct)) return direct;
52
+ const key = Object.keys(prices).find((k) => k.toUpperCase() === code);
53
+ const value = key === void 0 ? void 0 : prices[key];
54
+ return isFiniteNumber(value) ? value : null;
55
+ }
56
+ function availablePlanCurrencies(plans) {
57
+ if (plans.length === 0) return [];
58
+ const all = /* @__PURE__ */ new Set();
59
+ for (const plan of plans) {
60
+ all.add(plan.currency.toUpperCase());
61
+ for (const key of Object.keys(plan.currencyPrices ?? {})) {
62
+ all.add(key.toUpperCase());
63
+ }
64
+ }
65
+ const usable = [...all].filter(
66
+ (code) => plans.every((plan) => planPriceIn(plan, code) !== null)
67
+ );
68
+ const base = plans.find((p) => p.price > 0)?.currency.toUpperCase();
69
+ return usable.sort((a, b) => {
70
+ if (a === base) return -1;
71
+ if (b === base) return 1;
72
+ return a.localeCompare(b);
73
+ });
74
+ }
75
+ var EURO_REGIONS = [
76
+ "AT",
77
+ "BE",
78
+ "CY",
79
+ "DE",
80
+ "EE",
81
+ "ES",
82
+ "FI",
83
+ "FR",
84
+ "GR",
85
+ "HR",
86
+ "IE",
87
+ "IT",
88
+ "LT",
89
+ "LU",
90
+ "LV",
91
+ "MT",
92
+ "NL",
93
+ "PT",
94
+ "SI",
95
+ "SK"
96
+ ];
97
+ var REGION_CURRENCY = Object.freeze({
98
+ AU: "AUD",
99
+ BR: "BRL",
100
+ CA: "CAD",
101
+ CH: "CHF",
102
+ CN: "CNY",
103
+ DK: "DKK",
104
+ GB: "GBP",
105
+ HK: "HKD",
106
+ IN: "INR",
107
+ JP: "JPY",
108
+ KR: "KRW",
109
+ MX: "MXN",
110
+ MY: "MYR",
111
+ NO: "NOK",
112
+ NZ: "NZD",
113
+ PL: "PLN",
114
+ SE: "SEK",
115
+ SG: "SGD",
116
+ TH: "THB",
117
+ US: "USD",
118
+ ...Object.fromEntries(EURO_REGIONS.map((r) => [r, "EUR"]))
119
+ });
120
+ var TIME_ZONE_REGION = Object.freeze({
121
+ "Asia/Kolkata": "IN",
122
+ "Asia/Calcutta": "IN"
123
+ });
124
+ function regionOfLanguage(tag) {
125
+ const parts = tag.replace(/_/g, "-").split("-");
126
+ for (const part of parts.slice(1)) {
127
+ if (/^[A-Za-z]{2}$/.test(part)) return part.toUpperCase();
128
+ }
129
+ return null;
130
+ }
131
+ function detectRegionalCurrency(available, locale) {
132
+ const sellable = new Set(available.map((c) => c.toUpperCase()));
133
+ const regions = [];
134
+ const tzRegion = locale.timeZone ? TIME_ZONE_REGION[locale.timeZone] : null;
135
+ if (tzRegion) regions.push(tzRegion);
136
+ for (const tag of locale.languages ?? []) {
137
+ const region = regionOfLanguage(tag);
138
+ if (region) regions.push(region);
139
+ }
140
+ for (const region of regions) {
141
+ const currency = REGION_CURRENCY[region];
142
+ if (currency && sellable.has(currency)) return currency;
143
+ }
144
+ return null;
145
+ }
146
+ function formatCatalogPrice(amount, currency) {
147
+ const code = currency.toUpperCase();
148
+ const whole = amount % 1 === 0;
149
+ try {
150
+ return new Intl.NumberFormat("en-US", {
151
+ style: "currency",
152
+ currency: code,
153
+ minimumFractionDigits: whole ? 0 : 2,
154
+ maximumFractionDigits: whole ? 0 : 2
155
+ }).format(amount);
156
+ } catch {
157
+ return `${code} ${whole ? amount.toString() : amount.toFixed(2)}`;
158
+ }
159
+ }
160
+ function plansForBillingCycle(plans, cycle) {
161
+ if (cycle === "monthly") {
162
+ return plans.filter((p) => p.duration === "monthly");
163
+ }
164
+ const yearly = plans.filter((p) => p.duration === "yearly");
165
+ if (yearly.some((p) => p.priceRaw === 0)) return yearly;
166
+ const free = plans.filter(
167
+ (p) => p.duration === "monthly" && p.priceRaw === 0
168
+ );
169
+ return [...free, ...yearly];
170
+ }
171
+ var GET_PLANS_QUERY = `
172
+ query GetPublicPlans($productId: String!) {
173
+ publicPlans(productId: $productId) {
174
+ id
175
+ name
176
+ price
177
+ currency
178
+ currencyPrices
179
+ duration
180
+ features {
181
+ id
182
+ quotaId
183
+ context
184
+ quota {
185
+ id
186
+ name
187
+ limits
188
+ }
189
+ }
190
+ isActive
191
+ productID
192
+ createdAt
193
+ }
194
+ }
195
+ `;
196
+ var PUBLIC_PRODUCT_KEYS_QUERY = `
197
+ query PricingProductKeys {
198
+ publicProducts(limit: 200) {
199
+ items {
200
+ id
201
+ slug
202
+ }
203
+ }
204
+ }
205
+ `;
206
+ var CURRENCY_STORAGE_KEY = "burdenoff.pricing.currency";
207
+ function readStoredCurrency() {
208
+ try {
209
+ if (typeof window === "undefined") return null;
210
+ return window.localStorage.getItem(CURRENCY_STORAGE_KEY);
211
+ } catch {
212
+ return null;
213
+ }
214
+ }
215
+ function storeCurrency(code) {
216
+ try {
217
+ if (typeof window === "undefined") return;
218
+ window.localStorage.setItem(CURRENCY_STORAGE_KEY, code);
219
+ } catch {
220
+ }
221
+ }
222
+ function readVisitorLocale() {
223
+ let timeZone = null;
224
+ try {
225
+ timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone ?? null;
226
+ } catch {
227
+ timeZone = null;
228
+ }
229
+ const languages = typeof navigator === "undefined" ? [] : [...navigator.languages ?? [], navigator.language].filter(
230
+ (l) => typeof l === "string" && l.length > 0
231
+ );
232
+ return { timeZone, languages };
233
+ }
234
+ function formatPrice(price, currencyCode = "USD", currencies) {
235
+ const currency = currencies?.[currencyCode];
236
+ if (!currency) {
237
+ return formatCatalogPrice(price, currencyCode);
238
+ }
239
+ const formattedNumber = price % 1 === 0 ? price.toString() : price.toFixed(2);
240
+ return currency.position === "prefix" ? `${currency.symbol}${formattedNumber}` : `${formattedNumber}${currency.symbol}`;
241
+ }
242
+ function formatInterval(duration, billingIntervals) {
243
+ const defaultIntervals = {
244
+ monthly: "/month",
245
+ yearly: "/year"
246
+ };
247
+ const intervals = billingIntervals || defaultIntervals;
248
+ return intervals[duration] || `/${duration}`;
249
+ }
250
+ function isEnterprisePlan(planName) {
251
+ const name = planName.toLowerCase();
252
+ return name.includes("team") || name.includes("business") || name.includes("enterprise");
253
+ }
254
+ function isEnterpriseAudiencePlan(plan) {
255
+ if (!isEnterprisePlan(plan.name)) {
256
+ return false;
257
+ }
258
+ if (typeof plan.priceRaw === "number") {
259
+ return plan.priceRaw === 0;
260
+ }
261
+ return true;
262
+ }
263
+ function splitPlansByAudience(plans, showAudienceTabs) {
264
+ if (!showAudienceTabs) {
265
+ return { individualPlans: plans, enterprisePlans: [] };
266
+ }
267
+ return {
268
+ individualPlans: plans.filter((p) => !isEnterpriseAudiencePlan(p)),
269
+ enterprisePlans: plans.filter((p) => isEnterpriseAudiencePlan(p))
270
+ };
271
+ }
272
+ function resolveEnterprisePlans(apiEnterprisePlans, staticEnterprisePlans, defaultEnterpriseCard) {
273
+ const staticPlans = staticEnterprisePlans || [];
274
+ if (apiEnterprisePlans.length === 0 && staticPlans.length === 0) {
275
+ return [defaultEnterpriseCard];
276
+ }
277
+ const apiNames = new Set(apiEnterprisePlans.map((p) => p.name.toLowerCase()));
278
+ const dedupedStaticPlans = staticPlans.filter(
279
+ (p) => !apiNames.has(p.name.toLowerCase())
280
+ );
281
+ return [...apiEnterprisePlans, ...dedupedStaticPlans];
282
+ }
283
+ function detectPlanTier(planName) {
284
+ const name = planName.toLowerCase();
285
+ if (name.includes("free") || name.includes("basic") || name.includes("starter") || name.includes("hobby")) {
286
+ return "basic";
287
+ } else if (name.includes("pro") || name.includes("professional") || name.includes("premium") || name.includes("team")) {
288
+ return "professional";
289
+ } else if (name.includes("enterprise") || name.includes("business")) {
290
+ return "enterprise";
291
+ }
292
+ return null;
293
+ }
294
+ function getFallbackFeaturesForTier(tier, fallbackFeatures) {
295
+ return [...fallbackFeatures?.[tier] || []];
296
+ }
297
+ function getMetadataForPlan(planName, priceRaw, planMetadata) {
298
+ const normalizedName = planName.toLowerCase();
299
+ const cleanName = cleanPlanDisplayName(planName);
300
+ const meta = planMetadata?.[normalizedName] ?? planMetadata?.[cleanName.toLowerCase()];
301
+ if (meta) {
302
+ return {
303
+ tier: meta.tier || "basic",
304
+ displayName: meta.displayName || cleanName,
305
+ defaultDescription: meta.defaultDescription || "Choose this plan",
306
+ popular: meta.popular ?? false,
307
+ ctaText: meta.ctaText || "Get Started",
308
+ ctaType: meta.ctaType || "signup",
309
+ features: meta.features
310
+ };
311
+ }
312
+ const tier = detectPlanTier(planName);
313
+ if (tier) {
314
+ const isPaidEnterpriseName = tier === "enterprise" && typeof priceRaw === "number" && priceRaw > 0;
315
+ if (isPaidEnterpriseName) {
316
+ return {
317
+ tier: "professional",
318
+ displayName: cleanName,
319
+ defaultDescription: "Choose this plan",
320
+ popular: false,
321
+ ctaText: "Get Started",
322
+ ctaType: "signup"
323
+ };
324
+ }
325
+ return {
326
+ tier,
327
+ displayName: cleanName,
328
+ defaultDescription: "Choose this plan",
329
+ popular: tier === "professional",
330
+ ctaText: tier === "enterprise" ? "Contact Sales" : "Get Started",
331
+ ctaType: tier === "enterprise" ? "contact" : "signup"
332
+ };
333
+ }
334
+ return {
335
+ tier: "basic",
336
+ displayName: cleanName,
337
+ defaultDescription: "Choose this plan",
338
+ popular: false,
339
+ ctaText: "Get Started",
340
+ ctaType: "signup"
341
+ };
342
+ }
343
+ function humanizeQuotaName(name) {
344
+ const parts = name.split(".");
345
+ const resource = parts.length >= 3 ? parts[parts.length - 2] : parts[parts.length - 1];
346
+ return resource.replace(/[-_]/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
347
+ }
348
+ function transformFeatureToLabel(feature) {
349
+ const quota = feature.quota;
350
+ if (!quota) return "";
351
+ const { name, limits } = quota;
352
+ const featureContext = feature.context && typeof feature.context === "object" ? feature.context : null;
353
+ const limitsObj = limits && typeof limits === "object" ? limits : null;
354
+ const value = typeof featureContext?.quantity === "number" ? featureContext.quantity : typeof limitsObj?.value === "number" ? limitsObj.value : void 0;
355
+ const unit = typeof featureContext?.unit === "string" && featureContext.unit || typeof limitsObj?.unit === "string" && limitsObj.unit || void 0;
356
+ const description = typeof featureContext?.description === "string" && featureContext.description || typeof limitsObj?.description === "string" && limitsObj.description || void 0;
357
+ const type = limitsObj?.type;
358
+ if (description) {
359
+ if (type === "number" && typeof value === "number") {
360
+ return `${value.toLocaleString()} ${description}`;
361
+ }
362
+ return description;
363
+ }
364
+ if (unit) {
365
+ if (typeof value === "number") {
366
+ return `${value.toLocaleString()} ${unit}`;
367
+ }
368
+ return unit;
369
+ }
370
+ const label = humanizeQuotaName(name);
371
+ if (type === "boolean") {
372
+ return label;
373
+ }
374
+ if (typeof value === "number") {
375
+ return `${value.toLocaleString()} ${label}`;
376
+ }
377
+ return label;
378
+ }
379
+ function extractDisplayFeatures(features, planName, fallbackFeatures) {
380
+ const tier = detectPlanTier(planName);
381
+ if (tier) {
382
+ const tierFeatures = getFallbackFeaturesForTier(tier, fallbackFeatures);
383
+ if (tierFeatures.length > 0) {
384
+ return tierFeatures;
385
+ }
386
+ }
387
+ const quotaFeatures = features.filter((f) => f.quota).map((f) => transformFeatureToLabel(f));
388
+ if (quotaFeatures.length > 0) {
389
+ return quotaFeatures;
390
+ }
391
+ return [];
392
+ }
393
+ function transformToDisplayCard(plan, props, currency) {
394
+ const metadata = getMetadataForPlan(
395
+ plan.name,
396
+ plan.price,
397
+ props.planMetadata
398
+ );
399
+ const selectedPrice = currency ? planPriceIn(plan, currency) : null;
400
+ const formattedPrice = currency && selectedPrice !== null ? formatPrice(selectedPrice, currency.toUpperCase(), props.currencies) : formatPrice(plan.price, plan.currency, props.currencies);
401
+ const interval = formatInterval(plan.duration, props.billingIntervals);
402
+ const features = metadata.features && metadata.features.length > 0 ? metadata.features : extractDisplayFeatures(
403
+ plan.features,
404
+ plan.name,
405
+ props.fallbackFeatures
406
+ );
407
+ const contactUrl = props.contactUrl || "/contact";
408
+ const ctaLink = metadata.ctaType === "contact" ? contactUrl : props.appLoginUrl;
409
+ const isQuoteBased = metadata.ctaType === "contact" && plan.price === 0;
410
+ return {
411
+ id: plan.id,
412
+ name: metadata.displayName,
413
+ description: metadata.defaultDescription,
414
+ price: isQuoteBased ? "Custom" : formattedPrice,
415
+ priceRaw: plan.price,
416
+ interval: isQuoteBased ? "" : interval,
417
+ duration: plan.duration,
418
+ features,
419
+ popular: metadata.popular,
420
+ ctaText: metadata.ctaText,
421
+ ctaLink,
422
+ tier: metadata.tier
423
+ };
424
+ }
425
+ function PricingSection(props) {
426
+ const {
427
+ sectionHeading = "Pricing Plans",
428
+ sectionSubtitle = "Choose the perfect plan for your needs",
429
+ id,
430
+ className = ""
431
+ } = props;
432
+ const client = chunkJXLSTVBK_js.useWebSDK();
433
+ const config = chunkJXLSTVBK_js.useWebSDKConfig();
434
+ const { product: contextProduct } = chunkBYSZT35R_js.useProduct();
435
+ const requestedProductId = (props.productId || config.productId || "").trim();
436
+ const contextKey = resolvePricingProductKey(requestedProductId, [
437
+ contextProduct
438
+ ]);
439
+ const productKey = contextKey ?? requestedProductId;
440
+ const [catalogPlans, setCatalogPlans] = react.useState([]);
441
+ const [loading, setLoading] = react.useState(true);
442
+ const [error, setError] = react.useState(null);
443
+ const [billingCycle, setBillingCycle] = react.useState(
444
+ "monthly"
445
+ );
446
+ const [audience, setAudience] = react.useState(
447
+ "individual"
448
+ );
449
+ const [selectedCurrency, setSelectedCurrency] = react.useState(
450
+ props.defaultCurrency ? props.defaultCurrency.toUpperCase() : null
451
+ );
452
+ react.useEffect(() => {
453
+ let cancelled = false;
454
+ async function resolveKey() {
455
+ if (!productKey) {
456
+ throw new Error(
457
+ "PricingPage needs a product slug: pass productId or set WebSDKConfig.productId."
458
+ );
459
+ }
460
+ if (!isUuidLike(productKey)) return productKey;
461
+ const response = await client.query(
462
+ PUBLIC_PRODUCT_KEYS_QUERY
463
+ );
464
+ if (response.errors && response.errors.length > 0) {
465
+ throw new Error(response.errors[0].message);
466
+ }
467
+ const resolved = resolvePricingProductKey(
468
+ productKey,
469
+ response.data?.publicProducts?.items ?? []
470
+ );
471
+ if (!resolved) throw new PricingProductKeyError(productKey);
472
+ return resolved;
473
+ }
474
+ async function loadPlans() {
475
+ try {
476
+ setLoading(true);
477
+ const key = await resolveKey();
478
+ if (cancelled) return;
479
+ const response = await client.query(GET_PLANS_QUERY, {
480
+ productId: key
481
+ });
482
+ if (cancelled) return;
483
+ if (response.errors && response.errors.length > 0) {
484
+ throw new Error(response.errors[0].message);
485
+ }
486
+ if (!response.data?.publicPlans) {
487
+ throw new Error("No plans data received");
488
+ }
489
+ const active = response.data.publicPlans.filter(
490
+ (plan) => plan.isActive
491
+ );
492
+ if (active.length === 0) {
493
+ throw new Error(
494
+ `publicPlans returned no active plans for product "${key}".`
495
+ );
496
+ }
497
+ setCatalogPlans(active);
498
+ setError(null);
499
+ } catch (err) {
500
+ if (cancelled) return;
501
+ console.error("Failed to load plans:", err);
502
+ setCatalogPlans([]);
503
+ setError("Unable to load pricing information. Please try again later.");
504
+ } finally {
505
+ if (!cancelled) {
506
+ setLoading(false);
507
+ }
508
+ }
509
+ }
510
+ loadPlans();
511
+ return () => {
512
+ cancelled = true;
513
+ };
514
+ }, [client, productKey]);
515
+ const currencyOptions = react.useMemo(
516
+ () => availablePlanCurrencies(catalogPlans),
517
+ [catalogPlans]
518
+ );
519
+ react.useEffect(() => {
520
+ if (selectedCurrency || currencyOptions.length < 2) return;
521
+ const stored = readStoredCurrency()?.toUpperCase();
522
+ if (stored && currencyOptions.includes(stored)) {
523
+ setSelectedCurrency(stored);
524
+ return;
525
+ }
526
+ const regional = detectRegionalCurrency(
527
+ currencyOptions,
528
+ readVisitorLocale()
529
+ );
530
+ if (regional) setSelectedCurrency(regional);
531
+ }, [currencyOptions, selectedCurrency]);
532
+ const activeCurrency = selectedCurrency && currencyOptions.includes(selectedCurrency) ? selectedCurrency : currencyOptions[0] ?? null;
533
+ const allPlans = catalogPlans.map((plan) => transformToDisplayCard(plan, props, activeCurrency)).sort((a, b) => {
534
+ const aCustom = a.price === "Custom" ? 1 : 0;
535
+ const bCustom = b.price === "Custom" ? 1 : 0;
536
+ return aCustom - bCustom || a.priceRaw - b.priceRaw;
537
+ });
538
+ const showCurrencySelector = props.showCurrencySelector !== false && currencyOptions.length > 1;
539
+ const {
540
+ individualPlans: individualAllPlans,
541
+ enterprisePlans: enterpriseApiPlans
542
+ } = splitPlansByAudience(allPlans, props.showAudienceTabs);
543
+ const individualPlans = plansForBillingCycle(
544
+ individualAllPlans,
545
+ billingCycle
546
+ );
547
+ const enterpriseCards = enterpriseApiPlans.map((p) => {
548
+ if (p.priceRaw === 0 && p.name.toLowerCase().includes("enterprise")) {
549
+ return {
550
+ ...p,
551
+ price: "Custom",
552
+ interval: "",
553
+ ctaText: "Contact Sales",
554
+ ctaLink: props.contactUrl || "/contact"
555
+ };
556
+ }
557
+ return p;
558
+ });
559
+ const defaultEnterpriseCard = {
560
+ name: "Enterprise",
561
+ subtitle: "For organizations that need more",
562
+ description: "For organizations that need more",
563
+ price: "Custom",
564
+ period: "",
565
+ interval: "",
566
+ button: "Contact Sales",
567
+ buttonLink: props.contactUrl || "/contact",
568
+ ctaText: "Contact Sales",
569
+ ctaLink: props.contactUrl || "/contact",
570
+ popular: false,
571
+ features: props.fallbackFeatures?.enterprise || [
572
+ "Unlimited everything",
573
+ "SSO & SAML",
574
+ "Audit logs",
575
+ "Dedicated support",
576
+ "Self-hosted option"
577
+ ]
578
+ };
579
+ const resolvedEnterprisePlans = resolveEnterprisePlans(
580
+ enterpriseCards,
581
+ props.enterprisePlans,
582
+ defaultEnterpriseCard
583
+ );
584
+ const plans = props.showAudienceTabs && audience === "enterprise" ? [] : individualPlans;
585
+ if (loading) {
586
+ return /* @__PURE__ */ jsxRuntime.jsx("section", { id, className: `py-12 sm:py-16 md:py-20 ${className}`, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "container mx-auto px-4 sm:px-6", children: [
587
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center mb-8 sm:mb-12", children: [
588
+ sectionHeading ? /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl sm:text-3xl md:text-4xl font-bold mb-3 sm:mb-4", children: sectionHeading }) : (
589
+ // Visually hidden but DOM-present heading so axe's heading-order
590
+ // rule still sees an h2 between the consumer's hero h1 and the
591
+ // h3 plan-card titles. See `getMetadataForPlan` for why a falsy
592
+ // sectionHeading is the canonical "no visible heading" signal.
593
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "sr-only", children: "Pricing" })
594
+ ),
595
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground text-sm sm:text-base md:text-lg", children: "Loading pricing information..." })
596
+ ] }),
597
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid md:grid-cols-3 gap-6 sm:gap-8", children: [1, 2, 3].map((i) => /* @__PURE__ */ jsxRuntime.jsxs(
598
+ "div",
599
+ {
600
+ className: "bg-card border rounded-lg p-6 animate-pulse",
601
+ children: [
602
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-6 bg-muted rounded w-1/2 mb-4" }),
603
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 bg-muted rounded w-3/4 mb-6" }),
604
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-10 bg-muted rounded w-1/3 mb-6" }),
605
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3 mb-6", children: [1, 2, 3, 4].map((j) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 bg-muted rounded" }, j)) }),
606
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-10 bg-muted rounded" })
607
+ ]
608
+ },
609
+ i
610
+ )) })
611
+ ] }) });
612
+ }
613
+ if (error && plans.length === 0) {
614
+ return /* @__PURE__ */ jsxRuntime.jsx("section", { id, className: `py-12 sm:py-16 md:py-20 ${className}`, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "container mx-auto px-4 sm:px-6", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
615
+ sectionHeading ? /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl sm:text-3xl md:text-4xl font-bold mb-4", children: sectionHeading }) : /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "sr-only", children: "Pricing" }),
616
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mb-8", children: error }),
617
+ /* @__PURE__ */ jsxRuntime.jsx(chunkUQ2HALUD_js.Button, { onClick: () => window.location.reload(), children: "Retry" })
618
+ ] }) }) });
619
+ }
620
+ return /* @__PURE__ */ jsxRuntime.jsx("section", { id, className: `py-12 sm:py-16 md:py-20 ${className}`, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "container mx-auto px-4 sm:px-6", children: [
621
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center mb-8 sm:mb-12", children: [
622
+ sectionHeading ? /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl sm:text-3xl md:text-4xl font-bold mb-3 sm:mb-4", children: sectionHeading }) : /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "sr-only", children: "Pricing" }),
623
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground text-sm sm:text-base md:text-lg mb-6", children: sectionSubtitle }),
624
+ props.showAudienceTabs && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center mb-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex items-center bg-muted p-1.5 rounded-xl", children: [
625
+ /* @__PURE__ */ jsxRuntime.jsx(
626
+ "button",
627
+ {
628
+ type: "button",
629
+ onClick: () => setAudience("individual"),
630
+ className: `px-6 sm:px-8 py-2.5 rounded-lg text-sm font-semibold transition-all ${audience === "individual" ? "bg-background shadow-sm text-foreground" : "text-muted-foreground hover:text-foreground"}`,
631
+ children: "Individual"
632
+ }
633
+ ),
634
+ /* @__PURE__ */ jsxRuntime.jsx(
635
+ "button",
636
+ {
637
+ type: "button",
638
+ onClick: () => setAudience("enterprise"),
639
+ className: `px-6 sm:px-8 py-2.5 rounded-lg text-sm font-semibold transition-all ${audience === "enterprise" ? "bg-background shadow-sm text-foreground" : "text-muted-foreground hover:text-foreground"}`,
640
+ children: "Enterprise"
641
+ }
642
+ )
643
+ ] }) }),
644
+ (audience === "individual" || !props.showAudienceTabs) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex items-center bg-muted/60 p-1.5 rounded-xl", children: [
645
+ /* @__PURE__ */ jsxRuntime.jsx(
646
+ "button",
647
+ {
648
+ type: "button",
649
+ onClick: () => setBillingCycle("monthly"),
650
+ className: `px-5 sm:px-6 py-2 rounded-lg text-sm font-medium transition-all ${billingCycle === "monthly" ? "bg-background shadow-sm text-foreground" : "text-muted-foreground hover:text-foreground"}`,
651
+ children: "Monthly"
652
+ }
653
+ ),
654
+ /* @__PURE__ */ jsxRuntime.jsx(
655
+ "button",
656
+ {
657
+ type: "button",
658
+ onClick: () => setBillingCycle("yearly"),
659
+ className: `px-5 sm:px-6 py-2 rounded-lg text-sm font-medium transition-all ${billingCycle === "yearly" ? "bg-background shadow-sm text-foreground" : "text-muted-foreground hover:text-foreground"}`,
660
+ children: "Yearly"
661
+ }
662
+ )
663
+ ] }) }),
664
+ showCurrencySelector && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center mt-4", children: /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "inline-flex items-center gap-2 text-sm text-muted-foreground", children: [
665
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Currency" }),
666
+ /* @__PURE__ */ jsxRuntime.jsx(
667
+ "select",
668
+ {
669
+ value: activeCurrency ?? "",
670
+ onChange: (event) => {
671
+ const code = event.target.value;
672
+ setSelectedCurrency(code);
673
+ storeCurrency(code);
674
+ },
675
+ className: "h-9 rounded-md border border-input bg-background px-3 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-ring",
676
+ "data-testid": "pricing-currency-select",
677
+ children: currencyOptions.map((code) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: code, children: code }, code))
678
+ }
679
+ )
680
+ ] }) })
681
+ ] }),
682
+ props.showAudienceTabs && audience === "enterprise" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mx-auto max-w-3xl text-center mb-8", children: [
683
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-xl sm:text-2xl font-bold text-foreground", children: props.enterpriseHeading || "Enterprise Solutions" }),
684
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-3 text-muted-foreground", children: props.enterpriseSubtitle || "Built for teams, agencies, and organizations that need advanced collaboration, security, support, and scale." })
685
+ ] }),
686
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid md:grid-cols-3 gap-6 sm:gap-8 max-w-6xl mx-auto items-stretch", children: props.showAudienceTabs && audience === "enterprise" ? (
687
+ /* Enterprise cards — from API, static prop, or built-in default */
688
+ resolvedEnterprisePlans.map((ep) => {
689
+ const subtitle = ep.subtitle || ep.description || "";
690
+ const btnText = ep.button || ep.ctaText || "Get Started";
691
+ const btnLink = ep.buttonLink || ep.ctaLink || props.appLoginUrl;
692
+ const period = ep.period || ep.interval || "";
693
+ const note = ep.note || "";
694
+ const badge = ep.badge || "";
695
+ const isPopular = ep.popular;
696
+ const features = ep.features || [];
697
+ const price = String(ep.price);
698
+ return /* @__PURE__ */ jsxRuntime.jsxs(
699
+ "div",
700
+ {
701
+ className: `bg-card rounded-xl p-6 sm:p-8 transition-all duration-300 flex flex-col ${isPopular ? "border-2 border-primary shadow-xl ring-1 ring-primary/20" : "border hover:shadow-lg hover:border-primary/50"}`,
702
+ children: [
703
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center mb-6", children: [
704
+ isPopular && badge && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-block bg-primary text-primary-foreground px-4 py-1 rounded-full text-xs font-semibold mb-3", children: badge }),
705
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-xl sm:text-2xl font-bold mb-2", children: ep.name }),
706
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground text-sm", children: subtitle })
707
+ ] }),
708
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center mb-2", children: [
709
+ price === "Custom" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-3xl sm:text-4xl font-bold", children: "Custom" }) : /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "flex items-baseline justify-center gap-1", children: [
710
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-4xl sm:text-5xl font-extrabold", children: price }),
711
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground text-lg", children: period })
712
+ ] }),
713
+ note && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-sm font-medium text-primary", children: note })
714
+ ] }),
715
+ /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "space-y-3 mb-8 mt-6 flex-1", children: features.map((feature) => /* @__PURE__ */ jsxRuntime.jsxs(
716
+ "li",
717
+ {
718
+ className: "text-sm flex items-start gap-2",
719
+ children: [
720
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary mt-0.5 flex-shrink-0", children: "\u2713" }),
721
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: feature })
722
+ ]
723
+ },
724
+ feature
725
+ )) }),
726
+ btnLink.startsWith("/") ? /* @__PURE__ */ jsxRuntime.jsx(
727
+ chunkUQ2HALUD_js.Button,
728
+ {
729
+ className: "w-full h-11",
730
+ variant: isPopular ? "default" : "outline",
731
+ size: "lg",
732
+ asChild: true,
733
+ children: /* @__PURE__ */ jsxRuntime.jsx(
734
+ "a",
735
+ {
736
+ href: btnLink,
737
+ onClick: () => window.scrollTo({ top: 0, behavior: "smooth" }),
738
+ children: btnText
739
+ }
740
+ )
741
+ }
742
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
743
+ chunkUQ2HALUD_js.Button,
744
+ {
745
+ className: "w-full h-11",
746
+ variant: isPopular ? "default" : "outline",
747
+ size: "lg",
748
+ asChild: true,
749
+ children: /* @__PURE__ */ jsxRuntime.jsx(
750
+ "a",
751
+ {
752
+ href: btnLink,
753
+ target: "_blank",
754
+ rel: "noopener noreferrer",
755
+ children: btnText
756
+ }
757
+ )
758
+ }
759
+ )
760
+ ]
761
+ },
762
+ ep.name
763
+ );
764
+ })
765
+ ) : (
766
+ /* Individual API-fetched cards */
767
+ plans.map((plan) => /* @__PURE__ */ jsxRuntime.jsxs(
768
+ "div",
769
+ {
770
+ className: `bg-card rounded-xl p-6 sm:p-8 transition-all duration-300 flex flex-col ${plan.popular ? "border-2 border-primary shadow-xl ring-1 ring-primary/20" : "border hover:shadow-lg hover:border-primary/50"}`,
771
+ children: [
772
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center mb-6", children: [
773
+ plan.popular && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-block bg-primary text-primary-foreground px-4 py-1 rounded-full text-xs font-semibold mb-3", children: "Most Popular" }),
774
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-xl sm:text-2xl font-bold mb-2", children: plan.name }),
775
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground text-sm", children: plan.description })
776
+ ] }),
777
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center mb-8", children: plan.price === "Custom" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-3xl sm:text-4xl font-bold", children: "Custom" }) : /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "flex items-baseline justify-center gap-1", children: [
778
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-4xl sm:text-5xl font-bold", children: plan.price }),
779
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground text-lg", children: plan.interval })
780
+ ] }) }),
781
+ /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "space-y-3 mb-8 flex-1", children: plan.features.map((feature, index) => /* @__PURE__ */ jsxRuntime.jsxs(
782
+ "li",
783
+ {
784
+ className: "text-sm flex items-start gap-2",
785
+ children: [
786
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary mt-0.5 flex-shrink-0", children: "\u2713" }),
787
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: feature })
788
+ ]
789
+ },
790
+ index
791
+ )) }),
792
+ plan.ctaLink.startsWith("/") ? /* @__PURE__ */ jsxRuntime.jsx(
793
+ chunkUQ2HALUD_js.Button,
794
+ {
795
+ className: "w-full h-11",
796
+ variant: plan.popular ? "default" : "outline",
797
+ size: "lg",
798
+ asChild: true,
799
+ children: /* @__PURE__ */ jsxRuntime.jsx(
800
+ "a",
801
+ {
802
+ href: plan.ctaLink,
803
+ onClick: () => window.scrollTo({ top: 0, behavior: "smooth" }),
804
+ children: plan.ctaText
805
+ }
806
+ )
807
+ }
808
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
809
+ chunkUQ2HALUD_js.Button,
810
+ {
811
+ className: "w-full h-11",
812
+ variant: plan.popular ? "default" : "outline",
813
+ size: "lg",
814
+ asChild: true,
815
+ children: /* @__PURE__ */ jsxRuntime.jsx(
816
+ "a",
817
+ {
818
+ href: plan.ctaLink,
819
+ target: "_blank",
820
+ rel: "noopener noreferrer",
821
+ children: plan.ctaText
822
+ }
823
+ )
824
+ }
825
+ )
826
+ ]
827
+ },
828
+ plan.id
829
+ ))
830
+ ) })
831
+ ] }) });
832
+ }
833
+ function PricingPage(props) {
834
+ const {
835
+ productName,
836
+ heroHeading = "Simple, Transparent Pricing",
837
+ heroSubtitle = "Choose the plan that's right for you. No hidden fees, no surprises.",
838
+ seoTitle,
839
+ seoDescription,
840
+ seoKeywords,
841
+ seoImage,
842
+ seoUrl
843
+ } = props;
844
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full", children: [
845
+ seoTitle && /* @__PURE__ */ jsxRuntime.jsx(
846
+ chunkUXWT7G77_js.PageHead,
847
+ {
848
+ title: seoTitle,
849
+ description: seoDescription || heroSubtitle,
850
+ productName,
851
+ keywords: seoKeywords,
852
+ image: seoImage,
853
+ url: seoUrl
854
+ }
855
+ ),
856
+ /* @__PURE__ */ jsxRuntime.jsx("section", { className: "bg-gradient-to-b from-background to-muted/20 py-12 sm:py-16 md:py-20 lg:py-24", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center max-w-3xl mx-auto", children: [
857
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl sm:text-4xl md:text-5xl font-bold mb-4 sm:mb-6", children: heroHeading }),
858
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-lg sm:text-xl text-muted-foreground leading-relaxed", children: heroSubtitle })
859
+ ] }) }) }),
860
+ /* @__PURE__ */ jsxRuntime.jsx(PricingSection, { ...props })
861
+ ] });
862
+ }
863
+
864
+ exports.PricingPage = PricingPage;
865
+ exports.PricingProductKeyError = PricingProductKeyError;
866
+ exports.PricingSection = PricingSection;
867
+ exports.availablePlanCurrencies = availablePlanCurrencies;
868
+ exports.cleanPlanDisplayName = cleanPlanDisplayName;
869
+ exports.isUuidLike = isUuidLike;
870
+ exports.planPriceIn = planPriceIn;
871
+ exports.resolveEnterprisePlans = resolveEnterprisePlans;
872
+ exports.resolvePricingProductKey = resolvePricingProductKey;
873
+ exports.splitPlansByAudience = splitPlansByAudience;
874
+ exports.transformFeatureToLabel = transformFeatureToLabel;
875
+ //# sourceMappingURL=chunk-4SAGVLHN.js.map
876
+ //# sourceMappingURL=chunk-4SAGVLHN.js.map