- 新增 4 套主题模板:starter/default/dark/minimal - Starter: 毛玻璃 + GradientText + SpotlightCard (原有风格) - Default: Aurora 极光背景 + SplitText + TiltedCard - Dark: Particles 粒子 + DecryptedText 赛博朋克风格 - Minimal: 极简优雅 + FadeContent 淡入动画 - 新增 i18n 中英双语支持 (i18next + browser-languagedetector) - 新增 ThemeProvider 运行时主题切换 (根据 theme_template 字段) - 新增 11 个 react-bits 动画组件 - 所有页面文案国际化 (Login/Register/Dashboard/Tokens/Pricing/Packages) - 新增 README.md + README.zh.md 含主题切换指南 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
101 lines
22 KiB
JavaScript
101 lines
22 KiB
JavaScript
import{r as o,j as t,u as se,a as ne,l as re,k as oe,L as z}from"./index-Drgd7k5E.js";import{G as ae,R as ie,P as le,M as ce}from"./Mesh-CwXV3WjE.js";import{i as O,P as de,u as ue,L as me,m as L}from"./proxy-BOtdvQpP.js";import{M as he,b as J,d as fe,u as _,e as B,C as xe}from"./CountUp-Omm8FlHl.js";import{u as pe}from"./useTranslation-B7WzaWp0.js";function X(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function ge(...e){return n=>{let r=!1;const c=e.map(d=>{const u=X(d,n);return!r&&typeof u=="function"&&(r=!0),u});if(r)return()=>{for(let d=0;d<c.length;d++){const u=c[d];typeof u=="function"?u():X(e[d],null)}}}}function ve(...e){return o.useCallback(ge(...e),e)}class be extends o.Component{getSnapshotBeforeUpdate(n){const r=this.props.childRef.current;if(O(r)&&n.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const c=r.offsetParent,d=O(c)&&c.offsetWidth||0,u=O(c)&&c.offsetHeight||0,m=getComputedStyle(r),a=this.props.sizeRef.current;a.height=parseFloat(m.height),a.width=parseFloat(m.width),a.top=r.offsetTop,a.left=r.offsetLeft,a.right=d-a.width-a.left,a.bottom=u-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function we({children:e,isPresent:n,anchorX:r,anchorY:c,root:d,pop:u}){var g;const m=o.useId(),a=o.useRef(null),s=o.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:h}=o.useContext(he),x=((g=e.props)==null?void 0:g.ref)??(e==null?void 0:e.ref),b=ve(a,x);return o.useInsertionEffect(()=>{const{width:w,height:p,top:j,left:v,right:y,bottom:P}=s.current;if(n||u===!1||!a.current||!w||!p)return;const I=r==="left"?`left: ${v}`:`right: ${y}`,i=c==="bottom"?`bottom: ${P}`:`top: ${j}`;a.current.dataset.motionPopId=m;const S=document.createElement("style");h&&(S.nonce=h);const E=d??document.head;return E.appendChild(S),S.sheet&&S.sheet.insertRule(`
|
|
[data-motion-pop-id="${m}"] {
|
|
position: absolute !important;
|
|
width: ${w}px !important;
|
|
height: ${p}px !important;
|
|
${I}px !important;
|
|
${i}px !important;
|
|
}
|
|
`),()=>{var k;(k=a.current)==null||k.removeAttribute("data-motion-pop-id"),E.contains(S)&&E.removeChild(S)}},[n]),t.jsx(be,{isPresent:n,childRef:a,sizeRef:s,pop:u,children:u===!1?e:o.cloneElement(e,{ref:b})})}const ye=({children:e,initial:n,isPresent:r,onExitComplete:c,custom:d,presenceAffectsLayout:u,mode:m,anchorX:a,anchorY:s,root:h})=>{const x=J(Ce),b=o.useId();let g=!0,w=o.useMemo(()=>(g=!1,{id:b,initial:n,isPresent:r,custom:d,onExitComplete:p=>{x.set(p,!0);for(const j of x.values())if(!j)return;c&&c()},register:p=>(x.set(p,!1),()=>x.delete(p))}),[r,x,c]);return u&&g&&(w={...w}),o.useMemo(()=>{x.forEach((p,j)=>x.set(j,!1))},[r]),o.useEffect(()=>{!r&&!x.size&&c&&c()},[r]),e=t.jsx(we,{pop:m==="popLayout",isPresent:r,anchorX:a,anchorY:s,root:h,children:e}),t.jsx(de.Provider,{value:w,children:e})};function Ce(){return new Map}const Y=e=>e.key||"";function V(e){const n=[];return o.Children.forEach(e,r=>{o.isValidElement(r)&&n.push(r)}),n}const je=({children:e,custom:n,initial:r=!0,onExitComplete:c,presenceAffectsLayout:d=!0,mode:u="sync",propagate:m=!1,anchorX:a="left",anchorY:s="top",root:h})=>{const[x,b]=ue(m),g=o.useMemo(()=>V(e),[e]),w=m&&!x?[]:g.map(Y),p=o.useRef(!0),j=o.useRef(g),v=J(()=>new Map),y=o.useRef(new Set),[P,I]=o.useState(g),[i,S]=o.useState(g);fe(()=>{p.current=!1,j.current=g;for(let A=0;A<i.length;A++){const f=Y(i[A]);w.includes(f)?(v.delete(f),y.current.delete(f)):v.get(f)!==!0&&v.set(f,!1)}},[i,w.length,w.join("-")]);const E=[];if(g!==P){let A=[...g];for(let f=0;f<i.length;f++){const M=i[f],R=Y(M);w.includes(R)||(A.splice(f,0,M),E.push(M))}return u==="wait"&&E.length&&(A=E),S(V(A)),I(g),null}const{forceRender:k}=o.useContext(me);return t.jsx(t.Fragment,{children:i.map(A=>{const f=Y(A),M=m&&!x?!1:g===i||w.includes(f),R=()=>{if(y.current.has(f))return;if(v.has(f))y.current.add(f),v.set(f,!0);else return;let $=!0;v.forEach(T=>{T||($=!1)}),$&&(k==null||k(),S(j.current),m&&(b==null||b()),c&&c())};return t.jsx(ye,{isPresent:M,initial:!p.current||r?void 0:!1,custom:n,presenceAffectsLayout:d,mode:u,root:h,onExitComplete:M?void 0:R,anchorX:a,anchorY:s,children:A},f)})})},W={black:"#000000",white:"#ffffff",red:"#ff0000",green:"#00ff00",blue:"#0000ff",fuchsia:"#ff00ff",cyan:"#00ffff",yellow:"#ffff00",orange:"#ff8000"};function q(e){e.length===4&&(e=e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);const n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return n||console.warn(`Unable to convert hex string ${e} to rgb values`),[parseInt(n[1],16)/255,parseInt(n[2],16)/255,parseInt(n[3],16)/255]}function Ne(e){return e=parseInt(e),[(e>>16&255)/255,(e>>8&255)/255,(e&255)/255]}function K(e){return e===void 0?[0,0,0]:arguments.length===3?arguments:isNaN(e)?e[0]==="#"?q(e):W[e.toLowerCase()]?q(W[e.toLowerCase()]):(console.warn("Color format not recognised"),[0,0,0]):Ne(e)}class Z extends Array{constructor(n){return Array.isArray(n)?super(...n):super(...K(...arguments))}get r(){return this[0]}get g(){return this[1]}get b(){return this[2]}set r(n){this[0]=n}set g(n){this[1]=n}set b(n){this[2]=n}set(n){return Array.isArray(n)?this.copy(n):this.copy(K(...arguments))}copy(n){return this[0]=n[0],this[1]=n[1],this[2]=n[2],this}}class Se extends ae{constructor(n,{attributes:r={}}={}){Object.assign(r,{position:{size:2,data:new Float32Array([-1,-1,3,-1,-1,3])},uv:{size:2,data:new Float32Array([0,0,2,0,0,2])}}),super(n,r)}}const Me=`#version 300 es
|
|
in vec2 position;
|
|
void main() {
|
|
gl_Position = vec4(position, 0.0, 1.0);
|
|
}
|
|
`,Re=`#version 300 es
|
|
precision highp float;
|
|
|
|
uniform float uTime;
|
|
uniform float uAmplitude;
|
|
uniform vec3 uColorStops[3];
|
|
uniform vec2 uResolution;
|
|
uniform float uBlend;
|
|
|
|
out vec4 fragColor;
|
|
|
|
vec3 permute(vec3 x) {
|
|
return mod(((x * 34.0) + 1.0) * x, 289.0);
|
|
}
|
|
|
|
float snoise(vec2 v){
|
|
const vec4 C = vec4(
|
|
0.211324865405187, 0.366025403784439,
|
|
-0.577350269189626, 0.024390243902439
|
|
);
|
|
vec2 i = floor(v + dot(v, C.yy));
|
|
vec2 x0 = v - i + dot(i, C.xx);
|
|
vec2 i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0);
|
|
vec4 x12 = x0.xyxy + C.xxzz;
|
|
x12.xy -= i1;
|
|
i = mod(i, 289.0);
|
|
|
|
vec3 p = permute(
|
|
permute(i.y + vec3(0.0, i1.y, 1.0))
|
|
+ i.x + vec3(0.0, i1.x, 1.0)
|
|
);
|
|
|
|
vec3 m = max(
|
|
0.5 - vec3(
|
|
dot(x0, x0),
|
|
dot(x12.xy, x12.xy),
|
|
dot(x12.zw, x12.zw)
|
|
),
|
|
0.0
|
|
);
|
|
m = m * m;
|
|
m = m * m;
|
|
|
|
vec3 x = 2.0 * fract(p * C.www) - 1.0;
|
|
vec3 h = abs(x) - 0.5;
|
|
vec3 ox = floor(x + 0.5);
|
|
vec3 a0 = x - ox;
|
|
m *= 1.79284291400159 - 0.85373472095314 * (a0*a0 + h*h);
|
|
|
|
vec3 g;
|
|
g.x = a0.x * x0.x + h.x * x0.y;
|
|
g.yz = a0.yz * x12.xz + h.yz * x12.yw;
|
|
return 130.0 * dot(m, g);
|
|
}
|
|
|
|
struct ColorStop {
|
|
vec3 color;
|
|
float position;
|
|
};
|
|
|
|
#define COLOR_RAMP(colors, factor, finalColor) { int index = 0; for (int i = 0; i < 2; i++) { ColorStop currentColor = colors[i]; bool isInBetween = currentColor.position <= factor; index = int(mix(float(index), float(i), float(isInBetween))); } ColorStop currentColor = colors[index]; ColorStop nextColor = colors[index + 1]; float range = nextColor.position - currentColor.position; float lerpFactor = (factor - currentColor.position) / range; finalColor = mix(currentColor.color, nextColor.color, lerpFactor); }
|
|
|
|
void main() {
|
|
vec2 uv = gl_FragCoord.xy / uResolution;
|
|
|
|
ColorStop colors[3];
|
|
colors[0] = ColorStop(uColorStops[0], 0.0);
|
|
colors[1] = ColorStop(uColorStops[1], 0.5);
|
|
colors[2] = ColorStop(uColorStops[2], 1.0);
|
|
|
|
vec3 rampColor;
|
|
COLOR_RAMP(colors, uv.x, rampColor);
|
|
|
|
float height = snoise(vec2(uv.x * 2.0 + uTime * 0.1, uTime * 0.25)) * 0.5 * uAmplitude;
|
|
height = exp(height);
|
|
height = (uv.y * 2.0 - height + 0.2);
|
|
float intensity = 0.6 * height;
|
|
|
|
float midPoint = 0.20;
|
|
float auroraAlpha = smoothstep(midPoint - uBlend * 0.5, midPoint + uBlend * 0.5, intensity);
|
|
|
|
vec3 auroraColor = intensity * rampColor;
|
|
|
|
fragColor = vec4(auroraColor * auroraAlpha, auroraAlpha);
|
|
}
|
|
`;function Ae(e){const{colorStops:n=["#5227FF","#7cff67","#5227FF"],amplitude:r=1,blend:c=.5}=e,d=o.useRef(e);d.current=e;const u=o.useRef(null);return o.useEffect(()=>{const m=u.current;if(!m)return;const a=new ie({alpha:!0,premultipliedAlpha:!0,antialias:!0}),s=a.gl;s.clearColor(0,0,0,0),s.enable(s.BLEND),s.blendFunc(s.ONE,s.ONE_MINUS_SRC_ALPHA),s.canvas.style.backgroundColor="transparent";let h;function x(){if(!m)return;const v=m.offsetWidth,y=m.offsetHeight;a.setSize(v,y),h&&(h.uniforms.uResolution.value=[v,y])}window.addEventListener("resize",x);const b=new Se(s);b.attributes.uv&&delete b.attributes.uv;const g=n.map(v=>{const y=new Z(v);return[y.r,y.g,y.b]});h=new le(s,{vertex:Me,fragment:Re,uniforms:{uTime:{value:0},uAmplitude:{value:r},uColorStops:{value:g},uResolution:{value:[m.offsetWidth,m.offsetHeight]},uBlend:{value:c}}});const w=new ce(s,{geometry:b,program:h});m.appendChild(s.canvas);let p=0;const j=v=>{p=requestAnimationFrame(j);const{time:y=v*.01,speed:P=1}=d.current;h.uniforms.uTime.value=y*P*.1,h.uniforms.uAmplitude.value=d.current.amplitude??1,h.uniforms.uBlend.value=d.current.blend??c;const I=d.current.colorStops??n;h.uniforms.uColorStops.value=I.map(i=>{const S=new Z(i);return[S.r,S.g,S.b]}),a.render({scene:w})};return p=requestAnimationFrame(j),x(),()=>{var v;cancelAnimationFrame(p),window.removeEventListener("resize",x),m&&s.canvas.parentNode===m&&m.removeChild(s.canvas),(v=s.getExtension("WEBGL_lose_context"))==null||v.loseContext()}},[r]),t.jsx("div",{ref:u,className:"w-full h-full"})}const Fe=({text:e="",className:n="",delay:r=50})=>{const c=o.useMemo(()=>e.split(""),[e]);return t.jsx("span",{className:n,"aria-label":e,children:c.map((d,u)=>t.jsx(L.span,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4,delay:u*r/1e3,ease:[.25,.46,.45,.94]},style:{display:"inline-block",whiteSpace:d===" "?"pre":"normal"},children:d},`${d}-${u}`))})};function G(...e){return e.filter(Boolean).join(" ")}const Q=o.forwardRef((e,n)=>{const{texts:r,transition:c={type:"spring",damping:25,stiffness:300},initial:d={y:"100%",opacity:0},animate:u={y:0,opacity:1},exit:m={y:"-120%",opacity:0},animatePresenceMode:a="wait",animatePresenceInitial:s=!1,rotationInterval:h=2e3,staggerDuration:x=0,staggerFrom:b="first",loop:g=!0,auto:w=!0,splitBy:p="characters",onNext:j,mainClassName:v,splitLevelClassName:y,elementLevelClassName:P,...I}=e,[i,S]=o.useState(0),E=l=>{if(typeof Intl<"u"&&Intl.Segmenter){const C=new Intl.Segmenter("en",{granularity:"grapheme"});return Array.from(C.segment(l),N=>N.segment)}return Array.from(l)},k=o.useMemo(()=>{const l=r[i];if(p==="characters"){const C=l.split(" ");return C.map((N,F)=>({characters:E(N),needsSpace:F!==C.length-1}))}return p==="words"?l.split(" ").map((C,N,F)=>({characters:[C],needsSpace:N!==F.length-1})):p==="lines"?l.split(`
|
|
`).map((C,N,F)=>({characters:[C],needsSpace:N!==F.length-1})):l.split(p).map((C,N,F)=>({characters:[C],needsSpace:N!==F.length-1}))},[r,i,p]),A=o.useCallback((l,C)=>{const N=C;if(b==="first")return l*x;if(b==="last")return(N-1-l)*x;if(b==="center"){const F=Math.floor(N/2);return Math.abs(F-l)*x}if(b==="random"){const F=Math.floor(Math.random()*N);return Math.abs(F-l)*x}return Math.abs(b-l)*x},[b,x]),f=o.useCallback(l=>{S(l),j&&j(l)},[j]),M=o.useCallback(()=>{const l=i===r.length-1?g?0:i:i+1;l!==i&&f(l)},[i,r.length,g,f]),R=o.useCallback(()=>{const l=i===0?g?r.length-1:i:i-1;l!==i&&f(l)},[i,r.length,g,f]),$=o.useCallback(l=>{const C=Math.max(0,Math.min(l,r.length-1));C!==i&&f(C)},[r.length,i,f]),T=o.useCallback(()=>{i!==0&&f(0)},[i,f]);return o.useImperativeHandle(n,()=>({next:M,previous:R,jumpTo:$,reset:T}),[M,R,$,T]),o.useEffect(()=>{if(!w)return;const l=setInterval(M,h);return()=>clearInterval(l)},[M,h,w]),t.jsxs(L.span,{className:G("flex flex-wrap whitespace-pre-wrap relative",v),...I,layout:!0,transition:c,children:[t.jsx("span",{className:"sr-only",children:r[i]}),t.jsx(je,{mode:a,initial:s,children:t.jsx(L.span,{className:G(p==="lines"?"flex flex-col w-full":"flex flex-wrap whitespace-pre-wrap relative"),layout:!0,"aria-hidden":"true",children:k.map((l,C,N)=>{const F=N.slice(0,C).reduce((H,D)=>H+D.characters.length,0);return t.jsxs("span",{className:G("inline-flex",y),children:[l.characters.map((H,D)=>t.jsx(L.span,{initial:d,animate:u,exit:m,transition:{...c,delay:A(F+D,N.reduce((ee,te)=>ee+te.characters.length,0))},className:G("inline-block",P),children:H},D)),l.needsSpace&&t.jsx("span",{className:"whitespace-pre",children:" "})]},C)})},i)})]})});Q.displayName="RotatingText";const U={damping:30,stiffness:100,mass:2};function Pe({imageSrc:e,altText:n="Tilted card image",captionText:r="",containerHeight:c="300px",containerWidth:d="100%",imageHeight:u="300px",imageWidth:m="300px",scaleOnHover:a=1.1,rotateAmplitude:s=14,showMobileWarning:h=!0,showTooltip:x=!0,overlayContent:b=null,displayOverlayContent:g=!1}){const w=o.useRef(null),p=_(0),j=_(0),v=B(_(0),U),y=B(_(0),U),P=B(1,U),I=B(0),i=B(0,{stiffness:350,damping:30,mass:1}),[S,E]=o.useState(0);function k(M){if(!w.current)return;const R=w.current.getBoundingClientRect(),$=M.clientX-R.left-R.width/2,T=M.clientY-R.top-R.height/2,l=T/(R.height/2)*-s,C=$/(R.width/2)*s;v.set(l),y.set(C),p.set(M.clientX-R.left),j.set(M.clientY-R.top);const N=T-S;i.set(-N*.6),E(T)}function A(){P.set(a),I.set(1)}function f(){I.set(0),P.set(1),v.set(0),y.set(0),i.set(0)}return t.jsxs("figure",{ref:w,className:"relative w-full h-full [perspective:800px] flex flex-col items-center justify-center",style:{height:c,width:d},onMouseMove:k,onMouseEnter:A,onMouseLeave:f,children:[h&&t.jsx("div",{className:"absolute top-4 text-center text-sm block sm:hidden",children:"This effect is not optimized for mobile. Check on desktop."}),t.jsxs(L.div,{className:"relative [transform-style:preserve-3d]",style:{width:m,height:u,rotateX:v,rotateY:y,scale:P},children:[t.jsx(L.img,{src:e,alt:n,className:"absolute top-0 left-0 object-cover rounded-[15px] will-change-transform [transform:translateZ(0)]",style:{width:m,height:u}}),g&&b&&t.jsx(L.div,{className:"absolute top-0 left-0 z-[2] will-change-transform [transform:translateZ(30px)]",children:b})]}),x&&t.jsx(L.figcaption,{className:"pointer-events-none absolute left-0 top-0 rounded-[4px] bg-white px-[10px] py-[4px] text-[10px] text-[#2d2d2d] opacity-0 z-[3] hidden sm:block",style:{x:p,y:j,opacity:I,rotate:i},children:r})]})}function Le(){const{t:e}=pe(),{user:n}=se(),{site:r}=ne(),[c,d]=o.useState([]),[u,m]=o.useState([]);o.useEffect(()=>{re().then(s=>{s.data.success&&d(s.data.data||[])}).catch(()=>{}),oe().then(s=>{s.data.success&&m(s.data.data||[])}).catch(()=>{})},[]);const a=c.filter(s=>s.enabled!==!1);return t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"absolute inset-0 h-[700px] overflow-hidden pointer-events-none",children:t.jsx(Ae,{colorStops:["#3A29FF","#FF94B4","#FF3232"],blend:.5,amplitude:1,speed:.5})}),t.jsxs("section",{className:"relative max-w-7xl mx-auto px-6 pt-28 pb-24",children:[t.jsxs("div",{className:"text-center max-w-4xl mx-auto",children:[t.jsx("div",{className:"mb-4",children:t.jsx("h1",{className:"text-5xl md:text-7xl font-heading font-extrabold text-white leading-tight",children:t.jsx(Fe,{text:(r==null?void 0:r.name)||e("home.defaultHeroTitle"),delay:80,className:"inline"})})}),t.jsx("div",{className:"flex items-center justify-center gap-2 text-xl md:text-2xl text-neutral-300 mb-10",children:t.jsxs("span",{children:[e("home.heroSubtitle").split(".")[0],"."]})}),t.jsx("div",{className:"flex flex-wrap items-center justify-center gap-3 mb-6",children:t.jsx(Q,{texts:[e("home.lightningFast"),e("home.securePrivate"),e("home.payAsYouGo")],mainClassName:"px-4 py-2 bg-white/10 backdrop-blur-sm rounded-full text-white text-sm font-medium overflow-hidden",staggerFrom:"last",rotationInterval:3e3})}),t.jsx("div",{className:"flex items-center justify-center gap-4 mt-8",children:n?t.jsx(z,{to:"/dashboard",className:"px-8 py-3.5 rounded-2xl bg-white text-black font-semibold text-base hover:bg-neutral-100 transition-all shadow-xl shadow-white/10",children:e("home.goToDashboard")}):t.jsxs(t.Fragment,{children:[t.jsx(z,{to:"/register",className:"px-8 py-3.5 rounded-2xl bg-white text-black font-semibold text-base hover:bg-neutral-100 transition-all shadow-xl shadow-white/10",children:e("home.getStarted")}),t.jsx(z,{to:"/pricing",className:"px-8 py-3.5 rounded-2xl border border-white/20 text-white font-semibold text-base hover:bg-white/10 transition-all",children:e("home.viewPricing")})]})})]}),t.jsx("div",{className:"grid grid-cols-3 gap-8 max-w-2xl mx-auto mt-24",children:[{value:a.length||50,suffix:"+",label:e("home.aiModels")},{value:99.9,suffix:"%",label:e("home.uptime")},{value:50,suffix:"ms",label:e("home.latency"),prefix:"<"}].map((s,h)=>t.jsxs("div",{className:"text-center p-4 rounded-2xl bg-white/5 backdrop-blur-sm border border-white/10",children:[t.jsxs("div",{className:"text-3xl font-bold text-white",children:[s.prefix,t.jsx(xe,{from:0,to:s.value,duration:2}),s.suffix]}),t.jsx("p",{className:"text-sm text-neutral-400 mt-1",children:s.label})]},h))})]}),t.jsxs("section",{className:"relative max-w-7xl mx-auto px-6 py-20",children:[t.jsxs("div",{className:"text-center mb-14",children:[t.jsx("h2",{className:"text-3xl font-heading font-bold text-white mb-3",children:e("home.whyChooseUs")}),t.jsx("p",{className:"text-neutral-400",children:e("home.whyChooseUsDesc")})]}),t.jsx("div",{className:"grid md:grid-cols-3 gap-8",children:[{icon:"⚡",title:e("home.lightningFast"),desc:e("home.lightningFastDesc"),color:"from-yellow-500/20 to-orange-500/20"},{icon:"🔒",title:e("home.securePrivate"),desc:e("home.securePrivateDesc"),color:"from-blue-500/20 to-cyan-500/20"},{icon:"💰",title:e("home.payAsYouGo"),desc:e("home.payAsYouGoDesc"),color:"from-green-500/20 to-emerald-500/20"}].map((s,h)=>t.jsx(Pe,{rotateAmplitude:8,scaleOnHover:1.03,borderRadius:"16px",className:"w-full",children:t.jsxs("div",{className:`p-6 rounded-2xl bg-gradient-to-br ${s.color} border border-white/10 h-full`,children:[t.jsx("div",{className:"text-3xl mb-4",children:s.icon}),t.jsx("h3",{className:"text-lg font-semibold text-white mb-2",children:s.title}),t.jsx("p",{className:"text-sm text-neutral-300 leading-relaxed",children:s.desc})]})},h))})]}),a.length>0&&t.jsxs("section",{className:"relative max-w-7xl mx-auto px-6 py-20",children:[t.jsxs("div",{className:"text-center mb-12",children:[t.jsx("h2",{className:"text-3xl font-heading font-bold text-white mb-3",children:e("home.availableModels")}),t.jsx("p",{className:"text-neutral-400",children:e("home.availableModelsDesc",{count:a.length})})]}),t.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-3",children:a.slice(0,12).map((s,h)=>t.jsxs("div",{className:"px-4 py-3 rounded-xl bg-white/5 border border-white/10 flex items-center gap-3 hover:bg-white/10 transition-colors group",children:[t.jsx("div",{className:"w-2 h-2 rounded-full bg-green-400 flex-shrink-0"}),t.jsx("span",{className:"text-sm font-mono text-neutral-300 group-hover:text-white transition-colors truncate",children:s.display_name||s.model_name})]},s.id||h))}),a.length>12&&t.jsx("div",{className:"text-center mt-6",children:t.jsxs(z,{to:"/pricing",className:"text-sm text-blue-400 hover:text-blue-300 transition-colors",children:[e("home.viewAllModels",{count:a.length})," →"]})})]}),u.length>0&&t.jsxs("section",{className:"relative max-w-7xl mx-auto px-6 py-20",children:[t.jsxs("div",{className:"text-center mb-12",children:[t.jsx("h2",{className:"text-3xl font-heading font-bold text-white mb-3",children:e("home.plansPackages")}),t.jsx("p",{className:"text-neutral-400",children:e("home.choosePlan")})]}),t.jsx("div",{className:"grid md:grid-cols-3 gap-6 max-w-4xl mx-auto",children:u.filter(s=>s.enabled).slice(0,3).map((s,h)=>t.jsxs("div",{className:`rounded-2xl p-6 flex flex-col border transition-all hover:scale-[1.02] ${h===1?"bg-white/10 border-white/20 shadow-xl":"bg-white/5 border-white/10"}`,children:[t.jsx("h3",{className:"text-lg font-semibold text-white mb-1",children:s.name}),s.description&&t.jsx("p",{className:"text-sm text-neutral-400 mb-4",children:s.description}),t.jsxs("div",{className:"mt-auto pt-4",children:[t.jsxs("div",{className:"flex items-baseline gap-1",children:[t.jsxs("span",{className:"text-3xl font-bold text-white",children:["$",s.price]}),s.original_price>s.price&&t.jsxs("span",{className:"text-sm text-neutral-500 line-through",children:["$",s.original_price]})]}),s.duration>0&&t.jsx("p",{className:"text-xs text-neutral-500 mt-1",children:e("home.days",{count:s.duration})})]}),t.jsx(z,{to:n?"/packages":"/register",className:"mt-4 py-2.5 rounded-xl bg-white text-black font-medium text-sm text-center hover:bg-neutral-100 transition-colors",children:e(n?"home.subscribe":"home.getStarted")})]},s.id))})]}),t.jsx("section",{className:"relative max-w-7xl mx-auto px-6 py-24",children:t.jsx("div",{className:"rounded-3xl p-12 text-center relative overflow-hidden bg-gradient-to-br from-blue-600/20 via-purple-600/20 to-pink-600/20 border border-white/10",children:t.jsxs("div",{className:"relative z-10",children:[t.jsx("h2",{className:"text-3xl font-heading font-bold text-white mb-4",children:e("home.readyToStart")}),t.jsx("p",{className:"text-neutral-300 mb-8 max-w-md mx-auto",children:e("home.readyToStartDesc")}),t.jsx("div",{className:"flex items-center justify-center gap-4",children:n?t.jsx(z,{to:"/dashboard",className:"px-8 py-3 rounded-2xl bg-white text-black font-semibold hover:bg-neutral-100 transition-all",children:e("home.goToDashboard")}):t.jsxs(t.Fragment,{children:[t.jsx(z,{to:"/register",className:"px-8 py-3 rounded-2xl bg-white text-black font-semibold hover:bg-neutral-100 transition-all",children:e("home.createFreeAccount")}),t.jsx(z,{to:"/login",className:"px-8 py-3 rounded-2xl border border-white/20 text-white font-semibold hover:bg-white/10 transition-all",children:e("home.signIn")})]})})]})})})]})}export{Le as default};
|