(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7640],{37077:function(e,t,n){"use strict";var r=n(57966),a={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,o,s,i,l,c,d,u,m=!1;t||(t={}),s=t.debug||!1;try{if(l=r(),c=document.createRange(),d=document.getSelection(),(u=document.createElement("span")).textContent=e,u.ariaHidden="true",u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",function(n){if(n.stopPropagation(),t.format){if(n.preventDefault(),void 0===n.clipboardData){s&&console.warn("unable to use e.clipboardData"),s&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var r=a[t.format]||a.default;window.clipboardData.setData(r,e)}else n.clipboardData.clearData(),n.clipboardData.setData(t.format,e)}t.onCopy&&(n.preventDefault(),t.onCopy(n.clipboardData))}),document.body.appendChild(u),c.selectNodeContents(u),d.addRange(c),!document.execCommand("copy"))throw Error("copy command was unsuccessful");m=!0}catch(r){s&&console.error("unable to copy using execCommand: ",r),s&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),m=!0}catch(r){s&&console.error("unable to copy using clipboardData: ",r),s&&console.error("falling back to prompt"),n="message"in t?t.message:"Copy to clipboard: #{key}, Enter",o=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C",i=n.replace(/#{\s*key\s*}/g,o),window.prompt(i,e)}}finally{d&&("function"==typeof d.removeRange?d.removeRange(c):d.removeAllRanges()),u&&document.body.removeChild(u),l()}return m}},50885:function(e,t,n){Promise.resolve().then(n.bind(n,58970))},88744:function(e,t,n){"use strict";var r=n(11670);n(56905),n(63891),t.Z=()=>(0,r.jsx)("div",{className:"loader-container 2xl:px-6 2xl:pb-5 md:px-4 md:pb-4",children:(0,r.jsx)("div",{className:"loader"})})},47532:function(e,t,n){"use strict";n.d(t,{Z:function(){return N}});var r=n(11670),a=n(68335),o=n(39027),s=n(56905),i=n(51489),l=n(70290),c=n(28432),d=n(50007),u=n(40457),m=n(25332),h=n(10860),p=n(653);let{Option:f,MultiValueRemove:x}=h.c,b=e=>(0,r.jsxs)(f,{...e,children:[(0,r.jsx)("div",{className:"relative w-10 h-10 mr-3",children:(0,r.jsx)(c.Z,{className:"rounded-full object-fill",src:e.data.avatar,fill:!0,alt:e.data.name})}),(0,r.jsxs)("div",{className:"grow",children:[(0,r.jsx)("div",{className:"base2 font-semibold text-n-5 dark:text-n-1",children:e.data.name}),(0,r.jsx)("div",{className:"caption1 text-n-4/50 dark:text-n-3/50",children:e.data.email})]})]}),g=e=>(0,r.jsx)(x,{...e,children:(0,r.jsx)(a.Z,{className:"w-4 h-4 fill-inherit transition-transform",name:"close"})});var y=e=>{let{className:t,classMultiSelectGlobal:n,items:o,selectedOptions:s,setSelectedOptions:i}=e;return console.log(s),(0,r.jsxs)("div",{className:"relative ".concat(t),children:[(0,r.jsx)(p.ZP,{className:"multiselect ".concat(n),classNamePrefix:"multiselect",value:s,onChange:e=>{i(e)},options:o,isMulti:!0,getOptionLabel:e=>e.name,getOptionValue:e=>e.id,formatOptionLabel:e=>{let{avatar:t,name:n}=e;return(0,r.jsxs)("div",{className:"flex items-center base2 font-semibold",children:[(0,r.jsx)("div",{className:"relative w-6 h-6 mr-2",children:(0,r.jsx)(c.Z,{className:"rounded-full object-fill",src:t,fill:!0,alt:n})}),(0,r.jsx)("span",{className:"mr-3",children:n})]})},placeholder:"Name member",noOptionsMessage:()=>"No people found",components:{Option:b,MultiValueRemove:g},isClearable:!1}),(0,r.jsx)(a.Z,{className:"absolute top-4 left-5 w-5 h-5 pointer-events-none fill-n-4/50 dark:fill-n-4/75 ".concat(0!==s.length&&"hidden"),name:"email"})]})};let v=[{id:"0",name:"Anthony",email:"anthony@gmail.com",avatar:"/images/avatar-1.jpg"},{id:"1",name:"Wowa",email:"wowa@gmail.com",avatar:"/images/avatar-2.jpg"},{id:"2",name:"Tom",email:"tom@gmail.com",avatar:"/images/avatar-4.jpg"},{id:"3",name:"Jack",email:"jack@gmail.com",avatar:"/images/avatar-5.jpg"},{id:"4",name:"Antonio",email:"antonio@gmail.com",avatar:"/images/avatar-6.jpg"},{id:"5",name:"Enthony",email:"enthony@gmail.com",avatar:"/images/avatar-1.jpg"},{id:"6",name:"Jony",email:"jony@gmail.com",avatar:"/images/avatar-2.jpg"},{id:"7",name:"Tomy",email:"tomy@gmail.com",avatar:"/images/avatar-4.jpg"},{id:"8",name:"Vlad",email:"vlad@gmail.com",avatar:"/images/avatar-5.jpg"},{id:"9",name:"Kent",email:"kent@gmail.com",avatar:"/images/avatar-6.jpg"}];var j=e=>{let{visible:t,onClose:n}=e,[a,o]=(0,s.useState)("https://ui8.net/ui8/products/brainwave-ai-ui-design-kit"),[c,h]=(0,s.useState)([]),[p,f]=(0,s.useState)(!1),x=(0,s.useRef)(null);return(0,r.jsx)(u.Z,{classWrap:"max-w-[40rem]",classButtonClose:"absolute top-6 right-6 w-10 h-10 rounded-full bg-n-2 md:top-5 md:right-5 dark:bg-n-4/25 dark:fill-n-4 dark:hover:fill-n-1",visible:t,onClose:n,initialFocus:x,children:(0,r.jsxs)("form",{className:"p-12 md:p-5",action:"",onSubmit:()=>console.log("Submit"),children:[(0,r.jsx)("div",{className:"mb-8 h4",children:"Share this chat"}),(0,r.jsx)("div",{className:"mb-4 base2 font-semibold text-n-6 dark:text-n-3",children:"Copy link"}),(0,r.jsxs)("div",{className:"relative mb-8",children:[(0,r.jsx)(m.Z,{classInput:"h-14 pr-[6.25rem] bg-n-2 truncate text-[1rem] text-n-4 border-transparent focus:bg-n-2 md:base2",placeholder:"Link",value:a,onChange:e=>o(e.target.value),required:!0}),(0,r.jsx)(i.CopyToClipboard,{text:a,onCopy:()=>{f(!0),(0,l.Am)(e=>(0,r.jsx)(d.Z,{iconCheck:!0,children:(0,r.jsx)("div",{className:"ml-3 h6",children:"Link copied"})}))},children:(0,r.jsx)("button",{className:"btn-dark absolute top-1 right-1",ref:x,type:"button",children:"Copy"})})]}),(0,r.jsx)("div",{className:"mb-4 base2 font-semibold text-n-6 dark:text-n-3",children:"Or share to members"}),(0,r.jsx)(y,{className:"mb-8",items:v,selectedOptions:c,setSelectedOptions:h}),(0,r.jsxs)("div",{className:"flex justify-end",children:[(0,r.jsx)("button",{className:"btn-stroke-light mr-3",onClick:n,children:"Cancel"}),(0,r.jsx)("button",{className:"btn",children:"Share"})]})]})})},w=e=>{let{content:t}=e,[n,o]=(0,s.useState)(!1),[u,m]=(0,s.useState)(!0),[h,p]=(0,s.useState)(!1),[f,x]=(0,s.useState)(!1),b="ml-3 px-2 py-2 bg-n-3 rounded-md caption1 txt-n-6 transition-colors hover:text-primary-1 dark:bg-n-7";return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"relative group",children:[(0,r.jsx)(i.CopyToClipboard,{text:null!=t?t:"",onCopy:()=>{o(!0),(0,l.Am)(e=>(0,r.jsx)(d.Z,{iconCheck:!0,children:(0,r.jsx)("div",{className:"ml-3 h6",children:"Content copied"})}))},children:(0,r.jsx)("button",{className:"".concat(b," md:hidden hover:scale-110"),children:(0,r.jsx)(a.Z,{name:"copy"})})}),(0,r.jsx)("div",{className:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-2 py-1 text-xs text-white bg-black rounded opacity-0 group-hover:opacity-100 transition-opacity",children:"Copy to clipboard"})]}),!u&&!h&&(0,r.jsxs)("div",{className:"flex ml-3 px-1 space-x-1 bg-n-3 rounded-md md:hidden dark:bg-n-7",children:[(0,r.jsx)("button",{className:"",onClick:()=>m(!0),children:(0,r.jsx)(c.Z,{src:"/images/smile-heart-eyes.png",width:24,height:24,alt:"Smile heart eyes"})}),(0,r.jsx)("button",{className:"",onClick:()=>p(!0),children:(0,r.jsx)(c.Z,{src:"/images/smile-unamused.png",width:24,height:24,alt:"Smile unamused"})})]}),h&&(0,r.jsxs)("button",{className:"flex items-center ".concat(b," pl-1 md:hidden"),onClick:()=>{(0,l.Am)(e=>(0,r.jsxs)(d.Z,{iconCheck:!0,children:[(0,r.jsx)("div",{className:"mr-6 ml-3 h6",children:"1 chat archived"}),(0,r.jsx)("button",{className:"btn btn-medium ml-3",onClick:()=>l.Am.dismiss(e.id),children:"Undo"})]}))},children:[(0,r.jsx)(c.Z,{src:"/images/smile-unamused.png",width:24,height:24,alt:"Smile unamused"}),"Archive chat"]}),(0,r.jsx)(j,{visible:f,onClose:()=>x(!1)})]})},N=e=>{var t;let{children:n,loading:i,time:l,score:c,showFooter:d,textToCopy:u}=e;return s.Children.toArray(n)[0],(0,r.jsxs)("div",{className:"",children:[(0,r.jsx)("div",{className:"pt-6 px-6 pb-16 space-y-4 bg-n-2 rounded-[1.25rem] md:p-5 md:pb-14 dark:bg-n-7",children:i?(0,r.jsx)(o.Z,{}):n}),d&&(0,r.jsxs)("div",{className:"-mt-8 flex items-end pl-6",children:[c&&(0,r.jsxs)("div",{className:"relative shrink-0 w-16 h-16 mr-auto rounded-2xl ".concat(!i&&"shadow-[0_0_0_0.25rem_#FEFEFE] dark:shadow-[0_0_0_0.25rem_#232627]"),children:[(0,r.jsx)("div",{className:"flex items-center justify-center w-full h-full rounded-3xl bg-n-2 dark:bg-n-7",children:(0,r.jsx)("span",{className:"text-4xl",children:(t=c.score)>=90?"\uD83D\uDE03":t>=75?"\uD83D\uDE0A":t>=50?"\uD83D\uDE10":t>=25?"\uD83D\uDE15":"\uD83D\uDE1F"})}),(0,r.jsx)("p",{className:"absolute bottom-0 left-[125%]",children:(0,r.jsxs)("span",{className:"whitespace-nowrap",children:[null==c?void 0:c.score,"% (",null==c?void 0:c.interpretation,")"]})})]}),i?(0,r.jsxs)("button",{className:"group flex items-center ml-3 px-2 py-0.5 bg-n-3 rounded-md caption1 txt-n-6 transition-colors hover:text-primary-1 dark:bg-n-7 dark:text-n-3 dark:hover:text-primary-1",children:[(0,r.jsx)(a.Z,{className:"w-4 h-4 mr-2 transition-colors group-hover:fill-primary-1 dark:fill-n-3",name:"pause-circle"}),"Pause generating"]}):(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("div",{className:"caption1 text-n-4/50 dark:text-n-4",children:l}),(0,r.jsx)(w,{content:u})]})]})]})}},45593:function(e,t,n){"use strict";var r=n(11670),a=n(83372),o=n(56547),s=n(72755),i=n(63287),l=n(76946),c=n(88647),d=n(45040),u=n(51274),m=n(83600),h=n(89227),p=n(19356);n(57484),t.Z=e=>{let{markdown:t,editorRef:n,dontShowTools:f,readOnly:x,setMarkdown:b,className:g,contentEditableClassName:y}=e,v=[(0,a.bB)(),(0,o.df)(),(0,s.u9)({defaultCodeBlockLanguage:"js"}),(0,i.n)(),(0,l.AX)({codeBlockLanguages:{js:"JavaScript",css:"CSS"}})];return f||v.push((0,c.N)({toolbarContents:()=>(0,r.jsxs)(r.Fragment,{children:[" ",(0,r.jsx)(d.I,{}),(0,r.jsx)(u.Q,{}),(0,r.jsx)(m.$,{}),(0,r.jsx)(h.s,{})]})})),(0,r.jsx)(p.P,{readOnly:x,className:g+"",contentEditableClassName:"font-[400] prose dark:prose-invert  dark:text-slate-200 dark:prose-code:text-slate-200 max-w-3xl "+y,autoFocus:!0,ref:n,markdown:t.toString(),onChange:e=>b&&b(e),plugins:v},"asdfghjkl")}},96399:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(11670),a=n(50968),o=n(68335),s=n(3791),i=n(28432),l=e=>{let{image:t,document:n}=e;return(0,r.jsxs)("div",{className:"p-4 border-b-2 border-n-3 dark:border-n-5",children:[t&&(0,r.jsxs)("div",{className:"relative w-[11.25rem] h-[11.25rem]",children:[(0,r.jsx)(i.Z,{className:"rounded-xl object-cover",src:t,fill:!0,alt:"Avatar"}),(0,r.jsx)("button",{className:"group absolute top-2 right-2 w-8 h-8 rounded-full bg-n-1 text-0 transition-colors hover:bg-accent-1",children:(0,r.jsx)(o.Z,{className:"w-4 h-4 fill-n-4 transition-colors group-hover:fill-n-1",name:"trash"})})]}),n&&(0,r.jsxs)("div",{className:"flex items-center base1 font-semibold",children:[(0,r.jsx)("div",{className:"w-[2.625rem] mr-4",children:(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"42",height:"48",fill:"none",viewBox:"0 0 42 48",children:[(0,r.jsx)("path",{className:"stroke-[#D9D9D9] dark:stroke-n-5",d:"M36 47H6a5 5 0 0 1-5-5V6a5 5 0 0 1 5-5h20.721a5 5 0 0 1 3.402 1.336l9.279 8.616A5 5 0 0 1 41 14.616V42a5 5 0 0 1-5 5z","stroke-width":"2"}),(0,r.jsx)("path",{d:"M22.991 14.124a1 1 0 0 0-1.761-.764l-8.929 10.715-.424.537c-.108.156-.304.462-.31.865a1.5 1.5 0 0 0 .557 1.189c.313.253.674.298.863.315.199.018.444.018.684.018h6.195l-.86 6.876a1 1 0 0 0 1.761.764l8.93-10.715.424-.537c.108-.156.304-.462.31-.865a1.5 1.5 0 0 0-.557-1.189c-.313-.253-.674-.298-.863-.315a8.14 8.14 0 0 0-.685-.018h-6.195l.86-6.876z",fill:"#8e55ea"})]})}),(0,r.jsx)("div",{className:"",children:n}),(0,r.jsx)("button",{className:"group w-8 h-8 ml-3 rounded-full text-0",children:(0,r.jsx)(o.Z,{className:"w-4 h-4 fill-n-4 transition-colors group-hover:fill-accent-1",name:"trash"})})]})]})},c=n(88744),d=n(14547),u=n.n(d),m=e=>{let{value:t,onChange:n,placeholder:i,image:d,document:m,className:h="",onSubmit:p=()=>{},loading:f=!1}=e;return["/keywords","/content","/web-audit"].includes((0,a.usePathname)())?(0,r.jsx)("div",{className:"fixed bottom-12 right-12 md:bottom-18 md:right-8 z-50",children:(0,r.jsx)(u(),{href:"/chat",className:"w-16 h-16 bg-gradient-to-r rounded-full flex items-center justify-center shadow-2xl transition-transform transform hover:scale-110 hover:shadow-lg focus:outline-none focus:ring-4 focus:ring-pink-300 focus:ring-opacity-75 overflow-hidden border-2","aria-label":"Talk to AI",children:(0,r.jsxs)("div",{className:"relative w-12 h-12",children:[(0,r.jsx)("img",{src:"https://img.icons8.com/3d-fluency/150/generated-photos.png",alt:"Talk to AI",className:"absolute inset-0 w-full h-full"}),(0,r.jsx)("span",{className:"absolute bottom-0 right-0 bg-white text-black text-xs font-bold rounded-full px-1",children:"AI"})]})})}):(0,r.jsx)("div",{className:"relative w-[80%] mx-auto z-5 px-10 py-2 2xl:px-6 xl:w-[90%] lg:w-[95%] md:w-full md:px-4 sm:px-2 bg-clip-content ".concat(h),children:(0,r.jsxs)("form",{onSubmit:e=>{e.preventDefault(),p()},className:"relative z-2 border-2 border-n-3 rounded-full overflow-hidden dark:border-n-5",children:[(d||m)&&(0,r.jsx)(l,{image:d,document:m}),f&&(0,r.jsx)(c.Z,{}),(0,r.jsxs)("div",{className:"relative flex items-center min-h-[3.5rem] px-8 text-0 sm:px-4",children:[(0,r.jsx)(s.Z,{disabled:f,className:"w-full py-3 bg-transparent body2 text-n-7 outline-none resize-none placeholder::placeholder:text-n-6 dark:text-n-1 dark:placeholder:text-n-4 sm:text-sm",maxRows:5,value:t,onChange:n,onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),p())},placeholder:i||"Message anoseo.ai   |   Type your own prompt here"}),(0,r.jsx)("button",{type:"submit",className:"group absolute right-3 bottom-2 w-10 h-10 ".concat(""===t?"":"bg-primary-1 rounded-xl transition-colors hover:bg-primary-1/90"," sm:w-8 sm:h-8"),children:(0,r.jsx)(o.Z,{className:"".concat(""===t?"fill-n-4 transition-colors group-hover:fill-primary-1":"fill-n-1"),name:"arrow-next"})})]})]})})}},82409:function(e,t,n){"use strict";n.d(t,{f:function(){return i},j:function(){return s}});var r=n(83606),a=n(1290);let o=r.Z.create({baseURL:"https://us-central1-seotool-2deac.cloudfunctions.net/api/openai"});o.interceptors.request.use(async e=>{try{let t=a.I8.currentUser;if(t){let n=await t.getIdToken();e.headers.authorization="Bearer ".concat(n)}}catch(e){console.error("Error fetching ID token:",e)}return e});let s=e=>o.post("/moderation",e),i=e=>o.post("/chatCompletion",e)},58970:function(e,t,n){"use strict";n.r(t);var r=n(11670),a=n(39027),o=n(45593),s=n(96399),i=n(1519),l=n(21700),c=n(39329),d=n(28319),u=n(50761),m=n(89559),h=n.n(m),p=n(56905),f=n(1290),x=n(82409),b=n(73861),g=n(47532),y=n(81727),v=n(44476),j=n(95140),w=n(45539),N=n(50968);let k=[{bgColor:"#8f3985",title:"What  is white hat seo?"},{bgColor:"#dbad6a",title:"How can I improve my website ranking?"},{bgColor:"#499f68",title:"How can I create seo optimized content?"}];t.default=()=>{let[e,t]=(0,p.useState)(""),[n,m]=(0,p.useState)(null),[C,S]=(0,p.useState)([]),[O,Z]=(0,p.useState)(!1),[D,E]=(0,p.useState)(0),[R,P]=(0,p.useState)(!1),F=(0,N.useRouter)(),{user:T,toggleEmailVerificationModal:_}=(0,l.useAuth)(),{showPremiumModal:A}=(0,y.useRevenueCat)();async function z(t){let n=(0,i.HP)();if(null==T?void 0:T.uid){await (0,u.pl)((0,u.JU)(f.RZ,"userChats",null==T?void 0:T.uid,"chats",n),{data:{content:t,title:e},key:n,lastUpdate:Date.now(),query:e});let r=(0,u.JU)(f.RZ,"userChats",null==T?void 0:T.uid,"chats","property");(await (0,u.QT)(r)).exists()?await (0,u.r7)(r,{count:0!==C.length?C.length+1:1}):await (0,u.pl)(r,{count:0!==C.length?C.length+1:1})}}(0,p.useEffect)(()=>{!async function(){if(null==T?void 0:T.uid){let e=(0,u.hJ)(f.RZ,"userChats",null==T?void 0:T.uid,"chats"),t=(0,u.cf)(e,e=>{let t=[];e.forEach(e=>{let n=e.data();console.log(n),n.query?t.push(n):n.count&&E(n.count)}),S(t)})}}()},[null==T?void 0:T.uid]);let M=async()=>{if(!A()&&!_()&&(Z(!0),200===(await (0,x.j)({input:e})).status)){let n=await (0,x.f)({messages:[{role:"system",content:"As an SEO expert, you're tasked with optimizing the online presence of a website, app, or digital product to increase its visibility and attract more users. Respond to queries from website or app owners seeking guidance on improving their SEO strategies, enhancing their online visibility, and effectively promoting their product to target audiences."},{role:"user",content:"My query is ".concat(e)}],userInput:e});m(()=>({question:e,answer:n.data.data.choices[0].message.content})),await z(n.data.data),t(""),Z(!1)}};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"grow p-10 overflow-y-auto overscroll-none scroll-smooth scrollbar-none md:p-4 md:pb-6",children:(0,r.jsxs)("div",{className:"flex flex-col h-full",children:[(0,r.jsx)(w.Z,{title:"Chat with SEO Assistant",subtitle:"Ask anything about SEO",showBackButton:!0,onBackClick:()=>F.push("/")}),(0,r.jsxs)("div",{className:"flex-1 flex items-start overflow-hidden md:flex-col",children:[(0,r.jsx)("div",{className:"flex flex-col h-full w-[75%] overflow-y-auto scrollbar-none relative pr-8 md:w-full md:pr-0",children:n?(0,r.jsx)("div",{children:O?(0,r.jsx)("div",{className:"h-[25vh]",children:(0,r.jsx)(a.Z,{})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"mb-8",children:[(0,r.jsxs)("h4",{className:"h5",children:[(0,r.jsx)(h(),{className:"rounded-full inline-block mr-1",src:(null==T?void 0:T.photoURL)||"/images/avatar-5.jpg",alt:"User Image",width:50,height:50})," ",(null==T?void 0:T.displayName)||(null==T?void 0:T.email)]}),(0,r.jsx)("h5",{className:"text-lg font-normal pl-2 pt-2",children:(0,r.jsx)(g.Z,{showFooter:!0,textToCopy:n.question,children:(0,r.jsx)(o.Z,{markdown:n.question,dontShowTools:!0,readOnly:!0})})})]}),(0,r.jsxs)("div",{className:"mb-8 ",children:[(0,r.jsxs)("h4",{className:"h5",children:[(0,r.jsx)(h(),{className:"rounded-full inline-block mr-1",src:"/images/online-support.png",alt:"Ano Bot",width:50,height:50})," Ano Bot"]}),(0,r.jsx)(g.Z,{showFooter:!0,textToCopy:n.answer,children:(0,r.jsx)(o.Z,{markdown:n.answer,dontShowTools:!0,readOnly:!0})})]})]})}):(0,r.jsxs)("div",{className:"text-center mt-12 opacity-85",children:[(0,r.jsx)(h(),{className:"mx-auto",src:"/images/brain.png",alt:"Image of Brain",width:200,height:200}),(0,r.jsxs)("h5",{className:"h4 mb-4",children:["Hello ",null==T?void 0:T.displayName,", "]}),(0,r.jsx)("p",{className:"h5",children:"I am your personal SEO assistant."}),(0,r.jsx)("p",{className:"h5 text-lg",children:"What can I help you with today?"}),(0,r.jsxs)("div",{className:"mt-8 font-semibold text-white",children:[k.map((e,n)=>(0,r.jsx)("button",{onClick:()=>t(e.title),style:{backgroundColor:e.bgColor},className:"w-fit mx-2 p-3 rounded-lg mt-2",children:e.title},n)),(0,r.jsxs)("button",{onClick:()=>P(!0),className:"w-fit mx-2 p-3 rounded-lg mt-2 bg-accent-1 text-n-1 md:inline-block hidden",children:["Chat History",(0,r.jsx)("sup",{className:"ml-1 p-1 text-xs bg-red-700 text-white rounded-full",children:D})]})]})]})}),(0,r.jsxs)("div",{className:"overflow-y-auto w-[25%] h-full flex-grow relative px-2 md:hidden",children:[(0,r.jsxs)("h4",{className:"h5 relative w-fit",children:["Chat History",(0,r.jsx)("sup",{className:"p-2 absolute top-0 -right-8 overflow-hidden w-6 h-6 text-xs bg-red-700 text-white rounded-full flex items-center justify-center",children:D})]}),(0,r.jsx)("ul",{children:C?C.map((e,t)=>(0,r.jsx)("li",{onClick:async()=>{Z(()=>!0),await m(()=>({question:e.query,answer:e.data.content.choices[0].message.content})),Z(()=>!1)},className:"flex-none inline-block text-sm leading-tight p-2 bg-white dark:bg-neutral-800 dark:text-white rounded-xl border-2 hover:bg-gray-50 duration-300 hover:border-transparent hover:shadow-hover-custom-shadow last:mb-0 dark:border-n-5 dark:hover:border-n-7 dark:hover:bg-n-7 cursor-pointer relative w-full mb-2",children:(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"font-semibold line-clamp-3",children:e.query}),(0,r.jsx)("br",{}),(0,r.jsxs)("small",{className:"font-semibold opacity-90 text-xs",children:[(0,b.Z)(new Date(e.lastUpdate))," ",(0,r.jsx)(c.Z,{className:"inline-block"})]})]})},t)):(0,r.jsx)("div",{className:"h-[25vh]",children:(0,r.jsx)(a.Z,{})})})]})]})]})}),(0,r.jsx)(s.Z,{onSubmit:M,value:e,placeholder:"Chat with SEO Assistant",onChange:e=>t(e.target.value),loading:O}),(0,r.jsx)(v.u,{appear:!0,show:R,as:p.Fragment,children:(0,r.jsxs)(j.V,{as:"div",className:"relative z-10",onClose:()=>P(!1),children:[(0,r.jsx)(v.u.Child,{as:p.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,r.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),(0,r.jsx)("div",{className:"fixed inset-0 overflow-y-auto md:block hidden",children:(0,r.jsx)("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:(0,r.jsx)(v.u.Child,{as:p.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:(0,r.jsxs)(j.V.Panel,{className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-8 text-left align-middle shadow-xl transition-all relative",children:[(0,r.jsx)("button",{type:"button",className:"absolute top-4 right-4 text-gray-400 hover:text-gray-500 rounded-full p-1 bg-gray-100 hover:bg-gray-200 transition-colors duration-200",onClick:()=>P(!1),children:(0,r.jsx)(d.Z,{size:20})}),(0,r.jsx)(j.V.Title,{as:"h3",className:"text-lg font-semibold leading-6 text-gray-900",children:"Chat History"}),(0,r.jsx)("div",{className:"mt-2",children:(0,r.jsx)("ul",{children:C?C.map((e,t)=>(0,r.jsx)("li",{onClick:async()=>{Z(()=>!0),await m(()=>({question:e.query,answer:e.data.content.choices[0].message.content})),Z(()=>!1),P(!1)},className:"flex-none inline-block text-sm leading-tight p-2 bg-white dark:bg-neutral-800 dark:text-white rounded-xl border-2 hover:bg-gray-50 duration-300 hover:border-transparent hover:shadow-hover-custom-shadow last:mb-0 dark:border-n-5 dark:hover:border-n-7 dark:hover:bg-n-7 cursor-pointer relative w-full mb-2",children:(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"font-semibold line-clamp-3",children:e.query}),(0,r.jsx)("br",{}),(0,r.jsxs)("small",{className:"font-semibold opacity-90 text-xs",children:[(0,b.Z)(new Date(e.lastUpdate))," ",(0,r.jsx)(c.Z,{className:"inline-block"})]})]})},t)):(0,r.jsx)("div",{className:"h-[25vh]",children:(0,r.jsx)(a.Z,{})})})})]})})})})]})})]})}},73861:function(e,t,n){"use strict";function r(e){var t=new Date,n=new Date(e);return n.getDate()===t.getDate()&&n.getMonth()===t.getMonth()&&n.getFullYear()===t.getFullYear()?"Today":(t.setDate(t.getDate()-1),n.getDate()===t.getDate()&&n.getMonth()===t.getMonth()&&n.getFullYear()===t.getFullYear())?"Yesterday":n.toDateString()}n.d(t,{Z:function(){return r}})},63891:function(){},52277:function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.CopyToClipboard=void 0;var a=i(n(56905)),o=i(n(37077)),s=["text","onCopy","options","children"];function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach(function(t){p(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(f,e);var t,n,i,l=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=h(f);if(t){var a=h(this).constructor;e=Reflect.construct(n,arguments,a)}else e=n.apply(this,arguments);return function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return m(e)}(this,e)});function f(){var e;!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,f);for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return p(m(e=l.call.apply(l,[this].concat(n))),"onClick",function(t){var n=e.props,r=n.text,s=n.onCopy,i=n.children,l=n.options,c=a.default.Children.only(i),d=(0,o.default)(r,l);s&&s(r,d),c&&c.props&&"function"==typeof c.props.onClick&&c.props.onClick(t)}),e}return n=[{key:"render",value:function(){var e=this.props,t=(e.text,e.onCopy,e.options,e.children),n=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,s),r=a.default.Children.only(t);return a.default.cloneElement(r,c(c({},n),{},{onClick:this.onClick}))}}],d(f.prototype,n),i&&d(f,i),Object.defineProperty(f,"prototype",{writable:!1}),f}(a.default.PureComponent);t.CopyToClipboard=f,p(f,"defaultProps",{onCopy:void 0,options:void 0})},51489:function(e,t,n){"use strict";var r=n(52277).CopyToClipboard;r.CopyToClipboard=r,e.exports=r},3220:function(e,t){"use strict";/** @license React v16.13.1
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,a=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,s=n?Symbol.for("react.strict_mode"):60108,i=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,d=n?Symbol.for("react.async_mode"):60111,u=n?Symbol.for("react.concurrent_mode"):60111,m=n?Symbol.for("react.forward_ref"):60112,h=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,f=n?Symbol.for("react.memo"):60115,x=n?Symbol.for("react.lazy"):60116,b=n?Symbol.for("react.block"):60121,g=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,v=n?Symbol.for("react.scope"):60119;function j(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case d:case u:case o:case i:case s:case h:return e;default:switch(e=e&&e.$$typeof){case c:case m:case x:case f:case l:return e;default:return t}}case a:return t}}}function w(e){return j(e)===u}t.AsyncMode=d,t.ConcurrentMode=u,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=m,t.Fragment=o,t.Lazy=x,t.Memo=f,t.Portal=a,t.Profiler=i,t.StrictMode=s,t.Suspense=h,t.isAsyncMode=function(e){return w(e)||j(e)===d},t.isConcurrentMode=w,t.isContextConsumer=function(e){return j(e)===c},t.isContextProvider=function(e){return j(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return j(e)===m},t.isFragment=function(e){return j(e)===o},t.isLazy=function(e){return j(e)===x},t.isMemo=function(e){return j(e)===f},t.isPortal=function(e){return j(e)===a},t.isProfiler=function(e){return j(e)===i},t.isStrictMode=function(e){return j(e)===s},t.isSuspense=function(e){return j(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===u||e===i||e===s||e===h||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===x||e.$$typeof===f||e.$$typeof===l||e.$$typeof===c||e.$$typeof===m||e.$$typeof===g||e.$$typeof===y||e.$$typeof===v||e.$$typeof===b)},t.typeOf=j},1425:function(e,t,n){"use strict";e.exports=n(3220)},3791:function(e,t,n){"use strict";n.d(t,{Z:function(){return w}});var r=n(63150),a=n(99813),o=n(56905),s=n(79198),i=function(e){var t=o.useRef(e);return(0,s.Z)(function(){t.current=e}),t},l=function(e,t){if("function"==typeof e){e(t);return}e.current=t},c=function(e,t){var n=(0,o.useRef)();return(0,o.useCallback)(function(r){e.current=r,n.current&&l(n.current,null),n.current=t,t&&l(t,r)},[t])},d={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},u=function(e){Object.keys(d).forEach(function(t){e.style.setProperty(t,d[t],"important")})},m=null,h=function(e,t){var n=e.scrollHeight;return"border-box"===t.sizingStyle.boxSizing?n+t.borderSize:n-t.paddingSize},p=function(){},f=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],x=!!document.documentElement.currentStyle,b=function(e){var t=window.getComputedStyle(e);if(null===t)return null;var n=f.reduce(function(e,n){return e[n]=t[n],e},{}),r=n.boxSizing;if(""===r)return null;x&&"border-box"===r&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+"px");var a=parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),o=parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth);return{sizingStyle:n,paddingSize:a,borderSize:o}};function g(e,t,n){var r=i(n);o.useLayoutEffect(function(){var n=function(e){return r.current(e)};if(e)return e.addEventListener(t,n),function(){return e.removeEventListener(t,n)}},[])}var y=function(e){g(window,"resize",e)},v=function(e){g(document.fonts,"loadingdone",e)},j=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],w=o.forwardRef(function(e,t){var n=e.cacheMeasurements,s=e.maxRows,i=e.minRows,l=e.onChange,d=void 0===l?p:l,f=e.onHeightChange,x=void 0===f?p:f,g=(0,a.Z)(e,j),w=void 0!==g.value,N=o.useRef(null),k=c(N,t),C=o.useRef(0),S=o.useRef(),O=function(){var e,t,r,a,o,l,c,d,p,f,g,y=N.current,v=n&&S.current?S.current:b(y);if(v){S.current=v;var j=(e=y.value||y.placeholder||"x",void 0===(t=i)&&(t=1),void 0===(r=s)&&(r=1/0),m||((m=document.createElement("textarea")).setAttribute("tabindex","-1"),m.setAttribute("aria-hidden","true"),u(m)),null===m.parentNode&&document.body.appendChild(m),a=v.paddingSize,o=v.borderSize,c=(l=v.sizingStyle).boxSizing,Object.keys(l).forEach(function(e){m.style[e]=l[e]}),u(m),m.value=e,d=h(m,v),m.value=e,d=h(m,v),m.value="x",f=(p=m.scrollHeight-a)*t,"border-box"===c&&(f=f+a+o),d=Math.max(f,d),g=p*r,"border-box"===c&&(g=g+a+o),[d=Math.min(g,d),p]),w=j[0],k=j[1];C.current!==w&&(C.current=w,y.style.setProperty("height",w+"px","important"),x(w,{rowHeight:k}))}};return o.useLayoutEffect(O),y(O),v(O),o.createElement("textarea",(0,r.Z)({},g,{onChange:function(e){w||O(),d(e)},ref:k}))})},57966:function(e){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach(function(t){e.addRange(t)}),t&&t.focus()}}},37656:function(e,t,n){"use strict";function r(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{Z:function(){return r}})},63150:function(e,t,n){"use strict";function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,{Z:function(){return r}})},99813:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}n.d(t,{Z:function(){return r}})},90742:function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,{Z:function(){return r}})},39329:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});/**
 * @license @tabler/icons-react v3.3.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var r=(0,n(3667).Z)("outline","chevron-right","IconChevronRight",[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]])},52264:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});/**
 * @license @tabler/icons-react v3.3.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var r=(0,n(3667).Z)("outline","menu-2","IconMenu2",[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M4 12l16 0",key:"svg-1"}],["path",{d:"M4 18l16 0",key:"svg-2"}]])}},function(e){e.O(0,[3260,5535,3453,7268,5139,4660,3762,3756,3606,7301,1038,7698,883,5539,5671,1691,1744],function(){return e(e.s=50885)}),_N_E=e.O()}]);