1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7382],{10094:(e,t,r)=>{"use strict";r.d(t,{default:()=>b});var n=r(66114),l=r(25226),s=r(59802),i=r(36174),a=r.n(i),o=r(70697),c=r(19414),d=r(13923),u=r(67855),f=r(77037),g=r(6746),m=r(99496);function v(e){let{className:t,items:r,...i}=e,v=(0,d.usePathname)(),[h,p]=(0,l.useState)(!1),x=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50,[t,r]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{let n=()=>{let n=window.scrollY>e;n!==t&&r(n)};return n(),window.addEventListener("scroll",n,{passive:!0}),()=>window.removeEventListener("scroll",n)},[e,t]),t}(50),b=(0,g.c)("sidebar"),{user:y,setShowSignModal:w,setSignModalCallbackUrl:j}=(0,m.U)(),[N,k]=(0,l.useState)(!1),E=N&&!!y;(0,l.useEffect)(()=>{k(!0);let e=localStorage.getItem("sidebar_collapsed");null!==e&&p("true"===e)},[]);let S=x?"56px":"64px";return(0,n.jsxs)("div",{className:(0,c.cn)("flex-col transition-all duration-300 ease-in-out","hidden","lg:flex lg:fixed lg:left-0 lg:border-r lg:border-border lg:bg-background lg:z-40",h?"lg:w-16":"lg:w-64"),style:{top:"".concat(S),height:"calc(100vh - ".concat(S,")")},children:[(0,n.jsx)("nav",{className:(0,c.cn)("flex space-x-2 lg:flex-col lg:space-x-0 lg:space-y-1","lg:flex-1 lg:overflow-y-auto lg:pt-4 lg:px-2","lg:[&::-webkit-scrollbar]:w-1.5","lg:[&::-webkit-scrollbar-track]:bg-transparent","lg:[&::-webkit-scrollbar-thumb]:bg-muted-foreground/20","lg:[&::-webkit-scrollbar-thumb]:rounded-full","lg:[&::-webkit-scrollbar-thumb]:hover:bg-muted-foreground/40","overflow-x-auto scrollbar-hide lg:overflow-x-visible",t),...i,children:r.map((e,t)=>{if("divider"===e.name)return(0,n.jsx)("div",{className:"border-t border-border my-2 lg:my-2"},t);let r=(0,c.cn)((0,o.r)({variant:"ghost"}),v===e.url?"bg-muted/50 text-primary hover:bg-muted hover:text-primary":"hover:bg-transparent hover:underline","justify-start","flex-shrink-0 lg:flex-shrink",h&&"lg:justify-center lg:px-2"),l=(0,n.jsxs)(n.Fragment,{children:[e.icon&&(0,n.jsx)(s.default,{name:e.icon,className:(0,c.cn)("w-4 h-4 flex-shrink-0",!h&&"mr-2")}),!h&&(0,n.jsx)("span",{className:"truncate",children:e.title})]});return e.requireAuth&&!E?(0,n.jsx)("button",{type:"button",onClick:()=>{j(e.url),w(!0)},className:r,title:h?e.title:void 0,children:l},t):(0,n.jsx)(a(),{href:e.url||"",className:r,title:h?e.title:void 0,children:l},t)})}),(0,n.jsx)("div",{className:"hidden lg:block border-t border-border p-2",children:(0,n.jsx)("button",{onClick:()=>{let e=!h;p(e),localStorage.setItem("sidebar_collapsed",String(e)),window.dispatchEvent(new Event("sidebar-toggle"))},className:(0,c.cn)((0,o.r)({variant:"ghost"}),"w-full justify-start hover:bg-muted transition-all",h&&"justify-center px-2"),title:b(h?"expand":"collapse"),children:h?(0,n.jsx)(u.A,{className:"w-4 h-4 flex-shrink-0"}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(f.A,{className:"w-4 h-4 mr-2 flex-shrink-0"}),(0,n.jsx)("span",{className:"text-sm truncate",children:b("collapse_button")})]})})})]})}function h(e){let{items:t}=e,r=(0,d.usePathname)(),{user:i,setShowSignModal:o,setSignModalCallbackUrl:u}=(0,m.U)(),[f,g]=(0,l.useState)(!1);(0,l.useEffect)(()=>{g(!0)},[]);let v=f&&!!i,h=t.filter(e=>"divider"!==e.name&&"home"!==e.name);return(0,n.jsx)("nav",{className:"fixed bottom-0 left-0 right-0 z-50 bg-background border-t border-border lg:hidden",children:(0,n.jsx)("div",{className:"container max-w-7xl mx-auto",children:(0,n.jsx)("div",{className:"flex items-center justify-around h-16",children:h.map((e,t)=>{let l=r===e.url,i=(0,c.cn)("flex flex-col items-center justify-center flex-1 h-full gap-1 transition-colors",l?"text-primary":"text-muted-foreground hover:text-foreground"),d=(0,n.jsxs)(n.Fragment,{children:[e.icon&&(0,n.jsx)(s.default,{name:e.icon,className:(0,c.cn)("w-5 h-5",l&&"text-primary")}),(0,n.jsx)("span",{className:"text-xs font-medium",children:e.title})]});return e.requireAuth&&!v?(0,n.jsx)("button",{type:"button",onClick:()=>{u(e.url),o(!0)},className:i,children:d},t):(0,n.jsx)(a(),{href:e.url||"",className:i,children:d},t)})})})})}var p=r(63960);function x(){let e=(0,d.usePathname)(),t=(()=>
1{let t=e.split("/").filter(Boolean);return t.length>0&&p.IB.includes(t[0])?"/"+t.slice(1).join("/"):e})();return(0,n.jsx)("footer",{className:"hidden lg:block py-6 border-t border-border/40 bg-background mt-auto",children:(0,n.jsx)("div",{className:"flex items-center justify-center gap-4 text-sm text-muted-foreground",children:p.IB.map((e,r)=>(0,n.jsxs)("span",{className:"flex items-center gap-4",children:[(0,n.jsx)(a(),{href:e===p.q?t||"/":"/".concat(e).concat(t),className:"hover:text-foreground transition-colors",children:p.L$[e]}),r<p.IB.length-1&&(0,n.jsx)("span",{className:"text-border",children:"|"})]},e))})})}function b(e){var t,r,s,i;let{children:a,sidebar:o}=e,[d,u]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{u("true"===localStorage.getItem("sidebar_collapsed"));let e=()=>{u("true"===localStorage.getItem("sidebar_collapsed"))};return window.addEventListener("storage",e),window.addEventListener("sidebar-toggle",e),()=>{window.removeEventListener("storage",e),window.removeEventListener("sidebar-toggle",e)}},[]),(0,l.useEffect)(()=>(document.body.classList.add("console-page"),()=>{document.body.classList.remove("console-page")}),[]),(0,n.jsxs)(n.Fragment,{children:[(null==o||null==(t=o.nav)?void 0:t.items)&&(0,n.jsx)(v,{items:null==(r=o.nav)?void 0:r.items}),(0,n.jsxs)("div",{className:(0,c.cn)("min-h-screen flex flex-col transition-all duration-300 ease-in-out",d?"lg:ml-16":"lg:ml-64"),children:[(0,n.jsx)("main",{className:"flex-1 px-2 md:px-4 lg:px-6 py-4",children:(0,n.jsx)("div",{className:"max-w-full space-y-6 pb-24 lg:pb-16",children:a})}),(0,n.jsx)(x,{})]}),(null==o||null==(s=o.nav)?void 0:s.items)&&(0,n.jsx)(h,{items:null==(i=o.nav)?void 0:i.items})]})}},19414:(e,t,r)=>{"use strict";r.d(t,{cn:()=>s});var n=r(22593),l=r(89076);function s(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,l.QP)((0,n.$)(t))}},35868:(e,t,r)=>{"use strict";r.d(t,{lg:()=>n});let n=()=>Date.parse(new Date().toUTCString())/1e3},59802:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(66114);let l={Ri:r(29311)};function s(e){let{name:t,className:r,onClick:s}=e,i=function(e){let t=l[e.slice(0,2)];return t&&t[e]||null}(t);return i?(0,n.jsx)(i,{className:r,onClick:s,style:{cursor:s?"pointer":"default"}}):null}},63960:(e,t,r)=>{"use strict";r.d(t,{GB:()=>a,IB:()=>n,L$:()=>l,b:()=>i,q:()=>s,u7:()=>o});let n=["en","de","fr","ja","ru","ar"],l={en:"English",de:"Deutsch",fr:"Fran\xe7ais",ja:"æ¥æ¬èª",ru:"Ð ÑÑÑкий",ar:"Ø§ÙØ¹Ø±Ø¨ÙØ©"},s="en",i="as-needed",a=!1,o={en:{"privacy-policy":"/privacy-policy","terms-of-service":"/terms-of-service"},de:{"privacy-policy":"/privacy-policy","terms-of-service":"/terms-of-service"},fr:{"privacy-policy":"/privacy-policy","terms-of-service":"/terms-of-service"},ja:{"privacy-policy":"/privacy-policy","terms-of-service":"/terms-of-service"},ru:{"privacy-policy":"/privacy-policy","terms-of-service":"/terms-of-service"},ar:{"privacy-policy":"/privacy-policy","terms-of-service":"/terms-of-service"}}},70697:(e,t,r)=>{"use strict";r.d(t,{$:()=>c,r:()=>o});var n=r(66114),l=r(25226),s=r(86632),i=r(95609),a=r(19414);let o=(0,i.F)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),c=l.forwardRef((e,t)=>
1{let{className:r,variant:l,size:i,asChild:c=!1,...d}=e,u=c?s.DX:"button";return(0,n.jsx)(u,{className:(0,a.cn)(o({variant:l,size:i,className:r})),ref:t,...d})});c.displayName="Button"},78654:(e,t,r)=>{Promise.resolve().then(r.bind(r,10094)),Promise.resolve().then(r.bind(r,53402))},81837:(e,t,r)=>{"use strict";r.d(t,{PW:()=>s,np:()=>i,pr:()=>l});var n=r(35868);let l=e=>{let t=localStorage.getItem(e);if(!t)return null;let r=t.split(":");if(!r||r.length<2)return null;let l=Number(r[0]),s=(0,n.lg)();if(-1!==l&&l<s)return i(e),null;let a=r[0]+":";return t.replace(a,"")},s=(e,t,r)=>{localStorage.setItem(e,r+":"+t)},i=e=>{localStorage.removeItem(e)}},98266:(e,t,r)=>{"use strict";r.d(t,{wD:()=>n});let n={Theme:"THEME",InviteCode:"INVITE_CODE"}},99496:(e,t,r)=>{"use strict";r.d(t,{AppContextProvider:()=>m,U:()=>g});var n=r(66114),l=r(25226),s=r(81837),i=r(98266),a=r(93313),o=r.n(a),c=r(35932),d=r.n(c),u=r(96242);let f=(0,l.createContext)({}),g=()=>(0,l.useContext)(f),m=e=>{let{children:t}=e;!function(){let{data:e,status:t}=(0,u.wV)(),r=async function(){d()({client_id:"1001879172980-57n9n9b6ksdi1og787j91n02qf4uvte9.apps.googleusercontent.com",auto_select:!1,cancel_on_tap_outside:!1,context:"signin"},e=>{console.log("onetap login ok",e),s(e.credential)})},s=async function(e){console.log("signIn ok",await (0,u.Jv)("google-one-tap",{credential:e,redirect:!1}))};(0,l.useEffect)(()=>{if("unauthenticated"===t){r();let e=setInterval(()=>{r()},3e3);return()=>{clearInterval(e)}}},[t]),n.Fragment}();let{data:r}=(0,u.wV)(),[a,c]=(0,l.useState)(()=>"dark"),[g,m]=(0,l.useState)(!1),[v,h]=(0,l.useState)(void 0),[p,x]=(0,l.useState)(void 0),[b,y]=(0,l.useState)(null),[w,j]=(0,l.useState)(0),[N,k]=(0,l.useState)(!1),[E,S]=(0,l.useState)(!1),[_,I]=(0,l.useState)({}),C=e=>{I(e||{}),S(!0)},P=()=>{S(!1),I({})},L=async function(){try{let e=await fetch("/api/get-user-info",{method:"POST"});if(!e.ok)throw Error("fetch user info failed with status: "+e.status);let{code:t,message:r,data:n}=await e.json();if(0!==t)throw Error(r);y(n),B(n)}catch(e){console.log("fetch user info failed")}},D=()=>{j(e=>e+1)},B=async e=>{try{if(e.invited_by)return void console.log("user already been invited",e.invited_by);let t=(0,s.pr)(i.wD.InviteCode);if(!t)return;let r=o()(e.created_at).unix(),n=o()().unix(),l=Number(n-r);if(l<=0||l>7200)return void console.log("user created more than 2 hours");console.log("update invite",t,e.uuid);let a={invite_code:t,user_uuid:e.uuid},c=await fetch("/api/update-invite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!c.ok)throw Error("update invite failed with status: "+c.status);let{code:d,message:u,data:f}=await c.json();if(0!==d)throw Error(u);y(f),(0,s.np)(i.wD.InviteCode)}catch(e){console.log("update invite failed: ",e)}};(0,l.useEffect)(()=>{r&&r.user&&L()},[r]);let F=(0,l.useMemo)(()=>({theme:a,setTheme:c,showSignModal:g,setShowSignModal:m,signModalCallbackUrl:v,setSignModalCallbackUrl:h,signModalHint:p,setSignModalHint:x,user:b,setUser:y,refreshUserCredits:D,refreshCreditsFlag:w,showFeedback:N,setShowFeedback:k,showPricingModal:E,openPricingModal:C,closePricingModal:P,pricingModalConfig:_}),[a,g,v,p,b,w,N,E,_]);return(0,n.jsx)(f.Provider,{value:F,children:t})}}},e=>{e.O(0,[7276,8548,2100,9618,2714,6242,801,3251,6996,7358],()=>e(e.s=78654)),_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.