(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5091],{50081:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/articles",function(){return i(20461)}])},31824:function(e,t,i){"use strict";var s=i(85893);i(67294);var a=i(45697),l=i.n(a),_=i(41664),n=i.n(_),r=i(30719),d=i(88116),c=i(96486),o=i(25675),m=i.n(o),u=i(25579);i(2014),i(45553),i(81285),i(81181);var x=i(73002),v=i.n(x);d.ZP.use([d.tl,d.pt,d.W_]);let p=e=>{let{data:t,loop:i,height:a}=e,l=e=>(0,s.jsx)("div",{className:"fill-100",style:{height:a,width:"100vw!important"},children:(0,s.jsx)(m(),{src:e,alt:"banner",fill:!0,loading:"lazy"})}),_=e=>{let t=(0,u.Ie)(e),{bannerImageUrl:i}=e;return(0,c.isEmpty)(t)?l(i):(0,s.jsx)(n(),{href:null==t?void 0:t.href,children:l(i)})};return(0,s.jsx)(r.tq,{className:v().swiper,spaceBetween:0,navigation:!(0,c.isEmpty)(t)&&t.length>1&&{disabledClass:"swiper-disabled-button"},height:a,pagination:{clickable:!0},autoplay:{delay:5e3},loop:i,children:t.map(e=>(0,s.jsx)(r.o5,{className:v()["swiper-slide"],children:_(e)},null==e?void 0:e.bannerId))})};p.propTypes={data:l().array,loop:l().bool},p.defaultProps={data:[],loop:!1},t.Z=p},75771:function(e,t,i){"use strict";var s=i(85893);i(67294);var a=i(45697),l=i.n(a),_=i(33275),n=i.n(_);let r=e=>{let{tip:t,action:i,bgColor:a,size:l}=e;return(0,s.jsxs)("div",{className:"".concat(n()["no-data"]," ").concat(n()[a]," ").concat(n()[l]),children:[(0,s.jsxs)("div",{className:n()["no-data__cover"],children:[(0,s.jsx)("img",{src:"https://static.donnermusic.com/donner-official-web/images/no_data.png",alt:""}),(0,s.jsx)("span",{className:n()["no-data__cover__tip"],children:t})]}),i]})};r.propTypes={tip:l().string,action:l().node,bgColor:l().string,size:l().string},r.defaultProps={tip:"",action:null,bgColor:"",size:""},t.Z=r},20461:function(e,t,i){"use strict";i.r(t),i.d(t,{__N_SSP:function(){return S},default:function(){return E}});var s=i(85893),a=i(67294),l=i(45697),_=i.n(l),n=i(41664),r=i.n(n),d=i(96486),c=i(68856),o=i(86326),m=i(254),u=i(94403),x=i(99872),v=i(72219),p=i(75771),h=i(31824),g=i(58533),j=i(86470),b=i(97309),y=i.n(b);let N=e=>{let{list:t,activeKey:i,setActiveKey:a}=e;return(0,s.jsxs)("section",{className:y().tabs,children:[(0,s.jsx)("div",{className:y().tabs__title,children:"Browse by:"}),(0,s.jsx)("div",{className:y().tabs__list,children:t.map(e=>(0,s.jsx)("div",{className:"".concat(y().tabs__list__item," ").concat(i===e?y()["tabs__list__item--active"]:""),onClick:()=>a(e),children:e},(0,d.uniqueId)("item")))})]})};N.propTypes={list:_().array,activeKey:_().string,setActiveKey:_().func},N.defaultProps={list:[],activeKey:"",setActiveKey:()=>{}};var f=i(25136),w=i(25675),C=i.n(w),Z=i(97915),P=i(25579),T=i(1053),k=i.n(T);let L=(e,t)=>e.find(e=>e.type===t),{TabPane:R}=c.Z,q=e=>{var t,i;let{recommends:l,condition:_,bannerList:n,initList:b,initcursor:y}=e,[w,T]=(0,a.useState)(0),[q,S]=(0,a.useState)(b),[E,z]=(0,a.useState)(y),[A,K]=(0,a.useState)(!0),[I,H]=(0,a.useState)(!1),[M,O]=(0,a.useState)(_[0].type),[W,B]=(0,a.useState)(_[0].list[0]),G=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];try{var i,s,a,l,_,n;H(!0),T(t?1:w+1);let r={...e},c=await (n=r,"blogTitle"in n&&"all"===n.blogTitle.toLowerCase()&&(n.blogTitle=""),"tag"in n&&"all"===n.tag.toLowerCase()&&(n.tags=""),(0,Z.ZP)("/api/shop/article/list",{data:n,page:{pageSize:10,currentPage:1,startCursor:"",hasNextPage:!!t||A,hasPreviousPage:!1,endCursor:t?"":E}}));H(!1);let o=null!==(a=null==c?void 0:c.page.hasNextPage)&&void 0!==a&&a;K(o);let m=null!==(l=null==c?void 0:c.data.list.map(e=>e.node))&&void 0!==l?l:[];S((t?[]:q).concat(m));let u=null!==(_=null===(i=(0,d.last)(null==c?void 0:null===(s=c.data)||void 0===s?void 0:s.list))||void 0===i?void 0:i.cursor)&&void 0!==_?_:"";z(u)}catch(e){(0,P.b$)(e)}},U=e=>{B(e);let{fieldName:t}=L(_,M);"All"===e?G({blogTitle:""},!0):G({[t]:e},!0)},X=e=>{O(e);let{list:t}=L(_,e);B(t[0]),G({},!0)},D=(0,a.useMemo)(()=>(0,d.filter)(n,{bannerType:"PC"}),[n]);return(0,s.jsxs)(m.Z,{backGroundColor:"white",children:[(0,s.jsx)(u.Z,{requestUri:"/articles"}),(0,s.jsx)(x.Z,{}),(0,s.jsx)(v.Z,{}),(0,s.jsx)(h.Z,{data:D,loop:D.length>1,height:600}),(0,s.jsxs)("div",{className:"".concat(k().article," page__wrapper"),children:[(()=>{let e=l.slice(1,3),t=[...e.slice(0,1),...l.slice(0,1),...e.slice(1)];return(0,s.jsx)("div",{className:k().recommend,children:t.map((e,t)=>{var i,a;return(0,s.jsxs)(r(),{href:"/articles/".concat(encodeURIComponent(null==e?void 0:e.id)),className:"".concat(k().recommend__card," ").concat(1===t?k()["recommend__card--large"]:""),children:[(0,s.jsx)("div",{className:"fill-100",children:(0,s.jsx)(C(),{className:k().recommend__card__cover,loading:"lazy",src:(null==e?void 0:null===(i=e.image)||void 0===i?void 0:i.url)?(0,o.ei)(null==e?void 0:null===(a=e.image)||void 0===a?void 0:a.url,319,200,0):"https://static.donnermusic.com/donner-official-web/images/placeholder/p_237.png",alt:""})}),(0,s.jsx)("div",{className:k().tags,children:(0,d.isArray)(null==e?void 0:e.tags)&&(null==e?void 0:e.tags.map(e=>(0,s.jsx)("span",{children:"#".concat(e)},e)))}),(0,s.jsx)("p",{className:k().recommend__card__title,children:e.title}),(0,s.jsx)("p",{className:k().recommend__card__content,children:e.excerpt})]},null==e?void 0:e.id)})})})(),(0,s.jsx)(N,{list:_.map(e=>e.type),activeKey:M,setActiveKey:X}),(0,s.jsx)(c.Z,{className:k().tabs__style,defaultActiveKey:"ALL",centered:!0,size:"large",onTabClick:U,children:null===(t=L(_,M))||void 0===t?void 0:null===(i=t.list)||void 0===i?void 0:i.map(e=>(0,s.jsx)(R,{tab:e,children:(0,d.isEmpty)(e)?(0,s.jsx)(p.Z,{tip:"There is no article yet"}):(0,s.jsx)("div",{className:k().list,children:(0,s.jsx)(g.Z,{dataLength:null==q?void 0:q.length,hasMore:A,scrollableTarget:"main",next:()=>{G({[L(_,M).fieldName]:W})},loader:(0,s.jsx)("div",{className:k().loading,children:"Loading..."}),endMessage:(0,s.jsx)("p",{className:k().list__bottom,children:"You have reached the bottom."}),children:!(0,d.isEmpty)(q)||I||A?q&&(null==q?void 0:q.map(e=>{var t,i;return(0,s.jsxs)("div",{className:k().list__item,children:[(0,s.jsxs)("div",{className:k().item,children:[(0,s.jsx)(r(),{href:"/articles/".concat(encodeURIComponent(e.id)),children:(0,s.jsx)("div",{className:k().item__text,children:(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:k().item__text__title,children:null==e?void 0:e.title}),(0,s.jsx)("p",{className:k().item__text__desc,children:null==e?void 0:e.excerpt})]})})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:k().item__text__keyword,children:null==e?void 0:null===(t=e.blog)||void 0===t?void 0:t.title}),(0,s.jsx)(j.Z,{list:null==e?void 0:e.tags})]})]}),(0,s.jsx)(r(),{href:"/articles/".concat(encodeURIComponent(e.id)),className:k().item__thumb,children:(0,s.jsx)(C(),{src:null==e?void 0:null===(i=e.image)||void 0===i?void 0:i.url,alt:"",fill:!0,loading:"lazy"})})]},(0,d.uniqueId)("item_"))})):(0,s.jsx)(p.Z,{tip:"hasn't recommend list"})})})},e))})]}),(0,s.jsx)(f.Z,{})]})};q.propTypes={recommends:_().array.isRequired,condition:_().array.isRequired,bannerList:_().array.isRequired,initList:_().array.isRequired,initcursor:_().string.isRequired};var S=!0,E=q},97309:function(e){e.exports={tabs:"index_tabs__GxoaF",tabs__title:"index_tabs__title__B5EH9",tabs__list:"index_tabs__list__OlYsH",tabs__list__item:"index_tabs__list__item__8sxps","tabs__list__item--active":"index_tabs__list__item--active__wWrR4"}},73002:function(e){e.exports={swiper:"index_swiper__iC90k","swiper-slide":"index_swiper-slide__qZQt5"}},33275:function(e){e.exports={"no-data":"index_no-data__3Vsmx",small:"index_small__du0WC",grey:"index_grey__nBrHv","no-data__cover":"index_no-data__cover__n9TWi","no-data__cover__tip":"index_no-data__cover__tip__vtR7u"}},1053:function(e){e.exports={recommend:"index_recommend___TwxG",recommend__card:"index_recommend__card__uKLsk",lazy:"index_lazy__brMAQ","recommend__card--large":"index_recommend__card--large__WPxyt",recommend__card__cover:"index_recommend__card__cover__y4jqr",recommend__card__title:"index_recommend__card__title__ZyMjo",recommend__card__content:"index_recommend__card__content__jhyvj",tags:"index_tags__c4jOf",article:"index_article__nhVF3",tabs__style:"index_tabs__style__PHNc3",list__bottom:"index_list__bottom__ZabL_",list:"index_list__G3_ds",loading:"index_loading__dC4Pa",list__item:"index_list__item__wR_hC",item:"index_item___vvNL",item__text:"index_item__text__X_LSa",item__text__title:"index_item__text__title__royDg",item__text__desc:"index_item__text__desc__54O_H",item__text__keyword:"index_item__text__keyword__rJD8R",item__thumb:"index_item__thumb__ZniXC"}}},function(e){e.O(0,[1664,4202,5675,719,51,4707,1545,3106,3081,9774,2888,179],function(){return e(e.s=50081)}),_N_E=e.O()}]);