1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[154],{516:function(e,s,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/post/edit/[postId]",function(){return t(2613)}])},6095:function(e,s){"use strict";s.Z={src:"/_next/static/media/logo-trans.b80b707e.png",height:1007,width:2654,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAADCAMAAACZFr56AAAANlBMVEU7ZGAw0b7ttx58Znc/OzzWuyg7b2gOG0dBPj1DQz//yR8108JOlqFS2azltCNjVon9zkBltbB5P+raAAAAEHRSTlNbr3akghNJN1dEzdcxvZ3U9TLqcgAAAAlwSFlzAAALEwAACxMBAJqcGAAAACNJREFUeJxjYOTlYmLn5ORg4BYU4GPnYGFh4OFnZmVgY2AAAArPALab3JmUAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:3}},642:function(e,s,t){"use strict";t.d(s,{d:function(){return n}});var a=t(5893);t(7814),t(1664);let n=e=>(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{})})},626:function(e,s,t){"use strict";t.d(s,{L:function(){return b}});var a=t(5893),n=t(3606),l=t(9417),i=t(7814),r=t(5675),o=t.n(r),c=t(1664),d=t.n(c),m=t(7294),x=t(9307);t(1546);var u=t(6095);let h=()=>(0,a.jsx)("div",{className:"text-3xl text-center py-4 font-heading",children:(0,a.jsx)(o(),{src:u.Z,width:"300",alt:"EducatorLab",className:"text-center"})});var p=t(7030);let g=e=>{e&&e.toLowerCase();let s={lesson:{name:"Lesson",color:"bg-blue-500",icon:l.FL8},worksheet:{name:"Worksheet",color:"bg-pink-500",icon:l.Zrf},quiz:{name:"Quiz",color:"bg-yellow-500",icon:l.Psp},assessment:{name:"Assessment",color:"bg-red-500",icon:l.cwv},activity:{name:"Activity",color:"bg-teal-500",icon:l.TmZ},test:{name:"Test",color:"bg-pink-500",icon:"fas fa-file-alt"},defualt:{name:"Default",color:"bg-blue-500",icon:l.gMD}},t=s[e]||s.defualt;return(0,a.jsx)(i.G,{icon:t.icon,className:"".concat(t.color," text-xs text-white p-2 m-0 rounded-full mr-2"),title:t.name,alt:t.name,children:t.name})},b=e=>{let{children:s,availableTokens:t,stripeCustomerId:r,posts:c,postId:u,postCreated:b}=e,{user:j}=(0,n.aF)(),{setPostsFromSSR:f,posts:v,getPosts:N,noMorePosts:w}=(0,m.useContext)(x.Z);(0,m.useEffect)(()=>{if(f(c),u){let e=c.find(e=>e._id===u);e||N({getNewerPosts:!0,lastPostDate:b})}},[c,f,u,b,N]);let A=async()=>{let e=await fetch("/api/billing",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({stripeCustomerId:r})}),s=await e.json();window.location.href=s.session.url};return(0,a.jsx)("div",{className:"h-screen max-h-screen ",children:(0,a.jsxs)("div",{className:"grid grid-cols-[300px_1fr] bg-white h-screen",children:[(0,a.jsx)("mark",{className:"hidden bg-teal-500 bg-purple-500 bg-pink-500 bg-blue-500 bg-yellow-500 bg-red-500"}),(0,a.jsxs)("div",{className:"flex flex-col text-slate overflow-hidden",style:{"border-right":"#d6d3d1 solid 1px"},children:[(0,a.jsxs)("div",{className:"bg-stone-100 px-2",children:[(0,a.jsx)(h,{}),(0,a.jsx)(p.NavLinks,{iconOnly:!0}),(0,a.jsx)(d(),{href:"/post/new",className:"btn",children:"New"}),r&&(0,a.jsx)("div",{onClick:A,className:"btn bg-purple-500 hover:bg-purple-700 mt-2",children:"Billing"}),(0,a.jsxs)(d(),{href:"/token-topup",className:"block mt-2 text-center",children:[(0,a.jsx)(i.G,{icon:l.owJ,className:"text-secondary--yellow"}),(0,a.jsxs)("span",{className:"pl-1",children:[t," credits"]})]})]}),(0,a.jsxs)("div",{className:"px-4 flex-1 overflow-auto bg-gradient-to-b from-stone-100 to-stone-200",children:[v.map(e=>(0,a.jsxs)(d(),{href:"/post/".concat(e._id),className:"py-1 border border-white/0 block whitespace-nowrap my-1 px-2 max-w-full\n cursor-pointer rounded-sm ".concat(u===e._id?"bg-stone-200 border-stone-300":"bg-white/20"),children:[g(e.type),(0,a.jsx)("span",{class:"inline-block align-top text-ellipsis overflow-hidden w-[90%]",title:e.topic,children:e.topic})]},e._id)),!w&&(0,a.jsx)("div",{onClick:()=>{N({lastPostDate:v[v.length-1].created})},className:"hover:underline text-sm text-slate-400 text-center cursor-pointer mt-4",children:"Load more posts"})]}),(0,a.jsx)("div",{className:"bg-nav-user text-white flex items-center gap-2 border-t border-t-black/50 px-2 py-6",children:j?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"min-w-[50px]",children:(0,a.jsx)(o(),{src:j.picture,alt:j.name,title:j.name,height:50,width:50,className:"rounded-full"})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("div",{className:"font-bold",children:j.email}),(0,a.jsx)(d(),{className:"text-sm",href:"/api/auth/logout",children:"Logout"})]})]}):(0,a.jsx)(d(),{href:"https://app.educatorlab.org/auth/login",children:"Login"})})]}),s]})})}},965:function(e,s,t){"use strict";t.d(s,{Z:function(){return i}});var a=t(5893),n=t(1664),l=t.n(n);function i(){return(0,a.jsxs)("footer",{className:"relative md:px-0 px-5 bg-white pt-2",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center md:mt-[77px] mt-[40px] mb-[47px]",children:[(0,a.jsx)(l(),{href:"/",children:(0,a.jsx)("img",{src:"/images/logo.svg",alt:"logo"})}),(0,a.jsx)("p",{className:"max-w-[422px] pt-5 text-darkblack text-center md:text-base text-sm font-normal opacity-[0.8]",children:"Educator Lab is the ultimate SaaS tool for generating compliant lesson plans, worksheets and activities with AI."}),(0,a.jsxs)("div",{className:"grid grid-cols-2 items-center gap-4 md:mt-[29px] mt-5",children:[(0,a.jsx)("a",{href:"https://twitter.com/educatorlaborg",children:(0,a.jsx)("img",{src:"/images/twitter.svg",alt:"twitter"})}),(0,a.jsx)("a",{href:"https://www.youtube.com/@educatorlaborg",children:(0,a.jsx)("img",{src:"/images/youtube.svg",alt:"youtube"})})]}),(0,a.jsxs)("p",{className:"text-darkblack md:text-base text-sm font-normal md:mt-[58px] mt-5",children:[new Date().getFullYear(),". All rights reserved. Educator Lab"]})]}),(0,a.jsxs)("div",{className:"md:flex justify-between hidden",children:[(0,a.jsx)("img",{src:"/images/Shapestar.png",alt:"Shapeleft",className:"absolute bottom-0 left-0 lg:max-w-full md:max-w-[20%]"}
1),(0,a.jsx)("img",{src:"/images/shapestar2.png",alt:"Shaperight",className:"absolute bottom-0 right-0 lg:max-w-full md:max-w-[20%]"})]})]})}},1546:function(e,s,t){"use strict";var a=t(965);s.Z=a.Z},5337:function(e,s,t){"use strict";t.d(s,{i:function(){return c}});var a=t(5893),n=t(5675),l=t.n(n),i=t(6095),r=t(9417),o=t(7814);let c=()=>(0,a.jsxs)("div",{className:"mt-20 pb-10 opacity-25",children:[(0,a.jsx)(l(),{src:i.Z,width:"300",alt:"EducatorLab",className:"text-center justify-center grayscale",style:{margin:"auto"}}),(0,a.jsxs)("p",{className:"p-2 text-center text-secondary-700",children:["Made with ",(0,a.jsx)(o.G,{icon:r.m6i}),(0,a.jsx)(l(),{src:"https://cdn.openai.com/API/logo-assets/powered-by-openai.svg",width:"100",height:"20",alt:"Powered by OpenAI",className:"m-auto"})]})]})},7030:function(){},2613:function(e,s,t){"use strict";t.r(s),t.d(s,{__N_SSP:function(){return m},default:function(){return x}});var a=t(5893),n=t(1163),l=t(7294),i=t(6164);t(7502);var r=t(626),o=t(1546),c=t(5337),d=t(642),m=!0;function x(e){let s=(0,n.useRouter)(),[t,r]=(0,l.useState)(!1),[m,x]=(0,l.useState)(null),{quill:u,quillRef:h}=(0,i.p)();console.log(u),console.log(h),(0,l.useEffect)(()=>{u&&u.clipboard.dangerouslyPasteHTML(null==e?void 0:e.postContent)},[u]);let p=async()=>{r(!0);let t=u.root.innerHTML,a=await fetch("/api/saveLesson",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({postId:e.id,postContent:t})}),n=await a.json();console.log("json: ".concat(JSON.stringify(n))),console.log("response status: ".concat(JSON.stringify(a.status))),200===a.status?(console.log("Post saved"),s.push("/post/".concat(null==e?void 0:e.id))):a.status>=400&&x(null==n?void 0:n.message),r(!1)};return(0,a.jsxs)("div",{className:"overflow-auto h-full",children:[(0,a.jsx)(d.d,{}),(0,a.jsxs)("div",{className:"max-w-screen-sm mx-auto",children:[(0,a.jsx)("div",{className:"text-sm font-bold mt-6 p-2 bg-stone-200 rounded-sm",children:"Summary"}),(0,a.jsxs)("div",{className:"p-4 my-2 border border-stone-200 rounded-md",children:[(0,a.jsx)("div",{className:"text-teal-600 text-2xl font-bold",children:e.title}),(0,a.jsx)("div",{className:"mt-2",children:e.summary})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-sm font-bold mt-6 p-2 bg-stone-200 rounded-sm",children:"Grade"}),(0,a.jsx)("div",{className:"p-4 my-2 border border-stone-200 rounded-md",children:(0,a.jsx)("div",{className:"mt-2",children:e.grade.split(" ").map(e=>e[0].toUpperCase()+e.substring(1)).join(" ")})})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-sm font-bold mt-6 p-2 bg-stone-200 rounded-sm",children:"Subject"}),(0,a.jsx)("div",{className:"p-4 my-2 border border-stone-200 rounded-md",children:(0,a.jsx)("div",{className:"mt-2",children:e.subject})})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"gtext-sm font-bold mt-6 p-2 bg-stone-200 rounded-sm",children:"Compliance"}),(0,a.jsx)("div",{className:"p-4 my-2 border border-stone-200 rounded-md",children:e.compliance})]}),(0,a.jsx)("div",{className:"text-sm font-bold mt-6 p-2 bg-stone-200 rounded-sm",children:"Topic"}),(0,a.jsx)("div",{style:{width:640,height:300},children:(0,a.jsx)("div",{ref:h})}),(0,a.jsx)("div",{className:"my-14",children:(0,a.jsxs)("div",{className:"p-6",children:[!t&&(0,a.jsx)("button",{className:"btn bg-sky-600 hover:bg-sky-700",onClick:p,children:"Save lesson"}),t&&(0,a.jsx)("button",{className:"btn bg-sky-600 hover:bg-sky-700",disabled:!0,onClick:p,children:"Save lesson"})]})}),m&&(0,a.jsx)("div",{className:"my-14",children:(0,a.jsx)("div",{class:"p-4 mb-4 text-sm text-red-800 rounded-lg bg-red-50 dark:bg-gray-800 dark:text-red-400",role:"alert",children:m})})]}),(0,a.jsx)(c.i,{}),(0,a.jsx)(o.FooterSticky,{})]})}x.getLayout=function(e,s){return(0,a.jsx)(r.L,{...s,children:e})}}},function(e){e.O(0,[976,937,664,675,425,774,888,179],function(){return e(e.s=516)}),_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.