PageSourceSearch

https://whatsthebigdata.com/_next/static/chunks/pages/prompt-generator-0f0369a6c17d2ba1.js

js whatsthebigdata.com collected 2026-10-02 14:53:12 UTC 15,207 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5529],{477:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/prompt-generator",function(){return s(62935)}])},29979:function(e,t,s){"use strict";s.d(t,{B:function(){return o}});var a=s(85893),l=s(50607),i=s(67294);let{signIn:r}=s(33299),{useRouter:n}=s(11163),o=e=>{let{onClose:t}=e,[s,o]=(0,i.useState)(!1),d=n(),c=()=>{o(!0);let e=d.asPath;r("google",{callbackUrl:e})};return(0,a.jsx)("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},children:(0,a.jsxs)(l.E.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},style:{backgroundColor:"white",padding:"2rem",borderRadius:"0.5rem",maxWidth:"400px",width:"90%",textAlign:"center"},children:[(0,a.jsx)("h2",{style:{marginBottom:"1rem"},children:"Sign in to use this tool for free"}),(0,a.jsx)("p",{style:{marginBottom:"1rem"},children:"Unlock the power of AI Tools"}),(0,a.jsx)(l.E.button,{whileHover:{scale:1.05},whileTap:{scale:.95},disabled:s,onClick:c,style:{width:"100%",padding:"0.5rem 1rem",backgroundColor:"#4F46E5",color:"white",border:"none",borderRadius:"0.25rem",cursor:"pointer",marginBottom:"1rem"},children:s?(0,a.jsxs)("div",{className:"flex gap-3 items-center justify-center",children:["Signing in",(0,a.jsx)("div",{className:"w-6 h-6 border-t-2 border-white rounded-full animate-spin"})]}):"Sign in with Google"})]})})}},71095:function(e,t,s){"use strict";s.d(t,{Bw:function(){return h},Ph:function(){return c},Ql:function(){return f},i4:function(){return u},ki:function(){return m}});var a=s(85893),l=s(67294),i=s(79009),r=s(3424),n=s(2112),o=s(34001),d=s(98694);let c=i.fC;i.ZA;let m=i.B4,u=l.forwardRef(function(e,t){let{className:s,children:l,...n}=e;return(0,a.jsxs)(i.xz,{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 ",s),...n,style:{border:"1px solid #d1d5db"},children:[l,(0,a.jsx)(i.JO,{asChild:!0,children:(0,a.jsx)(r.Z,{className:"h-4 w-4 opacity-50"})})]})});u.displayName=i.xz.displayName;let x=l.forwardRef(function(e,t){let{className:s,...l}=e;return(0,a.jsx)(i.u_,{ref:t,className:(0,d.cn)("flex cursor-default items-center justify-center py-1",s),...l,children:(0,a.jsx)(n.Z,{className:"h-4 w-4"})})});x.displayName=i.u_.displayName;let p=l.forwardRef(function(e,t){let{className:s,...l}=e;return(0,a.jsx)(i.$G,{ref:t,className:(0,d.cn)("flex cursor-default items-center justify-center py-1",s),...l,children:(0,a.jsx)(r.Z,{className:"h-4 w-4"})})});p.displayName=i.$G.displayName;let h=l.forwardRef(function(e,t){let{className:s,children:l,position:r="popper",...n}=e;return(0,a.jsx)(i.h_,{children:(0,a.jsxs)(i.VY,{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"===r&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",s),position:r,...n,children:[(0,a.jsx)(x,{}),(0,a.jsx)(i.l_,{className:(0,d.cn)("p-1","popper"===r&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:l}),(0,a.jsx)(p,{})]})})});h.displayName=i.VY.displayName;let g=l.forwardRef(function(e,t){let{className:s,...l}=e;return(0,a.jsx)(i.__,{ref:t,className:(0,d.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",s),...l})});g.displayName=i.__.displayName;let f=l.forwardRef(function(e,t){let{className:s,children:l,...r}=e;return(0,a.jsxs)(i.ck,{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",s),...r,children:[(0,a.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,a.jsx)(i.wU,{children:(0,a.jsx)(o.Z,{className:"h-4 w-4"})})}),(0,a.jsx)(i.eT,{children:l})]})});f.displayName=i.ck.displayName;let j=l.forwardRef(function(e,t){let{className:s,...l}=e;return(0,a.jsx)(i.Z0,{ref:t,className:(0,d.cn)("-mx-1 my-1 h-px bg-muted",s),...l})});j.displayName=i.Z0.displayName},14055:function(e,t,s){"use strict";s.d(t,{g:function(){return r}});var a=s(85893),l=s(67294),i=s(98694);let r=l.forwardRef(function(e,t){let{className:s,...l}=e;return(0,a.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",s),ref:t,...l})});r.displayName="Textarea"},62935:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return f}});var a=s(85893),l=s(36657),i=s(9008),r=s.n(i),n=s(67294),o=s(50607),d=s(89583);s(33299);var c=s(71095),m=s(14055),u=s(37370),x=s(78936);s(29979);var p=s(11163),h=s(87066),g=s(67595);function f(){let[e,t]=(0,n.useState)(!1),[s,i]=(0,n.useState)([]),[f,j]=(0,n.useState)(0),[b,v]=(0,n.useState)("gpt-4o"),[N,y]=(0,n.useState)(!1),[w,C]=(0,n.useState)(""),[k,P]=(0,n.useState)("standard"),[Q,S]=(0,n.useState)("detailed"),[_,E]=(0,n.useState)("general"),z=(0,n.useRef)(null),A=g.K_.introContent,B=(0,p.useRouter)(),R=(null==A?void 0:A.title)||"AI Prompt Generator",I=async e=>{e.preventDefault(),t(!0);try{let e=await h.Z.post("/api/generate-prompt",{promptDescription:w,promptType:k,promptFormat:Q,promptSpecialization:_,model:b});if(e.data&&e.data.prompts)i(e.data.prompts),j(0);else throw Error("No prompts received from API")}catch(e){console.error("Error generating prompts:",e)}t(!1)},T=()=>{s.length>0&&(navigator.clipboard.writeText(s[f].text),alert("Prompt copied to clipboard!"))},Z=()=>
1{if(s.length>0){let e=document.createElement("a"),t=new Blob([s[f].text],{type:"text/plain"});e.href=URL.createObjectURL(t),e.download="ai-prompt.txt",document.body.appendChild(e),e.click(),document.body.removeChild(e)}},G=()=>{i([])},O=()=>{f>0&&j(f-1)},W=()=>{f<s.length-1&&j(f+1)};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(r(),{children:[(0,a.jsx)("title",{children:R}),(0,a.jsx)("link",{rel:"canonical",href:`https://whatsthebigdata.com${B.asPath.split("?")[0]}`}),(0,a.jsx)("meta",{name:"description",content:(null==A?void 0:A.description)||"Create perfect AI prompts to get the best results from any AI model"})]}),(0,a.jsxs)(l.Z,{children:[(0,a.jsxs)("div",{className:"max-w-5xl mx-auto ",children:[(0,a.jsxs)("div",{className:"bg-white p-6 rounded-xl shadow-lg mb-8",children:[(0,a.jsx)("div",{className:"mb-8 border-b-2 border-indigo-100",children:(0,a.jsxs)("div",{className:"mb-5",children:[(0,a.jsx)("h1",{className:"display-3 mg-bottom-0",children:R}),(0,a.jsx)("p",{className:"paragraph-large mg-top-16px",children:(null==A?void 0:A.description)||"Create perfect AI prompts to get the best results from any AI model"})]})}),(0,a.jsxs)("form",{onSubmit:I,className:"space-y-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"font-semibold text-indigo-700",children:"What do you want to create a prompt for?"}),(0,a.jsx)(m.g,{placeholder:"Describe what you want to accomplish with AI, e.g., 'I need a prompt for writing a compelling cover letter for a marketing job'",className:"mt-1",rows:5,value:w,onChange:e=>C(e.target.value),ref:z,required:!0})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"font-semibold text-indigo-700",children:"Prompt Type:"}),(0,a.jsxs)(c.Ph,{onValueChange:P,value:k,children:[(0,a.jsx)(c.i4,{className:"mt-1",children:(0,a.jsx)(c.ki,{placeholder:"Select prompt type"})}),(0,a.jsxs)(c.Bw,{className:"bg-white",children:[(0,a.jsx)(c.Ql,{value:"standard",children:"Standard"}),(0,a.jsx)(c.Ql,{value:"creative",children:"Creative"}),(0,a.jsx)(c.Ql,{value:"professional",children:"Professional"}),(0,a.jsx)(c.Ql,{value:"academic",children:"Academic"}),(0,a.jsx)(c.Ql,{value:"technical",children:"Technical"}),(0,a.jsx)(c.Ql,{value:"conversational",children:"Conversational"})]})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"font-semibold text-indigo-700",children:"Format Style:"}),(0,a.jsxs)(c.Ph,{onValueChange:S,value:Q,children:[(0,a.jsx)(c.i4,{className:"mt-1",children:(0,a.jsx)(c.ki,{placeholder:"Select format"})}),(0,a.jsxs)(c.Bw,{className:"bg-white",children:[(0,a.jsx)(c.Ql,{value:"simple",children:"Simple (Basic instruction)"}),(0,a.jsx)(c.Ql,{value:"detailed",children:"Detailed (With context)"}),(0,a.jsx)(c.Ql,{value:"role-based",children:"Role-Based (Expert persona)"}),(0,a.jsx)(c.Ql,{value:"step-by-step",children:"Step-by-Step"}),(0,a.jsx)(c.Ql,{value:"structured",children:"Structured (With sections)"})]})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"font-semibold text-indigo-700",children:"Specialization:"}),(0,a.jsxs)(c.Ph,{onValueChange:E,value:_,children:[(0,a.jsx)(c.i4,{className:"mt-1",children:(0,a.jsx)(c.ki,{placeholder:"Select specialization"})}),(0,a.jsxs)(c.Bw,{className:"bg-white",children:[(0,a.jsx)(c.Ql,{value:"general",children:"General Purpose"}),(0,a.jsx)(c.Ql,{value:"writing",children:"Content Writing"}),(0,a.jsx)(c.Ql,{value:"coding",children:"Programming/Coding"}),(0,a.jsx)(c.Ql,{value:"business",children:"Business/Marketing"}),(0,a.jsx)(c.Ql,{value:"education",children:"Education/Learning"}),(0,a.jsx)(c.Ql,{value:"creative",children:"Creative Arts"})]})]})]})]}),N&&(0,a.jsx)("div",{className:"space-y-6",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"font-semibold text-indigo-700",children:"Choose AI Model:"}),(0,a.jsxs)(c.Ph,{onValueChange:v,value:b,children:[(0,a.jsx)(c.i4,{className:"mt-1 max-w-xs text-indigo-600",children:(0,a.jsx)(c.ki,{placeholder:"Select model"})}),(0,a.jsxs)(c.Bw,{className:"bg-white text-indigo-600",children:[(0,a.jsxs)(c.Ql,{value:"gpt-4o",className:"flex gap-2 justify-start items-start",children:[" ",(0,a.jsx)("img",{src:"/images/models/chatgpt-icon.png",className:"size-5 mr-2",alt:" "})," ChatGPT-4o"]}),(0,a.jsxs)(c.Ql,{value:"gpt-4o-mini",className:"flex gap-2 justify-start items-start",children:[" ",(0,a.jsx)("img",{src:"/images/models/chatgpt-icon.png",className:"size-5 mr-2",alt:" "})," ChatGPT-4o Mini"]}),(0,a.jsxs)(c.Ql,{value:"claude-3-opus",className:"flex gap-10  ",children:[" ",(0,a.jsx)("img",{src:"/images/models/claude-ai-icon.png",alt:" ",className:"size-5 mr-2"})," Claude 3 Opus"]}),(0,a.jsxs)(c.Ql,{value:"claude-3-sonnet",className:"flex gap-2 justify-start items-start",children:[" ",(0,a.jsx)("img",{src:"/images/models/claude-ai-icon.png",alt:" ",className:"size-5 mr-2"})," Claude 3.5 Sonnet"]}),(0,a.jsxs)(c.Ql,{value:"llama-3",className:"flex gap-2 justify-start items-start",children:[" ",(0,a.jsx)("img",{src:"/images/models/meta-icon.png",alt:" ",className:"size-5 mr-2"})," Llama 3"]}),(0,a.jsxs)(c.Ql,{value:"llama-3-pro",className:"flex gap-2 justify-start items-start",children:[" ",(0,a.jsx)("img",{src:"/images/models/meta-icon.png",alt:" ",className:"size-5 mr-2"})," Llama 3.1 (Pro)"]}),(0,a.jsxs)(c.Ql,{value:"perplexity-ai",className:"flex gap-2 justify-start items-start",children:[" ",(0,a.jsx)("img",{src:"/images/models/perplexity-ai-icon.png",alt:" ",className:"size-5 mr-2"})," Perplexity AI"]}),(0,a.jsxs)(c.Ql,{value:"mistral-large",className:"flex gap-2 justify-start items-start",children:[" ",(0,a.jsx)("img",{src:"/images/models/mistral-ai-icon.png",alt:" ",className:"size-5 mr-2"}),"Mistral Large"]}),(0,a.jsxs)(c.Ql,{value:"gemini-1.5-pro",className:"flex gap-2 justify-start items-start",children:[" ",(0,a.jsx)("img",{src:"/images/models/google-gemini-icon.png",alt:" ",className:"size-5 mr-2"}),"Gemini 1.5 Pro"]})]})]})]})}),(0,a.jsx)("div",{className:"flex justify-between flew-wrap md:flex-row flex-col gap-4",children:(0,a.jsx)("button",{type:"button",onClick:()=>y(!N),className:"text-indigo-600 font-medium",children:N?"Hide Advanced Options":"Show Advanced Options"})}),(0,a.jsx)(o.E.button,{whileHover:{scale:1.02},whileTap:{scale:.98},type:"submit",className:"w-full bg-gradient-to-r from-indigo-600 to-purple-600 text-white py-3 rounded-lg font-semibold",disabled:e,children:e?"Creating Your Prompts...":"Generate Perfect Prompts"})]})]}),s.length>0&&(0,a.jsx)(o.E.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},children:(0,a.jsxs)("div",{className:"bg-white p-6 rounded-xl shadow-lg",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,a.jsx)("p",{className:"text-2xl font-bold text-indigo-800 border-b-2 border-indigo-100 pb-2",children:"Your AI Prompt"}),(0,a.jsxs)("div",{className:"flex gap-4",children:[(0,a.jsx)(o.E.button,{whileHover:{scale:1.1},onClick:T,title:"Copy to clipboard",children:(0,a.jsx)(d.esY,{className:"text-indigo-600"})}),(0,a.jsx)(o.E.button,{whileHover:{scale:1.1},onClick:Z,title:"Download as text file",children:(0,a.jsx)(d.aBF,{className:"text-green-600"})}),(0,a.jsx)(o.E.button,{whileHover:{scale:1.1},onClick:G,title:"Clear prompts",children:(0,a.jsx)(d.Xm5,{className:"text-red-600"})})]})]}),(0,a.jsxs)("div",{className:"bg-gray-50 p-6 rounded-lg mb-4",children:[(0,a.jsx)("div",{className:"flex justify-between items-center mb-3",children:(0,a.jsxs)("h4",{className:"font-semibold text-gray-700",children:["Prompt ",f+1," of ",s.length]})}),(0,a.jsx)("div",{className:"border rounded-lg bg-white p-4 whitespace-pre-wrap font-medium text-gray-800",children:s[f].text}),s[f].explanation&&(0,a.jsxs)("div",{className:"mt-4",children:[(0,a.jsx)("h5",{className:"font-medium text-gray-700 mb-1",children:"Why This Prompt Works:"}),(0,a.jsx)("div",{className:"text-sm text-gray-600 border-l-2 border-indigo-300 pl-3",children:s[f].explanation})]})]}),(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("button",{onClick:O,disabled:0===f,className:`px-4 py-2 rounded ${0===f?"bg-gray-200 text-gray-400":"bg-indigo-100 text-indigo-700 hover:bg-indigo-200"}`,children:"Previous Prompt"}),(0,a.jsx)("button",{onClick:W,disabled:f===s.length-1,className:`px-4 py-2 rounded ${f===s.length-1?"bg-gray-200 text-gray-400":"bg-indigo-100 text-indigo-700 hover:bg-indigo-200"}`,children:"Next Prompt"})]})]})},"content")]}),(0,a.jsx)(x.Z,{title:R,slug:"prompt-generator",fallbackData:g.K_}),(0,a.jsx)(u.Z,{})]})]})}}},function(e){e.O(0,[5445,3996,5675,2498,8764,7066,607,6501,1789,3034,6657,6947,7595,9774,2888,179],function(){return e(e.s=477)}),_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.