PageSourceSearch

https://www.heysaya.ai/_next/static/chunks/pages/pages/prompt/[promptId]-81c52bc0a6d89da5.js

js heysaya.ai collected 2026-09-24 13:38:03 UTC 23,147 bytes, 1 lines download raw bytes

1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="664f0dee-4714-4c17-98f0-f384afc08f5a",e._sentryDebugIdIdentifier="sentry-dbid-664f0dee-4714-4c17-98f0-f384afc08f5a")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2003],{1547:(e,t,a)=>{"use strict";a.d(t,{$8:()=>l,En:()=>o,JA:()=>d,KP:()=>r,TX:()=>n,V9:()=>i,zu:()=>c});var s=a(7675);let n=async e=>(await s.Ay.post("/pages/storm",e)).data,r=async e=>(await s.Ay.post("/pages",e)).data,o=async e=>(await s.Ay.get(`/pages/${e}`)).data,l=async({pageId:e,body:t})=>(await s.Ay.post(`/pages/${e}`,t)).data,d=async e=>await s.Ay.delete(`/pages/${e}`),i=async e=>(await s.Ay.post("/pages/autocomplete",e)).data,c=async e=>(await s.Ay.post("/pages/search/semschol",e)).data},6127:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});let s=(0,a(78807).A)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},23649:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});let s=(0,a(78807).A)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},30862:(e,t,a)=>{"use strict";a.d(t,{c:()=>r});var s=a(37876),n=a(49995);function r({soft:e=!1,className:t,...a}){return(0,s.jsx)("hr",{role:"presentation",...a,className:(0,n.A)(t,"w-full border-t",e&&"border-zinc-950/5 dark:border-white/5",!e&&"border-zinc-950/10 dark:border-white/10"),"data-sentry-component":"Divider","data-sentry-source-file":"divider.tsx"})}},41613:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/pages/prompt/[promptId]",function(){return a(79545)}])},61379:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});let s=(0,a(78807).A)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]])},64056:(e,t,a)=>{"use strict";a.d(t,{gf:()=>i,ms:()=>d,rI:()=>c,rx:()=>m,tJ:()=>u});var s=a(37876),n=a(44572),r=a(49995),o=a(25879),l=a(89715);function d(e){return(0,s.jsx)(n.W1,{...e,"data-sentry-element":"Headless.Menu","data-sentry-component":"Dropdown","data-sentry-source-file":"dropdown.tsx"})}function i({as:e,...t}){return(0,s.jsx)(n.IU,{as:o.$,...t,"data-sentry-element":"Headless.MenuButton","data-sentry-component":"DropdownButton","data-sentry-source-file":"dropdown.tsx"})}function c({anchor:e="bottom",className:t,...a}){return(0,s.jsx)(n.c,{...a,transition:!0,anchor:e,className:(0,r.A)(t,"[--anchor-gap:theme(spacing.2)] [--anchor-padding:theme(spacing.1)] data-[anchor~=start]:[--anchor-offset:-6px] data-[anchor~=end]:[--anchor-offset:6px] sm:data-[anchor~=start]:[--anchor-offset:-4px] sm:data-[anchor~=end]:[--anchor-offset:4px]","isolate w-max rounded-xl p-1","outline outline-1 outline-transparent focus:outline-none","overflow-y-auto","bg-white/75 backdrop-blur-xl dark:bg-zinc-800/75","shadow-lg ring-1 ring-zinc-950/10 dark:ring-inset dark:ring-white/10","supports-[grid-template-columns:subgrid]:grid supports-[grid-template-columns:subgrid]:grid-cols-[auto_1fr_1.5rem_0.5rem_auto]","transition data-[closed]:data-[leave]:opacity-0 data-[leave]:duration-100 data-[leave]:ease-in"),"data-sentry-element":"Headless.MenuItems","data-sentry-component":"DropdownMenu","data-sentry-source-file":"dropdown.tsx"})}function u({className:e,...t}){let a=(0,r.A)(e,"group cursor-default rounded-lg px-3.5 py-2.5 focus:outline-none sm:px-3 sm:py-1.5","text-left text-base/6 text-zinc-950 sm:text-sm/6 dark:text-white forced-colors:text-[CanvasText]","data-[focus]:bg-blue-500 data-[focus]:text-white","data-[disabled]:opacity-50","forced-color-adjust-none forced-colors:data-[focus]:bg-[Highlight] forced-colors:data-[focus]:text-[HighlightText] forced-colors:[&>[data-slot=icon]]:data-[focus]:text-[HighlightText]","col-span-full grid grid-cols-[auto_1fr_1.5rem_0.5rem_auto] items-center supports-[grid-template-columns:subgrid]:grid-cols-subgrid","[&>[data-slot=icon]]:col-start-1 [&>[data-slot=icon]]:row-start-1 [&>[data-slot=icon]]:-ml-0.5 [&>[data-slot=icon]]:mr-2.5 [&>[data-slot=icon]]:size-5 sm:[&>[data-slot=icon]]:mr-2 [&>[data-slot=icon]]:sm:size-4","[&>[data-slot=icon]]:text-zinc-500 [&>[data-slot=icon]]:data-[focus]:text-white [&>[data-slot=icon]]:dark:text-zinc-400 [&>[data-slot=icon]]:data-[focus]:dark:text-white","[&>[data-slot=avatar]]:-ml-1 [&>[data-slot=avatar]]:mr-2.5 [&>[data-slot=avatar]]:size-6 sm:[&>[data-slot=avatar]]:mr-2 sm:[&>[data-slot=avatar]]:size-5");return(0,s.jsx)(n.Dr,{"data-sentry-element":"Headless.MenuItem","data-sentry-component":"DropdownItem","data-sentry-source-file":"dropdown.tsx",children:"href"in t?(0,s.jsx)(l.N,{...t,className:a}):(0,s.jsx)("button",{type:"button",...t,className:a})})}function m({className:e,...t}){return(0,s.jsx)(n.bX,{...t,className:(0,r.A)(e,"col-span-full mx-3.5 my-1 h-px border-0 bg-zinc-950/5 sm:mx-3 dark:bg-white/10 forced-colors:bg-[CanvasText]"),"data-sentry-element":"Headless.MenuSeparator","data-sentry-component":"DropdownDivider","data-sentry-source-file":"dropdown.tsx"})}},64356:(e,t,a)=>{"use strict";a.d(t,{A:()=>y});var s=a(37876),n=a(14232),r=a(67914),o=a(23649),l=a(14850),d=a(25879),i=a(37451),c=a(64056),u=a(52437),m=a(29048),x=a(93109),p=a(15658);let y=({isOpen:e,onClose:t,selectedSources:a,onConfirm:y})=>{let{data:g}=(0,r.I)({queryFn:l.qu,queryKey:[m.B.allSummaries]}
1),[f,h]=(0,n.useState)(""),[w,j]=(0,n.useState)([]);(0,n.useEffect)(()=>{j(a)},[a]);let b=g?.map(e=>({id:e.id,title:e.title,concise_summary:e.concise_summary,type:e.type})).filter(e=>e.title.toLowerCase().includes(f.toLowerCase()));return(0,s.jsxs)(i.lG,{open:e,onClose:t,"data-sentry-element":"Dialog","data-sentry-component":"SourceDialog","data-sentry-source-file":"AddSourcesDialog.tsx",children:[(0,s.jsx)(i.L3,{"data-sentry-element":"DialogTitle","data-sentry-source-file":"AddSourcesDialog.tsx",children:"Select Sources"}),(0,s.jsx)(i.rr,{"data-sentry-element":"DialogDescription","data-sentry-source-file":"AddSourcesDialog.tsx",children:"Select your sources to use as references for article generation."}),(0,s.jsxs)(i.R4,{"data-sentry-element":"DialogBody","data-sentry-source-file":"AddSourcesDialog.tsx",children:[(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsxs)(c.ms,{"data-sentry-element":"Dropdown","data-sentry-source-file":"AddSourcesDialog.tsx",children:[(0,s.jsxs)(c.gf,{outline:!0,className:"w-full","data-sentry-element":"DropdownButton","data-sentry-source-file":"AddSourcesDialog.tsx",children:["Select Sources",(0,s.jsx)(o.A,{"data-sentry-element":"ChevronDownIcon","data-sentry-source-file":"AddSourcesDialog.tsx"})]}),(0,s.jsxs)(c.rI,{"data-sentry-element":"DropdownMenu","data-sentry-source-file":"AddSourcesDialog.tsx",children:[(0,s.jsx)("div",{className:"p-2 mb-2",children:(0,s.jsx)(u.p,{type:"text",placeholder:"Search sources...",value:f,onChange:e=>h(e.target.value),className:"w-full","data-sentry-element":"Input","data-sentry-source-file":"AddSourcesDialog.tsx"})}),b?.map(e=>(0,s.jsx)(c.tJ,{onClick:()=>{!w.some(t=>t.id===e.id)&&j(t=>[...t,e])},className:"w-full line-clamp-1",children:e.title},e.id))]})]})}),w.length>0&&(0,s.jsxs)("div",{className:"mt-4 flex flex-col gap-2",children:[(0,s.jsx)(p.EY,{children:"Selected Sources"}),(0,s.jsx)(x.A,{selectedSources:w,setSelectedSources:j})]})]}),(0,s.jsxs)(i.ii,{"data-sentry-element":"DialogActions","data-sentry-source-file":"AddSourcesDialog.tsx",children:[(0,s.jsx)(d.$,{plain:!0,onClick:t,"data-sentry-element":"Button","data-sentry-source-file":"AddSourcesDialog.tsx",children:"Cancel"}),(0,s.jsx)(d.$,{onClick:()=>y(w),"data-sentry-element":"Button","data-sentry-source-file":"AddSourcesDialog.tsx",children:"Confirm"})]})]})}},67409:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});let s=(0,a(78807).A)("sparkle",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}]])},70291:(e,t,a)=>{"use strict";a.d(t,{D:()=>r,R:()=>o});var s=a(37876),n=a(49995);function r({className:e,level:t=1,...a}){let o=`h${t}`;return(0,s.jsx)(o,{...a,className:(0,n.A)("text-2xl/8 font-semibold text-zinc-950 sm:text-xl/8 dark:text-white",e),"data-sentry-element":"Element","data-sentry-component":"Heading","data-sentry-source-file":"heading.tsx"})}function o({className:e,level:t=2,...a}){let r=`h${t}`;return(0,s.jsx)(r,{...a,className:(0,n.A)("text-base/7 font-semibold text-zinc-950 sm:text-sm/6 dark:text-white",e),"data-sentry-element":"Element","data-sentry-component":"Subheading","data-sentry-source-file":"heading.tsx"})}},71028:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});let s=(0,a(78807).A)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},72411:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});let s=(0,a(78807).A)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},79545:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>R});var s=a(37876),n=a(14232),r=a(44572);let o=n.forwardRef(function({title:e,titleId:t,...a},s){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},a),e?n.createElement("title",{id:t},e):null,n.createElement("path",{fillRule:"evenodd",d:"M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",clipRule:"evenodd"}))}),l=n.forwardRef(function({title:e,titleId:t,...a},s){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"
1currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},a),e?n.createElement("title",{id:t},e):null,n.createElement("path",{fillRule:"evenodd",d:"M12.53 16.28a.75.75 0 0 1-1.06 0l-7.5-7.5a.75.75 0 0 1 1.06-1.06L12 14.69l6.97-6.97a.75.75 0 1 1 1.06 1.06l-7.5 7.5Z",clipRule:"evenodd"}))});var d=a(62478),i=a(67914),c=a(24076);a(98921);var u=a(72411),m=a(67409),x=a(45425),p=a(71028),y=a(6127),g=a(61379),f=a(77328),h=a.n(f),w=a(48230),j=a.n(w),b=a(89099),k=a(1547),v=a(93516),S=a(14850),N=a(96568),D=a(25879),A=a(30862),C=a(70291),_=a(15658),I=a(29318),L=a(64356),z=a(64056),M=a(44406);function $({selectedLanguage:e,onSelectLanguage:t}){return(0,s.jsxs)(z.ms,{"data-sentry-element":"Dropdown","data-sentry-component":"LanguageDropdown","data-sentry-source-file":"LanguageDropdown.tsx",children:[(0,s.jsx)(z.gf,{className:"w-full cursor-pointer",outline:!0,"data-sentry-element":"DropdownButton","data-sentry-source-file":"LanguageDropdown.tsx",children:function(e){switch(e){case M.cU:return"\uD83C\uDDFA\uD83C\uDDF8 English";case M.XJ:return"\uD83C\uDDEA\uD83C\uDDF8 Spanish";case M.LP:return"\uD83C\uDDEB\uD83C\uDDF7 French";case M.zB:return"\uD83C\uDDFA\uD83C\uDDE6 Ukrainian";case M.dB:return"\uD83C\uDDE8\uD83C\uDDF3 Chinese";case M.W2:return"\uD83C\uDDEF\uD83C\uDDF5 Japanese";default:return e.toUpperCase()}}(e)}),(0,s.jsxs)(z.rI,{"data-sentry-element":"DropdownMenu","data-sentry-source-file":"LanguageDropdown.tsx",children:[(0,s.jsx)(z.tJ,{onClick:()=>t(M.cU),"data-sentry-element":"DropdownItem","data-sentry-source-file":"LanguageDropdown.tsx",children:"\uD83C\uDDFA\uD83C\uDDF8 English"}),(0,s.jsx)(z.tJ,{onClick:()=>t(M.XJ),"data-sentry-element":"DropdownItem","data-sentry-source-file":"LanguageDropdown.tsx",children:"\uD83C\uDDEA\uD83C\uDDF8 Spanish"}),(0,s.jsx)(z.tJ,{onClick:()=>t(M.LP),"data-sentry-element":"DropdownItem","data-sentry-source-file":"LanguageDropdown.tsx",children:"\uD83C\uDDEB\uD83C\uDDF7 French"}),(0,s.jsx)(z.tJ,{onClick:()=>t(M.zB),"data-sentry-element":"DropdownItem","data-sentry-source-file":"LanguageDropdown.tsx",children:"\uD83C\uDDFA\uD83C\uDDE6 Ukrainian"}),(0,s.jsx)(z.tJ,{onClick:()=>t(M.dB),"data-sentry-element":"DropdownItem","data-sentry-source-file":"LanguageDropdown.tsx",children:"\uD83C\uDDE8\uD83C\uDDF3 Chinese"}),(0,s.jsx)(z.tJ,{onClick:()=>t(M.W2),"data-sentry-element":"DropdownItem","data-sentry-source-file":"LanguageDropdown.tsx",children:"\uD83C\uDDEF\uD83C\uDDF5 Japanese"})]})]})}var E=a(93109),H=a(63812),B=a(49282);let J=()=>{let e=(0,b.useRouter)(),{promptId:t,doc_id:a}=e.query,[f,w]=(0,n.useState)(null),[I,z]=(0,n.useState)(!1),[J,R]=(0,n.useState)(!1),[T,P]=(0,n.useState)([]),[O,q]=(0,n.use
1State)([]),[U,X]=(0,n.useState)(f?.language||M.cU),[F,K]=(0,n.useState)(!1),[W,G]=(0,n.useState)({input:"",doc_ids:[],previous_generations:[],language:U}),[V,Y]=(0,n.useState)(null),Z=(0,n.useRef)(null),[Q,ee]=(0,n.useState)(!1),[et,ea]=(0,n.useState)(""),[es,en]=(0,n.useState)(!1),er=(0,d.n)({mutationFn:e=>(0,v.XH)(e.promptId,!1),onError:e=>{console.log(e)}}),{data:eo}=(0,i.I)({queryFn:S.qu,queryKey:["allSummaries"]}),el=e=>({id:e.id,title:e.title,concise_summary:e.concise_summary,type:e.type});(0,n.useEffect)(()=>{t&&er.mutateAsync({promptId:t},{onSuccess:e=>{w(e),X(e.language)}})},[t]),(0,n.useEffect)(()=>{if(a&&eo){let e=eo.map(el).find(e=>e.id===a);e&&!O.some(t=>t.id===e.id)&&(q(t=>[...t,e]),G(t=>({...t,doc_ids:[...t.doc_ids,e.id]})))}},[a,eo]),(0,n.useEffect)(()=>{Z.current&&(Z.current.scrollTop=Z.current.scrollHeight)},[V]);let ed=async()=>{K(!0),G({...W,input:"",language:U});let e=B.oO.currentUser,a=await e.getIdToken(),s=new WebSocket(`wss://summarizely-api-prod-elzey36a7a-uc.a.run.app/api/prompt/ws/${t}/generate?v=1.0&token=${a}`);s.onopen=()=>{console.log("Socket opened!"),s.send(JSON.stringify(W))},s.onmessage=e=>{Y(JSON.parse(e.data))},s.onclose=()=>{K(!1),console.log("Socket closed!")}},ei=async()=>{if(V?.content)try{let t=await (0,k.KP)({topic:f?.title??"Content Creation",initial_content_markdown:V.content,docIds:O.map(e=>e.id)});e.push(`/pages/${t.id}`)}catch(e){console.error("Error creating new page:",e)}},ec=e=>{K(!0),B.oO.currentUser.getIdToken().then(a=>{let s=new WebSocket(`wss://summarizely-api-prod-elzey36a7a-uc.a.run.app/api/prompt/ws/${t}/generate?v=1.0&token=${a}`);s.onopen=()=>{console.log("Socket opened!");let t={...W,previous_generations:[{content:V.content,user_feedback:e}]};s.send(JSON.stringify(t))},s.onmessage=e=>{Y(JSON.parse(e.data))},s.onclose=()=>{K(!1),console.log("Socket closed!")}})},eu=(0,n.useRef)(null),em=()=>{if(eu.current){let e=eu.current.getBoundingClientRect();e.bottom>window.innerHeight?eu.current.style.top=`-${e.height}px`:eu.current.style.top="auto"}en(!es)};return(0,s.jsxs)("section",{className:"w-full max-w-[1380px] px-5 md:pr-8 2048:max-w-none 2048:px-10","data-sentry-component":"PromptPage","data-sentry-source-file":"index.tsx",children:[(0,s.jsx)(h(),{"data-sentry-element":"Head","data-sentry-source-file":"index.tsx",children:(0,s.jsx)("title",{children:"Content Creation - Prompt Page | Saya"})}),(0,s.jsxs)(j(),{href:"/pages/new",className:"inline-flex items-center gap-2 text-sm/6 text-zinc-500 dark:text-zinc-400","data-sentry-element":"Link","data-sentry-source-file":"index.tsx",children:[(0,s.jsx)(o,{className:"size-4 fill-zinc-400 dark:fill-zinc-500","data-sentry-element":"ChevronLeftIcon","data-sentry-source-file":"index.tsx"}),"Create Page"]}),(0,s.jsx)("div",{className:"h-4"}),(0,s.jsx)(C.D,{"data-sentry-element":"Heading","data-sentry-source-file":"index.tsx",children:"Content Creation"}),(0,s.jsx)(A.c,{className:"my-4","data-sentry-element":"Divider","data-sentry-source-file":"index.tsx"}),(0,s.jsxs)("div",{className:"flex gap-4 mb-4",children:[(0,s.jsx)(C.R,{"data-sentry-element":"Subheading","data-sentry-source-file":"index.tsx",children:"Selected prompt:"}),(0,s.jsx)(N.E,{color:"indigo","data-sentry-element":"Badge","data-sentry-source-file":"index.tsx",children:(0,s.jsx)("span",{className:"text-md font-semibold",children:f?.title})})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-3",children:[(0,s.jsxs)("div",{className:"col-span-1",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)(C.R,{"data-sentry-element":"Subheading","data-sentry-source-file":"index.tsx",children:"Sources"}),(0,s.jsxs)(D.$,{outline:!0,className:"w-full mb-1 flex items-center justify-center gap-2",onClick:()=>z(!0),"data-sentry-element":"Button","data-sentry-source-file":"index.tsx",children:[(0,s.jsx)(u.A,{className:"w-4 h-4","data-sentry-element":"Plus","data-sentry-source-file":"index.tsx"}),"Add Source"]}),(0,s.jsx)(E.A,{selectedSources:O,setSelectedSources:q,"data-sentry-element":"SelectedSourcesList","data-sentry-source-file":"index.tsx"})]}),(0,s.jsxs)("div",{className:"mt-4 flex flex-col gap-2",children:[(0,s.jsx)(C.R,{"data-sentry-element":"Subheading","data-sentry-source-file":"index.tsx",children:"Language"}),(0,s.jsx)("div",{className:"flex items-center justify-end",children:(0,s.jsx)($,{selectedLanguage:U,onSelectLanguage:e=>{X(e),G(t=>({...t,language:e}))},"data-sentry-element":"LanguageDropdown","data-sentry-source-file":"index.tsx"})})]}),(0,s.jsx)("div",{className:"mt-4",children:(0,s.jsxs)(D.$,{color:"indigo",className:"w-full flex items-center justify-center gap-2",disabled:0===O.length||F,onClick:ed,"data-sentry-element":"Button","data-sentry-source-file":"index.tsx",children:[(0,s.jsx)(m.A,{className:"w-4 h-4","data-sentry-element":"Sparkle","data-sentry-source-file":"index.tsx"}),"Generate Content"]})})]}),(0,s.jsxs)("div",{className:"h-full col-span-1 p-4 rounded-lg border border-stone-200 md:col-span-2",children:[(0,s.jsx)(_.OH,{className:"my-2 leading-normal font-semibold","data-sentry-element":"Strong","data-sentry-source-file":"index.tsx",children:f?.prompt}),V?(0,s.jsxs)("div",{children:[F&&(0,s.jsx)("div",{className:"flex items-center justify-center mt-4",children:(0,s.jsx)(x.A,{className:"w-6 h-6 animate-spin text-indigo-500"})}),(0,s.jsx)(A.c,{className:"my-4"}),(0,s.jsxs)("div",{ref:Z,className:"",children:[(0,s.jsx)(H.A,{children:V.content}),!F&&(0,s.jsxs)("div",{className:"relative flex justify-end gap-2 mt-4",children:[(0,s.jsx)(c.Ay,{content:"Text copied!",visible:Q,placement:"top",children:(0,s.jsxs)(D.$,{color:"white",onClick:()=>{V?.content&&navigator.clipboard.writeText(V.content).then(()=>{console.log("Content copied to clipboard"),ee(!0),setTimeout(()=>ee(!1),2e3)},e=>{console.error("Failed to copy content: ",e)})},children:[(0,s.jsx)(p.A,{className:"mr-2 w-4 h-4"})," Copy content"]})}),(0,s.jsx)(r.W1,{as:"div",className:"relative inline-block text-left",children:({open:e})=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(r.IU,{as:D.$,color:"white",onClick:em,children:[(0,s.jsx)(y.A,{className:"mr-2 w-4 h-4"})," Modify",(0,s.jsx)(l,{className:"w-5 h-5 ml-2 -mr-1","aria-hidden":"true"})]}),e&&(0,s.jsx)("div",{className:"fixed inset-0 z-50","aria-hidden":"true",onClick:()=>en(!1)}),(0,s.jsx)(r.c,{ref:eu,static:!0,className:`absolute right-0 z-50 mt-2 w-56 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none ${es?"":"hidden"}`,children:(0,s.jsxs)("div",{className:"py-1",children:[(0,s.jsx)(r.Dr,{as:"div",children:({active:e})=>(0,s.jsx)("input",{type:"text",className:`${e?"bg-gray-100 text-gray-900":"text-gray-700"} block w-full px-4 py-2 text-sm rounded-md`,placeholder:"Enter a custom modification...",value:et,onChange:e=>ea(e.target.value),onKeyDown:e=>{e.stopPropagation(),"Enter"===e.key&&(ec(et),en(!1))},onClick:e=>e.stopPropagation()})}),(0,s.jsx)(r.Dr,{children:({active:e})=>(0,s.jsx)("button",{className:`${e?"bg-gray-100 text-gray-900":"text-gray-700"} block w-full px-4 py-2 text-left text-sm`,onClick:()=>{ec("Make it longer"),en(!1)},children:"Make it longer"})}),(0,s.jsx)(r.Dr,{children:({active:e})=>(0,s.jsx)("button",{className:`${e?"bg-gray-100 text-gray-900":"text-gray-700"} block w-full px-4 py-2 text-left text-sm`,onClick:()=>{ec("Make it shorter"),en(!1)},children:"Make it shorter"})}),(0,s.jsx)(r.Dr,{children:({active:e})=>(0,s.jsx)("button",{className:`${e?"bg-gray-100 text-gray-900":"text-gray-700"} block w-full px-4 py-2 text-left text-sm`,onClick:()=>{ec("Make it more casual"),en(!1)},children:"Make it more casual"})}),(0,s.jsx)(r.Dr,{children:({active:e})=>(0,s.jsx)("button",{className:`${e?"bg-gray-100 text-gray-900":"text-gray-700"} block w-full px-4 py-2 text-left text-sm`,onClick:()=>{ec("Make it more serious"),en(!1)},children:"Make it more serious"})})]})})]})}),(0,s.jsxs)(D.$,{onClick:ei,children:[(0,s.jsx)(g.A,{className:"mr-2 w-4 h-4"})," Save as Page"]})]})]})]}):(0,s.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,s.jsx)(_.EY,{className:"my-6 italic",children:"Generated text will show here..."})})]})]}),(0,s.jsx)(L.A,{isOpen:I,onClose:()=>z(!1),selectedSources:O,onConfirm:e=>{q(e),G({...W,doc_ids:e.map(e=>e.id)}),z(!1)},"data-sentry-element":"SourceDialog","data-sentry-source-file":"index.tsx"})]})};J.getLayout=function(e){return(0,s.jsx)(I.A,{children:(0,s.jsx)("div",{className:"py-6 mx-auto mt-6 overflow-y-auto sidebar-scroll",children:e})})};let R=J},93109:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var s=a(37876),n=a(98107),r=a(54587),o=a.n(r),l=a(82381);let d=({source:e,onRemove:t})=>(0,s.jsxs)("div",{className:"flex justify-between items-center p-4 rounded-lg border border-stone-200","data-sentry-component":"SourceItem","data-sentry-source-file":"SelectedSourcesList.tsx",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 w-full",children:[(0,s.jsx)(o(),{src:(0,l.D)(e.type),alt:"document icon",width:24,height:24,className:"2048:w-12 2048:h-12 mr-2 h-6 w-6 flex-shrink-0","data-sentry-element":"Image","data-sentry-source-file":"SelectedSourcesList.tsx"}),(0,s.jsx)("span",{className:"text-sm font-medium line-clamp-1",children:e.title})]}),(0,s.jsx)(n.A,{className:"w-4 h-4 text-stone-500 cursor-pointer",onClick:()=>t(e),"data-sentry-element":"X","data-sentry-source-file":"SelectedSourcesList.tsx"})]}),i=({selectedSources:e,setSelectedSources:t})=>{let a=a=>{t(e.filter(e=>e.id!==a.id))};return(0,s.jsx)("div",{className:"flex flex-col gap-2","data-sentry-component":"SelectedSourcesList","data-sentry-source-file":"SelectedSourcesList.tsx",children:e.map(e=>(0,s.jsx)(d,{source:e,onRemove:a},e.id))})}},93516:(e,t,a)=>{"use strict";a.d(t,{HK:()=>o,Ir:()=>l,XH:()=>r,oO:()=>n,vq:()=>d});var s=a(7675);let n=async e=>(await s.Ay.get(`/prompts?is_hosted=${e}`)).data,r=async(e,t)=>(await s.Ay.get(`/prompt/${e}?is_hosted=${t}`)).data,o=async e=>(await s.Ay.post("/prompt",e)).data,l=async e=>await s.Ay.delete(`/prompt/${e}`),d=async()=>(await s.Ay.get("/prompts/all")).data},98107:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});let s=(0,a(78807).A)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
1],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},98921:()=>{}},e=>{e.O(0,[3716,6701,2333,1596,4587,3737,4407,5235,7014,1843,7914,4488,6540,5132,1357,1513,9744,467,8279,2244,7366,4145,9318,3812,636,6593,8792],()=>e(e.s=41613)),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.