1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6308],{76792:function(e,n,r){var t=r(47568),i=r(26042),o=r(69396),a=r(828),s=r(20414),l=r(85893),c=r(60357),d=r.n(c),u=r(67294),x=r(11163),h=r(60253),p=r(36808),f=r.n(p),b=r(72091),m=r(17812),v=r(22318),g=r(91910),j=r(48777),y=r(49384),k=r(61164),w=r(13048),Z=r(92674),D=r(40570);n.Z=function(e){var n=e.user,r=e.onUserUpdate,c=(0,a.Z)((0,k.o)(),1)[0].auth,p=(0,w.Z)(c&&(null===n||void 0===n?void 0:n.ID)?"/auth/user/".concat(n.ID,"/follower"):null),I=p.data,S=p.mutate,C=(0,x.useRouter)(),_=(0,h.$G)().t,N=(0,b.Ds)().enqueueSnackbar,U=(0,Z.Z)(),z=(0,a.Z)(u.useState(!1),2),E=z[0],P=z[1],F=(0,a.Z)(u.useState(!1),2),R=F[0],T=F[1],G=!(!c||!(null===I||void 0===I?void 0:I.length)),q=u.useMemo((function(){return!(c&&!I)&&((null===c||void 0===c?void 0:c.ID)!==(null===n||void 0===n?void 0:n.ID)&&!(null===n||void 0===n?void 0:n.DeletedAt))}),[c,I,null===n||void 0===n?void 0:n.DeletedAt,null===n||void 0===n?void 0:n.ID]),M=u.useCallback((function(){return T(!0)}),[]),O=u.useCallback((function(){return T(!1)}),[]),W=u.useCallback((0,t.Z)((function(){var e,t;return(0,s.__generator)(this,(function(a){switch(a.label){case 0:P(!0),a.label=1;case 1:return a.trys.push([1,6,,7]),c?[3,3]:(f().set("return_to",C.asPath,{expires:1,secure:!0,sameSite:"lax"}),[4,C.push("/signup")]);case 2:return a.sent(),[2];case 3:return c.Unconfirmed?(f().set("return_to",C.asPath,{expires:1,secure:!0,sameSite:"lax"}),[4,C.push("/auth/unconfirmed")]):[3,5];case 4:return a.sent(),[2];case 5:return[3,7];case 6:return e=a.sent(),(0,y.kg)(e),N(_("failed-to-follow"),{variant:"error"}),P(!1),[2];case 7:if(a.trys.push([7,10,,11]),!(null===n||void 0===n?void 0:n.ID))throw new Error("user.ID is undefined");return[4,U("/auth/user/".concat(n.ID,"/follower"),{method:"POST"})];case 8:return a.sent(),[4,S([{}],!1)];case 9:return a.sent(),r((0,o.Z)((0,i.Z)({},n),{FollowerCount:(n.FollowerCount||0)+1})),[3,11];case 10:return t=a.sent(),(0,y.kg)(t),N(_("failed-to-follow"),{variant:"error"}),P(!1),[2];case 11:return P(!1),[2]}}))})),[c,N,U,S,r,C,_,n]),L=u.useCallback((0,t.Z)((function(){var e;return(0,s.__generator)(this,(function(t){switch(t.label){case 0:P(!0),t.label=1;case 1:if(t.trys.push([1,4,,5]),!(null===n||void 0===n?void 0:n.ID))throw new Error("user.ID is undefined");return[4,U("/auth/user/".concat(n.ID,"/follower"),{method:"DELETE"})];case 2:return t.sent(),[4,S([],!1)];case 3:return t.sent(),r((0,o.Z)((0,i.Z)({},n),{FollowerCount:(n.FollowerCount||1)-1})),[3,5];case 4:return e=t.sent(),(0,y.kg)(e),N(_("failed-to-unfollow"),{variant:"error"}),P(!1),[2];case 5:return P(!1),[2]}}))})),[N,U,S,r,_,n]);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"jsx-e20212abf16b2b5 sm",children:[(0,l.jsx)(v.Z,{component:"div",variant:"caption",style:{opacity:q?1:.38,marginBottom:"-8px",textAlign:"center"},children:_("follow")}),G&&(0,l.jsx)(m.Z,{disabled:E,onClick:L,children:(0,l.jsx)(g.Z,{style:{color:"#FFEB3B"}})}),!G&&(0,l.jsx)(m.Z,{disabled:E||!q,onClick:W,children:(0,l.jsx)(j.Z,{})})]}),(0,l.jsxs)("div",{className:"jsx-e20212abf16b2b5 lg",children:[G&&(0,l.jsx)(D.Z,{color:R?"error":"default",disabled:E,variant:R?"contained":"outlined",style:{borderRadius:"18px"},onClick:L,onMouseEnter:M,onMouseLeave:O,children:_(R?"unfollow":"following")}),!G&&(0,l.jsx)(D.Z,{color:"primary",disabled:E||!q,variant:"contained",style:{borderRadius:"18px"},onClick:W,children:_("follow")})]}),(0,l.jsx)(d(),{id:"e20212abf16b2b5",children:".lg.jsx-e20212abf16b2b5{display:none}@media(min-width:360px){.sm.jsx-e20212abf16b2b5{display:none}.lg.jsx-e20212abf16b2b5{display:block}}"})]})}},78538:function(e,n,r){var t=r(85893),i=r(67294),o=r(60253),a=r(32427),s=r(94697),l=r(90227),c=r(76792),d=r(52803),u=r(57308),x=(0,a.Z)((function(){return{content:{overflow:"hidden"},action:{alignSelf:"center",marginTop:"0"}}}));n.Z=function(e){var n=e.user,r=e.subheader,a=e.style,h=e.onUserUpdate,p=(0,o.$G)().t,f=x(),b=i.useMemo((function(){return(null===n||void 0===n?void 0:n.ID)?"/user/".concat(n.ID.toString(36)):""}),[null===n||void 0===n?void 0:n.ID]);return(0,t.jsx)(s.Z,{classes:f,avatar:(0,t.jsx)(l.Z,{user:n,onUserUpdate:h}),title:(0,t.jsx)(u.Z,{href:b,children:(null===n||void 0===n?void 0:n.Name)||p("guest")}),titleTypographyProps:{noWrap:!0},subheader:r||(0,t.jsx)(d.Z,{user:n}),action:(0,t.jsx)(c.Z,{user:n,onUserUpdate:h}),style:a})}}
1,52803:function(e,n,r){var t=r(828),i=r(85893),o=r(60357),a=r.n(o),s=(r(67294),r(60253)),l=r(61164),c=r(13048);n.Z=function(e){var n=e.user,r=(0,t.Z)((0,l.o)(),1)[0].auth,o=(0,c.Z)(r&&(null===n||void 0===n?void 0:n.ID)?"/auth/user/".concat(n.ID,"/following-user"):null).data,d=(0,s.$G)().t;return(null===o||void 0===o?void 0:o.length)?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"jsx-1407cc0596a3aa55",children:d("is-following-you")}),(0,i.jsx)(a(),{id:"1407cc0596a3aa55",children:"span.jsx-1407cc0596a3aa55{background-color:#eee}"})]}):null}},85470:function(e,n,r){r.d(n,{Z:function(){return F}});var t=r(828),i=r(85893),o=r(67294),a=r(11163),s=r(60253),l=r(18463),c=r(79912),d=r(86263),u=r(73844),x=r(22318),h=r(13048),p=r(47568),f=r(20414),b=r(60357),m=r.n(b),v=r(36808),g=r.n(v),j=r(72091),y=r(52663),k=r(66856),w=r(29525),Z=r(7212),D=r(66083),I=r(55517),S=r(7397),C=r(39803),_=r(49384),N=r(61164),U=r(92674),z=r(40570),E=function(e){var n,r,d,u,h,b,v,E,P,F,R,T,G=e.disabled,q=e.products,M=e.user,O=e.onDisabledUpdate,W=(0,a.useRouter)(),L=W.locale,$=(0,s.$G)().t,A=(0,j.Ds)().enqueueSnackbar,B=(0,t.Z)((0,N.o)(),1)[0].auth,J=(0,U.Z)(),H=(0,t.Z)(o.useState(""),2),V=H[0],Y=H[1],K=(0,t.Z)(o.useState(!1),2),Q=K[0],X=K[1],ee=(0,t.Z)(o.useState(""),2),ne=ee[0],re=ee[1],te=(null===q||void 0===q||null===(n=q[0])||void 0===n||null===(r=n.Prices)||void 0===r?void 0:r[0].Amount)||0,ie=(te/100).toLocaleString();if("ja"===L)d="\u5e83\u544a\u4e3b\u5411\u3051",u="\u304a\u597d\u304d\u306a\u91d1\u984d\u3092\u9078\u629e",h="\u6708\u984d ".concat(ie," USD \uff5e"),b="".concat((null===M||void 0===M?void 0:M.Name)||$("guest")||"","\u3055\u3093\u306e\u3059\u3079\u3066\u306e\u30d7\u30ec\u30df\u30a2\u30e0\u30b3\u30f3\u30c6\u30f3\u30c4\u304c\u898b\u3089\u308c\u307e\u3059"),v="\u304a\u5ba2\u69d8\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u304c".concat((null===M||void 0===M?void 0:M.Name)||$("guest")||"","\u3055\u3093\u306e\u30da\u30fc\u30b8\u306b\u30b9\u30dd\u30f3\u30b5\u30fc\u3068\u3057\u3066\u8868\u793a\u3055\u308c\u307e\u3059"),E="\u3088\u308a\u591a\u304f\u306e\u91d1\u984d\u3092\u652f\u6255\u3046\u30b9\u30dd\u30f3\u30b5\u30fc\u304c\u4ed6\u306e\u30b9\u30dd\u30f3\u30b5\u30fc\u306b\u512a\u5148\u3057\u3066\u8868\u793a\u3055\u308c\u307e\u3059",P
1="\u5e83\u544a\u3084\u30d7\u30ed\u30e2\u30fc\u30b7\u30e7\u30f3\u306b\u6700\u9069\u3067\u3059",F="\u6708\u984d\u6599\u91d1\u3092\u8a2d\u5b9a",R="\u30b9\u30dd\u30f3\u30b5\u30fc\u3068\u3057\u3066\u652f\u6255\u3046\u6708\u984d\u6599\u91d1\u3092\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044",T="\u6700\u5c0f\u91d1\u984d ".concat(ie," USD");else d="For advertisers",u="Pay what you want",h="Minimum ".concat(ie," USD / month"),b="Unlimited access to ".concat((null===M||void 0===M?void 0:M.Name)||$("guest")||"","'s premium content"),v="Your account will be featured as a sponsor on ".concat((null===M||void 0===M?void 0:M.Name)||$("guest")||"","'s page"),E="The more you contribute, the more prominently your account will appear compared to other sponsors",P="Good for advertisement/promotion",F="Set your monthly fee",R="Set the monthly fee you will pay as a sponsor",T="Minimum ".concat(ie," USD");var oe=o.useCallback((0,p.Z)((function(){var e;return(0,f.__generator)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,5,,6]),B?[3,2]:(g().set("return_to",W.asPath,{expires:1,secure:!0,sameSite:"lax"}),[4,W.push("/signup")]);case 1:case 3:return n.sent(),[2];case 2:return B.Unconfirmed?(g().set("return_to",W.asPath,{expires:1,secure:!0,sameSite:"lax"}),[4,W.push("/auth/unconfirmed")]):[3,4];case 4:return[3,6];case 5:return e=n.sent(),(0,_.kg)(e),A($("failed-to-subscribe"),{variant:"error"}),[2];case 6:return X(!0),[2]}}))})),[B,A,W,$]),ae=o.useCallback((function(){return X(!1)}),[]),se=o.useCallback((function(e){re(e.target.value),Y("")}),[]),le=o.useCallback((0,p.Z)((function(){var e,n,r,t;return(0,f.__generator)(this,(function(i){switch(i.label){case 0:if(!ne)return Y($("monthly-fee-is-required")),[2];if(100*Number(ne)<te){if("ja"===L)e="\u6708\u984d\u6599\u91d1\u306f ".concat(ie," USD \u4ee5\u4e0a\u306b\u3057\u3066\u304f\u3060\u3055\u3044");else e="Monthly fee must be ".concat(ie," USD or more");return Y(e),[2]}O(!0),i.label=1;case 1:if(i.trys.push([1,4,,5]),!(null===M||void 0===M?void 0:M.ID))throw new Error("user.ID is undefined");return n=JSON.stringify({amount:100*Number(ne)}),[4,J("/auth/user/".concat(M.ID,"/subscription"),{method:"POST",body:n})];case 2:if(!(null===(r=i.sent())||void 0===r?void 0:r.ID))throw new Error("newSubscription.ID is undefined");return[4,W.push("/auth/subscription/".concat(r.ID,"/pay"))];case 3:return i.sent(),[3,5];case 4:return t=i.sent(),(0,_.kg)(t),A($("failed-to-subscribe"),{variant:"error"}),O(!1),[3,5];case 5:return[2]}}
1))})),[ne,te,O,$,L,ie,null===M||void 0===M?void 0:M.ID,J,W,A]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.Z,{variant:"outlined",children:(0,i.jsxs)(c.Z,{children:[(0,i.jsx)(x.Z,{variant:"h5",style:{fontWeight:"bold"},children:$("sponsor")}),(0,i.jsx)(x.Z,{variant:"body1",children:d}),(0,i.jsx)("div",{style:{display:"flex",alignItems:"center",height:"104px",marginBottom:"16px"},className:"jsx-4a03282cb0527a54",children:(0,i.jsxs)("div",{className:"jsx-4a03282cb0527a54",children:[(0,i.jsx)(x.Z,{variant:"h6",children:u}),(0,i.jsx)(x.Z,{variant:"body2",children:h})]})}),(0,i.jsx)(z.Z,{color:"primary",disabled:G||!(null===q||void 0===q?void 0:q.length),fullWidth:!0,variant:"contained",onClick:oe,children:$("subscribe-now")}),(0,i.jsx)(I.Z,{style:{margin:"24px 0"}}),(0,i.jsxs)(x.Z,{component:"ul",variant:"body2",style:{paddingLeft:"16px"},children:[(0,i.jsx)("li",{className:"jsx-4a03282cb0527a54",children:b}),(0,i.jsx)("li",{className:"jsx-4a03282cb0527a54",children:v}),(0,i.jsx)("li",{className:"jsx-4a03282cb0527a54",children:E}),(0,i.jsx)("li",{className:"jsx-4a03282cb0527a54",children:P})]})]})}),(0,i.jsxs)(y.Z,{maxWidth:"xs",open:Q,onClose:ae,children:[(0,i.jsx)(D.Z,{children:F}),(0,i.jsxs)(w.Z,{children:[(0,i.jsx)(Z.Z,{children:R}),(0,i.jsx)(C.Z,{value:ne,label:$("monthly-fee"),helperText:V||T,error:!!V,autoComplete:"off",disabled:G,fullWidth:!0,InputProps:{endAdornment:(0,i.jsx)(S.Z,{position:"end",children:"USD"})},required:!0,type:"number",variant:"outlined",onChange:se})]}),(0,i.jsxs)(k.Z,{children:[(0,i.jsx)(z.Z,{disabled:G,onClick:ae,children:$("cancel")}),(0,i.jsx)(z.Z,{disabled:G,onClick:le,children:$("continue")})]})]}),(0,i.jsx)(m(),{id:"4a03282cb0527a54",children:"li.jsx-4a03282cb0527a54{margin-top:8px;overflow-wrap:break-word}"})]})},P=function(e){var n,r,d,u,h,b=e.disabled,v=e.products,y=e.user,k=e.onDisabledUpdate,w=(0,a.useRouter)(),Z=w.locale,D=(0,s.$G)().t,S=(0,j.Ds)().enqueueSnackbar,C=(0,t.Z)((0,N.o)(),1)[0].auth,E=(0,U.Z)(),P=null===v||void 0===v||null===(n=v[0])||void 0===n||null===(r=n.Prices)||void 0===r?void 0:r[0],F=(null===P||void 0===P?void 0:P.Amount)||0;if("ja"===Z)d="\u3059\u3079\u3066\u306e\u30e6\u30fc\u30b6\u5411\u3051",u="\u6708\u984d ".concat((F/100).toLocaleString()," USD"),h="".concat((null===y||void 0===y?void 0:y.Name)||D("guest")||"","\u3055\u3093\u306e\u3059\u3079\u3066\u306e\u30d7\u30ec\u30df\u30a2\u30e0\u30b3\u30f3\u30c6\u30f3\u30c4\u304c\u898b\u3089\u308c\u307e\u3059");else d="For all users",u="".concat((F/100).toLocaleString()," USD / month"),h="Unlimited access to ".concat((null===y||void 0===y?void 0:y.Name)||D("guest")||"","'s premium content");var R=o.useCallback((0,p.Z)((function(){var e,n,r;return(0,f.__generator)(this,(function(t){switch(t.label){case 0:return t.trys.push([0,5,,6]),C?[3,2]:(g().set("return_to",w.asPath,{expires:1,secure:!0,sameSite:"lax"}),[4,w.push("/signup")]);case 1:return t.sent(),[2];case 2:return C.Unconfirmed?(g().set("return_to",w.asPath,{expires:1,secure:!0,sameSite:"lax"}),[4,w.push("/auth/unconfirmed")]):[3,4];case 3:return t.sent(),[2];case 4:return[3,6];case 5:return e=t.sent(),(0,_.kg)(e),S(D("failed-to-subscribe"),{variant:"error"}),[2];case 6:k(!0),t.label=7;case 7:if(t.trys.push([7,10,,11]),!(null===P||void 0===P?void 0:P.ID))throw new Error("price.ID is undefined");return[4,E("/auth/price/".concat(P.ID,"/subscription"),{method:"POST"})];case 8:if(!(null===(n=t.sent())||void 0===n?void 0:n.ID))throw new Error("newSubscription.ID is undefined");return[4,w.push("/auth/subscription/".concat(n.ID,"/pay"))];case 9:return t.sent(),[3,11];case 10:return r=t.sent(),(0,_.kg)(r),S(D("failed-to-subscribe"),{variant:"error"}),k(!1),[3,11];case 11:return[2]}}
1))})),[C,S,E,k,null===P||void 0===P?void 0:P.ID,w,D]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.Z,{variant:"outlined",children:(0,i.jsxs)(c.Z,{children:[(0,i.jsx)(x.Z,{variant:"h5",style:{fontWeight:"bold"},children:D("standard")}),(0,i.jsx)(x.Z,{variant:"body1",children:d}),(0,i.jsx)(x.Z,{variant:"h6",style:{display:"flex",alignItems:"center",height:"104px",marginBottom:"16px"},children:u}),(0,i.jsx)(z.Z,{color:"primary",disabled:b||!(null===v||void 0===v?void 0:v.length),fullWidth:!0,variant:"contained",onClick:R,children:D("subscribe-now")}),(0,i.jsx)(I.Z,{style:{margin:"24px 0"}}),(0,i.jsx)(x.Z,{component:"ul",variant:"body2",style:{paddingLeft:"16px"},children:(0,i.jsx)("li",{className:"jsx-4a03282cb0527a54",children:h})})]})}),(0,i.jsx)(m(),{id:"4a03282cb0527a54",children:"li.jsx-4a03282cb0527a54{margin-top:8px;overflow-wrap:break-word}"})]})},F=function(e){var n,r,p=e.content.User,f=(0,h.Z)((null===p||void 0===p?void 0:p.ID)?"/user/".concat(p.ID,"/product"):null).data,b=(0,a.useRouter)().locale,m=(0,s.$G)().t,v=(0,t.Z)(o.useState(!1),2),g=v[0],j=v[1];if("ja"===b)n="\u3053\u306e\u6295\u7a3f\u306f\u30d7\u30ec\u30df\u30a2\u30e0\u30b3\u30f3\u30c6\u30f3\u30c4\u3067\u3059",r="".concat((null===p||void 0===p?void 0:p.Name)||m("guest")||"","\u3055\u3093\u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u3068\u3001\u305d\u306e\u3059\u3079\u3066\u306e\u30d7\u30ec\u30df\u30a2\u30e0\u30b3\u30f3\u30c6\u30f3\u30c4\u304c\u898b\u3089\u308c\u307e\u3059\uff01");else n="Unlock premium content by subscribing",r="Show your support for ".concat((null===p||void 0===p?void 0:p.Name)||m("guest")||""," and gain full\n access to premium content. Choose a plan and start enjoying\n exclusive benefits today!");var y=o.useCallback((function(e){return j(e)}),[]);return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(l.Z,{children:(0,i.jsxs)(c.Z,{children:[(0,i.jsx)(x.Z,{variant:"h6",children:n}),(0,i.jsx)(x.Z,{variant:"body1",style:{margin:"8px 0 24px",overflowWrap:"break-word"},children:r}),(0,i.jsxs)(d.Z,{children:[(0,i.jsx)(u.Z,{sm:6,children:(0,i.jsx)(P,{disabled:g,products:f,user:p,onDisabledUpdate:y})}),(0,i.jsx)(u.Z,{sm:6,children:(0,i.jsx)(E,{disabled:g,products:f,user:p,onDisabledUpdate:y})})]})]})})})}},35762:function(e,n,r){r.d(n,{Z:function(){return O}});var t=r(14924),i=r(85893),o=r(67294),a=r(60253),s=r(32427),l=r(79895),c=r(82285),d=r(16801),u=r(43931),x=r(60357),h=r.n(x),p=r(30313),f=r(22318),b=r(57308),m=(0,s.Z)((function(){return{root:{width:"100%"}}})),v=function(e){var n=e.href,r=e.icon,t=e.label,o=m();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(b.Z,{href:n,style:{flexGrow:1,width:"100%"},children:(0,i.jsx)(p.Z,{classes:o,children:(0,i.jsxs)("span",{className:"jsx-87934d0675b2dd42 container",children:[(0,i.jsx)("span",{className:"jsx-87934d0675b2dd42",children:r}),(0,i.jsx)(f.Z,{component:"span",display:"block",noWrap:!0,variant:"caption",style:{paddingTop:"4px",lineHeight:"16px"},children:t})]})})}),(0,i.jsx)(h(),{id:"87934d0675b2dd42",children:".container.jsx-87934d0675b2dd42{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-moz-box-orient:vertical;-moz-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;width:100%}.container.jsx-87934d0675b2dd42>span.jsx-87934d0675b2dd42{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-moz-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;width:100%;min-width:48px;max-width:64px;height:32px}"})]})},g=r(47568),j=r(828),y=r(20414),k=r(11163),w=r(36808),Z=r.n(w),D=r(72091),I=r(54889),S=r(29096),C=r(49384),_=r(61164),N=r(13048),U=r(92674),z=(0,s.Z)((function(){return{root:{flexGrow:1,width:"100%"}}})),E=function(e){var n=e.content,r=e.page,t=(0,j.Z)((0,_.o)(),1)[0].auth,s=(0,N.Z)(t&&(null===n||void 0===n?void 0:n.ID)?"/auth/content/".concat(n.ID,"/bookmark"):null),l=s.data,c=s.mutate,d=(0,k.useRouter)(),u=(0,a.$G)().t,x=(0,D.Ds)().enqueueSnackbar,b=z(),m=(0,U.Z)(),v=(0,j.Z)(o.useState(!1),2),w=v[0],E=v[1],P=null===l||void 0===l?void 0:l[0],F=!(!t||!(null===l||void 0===l?void 0:l.length)),R=o.useCallback((0,g.Z)((function(){var e,i,o,a;return(0,y.__generator)(this,(function(s){switch(s.label){case 0:E(!0),s.label=1;case 1:return s.trys.push([1,6,,7]),t?[3,3]:(Z().set("return_to",d.asPath,{expires:1,secure:!0,sameSite:"lax"}),[4,d.push("/signup")]);case 2:return s.sent(),[2];case 3:return t.Unconfirmed?(Z().set("return_to",d.asPath,{expires:1,secure:!0,sameSite:"lax"}),[4,d.push("/auth/unconfirmed")]):[3,5];case 4:return s.sent(),[2];case 5:return[3,7];case 6:return e=s.sent(),(0,C.kg)(e),x(u("failed-to-bookmark"),{variant:"error"}),E(!1),[2];case 7:if(s.trys.push([7,10,,11]),!(null===n||void 0===n?void 0:n.ID))throw new Error("content.ID is undefined");return i=JSON.stringify({content_id:n.ID,page_id:(null===r||void 0===r?void 0:r.ID)||0}),[4,m("/auth/bookmark",{method:"POST",body:i})];case 8:if(null===(o=s.sent()))throw new Error("newBookmark is null");return[4,c([o],!1)];case 9:return s.sent(),[3,11];case 10:return a=s.sent(),(0,C.kg)(a),x(u("failed-to-bookmark"),{variant:"error"}),E(!1),[2];case 11:return E(!1),[2]}}))})),[t,null===n||void 0===n?void 0:n.ID,x,m,c,null===r||void 0===r?void 0:r.ID,d,u]),T=o.useCallback((0,g.Z)((function(){var e;return(0,y.__generator)(this,(function(n){switch(n.label){case 0:E(!0),n.label=1;case 1:if(n.trys.push([1,4,,5]),!(null===P||void 0===P?void 0:P.ID))throw new Error("bookmark.ID is undefined");return[4,m("/auth/bookmark/".concat(P.ID),{method:"DELETE"})];case 2:return n.sent(),[4,c([],!1)];case 3:return n.sent(),[3,5];case 4:return e=n.sent(),(0,C.kg)(e),x(u("failed-to-delete-bookmark"),{variant:"error"}),E(!1),[2];case 5:return E(!1),[2]}}))})),[null===P||void 0===P?void 0:P.ID,x,m,c,u]),G=o.useCallback((0,g.Z)((function(){return(0,y.__generator)(this,(function(e){switch(e.label){case 0:return F?[4,T()]:[3,2];case 1:return e.sent(),[3,4];case 2:return[4,R()];case 3:e.sent(),e.label=4;case 4:return[2]}}
1))})),[R,F,T]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(p.Z,{classes:b,disabled:w,disableRipple:!0,onClick:G,children:(0,i.jsxs)("span",{className:"jsx-87934d0675b2dd42 "+h().dynamic([["11fbebf22eacc4c5",[w?.38:1]]])+" container",children:[(0,i.jsx)("span",{className:"jsx-87934d0675b2dd42 "+h().dynamic([["11fbebf22eacc4c5",[w?.38:1]]]),children:F?(0,i.jsx)(S.Z,{color:"primary"}):(0,i.jsx)(I.Z,{})}),(0,i.jsx)(f.Z,{component:"span",display:"block",noWrap:!0,variant:"caption",style:{paddingTop:"4px",lineHeight:"16px"},children:u(F?"saved":"save")})]})}),(0,i.jsx)(h(),{id:"11fbebf22eacc4c5",dynamic:[w?.38:1],children:".container.__jsx-style-dynamic-selector{opacity:".concat(w?.38:1,"}")}),(0,i.jsx)(h(),{id:"87934d0675b2dd42",children:".container.jsx-87934d0675b2dd42{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-moz-box-orient:vertical;-moz-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;width:100%}.container.jsx-87934d0675b2dd42>span.jsx-87934d0675b2dd42{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-moz-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;width:100%;min-width:48px;max-width:64px;height:32px}"})]})},P=r(26042),F=r(69396),R=r(93365),T=r(31056),G=(0,s.Z)((function(){return{root:{flexGrow:1,width:"100%"}}})),q=function(e){var n,r=e.content,t=e.onContentUpdate,s=(0,j.Z)((0,_.o)(),1)[0].auth,l=(0,N.Z)(s&&(null===r||void 0===r?void 0:r.ID)?"/auth/content/".concat(r.ID,"/rating"):null),c=l.data,d=l.mutate,u=(0,k.useRouter)(),x=(0,a.$G)().t,b=(0,D.Ds)().enqueueSnackbar,m=G(),v=(0,U.Z)(),w=(0,j.Z)(o.useState(!1),2),I=w[0],S=w[1],z=!(!s||!(null===c||void 0===c||null===(n=c[0])||void 0===n?void 0:n.Value)),E=o.useCallback((0,g.Z)((function(){var e,n;return(0,y.__generator)(this,(function(i){switch(i.label){case 0:S(!0),i.label=1;case 1:if(i.trys.push([1,4,,5]),!(null===r||void 0===r?void 0:r.ID))throw new Error("content.ID is undefined");return[4,v("/auth/content/".concat(r.ID,"/rating:unlike"),{method:"PUT"})];case 2:if(null===(e=i.sent()))throw new Error("newRating is null");return[4,d([e],!1)];case 3:return i.sent(),t((0,F.Z)((0,P.Z)({},r),{RatingCount:(r.RatingCount||1)-1})),[3,5];case 4:return n=i.sent(),(0,C.kg)(n),b(x("failed-to-unlike"),{variant:"error"}),S(!1),[2];case 5:return S(!1),[2]}}))})),[r,b,v,d,t,x]),q=o.useCallback((0,g.Z)((function(){var e,n,i;return(0,y.__generator)(this,(function(o){switch(o.label){case 0:S(!0),o.label=1;case 1:return o.trys.push([1,6,,7]),s?[3,3]:(Z().set("return_to",u.asPath,{expires:1,secure:!0,sameSite:"lax"}),[4,u.push("/signup")]);case 2:return o.sent(),[2];case 3:return s.Unconfirmed?(Z().set("return_to",u.asPath,{expires:1,secure:!0,sameSite:"lax"}),[4,u.push("/auth/unconfirmed")]):[3,5];case 4:return o.sent(),[2];case 5:return[3,7];case 6:return e=o.sent(),(0,C.kg)(e),b(x("failed-to-like"),{variant:"error"}),S(!1),[2];case 7:if(o.trys.push([7,10,,11]),!(null===r||void 0===r?void 0:r.ID))throw new Error("content.ID is undefined");return[4,v("/auth/content/".concat(r.ID,"/rating:like"),{method:"PUT"})];case 8:if(null===(n=o.sent()))throw new Error("newRating is null");return[4,d([n],!1)];case 9:return o.sent(),t((0,F.Z)((0,P.Z)({},r),{RatingCount:(r.RatingCount||0)+1})),[3,11];case 10:return i=o.sent(),(0,C.kg)(i),b(x("failed-to-like"),{variant:"error"}),S(!1),[2];case 11:return S(!1),[2]}}))})),[s,r,b,v,d,t,u,x]),M=o.useCallback((0,g.Z)((function(){return(0,y.__generator)(this,(function(e){switch(e.label){case 0:return z?[4,E()]:[3,2];case 1:return e.sent(),[3,4];case 2:return[4,q()];case 3:e.sent(),e.label=4;case 4:return[2]}}
1))})),[z,q,E]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(p.Z,{classes:m,disabled:I,disableRipple:!0,onClick:M,children:(0,i.jsxs)("span",{className:"jsx-87934d0675b2dd42 "+h().dynamic([["11fbebf22eacc4c5",[I?.38:1]]])+" container",children:[(0,i.jsx)("span",{className:"jsx-87934d0675b2dd42 "+h().dynamic([["11fbebf22eacc4c5",[I?.38:1]]]),children:z?(0,i.jsx)(R.Z,{color:"secondary"}):(0,i.jsx)(T.Z,{})}),(0,i.jsx)(f.Z,{component:"span",display:"block",noWrap:!0,variant:"caption",style:{paddingTop:"4px",lineHeight:"16px"},children:x("like")})]})}),(0,i.jsx)(h(),{id:"11fbebf22eacc4c5",dynamic:[I?.38:1],children:".container.__jsx-style-dynamic-selector{opacity:".concat(I?.38:1,"}")}),(0,i.jsx)(h(),{id:"87934d0675b2dd42",children:".container.jsx-87934d0675b2dd42{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-moz-box-orient:vertical;-moz-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;width:100%}.container.jsx-87934d0675b2dd42>span.jsx-87934d0675b2dd42{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-moz-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;width:100%;min-width:48px;max-width:64px;height:32px}"})]})},M=(0,s.Z)((function(e){return{root:(0,t.Z)({display:"flex",justifyContent:"space-between",position:"fixed",right:0,bottom:0,zIndex:2,width:"100%",padding:"12px 0px 16px",backgroundColor:"#f5f5f5"},e.breakpoints.up("sm"),{width:"360px"})}})),O=function(e){var n=e.content,r=e.page,t=e.show,s=e.onContentUpdate,x=(0,a.$G)().t,h=M(),p=o.useMemo((function(){return(null===n||void 0===n?void 0:n.ID)?"/post/".concat(n.ID.toString(36)):""}),[null===n||void 0===n?void 0:n.ID]);return(0,i.jsx)(c.Z,{direction:"up",in:t,children:(0,i.jsxs)(l.Z,{classes:h,elevation:8,children:[(0,i.jsx)(q,{content:n,onContentUpdate:s}),(0,i.jsx)(v,{href:"".concat(p,"/comment"),icon:(0,i.jsx)(d.Z,{}),label:x("comment")}),(0,i.jsx)(E,{content:n,page:r}),(0,i.jsx)(v,{href:"".concat(p,"/share"),icon:(0,i.jsx)(u.Z,{}),label:x("share")})]})})}},59746:function(e,n,r){r.d(n,{Z:function(){return y}});
1var t=r(828),i=r(85893),o=r(60357),a=r.n(o),s=r(67294),l=r(5152),c=r.n(l),d=r(26042),u=r(69396),x=r(29815),h=r(57555),p=function(e){var n=e.type,r=e.attrs,t=e.marks,i=e.content,o=[];if(i&&!(0,h.yD)(i)&&(o=i.map((function(e){return p(e)}))),"text"===n){for(var a=e.text||"",s=(t||[]).length-1;s>=0;s-=1){var l=null===t||void 0===t?void 0:t[s];"string"===typeof l?a={inline:!0,type:l,children:[a]}:l&&(a={inline:!0,type:l.type,attrs:l.attrs,children:[a]})}return a}return{inline:!1,type:n,attrs:r,children:o}},f=function(e,n){var r,t;return"string"!==typeof e&&"string"!==typeof n&&(!(!e.inline||!n.inline)&&(e.type===n.type&&(("link"!==e.type||(null===(r=e.attrs)||void 0===r?void 0:r.href)===(null===(t=n.attrs)||void 0===t?void 0:t.href))&&(0,u.Z)((0,d.Z)({},e),{children:(0,x.Z)(e.children).concat((0,x.Z)(n.children))}))))},b=function(e){if("string"!==typeof e){for(var n=e.children.length-2;n>=0;n-=1){var r=e.children[n],t=e.children[n+1],i=f(r,t);i&&e.children.splice(n,2,i)}for(var o=e.children.length-1;o>=0;o-=1)b(e.children[o])}},m={bold:function(e){var n=e.children;return(0,i.jsx)("strong",{children:n})},italic:function(e){var n=e.children;return(0,i.jsx)("em",{children:n})},link:function(e){var n,r=e.children,t=e.el;return"string"===typeof t||"string"!==typeof(null===(n=t.attrs)||void 0===n?void 0:n.href)?null:(0,i.jsx)("a",{href:t.attrs.href,target:"_blank",rel:"noopener noreferrer nofollow",children:r})},strike:function(e){var n=e.children;return(0,i.jsx)("s",{children:n})},underline:function(e){var n=e.children;return(0,i.jsx)("u",{children:n})},hard_break:function(){return(0,i.jsx)("br",{})},image:function(e){var n,r=e.el;return"string"===typeof r||"string"!==typeof(null===(n=r.attrs)||void 0===n?void 0:n.src)?null:(0,i.jsx)("img",{src:r.attrs.src,alt:""})},blockquote:function(e){var n=e.children;return(0,i.jsx)("blockquote",{children:n})},heading:function(e){var n,r=e.children,t=e.el;if("string"===typeof t)return null;switch(null===(n=t.attrs)||void 0===n?void 0:n.level){case 4:return(0,i.jsx)("h4",{children:r});case 5:return(0,i.jsx)("h5",{children:r});case 6:return(0,i.jsx)("h6",{children:r});default:return(0,i.jsx)("h3",{children:r})}},paragraph:function(e){var n=e.children;return(0,i.jsxs)("p",{children:[n,(0,i.jsx)("br",{})]})},code_block:function(e){var n=e.children;return(0,i.jsx)("pre",{spellCheck:!1,children:(0,i.jsx)("code",{children:n})})},bulletList:function(e){var n=e.children;return(0,i.jsx)("ul",{children:n})},orderedList:function(e){var n=e.children;return(0,i.jsx)("ol",{children:n})},listItem:function(e){var n=e.children;return(0,i.jsx)("li",{children:n})},ruby:function(e){var n=e.children;return(0,i.jsx)("ruby",{children:n})},rp:function(e){var n=e.children;return(0,i.jsx)("rp",{children:n})},rt:function(e){var n=e.children;return(0,i.jsx)("rt",{children:n})}},v=function(e){var n=e.el;if("string"===typeof n)return(0,i.jsx)(i.Fragment,{children:n});var r=n.children.map((function(e,n){return(0,i.jsx)(v,{el:e},n)})),t=m[n.type];return t?t({children:r,el:n}):(0,i.jsx)(i.Fragment,{children:r})},g=function(e){var n=e.body,r=s.useMemo((function(){var e=JSON.parse(n),r=p(e);return b(r),r}),[n]);if("string"===typeof r)return(0,i.jsx)(i.Fragment,{children:r});var t=r.children.map((function(e,n){return(0,i.jsx)(v,{el:e},n)}));return(0,i.jsx)("div",{className:"remirror-editor",children:t})},j=c()((function(){return Promise.all([r.e(6911),r.e(3726),r.e(7333),r.e(4885),r.e(1969)]).then(r.bind(r,51969))}),{loadableGenerated:{webpack:function(){return[51969]}},ssr:!1}),y=function(e){var n=e.body,r=(0,t.Z)(s.useState(!0),2),o=r[0],l=r[1],c=s.useCallback((function(){l(!1)}),[]);return(0,i.jsxs)(i.Fragment,{children:[o&&(0,i.jsx)(g,{body:n}),(0,i.jsx)("div",{className:"jsx-ff089504f0c8fb09 "+a().dynamic([["d97fd12200f9e0ef",[o?"none":"block"]]])+" container",children:(0,i.jsx)(j,{body:n,onReady:c})}),(0,i.jsx)(a(),{id:"d97fd12200f9e0ef",dynamic:[o?"none":"block"],children:".container.__jsx-style-dynamic-selector{display:".concat(o?"none":"block","}")}),(0,i.jsx)(a(),{id:"ff089504f0c8fb09",children:".remirror-editor{outline:none;overflow-wrap:break-word}.remirror-editor p{line-height:1.8;white-space:pre-wrap}.remirror-editor blockquote{margin:4px 0;padding:8px 0 8px 8px;
1border-left:8px solid#ccc;font-style:italic}.remirror-editor blockquote p{color:#888}.remirror-editor code{display:inline-block;padding:2px 3px 1px;border:1px solid rgba(29,28,29,.13);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;background-color:rgba(29,28,29,.04);color:#e01e5a;font-family:monospace,monospace}.remirror-editor pre code{display:block;padding:8px}.remirror-editor h1{margin:16px 0 8px;font-size:22px}.remirror-editor h2{margin:16px 0 8px;font-size:22px}.remirror-editor h3{margin:16px 0 8px;font-size:22px}.remirror-editor h4{margin:16px 0 8px;font-size:20px}.remirror-editor h5{margin:16px 0 8px;font-size:20px}.remirror-editor h6{margin:16px 0 8px;font-size:20px}.remirror-editor img{display:block;width:100%;max-height:50vh;margin:16px 0;background-color:#f5f5f5;-o-object-fit:contain;object-fit:contain}.remirror-editor p{margin:0;font-size:18px}.remirror-editor ol{margin:0;padding:0 0 0 28px}.remirror-editor ol>li::marker{font-size:18px}.remirror-editor ul{margin:0;padding:0 0 0 28px}"})]})}},25875:function(e,n,r){var t=r(828),i=r(67294),o=r(11163),a=r(49384),s=r(61164),l=r(92674);n.Z=function(){var e=(0,o.useRouter)(),n=(0,l.Z)(),r=(0,t.Z)((0,s.o)(),1)[0].auth,c=e.query,d=i.useMemo((function(){return"string"===typeof c.id?parseInt(c.id,10):0}),[c.id]),u=i.useMemo((function(){return"string"===typeof c.cid?parseInt(c.cid,36):0}),[c.cid]);i.useEffect((function(){var t=function(){if(r&&!r.Unconfirmed)if(d){var e=JSON.stringify({page_id:d});n("/auth/history",{method:"POST",body:e}).catch((function(e){return(0,a.kg)(e)}))}else if(u){var t=JSON.stringify({content_id:u});n("/auth/history",{method:"POST",body:t}).catch((function(e){return(0,a.kg)(e)}))}};return e.events.on("routeChangeComplete",t),function(){e.events.off("routeChangeComplete",t)}}),[r,u,n,d,e.events])}}}]);
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.