(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[405],{8312:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return i(2025)}])},2025:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return eQ}});var n=i(5893),o=i(7294),a=i(6005),r=i(5121);async function d(){return r.Z.get("https://api.passwordgpt.io/metadata",{timeout:1e4})}async function l(e){return r.Z.post("https://api.passwordgpt.io/inference",e,{timeout:1e4})}async function c(e){return r.Z.post("https://api.passwordgpt.io/password",e,{timeout:1e4})}(0,i(8662).ZP)(r.Z,{retryDelay:e=>1e3*e});let s="An error occurred while processing your request. There may be an issue with our servers or your network. Try refreshing your page and contact us if this problem persists, or try again later.";var h=i(8963),x=i(3625),p=i(9417),g=i(7814),m=i(9108);let u=(0,m.F4)(["0%{opacity:0;}100%{opacity:1}"]),b=m.ZP.div.withConfig({componentId:"sc-ab9a521a-0"})(["width:calc(100% - 50px);max-width:450px;display:flex;justify-content:flex-start;margin-bottom:15px;border-radius:5px;padding:10px 40px 10px 15px;position:fixed;top:45px;right:30px;z-index:1002;color:",";border:1px solid ",";background-color:",";animation:"," 0.5s;"," "," "," ",";@media (max-width:500px){right:20px;}"],e=>e.theme.globalText1,e=>e.theme.globalBorder1,e=>e.theme.globalBackground1,u,e=>e.alert===x.xe.ERROR&&"\n border-left: 7px solid ".concat(e.theme.alertBorder1,";\n "),e=>e.alert===x.xe.UPDATE&&"\n border-left: 7px solid ".concat(e.theme.alertBorder2,";\n "),e=>e.theme.type===x.bY.LIGHT&&"\n box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);\n ",e=>e.theme.type===x.bY.DARK&&"\n box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);\n "),f=m.ZP.div.withConfig({componentId:"sc-ab9a521a-1"})(["width:15px;height:15px;position:absolute;top:12px;right:15px;color:",";cursor:pointer;"],e=>e.theme.globalText1);function w(e){let{alert:t,alertType:i,clear:a}=e;return(0,o.useEffect)(()=>{setTimeout(()=>{t&&a()},5e3)},[t,a]),(0,n.jsx)(n.Fragment,{children:t.length>=1&&(0,n.jsxs)(b,{alert:i,children:[(0,n.jsx)(f,{onClick:a,children:(0,n.jsx)(g.G,{icon:p.nYk})}),(0,n.jsx)(h.d3,{children:t})]})})}let j=(0,m.F4)(["0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}"]),v=m.ZP.button.withConfig({componentId:"sc-fd38c258-0"})(["width:100%;min-width:100px;height:40px;display:flex;align-items:center;justify-content:center;margin-right:10px;background-color:",";border:1px solid ",";border-radius:5px;cursor:pointer;"," "," ",";",";&:hover{background-color:",";transition:0.2s ease-in all;}&:last-child{margin-right:0;}"],e=>e.theme.globalBackground3,e=>e.theme.globalBorder1,e=>e.theme.type===x.bY.LIGHT&&e.shadow&&"\n box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);\n ",e=>e.theme.type===x.bY.DARK&&e.shadow&&"\n box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);\n ",e=>"secondary"===e.variant&&"background-color: ".concat(e.theme.globalBackground2,";"),e=>"tertiary"===e.variant&&"background-color: ".concat(e.theme.globalBackground3,";"),e=>e.theme.hoverBackground1),y=m.ZP.button.withConfig({componentId:"sc-fd38c258-1"})(["width:35px;height:35px;display:flex;align-items:center;justify-content:center;margin-right:10px;background-color:",";border:1px solid ",";border-radius:35px;cursor:pointer;"," "," ",";",";&:hover{background-color:",";transition:0.2s ease-in all;}&:last-child{margin-right:0;}"],e=>e.theme.globalBackground1,e=>e.theme.globalBorder1,e=>e.theme.type===x.bY.LIGHT&&e.shadow&&"\n box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);\n ",e=>e.theme.type===x.bY.DARK&&e.shadow&&"\n box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);\n ",e=>"secondary"===e.variant&&"background-color: ".concat(e.theme.globalBackground2,";"),e=>"tertiary"===e.variant&&"background-color: ".concat(e.theme.globalBackground3,";"),e=>e.theme.hoverBackground1),k=m.ZP.div.withConfig({componentId:"sc-fd38c258-2"})(["border:3px solid ",";border-radius:50%;border-top:3px solid transparent;border-bottom:3px solid transparent;animation:"," 2s linear infinite;",";",";"],e=>e.theme.globalText1,j,e=>"secondary"===e.variant&&"border: 3px solid ".concat(e.theme.globalText2,";\n border-top: 3px solid transparent;\n border-bottom: 3px solid transparent;\n "),e=>"tertiary"===e.variant&&"border: 3px solid ".concat(e.theme.globalText2,";\n border-top: 3px solid transparent;\n border-bottom: 3px solid transparent;\n ")),C=m.ZP.div.withConfig({componentId:"sc-fd38c258-3"})(["color:",";",";",";"],e=>e.theme.globalText1,e=>"secondary"===e.variant&&"color: ".concat(e.theme.globalText2,";"),e=>"tertiary"===e.variant&&"color: ".concat(e.theme.globalText2,";"));function I(e){let{children:t,disabled:i,loading:o,shadow:a,style:r,variant:d,onClick:l}=e;return(0,n.jsx)(v,{type:"submit",shadow:a,style:r,onClick:l,variant:d,disabled:i||o,children:o?(0,n.jsx)(k,{style:{width:"20px",height:"20px"}}):(0,n.jsx)(C,{variant:d,children:t})})}function P(e){let{children:t,disabled:i,loading:o,shadow:a,style:r,variant:d,onClick:l}=e;return(0,n.jsx)(y,{type:"submit",shadow:a,style:r,onClick:l,variant:d,disabled:i||o,children:o?(0,n.jsx)(k,{variant:d,style:{width:"16px",height:"16px"}}):(0,n.jsx)(C,{variant:d,children:t})})}function T(e){let{children:t,disabled:i,link:o,loading:a,shadow:r,style:d,variant:l,onClick:c}=e;return(0,n.jsx)($,{link:o,children:(0,n.jsx)(y,{type:"submit",shadow:r,style:d,onClick:c,variant:l,disabled:i||a,children:a?(0,n.jsx)(k,{variant:l,style:{width:"16px",height:"16px"}}):(0,n.jsx)(C,{variant:l,children:t})})})}var Z=i(3024);let S="PasswordGPT",B="v1.0.1",G=m.ZP.div.withConfig({componentId:"sc-52e664ec-0"})(["width:100%;"]),R=m.ZP.div.withConfig({componentId:"sc-52e664ec-1"})(["@media (max-width:500px){display:none;}"]),E=m.ZP.div.withConfig({componentId:"sc-52e664ec-2"})(["@media (min-width:501px){display:none;}"]),z=m.ZP.div.withConfig({componentId:"sc-52e664ec-3"})(["width:100%;height:70px;padding:0 30px;top:0;left:0;z-index:1001;position:fixed;display:flex;flex-direction:column;align-items:center;justify-content:center;border-bottom:1px solid ",";background-color:",";@media (max-width:500px){padding:15px 20px;}"],e=>e.theme.globalBorder1,e=>e.theme.globalBackground1),Y=m.ZP.div.withConfig({componentId:"sc-52e664ec-4"})(["width:100%;height:100%;display:flex;justify-content:space-between;position:relative;"]),N=m.ZP.div.withConfig({componentId:"sc-52e664ec-5"})(["width:100%;height:100%;display:flex;align-items:center;color:",";"],e=>e.theme.globalText1),H=m.ZP.div.withConfig({componentId:"sc-52e664ec-6"})(["margin:3px 0 0 8px;color:",";"],e=>e.theme.globalText2),A=m.ZP.div.withConfig({componentId:"sc-52e664ec-7"})(["width:100%;height:100%;display:flex;align-items:center;justify-content:center;@media (min-width:501px){margin-left:23px;}"]),D=m.ZP.div.withConfig({componentId:"sc-52e664ec-8"})(["width:25px;height:25px;margin-right:8px;border-radius:25px;border:1px solid ",";",";&:last-child{margin-right:0;}"],e=>e.theme.globalBorder1,e=>e.active&&"\n background-color: ".concat(e.theme.headerBackground1,";\n ")),_=m.ZP.div.withConfig({componentId:"sc-52e664ec-9"})(["width:100%;height:100%;display:flex;align-items:center;"]),L=m.ZP.div.withConfig({componentId:"sc-52e664ec-10"})(["width:100%;height:100%;display:flex;align-items:center;justify-content:flex-end;"]),M=m.ZP.div.withConfig({componentId:"sc-52e664ec-11"})(["width:100%;display:flex;align-items:center;justify-content:center;position:absolute;top:54px;"]),F=m.ZP.div.withConfig({componentId:"sc-52e664ec-12"})(["padding:6px 12px 12px 12px;background-color:",";border:1px solid ",";border-top:0;border-radius:0 0 10px 10px;"],e=>e.theme.globalBackground1,e=>e.theme.globalBorder1);function U(e){let{chances:t,onShowInstructions:i,onShowSettings:o}=e;return(0,n.jsx)(z,{children:(0,n.jsxs)(Y,{children:[(0,n.jsxs)(N,{children:[(0,n.jsx)(g.G,{icon:Z.cEN,style:{width:"20px",marginRight:"10px"}}),(0,n.jsx)(h.pL,{children:S}),(0,n.jsx)(H,{children:(0,n.jsx)(h.Ng,{children:B})})]}),(0,n.jsxs)(A,{children:[(0,n.jsx)(D,{active:t>=1}),(0,n.jsx)(D,{active:t>=2}),(0,n.jsx)(D,{active:t>=3})]}),(0,n.jsxs)(L,{children:[(0,n.jsx)(P,{onClick:i,children:(0,n.jsx)(g.G,{icon:p.Psp,style:{width:"12px",marginTop:"4px"}})}),(0,n.jsx)(P,{onClick:o,children:(0,n.jsx)(g.G,{icon:p.gr5,style:{width:"16px",marginTop:"3px"}})})]})]})})}function X(e){let{chances:t,onShowInstructions:i,onShowSettings:o}=e;return(0,n.jsx)(z,{children:(0,n.jsxs)(Y,{children:[(0,n.jsx)(_,{children:(0,n.jsx)(P,{onClick:i,children:(0,n.jsx)(g.G,{icon:p.Psp,style:{width:"12px",marginTop:"4px"}})})}),(0,n.jsxs)(N,{children:[(0,n.jsx)(g.G,{icon:Z.cEN,style:{width:"20px",marginRight:"10px"}}),(0,n.jsx)(h.pL,{children:S}),(0,n.jsx)(H,{children:(0,n.jsx)(h.Ng,{children:B})})]}),(0,n.jsx)(L,{children:(0,n.jsx)(P,{onClick:o,children:(0,n.jsx)(g.G,{icon:p.gr5,style:{width:"16px",marginTop:"4px"}})})}),(0,n.jsx)(M,{children:(0,n.jsx)(F,{children:(0,n.jsxs)(A,{children:[(0,n.jsx)(D,{active:t>=1}),(0,n.jsx)(D,{active:t>=2}),(0,n.jsx)(D,{active:t>=3})]})})})]})})}function q(e){return(0,n.jsxs)(G,{children:[(0,n.jsx)(R,{children:(0,n.jsx)(U,{...e})}),(0,n.jsx)(E,{children:(0,n.jsx)(X,{...e})})]})}let K=m.ZP.div.withConfig({componentId:"sc-1420095d-0"})(["width:100%;display:flex;border-radius:5px;"]),O=m.ZP.input.withConfig({componentId:"sc-1420095d-1"})(["width:100%;padding:0 15px;background-color:",";color:",";border-radius:5px;border:1px solid ",";font-family:'Lato Regular',sans-serif;font-weight:400;font-size:14px;-moz-appearance:none;-webkit-appearance:none;appearance:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"," "," &:focus{outline:none;}@media (max-width:500px){font-size:15px;}"],e=>e.theme.globalBackground1,e=>e.theme.globalText1,e=>e.theme.globalBorder1,e=>"secondary"===e.variant&&"\n background-color: ".concat(e.theme.globalBackground2,";\n "),e=>"tertiary"===e.variant&&"\n background-color: ".concat(e.theme.globalBackground3,";\n "));function V(e){let{disabled:t,maximum:i,placeholder:a,style:r,type:d,value:l,variant:c,onChange:s,onSubmit:h}=e,x=(0,o.useCallback)(e=>{var t,n;(!i||(null==e?void 0:null===(t=e.target)||void 0===t?void 0:t.value.length)<=i)&&s((null==e?void 0:null===(n=e.target)||void 0===n?void 0:n.value)||"")},[i,s]),p=(0,o.useCallback)(e=>{(null==e?void 0:e.key)==="Enter"&&h()},[h]);return(0,n.jsx)(K,{children:(0,n.jsx)(O,{disabled:t,placeholder:a,variant:c,style:r,type:d,value:l,onChange:x,onKeyUp:p})})}var Q=i(1664),W=i.n(Q);(0,m.ZP)(W()).withConfig({componentId:"sc-61b797cc-0"})(["cursor:pointer;",";&:hover{color:",";transition:0.2s ease-in all;",";}"],e=>!e.highlight&&"\n color: ".concat(e.theme.globalText1,";\n text-decoration: none;\n "),e=>e.theme.hoverText1,e=>!e.highlight&&"text-decoration: none;");let J=m.ZP.a.withConfig({componentId:"sc-61b797cc-1"})(["cursor:pointer;",";&:hover{color:",";transition:0.2s ease-in all;",";}"],e=>!e.highlight&&"\n color: ".concat(e.theme.globalText1,";\n text-decoration: none;\n "),e=>e.theme.hoverText1,e=>!e.highlight&&"text-decoration: none;");function $(e){let{children:t,highlight:i,link:o}=e;return(0,n.jsx)(J,{highlight:i,href:o,target:"_blank",rel:"noreferrer noopener",children:t})}let ee=(0,m.F4)(["0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}"]),et=(0,m.F4)(["0%{opacity:0;}100%{opacity:1}"]);m.ZP.div.withConfig({componentId:"sc-67cf63b-0"})(["display:flex;align-items:flex-end;"]),m.ZP.div.withConfig({componentId:"sc-67cf63b-1"})(["width:10px;height:10px;border-radius:50%;background-color:",";margin:0 3px;animation:"," 1s linear infinite;animation-delay:",";"],e=>e.theme.globalBorder1,et,e=>e.delay);let ei=m.ZP.div.withConfig({componentId:"sc-67cf63b-2"})(["border:10px solid ",";border-radius:50%;border-top:10px solid transparent;border-bottom:10px solid transparent;animation:"," 2s linear infinite;"],e=>e.theme.globalBorder1,ee);function en(e){let{style:t}=e;return(0,n.jsx)(ei,{style:t})}let eo=m.ZP.div.withConfig({componentId:"sc-eae55b60-0"})(["width:100%;height:100%;position:absolute;top:0;left:0;background-color:rgba(0,0,0,0.6);opacity:0;z-index:10000;visibility:hidden;transition:0.2s ease-in all;",""],e=>e.show&&"\n opacity: 1;\n visibility: visible;\n "),ea=m.ZP.div.withConfig({componentId:"sc-eae55b60-1"})(["width:calc(100% - 50px);max-width:425px;height:auto;max-height:calc(100% - 50px);position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);border-radius:5px;background-color:",";overflow-x:hidden;overflow-y:scroll;z-index:10001;opacity:0;visibility:hidden;transition:0.2s ease-in all;@media (max-width:500px){width:calc(100% - 40px);max-height:calc(100% - 40px);}",""],e=>e.theme.globalBackground2,e=>e.show&&"\n opacity: 1;\n visibility: visible;\n "),er=m.ZP.div.withConfig({componentId:"sc-eae55b60-2"})(["width:100%;height:60px;display:flex;align-items:center;justify-content:space-between;padding:0 25px 0 26px;color:",";background-color:",";border-bottom:1px solid ",";@media (max-width:500px){padding:0 15px 0 16px;}"],e=>e.theme.globalText1,e=>e.theme.globalBackground3,e=>e.theme.globalBorder2),ed=m.ZP.div.withConfig({componentId:"sc-eae55b60-3"})(["width:100%;height:60px;display:flex;align-items:center;justify-content:flex-end;padding:0 25px;color:",";background-color:",";@media (max-width:500px){padding:0 15px;}"],e=>e.theme.globalText1,e=>e.theme.globalBackground2),el=m.ZP.div.withConfig({componentId:"sc-eae55b60-4"})(["line-height:14px;cursor:pointer;"]),ec=m.ZP.div.withConfig({componentId:"sc-eae55b60-5"})(["width:100%;"]);function es(e){let{children:t,show:i,title:a,onHide:r}=e,d=(0,o.useRef)(null);return(0,o.useEffect)(()=>{setTimeout(()=>{d&&d.current&&d.current.scrollIntoView({behavior:"smooth"})},200)},[i]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(eo,{show:i,onClick:r}),(0,n.jsxs)(ea,{show:i,children:[a?(0,n.jsxs)(er,{ref:d,children:[(0,n.jsx)(h.aX,{children:a}),(0,n.jsx)(el,{children:(0,n.jsx)(g.G,{icon:p.NBC,style:{width:"14px",marginTop:"2px"},onClick:r})})]}):(0,n.jsx)(ed,{children:(0,n.jsx)(el,{children:(0,n.jsx)(g.G,{icon:p.NBC,style:{width:"14px",marginTop:"2px"},onClick:r})})}),(0,n.jsx)(ec,{children:t})]})]})}let eh=m.ZP.label.withConfig({componentId:"sc-845bc11a-0"})(["display:flex;align-items:center;gap:10px;cursor:pointer;"]),ex=m.ZP.div.withConfig({componentId:"sc-845bc11a-1"})(["position:relative;width:52px;height:26px;border-radius:32px;padding:4px;transition:0.2s ease-in all;background:",";border:1px solid ",";",";&:before{content:'';position:absolute;width:16px;height:16px;border-radius:35px;top:50%;left:4px;background:",";transform:translate(0,-50%);transition:0.2s ease-in all;}"],e=>e.theme.globalText2,e=>e.theme.globalBorder1,e=>e.disabled&&"opacity: 0.4",e=>e.theme.globalText3),ep=m.ZP.input.withConfig({componentId:"sc-845bc11a-2"})(["display:none;&:checked + ","{background:",";&:before{transform:translate(26px,-50%);}}"],ex,e=>e.theme.hoverBackground2);function eg(e){let{disabled:t,value:i,onClick:o}=e;return(0,n.jsxs)(eh,{children:[(0,n.jsx)(ep,{disabled:t,checked:i,type:"checkbox",onChange:o}),(0,n.jsx)(ex,{disabled:t})]})}let em=m.ZP.div.withConfig({componentId:"sc-5f99a75-0"})(["width:100%;height:calc(100vh - 164px);min-height:300px;padding-top:100px;overflow-y:scroll;@media (max-width:536px){height:calc(100vh - 182px);}@media (max-width:500px){height:calc(100vh - 213px);padding-top:130px;}@media (max-width:351px){height:calc(100vh - 234px);}"]),eu=m.ZP.div.withConfig({componentId:"sc-5f99a75-1"})(["width:100%;min-height:100%;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:20px;"]),eb=m.ZP.div.withConfig({componentId:"sc-5f99a75-2"})(["width:100%;"]),ef=m.ZP.div.withConfig({componentId:"sc-5f99a75-3"})(["width:calc(100% - 60px);max-width:760px;padding:20px 25px;margin:0 30px;color:",";border:1px solid ",";background-color:",";border-radius:5px;position:relative;&:nth-child(even){background-color:",";}@media (max-width:500px){width:calc(100% - 40px);padding:15px;margin:0 20px;}"],e=>e.theme.globalText1,e=>e.theme.globalBorder1,e=>e.theme.globalBackground2,e=>e.theme.globalBackground3),ew=m.ZP.div.withConfig({componentId:"sc-5f99a75-4"})(["width:100%;display:flex;align-items:center;gap:10px;margin-bottom:10px;"]),ej=m.ZP.div.withConfig({componentId:"sc-5f99a75-5"})(["width:30px;height:30px;display:flex;align-items:center;justify-content:center;border:1px solid ",";background-color:",";border-radius:30px;margin-top:1px;"],e=>e.theme.globalBorder1,e=>e.theme.globalBackground1),ev=m.ZP.div.withConfig({componentId:"sc-5f99a75-6"})(["width:calc(100% - 60px);height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;color:",";flex-grow:1;opacity:0.75;text-align:center;"],e=>e.theme.globalText1),ey=(0,o.forwardRef)((e,t)=>{let{conversation:i,hard:a,metadata:r}=e,d=(0,o.useCallback)(e=>{switch(e){case x.g8.ASSISTANT:case x.g8.SYSTEM:return p.qQ1;case x.g8.USER:default:return p.ILF}},[]),l=(0,o.useCallback)(e=>{switch(e){case x.g8.ASSISTANT:case x.g8.SYSTEM:return"PasswordGPT";case x.g8.USER:default:return"User"}},[]);return(0,n.jsxs)(em,{children:[(0,n.jsx)(eu,{children:i.length>=1?(0,n.jsx)(n.Fragment,{children:i.map((e,t)=>(0,n.jsxs)(ef,{children:[(0,n.jsxs)(ew,{children:[(0,n.jsx)(ej,{children:(0,n.jsx)(g.G,{icon:d(null==e?void 0:e.role),style:{height:"10px"}})}),(0,n.jsx)(h.d3,{bold:!0,children:"".concat(l(null==e?void 0:e.role),":")})]}),(0,n.jsx)(h.d3,{children:null==e?void 0:e.content})]},t))}):(0,n.jsxs)(ev,{children:[(0,n.jsx)(h.aX,{children:"Puzzle #".concat(r.puzzle," (").concat(a?"Hard Mode":"Easy Mode",")")}),(0,n.jsx)(h.iI,{children:"".concat(r.title)})]})}),(0,n.jsx)(eb,{ref:t})]})}),ek=m.ZP.div.withConfig({componentId:"sc-ff71fbb2-0"})(["width:100%;display:flex;justify-content:center;"]),eC=m.ZP.div.withConfig({componentId:"sc-ff71fbb2-1"})(["width:100%;max-width:820px;display:flex;align-items:center;justify-content:center;padding:30px 30px 0 30px;margin:30px 0;border-top:1px solid ",";background-color:",";@media (max-width:500px){padding:20px 20px 0 20px;margin:20px 0;}"],e=>e.theme.globalBorder1,e=>e.theme.globalBackground1),eI=m.ZP.div.withConfig({componentId:"sc-ff71fbb2-2"})(["width:100%;"]),eP=m.ZP.div.withConfig({componentId:"sc-ff71fbb2-3"})(["width:100%;display:flex;align-items:center;justify-content:center;gap:15px;margin-bottom:15px;&:last-child{margin-bottom:0;}@media (max-width:500px){flex-direction:column;}"]),eT=m.ZP.div.withConfig({componentId:"sc-ff71fbb2-4"})(["width:100%;display:flex;align-items:center;justify-content:center;"]),eZ=m.ZP.div.withConfig({componentId:"sc-ff71fbb2-5"})(["display:flex;margin-left:-89px;"]),eS=m.ZP.div.withConfig({componentId:"sc-ff71fbb2-6"})(["width:240px;@media (max-width:500px){width:100%;}"]),eB=m.ZP.div.withConfig({componentId:"sc-ff71fbb2-7"})(["padding:0 20px;color:",";text-align:center;"],e=>e.theme.globalText2);function eG(e){let{loading:t,message:i,onGuess:o,onMessage:a,onReset:r,onSubmit:d}=e;return(0,n.jsx)(ek,{children:(0,n.jsx)(eC,{children:(0,n.jsxs)(eI,{children:[(0,n.jsxs)(eP,{children:[(0,n.jsxs)(eT,{children:[(0,n.jsx)(V,{maximum:400,placeholder:"Submit a Message ...",style:{height:"40px",paddingRight:"105px"},type:"text",value:i,variant:"secondary",onChange:a,onSubmit:d}),(0,n.jsxs)(eZ,{children:[(0,n.jsx)(P,{style:{width:"45px",height:"40px",borderRadius:"0",marginRight:"-1px"},variant:"secondary",onClick:r,children:(0,n.jsx)(g.G,{icon:p.XnX,style:{width:"14px",marginTop:"3px"}})}),(0,n.jsx)(P,{style:{width:"45px",height:"40px",borderRadius:"0 5px 5px 0"},loading:t,variant:"secondary",onClick:d,children:(0,n.jsx)(g.G,{icon:p.cLY,style:{width:"14px",marginTop:"3px"}})})]})]}),(0,n.jsx)(eS,{children:(0,n.jsx)(I,{onClick:o,children:(0,n.jsx)(h.d3,{children:"Guess the Password"})})})]}),(0,n.jsx)(eP,{children:(0,n.jsx)(eB,{children:(0,n.jsx)(h.uD,{children:"Note that occasional errors may occur, including hallucinated ideas and suggestions"})})})]})})})}let eR=m.ZP.div.withConfig({componentId:"sc-85638d49-0"})(["width:100%;display:flex;flex-direction:column;align-items:center;"]),eE=m.ZP.div.withConfig({componentId:"sc-85638d49-1"})(["width:100%;max-width:350px;display:flex;justify-content:center;padding:0 25px;color:",";margin-bottom:10px;text-align:center;&:last-child{margin-bottom:0;}@media (max-width:500px){max-width:300px;padding:0 15px;}"],e=>e.theme.globalText1);function ez(e){let{copied:t,correct:i,loading:a,midnight:r,show:d,onHide:l,onShare:c}=e,[s,x]=(0,o.useState)("");return(0,o.useEffect)(()=>{let e=setInterval(()=>{let e=new Date,t=new Date(r).getTime()/1e3-e.getTime()/1e3,i=Math.floor(t/3600),n=Math.floor((t-=3600*i)/60);x(i+":"+(n<10?"0"+n:n))},1e3);return()=>clearInterval(e)},[r]),(0,n.jsx)(es,{show:d,onHide:l,children:(0,n.jsxs)(eR,{children:[(0,n.jsx)(eE,{children:(0,n.jsx)(h.p8,{bold:!0,children:i?"Congratulations!":"Sorry ..."})}),(0,n.jsx)(eE,{children:(0,n.jsx)(h.ax,{children:i?"You guessed the password correctly! Check back tomorrow for a new puzzle.":"Looks like the puzzle was too difficult. Check back tomorrow for a new one!"})}),(0,n.jsx)(eE,{style:{marginTop:"10px"},children:(0,n.jsx)(h.Z9,{bold:!0,children:s})}),(0,n.jsx)(eE,{style:{marginTop:"-20px"},children:(0,n.jsx)(h.ax,{children:"Next Daily Refresh"})}),(0,n.jsx)(eE,{style:{margin:"20px 0 60px"},children:(0,n.jsx)(I,{style:{maxWidth:"160px"},loading:a,onClick:c,children:(0,n.jsx)(h.ax,{children:t?"Copied":"Share"})})})]})})}let eY=m.ZP.div.withConfig({componentId:"sc-29896f72-0"})(["width:100%;padding:20px 0;"]),eN=m.ZP.div.withConfig({componentId:"sc-29896f72-1"})(["width:100%;padding:0 25px;color:",";margin-bottom:10px;&:last-child{margin-bottom:0;}@media (max-width:500px){padding:0 15px;}"],e=>e.theme.globalText1),eH=m.ZP.div.withConfig({componentId:"sc-29896f72-2"})(["width:100%;display:flex;align-items:center;justify-content:space-between;gap:5px;"]);function eA(e){let{guess:t,loading:i,show:o,springs:r,onGuess:d,onHide:l,onSubmit:c}=e;return(0,n.jsx)(es,{show:o,title:"Solution",onHide:l,children:(0,n.jsx)(eY,{children:(0,n.jsx)(eN,{children:(0,n.jsx)(a.q.div,{style:{...r},children:(0,n.jsxs)(eH,{children:[(0,n.jsx)(V,{maximum:20,placeholder:"Guess the Password ...",style:{height:"40px"},type:"text",value:t,onChange:d,onSubmit:c}),(0,n.jsx)(P,{style:{width:"45px",height:"40px",borderRadius:"0 5px 5px 0",marginLeft:"-45px"},loading:i,onClick:c,children:(0,n.jsx)(g.G,{icon:p.cLY,style:{width:"14px",marginTop:"3px"}})})]})})})})})}let eD=m.ZP.div.withConfig({componentId:"sc-11b09091-0"})(["width:100%;padding:20px 0;"]),e_=m.ZP.div.withConfig({componentId:"sc-11b09091-1"})(["width:100%;padding:0 25px;color:",";margin-bottom:10px;&:last-child{margin-bottom:0;}@media (max-width:500px){padding:0 15px;}"],e=>e.theme.globalText1),eL=m.ZP.ul.withConfig({componentId:"sc-11b09091-2"})(["width:100%;margin:0;padding-left:15px;"]),eM=m.ZP.li.withConfig({componentId:"sc-11b09091-3"})(["width:100%;margin-bottom:5px;&:last-child{margin-bottom:0;}"]),eF=m.ZP.div.withConfig({componentId:"sc-11b09091-4"})(["width:100%;padding:20px 0;border-top:1px solid ",";"],e=>e.theme.globalBorder1);function eU(e){let{show:t,onHide:i}=e;return(0,n.jsxs)(es,{show:t,title:"Instructions",onHide:i,children:[(0,n.jsxs)(eD,{children:[(0,n.jsx)(e_,{children:(0,n.jsx)(h.Ng,{children:"Guess the secret password."})}),(0,n.jsx)(e_,{children:(0,n.jsxs)(eL,{children:[(0,n.jsx)(eM,{children:(0,n.jsx)(h.d3,{children:"Your main resource is a quirky AI that has been instructed to not reveal the secret password."})}),(0,n.jsx)(eM,{children:(0,n.jsx)(h.d3,{children:"You must craft a prompt that results in them telling you the password."})}),(0,n.jsx)(eM,{children:(0,n.jsx)(h.d3,{children:"You have three chances to guess the password correctly."})})]})})]}),(0,n.jsx)(eF,{children:(0,n.jsx)(e_,{children:(0,n.jsx)(h.d3,{children:"A new puzzle is released daily at midnight (UTC). If you’re having trouble, try reading up on “Prompt Injection” or check back tomorrow for a fresh start. Good luck!"})})})]})}let eX=m.ZP.div.withConfig({componentId:"sc-ea1082ca-0"})(["width:100%;"]),eq=m.ZP.div.withConfig({componentId:"sc-ea1082ca-1"})(["width:100%;min-height:60px;display:flex;align-items:center;justify-content:space-between;padding:15px 25px;color:",";background-color:",";border-bottom:1px solid ",";@media (max-width:500px){padding:15px 15px;}"],e=>e.theme.globalText1,e=>e.theme.globalBackground2,e=>e.theme.globalBorder1),eK=m.ZP.div.withConfig({componentId:"sc-ea1082ca-2"})(["width:100%;"]),eO=m.ZP.div.withConfig({componentId:"sc-ea1082ca-3"})(["width:100%;display:flex;align-items:center;justify-content:space-between;padding:15px 25px;color:",";background-color:",";@media (max-width:500px){padding:15px 15px;}"],e=>e.theme.globalText1,e=>e.theme.globalBackground2);function eV(e){let{hard:t,metadata:i,show:o,theme:a,onHide:r,toggleHard:d,toggleTheme:l}=e;return(0,n.jsxs)(es,{show:o,title:"Settings",onHide:r,children:[(0,n.jsxs)(eX,{children:[(0,n.jsxs)(eq,{children:[(0,n.jsxs)(eK,{children:[(0,n.jsx)(h.ax,{children:"Hard Mode"}),(0,n.jsx)(h.uD,{children:"The AI will start to pick up on your tricks..."})]}),(0,n.jsx)(eg,{value:t,onClick:d})]}),(0,n.jsxs)(eq,{children:[(0,n.jsx)(h.ax,{children:"Toggle Theme"}),(0,n.jsx)(eg,{value:a===x.bY.DARK,onClick:l})]}),(0,n.jsxs)(eq,{children:[(0,n.jsx)(h.ax,{children:"Give Feedback"}),(0,n.jsx)(T,{link:"mailto:mocking.developer@gmail.com",children:(0,n.jsx)(g.G,{icon:p.cLY,style:{width:"14px",marginTop:"3px"}})})]}),(0,n.jsxs)(eq,{children:[(0,n.jsx)(h.ax,{children:"Report a Bug"}),(0,n.jsx)(T,{link:"mailto:mocking.developer@gmail.com",children:(0,n.jsx)(g.G,{icon:p.cLY,style:{width:"14px",marginTop:"3px"}})})]})]}),(0,n.jsxs)(eO,{children:[(0,n.jsx)(h.uD,{children:"\xa9 2024 - PasswordGPT"}),(0,n.jsx)(h.uD,{children:"Puzzle #".concat(null==i?void 0:i.puzzle)})]})]})}function eQ(e){let{theme:t,toggleTheme:i}=e,[r,p]=(0,o.useState)(""),[g,m]=(0,o.useState)(null),[u,b]=(0,o.useState)(0),[f,j]=(0,o.useState)(!1),[v,y]=(0,o.useState)(!1),[k,C]=(0,o.useState)([]),[I,P]=(0,o.useState)(""),[T,Z]=(0,o.useState)(0),[S,B]=(0,o.useState)(!1),[G,R]=(0,o.useState)(""),[E,z]=(0,o.useState)({}),[Y,N]=(0,o.useState)(!1),[H,A]=(0,o.useState)(!0),[D,_]=(0,o.useState)(!1),[L,M]=(0,o.useState)(!1),[F,U]=(0,o.useState)(!1),[X,K]=(0,o.useState)(!1),[O,V]=(0,o.useState)(!0),[Q,W]=(0,o.useState)(!1),J=(0,o.useRef)(null),[$,ee]=(0,a.q_)(()=>({from:{x:0}})),et=(0,o.useMemo)(()=>{let e=new Date;return e.setHours(24,0,0,0),(null==E?void 0:E.midnight)||e.getTime()},[E]),ei=(0,o.useCallback)(e=>{console.error(e),p(e),m(x.xe.ERROR)},[]),eo=(0,o.useCallback)(()=>{ee.start({from:{x:0},to:[{x:20},{x:-15},{x:10},{x:-5},{x:0}],config:{duration:50}})},[ee]),ea=(0,o.useCallback)(e=>{localStorage.setItem("mode",e),b(0),C([]),B("hard"===e)},[]),er=(0,o.useCallback)(()=>{ea(S?"easy":"hard")},[S,ea]),ed=(0,o.useCallback)(async()=>{try{var e,t,i;let n=await l({hard:S,messages:[...k.slice(Math.max(k.length-3,0))]});if((null==n?void 0:null===(e=n.data)||void 0===e?void 0:e.code)===200)return(null==n?void 0:null===(i=n.data)||void 0===i?void 0:i.body)||{};ei((null==n?void 0:null===(t=n.data)||void 0===t?void 0:t.body)||s)}catch(e){console.error(e),ei(s)}},[k,S,ei]),el=(0,o.useCallback)(async()=>{try{var e,t,i;let n=await d();if((null==n?void 0:null===(e=n.data)||void 0===e?void 0:e.code)===200)return(null==n?void 0:null===(i=n.data)||void 0===i?void 0:i.body)||{};ei((null==n?void 0:null===(t=n.data)||void 0===t?void 0:t.body)||s)}catch(e){console.error(e),ei(s)}},[ei]),ec=(0,o.useCallback)(async()=>{try{var e,t,i;let n=await c({hard:S,password:I});if((null==n?void 0:null===(e=n.data)||void 0===e?void 0:e.code)===200)return(null==n?void 0:null===(i=n.data)||void 0===i?void 0:i.body)||!1;ei((null==n?void 0:null===(t=n.data)||void 0===t?void 0:t.body)||s)}catch(e){console.error(e),ei(s)}},[S,I,ei]),es=(0,o.useCallback)(()=>{Y||v||(R(""),C([...k,{role:x.g8.USER,content:G}]))},[k,v,G,Y]),eh=(0,o.useCallback)(async()=>{var e,t;let i=await ed(),n=null===(t=((null==i?void 0:i.choices)||[])[0])||void 0===t?void 0:null===(e=t.message)||void 0===e?void 0:e.content;n?(b(u+1),C([...k,{role:x.g8.ASSISTANT,content:n}])):C(k.slice(0,-1))},[k,u,ed]),ex=(0,o.useCallback)(async()=>{let e=await el();e&&z(e)},[el]),ep=(0,o.useCallback)(async()=>{D||v||(I.length<=4?ei("Password must have more than 4 characters"):(_(!0),Z(T+1),await ec()?(y(!0),U(!0),K(!1)):T+1>=3?(U(!0),K(!1)):(eo(),P("")),_(!1)))},[v,I,T,D,ec,ei,eo]),eg=(0,o.useCallback)(()=>{M(!0),setTimeout(async()=>{console.log("Result String Copied ..."),await navigator.clipboard.writeText("PasswordGPT.io #".concat(E.puzzle," - ").concat(E.title," (").concat(S?"Hard":"Easy","): ").concat(T,"/3 Guesses, ").concat(u," Messages")),j(!0),M(!1)},250)},[u,T,S,E]);return((0,o.useEffect)(()=>{if(J.current&&k.length>=1){var e;J.current.scrollIntoView(),(null===(e=k[k.length-1])||void 0===e?void 0:e.role)===x.g8.USER&&(N(!0),eh().then(()=>{N(!1)}))}},[k,J,eh]),(0,o.useEffect)(()=>{H&&ex().then(()=>A(!1))},[H,ex]),(0,o.useEffect)(()=>{ea(localStorage.getItem("mode")||"easy")},[ea]),H)?(0,n.jsx)(h.mn,{children:(0,n.jsx)(en,{style:{width:"120px",height:"120px"}})}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(h.xB,{}),(0,n.jsx)(ez,{copied:f,correct:v,loading:L,midnight:et,show:F,onHide:()=>U(!1),onShare:eg}),(0,n.jsx)(eA,{guess:I,loading:D,show:X,springs:$,onGuess:P,onHide:()=>K(!1),onSubmit:ep}),(0,n.jsx)(eU,{show:O,onHide:()=>V(!1)}),(0,n.jsx)(eV,{hard:S,metadata:E,show:Q,theme:t,onHide:()=>W(!1),toggleHard:er,toggleTheme:i}),(0,n.jsx)(w,{alert:r,alertType:g,clear:()=>{p(""),m(null)}}),(0,n.jsx)(q,{chances:3-T,onShowInstructions:()=>V(!0),onShowSettings:()=>W(!0)}),(0,n.jsx)(ey,{conversation:k,hard:S,metadata:E,ref:J}),(0,n.jsx)(eG,{loading:Y,message:G,onGuess:!v&&T<=3?()=>K(!0):()=>U(!0),onMessage:R,onReset:()=>C([]),onSubmit:!v&&T<=3?es:()=>U(!0)})]})}}},function(e){e.O(0,[976,948,974,888,774,179],function(){return e(e.s=8312)}),_N_E=e.O()}]);