1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6280],{2740:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/[username]",function(){return n(895)}])},7832:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(5893),s=n(1664),a=n.n(s),o=n(7294),i=n(51);function l(e){let{username:t}=(0,o.useContext)(i.S);return t?e.children:e.fallback||(0,r.jsx)(a(),{href:"/enter",children:"You must be signed in"})}},8185:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(5893),s=n(9008),a=n.n(s);function o(e){let{title:t="PromptOK",description:n="Learn reliable and efficient prompting of LLMs like ChatGPT, Gemini and MidJourney.",image:s="/favicon.ico"}=e;return(0,r.jsxs)(a(),{children:[(0,r.jsx)("title",{children:t}),(0,r.jsx)("link",{rel:"icon",href:"/favicon.ico"}),(0,r.jsx)("meta",{name:"twitter:card",content:"summary"}),(0,r.jsx)("meta",{name:"twitter:site",content:""}),(0,r.jsx)("meta",{name:"twitter:title",content:t}),(0,r.jsx)("meta",{name:"twitter:description",content:n}),(0,r.jsx)("meta",{name:"twitter:image",content:s}),(0,r.jsx)("meta",{property:"og:title",content:t}),(0,r.jsx)("meta",{property:"og:description",content:n}),(0,r.jsx)("meta",{property:"og:image",content:s}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0"}),(0,r.jsx)("link",{href:"https://fonts.googleapis.com/icon?family=Material+Icons",rel:"stylesheet"})]})}},9657:function(e,t,n){"use strict";n.d(t,{$N:function(){return h},Be:function(){return j},GG:function(){return u},Vq:function(){return l},cN:function(){return p},cZ:function(){return m},fK:function(){return x},hg:function(){return d}});var r=n(5893),s=n(7294),a=n(2854),o=n(1352),i=n(3001);let l=a.fC,d=a.xz,c=a.h_,u=a.x8,f=s.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,r.jsx)(a.aV,{ref:t,className:(0,i.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",n),...s})});f.displayName=a.aV.displayName;let m=s.forwardRef((e,t)=>{let{className:n,children:s,...l}=e;return(0,r.jsxs)(c,{children:[(0,r.jsx)(f,{}),(0,r.jsxs)(a.VY,{ref:t,className:(0,i.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",n),...l,children:[s,(0,r.jsxs)(a.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)(o.Z,{className:"h-4 w-4"}),(0,r.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});m.displayName=a.VY.displayName;let x=e=>{let{className:t,...n}=e;return(0,r.jsx)("div",{className:(0,i.cn)("flex flex-col space-y-1.5 text-center sm:text-left",t),...n})};x.displayName="DialogHeader";let p=e=>{let{className:t,...n}=e;return(0,r.jsx)("div",{className:(0,i.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...n})};p.displayName="DialogFooter";let h=s.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,r.jsx)(a.Dx,{ref:t,className:(0,i.cn)("text-lg font-semibold leading-none tracking-tight",n),...s})});h.displayName=a.Dx.displayName;let j=s.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,r.jsx)(a.dk,{ref:t,className:(0,i.cn)("text-sm text-muted-foreground",n),...s})});j.displayName=a.dk.displayName},5054:function(e,t,n){"use strict";n.d(t,{I:function(){return o}});var r=n(5893),s=n(7294),a=n(3001);let o=s.forwardRef((e,t)=>{let{className:n,type:s,...o}=e;return(0,r.jsx)("input",{type:s,className:(0,a.cn)("flex h-10 w-full rounded-md border bg-background px-3 py-2 text-sm r
1ing-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",n),ref:t,...o})});o.displayName="Input"},2556:function(e,t,n){"use strict";n.d(t,{_:function(){return d}});var r=n(5893),s=n(7294),a=n(9102),o=n(5139),i=n(3001);let l=(0,o.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),d=s.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,r.jsx)(a.f,{ref:t,className:(0,i.cn)(l(),n),...s})});d.displayName=a.f.displayName},895:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return I},default:function(){return F}});var r=n(5893);function s(e){let{user:t}=e;return(0,r.jsxs)("div",{className:"box-center",children:[(0,r.jsx)("img",{src:t.photoURL||"/images/default_user_image.png",className:"card-img-center",alt:"User picture not found."}),(0,r.jsx)("p",{children:(0,r.jsxs)("i",{children:["@",t.username]})}),(0,r.jsx)("h1",{children:t.displayName||"Anonymous User"})]})}n(4359);var a=n(7170),o=n(7832);n(2425);var i=n(9657),l=n(5991),d=n(5054),c=n(3448),u=n(6312),f=n(7763),m=n(7294),x=n(8426),p=n(3001),h=n(2556);let j=f.RV,g=m.createContext({}),y=e=>{let{...t}=e;return(0,r.jsx)(g.Provider,{value:{name:t.name},children:(0,r.jsx)(f.Qr,{...t})})},w=()=>{let e=m.useContext(g),t=m.useContext(N),{getFieldState:n,formState:r}=(0,f.Gc)(),s=n(e.name,r);if(!e)throw Error("useFormField should be used within <FormField>");let{id:a}=t;return{id:a,name:e.name,formItemId:"".concat(a,"-form-item"),formDescriptionId:"".concat(a,"-form-item-description"),formMessageId:"".concat(a,"-form-item-message"),...s}},N=m.createContext({}),b=m.forwardRef((e,t)=>{let{className:n,...s}=e,a=m.useId();return(0,r.jsx)(N.Provider,{value:{id:a},children:(0,r.jsx)("div",{ref:t,className:(0,p.cn)("space-y-2",n),...s})})});b.displayName="FormItem";let v=m.forwardRef((e,t)=>{let{className:n,...s}=e,{error:a,formItemId:o}=w();return(0,r.jsx)(h._,{ref:t,className:(0,p.cn)(a&&"text-destructive",n),htmlFor:o,...s})});v.displayName="FormLabel";let P=m.forwardRef((e,t)=>{let{...n}=e,{error:s,formItemId:a,formDescriptionId:o,formMessageId:i}=w();return(0,r.jsx)(x.g7,{ref:t,id:a,"aria-describedby":s?"".concat(o," ").concat(i):"".concat(o),"aria-invalid":!!s,...n})});P.displayName="FormControl",m.forwardRef((e,t)=>{let{className:n,...s}=e,{formDescriptionId:a}=w();return(0,r.jsx)("p",{ref:t,id:a,className:(0,p.cn)("text-sm text-muted-foreground",n),...s})}).displayName="FormDescription";let _=m.forwardRef((e,t)=>{let{className:n,children:s,...a}=e,{error:o,formMessageId:i}=w(),l=o?String(null==o?void 0:o.message):s;return l?(0,r.jsx)("p",{ref:t,id:i,className:(0,p.cn)("text-sm font-medium text-destructive",n),...a,children:l}):null});_.displayName="FormMessage";var R=n(8185);let C=c.Ry({apiKeyCode:c.Z_().min(51).max(51)}),k=c.Ry({oldPassWord:c.Z_().min(1).max(50),newPassWord:c.Z_().min(6).max(18),newPassWordRepeat:c.Z_().min(6).max(18)});var I=!0;function F(e){let t="";e.user.openaiAPIKey&&(t=e.user.openaiAPIKey,"*".repeat(5),t.substring(0,3),t.substring(47)),(0,f.cI)({resolver:(0,u.F)(C),defaultValues:{apiKeyCode:""}});let n=(0,f.cI)({resolver:(0,u.F)(k),defaultValues:{oldPassWord:"",newPassWord:"",newPassWordRepeat:""}}),c=(0,a.v0)().currentUser;var m=!1;c&&c.providerData.forEach(function(e){e.providerId===a.w9.PROVIDER_ID&&(m=!0)});let x=async e=>{if(void 0!==c&&m){var t=a.w9.credential(c.email,e.oldPassWord);(0,a.aF)(c,t).then(function(){e.newPassWord===e.newPassWordRepeat&&(0,a.gQ)(c,e.newPassWord).then(function(){}).catch(function(e){console.error("Password reset not OK: ",e)})}).catch(function(e){console.error("Reauthenticate not OK: ",e)})}};return(0,r.jsxs)("main",{children:[(0,r.jsx)(R.Z,{title:"Account - PromptOK",description:"My account page - to manage private data."}),(0,r.jsxs)(o.Z,{fallback:(0,r.jsx)("span",{children:"You must be logged in to access this page."}),children:[(0,r.jsx)("h1",{children:"Profile"}),(0,r.jsx)(s,{user:e.user}),(0,r.jsx)("div",{className:"flex justify-between w-full",children:m?(0,r.jsxs)(i.Vq,{children:[(0,r.jsx)(i.hg,{className:" bg-transparent hover:bg-gray-300 text-black font-bold p-2 rounded-md ",asChild:!0,children:(0,r.jsx)(l.z,{variant:"outline",children:"Update password"})}),(0,r.jsxs)(i.cZ,{className:"sm:max-w-[425px]",children:[(0,r.jsxs)(i.fK,{children:[(0,r.jsx)(i.$N,{children:"Update password:"}),(0,r.jsx)(i.Be,{})]}),(0,r.jsx)(j,{...n,children:(0,r.jsxs)("form",{onSubmit:n.handleSubmit(x),className:"space-y-8",children:[(0,r.jsx)(y,{control:n.control,name:"oldPassWord",render:e=>{let{field:t}=e;return(0,r.jsxs)(b,{children:[(0,r.jsx)(v,{children:"Old password"}),(0,r.jsx)(P,{children:(0,r.jsx)(d.I,{autoComplete:"off",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",...t})}),(0,r.jsx)(_,{})]})}}),(0,r.jsx)(y,{control:n.control,name:"newPassWord",render:e=>{let{field:t}=e;return(0,r.jsxs)(b,{children:[(0,r.jsx)(v,{children:"New password"}),(0,r.jsx)(P,{children:(0,r.jsx)(d.I,{autoComplete:"off",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",...t})}),(0,r.jsx)(_,{})]})}}),(0,r.jsx)(y,{control:n.control,name:"newPassWordRepeat",render:e=>{let{field:t}=e;return(0,r.jsxs)(b,{children:[(0,r.jsx)(v,{children:"Confirm new password"}),(0,r.jsx)(P,{children:(0,r.jsx)(d.I,{autoComplete:"off",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",...t})}),(0,r.jsx)(_,{})]})}}),(0,r.jsx)(i.cN,{children:(0,r.jsx)(i.GG,{asChild:!0,children:(0,r.jsxs)("div",{children:[(0,r.jsx)(l.z,{className:" p-3 rounded-full bg-transparent font-thin text-gray-600 hover:bg-transparent hover:text-black ",type:"button",children:"Cancel"}),(0,r.jsx)(l.z,{type:"submit",children:"Confirm"})]})})})]})})]})]}):(0,r.jsx)(r.Fragment,{})})]})]})}}},function(e){e.O(0,[3617,1281,1617,9774,2888,179],function(){return e(e.s=2740)}),_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.