(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6566],{4268:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/youth/champ/project",function(){return a(6476)}])},5677:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var a in t)Object.defineProperty(e,a,{enumerable:!0,get:t[a]})}(t,{noSSR:function(){return s},default:function(){return i}});let r=a(8754),l=(a(7294),r._(a(8976)));function n(e){return{default:(null==e?void 0:e.default)||e}}function s(e,t){return delete t.webpack,delete t.modules,e(t)}function i(e,t){let a=l.default,r={loading:e=>{let{error:t,isLoading:a,pastDelay:r}=e;return null}};e instanceof Promise?r.loader=()=>e:"function"==typeof e?r.loader=e:"object"==typeof e&&(r={...r,...e}),r={...r,...t};let i=r.loader;return(r.loadableGenerated&&(r={...r,...r.loadableGenerated},delete r.loadableGenerated),"boolean"!=typeof r.ssr||r.ssr)?a({...r,loader:()=>null!=i?i().then(n):Promise.resolve(n(()=>null))}):(delete r.webpack,delete r.modules,s(a,r))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2254:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return n}});let r=a(8754),l=r._(a(7294)),n=l.default.createContext(null)},8976:function(e,t,a){"use strict";/**
@copyright (c) 2017-present James Kyle <me@thejameskyle.com>
 MIT License
 Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
 The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
*/Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return h}});let r=a(8754),l=r._(a(7294)),n=a(2254),s=[],i=[],o=!1;function d(e){let t=e(),a={loading:!0,loaded:null,error:null};return a.promise=t.then(e=>(a.loading=!1,a.loaded=e,e)).catch(e=>{throw a.loading=!1,a.error=e,e}),a}class c{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};let{_res:e,_opts:t}=this;e.loading&&("number"==typeof t.delay&&(0===t.delay?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},t.delay)),"number"==typeof t.timeout&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},t.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(e=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(e){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...e},this._callbacks.forEach(e=>e())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(e){return this._callbacks.add(e),()=>{this._callbacks.delete(e)}}constructor(e,t){this._loadFn=e,this._opts=t,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function u(e){return function(e,t){let a=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),r=null;function s(){if(!r){let t=new c(e,a);r={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return r.promise()}if(!o){let e=a.webpack?a.webpack():a.modules;e&&i.push(t=>{for(let a of e)if(t.includes(a))return s()})}function d(e,t){!function(){s();let e=l.default.useContext(n.LoadableContext);e&&Array.isArray(a.modules)&&a.modules.forEach(t=>{e(t)})}();let i=l.default.useSyncExternalStore(r.subscribe,r.getCurrentValue,r.getCurrentValue);return l.default.useImperativeHandle(t,()=>({retry:r.retry}),[]),l.default.useMemo(()=>{var t;return i.loading||i.error?l.default.createElement(a.loading,{isLoading:i.loading,pastDelay:i.pastDelay,timedOut:i.timedOut,error:i.error,retry:r.retry}):i.loaded?l.default.createElement((t=i.loaded)&&t.default?t.default:t,e):null},[e,i])}return d.preload=()=>s(),d.displayName="LoadableComponent",l.default.forwardRef(d)}(d,e)}function m(e,t){let a=[];for(;e.length;){let r=e.pop();a.push(r(t))}return Promise.all(a).then(()=>{if(e.length)return m(e,t)})}u.preloadAll=()=>new Promise((e,t)=>{m(s).then(e,t)}),u.preloadReady=e=>(void 0===e&&(e=[]),new Promise(t=>{let a=()=>(o=!0,t());m(i,e).then(a,a)})),window.__NEXT_PRELOADREADY=u.preloadReady;let h=u},6476:function(e,t,a){"use strict";a.r(t),a.d(t,{__N_SSP:function(){return w}});var r=a(5893),l=a(5152),n=a.n(l),s=a(1664),i=a.n(s),o=a(7294),d=a(6009),c=a(7028),u=a(5007),m=a(826),h=a(7349),p=a(4167),f=a(5857),g=a(6041),x=a(9429),b=a(5265),y=a(7288),v=a(46),_=a(5651);let j=n()(()=>Promise.all([a.e(5279),a.e(7229)]).then(a.bind(a,7229)),{loadableGenerated:{webpack:()=>[7229]},ssr:!1});var w=!0;t.default=e=>{var t,a,l;let n=(0,o.useRef)(null),s=(0,o.useRef)([]),w=(0,o.useRef)([]),N=(0,o.useRef)(!1),{serverData:D}=e,E=(0,u.I0)(),T=(0,u.v9)(e=>e.user),[A,k]=(0,o.useState)(null!==(t=D.division)&&void 0!==t?t:[]),[O,C]=(0,o.useState)(null!==(a=D.team)&&void 0!==a?a:[]),[P,R]=(0,o.useState)(null!==(l=D.user)&&void 0!==l?l:[]),[F,S]=(0,o.useState)(null);(0,o.useEffect)(()=>{(0,v.Z)(),n.current=new window.bootstrap.Modal(document.getElementById("modal-team-select"));let e=[].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]'));e.map(e=>{let t=new window.bootstrap.Popover(e);return s.current.push(t),()=>{s.current=null}})},[]);let M=async e=>{try{let t=null;if((t=T.id===e?await (await fetch("".concat("https://kscas.org","/api/user/get/self/information"),{credentials:"include"})).json():await (await fetch("".concat("https://kscas.org","/api/user/get/").concat(e),{credentials:"include"})).json()).status)return t.user&&t.user.id&&t.user.id>0?E((0,g.q5)(t.user)):E((0,g.q5)(t.data)),E((0,f.O)("AUTHOR",!0)),!0;E((0,p.P)("RED","조회가 불가능한 회원입니다."))}catch(e){console.error(e)}},B=e=>{let t=[],{team:a,user:l}=e;if(l){l.sort((e,t)=>e.rank>t.rank?1:-1),l.sort((e,t)=>e.cardinal>t.cardinal?-1:1),w.current.length=0,N.current=!1;let e=l[0].hidden;for(let a=0;a<l.length;a++){let r=[],n=l[a].campaignList,s=null!=n?n.length:0;for(let e=0;e<s;e++){let t=new Date(n[e].endDate),a=n[e].startDate===n[e].endDate?new Date(t.getFullYear(),t.getMonth(),t.getDate()+1):t,l=new Date(n[e].startDate);r.push({x:n[e].name,y:[l.getTime(),a.getTime()]})}e!==l[a].hidden&&(N.current=!0),2===l[a].hidden&&w.current.push(l[a]),t.push({name:"".concat(l[a].name,"(").concat(l[a].cardinal,"기)"),data:r})}}return(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"row",children:(0,r.jsxs)("div",{className:"col",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-primary fs-6 me-2",children:"창설"}),(0,r.jsx)("span",{children:a.create_date})]}),a.delete_date?(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-primary fs-6 me-2",children:"해체"}),(0,r.jsx)("span",{children:a.delete_date})]}):null]})}),(0,r.jsx)("hr",{}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-primary text-center",children:"활동 타임라인"}),(0,r.jsx)("div",{id:"apex-charts",children:(0,r.jsx)(j,{options:{noData:{text:"데이터가 없습니다.",align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:"#000000",fontSize:"1rem"}},colors:["#ff7473","#f8ca00","#75D701","#47b8e0","#6a60a9","#fab1ce","#E3E36A","#77AAAD","#CFAA9E","#D9543F","#C2D6F8","#A9D9B6","#EB70FF","#99f19e","#EDBB7B","#F0EBC0","#52616a","#1F2124"],chart:{height:"500px",defaultLocale:"ko",locales:[{name:"ko",options:{months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],shortMonths:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],days:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],shortDays:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],toolbar:{download:"다운로드",selection:"선택자",selectionZoom:"확대",zoomIn:"크게",zoomOut:"작게",pan:"이동",reset:"되돌리기",exportToCSV:"엑셀 저장",exportToPNG:"이미지(PNG) 저장",exportToSVG:"벡터(SVG) 저장"}}}],animations:{enabled:!0}},plotOptions:{bar:{horizontal:!0,rangeBarGroupRows:!0,barHeight:"90%"}},dataLabels:{enabled:!0,formatter:function(e){let t=new Date(e[1]-e[0]).getTime();return Math.floor(t/864e5)+"일"}},fill:{type:"gradient",gradient:{shade:"light",type:"vertical",shadeIntensity:.8}},xaxis:{type:"datetime",labels:{show:!0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy년",month:"yy년 MM월",day:"MM월 dd일",hour:"HH시 mm분"},hideOverlappingLabels:!0}},yaxis:{show:!0},legend:{show:!0,position:"right",horizontalAlign:"left"},tooltip:{x:{format:"yy년 MM월 dd일"}}},series:t,type:"rangeBar"})})]})]})},I=(()=>{let e=(0,r.jsx)(r.Fragment,{}),t=(0,r.jsx)(r.Fragment,{});if(O&&A){let a=[],l=[],n=[],s=[],i=[],o=O?O.concat():[];o.sort((e,t)=>e.exp>t.exp?-1:1),o.map(e=>{0!==parseInt(e.id)&&0===e.hidden&&e.exp>0&&(a.push(e.name),l.push(e.exp),s[e.division]=s[e.division]?s[e.division]+e.exp:e.exp,i[e.division]=i[e.division]?i[e.division]+1:1)}),s=s.filter((e,t)=>t),i=i.filter((e,t)=>t),s.map((e,t)=>{s[t]=parseFloat((e/i[t]).toFixed(2))}),A.map(e=>{0!==parseInt(e.id)&&0===e.hidden&&n.push(e.name)});let d=new Date("2024-09-07"),c=(0,b.DK)(d),u=new Date("2025-01-04"),m=(0,b.DK)(u),h=new Date,p=u.getTime()-d.getTime(),f=u.getTime()-h.getTime(),g=100-f/864e5/(p/864e5)*100,x=g>=0?g:0;e=(0,r.jsx)("div",{className:"row",children:(0,r.jsxs)("div",{className:"col-12 my-2 px-lg-5 px-3",children:[(0,r.jsxs)("div",{className:"d-flex justify-content-between text-muted text-end fs-8 mt-1",children:[(0,r.jsx)("div",{className:"mb-1",children:"3RD PROJECT SEASON"}),(0,r.jsx)("div",{children:"".concat(c," / ").concat(m)})]}),(0,r.jsx)("div",{className:"progress",style:{height:"2rem"},children:(0,r.jsx)("div",{className:"progress-bar progress-bar-striped progress-bar-animated bg-info",role:"progressbar",style:{width:"".concat(x,"%")},children:"".concat(Math.ceil(x),"%")})})]})}),t=(0,r.jsx)("div",{className:"row justify-content-center",children:(0,r.jsxs)("div",{className:"col-lg-6 col-12 mt-5 mt-lg-0 mb-auto",children:[(0,r.jsx)("div",{className:"text-center text-lg-start text-muted mb-2",children:"팀별 점수 지분율"}),(0,r.jsx)(j,{options:{colors:["#ff7473","#f8ca00","#75D701","#47b8e0","#6a60a9","#fab1ce","#E3E36A","#77AAAD","#CFAA9E","#D9543F","#C2D6F8","#A9D9B6","#EB70FF","#99f19e","#EDBB7B","#F0EBC0","#52616a","#1F2124"],labels:a,dataLabels:{enabled:!0,formatter:function(e){return Math.ceil(e)+"%"}},chart:{type:"polarArea"},fill:{opacity:.8},yaxis:{show:!1}},series:l,type:"polarArea"})]})})}return{barRender:e,graphRender:t}})();return(0,r.jsxs)(h.RQ,{children:[(0,r.jsx)(m.h,{metaTitle:"청년챔프단 사회공헌 프로젝트",metaDescription:"전국 단위 사회공헌 청년 조직의 실행중인 프로젝트 목록입니다.",metaUrl:"/youth/champ/project"}),(0,r.jsx)("div",{className:"container",children:(0,r.jsx)(h.uZ,{teamRender:e=>{let t=[...P],a=[...O],l=[],u=t?[...t]:[];for(let e=0;e<u.length;e++)u[e]&&0!==u[e].hidden&&delete u[e--];u.sort((e,t)=>e.exp>t.exp?-1:1);for(let e=0;e<t.length;e++){var m;let{id:a,name:r,image:n,rank:s,team:i,avatar:o,gender:d,campaignList:c,cardinal:u,hidden:h}=t[e];l[i]=null!==(m=l[i])&&void 0!==m?m:[],l[i].push({id:a,name:r,image:n,rank:s,team:i,avatar:o,gender:d,campaignList:c,cardinal:u,hidden:h})}"hall"===e?a.sort((e,t)=>new Date(e.delete_date)>new Date(t.delete_date)?-1:1):a.sort((e,t)=>e.exp>t.exp?-1:1);let h=0,p="hall"===e?2:0,f=e=>{let t=0;for(let a=0;a<u.length;a++){if(u[a].id===e)return!0;if(++t>=4)break}return!1};return a.map(t=>{let{id:a,name:u,description:m,image:g,exp:b,division:v,hidden:j}=t;if(0===a||j!==p||-1==b)return;h++;let w="default"===e&&0!==b;return(0,r.jsx)("div",{className:"col mb-5",children:(0,r.jsxs)("div",{role:"button",tabIndex:0,className:"team-view card ".concat(w?"n-border-".concat(h):""," text-center"),onKeyDown:e=>"Enter"===e.key&&e.currentTarget.click(),onClick:()=>{S({division:A[v],team:t,user:l[a]}),null!=n&&n.current.show()},children:[(0,r.jsxs)("div",{className:"card-header w-100",children:[(0,r.jsx)("div",{className:"text-muted",children:A[v]?A[v].name:"없음"}),(0,r.jsx)("div",{children:u}),w?(0,r.jsx)("div",{className:"rank-number",children:h}):null]}),g?(0,r.jsx)("div",{className:"overflow-hidden",children:(0,r.jsx)("img",{className:"card-img-top",src:g,alt:u})}):null,(0,r.jsxs)("div",{className:"card-body",children:[w&&h<=4?(0,r.jsx)("div",{className:"trophy",children:(0,r.jsx)("div",{className:"n-icon-".concat(h),children:(0,r.jsx)(d.Z,{size:"2rem"})})}):null,w?(0,r.jsxs)("div",{className:"text-muted mb-1",children:[(0,x.dR)(b,3),"점"]}):null,m,(0,r.jsx)("div",{className:"user-container mt-3",children:null!=l[a]?l[a].map(e=>{let{id:t,team:l,name:n,rank:i,avatar:d,image:c,gender:u,hidden:m}=e;if((0,_.h)("MENTOR",i)||m===p)return(0,r.jsx)(o.Fragment,{children:l===a?(0,r.jsxs)("button",{className:"col-3 ".concat((0,_.h)("SUB-LEADER",i)?"sub-leader":(0,_.h)("LEADER",i)?"leader":(0,_.h)("DIVISION",i)?"division":(0,_.h)("PM",i)?"pm":""),"data-bs-toggle":"popover","data-bs-trigger":"hover","data-bs-content":"".concat((0,y.V2)(i)," ").concat(n),onClick:e=>{e.preventDefault(),e.stopPropagation(),M(t),s.current.map(e=>e.hide())},children:[(0,r.jsx)("img",{className:"lazy user-image",src:"/images/loading/spinner.svg","data-src":"".concat((0,y.Ry)(d,c,u)),alt:n}),f(t)?(0,r.jsx)("div",{className:"user-image-frame-1",children:(0,r.jsx)("img",{src:"/images/youth/champ/laurel-wreath/avatar/flower_frame_1.png",alt:n})}):null]}):null},t)}):null})]}),(0,r.jsx)("div",{className:"card-footer w-100 py-1",children:(0,r.jsxs)(i(),{href:{pathname:"/community/[...data]",query:{page:1,screenMove:0,method:5,keyword:u}},as:"/community/champ",scroll:!1,className:"view-more",onClick:e=>e.stopPropagation(),children:[(0,r.jsx)(c.Z,{className:"me-2"}),"활동 기록 열람"]})})]})},a)})},getTeam:O,initChartRender:I,getSelectTeam:F,teamViewRender:B})}),(0,r.jsx)(h.N6,{getSelectTeam:F,teamViewRender:B})]})}},46:function(e,t,a){"use strict";a(6337),t.Z=(e,t)=>{let a=null,r=[].slice.call(document.querySelectorAll("img.lazy"));if("IntersectionObserver"in window){let l;let n=window.location.pathname;if(a=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(e.isIntersecting){let t=e.target;t.src=t.dataset.src,a.unobserve(t)}})}),r.forEach(e=>{a.observe(e)}),!e){let e=()=>{let t=window.location.pathname;n!==t?(clearTimeout(l),a.disconnect(),a=null):l=setTimeout(e,1e3)};e()}t&&setTimeout(()=>{clearTimeout(l),a.disconnect(),a=null},t)}else for(let e=0;e<r.length;e++)r[e].src=r[e].dataset.src;return a}},5152:function(e,t,a){e.exports=a(5677)}},function(e){e.O(0,[6337,3801,9774,2888,179],function(){return e(e.s=4268)}),_N_E=e.O()}]);