text: (this["webpackJsonpmy-app"]=this["webpackJsonpmy-app"]||[]).push([[28],{610:function(t,e,c){"use strict";c.r(e),c.d(e,"default",(function(){return D}));var n=c(3),a=c(5),r=c(0),i=c(102),s=c(586),j=c(58),o=c(176),l=c(101),b=c(587),O=c(588),d=c(572),u=c(623),p=c(135),h=c(589),f=c(590),x=c(585),g=c(171),m=c.n(g),y=c(127),v=c(137),k=c(141),w=c(35),F=c(128),C=c(155),E=c(222),L=c(278),R=c(223),S=c(125),T=c(100),B=c(2);function D(){var t=Object(w.b)(),e=Object(k.b)(),c=Object(l.b)(),g=Object(r.useState)({}),D=Object(a.a)(g,2),H=D[0],I=D[1],J=Object(r.useRef)({}),z=Object(i.f)(),A=Object(E.a)("doc"),N=Object(a.a)(A,2),P=N[0],W=N[1],_=Object(y.a)("/kits.json"),q=Object(a.a)(_,2),G=q[0],K=q[1],M=Object(r.useState)(!1),Q=Object(a.a)(M,2),U=Q[0],V=(Q[1],Object(C.b)()),X=(Object(S.b)(),Object(T.b)(),Object(R.a)()),Y=Object(a.a)(X,2),Z=Y[0],$=(Y[1],Object(d.a)((function(t){return{action:{marginRight:0,marginLeft:16,marginTop:4,color:t.palette.text.secondary},root:{padding:16},root2:{paddingTop:0,paddingBottom:0},avatar:{alignSelf:"start"}}}))());return Object(r.useLayoutEffect)((function(){e.reset(),t.setDirection("down")}),[]),Object(r.useEffect)((function(){if(!W){var t={};Object.keys(G).length>0&&(t=G,Object(L.a)(P,t),I(t),J.current=t)}}),[G,c.bookmarks,W]),Object(r.useEffect)((function(){if(Z&&null!==H&&0!==Object.keys(H).length){var t=Object(n.a)({},H);Object.entries(t).map((function(t){var e,c,n=Object(a.a)(t,2),r=(n[0],n[1]),i=r.url;i=null===(e=i)||void 0===e?void 0:e.replace(/[~\*\/\[\]]/g,"#"),r.bookmarks=null!==(c=Z[i])&&void 0!==c?c:0})),I(t)}}),[Z,P,U,J.current]),Object(r.useEffect)((function(){}),[V]),K?Object(B.jsxs)(B.Fragment,{children:[Object(B.jsx)(o.a,{}),Object(B.jsx)(F.a,{}),Object(B.jsx)(v.a,{})]}):Object(B.jsxs)(B.Fragment,{children:[Object(B.jsx)(o.a,{topAppBarData:{title:"Browse",type:"kitList"}}),Object(B.jsx)(x.a,{maxWidth:"sm",style:{paddingLeft:8,paddingRight:8,display:"flex",flexDirection:"column",marginTop:10},children:Object(B.jsx)(s.a,{container:!0,direction:"column",justify:"flex-start",alignItems:"stretch",spacing:1,children:Object.entries(H).map((function(t){var e=Object(a.a)(t,2),c=e[0],n=e[1];return Object(B.jsx)(s.a,{item:!0,children:Object(B.jsxs)(b.a,{className:"card",id:"card-"+c,variant:"outlined",children:[Object(B.jsx)(j.a,{lineHeight:"normal",children:Object(B.jsx)(O.a,{classes:{action:$.action,avatar:$.avatar},titleTypographyProps:{variant:"h6"},avatar:void 0!==n.logo&&Object(B.jsx)(u.a,{style:{cursor:"pointer"},src:n.logo,onClick:function(){return z.push(n.url)}}),action:void 0!==n.source&&Object(B.jsx)(p.a,{children:Object(B.jsx)(B.Fragment,{children:Object(B.jsx)("span",{style:{cursor:"pointer"},onClick:function(){return window.open(n.source,"_blank")},children:n.author})})}),title:Object(B.jsx)(B.Fragment,{children:Object(B.jsx)(p.a,{children:Object(B.jsx)("span",{id:"kit-"+c,style:{lineHeight:"normal",cursor:"pointer"},onClick:function(){return z.push(n.url)},children:n.title})})})})}),Object(B.jsx)(h.a,{classes:{root:$.root2},style:{cursor:"pointer"},onClick:function(){return z.push(n.url)},children:Object(B.jsx)(B.Fragment,{children:n.description})}),Object(B.jsx)(f.a,{classes:{root:$.root},children:Object(B.jsx)(B.Fragment,{children:Object(B.jsx)(s.a,{container:!0,justify:"space-between",style:{justifyContent:"space-between",alignItems:"flex-end"},children:Object(B.jsx)(B.Fragment,{children:Object(B.jsx)(s.a,{item:!0,children:Object(B.jsx)(s.a,{container:!0,children:void 0!==n.cards&&Object(B.jsxs)(p.a,{children:[Object(B.jsx)(m.a,{style:{fontSize:25,paddingRight:5}}),n.cards]})})})})})})})]})},c)}))})})]})}}}]);
  //# sourceMappingURL=28.17eec052.chunk.js.map