1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8205],{63177:function(n,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/community/monthly-challenge2/[month]",function(){return t(92419)}])},44510:function(n,e,t){"use strict";var o=t(67294),i=t(11163);e.Z=function(n){let{community:e,filter:t,refreshTrigger:l=null}=n,r=(0,i.useRouter)(),[s,a]=(0,o.useState)([]),[c,u]=(0,o.useState)(!1),[d,m]=(0,o.useState)(1);return(0,o.useEffect)(()=>{async function getCommunityPosts(){let n="".concat(e,"-").concat(t.internalName,"-").concat(l),o=JSON.parse(sessionStorage.getItem(n));if((null==o?void 0:o.posts)||(o={}),o.posts)a(null==o?void 0:o.posts),m(null==o?void 0:o.currentPage),(null==o?void 0:o.posts.length)===0&&u(!0);else{let i=t.api,l=await fetch(i),r=await l.json(),s=r.posts;o={posts:[...s],currentPage:"leaderboards"===e?null==r?void 0:r.lastUserId:1},sessionStorage.setItem(n,JSON.stringify({...o})),a(s),m(1),0===s.length&&u(!0)}}a([]),getCommunityPosts()},[e,null==t?void 0:t.api,null==t?void 0:t.internalName,l]),(0,o.useEffect)(()=>{function logScrollPosition(){let n="".concat(e,"-").concat(t.internalName,"-").concat(l,"-scroll");0!=window.scrollY&&sessionStorage.setItem(n,JSON.stringify(window.scrollY))}return window.addEventListener("scroll",logScrollPosition),()=>{window.removeEventListener("scroll",logScrollPosition)}},[r.asPath,e,t.internalName,l]),{posts:s,noMorePosts:c,currentPage:d}}},27012:function(n,e,t){"use strict";var o=t(82729),i=t(85893),l=t(19521),r=t(20759),s=t(3649),a=t(9473),c=t(609),u=t(73857),d=t(62286),m=t.n(d),p=t(41664),h=t.n(p);function _templateObject(){let n=(0,o._)(["\n margin: 0px 20px;\n padding: 18px;\n display: flex;\n align-items: center;\n gap: 16px;\n margin-top: 24px;\n\n .composer-image-container {\n flex-shrink: 0;\n img {\n border-radius: 50%;\n width: 40px;\n height: 40px;\n object-fit: cover;\n }\n }\n\n .input-btn {\n display: flex;\n align-items: center;\n gap: 12px;\n width: 100%;\n min-width: 0;\n\n > a {\n flex: 1;\n min-width: 0;\n }\n\n > button {\n flex-shrink: 0;\n }\n\n .fake-input {\n flex: 1;\n padding: 11px 16px;\n background-color: ",";\n color: ",";\n\n font-size: 16px;\n font-weight: 500;\n line-height: 150%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n min-width: 0;\n }\n }\n"]);return _templateObject=function(){return n},n}let f=(0,l.default)(r.Z).withConfig({componentId:"sc-1c261226-0"})(_templateObject(),n=>{let{theme:e}=n;return e.colors.background.grey.secondary},n=>{let{theme:e}=n;return e.colors.text.tertiary});e.Z=function(n){let{community:e}=n,t=(0,a.v9)(c.S5),o=m().get().codedextoken||"",l=(0,a.v9)(c.zr),r=(0,a.v9)(c.o4)||"dark",d="dark"===r,p=localStorage.getItem("photoURL")||"",x=(0,a.v9)(c.nU);return t||o&&"question-of-the-week"!==e?(0,i.jsxs)(f,{borderColor:d?"475569":"CBD5E1",className:"fake-channel-composer",children:[(0,i.jsx)("div",{className:"composer-image-container",children:(0,i.jsx)(h(),{href:"/@".concat(l),children:(0,i.jsx)("img",{src:p||"/images/default-profile-pic.jpg",alt:"user profile pic"})})}),(0,i.jsxs)("div",{className:"input-btn",children:[x>=100?(0,i.jsxs)(h(),{href:"/community/create?channel=".concat(e),style:{textDecoration:"none",width:"100%"},children:[" ",(0,i.jsx)(s.Z,{borderColor:d?"475569":"CBD5E1",className:"fake-input",children:"Create a new post"})]}):(0,i.jsxs)(s.Z,{borderColor:d?"475569":"CBD5E1",className:"fake-input",children:["You need to reach 100 XP to make a post."," "]}),(0,i.jsx)(u.Z,{disabled:!0,children:"Post"})]})]}):null}},86121:function(n,e,t){"use strict";var o=t(82729),i=t(85893),l=t(19521),r=t(67294),s=t(62286),a=t.n(s),c=t(41664),u=t.n(c),d=t(11163);function _templateObject(){let n=(0,o._)(["\n display: flex;\n align-items: center;\n margin: 0px 20px;\n border-bottom: 2px solid ",';\n font-family: "Mulish", sans-serif;\n max-width: calc(100vw - 2rem);\n overflow-x: auto;\n\n p {\n margin: 0px;\n }\n\n .channel-filter {\n padding: 10px 8px;\n border-bottom: 2px solid transparent;\n\n .filter-text {\n padding: 8px 12px;\n color: ',";\n font-size: 16px;\n font-weight: 600;\n line-height: 150%;\n border-radius: 4px;\n min-width: var(--min-width);\n white-space: nowrap;\n\n span {\n /* padding: 2px 6px; */\n border-radius: 50%;\n background: ",";\n font-size: 12px;\n font-style: normal;\n font-weight: 700;\n line-height: normal;\n }\n }\n\n :hover {\n .filter-text {\n background: ",";\n color: ",";\n }\n }\n }\n\n .current-filter {\n border-bottom: 2px solid #14adff;\n .filter-text {\n font-weight: 700;\n color: ",";\n\n span {\n background: #0080d4;\n color: #fff;\n }\n }\n }\n a {\n text-decoration: none;\n }\n"]);
1return _templateObject=function(){return n},n}let m=l.default.div.withConfig({componentId:"sc-263766b4-0"})(_templateObject(),n=>{let{theme:e}=n;return e.colors.border.grey.light},n=>{let{theme:e}=n;return e.colors.text.tertiary},n=>n.theme.colors.border.grey.light,n=>n.theme.colors.background.grey.tertiary,n=>{let{theme:e}=n;return e.colors.text.accent.blue},n=>{let{theme:e}=n;return e.colors.text.primary});e.Z=function(n){let{filters:e,currentFilter:t,setCurrentFilter:o}=n,l=a().get().codedextoken||"",s=(0,r.useRef)({}),c=(0,d.useRouter)(),p=c.asPath.replace(/\/(submissions|winners)(\/)?$/,"");return(0,r.useEffect)(()=>{Object.values(e).forEach(n=>{let e=s.current[n.internalName];if(e){let n=e.style.fontWeight;e.style.fontWeight="700";let t=e.scrollWidth;e.style.fontWeight=n,e.style.setProperty("--min-width","".concat(t,"px"))}})},[e]),(0,i.jsx)(m,{className:"community-feed-filters",children:Object.values(e).map(n=>{if(((null==n?void 0:n.disableOnLogout)!=!0||l)&&(null==n?void 0:n.disable)!=!0)return(null==p?void 0:p.includes("monthly-challenge"))?(0,i.jsx)(u(),{href:"".concat(p,"/").concat(n.link),children:(0,i.jsx)("div",{className:"channel-filter nes-pointer ".concat(t===n.internalName?"current-filter":""),onClick:()=>o(n.internalName),children:(0,i.jsxs)("p",{className:"filter-text",ref:e=>{s.current[n.internalName]=e},children:[n.displayText," ",(null==n?void 0:n.num)&&(0,i.jsx)("span",{style:{padding:(null==n?void 0:n.num)>=10?"3px 4px":"2px 6px"},children:null==n?void 0:n.num})]})})},n.internalName):(0,i.jsx)("div",{className:"channel-filter nes-pointer ".concat(t===n.internalName?"current-filter":""," ").concat(n.internalName),onClick:()=>o(n.internalName),children:(0,i.jsxs)("p",{className:"filter-text",ref:e=>{s.current[n.internalName]=e},children:[n.displayText," ",(null==n?void 0:n.num)&&(0,i.jsx)("span",{style:{padding:(null==n?void 0:n.num)>=10?"3px 4px":"2px 6px"},children:null==n?void 0:n.num})]})},n.internalName)})})}},15972:function(n,e,t){"use strict";var o=t(82729),i=t(85893),l=t(19521),r=t(9473),s=t(609),a=t(67294),c=t(58533),u=t(25670),d=t(54456),m=t(67788),p=t(86121),h=t(27012),f=t(83330),x=t(96229);function _templateObject(){let n=(0,o._)(["\n width: 100%;\n max-width: 700px;\n\n .fake-channel-composer {\n margin-bottom: 8px;\n }\n\n .channel-posts {\n margin-top: 12px;\n display: flex;\n flex-direction: column;\n overflow: visible !important;\n }\n\n .community-feed-filters {\n .about {\n display: inline;\n\n "," {\n display: none;\n }\n }\n }\n"]);return _templateObject=function(){return n},n}let g=l.default.div.withConfig({componentId:"sc-ff63a9d0-0"})(_templateObject(),n=>{let{theme:e}=n;return e.breakpoints.md});e.Z=function(n){let{posts:e,setAllPosts:t,filters:o,currentFilter:l,setCurrentFilter:y,savedCurrentPage:v=1,noMorePosts:b=!1,community:w,disableComposer:j=!1,headerType:N="without-channel",pinPost:_=!1,refreshTrigger:k=null,sideBar:S=null}=n,C=(0,r.v9)(s.f8),[P,Z]=(0,a.useState)(v),[O,E]=(0,a.useState)(!0);(0,a.useEffect)(()=>{b&&E(!1)},[e,b]);let I=(0,a.useCallback)(async()=>{try{let n=o[l],e="".concat(w,"-").concat(n.internalName,"-").concat(k),i=JSON.parse(sessionStorage.getItem(e)),r=i.currentPage+1,s="".concat(n.api,"&page=").concat(r),a=await fetch(s),c=await a.json(),u=c.posts;0!=u.length&&(Z(r),t(n=>[...n,...u]),i={posts:[...i.posts,...u],currentPage:r},sessionStorage.setItem(e,JSON.stringify({...i}))),0===u.length&&E(!1)}catch(n){console.error("Error fetching more posts:",n),E(!1)}},[o,l,w,k,t]);return(0,i.jsxs)(g,{children:[(0,i.jsx)(m.Z,{community:w}),(0,i.jsx)(f.Z,{community:w}),!j&&(0,i.jsx)(h.Z,{community:w}),(0,i.jsx)(p.Z,{filters:o,currentFilter:l,setCurrentFilter:y}),"about"!=l&&(0,i.jsxs)(c.Z,{className:"channel-posts",dataLength:e.length,next:I,hasMore:!0!=b,scrollThreshold:.5,loader:(0,i.jsx)(i.Fragment,{}),children:[null==e?void 0:e.map((n,e)=>(0,i.jsx)(d.Z,{post:n,uid:C,headerType:N,pinned:0===e&&(null==n?void 0:n.communityName)=="monthly-challenge"&&_,inFeed:"home",forFeed:!0},null==n?void 0:n.postId)),b&&(0,i.jsx)("div",{style:{margin:"2rem 0rem"},children:(0,i.jsx)(x.Z,{mainText:"No posts yet"})}),!b&&0===e.length&&(0,i.jsx)(u.Z,{})]}),"about"==l&&S]})}},96229:function(n,e,t){"use strict";
1var o=t(82729),i=t(85893),l=t(19521);function _templateObject(){let n=(0,o._)(["\n width: 100%;\n padding: 0px 24px;\n display: flex;\n align-items: center;\n flex-direction: column;\n gap: 16px;\n\n img {\n width: 200px;\n height: auto;\n }\n\n .copy {\n padding-bottom: 48px;\n display: flex;\n flex-direction: column;\n gap: 8px;\n text-align: center;\n\n p:first-child {\n color: ",";\n font-size: 18px;\n font-weight: 700;\n line-height: 150%;\n }\n\n p {\n color: ",";\n font-size: 16px;\n font-weight: 600;\n line-height: 150%;\n }\n }\n"]);return _templateObject=function(){return n},n}let r=l.default.div.withConfig({componentId:"sc-63b38af1-0"})(_templateObject(),n=>{let{theme:e}=n;return e.colors.text.primary},n=>{let{theme:e}=n;return e.colors.text.tertiary});e.Z=function(n){let{mainText:e="No comments yet",bottomText:t="Start the discussion"}=n;return(0,i.jsxs)(r,{children:[(0,i.jsx)("img",{src:"/images/character_gifs/tekmLsi.gif",alt:"rocket image"}),(0,i.jsxs)("div",{className:"copy",children:[(0,i.jsx)("p",{children:e}),(0,i.jsx)("p",{children:t})]})]})}},92419:function(n,e,t){"use strict";t.r(e),t.d(e,{__N_SSG:function(){return m},default:function(){return ChannelPage}});var o=t(85893),i=t(11163),l=t(67294),r=t(99428),s=t(82077),a=t(44510),c=t(74796),u=t(52861),d=t(15972),m=!0;function ChannelPage(n){let{news:e,date:t,challenge:m,events:p}=n;(0,i.useRouter)();let h={"top-posts":{api:"/api/community/monthly-challenge/getSubmissions?communityName=monthly-challenge&submissionMonth=".concat(null==t?void 0:t.month,"&submissionYear=").concat(null==t?void 0:t.year,"&latest=false"),displayText:"Top Posts",internalName:"top-posts"},newest:{api:"/api/community/monthly-challenge/getSubmissions?communityName=monthly-challenge&submissionMonth=".concat(null==t?void 0:t.month,"&submissionYear=").concat(null==t?void 0:t.year,"&latest=true"),displayText:"Newest",internalName:"newest"}},[f,x]=(0,l.useState)("newest"),{posts:g,noMorePosts:y,currentPage:v}=(0,a.Z)({community:null==t?void 0:t.community,filter:h[f],refreshTrigger:"".concat(null==t?void 0:t.month,"-").concat(null==t?void 0:t.year)}),[b,w]=(0,l.useState)(g);return(0,l.useEffect)(()=>{w([m,...g])},[g]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.Z,{learningEnv:"community"}),(0,o.jsxs)(c.Z,{children:[(0,o.jsx)(s.Z,{}),(0,o.jsx)(u.Z,{children:(0,o.jsx)(d.Z,{posts:b,setAllPosts:w,filters:h,currentFilter:f,setCurrentFilter:x,savedCurrentPage:v,community:"monthly-challenge",pinPost:!0,disableComposer:!1,refreshTrigger:"".concat(null==t?void 0:t.month,"-").concat(null==t?void 0:t.year),noMorePosts:y})})]})]})}}},function(n){n.O(0,[1272,8700,1057,3777,5937,7603,4090,4153,1622,9280,286,6095,8849,2512,719,9428,2163,6207,5884,4561,8325,5388,4456,1024,9774,2888,179],function(){return n(n.s=63177)}),_N_E=n.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.