PageSourceSearch

https://www.myvideogen.ai/assets/FreeScriptGeneratorPage-Cj0jqUb9.js

js myvideogen.ai collected 2026-10-05 13:03:53 UTC 8,333 bytes, 1 lines download raw bytes

1import{j as e}from"./vendor-motion-C5VlCyLx.js";import{e as w,r as a,L as o}from"./vendor-router-DYDLAwsF.js";import{c as S}from"./composerSeed-BWJxzO97.js";import{u as k}from"./usePageMeta-BgXrvnGf.js";import{N as T}from"./Navbar-CLa5icxD.js";import{r as I,b,M as _,x as C,O as P}from"./index-BmvrsGgJ.js";import"./templateDefaults-DnkKb65n.js";try{let r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new r.Error().stack;i&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[i]="80316108-7bfb-4b37-aa71-da54d1b1f13e",r._sentryDebugIdIdentifier="sentry-dbid-80316108-7bfb-4b37-aa71-da54d1b1f13e")}catch{}const y="/tools/script-generator",E=["Restaurant & Food","Real Estate","E-Commerce & Retail","Fitness & Wellness","SaaS & Technology","Beauty & Cosmetics","Education","Healthcare","Consulting","Local Services","Fashion","Travel & Hospitality","Finance","Non-Profit","Other"],F=["Product showcase","Brand story","Customer testimonial","Sale promotion","Event announcement","How it works","Behind the scenes","Quick tip"];function O(){k({title:`Free AI Video Script Generator | ${b.name}`,description:"Generate a complete video script with scene breakdown in seconds. Free with an account."});const r=w(),i=I(t=>t.user),[x,f]=a.useState(""),[m,g]=a.useState("Product showcase"),[n,j]=a.useState(""),[c,p]=a.useState(!1),[s,u]=a.useState(null),[h,l]=a.useState("");async function v(){if(n.trim()){p(!0),l(""),u(null);try{const{data:t}=await _.post("/tools/generate-script",{product_name:n,video_type:m,industry:x||"general business"});u(t)}catch(t){C(t)===429?l("That’s 3 free scripts this hour. Try again in an hour."):l(P(t)??"Generation failed. Please try again.")}finally{p(!1)}}}function N(){if(!s)return;const t=[s.title,...s.scenes.map(d=>d.visual_description)].filter(Boolean).join(". ");r(S({text:t}))}return e.jsxs("div",{className:"min-h-screen bg-surface",children:[e.jsx(T,{}),e.jsxs("section",{className:"mx-auto max-w-3xl px-4 pb-8 pt-24 text-center sm:pt-32",children:[e.jsx("p",{className:"text-sm font-medium uppercase tracking-widest text-primary",children:"Free tool · sign in to use it"}),e.jsx("h1",{className:"mt-3 font-heading text-3xl font-bold text-text-primary sm:text-4xl md:text-5xl",children:"AI Video Script Generator"}),e.jsx("p",{className:"mx-auto mt-4 max-w-xl text-base text-text-secondary sm:text-lg",children:"Get a complete scene-by-scene video script in 5 seconds. Describe your product, pick a style, and let AI write your marketing video."})]}),e.jsx("section",{className:"mx-auto max-w-2xl px-4 pb-12",children:e.jsx("div",{className:"rounded-2xl border border-border-default bg-surface-raised p-6 shadow-warm-sm sm:p-8",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"mb-1.5 block text-sm font-medium text-text-primary",children:["Your Product or Service ",e.jsx("span",{className:"text-primary",children:"*"})]}),e.jsx("input",{type:"text",value:n,onChange:t=>j(t.target.value),placeholder:"e.g., Artisan sourdough bread, Personal training sessions, SaaS analytics tool",className:"w-full min-h-[48px] rounded-xl border border-border-default px-4 py-3 text-base text-text-primary placeholder:text-text-secondary/50 focus:border-primary focus:outline-none focus:ring-1 focus:ring-ring"})]}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-sm font-medium text-text-primary",children:"Industry"}),e.jsxs("select",{value:x,onChange:t=>f(t.target.value),className:"w-full min-h-[48px] rounded-xl border border-border-default px-4 py-3 text-base text-text-primary focus:border-primary focus:outline-none",children:[e.jsx("option",{value:"",children:"Select industry..."}),E.map(t=>e.jsx("option",{value:t,children:t},t))]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-sm font-medium text-text-primary",children:"Video Type"}),e.jsx("select",{value:m,onChange:t=>g(t.target.value),className:"w-full min-h-[48px] rounded-xl border border-border-default px-4 py-3 text-base text-text-primary focus:border-primary focus:outline-none",children:F.map(t=>e.jsx("option",{value:t,children:t},t))})]})]}),i?e.jsx("button",{onClick:v,disabled:c||!n.trim(),className:"w-full min-h-[52px] rounded-xl bg-primary py-3.5 text-base font-semibold text-primary-foreground shadow-warm-sm transition-colors hover:bg-primary-hover active:bg-primary-hover disabled:opacity-50","data-testid":"script-tool-submit",children:c?"Generating Script...":"Generate Free Script"}):e.jsxs("div",{className:"text-center","data-testid":"script-tool-signin-required",children:[e.jsx(o,{to:`/login?next=${encodeURIComponent(y)}`,className:"flex w-full min-h-[52px] items-center justify-center rounded-xl bg-primary py-3.5 text-base font-semibold text-primary-foreground shadow-warm-sm transition-colors hover:bg-primary-hover active:bg-primary-hover",children:"Sign in to generate a script"}),e.jsxs("p",{className:"mt-2 text-sm text-text-secondary",children:["New here?"," ",e.jsx(o,{to:`/signup?next=${encodeURIComponent(y)}`,className:"font-semibold text-primary underline",children:"Create a free account"})]})]}),h&&e.jsx("p",{className:"text-center text-sm text-error",children:h})]})})}),s&&e.jsx("section",{className:"mx-auto max-w-2xl px-4 pb-16",children:e.jsxs("div",{className:"rounded-2xl border border-accent/30 bg-surface-raised p-6 sm:p-8",children:[e.jsx("h2",{className:"font-heading text-2xl font-bold text-text-primary",children:s.title}),e.jsxs("p",{className:"mt-1 text-sm text-text-secondary",children:[s.scenes.length," scenes · ~",s.scenes.reduce((t,d)=>t+d.duration_seconds,0),"s total"]}),e.jsx("div",{className:"mt-6 space-y-4",children:s.scenes.map(t=>e.jsxs("div",{className:"rounded-xl border-l-4 border-l-primary bg-surface/30 p-4",children:[e.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[e.jsx("span",{className:"font-heading text-3xl font-bold text-primary/30",children:t.scene_number}),e.jsxs("span",{className:"text-xs text-text-secondary",children:[t.duration_seconds,"s"]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-semibold uppercase tracking-wider text-text-secondary",children:"Visual"}),e.jsx("p",{className:"text-sm text-text-primary",children:t.visual_description})]}),t.voiceover&&e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-semibold uppercase tracking-wider text-text-secondary",children:"Voiceover"}),e.jsxs("p",{className:"text-sm italic text-text-secondary",children:['"',t.voiceover,'"']})]})]})]},t.scene_number))}),e.jsxs("div",{className:"mt-8 rounded-xl bg-primary/5 p-5 text-center",children:[e.jsx("h3",{className:"font-heading text-lg font-bold text-text-primary",children:"Turn this 
1script into a video"}),e.jsx("p",{className:"mt-1 text-sm text-text-secondary",children:"Take it into Story and make it as a video."}),e.jsx("button",{onClick:N,className:"mt-4 min-h-[48px] rounded-xl bg-primary px-8 py-3 text-base font-semibold text-primary-foreground shadow-warm-sm transition-colors hover:bg-primary-hover active:bg-primary-hover",children:"Make This Video →"})]})]})}),!s&&!c&&e.jsx("section",{className:"mx-auto max-w-3xl px-4 pb-16",children:e.jsx("div",{className:"grid gap-6 sm:grid-cols-3",children:[{emoji:"⚡",title:"5 seconds",desc:"Complete script generation"},{emoji:"🎬",title:"Scene-by-scene",desc:"Visual + voiceover for each scene"},{emoji:"🆓",title:"Free",desc:"With your account"}].map(t=>e.jsxs("div",{className:"rounded-xl bg-surface-raised p-5 text-center",children:[e.jsx("p",{className:"text-2xl",children:t.emoji}),e.jsx("p",{className:"mt-2 font-heading text-lg font-bold text-text-primary",children:t.title}),e.jsx("p",{className:"mt-1 text-sm text-text-secondary",children:t.desc})]},t.title))})}),e.jsxs("footer",{className:"border-t border-border-default py-8 text-center text-xs text-text-secondary",children:["© ",new Date().getFullYear()," ",b.name," ·"," ",e.jsx(o,{to:"/pricing",className:"text-primary hover:text-primary-hover",children:"Pricing"})," ","·"," ",e.jsx(o,{to:"/",className:"text-primary hover:text-primary-hover",children:"Home"})]})]})}export{O as default};

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.