fix: 修复官方等价对比 pattern 无法匹配后端 model_name 的问题

- Pattern 改为匹配后端实际格式(如 claude-opus-4-5 而非 claude-4.5-opus)
- 确保更具体的 pattern 排在前面,避免 Opus 4.5 误匹配到 Opus 4 的 $15 官方价
- 补充更多模型:GPT-4.1 Mini/Nano、Gemini Flash Lite、DeepSeek R1/V3 等

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
abingyydsandClaude Sonnet 4.6 committed 2026-03-25 17:41:01 +09:00
1 parent 2109f2a7a0
commit b27fa4df53
30 files changed
+64 -47

No files matched your search

@@ -1 +1 @@
import{r as S,j as Qt}from"./index-C1LcEmdp.js";function kt(t){const e=S.useRef(null);return e.current===null&&(e.current=t()),e.current}const Yt=typeof window<"u",te=Yt?S.useLayoutEffect:S.useEffect;function ee(t,e){t.indexOf(e)===-1&&t.push(e)}function ne(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const U=(t,e,n)=>n>e?e:n<t?t:n;let Ct=()=>{};const ft={},Y=t=>t,se=(t,e)=>n=>e(t(n)),ht=(...t)=>t.reduce(se),Vt=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r};class re{constructor(){this.subscriptions=[]}add(e){return ee(this.subscriptions,e),()=>ne(this.subscriptions,e)}notify(e,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,n,r);else for(let i=0;i<s;i++){const o=this.subscriptions[i];o&&o(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const L=t=>t*1e3,P=t=>t/1e3;function It(t,e){return e?t*(1e3/e):0}const Et=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,ie=1e-7,oe=12;function ae(t,e,n,r,s){let i,o,a=0;do o=e+(n-e)/2,i=Et(o,r,s)-t,i>0?n=o:e=o;while(Math.abs(i)>ie&&++a<oe);return o}function j(t,e,n,r){if(t===e&&n===r)return Y;const s=i=>ae(i,0,1,t,n);return i=>i===0||i===1?i:Et(s(i),e,r)}const Rt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Pt=t=>e=>1-t(1-e),Nt=j(.33,1.53,.69,.99),dt=Pt(Nt),ce=Rt(dt),ue=t=>t>=1?1:(t*=2)<1?.5*dt(t):.5*(2-Math.pow(2,-10*(t-1))),pt=t=>1-Math.sin(Math.acos(t)),le=Pt(pt),fe=Rt(pt),he=j(.42,0,1,1),de=j(0,0,.58,1),Ot=j(.42,0,.58,1),pe=t=>Array.isArray(t)&&typeof t[0]!="number",me=t=>Array.isArray(t)&&typeof t[0]=="number",ge={linear:Y,easeIn:he,easeInOut:Ot,easeOut:de,circIn:pt,circInOut:fe,circOut:le,backIn:dt,backInOut:ce,backOut:Nt,anticipate:ue},ye=t=>typeof t=="string",Tt=t=>{if(me(t)){Ct(t.length===4);const[e,n,r,s]=t;return j(e,n,r,s)}else if(ye(t))return ge[t];return t},z=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function be(t,e){let n=new Set,r=new Set,s=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function u(c){o.has(c)&&(l.schedule(c),t()),c(a)}const l={schedule:(c,f=!1,d=!1)=>{const x=d&&s?n:r;return f&&o.add(c),x.add(c),c},cancel:c=>{r.delete(c),o.delete(c)},process:c=>{if(a=c,s){i=!0;return}s=!0;const f=n;n=r,r=f,n.forEach(u),n.clear(),s=!1,i&&(i=!1,l.process(c))}};return l}const Te=40;function ve(t,e){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=z.reduce((T,g)=>(T[g]=be(i),T),{}),{setup:a,read:u,resolveKeyframes:l,preUpdate:c,update:f,preRender:d,render:M,postRender:x}=o,m=()=>{const T=ft.useManualTiming,g=T?s.timestamp:performance.now();n=!1,T||(s.delta=r?1e3/60:Math.max(Math.min(g-s.timestamp,Te),1)),s.timestamp=g,s.isProcessing=!0,a.process(s),u.process(s),l.process(s),c.process(s),f.process(s),d.process(s),M.process(s),x.process(s),s.isProcessing=!1,n&&e&&(r=!1,t(m))},v=()=>{n=!0,r=!0,s.isProcessing||t(m)};return{schedule:z.reduce((T,g)=>{const y=o[g];return T[g]=(D,C=!1,b=!1)=>(n||v(),y.schedule(D,C,b)),T},{}),cancel:T=>{for(let g=0;g<z.length;g++)o[z[g]].cancel(T)},state:s,steps:o}}const{schedule:tt,cancel:Ut,state:J}=ve(typeof requestAnimationFrame<"u"?requestAnimationFrame:Y,!0);let Z;function xe(){Z=void 0}const V={now:()=>(Z===void 0&&V.set(J.isProcessing||ft.useManualTiming?J.timestamp:performance.now()),Z),set:t=>{Z=t,queueMicrotask(xe)}},Me=t=>e=>typeof e=="string"&&e.startsWith(t),Ae=Me("var(--"),De=t=>Ae(t)?Fe.test(t.split("/*")[0].trim()):!1,Fe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Kt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Gt={...Kt,transform:t=>U(0,1,t)},q=t=>Math.round(t*1e5)/1e5,Lt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Se(t){return t==null}const we=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,mt=(t,e)=>n=>!!(typeof n=="string"&&we.test(n)&&n.startsWith(t)||e&&!Se(n)&&Object.prototype.hasOwnProperty.call(n,e)),qt=(t,e,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,a]=r.match(Lt);return{[t]:parseFloat(s),[e]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},ke=t=>U(0,255,t),nt={...Kt,transform:t=>Math.round(ke(t))},O={test:mt("rgb","red"),parse:qt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+nt.transform(t)+", "+nt.transform(e)+", "+nt.transform(n)+", "+q(Gt.transform(r))+")"};function Ce(t){let e="",n="",r="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,r+=r,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const at={test:mt("#"),parse:Ce,transform:O.transform},Ve=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),vt=Ve("%"),G={test:mt("hsl","hue"),parse:qt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"Line truncated
import{r as S,j as Qt}from"./index-D8eKls75.js";function kt(t){const e=S.useRef(null);return e.current===null&&(e.current=t()),e.current}const Yt=typeof window<"u",te=Yt?S.useLayoutEffect:S.useEffect;function ee(t,e){t.indexOf(e)===-1&&t.push(e)}function ne(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const U=(t,e,n)=>n>e?e:n<t?t:n;let Ct=()=>{};const ft={},Y=t=>t,se=(t,e)=>n=>e(t(n)),ht=(...t)=>t.reduce(se),Vt=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r};class re{constructor(){this.subscriptions=[]}add(e){return ee(this.subscriptions,e),()=>ne(this.subscriptions,e)}notify(e,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,n,r);else for(let i=0;i<s;i++){const o=this.subscriptions[i];o&&o(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const L=t=>t*1e3,P=t=>t/1e3;function It(t,e){return e?t*(1e3/e):0}const Et=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,ie=1e-7,oe=12;function ae(t,e,n,r,s){let i,o,a=0;do o=e+(n-e)/2,i=Et(o,r,s)-t,i>0?n=o:e=o;while(Math.abs(i)>ie&&++a<oe);return o}function j(t,e,n,r){if(t===e&&n===r)return Y;const s=i=>ae(i,0,1,t,n);return i=>i===0||i===1?i:Et(s(i),e,r)}const Rt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Pt=t=>e=>1-t(1-e),Nt=j(.33,1.53,.69,.99),dt=Pt(Nt),ce=Rt(dt),ue=t=>t>=1?1:(t*=2)<1?.5*dt(t):.5*(2-Math.pow(2,-10*(t-1))),pt=t=>1-Math.sin(Math.acos(t)),le=Pt(pt),fe=Rt(pt),he=j(.42,0,1,1),de=j(0,0,.58,1),Ot=j(.42,0,.58,1),pe=t=>Array.isArray(t)&&typeof t[0]!="number",me=t=>Array.isArray(t)&&typeof t[0]=="number",ge={linear:Y,easeIn:he,easeInOut:Ot,easeOut:de,circIn:pt,circInOut:fe,circOut:le,backIn:dt,backInOut:ce,backOut:Nt,anticipate:ue},ye=t=>typeof t=="string",Tt=t=>{if(me(t)){Ct(t.length===4);const[e,n,r,s]=t;return j(e,n,r,s)}else if(ye(t))return ge[t];return t},z=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function be(t,e){let n=new Set,r=new Set,s=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function u(c){o.has(c)&&(l.schedule(c),t()),c(a)}const l={schedule:(c,f=!1,d=!1)=>{const x=d&&s?n:r;return f&&o.add(c),x.add(c),c},cancel:c=>{r.delete(c),o.delete(c)},process:c=>{if(a=c,s){i=!0;return}s=!0;const f=n;n=r,r=f,n.forEach(u),n.clear(),s=!1,i&&(i=!1,l.process(c))}};return l}const Te=40;function ve(t,e){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=z.reduce((T,g)=>(T[g]=be(i),T),{}),{setup:a,read:u,resolveKeyframes:l,preUpdate:c,update:f,preRender:d,render:M,postRender:x}=o,m=()=>{const T=ft.useManualTiming,g=T?s.timestamp:performance.now();n=!1,T||(s.delta=r?1e3/60:Math.max(Math.min(g-s.timestamp,Te),1)),s.timestamp=g,s.isProcessing=!0,a.process(s),u.process(s),l.process(s),c.process(s),f.process(s),d.process(s),M.process(s),x.process(s),s.isProcessing=!1,n&&e&&(r=!1,t(m))},v=()=>{n=!0,r=!0,s.isProcessing||t(m)};return{schedule:z.reduce((T,g)=>{const y=o[g];return T[g]=(D,C=!1,b=!1)=>(n||v(),y.schedule(D,C,b)),T},{}),cancel:T=>{for(let g=0;g<z.length;g++)o[z[g]].cancel(T)},state:s,steps:o}}const{schedule:tt,cancel:Ut,state:J}=ve(typeof requestAnimationFrame<"u"?requestAnimationFrame:Y,!0);let Z;function xe(){Z=void 0}const V={now:()=>(Z===void 0&&V.set(J.isProcessing||ft.useManualTiming?J.timestamp:performance.now()),Z),set:t=>{Z=t,queueMicrotask(xe)}},Me=t=>e=>typeof e=="string"&&e.startsWith(t),Ae=Me("var(--"),De=t=>Ae(t)?Fe.test(t.split("/*")[0].trim()):!1,Fe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Kt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Gt={...Kt,transform:t=>U(0,1,t)},q=t=>Math.round(t*1e5)/1e5,Lt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Se(t){return t==null}const we=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,mt=(t,e)=>n=>!!(typeof n=="string"&&we.test(n)&&n.startsWith(t)||e&&!Se(n)&&Object.prototype.hasOwnProperty.call(n,e)),qt=(t,e,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,a]=r.match(Lt);return{[t]:parseFloat(s),[e]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},ke=t=>U(0,255,t),nt={...Kt,transform:t=>Math.round(ke(t))},O={test:mt("rgb","red"),parse:qt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+nt.transform(t)+", "+nt.transform(e)+", "+nt.transform(n)+", "+q(Gt.transform(r))+")"};function Ce(t){let e="",n="",r="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,r+=r,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const at={test:mt("#"),parse:Ce,transform:O.transform},Ve=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),vt=Ve("%"),G={test:mt("hsl","hue"),parse:qt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"Line truncated
@@ -1 +1 @@
import{u as y,r as o,j as e,Q as g,L as l,g as q,d as k,z as U}from"./index-C1LcEmdp.js";import{C as c}from"./CountUp-M8KqDP8n.js";import{u as w}from"./useTranslation-kIlHvV5e.js";function L(){const{t:s}=w(),{user:a,refreshUser:u}=y(),[t,b]=o.useState(null),[r,n]=o.useState(""),[i,x]=o.useState(!1),m=async()=>{try{const d=await q();d.data.success&&b(d.data.data)}catch{}};o.useEffect(()=>{m()},[]);const j=async d=>{if(d.preventDefault(),!!r.trim()){x(!0);try{(await k(r.trim())).data.success&&(U.success(s("dashboard.redeemSuccess")),n(""),await Promise.all([m(),u()]))}catch{}x(!1)}},p=(t==null?void 0:t.quota)??(a==null?void 0:a.quota)??0,h=(t==null?void 0:t.used_quota)??(a==null?void 0:a.used_quota)??0,N=(t==null?void 0:t.request_count)??(a==null?void 0:a.request_count)??0,f=p/g;return e.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-10",children:[e.jsxs("div",{className:"mb-8",children:[e.jsxs("h1",{className:"text-2xl font-heading font-bold text-page mb-1",children:[s("dashboard.welcome")," ",(a==null?void 0:a.display_name)||(a==null?void 0:a.username)||"User"]}),e.jsx("p",{className:"text-sm text-page-secondary",children:s("dashboard.manageDesc")})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-10",children:[e.jsxs("div",{className:"glass rounded-2xl p-6",children:[e.jsx("p",{className:"text-sm text-page-secondary mb-2",children:s("dashboard.balance")}),e.jsxs("div",{className:"text-3xl font-bold text-page",children:["$",e.jsx(c,{from:0,to:f,duration:1.5})]}),e.jsx("p",{className:"text-xs text-page-muted mt-1",children:s("dashboard.quotaUnits",{count:p.toLocaleString()})})]}),e.jsxs("div",{className:"glass rounded-2xl p-6",children:[e.jsx("p",{className:"text-sm text-page-secondary mb-2",children:s("dashboard.used")}),e.jsxs("div",{className:"text-3xl font-bold text-page",children:["$",e.jsx(c,{from:0,to:h/g,duration:1.5})]}),e.jsx("p",{className:"text-xs text-page-muted mt-1",children:s("dashboard.quotaUnits",{count:h.toLocaleString()})})]}),e.jsxs("div",{className:"glass rounded-2xl p-6",children:[e.jsx("p",{className:"text-sm text-page-secondary mb-2",children:s("dashboard.totalRequests")}),e.jsx("div",{className:"text-3xl font-bold text-page",children:e.jsx(c,{from:0,to:N,duration:1.5})})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"glass rounded-2xl p-6",children:[e.jsx("h2",{className:"text-lg font-semibold text-page mb-4",children:s("dashboard.redeemCode")}),e.jsxs("form",{onSubmit:j,className:"flex gap-3",children:[e.jsx("input",{type:"text",value:r,onChange:d=>n(d.target.value),className:"input flex-1",placeholder:s("dashboard.enterCode")}),e.jsx("button",{type:"submit",disabled:i,className:"btn-primary whitespace-nowrap",children:s(i?"dashboard.redeeming":"dashboard.redeem")})]})]}),e.jsxs("div",{className:"glass rounded-2xl p-6",children:[e.jsx("h2",{className:"text-lg font-semibold text-page mb-4",children:s("dashboard.quickLinks")}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs(l,{to:"/tokens",className:"glass-sm !rounded-xl px-4 py-3 hover:bg-page-surface-hover transition-colors group",children:[e.jsx("p",{className:"text-sm font-medium text-page group-hover:text-page-link transition-colors",children:s("dashboard.apiKeys")}),e.jsx("p",{className:"text-xs text-page-muted",children:s("dashboard.manageKeys")})]}),e.jsxs(l,{to:"/packages",className:"glass-sm !rounded-xl px-4 py-3 hover:bg-page-surface-hover transition-colors group",children:[e.jsx("p",{className:"text-sm font-medium text-page group-hover:text-page-link transition-colors",children:s("dashboard.packages")}),e.jsx("p",{className:"text-xs text-page-muted",children:s("dashboard.viewPlans")})]}),e.jsxs(l,{to:"/pricing",className:"glass-sm !rounded-xl px-4 py-3 hover:bg-page-surface-hover transition-colors group",children:[e.jsx("p",{className:"text-sm font-medium text-page group-hover:text-page-link transition-colors",children:s("dashboard.pricing")}),e.jsx("p",{className:"text-xs text-page-muted",children:s("dashboard.modelPrices")})]}),e.jsxs("div",{className:"glass-sm !rounded-xl px-4 py-3 opacity-50",children:[e.jsx("p",{className:"text-sm font-medium text-page",children:s("dashboard.apiDocs")}),e.jsx("p",{className:"text-xs text-page-muted",children:s("dashboard.comingSoon")})]})]})]})]})]})}export{L as default};
import{u as y,r as o,j as e,Q as g,L as l,g as q,d as k,z as U}from"./index-D8eKls75.js";import{C as c}from"./CountUp-BixuEoA6.js";import{u as w}from"./useTranslation-D_OVvIX9.js";function L(){const{t:s}=w(),{user:a,refreshUser:u}=y(),[t,b]=o.useState(null),[r,n]=o.useState(""),[i,x]=o.useState(!1),m=async()=>{try{const d=await q();d.data.success&&b(d.data.data)}catch{}};o.useEffect(()=>{m()},[]);const j=async d=>{if(d.preventDefault(),!!r.trim()){x(!0);try{(await k(r.trim())).data.success&&(U.success(s("dashboard.redeemSuccess")),n(""),await Promise.all([m(),u()]))}catch{}x(!1)}},p=(t==null?void 0:t.quota)??(a==null?void 0:a.quota)??0,h=(t==null?void 0:t.used_quota)??(a==null?void 0:a.used_quota)??0,N=(t==null?void 0:t.request_count)??(a==null?void 0:a.request_count)??0,f=p/g;return e.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-10",children:[e.jsxs("div",{className:"mb-8",children:[e.jsxs("h1",{className:"text-2xl font-heading font-bold text-page mb-1",children:[s("dashboard.welcome")," ",(a==null?void 0:a.display_name)||(a==null?void 0:a.username)||"User"]}),e.jsx("p",{className:"text-sm text-page-secondary",children:s("dashboard.manageDesc")})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-10",children:[e.jsxs("div",{className:"glass rounded-2xl p-6",children:[e.jsx("p",{className:"text-sm text-page-secondary mb-2",children:s("dashboard.balance")}),e.jsxs("div",{className:"text-3xl font-bold text-page",children:["$",e.jsx(c,{from:0,to:f,duration:1.5})]}),e.jsx("p",{className:"text-xs text-page-muted mt-1",children:s("dashboard.quotaUnits",{count:p.toLocaleString()})})]}),e.jsxs("div",{className:"glass rounded-2xl p-6",children:[e.jsx("p",{className:"text-sm text-page-secondary mb-2",children:s("dashboard.used")}),e.jsxs("div",{className:"text-3xl font-bold text-page",children:["$",e.jsx(c,{from:0,to:h/g,duration:1.5})]}),e.jsx("p",{className:"text-xs text-page-muted mt-1",children:s("dashboard.quotaUnits",{count:h.toLocaleString()})})]}),e.jsxs("div",{className:"glass rounded-2xl p-6",children:[e.jsx("p",{className:"text-sm text-page-secondary mb-2",children:s("dashboard.totalRequests")}),e.jsx("div",{className:"text-3xl font-bold text-page",children:e.jsx(c,{from:0,to:N,duration:1.5})})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"glass rounded-2xl p-6",children:[e.jsx("h2",{className:"text-lg font-semibold text-page mb-4",children:s("dashboard.redeemCode")}),e.jsxs("form",{onSubmit:j,className:"flex gap-3",children:[e.jsx("input",{type:"text",value:r,onChange:d=>n(d.target.value),className:"input flex-1",placeholder:s("dashboard.enterCode")}),e.jsx("button",{type:"submit",disabled:i,className:"btn-primary whitespace-nowrap",children:s(i?"dashboard.redeeming":"dashboard.redeem")})]})]}),e.jsxs("div",{className:"glass rounded-2xl p-6",children:[e.jsx("h2",{className:"text-lg font-semibold text-page mb-4",children:s("dashboard.quickLinks")}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs(l,{to:"/tokens",className:"glass-sm !rounded-xl px-4 py-3 hover:bg-page-surface-hover transition-colors group",children:[e.jsx("p",{className:"text-sm font-medium text-page group-hover:text-page-link transition-colors",children:s("dashboard.apiKeys")}),e.jsx("p",{className:"text-xs text-page-muted",children:s("dashboard.manageKeys")})]}),e.jsxs(l,{to:"/packages",className:"glass-sm !rounded-xl px-4 py-3 hover:bg-page-surface-hover transition-colors group",children:[e.jsx("p",{className:"text-sm font-medium text-page group-hover:text-page-link transition-colors",children:s("dashboard.packages")}),e.jsx("p",{className:"text-xs text-page-muted",children:s("dashboard.viewPlans")})]}),e.jsxs(l,{to:"/pricing",className:"glass-sm !rounded-xl px-4 py-3 hover:bg-page-surface-hover transition-colors group",children:[e.jsx("p",{className:"text-sm font-medium text-page group-hover:text-page-link transition-colors",children:s("dashboard.pricing")}),e.jsx("p",{className:"text-xs text-page-muted",children:s("dashboard.modelPrices")})]}),e.jsxs("div",{className:"glass-sm !rounded-xl px-4 py-3 opacity-50",children:[e.jsx("p",{className:"text-sm font-medium text-page",children:s("dashboard.apiDocs")}),e.jsx("p",{className:"text-xs text-page-muted",children:s("dashboard.comingSoon")})]})]})]})]})]})}export{L as default};
@@ -1 +1 @@
import{r as n,j as b}from"./index-C1LcEmdp.js";const $=({children:c,blur:f=!1,duration:e=800,delay:t=0,threshold:o=.1,initialOpacity:l=0,className:u="",...m})=>{const i=n.useRef(null),[s,p]=n.useState(!1);return n.useEffect(()=>{const a=i.current;if(!a)return;const r=new IntersectionObserver(([x])=>{x.isIntersecting&&(p(!0),r.disconnect())},{threshold:o});return r.observe(a),()=>r.disconnect()},[o]),b.jsx("div",{ref:i,className:u,style:{opacity:s?1:l,filter:f?s?"blur(0px)":"blur(10px)":void 0,transform:s?"translateY(0)":"translateY(20px)",transition:`opacity ${e}ms ease-out ${t}ms, filter ${e}ms ease-out ${t}ms, transform ${e}ms ease-out ${t}ms`,willChange:"opacity, filter, transform"},...m,children:c})};export{$ as F};
import{r as n,j as b}from"./index-D8eKls75.js";const $=({children:c,blur:f=!1,duration:e=800,delay:t=0,threshold:o=.1,initialOpacity:l=0,className:u="",...m})=>{const i=n.useRef(null),[s,p]=n.useState(!1);return n.useEffect(()=>{const a=i.current;if(!a)return;const r=new IntersectionObserver(([x])=>{x.isIntersecting&&(p(!0),r.disconnect())},{threshold:o});return r.observe(a),()=>r.disconnect()},[o]),b.jsx("div",{ref:i,className:u,style:{opacity:s?1:l,filter:f?s?"blur(0px)":"blur(10px)":void 0,transform:s?"translateY(0)":"translateY(20px)",transition:`opacity ${e}ms ease-out ${t}ms, filter ${e}ms ease-out ${t}ms, transform ${e}ms ease-out ${t}ms`,willChange:"opacity, filter, transform"},...m,children:c})};export{$ as F};
@@ -1 +1 @@
import{u as D,a as g,r as d,f,l as N,j as e,L as l,Q as v}from"./index-C1LcEmdp.js";import{c as y,R as E}from"./RotatingEquiv-ByYi0mto.js";import{C as c}from"./CountUp-M8KqDP8n.js";import{F as r}from"./FadeContent-CEb-jr-E.js";import{u as w}from"./useTranslation-kIlHvV5e.js";function P(){const{t}=w(),{user:i}=D(),{site:n}=g(),[u,p]=d.useState([]),[x,j]=d.useState([]);d.useEffect(()=>{f().then(s=>{s.data.success&&p(s.data.data||[])}).catch(()=>{}),N().then(s=>{s.data.success&&j(s.data.data||[])}).catch(()=>{})},[]);const o=u.filter(s=>s.enabled!==!1);return e.jsxs("div",{children:[e.jsxs("section",{className:"max-w-5xl mx-auto px-6 pt-32 pb-20",children:[e.jsx(r,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"max-w-3xl",children:[e.jsx("h1",{className:"text-5xl md:text-6xl font-heading font-bold text-[#3D3024] leading-[1.1] tracking-tight",children:(n==null?void 0:n.name)||t("home.defaultHeroTitle")}),e.jsx("p",{className:"text-lg text-[#6B5D4F] mt-6 leading-relaxed max-w-xl",children:t("home.heroSubtitle")}),e.jsx("div",{className:"flex items-center gap-4 mt-10",children:i?e.jsxs(l,{to:"/dashboard",className:"px-7 py-3 rounded-full bg-[#D97757] text-white font-medium text-sm hover:bg-[#C4613F] transition-colors",children:[t("home.goToDashboard")," →"]}):e.jsxs(e.Fragment,{children:[e.jsx(l,{to:"/register",className:"px-7 py-3 rounded-full bg-[#D97757] text-white font-medium text-sm hover:bg-[#C4613F] transition-colors",children:t("home.getStarted")}),e.jsxs(l,{to:"/pricing",className:"px-7 py-3 text-[#8B7D6E] font-medium text-sm hover:text-[#3D3024] transition-colors",children:[t("home.viewPricing")," →"]})]})})]})}),e.jsx(r,{blur:!0,duration:800,delay:400,children:e.jsxs("div",{className:"flex items-center gap-12 mt-20 pt-10 border-t border-[#E8DDD0]",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-[#3D3024]",children:[e.jsx(c,{from:0,to:o.length||50,duration:2}),"+"]}),e.jsx("p",{className:"text-sm text-[#8B7D6E] mt-0.5",children:t("home.aiModels")})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-[#3D3024]",children:[e.jsx(c,{from:0,to:99.9,duration:2.5}),"%"]}),e.jsx("p",{className:"text-sm text-[#8B7D6E] mt-0.5",children:t("home.uptime")})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-[#3D3024]",children:["<",e.jsx(c,{from:200,to:50,duration:2,direction:"down"}),"ms"]}),e.jsx("p",{className:"text-sm text-[#8B7D6E] mt-0.5",children:t("home.latency")})]})]})})]}),e.jsx("section",{className:"bg-[#F5EEE6]",children:e.jsx("div",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(r,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-[#3D3024] mb-2",children:t("home.whyChooseUs")}),e.jsx("p",{className:"text-[#8B7D6E] mb-10",children:t("home.whyChooseUsDesc")}),e.jsx("div",{className:"space-y-0",children:[{title:t("home.lightningFast"),desc:t("home.lightningFastDesc")},{title:t("home.securePrivate"),desc:t("home.securePrivateDesc")},{title:t("home.payAsYouGo"),desc:t("home.payAsYouGoDesc")}].map((s,a)=>e.jsxs("div",{className:"flex gap-6 items-start py-6 border-b border-[#E8DDD0] last:border-0 group",children:[e.jsxs("span",{className:"text-sm font-mono text-[#D97757]/50 mt-0.5",children:["0",a+1]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-semibold text-[#3D3024] mb-1 group-hover:text-[#D97757] transition-colors",children:s.title}),e.jsx("p",{className:"text-sm text-[#6B5D4F] leading-relaxed max-w-lg",children:s.desc})]})]},a))})]})})}),o.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(r,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"flex items-end justify-between mb-8",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-[#3D3024] mb-2",children:t("home.availableModels")}),e.jsx("p",{className:"text-[#8B7D6E]",children:t("home.availableModelsDesc",{count:o.length})})]}),o.length>8&&e.jsxs(l,{to:"/pricing",className:"text-sm text-[#D97757] hover:text-[#C4613F] transition-colors",children:[t("home.viewAllModels",{count:o.length})," →"]})]}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2",children:o.slice(0,8).map((s,a)=>e.jsx("div",{className:"px-4 py-3 rounded-lg border border-[#E8DDD0] hover:border-[#D9C5B2] transition-colors",children:e.jsx("span",{className:"text-sm text-[#6B5D4F] font-mono",children:s.display_name||s.model_name})},s.id||a))})]})}),x.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(r,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-[#3D3024] mb-2",children:t("home.plansPackages")}),e.jsx("p",{className:"text-[#8B7D6E] mb-10",children:t("home.choosePlan")}),e.jsx("div",{className:"grid md:grid-cols-3 gap-4 max-w-4xl",children:x.filter(s=>s.enabled).slice(0,3).map((s,a)=>{const b=s.quota_amount>0?s.quotaLine truncated
import{u as D,a as g,r as d,f,l as N,j as e,L as l,Q as v}from"./index-D8eKls75.js";import{c as y,R as E}from"./RotatingEquiv-DkCC_t4y.js";import{C as c}from"./CountUp-BixuEoA6.js";import{F as r}from"./FadeContent-B3Mc1Ysf.js";import{u as w}from"./useTranslation-D_OVvIX9.js";function P(){const{t}=w(),{user:i}=D(),{site:n}=g(),[u,p]=d.useState([]),[x,j]=d.useState([]);d.useEffect(()=>{f().then(s=>{s.data.success&&p(s.data.data||[])}).catch(()=>{}),N().then(s=>{s.data.success&&j(s.data.data||[])}).catch(()=>{})},[]);const o=u.filter(s=>s.enabled!==!1);return e.jsxs("div",{children:[e.jsxs("section",{className:"max-w-5xl mx-auto px-6 pt-32 pb-20",children:[e.jsx(r,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"max-w-3xl",children:[e.jsx("h1",{className:"text-5xl md:text-6xl font-heading font-bold text-[#3D3024] leading-[1.1] tracking-tight",children:(n==null?void 0:n.name)||t("home.defaultHeroTitle")}),e.jsx("p",{className:"text-lg text-[#6B5D4F] mt-6 leading-relaxed max-w-xl",children:t("home.heroSubtitle")}),e.jsx("div",{className:"flex items-center gap-4 mt-10",children:i?e.jsxs(l,{to:"/dashboard",className:"px-7 py-3 rounded-full bg-[#D97757] text-white font-medium text-sm hover:bg-[#C4613F] transition-colors",children:[t("home.goToDashboard")," →"]}):e.jsxs(e.Fragment,{children:[e.jsx(l,{to:"/register",className:"px-7 py-3 rounded-full bg-[#D97757] text-white font-medium text-sm hover:bg-[#C4613F] transition-colors",children:t("home.getStarted")}),e.jsxs(l,{to:"/pricing",className:"px-7 py-3 text-[#8B7D6E] font-medium text-sm hover:text-[#3D3024] transition-colors",children:[t("home.viewPricing")," →"]})]})})]})}),e.jsx(r,{blur:!0,duration:800,delay:400,children:e.jsxs("div",{className:"flex items-center gap-12 mt-20 pt-10 border-t border-[#E8DDD0]",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-[#3D3024]",children:[e.jsx(c,{from:0,to:o.length||50,duration:2}),"+"]}),e.jsx("p",{className:"text-sm text-[#8B7D6E] mt-0.5",children:t("home.aiModels")})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-[#3D3024]",children:[e.jsx(c,{from:0,to:99.9,duration:2.5}),"%"]}),e.jsx("p",{className:"text-sm text-[#8B7D6E] mt-0.5",children:t("home.uptime")})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-[#3D3024]",children:["<",e.jsx(c,{from:200,to:50,duration:2,direction:"down"}),"ms"]}),e.jsx("p",{className:"text-sm text-[#8B7D6E] mt-0.5",children:t("home.latency")})]})]})})]}),e.jsx("section",{className:"bg-[#F5EEE6]",children:e.jsx("div",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(r,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-[#3D3024] mb-2",children:t("home.whyChooseUs")}),e.jsx("p",{className:"text-[#8B7D6E] mb-10",children:t("home.whyChooseUsDesc")}),e.jsx("div",{className:"space-y-0",children:[{title:t("home.lightningFast"),desc:t("home.lightningFastDesc")},{title:t("home.securePrivate"),desc:t("home.securePrivateDesc")},{title:t("home.payAsYouGo"),desc:t("home.payAsYouGoDesc")}].map((s,a)=>e.jsxs("div",{className:"flex gap-6 items-start py-6 border-b border-[#E8DDD0] last:border-0 group",children:[e.jsxs("span",{className:"text-sm font-mono text-[#D97757]/50 mt-0.5",children:["0",a+1]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-semibold text-[#3D3024] mb-1 group-hover:text-[#D97757] transition-colors",children:s.title}),e.jsx("p",{className:"text-sm text-[#6B5D4F] leading-relaxed max-w-lg",children:s.desc})]})]},a))})]})})}),o.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(r,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"flex items-end justify-between mb-8",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-[#3D3024] mb-2",children:t("home.availableModels")}),e.jsx("p",{className:"text-[#8B7D6E]",children:t("home.availableModelsDesc",{count:o.length})})]}),o.length>8&&e.jsxs(l,{to:"/pricing",className:"text-sm text-[#D97757] hover:text-[#C4613F] transition-colors",children:[t("home.viewAllModels",{count:o.length})," →"]})]}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2",children:o.slice(0,8).map((s,a)=>e.jsx("div",{className:"px-4 py-3 rounded-lg border border-[#E8DDD0] hover:border-[#D9C5B2] transition-colors",children:e.jsx("span",{className:"text-sm text-[#6B5D4F] font-mono",children:s.display_name||s.model_name})},s.id||a))})]})}),x.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(r,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-[#3D3024] mb-2",children:t("home.plansPackages")}),e.jsx("p",{className:"text-[#8B7D6E] mb-10",children:t("home.choosePlan")}),e.jsx("div",{className:"grid md:grid-cols-3 gap-4 max-w-4xl",children:x.filter(s=>s.enabled).slice(0,3).map((s,a)=>{const b=s.quota_amount>0?s.quotaLine truncated
@@ -1 +1 @@
import{u as g,a as f,r as d,f as N,l as v,j as e,L as l,Q as y}from"./index-C1LcEmdp.js";import{c as w,R as D}from"./RotatingEquiv-ByYi0mto.js";import{C as c}from"./CountUp-M8KqDP8n.js";import{F as o}from"./FadeContent-CEb-jr-E.js";import{u as S}from"./useTranslation-kIlHvV5e.js";function k(){const{t}=S(),{user:n}=g(),{site:i}=f(),[u,b]=d.useState([]),[m,p]=d.useState([]);d.useEffect(()=>{N().then(s=>{s.data.success&&b(s.data.data||[])}).catch(()=>{}),v().then(s=>{s.data.success&&p(s.data.data||[])}).catch(()=>{})},[]);const r=u.filter(s=>s.enabled!==!1);return e.jsxs("div",{className:"relative",children:[e.jsxs("section",{className:"max-w-5xl mx-auto px-6 pt-32 pb-24",children:[e.jsx(o,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"max-w-3xl",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full border border-emerald-500/20 mb-8",children:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500"}),e.jsx("span",{className:"text-xs text-emerald-400/80 font-medium tracking-wide",children:t("home.heroTagline")||"All Systems Operational"})]}),e.jsx("h1",{className:"text-5xl md:text-6xl font-heading font-bold text-white leading-[1.1] tracking-tight",children:(i==null?void 0:i.name)||t("home.defaultHeroTitle")}),e.jsx("p",{className:"text-lg text-neutral-400 mt-6 leading-relaxed max-w-xl",children:t("home.heroSubtitle")}),e.jsx("div",{className:"flex items-center gap-4 mt-10",children:n?e.jsxs(l,{to:"/dashboard",className:"px-7 py-3 rounded-lg bg-emerald-500 text-black font-semibold text-sm hover:bg-emerald-400 transition-colors",children:[t("home.goToDashboard")," →"]}):e.jsxs(e.Fragment,{children:[e.jsx(l,{to:"/register",className:"px-7 py-3 rounded-lg bg-emerald-500 text-black font-semibold text-sm hover:bg-emerald-400 transition-colors",children:t("home.getStarted")}),e.jsxs(l,{to:"/pricing",className:"px-7 py-3 text-neutral-400 font-medium text-sm hover:text-white transition-colors",children:[t("home.viewPricing")," →"]})]})})]})}),e.jsx(o,{blur:!0,duration:800,delay:400,children:e.jsxs("div",{className:"flex items-center gap-12 mt-20 border-t border-neutral-800 pt-10",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-emerald-400",children:[e.jsx(c,{from:0,to:r.length||50,duration:2}),"+"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:t("home.aiModels")})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:[e.jsx(c,{from:0,to:99.9,duration:2.5}),"%"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:t("home.uptime")})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:["<",e.jsx(c,{from:200,to:50,duration:2,direction:"down"}),"ms"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:t("home.latency")})]})]})})]}),e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(o,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-2",children:t("home.whyChooseUs")}),e.jsx("p",{className:"text-neutral-500 mb-10",children:t("home.whyChooseUsDesc")}),e.jsx("div",{className:"space-y-0",children:[{title:t("home.lightningFast"),desc:t("home.lightningFastDesc"),accent:"emerald"},{title:t("home.securePrivate"),desc:t("home.securePrivateDesc"),accent:"cyan"},{title:t("home.payAsYouGo"),desc:t("home.payAsYouGoDesc"),accent:"violet"}].map((s,a)=>e.jsxs("div",{className:"flex gap-6 items-start py-6 border-b border-neutral-800/60 last:border-0 group",children:[e.jsxs("span",{className:`text-sm font-mono text-${s.accent}-500/60 mt-0.5`,children:["0",a+1]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-semibold text-white mb-1 group-hover:text-neutral-300 transition-colors",children:s.title}),e.jsx("p",{className:"text-sm text-neutral-500 leading-relaxed max-w-lg",children:s.desc})]})]},a))})]})}),r.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(o,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"flex items-end justify-between mb-8",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-2",children:t("home.availableModels")}),e.jsx("p",{className:"text-neutral-500",children:t("home.availableModelsDesc",{count:r.length})})]}),r.length>8&&e.jsxs(l,{to:"/pricing",className:"text-sm text-emerald-400 hover:text-emerald-300 transition-colors",children:[t("home.viewAllModels",{count:r.length})," →"]})]}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2",children:r.slice(0,8).map((s,a)=>e.jsx("div",{className:"px-4 py-3 rounded-lg border border-neutral-800/60 hover:border-emerald-500/20 transition-colors group",children:e.jsx("span",{className:"text-sm text-neutral-400 font-mono group-hover:text-neutral-300 transition-colors truncate block",children:s.display_name||s.model_name})},s.id||a))})]})}),m.lengtLine truncated
import{u as g,a as f,r as d,f as N,l as v,j as e,L as l,Q as y}from"./index-D8eKls75.js";import{c as w,R as D}from"./RotatingEquiv-DkCC_t4y.js";import{C as c}from"./CountUp-BixuEoA6.js";import{F as o}from"./FadeContent-B3Mc1Ysf.js";import{u as S}from"./useTranslation-D_OVvIX9.js";function k(){const{t}=S(),{user:n}=g(),{site:i}=f(),[u,b]=d.useState([]),[m,p]=d.useState([]);d.useEffect(()=>{N().then(s=>{s.data.success&&b(s.data.data||[])}).catch(()=>{}),v().then(s=>{s.data.success&&p(s.data.data||[])}).catch(()=>{})},[]);const r=u.filter(s=>s.enabled!==!1);return e.jsxs("div",{className:"relative",children:[e.jsxs("section",{className:"max-w-5xl mx-auto px-6 pt-32 pb-24",children:[e.jsx(o,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"max-w-3xl",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full border border-emerald-500/20 mb-8",children:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500"}),e.jsx("span",{className:"text-xs text-emerald-400/80 font-medium tracking-wide",children:t("home.heroTagline")||"All Systems Operational"})]}),e.jsx("h1",{className:"text-5xl md:text-6xl font-heading font-bold text-white leading-[1.1] tracking-tight",children:(i==null?void 0:i.name)||t("home.defaultHeroTitle")}),e.jsx("p",{className:"text-lg text-neutral-400 mt-6 leading-relaxed max-w-xl",children:t("home.heroSubtitle")}),e.jsx("div",{className:"flex items-center gap-4 mt-10",children:n?e.jsxs(l,{to:"/dashboard",className:"px-7 py-3 rounded-lg bg-emerald-500 text-black font-semibold text-sm hover:bg-emerald-400 transition-colors",children:[t("home.goToDashboard")," →"]}):e.jsxs(e.Fragment,{children:[e.jsx(l,{to:"/register",className:"px-7 py-3 rounded-lg bg-emerald-500 text-black font-semibold text-sm hover:bg-emerald-400 transition-colors",children:t("home.getStarted")}),e.jsxs(l,{to:"/pricing",className:"px-7 py-3 text-neutral-400 font-medium text-sm hover:text-white transition-colors",children:[t("home.viewPricing")," →"]})]})})]})}),e.jsx(o,{blur:!0,duration:800,delay:400,children:e.jsxs("div",{className:"flex items-center gap-12 mt-20 border-t border-neutral-800 pt-10",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-emerald-400",children:[e.jsx(c,{from:0,to:r.length||50,duration:2}),"+"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:t("home.aiModels")})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:[e.jsx(c,{from:0,to:99.9,duration:2.5}),"%"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:t("home.uptime")})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:["<",e.jsx(c,{from:200,to:50,duration:2,direction:"down"}),"ms"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:t("home.latency")})]})]})})]}),e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(o,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-2",children:t("home.whyChooseUs")}),e.jsx("p",{className:"text-neutral-500 mb-10",children:t("home.whyChooseUsDesc")}),e.jsx("div",{className:"space-y-0",children:[{title:t("home.lightningFast"),desc:t("home.lightningFastDesc"),accent:"emerald"},{title:t("home.securePrivate"),desc:t("home.securePrivateDesc"),accent:"cyan"},{title:t("home.payAsYouGo"),desc:t("home.payAsYouGoDesc"),accent:"violet"}].map((s,a)=>e.jsxs("div",{className:"flex gap-6 items-start py-6 border-b border-neutral-800/60 last:border-0 group",children:[e.jsxs("span",{className:`text-sm font-mono text-${s.accent}-500/60 mt-0.5`,children:["0",a+1]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-semibold text-white mb-1 group-hover:text-neutral-300 transition-colors",children:s.title}),e.jsx("p",{className:"text-sm text-neutral-500 leading-relaxed max-w-lg",children:s.desc})]})]},a))})]})}),r.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(o,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"flex items-end justify-between mb-8",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-2",children:t("home.availableModels")}),e.jsx("p",{className:"text-neutral-500",children:t("home.availableModelsDesc",{count:r.length})})]}),r.length>8&&e.jsxs(l,{to:"/pricing",className:"text-sm text-emerald-400 hover:text-emerald-300 transition-colors",children:[t("home.viewAllModels",{count:r.length})," →"]})]}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2",children:r.slice(0,8).map((s,a)=>e.jsx("div",{className:"px-4 py-3 rounded-lg border border-neutral-800/60 hover:border-emerald-500/20 transition-colors group",children:e.jsx("span",{className:"text-sm text-neutral-400 font-mono group-hover:text-neutral-300 transition-colors truncate block",children:s.display_name||s.model_name})},s.id||a))})]})}),m.lengtLine truncated
@@ -1 +1 @@
import{u as b,a as g,r as d,f,l as N,j as e,L as a,Q as v}from"./index-C1LcEmdp.js";import{c as w,R as y}from"./RotatingEquiv-ByYi0mto.js";import{C as c}from"./CountUp-M8KqDP8n.js";import{F as n}from"./FadeContent-CEb-jr-E.js";import{u as D}from"./useTranslation-kIlHvV5e.js";function E(){const{t}=D(),{user:o}=b(),{site:i}=g(),[u,j]=d.useState([]),[x,p]=d.useState([]);d.useEffect(()=>{f().then(s=>{s.data.success&&j(s.data.data||[])}).catch(()=>{}),N().then(s=>{s.data.success&&p(s.data.data||[])}).catch(()=>{})},[]);const l=u.filter(s=>s.enabled!==!1);return e.jsxs("div",{className:"relative",children:[e.jsxs("section",{className:"max-w-5xl mx-auto px-6 pt-32 pb-24",children:[e.jsx(n,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"max-w-3xl",children:[e.jsx("h1",{className:"text-5xl md:text-6xl font-heading font-bold text-white leading-[1.1] tracking-tight",children:(i==null?void 0:i.name)||t("home.defaultHeroTitle")}),e.jsx("p",{className:"text-lg text-neutral-400 mt-6 leading-relaxed max-w-xl",children:t("home.heroSubtitle")}),e.jsx("div",{className:"flex items-center gap-4 mt-10",children:o?e.jsxs(a,{to:"/dashboard",className:"px-7 py-3 rounded-lg bg-white text-neutral-900 font-medium text-sm hover:bg-neutral-200 transition-colors",children:[t("home.goToDashboard")," →"]}):e.jsxs(e.Fragment,{children:[e.jsxs(a,{to:"/register",className:"px-7 py-3 rounded-lg bg-white text-neutral-900 font-medium text-sm hover:bg-neutral-200 transition-colors",children:[t("home.getStarted")," →"]}),e.jsx(a,{to:"/pricing",className:"px-7 py-3 text-neutral-400 font-medium text-sm hover:text-white transition-colors",children:t("home.viewPricing")})]})})]})}),e.jsx(n,{blur:!0,duration:800,delay:400,children:e.jsxs("div",{className:"flex items-center gap-12 mt-20 border-t border-neutral-800 pt-10",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:[e.jsx(c,{from:0,to:l.length||50,duration:2}),"+"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:t("home.aiModels")})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:[e.jsx(c,{from:0,to:99.9,duration:2.5}),"%"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:t("home.uptime")})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:["<",e.jsx(c,{from:200,to:50,duration:2,direction:"down"}),"ms"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:t("home.latency")})]})]})})]}),e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(n,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-2",children:t("home.whyChooseUs")}),e.jsx("p",{className:"text-neutral-500 mb-10",children:t("home.whyChooseUsDesc")}),e.jsx("div",{className:"space-y-6",children:[{title:t("home.lightningFast"),desc:t("home.lightningFastDesc")},{title:t("home.securePrivate"),desc:t("home.securePrivateDesc")},{title:t("home.payAsYouGo"),desc:t("home.payAsYouGoDesc")}].map((s,r)=>e.jsxs("div",{className:"flex gap-6 items-start py-6 border-b border-neutral-800/60 last:border-0 group",children:[e.jsxs("span",{className:"text-sm font-mono text-neutral-600 mt-0.5",children:["0",r+1]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-semibold text-white mb-1 group-hover:text-neutral-300 transition-colors",children:s.title}),e.jsx("p",{className:"text-sm text-neutral-500 leading-relaxed max-w-lg",children:s.desc})]})]},r))})]})}),l.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(n,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"flex items-end justify-between mb-8",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-2",children:t("home.availableModels")}),e.jsx("p",{className:"text-neutral-500",children:t("home.availableModelsDesc",{count:l.length})})]}),l.length>8&&e.jsxs(a,{to:"/pricing",className:"text-sm text-neutral-400 hover:text-white transition-colors",children:[t("home.viewAllModels",{count:l.length})," →"]})]}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2",children:l.slice(0,8).map((s,r)=>e.jsx("div",{className:"px-4 py-3 rounded-lg border border-neutral-800/60 hover:border-neutral-700 transition-colors",children:e.jsx("span",{className:"text-sm text-neutral-300 font-mono",children:s.display_name||s.model_name})},s.id||r))})]})}),x.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(n,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-2",children:t("home.plansPackages")}),e.jsx("p",{className:"text-neutral-500 mb-10",children:t("home.choosePlan")}),e.jsx("div",{className:"grid md:grid-cols-3 gap-4 max-w-4xl",children:x.filter(s=>s.enabled).slice(0,3).map(s=>{const r=s.quota_amount>0?s.quota_amount/v:0,m=w(l,r);return e.jLine truncated
import{u as b,a as g,r as d,f,l as N,j as e,L as a,Q as v}from"./index-D8eKls75.js";import{c as w,R as y}from"./RotatingEquiv-DkCC_t4y.js";import{C as c}from"./CountUp-BixuEoA6.js";import{F as n}from"./FadeContent-B3Mc1Ysf.js";import{u as D}from"./useTranslation-D_OVvIX9.js";function E(){const{t}=D(),{user:o}=b(),{site:i}=g(),[u,j]=d.useState([]),[x,p]=d.useState([]);d.useEffect(()=>{f().then(s=>{s.data.success&&j(s.data.data||[])}).catch(()=>{}),N().then(s=>{s.data.success&&p(s.data.data||[])}).catch(()=>{})},[]);const l=u.filter(s=>s.enabled!==!1);return e.jsxs("div",{className:"relative",children:[e.jsxs("section",{className:"max-w-5xl mx-auto px-6 pt-32 pb-24",children:[e.jsx(n,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"max-w-3xl",children:[e.jsx("h1",{className:"text-5xl md:text-6xl font-heading font-bold text-white leading-[1.1] tracking-tight",children:(i==null?void 0:i.name)||t("home.defaultHeroTitle")}),e.jsx("p",{className:"text-lg text-neutral-400 mt-6 leading-relaxed max-w-xl",children:t("home.heroSubtitle")}),e.jsx("div",{className:"flex items-center gap-4 mt-10",children:o?e.jsxs(a,{to:"/dashboard",className:"px-7 py-3 rounded-lg bg-white text-neutral-900 font-medium text-sm hover:bg-neutral-200 transition-colors",children:[t("home.goToDashboard")," →"]}):e.jsxs(e.Fragment,{children:[e.jsxs(a,{to:"/register",className:"px-7 py-3 rounded-lg bg-white text-neutral-900 font-medium text-sm hover:bg-neutral-200 transition-colors",children:[t("home.getStarted")," →"]}),e.jsx(a,{to:"/pricing",className:"px-7 py-3 text-neutral-400 font-medium text-sm hover:text-white transition-colors",children:t("home.viewPricing")})]})})]})}),e.jsx(n,{blur:!0,duration:800,delay:400,children:e.jsxs("div",{className:"flex items-center gap-12 mt-20 border-t border-neutral-800 pt-10",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:[e.jsx(c,{from:0,to:l.length||50,duration:2}),"+"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:t("home.aiModels")})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:[e.jsx(c,{from:0,to:99.9,duration:2.5}),"%"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:t("home.uptime")})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:["<",e.jsx(c,{from:200,to:50,duration:2,direction:"down"}),"ms"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:t("home.latency")})]})]})})]}),e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(n,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-2",children:t("home.whyChooseUs")}),e.jsx("p",{className:"text-neutral-500 mb-10",children:t("home.whyChooseUsDesc")}),e.jsx("div",{className:"space-y-6",children:[{title:t("home.lightningFast"),desc:t("home.lightningFastDesc")},{title:t("home.securePrivate"),desc:t("home.securePrivateDesc")},{title:t("home.payAsYouGo"),desc:t("home.payAsYouGoDesc")}].map((s,r)=>e.jsxs("div",{className:"flex gap-6 items-start py-6 border-b border-neutral-800/60 last:border-0 group",children:[e.jsxs("span",{className:"text-sm font-mono text-neutral-600 mt-0.5",children:["0",r+1]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-semibold text-white mb-1 group-hover:text-neutral-300 transition-colors",children:s.title}),e.jsx("p",{className:"text-sm text-neutral-500 leading-relaxed max-w-lg",children:s.desc})]})]},r))})]})}),l.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(n,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"flex items-end justify-between mb-8",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-2",children:t("home.availableModels")}),e.jsx("p",{className:"text-neutral-500",children:t("home.availableModelsDesc",{count:l.length})})]}),l.length>8&&e.jsxs(a,{to:"/pricing",className:"text-sm text-neutral-400 hover:text-white transition-colors",children:[t("home.viewAllModels",{count:l.length})," →"]})]}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2",children:l.slice(0,8).map((s,r)=>e.jsx("div",{className:"px-4 py-3 rounded-lg border border-neutral-800/60 hover:border-neutral-700 transition-colors",children:e.jsx("span",{className:"text-sm text-neutral-300 font-mono",children:s.display_name||s.model_name})},s.id||r))})]})}),x.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(n,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-2",children:t("home.plansPackages")}),e.jsx("p",{className:"text-neutral-500 mb-10",children:t("home.choosePlan")}),e.jsx("div",{className:"grid md:grid-cols-3 gap-4 max-w-4xl",children:x.filter(s=>s.enabled).slice(0,3).map(s=>{const r=s.quota_amount>0?s.quota_amount/v:0,m=w(l,r);return e.jLine truncated
@@ -1 +1 @@
import{u as j,a as g,r as d,f as v,l as f,j as e,L as l,Q as w}from"./index-C1LcEmdp.js";import{c as N,R as y}from"./RotatingEquiv-ByYi0mto.js";import{C as k}from"./CountUp-M8KqDP8n.js";import{F as r}from"./FadeContent-CEb-jr-E.js";import{u as M}from"./useTranslation-kIlHvV5e.js";function P(){const{t:s}=M(),{user:i}=j(),{site:n}=g(),[h,u]=d.useState([]),[c,b]=d.useState([]);d.useEffect(()=>{v().then(t=>{t.data.success&&u(t.data.data||[])}).catch(()=>{}),f().then(t=>{t.data.success&&b(t.data.data||[])}).catch(()=>{})},[]);const o=h.filter(t=>t.enabled!==!1);return e.jsxs("div",{className:"relative",children:[e.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[e.jsx("div",{className:"absolute -top-40 left-1/4 w-[600px] h-[600px] bg-violet-600/10 rounded-full blur-3xl"}),e.jsx("div",{className:"absolute top-20 right-1/4 w-[400px] h-[400px] bg-blue-600/8 rounded-full blur-3xl"})]}),e.jsxs("section",{className:"relative max-w-5xl mx-auto px-6 pt-32 pb-20",children:[e.jsx(r,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"text-center max-w-3xl mx-auto",children:[e.jsx("h1",{className:"text-5xl md:text-7xl font-heading font-extrabold text-white leading-[1.08] tracking-tight",children:(n==null?void 0:n.name)||s("home.defaultHeroTitle")}),e.jsx("p",{className:"text-lg text-neutral-400 mt-6 leading-relaxed max-w-xl mx-auto",children:s("home.heroSubtitle")}),e.jsx("div",{className:"flex items-center justify-center gap-4 mt-10",children:i?e.jsx(l,{to:"/dashboard",className:"px-8 py-3.5 rounded-2xl bg-white text-black font-semibold text-sm hover:bg-neutral-100 transition-all",children:s("home.goToDashboard")}):e.jsxs(e.Fragment,{children:[e.jsx(l,{to:"/register",className:"px-8 py-3.5 rounded-2xl bg-white text-black font-semibold text-sm hover:bg-neutral-100 transition-all",children:s("home.getStarted")}),e.jsx(l,{to:"/pricing",className:"px-8 py-3.5 rounded-2xl border border-white/15 text-white font-medium text-sm hover:bg-white/5 transition-all",children:s("home.viewPricing")})]})})]})}),e.jsx(r,{blur:!0,duration:800,delay:400,children:e.jsx("div",{className:"grid grid-cols-3 gap-6 max-w-xl mx-auto mt-24",children:[{value:o.length||50,suffix:"+",label:s("home.aiModels")},{value:99.9,suffix:"%",label:s("home.uptime")},{value:50,suffix:"ms",label:s("home.latency"),prefix:"<"}].map((t,a)=>e.jsxs("div",{className:"text-center p-5 rounded-2xl bg-white/[0.03] border border-white/[0.06]",children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:[t.prefix,e.jsx(k,{from:0,to:t.value,duration:2}),t.suffix]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-1",children:t.label})]},a))})})]}),e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(r,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"text-center mb-14",children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-3",children:s("home.whyChooseUs")}),e.jsx("p",{className:"text-neutral-500",children:s("home.whyChooseUsDesc")})]}),e.jsx("div",{className:"grid md:grid-cols-3 gap-5",children:[{title:s("home.lightningFast"),desc:s("home.lightningFastDesc"),color:"violet",icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M13 10V3L4 14h7v7l9-11h-7z"})})},{title:s("home.securePrivate"),desc:s("home.securePrivateDesc"),color:"blue",icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})})},{title:s("home.payAsYouGo"),desc:s("home.payAsYouGoDesc"),color:"cyan",icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}].map((t,a)=>e.jsxs("div",{className:"p-6 rounded-xl bg-white/[0.02] border border-white/[0.06] hover:border-white/[0.12] transition-colors",children:[e.jsx("div",{className:`w-10 h-10 rounded-lg bg-${t.color}-500/10 text-${t.color}-400 flex items-center justify-center mb-4`,children:t.icon}),e.jsx("h3",{className:"text-base font-semibold text-white mb-2",children:t.title}),e.jsx("p",{className:"text-sm text-neutral-400 leading-relaxed",children:t.desc})]},a))})]})}),o.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(r,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"flex items-end justify-between mb-8",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-2",children:s("home.availableModels")}),e.jsLine truncated
import{u as j,a as g,r as d,f as v,l as f,j as e,L as l,Q as w}from"./index-D8eKls75.js";import{c as N,R as y}from"./RotatingEquiv-DkCC_t4y.js";import{C as k}from"./CountUp-BixuEoA6.js";import{F as r}from"./FadeContent-B3Mc1Ysf.js";import{u as M}from"./useTranslation-D_OVvIX9.js";function P(){const{t:s}=M(),{user:i}=j(),{site:n}=g(),[h,u]=d.useState([]),[c,b]=d.useState([]);d.useEffect(()=>{v().then(t=>{t.data.success&&u(t.data.data||[])}).catch(()=>{}),f().then(t=>{t.data.success&&b(t.data.data||[])}).catch(()=>{})},[]);const o=h.filter(t=>t.enabled!==!1);return e.jsxs("div",{className:"relative",children:[e.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[e.jsx("div",{className:"absolute -top-40 left-1/4 w-[600px] h-[600px] bg-violet-600/10 rounded-full blur-3xl"}),e.jsx("div",{className:"absolute top-20 right-1/4 w-[400px] h-[400px] bg-blue-600/8 rounded-full blur-3xl"})]}),e.jsxs("section",{className:"relative max-w-5xl mx-auto px-6 pt-32 pb-20",children:[e.jsx(r,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"text-center max-w-3xl mx-auto",children:[e.jsx("h1",{className:"text-5xl md:text-7xl font-heading font-extrabold text-white leading-[1.08] tracking-tight",children:(n==null?void 0:n.name)||s("home.defaultHeroTitle")}),e.jsx("p",{className:"text-lg text-neutral-400 mt-6 leading-relaxed max-w-xl mx-auto",children:s("home.heroSubtitle")}),e.jsx("div",{className:"flex items-center justify-center gap-4 mt-10",children:i?e.jsx(l,{to:"/dashboard",className:"px-8 py-3.5 rounded-2xl bg-white text-black font-semibold text-sm hover:bg-neutral-100 transition-all",children:s("home.goToDashboard")}):e.jsxs(e.Fragment,{children:[e.jsx(l,{to:"/register",className:"px-8 py-3.5 rounded-2xl bg-white text-black font-semibold text-sm hover:bg-neutral-100 transition-all",children:s("home.getStarted")}),e.jsx(l,{to:"/pricing",className:"px-8 py-3.5 rounded-2xl border border-white/15 text-white font-medium text-sm hover:bg-white/5 transition-all",children:s("home.viewPricing")})]})})]})}),e.jsx(r,{blur:!0,duration:800,delay:400,children:e.jsx("div",{className:"grid grid-cols-3 gap-6 max-w-xl mx-auto mt-24",children:[{value:o.length||50,suffix:"+",label:s("home.aiModels")},{value:99.9,suffix:"%",label:s("home.uptime")},{value:50,suffix:"ms",label:s("home.latency"),prefix:"<"}].map((t,a)=>e.jsxs("div",{className:"text-center p-5 rounded-2xl bg-white/[0.03] border border-white/[0.06]",children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:[t.prefix,e.jsx(k,{from:0,to:t.value,duration:2}),t.suffix]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-1",children:t.label})]},a))})})]}),e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(r,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"text-center mb-14",children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-3",children:s("home.whyChooseUs")}),e.jsx("p",{className:"text-neutral-500",children:s("home.whyChooseUsDesc")})]}),e.jsx("div",{className:"grid md:grid-cols-3 gap-5",children:[{title:s("home.lightningFast"),desc:s("home.lightningFastDesc"),color:"violet",icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M13 10V3L4 14h7v7l9-11h-7z"})})},{title:s("home.securePrivate"),desc:s("home.securePrivateDesc"),color:"blue",icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})})},{title:s("home.payAsYouGo"),desc:s("home.payAsYouGoDesc"),color:"cyan",icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}].map((t,a)=>e.jsxs("div",{className:"p-6 rounded-xl bg-white/[0.02] border border-white/[0.06] hover:border-white/[0.12] transition-colors",children:[e.jsx("div",{className:`w-10 h-10 rounded-lg bg-${t.color}-500/10 text-${t.color}-400 flex items-center justify-center mb-4`,children:t.icon}),e.jsx("h3",{className:"text-base font-semibold text-white mb-2",children:t.title}),e.jsx("p",{className:"text-sm text-neutral-400 leading-relaxed",children:t.desc})]},a))})]})}),o.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(r,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"flex items-end justify-between mb-8",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-2",children:s("home.availableModels")}),e.jsLine truncated
@@ -1 +1 @@
import{u as g,a as v,r as d,f as N,l as f,j as e,L as a,Q as w}from"./index-C1LcEmdp.js";import{c as y,R as M}from"./RotatingEquiv-ByYi0mto.js";import{C as c}from"./CountUp-M8KqDP8n.js";import{F as r}from"./FadeContent-CEb-jr-E.js";import{u as k}from"./useTranslation-kIlHvV5e.js";function P(){const{t}=k(),{user:i}=g(),{site:n}=v(),[u,p]=d.useState([]),[x,j]=d.useState([]);d.useEffect(()=>{N().then(s=>{s.data.success&&p(s.data.data||[])}).catch(()=>{}),f().then(s=>{s.data.success&&j(s.data.data||[])}).catch(()=>{})},[]);const l=u.filter(s=>s.enabled!==!1);return e.jsxs("div",{children:[e.jsxs("section",{className:"max-w-6xl mx-auto px-6 lg:px-8 pt-32 pb-20",children:[e.jsx(r,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"max-w-3xl",children:[e.jsx("h1",{className:"text-5xl md:text-6xl font-bold text-slate-900 leading-[1.1] tracking-tight",children:(n==null?void 0:n.name)||t("home.defaultHeroTitle")}),e.jsx("p",{className:"text-lg text-slate-500 mt-6 leading-relaxed max-w-xl",children:t("home.heroSubtitle")}),e.jsx("div",{className:"flex items-center gap-4 mt-10",children:i?e.jsxs(a,{to:"/dashboard",className:"px-7 py-3 rounded-lg bg-slate-900 text-white font-medium text-sm hover:bg-slate-800 transition-colors",children:[t("home.goToDashboard")," →"]}):e.jsxs(e.Fragment,{children:[e.jsx(a,{to:"/register",className:"px-7 py-3 rounded-lg bg-slate-900 text-white font-medium text-sm hover:bg-slate-800 transition-colors",children:t("home.getStarted")}),e.jsxs(a,{to:"/pricing",className:"px-7 py-3 text-slate-500 font-medium text-sm hover:text-slate-900 transition-colors",children:[t("home.viewPricing")," →"]})]})})]})}),e.jsx(r,{blur:!0,duration:800,delay:400,children:e.jsxs("div",{className:"flex items-center divide-x divide-slate-200 mt-20 pt-10 border-t border-slate-200",children:[e.jsxs("div",{className:"pr-12",children:[e.jsxs("div",{className:"text-2xl font-bold text-slate-900",children:[e.jsx(c,{from:0,to:l.length||50,duration:2}),"+"]}),e.jsx("p",{className:"text-sm text-slate-500 mt-0.5",children:t("home.aiModels")})]}),e.jsxs("div",{className:"px-12",children:[e.jsxs("div",{className:"text-2xl font-bold text-slate-900",children:[e.jsx(c,{from:0,to:99.9,duration:2.5}),"%"]}),e.jsx("p",{className:"text-sm text-slate-500 mt-0.5",children:t("home.uptime")})]}),e.jsxs("div",{className:"pl-12",children:[e.jsxs("div",{className:"text-2xl font-bold text-slate-900",children:["<",e.jsx(c,{from:200,to:50,duration:2,direction:"down"}),"ms"]}),e.jsx("p",{className:"text-sm text-slate-500 mt-0.5",children:t("home.latency")})]})]})})]}),e.jsx("section",{className:"bg-slate-50 border-y border-slate-200",children:e.jsx("div",{className:"max-w-6xl mx-auto px-6 lg:px-8 py-20",children:e.jsxs(r,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-bold text-slate-900 mb-2",children:t("home.whyChooseUs")}),e.jsx("p",{className:"text-slate-500 mb-10",children:t("home.whyChooseUsDesc")}),e.jsx("div",{className:"grid md:grid-cols-3 gap-6",children:[{title:t("home.lightningFast"),desc:t("home.lightningFastDesc"),icon:e.jsx("svg",{className:"w-5 h-5 text-slate-700",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M13 10V3L4 14h7v7l9-11h-7z"})})},{title:t("home.securePrivate"),desc:t("home.securePrivateDesc"),icon:e.jsx("svg",{className:"w-5 h-5 text-slate-700",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})})},{title:t("home.payAsYouGo"),desc:t("home.payAsYouGoDesc"),icon:e.jsx("svg",{className:"w-5 h-5 text-slate-700",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}].map((s,o)=>e.jsxs("div",{className:"p-6 rounded-xl bg-white border border-slate-200 hover:shadow-sm transition-all",children:[e.jsx("div",{className:"w-10 h-10 rounded-lg bg-slate-100 flex items-center justify-center mb-4",children:s.icon}),e.jsx("h3",{className:"text-base font-semibold text-slate-900 mb-2",children:s.title}),e.jsx("p",{className:"text-sm text-slate-500 leading-relaxed",children:s.desc})]},o))})]})})}),l.length>0&&e.jsx("section",{className:"max-w-6xl mx-auto px-6 lg:px-8 py-20",children:e.jsxs(r,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"flex items-end justify-between mb-8",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold text-slate-900 mb-2",children:t("home.availableModels")}),e.jsx("p",{className:"text-slate-500",children:t("home.availableModelsDesc",{count:l.length})})]}),l.length>8&&e.jsxs(a,{to:"/Line truncated
import{u as g,a as v,r as d,f as N,l as f,j as e,L as a,Q as w}from"./index-D8eKls75.js";import{c as y,R as M}from"./RotatingEquiv-DkCC_t4y.js";import{C as c}from"./CountUp-BixuEoA6.js";import{F as r}from"./FadeContent-B3Mc1Ysf.js";import{u as k}from"./useTranslation-D_OVvIX9.js";function P(){const{t}=k(),{user:i}=g(),{site:n}=v(),[u,p]=d.useState([]),[x,j]=d.useState([]);d.useEffect(()=>{N().then(s=>{s.data.success&&p(s.data.data||[])}).catch(()=>{}),f().then(s=>{s.data.success&&j(s.data.data||[])}).catch(()=>{})},[]);const l=u.filter(s=>s.enabled!==!1);return e.jsxs("div",{children:[e.jsxs("section",{className:"max-w-6xl mx-auto px-6 lg:px-8 pt-32 pb-20",children:[e.jsx(r,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"max-w-3xl",children:[e.jsx("h1",{className:"text-5xl md:text-6xl font-bold text-slate-900 leading-[1.1] tracking-tight",children:(n==null?void 0:n.name)||t("home.defaultHeroTitle")}),e.jsx("p",{className:"text-lg text-slate-500 mt-6 leading-relaxed max-w-xl",children:t("home.heroSubtitle")}),e.jsx("div",{className:"flex items-center gap-4 mt-10",children:i?e.jsxs(a,{to:"/dashboard",className:"px-7 py-3 rounded-lg bg-slate-900 text-white font-medium text-sm hover:bg-slate-800 transition-colors",children:[t("home.goToDashboard")," →"]}):e.jsxs(e.Fragment,{children:[e.jsx(a,{to:"/register",className:"px-7 py-3 rounded-lg bg-slate-900 text-white font-medium text-sm hover:bg-slate-800 transition-colors",children:t("home.getStarted")}),e.jsxs(a,{to:"/pricing",className:"px-7 py-3 text-slate-500 font-medium text-sm hover:text-slate-900 transition-colors",children:[t("home.viewPricing")," →"]})]})})]})}),e.jsx(r,{blur:!0,duration:800,delay:400,children:e.jsxs("div",{className:"flex items-center divide-x divide-slate-200 mt-20 pt-10 border-t border-slate-200",children:[e.jsxs("div",{className:"pr-12",children:[e.jsxs("div",{className:"text-2xl font-bold text-slate-900",children:[e.jsx(c,{from:0,to:l.length||50,duration:2}),"+"]}),e.jsx("p",{className:"text-sm text-slate-500 mt-0.5",children:t("home.aiModels")})]}),e.jsxs("div",{className:"px-12",children:[e.jsxs("div",{className:"text-2xl font-bold text-slate-900",children:[e.jsx(c,{from:0,to:99.9,duration:2.5}),"%"]}),e.jsx("p",{className:"text-sm text-slate-500 mt-0.5",children:t("home.uptime")})]}),e.jsxs("div",{className:"pl-12",children:[e.jsxs("div",{className:"text-2xl font-bold text-slate-900",children:["<",e.jsx(c,{from:200,to:50,duration:2,direction:"down"}),"ms"]}),e.jsx("p",{className:"text-sm text-slate-500 mt-0.5",children:t("home.latency")})]})]})})]}),e.jsx("section",{className:"bg-slate-50 border-y border-slate-200",children:e.jsx("div",{className:"max-w-6xl mx-auto px-6 lg:px-8 py-20",children:e.jsxs(r,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-bold text-slate-900 mb-2",children:t("home.whyChooseUs")}),e.jsx("p",{className:"text-slate-500 mb-10",children:t("home.whyChooseUsDesc")}),e.jsx("div",{className:"grid md:grid-cols-3 gap-6",children:[{title:t("home.lightningFast"),desc:t("home.lightningFastDesc"),icon:e.jsx("svg",{className:"w-5 h-5 text-slate-700",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M13 10V3L4 14h7v7l9-11h-7z"})})},{title:t("home.securePrivate"),desc:t("home.securePrivateDesc"),icon:e.jsx("svg",{className:"w-5 h-5 text-slate-700",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})})},{title:t("home.payAsYouGo"),desc:t("home.payAsYouGoDesc"),icon:e.jsx("svg",{className:"w-5 h-5 text-slate-700",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}].map((s,o)=>e.jsxs("div",{className:"p-6 rounded-xl bg-white border border-slate-200 hover:shadow-sm transition-all",children:[e.jsx("div",{className:"w-10 h-10 rounded-lg bg-slate-100 flex items-center justify-center mb-4",children:s.icon}),e.jsx("h3",{className:"text-base font-semibold text-slate-900 mb-2",children:s.title}),e.jsx("p",{className:"text-sm text-slate-500 leading-relaxed",children:s.desc})]},o))})]})})}),l.length>0&&e.jsx("section",{className:"max-w-6xl mx-auto px-6 lg:px-8 py-20",children:e.jsxs(r,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"flex items-end justify-between mb-8",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold text-slate-900 mb-2",children:t("home.availableModels")}),e.jsx("p",{className:"text-slate-500",children:t("home.availableModelsDesc",{count:l.length})})]}),l.length>8&&e.jsxs(a,{to:"/Line truncated
@@ -1 +1 @@
import{u as g,a as v,r as d,f,l as N,j as e,L as a,Q as w}from"./index-C1LcEmdp.js";import{c as y,R as M}from"./RotatingEquiv-ByYi0mto.js";import{C as c}from"./CountUp-M8KqDP8n.js";import{F as n}from"./FadeContent-CEb-jr-E.js";import{u as k}from"./useTranslation-kIlHvV5e.js";function C(){const{t}=k(),{user:o}=g(),{site:i}=v(),[u,b]=d.useState([]),[x,p]=d.useState([]);d.useEffect(()=>{f().then(s=>{s.data.success&&b(s.data.data||[])}).catch(()=>{}),N().then(s=>{s.data.success&&p(s.data.data||[])}).catch(()=>{})},[]);const r=u.filter(s=>s.enabled!==!1);return e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:e.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[900px] h-[500px] bg-gradient-radial from-brand-600/15 to-transparent blur-3xl opacity-60"})}),e.jsxs("section",{className:"relative max-w-5xl mx-auto px-6 pt-32 pb-20",children:[e.jsx(n,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"text-center max-w-3xl mx-auto",children:[e.jsx("p",{className:"text-sm font-medium text-brand-400 mb-4 tracking-wide uppercase",children:t("home.heroTagline")||"AI API Platform"}),e.jsx("h1",{className:"text-5xl md:text-6xl font-heading font-bold text-white leading-[1.1] tracking-tight",children:(i==null?void 0:i.name)||t("home.defaultHeroTitle")}),e.jsx("p",{className:"text-lg text-neutral-400 mt-6 leading-relaxed max-w-xl mx-auto",children:t("home.heroSubtitle")}),e.jsx("div",{className:"flex items-center justify-center gap-4 mt-10",children:o?e.jsxs(a,{to:"/dashboard",className:"px-7 py-3 rounded-xl bg-brand-600 text-white font-medium text-sm hover:bg-brand-500 transition-colors shadow-lg shadow-brand-600/20",children:[t("home.goToDashboard")," →"]}):e.jsxs(e.Fragment,{children:[e.jsx(a,{to:"/register",className:"px-7 py-3 rounded-xl bg-brand-600 text-white font-medium text-sm hover:bg-brand-500 transition-colors shadow-lg shadow-brand-600/20",children:t("home.getStarted")}),e.jsxs(a,{to:"/pricing",className:"px-7 py-3 text-neutral-400 font-medium text-sm hover:text-white transition-colors",children:[t("home.viewPricing")," →"]})]})})]})}),e.jsx(n,{blur:!0,duration:800,delay:400,children:e.jsxs("div",{className:"grid grid-cols-3 gap-8 max-w-lg mx-auto mt-20 pt-10 border-t border-neutral-800/60",children:[e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:[e.jsx(c,{from:0,to:r.length||50,duration:2}),"+"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:t("home.aiModels")})]}),e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:[e.jsx(c,{from:0,to:99.9,duration:2.5}),"%"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:t("home.uptime")})]}),e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:["<",e.jsx(c,{from:200,to:50,duration:2,direction:"down"}),"ms"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:t("home.latency")})]})]})})]}),e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(n,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"text-center mb-14",children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-3",children:t("home.whyChooseUs")}),e.jsx("p",{className:"text-neutral-500",children:t("home.whyChooseUsDesc")})]}),e.jsx("div",{className:"grid md:grid-cols-3 gap-5",children:[{title:t("home.lightningFast"),desc:t("home.lightningFastDesc"),icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M13 10V3L4 14h7v7l9-11h-7z"})})},{title:t("home.securePrivate"),desc:t("home.securePrivateDesc"),icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})})},{title:t("home.payAsYouGo"),desc:t("home.payAsYouGoDesc"),icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}].map((s,l)=>e.jsxs("div",{className:"p-6 rounded-xl border border-neutral-800/60 hover:border-brand-500/25 transition-colors group",children:[e.jsx("div",{className:"w-10 h-10 rounded-lg bg-brand-500/10 text-brand-400 flex items-center justify-center mb-4",children:s.icon}),e.jsx("h3",{className:"text-base font-semibold text-white mb-2",children:s.title}),e.jsx("p",{className:"text-sm text-neutral-400 leading-relaLine truncated
import{u as g,a as v,r as d,f,l as N,j as e,L as a,Q as w}from"./index-D8eKls75.js";import{c as y,R as M}from"./RotatingEquiv-DkCC_t4y.js";import{C as c}from"./CountUp-BixuEoA6.js";import{F as n}from"./FadeContent-B3Mc1Ysf.js";import{u as k}from"./useTranslation-D_OVvIX9.js";function C(){const{t}=k(),{user:o}=g(),{site:i}=v(),[u,b]=d.useState([]),[x,p]=d.useState([]);d.useEffect(()=>{f().then(s=>{s.data.success&&b(s.data.data||[])}).catch(()=>{}),N().then(s=>{s.data.success&&p(s.data.data||[])}).catch(()=>{})},[]);const r=u.filter(s=>s.enabled!==!1);return e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:e.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[900px] h-[500px] bg-gradient-radial from-brand-600/15 to-transparent blur-3xl opacity-60"})}),e.jsxs("section",{className:"relative max-w-5xl mx-auto px-6 pt-32 pb-20",children:[e.jsx(n,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"text-center max-w-3xl mx-auto",children:[e.jsx("p",{className:"text-sm font-medium text-brand-400 mb-4 tracking-wide uppercase",children:t("home.heroTagline")||"AI API Platform"}),e.jsx("h1",{className:"text-5xl md:text-6xl font-heading font-bold text-white leading-[1.1] tracking-tight",children:(i==null?void 0:i.name)||t("home.defaultHeroTitle")}),e.jsx("p",{className:"text-lg text-neutral-400 mt-6 leading-relaxed max-w-xl mx-auto",children:t("home.heroSubtitle")}),e.jsx("div",{className:"flex items-center justify-center gap-4 mt-10",children:o?e.jsxs(a,{to:"/dashboard",className:"px-7 py-3 rounded-xl bg-brand-600 text-white font-medium text-sm hover:bg-brand-500 transition-colors shadow-lg shadow-brand-600/20",children:[t("home.goToDashboard")," →"]}):e.jsxs(e.Fragment,{children:[e.jsx(a,{to:"/register",className:"px-7 py-3 rounded-xl bg-brand-600 text-white font-medium text-sm hover:bg-brand-500 transition-colors shadow-lg shadow-brand-600/20",children:t("home.getStarted")}),e.jsxs(a,{to:"/pricing",className:"px-7 py-3 text-neutral-400 font-medium text-sm hover:text-white transition-colors",children:[t("home.viewPricing")," →"]})]})})]})}),e.jsx(n,{blur:!0,duration:800,delay:400,children:e.jsxs("div",{className:"grid grid-cols-3 gap-8 max-w-lg mx-auto mt-20 pt-10 border-t border-neutral-800/60",children:[e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:[e.jsx(c,{from:0,to:r.length||50,duration:2}),"+"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:t("home.aiModels")})]}),e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:[e.jsx(c,{from:0,to:99.9,duration:2.5}),"%"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:t("home.uptime")})]}),e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:["<",e.jsx(c,{from:200,to:50,duration:2,direction:"down"}),"ms"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:t("home.latency")})]})]})})]}),e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(n,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"text-center mb-14",children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-3",children:t("home.whyChooseUs")}),e.jsx("p",{className:"text-neutral-500",children:t("home.whyChooseUsDesc")})]}),e.jsx("div",{className:"grid md:grid-cols-3 gap-5",children:[{title:t("home.lightningFast"),desc:t("home.lightningFastDesc"),icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M13 10V3L4 14h7v7l9-11h-7z"})})},{title:t("home.securePrivate"),desc:t("home.securePrivateDesc"),icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})})},{title:t("home.payAsYouGo"),desc:t("home.payAsYouGoDesc"),icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}].map((s,l)=>e.jsxs("div",{className:"p-6 rounded-xl border border-neutral-800/60 hover:border-brand-500/25 transition-colors group",children:[e.jsx("div",{className:"w-10 h-10 rounded-lg bg-brand-500/10 text-brand-400 flex items-center justify-center mb-4",children:s.icon}),e.jsx("h3",{className:"text-base font-semibold text-white mb-2",children:s.title}),e.jsx("p",{className:"text-sm text-neutral-400 leading-relaLine truncated
@@ -1 +1 @@
import{u as p,a as y,r as d,f as N,l as v,j as e,L as a,Q as f}from"./index-C1LcEmdp.js";import{c as w,R as M}from"./RotatingEquiv-ByYi0mto.js";import{C as c}from"./CountUp-M8KqDP8n.js";import{F as l}from"./FadeContent-CEb-jr-E.js";import{u as k}from"./useTranslation-kIlHvV5e.js";function q(){const{t}=k(),{user:i}=p(),{site:n}=y(),[u,g]=d.useState([]),[x,b]=d.useState([]);d.useEffect(()=>{N().then(s=>{s.data.success&&g(s.data.data||[])}).catch(()=>{}),v().then(s=>{s.data.success&&b(s.data.data||[])}).catch(()=>{})},[]);const r=u.filter(s=>s.enabled!==!1);return e.jsxs("div",{children:[e.jsxs("section",{className:"max-w-5xl mx-auto px-6 pt-32 pb-20",children:[e.jsx(l,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"text-center max-w-3xl mx-auto",children:[e.jsx("p",{className:"text-sm font-medium text-blue-600 mb-4 tracking-wide",children:t("home.heroTagline")||"AI API Platform"}),e.jsx("h1",{className:"text-5xl md:text-6xl font-heading font-bold text-gray-900 leading-[1.1] tracking-tight",children:(n==null?void 0:n.name)||t("home.defaultHeroTitle")}),e.jsx("p",{className:"text-lg text-gray-500 mt-6 leading-relaxed max-w-xl mx-auto",children:t("home.heroSubtitle")}),e.jsx("div",{className:"flex items-center justify-center gap-4 mt-10",children:i?e.jsxs(a,{to:"/dashboard",className:"px-7 py-3 rounded-xl bg-blue-600 text-white font-medium text-sm hover:bg-blue-700 transition-colors shadow-sm",children:[t("home.goToDashboard")," →"]}):e.jsxs(e.Fragment,{children:[e.jsx(a,{to:"/register",className:"px-7 py-3 rounded-xl bg-blue-600 text-white font-medium text-sm hover:bg-blue-700 transition-colors shadow-sm",children:t("home.getStarted")}),e.jsxs(a,{to:"/pricing",className:"px-7 py-3 text-gray-500 font-medium text-sm hover:text-gray-900 transition-colors",children:[t("home.viewPricing")," →"]})]})})]})}),e.jsx(l,{blur:!0,duration:800,delay:400,children:e.jsxs("div",{className:"grid grid-cols-3 gap-8 max-w-lg mx-auto mt-20 pt-10 border-t border-gray-100",children:[e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-2xl font-bold text-gray-900",children:[e.jsx(c,{from:0,to:r.length||50,duration:2}),"+"]}),e.jsx("p",{className:"text-sm text-gray-500 mt-0.5",children:t("home.aiModels")})]}),e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-2xl font-bold text-gray-900",children:[e.jsx(c,{from:0,to:99.9,duration:2.5}),"%"]}),e.jsx("p",{className:"text-sm text-gray-500 mt-0.5",children:t("home.uptime")})]}),e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-2xl font-bold text-gray-900",children:["<",e.jsx(c,{from:200,to:50,duration:2,direction:"down"}),"ms"]}),e.jsx("p",{className:"text-sm text-gray-500 mt-0.5",children:t("home.latency")})]})]})})]}),e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(l,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"text-center mb-14",children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-gray-900 mb-3",children:t("home.whyChooseUs")}),e.jsx("p",{className:"text-gray-500",children:t("home.whyChooseUsDesc")})]}),e.jsx("div",{className:"grid md:grid-cols-3 gap-5",children:[{title:t("home.lightningFast"),desc:t("home.lightningFastDesc"),color:"blue",icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M13 10V3L4 14h7v7l9-11h-7z"})})},{title:t("home.securePrivate"),desc:t("home.securePrivateDesc"),color:"indigo",icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})})},{title:t("home.payAsYouGo"),desc:t("home.payAsYouGoDesc"),color:"emerald",icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}].map((s,o)=>e.jsxs("div",{className:"p-6 rounded-xl border border-gray-100 hover:border-gray-200 hover:shadow-sm transition-all",children:[e.jsx("div",{className:`w-10 h-10 rounded-lg bg-${s.color}-50 text-${s.color}-600 flex items-center justify-center mb-4`,children:s.icon}),e.jsx("h3",{className:"text-base font-semibold text-gray-900 mb-2",children:s.title}),e.jsx("p",{className:"text-sm text-gray-500 leading-relaxed",children:s.desc})]},o))})]})}),r.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(l,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"flex items-end justify-between mb-8",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"texLine truncated
import{u as p,a as y,r as d,f as N,l as v,j as e,L as a,Q as f}from"./index-D8eKls75.js";import{c as w,R as M}from"./RotatingEquiv-DkCC_t4y.js";import{C as c}from"./CountUp-BixuEoA6.js";import{F as l}from"./FadeContent-B3Mc1Ysf.js";import{u as k}from"./useTranslation-D_OVvIX9.js";function q(){const{t}=k(),{user:i}=p(),{site:n}=y(),[u,g]=d.useState([]),[x,b]=d.useState([]);d.useEffect(()=>{N().then(s=>{s.data.success&&g(s.data.data||[])}).catch(()=>{}),v().then(s=>{s.data.success&&b(s.data.data||[])}).catch(()=>{})},[]);const r=u.filter(s=>s.enabled!==!1);return e.jsxs("div",{children:[e.jsxs("section",{className:"max-w-5xl mx-auto px-6 pt-32 pb-20",children:[e.jsx(l,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"text-center max-w-3xl mx-auto",children:[e.jsx("p",{className:"text-sm font-medium text-blue-600 mb-4 tracking-wide",children:t("home.heroTagline")||"AI API Platform"}),e.jsx("h1",{className:"text-5xl md:text-6xl font-heading font-bold text-gray-900 leading-[1.1] tracking-tight",children:(n==null?void 0:n.name)||t("home.defaultHeroTitle")}),e.jsx("p",{className:"text-lg text-gray-500 mt-6 leading-relaxed max-w-xl mx-auto",children:t("home.heroSubtitle")}),e.jsx("div",{className:"flex items-center justify-center gap-4 mt-10",children:i?e.jsxs(a,{to:"/dashboard",className:"px-7 py-3 rounded-xl bg-blue-600 text-white font-medium text-sm hover:bg-blue-700 transition-colors shadow-sm",children:[t("home.goToDashboard")," →"]}):e.jsxs(e.Fragment,{children:[e.jsx(a,{to:"/register",className:"px-7 py-3 rounded-xl bg-blue-600 text-white font-medium text-sm hover:bg-blue-700 transition-colors shadow-sm",children:t("home.getStarted")}),e.jsxs(a,{to:"/pricing",className:"px-7 py-3 text-gray-500 font-medium text-sm hover:text-gray-900 transition-colors",children:[t("home.viewPricing")," →"]})]})})]})}),e.jsx(l,{blur:!0,duration:800,delay:400,children:e.jsxs("div",{className:"grid grid-cols-3 gap-8 max-w-lg mx-auto mt-20 pt-10 border-t border-gray-100",children:[e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-2xl font-bold text-gray-900",children:[e.jsx(c,{from:0,to:r.length||50,duration:2}),"+"]}),e.jsx("p",{className:"text-sm text-gray-500 mt-0.5",children:t("home.aiModels")})]}),e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-2xl font-bold text-gray-900",children:[e.jsx(c,{from:0,to:99.9,duration:2.5}),"%"]}),e.jsx("p",{className:"text-sm text-gray-500 mt-0.5",children:t("home.uptime")})]}),e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-2xl font-bold text-gray-900",children:["<",e.jsx(c,{from:200,to:50,duration:2,direction:"down"}),"ms"]}),e.jsx("p",{className:"text-sm text-gray-500 mt-0.5",children:t("home.latency")})]})]})})]}),e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(l,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"text-center mb-14",children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-gray-900 mb-3",children:t("home.whyChooseUs")}),e.jsx("p",{className:"text-gray-500",children:t("home.whyChooseUsDesc")})]}),e.jsx("div",{className:"grid md:grid-cols-3 gap-5",children:[{title:t("home.lightningFast"),desc:t("home.lightningFastDesc"),color:"blue",icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M13 10V3L4 14h7v7l9-11h-7z"})})},{title:t("home.securePrivate"),desc:t("home.securePrivateDesc"),color:"indigo",icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})})},{title:t("home.payAsYouGo"),desc:t("home.payAsYouGoDesc"),color:"emerald",icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}].map((s,o)=>e.jsxs("div",{className:"p-6 rounded-xl border border-gray-100 hover:border-gray-200 hover:shadow-sm transition-all",children:[e.jsx("div",{className:`w-10 h-10 rounded-lg bg-${s.color}-50 text-${s.color}-600 flex items-center justify-center mb-4`,children:s.icon}),e.jsx("h3",{className:"text-base font-semibold text-gray-900 mb-2",children:s.title}),e.jsx("p",{className:"text-sm text-gray-500 leading-relaxed",children:s.desc})]},o))})]})}),r.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(l,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"flex items-end justify-between mb-8",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"texLine truncated
@@ -1 +1 @@
import{j as n}from"./index-C1LcEmdp.js";import{u as a}from"./useTranslation-kIlHvV5e.js";function u({className:t=""}){var s;const{i18n:e}=a(),o=(s=e.language)==null?void 0:s.startsWith("zh"),r=()=>{e.changeLanguage(o?"en":"zh")};return n.jsxs("button",{onClick:r,className:`flex items-center gap-1.5 px-2.5 py-1 rounded-md text-xs transition-colors ${t}`,"aria-label":"Switch language",children:[n.jsxs("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:[n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Z"}),n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.6 9h16.8M3.6 15h16.8"}),n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3a15.3 15.3 0 0 1 4 9 15.3 15.3 0 0 1-4 9 15.3 15.3 0 0 1-4-9 15.3 15.3 0 0 1 4-9Z"})]}),n.jsx("span",{children:o?"EN":"中文"})]})}export{u as L};
import{j as n}from"./index-D8eKls75.js";import{u as a}from"./useTranslation-D_OVvIX9.js";function u({className:t=""}){var s;const{i18n:e}=a(),o=(s=e.language)==null?void 0:s.startsWith("zh"),r=()=>{e.changeLanguage(o?"en":"zh")};return n.jsxs("button",{onClick:r,className:`flex items-center gap-1.5 px-2.5 py-1 rounded-md text-xs transition-colors ${t}`,"aria-label":"Switch language",children:[n.jsxs("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:[n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Z"}),n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.6 9h16.8M3.6 15h16.8"}),n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3a15.3 15.3 0 0 1 4 9 15.3 15.3 0 0 1-4 9 15.3 15.3 0 0 1-4-9 15.3 15.3 0 0 1 4-9Z"})]}),n.jsx("span",{children:o?"EN":"中文"})]})}export{u as L};
@@ -1 +1 @@
import{u as h,a as u,b as p,c as b,r as g,j as e,L as l,O as v}from"./index-C1LcEmdp.js";import{L as j}from"./LanguageSwitch-rovTNa8V.js";import{u as f}from"./useTranslation-kIlHvV5e.js";function M(){const{t:a}=f(),{user:n,logout:o}=h(),{site:t}=u(),m=p(),x=b(),[i,c]=g.useState(!1),r=(t==null?void 0:t.name)||"AI Platform",d=[{to:"/",label:a("nav.home"),auth:!1},{to:"/pricing",label:a("nav.pricing"),auth:!1},{to:"/packages",label:a("nav.packages"),auth:!1},{to:"/dashboard",label:a("nav.dashboard"),auth:!0},{to:"/tokens",label:a("nav.apiKeys"),auth:!0},...t!=null&&t.enable_topup?[{to:"/topup",label:a("nav.topup"),auth:!0}]:[]].filter(s=>!s.auth||n);return e.jsxs("div",{className:"min-h-screen flex flex-col",children:[(t==null?void 0:t.announcement)&&e.jsx("div",{className:"bg-brand-600/20 border-b border-brand-500/20 text-center py-2 px-4",children:e.jsx("p",{className:"text-sm text-brand-200",children:t.announcement})}),e.jsxs("header",{className:"sticky top-0 z-50 backdrop-blur-xl bg-black/60 border-b border-white/[0.06]",children:[e.jsxs("div",{className:"max-w-7xl mx-auto px-6 h-16 flex items-center justify-between",children:[e.jsxs(l,{to:"/",className:"flex items-center gap-3 group",children:[t!=null&&t.logo?e.jsx("img",{src:t.logo,alt:r,className:"h-8 w-auto"}):e.jsx("div",{className:"w-8 h-8 rounded-lg bg-gradient-to-br from-brand-500 to-purple-600 flex items-center justify-center text-white font-bold text-sm",children:r.charAt(0)}),e.jsx("span",{className:"text-lg font-semibold text-white group-hover:text-brand-400 transition-colors",children:r})]}),e.jsx("nav",{className:"hidden md:flex items-center gap-1",children:d.map(s=>e.jsx(N,{to:s.to,active:x.pathname===s.to,children:s.label},s.to))}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(j,{className:"text-neutral-400 hover:text-white hover:bg-white/5"}),n?e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm text-neutral-400 hidden sm:block",children:n.display_name||n.username}),e.jsx("button",{onClick:async()=>{await o(),m("/")},className:"text-sm text-neutral-400 hover:text-white transition-colors",children:a("nav.logout")})]}):e.jsxs(e.Fragment,{children:[e.jsx(l,{to:"/login",className:"text-sm text-neutral-300 hover:text-white transition-colors px-3 py-1.5 hidden sm:block",children:a("nav.login")}),e.jsx(l,{to:"/register",className:"btn-primary text-sm !px-4 !py-1.5",children:a("nav.signUp")})]}),e.jsx("button",{className:"md:hidden p-1.5 rounded-lg hover:bg-white/5 transition-colors",onClick:()=>c(!i),"aria-label":"Toggle menu",children:e.jsx("svg",{className:"w-5 h-5 text-neutral-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]})]}),i&&e.jsx("div",{className:"md:hidden border-t border-white/[0.06] bg-black/90 backdrop-blur-xl",children:e.jsxs("nav",{className:"max-w-7xl mx-auto px-6 py-3 flex flex-col gap-1",children:[d.map(s=>e.jsx(l,{to:s.to,onClick:()=>c(!1),className:`px-3 py-2 text-sm rounded-lg transition-colors ${x.pathname===s.to?"text-brand-400 bg-brand-500/10":"text-neutral-400 hover:text-white hover:bg-white/5"}`,children:s.label},s.to)),!n&&e.jsx(l,{to:"/login",onClick:()=>c(!1),className:"px-3 py-2 text-sm text-neutral-400 hover:text-white rounded-lg hover:bg-white/5 transition-colors sm:hidden",children:a("nav.login")})]})})]}),e.jsx("main",{className:"flex-1",children:e.jsx(v,{})}),e.jsx("footer",{className:"border-t border-white/[0.06] mt-auto",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-8 flex flex-col md:flex-row items-center justify-between gap-4",children:[e.jsxs("p",{className:"text-sm text-neutral-500",children:["© ",new Date().getFullYear()," ",r,"."]}),e.jsx("div",{className:"flex items-center gap-4",children:(t==null?void 0:t.contact_email)&&e.jsx("a",{href:`mailto:${t.contact_email}`,className:"text-sm text-neutral-500 hover:text-neutral-300 transition-colors",children:a("nav.contact")})})]})})]})}function N({to:a,children:n,active:o}){return e.jsx(l,{to:a,className:`px-3 py-1.5 text-sm rounded-lg transition-all ${o?"text-brand-400 bg-brand-500/10":"text-neutral-400 hover:text-white hover:bg-white/5"}`,children:n})}export{M as default};
import{u as h,a as u,b as p,c as b,r as g,j as e,L as l,O as v}from"./index-D8eKls75.js";import{L as j}from"./LanguageSwitch-CG9YcMHq.js";import{u as f}from"./useTranslation-D_OVvIX9.js";function M(){const{t:a}=f(),{user:n,logout:o}=h(),{site:t}=u(),m=p(),x=b(),[i,c]=g.useState(!1),r=(t==null?void 0:t.name)||"AI Platform",d=[{to:"/",label:a("nav.home"),auth:!1},{to:"/pricing",label:a("nav.pricing"),auth:!1},{to:"/packages",label:a("nav.packages"),auth:!1},{to:"/dashboard",label:a("nav.dashboard"),auth:!0},{to:"/tokens",label:a("nav.apiKeys"),auth:!0},...t!=null&&t.enable_topup?[{to:"/topup",label:a("nav.topup"),auth:!0}]:[]].filter(s=>!s.auth||n);return e.jsxs("div",{className:"min-h-screen flex flex-col",children:[(t==null?void 0:t.announcement)&&e.jsx("div",{className:"bg-brand-600/20 border-b border-brand-500/20 text-center py-2 px-4",children:e.jsx("p",{className:"text-sm text-brand-200",children:t.announcement})}),e.jsxs("header",{className:"sticky top-0 z-50 backdrop-blur-xl bg-black/60 border-b border-white/[0.06]",children:[e.jsxs("div",{className:"max-w-7xl mx-auto px-6 h-16 flex items-center justify-between",children:[e.jsxs(l,{to:"/",className:"flex items-center gap-3 group",children:[t!=null&&t.logo?e.jsx("img",{src:t.logo,alt:r,className:"h-8 w-auto"}):e.jsx("div",{className:"w-8 h-8 rounded-lg bg-gradient-to-br from-brand-500 to-purple-600 flex items-center justify-center text-white font-bold text-sm",children:r.charAt(0)}),e.jsx("span",{className:"text-lg font-semibold text-white group-hover:text-brand-400 transition-colors",children:r})]}),e.jsx("nav",{className:"hidden md:flex items-center gap-1",children:d.map(s=>e.jsx(N,{to:s.to,active:x.pathname===s.to,children:s.label},s.to))}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(j,{className:"text-neutral-400 hover:text-white hover:bg-white/5"}),n?e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm text-neutral-400 hidden sm:block",children:n.display_name||n.username}),e.jsx("button",{onClick:async()=>{await o(),m("/")},className:"text-sm text-neutral-400 hover:text-white transition-colors",children:a("nav.logout")})]}):e.jsxs(e.Fragment,{children:[e.jsx(l,{to:"/login",className:"text-sm text-neutral-300 hover:text-white transition-colors px-3 py-1.5 hidden sm:block",children:a("nav.login")}),e.jsx(l,{to:"/register",className:"btn-primary text-sm !px-4 !py-1.5",children:a("nav.signUp")})]}),e.jsx("button",{className:"md:hidden p-1.5 rounded-lg hover:bg-white/5 transition-colors",onClick:()=>c(!i),"aria-label":"Toggle menu",children:e.jsx("svg",{className:"w-5 h-5 text-neutral-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]})]}),i&&e.jsx("div",{className:"md:hidden border-t border-white/[0.06] bg-black/90 backdrop-blur-xl",children:e.jsxs("nav",{className:"max-w-7xl mx-auto px-6 py-3 flex flex-col gap-1",children:[d.map(s=>e.jsx(l,{to:s.to,onClick:()=>c(!1),className:`px-3 py-2 text-sm rounded-lg transition-colors ${x.pathname===s.to?"text-brand-400 bg-brand-500/10":"text-neutral-400 hover:text-white hover:bg-white/5"}`,children:s.label},s.to)),!n&&e.jsx(l,{to:"/login",onClick:()=>c(!1),className:"px-3 py-2 text-sm text-neutral-400 hover:text-white rounded-lg hover:bg-white/5 transition-colors sm:hidden",children:a("nav.login")})]})})]}),e.jsx("main",{className:"flex-1",children:e.jsx(v,{})}),e.jsx("footer",{className:"border-t border-white/[0.06] mt-auto",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-8 flex flex-col md:flex-row items-center justify-between gap-4",children:[e.jsxs("p",{className:"text-sm text-neutral-500",children:["© ",new Date().getFullYear()," ",r,"."]}),e.jsx("div",{className:"flex items-center gap-4",children:(t==null?void 0:t.contact_email)&&e.jsx("a",{href:`mailto:${t.contact_email}`,className:"text-sm text-neutral-500 hover:text-neutral-300 transition-colors",children:a("nav.contact")})})]})})]})}function N({to:a,children:n,active:o}){return e.jsx(l,{to:a,className:`px-3 py-1.5 text-sm rounded-lg transition-all ${o?"text-brand-400 bg-brand-500/10":"text-neutral-400 hover:text-white hover:bg-white/5"}`,children:n})}export{M as default};
@@ -1 +1 @@
import{u as h,a as g,b as u,c as b,r as p,j as e,L as r,O as v}from"./index-C1LcEmdp.js";import{L as j}from"./LanguageSwitch-rovTNa8V.js";import{u as y}from"./useTranslation-kIlHvV5e.js";function L(){const{t:s}=y(),{user:o,logout:m}=h(),{site:t}=g(),d=u(),i=b(),[n,c]=p.useState(!1),l=(t==null?void 0:t.name)||"AI Platform",x=[{to:"/",label:s("nav.home"),auth:!1},{to:"/pricing",label:s("nav.pricing"),auth:!1},{to:"/packages",label:s("nav.packages"),auth:!1},{to:"/dashboard",label:s("nav.dashboard"),auth:!0},{to:"/tokens",label:s("nav.apiKeys"),auth:!0},...t!=null&&t.enable_topup?[{to:"/topup",label:s("nav.topup"),auth:!0}]:[]].filter(a=>!a.auth||o);return e.jsxs("div",{className:"theme-light min-h-screen flex flex-col bg-white text-gray-900",children:[(t==null?void 0:t.announcement)&&e.jsx("div",{className:"bg-blue-50 border-b border-blue-100 text-center py-2.5 px-4",children:e.jsx("p",{className:"text-sm text-blue-700",children:t.announcement})}),e.jsxs("header",{className:"sticky top-0 z-50 bg-white/80 backdrop-blur-xl border-b border-gray-100",children:[e.jsxs("div",{className:"max-w-6xl mx-auto px-6 h-16 flex items-center justify-between",children:[e.jsxs(r,{to:"/",className:"flex items-center gap-3 group",children:[t!=null&&t.logo?e.jsx("img",{src:t.logo,alt:l,className:"h-8 w-auto"}):e.jsx("div",{className:"w-9 h-9 rounded-xl bg-gradient-to-br from-blue-600 to-indigo-600 flex items-center justify-center text-white font-bold text-sm shadow-sm",children:l.charAt(0)}),e.jsx("span",{className:"text-lg font-semibold text-gray-900 group-hover:text-blue-600 transition-colors",children:l})]}),e.jsx("nav",{className:"hidden md:flex items-center gap-1",children:x.map(a=>e.jsx(r,{to:a.to,className:`px-3.5 py-2 text-sm rounded-lg transition-all ${i.pathname===a.to?"text-blue-600 bg-blue-50 font-medium":"text-gray-500 hover:text-gray-900 hover:bg-gray-50"}`,children:a.label},a.to))}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(j,{className:"text-gray-400 hover:text-gray-700 hover:bg-gray-50"}),o?e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm text-gray-500 hidden sm:block",children:o.display_name||o.username}),e.jsx("button",{onClick:async()=>{await m(),d("/")},className:"text-sm text-gray-400 hover:text-gray-700 transition-colors",children:s("nav.logout")})]}):e.jsxs(e.Fragment,{children:[e.jsx(r,{to:"/login",className:"text-sm text-gray-500 hover:text-gray-900 px-3 py-2 hidden sm:block transition-colors",children:s("nav.login")}),e.jsx(r,{to:"/register",className:"px-5 py-2 rounded-lg bg-blue-600 text-white text-sm font-medium hover:bg-blue-700 transition-colors shadow-sm",children:s("nav.signUp")})]}),e.jsx("button",{className:"md:hidden p-2 rounded-lg hover:bg-gray-50 transition-colors",onClick:()=>c(!n),"aria-label":"Toggle menu",children:e.jsx("svg",{className:"w-5 h-5 text-gray-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]})]}),n&&e.jsx("div",{className:"md:hidden border-t border-gray-100 bg-white",children:e.jsx("nav",{className:"max-w-6xl mx-auto px-6 py-3 flex flex-col gap-1",children:x.map(a=>e.jsx(r,{to:a.to,onClick:()=>c(!1),className:`px-3 py-2.5 text-sm rounded-lg transition-colors ${i.pathname===a.to?"text-blue-600 bg-blue-50 font-medium":"text-gray-500 hover:text-gray-900 hover:bg-gray-50"}`,children:a.label},a.to))})})]}),e.jsx("main",{className:"flex-1",children:e.jsx(v,{})}),e.jsx("footer",{className:"border-t border-gray-100 mt-auto bg-gray-50/50",children:e.jsxs("div",{className:"max-w-6xl mx-auto px-6 py-8 flex flex-col md:flex-row items-center justify-between gap-4",children:[e.jsxs("p",{className:"text-sm text-gray-400",children:["© ",new Date().getFullYear()," ",l,"."]}),e.jsx("div",{className:"flex items-center gap-4",children:(t==null?void 0:t.contact_email)&&e.jsx("a",{href:`mailto:${t.contact_email}`,className:"text-sm text-gray-400 hover:text-gray-600 transition-colors",children:s("nav.contact")})})]})})]})}export{L as default};
import{u as h,a as g,b as u,c as b,r as p,j as e,L as r,O as v}from"./index-D8eKls75.js";import{L as j}from"./LanguageSwitch-CG9YcMHq.js";import{u as y}from"./useTranslation-D_OVvIX9.js";function L(){const{t:s}=y(),{user:o,logout:m}=h(),{site:t}=g(),d=u(),i=b(),[n,c]=p.useState(!1),l=(t==null?void 0:t.name)||"AI Platform",x=[{to:"/",label:s("nav.home"),auth:!1},{to:"/pricing",label:s("nav.pricing"),auth:!1},{to:"/packages",label:s("nav.packages"),auth:!1},{to:"/dashboard",label:s("nav.dashboard"),auth:!0},{to:"/tokens",label:s("nav.apiKeys"),auth:!0},...t!=null&&t.enable_topup?[{to:"/topup",label:s("nav.topup"),auth:!0}]:[]].filter(a=>!a.auth||o);return e.jsxs("div",{className:"theme-light min-h-screen flex flex-col bg-white text-gray-900",children:[(t==null?void 0:t.announcement)&&e.jsx("div",{className:"bg-blue-50 border-b border-blue-100 text-center py-2.5 px-4",children:e.jsx("p",{className:"text-sm text-blue-700",children:t.announcement})}),e.jsxs("header",{className:"sticky top-0 z-50 bg-white/80 backdrop-blur-xl border-b border-gray-100",children:[e.jsxs("div",{className:"max-w-6xl mx-auto px-6 h-16 flex items-center justify-between",children:[e.jsxs(r,{to:"/",className:"flex items-center gap-3 group",children:[t!=null&&t.logo?e.jsx("img",{src:t.logo,alt:l,className:"h-8 w-auto"}):e.jsx("div",{className:"w-9 h-9 rounded-xl bg-gradient-to-br from-blue-600 to-indigo-600 flex items-center justify-center text-white font-bold text-sm shadow-sm",children:l.charAt(0)}),e.jsx("span",{className:"text-lg font-semibold text-gray-900 group-hover:text-blue-600 transition-colors",children:l})]}),e.jsx("nav",{className:"hidden md:flex items-center gap-1",children:x.map(a=>e.jsx(r,{to:a.to,className:`px-3.5 py-2 text-sm rounded-lg transition-all ${i.pathname===a.to?"text-blue-600 bg-blue-50 font-medium":"text-gray-500 hover:text-gray-900 hover:bg-gray-50"}`,children:a.label},a.to))}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(j,{className:"text-gray-400 hover:text-gray-700 hover:bg-gray-50"}),o?e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm text-gray-500 hidden sm:block",children:o.display_name||o.username}),e.jsx("button",{onClick:async()=>{await m(),d("/")},className:"text-sm text-gray-400 hover:text-gray-700 transition-colors",children:s("nav.logout")})]}):e.jsxs(e.Fragment,{children:[e.jsx(r,{to:"/login",className:"text-sm text-gray-500 hover:text-gray-900 px-3 py-2 hidden sm:block transition-colors",children:s("nav.login")}),e.jsx(r,{to:"/register",className:"px-5 py-2 rounded-lg bg-blue-600 text-white text-sm font-medium hover:bg-blue-700 transition-colors shadow-sm",children:s("nav.signUp")})]}),e.jsx("button",{className:"md:hidden p-2 rounded-lg hover:bg-gray-50 transition-colors",onClick:()=>c(!n),"aria-label":"Toggle menu",children:e.jsx("svg",{className:"w-5 h-5 text-gray-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]})]}),n&&e.jsx("div",{className:"md:hidden border-t border-gray-100 bg-white",children:e.jsx("nav",{className:"max-w-6xl mx-auto px-6 py-3 flex flex-col gap-1",children:x.map(a=>e.jsx(r,{to:a.to,onClick:()=>c(!1),className:`px-3 py-2.5 text-sm rounded-lg transition-colors ${i.pathname===a.to?"text-blue-600 bg-blue-50 font-medium":"text-gray-500 hover:text-gray-900 hover:bg-gray-50"}`,children:a.label},a.to))})})]}),e.jsx("main",{className:"flex-1",children:e.jsx(v,{})}),e.jsx("footer",{className:"border-t border-gray-100 mt-auto bg-gray-50/50",children:e.jsxs("div",{className:"max-w-6xl mx-auto px-6 py-8 flex flex-col md:flex-row items-center justify-between gap-4",children:[e.jsxs("p",{className:"text-sm text-gray-400",children:["© ",new Date().getFullYear()," ",l,"."]}),e.jsx("div",{className:"flex items-center gap-4",children:(t==null?void 0:t.contact_email)&&e.jsx("a",{href:`mailto:${t.contact_email}`,className:"text-sm text-gray-400 hover:text-gray-600 transition-colors",children:s("nav.contact")})})]})})]})}export{L as default};
@@ -1 +1 @@
import{u as d,a as u,b as p,c as b,r as j,j as e,L as n,O as g}from"./index-C1LcEmdp.js";import{L as v}from"./LanguageSwitch-rovTNa8V.js";import{u as f}from"./useTranslation-kIlHvV5e.js";function L(){const{t:s}=f(),{user:l,logout:m}=d(),{site:t}=u(),h=p(),i=b(),[r,c]=j.useState(!1),o=(t==null?void 0:t.name)||"AI Platform",x=[{to:"/",label:s("nav.home"),auth:!1},{to:"/pricing",label:s("nav.pricing"),auth:!1},{to:"/packages",label:s("nav.packages"),auth:!1},{to:"/dashboard",label:s("nav.dashboard"),auth:!0},{to:"/tokens",label:s("nav.apiKeys"),auth:!0},...t!=null&&t.enable_topup?[{to:"/topup",label:s("nav.topup"),auth:!0}]:[]].filter(a=>!a.auth||l);return e.jsxs("div",{className:"min-h-screen flex flex-col bg-neutral-950 text-white",children:[(t==null?void 0:t.announcement)&&e.jsx("div",{className:"border-b border-neutral-800/60 text-center py-2 px-4",children:e.jsx("p",{className:"text-sm text-neutral-400",children:t.announcement})}),e.jsxs("header",{className:"sticky top-0 z-50 backdrop-blur-lg bg-neutral-950/80 border-b border-neutral-800/40",children:[e.jsxs("div",{className:"max-w-5xl mx-auto px-6 h-14 flex items-center justify-between",children:[e.jsxs(n,{to:"/",className:"flex items-center gap-2.5 group",children:[t!=null&&t.logo?e.jsx("img",{src:t.logo,alt:o,className:"h-7 w-auto"}):e.jsx("span",{className:"text-base font-semibold text-white",children:o}),(t==null?void 0:t.logo)&&e.jsx("span",{className:"text-base font-semibold text-white",children:o})]}),e.jsx("nav",{className:"hidden md:flex items-center gap-6",children:x.map(a=>e.jsx(n,{to:a.to,className:`text-sm transition-colors ${i.pathname===a.to?"text-white":"text-neutral-500 hover:text-white"}`,children:a.label},a.to))}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(v,{className:"text-neutral-500 hover:text-white hover:bg-white/5"}),l?e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm text-neutral-500 hidden sm:block",children:l.display_name||l.username}),e.jsx("button",{onClick:async()=>{await m(),h("/")},className:"text-sm text-neutral-500 hover:text-white transition-colors",children:s("nav.logout")})]}):e.jsxs(e.Fragment,{children:[e.jsx(n,{to:"/login",className:"text-sm text-neutral-500 hover:text-white transition-colors hidden sm:block",children:s("nav.login")}),e.jsx(n,{to:"/register",className:"px-4 py-1.5 rounded-lg bg-white text-neutral-900 text-sm font-medium hover:bg-neutral-200 transition-colors",children:s("nav.signUp")})]}),e.jsx("button",{className:"md:hidden p-1",onClick:()=>c(!r),children:e.jsx("svg",{className:"w-5 h-5 text-neutral-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:r?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M6 18L18 6M6 6l12 12"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 6h16M4 12h16M4 18h16"})})})]})]}),r&&e.jsx("div",{className:"md:hidden border-t border-neutral-800/40 bg-neutral-950/95",children:e.jsx("nav",{className:"max-w-5xl mx-auto px-6 py-3 flex flex-col gap-1",children:x.map(a=>e.jsx(n,{to:a.to,onClick:()=>c(!1),className:`px-3 py-2 text-sm rounded transition-colors ${i.pathname===a.to?"text-white":"text-neutral-500 hover:text-white"}`,children:a.label},a.to))})})]}),e.jsx("main",{className:"flex-1",children:e.jsx(g,{})}),e.jsx("footer",{className:"border-t border-neutral-800/40 mt-auto",children:e.jsxs("div",{className:"max-w-5xl mx-auto px-6 py-6 flex flex-col md:flex-row items-center justify-between gap-3",children:[e.jsxs("p",{className:"text-xs text-neutral-600",children:["© ",new Date().getFullYear()," ",o]}),(t==null?void 0:t.contact_email)&&e.jsx("a",{href:`mailto:${t.contact_email}`,className:"text-xs text-neutral-600 hover:text-white transition-colors",children:s("nav.contact")})]})})]})}export{L as default};
import{u as d,a as u,b as p,c as b,r as j,j as e,L as n,O as g}from"./index-D8eKls75.js";import{L as v}from"./LanguageSwitch-CG9YcMHq.js";import{u as f}from"./useTranslation-D_OVvIX9.js";function L(){const{t:s}=f(),{user:l,logout:m}=d(),{site:t}=u(),h=p(),i=b(),[r,c]=j.useState(!1),o=(t==null?void 0:t.name)||"AI Platform",x=[{to:"/",label:s("nav.home"),auth:!1},{to:"/pricing",label:s("nav.pricing"),auth:!1},{to:"/packages",label:s("nav.packages"),auth:!1},{to:"/dashboard",label:s("nav.dashboard"),auth:!0},{to:"/tokens",label:s("nav.apiKeys"),auth:!0},...t!=null&&t.enable_topup?[{to:"/topup",label:s("nav.topup"),auth:!0}]:[]].filter(a=>!a.auth||l);return e.jsxs("div",{className:"min-h-screen flex flex-col bg-neutral-950 text-white",children:[(t==null?void 0:t.announcement)&&e.jsx("div",{className:"border-b border-neutral-800/60 text-center py-2 px-4",children:e.jsx("p",{className:"text-sm text-neutral-400",children:t.announcement})}),e.jsxs("header",{className:"sticky top-0 z-50 backdrop-blur-lg bg-neutral-950/80 border-b border-neutral-800/40",children:[e.jsxs("div",{className:"max-w-5xl mx-auto px-6 h-14 flex items-center justify-between",children:[e.jsxs(n,{to:"/",className:"flex items-center gap-2.5 group",children:[t!=null&&t.logo?e.jsx("img",{src:t.logo,alt:o,className:"h-7 w-auto"}):e.jsx("span",{className:"text-base font-semibold text-white",children:o}),(t==null?void 0:t.logo)&&e.jsx("span",{className:"text-base font-semibold text-white",children:o})]}),e.jsx("nav",{className:"hidden md:flex items-center gap-6",children:x.map(a=>e.jsx(n,{to:a.to,className:`text-sm transition-colors ${i.pathname===a.to?"text-white":"text-neutral-500 hover:text-white"}`,children:a.label},a.to))}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(v,{className:"text-neutral-500 hover:text-white hover:bg-white/5"}),l?e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm text-neutral-500 hidden sm:block",children:l.display_name||l.username}),e.jsx("button",{onClick:async()=>{await m(),h("/")},className:"text-sm text-neutral-500 hover:text-white transition-colors",children:s("nav.logout")})]}):e.jsxs(e.Fragment,{children:[e.jsx(n,{to:"/login",className:"text-sm text-neutral-500 hover:text-white transition-colors hidden sm:block",children:s("nav.login")}),e.jsx(n,{to:"/register",className:"px-4 py-1.5 rounded-lg bg-white text-neutral-900 text-sm font-medium hover:bg-neutral-200 transition-colors",children:s("nav.signUp")})]}),e.jsx("button",{className:"md:hidden p-1",onClick:()=>c(!r),children:e.jsx("svg",{className:"w-5 h-5 text-neutral-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:r?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M6 18L18 6M6 6l12 12"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 6h16M4 12h16M4 18h16"})})})]})]}),r&&e.jsx("div",{className:"md:hidden border-t border-neutral-800/40 bg-neutral-950/95",children:e.jsx("nav",{className:"max-w-5xl mx-auto px-6 py-3 flex flex-col gap-1",children:x.map(a=>e.jsx(n,{to:a.to,onClick:()=>c(!1),className:`px-3 py-2 text-sm rounded transition-colors ${i.pathname===a.to?"text-white":"text-neutral-500 hover:text-white"}`,children:a.label},a.to))})})]}),e.jsx("main",{className:"flex-1",children:e.jsx(g,{})}),e.jsx("footer",{className:"border-t border-neutral-800/40 mt-auto",children:e.jsxs("div",{className:"max-w-5xl mx-auto px-6 py-6 flex flex-col md:flex-row items-center justify-between gap-3",children:[e.jsxs("p",{className:"text-xs text-neutral-600",children:["© ",new Date().getFullYear()," ",o]}),(t==null?void 0:t.contact_email)&&e.jsx("a",{href:`mailto:${t.contact_email}`,className:"text-xs text-neutral-600 hover:text-white transition-colors",children:s("nav.contact")})]})})]})}export{L as default};
@@ -1 +1 @@
import{u as h,a as u,b,c as p,r as g,j as e,L as l,O as v}from"./index-C1LcEmdp.js";import{L as f}from"./LanguageSwitch-rovTNa8V.js";import{u as j}from"./useTranslation-kIlHvV5e.js";function L(){const{t:s}=j(),{user:o,logout:d}=h(),{site:t}=u(),m=b(),i=p(),[r,c]=g.useState(!1),n=(t==null?void 0:t.name)||"AI Platform",x=[{to:"/",label:s("nav.home"),auth:!1},{to:"/pricing",label:s("nav.pricing"),auth:!1},{to:"/packages",label:s("nav.packages"),auth:!1},{to:"/dashboard",label:s("nav.dashboard"),auth:!0},{to:"/tokens",label:s("nav.apiKeys"),auth:!0},...t!=null&&t.enable_topup?[{to:"/topup",label:s("nav.topup"),auth:!0}]:[]].filter(a=>!a.auth||o);return e.jsxs("div",{className:"min-h-screen flex flex-col bg-[#09090b]",children:[(t==null?void 0:t.announcement)&&e.jsx("div",{className:"bg-gradient-to-r from-violet-600/10 via-blue-600/10 to-cyan-600/10 border-b border-white/[0.06] text-center py-2.5 px-4",children:e.jsx("p",{className:"text-sm text-neutral-300",children:t.announcement})}),e.jsxs("header",{className:"sticky top-0 z-50 backdrop-blur-2xl bg-[#09090b]/80 border-b border-white/[0.06]",children:[e.jsxs("div",{className:"max-w-7xl mx-auto px-6 h-16 flex items-center justify-between",children:[e.jsxs(l,{to:"/",className:"flex items-center gap-3 group",children:[t!=null&&t.logo?e.jsx("img",{src:t.logo,alt:n,className:"h-8 w-auto"}):e.jsx("div",{className:"w-9 h-9 rounded-xl bg-gradient-to-br from-violet-500 via-blue-500 to-cyan-500 flex items-center justify-center text-white font-bold text-sm shadow-lg shadow-blue-500/20",children:n.charAt(0)}),e.jsx("span",{className:"text-lg font-semibold text-white group-hover:text-blue-400 transition-colors",children:n})]}),e.jsx("nav",{className:"hidden md:flex items-center gap-1 bg-white/[0.04] rounded-full px-1.5 py-1 border border-white/[0.06]",children:x.map(a=>e.jsx(l,{to:a.to,className:`px-4 py-1.5 text-sm rounded-full transition-all ${i.pathname===a.to?"text-white bg-white/[0.08]":"text-neutral-400 hover:text-white"}`,children:a.label},a.to))}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(f,{className:"text-neutral-400 hover:text-white hover:bg-white/5"}),o?e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm text-neutral-400 hidden sm:block",children:o.display_name||o.username}),e.jsx("button",{onClick:async()=>{await d(),m("/")},className:"text-sm text-neutral-400 hover:text-white transition-colors",children:s("nav.logout")})]}):e.jsxs(e.Fragment,{children:[e.jsx(l,{to:"/login",className:"text-sm text-neutral-400 hover:text-white transition-colors px-3 py-1.5 hidden sm:block",children:s("nav.login")}),e.jsx(l,{to:"/register",className:"px-5 py-2 rounded-full bg-white text-black text-sm font-medium hover:bg-neutral-100 transition-all",children:s("nav.signUp")})]}),e.jsx("button",{className:"md:hidden p-1.5 rounded-lg hover:bg-white/5 transition-colors",onClick:()=>c(!r),"aria-label":"Toggle menu",children:e.jsx("svg",{className:"w-5 h-5 text-neutral-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:r?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]})]}),r&&e.jsx("div",{className:"md:hidden border-t border-white/[0.06] bg-[#09090b]/95 backdrop-blur-2xl",children:e.jsx("nav",{className:"max-w-7xl mx-auto px-6 py-3 flex flex-col gap-1",children:x.map(a=>e.jsx(l,{to:a.to,onClick:()=>c(!1),className:`px-3 py-2 text-sm rounded-lg transition-colors ${i.pathname===a.to?"text-blue-400 bg-blue-500/10":"text-neutral-400 hover:text-white hover:bg-white/5"}`,children:a.label},a.to))})})]}),e.jsx("main",{className:"flex-1",children:e.jsx(v,{})}),e.jsx("footer",{className:"border-t border-white/[0.06] mt-auto bg-[#09090b]",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-8 flex flex-col md:flex-row items-center justify-between gap-4",children:[e.jsxs("p",{className:"text-sm text-neutral-500",children:["© ",new Date().getFullYear()," ",n,"."]}),e.jsx("div",{className:"flex items-center gap-4",children:(t==null?void 0:t.contact_email)&&e.jsx("a",{href:`mailto:${t.contact_email}`,className:"text-sm text-neutral-500 hover:text-neutral-300 transition-colors",children:s("nav.contact")})})]})})]})}export{L as default};
import{u as h,a as u,b,c as p,r as g,j as e,L as l,O as v}from"./index-D8eKls75.js";import{L as f}from"./LanguageSwitch-CG9YcMHq.js";import{u as j}from"./useTranslation-D_OVvIX9.js";function L(){const{t:s}=j(),{user:o,logout:d}=h(),{site:t}=u(),m=b(),i=p(),[r,c]=g.useState(!1),n=(t==null?void 0:t.name)||"AI Platform",x=[{to:"/",label:s("nav.home"),auth:!1},{to:"/pricing",label:s("nav.pricing"),auth:!1},{to:"/packages",label:s("nav.packages"),auth:!1},{to:"/dashboard",label:s("nav.dashboard"),auth:!0},{to:"/tokens",label:s("nav.apiKeys"),auth:!0},...t!=null&&t.enable_topup?[{to:"/topup",label:s("nav.topup"),auth:!0}]:[]].filter(a=>!a.auth||o);return e.jsxs("div",{className:"min-h-screen flex flex-col bg-[#09090b]",children:[(t==null?void 0:t.announcement)&&e.jsx("div",{className:"bg-gradient-to-r from-violet-600/10 via-blue-600/10 to-cyan-600/10 border-b border-white/[0.06] text-center py-2.5 px-4",children:e.jsx("p",{className:"text-sm text-neutral-300",children:t.announcement})}),e.jsxs("header",{className:"sticky top-0 z-50 backdrop-blur-2xl bg-[#09090b]/80 border-b border-white/[0.06]",children:[e.jsxs("div",{className:"max-w-7xl mx-auto px-6 h-16 flex items-center justify-between",children:[e.jsxs(l,{to:"/",className:"flex items-center gap-3 group",children:[t!=null&&t.logo?e.jsx("img",{src:t.logo,alt:n,className:"h-8 w-auto"}):e.jsx("div",{className:"w-9 h-9 rounded-xl bg-gradient-to-br from-violet-500 via-blue-500 to-cyan-500 flex items-center justify-center text-white font-bold text-sm shadow-lg shadow-blue-500/20",children:n.charAt(0)}),e.jsx("span",{className:"text-lg font-semibold text-white group-hover:text-blue-400 transition-colors",children:n})]}),e.jsx("nav",{className:"hidden md:flex items-center gap-1 bg-white/[0.04] rounded-full px-1.5 py-1 border border-white/[0.06]",children:x.map(a=>e.jsx(l,{to:a.to,className:`px-4 py-1.5 text-sm rounded-full transition-all ${i.pathname===a.to?"text-white bg-white/[0.08]":"text-neutral-400 hover:text-white"}`,children:a.label},a.to))}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(f,{className:"text-neutral-400 hover:text-white hover:bg-white/5"}),o?e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm text-neutral-400 hidden sm:block",children:o.display_name||o.username}),e.jsx("button",{onClick:async()=>{await d(),m("/")},className:"text-sm text-neutral-400 hover:text-white transition-colors",children:s("nav.logout")})]}):e.jsxs(e.Fragment,{children:[e.jsx(l,{to:"/login",className:"text-sm text-neutral-400 hover:text-white transition-colors px-3 py-1.5 hidden sm:block",children:s("nav.login")}),e.jsx(l,{to:"/register",className:"px-5 py-2 rounded-full bg-white text-black text-sm font-medium hover:bg-neutral-100 transition-all",children:s("nav.signUp")})]}),e.jsx("button",{className:"md:hidden p-1.5 rounded-lg hover:bg-white/5 transition-colors",onClick:()=>c(!r),"aria-label":"Toggle menu",children:e.jsx("svg",{className:"w-5 h-5 text-neutral-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:r?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]})]}),r&&e.jsx("div",{className:"md:hidden border-t border-white/[0.06] bg-[#09090b]/95 backdrop-blur-2xl",children:e.jsx("nav",{className:"max-w-7xl mx-auto px-6 py-3 flex flex-col gap-1",children:x.map(a=>e.jsx(l,{to:a.to,onClick:()=>c(!1),className:`px-3 py-2 text-sm rounded-lg transition-colors ${i.pathname===a.to?"text-blue-400 bg-blue-500/10":"text-neutral-400 hover:text-white hover:bg-white/5"}`,children:a.label},a.to))})})]}),e.jsx("main",{className:"flex-1",children:e.jsx(v,{})}),e.jsx("footer",{className:"border-t border-white/[0.06] mt-auto bg-[#09090b]",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-8 flex flex-col md:flex-row items-center justify-between gap-4",children:[e.jsxs("p",{className:"text-sm text-neutral-500",children:["© ",new Date().getFullYear()," ",n,"."]}),e.jsx("div",{className:"flex items-center gap-4",children:(t==null?void 0:t.contact_email)&&e.jsx("a",{href:`mailto:${t.contact_email}`,className:"text-sm text-neutral-500 hover:text-neutral-300 transition-colors",children:s("nav.contact")})})]})})]})}export{L as default};
@@ -1 +1 @@
import{u as h,a as u,b as p,c as b,r as f,j as e,L as s,O as g}from"./index-C1LcEmdp.js";import{L as j}from"./LanguageSwitch-rovTNa8V.js";import{u as v}from"./useTranslation-kIlHvV5e.js";function L(){const{t:o}=v(),{user:r,logout:i}=h(),{site:t}=u(),x=p(),m=b(),[n,d]=f.useState(!1),l=(t==null?void 0:t.name)||"AI Platform",c=[{to:"/",label:o("nav.home"),auth:!1},{to:"/pricing",label:o("nav.pricing"),auth:!1},{to:"/packages",label:o("nav.packages"),auth:!1},{to:"/dashboard",label:o("nav.dashboard"),auth:!0},{to:"/tokens",label:o("nav.apiKeys"),auth:!0},...t!=null&&t.enable_topup?[{to:"/topup",label:o("nav.topup"),auth:!0}]:[]].filter(a=>!a.auth||r);return e.jsxs("div",{className:"min-h-screen flex flex-col bg-[#030712] text-white",children:[(t==null?void 0:t.announcement)&&e.jsx("div",{className:"bg-emerald-500/5 border-b border-emerald-500/10 text-center py-2 px-4",children:e.jsx("p",{className:"text-sm text-emerald-300/80 font-mono",children:t.announcement})}),e.jsxs("header",{className:"sticky top-0 z-50 backdrop-blur-xl bg-[#030712]/80 border-b border-emerald-500/[0.08]",children:[e.jsxs("div",{className:"max-w-7xl mx-auto px-6 h-14 flex items-center justify-between",children:[e.jsxs(s,{to:"/",className:"flex items-center gap-3 group",children:[t!=null&&t.logo?e.jsx("img",{src:t.logo,alt:l,className:"h-7 w-auto"}):e.jsx("div",{className:"w-8 h-8 rounded bg-emerald-500/10 border border-emerald-500/20 flex items-center justify-center text-emerald-400 font-bold font-mono text-sm",children:l.charAt(0)}),e.jsx("span",{className:"text-base font-semibold text-emerald-400 font-mono group-hover:text-emerald-300 transition-colors tracking-wide",children:l})]}),e.jsx("nav",{className:"hidden md:flex items-center gap-1",children:c.map(a=>e.jsx(s,{to:a.to,className:`px-3 py-1.5 text-sm font-mono rounded transition-all ${m.pathname===a.to?"text-emerald-400 bg-emerald-500/10":"text-neutral-500 hover:text-emerald-400"}`,children:a.label},a.to))}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(j,{className:"text-neutral-500 hover:text-emerald-400 hover:bg-emerald-500/5 font-mono"}),r?e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm text-neutral-500 font-mono hidden sm:block",children:r.display_name||r.username}),e.jsx("button",{onClick:async()=>{await i(),x("/")},className:"text-sm text-neutral-500 hover:text-emerald-400 font-mono transition-colors",children:o("nav.logout")})]}):e.jsxs(e.Fragment,{children:[e.jsx(s,{to:"/login",className:"text-sm text-neutral-500 hover:text-emerald-400 font-mono transition-colors hidden sm:block px-3 py-1.5",children:o("nav.login")}),e.jsx(s,{to:"/register",className:"px-4 py-1.5 rounded bg-emerald-500/10 border border-emerald-500/20 text-emerald-400 text-sm font-mono hover:bg-emerald-500/15 transition-all",children:o("nav.signUp")})]}),e.jsx("button",{className:"md:hidden p-1.5 rounded hover:bg-white/5",onClick:()=>d(!n),children:e.jsx("svg",{className:"w-5 h-5 text-emerald-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]})]}),n&&e.jsx("div",{className:"md:hidden border-t border-emerald-500/[0.08] bg-[#030712]/95 backdrop-blur-xl",children:e.jsx("nav",{className:"max-w-7xl mx-auto px-6 py-3 flex flex-col gap-1",children:c.map(a=>e.jsx(s,{to:a.to,onClick:()=>d(!1),className:`px-3 py-2 text-sm font-mono rounded transition-colors ${m.pathname===a.to?"text-emerald-400 bg-emerald-500/10":"text-neutral-500 hover:text-emerald-400"}`,children:a.label},a.to))})})]}),e.jsx("main",{className:"flex-1",children:e.jsx(g,{})}),e.jsx("footer",{className:"border-t border-emerald-500/[0.08] mt-auto",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-6 flex flex-col md:flex-row items-center justify-between gap-4",children:[e.jsxs("p",{className:"text-xs text-neutral-600 font-mono",children:["© ",new Date().getFullYear()," ",l]}),(t==null?void 0:t.contact_email)&&e.jsx("a",{href:`mailto:${t.contact_email}`,className:"text-xs text-neutral-600 hover:text-emerald-400 font-mono transition-colors",children:o("nav.contact")})]})})]})}export{L as default};
import{u as h,a as u,b as p,c as b,r as f,j as e,L as s,O as g}from"./index-D8eKls75.js";import{L as j}from"./LanguageSwitch-CG9YcMHq.js";import{u as v}from"./useTranslation-D_OVvIX9.js";function L(){const{t:o}=v(),{user:r,logout:i}=h(),{site:t}=u(),x=p(),m=b(),[n,d]=f.useState(!1),l=(t==null?void 0:t.name)||"AI Platform",c=[{to:"/",label:o("nav.home"),auth:!1},{to:"/pricing",label:o("nav.pricing"),auth:!1},{to:"/packages",label:o("nav.packages"),auth:!1},{to:"/dashboard",label:o("nav.dashboard"),auth:!0},{to:"/tokens",label:o("nav.apiKeys"),auth:!0},...t!=null&&t.enable_topup?[{to:"/topup",label:o("nav.topup"),auth:!0}]:[]].filter(a=>!a.auth||r);return e.jsxs("div",{className:"min-h-screen flex flex-col bg-[#030712] text-white",children:[(t==null?void 0:t.announcement)&&e.jsx("div",{className:"bg-emerald-500/5 border-b border-emerald-500/10 text-center py-2 px-4",children:e.jsx("p",{className:"text-sm text-emerald-300/80 font-mono",children:t.announcement})}),e.jsxs("header",{className:"sticky top-0 z-50 backdrop-blur-xl bg-[#030712]/80 border-b border-emerald-500/[0.08]",children:[e.jsxs("div",{className:"max-w-7xl mx-auto px-6 h-14 flex items-center justify-between",children:[e.jsxs(s,{to:"/",className:"flex items-center gap-3 group",children:[t!=null&&t.logo?e.jsx("img",{src:t.logo,alt:l,className:"h-7 w-auto"}):e.jsx("div",{className:"w-8 h-8 rounded bg-emerald-500/10 border border-emerald-500/20 flex items-center justify-center text-emerald-400 font-bold font-mono text-sm",children:l.charAt(0)}),e.jsx("span",{className:"text-base font-semibold text-emerald-400 font-mono group-hover:text-emerald-300 transition-colors tracking-wide",children:l})]}),e.jsx("nav",{className:"hidden md:flex items-center gap-1",children:c.map(a=>e.jsx(s,{to:a.to,className:`px-3 py-1.5 text-sm font-mono rounded transition-all ${m.pathname===a.to?"text-emerald-400 bg-emerald-500/10":"text-neutral-500 hover:text-emerald-400"}`,children:a.label},a.to))}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(j,{className:"text-neutral-500 hover:text-emerald-400 hover:bg-emerald-500/5 font-mono"}),r?e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm text-neutral-500 font-mono hidden sm:block",children:r.display_name||r.username}),e.jsx("button",{onClick:async()=>{await i(),x("/")},className:"text-sm text-neutral-500 hover:text-emerald-400 font-mono transition-colors",children:o("nav.logout")})]}):e.jsxs(e.Fragment,{children:[e.jsx(s,{to:"/login",className:"text-sm text-neutral-500 hover:text-emerald-400 font-mono transition-colors hidden sm:block px-3 py-1.5",children:o("nav.login")}),e.jsx(s,{to:"/register",className:"px-4 py-1.5 rounded bg-emerald-500/10 border border-emerald-500/20 text-emerald-400 text-sm font-mono hover:bg-emerald-500/15 transition-all",children:o("nav.signUp")})]}),e.jsx("button",{className:"md:hidden p-1.5 rounded hover:bg-white/5",onClick:()=>d(!n),children:e.jsx("svg",{className:"w-5 h-5 text-emerald-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]})]}),n&&e.jsx("div",{className:"md:hidden border-t border-emerald-500/[0.08] bg-[#030712]/95 backdrop-blur-xl",children:e.jsx("nav",{className:"max-w-7xl mx-auto px-6 py-3 flex flex-col gap-1",children:c.map(a=>e.jsx(s,{to:a.to,onClick:()=>d(!1),className:`px-3 py-2 text-sm font-mono rounded transition-colors ${m.pathname===a.to?"text-emerald-400 bg-emerald-500/10":"text-neutral-500 hover:text-emerald-400"}`,children:a.label},a.to))})})]}),e.jsx("main",{className:"flex-1",children:e.jsx(g,{})}),e.jsx("footer",{className:"border-t border-emerald-500/[0.08] mt-auto",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-6 flex flex-col md:flex-row items-center justify-between gap-4",children:[e.jsxs("p",{className:"text-xs text-neutral-600 font-mono",children:["© ",new Date().getFullYear()," ",l]}),(t==null?void 0:t.contact_email)&&e.jsx("a",{href:`mailto:${t.contact_email}`,className:"text-xs text-neutral-600 hover:text-emerald-400 font-mono transition-colors",children:o("nav.contact")})]})})]})}export{L as default};
@@ -1 +1 @@
import{u as h,a as u,b as p,c as g,r as b,j as e,L as o,O as D}from"./index-C1LcEmdp.js";import{L as f}from"./LanguageSwitch-rovTNa8V.js";import{u as v}from"./useTranslation-kIlHvV5e.js";function w(){const{t:a}=v(),{user:l,logout:m}=h(),{site:t}=u(),d=p(),i=g(),[r,c]=b.useState(!1),n=(t==null?void 0:t.name)||"AI Platform",x=[{to:"/",label:a("nav.home"),auth:!1},{to:"/pricing",label:a("nav.pricing"),auth:!1},{to:"/packages",label:a("nav.packages"),auth:!1},{to:"/dashboard",label:a("nav.dashboard"),auth:!0},{to:"/tokens",label:a("nav.apiKeys"),auth:!0},...t!=null&&t.enable_topup?[{to:"/topup",label:a("nav.topup"),auth:!0}]:[]].filter(s=>!s.auth||l);return e.jsxs("div",{className:"theme-light theme-claude min-h-screen flex flex-col bg-[#FAF6F1] text-[#3D3024]",children:[(t==null?void 0:t.announcement)&&e.jsx("div",{className:"bg-[#D97757] text-center py-2.5 px-4",children:e.jsx("p",{className:"text-sm text-white font-medium",children:t.announcement})}),e.jsxs("header",{className:"sticky top-0 z-50 bg-[#FAF6F1]/85 backdrop-blur-xl border-b border-[#E8DDD0]",children:[e.jsxs("div",{className:"max-w-6xl mx-auto px-6 h-16 flex items-center justify-between",children:[e.jsxs(o,{to:"/",className:"flex items-center gap-3 group",children:[t!=null&&t.logo?e.jsx("img",{src:t.logo,alt:n,className:"h-8 w-auto"}):e.jsx("div",{className:"w-9 h-9 rounded-2xl bg-gradient-to-br from-[#D97757] to-[#C4613F] flex items-center justify-center text-white font-bold text-sm shadow-sm",children:n.charAt(0)}),e.jsx("span",{className:"text-lg font-semibold text-[#3D3024] group-hover:text-[#D97757] transition-colors",children:n})]}),e.jsx("nav",{className:"hidden md:flex items-center gap-1",children:x.map(s=>e.jsx(o,{to:s.to,className:`px-3.5 py-2 text-sm rounded-lg transition-all ${i.pathname===s.to?"text-[#D97757] bg-[#D97757]/8 font-medium":"text-[#6B5D4F] hover:text-[#3D3024] hover:bg-[#E8DDD0]/50"}`,children:s.label},s.to))}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(f,{className:"text-[#8B7D6E] hover:text-[#3D3024] hover:bg-[#E8DDD0]/50"}),l?e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm text-[#6B5D4F] hidden sm:block",children:l.display_name||l.username}),e.jsx("button",{onClick:async()=>{await m(),d("/")},className:"text-sm text-[#8B7D6E] hover:text-[#3D3024] transition-colors",children:a("nav.logout")})]}):e.jsxs(e.Fragment,{children:[e.jsx(o,{to:"/login",className:"text-sm text-[#6B5D4F] hover:text-[#3D3024] px-3 py-2 hidden sm:block transition-colors",children:a("nav.login")}),e.jsx(o,{to:"/register",className:"px-5 py-2 rounded-full bg-[#D97757] text-white text-sm font-medium hover:bg-[#C4613F] transition-colors shadow-sm",children:a("nav.signUp")})]}),e.jsx("button",{className:"md:hidden p-2 rounded-lg hover:bg-[#E8DDD0]/50 transition-colors",onClick:()=>c(!r),"aria-label":"Toggle menu",children:e.jsx("svg",{className:"w-5 h-5 text-[#6B5D4F]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:r?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]})]}),r&&e.jsx("div",{className:"md:hidden border-t border-[#E8DDD0] bg-[#FAF6F1]",children:e.jsx("nav",{className:"max-w-6xl mx-auto px-6 py-3 flex flex-col gap-1",children:x.map(s=>e.jsx(o,{to:s.to,onClick:()=>c(!1),className:`px-3 py-2.5 text-sm rounded-lg transition-colors ${i.pathname===s.to?"text-[#D97757] bg-[#D97757]/8 font-medium":"text-[#6B5D4F] hover:text-[#3D3024] hover:bg-[#E8DDD0]/50"}`,children:s.label},s.to))})})]}),e.jsx("main",{className:"flex-1",children:e.jsx(D,{})}),e.jsx("footer",{className:"border-t border-[#E8DDD0] mt-auto bg-[#F5EEE6]",children:e.jsxs("div",{className:"max-w-6xl mx-auto px-6 py-8 flex flex-col md:flex-row items-center justify-between gap-4",children:[e.jsxs("p",{className:"text-sm text-[#8B7D6E]",children:["© ",new Date().getFullYear()," ",n,"."]}),e.jsx("div",{className:"flex items-center gap-4",children:(t==null?void 0:t.contact_email)&&e.jsx("a",{href:`mailto:${t.contact_email}`,className:"text-sm text-[#8B7D6E] hover:text-[#D97757] transition-colors",children:a("nav.contact")})})]})})]})}export{w as default};
import{u as h,a as u,b as p,c as g,r as b,j as e,L as o,O as D}from"./index-D8eKls75.js";import{L as f}from"./LanguageSwitch-CG9YcMHq.js";import{u as v}from"./useTranslation-D_OVvIX9.js";function w(){const{t:a}=v(),{user:l,logout:m}=h(),{site:t}=u(),d=p(),i=g(),[r,c]=b.useState(!1),n=(t==null?void 0:t.name)||"AI Platform",x=[{to:"/",label:a("nav.home"),auth:!1},{to:"/pricing",label:a("nav.pricing"),auth:!1},{to:"/packages",label:a("nav.packages"),auth:!1},{to:"/dashboard",label:a("nav.dashboard"),auth:!0},{to:"/tokens",label:a("nav.apiKeys"),auth:!0},...t!=null&&t.enable_topup?[{to:"/topup",label:a("nav.topup"),auth:!0}]:[]].filter(s=>!s.auth||l);return e.jsxs("div",{className:"theme-light theme-claude min-h-screen flex flex-col bg-[#FAF6F1] text-[#3D3024]",children:[(t==null?void 0:t.announcement)&&e.jsx("div",{className:"bg-[#D97757] text-center py-2.5 px-4",children:e.jsx("p",{className:"text-sm text-white font-medium",children:t.announcement})}),e.jsxs("header",{className:"sticky top-0 z-50 bg-[#FAF6F1]/85 backdrop-blur-xl border-b border-[#E8DDD0]",children:[e.jsxs("div",{className:"max-w-6xl mx-auto px-6 h-16 flex items-center justify-between",children:[e.jsxs(o,{to:"/",className:"flex items-center gap-3 group",children:[t!=null&&t.logo?e.jsx("img",{src:t.logo,alt:n,className:"h-8 w-auto"}):e.jsx("div",{className:"w-9 h-9 rounded-2xl bg-gradient-to-br from-[#D97757] to-[#C4613F] flex items-center justify-center text-white font-bold text-sm shadow-sm",children:n.charAt(0)}),e.jsx("span",{className:"text-lg font-semibold text-[#3D3024] group-hover:text-[#D97757] transition-colors",children:n})]}),e.jsx("nav",{className:"hidden md:flex items-center gap-1",children:x.map(s=>e.jsx(o,{to:s.to,className:`px-3.5 py-2 text-sm rounded-lg transition-all ${i.pathname===s.to?"text-[#D97757] bg-[#D97757]/8 font-medium":"text-[#6B5D4F] hover:text-[#3D3024] hover:bg-[#E8DDD0]/50"}`,children:s.label},s.to))}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(f,{className:"text-[#8B7D6E] hover:text-[#3D3024] hover:bg-[#E8DDD0]/50"}),l?e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm text-[#6B5D4F] hidden sm:block",children:l.display_name||l.username}),e.jsx("button",{onClick:async()=>{await m(),d("/")},className:"text-sm text-[#8B7D6E] hover:text-[#3D3024] transition-colors",children:a("nav.logout")})]}):e.jsxs(e.Fragment,{children:[e.jsx(o,{to:"/login",className:"text-sm text-[#6B5D4F] hover:text-[#3D3024] px-3 py-2 hidden sm:block transition-colors",children:a("nav.login")}),e.jsx(o,{to:"/register",className:"px-5 py-2 rounded-full bg-[#D97757] text-white text-sm font-medium hover:bg-[#C4613F] transition-colors shadow-sm",children:a("nav.signUp")})]}),e.jsx("button",{className:"md:hidden p-2 rounded-lg hover:bg-[#E8DDD0]/50 transition-colors",onClick:()=>c(!r),"aria-label":"Toggle menu",children:e.jsx("svg",{className:"w-5 h-5 text-[#6B5D4F]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:r?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]})]}),r&&e.jsx("div",{className:"md:hidden border-t border-[#E8DDD0] bg-[#FAF6F1]",children:e.jsx("nav",{className:"max-w-6xl mx-auto px-6 py-3 flex flex-col gap-1",children:x.map(s=>e.jsx(o,{to:s.to,onClick:()=>c(!1),className:`px-3 py-2.5 text-sm rounded-lg transition-colors ${i.pathname===s.to?"text-[#D97757] bg-[#D97757]/8 font-medium":"text-[#6B5D4F] hover:text-[#3D3024] hover:bg-[#E8DDD0]/50"}`,children:s.label},s.to))})})]}),e.jsx("main",{className:"flex-1",children:e.jsx(D,{})}),e.jsx("footer",{className:"border-t border-[#E8DDD0] mt-auto bg-[#F5EEE6]",children:e.jsxs("div",{className:"max-w-6xl mx-auto px-6 py-8 flex flex-col md:flex-row items-center justify-between gap-4",children:[e.jsxs("p",{className:"text-sm text-[#8B7D6E]",children:["© ",new Date().getFullYear()," ",n,"."]}),e.jsx("div",{className:"flex items-center gap-4",children:(t==null?void 0:t.contact_email)&&e.jsx("a",{href:`mailto:${t.contact_email}`,className:"text-sm text-[#8B7D6E] hover:text-[#D97757] transition-colors",children:a("nav.contact")})})]})})]})}export{w as default};
@@ -1 +1 @@
import{u as h,a as u,b as p,c as g,r as b,j as e,L as o,O as j}from"./index-C1LcEmdp.js";import{L as f}from"./LanguageSwitch-rovTNa8V.js";import{u as v}from"./useTranslation-kIlHvV5e.js";function L(){const{t:a}=v(),{user:n,logout:m}=h(),{site:t}=u(),d=p(),i=g(),[r,c]=b.useState(!1),l=(t==null?void 0:t.name)||"AI Platform",x=[{to:"/",label:a("nav.home"),auth:!1},{to:"/pricing",label:a("nav.pricing"),auth:!1},{to:"/packages",label:a("nav.packages"),auth:!1},{to:"/dashboard",label:a("nav.dashboard"),auth:!0},{to:"/tokens",label:a("nav.apiKeys"),auth:!0},...t!=null&&t.enable_topup?[{to:"/topup",label:a("nav.topup"),auth:!0}]:[]].filter(s=>!s.auth||n);return e.jsxs("div",{className:"theme-light min-h-screen flex flex-col bg-white text-gray-900",children:[(t==null?void 0:t.announcement)&&e.jsx("div",{className:"bg-slate-900 text-center py-2.5 px-4",children:e.jsx("p",{className:"text-sm text-slate-200",children:t.announcement})}),e.jsxs("header",{className:"sticky top-0 z-50 bg-white border-b border-gray-200",children:[e.jsxs("div",{className:"max-w-7xl mx-auto px-6 lg:px-8 h-16 flex items-center justify-between",children:[e.jsxs(o,{to:"/",className:"flex items-center gap-3 group",children:[t!=null&&t.logo?e.jsx("img",{src:t.logo,alt:l,className:"h-8 w-auto"}):e.jsx("div",{className:"w-8 h-8 rounded-lg bg-slate-900 flex items-center justify-center text-white font-bold text-sm",children:l.charAt(0)}),e.jsx("span",{className:"text-lg font-bold text-slate-900 tracking-tight",children:l})]}),e.jsx("nav",{className:"hidden md:flex items-center gap-0.5",children:x.map(s=>e.jsx(o,{to:s.to,className:`px-4 py-2 text-sm font-medium transition-colors ${i.pathname===s.to?"text-slate-900 border-b-2 border-slate-900":"text-slate-500 hover:text-slate-900"}`,children:s.label},s.to))}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(f,{className:"text-slate-400 hover:text-slate-700 hover:bg-slate-50"}),n?e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm text-slate-600 hidden sm:block font-medium",children:n.display_name||n.username}),e.jsx("button",{onClick:async()=>{await m(),d("/")},className:"text-sm text-slate-400 hover:text-slate-700 transition-colors",children:a("nav.logout")})]}):e.jsxs(e.Fragment,{children:[e.jsx(o,{to:"/login",className:"text-sm text-slate-600 hover:text-slate-900 px-3 py-2 hidden sm:block transition-colors font-medium",children:a("nav.login")}),e.jsx(o,{to:"/register",className:"px-5 py-2 rounded-lg bg-slate-900 text-white text-sm font-medium hover:bg-slate-800 transition-colors",children:a("nav.signUp")})]}),e.jsx("button",{className:"md:hidden p-2 rounded-lg hover:bg-slate-50 transition-colors",onClick:()=>c(!r),"aria-label":"Toggle menu",children:e.jsx("svg",{className:"w-5 h-5 text-slate-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:r?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]})]}),r&&e.jsx("div",{className:"md:hidden border-t border-gray-200 bg-white",children:e.jsx("nav",{className:"max-w-7xl mx-auto px-6 py-3 flex flex-col",children:x.map(s=>e.jsx(o,{to:s.to,onClick:()=>c(!1),className:`px-4 py-3 text-sm font-medium border-b border-gray-100 last:border-0 transition-colors ${i.pathname===s.to?"text-slate-900 bg-slate-50":"text-slate-500 hover:text-slate-900"}`,children:s.label},s.to))})})]}),e.jsx("main",{className:"flex-1",children:e.jsx(j,{})}),e.jsx("footer",{className:"border-t border-gray-200 mt-auto bg-white",children:e.jsx("div",{className:"max-w-7xl mx-auto px-6 lg:px-8 py-10",children:e.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between gap-6",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-sm font-bold text-slate-900 tracking-tight",children:l}),e.jsxs("p",{className:"text-xs text-slate-400 mt-1",children:["© ",new Date().getFullYear()," ",l,". All rights reserved."]})]}),e.jsx("div",{className:"flex items-center gap-6",children:(t==null?void 0:t.contact_email)&&e.jsx("a",{href:`mailto:${t.contact_email}`,className:"text-sm text-slate-400 hover:text-slate-600 transition-colors",children:a("nav.contact")})})]})})})]})}export{L as default};
import{u as h,a as u,b as p,c as g,r as b,j as e,L as o,O as j}from"./index-D8eKls75.js";import{L as f}from"./LanguageSwitch-CG9YcMHq.js";import{u as v}from"./useTranslation-D_OVvIX9.js";function L(){const{t:a}=v(),{user:n,logout:m}=h(),{site:t}=u(),d=p(),i=g(),[r,c]=b.useState(!1),l=(t==null?void 0:t.name)||"AI Platform",x=[{to:"/",label:a("nav.home"),auth:!1},{to:"/pricing",label:a("nav.pricing"),auth:!1},{to:"/packages",label:a("nav.packages"),auth:!1},{to:"/dashboard",label:a("nav.dashboard"),auth:!0},{to:"/tokens",label:a("nav.apiKeys"),auth:!0},...t!=null&&t.enable_topup?[{to:"/topup",label:a("nav.topup"),auth:!0}]:[]].filter(s=>!s.auth||n);return e.jsxs("div",{className:"theme-light min-h-screen flex flex-col bg-white text-gray-900",children:[(t==null?void 0:t.announcement)&&e.jsx("div",{className:"bg-slate-900 text-center py-2.5 px-4",children:e.jsx("p",{className:"text-sm text-slate-200",children:t.announcement})}),e.jsxs("header",{className:"sticky top-0 z-50 bg-white border-b border-gray-200",children:[e.jsxs("div",{className:"max-w-7xl mx-auto px-6 lg:px-8 h-16 flex items-center justify-between",children:[e.jsxs(o,{to:"/",className:"flex items-center gap-3 group",children:[t!=null&&t.logo?e.jsx("img",{src:t.logo,alt:l,className:"h-8 w-auto"}):e.jsx("div",{className:"w-8 h-8 rounded-lg bg-slate-900 flex items-center justify-center text-white font-bold text-sm",children:l.charAt(0)}),e.jsx("span",{className:"text-lg font-bold text-slate-900 tracking-tight",children:l})]}),e.jsx("nav",{className:"hidden md:flex items-center gap-0.5",children:x.map(s=>e.jsx(o,{to:s.to,className:`px-4 py-2 text-sm font-medium transition-colors ${i.pathname===s.to?"text-slate-900 border-b-2 border-slate-900":"text-slate-500 hover:text-slate-900"}`,children:s.label},s.to))}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(f,{className:"text-slate-400 hover:text-slate-700 hover:bg-slate-50"}),n?e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm text-slate-600 hidden sm:block font-medium",children:n.display_name||n.username}),e.jsx("button",{onClick:async()=>{await m(),d("/")},className:"text-sm text-slate-400 hover:text-slate-700 transition-colors",children:a("nav.logout")})]}):e.jsxs(e.Fragment,{children:[e.jsx(o,{to:"/login",className:"text-sm text-slate-600 hover:text-slate-900 px-3 py-2 hidden sm:block transition-colors font-medium",children:a("nav.login")}),e.jsx(o,{to:"/register",className:"px-5 py-2 rounded-lg bg-slate-900 text-white text-sm font-medium hover:bg-slate-800 transition-colors",children:a("nav.signUp")})]}),e.jsx("button",{className:"md:hidden p-2 rounded-lg hover:bg-slate-50 transition-colors",onClick:()=>c(!r),"aria-label":"Toggle menu",children:e.jsx("svg",{className:"w-5 h-5 text-slate-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:r?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]})]}),r&&e.jsx("div",{className:"md:hidden border-t border-gray-200 bg-white",children:e.jsx("nav",{className:"max-w-7xl mx-auto px-6 py-3 flex flex-col",children:x.map(s=>e.jsx(o,{to:s.to,onClick:()=>c(!1),className:`px-4 py-3 text-sm font-medium border-b border-gray-100 last:border-0 transition-colors ${i.pathname===s.to?"text-slate-900 bg-slate-50":"text-slate-500 hover:text-slate-900"}`,children:s.label},s.to))})})]}),e.jsx("main",{className:"flex-1",children:e.jsx(j,{})}),e.jsx("footer",{className:"border-t border-gray-200 mt-auto bg-white",children:e.jsx("div",{className:"max-w-7xl mx-auto px-6 lg:px-8 py-10",children:e.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between gap-6",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-sm font-bold text-slate-900 tracking-tight",children:l}),e.jsxs("p",{className:"text-xs text-slate-400 mt-1",children:["© ",new Date().getFullYear()," ",l,". All rights reserved."]})]}),e.jsx("div",{className:"flex items-center gap-6",children:(t==null?void 0:t.contact_email)&&e.jsx("a",{href:`mailto:${t.contact_email}`,className:"text-sm text-slate-400 hover:text-slate-600 transition-colors",children:a("nav.contact")})})]})})})]})}export{L as default};
@@ -1 +1 @@
import{u as v,a as w,b as y,c as k,r as p,j as e,N as L,L as S,z as x}from"./index-C1LcEmdp.js";import{u as C}from"./useTranslation-kIlHvV5e.js";function A(){var c,m;const{t:s}=C(),{login:g,user:h}=v(),{site:n}=w(),f=y(),l=k(),[t,o]=p.useState({username:"",password:""}),[r,i]=p.useState(!1);if(h){const a=((m=(c=l.state)==null?void 0:c.from)==null?void 0:m.pathname)||"/dashboard";return e.jsx(L,{to:a,replace:!0})}const b=async a=>{var u,d;if(a.preventDefault(),!t.username||!t.password){x.error(s("login.fillAllFields"));return}i(!0);try{if((await g(t.username,t.password)).success){x.success(s("login.welcomeBackToast"));const N=((d=(u=l.state)==null?void 0:u.from)==null?void 0:d.pathname)||"/dashboard";f(N,{replace:!0});return}}catch{}i(!1)};return e.jsx("div",{className:"min-h-[70vh] flex items-center justify-center px-6",children:e.jsx("div",{className:"w-full max-w-md",children:e.jsxs("div",{className:"glass rounded-2xl p-8",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("h1",{className:"text-2xl font-heading font-bold text-page mb-2",children:s("login.welcomeBack")}),e.jsx("p",{className:"text-sm text-page-secondary",children:n!=null&&n.name?s("login.signInTo",{name:n.name}):s("login.signInToDefault")})]}),e.jsxs("form",{onSubmit:b,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-page-label mb-1.5",children:s("login.username")}),e.jsx("input",{type:"text",value:t.username,onChange:a=>o({...t,username:a.target.value}),className:"input",placeholder:s("login.enterUsername"),autoComplete:"username",required:!0})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-page-label mb-1.5",children:s("login.password")}),e.jsx("input",{type:"password",value:t.password,onChange:a=>o({...t,password:a.target.value}),className:"input",placeholder:s("login.enterPassword"),autoComplete:"current-password",required:!0})]}),e.jsxs("button",{type:"submit",disabled:r,className:"btn-primary w-full flex items-center justify-center gap-2",children:[r&&e.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}),s(r?"login.signingIn":"login.signInBtn")]})]}),e.jsx("div",{className:"mt-6 text-center",children:e.jsxs("p",{className:"text-sm text-page-secondary",children:[s("login.noAccount")," ",e.jsx(S,{to:"/register",className:"text-page-link hover:text-page-link transition-colors font-medium",children:s("login.createOne")})]})})]})})})}export{A as default};
import{u as v,a as w,b as y,c as k,r as p,j as e,N as L,L as S,z as x}from"./index-D8eKls75.js";import{u as C}from"./useTranslation-D_OVvIX9.js";function A(){var c,m;const{t:s}=C(),{login:g,user:h}=v(),{site:n}=w(),f=y(),l=k(),[t,o]=p.useState({username:"",password:""}),[r,i]=p.useState(!1);if(h){const a=((m=(c=l.state)==null?void 0:c.from)==null?void 0:m.pathname)||"/dashboard";return e.jsx(L,{to:a,replace:!0})}const b=async a=>{var u,d;if(a.preventDefault(),!t.username||!t.password){x.error(s("login.fillAllFields"));return}i(!0);try{if((await g(t.username,t.password)).success){x.success(s("login.welcomeBackToast"));const N=((d=(u=l.state)==null?void 0:u.from)==null?void 0:d.pathname)||"/dashboard";f(N,{replace:!0});return}}catch{}i(!1)};return e.jsx("div",{className:"min-h-[70vh] flex items-center justify-center px-6",children:e.jsx("div",{className:"w-full max-w-md",children:e.jsxs("div",{className:"glass rounded-2xl p-8",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("h1",{className:"text-2xl font-heading font-bold text-page mb-2",children:s("login.welcomeBack")}),e.jsx("p",{className:"text-sm text-page-secondary",children:n!=null&&n.name?s("login.signInTo",{name:n.name}):s("login.signInToDefault")})]}),e.jsxs("form",{onSubmit:b,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-page-label mb-1.5",children:s("login.username")}),e.jsx("input",{type:"text",value:t.username,onChange:a=>o({...t,username:a.target.value}),className:"input",placeholder:s("login.enterUsername"),autoComplete:"username",required:!0})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-page-label mb-1.5",children:s("login.password")}),e.jsx("input",{type:"password",value:t.password,onChange:a=>o({...t,password:a.target.value}),className:"input",placeholder:s("login.enterPassword"),autoComplete:"current-password",required:!0})]}),e.jsxs("button",{type:"submit",disabled:r,className:"btn-primary w-full flex items-center justify-center gap-2",children:[r&&e.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}),s(r?"login.signingIn":"login.signInBtn")]})]}),e.jsx("div",{className:"mt-6 text-center",children:e.jsxs("p",{className:"text-sm text-page-secondary",children:[s("login.noAccount")," ",e.jsx(S,{to:"/register",className:"text-page-link hover:text-page-link transition-colors font-medium",children:s("login.createOne")})]})})]})})})}export{A as default};
@@ -1 +1 @@
import{u as D,b as $,r as c,l as A,f as R,m as k,j as e,Q as o,L as W,s as z,z as v}from"./index-C1LcEmdp.js";import{c as I,R as Q}from"./RotatingEquiv-ByYi0mto.js";import{u as T}from"./useTranslation-kIlHvV5e.js";const y={never:"packages.resetNever",daily:"packages.resetDaily",weekly:"packages.resetWeekly",monthly:"packages.resetMonthly"};function w(a){return a?new Date(a*1e3).toLocaleDateString():""}function G(){const{t:a}=T(),{user:l,refreshUser:S}=D(),_=$(),[L,q]=c.useState([]),[g,P]=c.useState([]),[M,C]=c.useState(!0),[d,h]=c.useState(null),[b,f]=c.useState([]),[i,m]=c.useState(null),p=s=>a(y[s]||y.never);c.useEffect(()=>{Promise.all([A().then(s=>{s.data.success&&q(s.data.data||[])}).catch(()=>{}),R().then(s=>{s.data.success&&P(s.data.data||[])}).catch(()=>{})]).finally(()=>C(!1))},[]),c.useEffect(()=>{l&&k().then(s=>{s.data.success&&f(s.data.data||[])}).catch(()=>{})},[l]);const F=async s=>{if(!l){_("/register");return}m(s)},E=async()=>{if(!i)return;const s=i.id;h(s);try{const n=await z(s);n.data.success?(v.success(a("packages.subscribedSuccess")),m(null),await S(),k().then(t=>{t.data.success&&f(t.data.data||[])}).catch(()=>{})):v.error(n.data.message||a("common.requestFailed"))}catch{}h(null)},B=c.useMemo(()=>g.filter(s=>s.enabled!==!1),[g]);if(M)return e.jsx("div",{className:"flex items-center justify-center min-h-[50vh]",children:e.jsx("div",{className:"w-8 h-8 border-2 border-brand-500/30 border-t-brand-500 rounded-full animate-spin"})});const j=L.filter(s=>s.enabled);return e.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-10",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h1",{className:"text-3xl font-heading font-bold text-page mb-3",children:a("packages.title")}),e.jsx("p",{className:"text-page-secondary max-w-xl mx-auto",children:a("packages.subtitle")})]}),b.length>0&&e.jsxs("div",{className:"max-w-3xl mx-auto mb-10",children:[e.jsx("h2",{className:"text-lg font-semibold text-page mb-4",children:a("packages.mySubscriptions")}),e.jsx("div",{className:"space-y-3",children:b.map(s=>{const n=s.amount_total||0,t=s.amount_used||0,r=Math.max(0,n-t),x=n>0?Math.min(100,t/n*100):0;return e.jsxs("div",{className:"glass rounded-xl p-4 border border-page-divider",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-sm font-medium text-page",children:a("packages.subscriptionId",{id:s.id})}),e.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-green-500/10 text-page-success border border-green-500/20",children:a("packages.active")})]}),e.jsxs("div",{className:"flex items-center gap-4 text-xs text-page-secondary mb-3",children:[e.jsxs("span",{children:[a("packages.expires"),": ",w(s.end_time)]}),s.next_reset_time>0&&e.jsxs("span",{children:[a("packages.nextReset"),": ",w(s.next_reset_time)]})]}),e.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[e.jsx("div",{className:"flex-1 h-2 bg-page-surface rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full bg-gradient-to-r from-brand-500 to-purple-500 transition-all",style:{width:`${x}%`}})}),e.jsxs("span",{className:"text-xs text-page-secondary whitespace-nowrap",children:["$",(r/o).toFixed(2)," / $",(n/o).toFixed(2)]})]})]},s.id)})})]}),j.length===0?e.jsxs("div",{className:"text-center py-12 text-page-secondary",children:[e.jsx("p",{children:a("packages.noPackages")}),e.jsxs(W,{to:"/pricing",className:"text-page-link hover:text-page-link transition-colors mt-2 inline-block",children:[a("packages.checkPricing")," →"]})]}):e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6 max-w-5xl mx-auto",children:j.map((s,n)=>{const t=s.quota_reset_period||"never",r=t!=="never",x=s.quota_amount>0?s.quota_amount/o:0,u=I(B,x);return e.jsx("div",{className:"glass rounded-2xl flex flex-col",children:e.jsxs("div",{className:"p-6 flex-1 flex flex-col",children:[e.jsxs("div",{className:"mb-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h3",{className:"text-xl font-semibold text-page",children:s.name}),r&&e.jsx("span",{className:"text-[10px] px-2 py-0.5 rounded-full bg-purple-500/10 text-page-info border border-purple-500/20",children:p(t)})]}),s.description&&e.jsx("p",{className:"text-sm text-page-secondary mt-1",children:s.description})]}),e.jsxs("div",{className:"mb-6",children:[e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsxs("span",{className:"text-4xl font-bold text-page",children:["$",Number(s.price).toFixed(2)]}),s.original_price>0&&s.original_price>s.price&&e.jsxs("span",{className:"text-lg text-page-muted line-through",children:["$",Number(s.original_price).toFixed(2)]})]}),s.duration>0&&e.jsx("p",{className:"text-sm text-page-muted mt-1",children:a("packages.daysAccess",{count:s.duration})})]}),u.length>0&&e.jsx("div",{className:"bg-gradient-to-r from-amber-500/10 to-orange-500/10 border border-amber-500/20 rounded-xl p-3 mb-4",children:e.jsxs("p",{className:"text-xs texLine truncated
import{u as D,b as $,r as c,l as A,f as R,m as k,j as e,Q as o,L as W,s as z,z as v}from"./index-D8eKls75.js";import{c as I,R as Q}from"./RotatingEquiv-DkCC_t4y.js";import{u as T}from"./useTranslation-D_OVvIX9.js";const y={never:"packages.resetNever",daily:"packages.resetDaily",weekly:"packages.resetWeekly",monthly:"packages.resetMonthly"};function w(a){return a?new Date(a*1e3).toLocaleDateString():""}function G(){const{t:a}=T(),{user:l,refreshUser:S}=D(),_=$(),[L,q]=c.useState([]),[g,P]=c.useState([]),[M,C]=c.useState(!0),[d,h]=c.useState(null),[b,f]=c.useState([]),[i,m]=c.useState(null),p=s=>a(y[s]||y.never);c.useEffect(()=>{Promise.all([A().then(s=>{s.data.success&&q(s.data.data||[])}).catch(()=>{}),R().then(s=>{s.data.success&&P(s.data.data||[])}).catch(()=>{})]).finally(()=>C(!1))},[]),c.useEffect(()=>{l&&k().then(s=>{s.data.success&&f(s.data.data||[])}).catch(()=>{})},[l]);const F=async s=>{if(!l){_("/register");return}m(s)},E=async()=>{if(!i)return;const s=i.id;h(s);try{const n=await z(s);n.data.success?(v.success(a("packages.subscribedSuccess")),m(null),await S(),k().then(t=>{t.data.success&&f(t.data.data||[])}).catch(()=>{})):v.error(n.data.message||a("common.requestFailed"))}catch{}h(null)},B=c.useMemo(()=>g.filter(s=>s.enabled!==!1),[g]);if(M)return e.jsx("div",{className:"flex items-center justify-center min-h-[50vh]",children:e.jsx("div",{className:"w-8 h-8 border-2 border-brand-500/30 border-t-brand-500 rounded-full animate-spin"})});const j=L.filter(s=>s.enabled);return e.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-10",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h1",{className:"text-3xl font-heading font-bold text-page mb-3",children:a("packages.title")}),e.jsx("p",{className:"text-page-secondary max-w-xl mx-auto",children:a("packages.subtitle")})]}),b.length>0&&e.jsxs("div",{className:"max-w-3xl mx-auto mb-10",children:[e.jsx("h2",{className:"text-lg font-semibold text-page mb-4",children:a("packages.mySubscriptions")}),e.jsx("div",{className:"space-y-3",children:b.map(s=>{const n=s.amount_total||0,t=s.amount_used||0,r=Math.max(0,n-t),x=n>0?Math.min(100,t/n*100):0;return e.jsxs("div",{className:"glass rounded-xl p-4 border border-page-divider",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-sm font-medium text-page",children:a("packages.subscriptionId",{id:s.id})}),e.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-green-500/10 text-page-success border border-green-500/20",children:a("packages.active")})]}),e.jsxs("div",{className:"flex items-center gap-4 text-xs text-page-secondary mb-3",children:[e.jsxs("span",{children:[a("packages.expires"),": ",w(s.end_time)]}),s.next_reset_time>0&&e.jsxs("span",{children:[a("packages.nextReset"),": ",w(s.next_reset_time)]})]}),e.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[e.jsx("div",{className:"flex-1 h-2 bg-page-surface rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full bg-gradient-to-r from-brand-500 to-purple-500 transition-all",style:{width:`${x}%`}})}),e.jsxs("span",{className:"text-xs text-page-secondary whitespace-nowrap",children:["$",(r/o).toFixed(2)," / $",(n/o).toFixed(2)]})]})]},s.id)})})]}),j.length===0?e.jsxs("div",{className:"text-center py-12 text-page-secondary",children:[e.jsx("p",{children:a("packages.noPackages")}),e.jsxs(W,{to:"/pricing",className:"text-page-link hover:text-page-link transition-colors mt-2 inline-block",children:[a("packages.checkPricing")," →"]})]}):e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6 max-w-5xl mx-auto",children:j.map((s,n)=>{const t=s.quota_reset_period||"never",r=t!=="never",x=s.quota_amount>0?s.quota_amount/o:0,u=I(B,x);return e.jsx("div",{className:"glass rounded-2xl flex flex-col",children:e.jsxs("div",{className:"p-6 flex-1 flex flex-col",children:[e.jsxs("div",{className:"mb-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h3",{className:"text-xl font-semibold text-page",children:s.name}),r&&e.jsx("span",{className:"text-[10px] px-2 py-0.5 rounded-full bg-purple-500/10 text-page-info border border-purple-500/20",children:p(t)})]}),s.description&&e.jsx("p",{className:"text-sm text-page-secondary mt-1",children:s.description})]}),e.jsxs("div",{className:"mb-6",children:[e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsxs("span",{className:"text-4xl font-bold text-page",children:["$",Number(s.price).toFixed(2)]}),s.original_price>0&&s.original_price>s.price&&e.jsxs("span",{className:"text-lg text-page-muted line-through",children:["$",Number(s.original_price).toFixed(2)]})]}),s.duration>0&&e.jsx("p",{className:"text-sm text-page-muted mt-1",children:a("packages.daysAccess",{count:s.duration})})]}),u.length>0&&e.jsx("div",{className:"bg-gradient-to-r from-amber-500/10 to-orange-500/10 border border-amber-500/20 rounded-xl p-3 mb-4",children:e.jsxs("p",{className:"text-xs texLine truncated
@@ -1 +1 @@
import{r as n,f as j,j as t}from"./index-C1LcEmdp.js";import{u as N}from"./useTranslation-kIlHvV5e.js";function w(){const{t:s}=N(),[m,u]=n.useState([]),[d,h]=n.useState([]),[l,g]=n.useState(""),[r,c]=n.useState(""),[f,b]=n.useState(!0);n.useEffect(()=>{j().then(e=>{e.data.success&&(u(e.data.data||[]),h(e.data.vendors||[]))}).catch(()=>{}).finally(()=>b(!1))},[]);const i=m.filter(e=>e.enabled!==!1),x=n.useMemo(()=>{const e=new Set(i.map(a=>a.vendor_name).filter(Boolean));return d.filter(a=>e.has(a.name))},[i,d]),p=n.useMemo(()=>{let e=i;if(r&&(e=e.filter(a=>a.vendor_name===r)),l){const a=l.toLowerCase();e=e.filter(o=>(o.display_name||o.model_name||"").toLowerCase().includes(a))}return e=[...e].sort((a,o)=>(Number(a.input_price)||0)-(Number(o.input_price)||0)),e},[i,r,l]);return f?t.jsx("div",{className:"flex items-center justify-center min-h-[50vh]",children:t.jsx("div",{className:"w-8 h-8 border-2 border-brand-500/30 border-t-brand-500 rounded-full animate-spin"})}):t.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-10",children:[t.jsxs("div",{className:"text-center mb-10",children:[t.jsx("h1",{className:"text-3xl font-heading font-bold text-page mb-3",children:s("pricing.title")}),t.jsx("p",{className:"text-page-secondary max-w-xl mx-auto",children:s("pricing.subtitle")})]}),x.length>0&&t.jsxs("div",{className:"flex flex-wrap justify-center gap-2 mb-6",children:[t.jsx("button",{onClick:()=>c(""),className:`inline-flex items-center gap-1.5 px-3.5 py-2 rounded-xl text-sm font-medium transition-all ${r?"glass-sm text-page-secondary hover:text-page hover:bg-page-surface-hover":"bg-brand-500 text-white shadow-lg shadow-brand-500/25"}`,children:s("pricing.allVendors")}),x.map(e=>t.jsx("button",{onClick:()=>c(e.name),className:`inline-flex items-center gap-1.5 px-3.5 py-2 rounded-xl text-sm font-medium transition-all ${r===e.name?"bg-brand-500 text-white shadow-lg shadow-brand-500/25":"glass-sm text-page-secondary hover:text-page hover:bg-page-surface-hover"}`,children:e.name},e.id))]}),t.jsx("div",{className:"max-w-md mx-auto mb-8",children:t.jsxs("div",{className:"relative",children:[t.jsx("svg",{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-page-muted",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),t.jsx("input",{type:"text",value:l,onChange:e=>g(e.target.value),className:"input !pl-10",placeholder:s("pricing.searchPlaceholder")})]})}),p.length===0?t.jsx("div",{className:"text-center py-12 text-page-secondary",children:s(l||r?"pricing.noMatch":"pricing.noModels")}):t.jsx("div",{className:"glass-sm rounded-xl overflow-hidden",children:t.jsxs("table",{className:"w-full text-sm",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"border-b border-page-divider",children:[t.jsx("th",{className:"text-left px-5 py-3.5 font-medium text-page-secondary",children:s("pricing.model")}),t.jsx("th",{className:"text-right px-5 py-3.5 font-medium text-page-secondary",children:s("pricing.inputPrice")}),t.jsx("th",{className:"text-right px-5 py-3.5 font-medium text-page-secondary",children:s("pricing.outputPrice")}),t.jsx("th",{className:"text-center px-5 py-3.5 font-medium text-page-secondary",children:s("pricing.status")})]})}),t.jsx("tbody",{children:p.map((e,a)=>t.jsxs("tr",{className:"border-b border-page-divider last:border-0 hover:bg-page-surface transition-colors",children:[t.jsx("td",{className:"px-5 py-3.5",children:t.jsx("span",{className:"font-mono text-page",children:e.display_name||e.model_name})}),t.jsx("td",{className:"px-5 py-3.5 text-right font-mono text-page-label",children:e.input_price!=null?`$${(Number(e.input_price)*1e3).toFixed(4)}`:"-"}),t.jsx("td",{className:"px-5 py-3.5 text-right font-mono text-page-label",children:e.output_price!=null?`$${(Number(e.output_price)*1e3).toFixed(4)}`:"-"}),t.jsx("td",{className:"px-5 py-3.5 text-center",children:t.jsxs("span",{className:`inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full text-xs border ${e.status==="healthy"?"bg-green-500/10 text-page-success border-green-500/20":"bg-page-surface text-page-secondary border-page-divider"}`,children:[t.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${e.status==="healthy"?"bg-green-500":"bg-neutral-500"}`}),e.status==="healthy"?s("pricing.online"):s("pricing.unknown")]})})]},e.model_name||a))})]})})]})}export{w as default};
import{r as n,f as j,j as t}from"./index-D8eKls75.js";import{u as N}from"./useTranslation-D_OVvIX9.js";function w(){const{t:s}=N(),[m,u]=n.useState([]),[d,h]=n.useState([]),[l,g]=n.useState(""),[r,c]=n.useState(""),[f,b]=n.useState(!0);n.useEffect(()=>{j().then(e=>{e.data.success&&(u(e.data.data||[]),h(e.data.vendors||[]))}).catch(()=>{}).finally(()=>b(!1))},[]);const i=m.filter(e=>e.enabled!==!1),x=n.useMemo(()=>{const e=new Set(i.map(a=>a.vendor_name).filter(Boolean));return d.filter(a=>e.has(a.name))},[i,d]),p=n.useMemo(()=>{let e=i;if(r&&(e=e.filter(a=>a.vendor_name===r)),l){const a=l.toLowerCase();e=e.filter(o=>(o.display_name||o.model_name||"").toLowerCase().includes(a))}return e=[...e].sort((a,o)=>(Number(a.input_price)||0)-(Number(o.input_price)||0)),e},[i,r,l]);return f?t.jsx("div",{className:"flex items-center justify-center min-h-[50vh]",children:t.jsx("div",{className:"w-8 h-8 border-2 border-brand-500/30 border-t-brand-500 rounded-full animate-spin"})}):t.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-10",children:[t.jsxs("div",{className:"text-center mb-10",children:[t.jsx("h1",{className:"text-3xl font-heading font-bold text-page mb-3",children:s("pricing.title")}),t.jsx("p",{className:"text-page-secondary max-w-xl mx-auto",children:s("pricing.subtitle")})]}),x.length>0&&t.jsxs("div",{className:"flex flex-wrap justify-center gap-2 mb-6",children:[t.jsx("button",{onClick:()=>c(""),className:`inline-flex items-center gap-1.5 px-3.5 py-2 rounded-xl text-sm font-medium transition-all ${r?"glass-sm text-page-secondary hover:text-page hover:bg-page-surface-hover":"bg-brand-500 text-white shadow-lg shadow-brand-500/25"}`,children:s("pricing.allVendors")}),x.map(e=>t.jsx("button",{onClick:()=>c(e.name),className:`inline-flex items-center gap-1.5 px-3.5 py-2 rounded-xl text-sm font-medium transition-all ${r===e.name?"bg-brand-500 text-white shadow-lg shadow-brand-500/25":"glass-sm text-page-secondary hover:text-page hover:bg-page-surface-hover"}`,children:e.name},e.id))]}),t.jsx("div",{className:"max-w-md mx-auto mb-8",children:t.jsxs("div",{className:"relative",children:[t.jsx("svg",{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-page-muted",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),t.jsx("input",{type:"text",value:l,onChange:e=>g(e.target.value),className:"input !pl-10",placeholder:s("pricing.searchPlaceholder")})]})}),p.length===0?t.jsx("div",{className:"text-center py-12 text-page-secondary",children:s(l||r?"pricing.noMatch":"pricing.noModels")}):t.jsx("div",{className:"glass-sm rounded-xl overflow-hidden",children:t.jsxs("table",{className:"w-full text-sm",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"border-b border-page-divider",children:[t.jsx("th",{className:"text-left px-5 py-3.5 font-medium text-page-secondary",children:s("pricing.model")}),t.jsx("th",{className:"text-right px-5 py-3.5 font-medium text-page-secondary",children:s("pricing.inputPrice")}),t.jsx("th",{className:"text-right px-5 py-3.5 font-medium text-page-secondary",children:s("pricing.outputPrice")}),t.jsx("th",{className:"text-center px-5 py-3.5 font-medium text-page-secondary",children:s("pricing.status")})]})}),t.jsx("tbody",{children:p.map((e,a)=>t.jsxs("tr",{className:"border-b border-page-divider last:border-0 hover:bg-page-surface transition-colors",children:[t.jsx("td",{className:"px-5 py-3.5",children:t.jsx("span",{className:"font-mono text-page",children:e.display_name||e.model_name})}),t.jsx("td",{className:"px-5 py-3.5 text-right font-mono text-page-label",children:e.input_price!=null?`$${(Number(e.input_price)*1e3).toFixed(4)}`:"-"}),t.jsx("td",{className:"px-5 py-3.5 text-right font-mono text-page-label",children:e.output_price!=null?`$${(Number(e.output_price)*1e3).toFixed(4)}`:"-"}),t.jsx("td",{className:"px-5 py-3.5 text-center",children:t.jsxs("span",{className:`inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full text-xs border ${e.status==="healthy"?"bg-green-500/10 text-page-success border-green-500/20":"bg-page-surface text-page-secondary border-page-divider"}`,children:[t.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${e.status==="healthy"?"bg-green-500":"bg-neutral-500"}`}),e.status==="healthy"?s("pricing.online"):s("pricing.unknown")]})})]},e.model_name||a))})]})})]})}export{w as default};
@@ -1 +1 @@
import{u as x,a as h,b as w,r as c,j as e,N as f,L as b,z as a}from"./index-C1LcEmdp.js";import{u as j}from"./useTranslation-kIlHvV5e.js";function y(){const{t:s}=j(),{register:d,user:m}=x(),{site:l}=h(),u=w(),[r,i]=c.useState({username:"",password:"",password2:"",email:""}),[n,o]=c.useState(!1);if(m)return e.jsx(f,{to:"/dashboard",replace:!0});const p=async t=>{if(t.preventDefault(),!r.username||!r.password){a.error(s("register.fillRequired"));return}if(r.password!==r.password2){a.error(s("register.passwordMismatch"));return}if(r.password.length<8){a.error(s("register.passwordLength"));return}if(r.password.length>20){a.error(s("register.passwordLength"));return}o(!0);try{if((await d({username:r.username,password:r.password,email:r.email||void 0})).success){a.success(s("register.accountCreated")),u("/login",{replace:!0});return}}catch{}o(!1)};return e.jsx("div",{className:"min-h-[70vh] flex items-center justify-center px-6",children:e.jsx("div",{className:"w-full max-w-md",children:e.jsxs("div",{className:"glass rounded-2xl p-8",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("h1",{className:"text-2xl font-heading font-bold text-page mb-2",children:s("register.createAccount")}),e.jsx("p",{className:"text-sm text-page-secondary",children:l!=null&&l.name?s("register.getStartedWith",{name:l.name}):s("register.getStartedDefault")})]}),e.jsxs("form",{onSubmit:p,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-page-label mb-1.5",children:[s("register.username")," *"]}),e.jsx("input",{type:"text",value:r.username,onChange:t=>i({...r,username:t.target.value}),className:"input",placeholder:s("register.chooseUsername"),autoComplete:"username",required:!0})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-page-label mb-1.5",children:s("register.email")}),e.jsx("input",{type:"email",value:r.email,onChange:t=>i({...r,email:t.target.value}),className:"input",placeholder:s("register.emailPlaceholder"),autoComplete:"email"})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-page-label mb-1.5",children:[s("register.password")," *"]}),e.jsx("input",{type:"password",value:r.password,onChange:t=>i({...r,password:t.target.value}),className:"input",placeholder:s("register.passwordPlaceholder"),autoComplete:"new-password",required:!0})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-page-label mb-1.5",children:[s("register.confirmPassword")," *"]}),e.jsx("input",{type:"password",value:r.password2,onChange:t=>i({...r,password2:t.target.value}),className:"input",placeholder:s("register.repeatPassword"),autoComplete:"new-password",required:!0})]}),e.jsxs("button",{type:"submit",disabled:n,className:"btn-primary w-full flex items-center justify-center gap-2",children:[n&&e.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}),s(n?"register.creating":"register.createAccountBtn")]})]}),e.jsx("div",{className:"mt-6 text-center",children:e.jsxs("p",{className:"text-sm text-page-secondary",children:[s("register.hasAccount")," ",e.jsx(b,{to:"/login",className:"text-page-link hover:text-page-link transition-colors font-medium",children:s("register.signIn")})]})})]})})})}export{y as default};
import{u as x,a as h,b as w,r as c,j as e,N as f,L as b,z as a}from"./index-D8eKls75.js";import{u as j}from"./useTranslation-D_OVvIX9.js";function y(){const{t:s}=j(),{register:d,user:m}=x(),{site:l}=h(),u=w(),[r,i]=c.useState({username:"",password:"",password2:"",email:""}),[n,o]=c.useState(!1);if(m)return e.jsx(f,{to:"/dashboard",replace:!0});const p=async t=>{if(t.preventDefault(),!r.username||!r.password){a.error(s("register.fillRequired"));return}if(r.password!==r.password2){a.error(s("register.passwordMismatch"));return}if(r.password.length<8){a.error(s("register.passwordLength"));return}if(r.password.length>20){a.error(s("register.passwordLength"));return}o(!0);try{if((await d({username:r.username,password:r.password,email:r.email||void 0})).success){a.success(s("register.accountCreated")),u("/login",{replace:!0});return}}catch{}o(!1)};return e.jsx("div",{className:"min-h-[70vh] flex items-center justify-center px-6",children:e.jsx("div",{className:"w-full max-w-md",children:e.jsxs("div",{className:"glass rounded-2xl p-8",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("h1",{className:"text-2xl font-heading font-bold text-page mb-2",children:s("register.createAccount")}),e.jsx("p",{className:"text-sm text-page-secondary",children:l!=null&&l.name?s("register.getStartedWith",{name:l.name}):s("register.getStartedDefault")})]}),e.jsxs("form",{onSubmit:p,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-page-label mb-1.5",children:[s("register.username")," *"]}),e.jsx("input",{type:"text",value:r.username,onChange:t=>i({...r,username:t.target.value}),className:"input",placeholder:s("register.chooseUsername"),autoComplete:"username",required:!0})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-page-label mb-1.5",children:s("register.email")}),e.jsx("input",{type:"email",value:r.email,onChange:t=>i({...r,email:t.target.value}),className:"input",placeholder:s("register.emailPlaceholder"),autoComplete:"email"})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-page-label mb-1.5",children:[s("register.password")," *"]}),e.jsx("input",{type:"password",value:r.password,onChange:t=>i({...r,password:t.target.value}),className:"input",placeholder:s("register.passwordPlaceholder"),autoComplete:"new-password",required:!0})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-page-label mb-1.5",children:[s("register.confirmPassword")," *"]}),e.jsx("input",{type:"password",value:r.password2,onChange:t=>i({...r,password2:t.target.value}),className:"input",placeholder:s("register.repeatPassword"),autoComplete:"new-password",required:!0})]}),e.jsxs("button",{type:"submit",disabled:n,className:"btn-primary w-full flex items-center justify-center gap-2",children:[n&&e.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}),s(n?"register.creating":"register.createAccountBtn")]})]}),e.jsx("div",{className:"mt-6 text-center",children:e.jsxs("p",{className:"text-sm text-page-secondary",children:[s("register.hasAccount")," ",e.jsx(b,{to:"/login",className:"text-page-link hover:text-page-link transition-colors font-medium",children:s("register.signIn")})]})})]})})})}export{y as default};
-1
View File
@@ -1 +0,0 @@
import{r as s,j as c}from"./index-C1LcEmdp.js";const P=[{pattern:"claude-4-sonnet",label:"Claude Sonnet 4",inputPerMtok:3},{pattern:"claude-sonnet-4",label:"Claude Sonnet 4",inputPerMtok:3},{pattern:"claude-4.5-sonnet",label:"Claude 4.5 Sonnet",inputPerMtok:3},{pattern:"claude-4.6-sonnet",label:"Claude 4.6 Sonnet",inputPerMtok:3},{pattern:"claude-4-opus",label:"Claude Opus 4",inputPerMtok:15},{pattern:"claude-opus-4",label:"Claude Opus 4",inputPerMtok:15},{pattern:"claude-4.1-opus",label:"Claude Opus 4.1",inputPerMtok:15},{pattern:"claude-4.5-opus",label:"Claude Opus 4.5",inputPerMtok:5},{pattern:"claude-4.6-opus",label:"Claude Opus 4.6",inputPerMtok:5},{pattern:"claude-3.5-haiku",label:"Claude 3.5 Haiku",inputPerMtok:.8},{pattern:"claude-3-5-haiku",label:"Claude 3.5 Haiku",inputPerMtok:.8},{pattern:"gpt-5.1",label:"GPT-5.1",inputPerMtok:1.25},{pattern:"gpt-5.2",label:"GPT-5.2",inputPerMtok:1.75},{pattern:"gpt-5.3",label:"GPT-5.3",inputPerMtok:1.75},{pattern:"gpt-5.4",label:"GPT-5.4",inputPerMtok:2.5},{pattern:"gpt-4o",label:"GPT-4o",inputPerMtok:2.5},{pattern:"gpt-4.1",label:"GPT-4.1",inputPerMtok:2},{pattern:"gemini-2.5-pro",label:"Gemini 2.5 Pro",inputPerMtok:1.25},{pattern:"gemini-2.5-flash",label:"Gemini 2.5 Flash",inputPerMtok:.15},{pattern:"gemini-2.0-flash",label:"Gemini 2.0 Flash",inputPerMtok:.1},{pattern:"gemini-1.5-pro",label:"Gemini 1.5 Pro",inputPerMtok:1.25}];function k(e,r){if(!e||e.length===0||r<=0)return[];const l={};for(const t of e){const n=Number(t.input_price);if(!n||n<=0)continue;const o=(t.model_name||"").toLowerCase();for(const a of P)if(o.includes(a.pattern.toLowerCase())){const u=n*1e3,p=a.inputPerMtok/u,i=r*p;i>r&&(!l[a.label]||i>l[a.label])&&(l[a.label]=i);break}}return Object.entries(l).map(([t,n])=>({label:t,equivDollars:Math.round(n)})).sort((t,n)=>n.equivDollars-t.equivDollars).slice(0,3)}function d({items:e,text:r,className:l="",interval:t=3e3}){const[n,o]=s.useState(0),[a,u]=s.useState(!0);return s.useEffect(()=>{if(e.length<=1)return;const p=setInterval(()=>{u(!1),setTimeout(()=>{o(i=>(i+1)%e.length),u(!0)},300)},t);return()=>clearInterval(p)},[e.length,t]),!e||e.length===0?null:c.jsx("span",{className:`inline-block transition-all duration-300 ${a?"opacity-100 translate-y-0":"opacity-0 translate-y-1"} ${l}`,children:r(e[n])})}export{d as R,k as c};
+1
View File
@@ -0,0 +1 @@
import{r as s,j as P}from"./index-D8eKls75.js";const c=[{pattern:"claude-opus-4-5",label:"Claude Opus 4.5",inputPerMtok:5},{pattern:"claude-opus-4-6",label:"Claude Opus 4.6",inputPerMtok:5},{pattern:"claude-opus-4-1",label:"Claude Opus 4.1",inputPerMtok:15},{pattern:"claude-opus-4",label:"Claude Opus 4",inputPerMtok:15},{pattern:"claude-3-opus",label:"Claude 3 Opus",inputPerMtok:15},{pattern:"claude-sonnet-4-5",label:"Claude Sonnet 4.5",inputPerMtok:3},{pattern:"claude-sonnet-4-6",label:"Claude Sonnet 4.6",inputPerMtok:3},{pattern:"claude-sonnet-4",label:"Claude Sonnet 4",inputPerMtok:3},{pattern:"claude-3-7-sonnet",label:"Claude 3.7 Sonnet",inputPerMtok:3},{pattern:"claude-3-5-sonnet",label:"Claude 3.5 Sonnet",inputPerMtok:3},{pattern:"claude-haiku-4-5",label:"Claude Haiku 4.5",inputPerMtok:1},{pattern:"claude-3-5-haiku",label:"Claude 3.5 Haiku",inputPerMtok:.8},{pattern:"claude-3-haiku",label:"Claude 3 Haiku",inputPerMtok:.25},{pattern:"gpt-4o-mini",label:"GPT-4o Mini",inputPerMtok:.15},{pattern:"gpt-4o-2024-05-13",label:"GPT-4o",inputPerMtok:5},{pattern:"chatgpt-4o-latest",label:"GPT-4o",inputPerMtok:5},{pattern:"gpt-4o",label:"GPT-4o",inputPerMtok:2.5},{pattern:"gpt-4.1-mini",label:"GPT-4.1 Mini",inputPerMtok:.4},{pattern:"gpt-4.1-nano",label:"GPT-4.1 Nano",inputPerMtok:.1},{pattern:"gpt-4.1",label:"GPT-4.1",inputPerMtok:2},{pattern:"gpt-5.4",label:"GPT-5.4",inputPerMtok:2.5},{pattern:"gpt-5.3",label:"GPT-5.3",inputPerMtok:1.75},{pattern:"gpt-5.2",label:"GPT-5.2",inputPerMtok:1.75},{pattern:"gpt-5.1",label:"GPT-5.1",inputPerMtok:1.25},{pattern:"gemini-2.5-flash-lite",label:"Gemini 2.5 Flash Lite",inputPerMtok:.04},{pattern:"gemini-2.5-flash",label:"Gemini 2.5 Flash",inputPerMtok:.15},{pattern:"gemini-2.5-pro",label:"Gemini 2.5 Pro",inputPerMtok:1.25},{pattern:"gemini-2.0-flash",label:"Gemini 2.0 Flash",inputPerMtok:.1},{pattern:"gemini-1.5-pro",label:"Gemini 1.5 Pro",inputPerMtok:1.25},{pattern:"gemini-1.5-flash",label:"Gemini 1.5 Flash",inputPerMtok:.075},{pattern:"deepseek-r1",label:"DeepSeek R1",inputPerMtok:.55},{pattern:"deepseek-chat",label:"DeepSeek V3",inputPerMtok:.27},{pattern:"deepseek-v3",label:"DeepSeek V3",inputPerMtok:.27}];function b(e,r){if(!e||e.length===0||r<=0)return[];const l={};for(const t of e){const n=Number(t.input_price);if(!n||n<=0)continue;const o=(t.model_name||"").toLowerCase();for(const a of c)if(o.includes(a.pattern.toLowerCase())){const p=n*1e3,u=a.inputPerMtok/p,i=r*u;i>r&&(!l[a.label]||i>l[a.label])&&(l[a.label]=i);break}}return Object.entries(l).map(([t,n])=>({label:t,equivDollars:Math.round(n)})).sort((t,n)=>n.equivDollars-t.equivDollars).slice(0,3)}function M({items:e,text:r,className:l="",interval:t=3e3}){const[n,o]=s.useState(0),[a,p]=s.useState(!0);return s.useEffect(()=>{if(e.length<=1)return;const u=setInterval(()=>{p(!1),setTimeout(()=>{o(i=>(i+1)%e.length),p(!0)},300)},t);return()=>clearInterval(u)},[e.length,t]),!e||e.length===0?null:P.jsx("span",{className:`inline-block transition-all duration-300 ${a?"opacity-100 translate-y-0":"opacity-0 translate-y-1"} ${l}`,children:r(e[n])})}export{M as R,b as c};
@@ -1,4 +1,4 @@
import{r as o,e as E,f as I,j as e,z as C,h as P,i as W,k as U}from"./index-C1LcEmdp.js";import{u as K}from"./useTranslation-kIlHvV5e.js";const F=()=>{var D;const{t}=K(),[v,_]=o.useState([]),[i,L]=o.useState(null),[S,m]=o.useState([]),[l,j]=o.useState(""),[p,A]=o.useState("claudecode"),[H,$]=o.useState(!0),[y,M]=o.useState(!1),[u,x]=o.useState(""),[h,k]=o.useState(!1),T=o.useRef(null),d=window.location.origin,N=[{id:"claudecode",name:"Claude Code",path:"~/.claude/settings.json"},{id:"openclaw",name:"OpenClaw",path:"~/.openclaw/openclaw.json"},{id:"opencode",name:"OpenCode",path:"~/.config/opencode/opencode.json"},{id:"cursor",name:"Cursor",path:"Settings → Models → OpenAI API Key"},{id:"curl",name:"cURL",path:"Terminal"},{id:"python",name:"Python SDK",path:"main.py"},{id:"anthropic",name:"Anthropic SDK",path:"main.py"}];o.useEffect(()=>{a()},[]),o.useEffect(()=>{i&&f(i)},[i]),o.useEffect(()=>{const s=n=>{T.current&&!T.current.contains(n.target)&&k(!1)};return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[]);const a=async()=>{$(!0);try{const s=await E();if(s.data.success){const n=s.data.data||[];_(n),n.length>0&&L(n[0])}}catch{}$(!1)},f=async s=>{try{if(s.model_limits_enabled&&s.model_limits){const r=s.model_limits.split(",").filter(g=>g.trim());m(r),r.length>0&&j(r[0]);return}const n=await I();if(n.data.success&&n.data.data){const g=(Array.isArray(n.data.data)?n.data.data:n.data.data.items||[]).map(b=>b.model_name||b.id||b);m(g),g.length>0&&j(g[0])}}catch{}},c=s=>{const n=s.toLowerCase();return n.includes("claude")?{provider:"anthropic",api:"anthropic-messages"}:n.includes("gpt")||n.includes("o1")||n.includes("o3")?{provider:"openai",api:"openai-chat"}:n.includes("gemini")?{provider:"google",api:"google-chat"}:{provider:"openai",api:"openai-chat"}},w=()=>{if(!i||!l)return"";const s="sk-"+i.key;switch(p){case"claudecode":return`{
import{r as o,e as E,f as I,j as e,z as C,h as P,i as W,k as U}from"./index-D8eKls75.js";import{u as K}from"./useTranslation-D_OVvIX9.js";const F=()=>{var D;const{t}=K(),[v,_]=o.useState([]),[i,L]=o.useState(null),[S,m]=o.useState([]),[l,j]=o.useState(""),[p,A]=o.useState("claudecode"),[H,$]=o.useState(!0),[y,M]=o.useState(!1),[u,x]=o.useState(""),[h,k]=o.useState(!1),T=o.useRef(null),d=window.location.origin,N=[{id:"claudecode",name:"Claude Code",path:"~/.claude/settings.json"},{id:"openclaw",name:"OpenClaw",path:"~/.openclaw/openclaw.json"},{id:"opencode",name:"OpenCode",path:"~/.config/opencode/opencode.json"},{id:"cursor",name:"Cursor",path:"Settings → Models → OpenAI API Key"},{id:"curl",name:"cURL",path:"Terminal"},{id:"python",name:"Python SDK",path:"main.py"},{id:"anthropic",name:"Anthropic SDK",path:"main.py"}];o.useEffect(()=>{a()},[]),o.useEffect(()=>{i&&f(i)},[i]),o.useEffect(()=>{const s=n=>{T.current&&!T.current.contains(n.target)&&k(!1)};return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[]);const a=async()=>{$(!0);try{const s=await E();if(s.data.success){const n=s.data.data||[];_(n),n.length>0&&L(n[0])}}catch{}$(!1)},f=async s=>{try{if(s.model_limits_enabled&&s.model_limits){const r=s.model_limits.split(",").filter(g=>g.trim());m(r),r.length>0&&j(r[0]);return}const n=await I();if(n.data.success&&n.data.data){const g=(Array.isArray(n.data.data)?n.data.data:n.data.data.items||[]).map(b=>b.model_name||b.id||b);m(g),g.length>0&&j(g[0])}}catch{}},c=s=>{const n=s.toLowerCase();return n.includes("claude")?{provider:"anthropic",api:"anthropic-messages"}:n.includes("gpt")||n.includes("o1")||n.includes("o3")?{provider:"openai",api:"openai-chat"}:n.includes("gemini")?{provider:"google",api:"google-chat"}:{provider:"openai",api:"openai-chat"}},w=()=>{if(!i||!l)return"";const s="sk-"+i.key;switch(p){case"claudecode":return`{
"env": {
"ANTHROPIC_API_KEY": "${s}",
"ANTHROPIC_BASE_URL": "${d}/",
@@ -1 +1 @@
import{u as qe,a as $e,r as n,g as Te,n as Oe,j as e,Q as te,d as Me,z as d,o as Ee,p as Le,q as Ue,t as He,v as Re,w as De,x as Fe}from"./index-C1LcEmdp.js";import{C as L}from"./CountUp-M8KqDP8n.js";import{u as ze}from"./useTranslation-kIlHvV5e.js";function Ve(){var Z;const{t:s}=ze(),{user:i,refreshUser:U}=qe(),{site:r}=$e(),[m,se]=n.useState(null),[l,ae]=n.useState(null),[le,H]=n.useState(!0),[T,R]=n.useState(""),[D,F]=n.useState(!1),[h,O]=n.useState(""),[ne,M]=n.useState(null),[z,B]=n.useState(null),[re,W]=n.useState(!1),[b,y]=n.useState(!1),[E,f]=n.useState(""),[C,S]=n.useState(null),[ce,j]=n.useState(!1),[p,Q]=n.useState(""),[k,oe]=n.useState("usdt"),[N,de]=n.useState(null),[P,ie]=n.useState(!1),[J,me]=n.useState([]),[pe,V]=n.useState(!1);r!=null&&r.enable_topup,r==null||r.topup_config;const A=n.useCallback(async()=>{var t;H(!0);try{const[a,c]=await Promise.all([Te(),r!=null&&r.enable_topup?Oe().catch(()=>null):Promise.resolve(null)]);a.data.success&&se(a.data.data),(t=c==null?void 0:c.data)!=null&&t.data&&ae(c.data.data)}catch{}H(!1)},[r==null?void 0:r.enable_topup]);n.useEffect(()=>{A()},[A]);const G=(m==null?void 0:m.quota)??(i==null?void 0:i.quota)??0,ue=(m==null?void 0:m.used_quota)??(i==null?void 0:i.used_quota)??0,xe=(m==null?void 0:m.request_count)??(i==null?void 0:i.request_count)??0,ge=G/te,he=async t=>{if(t.preventDefault(),!!T.trim()){F(!0);try{(await Me(T.trim())).data.success&&(d.success(s("topup.redeemSuccess")),R(""),await Promise.all([A(),U()]))}catch{}F(!1)}},K=async t=>{if(!t||t<=0){B(null);return}W(!0);try{const a=await Ee({amount:parseInt(t)});a.data.message==="success"&&B(a.data.data)}catch{}W(!1)},be=t=>{M(t),O(t),K(t)},ye=t=>["stripe","alipay","wxpay"].includes(t)&&!t.startsWith("epay_"),fe=async t=>{var c;const a=parseInt(h);if(!a||a<=0){d.error(s("topup.enterAmount"));return}y(!0),f(t);try{const u=window.location.origin+"/topup",_={amount:a,payment_method:t,return_url:u};if(ye(t)){const o=await Le(_);if(o.data.message==="success"&&((c=o.data.data)!=null&&c.pay_link))window.open(o.data.data.pay_link,"_blank");else if(o.data.message!=="success"){const x=typeof o.data.data=="string"?o.data.data:o.data.message;d.error(x||s("common.requestFailed"))}}else{const o=await Ue(_);if(o.data.message==="success"){const x=o.data.data,I=o.data.url;if(I&&x){const g=document.createElement("form");g.action=I,g.method="POST",navigator.userAgent.indexOf("Safari")>-1&&navigator.userAgent.indexOf("Chrome")<1||(g.target="_blank");for(const ee in x){const $=document.createElement("input");$.type="hidden",$.name=ee,$.value=x[ee],g.appendChild($)}document.body.appendChild(g),g.submit(),document.body.removeChild(g)}}else{const x=typeof o.data.data=="string"?o.data.data:o.data.message;d.error(x||s("common.requestFailed"))}}}catch{}y(!1),f("")},je=async t=>{var a;y(!0),f("creem");try{const c=await He({product_id:t.productId,payment_method:"creem"});if(c.data.message==="success"&&((a=c.data.data)!=null&&a.checkout_url))window.open(c.data.data.checkout_url,"_blank");else if(c.data.message!=="success"){const u=typeof c.data.data=="string"?c.data.data:c.data.message;d.error(u||s("common.requestFailed"))}}catch{}y(!1),f("")},Ne=async()=>{const t=parseInt(h);if(!t||t<=0){d.error(s("topup.enterAmount"));return}if(!p){d.error(s("topup.selectChain"));return}if(!k){d.error(s("topup.selectToken"));return}y(!0),f("crypto");try{const a=await Re({amount:t,chain:p,token:k});if(a.data.message==="success"&&a.data.data)S(a.data.data),ve(a.data.data.trade_no);else if(a.data.message!=="success"){const c=typeof a.data.data=="string"?a.data.data:a.data.message;d.error(c||s("common.requestFailed"))}}catch{}y(!1),f("")},ve=t=>{j(!0);const a=setInterval(async()=>{var u,_;try{const o=await De(t);((u=o.data.data)==null?void 0:u.status)==="success"?(clearInterval(a),j(!1),S(null),d.success(s("topup.paymentSuccess")),await Promise.all([A(),U()])):((_=o.data.data)==null?void 0:_.status)==="expired"&&(clearInterval(a),j(!1),d.error(s("topup.orderExpired")))}catch{clearInterval(a),j(!1)}},5e3),c=((l==null?void 0:l.crypto_expiry_minutes)||30)*60*1e3;setTimeout(()=>{clearInterval(a),j(!1)},c)},v=(l==null?void 0:l.crypto_wallets)||{},w=n.useMemo(()=>{const t=[];return v.tron&&t.push({key:"tron",label:"TRON (TRC20)"}),v.eth&&t.push({key:"eth",label:"Ethereum (ERC20)"}),v.bsc&&t.push({key:"bsc",label:"BSC (BEP20)"}),t},[v.tron,v.eth,v.bsc]);n.useEffect(()=>{w.length>0&&!p&&Q(w[0].key)},[w,p]);const X=n.useMemo(()=>{if(!(l!=null&&l.creem_products))return[];try{const t=typeof l.creem_products=="string"?JSON.parse(l.creem_products):l.creem_products;return Array.isArray(t)?t:[]}catch{return[]}},[l==null?void 0:l.creem_products]),we=async()=>{var t;V(!0);try{const a=await Fe({page:1,page_size:20});(t=a.data.data)!=null&&t.items&&me(a.data.data.items)}catch{}V(!1)},Ce=(l==null?void 0:l.amount_options)||[1,5,10,20,50,100],q=(l==null?void 0:l.min_topup)||1,_e=(l==null?void 0:l.pay_methods)||[],Se=l==null?void 0:l.enable_online_topup,ke=l==null?void Line truncated
import{u as qe,a as $e,r as n,g as Te,n as Oe,j as e,Q as te,d as Me,z as d,o as Ee,p as Le,q as Ue,t as He,v as Re,w as De,x as Fe}from"./index-D8eKls75.js";import{C as L}from"./CountUp-BixuEoA6.js";import{u as ze}from"./useTranslation-D_OVvIX9.js";function Ve(){var Z;const{t:s}=ze(),{user:i,refreshUser:U}=qe(),{site:r}=$e(),[m,se]=n.useState(null),[l,ae]=n.useState(null),[le,H]=n.useState(!0),[T,R]=n.useState(""),[D,F]=n.useState(!1),[h,O]=n.useState(""),[ne,M]=n.useState(null),[z,B]=n.useState(null),[re,W]=n.useState(!1),[b,y]=n.useState(!1),[E,f]=n.useState(""),[C,S]=n.useState(null),[ce,j]=n.useState(!1),[p,Q]=n.useState(""),[k,oe]=n.useState("usdt"),[N,de]=n.useState(null),[P,ie]=n.useState(!1),[J,me]=n.useState([]),[pe,V]=n.useState(!1);r!=null&&r.enable_topup,r==null||r.topup_config;const A=n.useCallback(async()=>{var t;H(!0);try{const[a,c]=await Promise.all([Te(),r!=null&&r.enable_topup?Oe().catch(()=>null):Promise.resolve(null)]);a.data.success&&se(a.data.data),(t=c==null?void 0:c.data)!=null&&t.data&&ae(c.data.data)}catch{}H(!1)},[r==null?void 0:r.enable_topup]);n.useEffect(()=>{A()},[A]);const G=(m==null?void 0:m.quota)??(i==null?void 0:i.quota)??0,ue=(m==null?void 0:m.used_quota)??(i==null?void 0:i.used_quota)??0,xe=(m==null?void 0:m.request_count)??(i==null?void 0:i.request_count)??0,ge=G/te,he=async t=>{if(t.preventDefault(),!!T.trim()){F(!0);try{(await Me(T.trim())).data.success&&(d.success(s("topup.redeemSuccess")),R(""),await Promise.all([A(),U()]))}catch{}F(!1)}},K=async t=>{if(!t||t<=0){B(null);return}W(!0);try{const a=await Ee({amount:parseInt(t)});a.data.message==="success"&&B(a.data.data)}catch{}W(!1)},be=t=>{M(t),O(t),K(t)},ye=t=>["stripe","alipay","wxpay"].includes(t)&&!t.startsWith("epay_"),fe=async t=>{var c;const a=parseInt(h);if(!a||a<=0){d.error(s("topup.enterAmount"));return}y(!0),f(t);try{const u=window.location.origin+"/topup",_={amount:a,payment_method:t,return_url:u};if(ye(t)){const o=await Le(_);if(o.data.message==="success"&&((c=o.data.data)!=null&&c.pay_link))window.open(o.data.data.pay_link,"_blank");else if(o.data.message!=="success"){const x=typeof o.data.data=="string"?o.data.data:o.data.message;d.error(x||s("common.requestFailed"))}}else{const o=await Ue(_);if(o.data.message==="success"){const x=o.data.data,I=o.data.url;if(I&&x){const g=document.createElement("form");g.action=I,g.method="POST",navigator.userAgent.indexOf("Safari")>-1&&navigator.userAgent.indexOf("Chrome")<1||(g.target="_blank");for(const ee in x){const $=document.createElement("input");$.type="hidden",$.name=ee,$.value=x[ee],g.appendChild($)}document.body.appendChild(g),g.submit(),document.body.removeChild(g)}}else{const x=typeof o.data.data=="string"?o.data.data:o.data.message;d.error(x||s("common.requestFailed"))}}}catch{}y(!1),f("")},je=async t=>{var a;y(!0),f("creem");try{const c=await He({product_id:t.productId,payment_method:"creem"});if(c.data.message==="success"&&((a=c.data.data)!=null&&a.checkout_url))window.open(c.data.data.checkout_url,"_blank");else if(c.data.message!=="success"){const u=typeof c.data.data=="string"?c.data.data:c.data.message;d.error(u||s("common.requestFailed"))}}catch{}y(!1),f("")},Ne=async()=>{const t=parseInt(h);if(!t||t<=0){d.error(s("topup.enterAmount"));return}if(!p){d.error(s("topup.selectChain"));return}if(!k){d.error(s("topup.selectToken"));return}y(!0),f("crypto");try{const a=await Re({amount:t,chain:p,token:k});if(a.data.message==="success"&&a.data.data)S(a.data.data),ve(a.data.data.trade_no);else if(a.data.message!=="success"){const c=typeof a.data.data=="string"?a.data.data:a.data.message;d.error(c||s("common.requestFailed"))}}catch{}y(!1),f("")},ve=t=>{j(!0);const a=setInterval(async()=>{var u,_;try{const o=await De(t);((u=o.data.data)==null?void 0:u.status)==="success"?(clearInterval(a),j(!1),S(null),d.success(s("topup.paymentSuccess")),await Promise.all([A(),U()])):((_=o.data.data)==null?void 0:_.status)==="expired"&&(clearInterval(a),j(!1),d.error(s("topup.orderExpired")))}catch{clearInterval(a),j(!1)}},5e3),c=((l==null?void 0:l.crypto_expiry_minutes)||30)*60*1e3;setTimeout(()=>{clearInterval(a),j(!1)},c)},v=(l==null?void 0:l.crypto_wallets)||{},w=n.useMemo(()=>{const t=[];return v.tron&&t.push({key:"tron",label:"TRON (TRC20)"}),v.eth&&t.push({key:"eth",label:"Ethereum (ERC20)"}),v.bsc&&t.push({key:"bsc",label:"BSC (BEP20)"}),t},[v.tron,v.eth,v.bsc]);n.useEffect(()=>{w.length>0&&!p&&Q(w[0].key)},[w,p]);const X=n.useMemo(()=>{if(!(l!=null&&l.creem_products))return[];try{const t=typeof l.creem_products=="string"?JSON.parse(l.creem_products):l.creem_products;return Array.isArray(t)?t:[]}catch{return[]}},[l==null?void 0:l.creem_products]),we=async()=>{var t;V(!0);try{const a=await Fe({page:1,page_size:20});(t=a.data.data)!=null&&t.items&&me(a.data.data.items)}catch{}V(!1)},Ce=(l==null?void 0:l.amount_options)||[1,5,10,20,50,100],q=(l==null?void 0:l.min_topup)||1,_e=(l==null?void 0:l.pay_methods)||[],Se=l==null?void 0:l.enable_online_topup,ke=l==null?void Line truncated
@@ -1,4 +1,4 @@
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Home-B2GlE1Mp.js","assets/RotatingEquiv-ByYi0mto.js","assets/CountUp-M8KqDP8n.js","assets/FadeContent-CEb-jr-E.js","assets/useTranslation-kIlHvV5e.js","assets/Layout-CAsa4KKn.js","assets/LanguageSwitch-rovTNa8V.js","assets/Home-Cd5nSY1a.js","assets/Layout-BS8ZSjrH.js","assets/Home-5Rp4O19m.js","assets/Layout-SPj6Qlsc.js","assets/Home-D_VkCxtC.js","assets/Layout-B5NB7HJ5.js","assets/Home-D-ipNZp0.js","assets/Layout-ZfNECSe_.js","assets/Home-CyhK9Wc-.js","assets/Layout-Dys-46k2.js","assets/Home-Z4Xt2qzF.js","assets/Layout-C1rCV4ZQ.js","assets/Login-WL0R6qgx.js","assets/Register-BxoHOOlN.js","assets/Dashboard-DDH6EKjw.js","assets/Tokens-Bshgut1A.js","assets/Packages-DO4E8cNd.js","assets/Pricing-BO8JIN62.js","assets/Topup-DJNXKsov.js"])))=>i.map(i=>d[i]);
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Home-qfwynDF2.js","assets/RotatingEquiv-DkCC_t4y.js","assets/CountUp-BixuEoA6.js","assets/FadeContent-B3Mc1Ysf.js","assets/useTranslation-D_OVvIX9.js","assets/Layout-0cB1qtYA.js","assets/LanguageSwitch-CG9YcMHq.js","assets/Home-BuJm_vIH.js","assets/Layout-D-Bm8TiX.js","assets/Home-Biz_0NAt.js","assets/Layout-DmqKjR6M.js","assets/Home-BofCv9GQ.js","assets/Layout-BCQLwwoq.js","assets/Home-zDwhMuTN.js","assets/Layout-2sjWYmyT.js","assets/Home-hgWoWuW8.js","assets/Layout-qJz07ANC.js","assets/Home-B_aQfVX_.js","assets/Layout-NO9JLeRC.js","assets/Login-B-uSRrNm.js","assets/Register-Cqb3fCW-.js","assets/Dashboard-sLmY72mU.js","assets/Tokens-C1-BGu0J.js","assets/Packages-CTK12U-8.js","assets/Pricing-DcAHcsau.js","assets/Topup-CS3pbNbp.js"])))=>i.map(i=>d[i]);
function Vp(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function Hp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ic={exports:{}},go={},Dc={exports:{}},z={};/**
* @license React
* react.production.min.js
@@ -246,4 +246,4 @@ to {
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[rc]=this[rc]={accessors:{}}).accessors,i=this.prototype;function o(s){const l=lr(s);r[l]||(x0(i,s),r[l]=!0)}return S.isArray(t)?t.forEach(o):o(t),this}};De.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);S.reduceDescriptors(De.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});S.freezeMethods(De);function ys(e,t){const n=this||ei,r=t||n,i=De.from(r.headers);let o=r.data;return S.forEach(e,function(l){o=l.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function Ep(e){return!!(e&&e.__CANCEL__)}let ti=class extends A{constructor(t,n,r){super(t??"canceled",A.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Cp(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new A("Request failed with status code "+n.status,[A.ERR_BAD_REQUEST,A.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function E0(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function C0(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,s;return t=t!==void 0?t:1e3,function(a){const u=Date.now(),c=r[o];s||(s=u),n[i]=a,r[i]=u;let f=o,p=0;for(;f!==i;)p+=n[f++],f=f%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),u-s<t)return;const y=c&&u-c;return y?Math.round(p*1e3/y):void 0}}function P0(e,t){let n=0,r=1e3/t,i,o;const s=(u,c=Date.now())=>{n=c,i=null,o&&(clearTimeout(o),o=null),e(...u)};return[(...u)=>{const c=Date.now(),f=c-n;f>=r?s(u,c):(i=u,o||(o=setTimeout(()=>{o=null,s(i)},r-f)))},()=>i&&s(i)]}const fo=(e,t,n=3)=>{let r=0;const i=C0(50,250);return P0(o=>{const s=o.loaded,l=o.lengthComputable?o.total:void 0,a=s-r,u=i(a),c=s<=l;r=s;const f={loaded:s,total:l,progress:l?s/l:void 0,bytes:a,rate:u||void 0,estimated:u&&l&&c?(l-s)/u:void 0,event:o,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(f)},n)},ic=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},oc=e=>(...t)=>S.asap(()=>e(...t)),O0=we.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,we.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(we.origin),we.navigator&&/(msie|trident)/i.test(we.navigator.userAgent)):()=>!0,R0=we.hasStandardBrowserEnv?{write(e,t,n,r,i,o,s){if(typeof document>"u")return;const l=[`${e}=${encodeURIComponent(t)}`];S.isNumber(n)&&l.push(`expires=${new Date(n).toUTCString()}`),S.isString(r)&&l.push(`path=${r}`),S.isString(i)&&l.push(`domain=${i}`),o===!0&&l.push("secure"),S.isString(s)&&l.push(`SameSite=${s}`),document.cookie=l.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function _0(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function L0(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Pp(e,t,n){let r=!_0(t);return e&&(r||n==!1)?L0(e,t):t}const sc=e=>e instanceof De?{...e}:e;function hn(e,t){t=t||{};const n={};function r(u,c,f,p){return S.isPlainObject(u)&&S.isPlainObject(c)?S.merge.call({caseless:p},u,c):S.isPlainObject(c)?S.merge({},c):S.isArray(c)?c.slice():c}function i(u,c,f,p){if(S.isUndefined(c)){if(!S.isUndefined(u))return r(void 0,u,f,p)}else return r(u,c,f,p)}function o(u,c){if(!S.isUndefined(c))return r(void 0,c)}function s(u,c){if(S.isUndefined(c)){if(!S.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function l(u,c,f){if(f in t)return r(u,c);if(f in e)return r(void 0,u)}const a={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l,headers:(u,c,f)=>i(sc(u),sc(c),f,!0)};return S.forEach(Object.keys({...e,...t}),function(c){if(c==="__proto__"||c==="constructor"||c==="prototype")return;const f=S.hasOwnProp(a,c)?a[c]:i,p=f(e[c],t[c],c);S.isUndefined(p)&&f!==l||(n[c]=p)}),n}const Op=e=>{const t=hn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:l}=t;if(t.headers=s=De.from(s),t.url=kp(Pp(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),S.isFormData(n)){if(we.hasStandardBrowserEnv||we.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(S.isFunction(n.getHeaders)){c Line truncated
`+s.map(dc).join(`
`):" "+dc(s[0]):"as no adapter specified";throw new A("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return i}const _p={getAdapter:M0,adapters:Na};function vs(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ti(null,e)}function pc(e){return vs(e),e.headers=De.from(e.headers),e.data=ys.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),_p.getAdapter(e.adapter||ei.adapter,e)(e).then(function(r){return vs(e),r.data=ys.call(e,e.transformResponse,r),r.headers=De.from(r.headers),r},function(r){return Ep(r)||(vs(e),r&&r.response&&(r.response.data=ys.call(e,e.transformResponse,r.response),r.response.headers=De.from(r.response.headers))),Promise.reject(r)})}const Lp="1.13.6",Uo={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Uo[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const hc={};Uo.transitional=function(t,n,r){function i(o,s){return"[Axios v"+Lp+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,l)=>{if(t===!1)throw new A(i(s," has been removed"+(n?" in "+n:"")),A.ERR_DEPRECATED);return n&&!hc[s]&&(hc[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,s,l):!0}};Uo.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function b0(e,t,n){if(typeof e!="object")throw new A("options must be an object",A.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],s=t[o];if(s){const l=e[o],a=l===void 0||s(l,o,e);if(a!==!0)throw new A("option "+o+" must be "+a,A.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new A("Unknown option "+o,A.ERR_BAD_OPTION)}}const zi={assertOptions:b0,validators:Uo},Be=zi.validators;let an=class{constructor(t){this.defaults=t||{},this.interceptors={request:new nc,response:new nc}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=hn(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&zi.assertOptions(r,{silentJSONParsing:Be.transitional(Be.boolean),forcedJSONParsing:Be.transitional(Be.boolean),clarifyTimeoutError:Be.transitional(Be.boolean),legacyInterceptorReqResOrdering:Be.transitional(Be.boolean)},!1),i!=null&&(S.isFunction(i)?n.paramsSerializer={serialize:i}:zi.assertOptions(i,{encode:Be.function,serialize:Be.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),zi.assertOptions(n,{baseUrl:Be.spelling("baseURL"),withXsrfToken:Be.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&S.merge(o.common,o[n.method]);o&&S.forEach(["delete","get","head","post","put","patch","common"],d=>{delete o[d]}),n.headers=De.concat(s,o);const l=[];let a=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(n)===!1)return;a=a&&v.synchronous;const w=n.transitional||La;w&&w.legacyInterceptorReqResOrdering?l.unshift(v.fulfilled,v.rejected):l.push(v.fulfilled,v.rejected)});const u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let c,f=0,p;if(!a){const d=[pc.bind(this),void 0];for(d.unshift(...l),d.push(...u),p=d.length,c=Promise.resolve(n);f<p;)c=c.then(d[f++],d[f++]);return c}p=l.length;let y=n;for(;f<p;){const d=l[f++],v=l[f++];try{y=d(y)}catch(w){v.call(this,w);break}}try{c=pc.call(this,y)}catch(d){return Promise.reject(d)}for(f=0,p=u.length;f<p;)c=c.then(u[f++],u[f++]);return c}getUri(t){t=hn(this.defaults,t);const n=Pp(t.baseURL,t.url,t.allowAbsoluteUrls);return kp(n,t.params,t.paramsSerializer)}};S.forEach(["delete","get","head","options"],function(t){an.prototype[t]=function(n,r){return this.request(hn(r||{},{method:t,url:n,data:(r||{}).data}))}});S.forEach(["post","put","patch"],function(t){function n(r){return function(o,s,l){return this.request(hn(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}an.prototype[t]=n(),an.prototype[t+"Form"]=n(!0)});let B0=class Tp{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(l=>{r.subscribe(l),o=l}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},t(function(o,s,l){r.reason||(r.reason=new ti(o,s,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Tp(function(i){t=i}),cancel:t}}};function V0(e){return function(n){return e.apply(null,n)}}function H0(e){return S.isObject(e)&&e.isAxiosError===!0}const Cl={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Cl).forEach(([e,t])=>{Cl[t]=e});function Np(e){const t=new an(e),n=cp(an.prototype.request,t);return S.extend(n,an.prototype,t,{allOwnKeys:!0}),S.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return Np(hn(e,i))},n}const re=Np(ei);re.Axios=an;re.CanceledError=ti;re.CancelToken=B0;re.isCancel=Ep;re.VERSION=Lp; Line truncated
`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=hn(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&zi.assertOptions(r,{silentJSONParsing:Be.transitional(Be.boolean),forcedJSONParsing:Be.transitional(Be.boolean),clarifyTimeoutError:Be.transitional(Be.boolean),legacyInterceptorReqResOrdering:Be.transitional(Be.boolean)},!1),i!=null&&(S.isFunction(i)?n.paramsSerializer={serialize:i}:zi.assertOptions(i,{encode:Be.function,serialize:Be.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),zi.assertOptions(n,{baseUrl:Be.spelling("baseURL"),withXsrfToken:Be.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&S.merge(o.common,o[n.method]);o&&S.forEach(["delete","get","head","post","put","patch","common"],d=>{delete o[d]}),n.headers=De.concat(s,o);const l=[];let a=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(n)===!1)return;a=a&&v.synchronous;const w=n.transitional||La;w&&w.legacyInterceptorReqResOrdering?l.unshift(v.fulfilled,v.rejected):l.push(v.fulfilled,v.rejected)});const u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let c,f=0,p;if(!a){const d=[pc.bind(this),void 0];for(d.unshift(...l),d.push(...u),p=d.length,c=Promise.resolve(n);f<p;)c=c.then(d[f++],d[f++]);return c}p=l.length;let y=n;for(;f<p;){const d=l[f++],v=l[f++];try{y=d(y)}catch(w){v.call(this,w);break}}try{c=pc.call(this,y)}catch(d){return Promise.reject(d)}for(f=0,p=u.length;f<p;)c=c.then(u[f++],u[f++]);return c}getUri(t){t=hn(this.defaults,t);const n=Pp(t.baseURL,t.url,t.allowAbsoluteUrls);return kp(n,t.params,t.paramsSerializer)}};S.forEach(["delete","get","head","options"],function(t){an.prototype[t]=function(n,r){return this.request(hn(r||{},{method:t,url:n,data:(r||{}).data}))}});S.forEach(["post","put","patch"],function(t){function n(r){return function(o,s,l){return this.request(hn(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}an.prototype[t]=n(),an.prototype[t+"Form"]=n(!0)});let B0=class Tp{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(l=>{r.subscribe(l),o=l}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},t(function(o,s,l){r.reason||(r.reason=new ti(o,s,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Tp(function(i){t=i}),cancel:t}}};function V0(e){return function(n){return e.apply(null,n)}}function H0(e){return S.isObject(e)&&e.isAxiosError===!0}const Cl={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Cl).forEach(([e,t])=>{Cl[t]=e});function Np(e){const t=new an(e),n=cp(an.prototype.request,t);return S.extend(n,an.prototype,t,{allOwnKeys:!0}),S.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return Np(hn(e,i))},n}const re=Np(ei);re.Axios=an;re.CanceledError=ti;re.CancelToken=B0;re.isCancel=Ep;re.VERSION=Lp; Line truncated
@@ -1,4 +1,4 @@
import{r as l,y as q,A as B}from"./index-C1LcEmdp.js";const H=(e,t,r,i)=>{var n,d,y,g;const s=[r,{code:t,...i||{}}];if((d=(n=e==null?void 0:e.services)==null?void 0:n.logger)!=null&&d.forward)return e.services.logger.forward(s,"warn","react-i18next::",!0);p(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),(g=(y=e==null?void 0:e.services)==null?void 0:y.logger)!=null&&g.warn?e.services.logger.warn(...s):console!=null&&console.warn&&console.warn(...s)},z={},U=(e,t,r,i)=>{p(r)&&z[r]||(p(r)&&(z[r]=new Date),H(e,t,r,i))},F=(e,t)=>()=>{if(e.isInitialized)t();else{const r=()=>{setTimeout(()=>{e.off("initialized",r)},0),t()};e.on("initialized",r)}},O=(e,t,r)=>{e.loadNamespaces(t,F(e,r))},A=(e,t,r,i)=>{if(p(r)&&(r=[r]),e.options.preload&&e.options.preload.indexOf(t)>-1)return O(e,r,i);r.forEach(s=>{e.options.ns.indexOf(s)<0&&e.options.ns.push(s)}),e.loadLanguages(t,F(e,i))},J=(e,t,r={})=>!t.languages||!t.languages.length?(U(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:r.lng,precheck:(i,s)=>{if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!s(i.isLanguageChangingTo,e))return!1}}),p=e=>typeof e=="string",K=e=>typeof e=="object"&&e!==null,Q=l.createContext();class V{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var M={exports:{}},$={};/**
import{r as l,y as q,A as B}from"./index-D8eKls75.js";const H=(e,t,r,i)=>{var n,d,y,g;const s=[r,{code:t,...i||{}}];if((d=(n=e==null?void 0:e.services)==null?void 0:n.logger)!=null&&d.forward)return e.services.logger.forward(s,"warn","react-i18next::",!0);p(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),(g=(y=e==null?void 0:e.services)==null?void 0:y.logger)!=null&&g.warn?e.services.logger.warn(...s):console!=null&&console.warn&&console.warn(...s)},z={},U=(e,t,r,i)=>{p(r)&&z[r]||(p(r)&&(z[r]=new Date),H(e,t,r,i))},F=(e,t)=>()=>{if(e.isInitialized)t();else{const r=()=>{setTimeout(()=>{e.off("initialized",r)},0),t()};e.on("initialized",r)}},O=(e,t,r)=>{e.loadNamespaces(t,F(e,r))},A=(e,t,r,i)=>{if(p(r)&&(r=[r]),e.options.preload&&e.options.preload.indexOf(t)>-1)return O(e,r,i);r.forEach(s=>{e.options.ns.indexOf(s)<0&&e.options.ns.push(s)}),e.loadLanguages(t,F(e,i))},J=(e,t,r={})=>!t.languages||!t.languages.length?(U(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:r.lng,precheck:(i,s)=>{if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!s(i.isLanguageChangingTo,e))return!1}}),p=e=>typeof e=="string",K=e=>typeof e=="object"&&e!==null,Q=l.createContext();class V{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var M={exports:{}},$={};/**
* @license React
* use-sync-external-store-shim.production.js
*
+1 -1
View File
@@ -7,7 +7,7 @@
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Noto+Sans+SC:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />
<title>AI Platform</title>
<script type="module" crossorigin src="/assets/index-C1LcEmdp.js"></script>
<script type="module" crossorigin src="/assets/index-D8eKls75.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-Ca2ECE9h.css">
</head>
<body class="bg-black text-white antialiased">
+35 -18
View File
@@ -1,31 +1,48 @@
import { Q } from '../api';
// Official prices (input $/1M tokens) for reference models
// Official prices (input $/1M tokens) for reference models.
// These are the REAL official API prices from Anthropic, OpenAI, Google etc.
// IMPORTANT: More specific patterns MUST come before less specific ones
// (e.g. "claude-opus-4-5" before "claude-opus-4") to avoid false matches.
// Patterns must match actual backend model_name format (e.g. "claude-opus-4-5-20251101").
const OFFICIAL_PRICES = [
// Claude
{ pattern: 'claude-4-sonnet', label: 'Claude Sonnet 4', inputPerMtok: 3 },
{ pattern: 'claude-sonnet-4', label: 'Claude Sonnet 4', inputPerMtok: 3 },
{ pattern: 'claude-4.5-sonnet', label: 'Claude 4.5 Sonnet', inputPerMtok: 3 },
{ pattern: 'claude-4.6-sonnet', label: 'Claude 4.6 Sonnet', inputPerMtok: 3 },
{ pattern: 'claude-4-opus', label: 'Claude Opus 4', inputPerMtok: 15 },
// Claude — order matters: longer/more-specific first
{ pattern: 'claude-opus-4-5', label: 'Claude Opus 4.5', inputPerMtok: 5 },
{ pattern: 'claude-opus-4-6', label: 'Claude Opus 4.6', inputPerMtok: 5 },
{ pattern: 'claude-opus-4-1', label: 'Claude Opus 4.1', inputPerMtok: 15 },
{ pattern: 'claude-opus-4', label: 'Claude Opus 4', inputPerMtok: 15 },
{ pattern: 'claude-4.1-opus', label: 'Claude Opus 4.1', inputPerMtok: 15 },
{ pattern: 'claude-4.5-opus', label: 'Claude Opus 4.5', inputPerMtok: 5 },
{ pattern: 'claude-4.6-opus', label: 'Claude Opus 4.6', inputPerMtok: 5 },
{ pattern: 'claude-3.5-haiku', label: 'Claude 3.5 Haiku', inputPerMtok: 0.8 },
{ pattern: 'claude-3-opus', label: 'Claude 3 Opus', inputPerMtok: 15 },
{ pattern: 'claude-sonnet-4-5', label: 'Claude Sonnet 4.5', inputPerMtok: 3 },
{ pattern: 'claude-sonnet-4-6', label: 'Claude Sonnet 4.6', inputPerMtok: 3 },
{ pattern: 'claude-sonnet-4', label: 'Claude Sonnet 4', inputPerMtok: 3 },
{ pattern: 'claude-3-7-sonnet', label: 'Claude 3.7 Sonnet', inputPerMtok: 3 },
{ pattern: 'claude-3-5-sonnet', label: 'Claude 3.5 Sonnet', inputPerMtok: 3 },
{ pattern: 'claude-haiku-4-5', label: 'Claude Haiku 4.5', inputPerMtok: 1 },
{ pattern: 'claude-3-5-haiku', label: 'Claude 3.5 Haiku', inputPerMtok: 0.8 },
// OpenAI
{ pattern: 'gpt-5.1', label: 'GPT-5.1', inputPerMtok: 1.25 },
{ pattern: 'gpt-5.2', label: 'GPT-5.2', inputPerMtok: 1.75 },
{ pattern: 'gpt-5.3', label: 'GPT-5.3', inputPerMtok: 1.75 },
{ pattern: 'gpt-5.4', label: 'GPT-5.4', inputPerMtok: 2.5 },
{ pattern: 'claude-3-haiku', label: 'Claude 3 Haiku', inputPerMtok: 0.25 },
// OpenAI — more specific first
{ pattern: 'gpt-4o-mini', label: 'GPT-4o Mini', inputPerMtok: 0.15 },
{ pattern: 'gpt-4o-2024-05-13', label: 'GPT-4o', inputPerMtok: 5 },
{ pattern: 'chatgpt-4o-latest', label: 'GPT-4o', inputPerMtok: 5 },
{ pattern: 'gpt-4o', label: 'GPT-4o', inputPerMtok: 2.5 },
{ pattern: 'gpt-4.1-mini', label: 'GPT-4.1 Mini', inputPerMtok: 0.4 },
{ pattern: 'gpt-4.1-nano', label: 'GPT-4.1 Nano', inputPerMtok: 0.1 },
{ pattern: 'gpt-4.1', label: 'GPT-4.1', inputPerMtok: 2 },
// Gemini
{ pattern: 'gemini-2.5-pro', label: 'Gemini 2.5 Pro', inputPerMtok: 1.25 },
{ pattern: 'gpt-5.4', label: 'GPT-5.4', inputPerMtok: 2.5 },
{ pattern: 'gpt-5.3', label: 'GPT-5.3', inputPerMtok: 1.75 },
{ pattern: 'gpt-5.2', label: 'GPT-5.2', inputPerMtok: 1.75 },
{ pattern: 'gpt-5.1', label: 'GPT-5.1', inputPerMtok: 1.25 },
// Gemini — more specific first
{ pattern: 'gemini-2.5-flash-lite', label: 'Gemini 2.5 Flash Lite', inputPerMtok: 0.04 },
{ pattern: 'gemini-2.5-flash', label: 'Gemini 2.5 Flash', inputPerMtok: 0.15 },
{ pattern: 'gemini-2.5-pro', label: 'Gemini 2.5 Pro', inputPerMtok: 1.25 },
{ pattern: 'gemini-2.0-flash', label: 'Gemini 2.0 Flash', inputPerMtok: 0.1 },
{ pattern: 'gemini-1.5-pro', label: 'Gemini 1.5 Pro', inputPerMtok: 1.25 },
{ pattern: 'gemini-1.5-flash', label: 'Gemini 1.5 Flash', inputPerMtok: 0.075 },
// DeepSeek
{ pattern: 'deepseek-r1', label: 'DeepSeek R1', inputPerMtok: 0.55 },
{ pattern: 'deepseek-chat', label: 'DeepSeek V3', inputPerMtok: 0.27 },
{ pattern: 'deepseek-v3', label: 'DeepSeek V3', inputPerMtok: 0.27 },
];
/**