PageSourceSearch

https://aviewint.com/_next/static/chunks/pages/dashboard/chat-assist-c23212bc8c904f45.js

js aviewint.com collected 2026-10-04 05:21:39 UTC 13,858 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="646c036e-49a7-4025-a470-5a9a1f3d7d93",e._sentryDebugIdIdentifier="sentry-dbid-646c036e-49a7-4025-a470-5a9a1f3d7d93")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5723],{9607:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard/chat-assist",function(){return s(988)}])},3439:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a={src:"/_next/static/media/edit.eb044524.svg",height:800,width:800,blurWidth:0,blurHeight:0}},3088:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a={src:"/_next/static/media/green-check-circle.a343a6ff.svg",height:35,width:35,blurWidth:0,blurHeight:0}},8544:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a={src:"/_next/static/media/incorrect.c8a74f53.svg",height:35,width:35,blurWidth:0,blurHeight:0}},6315:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a={src:"/_next/static/media/send-message.e1918095.svg",height:25,width:24,blurWidth:0,blurHeight:0}},5851:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a={src:"/_next/static/media/trash.5f398c8b.svg",height:25,width:24,blurWidth:0,blurHeight:0}},3128:(e,t,s)=>{"use strict";s.d(t,{A:()=>d});var a=s(4848),l=s(9965),r=s.n(l),i=s(3088),n=s(8544),c=s(1490);let d=e=>{let{isValid:t,_id:s,label:l,onChange:d,placeholder:o,value:h,name:u,hasSubmitted:x,bgColor:m,textBlack:f,extraClasses:b="mb-s5",type:p,labelClasses:g,hideCheckmark:w,isImportant:j,placeholderTextSize:v}=e;return(0,a.jsxs)("div",{className:"relative h-full w-full  ".concat(v||"text-xl"," text-white ").concat(b),children:[l&&(0,a.jsx)("label",{htmlFor:s,className:"block w-full ".concat(g),children:(0,a.jsx)("span",{className:"".concat(j&&"after:ml-0.5 after:content-['*']"),children:l})}),(0,a.jsxs)("div",{className:"h-full",children:[(0,a.jsxs)(c.A,{classes:"w-full h-full relative flex justify-center items-center",borderRadius:"7px",children:[(0,a.jsx)("input",{id:s,name:u,type:p||"text",placeholder:o,className:"peer h-[99%] w-full rounded-[5px] bg-black px-s1 py-2 focus:outline-none ".concat(f?"text-black":"text-white"," $").concat(m||"bg-black"),onChange:d,value:h}),(0,a.jsx)("div",{className:"gradient-1 transition-300 absolute inset-0 -z-10 h-full w-[calc(100%+3px)] rounded-2xl opacity-0 blur-lg peer-focus:opacity-80"})]}),!w&&(0,a.jsxs)("span",{className:"absolute right-2 bottom-2",children:[t&&(0,a.jsx)(r(),{src:i.A,alt:"Correct",width:30,height:30}),x&&!t&&(0,a.jsx)(r(),{src:n.A,alt:"Incorrect",width:30,height:30})]})]})]})}},7493:(e,t,s)=>{"use strict";s.d(t,{A:()=>i});var a=s(4848),l=s(7691),r=s(5284);let i=e=>{let{children:t,isLoading:s,onClick:i,disabled:n,theme:c,extraClasses:d="px-s2",pb:o="pb-s1",pt:h="pt-s1.5"}=e;return n?(0,a.jsx)("button",{className:"transition-300 w-full cursor-not-allowed rounded-full bg-gray-1 text-lg font-medium text-black ".concat(d," ").concat(o," ").concat(h),onClick:null,disabled:!0,children:t}):"error"===c?(0,a.jsx)("button",{className:"w-full rounded-full bg-red p-3",onClick:s?()=>null:i,children:s?(0,a.jsx)(l.A,{}):t}):(0,a.jsx)(r.A,{classes:"w-full",children:(0,a.jsx)("div",{className:"".concat("white"!==c&&"gradient-1"," inline-block w-full rounded-full p-[3px]"),children:(0,a.jsx)("button",{id:"opener",className:"transition-300 w-full cursor-pointer rounded-full  text-lg font-medium ".concat(d," ").concat("light"===c&&"text-black"," ").concat("dark"===c?"bg-black text-white":""," ").concat("white"===c?"border-[3px] border-solid border-white bg-black text-white hover:bg-white hover:text-black":""," ").concat(o," ").concat(h),onClick:s?()=>null:i,children:s?(0,a.jsx)(l.A,{}):t})})})}},7062:(e,t,s)=>{"use strict";s.d(t,{A:()=>i});var a=s(4848),l=s(3368),r=s.n(l);let i=e=>{let{title:t}=e;return(0,a.jsxs)(r(),{children:[(0,a.jsx)("title",{children:"".concat(t?t+" - ":"","Aview International")}),(0,a.jsx)("link",{rel:"apple-touch-icon",sizes:"180x180",href:"/img/favicon/apple-touch-icon.png"}),(0,a.jsx)("link",{rel:"icon",type:"image/png",sizes:"32x32",href:"/img/favicon/favicon-32x32.png"}),(0,a.jsx)("link",{rel:"icon",type:"image/png",sizes:"16x16",href:"/img/favicon/favicon-16x16.png"})]})}},4471:(e,t,s)=>{"use strict";s.d(t,{A:()=>d});var a=s(4848),l=s(9965),r=s.n(l),i=s(8621),n=s(1702),c=s(6540);let d=e=>{let{children:t,closeModal:s,preventOutsideClick:l}=e;return(0,c.useEffect)(()=>{let e=e=>"Escape"===e.key&&s();return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[]),(0,a.jsx)("div",{className:"fixed top-0 left-0 z-10 flex h-screen items-center justify-center bg-black/80 sm:w-screen",children:(0,a.jsx)(n.default,{onOutsideClick:l?()=>
1null:s,children:(0,a.jsxs)("div",{className:"gradient-dark mx-auto h-full w-full rounded-xl bg-black px-s3 py-s2",children:[(0,a.jsx)("div",{className:"mb-s2 text-right",children:(0,a.jsx)("button",{onClick:s,className:"ml-auto flex items-center rounded-full p-2 hover:bg-white-transparent",children:(0,a.jsx)(r(),{src:i.A,alt:"close",width:18,height:18})})}),t]})})})}},4340:(e,t,s)=>{"use strict";s.d(t,{A:()=>i});var a=s(8236),l=s(9496),r=s(6540);let i=e=>{let t=(0,a.wA)();(0,r.useEffect)(()=>{t((0,l.af)(JSON.parse(e)))},[])}},988:(e,t,s)=>{"use strict";s.r(t),s.d(t,{__N_SSG:()=>M,default:()=>z});var a=s(4848),l=s(5458),r=s(6540),i=s(7062),n=s(9965),c=s.n(n),d=s(3439),o=s(5851),h=s(6715),u=s(4471),x=s(7493),m=s(6856),f=s(7574),b=s(7800),p=s(8236);let g=()=>{let{asPath:e,push:t,pathname:s}=(0,h.useRouter)(),{allAIThreads:l}=(0,p.d4)(e=>e.messages),{sidebarTrigger:i}=(0,b.A)(),[n,g]=(0,r.useState)(!1),[w,j]=(0,r.useState)({threadId:"",title:""}),v=()=>j({threadId:"",title:""}),y=async()=>{g(!0);try{await (0,f.KX)(w.threadId),g(!1),j({threadId:"",title:""}),t("/dashboard/chat-assist"),i()}catch(e){g(!1),(0,m.A)(e)}},N=e=>t({pathname:s,query:e?{thread:e}:{}},void 0,{shallow:!0});return(0,a.jsxs)(a.Fragment,{children:[w.title&&(0,a.jsx)(u.A,{closeModal:v,children:(0,a.jsxs)("div",{className:"min-w-[10rem]",children:[(0,a.jsx)("h3",{className:"text-sm mb-s2 sm:text-xl",children:"Delete chat?"}),(0,a.jsx)("hr",{}),(0,a.jsxs)("p",{className:"my-s3",children:["This will delete ",(0,a.jsx)("span",{className:"text-xs sm:text-lg font-bold break-words",children:w.title})]}),(0,a.jsxs)("div",{className:"mt-s4 flex justify-center gap-s3",children:[(0,a.jsx)(x.A,{theme:"dark",onClick:v,children:"Cancel"}),(0,a.jsx)(x.A,{theme:"error",onClick:y,isLoading:n,children:"Delete"})]})]})}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("button",{onClick:()=>N(null),className:"flex w-full flex-row items-center justify-between rounded-tl-xl p-4 font-medium hover:bg-white-transparent\n      ".concat("/dashboard/chat-assist"===e?"bg-white-transparent":""),children:[(0,a.jsx)("span",{className:"text-sm",children:"New chat"}),(0,a.jsx)(c(),{src:d.A,alt:"edit-logo",width:16,height:16})]}),[...l].sort((e,t)=>new Date(t.updatedAt)-new Date(e.updatedAt)).map((t,s)=>(0,a.jsxs)("div",{className:"group relative hover:bg-white-transparent",children:[(0,a.jsx)("button",{onClick:()=>N(t.threadId),className:"mt-2 text-left block w-full ".concat(e==="/dashboard/chat-assist?thread=".concat(t.threadId)?"bg-white-transparent":""," p-3 font-medium"),children:t.title}),(0,a.jsx)("button",{className:"absolute right-0 top-1/2 z-10 hidden -translate-y-1/2 items-center justify-center rounded-full p-2 hover:bg-white-transparent group-hover:flex",onClick:()=>j({threadId:t.threadId,title:t.title}),children:(0,a.jsx)(c(),{src:o.A,width:15,height:15,alt:""})})]},s))]})]})};var w=s(8621);function j(e){let{open:t,setIsOpen:s}=e,{asPath:l}=(0,h.useRouter)();return(0,r.useEffect)(()=>{t&&s(!1)},[l]),(0,a.jsx)("div",{className:"fixed inset-0 z-40 ".concat(t?"":"hidden"),onClick:()=>{s(!1)},"data-sentry-component":"MobileMenu","data-sentry-source-file":"ChatMobileMenu.jsx",children:(0,a.jsxs)("div",{className:"h-screen-trick transition-300 absolute left-0 top-0 z-50 flex w-5/6 \n                        flex-col gap-12 overflow-hidden bg-black pb-10 pt-8 2xs:px-2 md:px-6 lg:hidden ".concat(t?"translate-x-0 opacity-100":"-translate-x-full opacity-0"),onClick:e=>{e.stopPropagation()},children:[(0,a.jsx)("div",{className:"mr-5 h-7 w-7 pl-2",children:(0,a.jsx)(c(),{src:w.A,width:28,height:28,alt:"close icon",onClick:()=>{s(!t)},"data-sentry-element":"Image","data-sentry-source-file":"ChatMobileMenu.jsx"})}),(0,a.jsx)("div",{className:"pl-4 mt-2",children:(0,a.jsx)(g,{"data-sentry-element":"ChatSidebar","data-sentry-source-file":"ChatMobileMenu.jsx"})})]})})}var v=s(738);let y=[{optionTitle:"Title",sectionText:"for a video about dogs",query:"Generate a title for a video about dogs"},{optionTitle:"Hashtag",sectionText:"for a vlog about a day in life",query:"Generate a hashtag for a vlog about a day in life"},{optionTitle:"Video Script",sectionText:"for a video about tech new in japanese",query:"Generate a video script for a video about tech new in japanese"},{optionTitle:"Video Script",sectionText:"for a video about tech new in japanese",query:"Generate a video script for a video about tech new in japanese"}],N=e=>{let{content:t,role:s,picture:l}=e;return(0,a.jsxs)("div",{className:"mb-12 flex w-full items-start ".concat("assistant"===s?"flex-row text-start":"flex-row-reverse text-right"),children:[(0,a.jsx)("div",{className:"flex-none",children:(0,a.jsx)(c(),{src:"assistant"===s?v.A:l,alt:"picture",width:32,height:32,className:"rounded-full"})}),(0,a.jsxs)("div",{className:"grow pl-5",children:[(0,a.jsx)("p",{className:"mr-s2 font-semibold",children:"assistant"===s?"Aview":"You"}),t.map((e,t)=>{let{text:s}=e;return(0,a.jsx)("p",{className:"mt-1.5",children:s.value},t)})]})]})},k=e=>{let{handleSubmit:t}=e;return(0,a.jsx)("div",{className:"mx-auto grid w-10/12 grid-cols-1 lg:grid-cols-2 gap-4 md:px-s7",children:y.map((e,s)=>(0,a.jsxs)("button",{onClick:()=>t(null,e.query),className:"".concat(s>=y.length/2?"hidden md:block":""," \n          w-full rounded-lg border border-white/40 p-2 text-start hover:bg-white-transparent"),children:[(0,a.jsxs)("p",{className:"font-semibold text-white/90 text-center text-xs sm:text-lg lg:text-left",children:["Generate a ",e.optionTitle]}),(0,a.jsx)("p",{className:"text-sm text-white/50 text-center text-xs sm:text-md md:text-lg lg:text-left",children:e.sectionText})]},s))})};var A=s(1640);let _=()=>(0,a.jsxs)("div",{className:"gradient-1 relative h-8 w-8 rounded-full",children:[(0,a.jsx)("span",{className:"absolute left-1/2 top-1/2 h-6 w-6 -translate-x-1/2 -translate-y-1/2 roun
1ded-full bg-black"}),(0,a.jsx)("div",{className:"absolute top-2/4 left-2/4 box-content h-6 w-6 -translate-y-2/4 -translate-x-2/4 animate-roll rounded-full border-[4px] border-white/60 border-t-transparent bg-white-transparent"})]});var C=s(3128),I=s(6315),E=s(1856),S=s(4340);let T=e=>{let{plans:t}=e;(0,S.A)(t);let s=(0,p.wA)(),{push:l,query:n,pathname:d}=(0,h.useRouter)(),{sidebarTrigger:o}=(0,b.A)(),[u,x]=(0,r.useState)(!1),[w,v]=(0,r.useState)(!1),[y,N]=(0,r.useState)(!1),{aiThreads:k,lastUsedAIThread:T}=(0,p.d4)(e=>e.messages),{firstName:M,picture:z}=(0,p.d4)(e=>e.user),[q,H]=(0,r.useState)(""),O=(0,r.useRef)(null),G=(0,r.useMemo)(()=>n.thread,[n.thread]);(0,r.useEffect)(()=>{G||(async()=>{try{let e=await (0,f.Nw)();s((0,A.wh)(e))}catch(e){}})()},[G]),(0,r.useEffect)(()=>{G&&(async()=>{try{let e=await (0,f.fv)(G);s((0,A.hb)({threadId:G,threadData:e}))}catch(e){(0,m.A)(e)}})()},[G]);let R=async(e,t)=>{e&&e.preventDefault();try{N(!0),H(""),s((0,A.x4)({threadId:G||T,threadData:q||t}));let e=await (0,f._z)(q||t,G||T,M);s((0,A.hb)({threadId:G||T,threadData:e})),x(!u),G||(l({pathname:d,query:{thread:T}},void 0,{shallow:!0}),setTimeout(()=>o(),1500))}catch(e){(0,m.A)(e)}finally{N(!1)}};return(0,r.useEffect)(()=>{var e;null===(e=O.current)||void 0===e||e.scrollIntoView({behavior:"smooth"})},[k]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.A,{title:"AI Chat Assistant"}),(0,a.jsxs)("div",{className:"relative mx-auto flex h-full flex-row overflow-y-auto rounded-xl bg-white-transparent",children:[(0,a.jsx)(E.A,{styles:"sm:hidden opacity-85 pt-2 pr-0 mr-0 self-start scale-75 absolute top-0 left-0",handler:()=>{v(!w)}}),(0,a.jsx)("div",{className:"hidden w-48 border-r-2 border-white sm:block lg:w-4/12",children:(0,a.jsx)(g,{})}),(0,a.jsx)(j,{open:w,setIsOpen:v,children:" "}),(0,a.jsxs)("div",{className:"bg-gray-100 flex h-full w-full flex-col justify-between overflow-y-auto pt-s2",children:[(0,a.jsx)(D,{aiThreads:k,handleSubmit:R,picture:z,threadId:n.thread,messagesEndRef:O}),(0,a.jsxs)("div",{className:"mx-auto mt-s2 w-full pl-s4 md:w-10/12",children:[y&&(0,a.jsx)(_,{}),(0,a.jsxs)("form",{className:"mx-auto my-s2 flex w-full items-center",onSubmit:y?null:R,children:[(0,a.jsx)(C.A,{placeholder:"Message Aview",extraClasses:"mb-0",value:q,onChange:e=>H(e.target.value)}),(0,a.jsx)("button",{type:"submit",className:"mx-s2",disabled:y,children:(0,a.jsx)(c(),{src:I.A,alt:"Send",width:24,height:24})})]})]})]})]})]})},D=e=>{let{aiThreads:t,handleSubmit:s,picture:l,threadId:r,messagesEndRef:i}=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{}),(0,a.jsxs)("div",{className:"mx-auto w-10/12",children:[Object.keys(t)&&Object.keys(t).length>0&&t[r]&&[...t[r]].sort((e,t)=>e.created_at-t.created_at).map((e,t)=>(0,a.jsx)(N,{picture:l,...e},t))," "]}),(0,a.jsx)("div",{ref:i}),!r&&(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center",children:[(0,a.jsx)(c(),{src:v.A,alt:"aview-logo",width:60,height:60}),(0,a.jsx)("p",{className:"mt-6 text-center text-2xl font-bold",children:"How can we help today?"})]}),!r&&(0,a.jsx)(k,{handleSubmit:s})]})};T.getLayout=l.A;var M=!0;let z=T},3368:(e,t,s)=>{e.exports=s(8700)}},e=>{var t=t=>e(e.s=t);e.O(0,[7438,1702,8968,5458,636,6593,8792],()=>t(9607)),_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.