@plusrouter/ui 0.0.0-stage → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/dist/SideNavigation-qz3aib86.js +5974 -0
  2. package/dist/assets/BASE-LICENSE +25 -0
  3. package/dist/assets/SpaceGrotesk.LICENSE +93 -0
  4. package/dist/assets/SpaceGrotesk.ttf +0 -0
  5. package/dist/assets/UPSTREAM-LICENSE +21 -0
  6. package/dist/brand.css +204 -0
  7. package/dist/components.js +3702 -0
  8. package/dist/index.js +2250 -0
  9. package/dist/styles.css +20496 -0
  10. package/dist/tokens.css +179 -0
  11. package/dist/types/components/Components/AlertDialog/AlertDialog.d.ts +25 -0
  12. package/dist/types/components/Components/AlertDialog/index.d.ts +1 -0
  13. package/dist/types/components/Components/AuthCard/AuthCard.d.ts +19 -0
  14. package/dist/types/components/Components/AuthCard/index.d.ts +1 -0
  15. package/dist/types/components/Components/BarChart/BarChart.d.ts +7 -0
  16. package/dist/types/components/Components/BarChart/index.d.ts +1 -0
  17. package/dist/types/components/Components/Billing/Billing.d.ts +125 -0
  18. package/dist/types/components/Components/Billing/index.d.ts +1 -0
  19. package/dist/types/components/Components/Effects/BackgroundCursor.d.ts +16 -0
  20. package/dist/types/components/Components/Effects/BackgroundDotted.d.ts +2 -0
  21. package/dist/types/components/Components/Effects/BackgroundLineField.d.ts +9 -0
  22. package/dist/types/components/Components/Effects/BackgroundPlus.d.ts +8 -0
  23. package/dist/types/components/Components/Effects/BackgroundSquare.d.ts +6 -0
  24. package/dist/types/components/Components/Effects/BrandIntro.d.ts +4 -0
  25. package/dist/types/components/Components/Effects/EffectCard.d.ts +5 -0
  26. package/dist/types/components/Components/Effects/PlusField.d.ts +4 -0
  27. package/dist/types/components/Components/Effects/ThemeTransition.d.ts +3 -0
  28. package/dist/types/components/Components/Effects/blast.d.ts +21 -0
  29. package/dist/types/components/Components/Effects/useBackgroundField.d.ts +2 -0
  30. package/dist/types/components/Components/Effects/useLineField.d.ts +2 -0
  31. package/dist/types/components/Components/Footer/Footer.d.ts +14 -0
  32. package/dist/types/components/Components/Footer/index.d.ts +1 -0
  33. package/dist/types/components/Components/Header/Header.d.ts +26 -0
  34. package/dist/types/components/Components/Header/index.d.ts +2 -0
  35. package/dist/types/components/Components/Heatmap/Heatmap.d.ts +9 -0
  36. package/dist/types/components/Components/Heatmap/index.d.ts +1 -0
  37. package/dist/types/components/Components/MetricStrip/MetricStrip.d.ts +12 -0
  38. package/dist/types/components/Components/MetricStrip/index.d.ts +1 -0
  39. package/dist/types/components/Components/Panel/Panel.d.ts +9 -0
  40. package/dist/types/components/Components/Panel/index.d.ts +1 -0
  41. package/dist/types/components/Components/Ranking/Ranking.d.ts +15 -0
  42. package/dist/types/components/Components/Ranking/index.d.ts +1 -0
  43. package/dist/types/components/Components/RequestTable/RequestTable.d.ts +18 -0
  44. package/dist/types/components/Components/RequestTable/index.d.ts +1 -0
  45. package/dist/types/components/Components/SessionShape/SessionShape.d.ts +5 -0
  46. package/dist/types/components/Components/SessionShape/index.d.ts +1 -0
  47. package/dist/types/components/Components/Shop/Shop.d.ts +2 -0
  48. package/dist/types/components/Components/Shop/Shop.types.d.ts +95 -0
  49. package/dist/types/components/Components/Shop/ShopAccountCard.d.ts +3 -0
  50. package/dist/types/components/Components/Shop/ShopCard.d.ts +8 -0
  51. package/dist/types/components/Components/Shop/index.d.ts +4 -0
  52. package/dist/types/components/Components/Support/Support.d.ts +49 -0
  53. package/dist/types/components/Components/Support/index.d.ts +2 -0
  54. package/dist/types/components/Components/UsageList/UsageList.d.ts +5 -0
  55. package/dist/types/components/Components/UsageList/index.d.ts +1 -0
  56. package/dist/types/components/Components/Workspace/CustomerDashboard.d.ts +4 -0
  57. package/dist/types/components/Components/Workspace/Provider.d.ts +24 -0
  58. package/dist/types/components/Components/Workspace/RouterPlusWorkspace.d.ts +114 -0
  59. package/dist/types/components/Components/Workspace/WorkspaceIcons.d.ts +248 -0
  60. package/dist/types/components/Components/index.d.ts +30 -0
  61. package/dist/types/components/TokensAndAssets/ThemeContext.d.ts +1 -0
  62. package/dist/types/components/ui/Accordion/Accordion.d.ts +11 -0
  63. package/dist/types/components/ui/Accordion/index.d.ts +1 -0
  64. package/dist/types/components/ui/Avatar/Avatar.d.ts +14 -0
  65. package/dist/types/components/ui/Avatar/index.d.ts +1 -0
  66. package/dist/types/components/ui/Badge/Badge.d.ts +7 -0
  67. package/dist/types/components/ui/Badge/index.d.ts +1 -0
  68. package/dist/types/components/ui/Brand/Brand.d.ts +6 -0
  69. package/dist/types/components/ui/Brand/index.d.ts +1 -0
  70. package/dist/types/components/ui/Button/Button.d.ts +10 -0
  71. package/dist/types/components/ui/Button/index.d.ts +1 -0
  72. package/dist/types/components/ui/Card/Card.d.ts +7 -0
  73. package/dist/types/components/ui/Card/index.d.ts +1 -0
  74. package/dist/types/components/ui/Checkbox/Checkbox.d.ts +10 -0
  75. package/dist/types/components/ui/Checkbox/Primitive/Checkbox.d.ts +11 -0
  76. package/dist/types/components/ui/Checkbox/index.d.ts +1 -0
  77. package/dist/types/components/ui/Collapsible/Collapsible.d.ts +8 -0
  78. package/dist/types/components/ui/Collapsible/index.d.ts +1 -0
  79. package/dist/types/components/ui/ContextMenu/ContextMenu.d.ts +21 -0
  80. package/dist/types/components/ui/ContextMenu/index.d.ts +1 -0
  81. package/dist/types/components/ui/Dialog/Dialog.d.ts +33 -0
  82. package/dist/types/components/ui/Dialog/index.d.ts +1 -0
  83. package/dist/types/components/ui/Drawer/Drawer.d.ts +11 -0
  84. package/dist/types/components/ui/Drawer/index.d.ts +1 -0
  85. package/dist/types/components/ui/DropdownMenu/DropdownMenu.d.ts +21 -0
  86. package/dist/types/components/ui/DropdownMenu/index.d.ts +1 -0
  87. package/dist/types/components/ui/EmptyState/EmptyState.d.ts +7 -0
  88. package/dist/types/components/ui/EmptyState/index.d.ts +1 -0
  89. package/dist/types/components/ui/Field/Field.d.ts +12 -0
  90. package/dist/types/components/ui/Field/index.d.ts +1 -0
  91. package/dist/types/components/ui/FilterSelect/FilterSelect.d.ts +14 -0
  92. package/dist/types/components/ui/FilterSelect/index.d.ts +1 -0
  93. package/dist/types/components/ui/Form/Form.d.ts +31 -0
  94. package/dist/types/components/ui/Form/index.d.ts +1 -0
  95. package/dist/types/components/ui/HoverCard/HoverCard.d.ts +10 -0
  96. package/dist/types/components/ui/HoverCard/index.d.ts +1 -0
  97. package/dist/types/components/ui/Icon/Icon.d.ts +36 -0
  98. package/dist/types/components/ui/Icon/index.d.ts +1 -0
  99. package/dist/types/components/ui/InfoHeader/InfoHeader.d.ts +14 -0
  100. package/dist/types/components/ui/InfoHeader/index.d.ts +1 -0
  101. package/dist/types/components/ui/InfoTooltip/InfoTooltip.d.ts +5 -0
  102. package/dist/types/components/ui/InfoTooltip/index.d.ts +1 -0
  103. package/dist/types/components/ui/Input/Input.d.ts +7 -0
  104. package/dist/types/components/ui/Input/index.d.ts +1 -0
  105. package/dist/types/components/ui/InputGroup/InputGroup.d.ts +14 -0
  106. package/dist/types/components/ui/InputGroup/index.d.ts +1 -0
  107. package/dist/types/components/ui/Label/Label.d.ts +6 -0
  108. package/dist/types/components/ui/Label/index.d.ts +1 -0
  109. package/dist/types/components/ui/LegacySlider/Slider.d.ts +16 -0
  110. package/dist/types/components/ui/LegacySlider/index.d.ts +1 -0
  111. package/dist/types/components/ui/LegacyTabs/Tabs.d.ts +16 -0
  112. package/dist/types/components/ui/LegacyTabs/index.d.ts +1 -0
  113. package/dist/types/components/ui/LinkCard/LinkCard.d.ts +5 -0
  114. package/dist/types/components/ui/LinkCard/index.d.ts +1 -0
  115. package/dist/types/components/ui/Logo/Logo.d.ts +69 -0
  116. package/dist/types/components/ui/Logo/ProviderLogos.d.ts +69 -0
  117. package/dist/types/components/ui/Logo/index.d.ts +2 -0
  118. package/dist/types/components/ui/Menubar/Menubar.d.ts +67 -0
  119. package/dist/types/components/ui/Menubar/index.d.ts +1 -0
  120. package/dist/types/components/ui/Modal/Modal.d.ts +10 -0
  121. package/dist/types/components/ui/Modal/index.d.ts +1 -0
  122. package/dist/types/components/ui/ModelCard/ModelCard.d.ts +50 -0
  123. package/dist/types/components/ui/ModelCard/ModelSelector.d.ts +76 -0
  124. package/dist/types/components/ui/ModelCard/icons.d.ts +20 -0
  125. package/dist/types/components/ui/ModelCard/index.d.ts +2 -0
  126. package/dist/types/components/ui/NavigationMenu/NavigationMenu.d.ts +38 -0
  127. package/dist/types/components/ui/NavigationMenu/index.d.ts +1 -0
  128. package/dist/types/components/ui/Popover/Popover.d.ts +14 -0
  129. package/dist/types/components/ui/Popover/index.d.ts +1 -0
  130. package/dist/types/components/ui/Progress/Progress.d.ts +10 -0
  131. package/dist/types/components/ui/Progress/index.d.ts +1 -0
  132. package/dist/types/components/ui/ProgressBar/ProgressBar.d.ts +10 -0
  133. package/dist/types/components/ui/ProgressBar/index.d.ts +1 -0
  134. package/dist/types/components/ui/Radio/Radio.d.ts +8 -0
  135. package/dist/types/components/ui/Radio/RadioGroup.d.ts +3 -0
  136. package/dist/types/components/ui/RadioGroup/RadioGroup.d.ts +16 -0
  137. package/dist/types/components/ui/RadioGroup/index.d.ts +1 -0
  138. package/dist/types/components/ui/ScrollArea/ScrollArea.d.ts +26 -0
  139. package/dist/types/components/ui/ScrollArea/index.d.ts +1 -0
  140. package/dist/types/components/ui/SegmentedControl/SegmentedControl.d.ts +14 -0
  141. package/dist/types/components/ui/SegmentedControl/index.d.ts +1 -0
  142. package/dist/types/components/ui/Select/Primitive/Select.d.ts +79 -0
  143. package/dist/types/components/ui/Select/Select.d.ts +29 -0
  144. package/dist/types/components/ui/Select/index.d.ts +1 -0
  145. package/dist/types/components/ui/Separator/Separator.d.ts +6 -0
  146. package/dist/types/components/ui/Separator/index.d.ts +1 -0
  147. package/dist/types/components/ui/SideNavigation/SideNavigation.d.ts +171 -0
  148. package/dist/types/components/ui/SideNavigation/index.d.ts +1 -0
  149. package/dist/types/components/ui/Skeleton/Skeleton.d.ts +4 -0
  150. package/dist/types/components/ui/Skeleton/index.d.ts +1 -0
  151. package/dist/types/components/ui/Slider/Slider.d.ts +21 -0
  152. package/dist/types/components/ui/Slider/index.d.ts +1 -0
  153. package/dist/types/components/ui/Spinner/Spinner.d.ts +5 -0
  154. package/dist/types/components/ui/Spinner/index.d.ts +1 -0
  155. package/dist/types/components/ui/Switch/Primitive/Switch.d.ts +11 -0
  156. package/dist/types/components/ui/Switch/Switch.d.ts +18 -0
  157. package/dist/types/components/ui/Switch/index.d.ts +1 -0
  158. package/dist/types/components/ui/Tabs/Tabs.d.ts +21 -0
  159. package/dist/types/components/ui/Tabs/index.d.ts +1 -0
  160. package/dist/types/components/ui/Text/Text.d.ts +16 -0
  161. package/dist/types/components/ui/Text/text-variants.d.ts +31 -0
  162. package/dist/types/components/ui/ThemeSwitch/ThemeSwitch.d.ts +9 -0
  163. package/dist/types/components/ui/ThemeSwitch/index.d.ts +1 -0
  164. package/dist/types/components/ui/Toast/Toast.d.ts +29 -0
  165. package/dist/types/components/ui/Toast/index.d.ts +1 -0
  166. package/dist/types/components/ui/Toggle/Toggle.d.ts +6 -0
  167. package/dist/types/components/ui/Toggle/index.d.ts +1 -0
  168. package/dist/types/components/ui/ToggleGroup/ToggleGroup.d.ts +16 -0
  169. package/dist/types/components/ui/ToggleGroup/index.d.ts +1 -0
  170. package/dist/types/components/ui/Tooltip/Tooltip.d.ts +27 -0
  171. package/dist/types/components/ui/Tooltip/index.d.ts +1 -0
  172. package/dist/types/components/ui/UIProvider/PortalHost.d.ts +1 -0
  173. package/dist/types/components/ui/UIProvider/UIProvider.d.ts +8 -0
  174. package/dist/types/components/ui/index.d.ts +56 -0
  175. package/dist/types/index.d.ts +6 -0
  176. package/dist/workspace.css +25823 -0
  177. package/package.json +101 -5
  178. package/README.md +0 -3
