"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9410],{89410:function(e,n,t){t.d(n,{Z:function(){return K}});var r=t(67294),a=t(25129),i=t(65177),o=t(60337),c=t(93430),s=t(66884),l=t(72519),u=t(97322),d=t(59499),m=t(48200),f=t(39393),h=t(37545),p=t(42698),g=t(7171),x=t(25543),v=t(48806),Z=t(12552),j=t(49665),b=t(39174),k=t(73279),N=t(85893),w=[{id:"landing",name:"landing",child:[{name:"ai_landing",link:l.Z.home},{name:"blockchain",link:l.Z.blockchain},{name:"wallet",link:l.Z.wallet},{name:"fintech",link:l.Z.fintech},{name:"avatar",link:l.Z.avatar},{name:"cv",link:l.Z.cv},{name:"nft",link:l.Z.nft},{name:"nft2",link:l.Z.nft2}]}];function y(e){var n=(0,b.Z)(),t=n.classes,a=n.cx,i=e.toggleDrawer,o=e.open,c=e.prefix,s=e.singleNav,u=(0,r.useState)({}),d=u[0];u[1];var y=(0,Z.$G)("common"),S=y.t,O=y.i18n,P=(0,r.useState)(""),_=P[0],D=P[1],C=(0,r.useState)(""),E=C[0],L=C[1],M=(0,r.useState)(""),q=M[0],T=M[1];(0,r.useEffect)(function(){D(window.location.href),L(window.location.origin),T("/"+O.language)},[]);var F=function(e,n){return(0,N.jsx)(v.Z,{in:e.samplePage||!1,timeout:"auto",unmountOnExit:!0,children:n.map(function(e,n){return(0,N.jsx)(f.Z,{className:t.groupChild,component:"div",disablePadding:!0,subheader:(0,N.jsx)(g.Z,{className:t.titleMega,disableSticky:!0,component:"div",id:"nested-list-subheader",children:S("header_"+e.name)}),children:e.child.map(function(e,n){return(0,N.jsx)(p.ZP,{className:a(t.noChild,_===E+q+e.link+"/"?t.current:""),component:j.Z,to:e.link,button:!0,children:(0,N.jsx)(x.Z,{className:t.menuList,primary:S("header_"+e.name)})},n.toString())})},n.toString())})})};return(0,N.jsx)(m.Z,{open:o,onClose:i,onOpen:i,anchor:"right",classes:{paper:t.paperNav},children:(0,N.jsx)("div",{className:t.mobileNav,role:"presentation",children:(0,N.jsxs)("div",{className:o?t.menuOpen:"",children:[(0,N.jsxs)(f.Z,{component:"nav",className:t.sideSinglelv,children:[[{id:"feature",name:"feature"},{id:"discover",name:"discover"},{id:"community",name:"community",link:"/"},{id:"faq",name:"faq"}].map(function(e){return(0,N.jsx)(r.Fragment,{children:e.link?(0,N.jsx)(p.ZP,{button:!0,component:j.Z,to:e.link,onClick:i,onKeyDown:i,children:(0,N.jsx)(x.Z,{primary:S("".concat(c,".header_")+e.name),className:t.menuList})}):s?(0,N.jsx)(p.ZP,{button:!0,component:"a",href:"#".concat(e.id),onClick:i,onKeyDown:i,children:(0,N.jsx)(x.Z,{primary:S("".concat(c,".header_")+e.name),className:t.menuList})}):(0,N.jsx)(p.ZP,{button:!0,component:j.Z,to:"/#".concat(e.id),onClick:i,onKeyDown:i,children:(0,N.jsx)(x.Z,{primary:S("".concat(c,".header_")+e.name),className:t.menuList})})},e.id)}),F(d,w),F(d,k.Z)]}),(0,N.jsx)(h.Z,{}),(0,N.jsx)(f.Z,{className:t.userMenu,children:["login","register"].map(function(e,n){return(0,N.jsx)(p.ZP,{className:a(t.noChild,_===E+q+"/"+e+"/"?t.current:""),component:j.Z,to:l.Z[e],button:!0,children:(0,N.jsx)(x.Z,{className:t.menuList,primary:S(""+e)})},n.toString())})})]})})})}y.defaultProps={singleNav:!1};var S=t(90116),O=t(39332),P=t(9460),_=t(84925),D=t.n(_),C=t(49986),E=t(95711);function L(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}var M=r.forwardRef(function(e,n){return(0,N.jsx)(D(),function(e){for(var n=1;n80;C!==n&&(d(n),C=n)};(0,r.useEffect)(function(){window.addEventListener("scroll",L)},[]);var M=function(){h(!f)};return(0,N.jsxs)(r.Fragment,{children:[D&&(0,N.jsx)(y,{open:f,toggleDrawer:M,prefix:P,singleNav:O}),(0,N.jsx)(a.Z,{position:"relative",id:"header",className:b(Z.header,g&&Z.noShadow,t&&Z.fixed,f&&Z.openDrawer),children:(0,N.jsx)(o.Z,{fixed:_,children:(0,N.jsxs)("div",{className:Z.headerContent,children:[(0,N.jsxs)("nav",{className:Z.navMenu,children:[(0,N.jsx)("div",{className:Z.logo,children:(0,N.jsx)(j.Z,{to:l.Z.home,children:(0,N.jsx)(u.Z,{class:!0,type:"landscape"})})}),_&&(0,N.jsx)("div",{className:Z.mainMenu,children:(0,N.jsx)(q,{open:g,toggle:function(){x(function(e){return!e})},close:function(){x(!1)},singleNav:O,prefix:P})})]}),(0,N.jsxs)("div",{className:Z.userMenu,children:[(0,N.jsx)(F.Z,{}),_&&(0,N.jsx)("span",{className:Z.vDivider}),(0,N.jsx)(T.Z,{toggleDark:w,toggleDir:S})]}),D&&(0,N.jsx)(i.Z,{onClick:M,className:b("hamburger hamburger--spin",Z.mobileMenu,f&&"is-active"),size:"large",children:(0,N.jsx)("span",{className:"hamburger-box",children:(0,N.jsx)("span",{className:b(Z.bar,"hamburger-inner")})})})]})})})]})}G.defaultProps={home:!1};var K=G},13568:function(e,n,t){var r=t(50029),a=t(64687),i=t.n(a),o=t(67294),c=t(9460),s=t(12552),l=t(11163),u=t(61202),d=t(72519),m=t(49665),f=t(85893);n.Z=function(){var e=(0,s.$G)("common").t;(0,l.useRouter)();var n=(0,o.useState)(!1),t=n[0],a=n[1],h=(0,o.useState)(""),p=h[0],g=h[1];return((0,o.useEffect)(function(){var e=localStorage.getItem("token");if(a(!!e),e)try{var n,t=(0,u.o)(e);g(t.username||""),(n=(0,r.Z)(i().mark(function n(){var r,a;return i().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,fetch("".concat("/api","/user/").concat(t.user_id),{headers:{Authorization:"Bearer ".concat(e)}});case 3:if(!(r=n.sent).ok){n.next=9;break}return n.next=7,r.json();case 7:a=n.sent,g(a.username||"");case 9:n.next=14;break;case 11:n.prev=11,n.t0=n.catch(0),console.error("获取用户信息失败:",n.t0);case 14:case"end":return n.stop()}},n,null,[[0,11]])})),function(){return n.apply(this,arguments)})()}catch(e){console.error("解析token失败:",e)}},[]),t)?(0,f.jsx)(c.Z,{component:m.Z,href:"/profile",color:"inherit",children:p||e("user_center")}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(c.Z,{component:m.Z,href:d.Z.login,color:"inherit",variant:"text",children:e("login")}),(0,f.jsx)(c.Z,{component:m.Z,href:d.Z.register,color:"inherit",variant:"contained",children:e("register")})]})}}}]);