1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[448],{76634:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/headstart/[id]/outline",function(){return a(94375)}])},32647:function(e,t){"use strict";t.Z={src:"/_next/static/media/Symbol_White.bdc265f2.svg",height:37,width:82,blurWidth:0,blurHeight:0}},17963:function(e,t,a){"use strict";a.d(t,{Z:function(){return BrandButton}});var r=a(85893),n=a(57851),i=a(43495);function BrandButton(e){let{text:t,onClick:a,disabled:l,variant:o,className:s}=e;return(0,r.jsx)(i.E.button,{onClick:a,disabled:l,whileTap:{scale:.98},whileHover:{scale:1.02},transition:{duration:.1},className:(0,n.m)("bg-gradient-to-b from-green-500 to-green-600 hover:from-green-500 hover:to-green-500 text-white font-bold py-2 px-4 rounded disabled:opacity-50 w-fit",s),children:t})}},30752:function(e,t,a){"use strict";a.d(t,{D:function(){return DummyEditorPage},a:function(){return DummyBars}});var r=a(85893),n=a(25675),i=a.n(n),l=a(41664),o=a.n(l),s=a(67294),d=a(32647),c=a(43495),u=a(57632);let DummyEditorPage=()=>{let[e,t]=(0,s.useState)([]);(0,s.useEffect)(()=>{createRandomBars()},[]);let createRandomBars=()=>{let e=[];for(let t=0;t<15;t++)e.push({id:t,value:Math.floor(100*Math.random()),color:"hsl(".concat(Math.floor(360*Math.random()),", 100%, 50%)"),width:Math.floor(100*Math.random())});t(e)};return(0,r.jsxs)("div",{className:"h-screen w-full relative bg-gray-50",children:[(0,r.jsxs)("div",{className:"flex flex-row justify-between px-20 py-10",children:[(0,r.jsx)(o(),{href:"/",children:(0,r.jsx)(i(),{className:"block h-8 w-auto cursor-pointer lg:absolute lg:top-0 lg:left-0 lg:ml-4 lg:mt-2 p-2",src:d.Z,alt:"Moonbeam"})}),(0,r.jsx)("div",{className:"flex flex-row overflow-hidden rounded-xl",children:[...[,,,,,].fill(1)].map((e,t)=>(0,r.jsx)("div",{className:"h-10 w-10 bg-gray-200"},"first"+t))}),(0,r.jsx)("div",{className:"flex flex-row overflow-hidden rounded-xl",children:[...[,,,,,].fill(1)].map((e,t)=>(0,r.jsx)("div",{className:"h-10 w-10 bg-gray-200"},"second"+t))}),(0,r.jsx)("div",{className:"flex flex-row overflow-hidden rounded-xl",children:[...[,,,,,].fill(1)].map((e,t)=>(0,r.jsx)("div",{className:"h-10 w-10 bg-gray-200"},"third"+t))}),(0,r.jsx)("div",{className:"flex flex-row overflow-hidden rounded-xl",children:[...[,,,,,].fill(1)].map((e,t)=>(0,r.jsx)("div",{className:"h-10 w-10 bg-gray-200"},"fourth"+t))}),(0,r.jsx)("div",{className:"flex flex-row overflow-hidden rounded-xl",children:[...[,,,,,].fill(1)].map((e,t)=>(0,r.jsx)("div",{className:"h-10 w-10 bg-gray-200"},"fifth"+t))})]}),(0,r.jsxs)("div",{className:"max-w-7xl flex space-x-10 mx-auto w-full h-[80%]",children:[(0,r.jsx)(c.E.div,{variants:{hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.1}}},initial:"hidden",animate:"show",className:"h-full bg-white w-[70%] rounded-md relative overflow-y-auto p-10 flex flex-col ",children:e.map(e=>(0,r.jsx)(c.E.div,{initial:{width:0},animate:{width:e.width+"%",opacity:1},transition:{duration:1},className:"bg-gray-100 h-12 rounded-lg mb-4"},e.id))}),(0,r.jsx)("div",{className:"h-full bg-white w-[30%] rounded-md flex flex-col justify-end",children:(0,r.jsx)("div",{className:"w-[90%] mx-auto h-12 bg-gray-50 mb-10 rounded-md"})})]})]})},DummyBars=()=>{let[e,t]=(0,s.useState)([]);(0,s.useEffect)(()=>{createRandomBars()},[]);let createRandomBars=()=>{let e=[];for(let t=0;t<15;t++)e.push({id:t,value:Math.floor(100*Math.random()),color:"hsl(".concat(Math.floor(360*Math.random()),", 100%, 50%)"),width:Math.floor(51*Math.random()+30),key:(0,u.Z)(),height:Math.floor(11*Math.random()+30)});t(e)};return(0,r.jsx)(c.E.div,{variants:{hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.1}}},initial:"hidden",animate:"show",className:"h-full bg-white w-full rounded-md relative overflow-y-auto py-10 flex flex-col ",children:e.map(e=>(0,r.jsx)(c.E.div,{initial:{width:e.width+"%"},animate:{width:"100%",opacity:1,transition:{duration:Math.floor(3*Math.random()+3),repeat:1/0,repeatType:"reverse"}},transition:{duration:1},style:{height:e.height},className:"bg-gray-100 rounded-lg mb-4"},e.key))})}},17853:function(e,t,a){"use strict";a.d(t,{Z:function(){return LoaderOverlay}});var r=a(85893),n=a(27555),i=a(57851);function LoaderOverlay(e){let{className:t,loadingComponent:a}=e;return(0,r.jsx)("div",{className:(0,i.m)("fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-75 w-full h-full",t),children:a||(0,r.jsx)(n.Z,{size:100,color:"#33FA83",speedMultiplier:1.3})})}},89863:function(e,t,a){"use strict";a.d(t,{Q:function(){return LoadingSmall}});var r=a(85893);a(67294);var n=a(53416),i=a(57851),l=a(32647),o=a(25675),s=a.n(o);let LoadingSmall=e=>{let{containerClassName:t,iconContainerClassName:a,imageClassName:n,text:o="",ringClassName:d=""}=e;return(0,r.jsxs)("div",{className:(0,i.m)("flex h-full w-full items-center justify-center",t),children:[(0,r.jsxs)("div",{className:(0,i.m)("relative flex h-10 w-10 items-center justify-center rounded-full bg-green-500",a),children:[(0,r.jsx)(Backgroun
1dIllustration,{className:(0,i.m)("absolute z-20 h-12 w-12 stroke-gray-300",d)}),(0,r.jsx)(s(),{alt:"Logo",src:l.Z,width:"20",height:"20",className:"h-4 w-4 animate-pulse object-contain rounded-full"})]}),o&&o]})};function BackgroundIllustration(e){return(0,n.x0)(),(0,r.jsx)("div",{...e,children:(0,r.jsxs)("svg",{viewBox:"0 0 1026 1026",fill:"none","aria-hidden":"true",className:"absolute inset-0 h-full w-full animate-spin-reverse-slower",children:[(0,r.jsx)("path",{d:"M913 513c0 220.914-179.086 400-400 400S113 733.914 113 513s179.086-400 400-400 400 179.086 400 400Z",stroke:"#D4D4D4",strokeOpacity:"1",strokeWidth:14}),(0,r.jsx)("path",{d:"M913 513c0 220.914-179.086 400-400 400",stroke:"url(#:R65m:-gradient-2)",strokeLinecap:"round",strokeWidth:14}),(0,r.jsx)("defs",{children:(0,r.jsxs)("linearGradient",{id:":R65m:-gradient-2",x1:"913",y1:"513",x2:"913",y2:"913",gradientUnits:"userSpaceOnUse",children:[(0,r.jsx)("stop",{stopColor:"#06b6d4"}),(0,r.jsx)("stop",{offset:"1",stopColor:"#06b6d4",stopOpacity:"0"})]})})]})})}},22608:function(e,t,a){"use strict";a.d(t,{Z:function(){return HeadstartLayout}});var r=a(85893);a(67294);var n=a(11163),i=a(43495),l=a(51526);let o=[{id:"Step 1",name:"Details",href:"#",status:"details",number:1,active:["details","create-document"]},{id:"Step 2",name:"Outline",href:"#",status:"outline",number:2,active:["outline"]},{id:"Step 3",name:"Editor",href:"#",status:"editor",number:3,active:["editor"]}];function Steps(){let e=(0,n.useRouter)(),t=o.findIndex(t=>t.active.some(t=>e.pathname.includes(t)));return(0,r.jsx)("nav",{"aria-label":"Progress",className:"relative",children:(0,r.jsx)("div",{className:" pb-8 md:flex md:flex-col md:w-44 lg:w-72 md:sticky md:top-24 left-0",children:o.map((e,a)=>(0,r.jsx)(Step,{step:e,currentStep:t,idx:a},"step-".concat(a)))})})}function Step(e){let{step:t,currentStep:a,idx:n}=e,o=a===n?"active":a<n?"inactive":"complete";return(0,r.jsxs)("div",{className:"flex space-x-6 items-center mb-8",children:[(0,r.jsxs)(i.E.div,{animate:o,initial:o,className:"relative",children:[(0,r.jsx)(i.E.div,{transition:u,variants:h,className:"absolute inset-0 rounded-full"}),(0,r.jsx)(i.E.div,{variants:d,transition:s,className:"relative flex h-8 w-8 items-center justify-center rounded-full border-2 border-slate-400 bg-white font-semibold text-slate-500",children:(0,r.jsx)("div",{className:"relative flex items-center justify-center",children:(0,r.jsx)(l.M,{children:"complete"===o?(0,r.jsx)(CheckIcon,{className:"h-6 w-6 text-white"}):(0,r.jsx)(i.E.span,{animate:{opacity:1},exit:{scale:.5,opacity:0},className:"absolute",children:t.number},"step")})})})]}),(0,r.jsx)(i.E.span,{initial:o,animate:o,variants:c,className:"text-gray-700 font-bold text-lg capitalize tracking-wide",children:t.status})]})}function CheckIcon(e){return(0,r.jsx)("svg",{...e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:(0,r.jsx)(i.E.path,{variants:x,transition:m,strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})}let s={duration:.2},d={inactive:{background:"var(--white)",borderColor:"var(--slate-200)",color:"var(--slate-400)"},active:{background:"var(--white)",borderColor:"var(--green-500)",color:"var(--green-500)"},complete:{background:"var(--green-500)",borderColor:"var(--green-500)"}},c={inactive:{color:"var(--slate-400)"},active:{color:"var(--green-500)"},complete:{color:"var(--slate-400)"}},u={duration:.6,delay:.2,type:"tween",ease:"circOut"},h={inactive:{background:"var(--green-200)"},active:{background:"var(--green-200)",scale:1,transition:{duration:.3,type:"tween",ease:"circOut"}},complete:{background:"var(--green-200)",scale:1.25}},m={ease:"easeOut",type:"tween",delay:.2,duration:.3},x={complete:{pathLength:[0,1]}};var f=a(20813),v=a(29985);a(86501);var g=a(15404),p=a(37122),w=a(79766);function HeadstartLayout(e){let{children:t}=e;f.S.user.setModel.useMutation();let{user:a}=(0,p.aF)(),{data:n}=f.S.user.me.useQuery(void 0,w.Z);return(0,v.z)(),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(g.Z,{user:a,fullUser:n,showPersonaButton:!1,showLogo:!0,showOrg:!1}),(0,r.jsx)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pb-12",children:(0,r.jsxs)("div",{className:"mx-auto mt-32 flex flex-col md:flex-row space-x-2",children:[(0,r.jsx)(Steps,{}),t]})})]})}},94375:function(e,t,a){"use strict";a.r(t),a.d(t,{__N_SSP:function(){return z},default:function(){return W}});var r=a(85893),n=a(9669),i=a.n(n),l=a(9008),o=a.n(l),s=a(11163),d=a(67294),c=a(22608),u=a(55678),h=a(17853),m=a(17963),x=a(20813),f=a(37122),v=a(65845),g=a(76199),p=a(32998),w=a(22292),j=a(6898),b=a(4506),y=a(71954),N=a(84260),k=a(77943),S=a.n(k),C=a(36571),E=a(86146),M=a(30176),R=a(91058),L=a(44783),B=a(23277),O=a(73435),P=a(87632);function MyCustomAutoFocusPlugin(){let[e]=(0,N.useLexicalComposerContext)();return(0,d.useEffect)(()=>{e.focus()},[e]),null}function onError(e){console.error(e)}function LexicalEditor(e){let{initialMarkdown:t,handleChange:a}=e,n={namespace:"Editor",onError,editorState:()=>(0,C.$convertFromMarkdownString)(t,C.TRANSFORMERS),theme:{root:"p-4 prose rounded h-full min-h-[200px] focus:outline-none",link:"cursor-pointer",text:{bold:"font-semibold",underline:"underline",italic:"italic",strikethrough:"line-through",underlineStrikethrough:"underlined-line-through"}},nodes:[M.HeadingNode,L.ListNode,L.ListItemNode,M.QuoteNode,B.CodeNode,B.CodeHighlightNode,R.TableNode,R.TableCellNode,R.TableRowNode,O.AutoLinkNode,O.LinkNode]};return(0,r.jsxs)(w.LexicalComposer,{initialConfig:n,children:[(0,r.jsx)(E.RichTextPlugin,{contentEditable:(0,r.jsx)(j.ContentEditable,{}),placeholder:(0,r.jsx)("div",{children:"Enter some text..."}),ErrorBoundary:S()}),(0,r.jsx)(P.MarkdownShortcutPlugin,{transformers:C.TRANSFORMERS}),(0,r.jsx)(y.OnChangePlugin,{onChange:e=>{e.read(()=>{let e=(0,p.$getRoot)(),t=(0,p.$getSelection)(),r=(0,C.$convertToMarkdownString)(C.TRANSFORMERS);null==a||a(r),console.log(e,t)})}}),(0,r.jsx)(b.HistoryPlugin,{}),(0,r.jsx)(MyCustomAutoFocusPlugin,{})]})}var _=a(89863),T=a(43495),Z=a(51526),F=a(30752);let H={ease:"easeOut",type:"tween",delay:.2,duration:.3},I={complete:{pathLength:[0,1]}},D={duration:.2},A={inactive:{background:"var(--white)",borderColor:"var(--slate-200)",color:"var(--slate-400)"},active:{background:"var(--white)",borderColor:"var(--green-500)",color:"var(--green-500)"},complete:{background:"var(--green-500)",borderColor:"var(--green-500)"}},HeadStartIndex=()=>{var e,t,a,n;let l=(0,s.useRouter)(),c=null===(e=l.query)||void 0===e?void 0:e.id,{data:p}=x.S.post.one.useQuery(c);(0,f.aF)();let w=x.S.post.createOutline.useMutation(),[j,b]=(0,d.useState)(!1),[y,N]=(0,d.useState)(null==p?void 0:p.title),[k,S]=(0,d.useState)(null==p?void 0:null===(t=p.outline)||void 0===t?void 0:t.points),[C,E]=(0,d.useState)(!1),[M,R]=(0,d.useState)(!1),[L,B]=(0,d.useState)(void 0);(0,d.useRef)(null);let[O,P]=(0,d.useState)(null==p?void 0:null===(a=p.outline)||void 0===a?void 0:a.content),[z,W]=(0,d.useState)((null==p?void 0:p.outlineRaw)||""),[Q,$]=(0,d.useState)(""),U=null===(n=l.query)||void 0===n?void 0:n.id,q=(0,d.useRef)(null);(0,d.useEffect)(()=>{scrollToBottom()},[Q]);let scrollToBottom=()=>{var e;q.current.scrollTop=null==q?void 0:null===(e=q.current)||void 0===e?void 0:e.scrollHeight};(0,d.useEffect)(()=>
1{if(!C&&!(null==p?void 0:p.outlineRaw)){let e=localStorage.getItem("outline-"+c);e||(localStorage.setItem("outline-"+c,"true"),E(!0),w.mutateAsync(c).then(e=>{E(!1),W(Q),R(!0)}).catch(e=>{localStorage.removeItem("outline-"+c)}))}return()=>{}},[]);let savePage=async()=>{b(!0);try{var e;let t=await i().put("/api/headstart",{title:y,outlineRaw:z||Q,skipParagraphs:!1,id:U});l.push("/headstart/".concat(null===(e=t.data)||void 0===e?void 0:e.id,"/editor/"))}catch(e){u.Am.error("Error generating content, please try again later."),b(!1)}};return(0,r.jsxs)("div",{className:"container mx-auto",children:[(0,r.jsx)(o(),{children:(0,r.jsx)("title",{children:"Moonbeam - Wizard"})}),j&&(0,r.jsx)(h.Z,{className:" w-full h-screen m-0 p-0 z-[1001] bg-opacity-70",loadingComponent:(0,r.jsx)(_.Q,{iconContainerClassName:"h-8 w-8",containerClassName:""})}),(0,r.jsxs)("div",{className:"flex justify-between",children:[(0,r.jsxs)("div",{className:"flex-shrink-0",children:[(0,r.jsx)("h1",{className:"block text-sm font-medium text-gray-700 mx-auto",children:"Sections"}),M||(null==p?void 0:p.outlineRaw)?(0,r.jsx)("h2",{className:"block text-sm font-medium text-gray-400 mx-auto",children:"Hint: Change the outline if you don't like it"}):(0,r.jsx)("h2",{className:"block text-sm font-medium text-gray-400 mx-auto",children:"Generating content..."})]}),(0,r.jsx)(Z.M,{children:C?(0,r.jsx)("div",{className:" flex w-full justify-end items-end px-2 py-4 ",children:(0,r.jsx)(_.Q,{containerClassName:"items-end justify-end",iconContainerClassName:"h-7 w-7"})}):(0,r.jsx)(T.E.div,{initial:"inactive",animate:"complete",variants:A,transition:D,className:"relative flex h-8 w-8 items-center justify-center rounded-full border-2 border-slate-400 bg-white font-semibold text-slate-500",children:(0,r.jsx)(function(e){return(0,r.jsx)("svg",{...e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:(0,r.jsx)(T.E.path,{variants:I,transition:H,strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})},{className:"h-6 w-6 text-white"})})})]}),(0,r.jsx)("div",{className:"pb-20",ref:q,children:M||(null==p?void 0:p.outlineRaw)?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(LexicalEditor,{initialMarkdown:z||Q,handleChange:e=>{W(e)}}),(0,r.jsx)(m.Z,{onClick:savePage,text:"Create Draft"})]}):(0,r.jsx)(r.Fragment,{children:Q?(0,r.jsx)(v.D,{remarkPlugins:[g.Z],className:"prose overflow-x-auto ",children:Q}):(0,r.jsx)(F.a,{})})})]})};HeadStartIndex.getLayout=e=>(0,r.jsx)(c.Z,{children:e});var z=!0,W=HeadStartIndex}},function(e){e.O(0,[8764,1664,9562,7851,3495,1089,2727,3186,9774,2888,179],function(){return e(e.s=76634)}),_N_E=e.O()}]); 2//# sourceMappingURL=outline-96ebdce7fc4ee982.js.map
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.