(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3702],{83204:function(e,r,t){"use strict";var n=t(3930),s=t(48002),a=t(59682);r.Z=function(e,r,t){void 0===t&&(t={});var i=(0,n.Z)(r);(0,a.Z)(function(){var r=(0,s.n)(t.target,window);if(null==r?void 0:r.addEventListener){var n=function(e){return i.current(e)};return r.addEventListener(e,n,{capture:t.capture,once:t.once,passive:t.passive}),function(){r.removeEventListener(e,n,{capture:t.capture})}}},[e,t.capture,t.once,t.passive],t.target)}},3930:function(e,r,t){"use strict";var n=t(67294);r.Z=function(e){var r=(0,n.useRef)(e);return r.current=e,r}},45210:function(e,r,t){"use strict";var n=t(67294),s=t(3930),a=t(92770),i=t(31663);r.Z=function(e){i.Z&&!(0,a.mf)(e)&&console.error("useUnmount expected parameter is a function, got ".concat(typeof e));var r=(0,s.Z)(e);(0,n.useEffect)(function(){return function(){r.current()}},[])}},40351:function(e,r,t){"use strict";var n=t(67294),s=t(45210),a=t(8224),i=t(48002);r.Z=function(e){return function(r,t,c){var o=(0,n.useRef)(!1),l=(0,n.useRef)([]),u=(0,n.useRef)([]),d=(0,n.useRef)();e(function(){var e,n=(Array.isArray(c)?c:[c]).map(function(e){return(0,i.n)(e)});if(!o.current){o.current=!0,l.current=n,u.current=t,d.current=r();return}n.length===l.current.length&&(0,a.Z)(n,l.current)&&(0,a.Z)(t,u.current)||(null===(e=d.current)||void 0===e||e.call(d),l.current=n,u.current=t,d.current=r())}),(0,s.Z)(function(){var e;null===(e=d.current)||void 0===e||e.call(d),o.current=!1})}}},8224:function(e,r,t){"use strict";function n(e,r){if(e===r)return!0;for(var t=0;t<e.length;t++)if(!Object.is(e[t],r[t]))return!1;return!0}t.d(r,{Z:function(){return n}})},48002:function(e,r,t){"use strict";t.d(r,{n:function(){return a}});var n=t(92770),s=t(52982);function a(e,r){return s.Z?e?(0,n.mf)(e)?e():"current"in e?e.current:e:r:void 0}},92770:function(e,r,t){"use strict";t.d(r,{mf:function(){return n}});var n=function(e){return"function"==typeof e}},52982:function(e,r){"use strict";var t=!!("undefined"!=typeof window&&window.document&&window.document.createElement);r.Z=t},31663:function(e,r){"use strict";r.Z=!1},59682:function(e,r,t){"use strict";var n=t(67294),s=(0,t(40351).Z)(n.useEffect);r.Z=s},72307:function(e,r,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/classroom",function(){return t(85480)}])},34714:function(e,r,t){"use strict";var n=t(85893);t(67294);var s=t(45697),a=t.n(s),i=t(86326),c=t(92310),o=t.n(c);let l=e=>{let{url:r,size:t,children:s}=e;return(0,n.jsxs)("div",{className:o().avatar,style:{width:"".concat(t,"px"),height:"".concat(t,"px")},children:[(0,n.jsx)("img",{src:r?(0,i.ei)(r,t,t):"https://static.donnermusic.com/donner-official-m/images/placeholder/default_avatar.png",alt:""}),s]})};l.propTypes={children:a().node,url:a().string,size:a().number},l.defaultProps={children:null,url:"",size:24},r.Z=l},31824:function(e,r,t){"use strict";var n=t(85893);t(67294);var s=t(45697),a=t.n(s),i=t(41664),c=t.n(i),o=t(30719),l=t(88116),u=t(96486),d=t(25675),p=t.n(d),m=t(25579);t(2014),t(45553),t(81285),t(81181);var _=t(73002),f=t.n(_);l.ZP.use([l.tl,l.pt,l.W_]);let x=e=>{let{data:r,loop:t,height:s}=e,a=e=>(0,n.jsx)("div",{className:"fill-100",style:{height:s,width:"100vw!important"},children:(0,n.jsx)(p(),{src:e,alt:"banner",fill:!0,loading:"lazy"})}),i=e=>{let r=(0,m.Ie)(e),{bannerImageUrl:t}=e;return(0,u.isEmpty)(r)?a(t):(0,n.jsx)(c(),{href:null==r?void 0:r.href,children:a(t)})};return(0,n.jsx)(o.tq,{className:f().swiper,spaceBetween:0,navigation:!(0,u.isEmpty)(r)&&r.length>1&&{disabledClass:"swiper-disabled-button"},height:s,pagination:{clickable:!0},autoplay:{delay:5e3},loop:t,children:r.map(e=>(0,n.jsx)(o.o5,{className:f()["swiper-slide"],children:i(e)},null==e?void 0:e.bannerId))})};x.propTypes={data:a().array,loop:a().bool},x.defaultProps={data:[],loop:!1},r.Z=x},85480:function(e,r,t){"use strict";t.r(r),t.d(r,{__N_SSP:function(){return W},default:function(){return A}});var n=t(85893),s=t(67294),a=t(45697),i=t.n(a),c=t(41664),o=t.n(c),l=t(96486),u=t(30719),d=t(88116),p=t(27484),m=t.n(p),_=t(1216),f=t(86326),x=t(254),v=t(94403),h=t(99872),w=t(72219),j=t(34714),g=t(60336),N=t(31824),y=t(11163),Z=t(81592),I=t.n(Z);let b=e=>{let{data:r}=e,t=(0,y.useRouter)(),[a,i]=(0,s.useState)(!0),c=()=>{let e="";switch(r.redirectType){case"COURSE":e="/classroom/course/list/".concat(r.redirectTarget);break;case"MENTOR":e="/classroom/mentor/".concat(r.redirectTarget);break;case"USER":e="/user/home/".concat(r.redirectTarget);break;case"URL":e=r.redirectTarget}t.push(e)},o=()=>{i(!1)};return(0,n.jsx)(n.Fragment,{children:a&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:I().popup,children:[(0,n.jsx)("div",{className:I().popup__close,onClick:o}),(0,n.jsx)("div",{className:I().popup__wrapper,onClick:c,children:(0,n.jsx)("img",{src:r.imageUrl,alt:r.intro})})]}),(0,n.jsx)("div",{className:I().popup__overlay,onClick:o})]})})};b.propTypes={data:i().object.isRequired};var E=t(26314),R=t.n(E);let T=e=>{let{mentorInfo:r,href:t}=e;return(0,n.jsxs)(o(),{href:{pathname:t,query:{mid:r.mentorId}},className:R()["mentor-card-wrap"],children:[(0,n.jsx)(_.ZP,{height:260,children:(0,n.jsxs)("div",{className:R().cover__wrap,children:[(0,n.jsx)("img",{src:r.mentorWebImageUrl,alt:""}),(0,n.jsx)("div",{className:R().mask__wrap})]})}),(0,n.jsxs)("figure",{className:R().college,children:[(0,n.jsx)(_.ZP,{height:20,children:(0,n.jsx)("img",{src:r.verifiedLogoUrl,alt:""})}),(0,n.jsx)("span",{className:R().text,children:r.verifiedName}),(0,n.jsx)("span",{className:R().name,children:r.mentorName}),(0,n.jsx)("span",{className:R().instrument,children:(0,l.isArray)(r.mentorInstrumentTags)&&r.mentorInstrumentTags.map(e=>(0,n.jsx)("i",{children:e},(0,l.uniqueId)("item_")))})]}),(0,n.jsx)("span",{className:R().intro,children:r.mentorIntroPhrases})]})};T.propTypes={mentorInfo:i().object,href:i().string},T.defaultProps={mentorInfo:{},href:""};var k=t(62158),q=t(25576),S=t(25136),C=t(97915);function P(e){return(0,C.ZP)("/api/course/course/listAll",{},{lang:e})}var O=t(25579);t(81285),t(81181);var U=t(90079),D=t.n(U);let L=e=>{let{pageTitle:r,pageDesc:t,pageKeywords:a,bannerData:i,mentorsData:c,coursesData:p}=e,[y,Z]=(0,s.useState)(p),[I,E]=(0,s.useState)(null);async function R(){try{let e=await P(),r=e.data.list.map(e=>{let r=e.courseList.map(r=>({...r,instrumentName:e.instrumentName}));return r});Z(r.flat())}catch(e){(0,O.b$)(e)}}let U=async()=>{try{var e;let r=await (0,C.ZP)("/api/course/popup/detail",{data:{type:"WEB"}}),t=(0,l.isEmpty)(null==r?void 0:null===(e=r.data)||void 0===e?void 0:e.list)?{}:r.data.list[0],{id:n,displayRule:s}=t;if(!n)return localStorage.removeItem("popupId"),localStorage.removeItem("popupDate"),!1;if(localStorage.setItem("popupId",n),"ONCEADAY"===s){let e=m()().date();if(localStorage.getItem("popupDate")===String(e))return!1;localStorage.setItem("popupDate",m()().date()),E(t)}else"EACHOPEN"===s&&E(t)}catch(e){(0,O.b$)(e)}},L=async()=>{try{let e=localStorage.getItem("accessToken");if(!e)return;let r=await P(),t=r.data.list.map(e=>{let r=e.courseList.map(r=>({...r,instrumentName:e.instrumentName}));return r});Z(t.flat())}catch(e){(0,O.b$)(e)}};return(0,s.useEffect)(()=>{U(),L()},[]),(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(v.Z,{title:r,description:t,keywords:a,requestUri:"/classroom"}),(0,n.jsx)(h.Z,{children:(0,n.jsx)(g.Z,{})}),(0,n.jsx)(w.Z,{}),!(0,l.isEmpty)(I)&&(0,n.jsx)(b,{data:I}),(0,n.jsx)("div",{className:D().banner__wrap,children:!(0,l.isEmpty)(i)&&(0,n.jsx)(N.Z,{data:i,height:500,loop:i.length>1})}),(0,n.jsx)("div",{className:"page__wrapper",children:(0,n.jsxs)("div",{className:D()["classroom-wrap"],children:[(0,n.jsxs)("div",{className:D()["instructor-wrap"],children:[(0,n.jsx)("div",{className:D()["title-wrap"],children:(0,n.jsx)("h1",{className:D().title,children:"KNOW YOUR INSTRUCTORS"})}),(0,n.jsx)("div",{className:D()["swiper-wrap"],children:(0,n.jsx)(u.tq,{modules:[d.W_,d.tl],spaceBetween:20,slidesPerView:3,navigation:{disabledClass:"swiper-disabled-button"},children:c.map(e=>(0,n.jsx)(u.o5,{children:(0,n.jsx)(T,{mentorInfo:e,href:"/classroom/mentor/[mid]"})},(0,l.uniqueId)("item_")))})})]}),(0,n.jsxs)("div",{className:D()["recommend-wrap"],children:[(0,n.jsx)("h1",{className:D().title,children:"RECOMMENDED FOR YOU"}),y.map(e=>(0,n.jsxs)("div",{className:D().recommend,children:[(0,n.jsxs)("div",{className:D()["content-wrap"],children:[(0,n.jsx)(_.ZP,{height:354,children:(0,n.jsx)("img",{className:D().cover,src:(0,f.ei)(e.courseImageUrl,630,354),alt:""})}),(0,n.jsxs)("div",{className:D()["info-wrap"],children:[(0,n.jsx)("p",{className:D()["info-title"],children:e.courseTitle}),(0,n.jsx)(q.Z,{labels:[e.instrumentName,e.courseLessonType,"".concat(e.courseVideoCount," Lessons")],style:{fontSize:"18px"}}),(0,n.jsxs)("figure",{className:D()["avatar-wrap"],children:[(0,n.jsx)(j.Z,{url:e.mentorImageUrl,size:40}),(0,n.jsx)("span",{children:e.mentorName})]}),(0,n.jsx)(o(),{href:{pathname:"/classroom/course/list/[cid]",query:{cid:e.courseId}},children:(0,n.jsx)("span",{className:D()["more-btn"],children:"Learn More"})})]})]}),(0,n.jsx)("div",{className:D()["swiper-wrap"],children:(0,n.jsx)(u.tq,{modules:[d.W_,d.tl],spaceBetween:20,slidesPerView:4,navigation:{disabledClass:"swiper-disabled-button"},children:e.videoList.map(r=>(0,n.jsx)(u.o5,{children:(0,n.jsx)(k.Z,{lessonInfo:r,href:"/classroom/course/[vid]",videoId:r.videoId,mentorId:e.mentorId,courseId:e.courseId,reload:()=>R()})},(0,l.uniqueId)("item_")))})})]},(0,l.uniqueId)("item_")))]})]})}),(0,n.jsx)(S.Z,{})]})};L.propTypes={pageTitle:i().string.isRequired,pageDesc:i().string.isRequired,pageKeywords:i().string.isRequired,bannerData:i().array.isRequired,mentorsData:i().array.isRequired,coursesData:i().array.isRequired};var W=!0,A=L},26314:function(e){e.exports={"mentor-card-wrap":"index_mentor-card-wrap___RCvF",cover__wrap:"index_cover__wrap__70Gw1",mask__wrap:"index_mask__wrap__9cPC_",college:"index_college__hoh8D",text:"index_text__OWTsn",name:"index_name__kGroM",instrument:"index_instrument__yvo02",intro:"index_intro__ViLS_"}},81592:function(e){e.exports={popup:"index_popup__MgD_I",popup__wrapper:"index_popup__wrapper__AWxfE",popup__close:"index_popup__close__kJkZZ",popup__overlay:"index_popup__overlay__XdYWK"}},92310:function(e){e.exports={avatar:"index_avatar__EELvJ"}},73002:function(e){e.exports={swiper:"index_swiper__iC90k","swiper-slide":"index_swiper-slide__qZQt5"}},90079:function(e){e.exports={banner__wrap:"index_banner__wrap__NJEcI","classroom-wrap":"index_classroom-wrap__BlGQj","instructor-wrap":"index_instructor-wrap___9xKY","title-wrap":"index_title-wrap__kOuaD",title:"index_title__6fGcZ","swiper-wrap":"index_swiper-wrap__QKQjR","recommend-wrap":"index_recommend-wrap__zXhi4",recommend:"index_recommend__GzQHw","content-wrap":"index_content-wrap__cl0_m",cover:"index_cover__hX8MF","info-wrap":"index_info-wrap__ny6U_","info-title":"index_info-title__cT9_9","avatar-wrap":"index_avatar-wrap__Zgmax","more-btn":"index_more-btn__cicYF"}},45553:function(){}},function(e){e.O(0,[1664,4202,5675,719,51,3106,8227,9774,2888,179],function(){return e(e.s=72307)}),_N_E=e.O()}]);