1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7733],{4206:(e,t,a)=>{"use strict";a.d(t,{default:()=>o});var s=a(24535),r=a(23924),i=a(44927),l=a(11824),n=a(28031);function o(){let e=(0,r.c3)("how_it_works"),t=[{icon:i.A,title:e("steps.prompt.title"),description:e("steps.prompt.description")},{icon:l.A,title:e("steps.generate.title"),description:e("steps.generate.description")},{icon:n.A,title:e("steps.download.title"),description:e("steps.download.description")}];return(0,s.jsxs)("section",{className:"relative overflow-hidden bg-background py-12 md:py-24",children:[(0,s.jsx)("div",{className:"absolute inset-0 hero-gradient opacity-90"}),(0,s.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br from-emerald-200/5 via-transparent to-cyan-200/5"}),(0,s.jsxs)("div",{className:"container mx-auto px-6",children:[(0,s.jsxs)("div",{className:"relative z-10 mb-12 text-center md:mb-20",children:[(0,s.jsx)("h2",{className:"mb-6 text-5xl font-bold text-white md:text-6xl lg:text-7xl",children:e("title")}),(0,s.jsx)("p",{className:"mx-auto max-w-3xl text-xl leading-relaxed text-foreground",children:e("description")})]}),(0,s.jsx)("div",{className:"relative z-10 mx-auto grid max-w-5xl gap-6 md:grid-cols-3",children:t.map((e,t)=>(0,s.jsxs)("div",{className:"gradient-card rounded-2xl p-8 backdrop-blur-md transition-all duration-500 hover:scale-105 hover:shadow-2xl md:p-10",children:[(0,s.jsx)("div",{className:"mb-6 flex justify-center",children:(0,s.jsx)("div",{className:"flex size-16 items-center justify-center rounded-2xl bg-primary/10",children:(0,s.jsx)(e.icon,{className:"size-8 text-primary"})})}),(0,s.jsx)("h3",{className:"mb-4 text-center text-lg font-bold leading-tight text-foreground md:text-xl",children:e.title}),(0,s.jsx)("p",{className:"text-center text-sm leading-relaxed text-muted-foreground md:text-base",children:e.description})]},t))})]})]})}},11592:(e,t,a)=>{"use strict";a.d(t,{default:()=>r.a});var s=a(20703),r=a.n(s)},11824:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});let s=(0,a(10453).A)("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]])},20657:(e,t,a)=>{"use strict";a.d(t,{default:()=>n});var s=a(24535),r=a(23924),i=a(55960),l=a(67218);function n(){let e=(0,r.c3)("faq"),t=e.raw("questions"),a={"@context":"https://schema.org","@type":"FAQPage",mainEntity:t.map(e=>({"@type":"Question",name:e.question,acceptedAnswer:{"@type":"Answer",text:e.answer}}))};return(0,s.jsxs)("section",{className:"relative overflow-hidden bg-background py-12 md:py-24",children:[(0,s.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(a)}}),(0,s.jsx)("div",{className:"absolute inset-0 hero-gradient opacity-90"}),(0,s.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br from-emerald-200/5 via-transparent to-cyan-200/5"}),(0,s.jsx)("div",{className:"container relative z-10 mx-auto px-6",children:(0,s.jsxs)("div",{className:"mx-auto max-w-4xl",children:[(0,s.jsxs)("div",{className:"mb-12 text-center",children:[(0,s.jsx)("h2",{className:"mb-6 text-5xl font-bold text-white md:text-6xl lg:text-7xl",children:e("title")}),(0,s.jsx)("p",{className:"mx-auto max-w-3xl text-xl leading-relaxed text-foreground",children:e("description")})]}),(0,s.jsx)("div",{className:"gradient-card rounded-2xl p-6 backdrop-blur-md md:p-10",children:(0,s.jsx)(l.nD,{type:"single",collapsible:!0,className:"space-y-2",children:t.map((e,t)=>(0,s.jsxs)(l.As,{value:"item-".concat(t),children:[(0,s.jsx)(l.$m,{className:"text-left text-base font-medium text-foreground transition-colors hover:text-primary md:text-lg",children:e.question}),(0,s.jsx)(l.ub,{className:"leading-relaxed text-muted-foreground",children:e.answer})]},t))})}),(0,s.jsxs)("div",{className:"mt-12 text-center",children:[(0,s.jsx)("h3",{className:"mb-4 text-2xl font-bold text-white md:text-3xl",children:e("cta_title")}),(0,s.jsx)("p",{className:"mb-6 text-foreground",children:e("cta_description")}),(0,s.jsx)(i.$,{size:"lg",className:"text-base font-semibold",asChild:!0,children:(0,s.jsx)("a",{href:"#",children:e("cta_button")})})]})]})})]})}},20703:(e,t,a)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var a in t)Object.defineProperty(e,a,{enumerable:!0,get:t[a]})}(t,{default:function(){return o},getImageProps:function(){return n}});let s=a(19327),r=a(69521),i=a(46281),l=s._(a(2291));function n(e){let{props:t}=(0,r.getImgProps)(e,{defaultLoader:l.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,a]of Object.entries(t))void 0===a&&delete t[e];return{props:t}}let o=i.Image},22258:(e,t,a)=>{"use strict";a.d(t,{default:()=>c});var s=a(24535),r=a(23924),i=a(95921),l=a(10453);let n=(0,l.A)("Layers3",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m6.08 9.5-3.5 1.6a1 1 0 0 0 0 1.81l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9a1 1 0 0 0 0-1.83l-3.5-1.59",key:"1e5n1m"}],["path",{d:"m6.08 14.5-3.5 1.6a1 1 0 0 0 0 1.81l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9a1 1 0 0 0 0-1.83l-3.5-1.59",key:"1iwflc"}]]);var o=a(1838);let d=(0,l.A)("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]]);function c(){let e=(0,r.c3)("features"),t=[{icon:i.A,title:e("features.no_account.title"),description:e("features.no_account.description"),gradient:"from-blue-500 to-cyan-500"},{icon:n,title:e("features.multi_model.title"),description:e("features.multi_model.description"),gradient:"from-emerald-500 to-teal-500"},{icon:o.A,title:e("features.fast_previews.title"),description:e("features.fast_previews.description"),gradient:"from-amber-500 to-orange-500"},{icon:d,title:e("features.aspect_ratios.title"),description:e("features.aspect_ratios.description"),gradient:"from-pink-500 to-rose-500"}];return(0,s.jsxs)("section",{className:"relative overflow-hidden bg-background py-12 md:py-24",children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br from-emerald-200/5 via-transparent to-cyan-200/5"}),(0,s.jsxs)("div",{className:"container mx-auto px-6",children:[(0,s.jsxs)("div",{className:"relative z-10 mb-12 text-center md:mb-20",children:[(0,s.jsx)("h2",{className:"mb-6 text-5xl font-bold text-white md:text-6xl lg:text-7xl",children:e("title")}),(0,s.jsx)("p",{className:"mx-auto max-w-3xl text-xl leading-relaxed text-foreground",children:e("description")})]}),(0,s.jsx)("div",{className:"relative z-10 mx-auto grid max-w-6xl gap-6 md:grid-cols-2 lg:grid-cols-4",children:t.map((e,t)=>(0,s.jsxs)("div",{className:"gradient-card rounded-2xl p-8 backdrop-blur-md transition-all duration-500 hover:scale-105 hover:shadow-2xl",children:[(0,s.jsx)("div",{className:"mb-6 size-14 rounded-xl bg-gradient-to-br ".concat(e.gradient," p-0.5"),children:(0,s.jsx)("div",{className:"flex size-full items-center justify-center rounded-xl bg-background",children:(0,s.jsx)(e.icon,{className:"size-7 text-foreground"})})}),(0,s.jsx)("h3",{className:"mb-3 text-lg font-bold text-foreground",children:e.title}),(0,s.jsx)("p",{className:"text-sm leading-relaxed text-muted-foreground",children:e.description})]},t))})]})]})}},34199:(e,t,a)=>{"use strict";a.d(t,{cn:()=>i});var s=a(61690),r=a(27555);function i(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];return(0,r.QP)((0,s.$)(t))}},40874:(e,t,a)=>{"use strict";a.d(t,{T:()=>l});var s=a(24535),r=a(37631),i=a(34199);let l=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)("textarea",{className:(0,i.cn)("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",a),ref:t,...r})});l.displayName="Textarea"},44163:(e,t,a)=>{"use strict";a.d(t,{default:()=>o});var s=a(24535),r=a(23924),i=a(40503),l=a(55960),n=a(72007);function o(){let e=(0,r.c3)("cta");return(0,s.jsxs)("section",{className:"relative overflow-hidden bg-background py-16 md:py-24",children:[(0,s.jsx)("div",{className:"absolute inset-0 hero-gradient opacity-90"}),(0,s.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br from-emerald-200/5 via-trans
1parent to-cyan-200/5"}),(0,s.jsx)("div",{className:"container relative z-10 mx-auto px-6",children:(0,s.jsxs)("div",{className:"mx-auto max-w-3xl text-center",children:[(0,s.jsx)("h2",{className:"mb-6 text-4xl font-bold text-white md:text-5xl lg:text-6xl",children:e("title")}),(0,s.jsx)("p",{className:"mx-auto mb-8 max-w-2xl text-lg leading-relaxed text-foreground md:text-xl",children:e("description")}),(0,s.jsx)(l.$,{size:"lg",className:"gap-2 text-base font-semibold",asChild:!0,children:(0,s.jsxs)(n.N_,{href:"/pricing",children:[e("button"),(0,s.jsx)(i.A,{className:"size-5"})]})})]})})]})}},44927:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});let s=(0,a(10453).A)("WandSparkles",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]])},55960:(e,t,a)=>{"use strict";a.d(t,{$:()=>d,r:()=>o});var s=a(24535),r=a(37631),i=a(7072),l=a(86572),n=a(34199);let o=(0,l.F)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),d=r.forwardRef((e,t)=>{let{className:a,variant:r,size:l,asChild:d=!1,...c}=e,m=d?i.DX:"button";return(0,s.jsx)(m,{className:(0,n.cn)(o({variant:r,size:l,className:a})),ref:t,...c})});d.displayName="Button"},60284:(e,t,a)=>{"use strict";a.d(t,{Xi:()=>d,j7:()=>o,tU:()=>n});var s=a(24535),r=a(37631),i=a(55712),l=a(34199);let n=i.bL,o=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(i.B8,{ref:t,className:(0,l.cn)("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",a),...r})});o.displayName=i.B8.displayName;let d=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(i.l9,{ref:t,className:(0,l.cn)("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",a),...r})});d.displayName=i.l9.displayName,r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(i.UC,{ref:t,className:(0,l.cn)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",a),...r})}).displayName=i.UC.displayName},63146:(e,t,a)=>{"use strict";a.d(t,{BT:()=>d,Wu:()=>c,ZB:()=>o,Zp:()=>l,aR:()=>n});var s=a(24535),r=a(37631),i=a(34199);let l=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)("div",{ref:t,className:(0,i.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",a),...r})});l.displayName="Card";let n=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)("div",{ref:t,className:(0,i.cn)("flex flex-col space-y-1.5 p-6",a),...r})});n.displayName="CardHeader";let o=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)("div",{ref:t,className:(0,i.cn)("text-2xl font-semibold leading-none tracking-tight",a),...r})});
1o.displayName="CardTitle";let d=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)("div",{ref:t,className:(0,i.cn)("text-sm text-muted-foreground",a),...r})});d.displayName="CardDescription";let c=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)("div",{ref:t,className:(0,i.cn)("p-6 pt-0",a),...r})});c.displayName="CardContent",r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)("div",{ref:t,className:(0,i.cn)("flex items-center p-6 pt-0",a),...r})}).displayName="CardFooter"},67218:(e,t,a)=>{"use strict";a.d(t,{$m:()=>c,As:()=>d,nD:()=>o,ub:()=>m});var s=a(24535),r=a(37631),i=a(91230),l=a(9237),n=a(34199);let o=i.bL,d=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(i.q7,{ref:t,className:(0,n.cn)("border-b",a),...r})});d.displayName="AccordionItem";let c=r.forwardRef((e,t)=>{let{className:a,children:r,...o}=e;return(0,s.jsx)(i.Y9,{className:"flex",children:(0,s.jsxs)(i.l9,{ref:t,className:(0,n.cn)("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",a),...o,children:[r,(0,s.jsx)(l.A,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})})});c.displayName=i.l9.displayName;let m=r.forwardRef((e,t)=>{let{className:a,children:r,...l}=e;return(0,s.jsx)(i.UC,{ref:t,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...l,children:(0,s.jsx)("div",{className:(0,n.cn)("pb-4 pt-0",a),children:r})})});m.displayName=i.UC.displayName},68608:(e,t,a)=>{"use strict";a.d(t,{bq:()=>u,eb:()=>f,gC:()=>g,l6:()=>c,yv:()=>m});var s=a(24535),r=a(37631),i=a(16491),l=a(9237),n=a(57560),o=a(50761),d=a(34199);let c=i.bL;i.YJ;let m=i.WT,u=r.forwardRef((e,t)=>{let{className:a,children:r,...n}=e;return(0,s.jsxs)(i.l9,{ref:t,className:(0,d.cn)("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
1ing-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",a),...n,children:[r,(0,s.jsx)(i.In,{asChild:!0,children:(0,s.jsx)(l.A,{className:"h-4 w-4 opacity-50"})})]})});u.displayName=i.l9.displayName;let p=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(i.PP,{ref:t,className:(0,d.cn)("flex cursor-default items-center justify-center py-1",a),...r,children:(0,s.jsx)(n.A,{className:"h-4 w-4"})})});p.displayName=i.PP.displayName;let x=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(i.wn,{ref:t,className:(0,d.cn)("flex cursor-default items-center justify-center py-1",a),...r,children:(0,s.jsx)(l.A,{className:"h-4 w-4"})})});x.displayName=i.wn.displayName;let g=r.forwardRef((e,t)=>{let{className:a,children:r,position:l="popper",...n}=e;return(0,s.jsx)(i.ZL,{children:(0,s.jsxs)(i.UC,{ref:t,className:(0,d.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===l&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",a),position:l,...n,children:[(0,s.jsx)(p,{}),(0,s.jsx)(i.LM,{className:(0,d.cn)("p-1","popper"===l&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),(0,s.jsx)(x,{})]})})});g.displayName=i.UC.displayName,r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(i.JU,{ref:t,className:(0,d.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",a),...r})}).displayName=i.JU.displayName;let f=r.forwardRef((e,t)=>{let{className:a,children:r,...l}=e;return(0,s.jsxs)(i.q7,{ref:t,className:(0,d.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),...l,children:[(0,s.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,s.jsx)(i.VF,{children:(0,s.jsx)(o.A,{className:"h-4 w-4"})})}),(0,s.jsx)(i.p4,{children:r})]})});f.displayName=i.q7.displayName,r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(i.wv,{ref:t,className:(0,d.cn)("-mx-1 my-1 h-px bg-muted",a),...r})}).displayName=i.wv.displayName},72007:(e,t,a)=>{"use strict";a.d(t,{N_:()=>l,a8:()=>o,rd:()=>d});var s=a(96017),r=a(91312);let i=(0,a(6752).A)({locales:s.IB,defaultLocale:s.q,localePrefix:s.b,pathnames:s.u7,localeDetection:s.GB}),{Link:l,redirect:n,usePathname:o,useRouter:d}=(0,r.A)(i)},96017:(e,t,a)=>{"use strict";a.d(t,{GB:()=>n,IB:()=>s,L$:()=>r,b:()=>l,q:()=>i,u7:()=>o});let s=["en"],r={en:"English",zh:"䏿",pt:"Portugu\xeas",es:"Espa\xf1ol",de:"Deutsch",ja:"æ¥æ¬èª",ko:"íêµì´",ar:"Ø§ÙØ¹Ø±Ø¨ÙØ©"},i="en",l="as-needed",n=!1,o={"/":"/","/blog":"/blog","/blog/[slug]":"/blog/[slug]","/pricing":"/pricing","/showcase":"/showcase","/tools/free-image-generator":"/tools/free-image-generator","/tools/free-video-generator":"/tools/free-video-generator","/my-images":"/my-images","/privacy-policy":"/privacy-policy","/terms-of-service":"/terms-of-service"}},96280:(e,t,a)=>{Promise.resolve().then(a.bind(a,44163)),Promise.resolve().then(a.bind(a,20657)),Promise.resolve().then(a.bind(a,22258)),Promise.resolve().then(a.bind(a,4206)),Promise.resolve().then(a.bind(a,98579)),Promise.resolve().then(a.bind(a,95664)),Promise.resolve().then(a.bind(a,2480))},98579:(e,t,a)=>{"use strict";a.d(t,{default:()=>q});var s=a(24535),r=a(11592),i=a(37631),l=a(47987),n=a(23924),o=a(4712),d=a(58177),c=a(73574),m=a(85967),u=a(44927),p=a(28031),x=a(93803),g=a(24587),f=a(55960),h=a(63146),b=a(40874),v=a(68608),y=a(60284);let N=[{id:"zimage",labelKey:"zimage",spaceId:"mrfakename/Z-Image-Turbo",apiName:"/generate_image",supportsAspectRatio:!0,timeoutMs:18e4,supportsTextToImage:!0,supportsImageEdit:!1,isSelectable:!0},{id:"zimage-tongyi",labelKey:"zimage",spaceId:"Tongyi-MAI/Z-Image-Turbo",apiName:"/generate",supportsAspectRatio:!0,timeoutMs:18e4,supportsTextToImage:!0,supportsImageEdit:!1},{id:"zimage-cpuai",labelKey:"zimage",spaceId:"cpuai/Z-Image-Turbo",apiName:"/generate",supportsAspectRatio:!0,timeoutMs:18e4,supportsTextToImage:!0,supportsImageEdit:!1},{id:"zimage-anycoder",labelKey:"zimage",spaceId:"anycoderapps/Z-Image-Turbo",apiName:"/generate_image",supportsAspectRatio:!1,timeoutMs:12e4,supportsTextToImage:!0,supportsImageEdit:!1}
1,{id:"wan2",labelKey:"wan2",spaceId:"luca115/wan2-2-14b-fast-t2i",apiName:"/generate_image",supportsAspectRatio:!1,timeoutMs:24e4,supportsTextToImage:!0,supportsImageEdit:!1,isSelectable:!0},{id:"qwen",labelKey:"qwen",spaceId:"mcp-tools/Qwen-Image-Fast",apiName:"/generate_image",supportsAspectRatio:!0,timeoutMs:18e4,supportsTextToImage:!0,supportsImageEdit:!1,isSelectable:!0},{id:"qwen-multimodal",labelKey:"qwen",spaceId:"multimodalart/Qwen-Image-Fast",apiName:"/infer",supportsAspectRatio:!0,timeoutMs:18e4,supportsTextToImage:!0,supportsImageEdit:!1},{id:"qwen-2512",labelKey:"qwen",spaceId:"Qwen/Qwen-Image-2512",apiName:"/infer",supportsAspectRatio:!0,timeoutMs:18e4,supportsTextToImage:!0,supportsImageEdit:!1},{id:"qwen-edit-fast",labelKey:"qwen",spaceId:"multimodalart/Qwen-Image-Edit-Fast",apiName:"/infer",supportsAspectRatio:!1,timeoutMs:18e4,supportsTextToImage:!1,supportsImageEdit:!0},{id:"qwen-edit-official",labelKey:"qwen",spaceId:"Qwen/Qwen-Image-Edit-2511",apiName:"/infer",supportsAspectRatio:!0,timeoutMs:24e4,supportsTextToImage:!1,supportsImageEdit:!0},{id:"flux2-klein-9b",labelKey:"flux2_klein_9b",spaceId:"black-forest-labs/FLUX.2-klein-9B",apiName:"/generate",supportsAspectRatio:!0,timeoutMs:24e4,supportsTextToImage:!0,supportsImageEdit:!1,isSelectable:!0},{id:"flux2-klein-4b",labelKey:"flux2_klein_4b",spaceId:"black-forest-labs/FLUX.2-klein-4B",apiName:"/infer",supportsAspectRatio:!0,timeoutMs:18e4,supportsTextToImage:!0,supportsImageEdit:!1,isSelectable:!0},{id:"ernie",labelKey:"ernie",spaceId:"baidu/ERNIE-Image-Turbo",apiName:"/generate_image",supportsAspectRatio:!1,timeoutMs:18e4,supportsTextToImage:!0,supportsImageEdit:!1,isSelectable:!0}],j=N.filter(e=>e.isSelectable),w={"1:1":{width:1024,height:1024},"9:16":{width:720,height:1280},"16:9":{width:1280,height:720}},_=["1:1","9:16","16:9"];class k extends Error{constructor(e,t){super("The model did not respond within ".concat(Math.round(t/1e3)," seconds. The space (").concat(e,") may be sleeping or overloaded.")),this.name="GradioTimeoutError"}}function I(e){return e instanceof Error?e.message:"object"==typeof e&&null!==e?[e.title,e.message,e.error].filter(e=>!!e).join(" - "):String(e)}function z(e,t){if(t.startsWith("http")||t.startsWith("blob:")||t.startsWith("data:"))return t;let a=t.startsWith("/")?t:"/gradio_api/file=".concat(t);return"".concat("https://".concat(e.toLowerCase().replace("/","-"),".hf.space")).concat(a)}async function A(e,t,a){let s,r=new Promise((a,r)=>{s=setTimeout(()=>r(new k(e,t)),t)});try{return await Promise.race([(async()=>{let t=await l.Kj.connect(e,{events:["data","status"]});return a(t)})(),r])}finally{s&&clearTimeout(s)}}async function R(e){let{model:t,prompt:a,aspectRatio:s,image:r}=e,i=w[s],l=function(e,t){var a,s,r,i;if(!Array.isArray(e))return null;let l=e[0];if("string"==typeof l)return z(t,l);if(Array.isArray(l)){let e=l[0],a=(null==e?void 0:e.url)||(null==e?void 0:e.path)||null;return a?z(t,a):null}let n=(null==l?void 0:l.url)||(null==l?void 0:l.path)||(null==l?void 0:null===(a=l.image)||void 0===a?void 0:a.url)||(null==l?void 0:null===(s=l.image)||void 0===s?void 0:s.path)||(null==l?void 0:null===(r=l.value)||void 0===r?void 0:r.url)||(null==l?void 0:null===(i=l.value)||void 0===i?void 0:i.path)||null;return n?z(t,n):null}((await A(t.spaceId,t.timeoutMs,e=>{switch(t.id){case"zimage":return e.predict(t.apiName,{prompt:a,height:i.height,width:i.width,num_inference_steps:9,seed:42,randomize_seed:!0});case"zimage-tongyi":case"zimage-cpuai":return e.predict(t.apiName,{prompt:a,resolution:s,seed:42,steps:9,shift:3,random_seed:!0,gallery_images:[],..."zimage-cpuai"===t.id?{enhance:!1}:{}});case"zimage-anycoder":return e.predict(t.apiName,{prompt:a});case"wan2":return e.predict(t.apiName,{prompt:a,negative_prompt:"nsfw, naked, overexposed, static, blurred details, subtitles, watermark, text, signature, worst quality, low quality, jpeg artifacts, ugly, deformed, disfigured",guidance_scale:1,guidance_scale_2:3,steps:12,randomize_seed:!0});case"qwen":return e.predict(t.apiName,{prompt:a,seed:0,randomize_seed:!0,aspect_ratio:s,guidance_scale:1,num_inference_steps:4});case"qwen-multimodal":case"qwen-2512":return e.predict(t.apiName,{prompt:a,seed:0,randomize_seed:!0,aspect_ratio:s,guidance_scale:1,num_inference_steps:4,prompt_enhance:!1});case"qwen-edit-fast":return e.predict(t.apiName,{image:r,prompt:a,seed:0,randomize_seed:!0,true_guidance_scale:4,num_inference_steps:8,rewrite_prompt:!0});case"qwen-edit-official":return e.predict(t.apiName,{images:r?[r]:[],prompt:a,seed:0,randomize_seed:!0,true_guidance_scale:4,num_inference_steps:8,height:i.height,width:i.width,rewrite_prompt:!0});case"ernie":return e.predict(t.apiName,{prompt:a,size:"1024x1024",seed:-1,use_pe:!0});
1default:{let s=Math.min(1,1024/Math.max(i.width,i.height)),r=Math.round(i.width*s),l=Math.round(i.height*s);return e.predict(t.apiName,{prompt:a,mode_choice:"Distilled (4 steps)",seed:0,randomize_seed:!0,width:r,height:l,num_inference_steps:4,guidance_scale:1,prompt_upsampling:!1})}}})).data,t.spaceId);if(!l)throw Error("No image URL returned.");return l}async function T(e){let t,a,s="image-editor"===e.mode?N.filter(e=>e.supportsImageEdit):N.filter(e=>e.supportsTextToImage);for(let r of"image-editor"===e.mode?s:[...e.model.supportsTextToImage?[e.model]:[],...s.filter(t=>t.id!==e.model.id)])try{return{imageUrl:await R({...e,model:r}),model:r}}catch(s){t=s;let e=I(s);if(/NSFW|unsafe|flagged|moderation|safety|policy|violate/i.test(e))throw s;/ZeroGPU quota|GPU quota|quota exceeded|exceeded your .*quota/i.test(e)&&(a=s)}throw a||t||Error("Image generation failed.")}function q(){let e=(0,n.c3)("generator"),[t,a]=(0,i.useState)("text-to-image"),[l,N]=(0,i.useState)("zimage"),[w,z]=(0,i.useState)(""),[A,R]=(0,i.useState)("1:1"),[q,C]=(0,i.useState)(null),[E,L]=(0,i.useState)(null),[M,U]=(0,i.useState)(null),[S,P]=(0,i.useState)(null),[K,F]=(0,i.useState)(!1),[Z,B]=(0,i.useState)(!1),[O,G]=(0,i.useState)(null),Q=(0,i.useMemo)(()=>j.find(e=>e.id===l)||j[0],[l]),$="image-editor"===t,W=w.trim().length>0&&!K&&(!$||!!q);async function D(){let a=w.trim();if(!a){g.oR.error(e("errors.prompt_required"));return}if($&&!q){g.oR.error(e("errors.image_required"));return}if(a.length>900){g.oR.error(e("errors.prompt_too_long"));return}F(!0),U(null),P(null),G(null);try{let s=await T({model:Q,prompt:a,aspectRatio:A,mode:t,image:$?q:null});U(s.imageUrl),P(s.model.labelKey),g.oR.success(e("success"))}catch(a){let t=I(a);console.error("[free-image-generate]",a),/No GPU was available|ZeroGPU quota|GPU quota|quota exceeded|rate.?limit/i.test(t)?G(e("errors.busy")):/NSFW|unsafe|flagged|moderation|safety|policy|violate/i.test(t)?G(e("errors.nsfw")):a instanceof k||/timeout|sleeping|cold start/i.test(t)?G(e("errors.timeout")):/Failed to fetch|NetworkError|Load failed|AbortError/i.test(t)?G(e("errors.network")):G(e("errors.generation_failed")),g.oR.error(e("errors.generation_failed"))}finally{F(!1)}}async function V(){if(M&&!Z){B(!0);try{let e=await fetch(M),t=await e.blob(),a=URL.createObjectURL(t),s=document.createElement("a");s.href=a,s.download="seedance-free-ai-image.png",s.style.display="none",document.body.appendChild(s),s.click(),URL.revokeObjectURL(a),document.body.removeChild(s)}catch(t){G(e("errors.download_failed"))}finally{B(!1)}}}return(0,s.jsxs)("section",{className:"relative overflow-hidden bg-background py-12 md:py-24",children:[(0,s.jsx)("div",{className:"pointer-events-none absolute inset-0 hero-gradient opacity-90"}),(0,s.jsx)("div",{className:"pointer-events-none absolute inset-0 bg-gradient-to-br from-emerald-200/5 via-transparent to-cyan-200/5"}),(0,s.jsx)("div",{className:"container relative z-10 mx-auto px-6",children:(0,s.jsxs)("div",{className:"mx-auto max-w-4xl",children:[(0,s.jsxs)("div",{className:"mb-10 text-center",children:[(0,s.jsxs)("div",{className:"mb-4 inline-flex items-center gap-2 rounded-full bg-primary/10 px-4 py-1.5 text-sm font-medium text-primary",children:[(0,s.jsx)(o.A,{className:"size-4"}),(0,s.jsx)("span",{children:e("badge")})]}),(0,s.jsx)("h1",{className:"mb-4 text-3xl font-bold tracking-tight text-white drop-shadow-sm md:text-4xl lg:text-5xl",children:e("hero_title")}),(0,s.jsx)("p",{className:"mx-auto max-w-2xl text-lg text-foreground/80",children:e("description")})]}),(0,s.jsx)(h.Zp,{className:"border-border/50 bg-background/85 p-5 shadow-xl backdrop-blur-md md:p-8",children:(0,s.jsxs)("div",{className:"space-y-8",children:[(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsx)(y.tU,{value:t,onValueChange:function(e){a(e),U(null),G(null)},children:(0,s.jsxs)(y.j7,{className:"grid h-12 w-full grid-cols-2 rounded-xl bg-muted/70 p-1",children:[(0,s.jsx)(y.Xi,{value:"text-to-image",className:"rounded-lg text-sm font-semibold data-[state=active]:bg-primary data-[state=active]:text-primary-foreground",children:e("tabs.text_to_image")}),(0,s.jsx)(y.Xi,{value:"image-editor",className:"rounded-lg text-sm font-semibold data-[state=active]:bg-primary data-[state=active]:text-primary-foreground",children:e("tabs.ai_image_editor")})]})}),(0,s.jsxs)("div",{className:"mx-auto max-w-3xl space-y-6",children:[$?(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"mb-3 block text-lg font-semibold",children:e("editor_image_label")}),E?(0,s.jsxs)("div",{className:"relative overflow-hidden rounded-2xl border border-border bg-muted/30",children:[(0,s.jsx)("img",{src:E,alt:"Editor reference",className:"max-h-[360px] w-full object-contain"}),(0,s.jsx)("button",{type:"button",onClick:function(){C(null),E&&URL.revokeObjectURL(E),L(null)}
1,className:"absolute right-4 top-4 rounded-full bg-background/90 p-2 text-foreground shadow-md transition-colors hover:bg-destructive hover:text-destructive-foreground",children:(0,s.jsx)(d.A,{className:"size-4"})})]}):(0,s.jsxs)("label",{className:"flex min-h-[220px] cursor-pointer flex-col items-center justify-center rounded-2xl border-2 border-dashed border-border bg-muted/20 px-6 text-center transition-colors hover:border-primary/70 hover:bg-primary/5",children:[(0,s.jsx)(c.A,{className:"mb-5 size-10 text-muted-foreground"}),(0,s.jsx)("span",{className:"block text-xl font-medium text-foreground",children:e("editor_image_upload_text")}),(0,s.jsx)("span",{className:"mt-3 block text-base text-muted-foreground",children:e("image_formats")}),(0,s.jsx)("input",{type:"file",accept:"image/png,image/jpeg,image/webp",className:"hidden",onChange:function(t){var a;let s=null===(a=t.target.files)||void 0===a?void 0:a[0];if(s){if(!["image/png","image/jpeg","image/webp"].includes(s.type)){g.oR.error(e("errors.image_type"));return}if(s.size>8388608){g.oR.error(e("errors.image_too_large"));return}C(s),E&&URL.revokeObjectURL(E),L(URL.createObjectURL(s)),U(null),G(null)}}})]})]}):null,(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"mb-3 block text-lg font-semibold",children:e("model_label")}),(0,s.jsxs)(v.l6,{value:l,onValueChange:e=>N(e),children:[(0,s.jsx)(v.bq,{className:"h-12 rounded-xl bg-muted/30",children:(0,s.jsx)(v.yv,{placeholder:e("model_placeholder")})}),(0,s.jsx)(v.gC,{children:j.map(t=>(0,s.jsx)(v.eb,{value:t.id,children:e("models.".concat(t.labelKey))},t.id))})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"mb-3 block text-lg font-semibold",children:e("prompt_label")}),(0,s.jsx)(b.T,{value:w,onChange:e=>{z(e.target.value),G(null)},placeholder:$?e("editor_prompt_placeholder"):e("prompt_placeholder"),className:"min-h-[180px] resize-y rounded-2xl bg-muted/30 p-5 text-base shadow-inner",maxLength:900}),(0,s.jsxs)("div",{className:"mt-3 flex items-center justify-between gap-4",children:[(0,s.jsx)("span",{className:"text-sm text-muted-foreground",children:$?e("editor_hint"):e("panel_description")}),(0,s.jsxs)("span",{className:"shrink-0 text-sm text-muted-foreground",children:[w.length,"/900"]})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"mb-3 block text-lg font-semibold",children:e("aspect_ratio_label")}),(0,s.jsx)("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:_.map(t=>(0,s.jsx)("button",{type:"button",onClick:()=>R(t),className:"h-14 rounded-2xl border text-base font-semibold transition ".concat(A===t?"border-primary bg-primary text-primary-foreground shadow-lg shadow-primary/20":"border-border bg-background/60 text-foreground hover:border-primary/60 hover:bg-primary/5"),children:e("aspect_ratios.".concat(t.replace(":","_")))},t))}),Q.supportsAspectRatio?null:(0,s.jsx)("p",{className:"mt-3 text-sm text-muted-foreground",children:e("fixed_ratio_note")})]})]}),(0,s.jsx)(f.$,{onClick:D,disabled:!W,className:"h-12 w-full text-base font-semibold",size:"lg",children:K?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(m.A,{className:"mr-2 size-5 animate-spin"}),e("generating_button")]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.A,{className:"mr-2 size-5"}),$?e("editor_button"):e("generate_button")]})}),K?(0,s.jsxs)("div",{className:"py-8 text-center",children:[(0,s.jsx)(m.A,{className:"mx-auto mb-4 size-10 animate-spin text-primary"}),(0,s.jsx)("p",{className:"font-medium text-foreground",children:e("result_loading_title")}),(0,s.jsx)("p",{className:"mx-auto mt-2 max-w-xl text-sm text-muted-foreground",children:e("result_loading")})]}):null,O&&!K?(0,s.jsx)(h.Zp,{className:"border-destructive/30 bg-destructive/10 p-4",children:(0,s.jsx)("p",{className:"text-sm text-destructive",children:O})}):null]}),M&&!K?(0,s.jsxs)("div",{className:"space-y-6 border-t border-border/70 pt-8",children:[(0,s.jsx)("div",{className:"overflow-hidden rounded-2xl border border-border bg-black/5",children:(0,s.jsx)(r.default,{src:M,alt:w||"Generated AI image",width:1024,height:1024,unoptimized:!0,className:"mx-auto max-h-[640px] w-full object-contain"})}),(0,s.jsxs)("div",{className:"flex flex-col justify-between gap-3 md:flex-row md:items-center",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-lg font-semibold",children:e("result_title")}),S?(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:e("model_used",{model:e("models.".concat(S))})}):null]}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row",children:[(0,s.jsxs)(f.$,{variant:"outline",onClick:V,disabled:Z,children:[Z?(0,s.jsx)(m.A,{className:"mr-2 size-4 animate-spin"}):(0,s.jsx)(p.A,{className:"mr-2 size-4"}),e("download")]}),(0,s.jsxs)(f.$,{variant:"secondary",onClick:()=>{U(null),G(null)},children:[(0,s.jsx)(x.A,{className:"mr-2 size-4"}),e("new_image")]})]})]})]}):null]})})]})})]})}}},e=>{var t=t=>e(e.s=t);e.O(0,[6331,8528,2297,8620,789,9576,824,3739,6281,7986,5227,9563,3569,4180,7358],()=>t(96280)),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.