@monetize.software/sdk 3.0.0-alpha.20 → 3.0.0-alpha.22
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-BXEOgPTK.js → PaywallUI-DL_njLCG.js} +385 -382
- package/dist/chunks/PaywallUI-DL_njLCG.js.map +1 -0
- package/dist/chunks/PaywallUI-dx0GSfTf.js +26 -0
- package/dist/chunks/PaywallUI-dx0GSfTf.js.map +1 -0
- package/dist/chunks/index-CLB1AgLg.js +2074 -0
- package/dist/chunks/index-CLB1AgLg.js.map +1 -0
- package/dist/chunks/index-CzDSBl4d.js +2 -0
- package/dist/chunks/index-CzDSBl4d.js.map +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.cjs.map +1 -1
- package/dist/core.js +17 -2066
- package/dist/core.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.js +17 -17
- package/dist/ui.cjs +1 -1
- package/dist/ui.d.ts +6 -0
- package/dist/ui.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/PaywallUI-BXEOgPTK.js.map +0 -1
- package/dist/chunks/PaywallUI-Cybo6wdO.js +0 -26
- package/dist/chunks/PaywallUI-Cybo6wdO.js.map +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { render as
|
|
3
|
-
import { jsx as a, jsxs as d, Fragment as
|
|
4
|
-
import { useContext as
|
|
5
|
-
const
|
|
6
|
-
function
|
|
1
|
+
import { P as L, g as $, r as N, B as Ne, E as Ve, f as He, i as $e, b as ue } from "./index-CLB1AgLg.js";
|
|
2
|
+
import { render as J, h as pe, createContext as qe } from "preact";
|
|
3
|
+
import { jsx as a, jsxs as d, Fragment as le } from "preact/jsx-runtime";
|
|
4
|
+
import { useContext as Ge, useState as v, useEffect as j, useRef as O, useMemo as We, useLayoutEffect as Ze } from "preact/hooks";
|
|
5
|
+
const he = 3600 * 1e3;
|
|
6
|
+
function Q(t) {
|
|
7
7
|
return `paywall-${t}-trial-time-first-open`;
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function ee(t) {
|
|
10
10
|
return `paywall-${t}-skip-times`;
|
|
11
11
|
}
|
|
12
|
-
class
|
|
12
|
+
class Ae {
|
|
13
13
|
constructor(e, r, i) {
|
|
14
14
|
this.storage = e, this.paywallId = r, this.config = i;
|
|
15
15
|
}
|
|
@@ -20,10 +20,10 @@ class Ie {
|
|
|
20
20
|
return this.config.mode === "time" ? this.recordTime() : this.recordOpens();
|
|
21
21
|
}
|
|
22
22
|
async reset() {
|
|
23
|
-
await this.storage.removeItem(this.config.mode === "time" ?
|
|
23
|
+
await this.storage.removeItem(this.config.mode === "time" ? Q(this.paywallId) : ee(this.paywallId));
|
|
24
24
|
}
|
|
25
25
|
async checkTime() {
|
|
26
|
-
const e = this.config.payload *
|
|
26
|
+
const e = this.config.payload * he, r = await this.storage.getItem(Q(this.paywallId)), i = r ? Number(r) : null;
|
|
27
27
|
if (!i || !Number.isFinite(i))
|
|
28
28
|
return {
|
|
29
29
|
mode: "time",
|
|
@@ -44,7 +44,7 @@ class Ie {
|
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
async checkOpens() {
|
|
47
|
-
const e = this.config.payload, r = await this.storage.getItem(
|
|
47
|
+
const e = this.config.payload, r = await this.storage.getItem(ee(this.paywallId)), i = r ? Number(r) : 0, n = Number.isFinite(i) ? i : 0, s = n < e, o = Math.max(0, e - n);
|
|
48
48
|
return {
|
|
49
49
|
mode: "opens",
|
|
50
50
|
blocked: s,
|
|
@@ -53,7 +53,7 @@ class Ie {
|
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
55
|
async recordTime() {
|
|
56
|
-
const e = this.config.payload *
|
|
56
|
+
const e = this.config.payload * he, r = Q(this.paywallId), i = await this.storage.getItem(r);
|
|
57
57
|
let n = i ? Number(i) : null;
|
|
58
58
|
(!n || !Number.isFinite(n)) && (n = Date.now(), await this.storage.setItem(r, String(n)));
|
|
59
59
|
const s = n + e, o = Math.max(0, s - Date.now());
|
|
@@ -67,7 +67,7 @@ class Ie {
|
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
69
|
async recordOpens() {
|
|
70
|
-
const e = this.config.payload, r =
|
|
70
|
+
const e = this.config.payload, r = ee(this.paywallId), i = await this.storage.getItem(r), n = i ? Number(i) : 0, s = Number.isFinite(n) ? n : 0, o = Math.min(e, s + 1);
|
|
71
71
|
await this.storage.setItem(r, String(o));
|
|
72
72
|
const c = Math.max(0, e - o);
|
|
73
73
|
return {
|
|
@@ -78,12 +78,12 @@ class Ie {
|
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
let
|
|
82
|
-
class
|
|
81
|
+
let ge = !1;
|
|
82
|
+
class Ke {
|
|
83
83
|
constructor(e, r, i) {
|
|
84
|
-
|
|
84
|
+
ge || (ge = !0, console.warn(
|
|
85
85
|
'[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.'
|
|
86
|
-
)), this.fallback = new
|
|
86
|
+
)), this.fallback = new Ae(e, r, i);
|
|
87
87
|
}
|
|
88
88
|
check() {
|
|
89
89
|
return this.fallback.check();
|
|
@@ -95,17 +95,17 @@ class Ze {
|
|
|
95
95
|
return this.fallback.reset();
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
|
-
function
|
|
99
|
-
return r.storage === "server" ? new
|
|
98
|
+
function Ye(t, e, r) {
|
|
99
|
+
return r.storage === "server" ? new Ke(t, e, r) : new Ae(t, e, r);
|
|
100
100
|
}
|
|
101
|
-
const Ae = '/*! 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-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-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-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-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-14{width:calc(var(--spacing) * 14)}.w-full{width:100%}.max-w-\\[20rem\\]{max-width:20rem}.max-w-\\[22rem\\]{max-width:22rem}.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-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-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-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-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-4{padding-top:calc(var(--spacing) * 4)}.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}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.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-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\\: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-5{padding-top:calc(var(--spacing) * 5)}.sm\\:pt-8{padding-top:calc(var(--spacing) * 8)}.sm\\:pb-4{padding-bottom:calc(var(--spacing) * 4)}.sm\\:pb-8{padding-bottom:calc(var(--spacing) * 8)}.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)}}';
|
|
102
|
-
let
|
|
103
|
-
function
|
|
104
|
-
if (
|
|
101
|
+
const Me = '/*! 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-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-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-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-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-14{width:calc(var(--spacing) * 14)}.w-full{width:100%}.max-w-\\[20rem\\]{max-width:20rem}.max-w-\\[22rem\\]{max-width:22rem}.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-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-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-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-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-4{padding-top:calc(var(--spacing) * 4)}.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}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.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-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)}.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\\: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-5{padding-top:calc(var(--spacing) * 5)}.sm\\:pt-8{padding-top:calc(var(--spacing) * 8)}.sm\\:pb-4{padding-bottom:calc(var(--spacing) * 4)}.sm\\:pb-8{padding-bottom:calc(var(--spacing) * 8)}.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)}}';
|
|
102
|
+
let fe = !1;
|
|
103
|
+
function Xe() {
|
|
104
|
+
if (fe || (fe = !0, typeof CSS > "u" || typeof CSS.registerProperty != "function")) return;
|
|
105
105
|
let t;
|
|
106
106
|
try {
|
|
107
107
|
const e = new CSSStyleSheet();
|
|
108
|
-
e.replaceSync(
|
|
108
|
+
e.replaceSync(Me), t = e.cssRules;
|
|
109
109
|
} catch {
|
|
110
110
|
return;
|
|
111
111
|
}
|
|
@@ -123,10 +123,10 @@ function Ye() {
|
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function Je(t, e, r = {}) {
|
|
127
127
|
if (typeof document > "u")
|
|
128
128
|
throw new Error("mountShadow called in non-DOM environment");
|
|
129
|
-
|
|
129
|
+
Xe();
|
|
130
130
|
const i = r.host ?? document.createElement("div");
|
|
131
131
|
i.setAttribute("data-paywall-host", ""), i.style.cssText = r.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;", !i.isConnected && !r.inline && document.body.appendChild(i);
|
|
132
132
|
const n = i.attachShadow({ mode: r.shadowMode ?? "closed" }), s = `
|
|
@@ -148,21 +148,21 @@ function Xe(t, e, r = {}) {
|
|
|
148
148
|
visibility: visible !important;
|
|
149
149
|
}
|
|
150
150
|
`, o = document.createElement("style");
|
|
151
|
-
o.textContent = s +
|
|
151
|
+
o.textContent = s + Me + (r.injectCss ?? ""), n.appendChild(o);
|
|
152
152
|
const c = document.createElement("div");
|
|
153
153
|
c.style.pointerEvents = "auto", n.appendChild(c);
|
|
154
154
|
let l = e;
|
|
155
|
-
return
|
|
155
|
+
return J(pe(t, l), c), {
|
|
156
156
|
shadowRoot: n,
|
|
157
157
|
update(p) {
|
|
158
|
-
l = { ...l, ...p },
|
|
158
|
+
l = { ...l, ...p }, J(pe(t, l), c);
|
|
159
159
|
},
|
|
160
160
|
unmount() {
|
|
161
|
-
|
|
161
|
+
J(null, c), i.remove();
|
|
162
162
|
}
|
|
163
163
|
};
|
|
164
164
|
}
|
|
165
|
-
const
|
|
165
|
+
const Qe = (t, e, r) => {
|
|
166
166
|
const i = t[e];
|
|
167
167
|
return i ? typeof i == "function" ? i() : Promise.resolve(i) : new Promise((n, s) => {
|
|
168
168
|
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
|
|
@@ -174,7 +174,7 @@ const Je = (t, e, r) => {
|
|
|
174
174
|
)
|
|
175
175
|
);
|
|
176
176
|
});
|
|
177
|
-
},
|
|
177
|
+
}, et = [
|
|
178
178
|
"ru",
|
|
179
179
|
"uk",
|
|
180
180
|
"de",
|
|
@@ -202,19 +202,19 @@ const Je = (t, e, r) => {
|
|
|
202
202
|
"th",
|
|
203
203
|
"vi",
|
|
204
204
|
"he"
|
|
205
|
-
],
|
|
206
|
-
function
|
|
205
|
+
], Le = (t, e, r) => Pe(e, r), Te = qe({ t: Le, locale: "en" });
|
|
206
|
+
function Pe(t, e) {
|
|
207
207
|
if (!e) return t;
|
|
208
208
|
let r = t;
|
|
209
209
|
for (const [i, n] of Object.entries(e))
|
|
210
210
|
r = r.split(`{${i}}`).join(String(n));
|
|
211
211
|
return r;
|
|
212
212
|
}
|
|
213
|
-
const
|
|
214
|
-
function
|
|
215
|
-
return
|
|
213
|
+
const te = /* @__PURE__ */ new Map(), re = /* @__PURE__ */ new Map();
|
|
214
|
+
function Ee(t) {
|
|
215
|
+
return et.includes(t);
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function tt(t) {
|
|
218
218
|
const e = [];
|
|
219
219
|
if (typeof navigator < "u" && navigator.language) {
|
|
220
220
|
e.push(navigator.language);
|
|
@@ -228,36 +228,36 @@ function et(t) {
|
|
|
228
228
|
i && i !== r && e.push(i);
|
|
229
229
|
}
|
|
230
230
|
for (const i of e)
|
|
231
|
-
if (
|
|
231
|
+
if (Ee(i)) return i;
|
|
232
232
|
return null;
|
|
233
233
|
}
|
|
234
|
-
function
|
|
234
|
+
function rt(t, e) {
|
|
235
235
|
return !!t.locales && t.locales[e] !== void 0;
|
|
236
236
|
}
|
|
237
|
-
async function
|
|
238
|
-
const e =
|
|
237
|
+
async function it(t) {
|
|
238
|
+
const e = te.get(t);
|
|
239
239
|
if (e) return e;
|
|
240
|
-
const r =
|
|
240
|
+
const r = re.get(t);
|
|
241
241
|
if (r) return r;
|
|
242
|
-
const i =
|
|
242
|
+
const i = Qe(/* @__PURE__ */ Object.assign({ "./locales/ar.ts": () => import("./ar-rSKgwKvp.js"), "./locales/cs.ts": () => import("./cs-DIWkcge_.js"), "./locales/da.ts": () => import("./da-DdMW98j3.js"), "./locales/de.ts": () => import("./de-D1bSmD_-.js"), "./locales/el.ts": () => import("./el-C4LtWpfP.js"), "./locales/es.ts": () => import("./es-Bhx7w85J.js"), "./locales/fi.ts": () => import("./fi-C34Oc6rg.js"), "./locales/fr.ts": () => import("./fr-BrWtqej3.js"), "./locales/he.ts": () => import("./he-Byr2r07x.js"), "./locales/hi.ts": () => import("./hi-CABVgpKU.js"), "./locales/hu.ts": () => import("./hu-CSQ9avfJ.js"), "./locales/id.ts": () => import("./id-BJ5w6RSU.js"), "./locales/it.ts": () => import("./it-Df8ChmTK.js"), "./locales/ja.ts": () => import("./ja-a53E5b2s.js"), "./locales/ko.ts": () => import("./ko-AZ8GrmXu.js"), "./locales/nl.ts": () => import("./nl-sF6ms5FU.js"), "./locales/no.ts": () => import("./no-DGf5PuW5.js"), "./locales/pl.ts": () => import("./pl-Dd-Ze6wn.js"), "./locales/pt.ts": () => import("./pt-BL9X8Du2.js"), "./locales/ro.ts": () => import("./ro-CGYmtR8q.js"), "./locales/ru.ts": () => import("./ru-oPoQtUxk.js"), "./locales/sv.ts": () => import("./sv-kXHP1Ct3.js"), "./locales/th.ts": () => import("./th-DMcmb36d.js"), "./locales/tr.ts": () => import("./tr-zjLbddlL.js"), "./locales/uk.ts": () => import("./uk-BYSiM14V.js"), "./locales/vi.ts": () => import("./vi-FbVRwy9D.js"), "./locales/zh.ts": () => import("./zh-Cv0Yw4qR.js") }), `./locales/${t}.ts`, 3).then((n) => {
|
|
243
243
|
const s = n.default ?? {};
|
|
244
|
-
return
|
|
244
|
+
return te.set(t, s), s;
|
|
245
245
|
}).catch((n) => {
|
|
246
246
|
console.warn(`[paywall] failed to load locale chunk "${t}"`, n);
|
|
247
247
|
const s = {};
|
|
248
|
-
return
|
|
248
|
+
return te.set(t, s), s;
|
|
249
249
|
}).finally(() => {
|
|
250
|
-
|
|
250
|
+
re.delete(t);
|
|
251
251
|
});
|
|
252
|
-
return
|
|
252
|
+
return re.set(t, i), i;
|
|
253
253
|
}
|
|
254
|
-
function
|
|
254
|
+
function nt({ bootstrap: t, forceLocale: e, children: r }) {
|
|
255
255
|
const [i, n] = v("en"), [s, o] = v(null);
|
|
256
256
|
j(() => {
|
|
257
|
-
const p = (e &&
|
|
257
|
+
const p = (e && Ee(e) ? e : null) ?? (() => {
|
|
258
258
|
if (!t) return null;
|
|
259
|
-
const f =
|
|
260
|
-
return !f || !
|
|
259
|
+
const f = tt(t);
|
|
260
|
+
return !f || !rt(t, f) ? null : f;
|
|
261
261
|
})();
|
|
262
262
|
if (!p) {
|
|
263
263
|
(s !== null || i !== "en") && (n("en"), o(null));
|
|
@@ -265,7 +265,7 @@ function it({ bootstrap: t, forceLocale: e, children: r }) {
|
|
|
265
265
|
}
|
|
266
266
|
if (p === i && s) return;
|
|
267
267
|
let u = !1;
|
|
268
|
-
return
|
|
268
|
+
return it(p).then((f) => {
|
|
269
269
|
u || (n(p), o(f));
|
|
270
270
|
}), () => {
|
|
271
271
|
u = !0;
|
|
@@ -273,15 +273,15 @@ function it({ bootstrap: t, forceLocale: e, children: r }) {
|
|
|
273
273
|
}, [t, e]);
|
|
274
274
|
const c = {
|
|
275
275
|
locale: i,
|
|
276
|
-
t: s ? (l, p, u) =>
|
|
276
|
+
t: s ? (l, p, u) => Pe(s[l] ?? p, u) : Le
|
|
277
277
|
};
|
|
278
|
-
return /* @__PURE__ */ a(
|
|
278
|
+
return /* @__PURE__ */ a(Te.Provider, { value: c, children: r });
|
|
279
279
|
}
|
|
280
280
|
function S() {
|
|
281
|
-
return
|
|
281
|
+
return Ge(Te);
|
|
282
282
|
}
|
|
283
|
-
const
|
|
284
|
-
function
|
|
283
|
+
const me = 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
284
|
+
function at({
|
|
285
285
|
open: t,
|
|
286
286
|
onClose: e,
|
|
287
287
|
labelledBy: r,
|
|
@@ -296,24 +296,24 @@ function nt({
|
|
|
296
296
|
return j(() => {
|
|
297
297
|
if (!t) return;
|
|
298
298
|
f.current = document.activeElement ?? null;
|
|
299
|
-
const
|
|
300
|
-
|
|
301
|
-
const A = (
|
|
302
|
-
if (
|
|
299
|
+
const m = u.current;
|
|
300
|
+
m && (m.querySelector(me) ?? m).focus({ preventScroll: !0 });
|
|
301
|
+
const A = (w) => {
|
|
302
|
+
if (w.key === "Escape") {
|
|
303
303
|
if (!s) return;
|
|
304
|
-
|
|
304
|
+
w.stopPropagation(), e();
|
|
305
305
|
return;
|
|
306
306
|
}
|
|
307
|
-
if (
|
|
307
|
+
if (w.key !== "Tab" || !u.current) return;
|
|
308
308
|
const C = Array.from(
|
|
309
|
-
u.current.querySelectorAll(
|
|
309
|
+
u.current.querySelectorAll(me)
|
|
310
310
|
).filter((F) => !F.hasAttribute("disabled") && F.tabIndex !== -1);
|
|
311
311
|
if (C.length === 0) {
|
|
312
|
-
|
|
312
|
+
w.preventDefault();
|
|
313
313
|
return;
|
|
314
314
|
}
|
|
315
315
|
const I = C[0], z = C[C.length - 1], M = document.activeElement;
|
|
316
|
-
|
|
316
|
+
w.shiftKey && M === I ? (w.preventDefault(), z.focus()) : !w.shiftKey && M === z && (w.preventDefault(), I.focus());
|
|
317
317
|
};
|
|
318
318
|
document.addEventListener("keydown", A, !0);
|
|
319
319
|
const b = document.body.style.overflow;
|
|
@@ -324,8 +324,8 @@ function nt({
|
|
|
324
324
|
"div",
|
|
325
325
|
{
|
|
326
326
|
class: `${c ? "absolute z-[1]" : "fixed z-[2147483647]"} inset-0 flex items-center justify-center bg-slate-950/50 p-2 sm:p-4 backdrop-blur-md animate-[pw-fade-in_180ms_ease-out]`,
|
|
327
|
-
onClick: (
|
|
328
|
-
s &&
|
|
327
|
+
onClick: (m) => {
|
|
328
|
+
s && m.target === m.currentTarget && e();
|
|
329
329
|
},
|
|
330
330
|
"data-pw-root": !0,
|
|
331
331
|
children: [
|
|
@@ -385,7 +385,7 @@ function nt({
|
|
|
385
385
|
}
|
|
386
386
|
) : null;
|
|
387
387
|
}
|
|
388
|
-
function
|
|
388
|
+
function ot(t, e) {
|
|
389
389
|
switch (t) {
|
|
390
390
|
case "google":
|
|
391
391
|
return e("auth.continue_with_google", "Continue with Google");
|
|
@@ -431,14 +431,14 @@ function we(t, e, r) {
|
|
|
431
431
|
return i;
|
|
432
432
|
}
|
|
433
433
|
}
|
|
434
|
-
function
|
|
434
|
+
function je({ block: t, ctx: e }) {
|
|
435
435
|
const r = e.auth, i = e.authSession, n = t.allow_signup !== !1, s = t.allow_password_reset !== !1, o = t.hide_when_authenticated !== !1;
|
|
436
436
|
if (!r)
|
|
437
437
|
return typeof console < "u" && console.warn("[paywall] auth_panel rendered without AuthClient — pass `auth: true` to PaywallUI"), null;
|
|
438
438
|
const c = i && !i.user.is_anonymous ? i : null;
|
|
439
|
-
return c && o ? null : c ? /* @__PURE__ */ a(
|
|
439
|
+
return c && o ? null : c ? /* @__PURE__ */ a(st, { email: c.user.email ?? "", onSignOut: () => r.signOut().catch(() => {
|
|
440
440
|
}) }) : /* @__PURE__ */ a(
|
|
441
|
-
|
|
441
|
+
lt,
|
|
442
442
|
{
|
|
443
443
|
block: t,
|
|
444
444
|
allowSignup: n,
|
|
@@ -447,7 +447,7 @@ function Ee({ block: t, ctx: e }) {
|
|
|
447
447
|
}
|
|
448
448
|
);
|
|
449
449
|
}
|
|
450
|
-
function
|
|
450
|
+
function st({ email: t, onSignOut: e }) {
|
|
451
451
|
const { t: r } = S();
|
|
452
452
|
return /* @__PURE__ */ d("div", { class: "flex items-center justify-between gap-3 rounded-2xl bg-gray-100 px-4 py-3", children: [
|
|
453
453
|
/* @__PURE__ */ d("div", { class: "flex flex-col", children: [
|
|
@@ -465,8 +465,8 @@ function ot({ email: t, onSignOut: e }) {
|
|
|
465
465
|
)
|
|
466
466
|
] });
|
|
467
467
|
}
|
|
468
|
-
function
|
|
469
|
-
const { t: n } = S(), s = i.auth, o = t.providers ?? [], c = i.initialAuthMode === "signup" && e ? "signup" : "signin", [l, p] = v(c), [u, f] = v(""), [_, h] = v(""), [k,
|
|
468
|
+
function lt({ block: t, allowSignup: e, allowReset: r, ctx: i }) {
|
|
469
|
+
const { t: n } = S(), s = i.auth, o = t.providers ?? [], c = i.initialAuthMode === "signup" && e ? "signup" : "signin", [l, p] = v(c), [u, f] = v(""), [_, h] = v(""), [k, m] = v(""), [A, b] = v(""), [w, C] = v(null), I = O(!1), [z, M] = v(null), [F, R] = v(null), [U, P] = v(!1), [T, D] = v(null);
|
|
470
470
|
j(() => {
|
|
471
471
|
if (typeof s.getLastLogin != "function") return;
|
|
472
472
|
let g = !1;
|
|
@@ -482,8 +482,8 @@ function st({ block: t, allowSignup: e, allowReset: r, ctx: i }) {
|
|
|
482
482
|
}, [s]);
|
|
483
483
|
const B = (g) => {
|
|
484
484
|
p(g), M(null), R(null), P(!1);
|
|
485
|
-
},
|
|
486
|
-
if (g.preventDefault(), !(I.current ||
|
|
485
|
+
}, K = async (g) => {
|
|
486
|
+
if (g.preventDefault(), !(I.current || w)) {
|
|
487
487
|
I.current = !0;
|
|
488
488
|
try {
|
|
489
489
|
if (M(null), R(null), l === "signup" && !U) {
|
|
@@ -511,8 +511,8 @@ function st({ block: t, allowSignup: e, allowReset: r, ctx: i }) {
|
|
|
511
511
|
I.current = !1;
|
|
512
512
|
}
|
|
513
513
|
}
|
|
514
|
-
},
|
|
515
|
-
if (!(I.current ||
|
|
514
|
+
}, q = async (g) => {
|
|
515
|
+
if (!(I.current || w)) {
|
|
516
516
|
I.current = !0, C(g), M(null), R(null);
|
|
517
517
|
try {
|
|
518
518
|
await s.signInWithOAuth({
|
|
@@ -527,31 +527,31 @@ function st({ block: t, allowSignup: e, allowReset: r, ctx: i }) {
|
|
|
527
527
|
I.current = !1, C(null);
|
|
528
528
|
}
|
|
529
529
|
}
|
|
530
|
-
},
|
|
531
|
-
return l === "reset_sent" ? /* @__PURE__ */ a(
|
|
532
|
-
/* @__PURE__ */ a(
|
|
533
|
-
|
|
530
|
+
}, Y = o.length > 0 && (l === "signin" || l === "signup"), X = l === "signin" || l === "signup" || l === "forgot", x = l === "signin" || l === "signup" && U;
|
|
531
|
+
return l === "reset_sent" ? /* @__PURE__ */ a(yt, { email: u, onBack: () => B("signin"), t: n }) : /* @__PURE__ */ d("div", { class: "flex flex-col gap-5", children: [
|
|
532
|
+
/* @__PURE__ */ a(ct, { mode: l, customHeading: t.heading, customSubheading: t.subheading }),
|
|
533
|
+
Y ? /* @__PURE__ */ d("div", { class: "flex flex-col gap-2.5", children: [
|
|
534
534
|
o.map((g) => /* @__PURE__ */ d("div", { class: "relative", children: [
|
|
535
535
|
/* @__PURE__ */ d(
|
|
536
536
|
"button",
|
|
537
537
|
{
|
|
538
538
|
type: "button",
|
|
539
|
-
onClick: () =>
|
|
540
|
-
disabled:
|
|
539
|
+
onClick: () => q(g),
|
|
540
|
+
disabled: w !== null,
|
|
541
541
|
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)]",
|
|
542
542
|
children: [
|
|
543
|
-
|
|
544
|
-
/* @__PURE__ */ a("span", { children:
|
|
543
|
+
w === g ? /* @__PURE__ */ a("span", { class: "inline-block h-4 w-4 animate-spin rounded-full border-2 border-gray-300 border-t-gray-700" }) : /* @__PURE__ */ a(xt, { provider: g }),
|
|
544
|
+
/* @__PURE__ */ a("span", { children: ot(g, n) })
|
|
545
545
|
]
|
|
546
546
|
}
|
|
547
547
|
),
|
|
548
|
-
T?.method === g ? /* @__PURE__ */ a(
|
|
548
|
+
T?.method === g ? /* @__PURE__ */ a(mt, { email: T.email }) : null
|
|
549
549
|
] }, g)),
|
|
550
|
-
/* @__PURE__ */ a(
|
|
550
|
+
/* @__PURE__ */ a(bt, {})
|
|
551
551
|
] }) : null,
|
|
552
|
-
/* @__PURE__ */ d("form", { onSubmit:
|
|
553
|
-
|
|
554
|
-
|
|
552
|
+
/* @__PURE__ */ d("form", { onSubmit: K, class: "flex flex-col gap-3", children: [
|
|
553
|
+
X && /* @__PURE__ */ a(
|
|
554
|
+
be,
|
|
555
555
|
{
|
|
556
556
|
type: "email",
|
|
557
557
|
placeholder: n("auth.email", "Email address"),
|
|
@@ -562,7 +562,7 @@ function st({ block: t, allowSignup: e, allowReset: r, ctx: i }) {
|
|
|
562
562
|
}
|
|
563
563
|
),
|
|
564
564
|
x && /* @__PURE__ */ a(
|
|
565
|
-
|
|
565
|
+
ie,
|
|
566
566
|
{
|
|
567
567
|
placeholder: n("auth.password", "Password"),
|
|
568
568
|
value: _,
|
|
@@ -572,17 +572,17 @@ function st({ block: t, allowSignup: e, allowReset: r, ctx: i }) {
|
|
|
572
572
|
}
|
|
573
573
|
),
|
|
574
574
|
l === "signup" && U && /* @__PURE__ */ a(
|
|
575
|
-
|
|
575
|
+
ie,
|
|
576
576
|
{
|
|
577
577
|
placeholder: n("auth.repeat_password", "Repeat password"),
|
|
578
578
|
value: k,
|
|
579
|
-
onInput:
|
|
579
|
+
onInput: m,
|
|
580
580
|
autocomplete: "new-password",
|
|
581
581
|
required: !0
|
|
582
582
|
}
|
|
583
583
|
),
|
|
584
584
|
(l === "signup_verify" || l === "reset_verify") && /* @__PURE__ */ a(
|
|
585
|
-
|
|
585
|
+
be,
|
|
586
586
|
{
|
|
587
587
|
type: "text",
|
|
588
588
|
placeholder: n("auth.confirmation_code", "Confirmation code"),
|
|
@@ -594,7 +594,7 @@ function st({ block: t, allowSignup: e, allowReset: r, ctx: i }) {
|
|
|
594
594
|
}
|
|
595
595
|
),
|
|
596
596
|
l === "reset_verify" && /* @__PURE__ */ a(
|
|
597
|
-
|
|
597
|
+
ie,
|
|
598
598
|
{
|
|
599
599
|
placeholder: n(
|
|
600
600
|
"auth.new_password_optional",
|
|
@@ -605,19 +605,19 @@ function st({ block: t, allowSignup: e, allowReset: r, ctx: i }) {
|
|
|
605
605
|
autocomplete: "new-password"
|
|
606
606
|
}
|
|
607
607
|
),
|
|
608
|
-
l === "signin" && r && /* @__PURE__ */ a("div", { class: "flex justify-end text-sm", children: /* @__PURE__ */ a(
|
|
608
|
+
l === "signin" && r && /* @__PURE__ */ a("div", { class: "flex justify-end text-sm", children: /* @__PURE__ */ a(Z, { onClick: () => B("forgot"), children: n("auth.forgot_password", "Forgot password?") }) }),
|
|
609
609
|
z && /* @__PURE__ */ a("p", { class: "text-sm text-red-600", children: z }),
|
|
610
610
|
F && /* @__PURE__ */ a("p", { class: "text-sm text-gray-500", children: F }),
|
|
611
611
|
/* @__PURE__ */ a(
|
|
612
|
-
|
|
612
|
+
ht,
|
|
613
613
|
{
|
|
614
|
-
busy:
|
|
615
|
-
label:
|
|
614
|
+
busy: w === "email",
|
|
615
|
+
label: ut(l, U, t.submit_label ?? t.heading, n)
|
|
616
616
|
}
|
|
617
617
|
)
|
|
618
618
|
] }),
|
|
619
619
|
/* @__PURE__ */ a(
|
|
620
|
-
|
|
620
|
+
pt,
|
|
621
621
|
{
|
|
622
622
|
mode: l,
|
|
623
623
|
allowSignup: e,
|
|
@@ -626,18 +626,18 @@ function st({ block: t, allowSignup: e, allowReset: r, ctx: i }) {
|
|
|
626
626
|
)
|
|
627
627
|
] });
|
|
628
628
|
}
|
|
629
|
-
function
|
|
629
|
+
function ct({
|
|
630
630
|
mode: t,
|
|
631
631
|
customHeading: e,
|
|
632
632
|
customSubheading: r
|
|
633
633
|
}) {
|
|
634
|
-
const { t: i } = S(), n =
|
|
634
|
+
const { t: i } = S(), n = dt(t, i), s = t === "signin" || t === "signup", o = s && e ? e : n.title, c = s && r !== void 0 ? r || null : n.subtitle;
|
|
635
635
|
return /* @__PURE__ */ d("div", { class: "flex flex-col gap-2", children: [
|
|
636
636
|
/* @__PURE__ */ a("h2", { class: "text-3xl font-bold tracking-tight text-gray-900", children: o }),
|
|
637
637
|
c ? /* @__PURE__ */ a("p", { class: "text-base leading-relaxed text-gray-600", children: c }) : null
|
|
638
638
|
] });
|
|
639
639
|
}
|
|
640
|
-
function
|
|
640
|
+
function dt(t, e) {
|
|
641
641
|
switch (t) {
|
|
642
642
|
case "signin":
|
|
643
643
|
return {
|
|
@@ -680,7 +680,7 @@ function ct(t, e) {
|
|
|
680
680
|
};
|
|
681
681
|
}
|
|
682
682
|
}
|
|
683
|
-
function
|
|
683
|
+
function ut(t, e, r, i) {
|
|
684
684
|
if (t === "signin" && r) return r;
|
|
685
685
|
switch (t) {
|
|
686
686
|
case "signin":
|
|
@@ -696,7 +696,7 @@ function dt(t, e, r, i) {
|
|
|
696
696
|
return i("cta.continue", "Continue");
|
|
697
697
|
}
|
|
698
698
|
}
|
|
699
|
-
function
|
|
699
|
+
function pt({
|
|
700
700
|
mode: t,
|
|
701
701
|
allowSignup: e,
|
|
702
702
|
onSwitch: r
|
|
@@ -705,18 +705,18 @@ function ut({
|
|
|
705
705
|
return t === "signin" && e ? /* @__PURE__ */ d("p", { class: "text-center text-sm text-gray-600", children: [
|
|
706
706
|
i("auth.no_account", "Don't have an account?"),
|
|
707
707
|
" ",
|
|
708
|
-
/* @__PURE__ */ a(
|
|
708
|
+
/* @__PURE__ */ a(Z, { onClick: () => r("signup"), children: i("auth.sign_up_link", "Sign Up") })
|
|
709
709
|
] }) : t === "signup" || t === "signup_verify" ? /* @__PURE__ */ d("p", { class: "text-center text-sm text-gray-600", children: [
|
|
710
710
|
i("auth.have_account", "Already have an account?"),
|
|
711
711
|
" ",
|
|
712
|
-
/* @__PURE__ */ a(
|
|
712
|
+
/* @__PURE__ */ a(Z, { onClick: () => r("signin"), children: i("auth.log_in_link", "Log In") })
|
|
713
713
|
] }) : t === "forgot" || t === "reset_sent" || t === "reset_verify" ? /* @__PURE__ */ d("p", { class: "text-center text-sm text-gray-600", children: [
|
|
714
714
|
i("auth.no_account", "Don't have an account?"),
|
|
715
715
|
" ",
|
|
716
|
-
/* @__PURE__ */ a(
|
|
716
|
+
/* @__PURE__ */ a(Z, { onClick: () => r("signup"), children: i("auth.sign_up_link", "Sign Up") })
|
|
717
717
|
] }) : null;
|
|
718
718
|
}
|
|
719
|
-
function
|
|
719
|
+
function Z({
|
|
720
720
|
onClick: t,
|
|
721
721
|
children: e
|
|
722
722
|
}) {
|
|
@@ -731,7 +731,7 @@ function W({
|
|
|
731
731
|
}
|
|
732
732
|
);
|
|
733
733
|
}
|
|
734
|
-
function
|
|
734
|
+
function ht({ busy: t, label: e }) {
|
|
735
735
|
return /* @__PURE__ */ a(
|
|
736
736
|
"button",
|
|
737
737
|
{
|
|
@@ -746,7 +746,7 @@ function pt({ busy: t, label: e }) {
|
|
|
746
746
|
}
|
|
747
747
|
);
|
|
748
748
|
}
|
|
749
|
-
function
|
|
749
|
+
function be({ type: t, placeholder: e, value: r, onInput: i, autocomplete: n, inputMode: s, required: o }) {
|
|
750
750
|
return /* @__PURE__ */ a(
|
|
751
751
|
"input",
|
|
752
752
|
{
|
|
@@ -761,7 +761,7 @@ function me({ type: t, placeholder: e, value: r, onInput: i, autocomplete: n, in
|
|
|
761
761
|
}
|
|
762
762
|
);
|
|
763
763
|
}
|
|
764
|
-
function
|
|
764
|
+
function ie({ placeholder: t, value: e, onInput: r, autocomplete: i, required: n }) {
|
|
765
765
|
const { t: s } = S(), [o, c] = v(!1), l = O(null);
|
|
766
766
|
j(() => {
|
|
767
767
|
const f = l.current;
|
|
@@ -790,12 +790,12 @@ function re({ placeholder: t, value: e, onInput: r, autocomplete: i, required: n
|
|
|
790
790
|
"aria-label": o ? u : p,
|
|
791
791
|
tabIndex: -1,
|
|
792
792
|
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)]",
|
|
793
|
-
children: o ? /* @__PURE__ */ a(
|
|
793
|
+
children: o ? /* @__PURE__ */ a(ft, {}) : /* @__PURE__ */ a(gt, {})
|
|
794
794
|
}
|
|
795
795
|
)
|
|
796
796
|
] });
|
|
797
797
|
}
|
|
798
|
-
function
|
|
798
|
+
function gt() {
|
|
799
799
|
return /* @__PURE__ */ d("svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
|
|
800
800
|
/* @__PURE__ */ a(
|
|
801
801
|
"path",
|
|
@@ -810,7 +810,7 @@ function ht() {
|
|
|
810
810
|
/* @__PURE__ */ a("circle", { cx: "10", cy: "10", r: "2.5", stroke: "currentColor", "stroke-width": "1.5" })
|
|
811
811
|
] });
|
|
812
812
|
}
|
|
813
|
-
function
|
|
813
|
+
function ft() {
|
|
814
814
|
return /* @__PURE__ */ d("svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
|
|
815
815
|
/* @__PURE__ */ a(
|
|
816
816
|
"path",
|
|
@@ -834,7 +834,7 @@ function gt() {
|
|
|
834
834
|
)
|
|
835
835
|
] });
|
|
836
836
|
}
|
|
837
|
-
function
|
|
837
|
+
function mt({ email: t }) {
|
|
838
838
|
const { t: e } = S(), r = t ? e("auth.last_used", "Last · {email}", { email: wt(t) }) : e("auth.last_used_no_email", "Last");
|
|
839
839
|
return /* @__PURE__ */ a("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: r });
|
|
840
840
|
}
|
|
@@ -842,7 +842,7 @@ function wt(t) {
|
|
|
842
842
|
const [e, r] = t.split("@");
|
|
843
843
|
return r ? `${e.slice(0, 3)}*****@${r}` : t;
|
|
844
844
|
}
|
|
845
|
-
function
|
|
845
|
+
function bt() {
|
|
846
846
|
const { t } = S();
|
|
847
847
|
return /* @__PURE__ */ d("div", { class: "flex items-center gap-3 py-1 text-sm text-gray-400", children: [
|
|
848
848
|
/* @__PURE__ */ a("div", { class: "h-px flex-1 bg-gray-200" }),
|
|
@@ -850,7 +850,7 @@ function mt() {
|
|
|
850
850
|
/* @__PURE__ */ a("div", { class: "h-px flex-1 bg-gray-200" })
|
|
851
851
|
] });
|
|
852
852
|
}
|
|
853
|
-
function
|
|
853
|
+
function xt({ provider: t }) {
|
|
854
854
|
return t === "google" ? /* @__PURE__ */ d("svg", { width: "20", height: "20", viewBox: "0 0 18 18", "aria-hidden": "true", children: [
|
|
855
855
|
/* @__PURE__ */ a("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" }),
|
|
856
856
|
/* @__PURE__ */ a("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" }),
|
|
@@ -863,7 +863,7 @@ function bt({ provider: t }) {
|
|
|
863
863
|
/* @__PURE__ */ a("svg", { width: "26", height: "26", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ a("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" }) })
|
|
864
864
|
) : t === "github" ? /* @__PURE__ */ a("svg", { width: "20", height: "20", viewBox: "0 0 16 16", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ a("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" }) }) : /* @__PURE__ */ a("svg", { width: "18", height: "20", viewBox: "0 0 14 16", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ a("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" }) });
|
|
865
865
|
}
|
|
866
|
-
function
|
|
866
|
+
function yt({
|
|
867
867
|
email: t,
|
|
868
868
|
onBack: e,
|
|
869
869
|
t: r
|
|
@@ -913,7 +913,7 @@ function xt({
|
|
|
913
913
|
)
|
|
914
914
|
] });
|
|
915
915
|
}
|
|
916
|
-
function
|
|
916
|
+
function vt({
|
|
917
917
|
block: t,
|
|
918
918
|
bootstrap: e,
|
|
919
919
|
auth: r,
|
|
@@ -954,11 +954,11 @@ function yt({
|
|
|
954
954
|
submit_label: l("auth.log_in", "Sign In")
|
|
955
955
|
} : t;
|
|
956
956
|
return /* @__PURE__ */ d("div", { class: "relative flex-1 min-h-0 overflow-y-auto p-6 sm:p-8", children: [
|
|
957
|
-
s ? /* @__PURE__ */ a(
|
|
958
|
-
/* @__PURE__ */ a(
|
|
957
|
+
s ? /* @__PURE__ */ a(kt, { onClick: n, ariaLabel: l("nav.back_aria", "Back") }) : null,
|
|
958
|
+
/* @__PURE__ */ a(je, { block: u, ctx: p })
|
|
959
959
|
] });
|
|
960
960
|
}
|
|
961
|
-
function
|
|
961
|
+
function kt({ onClick: t, ariaLabel: e }) {
|
|
962
962
|
return /* @__PURE__ */ a(
|
|
963
963
|
"button",
|
|
964
964
|
{
|
|
@@ -991,8 +991,8 @@ function vt({ onClick: t, ariaLabel: e }) {
|
|
|
991
991
|
}
|
|
992
992
|
);
|
|
993
993
|
}
|
|
994
|
-
const
|
|
995
|
-
function
|
|
994
|
+
const _t = (t) => `pw-offer-${t}-start`;
|
|
995
|
+
function ne(t) {
|
|
996
996
|
const e = t - Date.now();
|
|
997
997
|
return e <= 0 ? { days: 0, hours: 0, minutes: 0, seconds: 0, expired: !0 } : {
|
|
998
998
|
days: Math.floor(e / (1e3 * 60 * 60 * 24)),
|
|
@@ -1002,7 +1002,7 @@ function ie(t) {
|
|
|
1002
1002
|
expired: !1
|
|
1003
1003
|
};
|
|
1004
1004
|
}
|
|
1005
|
-
function
|
|
1005
|
+
function St(t) {
|
|
1006
1006
|
if (t.expires_at) {
|
|
1007
1007
|
const e = Date.parse(t.expires_at);
|
|
1008
1008
|
return Number.isFinite(e) ? e : null;
|
|
@@ -1010,7 +1010,7 @@ function _t(t) {
|
|
|
1010
1010
|
if (t.duration_minutes && t.duration_minutes > 0) {
|
|
1011
1011
|
if (typeof window > "u") return null;
|
|
1012
1012
|
try {
|
|
1013
|
-
const e =
|
|
1013
|
+
const e = _t(t.id);
|
|
1014
1014
|
let r = window.localStorage.getItem(e);
|
|
1015
1015
|
return r || (r = (/* @__PURE__ */ new Date()).toISOString(), window.localStorage.setItem(e, r)), Date.parse(r) + t.duration_minutes * 6e4;
|
|
1016
1016
|
} catch {
|
|
@@ -1019,7 +1019,7 @@ function _t(t) {
|
|
|
1019
1019
|
}
|
|
1020
1020
|
return null;
|
|
1021
1021
|
}
|
|
1022
|
-
function
|
|
1022
|
+
function ze(t, e) {
|
|
1023
1023
|
if (!t || t.length === 0) return null;
|
|
1024
1024
|
if (e) {
|
|
1025
1025
|
const r = t.find((i) => i.id === e);
|
|
@@ -1027,25 +1027,25 @@ function je(t, e) {
|
|
|
1027
1027
|
}
|
|
1028
1028
|
return t.find((r) => r.expires_at || r.duration_minutes) ?? null;
|
|
1029
1029
|
}
|
|
1030
|
-
function
|
|
1031
|
-
const e = t ?
|
|
1032
|
-
() => e !== null ?
|
|
1030
|
+
function Be(t) {
|
|
1031
|
+
const e = t ? St(t) : null, [r, i] = v(
|
|
1032
|
+
() => e !== null ? ne(e) : null
|
|
1033
1033
|
), n = O(e);
|
|
1034
1034
|
return n.current = e, j(() => {
|
|
1035
1035
|
if (e === null) {
|
|
1036
1036
|
i(null);
|
|
1037
1037
|
return;
|
|
1038
1038
|
}
|
|
1039
|
-
i(
|
|
1039
|
+
i(ne(e));
|
|
1040
1040
|
const s = setInterval(() => {
|
|
1041
|
-
const o =
|
|
1041
|
+
const o = ne(n.current ?? 0);
|
|
1042
1042
|
i(o), o.expired && clearInterval(s);
|
|
1043
1043
|
}, 1e3);
|
|
1044
1044
|
return () => clearInterval(s);
|
|
1045
1045
|
}, [e, t?.duration_minutes, t?.id]), r;
|
|
1046
1046
|
}
|
|
1047
|
-
function
|
|
1048
|
-
const { t: r } = S(), i =
|
|
1047
|
+
function Ct({ block: t, ctx: e }) {
|
|
1048
|
+
const { t: r } = S(), i = ze(e.bootstrap.offers, t.offer_id), n = Be(i);
|
|
1049
1049
|
if (!i || n === null || n.expired && !t.force) return null;
|
|
1050
1050
|
const s = t.title ?? i.label ?? r("offer.limited_time", "Limited-time offer"), o = i.discount_percent ? `${s} ${i.discount_percent}%` : s;
|
|
1051
1051
|
return /* @__PURE__ */ d(
|
|
@@ -1058,32 +1058,32 @@ function St({ block: t, ctx: e }) {
|
|
|
1058
1058
|
},
|
|
1059
1059
|
role: "status",
|
|
1060
1060
|
children: [
|
|
1061
|
-
/* @__PURE__ */ a(
|
|
1061
|
+
/* @__PURE__ */ a(Fe, {}),
|
|
1062
1062
|
/* @__PURE__ */ a("span", { children: o }),
|
|
1063
|
-
/* @__PURE__ */ a(
|
|
1063
|
+
/* @__PURE__ */ a(Oe, { value: n, t: r })
|
|
1064
1064
|
]
|
|
1065
1065
|
}
|
|
1066
1066
|
);
|
|
1067
1067
|
}
|
|
1068
|
-
function
|
|
1068
|
+
function Oe({ value: t, t: e }) {
|
|
1069
1069
|
return /* @__PURE__ */ d("div", { class: "flex items-center gap-1 font-mono text-sm", children: [
|
|
1070
|
-
t.days > 0 ? /* @__PURE__ */ d(
|
|
1071
|
-
/* @__PURE__ */ a(
|
|
1070
|
+
t.days > 0 ? /* @__PURE__ */ d(le, { children: [
|
|
1071
|
+
/* @__PURE__ */ a(G, { children: String(t.days) }),
|
|
1072
1072
|
/* @__PURE__ */ a("span", { class: "text-xs", children: e("countdown.d", "d") })
|
|
1073
1073
|
] }) : null,
|
|
1074
|
-
/* @__PURE__ */ a(
|
|
1074
|
+
/* @__PURE__ */ a(G, { children: String(t.hours).padStart(2, "0") }),
|
|
1075
1075
|
/* @__PURE__ */ a("span", { class: "text-xs", children: e("countdown.h", "h") }),
|
|
1076
|
-
/* @__PURE__ */ a(
|
|
1076
|
+
/* @__PURE__ */ a(G, { children: String(t.minutes).padStart(2, "0") }),
|
|
1077
1077
|
/* @__PURE__ */ a("span", { class: "text-xs", children: e("countdown.m", "m") }),
|
|
1078
|
-
/* @__PURE__ */ a(
|
|
1078
|
+
/* @__PURE__ */ a(G, { children: String(t.seconds).padStart(2, "0") }),
|
|
1079
1079
|
/* @__PURE__ */ a("span", { class: "text-xs", children: e("countdown.s", "s") })
|
|
1080
1080
|
] });
|
|
1081
1081
|
}
|
|
1082
|
-
function
|
|
1082
|
+
function G({ children: t }) {
|
|
1083
1083
|
return /* @__PURE__ */ a("span", { class: "rounded bg-black/20 px-1.5 py-0.5 text-xs font-bold", children: t });
|
|
1084
1084
|
}
|
|
1085
|
-
function
|
|
1086
|
-
const { t: e } = S(), r =
|
|
1085
|
+
function It({ offer: t }) {
|
|
1086
|
+
const { t: e } = S(), r = Be(t);
|
|
1087
1087
|
if (r === null || r.expired) return null;
|
|
1088
1088
|
const i = t.label ?? e("offer.limited_time", "Limited-time offer"), n = t.discount_percent ? `${i} ${t.discount_percent}%` : i;
|
|
1089
1089
|
return /* @__PURE__ */ d(
|
|
@@ -1096,14 +1096,14 @@ function Ct({ offer: t }) {
|
|
|
1096
1096
|
},
|
|
1097
1097
|
role: "status",
|
|
1098
1098
|
children: [
|
|
1099
|
-
/* @__PURE__ */ a(
|
|
1099
|
+
/* @__PURE__ */ a(Fe, {}),
|
|
1100
1100
|
/* @__PURE__ */ a("span", { children: n }),
|
|
1101
|
-
/* @__PURE__ */ a(
|
|
1101
|
+
/* @__PURE__ */ a(Oe, { value: r, t: e })
|
|
1102
1102
|
]
|
|
1103
1103
|
}
|
|
1104
1104
|
);
|
|
1105
1105
|
}
|
|
1106
|
-
function
|
|
1106
|
+
function Fe() {
|
|
1107
1107
|
return /* @__PURE__ */ a(
|
|
1108
1108
|
"svg",
|
|
1109
1109
|
{
|
|
@@ -1122,19 +1122,19 @@ function Oe() {
|
|
|
1122
1122
|
}
|
|
1123
1123
|
);
|
|
1124
1124
|
}
|
|
1125
|
-
const
|
|
1126
|
-
function
|
|
1127
|
-
const { t: n } = S(), s = e?.user.email ?? "", o = s || null, [c, l] = v(s), [p, u] = v(""), [f, _] = v(""), [h, k] = v([]), [
|
|
1125
|
+
const xe = 3, ye = 200, ve = 5e3, ae = 5, At = 10 * 1024 * 1024, ke = ["image/jpeg", "image/png", "image/webp"], Mt = /.+@.+\..+/;
|
|
1126
|
+
function Lt({ client: t, authSession: e, origin: r, onBack: i }) {
|
|
1127
|
+
const { t: n } = S(), s = e?.user.email ?? "", o = s || null, [c, l] = v(s), [p, u] = v(""), [f, _] = v(""), [h, k] = v([]), [m, A] = v(!1), [b, w] = v(null), [C, I] = v({}), z = () => {
|
|
1128
1128
|
const P = {}, T = (o ?? c).trim(), D = p.trim(), B = f.trim();
|
|
1129
|
-
return T ?
|
|
1130
|
-
min:
|
|
1131
|
-
max: xe
|
|
1132
|
-
})), (B.length < 1 || B.length > ye) && (P.message = n("support.message_length", "{min}–{max} characters", {
|
|
1133
|
-
min: 1,
|
|
1129
|
+
return T ? Mt.test(T.toLowerCase()) || (P.email = n("support.invalid_email", "Invalid email")) : P.email = n("support.required", "Required"), (D.length < xe || D.length > ye) && (P.subject = n("support.subject_length", "{min}–{max} characters", {
|
|
1130
|
+
min: xe,
|
|
1134
1131
|
max: ye
|
|
1132
|
+
})), (B.length < 1 || B.length > ve) && (P.message = n("support.message_length", "{min}–{max} characters", {
|
|
1133
|
+
min: 1,
|
|
1134
|
+
max: ve
|
|
1135
1135
|
})), I(P), Object.keys(P).length === 0;
|
|
1136
1136
|
}, M = async (P) => {
|
|
1137
|
-
if (P.preventDefault(), !
|
|
1137
|
+
if (P.preventDefault(), !m && z()) {
|
|
1138
1138
|
A(!0), I((T) => ({ ...T, submit: void 0 }));
|
|
1139
1139
|
try {
|
|
1140
1140
|
const T = (o ?? c).trim();
|
|
@@ -1143,7 +1143,7 @@ function Mt({ client: t, authSession: e, origin: r, onBack: i }) {
|
|
|
1143
1143
|
content: f.trim(),
|
|
1144
1144
|
email: T || void 0,
|
|
1145
1145
|
files: h.length > 0 ? h : void 0
|
|
1146
|
-
}),
|
|
1146
|
+
}), w(T);
|
|
1147
1147
|
} catch (T) {
|
|
1148
1148
|
const D = T instanceof L && T.message || "Failed to send. Please try again.";
|
|
1149
1149
|
I((B) => ({ ...B, submit: D }));
|
|
@@ -1152,7 +1152,7 @@ function Mt({ client: t, authSession: e, origin: r, onBack: i }) {
|
|
|
1152
1152
|
}
|
|
1153
1153
|
}
|
|
1154
1154
|
}, F = () => {
|
|
1155
|
-
u(""), _(""), k([]), I({}),
|
|
1155
|
+
u(""), _(""), k([]), I({}), w(null);
|
|
1156
1156
|
}, R = "flex flex-col gap-3 bg-white px-6 pb-6 pt-3 sm:px-8", U = { boxShadow: "0 -4px 12px -4px rgba(15,23,42,0.06)" };
|
|
1157
1157
|
return b ? /* @__PURE__ */ d("div", { class: "relative flex-1 min-h-0 flex flex-col", children: [
|
|
1158
1158
|
/* @__PURE__ */ d("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: [
|
|
@@ -1211,7 +1211,7 @@ function Mt({ client: t, authSession: e, origin: r, onBack: i }) {
|
|
|
1211
1211
|
)
|
|
1212
1212
|
] }) })
|
|
1213
1213
|
] }) : /* @__PURE__ */ d("form", { onSubmit: M, class: "relative flex-1 min-h-0 flex flex-col", children: [
|
|
1214
|
-
/* @__PURE__ */ a(
|
|
1214
|
+
/* @__PURE__ */ a(Tt, { onClick: i, ariaLabel: n("nav.back_aria", "Back") }),
|
|
1215
1215
|
/* @__PURE__ */ a("div", { class: "flex-1 min-h-0 overflow-y-auto px-6 pb-3 pt-6 sm:px-8 sm:pb-4 sm:pt-8", children: /* @__PURE__ */ d("div", { class: "flex flex-col gap-5", children: [
|
|
1216
1216
|
/* @__PURE__ */ d("div", { class: "flex flex-col gap-2 pr-10", children: [
|
|
1217
1217
|
/* @__PURE__ */ a("h2", { class: "text-3xl font-bold tracking-tight text-gray-900", children: n("support.heading", "Support") }),
|
|
@@ -1223,7 +1223,7 @@ function Mt({ client: t, authSession: e, origin: r, onBack: i }) {
|
|
|
1223
1223
|
" ",
|
|
1224
1224
|
/* @__PURE__ */ a("b", { class: "font-medium text-gray-900", children: o })
|
|
1225
1225
|
] }) : /* @__PURE__ */ a(
|
|
1226
|
-
|
|
1226
|
+
_e,
|
|
1227
1227
|
{
|
|
1228
1228
|
type: "email",
|
|
1229
1229
|
placeholder: n("support.email_placeholder", "Enter your email *"),
|
|
@@ -1235,7 +1235,7 @@ function Mt({ client: t, authSession: e, origin: r, onBack: i }) {
|
|
|
1235
1235
|
}
|
|
1236
1236
|
),
|
|
1237
1237
|
/* @__PURE__ */ a(
|
|
1238
|
-
|
|
1238
|
+
_e,
|
|
1239
1239
|
{
|
|
1240
1240
|
type: "text",
|
|
1241
1241
|
placeholder: n("support.subject_placeholder", "Enter your subject *"),
|
|
@@ -1246,7 +1246,7 @@ function Mt({ client: t, authSession: e, origin: r, onBack: i }) {
|
|
|
1246
1246
|
}
|
|
1247
1247
|
),
|
|
1248
1248
|
/* @__PURE__ */ a(
|
|
1249
|
-
|
|
1249
|
+
Pt,
|
|
1250
1250
|
{
|
|
1251
1251
|
placeholder: n("support.message_placeholder", "Enter your message *"),
|
|
1252
1252
|
value: f,
|
|
@@ -1255,7 +1255,7 @@ function Mt({ client: t, authSession: e, origin: r, onBack: i }) {
|
|
|
1255
1255
|
required: !0
|
|
1256
1256
|
}
|
|
1257
1257
|
),
|
|
1258
|
-
/* @__PURE__ */ a(
|
|
1258
|
+
/* @__PURE__ */ a(Et, { files: h, onChange: k, disabled: m })
|
|
1259
1259
|
] })
|
|
1260
1260
|
] }) }),
|
|
1261
1261
|
/* @__PURE__ */ d("div", { class: R, style: U, children: [
|
|
@@ -1266,7 +1266,7 @@ function Mt({ client: t, authSession: e, origin: r, onBack: i }) {
|
|
|
1266
1266
|
{
|
|
1267
1267
|
type: "button",
|
|
1268
1268
|
onClick: i,
|
|
1269
|
-
disabled:
|
|
1269
|
+
disabled: m,
|
|
1270
1270
|
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)]",
|
|
1271
1271
|
children: r === "standalone" ? n("support.close_button", "Close") : n("nav.back_aria", "Back")
|
|
1272
1272
|
}
|
|
@@ -1275,20 +1275,20 @@ function Mt({ client: t, authSession: e, origin: r, onBack: i }) {
|
|
|
1275
1275
|
"button",
|
|
1276
1276
|
{
|
|
1277
1277
|
type: "submit",
|
|
1278
|
-
disabled:
|
|
1278
|
+
disabled: m,
|
|
1279
1279
|
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)]",
|
|
1280
1280
|
style: {
|
|
1281
1281
|
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%)",
|
|
1282
1282
|
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)"
|
|
1283
1283
|
},
|
|
1284
|
-
children:
|
|
1284
|
+
children: m ? /* @__PURE__ */ a("span", { class: "relative z-10 inline-block h-4 w-4 animate-spin rounded-full border-2 border-white/40 border-t-white" }) : /* @__PURE__ */ a("span", { class: "relative z-10", children: n("support.send_button", "Send") })
|
|
1285
1285
|
}
|
|
1286
1286
|
)
|
|
1287
1287
|
] })
|
|
1288
1288
|
] })
|
|
1289
1289
|
] });
|
|
1290
1290
|
}
|
|
1291
|
-
function
|
|
1291
|
+
function Tt({ onClick: t, ariaLabel: e }) {
|
|
1292
1292
|
return /* @__PURE__ */ a(
|
|
1293
1293
|
"button",
|
|
1294
1294
|
{
|
|
@@ -1321,7 +1321,7 @@ function Lt({ onClick: t, ariaLabel: e }) {
|
|
|
1321
1321
|
}
|
|
1322
1322
|
);
|
|
1323
1323
|
}
|
|
1324
|
-
function
|
|
1324
|
+
function _e({
|
|
1325
1325
|
type: t,
|
|
1326
1326
|
placeholder: e,
|
|
1327
1327
|
value: r,
|
|
@@ -1346,7 +1346,7 @@ function ke({
|
|
|
1346
1346
|
n && /* @__PURE__ */ a("span", { class: "mt-1 ml-2 block text-sm text-red-600", children: n })
|
|
1347
1347
|
] });
|
|
1348
1348
|
}
|
|
1349
|
-
function
|
|
1349
|
+
function Pt({
|
|
1350
1350
|
placeholder: t,
|
|
1351
1351
|
value: e,
|
|
1352
1352
|
onInput: r,
|
|
@@ -1368,17 +1368,17 @@ function Tt({
|
|
|
1368
1368
|
i && /* @__PURE__ */ a("span", { class: "mt-1 ml-2 block text-sm text-red-600", children: i })
|
|
1369
1369
|
] });
|
|
1370
1370
|
}
|
|
1371
|
-
function
|
|
1371
|
+
function Et({ files: t, onChange: e, disabled: r }) {
|
|
1372
1372
|
const { t: i } = S(), n = O(null), [s, o] = v(!1), [c, l] = v(null), p = (u) => {
|
|
1373
1373
|
if (!u || r) return;
|
|
1374
1374
|
l(null);
|
|
1375
1375
|
const f = Array.from(u);
|
|
1376
|
-
if (t.length + f.length >
|
|
1377
|
-
l(i("support.too_many_files", "Up to {max} files", { max:
|
|
1376
|
+
if (t.length + f.length > ae) {
|
|
1377
|
+
l(i("support.too_many_files", "Up to {max} files", { max: ae }));
|
|
1378
1378
|
return;
|
|
1379
1379
|
}
|
|
1380
1380
|
const _ = f.filter(
|
|
1381
|
-
(h) =>
|
|
1381
|
+
(h) => ke.includes(h.type) && h.size <= At
|
|
1382
1382
|
);
|
|
1383
1383
|
if (_.length !== f.length) {
|
|
1384
1384
|
l(i("support.invalid_file", "Only JPEG/PNG/WebP, ≤ 10MB each"));
|
|
@@ -1406,7 +1406,7 @@ function Pt({ files: t, onChange: e, disabled: r }) {
|
|
|
1406
1406
|
children: [
|
|
1407
1407
|
/* @__PURE__ */ a("div", { class: "text-xs text-gray-500", children: i("support.dropzone_text", "Drop images here or click to select") }),
|
|
1408
1408
|
/* @__PURE__ */ a("div", { class: "mt-0.5 text-[11px] text-gray-400", children: i("support.file_requirements", "JPEG/PNG/WebP, up to {max} files, ≤ 10MB each", {
|
|
1409
|
-
max:
|
|
1409
|
+
max: ae
|
|
1410
1410
|
}) })
|
|
1411
1411
|
]
|
|
1412
1412
|
}
|
|
@@ -1417,7 +1417,7 @@ function Pt({ files: t, onChange: e, disabled: r }) {
|
|
|
1417
1417
|
ref: n,
|
|
1418
1418
|
type: "file",
|
|
1419
1419
|
multiple: !0,
|
|
1420
|
-
accept:
|
|
1420
|
+
accept: ke.join(","),
|
|
1421
1421
|
class: "hidden",
|
|
1422
1422
|
onChange: (u) => {
|
|
1423
1423
|
p(u.target.files), u.currentTarget.value = "";
|
|
@@ -1451,34 +1451,34 @@ function Pt({ files: t, onChange: e, disabled: r }) {
|
|
|
1451
1451
|
)) })
|
|
1452
1452
|
] });
|
|
1453
1453
|
}
|
|
1454
|
-
const
|
|
1454
|
+
const jt = {
|
|
1455
1455
|
day: "cta.get_plan_daily",
|
|
1456
1456
|
week: "cta.get_plan_weekly",
|
|
1457
1457
|
month: "cta.get_plan_monthly",
|
|
1458
1458
|
year: "cta.get_plan_yearly"
|
|
1459
|
-
},
|
|
1459
|
+
}, zt = {
|
|
1460
1460
|
day: "Get Daily Plan",
|
|
1461
1461
|
week: "Get Weekly Plan",
|
|
1462
1462
|
month: "Get Monthly Plan",
|
|
1463
1463
|
year: "Get Yearly Plan"
|
|
1464
1464
|
};
|
|
1465
|
-
function
|
|
1465
|
+
function Bt(t, e, r, i) {
|
|
1466
1466
|
if (e === "close") return i("cta.close", "Close");
|
|
1467
1467
|
if (!t) return i("cta.continue", "Continue");
|
|
1468
1468
|
if (!r && t.trial_days && t.interval && t.interval !== "lifetime")
|
|
1469
1469
|
return i("cta.start_trial", "Start {days}-Day Free Trial", { days: t.trial_days });
|
|
1470
1470
|
if (!t.interval || t.interval === "lifetime")
|
|
1471
1471
|
return i("cta.get_lifetime_access", "Get Lifetime Access");
|
|
1472
|
-
const n =
|
|
1473
|
-
return n ? i(n,
|
|
1474
|
-
interval:
|
|
1472
|
+
const n = jt[t.interval];
|
|
1473
|
+
return n ? i(n, zt[t.interval]) : i("cta.get_plan_generic", "Get {interval} Plan", {
|
|
1474
|
+
interval: Ot(t.interval)
|
|
1475
1475
|
});
|
|
1476
1476
|
}
|
|
1477
|
-
function
|
|
1477
|
+
function Ot(t) {
|
|
1478
1478
|
return t.length ? t[0].toUpperCase() + t.slice(1) : t;
|
|
1479
1479
|
}
|
|
1480
|
-
function
|
|
1481
|
-
const { t: r } = S(), [i, n] = v(!1), s = t.priceId ?? e.selectedPriceId, o = i || t.action === "checkout" && !s, c = s ? e.bootstrap.prices.find((f) => f.id === s) ?? null : null, l = e.bootstrap.user?.had_previous_trial ?? !1, p = t.label ??
|
|
1480
|
+
function Ft({ block: t, ctx: e }) {
|
|
1481
|
+
const { t: r } = S(), [i, n] = v(!1), s = t.priceId ?? e.selectedPriceId, o = i || t.action === "checkout" && !s, c = s ? e.bootstrap.prices.find((f) => f.id === s) ?? null : null, l = e.bootstrap.user?.had_previous_trial ?? !1, p = t.label ?? Bt(c, t.action, l, r);
|
|
1482
1482
|
return /* @__PURE__ */ d(
|
|
1483
1483
|
"button",
|
|
1484
1484
|
{
|
|
@@ -1515,7 +1515,7 @@ function Ot({ block: t, ctx: e }) {
|
|
|
1515
1515
|
}
|
|
1516
1516
|
);
|
|
1517
1517
|
}
|
|
1518
|
-
function
|
|
1518
|
+
function Rt({ ctx: t }) {
|
|
1519
1519
|
const { t: e } = S(), r = t.authSession, i = t.auth, [n, s] = v(!1), o = () => t.onAction("support");
|
|
1520
1520
|
if (r && !r.user.is_anonymous) {
|
|
1521
1521
|
const c = async () => {
|
|
@@ -1536,19 +1536,19 @@ function Ft({ ctx: t }) {
|
|
|
1536
1536
|
/* @__PURE__ */ a("b", { class: "font-medium text-gray-700", children: r.user.email })
|
|
1537
1537
|
] }),
|
|
1538
1538
|
/* @__PURE__ */ d("div", { class: "flex items-center justify-center gap-3", children: [
|
|
1539
|
-
/* @__PURE__ */ a(
|
|
1540
|
-
/* @__PURE__ */ a(
|
|
1541
|
-
/* @__PURE__ */ a(
|
|
1539
|
+
/* @__PURE__ */ a(W, { onClick: c, disabled: !i || n, children: n ? e("session.signing_out", "Signing out…") : e("session.sign_out", "Sign Out") }),
|
|
1540
|
+
/* @__PURE__ */ a(Se, {}),
|
|
1541
|
+
/* @__PURE__ */ a(W, { onClick: o, children: e("session.contact_support", "Contact Support") })
|
|
1542
1542
|
] })
|
|
1543
1543
|
] });
|
|
1544
1544
|
}
|
|
1545
1545
|
return /* @__PURE__ */ d("div", { class: "-mt-3 flex items-center justify-center gap-3 pt-1 text-center text-[13px]", children: [
|
|
1546
|
-
/* @__PURE__ */ a(
|
|
1547
|
-
/* @__PURE__ */ a(
|
|
1548
|
-
/* @__PURE__ */ a(
|
|
1546
|
+
/* @__PURE__ */ a(W, { onClick: () => t.onAction("restore"), children: e("session.restore_purchases", "Restore purchases") }),
|
|
1547
|
+
/* @__PURE__ */ a(Se, {}),
|
|
1548
|
+
/* @__PURE__ */ a(W, { onClick: o, children: e("session.contact_support", "Contact Support") })
|
|
1549
1549
|
] });
|
|
1550
1550
|
}
|
|
1551
|
-
function
|
|
1551
|
+
function W({
|
|
1552
1552
|
onClick: t,
|
|
1553
1553
|
disabled: e,
|
|
1554
1554
|
children: r
|
|
@@ -1565,10 +1565,10 @@ function G({
|
|
|
1565
1565
|
}
|
|
1566
1566
|
);
|
|
1567
1567
|
}
|
|
1568
|
-
function
|
|
1568
|
+
function Se() {
|
|
1569
1569
|
return /* @__PURE__ */ a("span", { class: "h-1 w-1 rounded-full bg-gray-300", "aria-hidden": "true" });
|
|
1570
1570
|
}
|
|
1571
|
-
function
|
|
1571
|
+
function Ut({ block: t }) {
|
|
1572
1572
|
return t.items.length ? /* @__PURE__ */ a("ul", { class: "flex flex-col gap-2.5", role: "list", children: t.items.map((e) => /* @__PURE__ */ d("li", { class: "flex items-start gap-3 text-sm text-gray-700", children: [
|
|
1573
1573
|
/* @__PURE__ */ a(
|
|
1574
1574
|
"svg",
|
|
@@ -1597,11 +1597,11 @@ function Rt({ block: t }) {
|
|
|
1597
1597
|
] })
|
|
1598
1598
|
] }, e.id)) }) : null;
|
|
1599
1599
|
}
|
|
1600
|
-
function
|
|
1601
|
-
const { t: e } = S(), r = t.title ?? e("pricing.money_back", "30-day money-back guarantee"), i = t.subtitle, n = (t.icon ?? "dollar_shield") !== "none", s =
|
|
1600
|
+
function Dt({ block: t }) {
|
|
1601
|
+
const { t: e } = S(), r = t.title ?? e("pricing.money_back", "30-day money-back guarantee"), i = t.subtitle, n = (t.icon ?? "dollar_shield") !== "none", s = Nt(r);
|
|
1602
1602
|
return /* @__PURE__ */ d("div", { class: "flex flex-col items-center gap-1.5 border-b-1 pb-4 mb-1 border-gray-100", children: [
|
|
1603
1603
|
/* @__PURE__ */ d("div", { class: "inline-flex items-center gap-2 text-[12px] text-gray-700", children: [
|
|
1604
|
-
n ? /* @__PURE__ */ a(
|
|
1604
|
+
n ? /* @__PURE__ */ a(Vt, {}) : null,
|
|
1605
1605
|
s ? /* @__PURE__ */ d("span", { children: [
|
|
1606
1606
|
/* @__PURE__ */ a("b", { class: "font-bold text-gray-900", children: s.bold }),
|
|
1607
1607
|
" ",
|
|
@@ -1611,11 +1611,11 @@ function Ut({ block: t }) {
|
|
|
1611
1611
|
i ? /* @__PURE__ */ a("span", { class: "text-center text-xs leading-relaxed text-gray-500", children: i }) : null
|
|
1612
1612
|
] });
|
|
1613
1613
|
}
|
|
1614
|
-
function
|
|
1614
|
+
function Nt(t) {
|
|
1615
1615
|
const e = t.match(/^(\d+[-\s]?days?)\s+(.+)$/i);
|
|
1616
1616
|
return e ? { bold: e[1], rest: e[2] } : null;
|
|
1617
1617
|
}
|
|
1618
|
-
function
|
|
1618
|
+
function Vt() {
|
|
1619
1619
|
return /* @__PURE__ */ d(
|
|
1620
1620
|
"svg",
|
|
1621
1621
|
{
|
|
@@ -1650,22 +1650,22 @@ function Nt() {
|
|
|
1650
1650
|
}
|
|
1651
1651
|
);
|
|
1652
1652
|
}
|
|
1653
|
-
const
|
|
1654
|
-
function
|
|
1653
|
+
const Re = 24, Ht = 16, $t = 2;
|
|
1654
|
+
function qt(t, e) {
|
|
1655
1655
|
const r = e * $t;
|
|
1656
|
-
let i =
|
|
1656
|
+
let i = Re;
|
|
1657
1657
|
for (t.style.fontSize = `${i}px`; t.scrollHeight > r && i > Ht; )
|
|
1658
1658
|
i -= 1, t.style.fontSize = `${i}px`;
|
|
1659
1659
|
}
|
|
1660
|
-
function
|
|
1660
|
+
function Gt({ block: t, ctx: e }) {
|
|
1661
1661
|
const r = t.level ?? 1, i = `h${r}`, n = r === 1 ? "text-[22px] sm:text-2xl font-semibold leading-tight text-center text-balance text-gray-800" : r === 2 ? "text-xl font-semibold leading-snug text-gray-900 tracking-tight" : "text-base font-medium text-gray-900", s = O(null), o = r === 1 && !!e.bootstrap.settings.title_auto_fit;
|
|
1662
1662
|
return j(() => {
|
|
1663
1663
|
if (!o || !s.current) return;
|
|
1664
|
-
const c = getComputedStyle(s.current), l = parseFloat(c.lineHeight) ||
|
|
1665
|
-
|
|
1664
|
+
const c = getComputedStyle(s.current), l = parseFloat(c.lineHeight) || Re * 1.5;
|
|
1665
|
+
qt(s.current, l);
|
|
1666
1666
|
}, [o, t.text]), /* @__PURE__ */ a(i, { ref: s, class: n, children: t.text });
|
|
1667
1667
|
}
|
|
1668
|
-
function
|
|
1668
|
+
function Wt(t) {
|
|
1669
1669
|
const e = t.local ?? { currency: t.currency, amount: t.amount };
|
|
1670
1670
|
if (t.interval === "year") {
|
|
1671
1671
|
const r = (t.interval_count ?? 1) * 12;
|
|
@@ -1673,7 +1673,7 @@ function Gt(t) {
|
|
|
1673
1673
|
}
|
|
1674
1674
|
return { amount: e.amount, currency: e.currency };
|
|
1675
1675
|
}
|
|
1676
|
-
function
|
|
1676
|
+
function oe(t, e) {
|
|
1677
1677
|
const r = t % 1 !== 0 ? 2 : 0;
|
|
1678
1678
|
try {
|
|
1679
1679
|
const i = new Intl.NumberFormat(void 0, {
|
|
@@ -1691,20 +1691,20 @@ function ae(t, e) {
|
|
|
1691
1691
|
return { currency: e, amount: String(t) };
|
|
1692
1692
|
}
|
|
1693
1693
|
}
|
|
1694
|
-
function
|
|
1695
|
-
const { amount: r, currency: i } =
|
|
1694
|
+
function ce(t, e) {
|
|
1695
|
+
const { amount: r, currency: i } = Wt(t);
|
|
1696
1696
|
if (!e) {
|
|
1697
|
-
const { currency: c, amount: l } =
|
|
1697
|
+
const { currency: c, amount: l } = oe(r, i);
|
|
1698
1698
|
return { currency: c, amount: l, originalAmount: null };
|
|
1699
1699
|
}
|
|
1700
|
-
const n = r * (1 - e / 100), s =
|
|
1700
|
+
const n = r * (1 - e / 100), s = oe(n, i), o = oe(r, i);
|
|
1701
1701
|
return {
|
|
1702
1702
|
currency: s.currency,
|
|
1703
1703
|
amount: s.amount,
|
|
1704
1704
|
originalAmount: `${o.currency}${o.amount}`
|
|
1705
1705
|
};
|
|
1706
1706
|
}
|
|
1707
|
-
function
|
|
1707
|
+
function Ue(t, e) {
|
|
1708
1708
|
if (t.label) return t.label.toUpperCase();
|
|
1709
1709
|
if (!t.interval || t.interval === "lifetime")
|
|
1710
1710
|
return e("pricing.plan_label.lifetime", "LIFETIME");
|
|
@@ -1716,14 +1716,14 @@ function Re(t, e) {
|
|
|
1716
1716
|
}[t.interval];
|
|
1717
1717
|
return i ? e(i.key, i.fallback) : `${t.interval.toUpperCase()} PLAN`;
|
|
1718
1718
|
}
|
|
1719
|
-
function
|
|
1719
|
+
function de(t, e) {
|
|
1720
1720
|
if (!t.interval || t.interval === "lifetime")
|
|
1721
1721
|
return e("pricing.interval.lifetime_short", "lifetime");
|
|
1722
1722
|
if (t.interval === "year") return e("pricing.interval.month", "month");
|
|
1723
1723
|
const r = t.interval_count ?? 1;
|
|
1724
1724
|
return r === 1 ? e(`pricing.interval.${t.interval}`, t.interval) : `${r} ${t.interval}s`;
|
|
1725
1725
|
}
|
|
1726
|
-
function
|
|
1726
|
+
function Zt({ block: t, ctx: e }) {
|
|
1727
1727
|
const { t: r } = S(), i = t.priceIds && t.priceIds.length > 0 ? new Set(t.priceIds) : null, n = e.bootstrap.prices.filter((o) => !i || i.has(o.id));
|
|
1728
1728
|
if (n.length === 0)
|
|
1729
1729
|
return /* @__PURE__ */ a("p", { class: "text-sm text-gray-500", children: r("pricing.no_prices", "No prices available.") });
|
|
@@ -1736,13 +1736,13 @@ function Wt({ block: t, ctx: e }) {
|
|
|
1736
1736
|
role: "radiogroup",
|
|
1737
1737
|
"aria-label": r("pricing.plans_aria", "Plans"),
|
|
1738
1738
|
children: n.map((o, c) => /* @__PURE__ */ a(
|
|
1739
|
-
|
|
1739
|
+
Yt,
|
|
1740
1740
|
{
|
|
1741
1741
|
price: o,
|
|
1742
1742
|
isLast: c === n.length - 1,
|
|
1743
1743
|
isPopular: t.popular_price_id === o.id,
|
|
1744
1744
|
popularLabel: s,
|
|
1745
|
-
offer:
|
|
1745
|
+
offer: $(e.bootstrap.offers, o.id, { readStart: N }),
|
|
1746
1746
|
selected: e.selectedPriceId === o.id,
|
|
1747
1747
|
onSelect: () => {
|
|
1748
1748
|
e.setSelectedPriceId(o.id), e.onAction("price_selected", { priceId: o.id, price: o });
|
|
@@ -1755,7 +1755,7 @@ function Wt({ block: t, ctx: e }) {
|
|
|
1755
1755
|
);
|
|
1756
1756
|
if (t.view === "horizontal") {
|
|
1757
1757
|
const o = Math.min(n.length, 3), c = n.some(
|
|
1758
|
-
(l) => (
|
|
1758
|
+
(l) => ($(e.bootstrap.offers, l.id, { readStart: N })?.discount_percent ?? 0) > 0
|
|
1759
1759
|
);
|
|
1760
1760
|
return /* @__PURE__ */ a(
|
|
1761
1761
|
"div",
|
|
@@ -1765,12 +1765,12 @@ function Wt({ block: t, ctx: e }) {
|
|
|
1765
1765
|
role: "radiogroup",
|
|
1766
1766
|
"aria-label": r("pricing.plans_aria", "Plans"),
|
|
1767
1767
|
children: n.map((l) => /* @__PURE__ */ a(
|
|
1768
|
-
|
|
1768
|
+
Xt,
|
|
1769
1769
|
{
|
|
1770
1770
|
price: l,
|
|
1771
1771
|
isPopular: t.popular_price_id === l.id,
|
|
1772
1772
|
popularLabel: s,
|
|
1773
|
-
offer:
|
|
1773
|
+
offer: $(e.bootstrap.offers, l.id, { readStart: N }),
|
|
1774
1774
|
reserveStrikeRow: c,
|
|
1775
1775
|
selected: e.selectedPriceId === l.id,
|
|
1776
1776
|
onSelect: () => {
|
|
@@ -1790,7 +1790,7 @@ function Wt({ block: t, ctx: e }) {
|
|
|
1790
1790
|
role: "radiogroup",
|
|
1791
1791
|
"aria-label": r("pricing.plans_aria", "Plans"),
|
|
1792
1792
|
children: n.map((o) => {
|
|
1793
|
-
const c = e.selectedPriceId === o.id, l = t.popular_price_id === o.id, u =
|
|
1793
|
+
const c = e.selectedPriceId === o.id, l = t.popular_price_id === o.id, u = $(e.bootstrap.offers, o.id, { readStart: N })?.discount_percent ?? null, { currency: f, amount: _, originalAmount: h } = ce(o, u);
|
|
1794
1794
|
return /* @__PURE__ */ d(
|
|
1795
1795
|
"button",
|
|
1796
1796
|
{
|
|
@@ -1846,7 +1846,7 @@ function Wt({ block: t, ctx: e }) {
|
|
|
1846
1846
|
),
|
|
1847
1847
|
/* @__PURE__ */ d("div", { class: "flex flex-1 flex-col gap-0.5", children: [
|
|
1848
1848
|
/* @__PURE__ */ d("div", { class: "flex flex-wrap items-center gap-x-2 gap-y-1", children: [
|
|
1849
|
-
/* @__PURE__ */ a("span", { class: "text-xs font-normal uppercase tracking-normal text-gray-800/70", children:
|
|
1849
|
+
/* @__PURE__ */ a("span", { class: "text-xs font-normal uppercase tracking-normal text-gray-800/70", children: Ue(o, r) }),
|
|
1850
1850
|
h ? (
|
|
1851
1851
|
// opacity-60 приглушает strike: глаз сначала ловит label
|
|
1852
1852
|
// и discount-badge, потом main price; original «бывшая цена»
|
|
@@ -1869,7 +1869,7 @@ function Wt({ block: t, ctx: e }) {
|
|
|
1869
1869
|
/* @__PURE__ */ d("span", { class: "text-sm font-normal text-gray-500", children: [
|
|
1870
1870
|
" ",
|
|
1871
1871
|
"/ ",
|
|
1872
|
-
|
|
1872
|
+
de(o, r)
|
|
1873
1873
|
] })
|
|
1874
1874
|
] }) }),
|
|
1875
1875
|
o.description ? /* @__PURE__ */ a("span", { class: "mt-1 text-xs leading-relaxed text-gray-500", children: o.description }) : null
|
|
@@ -1890,10 +1890,10 @@ function Wt({ block: t, ctx: e }) {
|
|
|
1890
1890
|
}
|
|
1891
1891
|
);
|
|
1892
1892
|
}
|
|
1893
|
-
function
|
|
1893
|
+
function Kt(t, e) {
|
|
1894
1894
|
return t.label ? t.label : !t.interval || t.interval === "lifetime" ? e("pricing.interval.lifetime_short", "lifetime") : e(`pricing.interval.${t.interval}`, t.interval);
|
|
1895
1895
|
}
|
|
1896
|
-
function
|
|
1896
|
+
function Yt({
|
|
1897
1897
|
price: t,
|
|
1898
1898
|
isLast: e,
|
|
1899
1899
|
isPopular: r,
|
|
@@ -1903,7 +1903,7 @@ function Kt({
|
|
|
1903
1903
|
onSelect: o,
|
|
1904
1904
|
t: c
|
|
1905
1905
|
}) {
|
|
1906
|
-
const l = n?.discount_percent ?? null, { currency: p, amount: u, originalAmount: f } =
|
|
1906
|
+
const l = n?.discount_percent ?? null, { currency: p, amount: u, originalAmount: f } = ce(t, l);
|
|
1907
1907
|
return /* @__PURE__ */ d(
|
|
1908
1908
|
"button",
|
|
1909
1909
|
{
|
|
@@ -1953,7 +1953,7 @@ function Kt({
|
|
|
1953
1953
|
].join(" "),
|
|
1954
1954
|
children: [
|
|
1955
1955
|
/* @__PURE__ */ d("div", { class: "flex flex-wrap items-center gap-1 gap-x-1.5", children: [
|
|
1956
|
-
/* @__PURE__ */ a("span", { class: "text-base font-normal capitalize text-gray-800", children:
|
|
1956
|
+
/* @__PURE__ */ a("span", { class: "text-base font-normal capitalize text-gray-800", children: Kt(t, c) }),
|
|
1957
1957
|
r ? (
|
|
1958
1958
|
// Pastel brand-mix pill — точно как `badge` в TelegramPricingRadio.
|
|
1959
1959
|
// Низкий visual weight: pill про "имя плана" (most popular), а не
|
|
@@ -1985,7 +1985,7 @@ function Kt({
|
|
|
1985
1985
|
/* @__PURE__ */ d("span", { class: "text-xs text-gray-400", children: [
|
|
1986
1986
|
" ",
|
|
1987
1987
|
"/ ",
|
|
1988
|
-
|
|
1988
|
+
de(t, c)
|
|
1989
1989
|
] })
|
|
1990
1990
|
] })
|
|
1991
1991
|
] })
|
|
@@ -1996,7 +1996,7 @@ function Kt({
|
|
|
1996
1996
|
}
|
|
1997
1997
|
);
|
|
1998
1998
|
}
|
|
1999
|
-
function
|
|
1999
|
+
function Xt({
|
|
2000
2000
|
price: t,
|
|
2001
2001
|
isPopular: e,
|
|
2002
2002
|
popularLabel: r,
|
|
@@ -2006,7 +2006,7 @@ function Yt({
|
|
|
2006
2006
|
onSelect: o,
|
|
2007
2007
|
t: c
|
|
2008
2008
|
}) {
|
|
2009
|
-
const l = i?.discount_percent ?? null, { currency: p, amount: u, originalAmount: f } =
|
|
2009
|
+
const l = i?.discount_percent ?? null, { currency: p, amount: u, originalAmount: f } = ce(t, l);
|
|
2010
2010
|
return /* @__PURE__ */ d(
|
|
2011
2011
|
"button",
|
|
2012
2012
|
{
|
|
@@ -2020,7 +2020,7 @@ function Yt({
|
|
|
2020
2020
|
].join(" "),
|
|
2021
2021
|
style: s ? { background: "color-mix(in srgb, var(--pw-accent) 6%, transparent)" } : void 0,
|
|
2022
2022
|
children: [
|
|
2023
|
-
/* @__PURE__ */ a("span", { class: "flex min-h-[2.4em] items-center text-[10px] font-normal uppercase leading-tight text-gray-800/70", children:
|
|
2023
|
+
/* @__PURE__ */ a("span", { class: "flex min-h-[2.4em] items-center text-[10px] font-normal uppercase leading-tight text-gray-800/70", children: Ue(t, c) }),
|
|
2024
2024
|
n ? /* @__PURE__ */ d("div", { class: "flex h-[22px] items-center justify-center gap-1.5", children: [
|
|
2025
2025
|
f ? /* @__PURE__ */ a("span", { class: "text-[12px] text-gray-400 line-through decoration-gray-400 decoration-[1.5px]", children: f }) : null,
|
|
2026
2026
|
l ? /* @__PURE__ */ d("span", { class: "rounded-md bg-emerald-100 px-1.5 py-0.5 text-[10px] font-bold leading-none text-emerald-700", children: [
|
|
@@ -2035,7 +2035,7 @@ function Yt({
|
|
|
2035
2035
|
] }),
|
|
2036
2036
|
/* @__PURE__ */ d("span", { class: "text-xs font-normal text-gray-500", children: [
|
|
2037
2037
|
"/ ",
|
|
2038
|
-
|
|
2038
|
+
de(t, c)
|
|
2039
2039
|
] }),
|
|
2040
2040
|
e ? /* @__PURE__ */ a(
|
|
2041
2041
|
"span",
|
|
@@ -2049,24 +2049,24 @@ function Yt({
|
|
|
2049
2049
|
}
|
|
2050
2050
|
);
|
|
2051
2051
|
}
|
|
2052
|
-
function
|
|
2052
|
+
function Jt({ block: t }) {
|
|
2053
2053
|
return /* @__PURE__ */ a("p", { class: "text-[0.9375rem] leading-relaxed text-gray-600", children: t.text });
|
|
2054
2054
|
}
|
|
2055
|
-
const
|
|
2055
|
+
const Qt = {
|
|
2056
2056
|
week: 0.25,
|
|
2057
2057
|
month: 1,
|
|
2058
2058
|
year: 12
|
|
2059
2059
|
};
|
|
2060
|
-
function
|
|
2060
|
+
function er(t, e) {
|
|
2061
2061
|
return t ? e(`pricing.interval.${t}`, t) : e("pricing.interval.period", "period");
|
|
2062
2062
|
}
|
|
2063
|
-
function
|
|
2063
|
+
function tr({ block: t, ctx: e }) {
|
|
2064
2064
|
const { t: r } = S();
|
|
2065
2065
|
if (!t.queries.length) return null;
|
|
2066
|
-
const n = e.bootstrap.prices.find((o) => o.id === e.selectedPriceId)?.interval ?? null, s = n ?
|
|
2066
|
+
const n = e.bootstrap.prices.find((o) => o.id === e.selectedPriceId)?.interval ?? null, s = n ? Qt[n] : void 0;
|
|
2067
2067
|
return /* @__PURE__ */ d("div", { class: "flex flex-col gap-2", children: [
|
|
2068
2068
|
/* @__PURE__ */ a("div", { class: "text-sm font-semibold text-gray-800", children: !n || n === "lifetime" ? r("pricing.included_total", "Included for lifetime:") : r("pricing.included_per", "Included per {interval}:", {
|
|
2069
|
-
interval:
|
|
2069
|
+
interval: er(n, r)
|
|
2070
2070
|
}) }),
|
|
2071
2071
|
/* @__PURE__ */ a("ul", { class: "flex flex-col gap-2", role: "list", children: t.queries.map((o) => {
|
|
2072
2072
|
const c = Number.isFinite(o.count) ? o.count : 0, l = s !== void 0 ? Math.round(c * s) : c;
|
|
@@ -2096,7 +2096,7 @@ function er({ block: t, ctx: e }) {
|
|
|
2096
2096
|
/* @__PURE__ */ a("span", { class: "font-semibold text-gray-900 text-sm", children: l }),
|
|
2097
2097
|
" ",
|
|
2098
2098
|
/* @__PURE__ */ a("span", { class: "text-sm text-gray-800", children: o.name }),
|
|
2099
|
-
o.desc ? /* @__PURE__ */ d(
|
|
2099
|
+
o.desc ? /* @__PURE__ */ d(le, { children: [
|
|
2100
2100
|
/* @__PURE__ */ a("br", {}),
|
|
2101
2101
|
/* @__PURE__ */ a("span", { class: "text-xs text-gray-400", children: o.desc })
|
|
2102
2102
|
] }) : null
|
|
@@ -2105,22 +2105,22 @@ function er({ block: t, ctx: e }) {
|
|
|
2105
2105
|
}) })
|
|
2106
2106
|
] });
|
|
2107
2107
|
}
|
|
2108
|
-
const
|
|
2109
|
-
heading:
|
|
2110
|
-
text:
|
|
2111
|
-
price_grid:
|
|
2112
|
-
cta_button:
|
|
2113
|
-
auth_panel:
|
|
2114
|
-
current_session:
|
|
2115
|
-
features_list:
|
|
2116
|
-
tokenization_gate:
|
|
2117
|
-
guarantee_badge:
|
|
2118
|
-
offer_banner:
|
|
2108
|
+
const rr = {
|
|
2109
|
+
heading: Gt,
|
|
2110
|
+
text: Jt,
|
|
2111
|
+
price_grid: Zt,
|
|
2112
|
+
cta_button: Ft,
|
|
2113
|
+
auth_panel: je,
|
|
2114
|
+
current_session: Rt,
|
|
2115
|
+
features_list: Ut,
|
|
2116
|
+
tokenization_gate: tr,
|
|
2117
|
+
guarantee_badge: Dt,
|
|
2118
|
+
offer_banner: Ct
|
|
2119
2119
|
};
|
|
2120
|
-
function
|
|
2121
|
-
const o =
|
|
2120
|
+
function ir({ layout: t, bootstrap: e, onAction: r, auth: i, authSession: n, hasTopBanner: s }) {
|
|
2121
|
+
const o = We(() => {
|
|
2122
2122
|
for (const k of t.blocks)
|
|
2123
|
-
if (k.type === "price_grid" && k.popular_price_id && e.prices.some((
|
|
2123
|
+
if (k.type === "price_grid" && k.popular_price_id && e.prices.some((m) => m.id === k.popular_price_id))
|
|
2124
2124
|
return k.popular_price_id;
|
|
2125
2125
|
return e.prices[0]?.id ?? null;
|
|
2126
2126
|
}, [t.blocks, e.prices]), [c, l] = v(o), p = {
|
|
@@ -2130,11 +2130,11 @@ function rr({ layout: t, bootstrap: e, onAction: r, auth: i, authSession: n, has
|
|
|
2130
2130
|
onAction: r,
|
|
2131
2131
|
auth: i,
|
|
2132
2132
|
authSession: n
|
|
2133
|
-
}, u = t.blocks.findIndex((k) => k.type === "cta_button"), f = u === -1 ? t.blocks : t.blocks.slice(0, u), _ = u === -1 ? [] : t.blocks.slice(u), h = (k,
|
|
2134
|
-
const A =
|
|
2135
|
-
return A ? /* @__PURE__ */ a(A, { block: k, ctx: p }, `${k.type}-${
|
|
2133
|
+
}, u = t.blocks.findIndex((k) => k.type === "cta_button"), f = u === -1 ? t.blocks : t.blocks.slice(0, u), _ = u === -1 ? [] : t.blocks.slice(u), h = (k, m) => {
|
|
2134
|
+
const A = rr[k.type];
|
|
2135
|
+
return A ? /* @__PURE__ */ a(A, { block: k, ctx: p }, `${k.type}-${m}`) : (typeof console < "u" && console.warn(`[paywall] unknown block type: ${k.type}`), null);
|
|
2136
2136
|
};
|
|
2137
|
-
return /* @__PURE__ */ d(
|
|
2137
|
+
return /* @__PURE__ */ d(le, { children: [
|
|
2138
2138
|
/* @__PURE__ */ a("div", { class: "flex-1 min-h-0 overflow-y-auto px-6 pb-3 pt-6 sm:px-8 sm:pb-4 sm:pt-8", children: /* @__PURE__ */ a("div", { class: "flex flex-col gap-6", children: f.map(h) }) }),
|
|
2139
2139
|
_.length > 0 ? (
|
|
2140
2140
|
// Тонкий shadow-top вместо border-t — создаёт depth, читается как
|
|
@@ -2145,19 +2145,19 @@ function rr({ layout: t, bootstrap: e, onAction: r, auth: i, authSession: n, has
|
|
|
2145
2145
|
{
|
|
2146
2146
|
class: "flex flex-col gap-4 bg-white px-6 pb-6 pt-3 sm:px-8",
|
|
2147
2147
|
style: { boxShadow: "0 -4px 12px -4px rgba(15,23,42,0.06)" },
|
|
2148
|
-
children: _.map((k,
|
|
2148
|
+
children: _.map((k, m) => h(k, f.length + m))
|
|
2149
2149
|
}
|
|
2150
2150
|
)
|
|
2151
2151
|
) : null
|
|
2152
2152
|
] });
|
|
2153
2153
|
}
|
|
2154
|
-
function
|
|
2154
|
+
function nr(t, e, r, i) {
|
|
2155
2155
|
return t ? i ? { open: !0, view: "purchased", error: null, processing: !1 } : e.status === "idle" || e.status === "loading" ? { open: !0, view: "loading", error: null, processing: !1 } : e.status === "error" ? { open: !0, view: "error", error: e.error, processing: !1 } : r.kind === "support" ? { open: !0, view: "support", error: null, processing: !1 } : r.kind === "auth_gate" ? { open: !0, view: "auth", error: null, processing: !1 } : r.kind === "awaiting_payment" ? { open: !0, view: "awaiting_payment", error: null, processing: !1 } : r.kind === "popup_blocked" ? { open: !0, view: "popup_blocked", error: null, processing: !1 } : r.kind === "purchase_success" ? { open: !0, view: "purchased", error: null, processing: !1 } : r.kind === "verifying" ? { open: !0, view: "loading", error: null, processing: !1 } : { open: !0, view: "layout", error: null, processing: !1 } : { open: !1, view: null, error: null, processing: !1 };
|
|
2156
2156
|
}
|
|
2157
|
-
function
|
|
2157
|
+
function ar(t, e) {
|
|
2158
2158
|
return t.open === e.open && t.view === e.view && t.error === e.error && t.processing === e.processing;
|
|
2159
2159
|
}
|
|
2160
|
-
function
|
|
2160
|
+
function or({
|
|
2161
2161
|
client: t,
|
|
2162
2162
|
open: e,
|
|
2163
2163
|
onClose: r,
|
|
@@ -2172,9 +2172,9 @@ function ar({
|
|
|
2172
2172
|
inline: f,
|
|
2173
2173
|
locale: _
|
|
2174
2174
|
}) {
|
|
2175
|
-
const [h, k] = v({ status: "idle" }), [
|
|
2175
|
+
const [h, k] = v({ status: "idle" }), [m, A] = v(
|
|
2176
2176
|
() => t.auth?.getCachedSession() ?? null
|
|
2177
|
-
), [b,
|
|
2177
|
+
), [b, w] = v(() => n === "support" ? { kind: "support", origin: "standalone" } : n === "auth" ? o ? {
|
|
2178
2178
|
kind: "auth_gate",
|
|
2179
2179
|
pendingCheckout: { priceId: o, direct: !0 },
|
|
2180
2180
|
origin: "standalone",
|
|
@@ -2190,8 +2190,8 @@ function ar({
|
|
|
2190
2190
|
} : { kind: "layout" }), C = n === "awaiting_payment" || n === "popup_blocked" || n === "auth" && !!o, I = O(!1), z = O(null);
|
|
2191
2191
|
j(() => {
|
|
2192
2192
|
if (!u) return;
|
|
2193
|
-
const x =
|
|
2194
|
-
g &&
|
|
2193
|
+
const x = nr(e, h, b, l), g = z.current;
|
|
2194
|
+
g && ar(g, x) || (z.current = x, u(x));
|
|
2195
2195
|
}, [e, h, b, l, u]), j(() => {
|
|
2196
2196
|
if (t.auth)
|
|
2197
2197
|
return t.auth.onAuthChange((x, g) => A(g));
|
|
@@ -2213,7 +2213,7 @@ function ar({
|
|
|
2213
2213
|
priceId: o ?? null,
|
|
2214
2214
|
sessionId: null,
|
|
2215
2215
|
restored: !0
|
|
2216
|
-
}),
|
|
2216
|
+
}), w({ kind: "purchase_success", restored: !0 }));
|
|
2217
2217
|
}).catch((g) => {
|
|
2218
2218
|
if (x) return;
|
|
2219
2219
|
const y = g instanceof L ? g : new L("unknown", "Failed to load paywall", { cause: g });
|
|
@@ -2221,21 +2221,21 @@ function ar({
|
|
|
2221
2221
|
}), () => {
|
|
2222
2222
|
x = !0;
|
|
2223
2223
|
};
|
|
2224
|
-
}, [e, t]),
|
|
2224
|
+
}, [e, t]), Ze(() => {
|
|
2225
2225
|
if (!e) {
|
|
2226
|
-
|
|
2226
|
+
w({ kind: "layout" }), I.current = !1;
|
|
2227
2227
|
return;
|
|
2228
2228
|
}
|
|
2229
|
-
n === "support" ?
|
|
2229
|
+
n === "support" ? w({ kind: "support", origin: "standalone" }) : n === "auth" ? w(o ? {
|
|
2230
2230
|
kind: "auth_gate",
|
|
2231
2231
|
pendingCheckout: { priceId: o, direct: !0 },
|
|
2232
2232
|
origin: "standalone",
|
|
2233
2233
|
intent: "preauth"
|
|
2234
|
-
} : { kind: "auth_gate", origin: "standalone" }) : n === "awaiting_payment" && o && c ?
|
|
2234
|
+
} : { kind: "auth_gate", origin: "standalone" }) : n === "awaiting_payment" && o && c ? w({
|
|
2235
2235
|
kind: "awaiting_payment",
|
|
2236
2236
|
priceId: o,
|
|
2237
2237
|
url: c
|
|
2238
|
-
}) : n === "popup_blocked" && o && c &&
|
|
2238
|
+
}) : n === "popup_blocked" && o && c && w({
|
|
2239
2239
|
kind: "popup_blocked",
|
|
2240
2240
|
priceId: o,
|
|
2241
2241
|
url: c
|
|
@@ -2243,32 +2243,32 @@ function ar({
|
|
|
2243
2243
|
}, [e, n, o, c]);
|
|
2244
2244
|
const M = async (x) => {
|
|
2245
2245
|
try {
|
|
2246
|
-
const g = t.getCachedOffers?.() ?? null, y = g ?
|
|
2246
|
+
const g = t.getCachedOffers?.() ?? null, y = g ? $(g, x, { readStart: N }) : null, E = await t.createCheckout({
|
|
2247
2247
|
priceId: x,
|
|
2248
2248
|
offerId: y?.id,
|
|
2249
2249
|
ignoreActivePurchase: p === !0
|
|
2250
2250
|
});
|
|
2251
2251
|
if (i("checkout_started", { priceId: x, url: E.url, acquiring: E.acquiring }), typeof window > "u" || !E.url) return;
|
|
2252
|
-
const
|
|
2253
|
-
if (
|
|
2252
|
+
const H = window.open(E.url, "_blank");
|
|
2253
|
+
if (H) {
|
|
2254
2254
|
try {
|
|
2255
|
-
|
|
2255
|
+
H.opener = null;
|
|
2256
2256
|
} catch {
|
|
2257
2257
|
}
|
|
2258
|
-
|
|
2258
|
+
w({ kind: "awaiting_payment", priceId: x, url: E.url });
|
|
2259
2259
|
} else
|
|
2260
|
-
|
|
2260
|
+
w({ kind: "popup_blocked", priceId: x, url: E.url });
|
|
2261
2261
|
} catch (g) {
|
|
2262
2262
|
if (g instanceof L && g.code === "already_purchased") {
|
|
2263
2263
|
try {
|
|
2264
2264
|
await t.getUser({ force: !0 });
|
|
2265
2265
|
} catch {
|
|
2266
2266
|
}
|
|
2267
|
-
i("purchase_completed", { priceId: x, sessionId: null, restored: !0 }), C ? r() :
|
|
2267
|
+
i("purchase_completed", { priceId: x, sessionId: null, restored: !0 }), C ? r() : w({ kind: "purchase_success", restored: !0 });
|
|
2268
2268
|
return;
|
|
2269
2269
|
}
|
|
2270
2270
|
const y = g instanceof L ? g : new L("checkout_failed", "Checkout failed", { cause: g });
|
|
2271
|
-
i("error", y), C ? r() :
|
|
2271
|
+
i("error", y), C ? r() : w({ kind: "layout" });
|
|
2272
2272
|
}
|
|
2273
2273
|
}, F = (x, g) => {
|
|
2274
2274
|
if (typeof window > "u") return;
|
|
@@ -2278,14 +2278,14 @@ function ar({
|
|
|
2278
2278
|
y.opener = null;
|
|
2279
2279
|
} catch {
|
|
2280
2280
|
}
|
|
2281
|
-
|
|
2281
|
+
w({ kind: "awaiting_payment", priceId: x, url: g });
|
|
2282
2282
|
}
|
|
2283
2283
|
};
|
|
2284
2284
|
j(() => {
|
|
2285
|
-
if (b.kind !== "auth_gate" || !
|
|
2285
|
+
if (b.kind !== "auth_gate" || !m || m.user.is_anonymous || I.current) return;
|
|
2286
2286
|
I.current = !0;
|
|
2287
2287
|
const x = b.pendingCheckout, g = b.origin;
|
|
2288
|
-
|
|
2288
|
+
w({ kind: "verifying" }), (async () => {
|
|
2289
2289
|
if (!p)
|
|
2290
2290
|
try {
|
|
2291
2291
|
if ((await t.getUser({ force: !0 })).has_active_subscription) {
|
|
@@ -2293,20 +2293,20 @@ function ar({
|
|
|
2293
2293
|
priceId: x?.priceId ?? null,
|
|
2294
2294
|
sessionId: null,
|
|
2295
2295
|
restored: !0
|
|
2296
|
-
}), x?.direct ? r() :
|
|
2296
|
+
}), x?.direct ? r() : w({ kind: "purchase_success", restored: !0 });
|
|
2297
2297
|
return;
|
|
2298
2298
|
}
|
|
2299
2299
|
} catch {
|
|
2300
2300
|
}
|
|
2301
2301
|
if (!x) {
|
|
2302
|
-
g === "standalone" ? r() :
|
|
2302
|
+
g === "standalone" ? r() : w({ kind: "layout" });
|
|
2303
2303
|
return;
|
|
2304
2304
|
}
|
|
2305
2305
|
await M(x.priceId);
|
|
2306
2306
|
})().finally(() => {
|
|
2307
2307
|
I.current = !1;
|
|
2308
2308
|
});
|
|
2309
|
-
}, [
|
|
2309
|
+
}, [m, b]);
|
|
2310
2310
|
const R = async (x, g) => {
|
|
2311
2311
|
if (x === "close") {
|
|
2312
2312
|
r();
|
|
@@ -2320,11 +2320,11 @@ function ar({
|
|
|
2320
2320
|
if (!t.auth) return;
|
|
2321
2321
|
const y = t.auth.getCachedSession();
|
|
2322
2322
|
if (y && !y.user.is_anonymous) return;
|
|
2323
|
-
|
|
2323
|
+
w({ kind: "auth_gate", intent: "restore" });
|
|
2324
2324
|
return;
|
|
2325
2325
|
}
|
|
2326
2326
|
if (x === "support") {
|
|
2327
|
-
|
|
2327
|
+
w({ kind: "support", origin: "layout" });
|
|
2328
2328
|
return;
|
|
2329
2329
|
}
|
|
2330
2330
|
if (x === "checkout" && h.status === "ready") {
|
|
@@ -2333,14 +2333,14 @@ function ar({
|
|
|
2333
2333
|
i("error", new L("no_price", "No price selected"));
|
|
2334
2334
|
return;
|
|
2335
2335
|
}
|
|
2336
|
-
const E = h.data.settings.checkout_mode ?? "guest",
|
|
2337
|
-
if (E === "preauth" && !!t.auth && !
|
|
2338
|
-
|
|
2336
|
+
const E = h.data.settings.checkout_mode ?? "guest", H = t.auth?.getCachedSession() ?? null, De = !!H && !H.user.is_anonymous;
|
|
2337
|
+
if (E === "preauth" && !!t.auth && !De) {
|
|
2338
|
+
w({ kind: "auth_gate", pendingCheckout: { priceId: y } });
|
|
2339
2339
|
return;
|
|
2340
2340
|
}
|
|
2341
2341
|
await M(y);
|
|
2342
2342
|
}
|
|
2343
|
-
}, U = h.status === "ready" ? h.data.settings.brand_color : null, P = h.status === "ready" ? h.data.settings.allow_close !== !1 : !0, D = b.kind === "layout" && h.status === "ready" ?
|
|
2343
|
+
}, U = h.status === "ready" ? h.data.settings.brand_color : null, P = h.status === "ready" ? h.data.settings.allow_close !== !1 : !0, D = b.kind === "layout" && h.status === "ready" ? ze(h.data.offers) : null, B = D ? /* @__PURE__ */ a(It, { offer: D }) : null, K = {
|
|
2344
2344
|
type: "auth_panel",
|
|
2345
2345
|
// Заголовок не задаём — AuthGate сам решит по intent'у (restore →
|
|
2346
2346
|
// "Restore Purchases", остальные → дефолтный "Welcome back!").
|
|
@@ -2350,47 +2350,47 @@ function ar({
|
|
|
2350
2350
|
// чем хотим показывать "Signed in as ..." промежуточным экраном.
|
|
2351
2351
|
hide_when_authenticated: !1,
|
|
2352
2352
|
providers: h.status === "ready" ? h.data.settings.auth_providers : void 0
|
|
2353
|
-
},
|
|
2354
|
-
|
|
2353
|
+
}, q = b.kind === "support" ? /* @__PURE__ */ a(
|
|
2354
|
+
Lt,
|
|
2355
2355
|
{
|
|
2356
2356
|
client: t,
|
|
2357
|
-
authSession:
|
|
2357
|
+
authSession: m,
|
|
2358
2358
|
origin: b.origin,
|
|
2359
2359
|
onBack: () => {
|
|
2360
|
-
b.origin === "standalone" ? r() :
|
|
2360
|
+
b.origin === "standalone" ? r() : w({ kind: "layout" });
|
|
2361
2361
|
}
|
|
2362
2362
|
}
|
|
2363
|
-
) : null,
|
|
2364
|
-
return /* @__PURE__ */ a(
|
|
2365
|
-
|
|
2363
|
+
) : null, Y = b.kind === "auth_gate" && b.origin !== "standalone" || b.kind === "support", X = h.status === "ready" ? h.data : null;
|
|
2364
|
+
return /* @__PURE__ */ a(nt, { bootstrap: X, forceLocale: _, children: /* @__PURE__ */ a(
|
|
2365
|
+
at,
|
|
2366
2366
|
{
|
|
2367
2367
|
open: e,
|
|
2368
2368
|
onClose: r,
|
|
2369
2369
|
brandColor: U,
|
|
2370
2370
|
topBanner: B,
|
|
2371
2371
|
allowClose: P,
|
|
2372
|
-
hideCloseButton:
|
|
2372
|
+
hideCloseButton: Y,
|
|
2373
2373
|
inline: f,
|
|
2374
2374
|
labelledBy: "pw-title",
|
|
2375
|
-
children: l ? /* @__PURE__ */ a(
|
|
2376
|
-
|
|
2375
|
+
children: l ? /* @__PURE__ */ a(Ce, { onContinue: r }) : b.kind === "purchase_success" ? /* @__PURE__ */ a(Ce, { restored: b.restored, onContinue: r }) : q || (h.status === "loading" || h.status === "idle" || b.kind === "verifying" ? /* @__PURE__ */ a(sr, { verifying: b.kind === "verifying" }) : h.status === "error" ? /* @__PURE__ */ a(lr, { message: h.error.message }) : b.kind === "auth_gate" && t.auth ? /* @__PURE__ */ a(
|
|
2376
|
+
vt,
|
|
2377
2377
|
{
|
|
2378
|
-
block:
|
|
2378
|
+
block: K,
|
|
2379
2379
|
bootstrap: h.data,
|
|
2380
2380
|
auth: t.auth,
|
|
2381
|
-
authSession:
|
|
2381
|
+
authSession: m,
|
|
2382
2382
|
showBack: b.origin !== "standalone",
|
|
2383
2383
|
intent: b.intent ?? (b.origin === "standalone" ? "standalone" : "preauth"),
|
|
2384
2384
|
initialMode: b.origin === "standalone" ? s : void 0,
|
|
2385
2385
|
onBack: () => {
|
|
2386
|
-
b.origin === "standalone" ? r() :
|
|
2386
|
+
b.origin === "standalone" ? r() : w({ kind: "layout" });
|
|
2387
2387
|
}
|
|
2388
2388
|
}
|
|
2389
2389
|
) : b.kind === "awaiting_payment" ? /* @__PURE__ */ a(
|
|
2390
|
-
|
|
2390
|
+
dr,
|
|
2391
2391
|
{
|
|
2392
2392
|
client: t,
|
|
2393
|
-
onBack: () =>
|
|
2393
|
+
onBack: () => w({ kind: "layout" }),
|
|
2394
2394
|
onReopen: () => {
|
|
2395
2395
|
if (typeof window > "u") return;
|
|
2396
2396
|
const x = window.open(b.url, "_blank");
|
|
@@ -2402,27 +2402,27 @@ function ar({
|
|
|
2402
2402
|
},
|
|
2403
2403
|
onRetry: () => M(b.priceId)
|
|
2404
2404
|
}
|
|
2405
|
-
) : b.kind === "popup_blocked" ? /* @__PURE__ */ a(
|
|
2406
|
-
|
|
2405
|
+
) : b.kind === "popup_blocked" ? /* @__PURE__ */ a(cr, { onReopen: () => F(b.priceId, b.url) }) : /* @__PURE__ */ a(
|
|
2406
|
+
ir,
|
|
2407
2407
|
{
|
|
2408
2408
|
layout: h.data.layout,
|
|
2409
2409
|
bootstrap: h.data,
|
|
2410
2410
|
onAction: R,
|
|
2411
2411
|
auth: t.auth,
|
|
2412
|
-
authSession:
|
|
2412
|
+
authSession: m
|
|
2413
2413
|
}
|
|
2414
2414
|
))
|
|
2415
2415
|
}
|
|
2416
2416
|
) });
|
|
2417
2417
|
}
|
|
2418
|
-
function
|
|
2418
|
+
function sr({ verifying: t }) {
|
|
2419
2419
|
const { t: e } = S();
|
|
2420
2420
|
return /* @__PURE__ */ d("div", { class: "flex flex-col items-center justify-center gap-3 py-12", children: [
|
|
2421
2421
|
/* @__PURE__ */ a("span", { class: "inline-block h-7 w-7 animate-spin rounded-full border-[2.5px] border-gray-200 border-t-[var(--pw-accent)]" }),
|
|
2422
2422
|
/* @__PURE__ */ a("span", { class: "text-xs font-medium tracking-wide text-gray-500", children: t ? e("modal.verifying_subscription", "Checking your subscription…") : e("modal.loading", "Loading…") })
|
|
2423
2423
|
] });
|
|
2424
2424
|
}
|
|
2425
|
-
function
|
|
2425
|
+
function lr({ message: t }) {
|
|
2426
2426
|
const { t: e } = S();
|
|
2427
2427
|
return /* @__PURE__ */ d("div", { class: "flex flex-col items-center gap-2 py-8 text-center", children: [
|
|
2428
2428
|
/* @__PURE__ */ a("div", { class: "flex h-11 w-11 items-center justify-center rounded-full bg-red-50", children: /* @__PURE__ */ d("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
|
|
@@ -2433,7 +2433,7 @@ function sr({ message: t }) {
|
|
|
2433
2433
|
/* @__PURE__ */ a("p", { class: "text-xs leading-relaxed text-gray-500", children: t })
|
|
2434
2434
|
] });
|
|
2435
2435
|
}
|
|
2436
|
-
function
|
|
2436
|
+
function cr({ onReopen: t }) {
|
|
2437
2437
|
const { t: e } = S();
|
|
2438
2438
|
return /* @__PURE__ */ d("div", { class: "flex flex-col items-center gap-3 py-8 text-center", children: [
|
|
2439
2439
|
/* @__PURE__ */ a(
|
|
@@ -2500,7 +2500,7 @@ function lr({ onReopen: t }) {
|
|
|
2500
2500
|
)
|
|
2501
2501
|
] });
|
|
2502
2502
|
}
|
|
2503
|
-
function
|
|
2503
|
+
function dr({
|
|
2504
2504
|
client: t,
|
|
2505
2505
|
onBack: e,
|
|
2506
2506
|
onReopen: r,
|
|
@@ -2601,20 +2601,19 @@ function cr({
|
|
|
2601
2601
|
)
|
|
2602
2602
|
] });
|
|
2603
2603
|
}
|
|
2604
|
-
function
|
|
2604
|
+
function Ce({
|
|
2605
2605
|
onContinue: t,
|
|
2606
2606
|
restored: e = !1
|
|
2607
2607
|
}) {
|
|
2608
2608
|
const { t: r } = S();
|
|
2609
|
-
return /* @__PURE__ */ d("div", { class: "flex flex-col items-center gap-
|
|
2609
|
+
return /* @__PURE__ */ d("div", { class: "flex flex-col items-center gap-4 py-6 text-center", children: [
|
|
2610
2610
|
/* @__PURE__ */ a(
|
|
2611
2611
|
"div",
|
|
2612
2612
|
{
|
|
2613
|
-
class: "flex h-14 w-14 items-center justify-center rounded-full
|
|
2613
|
+
class: "flex h-14 w-14 items-center justify-center rounded-full",
|
|
2614
2614
|
style: {
|
|
2615
2615
|
background: "linear-gradient(135deg, #4ade80, #16a34a)",
|
|
2616
2616
|
color: "#fff",
|
|
2617
|
-
// emerald ring with low alpha for a halo effect
|
|
2618
2617
|
boxShadow: "0 0 0 8px rgba(74,222,128,0.12), 0 8px 20px -6px rgba(22,163,74,0.45)"
|
|
2619
2618
|
},
|
|
2620
2619
|
"aria-hidden": "true",
|
|
@@ -2630,8 +2629,8 @@ function Se({
|
|
|
2630
2629
|
) })
|
|
2631
2630
|
}
|
|
2632
2631
|
),
|
|
2633
|
-
/* @__PURE__ */ a("p", { id: "pw-title", class: "mt-1 text-
|
|
2634
|
-
/* @__PURE__ */ a("p", { class: "text-
|
|
2632
|
+
/* @__PURE__ */ a("p", { id: "pw-title", class: "mt-1 text-3xl font-bold tracking-tight text-gray-900", children: e ? r("modal.purchase_restored_title", "Subscription restored") : r("modal.purchase_success_title", "Payment received") }),
|
|
2633
|
+
/* @__PURE__ */ a("p", { class: "text-base leading-relaxed text-gray-600", children: e ? r(
|
|
2635
2634
|
"modal.purchase_restored_subtitle",
|
|
2636
2635
|
"Welcome back — your subscription is already active."
|
|
2637
2636
|
) : r("modal.purchase_success_subtitle", "Your subscription is now active.") }),
|
|
@@ -2640,27 +2639,27 @@ function Se({
|
|
|
2640
2639
|
{
|
|
2641
2640
|
type: "button",
|
|
2642
2641
|
onClick: t,
|
|
2643
|
-
class: "mt-
|
|
2642
|
+
class: "pw-cta-shimmer relative mt-2 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] focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[var(--pw-accent)]",
|
|
2644
2643
|
style: {
|
|
2645
|
-
background: "linear-gradient(
|
|
2646
|
-
boxShadow: "0
|
|
2644
|
+
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%)",
|
|
2645
|
+
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)"
|
|
2647
2646
|
},
|
|
2648
|
-
children: r("modal.continue", "Continue")
|
|
2647
|
+
children: /* @__PURE__ */ a("span", { class: "relative z-10", children: r("modal.continue", "Continue") })
|
|
2649
2648
|
}
|
|
2650
2649
|
)
|
|
2651
2650
|
] });
|
|
2652
2651
|
}
|
|
2653
|
-
const
|
|
2654
|
-
class
|
|
2652
|
+
const ur = 10 * 6e4, pr = 5e3, hr = 3e4;
|
|
2653
|
+
class gr {
|
|
2655
2654
|
constructor(e) {
|
|
2656
2655
|
this.timer = null, this.timeoutTimer = null, this.visibilityHandler = null, this.focusHandler = null, this.messageHandler = null, this.stopped = !1, this.checking = !1, this.opts = {
|
|
2657
2656
|
client: e.client,
|
|
2658
2657
|
onActive: e.onActive,
|
|
2659
2658
|
onTimeout: e.onTimeout ?? (() => {
|
|
2660
2659
|
}),
|
|
2661
|
-
timeoutMs: e.timeoutMs ??
|
|
2662
|
-
visibleIntervalMs: e.visibleIntervalMs ??
|
|
2663
|
-
hiddenIntervalMs: e.hiddenIntervalMs ??
|
|
2660
|
+
timeoutMs: e.timeoutMs ?? ur,
|
|
2661
|
+
visibleIntervalMs: e.visibleIntervalMs ?? pr,
|
|
2662
|
+
hiddenIntervalMs: e.hiddenIntervalMs ?? hr
|
|
2664
2663
|
};
|
|
2665
2664
|
}
|
|
2666
2665
|
start() {
|
|
@@ -2699,24 +2698,24 @@ class hr {
|
|
|
2699
2698
|
!r || typeof r != "object" || r.type === "paywall_purchase" && this.check();
|
|
2700
2699
|
}
|
|
2701
2700
|
}
|
|
2702
|
-
function
|
|
2701
|
+
function fr() {
|
|
2703
2702
|
return !(typeof document > "u" || typeof window > "u" || typeof location < "u" && location.protocol === "chrome-extension:");
|
|
2704
2703
|
}
|
|
2705
|
-
const
|
|
2704
|
+
const se = {
|
|
2706
2705
|
open: !1,
|
|
2707
2706
|
view: null,
|
|
2708
2707
|
error: null,
|
|
2709
2708
|
processing: !1
|
|
2710
|
-
},
|
|
2709
|
+
}, V = {
|
|
2711
2710
|
status: "paywall_status",
|
|
2712
2711
|
priceId: "paywall_price_id",
|
|
2713
2712
|
sessionId: "paywall_session_id"
|
|
2714
2713
|
};
|
|
2715
|
-
class
|
|
2714
|
+
class Ar {
|
|
2716
2715
|
constructor(e) {
|
|
2717
|
-
this.handle = null, this.isOpen = !1, this.listeners = /* @__PURE__ */ new Map(), this.userUnsub = null, this.authUnsub = null, this.watcher = null, this.tracker = null, this.purchased = !1, this.trialStore = null, this.trialStoreConfig = null, this.lastTrialStatus = null, this.trialExpiredFired = !1, this.lastVisibility = null, this.currentState =
|
|
2718
|
-
const { auth: r, ownsAuth: i } =
|
|
2719
|
-
this.auth = r, this.ownsAuth = i, this.billing = e.client ?? new
|
|
2716
|
+
this.handle = null, this.isOpen = !1, this.listeners = /* @__PURE__ */ new Map(), this.userUnsub = null, this.authUnsub = null, this.watcher = null, this.tracker = null, this.purchased = !1, this.lastMountedView = null, this.trialStore = null, this.trialStoreConfig = null, this.lastTrialStatus = null, this.trialExpiredFired = !1, this.lastVisibility = null, this.currentState = se, this.stateListeners = /* @__PURE__ */ new Set();
|
|
2717
|
+
const { auth: r, ownsAuth: i } = mr(e);
|
|
2718
|
+
this.auth = r, this.ownsAuth = i, this.billing = e.client ?? new Ne({ ...e, auth: this.auth }), this.host = e.host, this.shadowMode = e.shadowMode ?? "closed", this.mountThenLoad = e.mountThenLoad ?? !0, this.inline = e.inline === !0, this.forceLocale = e.locale ?? null, this.userUnsub = this.billing.onUserChange((n) => {
|
|
2720
2719
|
this.emit("userChange", n);
|
|
2721
2720
|
}), this.auth && (this.authUnsub = this.auth.onAuthChange((n, s) => {
|
|
2722
2721
|
this.emit("authChange", { event: n, session: s });
|
|
@@ -2727,7 +2726,7 @@ class Ir {
|
|
|
2727
2726
|
const r = typeof e == "object" && e !== null ? e : {};
|
|
2728
2727
|
if (r.enabled === !1) return;
|
|
2729
2728
|
const i = r.endpoint ?? `${this.billing.apiOrigin}/api/v1/paywall/${this.billing.paywallId}/events`;
|
|
2730
|
-
this.tracker = new
|
|
2729
|
+
this.tracker = new Ve({
|
|
2731
2730
|
endpoint: i,
|
|
2732
2731
|
paywallId: this.billing.paywallId,
|
|
2733
2732
|
capabilities: this.billing.capabilities,
|
|
@@ -2738,14 +2737,15 @@ class Ir {
|
|
|
2738
2737
|
maxBufferSize: r.maxBufferSize,
|
|
2739
2738
|
fetch: r.fetch,
|
|
2740
2739
|
sendBeacon: r.sendBeacon
|
|
2741
|
-
}), this.on("open", () =>
|
|
2742
|
-
"
|
|
2743
|
-
|
|
2740
|
+
}), this.on("open", () => {
|
|
2741
|
+
this.lastMountedView === "layout" && this.tracker?.track("paywall_opened");
|
|
2742
|
+
}), this.on("ready", (n) => {
|
|
2743
|
+
this.lastMountedView === "layout" && this.tracker?.track("paywall_viewed", {
|
|
2744
2744
|
is_test_mode: n.settings.is_test_mode,
|
|
2745
2745
|
prices_count: n.prices.length,
|
|
2746
2746
|
offers_count: n.offers.length
|
|
2747
|
-
})
|
|
2748
|
-
), this.on(
|
|
2747
|
+
});
|
|
2748
|
+
}), this.on(
|
|
2749
2749
|
"price_selected",
|
|
2750
2750
|
(n) => this.tracker?.track("price_selected", { price_id: n.priceId })
|
|
2751
2751
|
), this.on(
|
|
@@ -2763,7 +2763,9 @@ class Ir {
|
|
|
2763
2763
|
), this.on(
|
|
2764
2764
|
"purchase_failed",
|
|
2765
2765
|
(n) => this.tracker?.track("purchase_failed", { reason: n.reason })
|
|
2766
|
-
), this.on("close", () =>
|
|
2766
|
+
), this.on("close", () => {
|
|
2767
|
+
this.lastMountedView === "layout" && this.tracker?.track("paywall_closed");
|
|
2768
|
+
}), this.on(
|
|
2767
2769
|
"trial_blocked",
|
|
2768
2770
|
(n) => this.tracker?.track("trial_blocked", {
|
|
2769
2771
|
mode: n.mode,
|
|
@@ -2986,15 +2988,15 @@ class Ir {
|
|
|
2986
2988
|
let c;
|
|
2987
2989
|
try {
|
|
2988
2990
|
c = await this.billing.bootstrap();
|
|
2989
|
-
} catch (
|
|
2990
|
-
const A =
|
|
2991
|
+
} catch (m) {
|
|
2992
|
+
const A = m instanceof L ? m : new L("unknown", "Failed to load paywall", { cause: m });
|
|
2991
2993
|
this.emit("error", A), o();
|
|
2992
2994
|
return;
|
|
2993
2995
|
}
|
|
2994
2996
|
if (!s) {
|
|
2995
|
-
const
|
|
2996
|
-
if (
|
|
2997
|
-
this.emit("visibility_blocked",
|
|
2997
|
+
const m = c.settings.visibility;
|
|
2998
|
+
if (m && (this.lastVisibility = m, !m.visible)) {
|
|
2999
|
+
this.emit("visibility_blocked", m), o();
|
|
2998
3000
|
return;
|
|
2999
3001
|
}
|
|
3000
3002
|
}
|
|
@@ -3027,8 +3029,8 @@ class Ir {
|
|
|
3027
3029
|
offerId: _?.offer.id,
|
|
3028
3030
|
ignoreActivePurchase: i
|
|
3029
3031
|
});
|
|
3030
|
-
} catch (
|
|
3031
|
-
if (
|
|
3032
|
+
} catch (m) {
|
|
3033
|
+
if (m instanceof L && m.code === "already_purchased") {
|
|
3032
3034
|
try {
|
|
3033
3035
|
await this.billing.getUser({ force: !0 });
|
|
3034
3036
|
} catch {
|
|
@@ -3040,7 +3042,7 @@ class Ir {
|
|
|
3040
3042
|
}), o();
|
|
3041
3043
|
return;
|
|
3042
3044
|
}
|
|
3043
|
-
const A =
|
|
3045
|
+
const A = m instanceof L ? m : new L("checkout_failed", "Checkout failed", { cause: m });
|
|
3044
3046
|
this.emit("error", A), o();
|
|
3045
3047
|
return;
|
|
3046
3048
|
}
|
|
@@ -3209,13 +3211,14 @@ class Ir {
|
|
|
3209
3211
|
});
|
|
3210
3212
|
}
|
|
3211
3213
|
ensureTrialStore(e) {
|
|
3212
|
-
if (this.trialStore && this.trialStoreConfig &&
|
|
3214
|
+
if (this.trialStore && this.trialStoreConfig && xr(this.trialStoreConfig, e))
|
|
3213
3215
|
return this.trialStore;
|
|
3214
3216
|
this.trialStoreConfig = e;
|
|
3215
3217
|
const r = this.billing.createTrialStore;
|
|
3216
|
-
return this.trialStore = typeof r == "function" ? r.call(this.billing, e) :
|
|
3218
|
+
return this.trialStore = typeof r == "function" ? r.call(this.billing, e) : Ye(this.billing.getStorage(), this.billing.paywallId, e), this.trialStore;
|
|
3217
3219
|
}
|
|
3218
3220
|
mountAndShow(e, r = {}) {
|
|
3221
|
+
this.lastMountedView = e;
|
|
3219
3222
|
const i = r.renew === !0, n = r.authMode, o = e === "auth" || e === "awaiting_payment" || e === "popup_blocked" ? r.checkoutPriceId ?? null : null, c = e === "awaiting_payment" || e === "popup_blocked" ? r.checkoutUrl ?? null : null;
|
|
3220
3223
|
if (this.handle) {
|
|
3221
3224
|
this.isOpen = !0, this.handle.update({
|
|
@@ -3229,8 +3232,8 @@ class Ir {
|
|
|
3229
3232
|
}), this.emit("open");
|
|
3230
3233
|
return;
|
|
3231
3234
|
}
|
|
3232
|
-
this.isOpen = !0, this.handle =
|
|
3233
|
-
|
|
3235
|
+
this.isOpen = !0, this.handle = Je(
|
|
3236
|
+
or,
|
|
3234
3237
|
{
|
|
3235
3238
|
client: this.billing,
|
|
3236
3239
|
open: !0,
|
|
@@ -3252,7 +3255,7 @@ class Ir {
|
|
|
3252
3255
|
), this.emit("open");
|
|
3253
3256
|
}
|
|
3254
3257
|
applyState(e) {
|
|
3255
|
-
if (!
|
|
3258
|
+
if (!br(this.currentState, e)) {
|
|
3256
3259
|
this.currentState = e;
|
|
3257
3260
|
for (const r of this.stateListeners)
|
|
3258
3261
|
try {
|
|
@@ -3354,10 +3357,10 @@ class Ir {
|
|
|
3354
3357
|
getOfferForPrice(e) {
|
|
3355
3358
|
const r = this.billing.getCachedOffers();
|
|
3356
3359
|
if (!r) return null;
|
|
3357
|
-
const i =
|
|
3358
|
-
return i ?
|
|
3360
|
+
const i = He(r, e);
|
|
3361
|
+
return i ? $e(i, {
|
|
3359
3362
|
now: Date.now(),
|
|
3360
|
-
readStart:
|
|
3363
|
+
readStart: N
|
|
3361
3364
|
}) : null;
|
|
3362
3365
|
}
|
|
3363
3366
|
/** Снимок текущего «языка юзера» — proxy над `billing.getUserLanguage()`.
|
|
@@ -3448,7 +3451,7 @@ class Ir {
|
|
|
3448
3451
|
// В extension popup runtime — no-op (popup не доживёт). Там полагаемся на
|
|
3449
3452
|
// bootstrap при следующем открытии.
|
|
3450
3453
|
startUserWatcher() {
|
|
3451
|
-
this.watcher ||
|
|
3454
|
+
this.watcher || fr() && (this.watcher = new gr({
|
|
3452
3455
|
client: this.billing,
|
|
3453
3456
|
onActive: (e) => {
|
|
3454
3457
|
this.watcher = null, this.emit("purchase_completed", { priceId: null, sessionId: null });
|
|
@@ -3467,7 +3470,7 @@ class Ir {
|
|
|
3467
3470
|
}), this.watcher.start());
|
|
3468
3471
|
}
|
|
3469
3472
|
close() {
|
|
3470
|
-
!this.isOpen || !this.handle || (this.isOpen = !1, this.purchased = !1, this.handle.update({ open: !1, purchased: !1 }), this.applyState(
|
|
3473
|
+
!this.isOpen || !this.handle || (this.isOpen = !1, this.purchased = !1, this.handle.update({ open: !1, purchased: !1 }), this.applyState(se), this.emit("close"));
|
|
3471
3474
|
}
|
|
3472
3475
|
/**
|
|
3473
3476
|
* Сканирует текущий URL на маркеры возврата с checkout и эмитит
|
|
@@ -3477,23 +3480,23 @@ class Ir {
|
|
|
3477
3480
|
*/
|
|
3478
3481
|
checkReturn() {
|
|
3479
3482
|
if (typeof window > "u") return;
|
|
3480
|
-
const e = new URL(window.location.href), r =
|
|
3483
|
+
const e = new URL(window.location.href), r = Ie(e.hash.replace(/^#/, "")), i = Ie(e.search.replace(/^\?/, "")), n = r ?? i;
|
|
3481
3484
|
n && (n.status === "paid" ? (this.emit("purchase_completed", {
|
|
3482
3485
|
priceId: n.priceId,
|
|
3483
3486
|
sessionId: n.sessionId
|
|
3484
|
-
}),
|
|
3487
|
+
}), yr(n)) : (n.status === "failed" || n.status === "cancelled") && this.emit("purchase_failed", { reason: n.status }), vr(e));
|
|
3485
3488
|
}
|
|
3486
3489
|
destroy() {
|
|
3487
|
-
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 =
|
|
3490
|
+
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 = se;
|
|
3488
3491
|
}
|
|
3489
3492
|
}
|
|
3490
|
-
function
|
|
3493
|
+
function mr(t) {
|
|
3491
3494
|
if (!t.auth) return { auth: void 0, ownsAuth: !1 };
|
|
3492
|
-
if (t.auth instanceof
|
|
3495
|
+
if (t.auth instanceof ue || wr(t.auth))
|
|
3493
3496
|
return { auth: t.auth, ownsAuth: !1 };
|
|
3494
3497
|
const e = t.auth === !0 ? {} : t.auth;
|
|
3495
3498
|
return {
|
|
3496
|
-
auth: new
|
|
3499
|
+
auth: new ue({
|
|
3497
3500
|
paywallId: t.paywallId,
|
|
3498
3501
|
apiOrigin: e.apiOrigin ?? t.apiOrigin,
|
|
3499
3502
|
storage: e.storage ?? t.storage,
|
|
@@ -3508,22 +3511,22 @@ function wr(t) {
|
|
|
3508
3511
|
const e = t;
|
|
3509
3512
|
return typeof e.onAuthChange == "function" && typeof e.getCachedSession == "function" && typeof e.signOut == "function";
|
|
3510
3513
|
}
|
|
3511
|
-
function
|
|
3514
|
+
function br(t, e) {
|
|
3512
3515
|
return t.open === e.open && t.view === e.view && t.error === e.error && t.processing === e.processing;
|
|
3513
3516
|
}
|
|
3514
|
-
function
|
|
3517
|
+
function xr(t, e) {
|
|
3515
3518
|
return t.mode === e.mode && t.payload === e.payload && t.storage === e.storage;
|
|
3516
3519
|
}
|
|
3517
|
-
function
|
|
3520
|
+
function Ie(t) {
|
|
3518
3521
|
if (!t) return null;
|
|
3519
|
-
const e = new URLSearchParams(t), r = e.get(
|
|
3522
|
+
const e = new URLSearchParams(t), r = e.get(V.status);
|
|
3520
3523
|
return r ? {
|
|
3521
3524
|
status: r,
|
|
3522
|
-
priceId: e.get(
|
|
3523
|
-
sessionId: e.get(
|
|
3525
|
+
priceId: e.get(V.priceId),
|
|
3526
|
+
sessionId: e.get(V.sessionId)
|
|
3524
3527
|
} : null;
|
|
3525
3528
|
}
|
|
3526
|
-
function
|
|
3529
|
+
function yr(t) {
|
|
3527
3530
|
if (!(typeof window > "u" || !window.opener))
|
|
3528
3531
|
try {
|
|
3529
3532
|
window.opener.postMessage(
|
|
@@ -3538,18 +3541,18 @@ function xr(t) {
|
|
|
3538
3541
|
} catch {
|
|
3539
3542
|
}
|
|
3540
3543
|
}
|
|
3541
|
-
function
|
|
3544
|
+
function vr(t) {
|
|
3542
3545
|
const e = (i, n) => {
|
|
3543
3546
|
if (!i) return "";
|
|
3544
3547
|
const s = new URLSearchParams(i.replace(/^[?#]/, ""));
|
|
3545
|
-
s.delete(
|
|
3548
|
+
s.delete(V.status), s.delete(V.priceId), s.delete(V.sessionId);
|
|
3546
3549
|
const o = s.toString();
|
|
3547
3550
|
return o ? n + o : "";
|
|
3548
3551
|
}, r = t.pathname + e(t.search, "?") + e(t.hash, "#");
|
|
3549
3552
|
window.history.replaceState(null, "", r);
|
|
3550
3553
|
}
|
|
3551
3554
|
export {
|
|
3552
|
-
|
|
3553
|
-
|
|
3555
|
+
Ar as P,
|
|
3556
|
+
rr as b
|
|
3554
3557
|
};
|
|
3555
|
-
//# sourceMappingURL=PaywallUI-
|
|
3558
|
+
//# sourceMappingURL=PaywallUI-DL_njLCG.js.map
|