@@ -0,0 +1,3702 @@
1
+ import { jsxs as a, jsx as e, Fragment as Fe } from "react/jsx-runtime";
2
+ import { w as rt, u as et, B as G, I as Qe, R as ce, a as je, r as Rt, b as Te, L as ot, c as lt, d as Tt, P as qt, e as Ft, E as Pt, C as It, f as Et, g as Ht, S as Dt, h as Ot, i as Ut, j as zt, k as Gt, l as Xt, m as Yt, n as jt, o as Wt, p as Vt, q as Kt, s as Jt, t as _t, T as Zt, v as Qt } from "./SideNavigation-qz3aib86.js";
3
+ import { x as Kr, y as Jr, z as Zr, A as Qr, D as ei, F as ti, G as ai, H as ni, J as ri, K as ii, M as si, N as oi, O as li, Q as ci, U as di, V as hi, W as pi, X as ui, Y as mi, Z as gi } from "./SideNavigation-qz3aib86.js";
4
+ import Nt, { useId as Ye, useState as Be, useEffect as ke, useContext as ea, createContext as ta, useMemo as Ke, Fragment as aa, useRef as Ae, forwardRef as Pe } from "react";
5
+ import * as de from "@radix-ui/react-alert-dialog";
6
+ import Z from "clsx";
7
+ import { Globe as na } from "lucide-react";
8
+ const ye = { ...et, ...rt };
9
+ function yr({
10
+ languageControl: t
11
+ } = {}) {
12
+ return /* @__PURE__ */ a("div", { className: "customer-incumbent", style: { display: "contents" }, children: [
13
+ /* @__PURE__ */ e("link", { rel: "stylesheet", href: "/dashboard.css" }),
14
+ /* @__PURE__ */ e("link", { rel: "stylesheet", href: "/issued-key-modal.css" }),
15
+ `
16
+ `,
17
+ /* @__PURE__ */ a("aside", { className: `${ye.sidebar}`, children: [
18
+ /* @__PURE__ */ a("div", { className: "sidebar-account", children: [
19
+ /* @__PURE__ */ a("div", { className: "account-top", children: [
20
+ /* @__PURE__ */ e(G, { id: "account-name", "data-topup": !0, children: "Your account" }),
21
+ /* @__PURE__ */ e(G, { "data-support": "notifications", "aria-label": "Notifications", children: /* @__PURE__ */ e(
22
+ "svg",
23
+ {
24
+ viewBox: "0 0 20 20",
25
+ fill: "none",
26
+ stroke: "currentColor",
27
+ strokeWidth: "1.5",
28
+ strokeLinecap: "round",
29
+ strokeLinejoin: "round",
30
+ "aria-hidden": "true",
31
+ children: /* @__PURE__ */ e("path", { d: "M5 8a5 5 0 0 1 10 0v5l2 2H3l2-2zM8 18h4" })
32
+ }
33
+ ) })
34
+ ] }),
35
+ /* @__PURE__ */ a("div", { className: "account-balance", children: [
36
+ /* @__PURE__ */ a("div", { children: [
37
+ /* @__PURE__ */ e("strong", { id: "sidebar-balance", children: "—" }),
38
+ /* @__PURE__ */ e("small", { children: "Balance unavailable" })
39
+ ] }),
40
+ /* @__PURE__ */ e(
41
+ G,
42
+ {
43
+ className: "topup-icon",
44
+ "data-topup": !0,
45
+ "aria-label": "Top up",
46
+ children: "+"
47
+ }
48
+ )
49
+ ] })
50
+ ] }),
51
+ /* @__PURE__ */ a("nav", { "aria-label": "Dashboard", children: [
52
+ /* @__PURE__ */ a(G, { "data-page": "access", children: [
53
+ /* @__PURE__ */ e(
54
+ "svg",
55
+ {
56
+ viewBox: "0 0 20 20",
57
+ fill: "none",
58
+ stroke: "currentColor",
59
+ strokeWidth: "1.5",
60
+ strokeLinecap: "round",
61
+ strokeLinejoin: "round",
62
+ "aria-hidden": "true",
63
+ children: /* @__PURE__ */ e("path", { d: "M8 12a4 4 0 1 1 2-3h7v3h-3v2h-3" })
64
+ }
65
+ ),
66
+ /* @__PURE__ */ e("span", { children: "API keys" })
67
+ ] }),
68
+ /* @__PURE__ */ a(G, { "data-page": "logs", children: [
69
+ /* @__PURE__ */ e(
70
+ "svg",
71
+ {
72
+ viewBox: "0 0 20 20",
73
+ fill: "none",
74
+ stroke: "currentColor",
75
+ strokeWidth: "1.5",
76
+ strokeLinecap: "round",
77
+ strokeLinejoin: "round",
78
+ "aria-hidden": "true",
79
+ children: /* @__PURE__ */ e("path", { d: "M4 3h12v14H4zM7 7h6M7 10h6M7 13h3" })
80
+ }
81
+ ),
82
+ /* @__PURE__ */ e("span", { children: "LLM logs" })
83
+ ] }),
84
+ /* @__PURE__ */ a(G, { "data-page": "plans", children: [
85
+ /* @__PURE__ */ e(
86
+ "svg",
87
+ {
88
+ viewBox: "0 0 20 20",
89
+ fill: "none",
90
+ stroke: "currentColor",
91
+ strokeWidth: "1.5",
92
+ strokeLinecap: "round",
93
+ strokeLinejoin: "round",
94
+ "aria-hidden": "true",
95
+ children: /* @__PURE__ */ e("path", { d: "M3 5h14v11H3zM3 8h14" })
96
+ }
97
+ ),
98
+ /* @__PURE__ */ e("span", { children: "Accounts & plans" })
99
+ ] })
100
+ ] }),
101
+ /* @__PURE__ */ a("div", { className: "sidebar-bottom", children: [
102
+ /* @__PURE__ */ a("div", { id: "identity-session", hidden: !0, children: [
103
+ /* @__PURE__ */ e("span", { id: "identity-status", role: "status", "aria-live": "polite" }),
104
+ /* @__PURE__ */ e(G, { id: "telegram-link", type: "button", hidden: !0, children: "Connect Telegram" }),
105
+ /* @__PURE__ */ e("span", { id: "telegram-link-status", role: "status" }),
106
+ /* @__PURE__ */ e(G, { id: "identity-logout", type: "button", children: "Sign out" })
107
+ ] }),
108
+ /* @__PURE__ */ a(
109
+ "a",
110
+ {
111
+ className: "download-app",
112
+ href: "https://github.com/RouterPlus/RouterPlus/actions/workflows/www.yml",
113
+ children: [
114
+ /* @__PURE__ */ a("span", { className: "download-logo", "aria-hidden": "true", children: [
115
+ "R",
116
+ /* @__PURE__ */ e("span", { children: "+" })
117
+ ] }),
118
+ /* @__PURE__ */ a("span", { children: [
119
+ /* @__PURE__ */ e("strong", { children: "router.plus" }),
120
+ /* @__PURE__ */ e("small", { children: "Download app" })
121
+ ] }),
122
+ /* @__PURE__ */ e(
123
+ "svg",
124
+ {
125
+ viewBox: "0 0 20 20",
126
+ fill: "none",
127
+ stroke: "currentColor",
128
+ strokeWidth: "1.5",
129
+ "aria-hidden": "true",
130
+ children: /* @__PURE__ */ e("path", { d: "M10 3v10m-4-4 4 4 4-4M4 14v3h12v-3" })
131
+ }
132
+ )
133
+ ]
134
+ }
135
+ )
136
+ ] })
137
+ ] }),
138
+ `
139
+ `,
140
+ /* @__PURE__ */ a("div", { className: "shell", children: [
141
+ /* @__PURE__ */ a("header", { className: "topbar", children: [
142
+ t,
143
+ /* @__PURE__ */ a("span", { children: [
144
+ "Account ",
145
+ /* @__PURE__ */ e("i", { children: "/" }),
146
+ " ",
147
+ /* @__PURE__ */ e("strong", { id: "page-name", children: "API keys" })
148
+ ] })
149
+ ] }),
150
+ /* @__PURE__ */ a("main", { children: [
151
+ /* @__PURE__ */ e("div", { className: "page-heading", children: /* @__PURE__ */ a("div", { children: [
152
+ /* @__PURE__ */ e("h1", { id: "page-heading", children: "API keys" }),
153
+ /* @__PURE__ */ e("p", { id: "page-description", children: "Connect your tools with one RouterPlus key." })
154
+ ] }) }),
155
+ `
156
+ `,
157
+ /* @__PURE__ */ a("section", { "data-panel": "access", children: [
158
+ /* @__PURE__ */ a("div", { className: "section-heading", children: [
159
+ /* @__PURE__ */ e("h2", { children: "Your API key" }),
160
+ /* @__PURE__ */ e(G, { id: "hero-key", className: `${ye.primary}`, children: "Generate API key" })
161
+ ] }),
162
+ /* @__PURE__ */ a("div", { className: `${ye.panel} key-panel`, children: [
163
+ /* @__PURE__ */ a("div", { className: "key-row key-labels", children: [
164
+ /* @__PURE__ */ e("span", { children: "Name" }),
165
+ /* @__PURE__ */ e("span", { children: "Key" }),
166
+ /* @__PURE__ */ e("span", { children: "Status" }),
167
+ /* @__PURE__ */ e("span", {})
168
+ ] }),
169
+ /* @__PURE__ */ a("div", { className: "key-row", children: [
170
+ /* @__PURE__ */ a("div", { children: [
171
+ /* @__PURE__ */ e("strong", { children: "Personal key" }),
172
+ /* @__PURE__ */ e("small", { id: "key-owner", children: "Your RouterPlus account" })
173
+ ] }),
174
+ /* @__PURE__ */ e("code", { id: "profile-key", children: "No key connected" }),
175
+ /* @__PURE__ */ e("span", { id: "key-status", children: "Not connected" }),
176
+ /* @__PURE__ */ e(G, { id: "rotate-key", hidden: !0, children: "Rotate key" })
177
+ ] }),
178
+ /* @__PURE__ */ e("div", { className: "key-note", id: "key-note", children: "Generate a key to get started, or connect an existing key below." })
179
+ ] }),
180
+ `
181
+ `,
182
+ /* @__PURE__ */ a("div", { id: "new-key-mount", children: [
183
+ /* @__PURE__ */ e(
184
+ G,
185
+ {
186
+ id: "new-key",
187
+ className: "text-button",
188
+ "aria-expanded": "false",
189
+ "aria-controls": "registration",
190
+ children: "Create a new account key"
191
+ }
192
+ ),
193
+ /* @__PURE__ */ a("section", { id: "registration", hidden: !0, "aria-label": "Create an API key", children: [
194
+ /* @__PURE__ */ e("h2", { children: "Create your API key" }),
195
+ /* @__PURE__ */ e("p", { children: "We’ll show your key once. Save it before closing the window." }),
196
+ /* @__PURE__ */ e(
197
+ G,
198
+ {
199
+ id: "create-anonymous-key",
200
+ className: `${ye.primary}`,
201
+ children: "Generate key"
202
+ }
203
+ ),
204
+ /* @__PURE__ */ e("p", { id: "register-status", role: "status", "aria-live": "polite" })
205
+ ] })
206
+ ] }),
207
+ `
208
+ `,
209
+ /* @__PURE__ */ a("div", { className: "account-surface", id: "connect", children: [
210
+ /* @__PURE__ */ e("h2", { children: "Already have a key?" }),
211
+ /* @__PURE__ */ e("form", { id: "account-form", children: /* @__PURE__ */ a("div", { className: "entry", children: [
212
+ /* @__PURE__ */ e(
213
+ Qe,
214
+ {
215
+ id: "api-key",
216
+ name: "api_key",
217
+ type: "password",
218
+ required: !0,
219
+ minLength: 8,
220
+ maxLength: 256,
221
+ autoComplete: "off",
222
+ spellCheck: !1,
223
+ placeholder: "Paste your API key",
224
+ "aria-label": "API key"
225
+ }
226
+ ),
227
+ /* @__PURE__ */ e(G, { type: "submit", children: "Connect key" })
228
+ ] }) }),
229
+ /* @__PURE__ */ e("p", { id: "account-status", role: "status", "aria-live": "polite" })
230
+ ] }),
231
+ `
232
+ `,
233
+ /* @__PURE__ */ e("div", { className: "section-heading", children: /* @__PURE__ */ e("h2", { children: "Connection settings" }) }),
234
+ /* @__PURE__ */ a("div", { className: `${ye.panel} settings-list`, children: [
235
+ /* @__PURE__ */ a("div", { className: "setting-row", children: [
236
+ /* @__PURE__ */ a("div", { children: [
237
+ /* @__PURE__ */ e("h3", { children: "Base URL" }),
238
+ /* @__PURE__ */ e("p", { children: "OpenAI-compatible endpoint" })
239
+ ] }),
240
+ /* @__PURE__ */ a("div", { className: "copy-inline", children: [
241
+ /* @__PURE__ */ e("code", { children: "https://router.plus/v1" }),
242
+ /* @__PURE__ */ e(G, { id: "copy-endpoint", "aria-label": "Copy base URL", children: "Copy" })
243
+ ] })
244
+ ] }),
245
+ /* @__PURE__ */ a("div", { className: "setting-row", children: [
246
+ /* @__PURE__ */ a("div", { children: [
247
+ /* @__PURE__ */ e("h3", { children: "Authentication" }),
248
+ /* @__PURE__ */ e("p", { children: "Keep your API key private." })
249
+ ] }),
250
+ /* @__PURE__ */ e("span", { children: "Bearer API key" })
251
+ ] }),
252
+ /* @__PURE__ */ a("div", { className: "setting-row", children: [
253
+ /* @__PURE__ */ a("div", { children: [
254
+ /* @__PURE__ */ e("h3", { children: "Coding tools" }),
255
+ /* @__PURE__ */ e("p", { children: "Codex, Claude Code, OpenCode, and compatible apps." })
256
+ ] }),
257
+ /* @__PURE__ */ e("a", { href: "/docs", children: "Setup guide ↗" })
258
+ ] })
259
+ ] }),
260
+ /* @__PURE__ */ e("p", { id: "endpoint-status", role: "status" }),
261
+ /* @__PURE__ */ a("details", { className: "code-example", children: [
262
+ /* @__PURE__ */ e("summary", { children: "Try your first request" }),
263
+ /* @__PURE__ */ e("pre", { children: /* @__PURE__ */ e("code", { children: `curl https://router.plus/v1/responses \\
264
+ -H "Authorization: Bearer YOUR_API_KEY" \\
265
+ -H "Content-Type: application/json" \\
266
+ -d '{"model":"auto","input":"Hello"}'` }) })
267
+ ] }),
268
+ `
269
+ `
270
+ ] }),
271
+ `
272
+ `,
273
+ /* @__PURE__ */ a("section", { "data-panel": "logs", hidden: !0, children: [
274
+ /* @__PURE__ */ a("div", { className: "section-heading", children: [
275
+ /* @__PURE__ */ e("h2", { children: "Recent requests" }),
276
+ /* @__PURE__ */ e("span", { children: "Request activity" })
277
+ ] }),
278
+ /* @__PURE__ */ a("div", { className: `${ye.panel} log-panel`, children: [
279
+ /* @__PURE__ */ a("div", { className: "log-head", children: [
280
+ /* @__PURE__ */ e("span", { children: "Time" }),
281
+ /* @__PURE__ */ e("span", { children: "Model" }),
282
+ /* @__PURE__ */ e("span", { children: "Tokens" }),
283
+ /* @__PURE__ */ e("span", { children: "Duration" }),
284
+ /* @__PURE__ */ e("span", { children: "Status" })
285
+ ] }),
286
+ /* @__PURE__ */ a("div", { className: `${ye["empty-state"]}`, children: [
287
+ /* @__PURE__ */ e("h3", { children: "Request logs aren’t available yet" }),
288
+ /* @__PURE__ */ e("p", { children: "Your account’s request history will appear here when logging is connected." }),
289
+ /* @__PURE__ */ e("a", { href: "/docs", children: "View API documentation ↗" })
290
+ ] })
291
+ ] })
292
+ ] }),
293
+ `
294
+ `,
295
+ /* @__PURE__ */ a("section", { "data-panel": "plans", hidden: !0, children: [
296
+ /* @__PURE__ */ a("div", { className: "section-heading", children: [
297
+ /* @__PURE__ */ e("h2", { children: "Your access" }),
298
+ /* @__PURE__ */ e(G, { "data-topup": !0, children: "Manage subscription" })
299
+ ] }),
300
+ /* @__PURE__ */ e("div", { className: `${ye.panel} settings-list`, children: /* @__PURE__ */ a("div", { className: "setting-row", children: [
301
+ /* @__PURE__ */ a("div", { children: [
302
+ /* @__PURE__ */ e("h3", { id: "current-plan", children: "No account connected" }),
303
+ /* @__PURE__ */ e("p", { id: "current-expiry", children: "Connect your key to view your access." })
304
+ ] }),
305
+ /* @__PURE__ */ e("span", { id: "current-status", children: "—" })
306
+ ] }) }),
307
+ /* @__PURE__ */ a("div", { className: "section-heading", children: [
308
+ /* @__PURE__ */ e("h2", { children: "Choose a plan" }),
309
+ /* @__PURE__ */ e("span", { children: "No payment fee" })
310
+ ] }),
311
+ /* @__PURE__ */ e("div", { className: `${ye.panel}`, id: "plans-list", children: /* @__PURE__ */ e("p", { className: "loading-note", children: "Loading plans…" }) }),
312
+ /* @__PURE__ */ e("p", { id: "plans-status", role: "status" }),
313
+ /* @__PURE__ */ a("section", { id: "catalog", "aria-label": "Available models", children: [
314
+ /* @__PURE__ */ e("div", { className: "section-heading", children: /* @__PURE__ */ e("h2", { children: "Included models" }) }),
315
+ /* @__PURE__ */ e("p", { id: "catalog-status", children: "Connect your key to see available models." }),
316
+ /* @__PURE__ */ e("ul", { id: "catalog-items" })
317
+ ] }),
318
+ /* @__PURE__ */ e("div", { className: "section-heading", children: /* @__PURE__ */ e("h2", { children: "Latest payment" }) }),
319
+ /* @__PURE__ */ a("div", { className: `${ye.panel} payment-summary`, children: [
320
+ /* @__PURE__ */ e("span", { id: "latest-payment", children: "Connect your account to view payments." }),
321
+ /* @__PURE__ */ e(G, { "data-topup": !0, children: "View invoice" })
322
+ ] })
323
+ ] }),
324
+ `
325
+ `,
326
+ /* @__PURE__ */ a("footer", { children: [
327
+ /* @__PURE__ */ e("span", { children: "RouterPlus" }),
328
+ /* @__PURE__ */ e("a", { href: "/docs", children: "API documentation ↗" })
329
+ ] })
330
+ ] })
331
+ ] }),
332
+ /* @__PURE__ */ a(
333
+ "dialog",
334
+ {
335
+ id: "topup-drawer",
336
+ className: "topup-drawer",
337
+ "aria-labelledby": "topup-title",
338
+ children: [
339
+ /* @__PURE__ */ a("header", { className: "drawer-header", children: [
340
+ /* @__PURE__ */ e(G, { id: "close-topup", "aria-label": "Close top up", children: "×" }),
341
+ /* @__PURE__ */ e("span", { children: "Finance / Add funds" })
342
+ ] }),
343
+ /* @__PURE__ */ a("div", { className: "drawer-body", children: [
344
+ /* @__PURE__ */ e("h2", { id: "topup-title", children: "Top up" }),
345
+ /* @__PURE__ */ a(
346
+ "section",
347
+ {
348
+ id: "topup-connection",
349
+ className: "balance-preview",
350
+ "aria-label": "Top up preview",
351
+ children: [
352
+ /* @__PURE__ */ e("label", { htmlFor: "preview-amount", children: "Amount in USD" }),
353
+ /* @__PURE__ */ a("div", { className: "balance-amount", children: [
354
+ /* @__PURE__ */ e("span", { children: "$" }),
355
+ /* @__PURE__ */ e(
356
+ Qe,
357
+ {
358
+ id: "preview-amount",
359
+ type: "number",
360
+ min: "1",
361
+ max: "10000",
362
+ step: "0.01",
363
+ placeholder: "0",
364
+ inputMode: "decimal",
365
+ "aria-describedby": "preview-note"
366
+ }
367
+ )
368
+ ] }),
369
+ /* @__PURE__ */ e("p", { id: "preview-note", children: "Preview · Connect a key to make a payment." }),
370
+ /* @__PURE__ */ a("div", { className: "balance-method-heading", children: [
371
+ /* @__PURE__ */ e("h3", { children: "Cryptocurrency" }),
372
+ /* @__PURE__ */ e("span", { children: "No fee" })
373
+ ] }),
374
+ /* @__PURE__ */ e(
375
+ "div",
376
+ {
377
+ id: "preview-methods",
378
+ className: "balance-methods",
379
+ role: "group",
380
+ "aria-label": "Preview payment currency"
381
+ }
382
+ ),
383
+ /* @__PURE__ */ a("div", { className: "balance-preview-footer", children: [
384
+ /* @__PURE__ */ a(G, { id: "preview-connect", className: `${ye.primary}`, children: [
385
+ "Connect API key ",
386
+ /* @__PURE__ */ e("span", { children: "→" })
387
+ ] }),
388
+ /* @__PURE__ */ e("p", { children: "No invoice will be created in this preview." })
389
+ ] })
390
+ ]
391
+ }
392
+ ),
393
+ " ",
394
+ /* @__PURE__ */ a("section", { id: "account", hidden: !0, "aria-label": "Your subscription", children: [
395
+ `
396
+ `,
397
+ /* @__PURE__ */ a("details", { className: "subscription-disclosure", children: [
398
+ /* @__PURE__ */ e("summary", { children: "Account details" }),
399
+ /* @__PURE__ */ a("div", { className: "heading", children: [
400
+ `
401
+ `,
402
+ /* @__PURE__ */ e("h2", { children: "Your subscription" }),
403
+ `
404
+ `,
405
+ /* @__PURE__ */ a("div", { className: "account-actions", children: [
406
+ `
407
+ `,
408
+ /* @__PURE__ */ e(
409
+ G,
410
+ {
411
+ id: "refresh",
412
+ className: "text-button",
413
+ type: "button",
414
+ children: "Refresh"
415
+ }
416
+ ),
417
+ `
418
+ `,
419
+ /* @__PURE__ */ e(
420
+ G,
421
+ {
422
+ id: "logout",
423
+ className: "text-button",
424
+ type: "button",
425
+ children: "Disconnect"
426
+ }
427
+ ),
428
+ `
429
+ `
430
+ ] }),
431
+ `
432
+ `
433
+ ] }),
434
+ `
435
+ `,
436
+ /* @__PURE__ */ e("dl", { id: "details" })
437
+ ] }),
438
+ `
439
+ `,
440
+ /* @__PURE__ */ a("section", { className: "billing", children: [
441
+ `
442
+ `,
443
+ /* @__PURE__ */ e("h2", { children: "Subscription" }),
444
+ /* @__PURE__ */ e("p", { children: "No payment fee." }),
445
+ `
446
+ `,
447
+ /* @__PURE__ */ e("p", { id: "billing-description", children: "Loading subscription…" }),
448
+ `
449
+ `,
450
+ /* @__PURE__ */ a("form", { id: "order-form", hidden: !0, children: [
451
+ `
452
+ `,
453
+ /* @__PURE__ */ a("div", { className: "billing-fields", children: [
454
+ `
455
+ `,
456
+ /* @__PURE__ */ a("label", { htmlFor: "plan-select", children: [
457
+ "Plan",
458
+ /* @__PURE__ */ e("select", { id: "plan-select", required: !0 })
459
+ ] }),
460
+ `
461
+ `,
462
+ /* @__PURE__ */ a("label", { htmlFor: "crypto-select", children: [
463
+ "Currency",
464
+ /* @__PURE__ */ e("select", { id: "crypto-select", required: !0 })
465
+ ] }),
466
+ `
467
+ `
468
+ ] }),
469
+ `
470
+ `,
471
+ /* @__PURE__ */ e(
472
+ "div",
473
+ {
474
+ id: "payment-methods",
475
+ role: "group",
476
+ "aria-label": "Payment currency"
477
+ }
478
+ ),
479
+ /* @__PURE__ */ e(
480
+ G,
481
+ {
482
+ id: "pay",
483
+ className: `${ye.primary}`,
484
+ type: "submit",
485
+ children: "Create invoice"
486
+ }
487
+ ),
488
+ `
489
+ `
490
+ ] }),
491
+ `
492
+ `,
493
+ /* @__PURE__ */ e("p", { id: "order-status", role: "status", "aria-live": "polite" }),
494
+ `
495
+
496
+ `
497
+ ] }),
498
+ `
499
+ `,
500
+ /* @__PURE__ */ a("section", { id: "invoice", hidden: !0, "aria-label": "Payment invoice", children: [
501
+ `
502
+ `,
503
+ /* @__PURE__ */ e(G, { id: "invoice-back", children: "← Payment methods" }),
504
+ /* @__PURE__ */ e("h2", { children: "Pay by QR code" }),
505
+ /* @__PURE__ */ e("p", { children: "Send the exact amount in one transaction." }),
506
+ /* @__PURE__ */ e("p", { id: "invoice-countdown" }),
507
+ /* @__PURE__ */ a("div", { className: "qr-payment", children: [
508
+ /* @__PURE__ */ a("div", { children: [
509
+ /* @__PURE__ */ e("strong", { id: "qr-amount" }),
510
+ /* @__PURE__ */ e("span", { id: "qr-network" })
511
+ ] }),
512
+ /* @__PURE__ */ e("div", { id: "payment-qr", "aria-label": "Wallet address QR code" })
513
+ ] }),
514
+ /* @__PURE__ */ a("div", { className: "payment-copy", children: [
515
+ /* @__PURE__ */ e("span", { children: "Wallet address" }),
516
+ /* @__PURE__ */ e(G, { id: "copy-wallet", children: "Copy" }),
517
+ /* @__PURE__ */ e("code", { id: "payment-wallet" })
518
+ ] }),
519
+ /* @__PURE__ */ a("div", { className: "payment-copy", children: [
520
+ /* @__PURE__ */ e("span", { children: "Amount to pay" }),
521
+ /* @__PURE__ */ e(G, { id: "copy-payment", children: "Copy" }),
522
+ /* @__PURE__ */ e("code", { id: "payment-amount" })
523
+ ] }),
524
+ /* @__PURE__ */ e("p", { id: "payment-copy-status", role: "status" }),
525
+ `
526
+ `,
527
+ /* @__PURE__ */ e("dl", { id: "invoice-details" }),
528
+ `
529
+ `,
530
+ /* @__PURE__ */ e("p", { id: "invoice-help" }),
531
+ `
532
+ `
533
+ ] }),
534
+ `
535
+ `
536
+ ] }),
537
+ `
538
+
539
+ `
540
+ ] })
541
+ ]
542
+ }
543
+ ),
544
+ `
545
+ `,
546
+ /* @__PURE__ */ a(
547
+ G,
548
+ {
549
+ id: "support-launcher",
550
+ className: "support-launcher",
551
+ "data-support": "active",
552
+ "aria-label": "Open support",
553
+ "aria-haspopup": "dialog",
554
+ children: [
555
+ /* @__PURE__ */ a(
556
+ "svg",
557
+ {
558
+ viewBox: "0 0 20 20",
559
+ fill: "none",
560
+ stroke: "currentColor",
561
+ strokeWidth: "1.5",
562
+ strokeLinecap: "round",
563
+ strokeLinejoin: "round",
564
+ "aria-hidden": "true",
565
+ children: [
566
+ /* @__PURE__ */ e("path", { d: "M17 9a7 7 0 0 1-7 7H6l-4 2 1-5A7 7 0 1 1 17 9z" }),
567
+ /* @__PURE__ */ e("path", { d: "M6 9h8M6 12h5" })
568
+ ]
569
+ }
570
+ ),
571
+ /* @__PURE__ */ e("span", { children: "Support" })
572
+ ]
573
+ }
574
+ ),
575
+ /* @__PURE__ */ a(
576
+ "dialog",
577
+ {
578
+ id: "support-window",
579
+ className: "support-window",
580
+ "aria-labelledby": "support-title",
581
+ children: [
582
+ /* @__PURE__ */ a("div", { className: "support-sidebar", children: [
583
+ /* @__PURE__ */ a("div", { className: "support-tools", children: [
584
+ /* @__PURE__ */ e(G, { id: "close-support", "aria-label": "Close support", children: "×" }),
585
+ /* @__PURE__ */ e("span", { className: "window-handle" })
586
+ ] }),
587
+ /* @__PURE__ */ e("h2", { id: "support-title", children: "Support" }),
588
+ /* @__PURE__ */ a(
589
+ "div",
590
+ {
591
+ className: "support-tabs",
592
+ role: "group",
593
+ "aria-label": "Support inbox",
594
+ children: [
595
+ /* @__PURE__ */ e(G, { "data-inbox": "active", "aria-pressed": "true", children: "Active" }),
596
+ /* @__PURE__ */ e(G, { "data-inbox": "archive", "aria-pressed": "false", children: "Archive" })
597
+ ]
598
+ }
599
+ ),
600
+ /* @__PURE__ */ a(
601
+ G,
602
+ {
603
+ className: "notification-row",
604
+ "data-inbox": "notifications",
605
+ children: [
606
+ /* @__PURE__ */ e(
607
+ "svg",
608
+ {
609
+ viewBox: "0 0 20 20",
610
+ fill: "none",
611
+ stroke: "currentColor",
612
+ strokeWidth: "1.4",
613
+ strokeLinecap: "round",
614
+ strokeLinejoin: "round",
615
+ "aria-hidden": "true",
616
+ children: /* @__PURE__ */ e("path", { d: "M5 8a5 5 0 0 1 10 0v5l2 2H3l2-2zM8 18h4" })
617
+ }
618
+ ),
619
+ " Notifications"
620
+ ]
621
+ }
622
+ ),
623
+ /* @__PURE__ */ e("p", { id: "support-list-status", children: "Ticket history is not connected." }),
624
+ /* @__PURE__ */ a(G, { id: "new-ticket", children: [
625
+ "New ticket ",
626
+ /* @__PURE__ */ e("span", { children: "+" })
627
+ ] })
628
+ ] }),
629
+ /* @__PURE__ */ a("div", { className: "support-content", children: [
630
+ /* @__PURE__ */ a("div", { id: "support-empty", children: [
631
+ /* @__PURE__ */ e("span", { className: "support-empty-icon", children: /* @__PURE__ */ e(
632
+ "svg",
633
+ {
634
+ viewBox: "0 0 20 20",
635
+ fill: "none",
636
+ stroke: "currentColor",
637
+ strokeWidth: "1.4",
638
+ strokeLinecap: "round",
639
+ strokeLinejoin: "round",
640
+ "aria-hidden": "true",
641
+ children: /* @__PURE__ */ e("path", { d: "M17 9a7 7 0 0 1-7 7H6l-4 2 1-5A7 7 0 1 1 17 9z" })
642
+ }
643
+ ) }),
644
+ /* @__PURE__ */ e("h3", { children: "How can we help?" }),
645
+ /* @__PURE__ */ e("p", { children: "Support messages are not connected yet. You can prepare your request here." }),
646
+ /* @__PURE__ */ e(G, { id: "compose-ticket", children: "Write a request" })
647
+ ] }),
648
+ /* @__PURE__ */ a("form", { id: "ticket-form", hidden: !0, children: [
649
+ /* @__PURE__ */ e("h3", { children: "New request" }),
650
+ /* @__PURE__ */ a("label", { children: [
651
+ "Subject",
652
+ /* @__PURE__ */ e(
653
+ Qe,
654
+ {
655
+ id: "ticket-subject",
656
+ required: !0,
657
+ maxLength: 160,
658
+ placeholder: "What do you need help with?"
659
+ }
660
+ )
661
+ ] }),
662
+ /* @__PURE__ */ a("label", { children: [
663
+ "Message",
664
+ /* @__PURE__ */ e(
665
+ "textarea",
666
+ {
667
+ id: "ticket-message",
668
+ required: !0,
669
+ maxLength: 5e3,
670
+ rows: 8,
671
+ placeholder: "Describe your issue"
672
+ }
673
+ )
674
+ ] }),
675
+ /* @__PURE__ */ e("p", { children: "Sending tickets is not available yet." }),
676
+ /* @__PURE__ */ e(G, { type: "submit", children: "Copy request" }),
677
+ /* @__PURE__ */ e("p", { id: "ticket-status", role: "status" })
678
+ ] })
679
+ ] })
680
+ ]
681
+ }
682
+ ),
683
+ `
684
+ `
685
+ ] });
686
+ }
687
+ const c = { ...et, ...rt }, ct = [
688
+ ["agents", "Agents", "terminal"],
689
+ ["sessions", "Sessions", "screen"],
690
+ ["library", "Library", "library"],
691
+ ["connection", "Connection", "key"],
692
+ ["balance", "Balance", "wallet"],
693
+ ["usage", "Usage", "chart"]
694
+ ], wt = ta(null), ra = ["Overview", "Requests", "Sessions", "Context"];
695
+ function ia({
696
+ children: t,
697
+ onClick: n,
698
+ primary: i = !1,
699
+ label: l
700
+ }) {
701
+ return /* @__PURE__ */ e(
702
+ "button",
703
+ {
704
+ type: "button",
705
+ className: `${c.text}${i ? " primary" : ""}`,
706
+ onClick: n,
707
+ disabled: !n,
708
+ "aria-label": l,
709
+ children: t
710
+ }
711
+ );
712
+ }
713
+ function Oe({
714
+ status: t,
715
+ error: n,
716
+ onRetry: i,
717
+ loading: l,
718
+ empty: o
719
+ }) {
720
+ return t === "error" ? /* @__PURE__ */ a("div", { className: `${c["empty-state"]}`, role: "alert", children: [
721
+ /* @__PURE__ */ e("span", { children: n || "Unable to load this information." }),
722
+ i && /* @__PURE__ */ e(ia, { onClick: i, children: "Try again" })
723
+ ] }) : /* @__PURE__ */ e("div", { className: `${c["empty-state"]}`, role: "status", children: t === "loading" ? l : o });
724
+ }
725
+ function _r({
726
+ page: t,
727
+ theme: n,
728
+ children: i,
729
+ onNavigate: l,
730
+ onRefresh: o,
731
+ refreshing: r = !1,
732
+ usageSection: d = "Overview",
733
+ usageSections: h = ra,
734
+ onUsageSectionChange: m,
735
+ notice: C,
736
+ headerActions: $,
737
+ sidebarFooter: b,
738
+ beforeContent: A
739
+ }) {
740
+ const [v, f] = Be(
741
+ () => typeof matchMedia < "u" && matchMedia(
742
+ "(max-width: 760px), (pointer: coarse) and (max-width: 1024px)"
743
+ ).matches
744
+ );
745
+ ke(() => {
746
+ const B = matchMedia(
747
+ "(max-width: 760px), (pointer: coarse) and (max-width: 1024px)"
748
+ ), w = () => f(B.matches);
749
+ return B.addEventListener("change", w), () => B.removeEventListener("change", w);
750
+ }, []);
751
+ const _ = t === "settings" ? "Settings" : ct.find(([B]) => B === t)[1], N = ["agents", "sessions", "library"].includes(t) ? "Work" : ["usage", "balance"].includes(t) ? "Insights" : "Models", T = t === "connection" ? "providers" : t, s = /* @__PURE__ */ a("div", { className: `${c.brand}`, children: [
752
+ /* @__PURE__ */ e("span", { className: `${c.logo}`, "aria-hidden": "true", children: /* @__PURE__ */ e("img", { src: Rt, width: "22", height: "22", alt: "" }) }),
753
+ /* @__PURE__ */ e("span", { children: "RouterPlus" })
754
+ ] }), k = /* @__PURE__ */ a(
755
+ "button",
756
+ {
757
+ type: "button",
758
+ id: "prefs",
759
+ className: `${c.icon}${t === "settings" ? " on" : ""}`,
760
+ "aria-label": "Settings",
761
+ onClick: () => l?.("settings"),
762
+ children: [
763
+ /* @__PURE__ */ e(ce, { name: "settings" }),
764
+ /* @__PURE__ */ e("span", { className: `${c["side-l"]}`, children: "Settings" })
765
+ ]
766
+ }
767
+ ), g = /* @__PURE__ */ a(
768
+ "div",
769
+ {
770
+ className: v ? c.segs : c["nav-sub"],
771
+ id: v ? "usageTab" : void 0,
772
+ ref: (B) => {
773
+ if (!B || !v) return;
774
+ const w = () => {
775
+ const E = B.querySelector("button.on"), O = B.querySelector(".thumb");
776
+ E && O && (O.style.width = E.offsetWidth + "px", O.style.transform = `translateX(${E.offsetLeft}px)`);
777
+ };
778
+ w(), document.fonts.ready.then(w);
779
+ },
780
+ role: "group",
781
+ "aria-label": "Usage section",
782
+ children: [
783
+ v && /* @__PURE__ */ e("span", { className: `${c.thumb}` }),
784
+ !v && /* @__PURE__ */ e(
785
+ "span",
786
+ {
787
+ className: `${c["nav-hl"]} ${c.still}`,
788
+ style: {
789
+ transform: `translateY(${h.indexOf(d) * 27}px)`
790
+ }
791
+ }
792
+ ),
793
+ h.map((B) => /* @__PURE__ */ e(
794
+ "button",
795
+ {
796
+ className: v ? `opt${d === B ? c.on : ""}` : `nav-s${d === B ? c.cur : ""}`,
797
+ type: "button",
798
+ "aria-pressed": d === B,
799
+ onClick: () => m?.(B),
800
+ children: /* @__PURE__ */ e("span", { children: B })
801
+ },
802
+ B
803
+ ))
804
+ ]
805
+ }
806
+ );
807
+ return /* @__PURE__ */ a(
808
+ "div",
809
+ {
810
+ "data-theme": n,
811
+ className: `mp-ui ${c["mp-ui"]} ${c.window} ${c.web}${v ? "" : " side-nav"}`,
812
+ children: [
813
+ !v && /* @__PURE__ */ a("aside", { className: `${c.sidebar}`, id: "side", children: [
814
+ /* @__PURE__ */ e("div", { className: `${c["side-top"]}`, children: s }),
815
+ /* @__PURE__ */ e("div", { className: `${c["side-scroll"]}`, children: /* @__PURE__ */ e(
816
+ "nav",
817
+ {
818
+ className: `${c.seg}`,
819
+ id: "nav",
820
+ "aria-label": "Main navigation",
821
+ children: ct.map(([B, w, E]) => /* @__PURE__ */ a(Nt.Fragment, { children: [
822
+ /* @__PURE__ */ a(
823
+ "button",
824
+ {
825
+ type: "button",
826
+ "data-view": B === "connection" ? "providers" : B,
827
+ className: t === B ? c.on : "",
828
+ "aria-current": t === B ? "page" : void 0,
829
+ onClick: () => l?.(B),
830
+ children: [
831
+ /* @__PURE__ */ e(ce, { name: E }),
832
+ /* @__PURE__ */ e("span", { children: w })
833
+ ]
834
+ }
835
+ ),
836
+ B === "usage" && t === "usage" && g
837
+ ] }, B))
838
+ }
839
+ ) }),
840
+ /* @__PURE__ */ a("div", { className: `${c["side-foot"]}`, children: [
841
+ k,
842
+ b
843
+ ] })
844
+ ] }),
845
+ /* @__PURE__ */ a("header", { className: `${c.top}`, children: [
846
+ v && s,
847
+ /* @__PURE__ */ e("h1", { className: `${c["sr-only"]}`, children: _ }),
848
+ !v && /* @__PURE__ */ a("div", { className: `${c.crumb}`, "aria-hidden": "true", children: [
849
+ /* @__PURE__ */ e("span", { children: N }),
850
+ /* @__PURE__ */ e("i", { children: "/" }),
851
+ t === "usage" ? /* @__PURE__ */ a(Fe, { children: [
852
+ /* @__PURE__ */ e("span", { children: "Usage" }),
853
+ /* @__PURE__ */ e("i", { children: "/" }),
854
+ /* @__PURE__ */ e("b", { children: d })
855
+ ] }) : /* @__PURE__ */ e("b", { children: _ })
856
+ ] }),
857
+ /* @__PURE__ */ a("div", { className: `${c.actions}`, children: [
858
+ /* @__PURE__ */ e(
859
+ "button",
860
+ {
861
+ type: "button",
862
+ className: `${c.icon}`,
863
+ id: "sync",
864
+ "aria-label": "Refresh",
865
+ disabled: r,
866
+ onClick: o,
867
+ children: /* @__PURE__ */ e(ce, { name: "refresh" })
868
+ }
869
+ ),
870
+ $,
871
+ v && k
872
+ ] })
873
+ ] }),
874
+ /* @__PURE__ */ a("main", { className: `${c.view}`, id: `view-${T}`, children: [
875
+ A,
876
+ /* @__PURE__ */ e(wt.Provider, { value: t === "usage" && v ? g : null, children: i })
877
+ ] }),
878
+ C && /* @__PURE__ */ e("footer", { className: `${c["mp-notice"]}`, children: C })
879
+ ]
880
+ }
881
+ );
882
+ }
883
+ function Nr({
884
+ groups: t,
885
+ query: n,
886
+ onQueryChange: i,
887
+ onSelect: l,
888
+ onImport: o,
889
+ onCustomProvider: r,
890
+ onPlugins: d,
891
+ hasProviders: h = !1,
892
+ status: m = "ready",
893
+ error: C,
894
+ onRetry: $
895
+ }) {
896
+ const b = Ye(), A = n.trim().toLocaleLowerCase().split(/\s+/).filter(Boolean), v = t.map((f) => ({
897
+ ...f,
898
+ providers: f.providers.filter(
899
+ (_) => A.every(
900
+ (N) => `${_.name} ${_.detail ?? ""} ${f.title} ${f.hint ?? ""}`.toLocaleLowerCase().includes(N)
901
+ )
902
+ )
903
+ })).filter((f) => f.providers.length);
904
+ return /* @__PURE__ */ a(Fe, { children: [
905
+ /* @__PURE__ */ e("div", { className: `${c["after-list"]} ${c.away}`, children: /* @__PURE__ */ e("button", { className: `${c.text}`, children: "+ Add provider" }) }),
906
+ /* @__PURE__ */ a(
907
+ "section",
908
+ {
909
+ className: `${c.sheet}`,
910
+ id: "addSheet",
911
+ "aria-label": "Providers",
912
+ "aria-busy": m === "loading",
913
+ children: [
914
+ /* @__PURE__ */ a("div", { className: `${c["row-head"]}`, children: [
915
+ /* @__PURE__ */ e("label", { className: `${c.label}`, htmlFor: b, children: h ? "Add a provider" : "Add your first provider" }),
916
+ /* @__PURE__ */ e("span", { className: `${c.grow}` }),
917
+ /* @__PURE__ */ e(
918
+ "input",
919
+ {
920
+ className: `${c.find}`,
921
+ id: b,
922
+ type: "text",
923
+ "aria-label": "Find a vendor",
924
+ placeholder: "Find a vendor…",
925
+ value: n,
926
+ onChange: (f) => i(f.target.value),
927
+ onKeyDown: (f) => {
928
+ f.key === "Escape" && i("");
929
+ }
930
+ }
931
+ ),
932
+ /* @__PURE__ */ e(
933
+ "button",
934
+ {
935
+ type: "button",
936
+ className: `${c.text}`,
937
+ onClick: o,
938
+ children: "Import…"
939
+ }
940
+ )
941
+ ] }),
942
+ m !== "ready" ? /* @__PURE__ */ e(
943
+ Oe,
944
+ {
945
+ status: m,
946
+ error: C,
947
+ onRetry: $,
948
+ loading: "Loading providers…"
949
+ }
950
+ ) : /* @__PURE__ */ a("div", { className: "tiles", children: [
951
+ v.length === 0 && /* @__PURE__ */ e(
952
+ Oe,
953
+ {
954
+ loading: "",
955
+ empty: n.trim() ? `No providers match “${n.trim()}”. Try another name or add a custom provider.` : "No providers available."
956
+ }
957
+ ),
958
+ v.map((f) => /* @__PURE__ */ a(Nt.Fragment, { children: [
959
+ /* @__PURE__ */ a("div", { className: `${c.kind}`, children: [
960
+ /* @__PURE__ */ e("b", { children: f.title }),
961
+ f.hint && /* @__PURE__ */ e("span", { children: f.hint })
962
+ ] }),
963
+ /* @__PURE__ */ a("div", { className: `${c.grid}`, children: [
964
+ f.providers.map((_) => /* @__PURE__ */ a(
965
+ "button",
966
+ {
967
+ type: "button",
968
+ className: `${c.tile}`,
969
+ disabled: _.disabled,
970
+ onClick: () => l?.(_),
971
+ title: _.detail || _.name,
972
+ children: [
973
+ /* @__PURE__ */ e(je, { name: _.icon }),
974
+ /* @__PURE__ */ e("span", { className: `${c.nm}`, children: /* @__PURE__ */ e("span", { className: `${c.n}`, children: _.name }) })
975
+ ]
976
+ },
977
+ _.id
978
+ )),
979
+ f.id === "subscriptions" && !n.trim() && /* @__PURE__ */ a(
980
+ "button",
981
+ {
982
+ type: "button",
983
+ className: `${c.tile} ${c["more-plugins"]}`,
984
+ onClick: d,
985
+ children: [
986
+ /* @__PURE__ */ e("span", { className: `${c.puzzle}`, children: /* @__PURE__ */ e(ce, { name: "plugin" }) }),
987
+ /* @__PURE__ */ e("span", { className: `${c.nm}`, children: /* @__PURE__ */ e("span", { className: `${c.n}`, children: "More in Plugins" }) }),
988
+ /* @__PURE__ */ e(ce, { name: "chevron" })
989
+ ]
990
+ }
991
+ )
992
+ ] })
993
+ ] }, f.id)),
994
+ !n.trim() && /* @__PURE__ */ a("div", { className: `${c["custom-foot"]}`, children: [
995
+ /* @__PURE__ */ a(
996
+ "button",
997
+ {
998
+ type: "button",
999
+ className: `${c.custom}`,
1000
+ onClick: r,
1001
+ children: [
1002
+ /* @__PURE__ */ e(ce, { name: "plus" }),
1003
+ /* @__PURE__ */ e("span", { children: "Custom provider" })
1004
+ ]
1005
+ }
1006
+ ),
1007
+ /* @__PURE__ */ e("span", { className: `${c.hint}`, children: "any OpenAI or Anthropic compatible URL" })
1008
+ ] })
1009
+ ] })
1010
+ ]
1011
+ }
1012
+ )
1013
+ ] });
1014
+ }
1015
+ function wr({
1016
+ agents: t,
1017
+ endpoint: n,
1018
+ onCopyEndpoint: i,
1019
+ onOpenConnection: l,
1020
+ onToggle: o,
1021
+ onMappingChange: r,
1022
+ showGuide: d = !0,
1023
+ onDismissGuide: h,
1024
+ connectionReady: m = !1,
1025
+ onSaveProfile: C,
1026
+ profileLabel: $ = "none yet · save the setup to switch back in one click",
1027
+ onManage: b,
1028
+ onInstall: A,
1029
+ installCount: v,
1030
+ status: f = "ready",
1031
+ error: _,
1032
+ onRetry: N
1033
+ }) {
1034
+ const T = Number(m) + Number(t.some((s) => s.state === "connected"));
1035
+ return /* @__PURE__ */ a(Fe, { children: [
1036
+ /* @__PURE__ */ a("div", { className: `${c["row-head"]}`, children: [
1037
+ /* @__PURE__ */ a(
1038
+ "button",
1039
+ {
1040
+ className: `${c.fold}`,
1041
+ type: "button",
1042
+ "aria-expanded": !1,
1043
+ children: [
1044
+ /* @__PURE__ */ e(ce, { name: "chevron" }),
1045
+ /* @__PURE__ */ e("span", { className: `${c.label}`, children: "Connect" })
1046
+ ]
1047
+ }
1048
+ ),
1049
+ /* @__PURE__ */ e("span", { className: `${c.grow}` }),
1050
+ n && /* @__PURE__ */ a(
1051
+ "span",
1052
+ {
1053
+ className: `${c.note} ${c.brief}`,
1054
+ id: "connectNote",
1055
+ children: [
1056
+ /* @__PURE__ */ e("code", { children: n }),
1057
+ /* @__PURE__ */ e(
1058
+ "button",
1059
+ {
1060
+ type: "button",
1061
+ className: `${c.copy}`,
1062
+ "aria-label": "Copy endpoint",
1063
+ onClick: i,
1064
+ children: /* @__PURE__ */ e(ce, { name: "copy" })
1065
+ }
1066
+ )
1067
+ ]
1068
+ }
1069
+ )
1070
+ ] }),
1071
+ /* @__PURE__ */ a("section", { className: `${c.profiles}`, children: [
1072
+ /* @__PURE__ */ e("span", { className: `${c.label}`, children: "Profiles" }),
1073
+ /* @__PURE__ */ e("div", { id: "profiles", className: `${c.chips}`, children: /* @__PURE__ */ e("span", { className: `${c.hint}`, children: $ }) }),
1074
+ /* @__PURE__ */ e(
1075
+ "button",
1076
+ {
1077
+ type: "button",
1078
+ id: "save",
1079
+ className: `${c.text}`,
1080
+ onClick: C,
1081
+ children: "+ Save current"
1082
+ }
1083
+ )
1084
+ ] }),
1085
+ f !== "ready" ? /* @__PURE__ */ e(
1086
+ Oe,
1087
+ {
1088
+ status: f,
1089
+ error: _,
1090
+ onRetry: N,
1091
+ loading: "Loading agents…"
1092
+ }
1093
+ ) : /* @__PURE__ */ a(Fe, { children: [
1094
+ d && /* @__PURE__ */ e("div", { className: `${c["ag-lead"]} ${c.guiding}`, children: /* @__PURE__ */ a(
1095
+ "section",
1096
+ {
1097
+ className: `${c.guide}`,
1098
+ "aria-label": "Get started",
1099
+ children: [
1100
+ /* @__PURE__ */ a("div", { className: `${c["guide-head"]}`, children: [
1101
+ /* @__PURE__ */ e("b", { className: `${c["guide-h"]}`, children: "Get started" }),
1102
+ /* @__PURE__ */ a("span", { className: `${c["guide-n"]}`, children: [
1103
+ T,
1104
+ " of 2 done"
1105
+ ] }),
1106
+ /* @__PURE__ */ e(
1107
+ "button",
1108
+ {
1109
+ type: "button",
1110
+ className: `${c["guide-x"]}`,
1111
+ "aria-label": "Dismiss setup guide",
1112
+ onClick: h,
1113
+ children: /* @__PURE__ */ e(ce, { name: "close" })
1114
+ }
1115
+ )
1116
+ ] }),
1117
+ /* @__PURE__ */ a("ol", { className: `${c["guide-steps"]}`, children: [
1118
+ /* @__PURE__ */ a("li", { className: `${c["guide-step"]}`, children: [
1119
+ /* @__PURE__ */ e("span", { className: `${c["guide-tick"]}`, children: "1" }),
1120
+ /* @__PURE__ */ a("div", { className: `${c["guide-body"]}`, children: [
1121
+ /* @__PURE__ */ e("b", { className: `${c["guide-title"]}`, children: "Connect RouterPlus" }),
1122
+ /* @__PURE__ */ e("span", { className: `${c["guide-say"]}`, children: m ? "RouterPlus connection is ready" : "Save your RouterPlus API key on the Connection page" }),
1123
+ !m && /* @__PURE__ */ e(
1124
+ "button",
1125
+ {
1126
+ type: "button",
1127
+ className: `${c.text} ${c.primary} guide-go`,
1128
+ onClick: l,
1129
+ children: "Open Connection"
1130
+ }
1131
+ )
1132
+ ] })
1133
+ ] }),
1134
+ /* @__PURE__ */ a("li", { className: `${c["guide-step"]}`, children: [
1135
+ /* @__PURE__ */ e("span", { className: `${c["guide-tick"]}`, children: "2" }),
1136
+ /* @__PURE__ */ a("div", { className: `${c["guide-body"]}`, children: [
1137
+ /* @__PURE__ */ e("b", { className: `${c["guide-title"]}`, children: "Connect an agent" }),
1138
+ /* @__PURE__ */ e("span", { className: `${c["guide-say"]}`, children: "RouterPlus found these agents. Choose one to connect it:" }),
1139
+ /* @__PURE__ */ e("div", { className: `${c["guide-agents"]}`, children: t.filter((s) => s.state !== "missing").map((s) => /* @__PURE__ */ a(
1140
+ "button",
1141
+ {
1142
+ type: "button",
1143
+ className: `${c["guide-agent"]}`,
1144
+ disabled: !o || !m && s.state === "needs-connection" || s.pending,
1145
+ onClick: () => o?.(
1146
+ s.id,
1147
+ s.state !== "connected"
1148
+ ),
1149
+ children: [
1150
+ /* @__PURE__ */ e(je, { name: s.icon }),
1151
+ /* @__PURE__ */ e("span", { children: s.name })
1152
+ ]
1153
+ },
1154
+ s.id
1155
+ )) })
1156
+ ] })
1157
+ ] })
1158
+ ] })
1159
+ ]
1160
+ }
1161
+ ) }),
1162
+ t.length === 0 && /* @__PURE__ */ e(
1163
+ Oe,
1164
+ {
1165
+ loading: "",
1166
+ empty: "No agents found. Install an agent to configure its models."
1167
+ }
1168
+ ),
1169
+ /* @__PURE__ */ a("div", { className: `${c.list} ${c.extras}`, id: "agents", children: [
1170
+ t.map((s) => /* @__PURE__ */ a(
1171
+ "article",
1172
+ {
1173
+ className: `${c.row} ${c.agent}${s.state === "missing" ? " gone" : " conn"}${s.state === "disconnected" ? " unplugged" : ""}`,
1174
+ "aria-label": s.name,
1175
+ "aria-busy": s.pending,
1176
+ children: [
1177
+ /* @__PURE__ */ e(
1178
+ "button",
1179
+ {
1180
+ type: "button",
1181
+ className: `${c["ag-handle"]}`,
1182
+ "aria-label": `Arrange ${s.name}`,
1183
+ children: /* @__PURE__ */ e(je, { name: s.icon })
1184
+ }
1185
+ ),
1186
+ /* @__PURE__ */ a(
1187
+ "div",
1188
+ {
1189
+ className: `${c.who}${s.state === "missing" ? "" : " with-models"}`,
1190
+ children: [
1191
+ /* @__PURE__ */ e("div", { className: `${c.name}`, children: s.name }),
1192
+ /* @__PURE__ */ e("span", { className: `${c["ag-cli"]}`, children: s.state === "missing" ? /* @__PURE__ */ e("span", { className: `${c["ag-missing"]}`, children: "CLI not found" }) : s.version && /* @__PURE__ */ e("span", { className: `${c["ag-ver"]}`, children: s.version }) }),
1193
+ s.state !== "missing" && /* @__PURE__ */ a(
1194
+ "div",
1195
+ {
1196
+ className: `${c["ag-st"]}${s.state === "connected" ? " on" : ""}`,
1197
+ children: [
1198
+ /* @__PURE__ */ e("span", { className: `${c["ag-dot"]}` }),
1199
+ /* @__PURE__ */ e("span", { className: `${c["ag-st-t"]}`, children: s.pending ? "Applying changes…" : s.state === "needs-connection" ? "Save your API key on the Connection page first" : s.state === "connected" ? "Connected" : "Not connected" })
1200
+ ]
1201
+ }
1202
+ )
1203
+ ]
1204
+ }
1205
+ ),
1206
+ s.state === "needs-connection" && /* @__PURE__ */ e(
1207
+ "button",
1208
+ {
1209
+ type: "button",
1210
+ className: `${c["ag-add"]}`,
1211
+ onClick: l,
1212
+ children: "Open Connection"
1213
+ }
1214
+ ),
1215
+ s.detail && /* @__PURE__ */ e("div", { className: `${c["ag-card-description"]}`, children: /* @__PURE__ */ e("span", { className: `${c["ag-st-t"]}`, children: s.detail }) }),
1216
+ s.state === "connected" && s.fields?.map((k) => /* @__PURE__ */ a("label", { className: `${c.field}`, children: [
1217
+ /* @__PURE__ */ e("span", { children: k.label }),
1218
+ /* @__PURE__ */ e(
1219
+ "select",
1220
+ {
1221
+ "aria-label": k.label,
1222
+ value: k.value,
1223
+ disabled: k.disabled || s.pending || !r,
1224
+ onChange: (g) => r?.(s.id, k.id, g.target.value),
1225
+ children: k.options.map((g) => /* @__PURE__ */ e("option", { value: g.value, children: g.label }, g.value))
1226
+ }
1227
+ )
1228
+ ] }, k.id)),
1229
+ s.state !== "missing" && /* @__PURE__ */ e(
1230
+ "button",
1231
+ {
1232
+ type: "button",
1233
+ role: "switch",
1234
+ className: `${c["lib-switch"]} ${c["ag-conn"]}${s.state === "connected" ? " on" : ""}`,
1235
+ "aria-label": `Connect ${s.name}`,
1236
+ "aria-checked": s.state === "connected",
1237
+ disabled: !o || s.state === "needs-connection" || s.pending,
1238
+ onClick: () => o?.(s.id, s.state !== "connected"),
1239
+ children: /* @__PURE__ */ e("i", {})
1240
+ }
1241
+ )
1242
+ ]
1243
+ },
1244
+ s.id
1245
+ )),
1246
+ /* @__PURE__ */ e("div", { className: `${c["ag-manage-bar"]}`, children: /* @__PURE__ */ a(
1247
+ "button",
1248
+ {
1249
+ className: `${c["ag-manage-button"]}`,
1250
+ type: "button",
1251
+ onClick: b,
1252
+ children: [
1253
+ /* @__PURE__ */ e(ce, { name: "manage" }),
1254
+ /* @__PURE__ */ e("span", { children: "Manage" })
1255
+ ]
1256
+ }
1257
+ ) })
1258
+ ] }),
1259
+ /* @__PURE__ */ e("section", { className: `${c["ag-install"]}`, children: /* @__PURE__ */ a(
1260
+ "button",
1261
+ {
1262
+ type: "button",
1263
+ className: `${c["ag-install-head"]}`,
1264
+ onClick: A,
1265
+ children: [
1266
+ /* @__PURE__ */ a("span", { children: [
1267
+ "Install another agent",
1268
+ v !== void 0 ? ` (${v})` : ""
1269
+ ] }),
1270
+ /* @__PURE__ */ e("span", { className: `${c.chev}`, children: /* @__PURE__ */ e(ce, { name: "down" }) })
1271
+ ]
1272
+ }
1273
+ ) })
1274
+ ] })
1275
+ ] });
1276
+ }
1277
+ const dt = [
1278
+ "Today",
1279
+ "7 days",
1280
+ "30 days",
1281
+ "All",
1282
+ "Custom"
1283
+ ];
1284
+ function kr({
1285
+ period: t,
1286
+ onPeriodChange: n,
1287
+ data: i,
1288
+ onRefresh: l,
1289
+ refreshInterval: o = "5 s",
1290
+ onRefreshIntervalChange: r,
1291
+ customRange: d,
1292
+ onCustomRangeChange: h,
1293
+ status: m = "ready",
1294
+ error: C,
1295
+ onRetry: $
1296
+ }) {
1297
+ const b = ea(wt), [A, v] = Be(!1), [f, _] = Be(!1), N = m === "ready" ? i : null, T = Math.max(
1298
+ 1,
1299
+ ...N?.series.map((s) => s.calls) ?? []
1300
+ );
1301
+ return /* @__PURE__ */ a(Fe, { children: [
1302
+ /* @__PURE__ */ a("div", { className: `${c["usage-head"]}`, children: [
1303
+ b,
1304
+ /* @__PURE__ */ a(
1305
+ "div",
1306
+ {
1307
+ className: `${c.segs}`,
1308
+ id: "period",
1309
+ ref: (s) => {
1310
+ if (!s) return;
1311
+ const k = s.querySelector("button.on"), g = s.querySelector(".thumb");
1312
+ k && g && (g.style.width = k.offsetWidth + "px", g.style.transform = `translateX(${k.offsetLeft}px)`, document.fonts.ready.then(() => {
1313
+ g.style.width = k.offsetWidth + "px", g.style.transform = `translateX(${k.offsetLeft}px)`;
1314
+ }));
1315
+ },
1316
+ role: "group",
1317
+ "aria-label": "Usage period",
1318
+ children: [
1319
+ /* @__PURE__ */ e("span", { className: `${c.thumb}` }),
1320
+ dt.map((s) => /* @__PURE__ */ a(
1321
+ "button",
1322
+ {
1323
+ type: "button",
1324
+ className: `${c.opt}${s === "Custom" ? " range-opt" : ""}${t === s ? " on" : ""}`,
1325
+ "aria-pressed": t === s,
1326
+ disabled: !n,
1327
+ onClick: () => n?.(s),
1328
+ children: [
1329
+ s === "Custom" && /* @__PURE__ */ e(ce, { name: "calendar" }),
1330
+ s
1331
+ ]
1332
+ },
1333
+ s
1334
+ ))
1335
+ ]
1336
+ }
1337
+ ),
1338
+ /* @__PURE__ */ a(
1339
+ "button",
1340
+ {
1341
+ type: "button",
1342
+ className: `${c["usage-range-menu"]}`,
1343
+ "aria-label": "Usage period",
1344
+ "aria-expanded": A,
1345
+ onClick: () => v(!A),
1346
+ children: [
1347
+ /* @__PURE__ */ e("span", { children: t }),
1348
+ /* @__PURE__ */ e(ce, { name: "down" })
1349
+ ]
1350
+ }
1351
+ ),
1352
+ /* @__PURE__ */ e("span", { className: `${c.grow}` }),
1353
+ /* @__PURE__ */ a("div", { className: `${c["usage-refresh"]}`, children: [
1354
+ /* @__PURE__ */ e(
1355
+ "button",
1356
+ {
1357
+ type: "button",
1358
+ className: `${c.icon}`,
1359
+ "aria-label": "Refresh usage",
1360
+ disabled: !l || m === "loading",
1361
+ onClick: l,
1362
+ children: /* @__PURE__ */ e(ce, { name: "refresh" })
1363
+ }
1364
+ ),
1365
+ /* @__PURE__ */ a(
1366
+ "button",
1367
+ {
1368
+ type: "button",
1369
+ className: `${c["sess-pick"]} ${c.live}`,
1370
+ "aria-label": "Refresh interval",
1371
+ "aria-expanded": f,
1372
+ onClick: () => _(!f),
1373
+ children: [
1374
+ /* @__PURE__ */ e("span", { children: o }),
1375
+ /* @__PURE__ */ e(ce, { name: "down" })
1376
+ ]
1377
+ }
1378
+ )
1379
+ ] }),
1380
+ /* @__PURE__ */ a("span", { className: `${c["usage-cost"]}`, children: [
1381
+ /* @__PURE__ */ e("b", { children: N?.cost ?? "—" }),
1382
+ /* @__PURE__ */ e("span", { children: "effective prices" })
1383
+ ] })
1384
+ ] }),
1385
+ t === "Custom" && /* @__PURE__ */ a("div", { className: "mp-custom-range", children: [
1386
+ /* @__PURE__ */ a("label", { children: [
1387
+ "From",
1388
+ /* @__PURE__ */ e(
1389
+ "input",
1390
+ {
1391
+ type: "date",
1392
+ value: d?.from ?? "",
1393
+ max: d?.to || void 0,
1394
+ disabled: !h,
1395
+ onChange: (s) => h?.({
1396
+ from: s.target.value,
1397
+ to: d?.to ?? ""
1398
+ })
1399
+ }
1400
+ )
1401
+ ] }),
1402
+ /* @__PURE__ */ a("label", { children: [
1403
+ "To",
1404
+ /* @__PURE__ */ e(
1405
+ "input",
1406
+ {
1407
+ type: "date",
1408
+ value: d?.to ?? "",
1409
+ min: d?.from || void 0,
1410
+ disabled: !h,
1411
+ onChange: (s) => h?.({
1412
+ from: d?.from ?? "",
1413
+ to: s.target.value
1414
+ })
1415
+ }
1416
+ )
1417
+ ] })
1418
+ ] }),
1419
+ A && /* @__PURE__ */ e(
1420
+ "div",
1421
+ {
1422
+ className: `${c.pop}`,
1423
+ role: "menu",
1424
+ "aria-label": "Usage period",
1425
+ children: dt.map((s) => /* @__PURE__ */ a(
1426
+ "button",
1427
+ {
1428
+ role: "menuitem",
1429
+ onClick: () => {
1430
+ n?.(s), v(!1);
1431
+ },
1432
+ children: [
1433
+ s === "Custom" && /* @__PURE__ */ e(ce, { name: "calendar" }),
1434
+ s
1435
+ ]
1436
+ },
1437
+ s
1438
+ ))
1439
+ }
1440
+ ),
1441
+ f && /* @__PURE__ */ e(
1442
+ "div",
1443
+ {
1444
+ className: `${c.pop}`,
1445
+ role: "menu",
1446
+ "aria-label": "Refresh interval",
1447
+ children: ["Off", "5 s", "30 s", "1 min"].map((s) => /* @__PURE__ */ e(
1448
+ "button",
1449
+ {
1450
+ role: "menuitem",
1451
+ onClick: () => {
1452
+ r?.(s), _(!1);
1453
+ },
1454
+ children: s
1455
+ },
1456
+ s
1457
+ ))
1458
+ }
1459
+ ),
1460
+ /* @__PURE__ */ e("p", { className: `${c["usage-note"]}`, children: "Gateway calls only; session-log calls are in Requests. Local rejections are excluded from totals." }),
1461
+ m !== "ready" ? /* @__PURE__ */ e(
1462
+ Oe,
1463
+ {
1464
+ status: m,
1465
+ error: C,
1466
+ onRetry: $,
1467
+ loading: "Loading usage…"
1468
+ }
1469
+ ) : N ? N.calls === 0 ? /* @__PURE__ */ e("div", { className: `${c.stats} ${c.empty}`, children: /* @__PURE__ */ e(
1470
+ "div",
1471
+ {
1472
+ className: `${c.none}`,
1473
+ role: "status",
1474
+ children: `No calls ${t === "Today" ? "today" : "in this period"}. Point an agent at a catalog model and use it; every call through the gateway is counted here.`
1475
+ }
1476
+ ) }) : /* @__PURE__ */ a(Fe, { children: [
1477
+ /* @__PURE__ */ e("dl", { className: "mp-usage-metrics", children: [
1478
+ ["Calls", N.calls],
1479
+ ["Errors", N.errors],
1480
+ ["Input tokens", N.input],
1481
+ ["Output tokens", N.output]
1482
+ ].map(([s, k]) => /* @__PURE__ */ a("div", { children: [
1483
+ /* @__PURE__ */ e("dt", { children: s }),
1484
+ /* @__PURE__ */ e("dd", { children: typeof k == "number" ? k.toLocaleString("en-US") : k })
1485
+ ] }, s)) }),
1486
+ /* @__PURE__ */ a(
1487
+ "section",
1488
+ {
1489
+ className: "mp-usage-chart",
1490
+ "aria-label": "Calls over time",
1491
+ children: [
1492
+ /* @__PURE__ */ e("h2", { children: "Calls" }),
1493
+ N.series.length === 0 ? /* @__PURE__ */ e(
1494
+ Oe,
1495
+ {
1496
+ loading: "",
1497
+ empty: "No time-series breakdown available."
1498
+ }
1499
+ ) : /* @__PURE__ */ e(
1500
+ "div",
1501
+ {
1502
+ className: "mp-chart-bars",
1503
+ role: "img",
1504
+ "aria-label": N.series.map((s) => `${s.label}: ${s.calls} calls`).join("; "),
1505
+ children: N.series.map((s, k) => /* @__PURE__ */ a(
1506
+ "div",
1507
+ {
1508
+ className: "mp-chart-column",
1509
+ children: [
1510
+ /* @__PURE__ */ e("span", { children: s.calls }),
1511
+ /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
1512
+ "i",
1513
+ {
1514
+ style: {
1515
+ height: `${Math.max(0, s.calls) / T * 100}%`
1516
+ }
1517
+ }
1518
+ ) }),
1519
+ /* @__PURE__ */ e("small", { children: s.label })
1520
+ ]
1521
+ },
1522
+ `${s.label}-${k}`
1523
+ ))
1524
+ }
1525
+ )
1526
+ ]
1527
+ }
1528
+ )
1529
+ ] }) : /* @__PURE__ */ e(
1530
+ Oe,
1531
+ {
1532
+ loading: "",
1533
+ empty: "Usage is unavailable. Refresh to try again."
1534
+ }
1535
+ )
1536
+ ] });
1537
+ }
1538
+ const tt = { ...et, ...rt };
1539
+ function Mr({
1540
+ name: t,
1541
+ icon: n,
1542
+ detail: i,
1543
+ className: l = "",
1544
+ type: o = "button",
1545
+ ...r
1546
+ }) {
1547
+ return /* @__PURE__ */ a(
1548
+ "button",
1549
+ {
1550
+ type: o,
1551
+ className: `${tt.tile}${l ? ` ${l}` : ""}`,
1552
+ title: i || t,
1553
+ ...r,
1554
+ children: [
1555
+ /* @__PURE__ */ e(je, { name: n }),
1556
+ /* @__PURE__ */ e("span", { className: tt.nm, children: /* @__PURE__ */ e("span", { className: tt.n, children: t }) })
1557
+ ]
1558
+ }
1559
+ );
1560
+ }
1561
+ const ht = {
1562
+ sm: { box: 32, icon: 20, text: 12 },
1563
+ md: { box: 48, icon: 32, text: 14 },
1564
+ lg: { box: 72, icon: 48, text: 16 }
1565
+ };
1566
+ function $r({
1567
+ name: t,
1568
+ icon: n,
1569
+ showIcon: i = !0,
1570
+ size: l = "md",
1571
+ className: o = "",
1572
+ style: r,
1573
+ ...d
1574
+ }) {
1575
+ const h = ht[l] ?? ht.md, m = {
1576
+ display: "inline-flex",
1577
+ alignItems: "center",
1578
+ gap: 10,
1579
+ maxWidth: "100%",
1580
+ minWidth: 0,
1581
+ color: "var(--rp-color-text, inherit)",
1582
+ ...r
1583
+ }, C = {
1584
+ minWidth: 0,
1585
+ fontSize: h.text,
1586
+ fontWeight: 600,
1587
+ lineHeight: 1.4,
1588
+ overflowWrap: "anywhere"
1589
+ }, $ = {
1590
+ display: "inline-flex",
1591
+ alignItems: "center",
1592
+ justifyContent: "center",
1593
+ flexShrink: 0,
1594
+ width: h.box,
1595
+ height: h.box,
1596
+ borderRadius: 10,
1597
+ background: "var(--rp-color-surface-raised, rgba(127,127,127,0.08))",
1598
+ fontSize: h.icon,
1599
+ lineHeight: 1
1600
+ };
1601
+ return /* @__PURE__ */ a("span", { className: o, style: m, ...d, children: [
1602
+ i ? /* @__PURE__ */ e("span", { style: $, "aria-hidden": t ? !0 : void 0, children: /* @__PURE__ */ e(je, { name: n }) }) : null,
1603
+ t ? /* @__PURE__ */ e("span", { style: C, children: t }) : null
1604
+ ] });
1605
+ }
1606
+ const sa = "rp_Billing-module_billing_jVpbPSwf", oa = "rp_Billing-module_inline_Mf5K0TOB", la = "rp_Billing-module_body_73T3WPhM", ca = "rp_Billing-module_sheet_uq-sE7Kj", da = "rp_Billing-module_header_6ZibPvV0", ha = "rp_Billing-module_footer_sZ8dMMt3", pa = "rp_Billing-module_titleIcon_yvF5gUEf", ua = "rp_Billing-module_heading_hXnE-5Dq", ma = "rp_Billing-module_title_XVWBtjrY", ga = "rp_Billing-module_description_15DMv8fm", fa = "rp_Billing-module_bodyWrap_73GWDsL6", va = "rp_Billing-module_scrollFade_Vp55lLY8", ba = "rp_Billing-module_section_CCEnjKJi", ya = "rp_Billing-module_fieldLabel_j4TFB90Z", _a = "rp_Billing-module_amount_huNHfEM9", Na = "rp_Billing-module_amountCurrency_5BAcrLkG", wa = "rp_Billing-module_quickAmounts_-zXxHGvq", ka = "rp_Billing-module_quickAmount_wZ1vL5t7", Ma = "rp_Billing-module_quickAmountActive_UN-iKg7L", $a = "rp_Billing-module_cashback_SEKfvhCV", xa = "rp_Billing-module_cashbackHead_TeiHoLw6", Ca = "rp_Billing-module_cashbackRate_snXI6bxo", Aa = "rp_Billing-module_cashbackHint_8hFT1XBR", La = "rp_Billing-module_track_gUZMl3uW", Sa = "rp_Billing-module_trackDot_yY1N2NRt", Ba = "rp_Billing-module_tiers_BavMzMhY", Ra = "rp_Billing-module_tier_HO96mY1F", Ta = "rp_Billing-module_tierRate_vgFEdh-O", qa = "rp_Billing-module_tierMin_N22iOx8J", Fa = "rp_Billing-module_tierFirst_6Hc74rSN", Pa = "rp_Billing-module_tierMid_NeSUtEn1", Ia = "rp_Billing-module_tierLast_lE0S52qZ", Ea = "rp_Billing-module_tierCurrent_GctoON0O", Ha = "rp_Billing-module_methodGroups_zpebVDsx", Da = "rp_Billing-module_group_pHl7zEfy", Oa = "rp_Billing-module_groupHead_P-SY4GHg", Ua = "rp_Billing-module_groupTitle_wdOq-XTd", za = "rp_Billing-module_groupBody_lrnARuI0", Ga = "rp_Billing-module_method_faV0uTen", Xa = "rp_Billing-module_methodIcon_JUWyNcoC", Ya = "rp_Billing-module_methodText_-dgM99xC", ja = "rp_Billing-module_methodLabel_5TAtp3w3", Wa = "rp_Billing-module_methodDescription_DFZuV4o0", Va = "rp_Billing-module_methodFee_5X-xX3q5", Ka = "rp_Billing-module_methodCheck_QhxGxyBe", Ja = "rp_Billing-module_checkIcon_5PuJJ6qi", Za = "rp_Billing-module_empty_XLKm1aHR", Qa = "rp_Billing-module_region_LaGBn-om", en = "rp_Billing-module_regionLabel_7ufpgJpv", tn = "rp_Billing-module_regionTrigger_V3TL-sZd", an = "rp_Billing-module_regionValue_RRhFjyaZ", nn = "rp_Billing-module_regionGlobe_oSvgpNSR", rn = "rp_Billing-module_optionGlobe_FVCNGrV9", sn = "rp_Billing-module_regionContent_644AhED-", on = "rp_Billing-module_regionHint_ioA4L3ju", ln = "rp_Billing-module_pay_htbzTpTf", cn = "rp_Billing-module_payPending_rNhFyReW", dn = "rp_Billing-module_error_VTbjGrSy", hn = "rp_Billing-module_payLabel_9cFNb7Af", pn = "rp_Billing-module_notice_uwuIHit3", S = {
1607
+ billing: sa,
1608
+ inline: oa,
1609
+ body: la,
1610
+ sheet: ca,
1611
+ header: da,
1612
+ footer: ha,
1613
+ titleIcon: pa,
1614
+ heading: ua,
1615
+ title: ma,
1616
+ description: ga,
1617
+ bodyWrap: fa,
1618
+ scrollFade: va,
1619
+ section: ba,
1620
+ fieldLabel: ya,
1621
+ amount: _a,
1622
+ amountCurrency: Na,
1623
+ quickAmounts: wa,
1624
+ quickAmount: ka,
1625
+ quickAmountActive: Ma,
1626
+ cashback: $a,
1627
+ cashbackHead: xa,
1628
+ cashbackRate: Ca,
1629
+ cashbackHint: Aa,
1630
+ track: La,
1631
+ trackDot: Sa,
1632
+ tiers: Ba,
1633
+ tier: Ra,
1634
+ tierRate: Ta,
1635
+ tierMin: qa,
1636
+ tierFirst: Fa,
1637
+ tierMid: Pa,
1638
+ tierLast: Ia,
1639
+ tierCurrent: Ea,
1640
+ methodGroups: Ha,
1641
+ group: Da,
1642
+ groupHead: Oa,
1643
+ groupTitle: Ua,
1644
+ groupBody: za,
1645
+ method: Ga,
1646
+ methodIcon: Xa,
1647
+ methodText: Ya,
1648
+ methodLabel: ja,
1649
+ methodDescription: Wa,
1650
+ methodFee: Va,
1651
+ methodCheck: Ka,
1652
+ checkIcon: Ja,
1653
+ empty: Za,
1654
+ region: Qa,
1655
+ regionLabel: en,
1656
+ regionTrigger: tn,
1657
+ regionValue: an,
1658
+ regionGlobe: nn,
1659
+ optionGlobe: rn,
1660
+ regionContent: sn,
1661
+ regionHint: on,
1662
+ pay: ln,
1663
+ payPending: cn,
1664
+ error: dn,
1665
+ payLabel: hn,
1666
+ notice: pn
1667
+ }, un = {
1668
+ title: "Top up",
1669
+ amount: "Amount",
1670
+ cashback: "Cashback",
1671
+ fee: "Fee",
1672
+ methodLabel: "Payment method",
1673
+ region: "Region",
1674
+ regionHint: "Crypto works everywhere.",
1675
+ pay: "Pay",
1676
+ pending: "Preparing payment…",
1677
+ empty: "No payment methods here."
1678
+ };
1679
+ function mn(t) {
1680
+ try {
1681
+ return new Intl.Locale(t).maximize().region?.toUpperCase();
1682
+ } catch {
1683
+ return t.replace("_", "-").split("-")[1]?.toUpperCase();
1684
+ }
1685
+ }
1686
+ function xr(t) {
1687
+ const n = t.trim().toUpperCase();
1688
+ return /^[A-Z]{2}$/.test(n) ? String.fromCodePoint(
1689
+ ...[n.charCodeAt(0), n.charCodeAt(1)].map(
1690
+ (i) => 127462 + i - 65
1691
+ )
1692
+ ) : "🌐";
1693
+ }
1694
+ function gn(t, n) {
1695
+ try {
1696
+ return new Intl.NumberFormat(t, {
1697
+ style: "currency",
1698
+ currency: n
1699
+ }).formatToParts(0).find((l) => l.type === "currency")?.value ?? n;
1700
+ } catch {
1701
+ return n;
1702
+ }
1703
+ }
1704
+ function kt(t, n, i) {
1705
+ try {
1706
+ return new Intl.NumberFormat(t, {
1707
+ style: "currency",
1708
+ currency: n,
1709
+ maximumFractionDigits: 2
1710
+ }).format(i);
1711
+ } catch {
1712
+ return `${n} ${i.toFixed(2)}`;
1713
+ }
1714
+ }
1715
+ function fn(t, n, i) {
1716
+ try {
1717
+ return new Intl.NumberFormat(t, {
1718
+ style: "currency",
1719
+ currency: n,
1720
+ maximumFractionDigits: 0
1721
+ }).format(i);
1722
+ } catch {
1723
+ return `${n} ${Math.round(i)}`;
1724
+ }
1725
+ }
1726
+ function vn(t) {
1727
+ return t.next ? `Add ${kt(t.locale, t.currency, t.next.min)} for ${t.next.rate}% cashback.` : t.rate > 0 ? `${t.rate}% cashback added to your balance.` : "Cashback starts at the next tier.";
1728
+ }
1729
+ function bn() {
1730
+ const [t, n] = Be(null), [i, l] = Be({ overflowing: !1, atEnd: !0 });
1731
+ return ke(() => {
1732
+ if (!t) return;
1733
+ const o = () => {
1734
+ const h = t.scrollHeight - t.clientHeight > 1;
1735
+ l({
1736
+ overflowing: h,
1737
+ atEnd: t.scrollTop + t.clientHeight >= t.scrollHeight - 1
1738
+ });
1739
+ };
1740
+ o(), t.addEventListener("scroll", o, { passive: !0 });
1741
+ const r = new ResizeObserver(o);
1742
+ r.observe(t);
1743
+ const d = new MutationObserver(o);
1744
+ return d.observe(t, { childList: !0, subtree: !0 }), () => {
1745
+ t.removeEventListener("scroll", o), r.disconnect(), d.disconnect();
1746
+ };
1747
+ }, [t]), [n, i.overflowing && !i.atEnd];
1748
+ }
1749
+ const Cr = ({
1750
+ locale: t = typeof navigator > "u" ? "en-US" : navigator.language,
1751
+ countries: n,
1752
+ cryptoMethods: i = [],
1753
+ cryptoTitle: l = "Crypto",
1754
+ tiers: o = [],
1755
+ defaultCountryCode: r,
1756
+ countryCode: d,
1757
+ onCountryChange: h,
1758
+ defaultAmount: m = 0,
1759
+ amount: C,
1760
+ onAmountChange: $,
1761
+ quickAmounts: b = [10, 25, 50, 100],
1762
+ defaultMethodId: A,
1763
+ methodId: v,
1764
+ onMethodChange: f,
1765
+ minAmount: _ = 0,
1766
+ maxAmount: N,
1767
+ title: T,
1768
+ description: s,
1769
+ copy: k,
1770
+ formatCashback: g,
1771
+ onPay: B,
1772
+ pending: w = !1,
1773
+ error: E,
1774
+ children: O,
1775
+ notice: R,
1776
+ variant: W = "panel",
1777
+ className: z
1778
+ }) => {
1779
+ const X = { ...un, ...k }, V = Ye(), U = Ye(), J = Ye(), [ne, se] = bn(), [q, H] = Be(
1780
+ () => r ?? mn(t) ?? n[0]?.code ?? ""
1781
+ ), [p, L] = Be(m), [u, M] = Be(
1782
+ A
1783
+ ), y = n.find(
1784
+ (x) => x.code === (d ?? q)
1785
+ ) ?? n.find((x) => x.code === r) ?? n[0], F = C ?? p, I = y?.currency ?? "EUR", D = gn(t, I), Y = Ke(() => {
1786
+ const x = (y?.groups ?? []).filter(
1787
+ (K) => K.methods.length > 0
1788
+ ), P = i.length > 0 ? { id: "crypto", title: l, methods: i } : void 0;
1789
+ return P ? [...x, P] : [...x];
1790
+ }, [y, i, l]), Q = Ke(
1791
+ () => Y.flatMap((x) => x.methods),
1792
+ [Y]
1793
+ ), he = Ke(() => {
1794
+ const x = v ?? u;
1795
+ return Q.find(
1796
+ (K) => K.id === x && !K.disabled
1797
+ )?.id ?? Q.find((K) => !K.disabled)?.id;
1798
+ }, [v, u, Q]), oe = Q.find((x) => x.id === he), ee = Ke(
1799
+ () => [...o].sort((x, P) => x.min - P.min),
1800
+ [o]
1801
+ ), ge = ee.reduce(
1802
+ (x, P) => F >= P.min ? P : x,
1803
+ void 0
1804
+ ), le = ee.find((x) => F < x.min), ve = ge?.rate ?? 0, pe = ee[ee.length - 1]?.min || 0, re = Math.max(0, Math.min(F, pe)), ue = pe ? re / pe * 100 : 0, Ne = {
1805
+ amount: F,
1806
+ rate: ve,
1807
+ next: le,
1808
+ currency: I,
1809
+ locale: t
1810
+ }, $e = g?.(Ne) ?? vn(Ne), Le = (x) => {
1811
+ const P = Number.isFinite(x) ? Math.max(0, x) : 0;
1812
+ C === void 0 && L(P), $?.(P);
1813
+ }, xe = (x) => {
1814
+ const P = n.find((j) => j.code === x);
1815
+ if (!P) return;
1816
+ d === void 0 && H(x);
1817
+ const K = [
1818
+ ...P.groups.flatMap((j) => j.methods),
1819
+ ...i
1820
+ ];
1821
+ if (!K.some(
1822
+ (j) => j.id === he && !j.disabled
1823
+ )) {
1824
+ const j = K.find((te) => !te.disabled);
1825
+ v === void 0 && M(j?.id), j && f?.(j);
1826
+ }
1827
+ h?.(P);
1828
+ }, Re = (x) => {
1829
+ const P = Q.find((K) => K.id === x);
1830
+ P && (v === void 0 && M(x), f?.(P));
1831
+ }, me = !w && Number.isFinite(F) && F > 0 && F >= _ && (N === void 0 || F <= N) && !!oe && !!y, ie = () => {
1832
+ !me || !oe || !y || B?.({ amount: F, method: oe, country: y });
1833
+ };
1834
+ return /* @__PURE__ */ a(
1835
+ "section",
1836
+ {
1837
+ className: Z(
1838
+ S.billing,
1839
+ W === "inline" && S.inline,
1840
+ W === "sheet" && S.sheet,
1841
+ z
1842
+ ),
1843
+ "aria-labelledby": V,
1844
+ children: [
1845
+ /* @__PURE__ */ a("header", { className: S.header, children: [
1846
+ /* @__PURE__ */ e("span", { className: S.titleIcon, "aria-hidden": "true", children: /* @__PURE__ */ e(Te.Wallet, { size: 18 }) }),
1847
+ /* @__PURE__ */ a("div", { className: S.heading, children: [
1848
+ /* @__PURE__ */ e("h2", { className: S.title, id: V, children: T ?? X.title }),
1849
+ s && /* @__PURE__ */ e("p", { className: S.description, children: s })
1850
+ ] })
1851
+ ] }),
1852
+ /* @__PURE__ */ a("div", { className: S.bodyWrap, children: [
1853
+ /* @__PURE__ */ a("div", { className: S.body, ref: ne, children: [
1854
+ /* @__PURE__ */ a("div", { className: S.section, children: [
1855
+ /* @__PURE__ */ e(ot, { className: S.fieldLabel, htmlFor: U, children: X.amount }),
1856
+ /* @__PURE__ */ a(lt.Root, { className: S.amount, disabled: w, children: [
1857
+ /* @__PURE__ */ e("span", { className: S.amountCurrency, "aria-hidden": "true", children: D }),
1858
+ /* @__PURE__ */ e(
1859
+ lt.Control,
1860
+ {
1861
+ disabled: w,
1862
+ id: U,
1863
+ className: S.amountInput,
1864
+ type: "number",
1865
+ inputMode: "decimal",
1866
+ min: _,
1867
+ max: N,
1868
+ step: "0.01",
1869
+ placeholder: "0",
1870
+ value: F === 0 ? "" : F,
1871
+ onChange: (x) => {
1872
+ const P = Number.parseFloat(x.target.value);
1873
+ Le(Number.isFinite(P) ? P : 0);
1874
+ }
1875
+ }
1876
+ )
1877
+ ] }),
1878
+ b && b.length > 0 && /* @__PURE__ */ e("div", { className: S.quickAmounts, children: b.map((x) => /* @__PURE__ */ a(
1879
+ G,
1880
+ {
1881
+ variant: "secondary",
1882
+ textVariant: Tt.Button_Link_Extra_Small_1,
1883
+ className: Z(
1884
+ S.quickAmount,
1885
+ F === x && S.quickAmountActive
1886
+ ),
1887
+ "aria-pressed": F === x,
1888
+ disabled: w,
1889
+ onClick: () => Le(x),
1890
+ children: [
1891
+ "+",
1892
+ x
1893
+ ]
1894
+ },
1895
+ x
1896
+ )) })
1897
+ ] }),
1898
+ ee.length > 1 && /* @__PURE__ */ a("div", { className: S.cashback, children: [
1899
+ /* @__PURE__ */ a("div", { className: S.cashbackHead, children: [
1900
+ /* @__PURE__ */ e("span", { children: X.cashback }),
1901
+ /* @__PURE__ */ a("strong", { className: S.cashbackRate, children: [
1902
+ ve,
1903
+ "%"
1904
+ ] })
1905
+ ] }),
1906
+ /* @__PURE__ */ e("p", { className: S.cashbackHint, children: $e }),
1907
+ /* @__PURE__ */ a("div", { className: S.track, children: [
1908
+ /* @__PURE__ */ e(
1909
+ qt,
1910
+ {
1911
+ className: S.progress,
1912
+ value: re,
1913
+ max: pe || 1,
1914
+ ariaLabel: X.cashback
1915
+ }
1916
+ ),
1917
+ /* @__PURE__ */ e(
1918
+ "span",
1919
+ {
1920
+ className: S.trackDot,
1921
+ style: {
1922
+ left: `calc(8px + (100% - 16px) * ${ue / 100})`
1923
+ },
1924
+ "aria-hidden": "true"
1925
+ }
1926
+ )
1927
+ ] }),
1928
+ /* @__PURE__ */ e(
1929
+ "div",
1930
+ {
1931
+ className: S.tiers,
1932
+ style: {
1933
+ gridTemplateColumns: `repeat(${ee.length}, minmax(0, 1fr))`
1934
+ },
1935
+ children: ee.map((x, P) => /* @__PURE__ */ a(
1936
+ "div",
1937
+ {
1938
+ className: Z(
1939
+ S.tier,
1940
+ P === 0 && S.tierFirst,
1941
+ P > 0 && P < ee.length - 1 && S.tierMid,
1942
+ P === ee.length - 1 && S.tierLast,
1943
+ x === ge && S.tierCurrent
1944
+ ),
1945
+ children: [
1946
+ /* @__PURE__ */ a("span", { className: S.tierRate, children: [
1947
+ x.rate,
1948
+ "%"
1949
+ ] }),
1950
+ /* @__PURE__ */ e("span", { className: S.tierMin, children: fn(t, I, x.min) })
1951
+ ]
1952
+ },
1953
+ x.min
1954
+ ))
1955
+ }
1956
+ )
1957
+ ] }),
1958
+ /* @__PURE__ */ a(
1959
+ Ft,
1960
+ {
1961
+ disabled: w,
1962
+ value: he ?? "",
1963
+ onValueChange: Re,
1964
+ "aria-label": X.methodLabel,
1965
+ className: S.methodGroups,
1966
+ children: [
1967
+ Y.length === 0 && /* @__PURE__ */ e(Pt, { className: S.empty, title: X.empty }),
1968
+ Y.map((x) => /* @__PURE__ */ a(
1969
+ "section",
1970
+ {
1971
+ className: S.group,
1972
+ "aria-labelledby": `${V}-${x.id}`,
1973
+ children: [
1974
+ /* @__PURE__ */ a("div", { className: S.groupHead, children: [
1975
+ /* @__PURE__ */ e(
1976
+ "h3",
1977
+ {
1978
+ className: S.groupTitle,
1979
+ id: `${V}-${x.id}`,
1980
+ children: x.title
1981
+ }
1982
+ ),
1983
+ /* @__PURE__ */ e("span", { children: x.feeLabel ?? X.fee })
1984
+ ] }),
1985
+ /* @__PURE__ */ e(It, { variant: "reference", className: S.groupBody, children: x.methods.map((P) => /* @__PURE__ */ a(
1986
+ Et,
1987
+ {
1988
+ value: P.id,
1989
+ disabled: P.disabled,
1990
+ className: S.method,
1991
+ children: [
1992
+ /* @__PURE__ */ e("span", { className: S.methodIcon, "aria-hidden": "true", children: P.icon ?? /* @__PURE__ */ e(Te.Card, { size: 22 }) }),
1993
+ /* @__PURE__ */ a("span", { className: S.methodText, children: [
1994
+ /* @__PURE__ */ a("span", { className: S.methodLabel, children: [
1995
+ P.label,
1996
+ P.badge && /* @__PURE__ */ e(Ht, { children: P.badge })
1997
+ ] }),
1998
+ P.description && /* @__PURE__ */ e("span", { className: S.methodDescription, children: P.description })
1999
+ ] }),
2000
+ P.fee && /* @__PURE__ */ e("span", { className: S.methodFee, children: P.fee }),
2001
+ /* @__PURE__ */ e("span", { className: S.methodCheck, "aria-hidden": "true", children: /* @__PURE__ */ e(Te.Check, { size: 12, className: S.checkIcon }) })
2002
+ ]
2003
+ },
2004
+ P.id
2005
+ )) })
2006
+ ]
2007
+ },
2008
+ x.id
2009
+ ))
2010
+ ]
2011
+ }
2012
+ ),
2013
+ O
2014
+ ] }),
2015
+ se && /* @__PURE__ */ e("span", { className: S.scrollFade, "aria-hidden": "true" })
2016
+ ] }),
2017
+ /* @__PURE__ */ a("footer", { className: S.footer, children: [
2018
+ /* @__PURE__ */ a("div", { className: S.region, children: [
2019
+ /* @__PURE__ */ e(ot, { className: S.regionLabel, htmlFor: J, children: X.region }),
2020
+ /* @__PURE__ */ a(
2021
+ Dt,
2022
+ {
2023
+ disabled: w || n.length === 0,
2024
+ value: y?.code ?? "",
2025
+ onValueChange: xe,
2026
+ children: [
2027
+ /* @__PURE__ */ a(
2028
+ Ot,
2029
+ {
2030
+ id: J,
2031
+ className: S.regionTrigger,
2032
+ "aria-label": X.region,
2033
+ children: [
2034
+ /* @__PURE__ */ e(Te.Globe, { size: 16, className: S.regionGlobe }),
2035
+ /* @__PURE__ */ e(Ut, { className: S.regionValue }),
2036
+ /* @__PURE__ */ e(zt, { children: /* @__PURE__ */ e(Te.Down, { size: 16 }) })
2037
+ ]
2038
+ }
2039
+ ),
2040
+ /* @__PURE__ */ e(Gt, { children: /* @__PURE__ */ e(
2041
+ Xt,
2042
+ {
2043
+ position: "popper",
2044
+ sideOffset: 6,
2045
+ align: "start",
2046
+ className: S.regionContent,
2047
+ children: /* @__PURE__ */ e(Yt, { children: /* @__PURE__ */ e(jt, { children: n.map((x) => /* @__PURE__ */ a(Wt, { value: x.code, children: [
2048
+ /* @__PURE__ */ e(Te.Globe, { size: 15, className: S.optionGlobe }),
2049
+ /* @__PURE__ */ e(Vt, { children: x.name }),
2050
+ /* @__PURE__ */ e(Kt, {})
2051
+ ] }, x.code)) }) })
2052
+ }
2053
+ ) })
2054
+ ]
2055
+ }
2056
+ ),
2057
+ /* @__PURE__ */ e("p", { className: S.regionHint, children: X.regionHint })
2058
+ ] }),
2059
+ E && /* @__PURE__ */ a("p", { className: S.error, role: "alert", children: [
2060
+ /* @__PURE__ */ e(Te.Close, { size: 14 }),
2061
+ E
2062
+ ] }),
2063
+ /* @__PURE__ */ e(
2064
+ G,
2065
+ {
2066
+ variant: "primary",
2067
+ className: Z(S.pay, w && S.payPending),
2068
+ disabled: !me,
2069
+ onClick: ie,
2070
+ children: w ? /* @__PURE__ */ a(Fe, { children: [
2071
+ /* @__PURE__ */ e(Jt, { label: X.pending }),
2072
+ /* @__PURE__ */ e("span", { children: X.pending })
2073
+ ] }) : /* @__PURE__ */ a(Fe, { children: [
2074
+ /* @__PURE__ */ a("span", { className: S.payLabel, children: [
2075
+ /* @__PURE__ */ e(Te.Card, { size: 16 }),
2076
+ X.pay
2077
+ ] }),
2078
+ /* @__PURE__ */ e("strong", { children: kt(t, I, F) })
2079
+ ] })
2080
+ }
2081
+ ),
2082
+ R && /* @__PURE__ */ e("p", { className: S.notice, children: R })
2083
+ ] })
2084
+ ]
2085
+ }
2086
+ );
2087
+ }, we = {
2088
+ "rp-bar-chart": "rp_BarChart-module_rp-bar-chart_G8Uh2qms",
2089
+ "rp-bar-chart-peak": "rp_BarChart-module_rp-bar-chart-peak_rhpNOWBx",
2090
+ "rp-bar-chart-bars": "rp_BarChart-module_rp-bar-chart-bars_XQGh3NRE",
2091
+ "rp-bar-chart--stacked": "rp_BarChart-module_rp-bar-chart--stacked_zsAiE-kR",
2092
+ "rp-bar-chart-bar": "rp_BarChart-module_rp-bar-chart-bar_46Mwp-o9",
2093
+ "rp-bar-chart-segment": "rp_BarChart-module_rp-bar-chart-segment_rUqceCrY",
2094
+ "rp-bar-chart-segment-inner": "rp_BarChart-module_rp-bar-chart-segment-inner_78F2D8Fq",
2095
+ "rp-bar-chart-labels": "rp_BarChart-module_rp-bar-chart-labels_ZrSAwFYl"
2096
+ }, pt = [
2097
+ "var(--rp-color-accent)",
2098
+ "var(--rp-color-success)",
2099
+ "var(--rp-color-warning)",
2100
+ "var(--rp-color-danger)",
2101
+ "var(--rp-color-border-strong)",
2102
+ "var(--rp-color-text-muted)"
2103
+ ], Ar = ({
2104
+ values: t,
2105
+ labels: n,
2106
+ stacked: i = !1,
2107
+ label: l = "Daily token usage"
2108
+ }) => {
2109
+ const o = Math.max(1, ...t), r = n ?? t.map((d, h) => String(h + 1));
2110
+ return /* @__PURE__ */ a(
2111
+ "div",
2112
+ {
2113
+ className: Z(
2114
+ we["rp-bar-chart"],
2115
+ i && we["rp-bar-chart--stacked"]
2116
+ ),
2117
+ children: [
2118
+ /* @__PURE__ */ a("div", { className: we["rp-bar-chart-peak"], children: [
2119
+ o,
2120
+ "M"
2121
+ ] }),
2122
+ /* @__PURE__ */ e(
2123
+ "div",
2124
+ {
2125
+ className: we["rp-bar-chart-bars"],
2126
+ role: "img",
2127
+ "aria-label": `${l}: ${t.map((d, h) => `${r[h] ?? h + 1}: ${d}`).join(", ")}`,
2128
+ children: t.map((d, h) => /* @__PURE__ */ a(
2129
+ "div",
2130
+ {
2131
+ className: we["rp-bar-chart-bar"],
2132
+ title: `${r[h] ?? h + 1}: ${d}`,
2133
+ children: [
2134
+ /* @__PURE__ */ e(
2135
+ "i",
2136
+ {
2137
+ className: we["rp-bar-chart-segment"],
2138
+ style: {
2139
+ height: `${d / o * 85 * (i ? 0.25 : 0.15)}%`
2140
+ }
2141
+ }
2142
+ ),
2143
+ /* @__PURE__ */ e(
2144
+ "i",
2145
+ {
2146
+ className: Z(
2147
+ we["rp-bar-chart-segment"],
2148
+ we["rp-bar-chart-segment-inner"]
2149
+ ),
2150
+ style: {
2151
+ height: `${d / o * 85 * (i ? 0.5 : 0.85)}%`,
2152
+ background: i ? pt[h % pt.length] : void 0
2153
+ }
2154
+ }
2155
+ ),
2156
+ i && /* @__PURE__ */ e(
2157
+ "i",
2158
+ {
2159
+ className: Z(
2160
+ we["rp-bar-chart-segment"],
2161
+ we["rp-bar-chart-segment-top"]
2162
+ ),
2163
+ style: {
2164
+ height: `${d / o * 21}%`,
2165
+ background: "var(--rp-color-success)"
2166
+ }
2167
+ }
2168
+ )
2169
+ ]
2170
+ },
2171
+ h
2172
+ ))
2173
+ }
2174
+ ),
2175
+ /* @__PURE__ */ e("div", { className: we["rp-bar-chart-labels"], children: r.map((d, h) => /* @__PURE__ */ e("span", { children: d }, `${h}-${d}`)) })
2176
+ ]
2177
+ }
2178
+ );
2179
+ }, qe = {
2180
+ "rp-heatmap-scroll": "rp_Heatmap-module_rp-heatmap-scroll_b8EDFy7x",
2181
+ "rp-heatmap-grid": "rp_Heatmap-module_rp-heatmap-grid_w-Q4clqM",
2182
+ "rp-heatmap--hours": "rp_Heatmap-module_rp-heatmap--hours_0ejkT-5j",
2183
+ "rp-heatmap-hours": "rp_Heatmap-module_rp-heatmap-hours_yaa7IOw-",
2184
+ "rp-heatmap-cell": "rp_Heatmap-module_rp-heatmap-cell_J9ZR6oSC",
2185
+ "rp-heatmap-day": "rp_Heatmap-module_rp-heatmap-day_hxRaciVG",
2186
+ "rp-heatmap-month": "rp_Heatmap-module_rp-heatmap-month_1iJ8k0Ut",
2187
+ "rp-heatmap-level-0": "rp_Heatmap-module_rp-heatmap-level-0_YEHD-L9T",
2188
+ "rp-heatmap-level-1": "rp_Heatmap-module_rp-heatmap-level-1_eSaxW766",
2189
+ "rp-heatmap-level-2": "rp_Heatmap-module_rp-heatmap-level-2_WdX9AXcf",
2190
+ "rp-heatmap-level-3": "rp_Heatmap-module_rp-heatmap-level-3_5zBU5sNx",
2191
+ "rp-heatmap-level-4": "rp_Heatmap-module_rp-heatmap-level-4_aMEF1e1x"
2192
+ }, ut = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], Lr = ({
2193
+ levels: t,
2194
+ columnLabels: n = [],
2195
+ label: i = "Activity heatmap"
2196
+ }) => {
2197
+ const l = t[0]?.length ?? 0, o = l === 24;
2198
+ return /* @__PURE__ */ e("div", { className: qe["rp-heatmap-scroll"], children: /* @__PURE__ */ e(
2199
+ "div",
2200
+ {
2201
+ className: Z(
2202
+ o ? qe["rp-heatmap-hours"] : qe["rp-heatmap-grid"],
2203
+ o && qe["rp-heatmap--hours"]
2204
+ ),
2205
+ style: o ? void 0 : { gridTemplateColumns: `auto repeat(${l}, minmax(10px, 1fr))` },
2206
+ role: "img",
2207
+ "aria-label": i,
2208
+ children: Array.from({ length: 8 }, (r, d) => /* @__PURE__ */ a(aa, { children: [
2209
+ /* @__PURE__ */ e("span", { className: qe["rp-heatmap-day"], children: d === 0 ? "" : ut[d - 1] }),
2210
+ Array.from(
2211
+ { length: l },
2212
+ (h, m) => d === 0 ? /* @__PURE__ */ e("span", { className: qe["rp-heatmap-month"], children: n[m] ?? "" }, m) : /* @__PURE__ */ e(
2213
+ "i",
2214
+ {
2215
+ className: Z(
2216
+ qe["rp-heatmap-cell"],
2217
+ qe[`rp-heatmap-level-${t[d - 1]?.[m] ?? 0}`]
2218
+ ),
2219
+ title: `${ut[d - 1]}, ${o ? "hour" : "column"} ${m + 1}`
2220
+ },
2221
+ m
2222
+ )
2223
+ )
2224
+ ] }, d))
2225
+ }
2226
+ ) });
2227
+ }, Ue = {
2228
+ "rp-metric-strip": "rp_MetricStrip-module_rp-metric-strip_oAjqn-aO",
2229
+ "rp-metric-strip--six": "rp_MetricStrip-module_rp-metric-strip--six_THBfnydZ",
2230
+ "rp-metric-strip-card": "rp_MetricStrip-module_rp-metric-strip-card_63Ke96LL",
2231
+ "rp-metric-strip-value": "rp_MetricStrip-module_rp-metric-strip-value_uZ3-dhTN",
2232
+ "rp-metric-strip-label": "rp_MetricStrip-module_rp-metric-strip-label_vPmmuX6U",
2233
+ "rp-metric-strip-detail": "rp_MetricStrip-module_rp-metric-strip-detail_eX9vbuU3"
2234
+ }, Sr = ({ metrics: t }) => {
2235
+ const n = Z(
2236
+ Ue["rp-metric-strip"],
2237
+ t.length === 6 && Ue["rp-metric-strip--six"]
2238
+ );
2239
+ return /* @__PURE__ */ e("div", { className: n, children: t.map((i) => /* @__PURE__ */ a("div", { className: Ue["rp-metric-strip-card"], children: [
2240
+ /* @__PURE__ */ e("b", { className: Ue["rp-metric-strip-value"], children: i.value }),
2241
+ /* @__PURE__ */ e("span", { className: Ue["rp-metric-strip-label"], children: i.label }),
2242
+ i.detail && /* @__PURE__ */ e("small", { className: Ue["rp-metric-strip-detail"], children: i.detail })
2243
+ ] }, i.label)) });
2244
+ }, Ge = {
2245
+ "rp-panel": "rp_Panel-module_rp-panel_phtJNPn-",
2246
+ "rp-panel-header": "rp_Panel-module_rp-panel-header_btNJsltk",
2247
+ "rp-panel-title": "rp_Panel-module_rp-panel-title_i0XnBxgm",
2248
+ "rp-panel-spacer": "rp_Panel-module_rp-panel-spacer_Kv3uqewf",
2249
+ "rp-panel-footer": "rp_Panel-module_rp-panel-footer_VMolMpS9"
2250
+ }, Br = ({
2251
+ title: t,
2252
+ actions: n,
2253
+ children: i,
2254
+ className: l,
2255
+ footer: o
2256
+ }) => {
2257
+ const r = Ye(), d = Z(Ge["rp-panel"], l);
2258
+ return /* @__PURE__ */ a("section", { className: d, "aria-labelledby": r, children: [
2259
+ /* @__PURE__ */ a("div", { className: Ge["rp-panel-header"], children: [
2260
+ /* @__PURE__ */ e("h2", { className: Ge["rp-panel-title"], id: r, children: t }),
2261
+ /* @__PURE__ */ e("span", { className: Ge["rp-panel-spacer"] }),
2262
+ n
2263
+ ] }),
2264
+ i,
2265
+ o && /* @__PURE__ */ e("div", { className: Ge["rp-panel-footer"], children: o })
2266
+ ] });
2267
+ }, Se = {
2268
+ "rp-ranking": "rp_Ranking-module_rp-ranking_J6gdvsdH",
2269
+ "rp-ranking-row": "rp_Ranking-module_rp-ranking-row_gUD73n6g",
2270
+ "rp-ranking-row-clickable": "rp_Ranking-module_rp-ranking-row-clickable_HfPGjDGs",
2271
+ "rp-ranking-label": "rp_Ranking-module_rp-ranking-label_o5AenA--",
2272
+ "rp-ranking-icon": "rp_Ranking-module_rp-ranking-icon_GFHbix8C",
2273
+ "rp-ranking-name": "rp_Ranking-module_rp-ranking-name_BcU7P04R",
2274
+ "rp-ranking-track": "rp_Ranking-module_rp-ranking-track_aXkuRs2Q",
2275
+ "rp-ranking-value": "rp_Ranking-module_rp-ranking-value_fEjyec2m",
2276
+ "rp-ranking-cost": "rp_Ranking-module_rp-ranking-cost_xFBMNKql"
2277
+ }, Rr = ({ items: t, onSelect: n }) => /* @__PURE__ */ e(
2278
+ "div",
2279
+ {
2280
+ className: Se["rp-ranking"],
2281
+ style: { "--rp-ranking-label-width": "140px" },
2282
+ children: t.map((i) => /* @__PURE__ */ a(
2283
+ "button",
2284
+ {
2285
+ type: "button",
2286
+ className: Z(
2287
+ Se["rp-ranking-row"],
2288
+ n && Se["rp-ranking-row-clickable"]
2289
+ ),
2290
+ onClick: () => n?.(i),
2291
+ disabled: !n,
2292
+ children: [
2293
+ /* @__PURE__ */ a("span", { className: Se["rp-ranking-label"], children: [
2294
+ i.icon ? /* @__PURE__ */ e("span", { className: Se["rp-ranking-icon"], "aria-hidden": "true", children: i.icon }) : null,
2295
+ /* @__PURE__ */ e("span", { className: Se["rp-ranking-name"], title: i.name, children: i.name })
2296
+ ] }),
2297
+ /* @__PURE__ */ e("span", { className: Se["rp-ranking-track"], children: /* @__PURE__ */ e("i", { style: { width: `${Math.max(0, Math.min(100, i.share))}%` } }) }),
2298
+ /* @__PURE__ */ e("span", { className: Se["rp-ranking-value"], children: i.value }),
2299
+ /* @__PURE__ */ e("span", { className: Se["rp-ranking-cost"], children: i.cost })
2300
+ ]
2301
+ },
2302
+ i.name
2303
+ ))
2304
+ }
2305
+ ), fe = {
2306
+ "rp-request-table-scroll": "rp_RequestTable-module_rp-request-table-scroll_iHWzajvC",
2307
+ "rp-request-table": "rp_RequestTable-module_rp-request-table_jVxKsH-c",
2308
+ "rp-request-table-caption": "rp_RequestTable-module_rp-request-table-caption_tDVFUwew",
2309
+ "rp-request-table-time": "rp_RequestTable-module_rp-request-table-time_7IAcTKn0",
2310
+ "rp-request-table-num": "rp_RequestTable-module_rp-request-table-num_aRc4xhGg",
2311
+ "rp-request-table-cost": "rp_RequestTable-module_rp-request-table-cost_AE7l-hbF",
2312
+ "rp-request-table-provider": "rp_RequestTable-module_rp-request-table-provider_kZ-EJbbm",
2313
+ "rp-request-table-provider-icon": "rp_RequestTable-module_rp-request-table-provider-icon_-9kmFwjx",
2314
+ "rp-request-table-account": "rp_RequestTable-module_rp-request-table-account_bCJJv9Oz",
2315
+ "rp-request-table-status": "rp_RequestTable-module_rp-request-table-status_MzQap-jR",
2316
+ "rp-request-table-status--succeeded": "rp_RequestTable-module_rp-request-table-status--succeeded_XIp7zeex",
2317
+ "rp-request-table-status--failed": "rp_RequestTable-module_rp-request-table-status--failed_BZ4zoupJ"
2318
+ }, yn = [
2319
+ "Time",
2320
+ "Agent",
2321
+ "Requested",
2322
+ "Provider · account",
2323
+ "In",
2324
+ "Out",
2325
+ "Cost",
2326
+ "Status"
2327
+ ], Tr = ({ rows: t }) => /* @__PURE__ */ e(
2328
+ "div",
2329
+ {
2330
+ className: fe["rp-request-table-scroll"],
2331
+ tabIndex: 0,
2332
+ "aria-label": "Scrollable requests",
2333
+ children: /* @__PURE__ */ a("table", { className: fe["rp-request-table"], children: [
2334
+ /* @__PURE__ */ e("caption", { className: fe["rp-request-table-caption"], children: "Requests" }),
2335
+ /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ e("tr", { children: yn.map((n) => /* @__PURE__ */ e("th", { scope: "col", children: n }, n)) }) }),
2336
+ /* @__PURE__ */ e("tbody", { children: t.map((n) => /* @__PURE__ */ a("tr", { children: [
2337
+ /* @__PURE__ */ e("td", { className: fe["rp-request-table-time"], children: n.time }),
2338
+ /* @__PURE__ */ e("td", { children: n.agent }),
2339
+ /* @__PURE__ */ e("td", { children: n.model }),
2340
+ /* @__PURE__ */ e("td", { children: /* @__PURE__ */ a("span", { className: fe["rp-request-table-provider"], children: [
2341
+ n.providerIcon ? /* @__PURE__ */ e(
2342
+ "span",
2343
+ {
2344
+ className: fe["rp-request-table-provider-icon"],
2345
+ "aria-hidden": "true",
2346
+ children: n.providerIcon
2347
+ }
2348
+ ) : null,
2349
+ n.provider,
2350
+ /* @__PURE__ */ e("span", { className: fe["rp-request-table-account"], children: n.account })
2351
+ ] }) }),
2352
+ /* @__PURE__ */ e("td", { className: fe["rp-request-table-num"], children: n.tokens }),
2353
+ /* @__PURE__ */ e("td", { className: fe["rp-request-table-num"], children: n.output ?? "—" }),
2354
+ /* @__PURE__ */ e(
2355
+ "td",
2356
+ {
2357
+ className: Z(
2358
+ fe["rp-request-table-num"],
2359
+ fe["rp-request-table-cost"]
2360
+ ),
2361
+ children: n.cost
2362
+ }
2363
+ ),
2364
+ /* @__PURE__ */ a("td", { children: [
2365
+ /* @__PURE__ */ e(
2366
+ "span",
2367
+ {
2368
+ className: Z(
2369
+ fe["rp-request-table-status"],
2370
+ n.status === "Failed" ? fe["rp-request-table-status--failed"] : fe["rp-request-table-status--succeeded"]
2371
+ ),
2372
+ "aria-hidden": "true",
2373
+ children: n.status === "Failed" ? "×" : "•"
2374
+ }
2375
+ ),
2376
+ " ",
2377
+ n.status
2378
+ ] })
2379
+ ] }, n.id)) })
2380
+ ] })
2381
+ }
2382
+ ), Ee = {
2383
+ "rp-session-shape": "rp_SessionShape-module_rp-session-shape_lK5H99s2",
2384
+ "rp-session-shape-col": "rp_SessionShape-module_rp-session-shape-col_b7cDXHSU",
2385
+ "rp-session-shape-plot": "rp_SessionShape-module_rp-session-shape-plot_rHVHdFET",
2386
+ "rp-session-shape-count": "rp_SessionShape-module_rp-session-shape-count_LRGZ-0dy",
2387
+ "rp-session-shape-bar": "rp_SessionShape-module_rp-session-shape-bar_RundK3ML",
2388
+ "rp-session-shape-col--peak": "rp_SessionShape-module_rp-session-shape-col--peak_2FbAs9hr",
2389
+ "rp-session-shape-label": "rp_SessionShape-module_rp-session-shape-label_QhTXuqr6"
2390
+ }, qr = ({ values: t, labels: n }) => {
2391
+ const i = Math.max(1, ...t);
2392
+ return /* @__PURE__ */ e(
2393
+ "div",
2394
+ {
2395
+ className: Ee["rp-session-shape"],
2396
+ style: {
2397
+ gridTemplateColumns: `repeat(${t.length}, minmax(0, 1fr))`
2398
+ },
2399
+ role: "img",
2400
+ "aria-label": t.map((l, o) => `${n[o]} messages: ${l} sessions`).join(", "),
2401
+ children: t.map((l, o) => /* @__PURE__ */ a(
2402
+ "div",
2403
+ {
2404
+ className: Z(
2405
+ Ee["rp-session-shape-col"],
2406
+ l === i && Ee["rp-session-shape-col--peak"]
2407
+ ),
2408
+ children: [
2409
+ /* @__PURE__ */ a("div", { className: Ee["rp-session-shape-plot"], children: [
2410
+ /* @__PURE__ */ e("b", { className: Ee["rp-session-shape-count"], children: l }),
2411
+ /* @__PURE__ */ e(
2412
+ "i",
2413
+ {
2414
+ className: Ee["rp-session-shape-bar"],
2415
+ style: { height: `${l / i * 110}px` }
2416
+ }
2417
+ )
2418
+ ] }),
2419
+ /* @__PURE__ */ e("span", { className: Ee["rp-session-shape-label"], children: n[o] })
2420
+ ]
2421
+ },
2422
+ o
2423
+ ))
2424
+ }
2425
+ );
2426
+ }, be = {
2427
+ "rp-usage-list": "rp_UsageList-module_rp-usage-list_z8RMAIHR",
2428
+ "rp-usage-list-row": "rp_UsageList-module_rp-usage-list-row_W7kgCICI",
2429
+ "rp-usage-list-icon": "rp_UsageList-module_rp-usage-list-icon_XI-hUKig",
2430
+ "rp-usage-list-fallback-icon": "rp_UsageList-module_rp-usage-list-fallback-icon_pETobfJN",
2431
+ "rp-usage-list-row--stat": "rp_UsageList-module_rp-usage-list-row--stat_OuoGqiAb",
2432
+ "rp-usage-list-who": "rp_UsageList-module_rp-usage-list-who_5k0MOxdu",
2433
+ "rp-usage-list-name": "rp_UsageList-module_rp-usage-list-name_7AGycRh7",
2434
+ "rp-usage-list-sub": "rp_UsageList-module_rp-usage-list-sub_8hMfVYrq",
2435
+ "rp-usage-list-share": "rp_UsageList-module_rp-usage-list-share_p9wrn2eE",
2436
+ "rp-usage-list-num": "rp_UsageList-module_rp-usage-list-num_B3Z9uHjE",
2437
+ "rp-usage-list-value": "rp_UsageList-module_rp-usage-list-value_ZYLULILo",
2438
+ "rp-usage-list-breakdown": "rp_UsageList-module_rp-usage-list-breakdown_lqbEDax6",
2439
+ "rp-usage-list-cost": "rp_UsageList-module_rp-usage-list-cost_wVgLbsTn"
2440
+ }, Fr = ({ items: t }) => /* @__PURE__ */ e("div", { className: be["rp-usage-list"], children: t.map((n) => /* @__PURE__ */ a(
2441
+ "div",
2442
+ {
2443
+ className: Z(
2444
+ be["rp-usage-list-row"],
2445
+ be["rp-usage-list-row--stat"]
2446
+ ),
2447
+ children: [
2448
+ /* @__PURE__ */ e("span", { className: be["rp-usage-list-icon"], "aria-hidden": "true", children: n.icon ?? /* @__PURE__ */ e("span", { className: be["rp-usage-list-fallback-icon"] }) }),
2449
+ /* @__PURE__ */ a("div", { className: be["rp-usage-list-who"], children: [
2450
+ /* @__PURE__ */ e("div", { className: be["rp-usage-list-name"], children: n.name }),
2451
+ /* @__PURE__ */ e("div", { className: be["rp-usage-list-sub"], children: n.detail })
2452
+ ] }),
2453
+ /* @__PURE__ */ e("span", { className: be["rp-usage-list-share"], children: /* @__PURE__ */ e("i", { style: { width: `${n.share}%` } }) }),
2454
+ /* @__PURE__ */ a("span", { className: be["rp-usage-list-num"], children: [
2455
+ /* @__PURE__ */ e("b", { className: be["rp-usage-list-value"], children: n.value }),
2456
+ /* @__PURE__ */ e("small", { className: be["rp-usage-list-breakdown"], children: n.breakdown })
2457
+ ] }),
2458
+ /* @__PURE__ */ e("span", { className: be["rp-usage-list-cost"], children: n.cost })
2459
+ ]
2460
+ },
2461
+ n.name
2462
+ )) }), _n = {
2463
+ "rp-plus-background-canvas": "rp_BackgroundPlus-module_rp-plus-background-canvas_qV-SHke3"
2464
+ };
2465
+ function Mt(t, n) {
2466
+ const i = Ae(null), l = Ae(n ?? (t ? 7 : 14));
2467
+ return ke(() => {
2468
+ l.current = n ?? (t ? 7 : 14);
2469
+ }, [n, t]), ke(() => {
2470
+ const o = i.current;
2471
+ if (!o || typeof window > "u") return;
2472
+ const r = o.getContext("2d"), d = o.parentElement;
2473
+ if (!r || !d) return;
2474
+ const h = window.matchMedia("(prefers-reduced-motion: reduce)");
2475
+ let m = 0, C = 0, $ = 0, b = !0, A = [], v = null;
2476
+ const f = window.matchMedia("(hover: hover) and (pointer: fine)"), _ = 10;
2477
+ let N = 0, T = 0, s = new Float32Array(0), k = new Float32Array(0), g = 0, B = 0, w = null, E = null;
2478
+ const O = () => {
2479
+ if (w) {
2480
+ const p = (w.targetX - w.x) * 0.22, L = (w.targetY - w.y) * 0.22;
2481
+ w.x += p, w.y += L;
2482
+ const u = Math.hypot(p, L);
2483
+ if (u > 0.02) {
2484
+ const M = w.x / _ + 1, y = w.y / _ + 1, F = Math.min(u, 12) * 0.065;
2485
+ for (let I = Math.max(1, Math.floor(y - 7)); I < Math.min(T - 1, y + 8); I++)
2486
+ for (let D = Math.max(1, Math.floor(M - 7)); D < Math.min(N - 1, M + 8); D++) {
2487
+ const Y = D - M, Q = I - y, he = (Y * p + Q * L) / u;
2488
+ k[I * N + D] += he * Math.exp(-(Y * Y + Q * Q) / 9) * F;
2489
+ }
2490
+ }
2491
+ }
2492
+ for (let p = 1; p < T - 1; p++)
2493
+ for (let L = 1; L < N - 1; L++) {
2494
+ const u = p * N + L, M = s[u - 1] + s[u + 1] + s[u - N] + s[u + N] - 4 * s[u], y = Math.min(L, p, N - 1 - L, T - 1 - p);
2495
+ k[u] = (k[u] + M * 0.32) * (y < 8 ? 0.88 : 0.985);
2496
+ }
2497
+ for (let p = 0; p < s.length; p++) s[p] += k[p];
2498
+ }, R = (p, L) => {
2499
+ const u = Math.max(0, Math.min(N - 2, p / _ + 1)), M = Math.max(0, Math.min(T - 2, L / _ + 1)), y = Math.floor(u), F = Math.floor(M), I = u - y, D = M - F, Y = F * N + y;
2500
+ return (s[Y] * (1 - I) + s[Y + 1] * I) * (1 - D) + (s[Y + N] * (1 - I) + s[Y + N + 1] * I) * D;
2501
+ }, W = (p) => {
2502
+ if (!b || document.hidden) {
2503
+ $ = 0;
2504
+ return;
2505
+ }
2506
+ if (B += Math.min(50, g ? p - g : 0), g = p, h.matches)
2507
+ B = 0;
2508
+ else for (; B >= 1e3 / 60; )
2509
+ O(), B -= 1e3 / 60;
2510
+ r.clearRect(0, 0, m, C), A = A.filter((y) => p - y.time < 2400);
2511
+ const L = l.current, u = L / 2, M = L * 0.25;
2512
+ for (let y = u, F = 0; y < C; y += L, F++)
2513
+ for (let I = u + F % 2 * L / 2; I < m; I += L) {
2514
+ let D = 0, Y = 0, Q = 0;
2515
+ if (v && !h.matches) {
2516
+ const K = (p - v.time) / 1e3, ae = (I - m / 2) / (m * 0.58), j = (y - C * 0.42) / (C * 0.7), te = Math.hypot(ae, j), Ce = 0.22 + 0.98 * Math.exp(-te * te * 2.1), We = Math.max(
2517
+ 0,
2518
+ Math.min(K, 2.4) - Math.min(0.045, te * 0.025)
2519
+ ), Ve = 1.55 * (1 - Math.exp(-We / 0.12)) * Ce;
2520
+ Q = ae * 210 * Ve, Y = -260 * Ve * (1 - 0.3 * Math.tanh(j));
2521
+ }
2522
+ if (!h.matches)
2523
+ for (const K of A) {
2524
+ const ae = (p - K.time) / 1e3, j = Math.hypot(I - K.x, y - K.y);
2525
+ if (ae < 0) continue;
2526
+ const te = j - ae * 320;
2527
+ D += Math.sin(te * 0.065) * Math.exp(-te * te / 13e3) * Math.max(0, 1 - ae / 2.4) * 11;
2528
+ }
2529
+ const he = h.matches ? 0 : R(I + _, y) - R(I - _, y), oe = h.matches ? 0 : R(I, y + _) - R(I, y - _), ee = 12 * Math.tanh(he * 0.65), ge = 12 * Math.tanh(oe * 0.65), le = Math.pow(Math.max(0, 1 - y / C), 0.6), ve = 1 - Math.exp(
2530
+ -Math.pow((I - m / 2) / (m * 0.28), 2) - Math.pow((y - C * 0.38) / (C * 0.24), 2)
2531
+ ) * 0.55, Me = Math.hypot(ee, ge);
2532
+ if (t) {
2533
+ const K = Math.abs(R(I, y)) * 0.12 + Me * 0.035 + Math.abs(D) * 0.035;
2534
+ let ae = E ? Math.exp(
2535
+ -((I - E.x) ** 2 + (y - E.y) ** 2) / (2 * 24 ** 2)
2536
+ ) : 0, j = 0;
2537
+ if (!h.matches)
2538
+ for (const te of A) {
2539
+ const Ce = (p - te.time) / 1e3, We = Math.hypot(I - te.x, y - te.y), Ve = 32 + 64 * Math.min(1, Ce / 0.3), it = Math.max(0, 1 - Ce / 2.4), st = Math.exp(-((We - Ce * 320) ** 2) / (2 * 36 ** 2)) * it;
2540
+ ae = Math.max(
2541
+ ae,
2542
+ Math.exp(-(We ** 2) / (2 * Ve ** 2)) * it,
2543
+ st
2544
+ ), j = Math.max(j, st);
2545
+ }
2546
+ r.globalAlpha = Math.min(0.28, 0.1 + K * 0.12 + j * 0.12) * ae, r.fillStyle = "#8a8f98", r.beginPath(), r.arc(
2547
+ I + D * 0.4 + ee * 0.25,
2548
+ y + D + ge * 0.25,
2549
+ 1.25,
2550
+ 0,
2551
+ Math.PI * 2
2552
+ ), r.fill();
2553
+ continue;
2554
+ }
2555
+ const pe = D * 0.055 + Math.tanh((he - oe) * 0.2) * 0.18, re = M + Math.abs(D) * 0.16 + Me * 0.08, ue = Math.sin(I * 12.9898 + y * 78.233) * 43758.5453, Ne = ue - Math.floor(ue), $e = p / 1e3, Le = Math.sin(I * 39.346 + y * 11.135) * 24634.6345, xe = Le - Math.floor(Le), Re = $e / (3 + xe * 5) + xe * 17, me = Re - Math.floor(Re), ie = me < 0.32 ? Math.pow(Math.sin(Math.PI * me / 0.32), 2) : 0, x = Ne < 0.22, P = h.matches || !x ? 1 : 1 - 0.98 * ie;
2556
+ r.save(), r.translate(
2557
+ I + D * 0.4 + ee + Q,
2558
+ y + D + ge + Y
2559
+ ), r.rotate(pe), r.globalAlpha = Math.min(
2560
+ 1,
2561
+ Math.min(
2562
+ 0.95,
2563
+ 0.38 + Ne * 0.22 + (x ? 0.32 : 0) + Math.abs(D) * 0.045 + Me * 0.018
2564
+ ) * le * ve * P
2565
+ ), r.strokeStyle = "#f5f8ff", r.lineWidth = M * (x ? 0.357 : 0.3), r.beginPath(), r.moveTo(-re, 0), r.lineTo(re, 0), r.moveTo(0, -re), r.lineTo(0, re), r.stroke(), r.restore();
2566
+ }
2567
+ $ = b && !document.hidden && !h.matches ? requestAnimationFrame(W) : 0;
2568
+ }, z = () => {
2569
+ cancelAnimationFrame($), $ = 0, g = 0, b && !document.hidden && W(performance.now());
2570
+ }, X = () => {
2571
+ const p = o.getBoundingClientRect();
2572
+ m = p.width, C = p.height, N = Math.ceil(m / _) + 3, T = Math.ceil(C / _) + 3, s = new Float32Array(N * T), k = new Float32Array(N * T), w = null, B = 0;
2573
+ const L = Math.min(devicePixelRatio || 1, 2);
2574
+ o.width = m * L, o.height = C * L, r.setTransform(L, 0, 0, L, 0, 0), z();
2575
+ };
2576
+ let V = 0;
2577
+ const U = (p) => {
2578
+ if (h.matches || !f.matches || p.pointerType === "touch")
2579
+ return;
2580
+ if (!t && (performance.now() < V || p.target.closest("#hero-download"))) {
2581
+ w = null;
2582
+ return;
2583
+ }
2584
+ const L = o.getBoundingClientRect(), u = p.clientX - L.left, M = p.clientY - L.top;
2585
+ E = { x: u, y: M }, w ? (w.targetX = u, w.targetY = M) : w = { x: t ? u - 8 : u, y: M, targetX: u, targetY: M }, $ || z();
2586
+ }, J = () => {
2587
+ w = null, E = null;
2588
+ }, ne = (p) => {
2589
+ if (p.target.closest("a,button,input,select")) return;
2590
+ const L = o.getBoundingClientRect();
2591
+ A.push({
2592
+ x: p.clientX - L.left,
2593
+ y: p.clientY - L.top,
2594
+ time: performance.now()
2595
+ }), A = A.slice(-5), $ || z();
2596
+ }, se = (p) => {
2597
+ if (t || h.matches) return;
2598
+ const L = p.detail;
2599
+ if (L.cancel) {
2600
+ v = null, V = 0;
2601
+ return;
2602
+ }
2603
+ if (v && L.progress > 0) {
2604
+ v.progress = L.progress;
2605
+ return;
2606
+ }
2607
+ if (L.progress > 0) return;
2608
+ const u = d.querySelector("#hero-download");
2609
+ if (!u) return;
2610
+ const M = o.getBoundingClientRect(), y = u.getBoundingClientRect(), F = performance.now();
2611
+ V = F + 3220, v = {
2612
+ x: y.left + y.width / 2 - M.left,
2613
+ y: y.top + y.height / 2 - M.top,
2614
+ time: F,
2615
+ progress: 0
2616
+ }, A = [], s.fill(0), k.fill(0), w = null, A = A.slice(-5), $ || z();
2617
+ };
2618
+ d.addEventListener("hero-scroll-inertia", se);
2619
+ const q = new ResizeObserver(X);
2620
+ q.observe(o);
2621
+ const H = new IntersectionObserver((p) => {
2622
+ b = p.some((L) => L.isIntersecting), z();
2623
+ });
2624
+ return H.observe(o), d.addEventListener("pointermove", U), d.addEventListener("pointerleave", J), d.addEventListener("pointerdown", ne), h.addEventListener("change", z), document.addEventListener("visibilitychange", z), X(), () => {
2625
+ cancelAnimationFrame($), q.disconnect(), H.disconnect(), d.removeEventListener("hero-scroll-inertia", se), d.removeEventListener("pointermove", U), d.removeEventListener("pointerleave", J), d.removeEventListener("pointerdown", ne), h.removeEventListener("change", z), document.removeEventListener("visibilitychange", z);
2626
+ };
2627
+ }, [t]), i;
2628
+ }
2629
+ function Pr({ background: t, cellSize: n }) {
2630
+ const i = Mt(!1, n);
2631
+ return /* @__PURE__ */ e(
2632
+ "canvas",
2633
+ {
2634
+ className: `${_n["rp-plus-background-canvas"]} rp-plus-background`,
2635
+ style: t === void 0 ? void 0 : { background: t },
2636
+ ref: i,
2637
+ "aria-hidden": "true"
2638
+ }
2639
+ );
2640
+ }
2641
+ const mt = {
2642
+ "rp-plus-field-canvas": "rp_PlusField-module_rp-plus-field-canvas_ZN-2OlaQ",
2643
+ "rp-plus-field-dots": "rp_PlusField-module_rp-plus-field-dots_e1Khngt7"
2644
+ };
2645
+ function Ir({ dots: t = !1 }) {
2646
+ const n = Ae(null);
2647
+ return ke(() => {
2648
+ const i = n.current;
2649
+ if (!i || typeof window > "u") return;
2650
+ const l = i.getContext("2d"), o = i.parentElement;
2651
+ if (!l || !o) return;
2652
+ const r = window.matchMedia("(prefers-reduced-motion: reduce)");
2653
+ let d = 0, h = 0, m = 0, C = !0, $ = [], b = null;
2654
+ const A = window.matchMedia("(hover: hover) and (pointer: fine)"), v = 10;
2655
+ let f = 0, _ = 0, N = new Float32Array(0), T = new Float32Array(0), s = 0, k = 0, g = null, B = null;
2656
+ const w = () => {
2657
+ if (g) {
2658
+ const q = (g.targetX - g.x) * 0.22, H = (g.targetY - g.y) * 0.22;
2659
+ g.x += q, g.y += H;
2660
+ const p = Math.hypot(q, H);
2661
+ if (p > 0.02) {
2662
+ const L = g.x / v + 1, u = g.y / v + 1, M = Math.min(p, 12) * 0.065;
2663
+ for (let y = Math.max(1, Math.floor(u - 7)); y < Math.min(_ - 1, u + 8); y++)
2664
+ for (let F = Math.max(1, Math.floor(L - 7)); F < Math.min(f - 1, L + 8); F++) {
2665
+ const I = F - L, D = y - u, Y = (I * q + D * H) / p;
2666
+ T[y * f + F] += Y * Math.exp(-(I * I + D * D) / 9) * M;
2667
+ }
2668
+ }
2669
+ }
2670
+ for (let q = 1; q < _ - 1; q++)
2671
+ for (let H = 1; H < f - 1; H++) {
2672
+ const p = q * f + H, L = N[p - 1] + N[p + 1] + N[p - f] + N[p + f] - 4 * N[p], u = Math.min(H, q, f - 1 - H, _ - 1 - q);
2673
+ T[p] = (T[p] + L * 0.32) * (u < 8 ? 0.88 : 0.985);
2674
+ }
2675
+ for (let q = 0; q < N.length; q++) N[q] += T[q];
2676
+ }, E = (q, H) => {
2677
+ const p = Math.max(0, Math.min(f - 2, q / v + 1)), L = Math.max(0, Math.min(_ - 2, H / v + 1)), u = Math.floor(p), M = Math.floor(L), y = p - u, F = L - M, I = M * f + u;
2678
+ return (N[I] * (1 - y) + N[I + 1] * y) * (1 - F) + (N[I + f] * (1 - y) + N[I + f + 1] * y) * F;
2679
+ }, O = (q) => {
2680
+ if (k += Math.min(50, s ? q - s : 0), s = q, r.matches)
2681
+ k = 0;
2682
+ else for (; k >= 1e3 / 60; )
2683
+ w(), k -= 1e3 / 60;
2684
+ l.clearRect(0, 0, d, h), $ = $.filter((p) => q - p.time < 2400);
2685
+ const H = t ? 7 : 14;
2686
+ for (let p = 7, L = 0; p < h; p += H, L++)
2687
+ for (let u = 7 + L % 2 * H / 2; u < d; u += H) {
2688
+ let M = 0, y = 0, F = 0;
2689
+ if (b && !r.matches) {
2690
+ const me = (q - b.time) / 1e3, ie = (u - d / 2) / (d * 0.58), x = (p - h * 0.42) / (h * 0.7), P = Math.hypot(ie, x), K = 0.22 + 0.98 * Math.exp(-P * P * 2.1), ae = Math.max(
2691
+ 0,
2692
+ Math.min(me, 2.4) - Math.min(0.045, P * 0.025)
2693
+ ), j = 1.55 * (1 - Math.exp(-ae / 0.12)) * K;
2694
+ F = ie * 210 * j, y = -260 * j * (1 - 0.3 * Math.tanh(x));
2695
+ }
2696
+ if (!r.matches)
2697
+ for (const me of $) {
2698
+ const ie = (q - me.time) / 1e3, x = Math.hypot(u - me.x, p - me.y);
2699
+ if (ie < 0) continue;
2700
+ const P = x - ie * 320;
2701
+ M += Math.sin(P * 0.065) * Math.exp(-P * P / 13e3) * Math.max(0, 1 - ie / 2.4) * 11;
2702
+ }
2703
+ const I = r.matches ? 0 : E(u + v, p) - E(u - v, p), D = r.matches ? 0 : E(u, p + v) - E(u, p - v), Y = 12 * Math.tanh(I * 0.65), Q = 12 * Math.tanh(D * 0.65), he = Math.pow(Math.max(0, 1 - p / h), 0.6), oe = 1 - Math.exp(
2704
+ -Math.pow((u - d / 2) / (d * 0.28), 2) - Math.pow((p - h * 0.38) / (h * 0.24), 2)
2705
+ ) * 0.55, ee = Math.hypot(Y, Q);
2706
+ if (t) {
2707
+ const me = Math.abs(E(u, p)) * 0.12 + ee * 0.035 + Math.abs(M) * 0.035;
2708
+ let ie = B ? Math.exp(
2709
+ -((u - B.x) ** 2 + (p - B.y) ** 2) / (2 * 24 ** 2)
2710
+ ) : 0, x = 0;
2711
+ if (!r.matches)
2712
+ for (const P of $) {
2713
+ const K = (q - P.time) / 1e3, ae = Math.hypot(u - P.x, p - P.y), j = 32 + 64 * Math.min(1, K / 0.3), te = Math.max(0, 1 - K / 2.4), Ce = Math.exp(-((ae - K * 320) ** 2) / (2 * 36 ** 2)) * te;
2714
+ ie = Math.max(
2715
+ ie,
2716
+ Math.exp(-(ae ** 2) / (2 * j ** 2)) * te,
2717
+ Ce
2718
+ ), x = Math.max(x, Ce);
2719
+ }
2720
+ l.globalAlpha = Math.min(0.28, 0.1 + me * 0.12 + x * 0.12) * ie, l.fillStyle = "#8a8f98", l.beginPath(), l.arc(
2721
+ u + M * 0.4 + Y * 0.25,
2722
+ p + M + Q * 0.25,
2723
+ 1.25,
2724
+ 0,
2725
+ Math.PI * 2
2726
+ ), l.fill();
2727
+ continue;
2728
+ }
2729
+ const ge = M * 0.055 + Math.tanh((I - D) * 0.2) * 0.18, le = 3.5 + Math.abs(M) * 0.16 + ee * 0.08, ve = Math.sin(u * 12.9898 + p * 78.233) * 43758.5453, Me = ve - Math.floor(ve), pe = q / 1e3, re = Math.sin(u * 39.346 + p * 11.135) * 24634.6345, ue = re - Math.floor(re), Ne = pe / (3 + ue * 5) + ue * 17, $e = Ne - Math.floor(Ne), Le = $e < 0.32 ? Math.pow(Math.sin(Math.PI * $e / 0.32), 2) : 0, xe = Me < 0.22, Re = r.matches || !xe ? 1 : 1 - 0.98 * Le;
2730
+ l.save(), l.translate(
2731
+ u + M * 0.4 + Y + F,
2732
+ p + M + Q + y
2733
+ ), l.rotate(ge), l.globalAlpha = Math.min(
2734
+ 1,
2735
+ Math.min(
2736
+ 0.95,
2737
+ 0.38 + Me * 0.22 + (xe ? 0.32 : 0) + Math.abs(M) * 0.045 + ee * 0.018
2738
+ ) * he * oe * Re
2739
+ ), l.strokeStyle = "#f5f8ff", l.lineWidth = xe ? 1.25 : 1.05, l.beginPath(), l.moveTo(-le, 0), l.lineTo(le, 0), l.moveTo(0, -le), l.lineTo(0, le), l.stroke(), l.restore();
2740
+ }
2741
+ m = C && !document.hidden && !r.matches ? requestAnimationFrame(O) : 0;
2742
+ }, R = () => {
2743
+ cancelAnimationFrame(m), s = 0, O(performance.now());
2744
+ }, W = () => {
2745
+ const q = i.getBoundingClientRect();
2746
+ d = q.width, h = q.height, f = Math.ceil(d / v) + 3, _ = Math.ceil(h / v) + 3, N = new Float32Array(f * _), T = new Float32Array(f * _), g = null, k = 0;
2747
+ const H = Math.min(devicePixelRatio || 1, 2);
2748
+ i.width = d * H, i.height = h * H, l.setTransform(H, 0, 0, H, 0, 0), R();
2749
+ };
2750
+ let z = 0;
2751
+ const X = (q) => {
2752
+ if (r.matches || !A.matches || q.pointerType === "touch")
2753
+ return;
2754
+ if (!t && (performance.now() < z || q.target.closest("#hero-download"))) {
2755
+ g = null;
2756
+ return;
2757
+ }
2758
+ const H = i.getBoundingClientRect(), p = q.clientX - H.left, L = q.clientY - H.top;
2759
+ B = { x: p, y: L }, g ? (g.targetX = p, g.targetY = L) : g = { x: t ? p - 8 : p, y: L, targetX: p, targetY: L }, m || R();
2760
+ }, V = () => {
2761
+ g = null, B = null;
2762
+ }, U = (q) => {
2763
+ if (q.target.closest("a,button,input,select")) return;
2764
+ const H = i.getBoundingClientRect();
2765
+ $.push({
2766
+ x: q.clientX - H.left,
2767
+ y: q.clientY - H.top,
2768
+ time: performance.now()
2769
+ }), $ = $.slice(-5), m || R();
2770
+ }, J = (q) => {
2771
+ if (t || r.matches) return;
2772
+ const H = q.detail;
2773
+ if (H.cancel) {
2774
+ b = null, z = 0;
2775
+ return;
2776
+ }
2777
+ if (b && H.progress > 0) {
2778
+ b.progress = H.progress;
2779
+ return;
2780
+ }
2781
+ if (H.progress > 0) return;
2782
+ const p = o.querySelector("#hero-download");
2783
+ if (!p) return;
2784
+ const L = i.getBoundingClientRect(), u = p.getBoundingClientRect(), M = performance.now();
2785
+ z = M + 3220, b = {
2786
+ x: u.left + u.width / 2 - L.left,
2787
+ y: u.top + u.height / 2 - L.top,
2788
+ time: M,
2789
+ progress: 0
2790
+ }, $ = [], N.fill(0), T.fill(0), g = null, $ = $.slice(-5), m || R();
2791
+ };
2792
+ o.addEventListener("hero-scroll-inertia", J);
2793
+ const ne = new ResizeObserver(W);
2794
+ ne.observe(i);
2795
+ const se = new IntersectionObserver((q) => {
2796
+ C = q.some((H) => H.isIntersecting), R();
2797
+ });
2798
+ return se.observe(i), o.addEventListener("pointermove", X), o.addEventListener("pointerleave", V), o.addEventListener("pointerdown", U), r.addEventListener("change", R), document.addEventListener("visibilitychange", R), W(), () => {
2799
+ cancelAnimationFrame(m), ne.disconnect(), se.disconnect(), o.removeEventListener("hero-scroll-inertia", J), o.removeEventListener("pointermove", X), o.removeEventListener("pointerleave", V), o.removeEventListener("pointerdown", U), r.removeEventListener("change", R), document.removeEventListener("visibilitychange", R);
2800
+ };
2801
+ }, [t]), /* @__PURE__ */ e(
2802
+ "canvas",
2803
+ {
2804
+ className: `${mt["rp-plus-field-canvas"]} ${t ? `${mt["rp-plus-field-dots"]} rp-download-ripple` : "rp-plus-field"}`,
2805
+ ref: n,
2806
+ "aria-hidden": "true"
2807
+ }
2808
+ );
2809
+ }
2810
+ const Nn = {
2811
+ "rp-cursor-plus-canvas": "rp_BackgroundCursor-module_rp-cursor-plus-canvas_JA90aE-l"
2812
+ };
2813
+ function Er({
2814
+ radius: t = 170,
2815
+ spacing: n = 18,
2816
+ opacity: i = 0.55,
2817
+ color: l
2818
+ }) {
2819
+ const o = Ae(null);
2820
+ return ke(() => {
2821
+ const r = o.current, d = r?.parentElement;
2822
+ if (!r || !d) return;
2823
+ const h = r.getContext("2d");
2824
+ if (!h) return;
2825
+ const m = window.matchMedia("(prefers-reduced-motion: reduce)"), C = window.matchMedia("(hover: hover) and (pointer: fine)");
2826
+ let $ = 0, b = 0, A = 0, v = null;
2827
+ const f = { x: 0, y: 0, strength: 0 };
2828
+ let _ = l || "#17191d";
2829
+ const N = () => {
2830
+ const O = getComputedStyle(d).getPropertyValue("--rp-cursor-plus-color").trim();
2831
+ _ = l || O || "#17191d";
2832
+ }, T = () => {
2833
+ if (h.clearRect(0, 0, $, b), !(f.strength <= 0.01)) {
2834
+ h.strokeStyle = _, h.lineWidth = 1, h.lineCap = "round";
2835
+ for (let O = n; O < b; O += n)
2836
+ for (let R = n; R < $; R += n) {
2837
+ const W = Math.hypot(R - f.x, O - f.y);
2838
+ if (W > t) continue;
2839
+ const z = (1 - W / t) ** 2, X = 2.5 + z * 2;
2840
+ h.globalAlpha = f.strength * z * i, h.beginPath(), h.moveTo(R - X, O), h.lineTo(R + X, O), h.moveTo(R, O - X), h.lineTo(R, O + X), h.stroke();
2841
+ }
2842
+ h.globalAlpha = 1;
2843
+ }
2844
+ }, s = () => {
2845
+ const O = d.getBoundingClientRect();
2846
+ $ = O.width, b = O.height;
2847
+ const R = Math.min(window.devicePixelRatio || 1, 2);
2848
+ r.width = Math.round($ * R), r.height = Math.round(b * R), h.setTransform(R, 0, 0, R, 0, 0), N(), T();
2849
+ }, k = () => {
2850
+ A = 0, f.strength += ((v ? 1 : 0) - f.strength) * 0.12, v && (f.x += (v.x - f.x) * 0.18, f.y += (v.y - f.y) * 0.18), T(), f.strength > 0.01 && !m.matches && (A = requestAnimationFrame(k));
2851
+ }, g = () => {
2852
+ A || (A = requestAnimationFrame(k));
2853
+ }, B = (O) => {
2854
+ if (!C.matches || O.pointerType === "touch") return;
2855
+ const R = r.getBoundingClientRect(), W = O.clientX - R.left, z = O.clientY - R.top;
2856
+ v || (f.x = W, f.y = z), v = { x: W, y: z }, m.matches ? (f.strength = 1, T()) : g();
2857
+ }, w = () => {
2858
+ v = null, m.matches ? (f.strength = 0, T()) : g();
2859
+ };
2860
+ d.addEventListener("pointermove", B), d.addEventListener("pointerleave", w);
2861
+ const E = new ResizeObserver(s);
2862
+ return E.observe(d), s(), () => {
2863
+ cancelAnimationFrame(A), E.disconnect(), d.removeEventListener("pointermove", B), d.removeEventListener("pointerleave", w);
2864
+ };
2865
+ }, [t, n, i, l]), /* @__PURE__ */ e(
2866
+ "canvas",
2867
+ {
2868
+ className: Nn["rp-cursor-plus-canvas"],
2869
+ ref: o,
2870
+ tabIndex: -1,
2871
+ "aria-hidden": "true"
2872
+ }
2873
+ );
2874
+ }
2875
+ const He = {
2876
+ "rp-line-field-background": "rp_BackgroundLineField-module_rp-line-field-background_iKQMVmpE",
2877
+ "rp-line-field-canvas": "rp_BackgroundLineField-module_rp-line-field-canvas_NvZpohlj",
2878
+ "rp-line-field-veil": "rp_BackgroundLineField-module_rp-line-field-veil_sMxIIjHC",
2879
+ "rp-line-field-top": "rp_BackgroundLineField-module_rp-line-field-top_FBB5P5vl",
2880
+ "rp-line-field-left": "rp_BackgroundLineField-module_rp-line-field-left_NSpgJvyP",
2881
+ "rp-line-field-right": "rp_BackgroundLineField-module_rp-line-field-right_o4I52Xbf",
2882
+ "rp-line-field-bottom": "rp_BackgroundLineField-module_rp-line-field-bottom_7BxG7-Fk"
2883
+ }, gt = 0.07, wn = 0.66, kn = 3.1, Mn = [0.0625, 0.25, 0.375, 0.5], ft = 0.045, $n = 0.44, xn = 14, Cn = 4, vt = ["#ebba00", "#a7e66b", "#cd99fd", "#0000ff"], An = [
2884
+ "--rp-color-line-field-tier-1",
2885
+ "--rp-color-line-field-tier-2",
2886
+ "--rp-color-line-field-tier-3",
2887
+ "--rp-color-line-field-tier-4"
2888
+ ], De = (t) => {
2889
+ const n = Math.sin(t * 127.1) * 43758.5453;
2890
+ return n - Math.floor(n);
2891
+ }, Ln = Array.from({ length: xn }, (t, n) => ({
2892
+ angle: De(n + 1) * Math.PI * 2,
2893
+ width: 0.02 + De(n + 21) * 0.05,
2894
+ dashes: 22 + De(n + 41) * 26,
2895
+ phase: De(n + 61) * Math.PI * 2,
2896
+ drift: (De(n + 81) - 0.5) * 0.09,
2897
+ speed: 0.4 + De(n + 101) * 0.7
2898
+ })), Sn = (t) => Math.atan2(Math.sin(t), Math.cos(t)), Bn = (t) => t < 0.2 ? -1 : t < 0.4 ? 0 : t < 0.6 ? 1 : t < 0.8 ? 2 : 3, Rn = (t, n, i, l, o, r) => {
2899
+ const d = n * l / 2, h = i * o / 2, m = n * l * 0.5;
2900
+ for (let C = 0; C < i; C++) {
2901
+ const $ = (C + 0.5) * o - h;
2902
+ for (let b = 0; b < n; b++) {
2903
+ const A = (b + 0.5) * l - d, v = Math.hypot(A, $) / m, f = Math.atan2($, A);
2904
+ let _ = 0;
2905
+ for (const T of Ln) {
2906
+ const s = Sn(f - T.angle - r * T.drift), k = Math.exp(-(s * s) / (2 * T.width * T.width));
2907
+ if (k < 0.01) continue;
2908
+ const g = 0.5 + 0.5 * Math.sin(v * T.dashes - r * T.speed + T.phase);
2909
+ _ = Math.max(_, k * (0.3 + 0.7 * g));
2910
+ }
2911
+ _ *= 0.7 + 0.6 * De(b * 3.17 + C * 7.31);
2912
+ const N = Math.min(1, Math.max(0, (v - 0.12) / 0.3));
2913
+ _ *= N * N * (3 - 2 * N), t[C * n + b] = Math.min(
2914
+ 1,
2915
+ Math.max(0, (_ - 0.58) * kn + 0.5)
2916
+ );
2917
+ }
2918
+ }
2919
+ }, Tn = (t, n, i, l, o) => {
2920
+ const r = Math.min(o * $n, (l - i) / 2), d = n - o / 2, h = n + o / 2;
2921
+ t.beginPath(), t.moveTo(d + r, i), t.lineTo(h - r, i), t.quadraticCurveTo(h, i, h, i + r), t.lineTo(h, l - r), t.quadraticCurveTo(h, l, h - r, l), t.lineTo(d + r, l), t.quadraticCurveTo(d, l, d, l - r), t.lineTo(d, i + r), t.quadraticCurveTo(d, i, d + r, i), t.closePath();
2922
+ }, qn = (t, n, i, l, o, r, d, h, m, C, $) => {
2923
+ t.clearRect(0, 0, C, $);
2924
+ for (let b = 0; b < l; b++)
2925
+ for (let A = 0; A < i; A++) {
2926
+ const v = b * i + A, f = n[v];
2927
+ if (f < 0) continue;
2928
+ const _ = b > 0 ? n[v - i] : -1, N = b < l - 1 ? n[v + i] : -1;
2929
+ let T = b * r, s = (b + 1) * r;
2930
+ if (_ !== f && (T += ft * 0.5 * r), N !== f && (s -= ft * 0.5 * r), s <= T) continue;
2931
+ const k = Math.max(1, 2 * Mn[f] * wn * o);
2932
+ let g = (A + 0.5) * o, B = 1;
2933
+ if (h) {
2934
+ const w = g - h.x, E = (T + s) / 2 - h.y, O = Math.hypot(w, E) / m;
2935
+ if (O < 1) {
2936
+ const R = (1 - O) ** 2;
2937
+ g += w * 0.06 * R, B = 1 - 0.7 * R;
2938
+ }
2939
+ }
2940
+ t.globalAlpha = B, t.fillStyle = d[f % Cn], Tn(t, g, T, s, k), t.fill();
2941
+ }
2942
+ t.globalAlpha = 1;
2943
+ };
2944
+ function Fn() {
2945
+ const t = Ae(null);
2946
+ return ke(() => {
2947
+ const n = t.current, i = n?.parentElement;
2948
+ if (!n || !i || typeof window > "u") return;
2949
+ const l = n.getContext("2d");
2950
+ if (!l) return;
2951
+ const o = window.matchMedia("(prefers-reduced-motion: reduce)"), r = window.matchMedia("(hover: hover) and (pointer: fine)");
2952
+ let d = 0, h = 0, m = 0, C = 0, $ = 0, b = 0, A = 0, v = !0, f = 0, _ = 0, N = new Float32Array(0), T = new Int8Array(0), s = [...vt], k = null;
2953
+ const g = () => {
2954
+ const U = getComputedStyle(i);
2955
+ s = An.map((J, ne) => U.getPropertyValue(J).trim() || vt[ne]);
2956
+ }, B = () => {
2957
+ Rn(N, m, C, $, b, f);
2958
+ for (let U = 0; U < N.length; U++)
2959
+ T[U] = Bn(N[U]);
2960
+ qn(
2961
+ l,
2962
+ T,
2963
+ m,
2964
+ C,
2965
+ $,
2966
+ b,
2967
+ s,
2968
+ k,
2969
+ Math.min(d, h) * 0.18,
2970
+ d,
2971
+ h
2972
+ );
2973
+ }, w = (U) => {
2974
+ A = 0, !(!v || document.hidden) && (_ && (f += Math.min(80, U - _) * 28e-5), _ = U, B(), o.matches || (A = requestAnimationFrame(w)));
2975
+ }, E = () => {
2976
+ cancelAnimationFrame(A), A = 0, _ = 0, v && !document.hidden && (A = requestAnimationFrame(w));
2977
+ }, O = () => {
2978
+ const U = i.getBoundingClientRect();
2979
+ d = U.width, h = U.height, m = Math.max(1, Math.round(d * gt)), C = Math.max(1, Math.round(h * gt)), $ = d / m, b = h / C, N = new Float32Array(m * C), T = new Int8Array(m * C);
2980
+ const J = Math.min(window.devicePixelRatio || 1, 2);
2981
+ n.width = Math.round(d * J), n.height = Math.round(h * J), l.setTransform(J, 0, 0, J, 0, 0), g(), E();
2982
+ }, R = (U) => {
2983
+ if (o.matches || !r.matches || U.pointerType === "touch")
2984
+ return;
2985
+ const J = i.getBoundingClientRect();
2986
+ k = {
2987
+ x: U.clientX - J.left,
2988
+ y: U.clientY - J.top
2989
+ }, A || E();
2990
+ }, W = () => {
2991
+ k = null, A || E();
2992
+ }, z = new MutationObserver(() => {
2993
+ g(), A || E();
2994
+ });
2995
+ z.observe(document.body, {
2996
+ attributes: !0,
2997
+ attributeFilter: ["data-theme"],
2998
+ subtree: !0
2999
+ });
3000
+ const X = new ResizeObserver(O);
3001
+ X.observe(i);
3002
+ const V = new IntersectionObserver((U) => {
3003
+ v = U.some((J) => J.isIntersecting), E();
3004
+ });
3005
+ return V.observe(n), window.addEventListener("pointermove", R, { passive: !0 }), window.addEventListener("pointerleave", W), o.addEventListener("change", E), document.addEventListener("visibilitychange", E), O(), () => {
3006
+ cancelAnimationFrame(A), X.disconnect(), V.disconnect(), z.disconnect(), window.removeEventListener("pointermove", R), window.removeEventListener("pointerleave", W), o.removeEventListener("change", E), document.removeEventListener("visibilitychange", E);
3007
+ };
3008
+ }, []), t;
3009
+ }
3010
+ function Hr({ className: t }) {
3011
+ const n = Fn();
3012
+ return /* @__PURE__ */ a(
3013
+ "div",
3014
+ {
3015
+ className: `${He["rp-line-field-background"]}${t ? ` ${t}` : ""}`,
3016
+ "aria-hidden": "true",
3017
+ children: [
3018
+ /* @__PURE__ */ e(
3019
+ "canvas",
3020
+ {
3021
+ className: He["rp-line-field-canvas"],
3022
+ ref: n,
3023
+ tabIndex: -1
3024
+ }
3025
+ ),
3026
+ /* @__PURE__ */ e("div", { className: He["rp-line-field-veil"] }),
3027
+ /* @__PURE__ */ e("div", { className: He["rp-line-field-top"] }),
3028
+ /* @__PURE__ */ e("div", { className: He["rp-line-field-left"] }),
3029
+ /* @__PURE__ */ e("div", { className: He["rp-line-field-right"] }),
3030
+ /* @__PURE__ */ e("div", { className: He["rp-line-field-bottom"] })
3031
+ ]
3032
+ }
3033
+ );
3034
+ }
3035
+ const Pn = {
3036
+ "rp-dotted-background-canvas": "rp_BackgroundDotted-module_rp-dotted-background-canvas_-HlLHshb"
3037
+ };
3038
+ function In() {
3039
+ const t = Mt(!0);
3040
+ return /* @__PURE__ */ e(
3041
+ "canvas",
3042
+ {
3043
+ className: `${Pn["rp-dotted-background-canvas"]} rp-download-ripple`,
3044
+ ref: t,
3045
+ "aria-hidden": "true"
3046
+ }
3047
+ );
3048
+ }
3049
+ const En = "rp_BackgroundSquare-module_canvas_4Yh0JJmR", Hn = {
3050
+ canvas: En
3051
+ }, Xe = [
3052
+ "#244cf0",
3053
+ "#3459f1",
3054
+ "#4869f3",
3055
+ "#5c79f4",
3056
+ "#718bf5",
3057
+ "#859bf6",
3058
+ "#9aacf8",
3059
+ "#aebdf9",
3060
+ "#c3cefa",
3061
+ "#d7defc",
3062
+ "#e9edfe"
3063
+ ], Dn = 24, at = 90;
3064
+ function Je(t, n) {
3065
+ const i = (v, f) => {
3066
+ let _ = Math.imul(v, 374761393) + Math.imul(f, 668265263);
3067
+ return _ = Math.imul(_ ^ _ >>> 13, 1274126177), ((_ ^ _ >>> 16) >>> 0) / 4294967296;
3068
+ }, l = Math.floor(t), o = Math.floor(n), r = t - l, d = n - o, h = r * r * (3 - 2 * r), m = d * d * (3 - 2 * d), C = i(l, o), $ = i(l + 1, o), b = i(l, o + 1), A = i(l + 1, o + 1);
3069
+ return C + ($ - C) * h + (b - C) * m + (C - $ - b + A) * h * m;
3070
+ }
3071
+ function Dr({
3072
+ scene: t,
3073
+ cellSize: n = Dn
3074
+ }) {
3075
+ const i = Ae(null), l = Ae(t), o = Ae(n), r = Ae(/* @__PURE__ */ new Map());
3076
+ return ke(() => {
3077
+ l.current = t;
3078
+ }, [t]), ke(() => {
3079
+ o.current = n, r.current.clear();
3080
+ }, [n]), ke(() => {
3081
+ const d = i.current, h = d?.getContext("2d");
3082
+ if (!d || !h) return;
3083
+ const m = matchMedia("(prefers-reduced-motion: reduce)"), C = matchMedia("(any-hover: hover)"), $ = d.parentElement ?? d;
3084
+ let b = 0, A = 0, v = 0, f = !1, _ = l.current, N = l.current, T = 0, s = 1, k = 0;
3085
+ const g = { x: -1e3, y: -1e3, active: !1, strength: 0 }, B = { x: -1e3, y: -1e3 };
3086
+ let w = [], E = 0, O = 0;
3087
+ const R = r.current, W = (u, M) => {
3088
+ let y = 0;
3089
+ if (m.matches) return y;
3090
+ for (const F of w) {
3091
+ const I = (O - F.born) / 1e3, D = Math.hypot(u - F.x, M - F.y) - I * 320;
3092
+ y += Math.sin(D * 0.065) * Math.exp(-D * D / 13e3) * Math.max(0, 1 - I / 2.4) * F.strength;
3093
+ }
3094
+ return y;
3095
+ }, z = (u, M) => {
3096
+ const y = u / 220 + T * 0.018 + _ * 0.12, F = M / 220 - T * 0.012, I = Je(y * 2, F * 2), D = Je(y, F);
3097
+ return 0.5 + Math.sin((u * 0.62 + M) / 100 + D * 5.5 + T * 0.12) * 0.35 + (I - 0.5) * 0.32;
3098
+ }, X = (u, M, y, F = 0, I = 1) => {
3099
+ const D = u + y / 2, Y = M + y / 2, Q = D - g.x, he = Y - g.y, oe = Math.hypot(Q, he), ee = W(D, Y), ge = Math.exp(-oe * oe / (at * at)) * g.strength * 16 + ee * 12, le = (j) => z(
3100
+ (Math.floor(D / j) + 0.5) * j + Q / Math.max(1, oe) * ge,
3101
+ (Math.floor(Y / j) + 0.5) * j + he / Math.max(1, oe) * ge
3102
+ ), ve = le(o.current), Me = le(o.current / 2), pe = Math.floor(D / o.current), re = Math.floor(Y / o.current), ue = Je(pe * 17 + 31, re * 29 + 47), Ne = T * (0.55 + ue * 0.45) + ue * 19, $e = Math.floor(Ne), Le = Ne - $e, xe = Je(pe + $e * 193, re - $e * 137), Re = m.matches || xe < 0.84 ? 0 : Math.sin(Le * Math.PI) ** 6 * (0.02 + ue * 0.025), me = ve + (Me - ve) * I + F + ee * 0.1 + Re, ie = Math.max(
3103
+ 0,
3104
+ Math.min(Xe.length - 1, me * (Xe.length - 1))
3105
+ ), x = Math.floor(ie), P = ie - x, K = Xe[x], ae = Xe[Math.min(x + 1, Xe.length - 1)];
3106
+ h.fillStyle = "rgb(" + [1, 3, 5].map((j) => {
3107
+ const te = parseInt(K.slice(j, j + 2), 16), Ce = parseInt(ae.slice(j, j + 2), 16);
3108
+ return Math.round(te + (Ce - te) * P);
3109
+ }).join(",") + ")", h.fillRect(u, M, y + 0.6, y + 0.6);
3110
+ }, V = (u) => {
3111
+ b = 0;
3112
+ const M = k ? Math.min(u - k, 64) : 16;
3113
+ k = u, O = u, N !== l.current && (N = l.current, w.push({
3114
+ x: A * 0.5,
3115
+ y: v * 0.5,
3116
+ born: u,
3117
+ strength: 0.7
3118
+ })), _ += (N * 7.13 - _) * (1 - Math.exp(-M / 500)), w = w.filter((D) => u - D.born < 2400), g.strength += ((g.active ? 1 : 0) - g.strength) * (1 - Math.exp(-M / 150));
3119
+ const y = g.active || g.strength > 0.01 || w.length > 0;
3120
+ s += ((y ? 0.35 : 1) - s) * (1 - Math.exp(-M / (y ? 500 : 1200))), m.matches || (T += M / 1e3 * 0.35 * s);
3121
+ const F = at * g.strength, I = 1 - Math.exp(-M / 75);
3122
+ g.x += (B.x - g.x) * I, g.y += (B.y - g.y) * I;
3123
+ for (let D = 0; D < v; D += o.current)
3124
+ for (let Y = 0; Y < A; Y += o.current) {
3125
+ const Q = Math.hypot(
3126
+ Y + o.current / 2 - g.x,
3127
+ D + o.current / 2 - g.y
3128
+ ), he = Math.abs(
3129
+ W(Y + o.current / 2, D + o.current / 2)
3130
+ ), oe = Y + "," + D, ee = m.matches ? 0 : Math.max(
3131
+ F > 1 ? Math.max(0, 1 - Q / F) : 0,
3132
+ Math.min(1, he * 4)
3133
+ ), ge = R.get(oe) ?? 0, le = ge + (ee - ge) * (1 - Math.exp(-M / 320));
3134
+ R.set(oe, le < 1e-3 ? 0 : le);
3135
+ const ve = F > 1 ? 0.08 * Math.max(0, 1 - Q / F) ** 2 : 0;
3136
+ if (le > 1e-3) {
3137
+ const pe = o.current / 2;
3138
+ for (let re = 0; re < 2; re++)
3139
+ for (let ue = 0; ue < 2; ue++)
3140
+ X(Y + ue * pe, D + re * pe, pe, ve, le);
3141
+ } else
3142
+ X(Y, D, o.current, ve, 0);
3143
+ }
3144
+ f && !document.hidden && !m.matches && (b = requestAnimationFrame(V));
3145
+ }, U = () => {
3146
+ cancelAnimationFrame(b), k = 0, document.hidden || V(performance.now());
3147
+ }, J = () => {
3148
+ const u = d.getBoundingClientRect();
3149
+ A = u.width, v = u.height, R.clear();
3150
+ const M = Math.min(devicePixelRatio || 1, 2);
3151
+ d.width = Math.round(A * M), d.height = Math.round(v * M), h.setTransform(M, 0, 0, M, 0, 0), U();
3152
+ }, ne = (u) => {
3153
+ if (!C.matches || m.matches || !["mouse", "pen"].includes(u.pointerType))
3154
+ return;
3155
+ const M = d.getBoundingClientRect(), y = performance.now(), F = Math.hypot(
3156
+ u.clientX - M.left - B.x,
3157
+ u.clientY - M.top - B.y
3158
+ );
3159
+ g.active && F > 2 && y - E > 90 && (w.push({
3160
+ x: g.x,
3161
+ y: g.y,
3162
+ born: y,
3163
+ strength: Math.min(F / 40, 0.35)
3164
+ }), w = w.slice(-12), E = y), B.x = u.clientX - M.left, B.y = u.clientY - M.top, g.active || (g.x = B.x, g.y = B.y), g.active = !0, b || U();
3165
+ }, se = (u) => {
3166
+ if (m.matches || u.target.closest(
3167
+ 'a,button,input,select,[role="switch"],[role="combobox"]'
3168
+ ))
3169
+ return;
3170
+ const M = d.getBoundingClientRect();
3171
+ w.push({
3172
+ x: u.clientX - M.left,
3173
+ y: u.clientY - M.top,
3174
+ born: performance.now(),
3175
+ strength: 1
3176
+ }), w = w.slice(-12), b || U();
3177
+ }, q = () => {
3178
+ g.active = !1;
3179
+ }, H = () => {
3180
+ g.active = !1, g.strength = 0, w = [], U();
3181
+ }, p = new ResizeObserver(J), L = new IntersectionObserver((u) => {
3182
+ f = u.some((M) => M.isIntersecting), U();
3183
+ });
3184
+ return p.observe(d), L.observe(d), m.addEventListener("change", H), C.addEventListener("change", H), $.addEventListener("pointermove", ne), $.addEventListener("pointerdown", se), $.addEventListener("pointerleave", q), $.addEventListener("pointercancel", q), document.addEventListener("visibilitychange", U), J(), () => {
3185
+ cancelAnimationFrame(b), p.disconnect(), L.disconnect(), m.removeEventListener("change", H), C.removeEventListener("change", H), $.removeEventListener("pointermove", ne), $.removeEventListener("pointerdown", se), $.removeEventListener("pointerleave", q), $.removeEventListener("pointercancel", q), document.removeEventListener("visibilitychange", U);
3186
+ };
3187
+ }, []), /* @__PURE__ */ e("canvas", { ref: i, className: Hn.canvas, "aria-hidden": "true" });
3188
+ }
3189
+ const On = [
3190
+ "A request begins in a local client. The router reads the requested model and finds an available source. The conversation stays in the tool where it started.",
3191
+ "Different providers speak different protocols. A common interface carries messages across those boundaries while preserving the shape of each tool call.",
3192
+ "Context follows the request. Earlier messages form the working memory of a conversation. A continuation returns to the source that owns its state.",
3193
+ "Capacity changes throughout the day. One source becomes busy while another has room. Routing decisions depend on availability and the model being requested.",
3194
+ "A stream brings tokens back to the screen. The first fragment arrives before the final sentence exists. Completion closes the response rather than the conversation.",
3195
+ "Sessions renew behind the scenes. Credentials stay outside the local editor. Account maintenance becomes infrastructure instead of another item on the daily checklist.",
3196
+ "A model name expresses intent. A provider supplies execution. A route connects those two ideas without asking the client to understand every upstream detail.",
3197
+ "Tool calls carry structured arguments. Their results must reach the same conversation that requested them. Continuity matters more than choosing a new source midway.",
3198
+ "A timeout is a boundary on waiting. Cancellation releases unused work. Clear errors let the caller decide whether to retry, change a model, or stop.",
3199
+ "Subscription management spans renewals, limits, and access. A local application can expose a simple connection while the service handles that operational complexity.",
3200
+ "An endpoint receives a message, validates its shape, and passes it onward. Headers describe the transport. The response body contains the useful work.",
3201
+ "Retries belong before a response is committed. Once the stream has begun, its origin stays consistent. An interrupted generation should end with an explicit outcome.",
3202
+ "Latency includes connection setup, queue time, and generation. A fast first token does not guarantee a short answer. Each measurement describes a different part of the path.",
3203
+ "Source selection is separate from model selection. Several routes may offer the same family of models. Their capacity and supported capabilities can differ.",
3204
+ "Local clients retain familiar controls. Editors keep their files and command history. The connection changes while the surrounding workflow remains recognizable.",
3205
+ "A request identifier links events across the route. Logs can describe timing and outcomes without exposing private credentials or the contents of a conversation.",
3206
+ "Configuration records the desired connections. Runtime state describes what is available now. Keeping those concepts separate makes failures easier to understand.",
3207
+ "Model discovery provides a current catalog. A client can ask which options are available rather than rely on a list frozen into an earlier release.",
3208
+ "An account has a lifecycle beyond sign in. Access can expire, limits can change, and a session can require renewal. Those transitions should have clear states.",
3209
+ "Routing is a sequence of small decisions. Validate the input. Find a compatible source. Keep the response attached to its origin. Return a useful result.",
3210
+ "A coding agent alternates between language and action. It reads a file, proposes a change, and evaluates the result. Each step depends on preserving the conversation.",
3211
+ "Desktop preferences describe how a connection fits the machine. Startup behavior and client integration belong near the user rather than inside provider configuration.",
3212
+ "Backpressure prevents a slow consumer from accumulating unlimited data. A stream should move at the pace its receiver can handle and release resources when disconnected.",
3213
+ "An unavailable model needs a direct explanation. An authentication failure needs a different recovery path. Precise errors make infrastructure feel predictable.",
3214
+ "Request history offers a view of completed work. Duration, source, and outcome help explain what happened. Example records must remain distinct from live account data.",
3215
+ "The final token is only one part of completion. A terminal event tells the client that no further output is expected. Structured tools depend on that contract.",
3216
+ "A shared connection reduces repetitive setup. Each local tool can use the same service while preserving its own interface, workspace, and interaction model.",
3217
+ "Transparent provenance is a separate capability. Signed and verifiable model requests remain a future feature until a public verification path is available."
3218
+ ], bt = (t) => {
3219
+ const n = Math.max(0, Math.min(1, t));
3220
+ return n * n * (3 - 2 * n);
3221
+ };
3222
+ function Or({
3223
+ onComplete: t,
3224
+ passages: n
3225
+ }) {
3226
+ const i = n ?? On, l = Ae(null);
3227
+ return ke(() => {
3228
+ const o = l.current, r = o?.getContext("2d"), d = matchMedia("(prefers-reduced-motion: reduce)");
3229
+ if (!o || !r || d.matches) {
3230
+ t();
3231
+ return;
3232
+ }
3233
+ let h = 0, m = 0, C = 0;
3234
+ const $ = () => {
3235
+ h = innerWidth, m = innerHeight;
3236
+ const s = Math.min(devicePixelRatio || 1, 2);
3237
+ o.width = h * s, o.height = m * s, r.setTransform(s, 0, 0, s, 0, 0);
3238
+ };
3239
+ $();
3240
+ const b = i.map((s, k) => ({
3241
+ text: s,
3242
+ order: Math.random(),
3243
+ x: Math.random() * 0.88 - 0.03,
3244
+ y: Math.random() * 0.9 - 0.03,
3245
+ width: 0.13 + Math.random() * 0.28,
3246
+ height: 0.16 + Math.random() * 0.36,
3247
+ size: 9 + Math.random() * 13,
3248
+ dark: Math.random() > 0.35,
3249
+ phase: Math.random() * 1e3,
3250
+ index: k
3251
+ })).sort((s, k) => s.order - k.order), A = 2500, v = 4e3, f = performance.now(), _ = (s) => {
3252
+ const k = (s - f) * v / A, g = bt((k - 2900) / 850), B = Math.floor(k / 340);
3253
+ r.globalAlpha = 1, r.fillStyle = k < 650 || k >= 1600 ? "#101216" : "#fafafa", r.fillRect(0, 0, h, m);
3254
+ for (const w of b) {
3255
+ const E = w.x * h, O = w.y * m, R = w.width * h, W = w.height * m, z = w.size * (k < 650 ? 1.6 : k < 1600 ? 1.15 : 1), X = z * 1.04;
3256
+ r.save(), r.globalAlpha = 1 - g, r.fillStyle = w.dark ? "#101216" : "#f4f5f7", r.fillRect(E, O, R, W), r.beginPath(), r.rect(E, O, R, W), r.clip(), r.font = z + "px sans-serif", r.textBaseline = "top";
3257
+ let V = E, U = O - (k * 0.012 + w.phase) % X;
3258
+ const J = w.text.split(" ");
3259
+ for (let ne = 0; ne < J.length; ne++) {
3260
+ const se = J[ne], q = r.measureText(se + " ").width;
3261
+ if (V + q > E + R && (V = E, U += X), U > O + W) break;
3262
+ const H = w.index * 53 + ne * 17;
3263
+ r.save();
3264
+ const p = Math.round((U - 7) / 14), L = 7 + Math.round((V - 7) / 14) * 14 + p % 2 * 7, u = 7 + p * 14;
3265
+ if (r.translate(V + (L - V) * g, U + (u - U) * g), r.scale(1 - g * 0.94, 1 - g * 0.94), k < 650 && (H + B) % 4 > 0) {
3266
+ r.restore(), V += q;
3267
+ continue;
3268
+ }
3269
+ (H + B) % 8 < 3 ? (r.fillStyle = ["#245bff", "#aab1bd", "#e8edf7"][(H + B) % 3], r.fillRect(0, 0, r.measureText(se).width, X), r.fillStyle = (H + B) % 3 === 0 ? "#fff" : "#101216") : r.fillStyle = w.dark ? "#f5f8ff" : "#101216", r.fillText(k < 650 ? se.toUpperCase() : se, 0, 0), r.restore(), V += q;
3270
+ }
3271
+ r.restore();
3272
+ }
3273
+ if (g > 0) {
3274
+ const w = document.querySelector(".rp-hero"), E = w?.getBoundingClientRect().height || m, O = r.createLinearGradient(0, 0, 0, E);
3275
+ for (const [R, W] of [
3276
+ [0, "#0b205e"],
3277
+ [0.35, "#214eaf"],
3278
+ [0.55, "#3564cc"],
3279
+ [0.78, "#92b2f1"],
3280
+ [0.93, "#edf4ff"],
3281
+ [1, "#fff"]
3282
+ ])
3283
+ O.addColorStop(R, W);
3284
+ r.globalAlpha = g, r.fillStyle = O, r.fillRect(0, 0, h, m);
3285
+ for (let R = 7, W = 0; R < m; R += 14, W++)
3286
+ for (let z = 7 + W % 2 * 7; z < h; z += 14) {
3287
+ const X = Math.pow(Math.max(0, 1 - R / E), 0.6), V = 1 - Math.exp(
3288
+ -Math.pow((z - h / 2) / (h * 0.28), 2) - Math.pow((R - E * 0.38) / (E * 0.24), 2)
3289
+ ) * 0.55;
3290
+ r.globalAlpha = g * 0.54 * X * V, r.strokeStyle = "#f5f8ff", r.lineWidth = 1.2, r.beginPath(), r.moveTo(z - 3.5, R), r.lineTo(z + 3.5, R), r.moveTo(z, R - 3.5), r.lineTo(z, R + 3.5), r.stroke();
3291
+ }
3292
+ }
3293
+ r.globalAlpha = 1, o.style.opacity = String(1 - bt((k - 3750) / 250)), k < v ? C = requestAnimationFrame(_) : t();
3294
+ };
3295
+ C = requestAnimationFrame(_);
3296
+ const N = setTimeout(t, A + 300), T = () => {
3297
+ d.matches && t();
3298
+ };
3299
+ return addEventListener("resize", $), d.addEventListener("change", T), () => {
3300
+ cancelAnimationFrame(C), clearTimeout(N), removeEventListener("resize", $), d.removeEventListener("change", T);
3301
+ };
3302
+ }, [t, i]), /* @__PURE__ */ e(
3303
+ "canvas",
3304
+ {
3305
+ ref: l,
3306
+ "aria-hidden": "true",
3307
+ style: {
3308
+ position: "fixed",
3309
+ inset: 0,
3310
+ width: "100%",
3311
+ height: "100%",
3312
+ zIndex: 1e4,
3313
+ background: "#101216"
3314
+ }
3315
+ }
3316
+ );
3317
+ }
3318
+ const Un = {
3319
+ "rp-effect-card": "rp_EffectCard-module_rp-effect-card_hcD4035l",
3320
+ "rp-effect-content": "rp_EffectCard-module_rp-effect-content_4Oy-i-OP"
3321
+ }, nt = { ...et, ...Un };
3322
+ function zn({
3323
+ className: t = "",
3324
+ children: n,
3325
+ contentHTML: i,
3326
+ ...l
3327
+ }) {
3328
+ return /* @__PURE__ */ a(
3329
+ "div",
3330
+ {
3331
+ className: nt["rp-card"] + " " + nt["rp-effect-card"] + " " + t,
3332
+ ...l,
3333
+ children: [
3334
+ /* @__PURE__ */ e(In, {}),
3335
+ i === void 0 ? n : /* @__PURE__ */ e(
3336
+ "div",
3337
+ {
3338
+ className: nt["rp-effect-content"],
3339
+ dangerouslySetInnerHTML: { __html: i }
3340
+ }
3341
+ )
3342
+ ]
3343
+ }
3344
+ );
3345
+ }
3346
+ function Ur(t = Math.random() * 4294967295) {
3347
+ let n = t >>> 0;
3348
+ const i = () => {
3349
+ n += 1831565813;
3350
+ let r = Math.imul(n ^ n >>> 15, n | 1);
3351
+ return r ^= r + Math.imul(r ^ r >>> 7, r | 61), ((r ^ r >>> 14) >>> 0) / 4294967296;
3352
+ }, l = (r, d) => r + i() * (d - r), o = Math.floor(i() * 3);
3353
+ return {
3354
+ seed: t,
3355
+ family: o,
3356
+ arms: Math.floor(l(3, 8)),
3357
+ rotation: l(0, Math.PI * 2),
3358
+ curl: o === 0 ? l(9e-3, 0.018) : l(1e-3, 6e-3),
3359
+ direction: i() < 0.5 ? -1 : 1,
3360
+ speed: l(500, 640),
3361
+ width: l(36, 52),
3362
+ lobes: o === 1 ? l(0.18, 0.28) : l(0.06, 0.14),
3363
+ decay: l(0.8, 1.1),
3364
+ strength: l(26, 36),
3365
+ spacing: l(210, 270),
3366
+ phase: l(0, Math.PI * 2)
3367
+ };
3368
+ }
3369
+ function zr(t, n, i, l) {
3370
+ if (l < 0) return { x: 0, y: 0, energy: 0 };
3371
+ const o = Math.hypot(n, i), r = Math.atan2(i, n), d = r * t.arms + t.rotation, h = d - o * t.curl * t.direction, m = Math.exp(-l * t.decay) * Math.min(1, l / 0.08), C = l * t.speed * (1 + t.lobes * Math.sin(d) + 0.035 * Math.sin(r * (t.arms + 3) + t.phase)), $ = (o - C) / t.width, b = t.family === 2 ? 0.25 + 0.75 * Math.pow(0.5 + 0.5 * Math.sin(d + t.phase), 2) : 1, A = Math.exp(-$ * $) * m * b, v = Math.pow(Math.max(0, Math.cos(h)), 8), f = Math.exp(-Math.pow((o - C * 0.6) / 95, 2)) * v * m, _ = Math.exp(-o * o / 14e3) * Math.max(0, 1 - l / 0.6), N = A * t.strength + f * 22 + _ * 8, T = f * 18 * Math.sin(h) * t.direction;
3372
+ return {
3373
+ x: (n * N - i * T) / Math.max(1, o),
3374
+ y: (i * N + n * T) / Math.max(1, o),
3375
+ energy: A * 0.55 + f * 0.8 + _ * 0.3
3376
+ };
3377
+ }
3378
+ const Ie = {
3379
+ "rp-alert-dialog__trigger": "rp_AlertDialog-module_rp-alert-dialog__trigger_zDrVBZPv",
3380
+ "rp-alert-dialog__overlay": "rp_AlertDialog-module_rp-alert-dialog__overlay_aHs-GNOy",
3381
+ "rp-alert-dialog__content": "rp_AlertDialog-module_rp-alert-dialog__content_2yGt8Pjg",
3382
+ "rp-alert-dialog__title": "rp_AlertDialog-module_rp-alert-dialog__title_P02UEsFt",
3383
+ "rp-alert-dialog__description": "rp_AlertDialog-module_rp-alert-dialog__description_-Q7H0B5l",
3384
+ "rp-alert-dialog__action": "rp_AlertDialog-module_rp-alert-dialog__action_1Axjzt0X",
3385
+ "rp-alert-dialog__cancel": "rp_AlertDialog-module_rp-alert-dialog__cancel_BkaoYoMJ",
3386
+ "rp-alert-dialog__footer": "rp_AlertDialog-module_rp-alert-dialog__footer_7cTm367U"
3387
+ }, yt = (t) => /* @__PURE__ */ e(de.Root, { ...t }), $t = Pe(({ className: t, ...n }, i) => /* @__PURE__ */ e(
3388
+ de.Trigger,
3389
+ {
3390
+ ref: i,
3391
+ className: Z(
3392
+ !n.asChild && Ie["rp-alert-dialog__trigger"],
3393
+ t
3394
+ ),
3395
+ ...n
3396
+ }
3397
+ ));
3398
+ $t.displayName = de.Trigger.displayName;
3399
+ const Gn = de.Portal, xt = Pe(({ className: t, ...n }, i) => /* @__PURE__ */ e(
3400
+ de.Overlay,
3401
+ {
3402
+ ref: i,
3403
+ className: Z(Ie["rp-alert-dialog__overlay"], t),
3404
+ ...n
3405
+ }
3406
+ ));
3407
+ xt.displayName = de.Overlay.displayName;
3408
+ const Ct = Pe(({ className: t, ...n }, i) => /* @__PURE__ */ e(
3409
+ de.Content,
3410
+ {
3411
+ ref: i,
3412
+ className: Z(Ie["rp-alert-dialog__content"], t),
3413
+ ...n
3414
+ }
3415
+ ));
3416
+ Ct.displayName = de.Content.displayName;
3417
+ const At = Pe(({ className: t, ...n }, i) => /* @__PURE__ */ e(
3418
+ de.Title,
3419
+ {
3420
+ ref: i,
3421
+ className: Z(Ie["rp-alert-dialog__title"], t),
3422
+ ...n
3423
+ }
3424
+ ));
3425
+ At.displayName = de.Title.displayName;
3426
+ const Lt = Pe(({ className: t, ...n }, i) => /* @__PURE__ */ e(
3427
+ de.Description,
3428
+ {
3429
+ ref: i,
3430
+ className: Z(Ie["rp-alert-dialog__description"], t),
3431
+ ...n
3432
+ }
3433
+ ));
3434
+ Lt.displayName = de.Description.displayName;
3435
+ const St = Pe(({ className: t, ...n }, i) => /* @__PURE__ */ e(
3436
+ de.Action,
3437
+ {
3438
+ ref: i,
3439
+ className: Z(
3440
+ !n.asChild && Ie["rp-alert-dialog__action"],
3441
+ t
3442
+ ),
3443
+ ...n
3444
+ }
3445
+ ));
3446
+ St.displayName = de.Action.displayName;
3447
+ const Bt = Pe(({ className: t, ...n }, i) => /* @__PURE__ */ e(
3448
+ de.Cancel,
3449
+ {
3450
+ ref: i,
3451
+ className: Z(
3452
+ !n.asChild && Ie["rp-alert-dialog__cancel"],
3453
+ t
3454
+ ),
3455
+ ...n
3456
+ }
3457
+ ));
3458
+ Bt.displayName = de.Cancel.displayName;
3459
+ const Xn = Pe(({ className: t, ...n }, i) => /* @__PURE__ */ e(
3460
+ "div",
3461
+ {
3462
+ ref: i,
3463
+ className: Z(Ie["rp-alert-dialog__footer"], t),
3464
+ ...n
3465
+ }
3466
+ )), Gr = Object.assign(yt, {
3467
+ Root: yt,
3468
+ Trigger: $t,
3469
+ Portal: Gn,
3470
+ Overlay: xt,
3471
+ Content: Ct,
3472
+ Title: At,
3473
+ Description: Lt,
3474
+ Action: St,
3475
+ Cancel: Bt,
3476
+ Footer: Xn
3477
+ }), Yn = "rp_AuthCard-module_card_3af6mRI1", jn = "rp_AuthCard-module_header_WB-cRppT", Wn = "rp_AuthCard-module_title_b2lbN-iF", Vn = "rp_AuthCard-module_description_zPbJJzv5", Kn = "rp_AuthCard-module_providers_Lr2Os9jM", Jn = "rp_AuthCard-module_providerButton_ibhdV26C", Zn = "rp_AuthCard-module_providerIcon_Uj09QL-n", Qn = "rp_AuthCard-module_keyForm_0VG0GeLp", er = "rp_AuthCard-module_divider_r-wmQ2Yq", tr = "rp_AuthCard-module_keyInputRow_n4XX9BYm", ar = "rp_AuthCard-module_keyInput_rzjbrJea", nr = "rp_AuthCard-module_footer_51y8yr80", _e = {
3478
+ card: Yn,
3479
+ header: jn,
3480
+ title: Wn,
3481
+ description: Vn,
3482
+ providers: Kn,
3483
+ providerButton: Jn,
3484
+ providerIcon: Zn,
3485
+ keyForm: Qn,
3486
+ divider: er,
3487
+ keyInputRow: tr,
3488
+ keyInput: ar,
3489
+ footer: nr
3490
+ }, Xr = ({
3491
+ title: t = "Sign in to RouterPlus",
3492
+ description: n = "Access models and manage your account",
3493
+ providers: i = [],
3494
+ apiKeyLabel: l = "Or continue with API key",
3495
+ apiKeyPlaceholder: o = "Enter your rp_live_... API key",
3496
+ onApiKeySubmit: r,
3497
+ footer: d,
3498
+ className: h
3499
+ }) => {
3500
+ const [m, C] = Be(""), $ = (b) => {
3501
+ b.preventDefault(), m.trim() && r?.(m.trim());
3502
+ };
3503
+ return /* @__PURE__ */ a(zn, { className: Z(_e.card, h), children: [
3504
+ /* @__PURE__ */ a("div", { className: _e.header, children: [
3505
+ /* @__PURE__ */ e("h1", { className: _e.title, children: t }),
3506
+ n && /* @__PURE__ */ e("p", { className: _e.description, children: n })
3507
+ ] }),
3508
+ i.length > 0 && /* @__PURE__ */ e("div", { className: _e.providers, children: i.map((b) => /* @__PURE__ */ a(
3509
+ G,
3510
+ {
3511
+ className: _e.providerButton,
3512
+ variant: "outline",
3513
+ href: b.href,
3514
+ onClick: b.onClick,
3515
+ children: [
3516
+ b.icon && /* @__PURE__ */ e("span", { className: _e.providerIcon, "aria-hidden": "true", children: b.icon }),
3517
+ /* @__PURE__ */ e("span", { children: b.name })
3518
+ ]
3519
+ },
3520
+ b.id
3521
+ )) }),
3522
+ r && /* @__PURE__ */ a("form", { className: _e.keyForm, onSubmit: $, children: [
3523
+ /* @__PURE__ */ e("div", { className: _e.divider, children: /* @__PURE__ */ e("span", { children: l }) }),
3524
+ /* @__PURE__ */ a("div", { className: _e.keyInputRow, children: [
3525
+ /* @__PURE__ */ e(
3526
+ Qe,
3527
+ {
3528
+ type: "password",
3529
+ placeholder: o,
3530
+ value: m,
3531
+ onChange: (b) => C(b.target.value),
3532
+ className: _e.keyInput
3533
+ }
3534
+ ),
3535
+ /* @__PURE__ */ e(G, { variant: "primary", type: "submit", disabled: !m.trim(), children: "Continue" })
3536
+ ] })
3537
+ ] }),
3538
+ d && /* @__PURE__ */ e("div", { className: _e.footer, children: d })
3539
+ ] });
3540
+ }, rr = "rp_Footer-module_footer_hxH87TcN", ir = "rp_Footer-module_nav_nBjfaMF3", sr = "rp_Footer-module_link_8Rd1iGUN", or = "rp_Footer-module_copyright_MOU-OKDL", Ze = {
3541
+ footer: rr,
3542
+ nav: ir,
3543
+ link: sr,
3544
+ copyright: or
3545
+ }, Yr = ({
3546
+ logoHref: t = "/",
3547
+ links: n = [
3548
+ { label: "Sign in", href: "/auth" },
3549
+ { label: "Dashboard", href: "/dashboard" },
3550
+ { label: "Documentation", href: "/docs" },
3551
+ {
3552
+ label: "@plusrouterbot",
3553
+ href: "https://t.me/plusrouterbot",
3554
+ target: "_blank",
3555
+ rel: "noopener noreferrer"
3556
+ }
3557
+ ],
3558
+ copyright: i,
3559
+ className: l
3560
+ }) => /* @__PURE__ */ a("footer", { className: Z(Ze.footer, l), children: [
3561
+ /* @__PURE__ */ e(_t, { href: t, footer: !0 }),
3562
+ /* @__PURE__ */ e("nav", { className: Ze.nav, "aria-label": "Footer navigation", children: n.map((o) => /* @__PURE__ */ e(
3563
+ "a",
3564
+ {
3565
+ href: o.href,
3566
+ target: o.target,
3567
+ rel: o.rel,
3568
+ className: Ze.link,
3569
+ children: o.label
3570
+ },
3571
+ o.label
3572
+ )) }),
3573
+ i && /* @__PURE__ */ e("div", { className: Ze.copyright, children: i })
3574
+ ] }), lr = "rp_Header-module_header_Turig8tF", cr = "rp_Header-module_lead_0DaE0r8e", dr = "rp_Header-module_logo_mtMWQXw6", hr = "rp_Header-module_center_q6eURj1J", pr = "rp_Header-module_tools_H6sckGtR", ze = {
3575
+ header: lr,
3576
+ lead: cr,
3577
+ logo: dr,
3578
+ center: hr,
3579
+ tools: pr
3580
+ }, ur = [
3581
+ { value: "en", label: "English" },
3582
+ { value: "de", label: "Deutsch" },
3583
+ { value: "es", label: "Español" },
3584
+ { value: "fr", label: "Français" },
3585
+ { value: "ru", label: "Русский" }
3586
+ ];
3587
+ function jr({
3588
+ dark: t = !1,
3589
+ onThemeChange: n,
3590
+ language: i = "en",
3591
+ languages: l = ur,
3592
+ onLanguageChange: o,
3593
+ left: r,
3594
+ afterLogo: d,
3595
+ center: h,
3596
+ right: m,
3597
+ action: C,
3598
+ surface: $ = "hero",
3599
+ href: b = "/en"
3600
+ }) {
3601
+ const A = m === void 0 ? C : m;
3602
+ return /* @__PURE__ */ a(
3603
+ "header",
3604
+ {
3605
+ className: ze.header,
3606
+ "data-theme": t ? "dark" : "light",
3607
+ "data-surface": $,
3608
+ children: [
3609
+ /* @__PURE__ */ a("div", { className: ze.lead, children: [
3610
+ r,
3611
+ /* @__PURE__ */ e(_t, { className: ze.logo, href: b }),
3612
+ d
3613
+ ] }),
3614
+ h !== void 0 && h !== !1 && /* @__PURE__ */ e("div", { className: ze.center, children: h }),
3615
+ /* @__PURE__ */ a("div", { className: ze.tools, children: [
3616
+ /* @__PURE__ */ e(Zt, { dark: t, onThemeChange: n }),
3617
+ /* @__PURE__ */ e(
3618
+ Qt,
3619
+ {
3620
+ className: ze.language,
3621
+ triggerContent: /* @__PURE__ */ e(na, { size: 18, "aria-hidden": "true" }),
3622
+ popupAlign: "end",
3623
+ popupTheme: t ? "dark" : "light",
3624
+ options: l,
3625
+ value: i,
3626
+ onValueChange: (v) => o?.(v),
3627
+ ariaLabel: `Change language: ${l.find((v) => v.value === i)?.label ?? i}`
3628
+ }
3629
+ ),
3630
+ A === void 0 ? /* @__PURE__ */ e(G, { variant: "primary", href: "/en/auth", children: "API Key" }) : A
3631
+ ] })
3632
+ ]
3633
+ }
3634
+ );
3635
+ }
3636
+ export {
3637
+ Gr as AlertDialog,
3638
+ St as AlertDialogAction,
3639
+ Bt as AlertDialogCancel,
3640
+ Ct as AlertDialogContent,
3641
+ Lt as AlertDialogDescription,
3642
+ Xn as AlertDialogFooter,
3643
+ xt as AlertDialogOverlay,
3644
+ Gn as AlertDialogPortal,
3645
+ yt as AlertDialogRoot,
3646
+ At as AlertDialogTitle,
3647
+ $t as AlertDialogTrigger,
3648
+ Xr as AuthCard,
3649
+ Er as BackgroundCursor,
3650
+ In as BackgroundDotted,
3651
+ Hr as BackgroundLineField,
3652
+ Pr as BackgroundPlus,
3653
+ Dr as BackgroundSquare,
3654
+ Ar as BarChart,
3655
+ Cr as Billing,
3656
+ Or as BrandIntro,
3657
+ yr as CustomerDashboard,
3658
+ zn as EffectCard,
3659
+ Yr as Footer,
3660
+ jr as Header,
3661
+ Lr as Heatmap,
3662
+ Sr as MetricStrip,
3663
+ Br as Panel,
3664
+ Ir as PlusField,
3665
+ Mr as Provider,
3666
+ $r as ProviderLogo,
3667
+ Rr as Ranking,
3668
+ Tr as RequestTable,
3669
+ ce as RouterPlusGlyph,
3670
+ wr as RouterPlusHarnessMapping,
3671
+ je as RouterPlusIcon,
3672
+ Nr as RouterPlusProviderList,
3673
+ _r as RouterPlusShell,
3674
+ kr as RouterPlusUsageSummary,
3675
+ qr as SessionShape,
3676
+ Kr as Shop,
3677
+ Jr as ShopAccountCard,
3678
+ Zr as ShopCard,
3679
+ Qr as SideNavigation,
3680
+ ei as SideNavigationBrand,
3681
+ ti as SideNavigationEmpty,
3682
+ ai as SideNavigationFooter,
3683
+ ni as SideNavigationHeader,
3684
+ ri as SideNavigationItem,
3685
+ ii as SideNavigationScroll,
3686
+ si as SideNavigationSection,
3687
+ oi as SideNavigationStatus,
3688
+ li as SideNavigationSubItem,
3689
+ ci as SideNavigationSubNav,
3690
+ di as SideNavigationToggle,
3691
+ hi as Support,
3692
+ pi as SupportDialog,
3693
+ Fr as UsageList,
3694
+ xr as flagForRegion,
3695
+ Ur as generateBlast,
3696
+ ui as glyphs,
3697
+ mi as icons,
3698
+ mn as regionForLocale,
3699
+ Rt as routerPlusLogo,
3700
+ zr as sampleBlast,
3701
+ gi as useThemeTransition
3702
+ };