1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3324],{207:(e,t,r)=>{"use strict";r.d(t,{wD:()=>a});let a={Theme:"THEME",InviteCode:"INVITE_CODE"}},1035:(e,t,r)=>{"use strict";r.d(t,{lg:()=>a});let a=()=>Date.parse(new Date().toUTCString())/1e3},2996:(e,t,r)=>{"use strict";r.d(t,{ProductNavbar:()=>v});var a=r(5155),s=r(2115),n=r(6874),o=r.n(n),i=r(7863),l=r(6474),d=r(4783),c=r(7168),u=r(9663),m=r(7133),f=r(5493),x=r(6447),h=r(4835);function p(){let{user:e}=(0,x.U)();if(e){var t,r;return(0,a.jsxs)(m.rI,{children:[(0,a.jsx)(m.ty,{asChild:!0,children:(0,a.jsxs)(u.eu,{className:"cursor-pointer w-8 h-8 hover:opacity-80 transition-opacity",children:[(0,a.jsx)(u.BK,{src:e.avatar_url,alt:e.nickname}),(0,a.jsx)(u.q5,{className:"text-sm",children:(null===(r=e.nickname)||void 0===r?void 0:null===(t=r.charAt(0))||void 0===t?void 0:t.toUpperCase())||"U"})]})}),(0,a.jsxs)(m.SQ,{className:"w-56",align:"end",forceMount:!0,children:[(0,a.jsx)(m.lp,{className:"font-normal",children:(0,a.jsxs)("div",{className:"flex flex-col space-y-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium leading-none",children:e.nickname}),(0,a.jsx)("p",{className:"text-xs leading-none text-muted-foreground",children:e.email})]})}),(0,a.jsx)(m.mB,{}),(0,a.jsxs)(m._2,{className:"cursor-pointer text-red-600 focus:text-red-600",onClick:()=>{(0,f.CI)()},children:[(0,a.jsx)(h.A,{className:"mr-2 h-4 w-4"}),"Sign out"]})]})]})}return(0,a.jsx)(c.$,{onClick:()=>{(0,f.Jv)("google",{callbackUrl:"/"})},className:"bg-gray-700 text-gray-200 border border-gray-600 hover:bg-gray-600 hover:text-white px-4 py-2 rounded-full transition-all duration-200 flex items-center gap-2 shadow-sm",children:"Sign in"})}var g=r(8516);let v=()=>{let[e,t]=(0,s.useState)(!1),[r,n]=(0,s.useState)(!1),c=(0,s.useRef)(null);return(0,s.useEffect)(()=>{function e(e){c.current&&!c.current.contains(e.target)&&n(!1)}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]),(0,a.jsxs)("nav",{className:"bg-gray-800 py-4 shadow-lg",children:[(0,a.jsxs)("div",{className:"container mx-auto px-4 md:px-8 flex justify-between items-center",children:[(0,a.jsxs)("div",{className:"flex items-center space-x-8",children:[(0,a.jsx)(o(),{href:"/",children:(0,a.jsx)("span",{className:"text-2xl font-bold bg-gradient-to-r from-blue-500 to-emerald-500 bg-clip-text text-transparent",children:"AI Studio"})}),(0,a.jsx)("div",{className:"hidden md:flex space-x-8",children:g.M.l.length>0&&(0,a.jsxs)("div",{className:"relative",ref:c,children:[(0,a.jsxs)("button",{onClick:()=>n(!r),className:"font-medium text-gray-300 hover:text-white transition flex items-center",children:[(0,a.jsx)("span",{className:"bg-gradient-to-r from-blue-400 to-blue-600 bg-clip-text text-transparent font-bold",children:"Tools"}),r?(0,a.jsx)(i.A,{className:"ml-1 h-4 w-4"}):(0,a.jsx)(l.A,{className:"ml-1 h-4 w-4"})]}),r&&(0,a.jsx)("div",{className:"absolute z-50 mt-2 w-80 origin-top-right rounded-md bg-white dark:bg-gray-900 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",children:(0,a.jsx)("div",{className:"py-1 flex flex-col",children:g.M.l.map((e,t)=>(0,a.jsxs)(o(),{href:e.href,className:"px-4 py-3 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 border-l-4 border-".concat(e.color,"-500"),onClick:()=>n(!1),children:[(0,a.jsxs)("div",{className:"font-bold text-".concat(e.color,"-600 dar
1k:text-").concat(e.color,"-400"),children:[e.icon," ",e.title]}),(0,a.jsx)("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:e.description})]},t))})})]})}),(0,a.jsxs)("div",{className:"flex items-center space-x-6",children:[(0,a.jsx)(o(),{href:"/posts",className:"font-medium text-gray-300 hover:text-white transition-colors duration-200 relative group",children:(0,a.jsx)("span",{className:"bg-gradient-to-r from-blue-400 to-indigo-500 bg-clip-text text-transparent font-bold group-hover:from-blue-300 group-hover:to-indigo-400 transition-all duration-200",children:"Blog"})}),(0,a.jsx)(o(),{href:"/pricing",className:"font-medium text-gray-300 hover:text-white transition-colors duration-200 relative group",children:(0,a.jsx)("span",{className:"bg-gradient-to-r from-indigo-400 to-blue-600 bg-clip-text text-transparent font-bold group-hover:from-indigo-300 group-hover:to-blue-500 transition-all duration-200",children:"Pricing"})})]})]}),(0,a.jsxs)("div",{className:"inline-flex items-center space-x-4 sm:space-x-8",children:[(0,a.jsx)("div",{children:(0,a.jsx)(p,{})}),(0,a.jsx)("div",{className:"md:hidden inline-flex items-center justify-center",children:(0,a.jsx)("button",{className:"text-gray-300",onClick:()=>t(!e),children:(0,a.jsx)(d.A,{className:"h-6 w-6"})})})]})]}),e&&(0,a.jsx)("div",{className:"md:hidden bg-gray-800 mt-2 py-4 px-4",children:(0,a.jsxs)("div",{className:"flex flex-col space-y-4",children:[g.M.l.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("button",{onClick:()=>n(!r),className:"text-gray-300 hover:text-white flex items-center",children:["Tools",r?(0,a.jsx)(i.A,{className:"ml-1 h-4 w-4"}):(0,a.jsx)(l.A,{className:"ml-1 h-4 w-4"})]}),r&&(0,a.jsx)("div",{className:"pl-4 flex flex-col space-y-2",children:g.M.l.map((e,r)=>(0,a.jsx)(o(),{href:e.href,className:"text-gray-400 hover:text-white",onClick:()=>t(!1),children:e.title},r))})]}),(0,a.jsx)(o(),{href:"/posts",className:"text-gray-300 hover:text-white",onClick:()=>t(!1),children:"Blog"}),(0,a.jsx)(o(),{href:"/pricing",className:"text-gray-300 hover:text-white",onClick:()=>t(!1),children:"Pricing"})]})})]})}},3999:(e,t,r)=>{"use strict";r.d(t,{cn:()=>n});var a=r(2596),s=r(9688);function n(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,s.QP)((0,a.$)(t))}r(4134)},6447:(e,t,r)=>{"use strict";r.d(t,{AppContextProvider:()=>p,U:()=>h});var a=r(5155),s=r(2115),n=r(9368),o=r(207),i=r(2940),l=r.n(i),d=r(8742),c=r.n(d),u=r(5493),m=r(7358),f=r(7358);let x=(0,s.createContext)({}),h=()=>(0,s.useContext)(x),p=e=>{let{children:t}=e;"true"===f.env.NEXT_PUBLIC_AUTH_GOOGLE_ONE_TAP_ENABLED&&f.env.NEXT_PUBLIC_AUTH_GOOGLE_ID&&function(){let{data:e,status:t}=(0,u.wV)(),r=async function(){let e={client_id:m.env.NEXT_PUBLIC_AUTH_GOOGLE_ID,auto_select:!1,cancel_on_tap_outside:!1,context:"signin"};c()(e,e=>{console.log("onetap login ok",e),n(e.credential)})},n=async function(e){console.log("signIn ok",await (0,u.Jv)("google-one-tap",{credential:e,redirect:!1}))};(0,s.useEffect)(()=>{if("unauthenticated"===t){r();let e=setInterval(()=>{r()},3e3);return()=>{clearInterval(e)}}},[t]),a.Fragment}();let{data:r}=(0,u.wV)(),[i,d]=(0,s.useState)(()=>
1f.env.NEXT_PUBLIC_DEFAULT_THEME||""),[h,p]=(0,s.useState)(!1),[g,v]=(0,s.useState)(null),[b,N]=(0,s.useState)(!1),y=async function(){try{let e=await fetch("/api/get-user-info",{method:"POST"});if(!e.ok)throw Error("fetch user info failed with status: "+e.status);let{code:t,message:r,data:a}=await e.json();if(0!==t)throw Error(r);v(a),j(a)}catch(e){console.log("fetch user info failed")}},j=async e=>{try{if(e.invited_by){console.log("user already been invited",e.invited_by);return}let t=(0,n.pr)(o.wD.InviteCode);if(!t)return;let r=l()(e.created_at).unix(),a=l()().unix(),s=Number(a-r);if(s<=0||s>7200){console.log("user created more than 2 hours");return}console.log("update invite",t,e.uuid);let i={invite_code:t,user_uuid:e.uuid},d=await fetch("/api/update-invite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!d.ok)throw Error("update invite failed with status: "+d.status);let{code:c,message:u,data:m}=await d.json();if(0!==c)throw Error(u);v(m),(0,n.np)(o.wD.InviteCode)}catch(e){console.log("update invite failed: ",e)}};return(0,s.useEffect)(()=>{r&&r.user&&y()},[r]),(0,a.jsx)(x.Provider,{value:{theme:i,setTheme:d,showSignModal:h,setShowSignModal:p,user:g,setUser:v,showFeedback:b,setShowFeedback:N},children:t})}},6877:(e,t,r)=>{Promise.resolve().then(r.bind(r,9782)),Promise.resolve().then(r.bind(r,2996)),Promise.resolve().then(r.t.bind(r,6874,23)),Promise.resolve().then(r.t.bind(r,9243,23))},7133:(e,t,r)=>{"use strict";r.d(t,{SQ:()=>m,_2:()=>f,lp:()=>x,mB:()=>h,rI:()=>c,ty:()=>u});var a=r(5155),s=r(2115),n=r(8698),o=r(3052),i=r(5196),l=r(9428),d=r(3999);let c=n.bL,u=n.l9;n.YJ,n.ZL,n.Pb,n.z6,s.forwardRef((e,t)=>{let{className:r,inset:s,children:i,...l}=e;return(0,a.jsxs)(n.ZP,{ref:t,className:(0,d.cn)("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",s&&"pl-8",r),...l,children:[i,(0,a.jsx)(o.A,{className:"ml-auto"})]})}).displayName=n.ZP.displayName,s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)(n.G5,{ref:t,className:(0,d.cn)("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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",r),...s})}).displayName=n.G5.displayName;let m=s.forwardRef((e,t)=>{let{className:r,sideOffset:s=4,...o}=e;return(0,a.jsx)(n.ZL,{children:(0,a.jsx)(n.UC,{ref:t,sideOffset:s,className:(0,d.cn)("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 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",r),...o})})});m.displayName=n.UC.displayName;let f=s.forwardRef((e,t)=>{let{className:r,inset:s,...o}=e;return(0,a.jsx)(n.q7,{ref:t,className:(0,d.cn)("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",s&&"pl-8",r),...o})});f.displayName=n.q7.displayName,s.forwardRef((e,t)=>{let{className:r,children:s,checked:o,...l}=e;return(0,a.jsxs)(n.H_,{ref:t,className:(0,d.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",r),checked:o,...l,children:[(0,a.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,a.jsx)(n.VF,{children:(0,a.jsx)(i.A,{className:"h-4 w-4"})})}),s]})}).displayName=n.H_.displayName,s.forwardRef((e,t)=>
1{let{className:r,children:s,...o}=e;return(0,a.jsxs)(n.hN,{ref:t,className:(0,d.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",r),...o,children:[(0,a.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,a.jsx)(n.VF,{children:(0,a.jsx)(l.A,{className:"h-2 w-2 fill-current"})})}),s]})}).displayName=n.hN.displayName;let x=s.forwardRef((e,t)=>{let{className:r,inset:s,...o}=e;return(0,a.jsx)(n.JU,{ref:t,className:(0,d.cn)("px-2 py-1.5 text-sm font-semibold",s&&"pl-8",r),...o})});x.displayName=n.JU.displayName;let h=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)(n.wv,{ref:t,className:(0,d.cn)("-mx-1 my-1 h-px bg-muted",r),...s})});h.displayName=n.wv.displayName},7168:(e,t,r)=>{"use strict";r.d(t,{$:()=>d,r:()=>l});var a=r(5155),s=r(2115),n=r(9708),o=r(2085),i=r(3999);let l=(0,o.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=s.forwardRef((e,t)=>{let{className:r,variant:s,size:o,asChild:d=!1,...c}=e,u=d?n.DX:"button";return(0,a.jsx)(u,{className:(0,i.cn)(l({variant:s,size:o,className:r})),ref:t,...c})});d.displayName="Button"},8516:e=>{"use strict";e.exports=JSON.parse('{"M":{"l":[]},"q":{"Tp":{"D":"AI Character Generator","h":"Our AI-powered platform enables the creation of consistent characters for both images and videos, delivering high-quality, reliable outputs. With our free tools, you can seamlessly generate and maintain character consistency across different media formats."}}}')},9368:(e,t,r)=>{"use strict";r.d(t,{PW:()=>n,np:()=>o,pr:()=>s});var a=r(1035);let s=e=>{let t=localStorage.getItem(e);if(!t)return null;let r=t.split(":");if(!r||r.length<2)return null;let s=Number(r[0]),n=(0,a.lg)();if(-1!==s&&s<n)return o(e),null;let i=r[0]+":";return t.replace(i,"")},n=(e,t,r)=>{localStorage.setItem(e,r+":"+t)},o=e=>{localStorage.removeItem(e)}},9663:(e,t,r)=>{"use strict";r.d(t,{BK:()=>l,eu:()=>i,q5:()=>d});var a=r(5155),s=r(2115),n=r(5977),o=r(3999);let i=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)(n.bL,{ref:t,className:(0,o.cn)("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",r),...s})});i.displayName=n.bL.displayName;let l=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)(n._V,{ref:t,className:(0,o.cn)("aspect-square h-full w-full",r),...s})});l.displayName=n._V.displayName;let d=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)(n.H4,{ref:t,className:(0,o.cn)("flex h-full w-full items-center justify-center rounded-full bg-muted",r),...s})});d.displayName=n.H4.displayName},9782:(e,t,r)=>{"use strict";r.d(t,{FooterItem:()=>i});var a=r(5155),s=r(5695),n=r(2115),o=r(8516);let i=()=>{let e="/"===(0,s.usePathname)(),t=(0,n.useRef)(!1),[r,i]=(0,n.useState)(o.q.Tp.D);return(0,n.useEffect)(()=>{!1===t.current&&(i(o.q.Tp.D),t.current=!0)},[e]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h3",{className:"text-2xl font-bold gradient-text mb-6",children:r}),(0,a.jsx)("p",{className:"text-gray-400 mb-6",children:o.q.Tp.h})]})}}},e=>{var t=t=>e(e.s=t);e.O(0,[586,829,6874,4565,5152,5493,855,9147,8441,1317,7358],()=>t(6877)),_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.