(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5629],{35783:function(e,o,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_sites/[...site]",function(){return n(21546)}])},21546:function(e,o,n){"use strict";n.r(o),n.d(o,{__N_SSG:function(){return h}});var i=n(24246),t=n(27378),d=n(52047),l=n(44217),r=n(3420),u=n(33714),a=n(88038),c=n.n(a),s=n(44228),m=n(73941),v=n(87048);let D=e=>{var o,n,a,D,h,p,_,f;let y;let[Z,g]=(0,t.useState)(e.domainDoc&&{domainDoc:e.domainDoc}),w=(0,t.useContext)(r.Z),x=(0,s.O)(e.initialRecords);(0,t.useEffect)(()=>{var o;(null===(o=e.domainDoc)||void 0===o?void 0:o.type)==="user_profile"&&(e.domainDoc&&e.domainDoc.typography&&E(e.domainDoc.typography),e.domainDoc&&e.domainDoc.theme&&j(e.domainDoc.theme),g(e.domainDoc&&{domainDoc:e.domainDoc}))},[e.domainDoc]);let E=e=>{let o=document.documentElement;o.setAttribute("data-typography",e)},j=e=>{let o=document.documentElement;o.setAttribute("data-theme",e)},b=(null===(o=e.domainDoc)||void 0===o?void 0:o.type)==="user_profile"?e.domainDoc.extraOptions:void 0;"profile"===e.type?y=(0,i.jsx)(v.ZP,{currentUser:null,userData:null,username:e.username,hideSocialInfo:null==b?void 0:b.hideSocial}):"page"===e.type&&(y=(0,i.jsx)(d.Z,{currentUser:null,userData:null,previewMode:!1,username:e.username,slug:e.slug}));let k=w;return(null===(n=e.domainDoc)||void 0===n?void 0:n.type)==="user_profile"&&((null===(a=e.domainDoc)||void 0===a?void 0:a.theme)==="Klein"?k=u.Z.klein:(null===(D=e.domainDoc)||void 0===D?void 0:D.theme)==="Swiss"?k=u.Z.swiss:(null===(h=e.domainDoc)||void 0===h?void 0:h.theme)==="Brutalist"?k=u.Z.brutalist:(null===(p=e.domainDoc)||void 0===p?void 0:p.theme)==="Red"?k=u.Z.red:(null===(_=e.domainDoc)||void 0===_?void 0:_.theme)==="Green"?k=u.Z.green:(null===(f=e.domainDoc)||void 0===f?void 0:f.theme)==="Blue"&&(k=u.Z.blue)),(0,i.jsx)(m.RelayEnvironmentProvider,{environment:x,children:(0,i.jsx)(l.Z.Provider,{value:Z,children:(0,i.jsxs)(r.Z.Provider,{value:k,children:[(0,i.jsx)(c(),{children:(0,i.jsx)("meta",{name:"theme-color",content:k.backgroundColor})}),y]})})})};D.getKey=e=>{let o=e.query.site.slice();return"writing"===o[1]&&o.splice(1,1),"/"+o.join("/")};var h=!0;o.default=D}},function(e){e.O(0,[780,2047,9774,2888,179],function(){return e(e.s=35783)}),_N_E=e.O()}]);