1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[694],{6943:function(e,t){t.Z={src:"/_next/static/media/paddle.32fc5965.svg",height:32,width:105,blurWidth:0,blurHeight:0}},5682:function(e,t,n){n.d(t,{z:function(){return Button}});var s=n(5893),i=n(6010),a=n(1664),l=n.n(a);let r={solid:"group inline-flex items-center justify-center rounded-full py-2 px-4 text-sm font-semibold focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2",outline:"group inline-flex ring-1 items-center justify-center rounded-full py-2 px-4 text-sm focus:outline-none"},o={solid:{slate:"dark:bg-blue-700 dark:hover:bg-blue-800 bg-slate-900 text-white hover:bg-slate-700 hover:text-slate-100 active:bg-slate-800 active:text-slate-300 focus-visible:outline-slate-900",blue:"dark:bg-blue-700 dark:hover:bg-blue-800 bg-blue-600 text-white hover:text-slate-100 hover:bg-blue-500 active:bg-blue-800 active:text-blue-100 focus-visible:outline-blue-600",white:"bg-white text-slate-900 hover:bg-blue-50 active:bg-blue-200 active:text-slate-600 focus-visible:outline-white"},outline:{slate:"ring-slate-200 text-slate-700 hover:text-slate-900 hover:ring-slate-300 active:bg-slate-100 active:text-slate-600 focus-visible:outline-blue-600 focus-visible:ring-slate-300",white:"ring-slate-700 text-white hover:ring-slate-500 active:ring-slate-700 active:text-slate-400 focus-visible:outline-white"}};function Button(e){let{variant:t="solid",color:n="slate",className:a,href:c,...u}=e;return a=(0,i.Z)(r[t],o[t][n],a),c?(0,s.jsx)(l(),{href:c,className:a,...u}):(0,s.jsx)("button",{className:a,...u})}},4123:function(e,t,n){n.d(t,{W:function(){return Container}});var s=n(5893),i=n(6010);function Container(e){let{className:t,...n}=e;return(0,s.jsx)("div",{className:(0,i.Z)("mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",t),...n})}},3343:function(e,t,n){n.d(t,{E:function(){return PricingOptions}});var s=n(5893),i=n(2877),a=n(4053),l=n(6010),r=n(7294),o=n(5682),c=n(4690),u=n(1419),d=n(6557);function CheckIcon(e){let{className:t}=e;return(0,s.jsxs)("svg",{"aria-hidden":"true",className:(0,l.Z)("h-6 w-6 flex-none fill-current stroke-current",t),children:[(0,s.jsx)("path",{d:"M9.307 12.248a.75.75 0 1 0-1.114 1.004l1.114-1.004ZM11 15.25l-.557.502a.75.75 0 0 0 1.15-.043L11 15.25Zm4.844-5.041a.75.75 0 0 0-1.188-.918l1.188.918Zm-7.651 3.043 2.25 2.5 1.114-1.004-2.25-2.5-1.114 1.004Zm3.4 2.457 4.25-5.5-1.187-.918-4.25 5.5 1.188.918Z",strokeWidth:0}),(0,s.jsx)("circle",{cx:12,cy:12,r:8.25,fill:"none",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})]})}let BasicPlanCTA=e=>{let{activePeriod:t}=e,n="Monthly"===t?"830763":"833861",i="Monthly"===t?"$15/mo":"$13/mo",{user:l}=(0,d.Oy)(),h=(0,a.useSupabaseClient)(),[x,m]=(0,r.useState)(null);return((0,r.useEffect)(()=>{async function fetchData(){m((await h.from("user_payment_data").select("subscription_status").eq("user_id",l.id).single()).data)}l&&fetchData()},[h,l,null==l?void 0:l.id]),l&&x&&x.subscription_status!==u.wV.Active)?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.q,{}),(0,s.jsx)(o.z,{variant:"solid",color:"white",className:"mt-8","aria-label":"Get started with Henshu Plus for ".concat(i),onClick:()=>{Paddle.Checkout.open((0,c.A)({product:n,user:l}))},children:"Get Henshu Plus"})]}):(0,s.jsx)(o.z,{href:"/register",variant:"solid",color:"white",className:"mt-8","aria-label":"Get started with Henshu Plus for ".concat(i),children:"Get Henshu Plus"})};function Plan(e){let{name:t,price:n,description:i,features:a,children:l}=e;return(0,s.jsxs)("section",{className:"flex flex-col rounded-3xl px-6 sm:px-8 lg:py-8",children:[(0,s.jsx)("h3",{className:"mt-5 font-display text-3xl text-white",children:t}),(0,s.jsx)("p",{className:"font-display text-5xl font-light tracking-tight text-white",children:n}),(0,s.jsx)("p",{className:"mt-2 text-base text-slate-400",children:i}),(0,s.jsx)("ul",{role:"list",className:"order-last mt-10 flex flex-col gap-y-3 text-sm text-slate-200",children:a.map((e,t)=>(0,s.jsxs)("li",{className:"flex",children:[(0,s.jsx)(CheckIcon,{className:"text-slate-400"}),(0,s.jsx)("span",{className:"ml-4",children:e})]},t))}),l]})}function PlanPlus(e){let{activePeriod:t,name:n,description:i,features:a}=e;return(0,s.jsxs)("section",{className:"order-first flex flex-col rounded-3xl bg-blue-600 px-6 py-8 sm:px-8 lg:order-none",children:[(0,s.jsx)("h3",{className:"mt-5 font-display text-3xl text-white",children:n}),(0,s.jsxs)("p",{className:"relative font-display font-light tracking-tight text-white",children:[(0,s.jsxs)("span",{"aria-hidden":"Monthly"!==t,className:(0,l.Z)("transition duration-300","Monthly"===t?"opacity-100":"pointer-events-none translate-x-6 select-none opacity-0"),children:[(0,s.jsx)("span",{className:"text-5xl",children:"$15/mo"}),(0,s.jsx)("span",{className:"ml-2 text-sm text-white",children:"(billed monthly)"})]}),(0,s.jsxs)("span",{"aria-hidden":"Annually"!==t,className:(0,l.Z)("absolute left-0 top-0 transition duration-300","Annually"===t?"opacity-100":"pointer-events-none -translate-x-6 select-none opacity-0"),children:[(0,s.jsx)("span",{className:"text-5xl",children:"$13/mo"}),(0,s.jsx)("span",{className:"ml-2 text-sm text-white",children:"(billed annually)"})]})]}),(0,s.jsx)("p",{className:"mt-2 text-base text-white",children:i}),(0,s.jsx)("ul",{role:"list",className:"order-last mt-10 flex flex-col gap-y-3 text-sm text-white",children:a.map((e,t)=>(0,s.jsxs)("li",{className:"flex",children:[(0,s.jsx)(CheckIcon,{className:"text-white"}),(0,s.jsx)("span",{className:"ml-4",children:e})]},t))}),(0,s.jsx)(BasicPlanCTA,{activePeriod:t})]})}function TermPicker(e){let{activePeriod:t,setActivePeriod:n}=e;return(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(i.E,{value:t,onChange:n,className:"grid grid-cols-2",children:["Monthly","Annually"].map(e=>(0,s.jsx)(i.E.Option,{value:e,className:(0,l.Z)("cursor-pointer border border-gray-300 px-5 py-3 text-sm text-gray-200 outline-2 outline-offset-2 transition-colors hover:border-gray-400","Monthly"===e?"rounded-l-lg":"-ml-px rounded-r-lg"),children:e},e))}),(0,s.jsx)("div",{"aria-hidden":"true",className:(0,l.Z)("pointer-events-none absolute inset-0 z-10 grid grid-cols-2 items-center overflow-hidden rounded-lg bg-blue-600 transition-all duration-300","Monthly"===t?"[clip-path:inset(0_50%_0_0)]":"[clip-path:inset(0_0_0_calc(50%-1px))]"),children:["Monthly","Annually"].map(e=>(0,s.jsx)("div",{className:(0,l.Z)("py-2 text-center text-sm font-semibold text-white [&:not(:focus-visible)]:focus:outline-none","Annually"===e&&"-ml-px"),children:e},e))})]})}function PricingOptions(e){let{upsell:t=!1}=e,[n,i]=(0,r.useState)("Monthly");return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"mt-8 flex justify-center",children:(0,s.jsx)(TermPicker,{activePeriod:n,setActivePeriod:i}
1)}),(0,s.jsxs)("div",{className:"-mx-4 my-8 grid max-w-2xl grid-cols-1 gap-y-10 sm:mx-auto lg:-mx-8 lg:max-w-none lg:grid-cols-3 xl:mx-0 xl:gap-x-8",children:[(0,s.jsx)(Plan,{name:"Starter",price:"Free",description:"Good for anyone who needs that one off revision",features:["5 revisions per month","21 writing styles","8 writing tones","4 languages"],children:(0,s.jsx)(o.z,{href:"/register",variant:"outline",color:"white",className:"mt-8","aria-label":"Get started with the Starter plan for free",children:t?"Current Plan":"Get started"})}),(0,s.jsx)(PlanPlus,{featured:!0,name:"Plus",activePeriod:n,description:"Perfect for individuals and small businesses with daily writing needs.",features:[(0,s.jsx)("b",{children:"100 revisions per month"},"revisions"),(0,s.jsx)("b",{children:"Revisions history"},"history"),"21 writing styles","8 writing tones","4 languages"]}),(0,s.jsx)(Plan,{name:"Enterprise",description:"For large enterprises aiming to make their written communication a competitive advantage. Bring Henshu to your workforce.",cta:"Contact Us",features:[(0,s.jsx)("b",{children:"SSO (Single Sign On)"},"sso"),(0,s.jsx)("b",{children:">100 revisions per month"},"revisions"),(0,s.jsx)("b",{children:"Revisions history"},"history"),"21 writing styles","8 writing tones","4 languages"],children:(0,s.jsx)(o.z,{href:"mailto:[email protected]",variant:"outline",color:"white",className:"mt-8","aria-label":"Contact us for our enterprise plan",children:"Contact Us"})})]})]})}},96:function(e,t,n){n.d(t,{C:function(){return ProfileNavLink},_:function(){return ProfileNavAvatar}});var s=n(5893),i=n(6215),a=n(1355),l=n(4053),r=n(1955),o=n(1664),c=n.n(o),u=n(1163),d=n(7294),h=n(6557);function ProfileNavLink(e){let{href:t="",onClick:n,children:a}=e;return(0,s.jsx)(i.J.Button,{as:c(),href:t,onClick:n,className:"block w-full p-2",children:a})}function ProfileNavAvatar(e){var t;let{children:n}=e,o=(0,l.useSupabaseClient)(),{user:x}=(0,h.Oy)(),m=(0,u.useRouter)();if(!x)return(0,s.jsx)(c(),{href:"/login",className:"inline-block rounded-lg px-2 py-1 text-sm text-slate-700 hover:bg-slate-100 hover:text-slate-900",children:"Login"});let f=null;return f=(null===(t=x.user_metadata)||void 0===t?void 0:t.avatar_url)?(0,s.jsx)("img",{className:"h-full w-full rounded-full",src:x.user_metadata.avatar_url,alt:"Avatar"}):(0,s.jsx)("svg",{className:"h-full w-full text-gray-300",fill:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{d:"M24 20.993V24H0v-2.996A14.977 14.977 0 0112.004 15c4.904 0 9.26 2.354 11.996 5.993zM16.002 8.999a4 4 0 11-8 0 4 4 0 018 0z"})}),(0,s.jsxs)(i.J,{children:[(0,s.jsx)(i.J.Button,{className:"relative z-10 flex h-8 w-8 items-center justify-center [&:not(:focus-visible)]:focus:outline-none","aria-label":"Toggle Navigation",children:e=>{let{open:t}=e;return(0,s.jsx)("span",{className:"inline-block cursor-pointer rounded-lg px-2 py-1 text-sm text-slate-700 hover:bg-slate-100 hover:text-slate-900 ".concat(t?"bg-slate-100 text-slate-900":null),children:(0,s.jsx)("span",{className:"mt-2 inline-block h-9 w-9 overflow-hidden rounded-full border-2 border-gray-400 bg-gray-100",children:f})})}}),(0,s.jsxs)(a.u.Root,{children:[(0,s.jsx)(a.u.Child,{as:d.Fragment,enter:"duration-150 ease-out",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"duration-150 ease-in",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,s.jsx)(i.J.Overlay,{className:"fixed inset-0 bg-slate-300/50"})}),(0,s.jsx)(a.u.Child,{as:d.Fragment,enter:"duration-150 ease-out",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"duration-100 ease-in",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:(0,s.jsxs)(i.J.Panel,{as:"div",className:"absolute inset-x-0 top-full mt-4 flex origin-top-right flex-col rounded-2xl bg-white p-4 text-lg tracking-tight text-slate-900 shadow-xl ring-1 ring-slate-900/5 sm:left-auto sm:right-0 sm:w-60",children:[n,(0,s.jsx)(ProfileNavLink,{href:"/dashboard",children:"Dashboard"}),(0,s.jsx)(ProfileNavLink,{href:"https://blog.henshu.ai",children:"Showcase"}),(0,s.jsx)("hr",{className:"m-2 border-slate-300/40"}),(0,s.jsx)(ProfileNavLink,{onClick:async e=>{e.preventDefault();try{await o.auth.signOut()}catch(e){r.Z.remove("supabase-auth-token")}await m.reload()},children:"Logout"})]})})]})]})}},8394:function(e,t,n){n.d(t,{$:function(){return Spinner}});var s=n(5893);function Spinner(e){let{children:t}=e;return(0,s.jsx)("div",{children:(0,s.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,s.jsxs)("div",{className:"items-center rounded-lg p-4",children:[(0,s.jsx)("div",{className:"flex justify-center p-5",children:(0,s.jsxs)("svg",{className:"-ml-1 mr-3 h-5 w-5 animate-spin text-gray-800",fill:"none",viewBox:"0 0 24 24",children:[(0,s.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,s.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}),t]})})})}n(7294)},4690:function(e,t,n){n.d(t,{A:function(){return paddleSubscribeParam},q:function(){return PaddleLoader}});var s=n(5893),i=n(1355),a=n(7306),l=n(4298),r=n.n(l),o=n(7294),c=n(8394);function transform(e){return{transaction_id:e.checkout.id,value:e.checkout.prices.customer.total,currency:e.checkout.prices.customer.currency,tax:e.checkout.prices.customer.total_tax,items:[{id:e.product.id,name:e.product.name,price:e.checkout.prices.customer.items[0].unit_price.net,quantity:1}]}}function PaddleLoader(){let[e,t]=(0,o.useState)(!1);return(0,o.useEffect)(()=>(window.paddleReload=function(e){t(!0),setTimeout(()=>window.location.reload(),3e3)},window.paddleToThankYou=function(e){t(!0),window.gtag&&window.gtag("event","purchase",transform(e)),setTimeout(()=>{window.location.href="/thank-you"},1e3)},()=>{delete window.paddleReload,delete window.paddleToThankYou}),[]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.u.Root,{show:e,as:o.Fragment,children:(0,s.jsxs)(a.V,{as:"div",className:"relative z-[101]",onClose:t,children:[(0,s.jsx)(i.u.Child,{as:o.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,s.jsx)("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"})}),(0,s.jsx)("div",{className:"fixed inset-0 z-10 overflow-y-auto",children:(0,s.jsx)(c.$,{})})]})}),(0,s.jsx)(r(),{src:"https://cdn.paddle.com/paddle/paddle.js",onLoad:()=>
1{Paddle.Setup({vendor:Number("171377"),eventCallback:function(e){"Checkout.Loaded"===e.event&&!e.checkoutData.override&&window.gtag&&window.gtag("event","begin_checkout",transform(e.eventData))}})}})]})}function paddleSubscribeParam(e){let{user:t,product:n}=e;return{product:n,email:t.email,passthrough:JSON.stringify({userId:t.id}),disableLogout:!0,successCallback:"paddleToThankYou",marketingConsent:1}}},1419:function(e,t,n){var s,i,a,l,r,o;n.d(t,{wV:function(){return s}}),(l=s||(s={})).Active="active",l.Trialing="trialing",l.PastDue="past_due",l.Paused="paused",l.Cancelled="deleted",(r=i||(i={})).SubscriptionCreated="subscription_created",r.SubscriptionUpdated="subscription_updated",r.SubscriptionCancelled="subscription_cancelled",r.SubscriptionPaymentSucceeded="subscription_payment_succeeded",r.SubscriptionPaymentFailed="subscription_payment_failed",r.SubscriptionPaymentRefunded="subscription_payment_refunded",(o=a||(a={})).Success="success",o.Error="error",o.Refund="refund"},6557:function(e,t,n){n.d(t,{Oy:function(){return useSessionUser},XT:function(){return SessionUserContextProvider}});var s=n(5893),i=n(7294);let a=(0,i.createContext)(null),SessionUserContextProvider=e=>{let{session:t,children:n}=e;return(0,s.jsx)(a.Provider,{value:t,children:n})},useSessionUser=()=>{let e=(0,i.useContext)(a);return null===e?{user:null,access_token:null}:e}}}]);
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.