1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5241],{93865:function(e,t,n){n.r(t),n.d(t,{default:function(){return e$}});var r=n(57437);let a={type:"doc",content:[{type:"heading",attrs:{level:2},content:[{type:"text",text:"Introducing Novel"}]},{type:"paragraph",content:[{type:"text",marks:[{type:"link",attrs:{href:"https://github.com/steven-tey/novel",target:"_blank"}}],text:"Novel"},{type:"text",text:" is a Notion-style WYSIWYG editor with AI-powered autocompletion. Built with "},{type:"text",marks:[{type:"link",attrs:{href:"https://tiptap.dev/",target:"_blank"}}],text:"Tiptap"},{type:"text",text:" + "},{type:"text",marks:[{type:"link",attrs:{href:"https://sdk.vercel.ai/docs",target:"_blank"}}],text:"Vercel AI SDK"},{type:"text",text:"."}]},{type:"heading",attrs:{level:3},content:[{type:"text",text:"Installation"}]},{type:"codeBlock",attrs:{language:null},content:[{type:"text",text:"npm i novel"}]},{type:"heading",attrs:{level:3},content:[{type:"text",text:"Usage"}]},{type:"codeBlock",attrs:{language:null},content:[{type:"text",text:'import { Editor } from "novel";\n\nexport default function App() {\n return (\n <Editor />\n )\n}'}]},{type:"heading",attrs:{level:3},content:[{type:"text",text:"Features"}]},{type:"orderedList",attrs:{tight:!0,start:1},content:[{type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:"Slash menu & bubble menu"}]}]}
1,{type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:"AI autocomplete (type "},{type:"text",marks:[{type:"code"}],text:"++"},{type:"text",text:" to activate, or select from slash menu)"}]}]},{type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:"Image uploads (drag & drop / copy & paste, or select from slash menu) "}]}]},{type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:"Add tweets from the command slash menu:"}]},{type:"twitter",attrs:{src:"https://x.com/elonmusk/status/1800759252224729577"}}]},{type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:"Mathematical symbols with LaTeX expression:"}]},{type:"orderedList",attrs:{tight:!0,start:1},content:[{type:"listItem",content:[{type:"paragraph",content:[{type:"math",attrs:{latex:"E = mc^2"}}]}]},{type:"listItem",content:[{type:"paragraph",content:[{type:"math",attrs:{latex:"a^2 = \\sqrt{b^2 + c^2}"}}]}]},{type:"listItem",content:[{type:"paragraph",content:[{type:"math",attrs:{latex:"\\hat{f} (\\xi)=\\int_{-\\infty}^{\\infty}f(x)e^{-2\\pi ix\\xi}dx"}}]}]},{type:"listItem",content:[{type:"paragraph",content:[{type:"math",attrs:{latex:"A=\\begin{bmatrix}a&b\\\\c&d \\end{bmatrix}"}}]}]},{type:"listItem",content:[{type:"paragraph",content:[{type:"math",attrs:{latex:"\\sum_{i=0}^n x_i"}}]}]}]}]}]},{type:"image",attrs:{src:"https://public.blob.vercel-storage.com/pJrjXbdONOnAeZAZ/banner-2wQk82qTwyVgvlhTW21GIkWgqPGD2C.png",alt:"banner.png",title:"banner.png",width:null,height:null}},{type:"horizontalRule"},{type:"heading",attrs:{level:3},content:[{type:"text",text:"Learn more"}]},{type:"taskList",content:[{type:"taskItem",attrs:{checked:!1},content:[{type:"paragraph",content:[{type:"text",text:"Star us on "},{type:"text",marks:[{type:"link",attrs:{href:"https://github.com/steven-tey/novel",target:"_blank"}}],text:"GitHub"}]}]},{type:"taskItem",attrs:{checked:!1},content:[{type:"paragraph",content:[{type:"text",text:"Install the "},{type:"text",marks:[{type:"link",attrs:{href:"https://www.npmjs.com/package/novel",target:"_blank"}}],text:"NPM package"}]}]},{type:"taskItem",attrs:{checked:!1},content:[{type:"paragraph",content:[{type:"text",marks:[{type:"link",attrs:{href:"https://vercel.com/templates/next.js/novel",target:"_blank"}}],text:"Deploy your own"},{type:"text",text:" to Vercel"}]}]}]}]};var l=n(90477),o=n(67138),s=n(46202),i=n(27266),c=n(69930),d=n(93922),u=n(43366),m=n(68723),p=n(76089),x=n(37396),h=n(43894),g=n(44308),f=n(41546),v=n(91993),b=n(13027),y=n(2300),j=n(63492);let N=o.f,w=o.B,C=c.ZP.configure({HTMLAttributes:{class:(0,b.cx)("text-muted-foreground underline underline-offset-[3px] hover:text-primary transition-colors cursor-pointer")}}),k=d.ZP.extend({addProseMirrorPlugins:()=>[(0,v.N8)({imageClass:(0,b.cx)("opacity-40 rounded-lg border border-stone-200")})]}).configure({allowBase64:!0,HTMLAttributes:{class:(0,b.cx)("rounded-lg border border-muted")}}),A=o.c.configure({HTMLAttributes:{class:(0,b.cx)("rounded-lg border border-muted")}}),L=u.a.configure({HTMLAttributes:{class:(0,b.cx)("not-prose pl-2 ")}}),T=m.Uf.configure({HTMLAttributes:{class:(0,b.cx)("flex gap-2 items-start my-4")},nested:!0}),Z=o.D.configure({HTMLAttributes:{class:(0,b.cx)("mt-4 mb-6 border-t border-muted-foreground")}}),z=p.Z.configure({bulletList:{HTMLAttributes:{class:(0,b.cx)("list-disc list-outside leading-3 -mt-2")}},orderedList:{HTMLAttributes:{class:(0,b.cx)("list-decimal list-outside leading-3 -mt-2")}},listItem:{HTMLAttributes:{class:(0,b.cx)("leading-normal -mb-2")}},blockquote:{HTMLAttributes:{class:(0,b.cx)("border-l-4 border-primary")}},codeBlock:{HTMLAttributes:{class:(0,b.cx)("rounded-md bg-muted text-muted-foreground border p-5 font-mono font-medium")}},code:{HTMLAttributes:{class:(0,b.cx)("rounded-md bg-muted px-1.5 py-1 font-mono font-medium"),spellcheck:"false"}},horizontalRule:!1,dropcursor:{color:"#DBEAFE",width:4}}),R=x.Z.configure({lowlight:(0,y.B)(j.y)}),I=[z,w,C,k,A,L,T,Z,N,R,h.Z.configure({HTMLAttributes:{class:(0,b.cx)("rounded-lg border border-muted")},inline:!1}),o.b.configure({HTMLAttributes:{class:(0,b.cx)("not-prose")},inline:!1}),g.Z.configure(),f.Z];var S=n(42421),M=n(22468),H=n(14719),E=n(97556),P=n(19573);let B=[{name:"Default",color:"var(--novel-black)"},{name:"Purple",color:"#9333EA"},{name:"Red",color:"#E00000"},{name:"Yellow",color:"#EAB308"},{name:"Blue",color:"#2563EB"},{name:"Green",color:"#008A00"},{name:"Orange",color:"#FFA500"},{name:"Pink",color:"#BA4081"},{name:"Gray",color:"#A8A29E"}],O=[{name:"Default",color:"var(--novel-highlight-default)"},{name:"Purple",color:"var(--novel-highlight-purple)"},{name:"Red",color:"var(--novel-highlight-red)"},{name:"Yellow",color:"var(--novel-highlight-yellow)"},{name:"Blue",color:"var(--novel-highlight-blue)"},{name:"Green",color:"var(--novel-highlight-green)"},{name:"Orange",color:"var(--novel-highlight-orange)"},{name:"Pink",color:"var(--novel-highlight-pink)"},{name:"Gray",color:"var(--novel-highlight-gray)"}],Y=e=>{let{open:t,onOpenChange:n}=e,{editor:a}=(0,H.fi)();if(!a)return null;let o=B.find(e=>{let{color:t}=e;return a.isActive("textStyle",{color:t})}),s=O.find(e=>{let{color:t}=e;return a.isActive("highlight",{color:t})});return(0,r.jsxs)(P.Popover,{modal:!0,open:t,onOpenChange:n,children:[(0,r.jsx)(P.PopoverTrigger,{asChild:!0,children:(0,r.jsxs)(E.z,{size:"sm",className:"gap-2 rounded-none",variant:"ghost",children:[(0,r.jsx)("span",{className:"rounded-sm px-1",style:{color:null==o?void 0:o.color,backgroundColor:null==s?void 0:s.color},children:"A"}),(0,r.jsx)(S.Z,{className:"h-4 w-4"})]})}),(0,r.jsxs)(P.PopoverContent,{sideOffset:5,className:"my-1 flex max-h-80 w-48 flex-col overflow-hidden overflow-y-auto rounded border p-1 shadow-xl ",align:"start",children:[(0,r.jsxs)("div",{className:"flex flex-col",children:[(0,r.jsx)("div",{className:"my-1 px-2 text-sm font-semibold text-muted-foreground",children:"Color"}),B.map(e=>{let{name:t,color:n}=e;return(0,r.jsx)(l.U3,{onSelect:()=>{a.commands.unsetColor(),"Default"!==t&&a.chain().focus().setColor(n||"").run()},className:"flex cursor-pointer items-center justify-between px-2 py-1 text-sm hover:bg-accent",children:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("div",{className:"rounded-sm border px-2 py-px font-medium",style:{color:n},children:"A"}),(0,r.jsx)("span",{children:t})]})},t)})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"my-1 px-2 text-sm font-semibold text-muted-foreground",children:"Backgroun
1d"}),O.map(e=>{let{name:t,color:n}=e;return(0,r.jsxs)(l.U3,{onSelect:()=>{a.commands.unsetHighlight(),"Default"!==t&&a.commands.setHighlight({color:n})},className:"flex cursor-pointer items-center justify-between px-2 py-1 text-sm hover:bg-accent",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("div",{className:"rounded-sm border px-2 py-px font-medium",style:{backgroundColor:n},children:"A"}),(0,r.jsx)("span",{children:t})]}),a.isActive("highlight",{color:n})&&(0,r.jsx)(M.Z,{className:"h-4 w-4"})]},t)})]})]})]})};var _=n(37440),U=n(97041),D=n(90399),J=n(50851);let F=e=>{let{open:t,onOpenChange:n}=e,a=(0,J.mT)(null),{editor:l}=(0,H.fi)();return((0,J.d4)(()=>{var e;null===(e=a.current)||void 0===e||e.focus()}),l)?(0,r.jsxs)(U.J2,{modal:!0,open:t,onOpenChange:n,children:[(0,r.jsx)(U.xo,{asChild:!0,children:(0,r.jsxs)(E.z,{size:"sm",variant:"ghost",className:"gap-2 rounded-none border-none",children:[(0,r.jsx)("p",{className:"text-base",children:"â"}),(0,r.jsx)("p",{className:(0,_.cn)("underline decoration-stone-400 underline-offset-4",{"text-blue-500":l.isActive("link")}),children:"Link"})]})}),(0,r.jsx)(P.PopoverContent,{align:"start",className:"w-60 p-0",sideOffset:10,children:(0,r.jsxs)("form",{onSubmit:e=>{let t=e.currentTarget;e.preventDefault();let n=function(e){if(function(e){try{return new URL(e),!0}catch(e){return!1}}(e))return e;try{if(e.includes(".")&&!e.includes(" "))return new URL("https://".concat(e)).toString()}catch(e){return null}}(t[0].value);n&&l.chain().focus().setLink({href:n}).run()},className:"flex p-1 ",children:[(0,r.jsx)("input",{ref:a,type:"text",placeholder:"Paste a link",className:"flex-1 bg-background p-1 text-sm outline-none",defaultValue:l.getAttributes("link").href||""}),l.getAttributes("link").href?(0,r.jsx)(E.z,{size:"icon",variant:"outline",type:"button",className:"flex h-8 items-center rounded-sm p-1 text-red-600 transition-all hover:bg-red-100 dark:hover:bg-red-800",onClick:()=>{l.chain().focus().unsetLink().run(),a.current&&(a.current.value="")},children:(0,r.jsx)(D.Z,{className:"h-4 w-4"})}):(0,r.jsx)(E.z,{size:"icon",className:"h-8",children:(0,r.jsx)(M.Z,{className:"h-4 w-4"})})]})})]}):null};var G=n(706),V=n(17846),q=n(27180),W=n(46292),Q=n(13615),X=n(703),K=n(73877),$=n(7746);let ee=[{name:"Text",icon:G.Z,command:e=>null==e?void 0:e.chain().focus().clearNodes().run(),isActive:e=>(null==e?void 0:e.isActive("paragraph"))&&!(null==e?void 0:e.isActive("bulletList"))&&!(null==e?void 0:e.isActive("orderedList"))||!1},{name:"Heading 1",icon:V.Z,command:e=>null==e?void 0:e.chain().focus().clearNodes().toggleHeading({level:1}).run(),isActive:e=>(null==e?void 0:e.isActive("heading",{level:1}))||!1},{name:"Heading 2",icon:q.Z,command:e=>null==e?void 0:e.chain().focus().clearNodes().toggleHeading({level:2}).run(),isActive:e=>(null==e?void 0:e.isActive("heading",{level:2}))||!1},{name:"Heading 3",icon:W.Z,command:e=>null==e?void 0:e.chain().focus().clearNodes().toggleHeading({level:3}).run(),isActive:e=>(null==e?void 0:e.isActive("heading",{level:3}))||!1},{name:"To-do List",icon:Q.Z,command:e=>null==e?void 0:e.chain().focus().clearNodes().toggleTaskList().run(),isActive:e=>(null==e?void 0:e.isActive("taskItem"))||!1},{name:"Bullet List",icon:X.Z,command:e=>null==e?void 0:e.chain().focus().clearNodes().toggleBulletList().run(),isActive:e=>(null==e?void 0:e.isActive("bulletList"))||!1},{name:"Numbered List",icon:X.Z,command:e=>null==e?void 0:e.chain().focus().clearNodes().toggleOrderedList().run(),isActive:e=>(null==e?void 0:e.isActive("orderedList"))||!1},{name:"Quote",icon:K.Z,command:e=>null==e?void 0:e.chain().focus().clearNodes().toggleBlockquote().run(),isActive:e=>(null==e?void 0:e.isActive("blockquote"))||!1},{name:"Code",icon:$.Z,command:e=>null==e?void 0:e.chain().focus().clearNodes().toggleCodeBlock().run(),isActive:e=>(null==e?void 0:e.isActive("codeBlock"))||!1}],et=e=>{var t;let{open:n,onOpenChange:a}=e,{editor:o}=(0,H.fi)();if(!o)return null;let s=null!==(t=ee.filter(e=>e.isActive(o)).pop())&&void 0!==t?t:{name:"Multiple"};return(0,r.jsxs)(U.J2,{modal:!0,open:n,onOpenChange:a,children:[(0,r.jsx)(P.PopoverTrigger,{asChild:!0,className:"gap-2 rounded-none border-none hover:bg-accent focus:ring-0",children:(0,r.jsxs)(E.z,{size:"sm",variant:"ghost",className:"gap-2",children:[(0,r.jsx)("span",{className:"whitespace-nowrap text-sm",children:s.name}),(0,r.jsx)(S.Z,{className:"h-4 w-4"})]})}
1),(0,r.jsx)(P.PopoverContent,{sideOffset:5,align:"start",className:"w-48 p-1",children:ee.map(e=>(0,r.jsxs)(l.U3,{onSelect:t=>{e.command(t),a(!1)},className:"flex cursor-pointer items-center justify-between rounded-sm px-2 py-1 text-sm hover:bg-accent",children:[(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)("div",{className:"rounded-sm border p-1",children:(0,r.jsx)(e.icon,{className:"h-3 w-3"})}),(0,r.jsx)("span",{children:e.name})]}),s.name===e.name&&(0,r.jsx)(M.Z,{className:"h-4 w-4"})]},e.name))})]})};var en=n(54775);let er=e=>{let{open:t,onOpenChange:n}=e,{editor:a}=(0,H.fi)();if(!a)return null;let o=a.isActive("table");return(0,r.jsxs)(P.Popover,{modal:!0,open:t,onOpenChange:n,children:[(0,r.jsx)(P.PopoverTrigger,{asChild:!0,children:(0,r.jsxs)(E.z,{size:"sm",className:"gap-2 rounded-none",variant:"ghost",children:[(0,r.jsx)(en.Z,{className:"h-4 w-4"}),(0,r.jsx)(S.Z,{className:"h-4 w-4"})]})}),(0,r.jsx)(P.PopoverContent,{sideOffset:5,className:"my-1 flex max-h-80 w-48 flex-col overflow-hidden overflow-y-auto rounded border p-1 shadow-xl",align:"start",children:(0,r.jsxs)("div",{className:"flex flex-col",children:[(0,r.jsx)("div",{className:"my-1 px-2 text-sm font-semibold text-muted-foreground",children:"Table Actions"}),(0,r.jsx)(l.U3,{onSelect:()=>a.chain().focus().insertTable({rows:3,cols:3,withHeaderRow:!0}).run(),className:"flex cursor-pointer items-center px-2 py-1 text-sm hover:bg-accent",children:"Insert Table"}),o&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.U3,{onSelect:()=>a.chain().focus().addColumnBefore().run(),className:"flex cursor-pointer items-center px-2 py-1 text-sm hover:bg-accent",children:"Add Column Before"}),(0,r.jsx)(l.U3,{onSelect:()=>a.chain().focus().addColumnAfter().run(),className:"flex cursor-pointer items-center px-2 py-1 text-sm hover:bg-accent",children:"Add Column After"}),(0,r.jsx)(l.U3,{onSelect:()=>a.chain().focus().deleteColumn().run(),className:"flex cursor-pointer items-center px-2 py-1 text-sm hover:bg-accent",children:"Delete Column"}),(0,r.jsx)(l.U3,{onSelect:()=>a.chain().focus().addRowBefore().run(),className:"flex cursor-pointer items-center px-2 py-1 text-sm hover:bg-accent",children:"Add Row Before"}),(0,r.jsx)(l.U3,{onSelect:()=>a.chain().focus().addRowAfter().run(),className:"flex cursor-pointer items-center px-2 py-1 text-sm hover:bg-accent",children:"Add Row After"}),(0,r.jsx)(l.U3,{onSelect:()=>a.chain().focus().deleteRow().run(),className:"flex cursor-pointer items-center px-2 py-1 text-sm hover:bg-accent",children:"Delete Row"}),(0,r.jsx)(l.U3,{onSelect:()=>a.chain().focus().deleteTable().run(),className:"flex cursor-pointer items-center px-2 py-1 text-sm hover:bg-accent",children:"Delete Table"})]})]})})]})};var ea=n(64344),el=n(2265);function eo(e){let{className:t}=e;return(0,r.jsxs)("svg",{width:"469",height:"469",viewBox:"0 0 469 469",fill:"none",xmlns:"http://www.w3.org/2000/svg",shapeRendering:"geometricPrecision",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",className:t,children:[(0,r.jsx)("title",{children:"Magic AI icon"}),(0,r.jsx)("path",{d:"M237.092 62.3004L266.754 71.4198C267.156 71.5285 267.51 71.765 267.765 72.0934C268.02 72.4218 268.161 72.8243 268.166 73.2399C268.172 73.6555 268.042 74.0616 267.796 74.3967C267.55 74.7318 267.201 74.9777 266.803 75.097L237.141 84.3145C236.84 84.4058 236.566 84.5699 236.344 84.7922C236.121 85.0146 235.957 85.2883 235.866 85.5893L226.747 115.252C226.638 115.653 226.401 116.008 226.073 116.263C225.745 116.517 225.342 116.658 224.926 116.664C224.511 116.669 224.105 116.539 223.77 116.293C223.435 116.047 223.189 115.699 223.069 115.301L213.852 85.6383C213.761 85.3374 213.597 85.0636 213.374 84.8412C213.152 84.6189 212.878 84.4548 212.577 84.3635L182.914 75.2441C182.513 75.1354 182.158 74.8989 181.904 74.5705C181.649 74.2421 181.508 73.8396 181.503 73.424C181.497 73.0084 181.627 72.6023 181.873 72.2672C182.119 71.9321 182.467 71.6863 182.865 71.5669L212.528 62.3494C212.829 62.2582 213.103 62.0941 213.325 61.8717C213.547 61.6494 213.712 61.3756 213.803 61.0747L222.922 31.4121C223.031 31.0109 223.267 30.656 223.596 30.4013C223.924 30.1465 224.327 30.0057 224.742 30.0002C225.158 29.9946 225.564 30.1247 225.899 30.3706C226.234 30.6165 226.48 30.9649 226.599 31.363L235.817 61.0257C235.908 61.3266 236.072 61.6003 236.295 61.8227C236.517 62.0451 236.791 62.2091 237.092 62.3004Z",fill:"currentColor"}),(0,r.jsx)("path",{d:"M155.948 155.848L202.771 168.939C203.449 169.131 204.045 169.539 204.47 170.101C204.895 170.663 205.125 171.348 205.125 172.052C205.125 172.757 204.895 173.442 204.47 174.004C204.045 174.566 203.449 174.974 202.771 175.166L155.899 188.06C155.361 188.209 154.87 188.496 154.475 188.891C154.079 189.286 153.793 189.777 153.644 190.316L140.553 237.138C140.361 237.816 139.953 238.413 139.391 238.838C138.829 239.262 138.144 239.492 137.44 239.492C136.735 239.492 136.05 239.262 135.488 238.838C134.927 238.413 134.519 237.816 134.327 237.138L121.432 190.267C121.283 189.728 120.997 189.237 120.601 188.842C120.206 188.446 119.715 188.16 119.177 188.011L72.3537 174.92C71.676 174.728 71.0795 174.32 70.6547 173.759C70.2299 173.197 70 172.512 70 171.807C70 171.103 70.2299 170.418 70.6547 169.856C71.
10795 169.294 71.676 168.886 72.3537 168.694L119.226 155.799C119.764 155.65 120.255 155.364 120.65 154.969C121.046 154.573 121.332 154.082 121.481 153.544L134.572 106.721C134.764 106.043 135.172 105.447 135.734 105.022C136.295 104.597 136.981 104.367 137.685 104.367C138.389 104.367 139.075 104.597 139.637 105.022C140.198 105.447 140.606 106.043 140.798 106.721L153.693 153.593C153.842 154.131 154.128 154.622 154.524 155.018C154.919 155.413 155.41 155.699 155.948 155.848Z",fill:"currentColor"}),(0,r.jsx)("path",{d:"M386.827 289.992C404.33 292.149 403.84 305.828 386.876 307.299C346.623 310.829 298.869 316.271 282.199 360.005C274.844 379.192 269.942 403.2 267.49 432.029C267.427 432.846 267.211 433.626 266.856 434.319C266.501 435.012 266.015 435.602 265.431 436.05C254.988 444.041 251.212 434.186 250.183 425.606C239.2 332.353 214.588 316.909 124.668 306.122C123.892 306.031 123.151 305.767 122.504 305.35C121.857 304.933 121.322 304.375 120.942 303.72C116.399 295.679 119.324 291.038 129.718 289.796C224.688 278.47 236.062 262.83 250.183 169.331C252.177 156.355 257.259 154.083 265.431 162.516C266.51 163.593 267.202 165.099 267.392 166.782C279.257 258.564 293.328 278.617 386.827 289.992Z",fill:"currentColor"})]})}var es=n(4867),ei=n(34465),ec=n(13304);ec.fC,ec.xz;let ed=e=>{let{className:t,...n}=e;return(0,r.jsx)(ec.h_,{className:(0,_.cn)(t),...n})};ed.displayName=ec.h_.displayName;let eu=el.forwardRef((e,t)=>{let{className:n,...a}=e;return(0,r.jsx)(ec.aV,{ref:t,className:(0,_.cn)("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",n),...a})});eu.displayName=ec.aV.displayName,el.forwardRef((e,t)=>{let{className:n,children:a,...l}=e;return(0,r.jsxs)(ed,{children:[(0,r.jsx)(eu,{}),(0,r.jsxs)(ec.VY,{ref:t,className:(0,_.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",n),...l,children:[a,(0,r.jsxs)(ec.x8,{className:"absolute right-4 top-4 roun
1ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,r.jsx)(es.Pxu,{className:"h-4 w-4"}),(0,r.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}).displayName=ec.VY.displayName,el.forwardRef((e,t)=>{let{className:n,...a}=e;return(0,r.jsx)(ec.Dx,{ref:t,className:(0,_.cn)("text-lg font-semibold leading-none tracking-tight",n),...a})}).displayName=ec.Dx.displayName,el.forwardRef((e,t)=>{let{className:n,...a}=e;return(0,r.jsx)(ec.dk,{ref:t,className:(0,_.cn)("text-sm text-muted-foreground",n),...a})}).displayName=ec.dk.displayName;let em=el.forwardRef((e,t)=>{let{className:n,...a}=e;return(0,r.jsx)(ei.mY,{ref:t,className:(0,_.cn)("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",n),...a})});em.displayName=ei.mY.displayName;let ep=el.forwardRef((e,t)=>{let{className:n,...a}=e;return(0,r.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,r.jsx)(es._Ve,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,r.jsx)(ei.mY.Input,{ref:t,className:(0,_.cn)("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",n),...a})]})});ep.displayName=ei.mY.Input.displayName,el.forwardRef((e,t)=>{let{className:n,...a}=e;return(0,r.jsx)(ei.mY.List,{ref:t,className:(0,_.cn)("max-h-[300px] overflow-y-auto overflow-x-hidden",n),...a})}).displayName=ei.mY.List.displayName,el.forwardRef((e,t)=>(0,r.jsx)(ei.mY.Empty,{ref:t,className:"py-6 text-center text-sm",...e})).displayName=ei.mY.Empty.displayName;let ex=el.forwardRef((e,t)=>{let{className:n,...a}=e;return(0,r.jsx)(ei.mY.Group,{ref:t,className:(0,_.cn)("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",n),...a})});ex.displayName=ei.mY.Group.displayName;let eh=el.forwardRef((e,t)=>{let{className:n,...a}=e;return(0,r.jsx)(ei.mY.Separator,{ref:t,className:(0,_.cn)("-mx-1 h-px bg-border",n),...a})});eh.displayName=ei.mY.Separator.displayName;let eg=el.forwardRef((e,t)=>{let{className:n,...a}=e;return(0,r.jsx)(ei.mY.Item,{ref:t,className:(0,_.cn)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n),...a})});eg.displayName=ei.mY.Item.displayName;var ef=n(82255),ev=n(63541),eb=n(41352),ey=n(56318),ej=n(35657),eN=()=>(0,r.jsxs)("div",{className:"flex items-center justify-center gap-0.5",children:[(0,r.jsx)("div",{className:"h-1.5 w-1.5 animate-bounce rounded-full bg-purple-500 [animation-delay:-0.3s]"}),(0,r.jsx)("div",{className:"h-1.5 w-1.5 animate-bounce rounded-full bg-purple-500 [animation-delay:-0.15s]"}),(0,r.jsx)("div",{className:"h-1.5 w-1.5 animate-bounce rounded-full bg-purple-500"})]}),ew=n(80023);let eC=el.forwardRef((e,t)=>{let{className:n,children:a,...l}=e;return(0,r.jsxs)(ew.fC,{ref:t,className:(0,_.cn)("relative overflow-hidden",n),...l,children:[(0,r.jsx)(ew.l_,{className:"h-full w-full rounded-[inherit]",children:a}),(0,r.jsx)(ek,{}),(0,r.jsx)(ew.Ns,{})]})});eC.displayName=ew.fC.displayName;let ek=el.forwardRef((e,t)=>{let{className:n,orientation:a="vertical",...l}=e;return(0,r.jsx)(ew.gb,{ref:t,orientation:a,className:(0,_.cn)("flex touch-none select-none transition-colors","vertical"===a&&"h-full w-2.5 border-l border-l-transparent p-[1px]","horizontal"===a&&"h-2.5 border-t border-t-transparent p-[1px]",n),...l,children:(0,r.jsx)(ew.q4,{className:"relative flex-1 rounded-full bg-border"})})});ek.displayName=ew.gb.displayName;var eA=e=>{let{completion:t,onDiscard:n}=e,{editor:a}=(0,H.fi)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(ex,{children:[(0,r.jsxs)(eg,{className:"gap-2 px-4",value:"replace",onSelect:()=>{var e,n;let r=null==a?void 0:a.view.state.selection;null==a||a.chain().focus().insertContentAt({from:null!==(e=null==r?void 0:r.from)&&void 0!==e?e:0,to:null!==(n=null==r?void 0:r.to)&&void 0!==n?n:0},t).run()},children:[(0,r.jsx)(M.Z,{className:"h-4 w-4 text-muted-foreground"}),"Replace selection"]}),(0,r.jsxs)(eg,{className:"gap-2 px-4",value:"insert",onSelect:()=>{var e;let n=null==a?void 0:a.view.state.selection;null==a||a.chain().focus().insertContentAt((null!==(e=null==n?void 0:n.to)&&void 0!==e?e:0)+1,t).run()},children:[(0,r.jsx)(K.Z,{className:"h-4 w-4 text-muted-foreground"}),"Insert below"]})]}),(0,r.jsx)(eh,{}),(0,r.jsx)(ex,{children:(0,r.jsxs)(eg,{onSelect:()=>{n()},value:"thrash",className:"gap-2 px-4",children:[(0,r.jsx)(D.Z,{className:"h-4 w-4 text-muted-foreground"}),"Discard"]})})]})},eL=n(49996),eT=n(22638),eZ=n(28680),ez=n(48018),eR=n(19576),eI=n(6117);let eS=[{value:"improve",label:"Improve writing",icon:eL.Z},{value:"fix",label:"Fix grammar",icon:eT.Z}
1,{value:"shorter",label:"Make shorter",icon:eZ.Z},{value:"longer",label:"Make longer",icon:ez.Z}];var eM=e=>{let{onSelect:t}=e,{editor:n}=(0,H.fi)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(ex,{heading:"Edit or review selection",children:eS.map(e=>(0,r.jsxs)(eg,{onSelect:e=>{let r=null==n?void 0:n.state.selection.content();t(null==n?void 0:n.storage.markdown.serializer.serialize(null==r?void 0:r.content),e)},className:"flex gap-2 px-4",value:e.value,children:[(0,r.jsx)(e.icon,{className:"h-4 w-4 text-purple-500"}),e.label]},e.value))}),(0,r.jsx)(eh,{}),(0,r.jsx)(ex,{heading:"Use AI to do more",children:(0,r.jsxs)(eg,{onSelect:()=>{var e;let r=null!==(e=null==n?void 0:n.state.selection.from)&&void 0!==e?e:0;n&&t((0,eI.S3)(n,r),"continue")},value:"continue",className:"gap-2 px-4",children:[(0,r.jsx)(eR.Z,{className:"h-4 w-4 text-purple-500"}),"Continue writing"]})})]})};function eH(e){let{onOpenChange:t,additionalContext:n}=e,{editor:a}=(0,H.fi)(),[l,s]=(0,eb.eJ)(""),[i,c]=(0,eb.eJ)(""),{complete:d,isLoading:u}=(0,ef.GO)({id:"novel",api:"/api/generate",onResponse:e=>{if(429===e.status){(0,ej.Am)({title:"Error",description:"You have reached your request limit for the day.",variant:"destructive"});return}},onError:e=>{(0,ej.Am)({title:"Error",description:e.message,variant:"destructive"})},onFinish:(e,t)=>{c(t)}}),m=i.length>0;return console.log(n,"additionalContext"),(0,r.jsxs)(em,{className:"w-[350px]",children:[m&&(0,r.jsx)("div",{className:"flex max-h-[400px]",children:(0,r.jsx)(eC,{children:(0,r.jsx)("div",{className:"prose p-2 px-4 prose-sm",children:(0,r.jsx)(ey.U,{children:i})})})}),u&&(0,r.jsxs)("div",{className:"flex h-12 w-full items-center px-4 text-sm font-medium text-muted-foreground text-purple-500",children:[(0,r.jsx)(eo,{className:"mr-2 h-4 w-4 shrink-0 "}),"AI is thinking",(0,r.jsx)("div",{className:"ml-2 mt-1",children:(0,r.jsx)(eN,{})})]}),!u&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(ep,{value:l,onValueChange:s,autoFocus:!0,placeholder:m?"Tell AI what to do next":"Ask AI to edit or generate...",onFocus:()=>{a&&(0,o.h)(a)}}),(0,r.jsx)(E.z,{size:"icon",className:"absolute right-2 top-1/2 h-6 w-6 -translate-y-1/2 rounded-full bg-purple-500 hover:bg-purple-900",onClick:()=>{if(i)return d(i,{body:{option:"zap",command:l,additionalContext:n}}).then(()=>s(""));let e=null==a?void 0:a.state.selection.content();d(null==a?void 0:a.storage.markdown.serializer.serialize(null==e?void 0:e.content),{body:{option:"zap",command:l,additionalContext:n}}).then(()=>s(""))},children:(0,r.jsx)(ev.Z,{className:"h-4 w-4"})})]}),m?(0,r.jsx)(eA,{onDiscard:()=>{t(!1),null==a||a.chain().unsetHighlight().focus().run(),c("")},completion:i}):(0,r.jsx)(eM,{onSelect:(e,t)=>d(e,{body:{option:t,additionalContext:n}})})]})]})}var eE=e=>{let{children:t,open:n,onOpenChange:a,additionalContext:s}=e,{editor:i}=(0,H.fi)();return(0,el.useEffect)(()=>{!n&&i&&(0,o.g)(i)},[n]),console.log(s,"additionalContext"),(0,r.jsxs)(l.E_,{tippyOptions:{placement:n?"bottom-start":"top",onHidden:()=>{var e,t;a(!1),null==i||null===(t=i.chain())||void 0===t||null===(e=t.unsetHighlight())||void 0===e||e.run()}},className:"flex w-fit max-w-[90vw] overflow-hidden rounded-md border border-muted bg-background shadow-xl",children:[n&&(0,r.jsx)(eH,{open:n,onOpenChange:a,additionalContext:s}),!n&&(0,r.jsxs)(el.Fragment,{children:[(0,r.jsxs)(E.z,{className:"gap-1 rounded-none text-purple-500 w-24",variant:"ghost",onClick:()=>a(!0),size:"sm",children:[(0,r.jsx)(eo,{className:"h-5 w-5"}),"Ask AI"]}),t]})]})};let eP=(0,v.EQ)({onUpload:e=>{let t=fetch("/api/upload",{method:"POST",headers:{"content-type":(null==e?void 0:e.type)||"application/octet-stream","x-vercel-filename":(null==e?void 0:e.name)||"image.png"},body:e});return new Promise(n=>{(0,ej.Am)({title:"Uploading image..."}),t.then(async t=>{if(200===t.status){let{url:e}=await t.json(),r=new Image;r.src=e,r.onload=()=>{n(e)},(0,ej.Am)({title:"Image uploaded successfully.",variant:"default"})}else if(401===t.status)n(e),(0,ej.Am)({title:"Error",description:"Reading image locally.",variant:"destructive"});else throw Error("Error uploading image. Please try again.")},e=>{(0,ej.Am)({title:"Error",description:e.message,variant:"destructive"})})})},validateFn:e=>e.type.includes("image/")?!(e.size/1024/1024>20)||((0,ej.Am)({variant:"destructive",title:"Error",description:"File size too big (max 20MB)."}),!1):((0,ej.Am)({variant:"destructive",title:"Error",description:"File type not supported."}),!1)});var eB=n(19322),eO=n(21216),eY=n(85637);let e_=()=>{let{editor:e}=(0,H.fi)();if(!e)return null;let t=[{name:"bold",isActive:e=>(null==e?void 0:e.isActive("bold"))||!1,command:e=>{var t,n,r;return null==e?void 0:null===(r=e.chain())||void 0===r?void 0:null===(n=r.focus())||void 0===n?void 0:null===(t=n.toggleBold())||void 0===t?void 0:t.run()},icon:eB.Z},{name:"italic",isActive:e=>(null==e?void 0:e.isActive("italic"))||!1,command:e=>{var t,n,r;return null==e?void 0:null===(r=e.chain())||void 0===r?void 0:null===(n=r.focus())||void 0===n?void 0:null===(t=n.toggleItalic())||void 0===t?void 0:t.run()},icon:eO.Z},{name:"underline",isActive:e=>(null==e?void 0:e.isActive("underline"))||!1,command:e=>{var t,n,r;return null==e?void 0:null===(r=e.chain())||void 0===r?void 0:null===(n=r.focus())||void 0===n?void 0:null===(t=n.toggleUnderline())||void 0===t?void 0:t.run()},icon:eY.Z}];return(0,r.jsx)("div",{className:"flex",children:t.map(t=>(0,r.jsx)(l.U3,{onSelect:e=>{t.command(e)},children:(0,r.jsx)(E.z,{size:"sm",className:"rounded-none",variant:"ghost",children:(0,r.jsx)(t.icon,{className:(0,_.cn)("h-4 w-4",{"text-blue-500":t.isActive(e)})})})},t.name))})};var eU=n(15574),eD=n(92222);let eJ=(0,o.p)([{title:"Text",description:"Just start typing with plain text.",searchTerms:["p","paragraph"],icon:(0,r.jsx)(G.Z,{size:18}),command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).toggleNode("paragraph","paragraph").run()}},{title:"To-do List",description:"Track tasks with a to-do list.",searchTerms:["todo","task","list","check","checkbox"],icon:(0,r.jsx)(Q.Z,{size:18}),command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).toggleTaskList().run()}},{title:"Heading 1",description:"Big section heading.",searchTerms:["title","big","large"],icon:(0,r.jsx)(V.Z,{size:18}),command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("heading",{level:1}).run()}},{title:"Heading 2",description:"Medium section heading.",searchTerms:["subtitle","medium"],icon:(0,r.jsx)(q.Z,{size:18}),command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("heading",{level:2}).run()}},{title:"Heading 3",description:"Small section heading.",searchTerms:["subtitle","small"],icon:(0,r.jsx)(W.Z,{size:18}),command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("heading",{level:3}).run()}},{title:"Bullet List",description:"Create a simple bullet list.",searchTerms:["unordered","point"],icon:(0,r.jsx)(eU.Z,{size:18}),command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).toggleBulletList().run()}},{title:"Numbered List",description:"Create a list with numbering.",searchTerms:["ordered"],icon:(0,r.jsx)(X.Z,{size:18}),command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).toggleOrderedList().run()}},{title:"Table",description:"Create a table.",searchTerms:["table"],icon:(0,r.jsx)(eD.Z,{size:18}),command:e=>{let{editor:t,range:n}=e;t.chain().focus().insertTable({rows:3,cols:3,withHeaderRow:!0}).run()}},{title:"Delete Table",description:"Delete a table.",searchTerms:["table"],icon:(0,r.jsx)(eD.Z,{size:18}),command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteTable().run()}}]),eF=o.n.configure({suggestion:{items:()=>
1eJ,render:o.o}});var eG=n(98863),eV=n(28060),eq=n(58084),eW=n(23941);let eQ=[eG.ZP.configure({HTMLAttributes:{class:"border-collapse"},resizable:!0}),eV.Z.configure({HTMLAttributes:{class:"border border-gray-300 p-2"}}),eq.Z.configure({HTMLAttributes:{class:"border border-gray-300 bg-gray-100 font-bold p-2"}}),eW.Z],eX=n(53691),eK=[...I,eF,...eQ];var e$=e=>{let{markdownText:t,onContentChange:n,additionalContext:c}=e,[d,u]=(0,s.eJ)(()=>t||null),[m,p]=(0,s.eJ)("Saved"),[x,h]=(0,s.eJ)(),[g,f]=(0,s.eJ)(!1),[b,y]=(0,s.eJ)(!1),[j,N]=(0,s.eJ)(!1),[w,C]=(0,s.eJ)(!1),[k,A]=(0,s.eJ)(!1),L=e=>{let t=new DOMParser().parseFromString(e,"text/html");return t.querySelectorAll("pre code").forEach(e=>{eX.highlightElement(e)}),new XMLSerializer().serializeToString(t)},T=(0,i.y1)(async e=>{let t=e.getJSON();h(e.storage.characterCount.words()),window.localStorage.setItem("html-content",L(e.getHTML())),window.localStorage.setItem("novel-content",JSON.stringify(t)),window.localStorage.setItem("markdown",e.storage.markdown.getMarkdown()),p("Saved"),null==n||n(e.storage.markdown.getMarkdown())},500);return((0,s.d4)(()=>{let e=window.localStorage.getItem("novel-content");e&&e.length&&!(null==d?void 0:d.length)?u(JSON.parse(e)):u(a)},[]),d)?(0,r.jsxs)("div",{className:"relative w-full max-w-screen-lg",children:[(0,r.jsxs)("div",{className:"flex absolute right-5 top-5 z-10 mb-5 gap-2",children:[(0,r.jsx)("div",{className:"rounded-lg bg-accent px-2 py-1 text-sm text-muted-foreground",children:m}),(0,r.jsxs)("div",{className:x?"rounded-lg bg-accent px-2 py-1 text-sm text-muted-foreground":"hidden",children:[x," Words"]})]}),(0,r.jsx)(l.fm,{children:(0,r.jsxs)(l.kg,{initialContent:d,extensions:eK,immediatelyRender:!1,className:"relative min-h-[500px] w-full max-w-screen-lg bg-background sm:mb-8 sm:rounded-lg sm:border sm:shadow-lg border-1 border-gray-200 p-4",editorProps:{handleDOMEvents:{keydown:(e,t)=>(0,o.q)(t)},handlePaste:(e,t)=>
1(0,v.jV)(e,t,eP),handleDrop:(e,t,n,r)=>(0,v.uG)(e,t,r,eP),attributes:{class:"prose prose-sm dark:prose-invert prose-headings:font-title font-default focus:outline-none max-w-full"}},onUpdate:e=>{let{editor:t}=e;T(t),p("Unsaved")},slotAfter:(0,r.jsx)(o.a,{}),children:[(0,r.jsxs)(o.l,{className:"z-50 h-auto max-h-[330px] overflow-y-auto rounded-md border border-muted bg-background px-1 py-2 shadow-md transition-all",children:[(0,r.jsx)(l.tv,{className:"px-2 text-muted-foreground",children:"No results"}),(0,r.jsx)(o.m,{children:eJ.map(e=>(0,r.jsxs)(l.te,{value:e.title,onCommand:t=>{var n,r;return null!==(r=null===(n=e.command)||void 0===n?void 0:n.call(e,t))&&void 0!==r?r:()=>{}},className:"flex w-full items-center space-x-2 rounded-md px-2 py-1 text-left text-sm hover:bg-accent aria-selected:bg-accent",children:[(0,r.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-md border border-muted bg-background",children:e.icon}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"font-medium",children:e.title}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:e.description})]})]},e.title))})]}),(0,r.jsxs)(eE,{open:w,onOpenChange:C,additionalContext:c,children:[(0,r.jsx)(ea.Z,{orientation:"vertical"}),(0,r.jsx)(et,{open:g,onOpenChange:f}),(0,r.jsx)(ea.Z,{orientation:"vertical"}),(0,r.jsx)(F,{open:j,onOpenChange:N}),(0,r.jsx)(ea.Z,{orientation:"vertical"}),(0,r.jsx)(e_,{}),(0,r.jsx)(ea.Z,{orientation:"vertical"}),(0,r.jsx)(Y,{open:b,onOpenChange:y}),(0,r.jsx)(ea.Z,{orientation:"vertical"}),(0,r.jsx)(er,{open:k,onOpenChange:A})]})]})})]}):null}},19573:function(e,t,n){n.d(t,{Popover:function(){return s},PopoverContent:function(){return c},PopoverTrigger:function(){return i}});var r=n(57437),a=n(2265),l=n(97041),o=n(37440);let s=l.fC,i=l.xz;l.ee;let c=a.forwardRef((e,t)=>{let{className:n,align:a="center",sideOffset:s=4,...i}=e;return(0,r.jsx)(l.h_,{children:(0,r.jsx)(l.VY,{ref:t,align:a,sideOffset:s,className:(0,o.cn)("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n),...i})})});c.displayName=l.VY.displayName},81260:function(e,t,n){n.d(t,{Gp:function(){return r.forwardRef},d4:function(){return r.useEffect},kr:function(){return r.createContext}});var r=n(2265)},43822:function(e,t,n){n.d(t,{Gp:function(){return r.forwardRef}});var r=n(2265)},91718:function(e,t,n){n.d(t,{Gp:function(){return r.forwardRef},Ye:function(){return r.useMemo},d4:function(){return r.useEffect},mT:function(){return r.useRef}});var r=n(2265)},94606:function(e,t,n){n.d(t,{Gp:function(){return r.forwardRef},Ye:function(){return r.useMemo},mT:function(){return r.useRef}});var r=n(2265)},50851:function(e,t,n){n.d(t,{d4:function(){return r.useEffect},mT:function(){return r.useRef}});var r=n(2265)},46202:function(e,t,n){n.d(t,{d4:function(){return r.useEffect},eJ:function(){return r.useState}});var r=n(2265)}}]);
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.