@monetize.software/sdk 3.0.0-alpha.5 → 3.0.0-alpha.6
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.
- package/dist/chunks/{PaywallUI-D7lp-bC5.js → PaywallUI-BYquPomD.js} +897 -848
- package/dist/chunks/PaywallUI-BYquPomD.js.map +1 -0
- package/dist/chunks/PaywallUI-Cl9sz_xA.js +26 -0
- package/dist/chunks/PaywallUI-Cl9sz_xA.js.map +1 -0
- package/dist/chunks/ar-BUQInJ5a.js +2 -0
- package/dist/chunks/ar-BUQInJ5a.js.map +1 -0
- package/dist/chunks/{ar-BCHXVoE2.js → ar-nh4l4WDE.js} +16 -5
- package/dist/chunks/ar-nh4l4WDE.js.map +1 -0
- package/dist/chunks/{cs-B5NqpTW_.js → cs-2UYO2rWf.js} +14 -3
- package/dist/chunks/cs-2UYO2rWf.js.map +1 -0
- package/dist/chunks/cs-i5K4KTFV.js +2 -0
- package/dist/chunks/cs-i5K4KTFV.js.map +1 -0
- package/dist/chunks/{da-BJrGZ3LD.js → da-BD0O_HfV.js} +14 -3
- package/dist/chunks/da-BD0O_HfV.js.map +1 -0
- package/dist/chunks/da-CZbhtVJO.js +2 -0
- package/dist/chunks/da-CZbhtVJO.js.map +1 -0
- package/dist/chunks/de-Bc-GoLgC.js +2 -0
- package/dist/chunks/de-Bc-GoLgC.js.map +1 -0
- package/dist/chunks/{de-aepBKwsb.js → de-BkCiXPsn.js} +12 -3
- package/dist/chunks/de-BkCiXPsn.js.map +1 -0
- package/dist/chunks/el-CcMEbl_F.js +2 -0
- package/dist/chunks/el-CcMEbl_F.js.map +1 -0
- package/dist/chunks/{el-DTLQoX2D.js → el-cIcxTp07.js} +14 -3
- package/dist/chunks/el-cIcxTp07.js.map +1 -0
- package/dist/chunks/es-BvYmomAz.js +2 -0
- package/dist/chunks/es-BvYmomAz.js.map +1 -0
- package/dist/chunks/{es-CLutF-D_.js → es-CJBC_jrV.js} +12 -3
- package/dist/chunks/es-CJBC_jrV.js.map +1 -0
- package/dist/chunks/{fi-DZ4csxqk.js → fi-DyV7ynBf.js} +14 -3
- package/dist/chunks/fi-DyV7ynBf.js.map +1 -0
- package/dist/chunks/fi-aZR-qmZN.js +2 -0
- package/dist/chunks/fi-aZR-qmZN.js.map +1 -0
- package/dist/chunks/{fr-jJU1SSpj.js → fr-BLQ4AIu7.js} +12 -3
- package/dist/chunks/fr-BLQ4AIu7.js.map +1 -0
- package/dist/chunks/fr-BgbFAgHx.js +2 -0
- package/dist/chunks/fr-BgbFAgHx.js.map +1 -0
- package/dist/chunks/{he-D9obGPNj.js → he-Bg-Bqi7r.js} +16 -5
- package/dist/chunks/he-Bg-Bqi7r.js.map +1 -0
- package/dist/chunks/he-CQ4yCuja.js +2 -0
- package/dist/chunks/he-CQ4yCuja.js.map +1 -0
- package/dist/chunks/hi-DtUsj1c-.js +2 -0
- package/dist/chunks/hi-DtUsj1c-.js.map +1 -0
- package/dist/chunks/{hi-pM8SQwZ3.js → hi-wQeE43oY.js} +16 -5
- package/dist/chunks/hi-wQeE43oY.js.map +1 -0
- package/dist/chunks/{hu-E0m9WgbD.js → hu-D9qxzu0r.js} +14 -3
- package/dist/chunks/hu-D9qxzu0r.js.map +1 -0
- package/dist/chunks/hu-DXtscQ8_.js +2 -0
- package/dist/chunks/hu-DXtscQ8_.js.map +1 -0
- package/dist/chunks/id-BByOYpeo.js +2 -0
- package/dist/chunks/id-BByOYpeo.js.map +1 -0
- package/dist/chunks/{id-C6poPvby.js → id-Rx_wYvqy.js} +14 -3
- package/dist/chunks/id-Rx_wYvqy.js.map +1 -0
- package/dist/chunks/it-52Ip42pa.js +2 -0
- package/dist/chunks/it-52Ip42pa.js.map +1 -0
- package/dist/chunks/{it-B2RSFyVd.js → it-B1SRPZ3e.js} +12 -3
- package/dist/chunks/it-B1SRPZ3e.js.map +1 -0
- package/dist/chunks/ja-CMC3Parn.js +2 -0
- package/dist/chunks/ja-CMC3Parn.js.map +1 -0
- package/dist/chunks/{ja-CM-VgVG6.js → ja-DiItm8te.js} +12 -3
- package/dist/chunks/ja-DiItm8te.js.map +1 -0
- package/dist/chunks/ko-3qY21q40.js +2 -0
- package/dist/chunks/ko-3qY21q40.js.map +1 -0
- package/dist/chunks/{ko-C451fA21.js → ko-CdGFWAKX.js} +12 -3
- package/dist/chunks/ko-CdGFWAKX.js.map +1 -0
- package/dist/chunks/nl-Borc5nw1.js +2 -0
- package/dist/chunks/nl-Borc5nw1.js.map +1 -0
- package/dist/chunks/{nl-DzQfJPo2.js → nl-CmZ3vEvj.js} +12 -3
- package/dist/chunks/nl-CmZ3vEvj.js.map +1 -0
- package/dist/chunks/{no-B51be8KT.js → no-BuxByZpq.js} +14 -3
- package/dist/chunks/no-BuxByZpq.js.map +1 -0
- package/dist/chunks/no-Do2iGedg.js +2 -0
- package/dist/chunks/no-Do2iGedg.js.map +1 -0
- package/dist/chunks/{pl-5rTEkvfY.js → pl-jZFCnDb8.js} +14 -3
- package/dist/chunks/pl-jZFCnDb8.js.map +1 -0
- package/dist/chunks/pl-mRaky_7k.js +2 -0
- package/dist/chunks/pl-mRaky_7k.js.map +1 -0
- package/dist/chunks/{pt-JwqffZ9u.js → pt-Cld7MwIW.js} +12 -3
- package/dist/chunks/pt-Cld7MwIW.js.map +1 -0
- package/dist/chunks/pt-DilDTXfs.js +2 -0
- package/dist/chunks/pt-DilDTXfs.js.map +1 -0
- package/dist/chunks/{ro-BE_wJ1td.js → ro-CuKDqj3C.js} +14 -3
- package/dist/chunks/ro-CuKDqj3C.js.map +1 -0
- package/dist/chunks/ro-DF2uzPIB.js +2 -0
- package/dist/chunks/ro-DF2uzPIB.js.map +1 -0
- package/dist/chunks/{ru-BviATvLb.js → ru-B7cjqJUm.js} +14 -3
- package/dist/chunks/ru-B7cjqJUm.js.map +1 -0
- package/dist/chunks/ru-YeaXnTO-.js +2 -0
- package/dist/chunks/ru-YeaXnTO-.js.map +1 -0
- package/dist/chunks/sv-2pHEvuSe.js +2 -0
- package/dist/chunks/sv-2pHEvuSe.js.map +1 -0
- package/dist/chunks/{sv-DabGF9WL.js → sv-D9y-M1Fo.js} +14 -3
- package/dist/chunks/sv-D9y-M1Fo.js.map +1 -0
- package/dist/chunks/{th-BiF-bNo0.js → th-D9umBjEy.js} +14 -3
- package/dist/chunks/th-D9umBjEy.js.map +1 -0
- package/dist/chunks/th-u2QSDF0G.js +2 -0
- package/dist/chunks/th-u2QSDF0G.js.map +1 -0
- package/dist/chunks/{tr-xZuly8X8.js → tr-BddMywiw.js} +14 -3
- package/dist/chunks/tr-BddMywiw.js.map +1 -0
- package/dist/chunks/tr-Bhgm6_ti.js +2 -0
- package/dist/chunks/tr-Bhgm6_ti.js.map +1 -0
- package/dist/chunks/uk-7vwqsaVK.js +2 -0
- package/dist/chunks/uk-7vwqsaVK.js.map +1 -0
- package/dist/chunks/{uk-KlkAaHuy.js → uk-Dbd31hFt.js} +14 -3
- package/dist/chunks/uk-Dbd31hFt.js.map +1 -0
- package/dist/chunks/vi-CJefLP_g.js +2 -0
- package/dist/chunks/vi-CJefLP_g.js.map +1 -0
- package/dist/chunks/{vi-BVCeumNE.js → vi-Do3BMOdh.js} +14 -3
- package/dist/chunks/vi-Do3BMOdh.js.map +1 -0
- package/dist/chunks/zh-D5C3BzYL.js +2 -0
- package/dist/chunks/zh-D5C3BzYL.js.map +1 -0
- package/dist/chunks/{zh-C_ghwmqi.js → zh-gQSYLZI3.js} +12 -3
- package/dist/chunks/zh-gQSYLZI3.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +12 -0
- package/dist/index.js +1 -1
- package/dist/ui.cjs +1 -1
- package/dist/ui.d.ts +12 -0
- package/dist/ui.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/PaywallUI-BD5hRY2P.js +0 -26
- package/dist/chunks/PaywallUI-BD5hRY2P.js.map +0 -1
- package/dist/chunks/PaywallUI-D7lp-bC5.js.map +0 -1
- package/dist/chunks/ar-BCHXVoE2.js.map +0 -1
- package/dist/chunks/ar-CsJNZJSr.js +0 -2
- package/dist/chunks/ar-CsJNZJSr.js.map +0 -1
- package/dist/chunks/cs-B5NqpTW_.js.map +0 -1
- package/dist/chunks/cs-BydWUC0e.js +0 -2
- package/dist/chunks/cs-BydWUC0e.js.map +0 -1
- package/dist/chunks/da-BJrGZ3LD.js.map +0 -1
- package/dist/chunks/da-DNhiAQnh.js +0 -2
- package/dist/chunks/da-DNhiAQnh.js.map +0 -1
- package/dist/chunks/de-H8ztFOie.js +0 -2
- package/dist/chunks/de-H8ztFOie.js.map +0 -1
- package/dist/chunks/de-aepBKwsb.js.map +0 -1
- package/dist/chunks/el-DRfoadtI.js +0 -2
- package/dist/chunks/el-DRfoadtI.js.map +0 -1
- package/dist/chunks/el-DTLQoX2D.js.map +0 -1
- package/dist/chunks/es-CLutF-D_.js.map +0 -1
- package/dist/chunks/es-GlaYesNR.js +0 -2
- package/dist/chunks/es-GlaYesNR.js.map +0 -1
- package/dist/chunks/fi-BIHFyScH.js +0 -2
- package/dist/chunks/fi-BIHFyScH.js.map +0 -1
- package/dist/chunks/fi-DZ4csxqk.js.map +0 -1
- package/dist/chunks/fr-BtZILUNZ.js +0 -2
- package/dist/chunks/fr-BtZILUNZ.js.map +0 -1
- package/dist/chunks/fr-jJU1SSpj.js.map +0 -1
- package/dist/chunks/he-D9obGPNj.js.map +0 -1
- package/dist/chunks/he-vSDRE4Nn.js +0 -2
- package/dist/chunks/he-vSDRE4Nn.js.map +0 -1
- package/dist/chunks/hi-B90FsnP6.js +0 -2
- package/dist/chunks/hi-B90FsnP6.js.map +0 -1
- package/dist/chunks/hi-pM8SQwZ3.js.map +0 -1
- package/dist/chunks/hu-DWVFODsS.js +0 -2
- package/dist/chunks/hu-DWVFODsS.js.map +0 -1
- package/dist/chunks/hu-E0m9WgbD.js.map +0 -1
- package/dist/chunks/id-C6poPvby.js.map +0 -1
- package/dist/chunks/id-Ce2gzMVT.js +0 -2
- package/dist/chunks/id-Ce2gzMVT.js.map +0 -1
- package/dist/chunks/it-B2RSFyVd.js.map +0 -1
- package/dist/chunks/it-u-Gu44bl.js +0 -2
- package/dist/chunks/it-u-Gu44bl.js.map +0 -1
- package/dist/chunks/ja-CM-VgVG6.js.map +0 -1
- package/dist/chunks/ja-CQy8RaRa.js +0 -2
- package/dist/chunks/ja-CQy8RaRa.js.map +0 -1
- package/dist/chunks/ko-BRnb7vJ7.js +0 -2
- package/dist/chunks/ko-BRnb7vJ7.js.map +0 -1
- package/dist/chunks/ko-C451fA21.js.map +0 -1
- package/dist/chunks/nl-CJelco6J.js +0 -2
- package/dist/chunks/nl-CJelco6J.js.map +0 -1
- package/dist/chunks/nl-DzQfJPo2.js.map +0 -1
- package/dist/chunks/no-B51be8KT.js.map +0 -1
- package/dist/chunks/no-BwTjSZ4K.js +0 -2
- package/dist/chunks/no-BwTjSZ4K.js.map +0 -1
- package/dist/chunks/pl-5rTEkvfY.js.map +0 -1
- package/dist/chunks/pl-kO82vcjb.js +0 -2
- package/dist/chunks/pl-kO82vcjb.js.map +0 -1
- package/dist/chunks/pt-CsJzaSjg.js +0 -2
- package/dist/chunks/pt-CsJzaSjg.js.map +0 -1
- package/dist/chunks/pt-JwqffZ9u.js.map +0 -1
- package/dist/chunks/ro-BE_wJ1td.js.map +0 -1
- package/dist/chunks/ro-ue15Ina4.js +0 -2
- package/dist/chunks/ro-ue15Ina4.js.map +0 -1
- package/dist/chunks/ru-B1iMOhX0.js +0 -2
- package/dist/chunks/ru-B1iMOhX0.js.map +0 -1
- package/dist/chunks/ru-BviATvLb.js.map +0 -1
- package/dist/chunks/sv-CkNYpUVy.js +0 -2
- package/dist/chunks/sv-CkNYpUVy.js.map +0 -1
- package/dist/chunks/sv-DabGF9WL.js.map +0 -1
- package/dist/chunks/th-BiF-bNo0.js.map +0 -1
- package/dist/chunks/th-Cu80HK4y.js +0 -2
- package/dist/chunks/th-Cu80HK4y.js.map +0 -1
- package/dist/chunks/tr-B7c0afXV.js +0 -2
- package/dist/chunks/tr-B7c0afXV.js.map +0 -1
- package/dist/chunks/tr-xZuly8X8.js.map +0 -1
- package/dist/chunks/uk-BO106B0H.js +0 -2
- package/dist/chunks/uk-BO106B0H.js.map +0 -1
- package/dist/chunks/uk-KlkAaHuy.js.map +0 -1
- package/dist/chunks/vi-BVCeumNE.js.map +0 -1
- package/dist/chunks/vi-CZ6ow40D.js +0 -2
- package/dist/chunks/vi-CZ6ow40D.js.map +0 -1
- package/dist/chunks/zh-BhP80WI1.js +0 -2
- package/dist/chunks/zh-BhP80WI1.js.map +0 -1
- package/dist/chunks/zh-C_ghwmqi.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zh-D5C3BzYL.js","sources":["../../src/ui/i18n/locales/zh.ts"],"sourcesContent":["/**\n * Static-translations для zh. Сгенерировано из:\n * - `online/lang/static-translations.ts` (legacy, через KEY_MAP)\n * - `tools/sdk-translations.mjs` (SDK-specific строки)\n *\n * Не править вручную — изменения теряются при следующем `node tools/gen-locales.mjs`.\n * Чтобы исправить перевод — править legacy/sdk-translations.mjs и регенерить.\n */\nconst zh = {\n 'anon.description_default': '正在设置访客会话…',\n 'anon.heading_default': '以访客身份继续',\n 'anon.try_again': '重试',\n 'auth.check_email_message': '请查看邮件以获取确认码。',\n 'auth.check_email_title': '请查看邮件',\n 'auth.confirmation_code': '确认码',\n 'auth.continue_with_apple': '使用 Apple 继续',\n 'auth.continue_with_facebook': '使用 Facebook 继续',\n 'auth.continue_with_github': '使用 GitHub 继续',\n 'auth.continue_with_google': '使用 Google 继续',\n 'auth.create_account': '创建账户',\n 'auth.default_subtitle': '登录以访问所有功能并同步您的数据。',\n 'auth.email': '邮箱地址',\n 'auth.email_exists': '该邮箱已注册账户。',\n 'auth.email_not_confirmed': '请先确认您的邮箱。',\n 'auth.forgot_password': '忘记密码?',\n 'auth.forgot_password_title': '忘记密码?',\n 'auth.forgot_subtitle': '输入您的邮箱,我们将向您发送密码重置链接。',\n 'auth.generic_error': '出错了',\n 'auth.have_account': '已有账户?',\n 'auth.hide_password': '隐藏密码',\n 'auth.invalid_credentials': '邮箱或密码错误',\n 'auth.invalid_otp': '验证码无效或已过期。',\n 'auth.last_used': '最近 · {email}',\n 'auth.last_used_no_email': '最近',\n 'auth.link_purchase_subheading': '我们将把购买关联到您的账户以保留访问权限。',\n 'auth.log_in': '登录',\n 'auth.log_in_link': '登录',\n 'auth.login_continue_purchase': '登录以继续购买',\n 'auth.network_error': '网络错误。请检查连接后重试。',\n 'auth.new_password_optional': '新密码(可选 — 仅用于密码重置)',\n 'auth.no_account': '没有账户?',\n 'auth.or': '或',\n 'auth.password': '密码',\n 'auth.passwords_mismatch': '密码不匹配',\n 'auth.rate_limited': '请求过多,请稍后再试。',\n 'auth.repeat_password': '重复密码',\n 'auth.reset_password_subtitle': '请输入邮件中的代码和新密码。',\n 'auth.reset_password_title': '重置密码',\n 'auth.reset_sent_message': '如果该邮箱存在,已发送重置码。',\n 'auth.restore_purchases_heading': '恢复购买',\n 'auth.restore_purchases_subheading': '请登录以恢复您的购买。',\n 'auth.send_reset': '发送重置邮件',\n 'auth.service_unavailable': '服务暂时不可用,请稍后再试。',\n 'auth.show_password': '显示密码',\n 'auth.sign_out': '退出',\n 'auth.sign_up': '注册',\n 'auth.sign_up_link': '注册',\n 'auth.signed_in': '已登录',\n 'auth.signin_failed': '登录失败',\n 'auth.signup_failed': '注册失败',\n 'auth.verify': '验证',\n 'auth.weak_password': '密码强度太弱。',\n 'auth.welcome': '欢迎!',\n 'auth.welcome_signup': '欢迎!',\n 'countdown.d': '天',\n 'countdown.h': '小时',\n 'countdown.m': '分',\n 'countdown.s': '秒',\n 'cta.close': '关闭',\n 'cta.continue': '继续',\n 'cta.get_lifetime_access': '获取终身访问',\n 'cta.get_plan_daily': '获取日付计划',\n 'cta.get_plan_generic': '获取 {interval} 计划',\n 'cta.get_plan_monthly': '获取每月计划',\n 'cta.get_plan_weekly': '获取每周计划',\n 'cta.get_plan_yearly': '获取年度计划',\n 'cta.start_trial': '开始{days}天免费试用',\n 'modal.close_aria': '关闭',\n 'modal.continue': '继续',\n 'modal.error_generic': '出错了',\n 'modal.loading': '加载中…',\n 'modal.purchase_restored_subtitle': '欢迎回来 — 您的订阅已激活。',\n 'modal.purchase_restored_title': '订阅已恢复',\n 'modal.purchase_success_subtitle': '您的订阅已激活。',\n 'modal.purchase_success_title': '已收到付款',\n 'modal.verifying_subscription': '正在检查您的订阅…',\n 'nav.back': '← 返回',\n 'nav.back_aria': '返回',\n 'offer.limited_time': '限时优惠',\n 'payment.awaiting_subtitle': '我们将自动检测付款 — 或在完成后点击下方按钮。',\n 'payment.awaiting_title': '在新标签页中完成付款',\n 'payment.checking': '正在检查…',\n 'payment.ive_paid': '我已付款',\n 'payment.open_checkout_again': '重新打开结账',\n 'payment.open_checkout_button': '打开结账',\n 'payment.popup_blocked_message': '您的浏览器阻止了结账标签页。点击下方打开。',\n 'payment.popup_blocked_title': '允许弹出窗口以继续',\n 'payment.popup_help_text': '结账窗口未打开或被阻止?点击此处重新打开。',\n 'payment.still_processing': '付款仍在处理中。请稍后再试。',\n 'payment.tab_closed_retry': '关闭了标签页?重试',\n 'pricing.free_trial_days': '{days}天免费试用',\n 'pricing.included_per': '每{interval}包含:',\n 'pricing.interval.day': '天',\n 'pricing.interval.lifetime_short': '永久',\n 'pricing.interval.month': '月',\n 'pricing.interval.period': '周期',\n 'pricing.interval.week': '周',\n 'pricing.interval.year': '年',\n 'pricing.money_back': '30天退款保证',\n 'pricing.most_popular': '最受欢迎',\n 'pricing.no_prices': '暂无价格。',\n 'pricing.plan_label.daily': '日付计划',\n 'pricing.plan_label.lifetime': '终身',\n 'pricing.plan_label.monthly': '每月套餐',\n 'pricing.plan_label.weekly': '每周套餐',\n 'pricing.plan_label.yearly': '每年套餐',\n 'pricing.plans_aria': '计划',\n 'session.contact_support': '联系支持',\n 'session.restore_purchases': '恢复购买',\n 'session.sign_out': '退出',\n 'session.signed_in_as_prefix': '已登录为',\n 'session.signing_out': '退出中…',\n 'support.attachments_aria': '上传附件',\n 'support.attachments_label': '附件',\n 'support.close_button': '关闭',\n 'support.done_button': '完成',\n 'support.dropzone_text': '将图片拖放到此处或点击选择',\n 'support.email_placeholder': '输入您的邮箱',\n 'support.file_requirements': 'JPEG/PNG/WebP,最多 {max} 个文件,每个 ≤ 10MB',\n 'support.heading': '支持',\n 'support.instruction': '请填写下方表单以提交您的支持请求。',\n 'support.invalid_email': '无效的邮箱',\n 'support.invalid_file': '仅限 JPEG/PNG/WebP,每个 ≤ 10MB',\n 'support.message_length': '1-5000个字符',\n 'support.message_placeholder': '输入您的消息',\n 'support.remove_file_aria': '移除 {filename}',\n 'support.required': '必填',\n 'support.send_another': '发送另一个请求',\n 'support.send_button': '发送',\n 'support.sending': '发送中…',\n 'support.sending_as': '以以下身份发送',\n 'support.subject_length': '3-200个字符',\n 'support.subject_placeholder': '输入主题',\n 'support.success_heading': '请求已提交',\n 'support.success_message_prefix': '我们已收到您的消息,将回复至',\n 'support.too_many_files': '最多 {max} 个文件'\n} as const;\n\nexport default zh;\n"],"names":["zh"],"mappings":"gFAQA,MAAMA,EAAK,CACT,2BAA4B,YAC5B,uBAAwB,UACxB,iBAAkB,KAClB,2BAA4B,eAC5B,yBAA0B,QAC1B,yBAA0B,MAC1B,2BAA4B,cAC5B,8BAA+B,iBAC/B,4BAA6B,eAC7B,4BAA6B,eAC7B,sBAAuB,OACvB,wBAAyB,oBACzB,aAAc,OACd,oBAAqB,YACrB,2BAA4B,YAC5B,uBAAwB,QACxB,6BAA8B,QAC9B,uBAAwB,wBACxB,qBAAsB,MACtB,oBAAqB,QACrB,qBAAsB,OACtB,2BAA4B,UAC5B,mBAAoB,aACpB,iBAAkB,eAClB,0BAA2B,KAC3B,gCAAiC,wBACjC,cAAe,KACf,mBAAoB,KACpB,+BAAgC,UAChC,qBAAsB,iBACtB,6BAA8B,oBAC9B,kBAAmB,QACnB,UAAW,IACX,gBAAiB,KACjB,0BAA2B,QAC3B,oBAAqB,cACrB,uBAAwB,OACxB,+BAAgC,iBAChC,4BAA6B,OAC7B,0BAA2B,kBAC3B,iCAAkC,OAClC,oCAAqC,cACrC,kBAAmB,SACnB,2BAA4B,iBAC5B,qBAAsB,OACtB,gBAAiB,KACjB,eAAgB,KAChB,oBAAqB,KACrB,iBAAkB,MAClB,qBAAsB,OACtB,qBAAsB,OACtB,cAAe,KACf,qBAAsB,UACtB,eAAgB,MAChB,sBAAuB,MACvB,cAAe,IACf,cAAe,KACf,cAAe,IACf,cAAe,IACf,YAAa,KACb,eAAgB,KAChB,0BAA2B,SAC3B,qBAAsB,SACtB,uBAAwB,mBACxB,uBAAwB,SACxB,sBAAuB,SACvB,sBAAuB,SACvB,kBAAmB,gBACnB,mBAAoB,KACpB,iBAAkB,KAClB,sBAAuB,MACvB,gBAAiB,OACjB,mCAAoC,kBACpC,gCAAiC,QACjC,kCAAmC,WACnC,+BAAgC,QAChC,+BAAgC,YAChC,WAAY,OACZ,gBAAiB,KACjB,qBAAsB,OACtB,4BAA6B,2BAC7B,yBAA0B,aAC1B,mBAAoB,QACpB,mBAAoB,OACpB,8BAA+B,SAC/B,+BAAgC,OAChC,gCAAiC,wBACjC,8BAA+B,YAC/B,0BAA2B,wBAC3B,2BAA4B,iBAC5B,2BAA4B,YAC5B,0BAA2B,cAC3B,uBAAwB,iBACxB,uBAAwB,IACxB,kCAAmC,KACnC,yBAA0B,IAC1B,0BAA2B,KAC3B,wBAAyB,IACzB,wBAAyB,IACzB,qBAAsB,UACtB,uBAAwB,OACxB,oBAAqB,QACrB,2BAA4B,OAC5B,8BAA+B,KAC/B,6BAA8B,OAC9B,4BAA6B,OAC7B,4BAA6B,OAC7B,qBAAsB,KACtB,0BAA2B,OAC3B,4BAA6B,OAC7B,mBAAoB,KACpB,8BAA+B,OAC/B,sBAAuB,OACvB,2BAA4B,OAC5B,4BAA6B,KAC7B,uBAAwB,KACxB,sBAAuB,KACvB,wBAAyB,gBACzB,4BAA6B,SAC7B,4BAA6B,uCAC7B,kBAAmB,KACnB,sBAAuB,oBACvB,wBAAyB,QACzB,uBAAwB,6BACxB,yBAA0B,YAC1B,8BAA+B,SAC/B,2BAA4B,gBAC5B,mBAAoB,KACpB,uBAAwB,UACxB,sBAAuB,KACvB,kBAAmB,OACnB,qBAAsB,UACtB,yBAA0B,WAC1B,8BAA+B,OAC/B,0BAA2B,QAC3B,iCAAkC,iBAClC,yBAA0B,cAC5B"}
|
|
@@ -3,7 +3,7 @@ const e = {
|
|
|
3
3
|
"anon.heading_default": "以访客身份继续",
|
|
4
4
|
"anon.try_again": "重试",
|
|
5
5
|
"auth.check_email_message": "请查看邮件以获取确认码。",
|
|
6
|
-
"auth.check_email_title": "
|
|
6
|
+
"auth.check_email_title": "请查看邮件",
|
|
7
7
|
"auth.confirmation_code": "确认码",
|
|
8
8
|
"auth.continue_with_apple": "使用 Apple 继续",
|
|
9
9
|
"auth.continue_with_facebook": "使用 Facebook 继续",
|
|
@@ -12,23 +12,29 @@ const e = {
|
|
|
12
12
|
"auth.create_account": "创建账户",
|
|
13
13
|
"auth.default_subtitle": "登录以访问所有功能并同步您的数据。",
|
|
14
14
|
"auth.email": "邮箱地址",
|
|
15
|
+
"auth.email_exists": "该邮箱已注册账户。",
|
|
16
|
+
"auth.email_not_confirmed": "请先确认您的邮箱。",
|
|
15
17
|
"auth.forgot_password": "忘记密码?",
|
|
16
18
|
"auth.forgot_password_title": "忘记密码?",
|
|
17
19
|
"auth.forgot_subtitle": "输入您的邮箱,我们将向您发送密码重置链接。",
|
|
18
20
|
"auth.generic_error": "出错了",
|
|
19
21
|
"auth.have_account": "已有账户?",
|
|
20
22
|
"auth.hide_password": "隐藏密码",
|
|
23
|
+
"auth.invalid_credentials": "邮箱或密码错误",
|
|
24
|
+
"auth.invalid_otp": "验证码无效或已过期。",
|
|
21
25
|
"auth.last_used": "最近 · {email}",
|
|
22
26
|
"auth.last_used_no_email": "最近",
|
|
23
27
|
"auth.link_purchase_subheading": "我们将把购买关联到您的账户以保留访问权限。",
|
|
24
28
|
"auth.log_in": "登录",
|
|
25
29
|
"auth.log_in_link": "登录",
|
|
26
30
|
"auth.login_continue_purchase": "登录以继续购买",
|
|
31
|
+
"auth.network_error": "网络错误。请检查连接后重试。",
|
|
27
32
|
"auth.new_password_optional": "新密码(可选 — 仅用于密码重置)",
|
|
28
33
|
"auth.no_account": "没有账户?",
|
|
29
34
|
"auth.or": "或",
|
|
30
35
|
"auth.password": "密码",
|
|
31
36
|
"auth.passwords_mismatch": "密码不匹配",
|
|
37
|
+
"auth.rate_limited": "请求过多,请稍后再试。",
|
|
32
38
|
"auth.repeat_password": "重复密码",
|
|
33
39
|
"auth.reset_password_subtitle": "请输入邮件中的代码和新密码。",
|
|
34
40
|
"auth.reset_password_title": "重置密码",
|
|
@@ -36,13 +42,16 @@ const e = {
|
|
|
36
42
|
"auth.restore_purchases_heading": "恢复购买",
|
|
37
43
|
"auth.restore_purchases_subheading": "请登录以恢复您的购买。",
|
|
38
44
|
"auth.send_reset": "发送重置邮件",
|
|
45
|
+
"auth.service_unavailable": "服务暂时不可用,请稍后再试。",
|
|
39
46
|
"auth.show_password": "显示密码",
|
|
40
47
|
"auth.sign_out": "退出",
|
|
41
48
|
"auth.sign_up": "注册",
|
|
42
49
|
"auth.sign_up_link": "注册",
|
|
43
50
|
"auth.signed_in": "已登录",
|
|
44
51
|
"auth.signin_failed": "登录失败",
|
|
52
|
+
"auth.signup_failed": "注册失败",
|
|
45
53
|
"auth.verify": "验证",
|
|
54
|
+
"auth.weak_password": "密码强度太弱。",
|
|
46
55
|
"auth.welcome": "欢迎!",
|
|
47
56
|
"auth.welcome_signup": "欢迎!",
|
|
48
57
|
"countdown.d": "天",
|
|
@@ -89,7 +98,7 @@ const e = {
|
|
|
89
98
|
"pricing.interval.period": "周期",
|
|
90
99
|
"pricing.interval.week": "周",
|
|
91
100
|
"pricing.interval.year": "年",
|
|
92
|
-
"pricing.money_back": "
|
|
101
|
+
"pricing.money_back": "30天退款保证",
|
|
93
102
|
"pricing.most_popular": "最受欢迎",
|
|
94
103
|
"pricing.no_prices": "暂无价格。",
|
|
95
104
|
"pricing.plan_label.daily": "日付计划",
|
|
@@ -131,4 +140,4 @@ const e = {
|
|
|
131
140
|
export {
|
|
132
141
|
e as default
|
|
133
142
|
};
|
|
134
|
-
//# sourceMappingURL=zh-
|
|
143
|
+
//# sourceMappingURL=zh-gQSYLZI3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zh-gQSYLZI3.js","sources":["../../src/ui/i18n/locales/zh.ts"],"sourcesContent":["/**\n * Static-translations для zh. Сгенерировано из:\n * - `online/lang/static-translations.ts` (legacy, через KEY_MAP)\n * - `tools/sdk-translations.mjs` (SDK-specific строки)\n *\n * Не править вручную — изменения теряются при следующем `node tools/gen-locales.mjs`.\n * Чтобы исправить перевод — править legacy/sdk-translations.mjs и регенерить.\n */\nconst zh = {\n 'anon.description_default': '正在设置访客会话…',\n 'anon.heading_default': '以访客身份继续',\n 'anon.try_again': '重试',\n 'auth.check_email_message': '请查看邮件以获取确认码。',\n 'auth.check_email_title': '请查看邮件',\n 'auth.confirmation_code': '确认码',\n 'auth.continue_with_apple': '使用 Apple 继续',\n 'auth.continue_with_facebook': '使用 Facebook 继续',\n 'auth.continue_with_github': '使用 GitHub 继续',\n 'auth.continue_with_google': '使用 Google 继续',\n 'auth.create_account': '创建账户',\n 'auth.default_subtitle': '登录以访问所有功能并同步您的数据。',\n 'auth.email': '邮箱地址',\n 'auth.email_exists': '该邮箱已注册账户。',\n 'auth.email_not_confirmed': '请先确认您的邮箱。',\n 'auth.forgot_password': '忘记密码?',\n 'auth.forgot_password_title': '忘记密码?',\n 'auth.forgot_subtitle': '输入您的邮箱,我们将向您发送密码重置链接。',\n 'auth.generic_error': '出错了',\n 'auth.have_account': '已有账户?',\n 'auth.hide_password': '隐藏密码',\n 'auth.invalid_credentials': '邮箱或密码错误',\n 'auth.invalid_otp': '验证码无效或已过期。',\n 'auth.last_used': '最近 · {email}',\n 'auth.last_used_no_email': '最近',\n 'auth.link_purchase_subheading': '我们将把购买关联到您的账户以保留访问权限。',\n 'auth.log_in': '登录',\n 'auth.log_in_link': '登录',\n 'auth.login_continue_purchase': '登录以继续购买',\n 'auth.network_error': '网络错误。请检查连接后重试。',\n 'auth.new_password_optional': '新密码(可选 — 仅用于密码重置)',\n 'auth.no_account': '没有账户?',\n 'auth.or': '或',\n 'auth.password': '密码',\n 'auth.passwords_mismatch': '密码不匹配',\n 'auth.rate_limited': '请求过多,请稍后再试。',\n 'auth.repeat_password': '重复密码',\n 'auth.reset_password_subtitle': '请输入邮件中的代码和新密码。',\n 'auth.reset_password_title': '重置密码',\n 'auth.reset_sent_message': '如果该邮箱存在,已发送重置码。',\n 'auth.restore_purchases_heading': '恢复购买',\n 'auth.restore_purchases_subheading': '请登录以恢复您的购买。',\n 'auth.send_reset': '发送重置邮件',\n 'auth.service_unavailable': '服务暂时不可用,请稍后再试。',\n 'auth.show_password': '显示密码',\n 'auth.sign_out': '退出',\n 'auth.sign_up': '注册',\n 'auth.sign_up_link': '注册',\n 'auth.signed_in': '已登录',\n 'auth.signin_failed': '登录失败',\n 'auth.signup_failed': '注册失败',\n 'auth.verify': '验证',\n 'auth.weak_password': '密码强度太弱。',\n 'auth.welcome': '欢迎!',\n 'auth.welcome_signup': '欢迎!',\n 'countdown.d': '天',\n 'countdown.h': '小时',\n 'countdown.m': '分',\n 'countdown.s': '秒',\n 'cta.close': '关闭',\n 'cta.continue': '继续',\n 'cta.get_lifetime_access': '获取终身访问',\n 'cta.get_plan_daily': '获取日付计划',\n 'cta.get_plan_generic': '获取 {interval} 计划',\n 'cta.get_plan_monthly': '获取每月计划',\n 'cta.get_plan_weekly': '获取每周计划',\n 'cta.get_plan_yearly': '获取年度计划',\n 'cta.start_trial': '开始{days}天免费试用',\n 'modal.close_aria': '关闭',\n 'modal.continue': '继续',\n 'modal.error_generic': '出错了',\n 'modal.loading': '加载中…',\n 'modal.purchase_restored_subtitle': '欢迎回来 — 您的订阅已激活。',\n 'modal.purchase_restored_title': '订阅已恢复',\n 'modal.purchase_success_subtitle': '您的订阅已激活。',\n 'modal.purchase_success_title': '已收到付款',\n 'modal.verifying_subscription': '正在检查您的订阅…',\n 'nav.back': '← 返回',\n 'nav.back_aria': '返回',\n 'offer.limited_time': '限时优惠',\n 'payment.awaiting_subtitle': '我们将自动检测付款 — 或在完成后点击下方按钮。',\n 'payment.awaiting_title': '在新标签页中完成付款',\n 'payment.checking': '正在检查…',\n 'payment.ive_paid': '我已付款',\n 'payment.open_checkout_again': '重新打开结账',\n 'payment.open_checkout_button': '打开结账',\n 'payment.popup_blocked_message': '您的浏览器阻止了结账标签页。点击下方打开。',\n 'payment.popup_blocked_title': '允许弹出窗口以继续',\n 'payment.popup_help_text': '结账窗口未打开或被阻止?点击此处重新打开。',\n 'payment.still_processing': '付款仍在处理中。请稍后再试。',\n 'payment.tab_closed_retry': '关闭了标签页?重试',\n 'pricing.free_trial_days': '{days}天免费试用',\n 'pricing.included_per': '每{interval}包含:',\n 'pricing.interval.day': '天',\n 'pricing.interval.lifetime_short': '永久',\n 'pricing.interval.month': '月',\n 'pricing.interval.period': '周期',\n 'pricing.interval.week': '周',\n 'pricing.interval.year': '年',\n 'pricing.money_back': '30天退款保证',\n 'pricing.most_popular': '最受欢迎',\n 'pricing.no_prices': '暂无价格。',\n 'pricing.plan_label.daily': '日付计划',\n 'pricing.plan_label.lifetime': '终身',\n 'pricing.plan_label.monthly': '每月套餐',\n 'pricing.plan_label.weekly': '每周套餐',\n 'pricing.plan_label.yearly': '每年套餐',\n 'pricing.plans_aria': '计划',\n 'session.contact_support': '联系支持',\n 'session.restore_purchases': '恢复购买',\n 'session.sign_out': '退出',\n 'session.signed_in_as_prefix': '已登录为',\n 'session.signing_out': '退出中…',\n 'support.attachments_aria': '上传附件',\n 'support.attachments_label': '附件',\n 'support.close_button': '关闭',\n 'support.done_button': '完成',\n 'support.dropzone_text': '将图片拖放到此处或点击选择',\n 'support.email_placeholder': '输入您的邮箱',\n 'support.file_requirements': 'JPEG/PNG/WebP,最多 {max} 个文件,每个 ≤ 10MB',\n 'support.heading': '支持',\n 'support.instruction': '请填写下方表单以提交您的支持请求。',\n 'support.invalid_email': '无效的邮箱',\n 'support.invalid_file': '仅限 JPEG/PNG/WebP,每个 ≤ 10MB',\n 'support.message_length': '1-5000个字符',\n 'support.message_placeholder': '输入您的消息',\n 'support.remove_file_aria': '移除 {filename}',\n 'support.required': '必填',\n 'support.send_another': '发送另一个请求',\n 'support.send_button': '发送',\n 'support.sending': '发送中…',\n 'support.sending_as': '以以下身份发送',\n 'support.subject_length': '3-200个字符',\n 'support.subject_placeholder': '输入主题',\n 'support.success_heading': '请求已提交',\n 'support.success_message_prefix': '我们已收到您的消息,将回复至',\n 'support.too_many_files': '最多 {max} 个文件'\n} as const;\n\nexport default zh;\n"],"names":["zh"],"mappings":"AAQA,MAAMA,IAAK;AAAA,EACT,4BAA4B;AAAA,EAC5B,wBAAwB;AAAA,EACxB,kBAAkB;AAAA,EAClB,4BAA4B;AAAA,EAC5B,0BAA0B;AAAA,EAC1B,0BAA0B;AAAA,EAC1B,4BAA4B;AAAA,EAC5B,+BAA+B;AAAA,EAC/B,6BAA6B;AAAA,EAC7B,6BAA6B;AAAA,EAC7B,uBAAuB;AAAA,EACvB,yBAAyB;AAAA,EACzB,cAAc;AAAA,EACd,qBAAqB;AAAA,EACrB,4BAA4B;AAAA,EAC5B,wBAAwB;AAAA,EACxB,8BAA8B;AAAA,EAC9B,wBAAwB;AAAA,EACxB,sBAAsB;AAAA,EACtB,qBAAqB;AAAA,EACrB,sBAAsB;AAAA,EACtB,4BAA4B;AAAA,EAC5B,oBAAoB;AAAA,EACpB,kBAAkB;AAAA,EAClB,2BAA2B;AAAA,EAC3B,iCAAiC;AAAA,EACjC,eAAe;AAAA,EACf,oBAAoB;AAAA,EACpB,gCAAgC;AAAA,EAChC,sBAAsB;AAAA,EACtB,8BAA8B;AAAA,EAC9B,mBAAmB;AAAA,EACnB,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,2BAA2B;AAAA,EAC3B,qBAAqB;AAAA,EACrB,wBAAwB;AAAA,EACxB,gCAAgC;AAAA,EAChC,6BAA6B;AAAA,EAC7B,2BAA2B;AAAA,EAC3B,kCAAkC;AAAA,EAClC,qCAAqC;AAAA,EACrC,mBAAmB;AAAA,EACnB,4BAA4B;AAAA,EAC5B,sBAAsB;AAAA,EACtB,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,qBAAqB;AAAA,EACrB,kBAAkB;AAAA,EAClB,sBAAsB;AAAA,EACtB,sBAAsB;AAAA,EACtB,eAAe;AAAA,EACf,sBAAsB;AAAA,EACtB,gBAAgB;AAAA,EAChB,uBAAuB;AAAA,EACvB,eAAe;AAAA,EACf,eAAe;AAAA,EACf,eAAe;AAAA,EACf,eAAe;AAAA,EACf,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,2BAA2B;AAAA,EAC3B,sBAAsB;AAAA,EACtB,wBAAwB;AAAA,EACxB,wBAAwB;AAAA,EACxB,uBAAuB;AAAA,EACvB,uBAAuB;AAAA,EACvB,mBAAmB;AAAA,EACnB,oBAAoB;AAAA,EACpB,kBAAkB;AAAA,EAClB,uBAAuB;AAAA,EACvB,iBAAiB;AAAA,EACjB,oCAAoC;AAAA,EACpC,iCAAiC;AAAA,EACjC,mCAAmC;AAAA,EACnC,gCAAgC;AAAA,EAChC,gCAAgC;AAAA,EAChC,YAAY;AAAA,EACZ,iBAAiB;AAAA,EACjB,sBAAsB;AAAA,EACtB,6BAA6B;AAAA,EAC7B,0BAA0B;AAAA,EAC1B,oBAAoB;AAAA,EACpB,oBAAoB;AAAA,EACpB,+BAA+B;AAAA,EAC/B,gCAAgC;AAAA,EAChC,iCAAiC;AAAA,EACjC,+BAA+B;AAAA,EAC/B,2BAA2B;AAAA,EAC3B,4BAA4B;AAAA,EAC5B,4BAA4B;AAAA,EAC5B,2BAA2B;AAAA,EAC3B,wBAAwB;AAAA,EACxB,wBAAwB;AAAA,EACxB,mCAAmC;AAAA,EACnC,0BAA0B;AAAA,EAC1B,2BAA2B;AAAA,EAC3B,yBAAyB;AAAA,EACzB,yBAAyB;AAAA,EACzB,sBAAsB;AAAA,EACtB,wBAAwB;AAAA,EACxB,qBAAqB;AAAA,EACrB,4BAA4B;AAAA,EAC5B,+BAA+B;AAAA,EAC/B,8BAA8B;AAAA,EAC9B,6BAA6B;AAAA,EAC7B,6BAA6B;AAAA,EAC7B,sBAAsB;AAAA,EACtB,2BAA2B;AAAA,EAC3B,6BAA6B;AAAA,EAC7B,oBAAoB;AAAA,EACpB,+BAA+B;AAAA,EAC/B,uBAAuB;AAAA,EACvB,4BAA4B;AAAA,EAC5B,6BAA6B;AAAA,EAC7B,wBAAwB;AAAA,EACxB,uBAAuB;AAAA,EACvB,yBAAyB;AAAA,EACzB,6BAA6B;AAAA,EAC7B,6BAA6B;AAAA,EAC7B,mBAAmB;AAAA,EACnB,uBAAuB;AAAA,EACvB,yBAAyB;AAAA,EACzB,wBAAwB;AAAA,EACxB,0BAA0B;AAAA,EAC1B,+BAA+B;AAAA,EAC/B,4BAA4B;AAAA,EAC5B,oBAAoB;AAAA,EACpB,wBAAwB;AAAA,EACxB,uBAAuB;AAAA,EACvB,mBAAmB;AAAA,EACnB,sBAAsB;AAAA,EACtB,0BAA0B;AAAA,EAC1B,+BAA+B;AAAA,EAC/B,2BAA2B;AAAA,EAC3B,kCAAkC;AAAA,EAClC,0BAA0B;AAC5B;"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./core.cjs"),r=require("./chunks/PaywallUI-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./core.cjs"),r=require("./chunks/PaywallUI-Cl9sz_xA.js");exports.ApiClient=e.ApiClient;exports.ApiGatewayClient=e.ApiGatewayClient;exports.AuthClient=e.AuthClient;exports.BillingClient=e.BillingClient;exports.EventTracker=e.EventTracker;exports.PaywallError=e.PaywallError;exports.QuotaExceededError=e.QuotaExceededError;exports.SDK_VERSION=e.SDK_VERSION;exports.STORAGE_KEYS=e.STORAGE_KEYS;exports.createStorage=e.createStorage;exports.ensureVisitorId=e.ensureVisitorId;exports.generateVisitorId=e.generateVisitorId;exports.PaywallUI=r.PaywallUI;exports.blockRegistry=r.blockRegistry;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1482,6 +1482,8 @@ export declare class PaywallUI {
|
|
|
1482
1482
|
private mountThenLoad;
|
|
1483
1483
|
/** Inline-режим (live-preview редактора). См. PaywallUIOptions.inline. */
|
|
1484
1484
|
private inline;
|
|
1485
|
+
/** Force-locale для I18nProvider. См. PaywallUIOptions.locale. */
|
|
1486
|
+
private forceLocale;
|
|
1485
1487
|
/** Текущий snapshot UI state-machine. Обновляется PaywallRoot'ом через
|
|
1486
1488
|
* `onState` prop; при close сбрасывается обратно в CLOSED_STATE. */
|
|
1487
1489
|
private currentState;
|
|
@@ -1515,6 +1517,15 @@ export declare class PaywallUI {
|
|
|
1515
1517
|
* почти всегда нежелательна.
|
|
1516
1518
|
*/
|
|
1517
1519
|
setBootstrap(partial: Partial<PaywallBootstrap>): void;
|
|
1520
|
+
/**
|
|
1521
|
+
* Сменить force-locale на лету — для live-preview редактора админки, когда
|
|
1522
|
+
* юзер переключает «Preview as user from <country>». Грузит соответствующий
|
|
1523
|
+
* static-чанк и форсит re-render через handle.update. См. PaywallUIOptions.locale.
|
|
1524
|
+
*
|
|
1525
|
+
* Передай `null`/`undefined`, чтобы вернуть автоматическую резолв-логику
|
|
1526
|
+
* (navigator.language → locale_default).
|
|
1527
|
+
*/
|
|
1528
|
+
setLocale(locale: string | null | undefined): void;
|
|
1518
1529
|
on<E extends PaywallEvent>(event: E, handler: PaywallEventHandler<E>): () => void;
|
|
1519
1530
|
off<E extends PaywallEvent>(event: E, handler: PaywallEventHandler<E>): void;
|
|
1520
1531
|
private emit;
|
|
@@ -1707,6 +1718,7 @@ export declare interface PaywallUIOptions extends Omit<BillingClientOptions, 'au
|
|
|
1707
1718
|
*/
|
|
1708
1719
|
mountThenLoad?: boolean;
|
|
1709
1720
|
/* Excluded from this release type: inline */
|
|
1721
|
+
/* Excluded from this release type: locale */
|
|
1710
1722
|
}
|
|
1711
1723
|
|
|
1712
1724
|
export declare interface PaywallUser {
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiClient as t, ApiGatewayClient as a, AuthClient as i, BillingClient as l, EventTracker as o, PaywallError as n, QuotaExceededError as E, SDK_VERSION as s, STORAGE_KEYS as S, createStorage as c, ensureVisitorId as d, generateVisitorId as g } from "./core.js";
|
|
2
|
-
import { P as y, b as A } from "./chunks/PaywallUI-
|
|
2
|
+
import { P as y, b as A } from "./chunks/PaywallUI-BYquPomD.js";
|
|
3
3
|
export {
|
|
4
4
|
t as ApiClient,
|
|
5
5
|
a as ApiGatewayClient,
|
package/dist/ui.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/PaywallUI-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/PaywallUI-Cl9sz_xA.js");exports.PaywallUI=e.PaywallUI;exports.blockRegistry=e.blockRegistry;
|
|
2
2
|
//# sourceMappingURL=ui.cjs.map
|
package/dist/ui.d.ts
CHANGED
|
@@ -1421,6 +1421,8 @@ export declare class PaywallUI {
|
|
|
1421
1421
|
private mountThenLoad;
|
|
1422
1422
|
/** Inline-режим (live-preview редактора). См. PaywallUIOptions.inline. */
|
|
1423
1423
|
private inline;
|
|
1424
|
+
/** Force-locale для I18nProvider. См. PaywallUIOptions.locale. */
|
|
1425
|
+
private forceLocale;
|
|
1424
1426
|
/** Текущий snapshot UI state-machine. Обновляется PaywallRoot'ом через
|
|
1425
1427
|
* `onState` prop; при close сбрасывается обратно в CLOSED_STATE. */
|
|
1426
1428
|
private currentState;
|
|
@@ -1454,6 +1456,15 @@ export declare class PaywallUI {
|
|
|
1454
1456
|
* почти всегда нежелательна.
|
|
1455
1457
|
*/
|
|
1456
1458
|
setBootstrap(partial: Partial<PaywallBootstrap>): void;
|
|
1459
|
+
/**
|
|
1460
|
+
* Сменить force-locale на лету — для live-preview редактора админки, когда
|
|
1461
|
+
* юзер переключает «Preview as user from <country>». Грузит соответствующий
|
|
1462
|
+
* static-чанк и форсит re-render через handle.update. См. PaywallUIOptions.locale.
|
|
1463
|
+
*
|
|
1464
|
+
* Передай `null`/`undefined`, чтобы вернуть автоматическую резолв-логику
|
|
1465
|
+
* (navigator.language → locale_default).
|
|
1466
|
+
*/
|
|
1467
|
+
setLocale(locale: string | null | undefined): void;
|
|
1457
1468
|
on<E extends PaywallEvent>(event: E, handler: PaywallEventHandler<E>): () => void;
|
|
1458
1469
|
off<E extends PaywallEvent>(event: E, handler: PaywallEventHandler<E>): void;
|
|
1459
1470
|
private emit;
|
|
@@ -1646,6 +1657,7 @@ export declare interface PaywallUIOptions extends Omit<BillingClientOptions, 'au
|
|
|
1646
1657
|
*/
|
|
1647
1658
|
mountThenLoad?: boolean;
|
|
1648
1659
|
/* Excluded from this release type: inline */
|
|
1660
|
+
/* Excluded from this release type: locale */
|
|
1649
1661
|
}
|
|
1650
1662
|
|
|
1651
1663
|
declare interface PaywallUser {
|
package/dist/ui.js
CHANGED
package/package.json
CHANGED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";const M=require("../core.cjs"),F=require("preact"),r=require("preact/jsx-runtime"),u=require("preact/hooks"),se=3600*1e3;function H(t){return`paywall-${t}-trial-time-first-open`}function G(t){return`paywall-${t}-skip-times`}class me{constructor(e,i,a){this.storage=e,this.paywallId=i,this.config=a}async check(){return this.config.mode==="time"?this.checkTime():this.checkOpens()}async recordBlock(){return this.config.mode==="time"?this.recordTime():this.recordOpens()}async reset(){await this.storage.removeItem(this.config.mode==="time"?H(this.paywallId):G(this.paywallId))}async checkTime(){const e=this.config.payload*se,i=await this.storage.getItem(H(this.paywallId)),a=i?Number(i):null;if(!a||!Number.isFinite(a))return{mode:"time",blocked:!0,startedAt:null,expiresAt:null,remainingMs:e,totalMs:e};const n=a+e,s=Math.max(0,n-Date.now());return{mode:"time",blocked:s>0,startedAt:a,expiresAt:n,remainingMs:s,totalMs:e}}async checkOpens(){const e=this.config.payload,i=await this.storage.getItem(G(this.paywallId)),a=i?Number(i):0,n=Number.isFinite(a)?a:0,s=n<e,o=Math.max(0,e-n);return{mode:"opens",blocked:s,remainingActions:o,totalActions:e}}async recordTime(){const e=this.config.payload*se,i=H(this.paywallId),a=await this.storage.getItem(i);let n=a?Number(a):null;(!n||!Number.isFinite(n))&&(n=Date.now(),await this.storage.setItem(i,String(n)));const s=n+e,o=Math.max(0,s-Date.now());return{mode:"time",blocked:o>0,startedAt:n,expiresAt:s,remainingMs:o,totalMs:e}}async recordOpens(){const e=this.config.payload,i=G(this.paywallId),a=await this.storage.getItem(i),n=a?Number(a):0,s=Number.isFinite(n)?n:0,o=Math.min(e,s+1);await this.storage.setItem(i,String(o));const l=Math.max(0,e-o);return{mode:"opens",blocked:o<e,remainingActions:l,totalActions:e}}}let oe=!1;class Ee{constructor(e,i,a){oe||(oe=!0,console.warn('[paywall] trial.storage="server" is not implemented yet — falling back to client storage. State lives in localStorage; users can reset trial by clearing site data.')),this.fallback=new me(e,i,a)}check(){return this.fallback.check()}recordBlock(){return this.fallback.recordBlock()}reset(){return this.fallback.reset()}}function Te(t,e,i){return i.storage==="server"?new Ee(t,e,i):new me(t,e,i)}const be='/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--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-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-700:oklch(50.8% .118 165.612);--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-black:#000;--color-white:#fff;--spacing:.25rem;--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 ;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-normal:0em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--blur-sm:8px;--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--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:var(--default-font-feature-settings,normal);font-variation-settings:var(--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:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}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{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}: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:currentColor}@supports (color:color-mix(in lab,red,red)){::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{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-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]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:host{all:initial;color-scheme:light;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizelegibility;font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,sans-serif}*,:before,:after{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;box-sizing:border-box}button{cursor:pointer;font-family:inherit}button:disabled{cursor:not-allowed}[role=button],[role=radio]{cursor:pointer}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing) * 0)}.-top-2{top:calc(var(--spacing) * -2)}.-top-\\[9px\\]{top:-9px}.-top-\\[10px\\]{top:-10px}.top-1\\/2{top:50%}.top-3{top:calc(var(--spacing) * 3)}.top-4{top:calc(var(--spacing) * 4)}.-right-\\[6px\\]{right:-6px}.right-3{right:calc(var(--spacing) * 3)}.right-4{right:calc(var(--spacing) * 4)}.left-1\\/2{left:50%}.z-10{z-index:10}.z-\\[1\\]{z-index:1}.z-\\[2147483647\\]{z-index:2147483647}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mx-auto{margin-inline:auto}.-mt-3{margin-top:calc(var(--spacing) * -3)}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-1\\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.-mb-2{margin-bottom:calc(var(--spacing) * -2)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.-ml-1{margin-left:calc(var(--spacing) * -1)}.ml-2{margin-left:calc(var(--spacing) * 2)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.h-1{height:calc(var(--spacing) * 1)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-6\\.5{height:calc(var(--spacing) * 6.5)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-\\[22px\\]{height:22px}.h-full{height:100%}.h-px{height:1px}.max-h-\\[calc\\(100dvh-1rem\\)\\]{max-height:calc(100dvh - 1rem)}.min-h-0{min-height:calc(var(--spacing) * 0)}.min-h-12{min-height:calc(var(--spacing) * 12)}.min-h-\\[2\\.4em\\]{min-height:2.4em}.min-h-\\[120px\\]{min-height:120px}.w-1{width:calc(var(--spacing) * 1)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-6\\.5{width:calc(var(--spacing) * 6.5)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-11{width:calc(var(--spacing) * 11)}.w-12{width:calc(var(--spacing) * 12)}.w-14{width:calc(var(--spacing) * 14)}.w-full{width:100%}.max-w-\\[18rem\\]{max-width:18rem}.max-w-\\[20rem\\]{max-width:20rem}.max-w-\\[75\\%\\]{max-width:75%}.max-w-\\[320px\\]{max-width:320px}.max-w-\\[360px\\]{max-width:360px}.max-w-\\[400px\\]{max-width:400px}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-\\[pw-fade-in_180ms_ease-out\\]{animation:.18s ease-out pw-fade-in}.animate-\\[pw-scale-in_220ms_cubic-bezier\\(0\\.16\\,1\\,0\\.3\\,1\\)\\]{animation:.22s cubic-bezier(.16,1,.3,1) pw-scale-in}.animate-ping{animation:var(--animate-ping)}.animate-spin{animation:var(--animate-spin)}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.flex-row-reverse{flex-direction:row-reverse}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-x-1\\.5{column-gap:calc(var(--spacing) * 1.5)}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-y-1{row-gap:calc(var(--spacing) * 1)}.self-center{align-self:center}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-\\[9px\\]{border-radius:9px}.rounded-\\[11px\\]{border-radius:11px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-t-xl{border-top-left-radius:var(--radius-xl);border-top-right-radius:var(--radius-xl)}.rounded-tl-xl{border-top-left-radius:var(--radius-xl)}.rounded-tr-xl{border-top-right-radius:var(--radius-xl)}.rounded-b-none{border-bottom-right-radius:0;border-bottom-left-radius:0}.border,.border-1{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-\\[2\\.5px\\]{border-style:var(--tw-border-style);border-width:2.5px}.border-\\[3px\\]{border-style:var(--tw-border-style);border-width:3px}.border-\\[5px\\]{border-style:var(--tw-border-style);border-width:5px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b,.border-b-1{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-\\[var\\(--pw-accent\\)\\]{border-color:var(--pw-accent)}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-white{border-color:var(--color-white)}.border-white\\/40{border-color:#fff6}@supports (color:color-mix(in lab,red,red)){.border-white\\/40{border-color:color-mix(in oklab,var(--color-white) 40%,transparent)}}.border-t-\\[var\\(--pw-accent\\)\\]{border-top-color:var(--pw-accent)}.border-t-gray-700{border-top-color:var(--color-gray-700)}.border-t-white{border-top-color:var(--color-white)}.bg-\\[color-mix\\(in_srgb\\,var\\(--pw-accent\\)_6\\%\\,white\\)\\]{background-color:var(--pw-accent)}@supports (color:color-mix(in lab,red,red)){.bg-\\[color-mix\\(in_srgb\\,var\\(--pw-accent\\)_6\\%\\,white\\)\\]{background-color:color-mix(in srgb,var(--pw-accent) 6%,white)}}.bg-\\[var\\(--pw-accent\\)\\]{background-color:var(--pw-accent)}.bg-black\\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\\/20{background-color:color-mix(in oklab,var(--color-black) 20%,transparent)}}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-50\\/60{background-color:#f9fafb99}@supports (color:color-mix(in lab,red,red)){.bg-gray-50\\/60{background-color:color-mix(in oklab,var(--color-gray-50) 60%,transparent)}}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-300{background-color:var(--color-gray-300)}.bg-gray-900{background-color:var(--color-gray-900)}.bg-red-50{background-color:var(--color-red-50)}.bg-slate-950\\/50{background-color:#02061880}@supports (color:color-mix(in lab,red,red)){.bg-slate-950\\/50{background-color:color-mix(in oklab,var(--color-slate-950) 50%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\\/80{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.bg-white\\/80{background-color:color-mix(in oklab,var(--color-white) 80%,transparent)}}.p-2{padding:calc(var(--spacing) * 2)}.p-3\\.5{padding:calc(var(--spacing) * 3.5)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-8{padding-inline:calc(var(--spacing) * 8)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-3\\.5{padding-block:calc(var(--spacing) * 3.5)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-12{padding-block:calc(var(--spacing) * 12)}.pt-1{padding-top:calc(var(--spacing) * 1)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-3\\.5{padding-top:calc(var(--spacing) * 3.5)}.pt-6{padding-top:calc(var(--spacing) * 6)}.pr-10{padding-right:calc(var(--spacing) * 10)}.pr-12{padding-right:calc(var(--spacing) * 12)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-3\\.5{padding-bottom:calc(var(--spacing) * 3.5)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-5{padding-bottom:calc(var(--spacing) * 5)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pl-5{padding-left:calc(var(--spacing) * 5)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[0\\.9375rem\\]{font-size:.9375rem}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.text-\\[15px\\]{font-size:15px}.text-\\[22px\\]{font-size:22px}.text-\\[26px\\]{font-size:26px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-normal{--tw-tracking:var(--tracking-normal);letter-spacing:var(--tracking-normal)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-balance{text-wrap:balance}.whitespace-nowrap{white-space:nowrap}.text-\\[var\\(--pw-accent\\)\\]{color:var(--pw-accent)}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-700{color:var(--color-emerald-700)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-gray-800\\/70{color:#1e2939b3}@supports (color:color-mix(in lab,red,red)){.text-gray-800\\/70{color:color-mix(in oklab,var(--color-gray-800) 70%,transparent)}}.text-gray-900{color:var(--color-gray-900)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-transparent{color:#0000}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.decoration-gray-400{-webkit-text-decoration-color:var(--color-gray-400);text-decoration-color:var(--color-gray-400)}.decoration-\\[1\\.5px\\]{text-decoration-thickness:1.5px}.underline-offset-2{text-underline-offset:2px}.opacity-0{opacity:0}.opacity-40{opacity:.4}.opacity-60{opacity:.6}.opacity-90{opacity:.9}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_0_2px_rgba\\(239\\,68\\,68\\,0\\.5\\)\\]{--tw-shadow:0 0 0 2px var(--tw-shadow-color,#ef444480);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-8{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(8px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.\\!filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)!important}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.outline-none{--tw-outline-style:none;outline-style:none}.placeholder\\:text-gray-500::placeholder{color:var(--color-gray-500)}@media(hover:hover){.hover\\:-translate-y-px:hover{--tw-translate-y:-1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.hover\\:border-gray-300:hover{border-color:var(--color-gray-300)}.hover\\:border-gray-400:hover{border-color:var(--color-gray-400)}.hover\\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\\:bg-gray-50\\/60:hover{background-color:#f9fafb99}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-gray-50\\/60:hover{background-color:color-mix(in oklab,var(--color-gray-50) 60%,transparent)}}.hover\\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\\:bg-gray-200\\/60:hover{background-color:#e5e7eb99}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-gray-200\\/60:hover{background-color:color-mix(in oklab,var(--color-gray-200) 60%,transparent)}}.hover\\:bg-white:hover{background-color:var(--color-white)}.hover\\:text-gray-700:hover{color:var(--color-gray-700)}.hover\\:text-gray-900:hover{color:var(--color-gray-900)}.hover\\:text-red-600:hover{color:var(--color-red-600)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-80:hover{opacity:.8}.hover\\:opacity-90:hover{opacity:.9}.hover\\:brightness-105:hover{--tw-brightness:brightness(105%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}.focus\\:bg-gray-200\\/60:focus{background-color:#e5e7eb99}@supports (color:color-mix(in lab,red,red)){.focus\\:bg-gray-200\\/60:focus{background-color:color-mix(in oklab,var(--color-gray-200) 60%,transparent)}}.focus\\:shadow-\\[0_0_0_2px_color-mix\\(in_srgb\\,var\\(--pw-accent\\)_30\\%\\,transparent\\)\\]:focus{--tw-shadow:0 0 0 2px var(--tw-shadow-color,var(--pw-accent))}@supports (color:color-mix(in lab,red,red)){.focus\\:shadow-\\[0_0_0_2px_color-mix\\(in_srgb\\,var\\(--pw-accent\\)_30\\%\\,transparent\\)\\]:focus{--tw-shadow:0 0 0 2px var(--tw-shadow-color,color-mix(in srgb,var(--pw-accent) 30%,transparent))}}.focus\\:shadow-\\[0_0_0_2px_color-mix\\(in_srgb\\,var\\(--pw-accent\\)_30\\%\\,transparent\\)\\]:focus{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:opacity-80:focus-visible{opacity:.8}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-\\[var\\(--pw-accent\\)\\]:focus-visible{--tw-ring-color:var(--pw-accent)}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\\:ring-inset:focus-visible{--tw-ring-inset:inset}.active\\:scale-\\[0\\.98\\]:active{scale:.98}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-60:disabled{opacity:.6}@media(hover:hover){.disabled\\:hover\\:translate-y-0:disabled:hover{--tw-translate-y:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.disabled\\:hover\\:brightness-100:disabled:hover{--tw-brightness:brightness(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}@media(min-width:40rem){.sm\\:max-h-\\[calc\\(100dvh-2rem\\)\\]{max-height:calc(100dvh - 2rem)}.sm\\:p-4{padding:calc(var(--spacing) * 4)}.sm\\:p-8{padding:calc(var(--spacing) * 8)}.sm\\:px-8{padding-inline:calc(var(--spacing) * 8)}.sm\\:pt-8{padding-top:calc(var(--spacing) * 8)}.sm\\:pb-4{padding-bottom:calc(var(--spacing) * 4)}.sm\\:text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}}}.pw-cta-shimmer:before{content:"";z-index:1;background:linear-gradient(90deg,#0000,#ffffff59 50%,#0000);width:100%;height:100%;animation:3s infinite pw-cta-shimmer;position:absolute;top:0;left:-100%}@keyframes pw-cta-shimmer{0%{left:-100%}to{left:100%}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}';let le=!1;function ze(){if(le||(le=!0,typeof CSS>"u"||typeof CSS.registerProperty!="function"))return;let t;try{const e=new CSSStyleSheet;e.replaceSync(be),t=e.cssRules}catch{return}for(const e of t){if(e.constructor.name!=="CSSPropertyRule")continue;const i=e;try{CSS.registerProperty({name:i.name,syntax:i.syntax,inherits:i.inherits,...i.initialValue!=null?{initialValue:i.initialValue}:{}})}catch{}}}function Be(t,e,i={}){if(typeof document>"u")throw new Error("mountShadow called in non-DOM environment");ze();const a=i.host??document.createElement("div");a.setAttribute("data-paywall-host",""),a.style.cssText=i.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;",!a.isConnected&&!i.inline&&document.body.appendChild(a);const n=a.attachShadow({mode:i.shadowMode??"closed"}),s=`
|
|
2
|
-
:host {
|
|
3
|
-
all: initial !important;
|
|
4
|
-
display: block !important;
|
|
5
|
-
color: #111827 !important;
|
|
6
|
-
font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif !important;
|
|
7
|
-
font-size: 16px !important;
|
|
8
|
-
font-weight: 400 !important;
|
|
9
|
-
font-style: normal !important;
|
|
10
|
-
line-height: 1.5 !important;
|
|
11
|
-
letter-spacing: normal !important;
|
|
12
|
-
text-transform: none !important;
|
|
13
|
-
text-decoration: none !important;
|
|
14
|
-
text-align: left !important;
|
|
15
|
-
direction: ltr !important;
|
|
16
|
-
cursor: auto !important;
|
|
17
|
-
visibility: visible !important;
|
|
18
|
-
}
|
|
19
|
-
`,o=document.createElement("style");o.textContent=s+be+(i.injectCss??""),n.appendChild(o);const l=document.createElement("div");l.style.pointerEvents="auto",n.appendChild(l);let p=e;return F.render(F.h(t,p),l),{shadowRoot:n,update(c){p={...p,...c},F.render(F.h(t,p),l)},unmount(){F.render(null,l),a.remove()}}}const Re=(t,e,i)=>{const a=t[e];return a?typeof a=="function"?a():Promise.resolve(a):new Promise((n,s)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(s.bind(null,new Error("Unknown variable dynamic import: "+e+(e.split("/").length!==i?". Note that variables only represent file names one level deep.":""))))})},Oe=["ru","uk","de","es","fr","it","pt","pl","cs","hu","ro","nl","sv","da","no","fi","el","tr","id","ar","ja","ko","zh","hi","th","vi","he"],ve=(t,e,i)=>ke(e,i),ye=F.createContext({t:ve,locale:"en"});function ke(t,e){if(!e)return t;let i=t;for(const[a,n]of Object.entries(e))i=i.split(`{${a}}`).join(String(n));return i}const W=new Map,Z=new Map;function Fe(t){return Oe.includes(t)}function Ue(t){const e=[];if(typeof navigator<"u"&&navigator.language){e.push(navigator.language);const a=navigator.language.split("-")[0];a&&a!==navigator.language&&e.push(a)}const i=t.settings.locale_default;if(i){e.push(i);const a=i.split("-")[0];a&&a!==i&&e.push(a)}for(const a of e)if(Fe(a))return a;return null}function qe(t){return!!t.locales&&Object.keys(t.locales).length>0}async function De(t){const e=W.get(t);if(e)return e;const i=Z.get(t);if(i)return i;const a=Re(Object.assign({"./locales/ar.ts":()=>Promise.resolve().then(()=>require("./ar-CsJNZJSr.js")),"./locales/cs.ts":()=>Promise.resolve().then(()=>require("./cs-BydWUC0e.js")),"./locales/da.ts":()=>Promise.resolve().then(()=>require("./da-DNhiAQnh.js")),"./locales/de.ts":()=>Promise.resolve().then(()=>require("./de-H8ztFOie.js")),"./locales/el.ts":()=>Promise.resolve().then(()=>require("./el-DRfoadtI.js")),"./locales/es.ts":()=>Promise.resolve().then(()=>require("./es-GlaYesNR.js")),"./locales/fi.ts":()=>Promise.resolve().then(()=>require("./fi-BIHFyScH.js")),"./locales/fr.ts":()=>Promise.resolve().then(()=>require("./fr-BtZILUNZ.js")),"./locales/he.ts":()=>Promise.resolve().then(()=>require("./he-vSDRE4Nn.js")),"./locales/hi.ts":()=>Promise.resolve().then(()=>require("./hi-B90FsnP6.js")),"./locales/hu.ts":()=>Promise.resolve().then(()=>require("./hu-DWVFODsS.js")),"./locales/id.ts":()=>Promise.resolve().then(()=>require("./id-Ce2gzMVT.js")),"./locales/it.ts":()=>Promise.resolve().then(()=>require("./it-u-Gu44bl.js")),"./locales/ja.ts":()=>Promise.resolve().then(()=>require("./ja-CQy8RaRa.js")),"./locales/ko.ts":()=>Promise.resolve().then(()=>require("./ko-BRnb7vJ7.js")),"./locales/nl.ts":()=>Promise.resolve().then(()=>require("./nl-CJelco6J.js")),"./locales/no.ts":()=>Promise.resolve().then(()=>require("./no-BwTjSZ4K.js")),"./locales/pl.ts":()=>Promise.resolve().then(()=>require("./pl-kO82vcjb.js")),"./locales/pt.ts":()=>Promise.resolve().then(()=>require("./pt-CsJzaSjg.js")),"./locales/ro.ts":()=>Promise.resolve().then(()=>require("./ro-ue15Ina4.js")),"./locales/ru.ts":()=>Promise.resolve().then(()=>require("./ru-B1iMOhX0.js")),"./locales/sv.ts":()=>Promise.resolve().then(()=>require("./sv-CkNYpUVy.js")),"./locales/th.ts":()=>Promise.resolve().then(()=>require("./th-Cu80HK4y.js")),"./locales/tr.ts":()=>Promise.resolve().then(()=>require("./tr-B7c0afXV.js")),"./locales/uk.ts":()=>Promise.resolve().then(()=>require("./uk-BO106B0H.js")),"./locales/vi.ts":()=>Promise.resolve().then(()=>require("./vi-CZ6ow40D.js")),"./locales/zh.ts":()=>Promise.resolve().then(()=>require("./zh-BhP80WI1.js"))}),`./locales/${t}.ts`,3).then(n=>{const s=n.default??{};return W.set(t,s),s}).catch(n=>{console.warn(`[paywall] failed to load locale chunk "${t}"`,n);const s={};return W.set(t,s),s}).finally(()=>{Z.delete(t)});return Z.set(t,a),a}function Ne({bootstrap:t,children:e}){const[i,a]=u.useState("en"),[n,s]=u.useState(null);u.useEffect(()=>{if(!t||!qe(t))return;const l=Ue(t);if(!l||l===i&&n)return;let p=!1;return De(l).then(c=>{p||(a(l),s(c))}),()=>{p=!0}},[t]);const o={locale:i,t:n?(l,p,c)=>ke(n[l]??p,c):ve};return r.jsx(ye.Provider,{value:o,children:e})}function b(){return u.useContext(ye)}const ce='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';function Ve({open:t,onClose:e,labelledBy:i,brandColor:a,topBanner:n,allowClose:s=!0,hideCloseButton:o=!1,inline:l=!1,children:p}){const{t:c}=b(),h=u.useRef(null),g=u.useRef(null);if(u.useEffect(()=>{if(!t)return;g.current=document.activeElement??null;const v=h.current;v&&(v.querySelector(ce)??v).focus({preventScroll:!0});const z=y=>{if(y.key==="Escape"){if(!s)return;y.stopPropagation(),e();return}if(y.key!=="Tab"||!h.current)return;const C=Array.from(h.current.querySelectorAll(ce)).filter(L=>!L.hasAttribute("disabled")&&L.tabIndex!==-1);if(C.length===0){y.preventDefault();return}const j=C[0],E=C[C.length-1],T=document.activeElement;y.shiftKey&&T===j?(y.preventDefault(),E.focus()):!y.shiftKey&&T===E&&(y.preventDefault(),j.focus())};document.addEventListener("keydown",z,!0);const A=document.body.style.overflow;return l||(document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",z,!0),l||(document.body.style.overflow=A),g.current?.focus?.({preventScroll:!0})}},[t,e,s,l]),!t)return null;const m=v=>{s&&v.target===v.currentTarget&&e()},d=a??"#3b82f6",w=`${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]`;return r.jsxs("div",{class:w,onClick:m,"data-pw-root":!0,children:[r.jsxs("div",{class:"relative flex w-full max-w-[400px] flex-col animate-[pw-scale-in_220ms_cubic-bezier(0.16,1,0.3,1)]",style:{"--pw-accent":d},children:[n,r.jsxs("div",{ref:h,role:"dialog","aria-modal":"true","aria-labelledby":i,tabIndex:-1,class:"relative flex max-h-[calc(100dvh-1rem)] sm:max-h-[calc(100dvh-2rem)] w-full flex-col overflow-hidden rounded-xl bg-white outline-none",style:{boxShadow:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)"},children:[p,s&&!o?r.jsx("button",{type:"button",onClick:e,"aria-label":c("modal.close_aria","Close"),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)]",children:r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:r.jsx("path",{d:"M3 3l10 10M13 3L3 13",stroke:"currentColor","stroke-width":"1.75","stroke-linecap":"round"})})}):null]})]}),r.jsx("style",{children:`
|
|
20
|
-
@keyframes pw-fade-in { from { opacity: 0 } to { opacity: 1 } }
|
|
21
|
-
@keyframes pw-scale-in {
|
|
22
|
-
from { opacity: 0; transform: translateY(12px) scale(0.96) }
|
|
23
|
-
to { opacity: 1; transform: none }
|
|
24
|
-
}
|
|
25
|
-
`})]})}function $e(t,e){switch(t){case"google":return e("auth.continue_with_google","Continue with Google");case"apple":return e("auth.continue_with_apple","Continue with Apple");case"github":return e("auth.continue_with_github","Continue with GitHub");case"facebook":return e("auth.continue_with_facebook","Continue with Facebook")}}function _e({block:t,ctx:e}){const i=e.auth,a=e.authSession,n=t.allow_signup!==!1,s=t.allow_password_reset!==!1,o=t.hide_when_authenticated!==!1;if(!i)return typeof console<"u"&&console.warn("[paywall] auth_panel rendered without AuthClient — pass `auth: true` to PaywallUI"),null;const l=a&&!a.user.is_anonymous?a:null;return l&&o?null:l?r.jsx(He,{email:l.user.email??"",onSignOut:()=>i.signOut().catch(()=>{})}):r.jsx(Ge,{block:t,allowSignup:n,allowReset:s,ctx:e})}function He({email:t,onSignOut:e}){const{t:i}=b();return r.jsxs("div",{class:"flex items-center justify-between gap-3 rounded-2xl bg-gray-100 px-4 py-3",children:[r.jsxs("div",{class:"flex flex-col",children:[r.jsx("span",{class:"text-[10px] font-semibold uppercase tracking-wider text-gray-500",children:i("auth.signed_in","Signed in")}),r.jsx("span",{class:"text-sm font-medium text-gray-900",children:t})]}),r.jsx("button",{type:"button",onClick:e,class:"rounded-md px-1.5 py-0.5 text-xs font-medium text-gray-600 transition-colors hover:bg-white hover:text-gray-900 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]",children:i("auth.sign_out","Sign out")})]})}function Ge({block:t,allowSignup:e,allowReset:i,ctx:a}){const{t:n}=b(),s=a.auth,o=t.providers??[],[l,p]=u.useState("signin"),[c,h]=u.useState(""),[g,m]=u.useState(""),[d,w]=u.useState(""),[v,z]=u.useState(""),[A,y]=u.useState(null),[C,j]=u.useState(null),[E,T]=u.useState(null),[L,O]=u.useState(!1),[B,R]=u.useState(null);u.useEffect(()=>{if(typeof s.getLastLogin!="function")return;let _=!1;return s.getLastLogin().then(P=>{_||!P||(R(P),P.email&&h(q=>q===""?P.email:q))},()=>{}),()=>{_=!0}},[s]);const I=_=>{p(_),j(null),T(null),O(!1)},S=async _=>{if(_.preventDefault(),!A){if(j(null),T(null),l==="signup"&&!L){if(!c.trim())return;O(!0);return}if(l==="signup"&&g!==d){j(n("auth.passwords_mismatch","Passwords don't match"));return}y("email");try{l==="signin"?await s.signInWithEmail({email:c,password:g}):l==="signup"?(await s.signUp({email:c,password:g})).kind==="confirmation_required"&&(p("reset_verify"),T(n("auth.check_email_message","Check your email for a confirmation code."))):l==="forgot"?(await s.requestPasswordReset({email:c}),p("reset_sent"),T(n("auth.reset_sent_message","If that email exists, a reset code has been sent."))):l==="reset_verify"&&(await s.verifyOtp({email:c,token:v,type:g?"recovery":"email"}),g&&await s.updatePassword({password:g}))}catch(P){const q=P instanceof M.PaywallError?P.message:n("auth.generic_error","Something went wrong");j(q)}finally{y(null)}}},x=async _=>{if(!A){y(_),j(null),T(null);try{await s.signInWithOAuth({provider:_,onPopupOpened:()=>y(null)})}catch(P){if(P instanceof M.PaywallError){if(P.code==="oauth_cancelled"||P.code==="oauth_timeout")return;j(P.message)}else j(n("auth.signin_failed","Sign-in failed"))}finally{y(null)}}},f=o.length>0&&(l==="signin"||l==="signup"),k=l==="signin"||l==="signup"||l==="forgot",$=l==="signin"||l==="signup"&&L;return r.jsxs("div",{class:"flex flex-col gap-5",children:[r.jsx(We,{mode:l,customHeading:t.heading,customSubheading:t.subheading}),f?r.jsxs("div",{class:"flex flex-col gap-2.5",children:[o.map(_=>r.jsxs("div",{class:"relative",children:[r.jsxs("button",{type:"button",onClick:()=>x(_),disabled:A!==null,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)]",children:[A===_?r.jsx("span",{class:"inline-block h-4 w-4 animate-spin rounded-full border-2 border-gray-300 border-t-gray-700"}):r.jsx(rt,{provider:_}),r.jsx("span",{children:$e(_,n)})]}),B?.method===_?r.jsx(ue,{email:B.email}):null]},_)),r.jsx(tt,{})]}):null,r.jsxs("form",{onSubmit:S,class:"flex flex-col gap-3",children:[k&&r.jsx(de,{type:"email",placeholder:n("auth.email","Email address"),value:c,onInput:h,autocomplete:"email",required:!0}),$&&r.jsx(K,{placeholder:n("auth.password","Password"),value:g,onInput:m,autocomplete:l==="signin"?"current-password":"new-password",required:!0}),l==="signup"&&L&&r.jsx(K,{placeholder:n("auth.repeat_password","Repeat password"),value:d,onInput:w,autocomplete:"new-password",required:!0}),l==="reset_verify"&&r.jsxs(r.Fragment,{children:[r.jsx(de,{type:"text",placeholder:n("auth.confirmation_code","Confirmation code"),value:v,onInput:z,autocomplete:"one-time-code",inputMode:"numeric",required:!0}),r.jsx(K,{placeholder:n("auth.new_password_optional","New password (optional — only for password reset)"),value:g,onInput:m,autocomplete:"new-password"})]}),l==="reset_sent"&&E&&r.jsx("p",{class:"rounded-2xl bg-gray-100 px-4 py-3 text-sm text-gray-600",children:E}),l==="signin"&&i&&r.jsx("div",{class:"flex justify-end text-sm",children:r.jsx(V,{onClick:()=>I("forgot"),children:n("auth.forgot_password","Forgot password?")})}),C&&r.jsx("p",{class:"text-sm text-red-600",children:C}),E&&l!=="reset_sent"&&r.jsx("p",{class:"text-sm text-gray-500",children:E}),l!=="reset_sent"&&r.jsxs("div",{class:"relative",children:[r.jsx(Xe,{busy:A==="email",label:Ke(l,L,t.submit_label??t.heading,n)}),l==="signin"&&B?.method==="email"?r.jsx(ue,{email:B.email}):null]})]}),r.jsx(Ye,{mode:l,allowSignup:e,onSwitch:I})]})}function We({mode:t,customHeading:e,customSubheading:i}){const{t:a}=b(),n=Ze(t,a),s=t==="signin"||t==="signup",o=s&&e?e:n.title,l=s&&i!==void 0?i||null:n.subtitle;return r.jsxs("div",{class:"flex flex-col gap-2",children:[r.jsx("h2",{class:"text-3xl font-bold tracking-tight text-gray-900",children:o}),l?r.jsx("p",{class:"text-base leading-relaxed text-gray-600",children:l}):null]})}function Ze(t,e){switch(t){case"signin":return{title:e("auth.welcome","Welcome back!"),subtitle:e("auth.default_subtitle","Sign in to access all features and sync your data.")};case"signup":return{title:e("auth.welcome_signup","Welcome!"),subtitle:e("auth.default_subtitle","Sign in to access all features and sync your data.")};case"forgot":return{title:e("auth.forgot_password_title","Forgot password?"),subtitle:e("auth.forgot_subtitle","Enter your email and we'll send you a password reset link.")};case"reset_sent":return{title:e("auth.check_email_title","Check your email"),subtitle:null};case"reset_verify":return{title:e("auth.reset_password_title","Reset password"),subtitle:e("auth.reset_password_subtitle","Enter the code from your email and a new password.")}}}function Ke(t,e,i,a){if(t==="signin"&&i)return i;switch(t){case"signin":return a("auth.log_in","Sign In");case"signup":return e?a("auth.create_account","Create Account"):a("auth.sign_up","Sign Up");case"forgot":return a("auth.send_reset","Send Reset Email");case"reset_verify":return a("auth.verify","Verify");default:return a("cta.continue","Continue")}}function Ye({mode:t,allowSignup:e,onSwitch:i}){const{t:a}=b();return t==="signin"&&e?r.jsxs("p",{class:"text-center text-sm text-gray-600",children:[a("auth.no_account","Don't have an account?")," ",r.jsx(V,{onClick:()=>i("signup"),children:a("auth.sign_up_link","Sign Up")})]}):t==="signup"?r.jsxs("p",{class:"text-center text-sm text-gray-600",children:[a("auth.have_account","Already have an account?")," ",r.jsx(V,{onClick:()=>i("signin"),children:a("auth.log_in_link","Log In")})]}):t==="forgot"||t==="reset_sent"||t==="reset_verify"?r.jsxs("p",{class:"text-center text-sm text-gray-600",children:[a("auth.no_account","Don't have an account?")," ",r.jsx(V,{onClick:()=>i("signup"),children:a("auth.sign_up_link","Sign Up")})]}):null}function V({onClick:t,children:e}){return r.jsx("button",{type:"button",onClick:t,class:"font-semibold transition-opacity hover:opacity-80 focus:outline-none focus-visible:opacity-80",style:{color:"var(--pw-accent)"},children:e})}function Xe({busy:t,label:e}){return r.jsx("button",{type:"submit",disabled:t,class:"pw-cta-shimmer relative mt-1 flex min-h-12 w-full items-center justify-center overflow-hidden rounded-3xl px-5 py-2 text-center text-base font-semibold leading-tight 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)]",style:{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%)",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)"},children:t?r.jsx("span",{class:"relative z-10 inline-block h-4 w-4 animate-spin rounded-full border-2 border-white/40 border-t-white"}):r.jsx("span",{class:"relative z-10",children:e})})}function de({type:t,placeholder:e,value:i,onInput:a,autocomplete:n,inputMode:s,required:o}){return r.jsx("input",{type:t,value:i,placeholder:e,onInput:l=>a(l.target.value),autocomplete:n,inputMode:s,required:o,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 focus:shadow-[0_0_0_2px_color-mix(in_srgb,var(--pw-accent)_30%,transparent)]"})}function K({placeholder:t,value:e,onInput:i,autocomplete:a,required:n}){const{t:s}=b(),[o,l]=u.useState(!1),p=u.useRef(null);u.useEffect(()=>{const g=p.current;g&&g.value!==e&&(g.value=e)},[o,e]);const c=s("auth.show_password","Show password"),h=s("auth.hide_password","Hide password");return r.jsxs("div",{class:"relative",children:[r.jsx("input",{ref:p,type:o?"text":"password",value:e,placeholder:t,onInput:g=>i(g.target.value),autocomplete:a,required:n,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)]"}),r.jsx("button",{type:"button",onClick:()=>l(g=>!g),"aria-label":o?h:c,tabIndex:-1,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)]",children:o?r.jsx(Qe,{}):r.jsx(Je,{})})]})}function Je(){return r.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:[r.jsx("path",{d:"M1.667 10S4.583 4.167 10 4.167 18.333 10 18.333 10 15.417 15.833 10 15.833 1.667 10 1.667 10Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),r.jsx("circle",{cx:"10",cy:"10",r:"2.5",stroke:"currentColor","stroke-width":"1.5"})]})}function Qe(){return r.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:[r.jsx("path",{d:"M8.236 4.293A6.96 6.96 0 0 1 10 4.167C15.417 4.167 18.333 10 18.333 10a13.5 13.5 0 0 1-1.92 2.755M11.768 11.768A2.5 2.5 0 0 1 8.233 8.233",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),r.jsx("path",{d:"M14.953 14.953A8.84 8.84 0 0 1 10 15.833C4.583 15.833 1.667 10 1.667 10a13.5 13.5 0 0 1 3.38-3.953M1.667 1.667l16.666 16.666",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})]})}function ue({email:t}){const{t:e}=b(),i=t?e("auth.last_used","Last · {email}",{email:et(t)}):e("auth.last_used_no_email","Last");return r.jsx("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:i})}function et(t){const[e,i]=t.split("@");return i?`${e.slice(0,3)}*****@${i}`:t}function tt(){const{t}=b();return r.jsxs("div",{class:"flex items-center gap-3 py-1 text-sm text-gray-400",children:[r.jsx("div",{class:"h-px flex-1 bg-gray-200"}),r.jsx("span",{children:t("auth.or","or")}),r.jsx("div",{class:"h-px flex-1 bg-gray-200"})]})}function rt({provider:t}){return t==="google"?r.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 18 18","aria-hidden":"true",children:[r.jsx("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"}),r.jsx("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"}),r.jsx("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"}),r.jsx("path",{fill:"#EA4335",d:"M9 3.58c1.32 0 2.5.45 3.44 1.34l2.58-2.58A9 9 0 0 0 .92 4.99l3.01 2.33C4.64 5.17 6.64 3.58 9 3.58Z"})]}):t==="apple"?r.jsx("svg",{width:"26",height:"26",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:r.jsx("path",{d:"M17.05 20.28c-.98.95-2.05.8-3.08.35-1.09-.46-2.09-.48-3.24 0-1.44.62-2.2.44-3.06-.35C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.54 4.09zM12 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z"})}):t==="github"?r.jsx("svg",{width:"20",height:"20",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:r.jsx("path",{d:"M8 0C3.6 0 0 3.6 0 8a8 8 0 0 0 5.5 7.6c.4.1.5-.2.5-.4v-1.5c-2.2.5-2.7-1-2.7-1-.4-.9-.9-1.2-.9-1.2-.7-.5.1-.5.1-.5.8.1 1.2.8 1.2.8.7 1.2 1.9.9 2.4.7 0-.5.3-.9.5-1.1-1.8-.2-3.6-.9-3.6-4 0-.9.3-1.6.8-2.1-.1-.2-.4-1 .1-2.1 0 0 .7-.2 2.2.8a7.6 7.6 0 0 1 4 0c1.5-1 2.2-.8 2.2-.8.4 1.1.2 1.9.1 2.1.5.5.8 1.2.8 2.1 0 3.1-1.9 3.7-3.6 3.9.3.3.6.8.6 1.6V15c0 .2.1.5.6.4A8 8 0 0 0 16 8c0-4.4-3.6-8-8-8Z"})}):r.jsx("svg",{width:"18",height:"20",viewBox:"0 0 14 16",fill:"currentColor","aria-hidden":"true",children:r.jsx("path",{d:"M14 2.7C14 1.2 12.8 0 11.3 0H2.7C1.2 0 0 1.2 0 2.7v10.6C0 14.8 1.2 16 2.7 16h4V9.8H4.7v-2H6.7V6.4c0-2 1.2-3.1 3-3.1.9 0 1.7.1 2 .2V5h-1.4c-.8 0-1 .4-1 1v1.5h2.4l-.3 2H9.3V16h2c1.5 0 2.7-1.2 2.7-2.7V2.7Z"})})}function it({block:t,bootstrap:e,auth:i,authSession:a,onBack:n,showBack:s=!0,intent:o="preauth"}){const{t:l}=b(),p={bootstrap:e,selectedPriceId:null,setSelectedPriceId:()=>{},onAction:()=>{},auth:i,authSession:a},c=o==="restore"?{...t,heading:l("auth.restore_purchases_heading","Restore Purchases"),subheading:l("auth.restore_purchases_subheading","Please sign in to restore your purchases.")}:o==="preauth"?{...t,heading:l("auth.login_continue_purchase","Log in to continue your purchase"),subheading:l("auth.link_purchase_subheading","We'll link the purchase to your account to keep access."),submit_label:l("auth.log_in","Sign In")}:t;return r.jsxs("div",{class:"relative flex-1 min-h-0 overflow-y-auto p-6 sm:p-8",children:[s?r.jsx(nt,{onClick:n,ariaLabel:l("nav.back_aria","Back")}):null,r.jsx(_e,{block:c,ctx:p})]})}function nt({onClick:t,ariaLabel:e}){return r.jsx("button",{type:"button",onClick:t,"aria-label":e,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)]",children:r.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:[r.jsx("path",{d:"M5 8h8a4 4 0 0 1 0 8H9",stroke:"currentColor","stroke-width":"1.75","stroke-linecap":"round","stroke-linejoin":"round"}),r.jsx("path",{d:"M8 4 4 8l4 4",stroke:"currentColor","stroke-width":"1.75","stroke-linecap":"round","stroke-linejoin":"round"})]})})}function at({auth:t,onSuccess:e,onBack:i,heading:a,description:n}){const{t:s}=b(),o=a??s("anon.heading_default","Continue as guest"),l=n??s("anon.description_default","Setting up your guest session…"),[p,c]=u.useState({kind:"signing-in"}),h=u.useRef(!0);u.useEffect(()=>()=>{h.current=!1},[]);const g=()=>{c({kind:"signing-in"}),(async()=>{try{const m=await t.signInAnonymously();if(!h.current)return;e(m)}catch(m){if(!h.current)return;c({kind:"error",message:m instanceof Error?m.message:"Anonymous sign-in failed"})}})()};return u.useEffect(()=>{g()},[]),r.jsxs("div",{class:"flex flex-col gap-3",children:[i?r.jsx("button",{type:"button",onClick:i,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)]",children:s("nav.back","← Back")}):null,r.jsxs("div",{class:"flex flex-col gap-1",children:[r.jsx("h2",{class:"text-xl font-semibold text-gray-900",children:o}),r.jsx("p",{class:"text-sm text-gray-500",children:l})]}),p.kind==="signing-in"?r.jsx("div",{class:"flex items-center justify-center py-6",children:r.jsx(st,{})}):null,p.kind==="error"?r.jsxs("div",{class:"flex flex-col gap-3",children:[r.jsx("div",{class:"rounded-lg bg-red-50 px-3 py-2 text-sm text-red-700",children:p.message}),r.jsx("button",{type:"button",onClick:g,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",children:s("anon.try_again","Try again")})]}):null]})}function st(){return r.jsxs("svg",{class:"h-5 w-5 animate-spin text-[var(--pw-accent)]",viewBox:"0 0 24 24",fill:"none",children:[r.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"3","stroke-opacity":"0.2"}),r.jsx("path",{d:"M22 12a10 10 0 0 0-10-10",stroke:"currentColor","stroke-width":"3","stroke-linecap":"round"})]})}const je=t=>`pw-offer-${t}-start`;function Y(t){const e=t-Date.now();return e<=0?{days:0,hours:0,minutes:0,seconds:0,expired:!0}:{days:Math.floor(e/(1e3*60*60*24)),hours:Math.floor(e%(1e3*60*60*24)/(1e3*60*60)),minutes:Math.floor(e%(1e3*60*60)/(1e3*60)),seconds:Math.floor(e%(1e3*60)/1e3),expired:!1}}function ot(t){if(t.expires_at){const e=Date.parse(t.expires_at);return Number.isFinite(e)?e:null}if(t.duration_minutes&&t.duration_minutes>0){if(typeof window>"u")return null;try{const e=je(t.id);let i=window.localStorage.getItem(e);return i||(i=new Date().toISOString(),window.localStorage.setItem(e,i)),Date.parse(i)+t.duration_minutes*6e4}catch{return null}}return null}function Se(t,e){if(!t||t.length===0)return null;if(e){const i=t.find(a=>a.id===e);if(i)return i}return t.find(i=>i.expires_at||i.duration_minutes)??null}function Ce(t){const e=t?ot(t):null,[i,a]=u.useState(()=>e!==null?Y(e):null),n=u.useRef(e);return n.current=e,u.useEffect(()=>{if(e===null){a(null);return}a(Y(e));const s=setInterval(()=>{const o=Y(n.current??0);if(a(o),o.expired&&(clearInterval(s),t?.duration_minutes&&typeof window<"u"))try{window.localStorage.removeItem(je(t.id))}catch{}},1e3);return()=>clearInterval(s)},[e,t?.duration_minutes,t?.id]),i}function lt({block:t,ctx:e}){const{t:i}=b(),a=Se(e.bootstrap.offers,t.offer_id),n=Ce(a);if(!a||n===null||n.expired&&!t.force)return null;const s=t.title??a.label??i("offer.limited_time","Limited-time offer"),o=a.discount_percent?`${s} ${a.discount_percent}%`:s;return r.jsxs("div",{class:"flex flex-wrap items-center justify-center gap-2 rounded-2xl px-4 py-3 text-[15px] font-semibold leading-tight text-white",style:{background:"linear-gradient(135deg, color-mix(in srgb, var(--pw-accent) 55%, white) 0%, var(--pw-accent) 50%, color-mix(in srgb, var(--pw-accent) 85%, black) 100%)",textShadow:"0 0 2px rgba(0, 0, 0, 0.25)"},role:"status",children:[r.jsx(Pe,{}),r.jsx("span",{children:o}),r.jsx(Ie,{value:n,t:i})]})}function Ie({value:t,t:e}){return r.jsxs("div",{class:"flex items-center gap-1 font-mono text-sm",children:[t.days>0?r.jsxs(r.Fragment,{children:[r.jsx(D,{children:String(t.days)}),r.jsx("span",{class:"text-xs",children:e("countdown.d","d")})]}):null,r.jsx(D,{children:String(t.hours).padStart(2,"0")}),r.jsx("span",{class:"text-xs",children:e("countdown.h","h")}),r.jsx(D,{children:String(t.minutes).padStart(2,"0")}),r.jsx("span",{class:"text-xs",children:e("countdown.m","m")}),r.jsx(D,{children:String(t.seconds).padStart(2,"0")}),r.jsx("span",{class:"text-xs",children:e("countdown.s","s")})]})}function D({children:t}){return r.jsx("span",{class:"rounded bg-black/20 px-1.5 py-0.5 text-xs font-bold",children:t})}function ct({offer:t}){const{t:e}=b(),i=Ce(t);if(i===null||i.expired)return null;const a=t.label??e("offer.limited_time","Limited-time offer"),n=t.discount_percent?`${a} ${t.discount_percent}%`:a;return r.jsxs("div",{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",style:{background:"linear-gradient(135deg, color-mix(in srgb, var(--pw-accent) 55%, white) 0%, var(--pw-accent) 50%, color-mix(in srgb, var(--pw-accent) 85%, black) 100%)",textShadow:"0 0 2px rgba(0, 0, 0, 0.25)"},role:"status",children:[r.jsx(Pe,{}),r.jsx("span",{children:n}),r.jsx(Ie,{value:i,t:e})]})}function Pe(){return r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:r.jsx("path",{fill:"currentColor",d:"m9.44 5.359-2.394-.895.61-3.036c.062-.31-.345-.531-.57-.291L2.434 6.105a.336.336 0 0 0 .126.537l2.395.894-.61 3.037c-.062.31.345.53.57.29l4.653-4.968a.336.336 0 0 0-.126-.536Z"})})}const X=3,J=200,Q=5e3,ee=5,dt=10*1024*1024,pe=["image/jpeg","image/png","image/webp"],he=/.+@.+\..+/;function ut({client:t,authSession:e,origin:i,onBack:a}){const{t:n}=b(),s=e?.user.email??"",o=s||null,[l,p]=u.useState(s),[c,h]=u.useState(""),[g,m]=u.useState(""),[d,w]=u.useState([]),[v,z]=u.useState(!1),[A,y]=u.useState(null),[C,j]=u.useState({}),E=u.useMemo(()=>{const I=(o??l).trim().toLowerCase(),S=c.trim(),x=g.trim();return he.test(I)&&S.length>=X&&S.length<=J&&x.length>=1&&x.length<=Q},[o,l,c,g]),T=()=>{const I={},S=(o??l).trim(),x=c.trim(),f=g.trim();return S?he.test(S.toLowerCase())||(I.email=n("support.invalid_email","Invalid email")):I.email=n("support.required","Required"),(x.length<X||x.length>J)&&(I.subject=n("support.subject_length","{min}–{max} characters",{min:X,max:J})),(f.length<1||f.length>Q)&&(I.message=n("support.message_length","{min}–{max} characters",{min:1,max:Q})),j(I),Object.keys(I).length===0},L=async I=>{if(I.preventDefault(),!v&&T()){z(!0),j(S=>({...S,submit:void 0}));try{const S=(o??l).trim();await t.createSupportTicket({subject:c.trim(),content:g.trim(),email:S||void 0,files:d.length>0?d:void 0}),y(S)}catch(S){const x=S instanceof M.PaywallError&&S.message||"Failed to send. Please try again.";j(f=>({...f,submit:x}))}finally{z(!1)}}},O=()=>{h(""),m(""),w([]),j({}),y(null)},B="flex flex-col gap-3 bg-white px-6 pb-6 pt-3 sm:px-8",R={boxShadow:"0 -4px 12px -4px rgba(15,23,42,0.06)"};return A?r.jsxs("div",{class:"relative flex-1 min-h-0 flex flex-col",children:[r.jsxs("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:[r.jsx("div",{class:"flex h-14 w-14 items-center justify-center rounded-full",style:{background:"linear-gradient(135deg, color-mix(in srgb, var(--pw-accent) 85%, white), var(--pw-accent))",color:"#fff",boxShadow:"0 0 0 8px color-mix(in srgb, var(--pw-accent) 12%, transparent), 0 8px 20px -6px color-mix(in srgb, var(--pw-accent) 45%, transparent)"},"aria-hidden":"true",children:r.jsx("svg",{viewBox:"0 0 24 24",class:"h-7 w-7",children:r.jsx("path",{fill:"currentColor",d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24Zm6.93 8.2-6.85 9.29a1.01 1.01 0 0 1-1.43.19L5.76 13.77a1 1 0 1 1 1.25-1.56l4.08 3.26 6.23-8.45a1 1 0 1 1 1.61 1.18Z"})})}),r.jsx("div",{class:"text-lg font-semibold tracking-tight text-gray-900",children:n("support.success_heading","Request submitted")}),r.jsxs("div",{class:"max-w-[320px] text-sm leading-relaxed text-gray-500",children:[n("support.success_message_prefix","We've received your message and will respond to")," ",r.jsx("b",{class:"text-gray-700",children:A}),"."]})]}),r.jsx("div",{class:B,style:R,children:r.jsxs("div",{class:"flex items-center justify-center gap-3",children:[r.jsx("button",{type:"button",onClick:a,class:"rounded-xl px-3 py-2 text-sm font-medium text-gray-600 transition-colors hover:bg-gray-100 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]",children:i==="standalone"?n("support.done_button","Done"):n("nav.back_aria","Back")}),r.jsx("button",{type:"button",onClick:O,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)]",style:{background:"linear-gradient(180deg, color-mix(in srgb, var(--pw-accent) 92%, white), var(--pw-accent))",boxShadow:"0 1px 2px rgba(15,23,42,0.08), 0 6px 14px -4px color-mix(in srgb, var(--pw-accent) 50%, transparent)"},children:n("support.send_another","Send another request")})]})})]}):r.jsxs("form",{onSubmit:L,class:"relative flex-1 min-h-0 flex flex-col",children:[r.jsx(pt,{onClick:a,ariaLabel:n("nav.back_aria","Back")}),r.jsx("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:r.jsxs("div",{class:"flex flex-col gap-5",children:[r.jsxs("div",{class:"flex flex-col gap-2 pr-10",children:[r.jsx("h2",{class:"text-3xl font-bold tracking-tight text-gray-900",children:n("support.heading","Support")}),r.jsx("p",{class:"text-base leading-relaxed text-gray-600",children:n("support.instruction","Please fill out the form below to submit your support request.")})]}),r.jsxs("div",{class:"flex flex-col gap-3",children:[o?r.jsxs("div",{class:"rounded-2xl bg-gray-100 px-5 py-3 text-sm text-gray-600",children:[n("support.sending_as","Sending as")," ",r.jsx("b",{class:"font-medium text-gray-900",children:o})]}):r.jsx(ge,{type:"email",placeholder:n("support.email_placeholder","Enter your email *"),value:l,onInput:p,error:C.email,autocomplete:"email",required:!0}),r.jsx(ge,{type:"text",placeholder:n("support.subject_placeholder","Enter your subject *"),value:c,onInput:h,error:C.subject,required:!0}),r.jsx(ht,{placeholder:n("support.message_placeholder","Enter your message *"),value:g,onInput:m,error:C.message,required:!0}),r.jsx(gt,{files:d,onChange:w,disabled:v})]})]})}),r.jsxs("div",{class:B,style:R,children:[C.submit&&r.jsx("p",{class:"text-sm text-red-600",children:C.submit}),r.jsxs("div",{class:"flex items-center justify-end gap-3",children:[r.jsx("button",{type:"button",onClick:a,disabled:v,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)]",children:i==="standalone"?n("support.close_button","Close"):n("nav.back_aria","Back")}),r.jsx("button",{type:"submit",disabled:!E||v,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)]",style:{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%)",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)"},children:v?r.jsx("span",{class:"relative z-10 inline-block h-4 w-4 animate-spin rounded-full border-2 border-white/40 border-t-white"}):r.jsx("span",{class:"relative z-10",children:n("support.send_button","Send")})})]})]})]})}function pt({onClick:t,ariaLabel:e}){return r.jsx("button",{type:"button",onClick:t,"aria-label":e,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)]",children:r.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:[r.jsx("path",{d:"M5 8h8a4 4 0 0 1 0 8H9",stroke:"currentColor","stroke-width":"1.75","stroke-linecap":"round","stroke-linejoin":"round"}),r.jsx("path",{d:"M8 4 4 8l4 4",stroke:"currentColor","stroke-width":"1.75","stroke-linecap":"round","stroke-linejoin":"round"})]})})}function ge({type:t,placeholder:e,value:i,onInput:a,error:n,autocomplete:s,required:o}){return r.jsxs("div",{children:[r.jsx("input",{type:t,value:i,placeholder:e,onInput:l=>a(l.target.value),autocomplete:s,required:o,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 ${n?"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)]"}`}),n&&r.jsx("span",{class:"mt-1 ml-2 block text-sm text-red-600",children:n})]})}function ht({placeholder:t,value:e,onInput:i,error:a,required:n}){return r.jsxs("div",{children:[r.jsx("textarea",{value:e,placeholder:t,onInput:s=>i(s.target.value),required:n,rows:5,class:`min-h-[120px] w-full rounded-2xl bg-gray-100 px-5 py-3.5 text-base leading-relaxed text-gray-900 outline-none transition-all placeholder:text-gray-500 hover:bg-gray-200/60 focus:bg-gray-200/60 ${a?"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)]"}`}),a&&r.jsx("span",{class:"mt-1 ml-2 block text-sm text-red-600",children:a})]})}function gt({files:t,onChange:e,disabled:i}){const{t:a}=b(),n=u.useRef(null),[s,o]=u.useState(!1),[l,p]=u.useState(null),c=h=>{if(!h||i)return;p(null);const g=Array.from(h);if(t.length+g.length>ee){p(a("support.too_many_files","Up to {max} files",{max:ee}));return}const m=g.filter(d=>pe.includes(d.type)&&d.size<=dt);if(m.length!==g.length){p(a("support.invalid_file","Only JPEG/PNG/WebP, ≤ 10MB each"));return}e([...t,...m])};return r.jsxs("div",{children:[r.jsx("span",{class:"text-xs font-medium text-gray-700",children:a("support.attachments_label","Attachments (optional)")}),r.jsxs("div",{role:"button",tabIndex:0,"aria-label":a("support.attachments_aria","Attachments upload"),onClick:()=>!i&&n.current?.click(),onDragOver:h=>{h.preventDefault(),i||o(!0)},onDragLeave:()=>o(!1),onDrop:h=>{h.preventDefault(),o(!1),c(h.dataTransfer?.files??null)},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"} ${i?"cursor-not-allowed opacity-60":""}`,children:[r.jsx("div",{class:"text-xs text-gray-500",children:a("support.dropzone_text","Drop images here or click to select")}),r.jsx("div",{class:"mt-0.5 text-[11px] text-gray-400",children:a("support.file_requirements","JPEG/PNG/WebP, up to {max} files, ≤ 10MB each",{max:ee})})]}),r.jsx("input",{ref:n,type:"file",multiple:!0,accept:pe.join(","),class:"hidden",onChange:h=>{c(h.target.files),h.currentTarget.value=""}}),l&&r.jsx("p",{class:"mt-1 text-xs text-red-600",children:l}),t.length>0&&r.jsx("ul",{class:"mt-2 flex flex-col gap-1",children:t.map((h,g)=>r.jsxs("li",{class:"flex items-center justify-between gap-2 rounded bg-gray-50 px-2 py-1 text-xs",children:[r.jsx("span",{class:"truncate text-gray-700",children:h.name}),r.jsx("button",{type:"button",onClick:()=>{const m=[...t];m.splice(g,1),e(m)},disabled:i,class:"text-gray-500 hover:text-red-600 disabled:cursor-not-allowed disabled:opacity-60","aria-label":a("support.remove_file_aria","Remove {filename}",{filename:h.name}),children:"✕"})]},`${h.name}-${h.size}-${g}`))})]})}const ft={day:"cta.get_plan_daily",week:"cta.get_plan_weekly",month:"cta.get_plan_monthly",year:"cta.get_plan_yearly"},xt={day:"Get Daily Plan",week:"Get Weekly Plan",month:"Get Monthly Plan",year:"Get Yearly Plan"};function wt(t,e,i,a){if(e==="close")return a("cta.close","Close");if(!t)return a("cta.continue","Continue");if(!i&&t.trial_days&&t.interval&&t.interval!=="lifetime")return a("cta.start_trial","Start {days}-Day Free Trial",{days:t.trial_days});if(!t.interval||t.interval==="lifetime")return a("cta.get_lifetime_access","Get Lifetime Access");const n=ft[t.interval];return n?a(n,xt[t.interval]):a("cta.get_plan_generic","Get {interval} Plan",{interval:mt(t.interval)})}function mt(t){return t.length?t[0].toUpperCase()+t.slice(1):t}function bt({block:t,ctx:e}){const{t:i}=b(),[a,n]=u.useState(!1),s=t.priceId??e.selectedPriceId,o=a||t.action==="checkout"&&!s,l=s?e.bootstrap.prices.find(g=>g.id===s)??null:null,p=e.bootstrap.user?.had_previous_trial??!1,c=t.label??wt(l,t.action,p,i),h=async()=>{if(!o){n(!0);try{await e.onAction(t.action,{priceId:s})}finally{n(!1)}}};return r.jsxs("button",{type:"button",disabled:o,onClick:h,class:"pw-cta-shimmer relative flex min-h-12 w-full items-center justify-center overflow-hidden rounded-3xl px-5 py-2 text-center text-base font-semibold leading-tight 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)]",style:{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%)",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)"},children:[r.jsx("span",{class:"absolute inset-0 opacity-40",style:{background:"radial-gradient(circle at 50% 0%, color-mix(in srgb, white 40%, transparent) 0%, transparent 70%)"},"aria-hidden":"true"}),a?r.jsx("span",{class:"relative z-10 inline-block h-4 w-4 animate-spin rounded-full border-2 border-white/40 border-t-white"}):r.jsx("span",{class:"relative z-10",children:c})]})}function vt({ctx:t}){const{t:e}=b(),i=t.authSession,a=t.auth,[n,s]=u.useState(!1),o=()=>t.onAction("support");if(i&&!i.user.is_anonymous){const l=async()=>{if(!(!a||n)){s(!0);try{await a.signOut()}catch{}finally{s(!1)}}};return r.jsxs("div",{class:"-mt-3 flex flex-col items-center gap-1.5 pt-1 text-center text-[13px] text-gray-500",children:[r.jsxs("span",{children:[e("session.signed_in_as_prefix","Signed in as")," ",r.jsx("b",{class:"font-medium text-gray-700",children:i.user.email})]}),r.jsxs("div",{class:"flex items-center justify-center gap-3",children:[r.jsx(N,{onClick:l,disabled:!a||n,children:n?e("session.signing_out","Signing out…"):e("session.sign_out","Sign Out")}),r.jsx(fe,{}),r.jsx(N,{onClick:o,children:e("session.contact_support","Contact Support")})]})]})}return r.jsxs("div",{class:"-mt-3 flex items-center justify-center gap-3 pt-1 text-center text-[13px]",children:[r.jsx(N,{onClick:()=>t.onAction("restore"),children:e("session.restore_purchases","Restore purchases")}),r.jsx(fe,{}),r.jsx(N,{onClick:o,children:e("session.contact_support","Contact Support")})]})}function N({onClick:t,disabled:e,children:i}){return r.jsx("button",{type:"button",onClick:t,disabled:e,class:"font-semibold transition-opacity hover:opacity-80 disabled:cursor-not-allowed disabled:opacity-60 focus:outline-none focus-visible:opacity-80",style:{color:"var(--pw-accent)"},children:i})}function fe(){return r.jsx("span",{class:"h-1 w-1 rounded-full bg-gray-300","aria-hidden":"true"})}function yt({block:t}){return t.items.length?r.jsx("ul",{class:"flex flex-col gap-2.5",role:"list",children:t.items.map(e=>r.jsxs("li",{class:"flex items-start gap-3 text-sm text-gray-700",children:[r.jsx("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",class:"mt-0.5 flex-shrink-0 text-emerald-500","aria-hidden":"true",children:r.jsx("path",{d:"M4 10.5l3.5 3.5 8.5-8.5",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"})}),r.jsxs("div",{class:"flex flex-col gap-0.5",children:[r.jsx("span",{class:"font-medium leading-snug text-gray-900",children:e.name}),e.desc?r.jsx("span",{class:"text-xs leading-relaxed text-gray-400",children:e.desc}):null]})]},e.id))}):null}function kt({block:t}){const{t:e}=b(),i=t.title??e("pricing.money_back","30-day money-back guarantee"),a=t.subtitle,n=(t.icon??"dollar_shield")!=="none",s=_t(i);return r.jsxs("div",{class:"flex flex-col items-center gap-1.5 border-b-1 pb-4 mb-1 border-gray-100",children:[r.jsxs("div",{class:"inline-flex items-center gap-2 text-[12px] text-gray-700",children:[n?r.jsx(jt,{}):null,s?r.jsxs("span",{children:[r.jsx("b",{class:"font-bold text-gray-900",children:s.bold})," ",r.jsx("span",{class:"font-medium",children:s.rest})]}):r.jsx("span",{class:"font-medium",children:i})]}),a?r.jsx("span",{class:"text-center text-xs leading-relaxed text-gray-500",children:a}):null]})}function _t(t){const e=t.match(/^(\d+[-\s]?days?)\s+(.+)$/i);return e?{bold:e[1],rest:e[2]}:null}function jt(){return r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",width:"16",height:"16",class:"flex-shrink-0 text-emerald-500","aria-hidden":"true",children:[r.jsx("path",{d:"M12 2 4 5v6c0 5.25 3.5 9.5 8 11 4.5-1.5 8-5.75 8-11V5l-8-3Z",stroke:"currentColor","stroke-width":"2","stroke-linejoin":"round"}),r.jsx("path",{d:"m9 12 2 2 4-4",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]})}const Ae=24,St=16,Ct=2;function It(t,e){const i=e*Ct;let a=Ae;for(t.style.fontSize=`${a}px`;t.scrollHeight>i&&a>St;)a-=1,t.style.fontSize=`${a}px`}function Pt({block:t,ctx:e}){const i=t.level??1,a=`h${i}`,n=i===1?"text-[22px] sm:text-2xl font-semibold leading-tight text-center text-balance text-gray-800":i===2?"text-xl font-semibold leading-snug text-gray-900 tracking-tight":"text-base font-medium text-gray-900",s=u.useRef(null),o=i===1&&!!e.bootstrap.settings.title_auto_fit;return u.useEffect(()=>{if(!o||!s.current)return;const l=getComputedStyle(s.current),p=parseFloat(l.lineHeight)||Ae*1.5;It(s.current,p)},[o,t.text]),r.jsx(a,{ref:s,class:n,children:t.text})}function At(t){const e=t.local??{currency:t.currency,amount:t.amount};if(t.interval==="year"){const i=(t.interval_count??1)*12;return{amount:e.amount/i,currency:e.currency}}return{amount:e.amount,currency:e.currency}}function te(t,e){const i=t%1!==0?2:0;try{const a=new Intl.NumberFormat(void 0,{style:"currency",currency:e,currencyDisplay:"narrowSymbol",maximumFractionDigits:i,minimumFractionDigits:i}).formatToParts(t);let n="",s="";for(const o of a)o.type==="currency"?n=o.value:o.type!=="literal"&&(s+=o.value);return{currency:n||e,amount:s.trim()}}catch{return{currency:e,amount:String(t)}}}function ne(t,e){const{amount:i,currency:a}=At(t);if(!e){const{currency:l,amount:p}=te(i,a);return{currency:l,amount:p,originalAmount:null}}const n=i*(1-e/100),s=te(n,a),o=te(i,a);return{currency:s.currency,amount:s.amount,originalAmount:`${o.currency}${o.amount}`}}function re(t,e){if(!t||t.length===0)return null;const i=t.find(n=>n.price_id===e&&n.discount_percent&&n.discount_percent>0);return i||(t.find(n=>n.price_id==null&&n.discount_percent&&n.discount_percent>0)??null)}function Me(t,e){if(t.label)return t.label.toUpperCase();if(!t.interval||t.interval==="lifetime")return e("pricing.plan_label.lifetime","LIFETIME");const a={day:{key:"pricing.plan_label.daily",fallback:"DAILY PLAN"},week:{key:"pricing.plan_label.weekly",fallback:"WEEKLY PLAN"},month:{key:"pricing.plan_label.monthly",fallback:"MONTHLY PLAN"},year:{key:"pricing.plan_label.yearly",fallback:"YEARLY PLAN"}}[t.interval];return a?e(a.key,a.fallback):`${t.interval.toUpperCase()} PLAN`}function ae(t,e){if(!t.interval||t.interval==="lifetime")return e("pricing.interval.lifetime_short","lifetime");if(t.interval==="year")return e("pricing.interval.month","month");const i=t.interval_count??1;return i===1?e(`pricing.interval.${t.interval}`,t.interval):`${i} ${t.interval}s`}function Mt({block:t,ctx:e}){const{t:i}=b(),a=t.priceIds&&t.priceIds.length>0?new Set(t.priceIds):null,n=e.bootstrap.prices.filter(o=>!a||a.has(o.id));if(n.length===0)return r.jsx("p",{class:"text-sm text-gray-500",children:i("pricing.no_prices","No prices available.")});const s=t.popular_label??i("pricing.most_popular","Most popular");if(t.view==="compact")return r.jsx("div",{class:"flex w-full flex-col",role:"radiogroup","aria-label":i("pricing.plans_aria","Plans"),children:n.map((o,l)=>r.jsx(Et,{price:o,isLast:l===n.length-1,isPopular:t.popular_price_id===o.id,popularLabel:s,offer:re(e.bootstrap.offers,o.id),selected:e.selectedPriceId===o.id,onSelect:()=>{e.setSelectedPriceId(o.id),e.onAction("price_selected",{priceId:o.id,price:o})},t:i},o.id))});if(t.view==="horizontal"){const o=Math.min(n.length,3);return r.jsx("div",{class:"grid items-stretch gap-2",style:{gridTemplateColumns:`repeat(${o}, minmax(0, 1fr))`},role:"radiogroup","aria-label":i("pricing.plans_aria","Plans"),children:n.map(l=>r.jsx(Tt,{price:l,isPopular:t.popular_price_id===l.id,popularLabel:s,offer:re(e.bootstrap.offers,l.id),selected:e.selectedPriceId===l.id,onSelect:()=>{e.setSelectedPriceId(l.id),e.onAction("price_selected",{priceId:l.id,price:l})},t:i},l.id))})}return r.jsx("div",{class:"flex flex-col gap-2",role:"radiogroup","aria-label":i("pricing.plans_aria","Plans"),children:n.map(o=>{const l=e.selectedPriceId===o.id,p=t.popular_price_id===o.id,h=re(e.bootstrap.offers,o.id)?.discount_percent??null,{currency:g,amount:m,originalAmount:d}=ne(o,h);return r.jsxs("button",{type:"button",role:"radio","aria-checked":l,onClick:()=>{e.setSelectedPriceId(o.id),e.onAction("price_selected",{priceId:o.id,price:o})},class:["group relative inline-flex w-full mx-auto items-center justify-between flex-row-reverse gap-4 rounded-2xl border-2 p-4 text-left transition-colors duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[var(--pw-accent)]",l?"border-[var(--pw-accent)] bg-transparent":"border-gray-200 bg-transparent hover:bg-gray-50"].join(" "),children:[r.jsx("span",{class:["flex h-6.5 w-6.5 flex-shrink-0 items-center justify-center rounded-full border transition-colors",l?"border-[var(--pw-accent)] text-white":"border-gray-300 bg-transparent text-transparent",p?"mt-3":""].join(" "),style:l?{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%)"}:void 0,"aria-hidden":"true",children:r.jsx("svg",{width:"14",height:"10",viewBox:"0 0 17 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:l?"opacity-100":"opacity-0",children:r.jsx("path",{d:"M16.5234 0.476562C16.9805 0.898438 16.9805 1.63672 16.5234 2.05859L7.52344 11.0586C7.10156 11.5156 6.36328 11.5156 5.94141 11.0586L1.44141 6.55859C0.984375 6.13672 0.984375 5.39844 1.44141 4.97656C1.86328 4.51953 2.60156 4.51953 3.02344 4.97656L6.75 8.66797L14.9414 0.476562C15.3633 0.0195312 16.1016 0.0195312 16.5234 0.476562Z",fill:"currentColor"})})}),r.jsxs("div",{class:"flex flex-1 flex-col gap-0.5",children:[r.jsxs("div",{class:"flex flex-wrap items-center gap-x-2 gap-y-1",children:[r.jsx("span",{class:"text-xs font-normal uppercase tracking-normal text-gray-800/70",children:Me(o,i)}),d?r.jsx("span",{class:"text-[15px] font-normal text-gray-400 opacity-60 line-through decoration-gray-400 decoration-[1.5px]",children:d}):null,h?r.jsxs("span",{class:"rounded-full bg-emerald-100 px-2.5 py-1 text-xs font-bold leading-none text-emerald-700",children:["-",h,"%"]}):null]}),r.jsx("div",{class:"flex items-baseline gap-2 flex-wrap",children:r.jsxs("span",{class:"text-[26px] leading-tight whitespace-nowrap text-gray-800 font-medium",children:[r.jsx("span",{class:"opacity-90",children:g})," ",m,r.jsxs("span",{class:"text-sm font-normal text-gray-500",children:[" ","/ ",ae(o,i)]})]})}),o.description?r.jsx("span",{class:"mt-1 text-xs leading-relaxed text-gray-500",children:o.description}):null,o.trial_days?r.jsx("span",{class:"mt-1 text-xs font-medium text-[var(--pw-accent)]",children:i("pricing.free_trial_days","{days}-day free trial",{days:o.trial_days})}):null]}),p?r.jsx("span",{class:"absolute -top-[9px] -right-[6px] rounded-[11px] border-[5px] border-white px-2 py-1 text-[12px] font-semibold text-white",style:{background:"var(--pw-accent)"},children:s}):null]},o.id)})})}function Lt(t,e){return t.label?t.label:!t.interval||t.interval==="lifetime"?e("pricing.interval.lifetime_short","lifetime"):e(`pricing.interval.${t.interval}`,t.interval)}function Et({price:t,isLast:e,isPopular:i,popularLabel:a,offer:n,selected:s,onSelect:o,t:l}){const p=n?.discount_percent??null,{currency:c,amount:h,originalAmount:g}=ne(t,p);return r.jsxs("button",{type:"button",role:"radio","aria-checked":s,onClick:o,class:"group relative inline-flex w-full max-w-[360px] mx-auto items-center justify-between gap-4 px-4 pt-3.5 text-left focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--pw-accent)]",children:[r.jsx("span",{class:["flex h-6 w-6 flex-shrink-0 items-center justify-center rounded-full border transition-colors mb-3",s?"border-[var(--pw-accent)] text-white":"border-gray-300 bg-transparent text-transparent"].join(" "),style:s?{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%)"}:void 0,"aria-hidden":"true",children:r.jsx("svg",{width:"14",height:"10",viewBox:"0 0 17 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:s?"opacity-100":"opacity-0",children:r.jsx("path",{d:"M16.5234 0.476562C16.9805 0.898438 16.9805 1.63672 16.5234 2.05859L7.52344 11.0586C7.10156 11.5156 6.36328 11.5156 5.94141 11.0586L1.44141 6.55859C0.984375 6.13672 0.984375 5.39844 1.44141 4.97656C1.86328 4.51953 2.60156 4.51953 3.02344 4.97656L6.75 8.66797L14.9414 0.476562C15.3633 0.0195312 16.1016 0.0195312 16.5234 0.476562Z",fill:"currentColor"})})}),r.jsxs("div",{class:["flex flex-1 items-center gap-1.5 pb-3.5",e?"":"border-b border-gray-200"].join(" "),children:[r.jsxs("div",{class:"flex flex-wrap items-center gap-1 gap-x-1.5",children:[r.jsx("span",{class:"text-base font-normal capitalize text-gray-800",children:Lt(t,l)}),i?r.jsx("span",{class:"rounded-[9px] px-2 py-1 text-[10px] font-bold",style:{background:"linear-gradient(160deg, color-mix(in srgb, var(--pw-accent) 6%, white) 0%, color-mix(in srgb, var(--pw-accent) 15%, white) 100%)",color:"var(--pw-accent)"},children:a}):null,p?r.jsxs("span",{class:"rounded-md bg-emerald-100 px-1.5 py-0.5 text-[10px] font-bold leading-none text-emerald-700",children:["-",p,"%"]}):null]}),r.jsx("div",{class:"flex-1"}),r.jsxs("span",{class:"flex items-baseline gap-1.5 text-base font-normal text-gray-600",children:[g?r.jsx("span",{class:"text-xs text-gray-400 line-through decoration-gray-400 decoration-[1.5px]",children:g}):null,r.jsxs("span",{class:"whitespace-nowrap",children:[r.jsx("span",{class:"opacity-90",children:c}),h,r.jsxs("span",{class:"text-xs text-gray-400",children:[" ","/ ",ae(t,l)]})]})]})]})]})}function Tt({price:t,isPopular:e,popularLabel:i,offer:a,selected:n,onSelect:s,t:o}){const l=a?.discount_percent??null,{currency:p,amount:c,originalAmount:h}=ne(t,l);return r.jsxs("button",{type:"button",role:"radio","aria-checked":n,onClick:s,class:["group relative flex h-full flex-col items-center justify-start gap-1 rounded-2xl border-2 px-3 pb-4 pt-3.5 text-center transition-colors duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[var(--pw-accent)]",n?"border-[var(--pw-accent)]":"border-gray-200 hover:bg-gray-50"].join(" "),style:n?{background:"color-mix(in srgb, var(--pw-accent) 6%, transparent)"}:void 0,children:[r.jsx("span",{class:"flex min-h-[2.4em] items-center text-[11px] font-normal uppercase leading-tight text-gray-800/70",children:Me(t,o)}),r.jsxs("div",{class:"flex h-[22px] items-center justify-center gap-1.5",children:[h?r.jsx("span",{class:"text-[12px] text-gray-400 line-through decoration-gray-400 decoration-[1.5px]",children:h}):null,l?r.jsxs("span",{class:"rounded-md bg-emerald-100 px-1.5 py-0.5 text-[10px] font-bold leading-none text-emerald-700",children:["-",l,"%"]}):null]}),r.jsxs("span",{class:"text-[26px] leading-none whitespace-nowrap text-gray-800 font-medium",children:[r.jsx("span",{class:"opacity-90",children:p}),c]}),r.jsxs("span",{class:"text-xs font-normal text-gray-500",children:["/ ",ae(t,o)]}),t.trial_days?r.jsx("span",{class:"mt-1 text-[11px] font-medium text-[var(--pw-accent)]",children:o("pricing.free_trial_days","{days}-day free trial",{days:t.trial_days})}):null,e?r.jsx("span",{class:"absolute -top-[10px] left-1/2 -translate-x-1/2 whitespace-nowrap rounded-[11px] border-[3px] border-white px-2.5 py-0.5 text-[10px] font-semibold uppercase tracking-wider text-white",style:{background:"var(--pw-accent)"},children:i}):null]})}function zt({block:t}){return r.jsx("p",{class:"text-[0.9375rem] leading-relaxed text-gray-600",children:t.text})}const Bt={week:.25,month:1,year:12};function Rt(t,e){return t?e(`pricing.interval.${t}`,t):e("pricing.interval.period","period")}function Ot({block:t,ctx:e}){const{t:i}=b();if(!t.queries.length)return null;const n=e.bootstrap.prices.find(o=>o.id===e.selectedPriceId)?.interval??null,s=n?Bt[n]:void 0;return r.jsxs("div",{class:"flex flex-col gap-2",children:[r.jsx("div",{class:"text-sm font-semibold text-gray-800",children:i("pricing.included_per","Included per {interval}:",{interval:Rt(n,i)})}),r.jsx("ul",{class:"flex flex-col gap-2",role:"list",children:t.queries.map(o=>{const l=Number.isFinite(o.count)?o.count:0,p=s!==void 0?Math.round(l*s):l;return r.jsxs("li",{class:`flex gap-3 ${o.desc?"items-start":"items-center"}`,children:[r.jsx("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",class:`flex-shrink-0 text-emerald-500 ${o.desc?"mt-0.5":""}`,"aria-hidden":"true",children:r.jsx("path",{d:"M4 10.5l3.5 3.5 8.5-8.5",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"})}),r.jsxs("div",{children:[r.jsx("span",{class:"font-semibold text-gray-900 text-sm",children:p})," ",r.jsx("span",{class:"text-sm text-gray-800",children:o.name}),o.desc?r.jsxs(r.Fragment,{children:[r.jsx("br",{}),r.jsx("span",{class:"text-xs text-gray-400",children:o.desc})]}):null]})]},o.id)})})]})}const Le={heading:Pt,text:zt,price_grid:Mt,cta_button:bt,auth_panel:_e,current_session:vt,features_list:yt,tokenization_gate:Ot,guarantee_badge:kt,offer_banner:lt};function Ft({layout:t,bootstrap:e,onAction:i,auth:a,authSession:n}){const s=u.useMemo(()=>{for(const d of t.blocks)if(d.type==="price_grid"&&d.popular_price_id&&e.prices.some(w=>w.id===d.popular_price_id))return d.popular_price_id;return e.prices[0]?.id??null},[t.blocks,e.prices]),[o,l]=u.useState(s),p={bootstrap:e,selectedPriceId:o,setSelectedPriceId:l,onAction:i,auth:a,authSession:n},c=t.blocks.findIndex(d=>d.type==="cta_button"),h=c===-1?t.blocks:t.blocks.slice(0,c),g=c===-1?[]:t.blocks.slice(c),m=(d,w)=>{const v=Le[d.type];return v?r.jsx(v,{block:d,ctx:p},`${d.type}-${w}`):(typeof console<"u"&&console.warn(`[paywall] unknown block type: ${d.type}`),null)};return r.jsxs(r.Fragment,{children:[r.jsx("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:r.jsx("div",{class:"flex flex-col gap-6",children:h.map(m)})}),g.length>0?r.jsx("div",{class:"flex flex-col gap-4 bg-white px-6 pb-6 pt-3 sm:px-8",style:{boxShadow:"0 -4px 12px -4px rgba(15,23,42,0.06)"},children:g.map((d,w)=>m(d,h.length+w))}):null]})}function Ut(t,e,i,a){return t?a?{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}:i.kind==="support"?{open:!0,view:"support",error:null}:i.kind==="auth_gate"?{open:!0,view:"auth",error:null}:i.kind==="anon_gate"?{open:!0,view:"anon",error:null}:i.kind==="awaiting_payment"?{open:!0,view:"awaiting_payment",error:null}:i.kind==="popup_blocked"?{open:!0,view:"popup_blocked",error:null}:i.kind==="purchase_success"?{open:!0,view:"purchased",error:null}:i.kind==="verifying"?{open:!0,view:"loading",error:null}:{open:!0,view:"layout",error:null}:{open:!1,view:null,error:null}}function qt(t,e){return t.open===e.open&&t.view===e.view&&t.error===e.error}function Dt({client:t,open:e,onClose:i,onEvent:a,initialView:n,purchased:s,renew:o,onState:l,inline:p}){const[c,h]=u.useState({status:"idle"}),[g,m]=u.useState(()=>t.auth?.getCachedSession()??null),[d,w]=u.useState(()=>n==="support"?{kind:"support",origin:"standalone"}:n==="auth"?{kind:"auth_gate",origin:"standalone"}:n==="anon"?{kind:"anon_gate",origin:"standalone"}:{kind:"layout"}),v=u.useRef(!1),z=u.useRef(null);u.useEffect(()=>{if(!l)return;const x=Ut(e,c,d,s),f=z.current;f&&qt(f,x)||(z.current=x,l(x))},[e,c,d,s,l]),u.useEffect(()=>{if(t.auth)return t.auth.onAuthChange((x,f)=>m(f))},[t.auth]),u.useEffect(()=>{if(typeof t.onBootstrapChange=="function")return t.onBootstrapChange(x=>{h(f=>f.status==="ready"?{status:"ready",data:x}:f)})},[t]),u.useEffect(()=>{if(!e||c.status==="ready"||c.status==="loading")return;let x=!1;return h({status:"loading"}),t.bootstrap().then(f=>{x||(h({status:"ready",data:f}),a("ready",f),f.user?.has_active_subscription&&!o&&(a("purchase_completed",{priceId:null,sessionId:null,restored:!0}),w({kind:"purchase_success",restored:!0})))}).catch(f=>{if(x)return;const k=f instanceof M.PaywallError?f:new M.PaywallError("unknown","Failed to load paywall",{cause:f});h({status:"error",error:k}),a("error",k)}),()=>{x=!0}},[e,t]),u.useLayoutEffect(()=>{if(!e){w({kind:"layout"}),v.current=!1;return}n==="support"?w({kind:"support",origin:"standalone"}):n==="auth"?w({kind:"auth_gate",origin:"standalone"}):n==="anon"&&w({kind:"anon_gate",origin:"standalone"})},[e,n]);const A=async x=>{try{const f=await t.createCheckout({priceId:x,ignoreActivePurchase:o===!0});if(a("checkout_started",{priceId:x,url:f.url,acquiring:f.acquiring}),typeof window>"u"||!f.url)return;const k=window.open(f.url,"_blank");if(k){try{k.opener=null}catch{}w({kind:"awaiting_payment",priceId:x,url:f.url})}else w({kind:"popup_blocked",priceId:x,url:f.url})}catch(f){if(f instanceof M.PaywallError&&f.code==="already_purchased"){try{await t.getUser({force:!0})}catch{}a("purchase_completed",{priceId:x,sessionId:null,restored:!0}),w({kind:"purchase_success",restored:!0});return}const k=f instanceof M.PaywallError?f:new M.PaywallError("checkout_failed","Checkout failed",{cause:f});a("error",k),w({kind:"layout"})}},y=(x,f)=>{if(typeof window>"u")return;const k=window.open(f,"_blank");if(k){try{k.opener=null}catch{}w({kind:"awaiting_payment",priceId:x,url:f})}};u.useEffect(()=>{if(d.kind!=="auth_gate"||!g||g.user.is_anonymous||v.current)return;v.current=!0;const x=d.pendingCheckout,f=d.origin;w({kind:"verifying"}),(async()=>{if(!o)try{if((await t.getUser({force:!0})).has_active_subscription){a("purchase_completed",{priceId:x?.priceId??null,sessionId:null,restored:!0}),w({kind:"purchase_success",restored:!0});return}}catch{}if(!x){f==="standalone"?i():w({kind:"layout"});return}await A(x.priceId)})().finally(()=>{v.current=!1})},[g,d]);const C=async(x,f)=>{if(x==="close"){i();return}if(x==="price_selected"){a("price_selected",f);return}if(x==="restore"){if(!t.auth)return;const k=t.auth.getCachedSession();if(k&&!k.user.is_anonymous)return;w({kind:"auth_gate",intent:"restore"});return}if(x==="support"){w({kind:"support",origin:"layout"});return}if(x==="checkout"&&c.status==="ready"){const k=f?.priceId;if(!k){a("error",new M.PaywallError("no_price","No price selected"));return}const $=c.data.settings.checkout_mode??"guest",_=t.auth?.getCachedSession()??null,P=!!_&&!_.user.is_anonymous;if($==="preauth"&&!!t.auth&&!P){w({kind:"auth_gate",pendingCheckout:{priceId:k}});return}await A(k)}},j=c.status==="ready"?c.data.settings.brand_color:null,E=c.status==="ready"?c.data.settings.allow_close!==!1:!0,L=d.kind==="layout"&&c.status==="ready"?Se(c.data.offers):null,O=L?r.jsx(ct,{offer:L}):null,B={type:"auth_panel",allow_signup:!0,allow_password_reset:!0,hide_when_authenticated:!1,providers:c.status==="ready"?c.data.settings.auth_providers:void 0},R=d.kind==="support"?r.jsx(ut,{client:t,authSession:g,origin:d.origin,onBack:()=>{d.origin==="standalone"?i():w({kind:"layout"})}}):null,I=d.kind==="auth_gate"&&d.origin!=="standalone"||d.kind==="support",S=c.status==="ready"?c.data:null;return r.jsx(Ne,{bootstrap:S,children:r.jsx(Ve,{open:e,onClose:i,brandColor:j,topBanner:O,allowClose:E,hideCloseButton:I,inline:p,labelledBy:"pw-title",children:s?r.jsx(xe,{onContinue:i}):d.kind==="purchase_success"?r.jsx(xe,{restored:d.restored,onContinue:i}):R||(c.status==="loading"||c.status==="idle"||d.kind==="verifying"?r.jsx(Nt,{verifying:d.kind==="verifying"}):c.status==="error"?r.jsx(Vt,{message:c.error.message}):d.kind==="auth_gate"&&t.auth?r.jsx(it,{block:B,bootstrap:c.data,auth:t.auth,authSession:g,showBack:d.origin!=="standalone",intent:d.intent??(d.origin==="standalone"?"standalone":"preauth"),onBack:()=>{d.origin==="standalone"?i():w({kind:"layout"})}}):d.kind==="anon_gate"&&t.auth?r.jsx(at,{auth:t.auth,onSuccess:()=>{d.origin==="standalone"?i():w({kind:"layout"})},onBack:d.origin==="standalone"?void 0:()=>w({kind:"layout"})}):d.kind==="awaiting_payment"?r.jsx(Ht,{client:t,onBack:()=>w({kind:"layout"}),onReopen:()=>{if(typeof window>"u")return;const x=window.open(d.url,"_blank");if(x)try{x.opener=null}catch{}},onRetry:()=>A(d.priceId)}):d.kind==="popup_blocked"?r.jsx($t,{onReopen:()=>y(d.priceId,d.url)}):r.jsx(Ft,{layout:c.data.layout,bootstrap:c.data,onAction:C,auth:t.auth,authSession:g}))})})}function Nt({verifying:t}){const{t:e}=b();return r.jsxs("div",{class:"flex flex-col items-center justify-center gap-3 py-12",children:[r.jsx("span",{class:"inline-block h-7 w-7 animate-spin rounded-full border-[2.5px] border-gray-200 border-t-[var(--pw-accent)]"}),r.jsx("span",{class:"text-xs font-medium tracking-wide text-gray-500",children:t?e("modal.verifying_subscription","Checking your subscription…"):e("modal.loading","Loading…")})]})}function Vt({message:t}){const{t:e}=b();return r.jsxs("div",{class:"flex flex-col items-center gap-2 py-8 text-center",children:[r.jsx("div",{class:"flex h-11 w-11 items-center justify-center rounded-full bg-red-50",children:r.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:[r.jsx("path",{d:"M10 6v5M10 14h.01",stroke:"#dc2626","stroke-width":"2","stroke-linecap":"round"}),r.jsx("circle",{cx:"10",cy:"10",r:"8",stroke:"#dc2626","stroke-width":"1.75"})]})}),r.jsx("p",{class:"text-sm font-semibold tracking-tight text-gray-900",children:e("modal.error_generic","Something went wrong")}),r.jsx("p",{class:"text-xs leading-relaxed text-gray-500",children:t})]})}function $t({onReopen:t}){const{t:e}=b();return r.jsxs("div",{class:"flex flex-col items-center gap-3 py-8 text-center",children:[r.jsx("div",{class:"flex h-11 w-11 items-center justify-center rounded-full",style:{background:"color-mix(in srgb, var(--pw-accent) 12%, white)",color:"var(--pw-accent)"},"aria-hidden":"true",children:r.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:[r.jsx("path",{d:"M4 5h12v10H4z",stroke:"currentColor","stroke-width":"1.75","stroke-linejoin":"round"}),r.jsx("path",{d:"M7 9l3 3 4-5",stroke:"currentColor","stroke-width":"1.75","stroke-linecap":"round","stroke-linejoin":"round"})]})}),r.jsx("p",{class:"text-sm font-semibold tracking-tight text-gray-900",children:e("payment.popup_blocked_title","Allow popups to continue")}),r.jsx("p",{class:"max-w-[18rem] text-xs leading-relaxed text-gray-500",children:e("payment.popup_blocked_message","Your browser blocked the checkout tab. Click below to open it.")}),r.jsx("button",{type:"button",onClick:t,class:"mt-1 rounded-xl px-4 py-2 text-xs 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)]",style:{background:"linear-gradient(180deg, color-mix(in srgb, var(--pw-accent) 92%, white), var(--pw-accent))",boxShadow:"0 1px 2px rgba(15,23,42,0.08), 0 6px 14px -4px color-mix(in srgb, var(--pw-accent) 50%, transparent)"},children:e("payment.open_checkout_button","Open checkout")})]})}function Ht({client:t,onBack:e,onReopen:i,onRetry:a}){const{t:n}=b(),[s,o]=u.useState(!1),[l,p]=u.useState(!1),c=u.useRef(null);u.useEffect(()=>()=>{c.current!==null&&clearTimeout(c.current)},[]);const h=async()=>{if(!s){o(!0),p(!1);try{if((await t.getUser({force:!0})).has_active_subscription){typeof window<"u"&&window.postMessage({type:"paywall_purchase"},"*");return}p(!0),c.current!==null&&clearTimeout(c.current),c.current=setTimeout(()=>{p(!1),c.current=null},5e3)}catch{p(!0)}finally{o(!1)}}};return r.jsxs("div",{class:"flex flex-col gap-3",children:[r.jsx("button",{type:"button",onClick:e,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)]",children:n("nav.back","← Back")}),r.jsxs("div",{class:"flex flex-col items-center gap-3 py-6 text-center",children:[r.jsxs("div",{class:"relative flex h-12 w-12 items-center justify-center",children:[r.jsx("span",{class:"absolute inset-0 animate-ping rounded-full opacity-40",style:{background:"color-mix(in srgb, var(--pw-accent) 30%, transparent)"},"aria-hidden":"true"}),r.jsx("span",{class:"relative inline-block h-7 w-7 animate-spin rounded-full border-[2.5px] border-gray-200 border-t-[var(--pw-accent)]"})]}),r.jsx("p",{class:"text-sm font-semibold tracking-tight text-gray-900",children:n("payment.awaiting_title","Complete payment in the new tab")}),r.jsx("p",{class:"max-w-[20rem] text-xs leading-relaxed text-gray-500",children:n("payment.awaiting_subtitle","We'll detect your payment automatically — or click below once you're done.")}),r.jsx("button",{type:"button",onClick:h,disabled:s,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)]",style:{background:"linear-gradient(180deg, color-mix(in srgb, var(--pw-accent) 92%, white), var(--pw-accent))",boxShadow:"0 1px 2px rgba(15,23,42,0.08), 0 6px 14px -4px color-mix(in srgb, var(--pw-accent) 50%, transparent)"},children:s?n("payment.checking","Checking…"):n("payment.ive_paid","I've paid")}),l?r.jsx("p",{class:"text-xs leading-relaxed text-gray-500",children:n("payment.still_processing","Payment is still being processed. Please try again in a moment.")}):null]}),r.jsxs("div",{class:"rounded-2xl border border-gray-200 bg-gray-50/60 p-3.5",children:[r.jsx("p",{class:"text-xs leading-relaxed text-gray-600",children:n("payment.popup_help_text","Checkout window didn't open or got blocked? Click here to open it again.")}),r.jsx("button",{type:"button",onClick:i,class:"mt-2.5 w-full rounded-xl border border-gray-200 bg-white px-3 py-2 text-xs font-semibold text-gray-700 transition-colors hover:border-gray-300 hover:bg-gray-50 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]",children:n("payment.open_checkout_again","Open checkout again")})]}),r.jsx("button",{type:"button",onClick:a,class:"self-center rounded-md px-2 py-1 text-xs text-gray-500 underline-offset-2 hover:text-gray-900 hover:underline focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]",children:n("payment.tab_closed_retry","Tab closed? Try again")})]})}function xe({onContinue:t,restored:e=!1}){const{t:i}=b();return r.jsxs("div",{class:"flex flex-col items-center gap-3 py-8 text-center",children:[r.jsx("div",{class:"flex h-14 w-14 items-center justify-center rounded-full ring-8",style:{background:"linear-gradient(135deg, #4ade80, #16a34a)",color:"#fff",boxShadow:"0 0 0 8px rgba(74,222,128,0.12), 0 8px 20px -6px rgba(22,163,74,0.45)"},"aria-hidden":"true",children:r.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",children:r.jsx("path",{d:"M5 13l4 4L19 7",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"})})}),r.jsx("p",{id:"pw-title",class:"mt-1 text-lg font-semibold tracking-tight text-gray-900",children:e?i("modal.purchase_restored_title","Subscription restored"):i("modal.purchase_success_title","Payment received")}),r.jsx("p",{class:"text-sm leading-relaxed text-gray-500",children:e?i("modal.purchase_restored_subtitle","Welcome back — your subscription is already active."):i("modal.purchase_success_subtitle","Your subscription is now active.")}),r.jsx("button",{type:"button",onClick:t,class:"mt-3 rounded-xl px-5 py-2.5 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)]",style:{background:"linear-gradient(180deg, color-mix(in srgb, var(--pw-accent) 92%, white), var(--pw-accent))",boxShadow:"0 1px 2px rgba(15,23,42,0.08), 0 8px 20px -6px color-mix(in srgb, var(--pw-accent) 50%, transparent)"},children:i("modal.continue","Continue")})]})}const Gt=10*6e4,Wt=5e3,Zt=3e4;class Kt{constructor(e){this.timer=null,this.timeoutTimer=null,this.visibilityHandler=null,this.focusHandler=null,this.messageHandler=null,this.stopped=!1,this.checking=!1,this.opts={client:e.client,onActive:e.onActive,onTimeout:e.onTimeout??(()=>{}),timeoutMs:e.timeoutMs??Gt,visibleIntervalMs:e.visibleIntervalMs??Wt,hiddenIntervalMs:e.hiddenIntervalMs??Zt}}start(){this.stopped||typeof document>"u"||typeof window>"u"||(this.check(),this.scheduleNext(),this.visibilityHandler=()=>this.handleVisibilityChange(),document.addEventListener("visibilitychange",this.visibilityHandler),this.focusHandler=()=>void this.check(),window.addEventListener("focus",this.focusHandler),this.messageHandler=e=>this.handleMessage(e),window.addEventListener("message",this.messageHandler),this.timeoutTimer=setTimeout(()=>{this.stopped||(this.stop(),this.opts.onTimeout())},this.opts.timeoutMs))}stop(){this.stopped=!0,this.timer!==null&&clearTimeout(this.timer),this.timer=null,this.timeoutTimer!==null&&clearTimeout(this.timeoutTimer),this.timeoutTimer=null,typeof document<"u"&&this.visibilityHandler&&document.removeEventListener("visibilitychange",this.visibilityHandler),typeof window<"u"&&(this.focusHandler&&window.removeEventListener("focus",this.focusHandler),this.messageHandler&&window.removeEventListener("message",this.messageHandler)),this.visibilityHandler=null,this.focusHandler=null,this.messageHandler=null}async check(){if(!(this.stopped||this.checking)){this.checking=!0;try{const e=await this.opts.client.getUser({force:!0});if(this.stopped)return;e.has_active_subscription&&(this.stop(),this.opts.onActive(e))}catch{}finally{this.checking=!1}}}scheduleNext(){if(this.stopped)return;const i=typeof document<"u"&&document.visibilityState==="visible"?this.opts.visibleIntervalMs:this.opts.hiddenIntervalMs;this.timer=setTimeout(async()=>{await this.check(),this.scheduleNext()},i)}handleVisibilityChange(){typeof document>"u"||(document.visibilityState==="visible"&&this.check(),this.timer!==null&&(clearTimeout(this.timer),this.timer=null),this.scheduleNext())}handleMessage(e){const i=e.data;!i||typeof i!="object"||i.type==="paywall_purchase"&&this.check()}}function Yt(){return!(typeof document>"u"||typeof window>"u"||typeof location<"u"&&location.protocol==="chrome-extension:")}const ie={open:!1,view:null,error:null},U={status:"paywall_status",priceId:"paywall_price_id",sessionId:"paywall_session_id"};class Xt{constructor(e){this.handle=null,this.isOpen=!1,this.listeners=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=new Set;const{auth:i,ownsAuth:a}=Jt(e);this.auth=i,this.ownsAuth=a,this.billing=e.client??new M.BillingClient({...e,auth:this.auth}),this.host=e.host,this.shadowMode=e.shadowMode??"closed",this.mountThenLoad=e.mountThenLoad??!0,this.inline=e.inline===!0,this.userUnsub=this.billing.onUserChange(n=>{this.emit("userChange",n)}),this.auth&&(this.authUnsub=this.auth.onAuthChange((n,s)=>{this.emit("authChange",{event:n,session:s})})),this.initTracker(e.analytics),e.autoDetectReturn!==!1&&typeof window<"u"&&queueMicrotask(()=>this.checkReturn())}initTracker(e){if(e===!1)return;const i=typeof e=="object"&&e!==null?e:{};if(i.enabled===!1)return;const a=i.endpoint??`${this.billing.apiOrigin}/api/v1/paywall/${this.billing.paywallId}/events`;this.tracker=new M.EventTracker({endpoint:a,paywallId:this.billing.paywallId,capabilities:this.billing.capabilities,getVisitorId:()=>this.billing.getVisitorId(),getCachedVisitorId:()=>this.billing.getCachedVisitorId(),getUserId:()=>this.billing.getIdentity()?.userId??null,flushIntervalMs:i.flushIntervalMs,maxBufferSize:i.maxBufferSize,fetch:i.fetch,sendBeacon:i.sendBeacon}),this.on("open",()=>this.tracker?.track("paywall_opened")),this.on("ready",n=>this.tracker?.track("paywall_viewed",{is_test_mode:n.settings.is_test_mode,prices_count:n.prices.length,offers_count:n.offers.length})),this.on("price_selected",n=>this.tracker?.track("price_selected",{price_id:n.priceId})),this.on("checkout_started",n=>this.tracker?.track("checkout_started",{price_id:n.priceId,acquiring:n.acquiring})),this.on("purchase_completed",n=>this.tracker?.track("purchase_completed",{price_id:n.priceId,session_id:n.sessionId})),this.on("purchase_failed",n=>this.tracker?.track("purchase_failed",{reason:n.reason})),this.on("close",()=>this.tracker?.track("paywall_closed")),this.on("trial_blocked",n=>this.tracker?.track("trial_blocked",{mode:n.mode,...n.mode==="time"?{remaining_ms:n.remainingMs,total_ms:n.totalMs}:n.mode==="opens"?{remaining_actions:n.remainingActions,total_actions:n.totalActions}:{}})),this.on("trial_expired",()=>this.tracker?.track("trial_expired")),this.on("visibility_blocked",n=>this.tracker?.track("visibility_blocked",{reason:n.reason,country:n.country,tier:n.tier})),this.on("error",n=>this.tracker?.track("error",{code:n.code,message:n.message}))}track(e,i){this.tracker?.track(e,i)}onUserChange(e){return this.on("userChange",e)}setBootstrap(e){this.billing.setBootstrap(e)}on(e,i){let a=this.listeners.get(e);return a||(a=new Set,this.listeners.set(e,a)),a.add(i),()=>a.delete(i)}off(e,i){this.listeners.get(e)?.delete(i)}emit(e,...i){const a=this.listeners.get(e);if(!a)return;const n=i[0];for(const s of a)try{s(n)}catch(o){typeof console<"u"&&console.error("[paywall] listener error",o)}}open(e={}){this.openInternal("layout",e)}async preload(e={}){try{await this.billing.bootstrap({signal:e.signal}),this.billing.auth&&await this.billing.getBalances({signal:e.signal})}catch{}}openSupport(e={}){this.openInternal("support",e)}openAuth(e={}){this.auth&&this.openInternal("auth",{...e,skipTrial:!0})}openAnonGate(e={}){this.auth&&this.openInternal("anon",{...e,skipTrial:!0,skipVisibility:!0})}openInternal(e,i){i.identity&&this.billing.setIdentity(i.identity),this.purchased=!1;const a=i.skipTrial===!0||e==="support",n=i.skipVisibility===!0||e==="support"||e==="auth"||e==="anon",s=i.renew===!0;if(a&&n){this.mountAndShow(e,{renew:s});return}const o=this.billing.getCachedBootstrap();if(o){this.runOpenGates(e,o,{skipTrial:a,skipVisibility:n,renew:s});return}if(this.mountThenLoad){this.mountAndShow(e,{renew:s}),this.billing.bootstrap().then(l=>this.runDelayedGates(l,{skipTrial:a,skipVisibility:n})).catch(()=>{});return}this.billing.bootstrap().then(l=>this.runOpenGates(e,l,{skipTrial:a,skipVisibility:n,renew:s})).catch(()=>{this.mountAndShow(e,{renew:s})})}runDelayedGates(e,i){if(!this.isOpen)return;if(!i.skipVisibility){const s=e.settings.visibility;if(s&&(this.lastVisibility=s,!s.visible)){this.close(),this.emit("visibility_blocked",s);return}}if(i.skipTrial)return;const a=e.settings.trial;if(!a)return;const n=this.ensureTrialStore(a);n.check().then(async s=>{if(this.isOpen&&(this.lastTrialStatus=s,s.mode!=="none")){if(s.blocked){const o=await n.recordBlock();if(this.lastTrialStatus=o,!this.isOpen)return;this.close(),this.emit("trial_blocked",o);return}this.trialExpiredFired||(this.trialExpiredFired=!0,this.emit("trial_expired"))}}).catch(s=>{typeof console<"u"&&console.warn("[paywall] trial check failed",s)})}runOpenGates(e,i,a){if(!a.skipVisibility){const n=i.settings.visibility;if(n&&(this.lastVisibility=n,!n.visible)){this.emit("visibility_blocked",n);return}}if(a.skipTrial){this.mountAndShow(e,{renew:a.renew});return}this.gateThroughTrial(e,i,a.renew)}gateThroughTrial(e,i,a){const n=i.settings.trial;if(!n){this.mountAndShow(e,{renew:a});return}const s=this.ensureTrialStore(n);s.check().then(async o=>{if(this.lastTrialStatus=o,o.mode==="none"){this.mountAndShow(e,{renew:a});return}if(o.blocked){const l=await s.recordBlock();this.lastTrialStatus=l,this.emit("trial_blocked",l);return}this.trialExpiredFired||(this.trialExpiredFired=!0,this.emit("trial_expired")),this.mountAndShow(e,{renew:a})}).catch(o=>{typeof console<"u"&&console.warn("[paywall] trial check failed",o),this.mountAndShow(e,{renew:a})})}ensureTrialStore(e){if(this.trialStore&&this.trialStoreConfig&&tr(this.trialStoreConfig,e))return this.trialStore;this.trialStoreConfig=e;const i=this.billing.createTrialStore;return this.trialStore=typeof i=="function"?i.call(this.billing,e):Te(this.billing.getStorage(),this.billing.paywallId,e),this.trialStore}mountAndShow(e,i={}){const a=i.renew===!0;if(this.handle){this.isOpen=!0,this.handle.update({open:!0,initialView:e,purchased:!1,renew:a}),this.emit("open");return}this.isOpen=!0,this.handle=Be(Dt,{client:this.billing,open:!0,initialView:e,purchased:!1,renew:a,onClose:()=>this.close(),onEvent:(n,s)=>{this.emit(n,s),n==="checkout_started"&&this.startUserWatcher()},onState:n=>this.applyState(n),inline:this.inline},{host:this.host,shadowMode:this.shadowMode,inline:this.inline}),this.emit("open")}applyState(e){if(!er(this.currentState,e)){this.currentState=e;for(const i of this.stateListeners)try{i(e)}catch(a){console.warn("[paywall] onStateChange listener threw",a)}}}getState(){return this.currentState}onStateChange(e,i={}){this.stateListeners.add(e);const a=i.immediate??"microtask";if(a!=="none"){const n=this.currentState;if(a==="sync")try{e(n)}catch(s){console.warn("[paywall] onStateChange initial sync threw",s)}else queueMicrotask(()=>{this.stateListeners.has(e)&&e(n)})}return()=>{this.stateListeners.delete(e)}}getTrialStatus(){return this.lastTrialStatus}getVisibility(){return this.lastVisibility}getPrices(e={}){return this.billing.getPrices(e)}getCachedPrices(){return this.billing.getCachedPrices()}getUserLanguage(){return this.billing.getUserLanguage()}async getAccess(e={}){let i=this.billing.getCachedBootstrap();if(!i)try{i=await this.billing.bootstrap({signal:e.signal})}catch{const o=this.billing.getCachedUser();return o?.has_active_subscription?{access:"granted",reason:"has_subscription",visibility:null,trial:null,user:o}:{access:"blocked",reason:"no_subscription",visibility:null,trial:null,user:o}}const a=i.user??null;if(a?.has_active_subscription)return{access:"granted",reason:"has_subscription",visibility:i.settings.visibility??null,trial:null,user:a};let n=null;if(!e.skipVisibility){const o=i.settings.visibility;if(o&&(n=o,this.lastVisibility=o,!o.visible))return{access:"granted",reason:"visibility_blocked",visibility:n,trial:null,user:a}}let s=null;if(!e.skipTrial){const o=i.settings.trial;if(o)try{if(s=await this.ensureTrialStore(o).check(),this.lastTrialStatus=s,s.blocked)return{access:"granted",reason:"trial_blocked",visibility:n,trial:s,user:a}}catch(l){typeof console<"u"&&console.warn("[paywall] getAccess: trial check failed",l)}}return{access:"blocked",reason:"no_subscription",visibility:n,trial:s,user:a}}async resetTrial(){this.trialStore&&(await this.trialStore.reset(),this.lastTrialStatus=null,this.trialExpiredFired=!1)}startUserWatcher(){this.watcher||Yt()&&(this.watcher=new Kt({client:this.billing,onActive:e=>{this.watcher=null,this.emit("purchase_completed",{priceId:null,sessionId:null});const i=this.billing.getCachedBootstrap()?.settings.success_redirect_url;if(i&&typeof window<"u")try{window.location.assign(i);return}catch{}this.isOpen&&this.handle&&(this.purchased=!0,this.handle.update({purchased:!0}))},onTimeout:()=>{this.watcher=null}}),this.watcher.start())}close(){!this.isOpen||!this.handle||(this.isOpen=!1,this.purchased=!1,this.handle.update({open:!1,purchased:!1}),this.applyState(ie),this.emit("close"))}checkReturn(){if(typeof window>"u")return;const e=new URL(window.location.href),i=we(e.hash.replace(/^#/,"")),a=we(e.search.replace(/^\?/,"")),n=i??a;n&&(n.status==="paid"?(this.emit("purchase_completed",{priceId:n.priceId,sessionId:n.sessionId}),rr(n)):(n.status==="failed"||n.status==="cancelled")&&this.emit("purchase_failed",{reason:n.status}),ir(e))}destroy(){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}}function Jt(t){if(!t.auth)return{auth:void 0,ownsAuth:!1};if(t.auth instanceof M.AuthClient||Qt(t.auth))return{auth:t.auth,ownsAuth:!1};const e=t.auth===!0?{}:t.auth;return{auth:new M.AuthClient({paywallId:t.paywallId,apiOrigin:e.apiOrigin??t.apiOrigin,storage:e.storage??t.storage,fetch:e.fetch??t.fetch,openPopup:e.openPopup}),ownsAuth:!0}}function Qt(t){if(typeof t!="object"||t===null)return!1;const e=t;return typeof e.onAuthChange=="function"&&typeof e.getCachedSession=="function"&&typeof e.signOut=="function"}function er(t,e){return t.open===e.open&&t.view===e.view&&t.error===e.error}function tr(t,e){return t.mode===e.mode&&t.payload===e.payload&&t.storage===e.storage}function we(t){if(!t)return null;const e=new URLSearchParams(t),i=e.get(U.status);return i?{status:i,priceId:e.get(U.priceId),sessionId:e.get(U.sessionId)}:null}function rr(t){if(!(typeof window>"u"||!window.opener))try{window.opener.postMessage({type:"paywall_purchase",status:t.status,priceId:t.priceId,sessionId:t.sessionId},"*")}catch{}}function ir(t){const e=(a,n)=>{if(!a)return"";const s=new URLSearchParams(a.replace(/^[?#]/,""));s.delete(U.status),s.delete(U.priceId),s.delete(U.sessionId);const o=s.toString();return o?n+o:""},i=t.pathname+e(t.search,"?")+e(t.hash,"#");window.history.replaceState(null,"",i)}exports.PaywallUI=Xt;exports.blockRegistry=Le;
|
|
26
|
-
//# sourceMappingURL=PaywallUI-BD5hRY2P.js.map
|