PageSourceSearch

https://www.essaytone.com/_next/static/chunks/7818.51e7ac56ae8abbe8.js

js essaytone.com collected 2026-10-08 05:46:05 UTC 10,444 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7818],{7818:(e,t,r)=>{r.r(t),r.d(t,{UserMenu:()=>F,UserMenuContent:()=>R});var a=r(25223),s=r(44729),i=r(51583),n=r(51144),o=r(38891),l=r(64961),d=r(57135),c=r(60674),u=r(50977);function m(e){let{className:t,...r}=e;return(0,a.jsx)(c.bL,{"data-slot":"avatar",className:(0,u.cn)("relative flex size-8 shrink-0 overflow-hidden rounded-full",t),...r})}var x=r(49778),p=r(68367),h=r(99051),g=r(66637),v=r(15113);let f=(0,r(49219).F)("text-nowrap focus:ring-transparent rounded-full border border-primary bg-primary/5 px-2 py-1 text-xs capitalize text-primary shadow-box",{variants:{variant:{default:"",behavioral:"border-behavioral bg-behavioral/10 px-4 text-behavioral",technical:"border-technical bg-technical/10 px-4 text-technical",situational:"border-situational bg-situational/10 px-4 text-situational"}},defaultVariants:{variant:"default"}}),b=e=>{let{text:t,className:r,icon:s,variant:i="default"}=e;return(0,a.jsxs)("span",{className:(0,u.cn)(f({variant:i,className:r})),children:[s&&(0,a.jsx)("span",{className:"mr-2",children:s}),t]})};var j=r(28275),w=r(9448),y=r(22491),N=r(36479),k=r(87499);function z(){let[e,t]=(0,d.useState)(!1);return w.F.stripe.createCustomerPortal.useMutation({onSuccess:e=>{e.success&&e.portalUrl&&(window.location.href=e.portalUrl)},onError:e=>{k.o.error(e.message||"Failed to open billing portal"),t(!1)}}),(0,a.jsxs)(x.$,{variant:"outline",disabled:e,size:"sm",className:"hover:bg-accent/60 w-full justify-center gap-2 text-sm",children:[e?(0,a.jsx)(y.A,{className:"h-4 w-4 animate-spin"}):(0,a.jsx)(N.A,{className:"h-4 w-4"}),e?"Opening...":"Manage Billing"]})}var C=r(4486),A=r(37156);let _=()=>{let e=(0,v.c)("common"),t=(0,A.useRouter)(),r=async()=>{let r=async()=>(await C.y.signOut({fetchOptions:{redirect:"follow"}}),t.refresh(),e("loggedOutSuccessfully"));k.o.promise(r(),{loading:e("loggingOut"),success:e=>e,error:"Failed to sign out"})};return(0,a.jsx)(x.$,{size:"sm",className:"w-full",onClick:r,children:e("logout")})};function F(){let{user:e}=(0,g.J)(),t=(0,v.c)("header");return e?(0,a.jsx)("div",{className:"flex items-center justify-end",children:(0,a.jsxs)(p.jc,{openDelay:60,closeDelay:60,children:[(0,a.jsx)(p.d0,{asChild:!0,children:(0,a.jsxs)(x.$,{variant:"ghost",className:"hover:bg-accent/60 group flex items-center gap-1 px-2","aria-label":t("userMenu"),children:[(0,a.jsx)(m,{children:(0,a.jsx)("span",{className:"bg-primary text-primary-foreground flex size-full items-center justify-center text-sm font-medium",children:(0,u.IM)(e.name)})}),(0,a.jsx)(s.A,{className:"text-primary"})]})}),(0,a.jsx)(p.Et,{align:"end",className:"w-80 p-4 shadow-sm",children:(0,a.jsx)(R,{user:e})})]})}):null}let R=e=>{var t,r;let{user:s,withLogout:i=!0}=e,n=(0,v.c)("header");return(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-sm font-medium",children:s.name}),(0,a.jsx)("div",{className:"text-muted-foreground text-xs",children:s.email})]}),(0,a.jsx)("div",{className:"bg-primary text-primary-foreground rounded-full px-3 py-1 text-xs font-medium",children:null!=(r=null==(t=s.plan)?void 0:t.name)?r:"Free"})]}),(0,a.jsx)(D,{scanLimit:s.scanLimit,humanizeLimit:s.humanizeLimit,wordsPerRequest:s.wordsPerRequest,citationCredits:s.citationCredits}),i&&(0,a.jsxs)("div",{className:"space-y-2 pt-1",children:[s.planId&&(0,a.jsx)(z,{}),!s.planId&&(0,a.jsx)(x.$,{size:"sm",className:"text-primary border-border hover:!bg-primary mt-1 w-full border bg-white hover:!text-white",children:(0,a.jsx)(j.N_,{href:"/pricing",children:n("upgradePlan")})}),(0,a.jsx)(_,{})]})]})},D=e=>{let{scanLimit:t,humanizeLimit:r,wordsPerRequest:s,citationCredits:d}=e,c=(0,v.c)("header");return(0,a.jsx)("div",{className:"grid grid-cols-2 gap-2",children:[{icon:(0,a.jsx)(i.A,{className:"hidden lg:block"}),value:t,tooltip:c("wordsRemainingForAiScan"),className:"rounded-lg border-primary/80 bg-transparent text-primary/80 hover:bg-primary/10"},{icon:(0,a.jsx)(n.A,{className:"hidden lg:block"}),value:r,tooltip:c("wordsRemainingForHumanize"),className:"rounded-lg border-yellow-500 text-yellow-500 hover:bg-yellow-500/10"},{icon:(0,a.jsx)(o.A,{className:"hidden lg:block"}),value:s,tooltip:c("maxWordsPerRequest"),className:"rounded-lg border-blue-500 text-blue-500 hover:bg-blue-500/10"},{icon:(0,a.jsx)(l.A,{className:"hidden lg:block"}
1),value:d,tooltip:"Citation credits remaining",className:"rounded-lg border-emerald-600 text-emerald-600 hover:bg-emerald-600/10"}].map((e,t)=>(0,a.jsxs)(h.m_,{children:[(0,a.jsx)(h.k$,{asChild:!0,children:(0,a.jsx)(x.$,{variant:"ghost",className:"bg-transparent p-0 !shadow-none",children:(0,a.jsx)(b,{className:(0,u.cn)("w-full",e.className),text:(0,a.jsxs)("span",{className:"flex items-center justify-center gap-2",children:[e.icon,(0,a.jsx)("span",{className:"text-xs font-semibold",children:e.value>=1e3?"".concat((e.value/1e3).toFixed(+(e.value%1e3!=0)),"K"):e.value})]})})})}),(0,a.jsx)(h.ZI,{children:(0,a.jsx)("p",{children:e.tooltip})})]},t))})}},9448:(e,t,r)=>{let a;r.d(t,{TRPCReactProvider:()=>h,F:()=>x});var s=r(25223),i=r(89544),n=r(41674),o=r(36518),l=r(96654),d=r(57135),c=r(93014),u=r(84987),m=r(59457);r(37408);let x=(0,o.pY)(),p=()=>e=>{let{next:t,op:r}=e;return(0,l.sH)(e=>t(r).subscribe({next(t){e.next(t)},error(t){var r;if((null==t||null==(r=t.data)?void 0:r.code)==="UNAUTHORIZED"){let e=window.location.pathname+window.location.search,t="/auth/sign-up?next=".concat(encodeURIComponent(e));window.location.href=t;return}e.error(t)},complete(){e.complete()}}))};function h(e){let t=(null!=a||(a=new u.E({defaultOptions:{queries:{staleTime:3e4},dehydrate:{serializeData:c.Ay.serialize,shouldDehydrateQuery:e=>(0,m.XS)(e)||"pending"===e.state.status},hydrate:{deserializeData:c.Ay.deserialize}}})),a),[r]=(0,d.useState)(()=>x.createClient({links:[(0,n.$H)({enabled:e=>"down"===e.direction&&e.result instanceof Error}),p,(0,n.N9)({transformer:c.Ay,url:window.location.origin+"/api/trpc",headers:()=>{let e=new Headers;return e.set("x-trpc-source","nextjs-react"),e}})]}));return(0,s.jsx)(i.QueryClientProvider,{client:t,children:(0,s.jsx)(x.Provider,{client:r,queryClient:t,children:e.children})})}},28275:(e,t,r)=>{r.d(t,{N_:()=>i,rd:()=>l});var a=r(5856),s=r(14857);let{Link:i,redirect:n,usePathname:o,useRouter:l,getPathname:d}=(0,a.A)(s.D)},49778:(e,t,r)=>{r.d(t,{$:()=>l,r:()=>o});var a=r(25223),s=r(48468),i=r(49219);r(57135);var n=r(50977);let o=(0,i.F)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"cursor-pointer bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border cursor-pointer !border-border !border !bg-background shadow-sm hover:!bg-card dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"cursor-pointer hover:bg-accent hover:text-primary dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 rounded-sm px-4 text-sm lg:text-[15px] py-2 has-[>svg]:px-3",sm:"h-8 rounded-sm gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-9 rounded-sm px-4 has-[>svg]:px-4 text-sm lg:text-[15px]",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function l(e){let{className:t,variant:r,size:i,asChild:l=!1,...d}=e,c=l?s.DX:"button";return(0,a.jsx)(c,{"data-slot":"button",className:(0,n.cn)(o({variant:r,size:i,className:t})),...d})}},68367:(e,t,r)=>{r.d(t,{Et:()=>l,d0:()=>o,jc:()=>n});var a=r(25223);r(57135);var s=r(25063),i=r(50977);function n(e){let{...t}=e;return(0,a.jsx)(s.bL,{"data-slot":"hover-card",...t})}function o(e){let{...t}=e;return(0,a.jsx)(s.l9,{"data-slot":"hover-card-trigger",...t})}function l(e){let{className:t,align:r="center",sideOffset:n=4,...o}=e;return(0,a.jsx)(s.ZL,{"data-slot":"hover-card-portal",children:(0,a.jsx)(s.UC,{"data-slot":"hover-card-content",align:r,sideOffset:n,className:(0,i.cn)("bg-popover text-popover-foreground 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]:sli
1de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",t),...o})})}},99051:(e,t,r)=>{r.d(t,{ZI:()=>d,k$:()=>l,m_:()=>o});var a=r(25223),s=r(30050);r(57135);var i=r(50977);function n(e){let{delayDuration:t=0,...r}=e;return(0,a.jsx)(s.Kq,{"data-slot":"tooltip-provider",delayDuration:t,...r})}function o(e){let{...t}=e;return(0,a.jsx)(n,{children:(0,a.jsx)(s.bL,{"data-slot":"tooltip",...t})})}function l(e){let{...t}=e;return(0,a.jsx)(s.l9,{"data-slot":"tooltip-trigger",...t})}function d(e){let{className:t,sideOffset:r=2,children:n,...o}=e;return(0,a.jsx)(s.ZL,{children:(0,a.jsxs)(s.UC,{"data-slot":"tooltip-content",sideOffset:r,className:(0,i.cn)("animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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","z-50 w-full origin-(--radix-tooltip-content-transform-origin)","rounded-sm border shadow-lg backdrop-blur-sm","px-3 py-2 text-xs font-normal text-balance","w-48 wrap-break-word","bg-primary/85 border-none text-white",t),...o,children:[(0,a.jsx)("div",{className:"w-full text-center",children:(0,a.jsx)("span",{className:"block w-full",children:n})}),(0,a.jsx)(s.i3,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-none fill-none"})]})})}}}]);

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.