(window.webpackJsonp=window.webpackJsonp||[]).push([[21],{1414:function(e,t,a){e.exports={pageWidth:"undefined",colorGrey:"#F5F5F5",colorAccent:"#FFAF00",tabletLandscape:"screen and (orientation: landscape) and (min-height: 501px) and (max-height: 1024px) and (min-width: 501px) and (max-width: 1366px)",container:"_1Zx8wzLCvg6k9yD358ohnA",content:"uY5UUZHI8lfojqahEwTrS",title:"_3zCSOhTZUeclyGvRTnQdng",tags:"_3PvTwpVjnCrXrbCSUP7us2",tag:"PNyPVujqRxzfh1IVjqukh",tagSelected:"s11AUx_8twhOtcvLQYzfc",contentList:"_d43TyBg-jLsKW5xb5pSE"}},1415:function(e,t,a){e.exports={PC_PAGE_MIN:"1024px",PC_PAGE_MAX:"1200px",phone:"screen and (max-width: 500px), screen and (max-height: 500px)",phoneLandscape:"screen and (max-height: 500px) and (orientation: landscape)",phonePortrait:"screen and (max-width: 500px) and (orientation: portrait)",tablet:"screen and (orientation: portrait) and (min-width: 501px) and (max-width: 1024px) and (min-height: 501px) and (max-height: 1366px), screen and (orientation: landscape) and (min-height: 501px) and (max-height: 1024px) and (min-width: 501px) and (max-width: 1366px)",tabletPortrait:"screen and (orientation: portrait) and (min-width: 501px) and (max-width: 1024px) and (min-height: 501px) and (max-height: 1366px)",tabletLandscape:"screen and (orientation: landscape) and (min-height: 501px) and (max-height: 1024px) and (min-width: 501px) and (max-width: 1366px)",calender:"_3ckiYvwmrdI6aaiK407qeK",calender_container:"hcwatFvbNBExP89Lto4oh",calender_scroll_box:"_27646cjdOhfFWbK7o0PXeC",calender_chart:"_3-mbGedlFzr6PN9mW2u44u",tooltips:"_1aGp5bIDl883ZTpSUqmsdg",show:"_9-MP1r2IM9lAyASJg7Wxa",hide:"_3hG8ReDn475v6FaVSqXrxq",axisY:"_3NUEoEy1JLjVpVDq6ygrbf",axisY_item:"_1UoQmbIUOLgfKwvaXKoMIN",axisX:"_2LMmAho-MYzV8H6il6gjUU",_mainGroup:"DyiOYk3W2d5yJDoajBbtK",singleSquare:"t9CDta9uQpWb_HnVacaNC",selected:"_1jTuY6zwLuP43IahCUGdVM",today:"_2M57oDO_ECVu7jrjA9_j-f",play:"_1i97ZMGwE8j4Cs6W9q6jJP",twinkleSquare:"MdkYL-QXu6ri-O8Bv-xU7",hideScrollbar:"lXH94rHvsSf4r2aK2rt_d",ghostCover:"_3nyfMX3g00doKdtIoM1Db2"}},1416:function(e,t,a){e.exports={homeMobileModal:"_2M3PHHVeGydLF6stl5tA_f",homeMobileModalBg:"_2kKvTwXZsw9V0bKbmqO8OQ",homeMobileModalContent:"_1_I1mXtuQ0QOVvSgCi4kSt",showModal:"_2wPvIEaDNZk-s3C3nEckPu"}},1417:function(e,t,a){e.exports={PC_PAGE_MIN:"1024px",PC_PAGE_MAX:"1200px",phone:"screen and (max-width: 500px), screen and (max-height: 500px)",phoneLandscape:"screen and (max-height: 500px) and (orientation: landscape)",phonePortrait:"screen and (max-width: 500px) and (orientation: portrait)",tablet:"screen and (orientation: portrait) and (min-width: 501px) and (max-width: 1024px) and (min-height: 501px) and (max-height: 1366px), screen and (orientation: landscape) and (min-height: 501px) and (max-height: 1024px) and (min-width: 501px) and (max-width: 1366px)",tabletPortrait:"screen and (orientation: portrait) and (min-width: 501px) and (max-width: 1024px) and (min-height: 501px) and (max-height: 1366px)",tabletLandscape:"screen and (orientation: landscape) and (min-height: 501px) and (max-height: 1024px) and (min-width: 501px) and (max-width: 1366px)",userInfo:"_1lfwhg-TfSGSrv9i3-wNiA",userInfo_container:"_12-tAaSP-L17HH59lBcfoN",content:"_1oKpeDlWK7JaOTHiEhOeoO",userInfo_avatar:"SoOv6wALbTH257xlVVsxy",userAvatar:"_3uK0bt7DqtYBXuqDTJ_jpj",desc:"jiAc9xyvociJkOy9LfuaZ",chart:"_2k3Cm7ulFvVG963cE8wBfa",chart_logo:"_2kn3xFBprGl9kxHSvwiS7F",tips:"_3dnCA7Jh-rmVINLrPlgb_l",desc_years:"_8KXRdOej89LP2xIldkeE4",tips_foot:"_Gf6AkepT--1ZXzqh5mAe",squareList:"_2yhH1Sg-0Mw1uasRFpxjhc",chartBox:"_3PkL-8qIQ5P4HyeMhZ_bu",mobileCover:"_1Udn2LOx2MhkSJQS7hVg9m",mapTips:"_19mTAx3rH3NviUqdfpNMKL",tipsText:"_1qkqsIZr_QmEH9KBE2mkfn",modalContainer:"ueYjYOXu_k-h01LNeVcwu",header:"c1qFUyD8PMz0smqrUghZo",title:"_7q7Tl2FplB6376l2scWBa",icon:"_2buiMzLfJgRj9PNjbmECJP",dataInfo:"_1MgITfhRHWNGJRH-MBSmNs",footer:"_17coBsllMR2p1_okPVoYao",modalTips:"wyrggPNylHwNVa7L8fQMA",body:"_2MR4o7t9XJci8eNByZZKYY",mark:"_1e69zQW3Xtb0Q2oAEjSfz0",btnDefault:"_1QnP-1mIW54kDJuBWUGRQ6",btn:"_2Ca3CYLD10F-gcKk79OyBS",avatarModal:"_20dZKeQaFOUHdtdt1Q8RCe"}},1418:function(e,t,a){e.exports={phonePortrait:"screen and (max-width: 500px) and (orientation: portrait)",tablet:"screen and (orientation: portrait) and (min-width: 501px) and (max-width: 1024px) and (min-height: 501px) and (max-height: 1366px), screen and (orientation: landscape) and (min-height: 501px) and (max-height: 1024px) and (min-width: 501px) and (max-width: 1366px)",phone:"screen and (max-width: 500px), screen and (max-height: 500px)",container:"_1kaBLMIdFzWfldET5zlK0l",profileCard:"_1j6CQ8Mao1X47ufWW0UfI5",bodyList:"_3_FYHzBM4irVZWRYGX7qmL",flex:"_9fq7uJZ5LZM7yZGdhozqF",br8:"_1Hr1TvTWJaKosdv9EqYOJU",br16:"_1EngRHrx45hc3tnRJNK4sD",editProfileButton:"_2tAgXM9nprJBDx3DECaGUz",bodyCenter:"_7HdQhw4Ehw1Ig1PKVFGSs",tabs:"_1q9raau6hsqyIeLLcRqOpf",shareIcon:"_1CaRo0VgQEwwEtKLUO4Ecc",loading:"-hW7orPc0ZC5oDDMAy-db",profileContainer:"eQ4WOXbFnE2kwanAO8YNj",profileInfo:"_16IUw3NEvNlyHAOuWKbRMb",profileDesc:"_20UIcZ7xhUzc71RqWPhkxg",profileIcons:"Vpz1wt5vHkG0khQoXYMJt",profileFollow:"_1UPqHFLzpD5pXCWu0WaqWi",pageCenter:"_1XZ6lHcy-cc7YRwtoSK6Br",badge:"O_1bkQ86ZNwsQID9yt2-5",profileCardBtn:"_22Y2FW_c6aro0elvK9Qc2K",profileImg:"_3yblqM1HP3fyPWlNDqhRzq",mobileDropdown:"_35M2CDtUeGDXCFX2aCl7ac",mobileProfileInfo:"_2YfOa97qUTUw2YbsLHGlL4",mobileNameContainer:"_1J0RSlhZd9Lr12aqnNJ3Of",reputation:"_39T89FE8LQnwkRfsDu85AI",mobileProfileBtn:"Nt5q0Z6xCBuJcrpOoh6XX",mobileNameBox:"_3OnwF4whOEYWWC5IKvM0cl"}},1419:function(e,t,a){e.exports={phonePortrait:"screen and (max-width: 500px) and (orientation: portrait)",tablet:"screen and (orientation: portrait) and (min-width: 501px) and (max-width: 1024px) and (min-height: 501px) and (max-height: 1366px), screen and (orientation: landscape) and (min-height: 501px) and (max-height: 1024px) and (min-width: 501px) and (max-width: 1366px)",phoneLandscape:"screen and (max-height: 500px) and (orientation: landscape)",br4:"_2jDXw3uTQ1j6fE_9Fgj3ZC",br8:"_3hXJ1DBrtDAukMj6RIOX6Y",flex:"NjGXE3nNaVHTnBIdp1dkf",titleContainer:"_2oPuOPydmzKd32Jm7L0AhL",card:"_1xZbWt8b7cKJ8PPcK2Ho81",cardBody:"_1FKZ-h6wkwqFlWxcd8opR3",blank:"-y0as17U00f3yUjy_bm6K",coverImg:"w0yne3Dv0r3xewEZmzPK6",cardData:"_2at4gYkZMnpaJwF2vDvk13",top:"_3bIE36At7mMvbzLYw3dgc_",cardBodyBottom:"_1igHVPMa5M-onuGT88kla9",info:"UDRUnXpQa906W-JktG1sq",radio:"_2UQZa_vWbV7MU1jWjZn7KE",highlight:"_3YFXNLRvYKv9QF89tCvYYw",icon:"_3aFKNLTSU2UoLic3_v4sEW",number:"_8TxmyOSMD6jLetQRlmV-H",noticeBar:"_3coYdx-QOuVsWtV4xmYmf4",more:"_2IzLQH80v-2im3tTR9WnMv",musicCover:"lrNXQ7-03xOxg2vajEOB0"}},1421:function(e,t,a){e.exports={phonePortrait:"screen and (max-width: 500px) and (orientation: portrait)",tablet:"screen and (orientation: portrait) and (min-width: 501px) and (max-width: 1024px) and (min-height: 501px) and (max-height: 1366px), screen and (orientation: landscape) and (min-height: 501px) and (max-height: 1024px) and (min-width: 501px) and (max-width: 1366px)",phone:"screen and (max-width: 500px), screen and (max-height: 500px)",borderStyle:"1px solid rgba(0, 0, 0, .24)",list:"_3dJKDPiZ09WmzVPnaFj97D",item:"_31l4xpmllyrTDCG_n-rOf6",title:"LGfvhEBSxFLHq-y5iG8C9",content:"iUZuQqFluBuz2tCjgJ7W0",withOption:"_1XXEAEK9hpH1pH6IDVNUsR",option:"ZUYZEInMhl_HN-1Q_Xw1k",tooltip:"_23tNCqHv8V_5kWugMjSNht",selector:"_375rJs0sS9YO7WhBYnX2dJ",highlight:"Iqi0McLOs9_8JdCOXtVQy",popup:"_2ygB2yNSgLOA68osuvL1C_",grid:"_2sDISfTrNhcnZAroaT9vNC",container:"_11edeQd5lfY3602Mrw2mvS"}},1422:function(e,t,a){e.exports={phone:"screen and (max-width: 500px), screen and (max-height: 500px)",tablet:"screen and (orientation: portrait) and (min-width: 501px) and (max-width: 1024px) and (min-height: 501px) and (max-height: 1366px), screen and (orientation: landscape) and (min-height: 501px) and (max-height: 1024px) and (min-width: 501px) and (max-width: 1366px)",footerHeight:"96px",tabsHeight:"40px",tabsMargin:"24px",flex:"_1V80vIKsWxro76Z0dygiWQ",container:"X9lgF_-J49c3CSt-c4PFX",bodyCentered:"_29MgDilHj1H4FcbcHa69Qm",tabs:"_1GYNeaIJ7lN-IGk7qvg3_E",body:"_2f563MssN2zyzSroc8svdn",newModelButton:"_2cdQy4ljbdOyHUAdETzs3s",loading:"iwXKLCzFsB7K_w5TYRBqN",emptyList:"bLYeimgd2PQk6v_h9Pp8u",order:"_3uvQBX6TcuT3f2jte5OCdV",popupContainer:"_3rFsjYRlvTIHSzCCjXuU5R",experienceBox:"_30rQ2XDfZVgqPpgy1_U2pB",experienceModal:"uypcolsAJpyJn9q8-UypW",popupListItem:"_3vT7l0vpt2l3ZRNtEQGf-Q",icon:"_2B0f9ZIhO6pVLEeuXnF0j_",wikiTriggerContainer:"_2ZqHfYqWWxCwsiey_f0Jx",wikiTrigger:"_2GK-mh8VY15EGGhg9klXlI",searchIcon:"_2d_E4nt7rQEAEtVDzaEWAb",box3logoPrimary:"rxdH2OGByQoBxvlYnxDMe",orderContainer:"_35LXKdLeO5ItJwoC9-wwx5"}},1426:function(e,t,a){e.exports={phone:"screen and (max-width: 500px), screen and (max-height: 500px)",tablet:"screen and (orientation: portrait) and (min-width: 501px) and (max-width: 1024px) and (min-height: 501px) and (max-height: 1366px), screen and (orientation: landscape) and (min-height: 501px) and (max-height: 1024px) and (min-width: 501px) and (max-width: 1366px)",phonePortrait:"screen and (max-width: 500px) and (orientation: portrait)",list:"_36iiBbqh3U6CFhBsddByPW",listItem:"_2BD0PSIy4sp5hpa_-ky33H",titleIcon:"-wp-mtov27gYHXYCar-jt",flex:"_3nh4FLyNUdUHAK_YJx-tM7",popup:"lK2qI7o4UYwymFcw0Cip2",clickable:"_3HcWxB5bmQn1xeGxU1vF-q",accountBindTip:"_1uQw_HYg5RvM2YGct_dGR4",accountBindTipFade:"bkjBxpebPhiTYyPme6ZkQ",container:"xBSZoC1Uwudsp4tKtVlSV",close:"_3iONhAcVImJfWmGusTmmUP",proContainer:"_3nbbXV4UEyaSOwbt_GXvrU",proList:"_2gWYDuUZdp-uaN5JZviaBB"}},1427:function(e,t,a){e.exports={tablet:"screen and (orientation: portrait) and (min-width: 501px) and (max-width: 1024px) and (min-height: 501px) and (max-height: 1366px), screen and (orientation: landscape) and (min-height: 501px) and (max-height: 1024px) and (min-width: 501px) and (max-width: 1366px)",phone:"screen and (max-width: 500px), screen and (max-height: 500px)",container:"qmmEWCZBXXnhefz4eB6ro",userCard:"_1c3X-tgkzawDxWq3_aQlcl",cancelBlockBtn:"pElDdkh8nPWRO0VADPaif",blockDescription:"_1f50TD6TeMXlhIb6XXcsDN",blockList:"I1ouvViYcHY0gEbq88HzB",center:"_1BlWrhcFGvhbf40G_5X6t2",title:"_3PHKSSkAEOtRW-3wdspTZ1",empty:"_1gfCoawmaJEB0hz6DDEm9J"}},1428:function(e,t,a){e.exports={canvas:"_3jvcBer43WN7b99RCrRjyO"}},1429:function(e,t,a){e.exports={slider:"_9--zUrps7qUaXS82FKV84"}},1430:function(e,t,a){e.exports={phone:"screen and (max-width: 500px), screen and (max-height: 500px)",tablet:"screen and (orientation: portrait) and (min-width: 501px) and (max-width: 1024px) and (min-height: 501px) and (max-height: 1366px), screen and (orientation: landscape) and (min-height: 501px) and (max-height: 1024px) and (min-width: 501px) and (max-width: 1366px)",br16:"_1BphqUdklIGFZY63xMH2Nx",card:"_1WYkmpMP8HM1W6CZQUXzZ8",header:"_3JbxKo_8X2A1aoijL9ddcx",titleContainer:"_248BNPCxoWKcbTtUv3f1UA",verifyWrap:"y3AW7IzGnQNHaUINVF5iv",icon:"_2k8UBprRvcaSP4tjnDEkH-",avatarContainer:"_1QEjfXRAwwNtEndpQ_6tOJ",avatar:"_2OZzN-uLULDD52O0Uj92Ac",empty:"TzQMSbUEOPoCv_WxtpXly",inputContainer:"_2v-Lvmd9CWhxAsRsGHE-FK",input:"_3dGI-4ujpyt21RjPsYwYRp",inputTitleContainer:"cOhgN-I1sa0E0FuRpny5O",flex:"_1oIc01DaJ4-rl0uMsD2X_9",gender:"_1U7CW4pLFpCSKskXieNHHu",dropdown:"-r1ZuijXkGdduMOwziUUY",birthday:"_3498zvFFgaVh9LbIWaGxBt",birthdayDropdownContainer:"_1i8JAf8gF6egeiXhS7_bRQ",dropdownPopup:"_4f0epsI4Cppb_P3c38ebE",buttonGroup:"_2IqrZTIfqEGVghaCCrU3oc",avatarSelectorBody:"rMx6l3Yhrn-2pSTu_qr1S",center:"_2RosMEu6jY00mZLs6no60K",actions:"_1Yo8lkJnmRtSAF8CpRu2lb",selfAvatar:"WNKwKdntIB-plJq8EgW0J",cursorDef:"_1eBg14GeQSQERAu7Hp_oGP",avatarPopup:"_3TEkqBP1CkXSugFn4cUnW2",avatarPopupItem:"yHIyhvbdAipou7HCy0XxL",avatarOverlay:"dFC4pjlDfv2HwcjTy1PzD",avatarSelectorCard:"_1laVUu5e-TOwCOqYgDbjP0",sysAvatar:"glWbB_VyPzCC0dkyBLv0d",selected:"_2UbGLLOKeRMzVvfNmIYCZf",radioContainer:"_1RtW3l7PHKXgEIHUKcdwIj",rejectBlock:"_2ydTCRndisfJKEEgtZz0kP",mobile:"X5s1gFlicCVltB-Qt1SZg",listItem:"_2UfWHy0EEgNju0Nsd06mX8",itemBody:"_13SCFHEQn5JTDm904QB8A-",inputOverlay:"_1u3-yTkulHRO6MfuPQbeTV",overlayBody:"Yu2MF8bYFmYH3lCnFF1XX",avatarSelectorOverlay:"_948jUV6gi3qd0q0un4Y75",restChar:"_28UK5Bx3JC-SjWso1xruf3",cropMobileOverlay:"_1IXc_JgY8HNbM9LsLyL8Gl",cropMobileRest:"_2R53noT5pBJp9IB5TPItr8",cropMobileOptContainer:"_1AUlBvIwPZSNL3SP5Uiqbh",cropMobileOptBtn:"_31PF_5GWfkAEGB56YHCDXP",cropRotateIcon:"_1DgXzQpjCoNYI0C-1USWg2"}},1431:function(e,t,a){e.exports={phone:"screen and (max-width: 500px), screen and (max-height: 500px)",tablet:"screen and (orientation: portrait) and (min-width: 501px) and (max-width: 1024px) and (min-height: 501px) and (max-height: 1366px), screen and (orientation: landscape) and (min-height: 501px) and (max-height: 1024px) and (min-width: 501px) and (max-width: 1366px)",phonePortrait:"screen and (max-width: 500px) and (orientation: portrait)",container:"_2l7XepXxrwgtJrFrOyFlHh",tabs:"_1nk6piz-xXBYmJVDfZ02f8",body:"LYOc8ra993F8T78MDN-nX",highlight:"_1Ee3NDcETq-bnakKTY9I1j"}},1432:function(e,t,a){e.exports={tabsBar:"_3FQr-YJdNB6II1Nu3Z4AY7",box3logo:"_1EkIHJEnFvAJ73cF0gG3Gi",box3logoPrimary:"_160pyOqzqBFZIG4kh4W6Hw",headCard:"_2rRVNKhRLU2yhkEvGHgeJh",userDetail:"_2lsC8XKP_-8P46tAQmzqhA",headOne:"_2zFkD67822aD56mDqeRDcX",reputation:"_3xCLc_mBjY-k0AGznVpzwG",expand:"IrhM1vwzdZ7k1qTHQeP5g",list:"_1eKmSB0onBN3tWnDXqOavT",bar:"_4tQV9flSSXhUbuLjgzY4",bottomTip:"_3kR5ffSsv5zQCFSiGt-NaE",bottomTipArrow:"_2B0dA_RpJdSK196qsRxIo8",rowBox:"KmRLAZAwX35KoAp9wLQno",verify:"_2C_GV3Ueb26oNevz9mSvcK",verifyIcon:"_3b-mH6xkckEMZ1B-fnm3UY",text:"_3v8JRVfQFhT0-ad_3AE7Or",tag:"_1Me6DqtMA4F1GdI9FRlGQc"}},1433:function(e,t,a){e.exports={phone:"screen and (max-width: 500px), screen and (max-height: 500px)",tablet:"screen and (orientation: portrait) and (min-width: 501px) and (max-width: 1024px) and (min-height: 501px) and (max-height: 1366px), screen and (orientation: landscape) and (min-height: 501px) and (max-height: 1024px) and (min-width: 501px) and (max-width: 1366px)",title:"_1Wq7_OoqV0jCi-r6J23wAk",noResult:"_1wflvH6ECKwayRrLJcdLyb",userGrid:"_2jVSG2aJ8Fa9ZiJvO5jBWo",userCard:"_1sH-BwXzVHWCQgPC205RXo",loading:"OWlt2ZQvfkr8MKLOM-KxW"}},1619:function(e,t,a){"use strict";a.r(t),a.d(t,"default",(function(){return sn}));var n=a(1),r=a.n(n),c=a(73),i=a(11),l=a(23),o=a(2),s=a(252),d=a(57),m=a(329),u=a(94),p=a(264),h=a(326),b=a(133),g=a(237),E=Object.defineProperty,w=Object.defineProperties,f=Object.getOwnPropertyDescriptors,O=Object.getOwnPropertySymbols,v=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable,y=(e,t,a)=>t in e?E(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,x=(e,t)=>{for(var a in t||(t={}))v.call(t,a)&&y(e,a,t[a]);if(O)for(var a of O(t))j.call(t,a)&&y(e,a,t[a]);return e},_=(e,t)=>w(e,f(t));function C(e){const t=Object(s.b)(),[a,c]=Object(n.useState)(0),[i,o]=Object(n.useState)(l.a.ContentType.game),[E,w]=Object(n.useState)(!1),{list:f,isLoading:O}=Object(d.i)(t=>{return a=this,n=[t],r=function*({offset:t,reload:a}){const n=yield e.fetchContentList({offset:a?0:t,limit:20});return{rows:n.rows,count:n.count}},new Promise((e,t)=>{var c=e=>{try{l(r.next(e))}catch(e){t(e)}},i=e=>{try{l(r.throw(e))}catch(e){t(e)}},l=t=>t.done?e(t.value):Promise.resolve(t.value).then(c,i);l((r=r.apply(a,n)).next())});var a,n,r},e=>{t.logger.error(e.toString())},[]),v=Object(g.b)();return r.a.createElement("div",null,r.a.createElement(g.a,x({},v),f.map((a,n)=>r.a.createElement(m.a,{key:a.content_id,type:a.type||e.type,content:_(x({},p.f.identity),{content_id:a.content_id,image:a.image,name:a.name,author_id:a.author_id,author_name:a.author_name||e.author_name||"",author_avatar:a.author_avatar||e.author_avatar||"",view_count:a.view_count,play_count:a.play_count}),onPlay:()=>t.openGamePlay({content_id:a.content_id,url:a.url}),onPreview:()=>{c(a.content_id),o(a.type||e.type),w(!0)}}))),O&&r.a.createElement(u.a,null),E&&r.a.createElement(r.a.Suspense,{fallback:r.a.createElement(b.a,{children:null})},r.a.createElement(h.a,{invisible:!a,contentId:a,contentList:f.map(t=>_(x({},p.f.identity),{content_id:t.content_id,image:t.image,name:t.name,author_id:t.author_id,author_name:t.author_name||e.author_name||"",author_avatar:t.author_avatar||e.author_avatar||"",view_count:t.view_count,play_count:t.play_count})),onClose:()=>c(0),type:i})))}var N=a(68),k=a(46),S=a(61);const P=a(1414);function D(){const e=Object(s.b)(),t=Object(k.b)(S.c),a=Object(c.g)();return t.data?n.createElement(I,{website:e,userInfo:t.data,setPage:e=>a.push(e)}):null}class I extends n.Component{constructor(e){super(e),this.fetchList=e=>this.props.website.rpc.user.api.getBrowseHistory({type:this.state.contentType,limit:e.limit||20,offset:e.offset||0}),this.state={contentType:l.a.ContentType.game}}handleSelectTag(e){this.setState({contentType:e})}render(){return n.createElement(N.c,null,n.createElement("div",{className:P.container},n.createElement("div",{className:P.content},n.createElement("div",{className:P.title},Object(o.e)("history")),n.createElement("div",{className:P.tags},n.createElement("div",{className:this.state.contentType===l.a.ContentType.game?P.tagSelected:P.tag,onClick:()=>this.handleSelectTag(l.a.ContentType.game)},Object(o.e)("game")),n.createElement("div",{className:this.state.contentType===l.a.ContentType.asset?P.tagSelected:P.tag,onClick:()=>this.handleSelectTag(l.a.ContentType.asset)},Object(o.e)("asset"))),n.createElement("div",{className:P.contentList},this.state.contentType===l.a.ContentType.game&&n.createElement(C,{type:this.state.contentType,fetchContentList:this.fetchList}),this.state.contentType===l.a.ContentType.asset&&n.createElement(C,{type:this.state.contentType,fetchContentList:this.fetchList})))))}}var M=a(79),z=a(19),T=a(183),B=a(52),L=a(8),F=a(24),R=a(295),A=a(131),U=a(325),H=a(293),G=a(7),q=a(364),Y=a(104),X=(e=>(e.published_maps="published_maps",e.published_models="published_models",e.published_musics="published_music",e.collection="collection",e))(X||{}),W=a(197),V=a(373),Q=a(196),K=a(302),J=a(75),Z=a(139),$=a(213),ee=a(152),te=a(107),ae=a(328),ne=a(370),re=a(64),ce=a(51),ie=a(365),le=a(412),oe=a(480),se=a(174),de=a(96),me=a(294),ue=a(595),pe=a.n(ue);const he=10,be=12,ge=2,Ee=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一","十二"],we=["一","三","五","日"],fe={getNow:()=>(new Date).getTime(),transDayToLocal:e=>0===e?6:e-1,getCountOfTheYears:e=>/^\d+00$/.test(""+e)?e%400==0?366:365:e%4==0?366:365,getIndexOfTheYears(){const e=(new Date).getTime(),t=new Date((new Date).getFullYear().toString()).getTime();return Math.floor((e-t)/864e5)}};var Oe=Object.defineProperty,ve=Object.defineProperties,je=Object.getOwnPropertyDescriptors,ye=Object.getOwnPropertySymbols,xe=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,Ce=(e,t,a)=>t in e?Oe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Ne=(e,t)=>{for(var a in t||(t={}))xe.call(t,a)&&Ce(e,a,t[a]);if(ye)for(var a of ye(t))_e.call(t,a)&&Ce(e,a,t[a]);return e},ke=(e,t)=>ve(e,je(t));const Se=a(1415);const Pe={0:"rgba(0, 0, 0, 0.06)",1:"rgba(221, 241, 215, 1)",2:"rgba(154, 214, 134, 1)",3:"rgba(59, 148, 34, 1)"};let De=!1;const Ie=r.a.memo(e=>{const t=r.a.useRef(fe.getIndexOfTheYears()),a=(r.a.useRef(Object(G.f)()),(null==e?void 0:e.padding)||he),n=(null==e?void 0:e.width)||880,c=(null==e?void 0:e.height)||130,i=(null==e?void 0:e.size)||be,l=i+ge,[o,s]=r.a.useState([]),[d,m]=r.a.useState([]),[u,p]=r.a.useState(null),[h,b]=r.a.useState({count:null,date:null,showTooltips:!1,style:""});r.a.useEffect(()=>{g()},[e.years,e.data]);const g=()=>{const t=(e.years?new Date(e.years):new Date).getFullYear()+"/1/1",a={index:0,squareDate:new Date(t),addIndex(){this.index+=1},addDate(){this.squareDate.setDate(this.squareDate.getDate()+1)}},n=Math.ceil((fe.getCountOfTheYears(a.squareDate.getFullYear())||365)/7);let r=a.squareDate.getMonth(),c=0;const i=[],o=[];for(let e=0;er){const n=new Date(a.squareDate);n.setDate(n.getDate()-1);const o=n.getMonth()!==a.squareDate.getMonth()?e+1:e+1-.5,s=(o-c)*l-2;i.push(s),[c,r]=[o,t]}if(e===n-1){const t=(e+1-c)*l;i.push(t)}}}m(i),s(o)},E=a=>{var n,c;const{squareInfo:o,columnIndex:s,startOfList:d,endOfList:m}=a,h=m||7;let b=[];for(let a=d||0,s=0;a{G.v||e.onRectClick&&e.onRectClick(ke(Ne({},d),{date:E}))},onTouchStart:()=>{G.v&&(p(s),e.onRectClick&&e.onRectClick(ke(Ne({},d),{date:E})))}}));b=[...b,f],o.addDate(),o.addIndex()}return r.a.createElement("g",{key:"g-"+s,style:{transform:`translate(${s*l}px, 0px)`}},b)},w=r.a.useCallback(pe()(a=>{var n,r;if(a.target instanceof SVGRectElement&&De){const c=a.target,i=+(c.getAttribute("data-index")||0),l=t.current===i?"今日":c.getAttribute("data-date")+" ",o=e.data[i],s=c.getBoundingClientRect(),d=null==(n=document.querySelector("#"+Se.tooltips))?void 0:n.getBoundingClientRect(),m=window.document.body.getBoundingClientRect(),u=null==(r=document.querySelector("."+Se.calender_container))?void 0:r.getBoundingClientRect(),p=d.width/2+s.left>m.width?m.width-d.width-u.left:s.left-u.left-d.width/2,h=s.top-u.top-d.height,g=`translate(${Math.floor(p)}px,${h}px)`;b({count:o.totalTimes||0,date:l,showTooltips:!0,style:g})}},200),[]),f=()=>{h.showTooltips&&b(ke(Ne({},h),{showTooltips:!1}))};return r.a.createElement("div",{className:Se.calender},r.a.createElement("ul",{className:Se.axisY,style:{paddingTop:a+"px"}},we.map(t=>r.a.createElement("li",{className:Se.axisY_item,style:{height:2*l},key:t},r.a.createElement("span",{style:Ne({width:i+"px",height:i+"px",lineHeight:i+"px"},e.axisYStyles)},t)))),r.a.createElement("div",{className:`${Se.calender_scroll_box} ${Se.hideScrollbar}`},r.a.createElement("div",{className:Se.calender_container,style:{width:n,height:c}},r.a.createElement("ul",{className:Se.axisX,style:{transform:`translate3d(${l}px, ${7*l+a}px, 0)`}},d.map((t,a)=>r.a.createElement("li",{key:"x-"+a,style:{width:t+"px",height:i+"px",lineHeight:i+"px"}},r.a.createElement("span",{style:Ne({},e.axisXStyles)},Ee[a])))),r.a.createElement("svg",{onMouseEnter:e=>{e.target instanceof SVGSVGElement&&(De=!0)},onMouseMove:e=>{e.persist(),w(e)},onMouseOut:e=>{(e=>{e.target instanceof SVGRectElement&&f()})(e)},onMouseLeave:e=>{if(De=!1,e.target instanceof SVGSVGElement){const e=setTimeout(()=>{f(),clearTimeout(e)})}},className:Se.calender_chart,width:n,height:c},r.a.createElement("g",{className:Se._mainGroup,style:{transform:`translate(${l}px, ${a}px)`}},o)),r.a.createElement("div",{style:{transform:h.style},id:Se.tooltips,className:h.showTooltips?Se.show:Se.hide},r.a.createElement("p",null,r.a.createElement("span",null,h.date),r.a.createElement("span",null,"贡献数: ",h.count))),r.a.createElement("div",{className:Se.ghostCover}))))});Ie.displayName="TestCalender";const Me=a(1416),ze=e=>r.a.createElement("div",{className:`${Me.homeMobileModal} ${e.isShowModal?Me.showModal:""}`},r.a.createElement("div",{className:Me.homeMobileModalBg,onClick:e.cancel}),r.a.createElement("div",{className:Me.homeMobileModalContent,style:{height:e.height?e.height+"px":"auto",transform:`translate3d(0, ${e.isShowModal?0:"100%"},0)`}},e.children));var Te=a(60);const Be=a(1417),Le=["rgba(255, 255, 255, 0.2)","rgba(221, 241, 215, 1)","rgba(154, 214, 134, 1)","rgba(59, 148, 34, 1)"],Fe=(new Date).getFullYear(),Re={};for(let e=2022;e<=Fe;e+=1)Re[""+e]=""+e;const Ae="贡献图用于记录创作者每天在神奇代码岛的创作与学习。贡献行为数量与贡献行为价值都会影响颜色深浅,打开编辑器、发布作品、作品被收藏与评论等等与创作相关的行为,均有助于点亮当天的神奇小格子哦。",Ue=e=>{const t=r.a.useRef(Object(G.f)()),a=Object(k.b)(S.c),n=Object(k.b)(S.a,()=>[]),[c,i]=r.a.useState(""+Fe),[l,o]=r.a.useState(!1),[s,d]=r.a.useState(!1),[m,p]=r.a.useState([]),[h,b]=r.a.useState(!1),[g,E]=r.a.useState({date:"----/-/-",count:"-"});r.a.useEffect(()=>{b(!0),Te.a.Contribution.getContributionInfoUsingGet({date:c,userId:e.ID}).then(e=>{p(e||[])}).finally(()=>{b(!1)}).catch(console.error)},[e.ID,c]);const w=e=>{const{date:t,totalTimes:a}=e;E({date:t||"2022/01/01",count:a||0})};return r.a.createElement("div",{className:Be.userInfo},r.a.createElement("div",{className:Be.userInfo_container},r.a.createElement("div",{className:Be.content},r.a.createElement("div",{className:Be.desc},r.a.createElement("ul",null,r.a.createElement("li",{className:Be.chart},"贡献图",r.a.createElement("span",{className:Be.chart_logo},r.a.createElement(F.a,{icon:"question-icon"}),r.a.createElement("div",{className:Be.tips},r.a.createElement("p",null,Ae),r.a.createElement("div",{className:Be.tips_foot},r.a.createElement("ul",{className:Be.squareList},[1,2,3].map(e=>r.a.createElement("li",{style:{backgroundColor:Le[e]},key:e}))),r.a.createElement("span",null,"少至多"))))),r.a.createElement("li",null))),h?r.a.createElement("div",{style:{width:"100%"}},r.a.createElement(u.a,null)):r.a.createElement("div",{className:Be.chartBox,onClick:()=>t.current&&o(!0)},r.a.createElement(Ie,{size:12,width:760,height:120,years:c,data:m,playLimit:t.current?60:365})))),t.current?r.a.createElement(ze,{cancel:()=>o(!1),isShowModal:l},r.a.createElement("div",{className:Be.modalContainer},r.a.createElement("div",{className:Be.header},r.a.createElement("div",{className:Be.title},"贡献图 ",r.a.createElement("span",{className:Be.icon,onClick:()=>{o(!1),d(!0)}},r.a.createElement(F.a,{size:16,icon:"question-icon"}))),r.a.createElement("div",{onClick:()=>o(!1)},r.a.createElement(F.a,{size:24,icon:"close"}))),r.a.createElement("p",{className:Be.dataInfo},r.a.createElement("span",null,g.date),r.a.createElement("span",null,"贡献数: ",g.count)),r.a.createElement("div",{className:Be.chart},r.a.createElement(Ie,{size:32,width:1900,height:290,years:c,data:m,playLimit:t.current?90:365,axisXStyles:{color:"#0009"},axisYStyles:{color:"#0009"},onRectClick:w})),r.a.createElement("div",{className:Be.footer},r.a.createElement(A.a,{type:"default",className:Be.btnDefault,onClick:()=>o(!1)},"我知道了")))):null,t.current?r.a.createElement(ze,{cancel:()=>d(!1),isShowModal:s,height:300},r.a.createElement("div",{className:Be.modalTips},r.a.createElement("div",{className:Be.header},r.a.createElement("h5",null,"什么是贡献图"),r.a.createElement("div",{onClick:()=>d(!1)},r.a.createElement(F.a,{className:Be.icon,size:24,icon:"close"}))),r.a.createElement("div",{className:Be.body},r.a.createElement("p",null,Ae),r.a.createElement("div",{className:Be.mark},r.a.createElement("ul",{className:Be.squareList},[1,2,3].map(e=>r.a.createElement("li",{style:{backgroundColor:Le[e]},key:e}))),r.a.createElement("span",null,"少至多"))),r.a.createElement("div",{className:Be.footer,style:{justifyContent:a.isLogin?"center":"space-between"}},r.a.createElement("div",null,r.a.createElement(A.a,{type:"default",className:Be.btnDefault,onClick:()=>d(!1)},"知道了")),!a.isLogin&&r.a.createElement("div",null,r.a.createElement(A.a,{type:"primary",color:"red-gradient",className:Be.btn,onClick:()=>{d(!1),n.showLogin()}},"登录/注册"))))):null)};var He=a(132),Ge=a(138),qe=Object.defineProperty,Ye=Object.defineProperties,Xe=Object.getOwnPropertyDescriptors,We=Object.getOwnPropertySymbols,Ve=Object.prototype.hasOwnProperty,Qe=Object.prototype.propertyIsEnumerable,Ke=(e,t,a)=>t in e?qe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Je=(e,t)=>{for(var a in t||(t={}))Ve.call(t,a)&&Ke(e,a,t[a]);if(We)for(var a of We(t))Qe.call(t,a)&&Ke(e,a,t[a]);return e},Ze=(e,t,a)=>new Promise((n,r)=>{var c=e=>{try{l(a.next(e))}catch(e){r(e)}},i=e=>{try{l(a.throw(e))}catch(e){r(e)}},l=e=>e.done?n(e.value):Promise.resolve(e.value).then(c,i);l((a=a.apply(e,t)).next())});const $e=a(1418);const et={map:l.a.ContentType.game,model:l.a.ContentType.asset,music:l.a.ContentType.music},tt=M.c.api.get.ret;function at(){const e=Object(k.b)(S.c),t=Object(s.b)(),a=Object(c.g)(),p=Object(c.h)(),E=Object(k.b)(S.a,()=>[]),w=new URLSearchParams(p.search),f=w.get("tab")||(Object(He.a)()?X.published_models:X.published_maps),O=w.get("type")||(Object(He.a)()?"model":"map"),[v,j]=Object(n.useState)(!1),[y,x]=Object(n.useState)(!1),{params:_}=Object(c.j)(),[C,P]=Object(n.useState)(tt.clone(tt.identity)),[D,I]=Object(n.useState)(!1),[ue,pe]=Object(n.useState)(0),[he,be]=Object(n.useState)(!1),ge={[X.published_maps]:l.a.ContentType.game,[X.published_models]:l.a.ContentType.asset,[X.published_musics]:l.a.ContentType.music,[X.collection]:et[O]},Ee=!_.username||e.data&&e.data.username===_.username,we=Object(G.f)(),fe=ge[f],Oe=Object(me.a)(),ve=Object(ie.b)({initValue:{isFollowing:C.is_following,followerCount:C.follower_count,followingCount:C.following_count},onFollowChange:e=>Ze(this,null,(function*(){try{return yield t.rpc.user.api.follow({id:C.id,isFollow:e.isFollowing}),!0}catch(e){return z.a.rpcError(e),t.logger.error(e.toString()),!1}}))}),je=Object(n.useCallback)(e=>Object(He.a)()?"":!we&&e?" "+e:"",[we]);r.a.useLayoutEffect(()=>{const{username:e}=_;e&&C.id===+e&&a.replace(`${i.a.user}/${C.username}${p.search}`)},[_.username]),r.a.useEffect(()=>{const{username:n}=_;e.initialized&&(n||e.id)&&n!==C.username&&C.id!==+n&&(I(!0),Ee?t.rpc.user.api.get({condition:"id",value:""+e.id,publishedContentsCount:!0}).then(e=>{P(e),I(!1),a.replace(`${i.a.user}/${e.username}${p.search}`)}).catch(e=>{t.logger.error(e.toString()),I(!1)}):/^\d+$/.test(n)?t.rpc.user.api.get({condition:"id",value:n,publishedContentsCount:!0}).then(e=>{P(e),I(!1),a.replace(`${i.a.user}/${e.username}${p.search}`)}).catch(e=>{I(!1);const a=Object($.a)(e);"noSuchUser"!==a.i18n?t.logger.error(a.toString()):j(!0)}):t.rpc.user.api.get({condition:"username",value:n,publishedContentsCount:!0}).then(e=>{P(e),I(!1)}).catch(e=>{I(!1);const a=Object($.a)(e);"noSuchUser"!==a.i18n?t.logger.error(a.toString()):j(!0)}))},[_.username,e.id,e.initialized]),r.a.useEffect(()=>{C.id&&Object(K.a)({title:Object(o.e)("xxxHomepage",{name:C.displayname}),desc:C.description,imgUrl:Object(B.a)(C.avatar_hash)+".png",link:`${window.location.origin}${i.a.user}/${C.username}${p.search}`})},[C.id]);const{list:ye,isLoading:xe,showLoading:_e,showEnd:Ce}=Object(d.i)(e=>Ze(this,[e],(function*({offset:e,reload:a}){if(!C.id)return;const n=f===X.collection;return yield t.rpc.content.api.list({limit:16,offset:a?0:e,authorId:C.id,type:fe,isPublic:!0,sort:l.a.ContentOrder.published,filter:n?"collected":void 0,recommendByContentId:void 0,status:void 0,noCache:void 0})})),e=>{z.a.error(Object(o.e)("fetchFailed")),t.logger.error(e.toString())},[C.id,O,f]),Ne=Object(Ge.b)(ye,fe,Object(He.a)());if(!e.initialized||D)return r.a.createElement(N.c,{center:!0},r.a.createElement(u.a,null));if(v)return r.a.createElement(q.a,null);if(Ee&&!e.isLogin)return r.a.createElement(N.c,{center:!0},r.a.createElement(Q.a,{rightElement:r.a.createElement(L.a,{size:20,onClick:()=>t.switchLang()},r.a.createElement("b",null,Object(o.e)("switchLang")))}),r.a.createElement(ce.c,{hash:Y.a.creation,width:240,height:240}),r.a.createElement(L.a,{size:16,className:$e.br16},r.a.createElement("b",null,Object(o.e)("loginGetMoreFeatures"))),r.a.createElement(A.a,{color:"red",onClick:()=>E.showLogin()},Object(o.e)("login_register")));let ke=r.a.createElement(r.a.Fragment,null);if(Ne.length){const e=Object(g.b)();ke=r.a.createElement("div",{className:$e.bodyList},r.a.createElement(de.a.v,{enable:we,size:12}),r.a.createElement(g.a,Je({},e),Ne.map((e,t)=>r.a.createElement(m.a,{key:t,content:e,type:fe,isPro:!1,onPreview:()=>{pe(e.content_id),be(!0)}}))),r.a.createElement(de.a.v,{enable:we,size:12}),Ce&&r.a.createElement(T.a,null),_e&&r.a.createElement(u.a,{className:$e.loading}),he&&r.a.createElement(r.a.Suspense,{fallback:r.a.createElement(b.a,{children:null})},r.a.createElement(h.a,{invisible:!ue,contentId:ue,contentList:Ne,onClose:()=>pe(0),type:fe,isPro:!1})))}else if(xe)ke=r.a.createElement(u.a,{className:$e.pageCenter});else{let e="",t=r.a.createElement(r.a.Fragment,null);if(Ee)switch(f){case X.published_maps:e=Object(o.e)("noContentsAndCreate",{type:Object(o.e)("game")}),t=r.a.createElement(A.a,{width:120,onClick:()=>{a.push(i.b.meContent({type:V.b.map}))},color:"red"},Object(o.e)("createMap"));break;case X.published_models:e=Object(o.e)("noContentsAndCreate",{type:Object(o.e)("model")}),t=r.a.createElement(A.a,{width:120,onClick:()=>{a.push(i.b.meContent({type:V.b.model}))},color:"red"},Object(o.e)("createModel"));break;case X.published_musics:e=Object(o.e)("noContentsAndCreate",{type:Object(o.e)("music")}),t=r.a.createElement(A.a,{color:"red",width:120,onClick:()=>{a.push(i.b.meContent({type:V.b.music}))}},Object(o.e)("createMusic"));break;case X.collection:e=Object(o.e)("noCollection");const n={route:i.a.home,text:"discoverMaps"};switch(O){case"model":n.route=i.a.voxel,n.text="discoverModels";break;case"music":n.route=i.a.music,n.text="discoverMusic"}t=r.a.createElement(A.a,{color:"red",width:120,onClick:()=>{a.push(n.route)}},Object(o.e)(n.text))}else e=f===X.collection?Object(o.e)("noCollection"):Object(o.e)("noContents");ke=r.a.createElement("div",{className:$e.bodyCenter},r.a.createElement(L.a,{className:$e.br16,bold:!0},e),t)}const Se=f===X.collection,Pe=Se&&r.a.createElement(H.a,{divider:!0,list:Object(He.a)()?{model:Object(o.e)("model"),music:Object(o.e)("music")}:{map:Object(o.e)("map"),model:Object(o.e)("model"),music:Object(o.e)("music")},onSelect:e=>a.push(i.b.user(C.username,{tab:f,type:e}))},r.a.createElement(L.a,null,Object(o.e)(O))),De=[];if(e.id&&(De.push({text:Object(o.e)("report"),onClick:()=>x(!0),hide:!1}),C.tag!==M.e.official)){const t=e.blockList.indexOf(C.id)>=0;De.push({text:t?Object(o.e)("unblock"):Object(o.e)("blockUser"),onClick:()=>{e.updateBlock(C.id,!t).then(()=>{var e;z.a.success(Object(o.e)("submitSuccess")),ve.setData((e=Je({},ve.data),Ye(e,Xe({isFollowing:!1}))))}).catch(e=>z.a.rpcError(e))},hide:!1})}const Ie=e.isLogin?r.a.createElement(te.a,{popup:r.a.createElement(ae.a,{items:De})},r.a.createElement(F.a,{size:24,icon:"more",className:"ml-16"})):r.a.createElement("div",{onClick:Oe.handleLogin},r.a.createElement(F.a,{size:24,icon:"more",className:"ml-16"})),Me=r.a.createElement(F.a,{size:24,icon:"share",onClick:()=>E.showShareBox({title:C.displayname,desc:C.description,image:Object(B.a)(C.avatar_hash)})}),ze=we?12:14,Te=r.a.createElement(oe.a,{lineClamp:3,moreComp:r.a.createElement(L.a,{className:$e.expand,size:ze,color:"green"},Object(o.e)("more")),lessComp:r.a.createElement(L.a,{className:$e.expand,size:ze,color:"green"},Object(o.e)("collapse")),touchTextExpand:!0},r.a.createElement(L.a,{className:"overflow-unset",size:ze,weight:"minor",wrap:!0},C.description||Object(o.e)("noUserDescription"))),Be=Object(G.g)()?90:180,Le=Object(G.g)()?30:40,Fe=we?14:16,Re=Ee?r.a.createElement(A.a,{color:"red",width:Be,fontSize:Fe,height:Le,className:$e.profileCardBtn,onClick:()=>a.push(i.b.meAccount({tab:W.a.profile}))},Object(o.e)("editProfile")):ve.render({color:"red-gradient",height:Le,width:Be}),Ae=r.a.createElement("div",{className:$e.profileFollow},r.a.createElement(J.a,{to:i.b.userFollow(C.username,Ee)},r.a.createElement(L.a,{size:Fe},Object(o.e)("follow"),":",ve.data.followingCount)),r.a.createElement(J.a,{className:"ml-16",to:i.b.userFollow(C.username,Ee,le.a.follower)},r.a.createElement(L.a,{size:Fe},Object(o.e)("follower"),":",ve.data.followerCount)));return r.a.createElement(N.c,{className:$e.container},r.a.createElement(Q.a,{showBack:!0,rightElement:Ee?r.a.createElement("div",{className:$e.flex},Me):r.a.createElement("div",{className:$e.flex},Me,Ie)}),r.a.createElement("div",{className:$e.profileCard},r.a.createElement("div",{className:$e.profileContainer},we?r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{className:$e.profileImg},r.a.createElement(ce.c,{hash:C.avatar_hash,height:Object(G.f)()?60:128,width:Object(G.f)()?60:128,className:"rounded-full"})),r.a.createElement("div",{className:$e.mobileProfileInfo},r.a.createElement("div",{className:$e.mobileNameContainer},r.a.createElement("div",{className:$e.mobileNameBox},r.a.createElement(se.a,{name:C.displayname,size:16,className:"mr-12",isBig:!we,bold:!0}),r.a.createElement(se.d,{type:C.tag,isBig:!0,className:$e.badge})),Ee&&r.a.createElement(Z.a,{hideDot:!e.lastPunish},r.a.createElement("div",{className:$e.reputation,onClick:()=>{t.rpc.user.api.checkPunishInfo().then(()=>{}).catch(e=>t.logger.error(e.toString())),E.showSpecial(ee.b.reputation)}},r.a.createElement(F.a,{icon:"reputation",size:16}),r.a.createElement(L.a,{size:12,color:"orange"},e.data.reputation)))),Te,r.a.createElement("div",{className:"flex flex-vertical align-start"},Ae,r.a.createElement("div",{className:$e.mobileProfileBtn},Re)))):r.a.createElement(r.a.Fragment,null,r.a.createElement(ce.c,{hash:C.avatar_hash,height:Object(G.f)()?64:121,width:Object(G.f)()?64:121,className:"rounded-full"}),r.a.createElement("div",{className:$e.profileInfo},r.a.createElement("div",{className:"flex justify-between"},r.a.createElement("div",{className:"flex justify-between"},r.a.createElement(se.a,{name:C.displayname,size:24,bold:!0,className:"mr-12",isBig:!we}),r.a.createElement(se.d,{type:C.tag,isBig:!0,className:$e.badge})),r.a.createElement("div",{className:$e.profileIcons},Me,!Ee&&Ie)),r.a.createElement("div",{className:$e.profileDesc},Te),r.a.createElement("div",{className:"flex justify-between"},Ae,Re))))),r.a.createElement(Ue,{ID:C.id}),r.a.createElement("div",{className:$e.tabs},r.a.createElement(R.a,{onTab:f,tabs:Object(He.a)()?{[X.published_models]:{text:Object(o.e)("myModel")+je(C.published_model_count)},[X.published_musics]:{text:Object(o.e)("myMusic")+je(C.published_music_count)},[X.collection]:{text:Object(o.e)("collect")}}:{[X.published_maps]:{text:Object(o.e)("myMap")+je(C.published_map_count)},[X.published_models]:{text:Object(o.e)("myModel")+je(C.published_model_count)},[X.published_musics]:{text:Object(o.e)("myMusic")+je(C.published_music_count)},[X.collection]:{text:Object(o.e)("collect")}},onSelectTab:e=>a.push(i.b.user(C.username,{tab:e})),barStyle:Object(G.f)()}),!we&&Pe),we&&Se&&r.a.createElement("div",{className:$e.mobileDropdown},Pe),ke,r.a.createElement(U.a,null),y&&r.a.createElement(ne.a,{type:re.h.user,content:"",userId:C.id,userName:C.displayname,reputation:e.data.reputation,onClose:()=>x(!1),onSubmit:e=>Ze(this,null,(function*(){const a=yield Promise.all(e.screenshots.map(({file:e})=>(()=>Ze(this,null,(function*(){return yield t.content.storeImageFile(e)})))()));yield t.rpc.reputation.api.report({type:"user",data:{targetId:C.id,reason:e.reason.reduce((e,t)=>e|t),description:e.desc,screenshot:a}})}))}))}var nt=a(42),rt=a(22),ct=a(112),it=a(236),lt=a(514),ot=a(170),st=a(505);const dt=a(1419),mt=e=>{const t=!!e.content.published_version_id,a=!!e.content.status_version,n=e.content.type===l.a.ContentType.game,c=!(t||t&&e.onCancelPublish||e.onDuplicate||a&&e.showVersionHistory||e.onCancelPublish||e.onDelete),i=e.content.status===l.a.ContentStatus.rejected||e.content.status===l.a.ContentStatus.censored?r.a.createElement("div",{className:dt.noticeBar},r.a.createElement("div",{className:dt.flex},r.a.createElement(F.a,{size:16,icon:"exclamation-triangle",className:Object(rt.a)(dt.icon,"exclamation-triangle")}),r.a.createElement(L.a,{size:14},!(e.isPro&&n)&&"v."+e.content.status_version,e.content.status===l.a.ContentStatus.rejected?Object(o.e)("rejected"):Object(o.e)("contentCensored"))),r.a.createElement(A.a,{color:"red",width:96,onClick:e.viewRejectDetail},Object(o.e)("detail"))):null;let s=128;Object(G.g)()&&(s=90);const d=Object(G.g)()?12:14;return r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{className:dt.card},r.a.createElement(J.a,{className:dt.cardBody,to:e.isPro?"":!e.disableAccess&&Object(ot.c)(e.content.edit_container_name,e.content.url)||"",onClick:e.onOpen},e.content.image?r.a.createElement(ce.b,{hash:e.content.image,className:dt.coverImage,width:s,height:s}):e.content.type===l.a.ContentType.music?r.a.createElement(F.a,{size:s,className:dt.musicCover,icon:"waveform"}):r.a.createElement(lt.a,{className:dt.coverImg,iconSize:96}),r.a.createElement("div",{className:dt.cardData},r.a.createElement("div",{className:dt.top},r.a.createElement("div",{className:dt.titleContainer},r.a.createElement(L.a,{size:Object(G.g)()?15:16,className:dt.br4,bold:!0},e.content.name||Object(o.e)("unNamed")),r.a.createElement(L.a,{size:d,weight:"minor"},"ID: ",e.content.content_id)),!Object(G.g)()&&i),r.a.createElement("div",{className:dt.cardBodyBottom},r.a.createElement("div",{className:dt.info},r.a.createElement("div",{className:Object(rt.a)(dt.radio,t&&dt.highlight,dt.icon)}),r.a.createElement(L.a,{size:d},t?"v."+e.content.on_publish_version:Object(o.e)("unpublished")),t&&(n?pt("played",e.content.play_count,d):pt("view",e.content.view_count,d))),!c&&r.a.createElement(te.a,{distance:8,popup:r.a.createElement(ae.a,{items:[{text:Object(o.e)("enterMap"),hide:!(e.isPro&&n&&e.content.playHash&&t),onClick:()=>{Object(ot.d)({hash:e.content.playHash,type:"play"}),Object(st.b)(e.content.name,e.content.content_id)}},{text:Object(o.e)("preview"),hide:!(e.isPro&&!n&&t),onClick:()=>{var t;null==(t=e.onPreview)||t.call(e)}},{text:Object(o.e)("viewDetailPage"),hide:!t||e.isPro,onClick:e.onViewDetailPage},{text:Object(o.e)("copy"),hide:!e.onDuplicate,onClick:()=>e.onDuplicate?e.onDuplicate(e.content):()=>{}},{text:Object(o.e)("publishHistory"),hide:!a||!e.showVersionHistory||e.isPro,onClick:()=>e.showVersionHistory?e.showVersionHistory(e.content.content_id):()=>{}},{text:Object(o.e)("removeContent"),hide:!t||!e.onCancelPublish,onClick:()=>e.onCancelPublish?e.onCancelPublish(e.content.content_id):()=>{}},{text:Object(o.e)("delete"),hide:!e.onDelete,onClick:()=>e.onDelete?e.onDelete(e.content.content_id):()=>{}}]})},r.a.createElement(F.a,{icon:"more",size:Object(G.g)()?20:24,className:dt.more}))))),Object(G.g)()&&i))},ut=r.a.memo(e=>r.a.createElement("div",{className:dt.card+" "+dt.blank,onClick:e.onClick},r.a.createElement(F.a,{icon:"create-dashed",size:32,className:"mb-4",style:{strokeWidth:1,stroke:"none"}}),r.a.createElement(L.a,{weight:"minor",size:14},e.text)));function pt(e,t,a){return r.a.createElement(r.a.Fragment,null,r.a.createElement(F.a,{icon:e,className:dt.icon,size:16}),r.a.createElement(L.a,{size:a},Object(it.b)(t||0)))}var ht=a(98),bt=a(1389),gt=a(70),Et=a(435),wt=a(93);const ft=JSON.parse('{"car":{"cover":"QmTD3wopcEZFXHxEgkd7U1ETQ9duCLVbdX1pBZ8dRs2Cz1.png","hash_en":"QmcoUB7KmcWj2gWhrryDDhseZGdPsKDvX3fmZuF6kDGQJf","hash_zh":"QmZ1Ek1Y7JiQrZgNkiVrZrepYAR6x4ibcpzLuP1TmjkESJ"},"lake":{"cover":"QmfTQJpnFcixvDW6CoKyxbfGLLPhETXRaWypH4qMTM6mZ2.png","hash_en":"QmNT7MPqriRZg5EZtWYJYCF8d7qHVahtBa52fpxyMq4us2","hash_zh":"QmdnjhGRRd3kCq4uqwEduSbk6zs91qXJ2u9fEwKk9UVKtP"},"large":{"cover":"Qmdkqjkx8YXCEzQuNrZhEr75dpRGHcWY7oiCxg5oQqfzox.png","hash_en":"QmRxikE7eLKmJcKmZ3eKn7pnEpvWb213FG5H4xshJyUESo","hash_zh":"QmRxikE7eLKmJcKmZ3eKn7pnEpvWb213FG5H4xshJyUESo"},"shooting":{"cover":"QmVLHYcoYP5S5mnxcn3FPQcgiPoTef4mjq9ywJUMeyE1f6.png","hash_en":"QmbaqJ8Mw8yZoeBEWcr79vidEErgGqbQyWXS19BUrXuMom","hash_zh":"QmUPT4Sq4GeVD174XCzgkHSrMS6u7ADZt6FmQGSRMwQwnV"},"zombie":{"cover":"QmdyR8K8cumVqS3h2ryZXAfk6kebKDBLjGtUY2pqfMZ6cT.png","hash_en":"QmVmpvbsDXuxr73aJZB93k2k8Y8LkTU3LTMionu3wjcH85","hash_zh":"QmaE8Wypk1WdYCajqaKF66BgmkDNGQcXX2e7hpadK1vYgR"}}');var Ot=a(215);const vt=a(1421),jt=ft.large;function yt(e){return e.replace(".json","")}const xt=e=>{const[t,a]=Object(n.useState)("large"),[c,i]=Object(n.useState)({usefulTemplateList:[],blankTemplates:[]}),[l,s]=Object(n.useState)(),d=[214,120];Object(G.f)()&&(d[0]=d[1]=100),Object(n.useEffect)(()=>{e.isPro&&Ot.a.content.listContentTemplatesUsingGet().then(e=>{const{rows:t}=e,a=t.filter(e=>1!==e.type),{blankTemplates:n=[]}=t.find(e=>1===e.type);i({usefulTemplateList:a,blankTemplates:n}),s(n[0])}).catch(()=>{})},[e.isPro]);return r.a.createElement(wt.a.MobilePopupFromBottom,{className:vt.container,title:Object(o.e)("chooseTemplates"),onClose:e.onClose,fullWidth:!0},r.a.createElement("div",{className:vt.list},r.a.createElement(_t,null,e.isPro?(console.log(l),r.a.createElement("div",{className:vt.item,onClick:()=>{e.onSelect({title:"新地图",id:l.id})}},r.a.createElement("img",{style:{borderRadius:"16px",marginRight:24},src:null==l?void 0:l.previewUrl,width:d[0],height:d[1]}),r.a.createElement("div",{className:vt.content+" "+vt.withOption},r.a.createElement("div",null,r.a.createElement(L.a,{size:16,className:Object(G.g)()?"mb-4":"mb-8"},r.a.createElement("b",null,Object(o.e)("mapTemplateName_blank"))),r.a.createElement(L.a,{wrap:!0,size:Object(G.f)()?12:14,weight:"minor"},Object(o.e)("mapTemplateDesc_blank"))),r.a.createElement("div",{className:vt.option},r.a.createElement(Ct,{list:c.blankTemplates.reduce((e,t)=>(e[t.id]=t.size,e),{}),onSelect:e=>s(c.blankTemplates.find(t=>t.id+""===e)),selected:(null==l?void 0:l.id)+""}),r.a.createElement(te.a,{posY:"down",popup:r.a.createElement("div",{className:vt.popup},r.a.createElement(L.a,{size:12,wrap:!0,weight:"minor"},c.blankTemplates.map(e=>e.tips).join("\n")))},r.a.createElement(F.a,{icon:"exclamation-circle",size:24,style:{marginLeft:"12px"}})))))):r.a.createElement("div",{className:vt.item,onClick:()=>{const a="large"===t?"":yt(jt.hash_en);e.onSelect({name:"blank",cover:jt.cover,hash_en:a,hash_zh:a})}},r.a.createElement(ce.b,{hash:jt.cover,width:d[0],height:d[1]}),r.a.createElement("div",{className:vt.content+" "+vt.withOption},r.a.createElement("div",null,r.a.createElement(L.a,{size:16,className:Object(G.g)()?"mb-4":"mb-8"},r.a.createElement("b",null,Object(o.e)("mapTemplateName_blank"))),r.a.createElement(L.a,{wrap:!0,size:Object(G.f)()?12:14,weight:"minor"},Object(o.e)("mapTemplateDesc_blank"))),r.a.createElement("div",{className:vt.option},r.a.createElement(Ct,{list:{large:Object(o.e)("largeMap"),huge:Object(o.e)("hugeMap")},onSelect:e=>a(e),selected:t}),r.a.createElement(te.a,{posY:"down",popup:r.a.createElement("div",{className:vt.popup},r.a.createElement(L.a,{size:12,wrap:!0,weight:"minor"},Object(o.e)("mapSizeInfo")))},r.a.createElement(F.a,{icon:"exclamation-circle",size:24,style:{marginLeft:"12px"}}))))),e.isPro?c.usefulTemplateList.length?c.usefulTemplateList.map(t=>r.a.createElement("div",{key:t.id,className:vt.item,onClick:()=>e.onSelect({id:t.id,title:t.title})},r.a.createElement("img",{src:t.previewUrl,width:d[0],height:d[1]}),r.a.createElement("div",{className:vt.content},r.a.createElement(L.a,null,r.a.createElement("b",null,t.title)),r.a.createElement(L.a,{wrap:!0,size:Object(G.g)()?12:14,weight:"minor"},t.description)))):null:Object.keys(ft).map(t=>{if("large"===t)return;const a=ft[t];return r.a.createElement("div",{key:t,className:vt.item,onClick:()=>e.onSelect({hash_en:yt(a.hash_en),hash_zh:yt(a.hash_zh),cover:a.cover,name:t})},r.a.createElement(ce.b,{hash:a.cover,width:d[0],height:d[1]}),r.a.createElement("div",{className:vt.content},r.a.createElement(L.a,null,r.a.createElement("b",null,Object(o.e)("mapTemplateName_"+t))),r.a.createElement(L.a,{wrap:!0,size:Object(G.g)()?12:14,weight:"minor"},Object(o.e)("mapTemplateDesc_"+t))))}))))},_t=r.a.memo(e=>{const t=Object(N.e)();let a=(t-16)/2;return Object(G.f)()&&(a=Object(G.m)()?(t-48-16)/2:Object(G.n)()?t-48:t-32),r.a.createElement("div",{className:vt.grid,style:{gridTemplateColumns:`repeat(auto-fill, ${a}px)`,gridColumnGap:"16px",gridRowGap:"16px"}},e.children)});function Ct(e){const t=Object.keys(e.list);return r.a.createElement("div",{className:vt.selector},t.map((a,n)=>r.a.createElement("div",{key:a,style:{minWidth:t.length>2?70:80},className:a===e.selected&&vt.highlight||"",onClick:t=>{t.stopPropagation(),t.preventDefault(),e.onSelect(a)}},e.list[a])))}var Nt=a(918),kt=a(369),St=a(503),Pt=a(382),Dt=a(62),It=a(327),Mt=a(333),zt=a(513),Tt=Object.defineProperty,Bt=Object.defineProperties,Lt=Object.getOwnPropertyDescriptors,Ft=Object.getOwnPropertySymbols,Rt=Object.prototype.hasOwnProperty,At=Object.prototype.propertyIsEnumerable,Ut=(e,t,a)=>t in e?Tt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Ht=(e,t)=>{for(var a in t||(t={}))Rt.call(t,a)&&Ut(e,a,t[a]);if(Ft)for(var a of Ft(t))At.call(t,a)&&Ut(e,a,t[a]);return e},Gt=(e,t)=>Bt(e,Lt(t)),qt=(e,t,a)=>new Promise((n,r)=>{var c=e=>{try{l(a.next(e))}catch(e){r(e)}},i=e=>{try{l(a.throw(e))}catch(e){r(e)}},l=e=>e.done?n(e.value):Promise.resolve(e.value).then(c,i);l((a=a.apply(e,t)).next())});const Yt=a(1422),Xt={[l.a.ContentOrder.published]:"orderByPublish",[l.a.ContentOrder.created]:"createTime",[l.a.ContentOrder.updated]:"lastModified"},Wt={[V.b.model]:l.a.ContentType.asset,[V.b.map]:l.a.ContentType.game,[V.b.share]:l.a.ContentType.game,[V.b.music]:l.a.ContentType.music};const Vt={1:Object(o.e)("experienceMapCreateFail"),0:Object(o.e)("experienceScoreNotEnough")};function Qt(){return r.a.createElement("div",{className:Yt.body},r.a.createElement(L.a,{size:24,bold:!0,style:{marginBottom:"40px"}},"请前往“神奇代码岛”新平台创作及查看你的PRO版作品"),r.a.createElement(A.a,{width:140,type:"primary",color:"red-gradient",onClick:()=>Object(ot.e)("create/map")},"立即前往"))}function Kt(){return r.a.createElement("div",{className:Yt.body},r.a.createElement(L.a,{size:24,bold:!0,style:{marginBottom:"40px"}},"请前往“神奇代码岛”新平台创作及查看你的PRO版作品"),r.a.createElement(A.a,{width:140,type:"primary",color:"red-gradient",onClick:()=>Object(ot.e)("create/model")},"立即前往"))}function Jt(e,t,a){const n=r.a.createElement("div",{className:Yt.popupListItem,onClick:t.onClick},r.a.createElement(L.a,{size:14,color:a&&"red-gradient"},e));return t.to?r.a.createElement(J.a,{to:t.to,target:t.target},n):n}function Zt(){const e=Object(s.b)(),t=Object(k.b)(S.c),a=Object(k.b)(S.a,()=>[]),m=Object(k.b)(S.d,()=>[]),p=Object(c.g)(),E=Object(c.h)(),w=r.a.useRef(Object(G.f)()),f=Object(me.a)(),O=Object(d.b)(),[v,j]=Object(n.useState)(!1);Object(n.useEffect)(()=>{!O||t.isLogin&&t.isAdmin&&t.data||p.replace(i.a.home)},[O]);const y=Object(d.k)(),x=y.get("type")||V.b.pro_map,[_,C]=Object(n.useState)(l.a.ContentOrder.updated),[P,D]=Object(n.useState)(16),[I,M]=Object(n.useState)({initialized:!1,hasApplied:!1,status:l.a.InvitationAppStatus.waiting,updated_at:new Date(0)}),[B,Y]=Object(n.useState)({contentId:0,onPublishVersion:0}),[X,K]=Object(n.useState)({title:"",body:""}),[J,Z]=Object(n.useState)(gt.a.get("newCreator")),[$,te]=Object(n.useState)(!1),[ae,ne]=Object(n.useState)(!1),[re,ce]=Object(n.useState)(!1),[ie,le]=Object(n.useState)(!1),[oe,se]=Object(n.useState)({hasPermission:!1,showModal:!1,modalStep:0,isLoading:!1}),[de,ue]=Object(n.useState)(0),pe=Object(n.useRef)(null),[he,be]=Object(n.useState)(!1),[ge,Ee]=Object(n.useState)(0),we=Wt[x],fe=Object(N.e)(),Oe=x===V.b.pro_model,ve=x===V.b.pro_map,je=Oe||ve;let ye=(fe-16)/2;w.current&&(ye=Object(G.m)()?(fe-48-16)/2:Object(G.n)()?fe-48:fe-32);const xe={rowGap:16,columnGap:16,maxWidth:ye};Object(n.useEffect)(()=>{Ee(0),be(!1)},[x]);const{list:_e,count:Ce,isLoading:Ne}=Object(d.i)(a=>qt(this,[a],(function*({offset:a,reload:n}){if(t.id&&!ve&&!Oe&&(x!==V.b.map||t.hasCreateGamePermission||oe.hasPermission))return yield e.rpc.content.api.list({limit:n||!_e.length?P+1:P,offset:n?0:a,type:we,sort:_,filter:x===V.b.share?"shared":void 0,isPublic:!1,authorId:t.id,status:void 0,recommendByContentId:void 0,noCache:void 0})})),t=>{z.a.error(Object(o.e)("fetchFailed")),e.logger.error(t.toString())},[t.id,t.hasCreateGamePermission,x,_,E,P,we,de,oe.hasPermission]),ke=Object(n.useCallback)((n,r,c)=>{a.showCustomModal({title:Object(o.e)("cancelPublishNoticeTitle",{version:r}),body:Object(o.e)("cancelPublishNoticeBody",{type:Object(o.e)(l.a.ContentType[c])}),confirmText:Object(o.e)("removeContent"),cancelButton:!0},()=>qt(this,null,(function*(){try{Oe?yield Ot.a.Model.cancelReleaseUsingPut(n):ve?yield Ot.a.Ugc.cancelPublishUsingPut({contentId:n}):yield e.rpc.content.api.cancelPublish({content_id:n,user_id:t.id}),z.a.success(Object(o.e)("submitSuccess")),ue(e=>e+1)}catch(e){throw z.a.error(Object(o.e)("submitFail")),e}})))},[Oe,ve]),Se=Object(n.useCallback)((t,n,c)=>{a.showCustomModal({title:Object(o.e)("delete"),body:r.a.createElement(ht.a,{id:"deleteContentNotice",values:{type:Object(o.e)(l.a.ContentType[c]),name:r.a.createElement("b",null,n)}}),confirmText:Object(o.e)("delete"),cancelButton:!0},()=>qt(this,null,(function*(){try{Oe?yield Ot.a.Model.deleteModelUsingDelete([t]):ve?yield Ot.a.Ugc.delUsingDelete(t):yield e.rpc.content.api.delete(t),z.a.success(Object(o.e)("submitSuccess")),ue(e=>e+1)}catch(e){if(e instanceof zt.a){if(Oe&&10020010===e.code)throw z.a.error("已发布作品需下架后才可删除"),e;if(ve&&10016007===e.code)throw z.a.error("已发布作品需下架后才可删除"),e}throw z.a.error(Object(o.e)("submitFail")),e}})))},[Oe,ve]),Pe=Object(n.useCallback)(a=>{const{type:n,name:r,describe:c,hash:i,image:s}=a;if(n===l.a.ContentType.game){if(je)return void Ot.a.Ugc.copyUsingPost({title:r+" 副本",contentId:a.content_id}).then(()=>{z.a.success(Object(o.e)("contentCopied",{type:Object(o.e)(l.a.ContentType[n])})),ue(e=>e+1)}).catch(e=>{z.a.error(Object(o.e)("copyFailed"))});e.rpc.container.api.createGameEdit({resource_id:0,user_id:t.id,createNow:!1,name:r+""+Object(o.e)("contentCopy"),describe:c||"",hash:i,image:s}).then(()=>{z.a.success(Object(o.e)("contentCopied",{type:Object(o.e)(l.a.ContentType[n])})),ue(e=>e+1)}).catch(t=>{z.a.error(Object(o.e)("copyFailed")),e.logger.error(t.toString())})}else{if(je)return void Ot.a.Model.copyModelUsingPost({modelName:r+" 副本",modelType:0,originModelId:a.content_id}).then(()=>{z.a.success(Object(o.e)("contentCopied",{type:Object(o.e)(l.a.ContentType[n])})),ue(e=>e+1)}).catch(e=>{z.a.error(Object(o.e)("copyFailed"))});e.rpc.content.api.add({hash:i,name:r+""+Object(o.e)("contentCopy"),describe:c||"",author_id:t.id,image:s,type:n,engine_version:"",url:""}).then(()=>{z.a.success(Object(o.e)("contentCopied",{type:Object(o.e)(l.a.ContentType[n])})),ue(e=>e+1)}).catch(t=>{z.a.error(Object(o.e)("copyFailed")),e.logger.error(t.toString())})}},[je]),De=Object(n.useCallback)(()=>_e.length?r.a.createElement(H.a,{list:{[l.a.ContentOrder.updated]:Object(o.e)(Xt[l.a.ContentOrder.updated]),[l.a.ContentOrder.published]:Object(o.e)(Xt[l.a.ContentOrder.published])},onSelect:e=>C(Number(e)),className:Yt.order,popupClassName:Yt.popupContainer},r.a.createElement(L.a,null,Object(o.e)(Xt[_]))):null,[_e]),Ie=({select:e})=>r.a.createElement(F.a,{size:Object(G.f)()?e?16:14:15,style:{marginRight:Object(G.f)()?4:0},icon:Object(G.f)()?"pro-content-mobile":e?"pro-content-fill":"pro-content"}),Me=Object(n.useCallback)(()=>{if(w.current)return r.a.createElement(r.a.Fragment,null,r.a.createElement(Q.a,null),r.a.createElement(St.a,{tabs:{[V.b.pro_map]:{text:Object(o.e)("proMap"),prefix:r.a.createElement(Ie,{select:x===V.b.pro_map})},[V.b.pro_model]:{text:Object(o.e)("proModel"),prefix:r.a.createElement(Ie,{select:x===V.b.pro_model})},[V.b.map]:{text:Object(o.e)("map")},[V.b.model]:{text:Object(o.e)("asset")},[V.b.music]:{text:Object(o.e)("music")},[V.b.share]:{text:Object(o.e)("shareWithMe")}},onTab:x,onSelectTab:e=>{y.set("type",e),y.update(p.push)},button:r.a.createElement("div",{className:Yt.wikiTriggerContainer},r.a.createElement(Mt.a,{ref:pe,distance:4,popup:r.a.createElement("div",{className:Yt.popupContainer},Jt(Object(o.e)("handbook"),{icon:"terminal",to:nt.b.guideURL,target:"_blank",onClick:()=>{pe.current&&pe.current.onLeave(),(new Dt.a).track(Dt.c.HANDBOOK_CLICKED,{platform:Object(G.b)()})}}),Jt(Object(o.e)("devApi"),{icon:"terminal",to:nt.b.wikiURL,target:"_blank",onClick:()=>{pe.current&&pe.current.onLeave(),(new Dt.a).track(Dt.c.DEV_API_CLICKED,{platform:Object(G.b)()})}}))},r.a.createElement("div",{className:Yt.wikiTrigger},r.a.createElement(F.a,{icon:"api",size:16}),r.a.createElement("span",{className:"ml-4"},Object(o.e)("guide")))))}));const e={display:"flex",justifyContent:"center",alignItems:"center"};return r.a.createElement(N.b,{className:"bg-white mb-24 p-24-0"},r.a.createElement(N.a,{className:Yt.tabs},r.a.createElement(R.a,{onTab:x,tabStyle:{minWidth:0,padding:"0 24px"},tabs:{[V.b.pro_map]:{text:Object(o.e)("proMap"),prefix:r.a.createElement(F.a,{size:15,icon:x===V.b.pro_map?"pro-content-fill":"pro-content"}),style:e},[V.b.pro_model]:{text:Object(o.e)("proModel"),prefix:r.a.createElement(F.a,{size:15,icon:x===V.b.pro_model?"pro-content-fill":"pro-content"}),style:e},[V.b.map]:{text:Object(o.e)("map"),icon:"earth"},[V.b.model]:{text:Object(o.e)("asset"),icon:"box2"},[V.b.music]:{text:Object(o.e)("music"),icon:"music"},[V.b.share]:{text:Object(o.e)("shareWithMe"),icon:"share-with"}},onSelectTab:e=>{y.set("type",e),y.update(p.push)},barStyle:w.current}),r.a.createElement("div",{className:Yt.flex},De())))},[De,x]),ze=()=>{if(Oe)return Object(G.f)()?void j(!0):((new Dt.a).track(Dt.c.NEW_WORK_CLICK,{work_type:"模型"}),Object(ot.b)());It.a.openVoxelEditor({contentId:0,userId:t.id}),p.push(i.a.voxelEditor)},Be=()=>{It.a.openMusicEditor({contentId:0,userId:t.id}),Le.open()},Le=Object(kt.b)(),Fe=(e,t)=>{(new Dt.a).track(e,t)},Re=()=>qt(this,null,(function*(){try{const e=yield Te.a.container.getEditorExperienceStatusUsingGet();le(e.value||!1)}catch(e){throw e}})),Ae=()=>qt(this,null,(function*(){var e;try{const t=yield Te.a.user.haveEditorExperiencePermissionUsingGet();se(Gt(Ht({},oe),{hasPermission:null!=(e=null==t?void 0:t.value)&&e,isLoading:!1}))}catch(e){throw se(Gt(Ht({},oe),{isLoading:!1})),e}})),Ue=()=>{if(t.data.ban_editor)return void te(!0);if(ve)return Object(G.f)()?void j(!0):((new Dt.a).track(Dt.c.NEW_WORK_CLICK,{work_type:"地图"}),void ne(!0));!t.hasCreateGamePermission&&oe.hasPermission&&_e.length>=2?se(Gt(Ht({},oe),{showModal:!0,modalStep:1})):oe.hasPermission?ne(!0):se(Gt(Ht({},oe),{showModal:!0,modalStep:0}))},He=r.a.useCallback(()=>0===oe.modalStep?r.a.createElement("div",{className:Yt.experienceModal},r.a.createElement(L.a,{size:14,wrap:!0,center:!0},Object(o.e)("experienceGetScore")),r.a.createElement(A.a,{type:"primary",color:"orange",onClick:()=>p.push(i.b.meAccount({tab:W.a.setting}))},Object(o.e)("userBind"))):1===oe.modalStep?r.a.createElement("div",{className:Yt.experienceModal},r.a.createElement(L.a,{size:14,wrap:!0,center:!0},Object(o.e)("experienceDeleteMap")),r.a.createElement(A.a,{type:"primary",color:"orange",onClick:()=>se(Gt(Ht({},oe),{showModal:!1}))},Object(o.e)("userRoger"))):null,[oe.modalStep]),Ge=r.a.useCallback(()=>r.a.createElement("div",{className:Yt.body},r.a.createElement(g.a,Ht({},xe),r.a.createElement(ut,{text:Object(o.e)(ve?"newProMap":"newMap"),onClick:Ue}),_e.map(e=>r.a.createElement(mt,{key:e.content_id,content:e,onDuplicate:()=>{t.data.ban_editor?te(!0):Pe(e)},onViewDetailPage:()=>p.push(i.b.content(e.type,e.content_id)),onDelete:()=>Se(e.content_id,e.name,e.type),onCancelPublish:()=>ke(e.content_id,e.on_publish_version,e.type),showVersionHistory:()=>Y({contentId:e.content_id,onPublishVersion:e.on_publish_version}),viewRejectDetail:()=>{K({title:e.review_info?e.review_info.title:"",body:e.review_info?`${Pt.a}${Pt.b}${e.review_info.details},${Pt.c}`:""})},disableAccess:t.data.ban_editor,onOpen:()=>{if(ve)return Object(G.f)()?void j(!0):(Object(ot.d)({type:"edit",hash:e.editHash}),void Object(st.b)(e.name,e.content_id));Fe(Dt.c.CLICK_MAP_EDITOR,{is_first_edit:!1,map_name:e.name||"",map_id:e.content_id||"",map_type:e.type||"",module_map_name:"",module_map_ID:""}),It.a.openMapEditor({userId:t.id,contentId:e.content_id}),t.data.ban_editor&&te(!0)},isPro:je})))),[_e,ve]);if(Object(n.useEffect)(()=>{Re().then(e=>null).catch(e=>null)},[]),Object(n.useEffect)(()=>{t.id,Ae().catch(e=>null)},[t.id]),Object(n.useEffect)(()=>{!I.initialized&&t.id&&(t.id&&t.hasCreateGamePermission||e.rpc.invitation.api.getApplication(t.id).then(e=>{M({initialized:!0,status:e.status,updated_at:e.updated_at||new Date,hasApplied:!0})}).catch(e=>{M({initialized:!0,hasApplied:!1,status:l.a.InvitationAppStatus.waiting,updated_at:new Date(0)})}))},[t.id,I.initialized]),!t.initialized)return r.a.createElement(N.c,{center:!0},r.a.createElement(u.a,null));if(!t.isLogin)return r.a.createElement(N.c,{center:!0},r.a.createElement(Q.a,{rightElement:!nt.b.isbnPreview&&r.a.createElement(L.a,{onClick:()=>{e.switchLang()}},Object(o.e)("zh/en"))||""}),r.a.createElement(L.a,{size:20,bold:!0,className:"mb-16",wrap:!0},Object(o.e)("loginToCreate")),r.a.createElement(A.a,{color:"red-gradient",type:"primary",onClick:f.handleLogin},Object(o.e)("login_register")));let qe=r.a.createElement(q.a,null),Ye=!1;if(Ne&&!_e.length)qe=r.a.createElement(r.a.Fragment,null);else switch(x){case V.b.pro_model:qe=r.a.createElement(Kt,null);break;case V.b.model:if(!_e.length){qe=r.a.createElement("div",{className:Yt.body},r.a.createElement(F.a,{icon:"box2",className:"mb-32",size:72}),r.a.createElement(A.a,{color:"red",onClick:ze,className:Yt.newModelButton},Object(o.e)(Oe?"newProModel":"newModel")));break}Ye=!0,qe=r.a.createElement("div",{className:Yt.body},r.a.createElement(g.a,Ht({},xe),r.a.createElement(ut,{text:Object(o.e)(Oe?"newProModel":"newModel"),onClick:ze}),_e.map(a=>r.a.createElement(mt,{key:a.content_id,content:a,onPreview:()=>{Ee(a.content_id),be(!0)},onDuplicate:()=>Pe(a),onDelete:()=>Se(a.content_id,a.name,a.type),onCancelPublish:()=>ke(a.content_id,a.on_publish_version,a.type),onViewDetailPage:()=>p.push(i.b.content(a.type,a.content_id)),showVersionHistory:()=>Y({contentId:a.content_id,onPublishVersion:a.on_publish_version}),onOpen:()=>{if(Oe)return Object(G.f)()?void j(!0):void Object(ot.b)({id:a.content_id});e.rpc.content.api.get({type:"id",data:{type:l.a.ContentType.asset,isPublic:!1,contentId:a.content_id,userId:t.id,meshHash:!1}}).then(e=>{m.open({content_id:e.content_id,user_id:t.id,hash:e.hash,name:e.name}),It.a.openVoxelEditor({userId:t.id,contentId:a.content_id})}).catch(t=>{e.logger.error(t.toString())})},viewRejectDetail:()=>{K({title:a.review_info?a.review_info.title:"",body:a.review_info?`${Pt.a}${Pt.b}${a.review_info.details},${Pt.c}`:""})},isPro:je}))));break;case V.b.music:if(!_e.length){qe=r.a.createElement("div",{className:Yt.body},r.a.createElement(F.a,{icon:"music",className:"mb-32",size:72}),r.a.createElement(A.a,{color:"red",onClick:Be,className:Yt.newModelButton},Object(o.e)("createMusic")));break}Ye=!0,qe=r.a.createElement("div",{className:Yt.body},r.a.createElement(g.a,Ht({},xe),r.a.createElement(ut,{text:Object(o.e)("createMusic"),onClick:Be}),_e.map(e=>r.a.createElement(mt,{key:e.content_id,content:e,onDuplicate:()=>Pe(e),onDelete:()=>Se(e.content_id,e.name,e.type),onCancelPublish:()=>ke(e.content_id,e.on_publish_version,e.type),onViewDetailPage:()=>p.push(i.b.content(e.type,e.content_id)),showVersionHistory:()=>Y({contentId:e.content_id,onPublishVersion:e.on_publish_version}),onOpen:()=>{It.a.openMusicEditor({userId:t.id,contentId:e.content_id}),Le.openProject({name:e.name,content_id:e.content_id,hash:e.hash,description:e.describe})},viewRejectDetail:()=>{K({title:e.review_info?e.review_info.title:"",body:e.review_info?`${Pt.a}${Pt.b}${e.review_info.details},${Pt.c}`:""})}}))));break;case V.b.share:if(!_e.length){qe=r.a.createElement("div",{className:Yt.body},r.a.createElement(L.a,{className:"mb-24"},Object(o.e)("noSharedProject")),r.a.createElement(A.a,{color:"red",width:120,onClick:()=>p.push(i.b.meContent({type:V.b.map}))},Object(o.e)("createNow")));break}Ye=!0,qe=r.a.createElement("div",{className:Yt.body},r.a.createElement(g.a,Ht({},xe),_e.map(e=>r.a.createElement(mt,{key:e.content_id,content:e,onViewDetailPage:()=>p.push(i.b.content(e.type,e.content_id)),viewRejectDetail:()=>{K({title:e.review_info?e.review_info.title:"",body:e.review_info?`${Pt.a}${Pt.b}${e.review_info.details},${Pt.c}`:""})},disableAccess:t.data.ban_editor,onOpen:t.data.ban_editor?()=>{te(!0)}:void 0}))));break;case V.b.pro_map:qe=r.a.createElement(Qt,null);break;case V.b.map:default:if(!t.hasCreateGamePermission){if(ie){const e=(_e&&_e.length)>0;Ye=e,qe=e?Ge():r.a.createElement("div",{className:Yt.experienceBox},r.a.createElement(L.a,{style:{marginBottom:"20px"},color:"font-black",center:!0,wrap:!0},Object(o.e)(ve?"experienceDescriptionPro":"experienceDescription")),r.a.createElement(A.a,{width:180,color:"red",loading:oe.isLoading,onClick:Ue},Object(o.e)(ve?"newProMap":"newMap")));break}if(!I.initialized)return r.a.createElement(N.c,{center:!0},r.a.createElement(u.a,null));if(I.hasApplied&&I.status===l.a.InvitationAppStatus.waiting){qe=r.a.createElement("div",{className:Yt.body},r.a.createElement(L.a,{size:20,bold:!0,className:"mb-16"},Object(o.e)("applicationInReview")),r.a.createElement(L.a,{size:14,weight:"minor",wrap:!0,center:!0},Object(o.e)("applicationInReview2")));break}if(I.hasApplied&&I.status===l.a.InvitationAppStatus.rejected){const e=I.updated_at.getTime(),t=Date.now()-e>=6048e5;qe=r.a.createElement("div",{className:Yt.body},r.a.createElement(L.a,{size:20,bold:!0,className:"mb-8"},Object(o.e)("applicationRejected")),r.a.createElement(L.a,{size:14,className:"mb-32",center:!0,wrap:!0},Object(o.e)("applicationRejected2")),r.a.createElement(A.a,{onClick:()=>{Fe(Dt.c.CLICK_APPLICATION),ce(!0)},disabled:!t,className:"mb-8",color:"red"},Object(o.e)("applyAgain")),!t&&r.a.createElement(L.a,{size:12},Object(o.e)("applyAfter",{time:Object(ct.a)(Date.now(),e+6048e5,o.f)})));break}if(!I.hasApplied){qe=r.a.createElement("div",{className:Yt.body},r.a.createElement(L.a,{size:20,bold:!0,className:"mb-16"},Object(o.e)("applyForCreate")),r.a.createElement(A.a,{color:"red",onClick:()=>{Fe(Dt.c.CLICK_APPLICATION),ce(!0)}},Object(o.e)("apply")));break}break}if(!_e.length&&J){qe=r.a.createElement("div",{className:Yt.body},r.a.createElement(L.a,{size:20,bold:!0,className:"mb-16"},Object(o.e)("congratsForEditor")),r.a.createElement(A.a,{color:"red",onClick:()=>{gt.a.put("newCreator",!1),Z(!1)}},Object(o.e)("open")));break}if(!_e.length){gt.a.put("newCreator",!1),qe=r.a.createElement("div",{className:Yt.body},r.a.createElement(F.a,{icon:"earth",className:"mb-32",size:72}),r.a.createElement(A.a,{color:"red-gradient",type:"primary",onClick:()=>{if(!t.data.ban_editor)return ve?Object(G.f)()?void j(!0):((new Dt.a).track(Dt.c.NEW_WORK_CLICK,{work_type:"地图"}),void ne(!0)):void ne(!0);te(!0)},className:Yt.newModelButton},Object(o.e)(ve?"newProMap":"newMap")));break}Ye=!0,gt.a.put("newCreator",!1),qe=Ge()}const Xe=Ye&&_e.length>=Ce;return qe=w.current?r.a.createElement("div",{className:Yt.bodyContainer},w.current&&r.a.createElement("div",{className:Yt.orderContainer},De()),qe):r.a.createElement(N.a,{className:Yt.bodyContainer},qe),r.a.createElement(N.c,{className:Object(rt.a)(Yt.container,!Ye&&Yt.bodyCentered),fullWidth:!0},Me(),qe,Ne&&!Xe&&r.a.createElement(u.a,{className:Object(rt.a)(Yt.loading,!_e.length&&Yt.emptyList)}),Xe&&_e.length>P&&r.a.createElement(T.a,null),r.a.createElement(U.a,null),!!B.contentId&&r.a.createElement(bt.b,{contentId:B.contentId,onPublishVersion:B.onPublishVersion,onClose:()=>Y({contentId:0,onPublishVersion:0})}),r.a.createElement(bt.a,{title:X.title,body:X.body,onClose:()=>K({title:"",body:""})}),$&&r.a.createElement(Et.b,{onClose:()=>te(!1),onCheckReputation:()=>a.showSpecial(ee.b.reputation)}),he&&r.a.createElement(r.a.Suspense,{fallback:r.a.createElement(b.a,{children:null})},r.a.createElement(h.a,{invisible:!ge,contentId:ge,contentList:Oe?_e.filter(e=>e.published_version_id):_e,onClose:()=>Ee(0),type:l.a.ContentType.asset,isPro:je})),ae&&r.a.createElement(xt,{onClose:()=>ne(!1),onSelect:a=>qt(this,null,(function*(){var n;const r=z.a.pending(Object(o.e)("creating..."));let c=void 0;try{if(a.id)a=a,Ot.a.Ugc.createByTemplateUsingPost({templateId:a.id,title:a.title||""}).then(e=>{const{editHash:t}=e;Object(ot.d)({hash:t,type:"edit"}),z.a.closeNotice(r),ne(!1),ue(e=>e+1)}).catch(()=>{console.error("error")});else{a=a;const i=yield Te.a.container.createGameEditUsingPost({image:a.cover,name:Object(o.e)("mapTemplateName_"+a.name),describe:Object(o.e)("mapTemplateDesc_"+a.name),hash:o.f===o.b.zh?a.hash_zh:a.hash_en,resourceId:0});if(c=null!=(n=null==i?void 0:i.value)?n:"",!c)throw new Error;Fe(Dt.c.CLICK_MAP_EDITOR,{is_first_edit:!0,map_name:Object(o.e)("mapTemplateName_"+a.name),map_id:"",map_type:"模版地图",module_map_name:Object(o.e)("mapTemplateName_"+a.name)}),z.a.closeNotice(r),e.openGameEdit({container_name:c}),It.a.openMapEditor({contentId:0,userId:t.id}),D(_e.length+1),ne(!1)}}catch(t){z.a.closeNotice(r),z.a.error(Object(o.e)("submitFail")),c&&e.logger.error(c.toString())}})),isPro:je}),re&&r.a.createElement(Nt.a,{onClose:()=>ce(!1),onConfirm:(a,n,r,c)=>qt(this,null,(function*(){if(!t.data)throw new Error("User is not logged in when submit application form");yield e.rpc.invitation.api.addApplication({phone:a,description:n,name:t.data.displayname,topic:r,answer:c}),M({initialized:!0,hasApplied:!0,status:l.a.InvitationAppStatus.waiting,updated_at:new Date}),ce(!1)}))}),oe.showModal&&r.a.createElement(wt.a,{title:Vt[oe.modalStep],onClose:()=>se(Gt(Ht({},oe),{showModal:!1}))},He()),v&&r.a.createElement(wt.a,{title:"请在电脑端创作",onClose:()=>j(!1)},r.a.createElement("div",{style:{color:"#353535",fontSize:14,lineHeight:"21px"}},"PRO版仅适用于电脑端设备,请在电脑端进行创作"),r.a.createElement("div",{style:{marginTop:46,display:"flex",justifyContent:"flex-end"}},r.a.createElement("div",{onClick:()=>j(!1),style:{width:104,height:36,background:"#EC8935",borderRadius:"100px",display:"flex",justifyContent:"center",alignItems:"center",fontSize:16,color:"#fff"}},"知道了"))))}var $t=a(419),ea=a(58),ta=a(240),aa=a(255),na=a(126),ra=a(504),ca=a(1412),ia=Object.defineProperty,la=Object.defineProperties,oa=Object.getOwnPropertyDescriptors,sa=Object.getOwnPropertySymbols,da=Object.prototype.hasOwnProperty,ma=Object.prototype.propertyIsEnumerable,ua=(e,t,a)=>t in e?ia(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,pa=(e,t)=>{for(var a in t||(t={}))da.call(t,a)&&ua(e,a,t[a]);if(sa)for(var a of sa(t))ma.call(t,a)&&ua(e,a,t[a]);return e},ha=(e,t)=>la(e,oa(t));const ba=a(1426);function ga(){const e=Object(k.b)(S.c),t=Object(s.b)(),a=Object(k.b)(S.a,()=>[]),c=(new Date).setHours(0,0,0,0),{isDao3Bind:i}=Object(ca.b)(),[l,d]=Object(n.useState)(ta.a.hide),m=!!!(e.data.auth_info&ea.d.qq||e.data.auth_info&ea.d.wechat||e.data.phone)&&c>gt.a.get("accountBindTipTimeStamp"),[u,p]=Object(n.useState)(m),[h,b]=Object(n.useState)(!u),{modalElem:g,setModalVisible:E}=Object(ca.a)();if(!e.data)return null;const w=(e,t)=>{let n="";n="bound"===t?Object(o.e)("accountAlreadyBound",{name:e}):Object(o.e)(t),a.show({title:Object(o.e)("bindFailed"),children:r.a.createElement(L.a,{weight:"minor"},n),buttons:[{text:Object(o.e)("isee"),onClick:a.close}]})},f=(e,t,a)=>r.a.createElement("div",{className:ba.listItem},r.a.createElement(L.a,null,e),r.a.createElement("div",{className:ba.flex,onClick:a},r.a.createElement(L.a,{size:14,weight:"minor"},t||Object(o.e)("notSet")),a&&r.a.createElement(F.a,{icon:"arrow-right2",size:16}))),O=(t,n,c,i)=>{const l=!!(c&e.data.auth_info);return r.a.createElement("div",{className:ba.listItem},r.a.createElement("div",{className:ba.flex},r.a.createElement(F.a,{icon:t,size:24,className:ba.titleIcon}),r.a.createElement(L.a,null,n)),l?r.a.createElement(te.a,{posX:"center",posY:"down",popup:r.a.createElement("div",{className:ba.popup},i&&r.a.createElement("div",{onClick:i,className:ba.clickable},r.a.createElement(L.a,null,Object(o.e)("reBind"))),r.a.createElement("div",{className:ba.clickable,onClick:()=>{(()=>{const t=e.data;if(t)return!(!t.phone&&!t.email)||(a.show({title:Object(o.e)("cannotUnBindTitle"),children:r.a.createElement(L.a,{size:14,weight:"minor",wrap:!0},Object(o.e)("cannotUnBindBody")),buttons:[{text:Object(o.e)("setPhone"),onClick:()=>{a.close(),d(t.password?ta.a.setPhone:ta.a.setPhoneAndPassword)}},{text:Object(o.e)("setEmail"),onClick:()=>{a.close(),d(t.password?ta.a.setEmail:ta.a.setEmailAndPassword)}}]}),!1)})()&&a.show({title:Object(o.e)("unBind"),children:r.a.createElement(L.a,{weight:"minor"},Object(o.e)("unbindConfirmBody",{name:n})),buttons:[{text:Object(o.e)("unbindCancel"),color:"white",onClick:()=>{a.close()}},{text:Object(o.e)("unbindConfirm"),color:"red",onClick:()=>{(t=>{Te.a.auth.unbindUsingPost(t).then(Ge.a.userInfoToUserDetail).then(t=>{e.setData(t),a.close()}).catch(e=>z.a.error(Object(o.e)("unbindFailed")))})(t)}}]})}},r.a.createElement(L.a,null,Object(o.e)("unBind"))))},r.a.createElement("div",{className:ba.flex},r.a.createElement(L.a,{size:14,weight:"minor"},Object(o.e)("bound")),r.a.createElement(F.a,{icon:"modify",size:16}))):i&&r.a.createElement(na.a,{size:"tiny",onClick:i},Object(o.e)("bind")))},v=r.a.createElement("div",{className:ba.body},r.a.createElement("div",{className:ba.list},f(Object(o.e)("username"),e.data.username,()=>{d(ta.a.setUsername)}),f(Object(o.e)("password"),e.data.password||Object(o.e)("notSet"),()=>{e.data&&e.data.password?d(ta.a.updatePassword):d(ta.a.initPassword)}),f(Object(o.e)("phone_number"),e.data.phone||Object(o.e)("notSet"),()=>{e.data&&(e.data.password?d(ta.a.setPhone):d(ta.a.setPhoneAndPassword))}),f(Object(o.e)("email"),e.data.email||Object(o.e)("notSet"),()=>{e.data&&(e.data.password?d(ta.a.setEmail):d(ta.a.setEmailAndPassword))})),r.a.createElement("div",{className:ba.list},r.a.createElement(L.a,{size:14,weight:"minor",className:ba.listItem},Object(o.e)("otherLoginOptions")),O("qq","QQ",ea.d.qq,()=>{Object(aa.c)("bind").then(t=>{e.data&&t&&(e.setData(ha(pa({},e.data),{auth_info:e.data.auth_info|ea.d.qq})),z.a.success({title:Object(o.e)("accountBindSuccessTitle",{account:"QQ"}),detail:Object(o.e)("gotReputationPoints",{points:20})}))}).catch(e=>w("QQ",Object($.a)(e).i18n))}),O("wechat",Object(o.e)("wechat"),ea.d.wechat,()=>{Object(aa.d)("bind").then(t=>{e.data&&t&&(e.setData(ha(pa({},e.data),{auth_info:e.data.auth_info|ea.d.wechat})),z.a.success({title:Object(o.e)("accountBindSuccessTitle",{account:Object(o.e)("wechat")}),detail:Object(o.e)("gotReputationPoints",{points:20})}))}).catch(e=>w(Object(o.e)("wechat"),Object($.a)(e).i18n))}),O("codemao",Object(o.e)("codemao"),ea.d.codemao,()=>{d(ta.a.bindCodemao)})));return r.a.createElement(r.a.Fragment,null,!i&&r.a.createElement("div",{className:Object(rt.a)(ba.container,ba.proContainer,Object(G.f)()&&u?"p-16":"p-0-16")},r.a.createElement("div",{className:Object(rt.a)(ba.list,ba.proList)},r.a.createElement("div",{className:ba.listItem},r.a.createElement(L.a,null,"“神岛PRO” 手机号绑定"),r.a.createElement(na.a,{size:"tiny",onClick:()=>{E(!0)}},Object(o.e)("bind"))))),g,r.a.createElement("div",{className:Object(rt.a)(ba.container,Object(G.f)()&&u?"p-16":"p-0-16")},u&&r.a.createElement("div",{className:Object(rt.a)(ba.accountBindTip,h&&ba.accountBindTipFade)},r.a.createElement(L.a,{size:Object(G.f)()?12:16,wrap:!0},Object(o.e)("accountBindTip")),r.a.createElement(F.a,{size:Object(G.f)()?12:16,icon:"close",className:ba.close,onClick:()=>{b(!0),Object(ra.a)(()=>{p(!1)},200),gt.a.put("accountBindTipTimeStamp",Date.now())}})),v,r.a.createElement(ta.b,{uname:e.data.username,page:l,setPage:e=>d(e),authRPC:t.rpc.auth,userRPC:t.rpc.user,updateUser:t=>{e.data&&(e.setData(pa(pa({},e.data),t)),z.a.success({title:Object(o.e)("accountBindSuccessTitle",{account:Object(o.e)("phone_number")}),detail:Object(o.e)("gotReputationPoints",{points:20})}),d(ta.a.hide))}})))}var Ea=a(508);const wa=a(1427);function fa(){const e=Object(s.b)(),t=Object(k.b)(S.c),a=Object(N.e)(),[c,l]=Object(n.useState)(M.c.api.getBlocklist.ret.alloc()),[d,m]=Object(n.useState)(!0),[p,h]=Object(n.useState)([]);if(Object(n.useEffect)(()=>{m(!0),e.rpc.user.api.getBlocklist().then(e=>{l(e),h([]),m(!1)}).catch(e=>{z.a.rpcError(e),m(!1)})},[]),!t.data)return null;const b=t=>{const a=p.indexOf(t.id)>=0?r.a.createElement(L.a,{size:14},Object(o.e)("cancelled")):r.a.createElement(na.a,{size:"tiny",family:"regular",color:"whiteFrame",onClick:()=>{(t=>{e.rpc.user.api.unblock(t.id).then(()=>{h(p.concat(t.id))}).catch(e=>{z.a.rpcError(e)})})(t)},className:wa.cancelBlockBtn},Object(o.e)("unblock"));return r.a.createElement(Ea.a,{key:t.id,className:wa.userCard,avatarHash:t.avatar,name:t.displayname,tag:t.tag,description:t.description,userRoute:i.b.user(t.id),tailling:a,showBorder:!Object(G.f)(),showMobile:!0,showShadow:!0})};let E=r.a.createElement(r.a.Fragment,null);if(d)E=r.a.createElement("div",{className:wa.center},r.a.createElement(u.a,null));else if(c.length){const e=Object(G.f)()?Object(G.g)()?8:16:24;E=r.a.createElement("div",{className:Object(rt.a)(Object(G.f)()&&"m-0-16")},r.a.createElement(g.a,{rowGap:e,columnGap:e,maxWidth:Object(G.f)()?a:a/2},c.map(b)))}else E=r.a.createElement(L.a,{className:wa.empty,size:14,weight:"minor",wrap:!0},Object(o.e)("emptyBlockedUsers"));const w=Object(G.f)()?14:16;return r.a.createElement("div",{className:wa.container},r.a.createElement("div",{className:wa.blockDescription},r.a.createElement(L.a,{size:w,className:wa.title},Object(o.e)("blockDescription")),r.a.createElement(L.a,{size:14},Object(o.e)("whenUserBlocked")),r.a.createElement(L.a,{size:14},Object(o.e)("blockDesc"))),r.a.createElement("div",{className:wa.blockList},r.a.createElement(L.a,{size:w,className:wa.title},Object(o.e)("blockedUsers")),E))}var Oa=a(54),va=a(136),ja=a(296),ya=a(418),xa=a(371),_a=a(3),Ca=a(571);const Na=a(1428),ka="undefined"!=typeof window&&window.devicePixelRatio?window.devicePixelRatio:1,Sa=_a.d.create(),Pa=_a.d.create(),Da=Object(n.forwardRef)((e,t)=>{const{image:a,scaleStep:c=.1,scaleDecimal:i=1}=e,l=Object(G.f)(),o={width:e.width,height:e.height},s=Object(n.useRef)(),d=Object(n.useRef)(null),m=Object(n.useRef)(),u=Object(n.useRef)(_a.d.create()),p=Object(n.useRef)(e.scale||1),h=Object(n.useRef)(e.scale||1),b=Object(n.useRef)(_a.d.create()),g=Object(n.useRef)(0),E=Object(n.useRef)(!1),w=Object(n.useRef)(!1),f=Object(n.useRef)([_a.d.create(),_a.d.create()]),O=Object(n.useRef)(_a.d.create()),v=Object(n.useRef)(0);Object(n.useEffect)(()=>{s.current=new Image,s.current.onload=()=>{j(),y(),N(),k(),S()},s.current.src=a},[a]),Object(n.useEffect)(()=>{if(d.current)return l?d.current.addEventListener("touchstart",B):(_a.d.set(b.current,o.width/2,o.height/2),d.current.addEventListener("mousedown",T)),()=>{d.current&&(l?d.current.removeEventListener("touchstart",B):d.current.removeEventListener("mousedown",T))}},[]),Object(n.useImperativeHandle)(t,()=>({doRotate:D,doScale:I,doCrop:Y}));const j=()=>{if(!d.current)throw new Error("canvas is not a dom");if(m.current=d.current.getContext("2d"),!s.current)throw new Error("invalid image origin data");const{width:t,height:a}=s.current,{width:n,height:r}=_(),c=t/a;if(e.scale){const t=Object(it.a)(e.scale,i);return p.current=t,void(h.current=t)}const l=c<1?n/t:r/a,o=Object(it.a)(l,i);p.current=o,h.current=o,e.onInitialized&&e.onInitialized({scale:o})},y=()=>{if(!d.current)throw new Error("canvas is not a dom");d.current.width=C(o.width),d.current.height=C(o.height),d.current.style.width=o.width+"px",d.current.style.height=o.height+"px"},x=Object(n.useCallback)(e=>e*p.current,[a,e.width,e.height]),_=()=>({width:o.width-2*e.border[0],height:o.height-2*e.border[1]}),C=e=>e*ka,N=()=>{if(!m.current)throw new Error("has error with canvas context");m.current.clearRect(0,0,o.width,o.height)},k=()=>{if(!s.current)throw new Error("invalid image origin data");if(!m.current)throw new Error("has error with canvas context");let e=o.width,t=o.height;const a=x(s.current.width),n=x(s.current.height);m.current.save(),m.current.translate(C(e/2),C(t/2)),m.current.rotate(g.current*Math.PI/180),g.current%180!=0&&([e,t]=[t,e]),m.current.translate(-C(e/2),-C(t/2));let r=u.current[0],c=u.current[1];if(h.current!==p.current){const e=b.current[0],t=b.current[1];r=e-(e-r)/h.current*p.current,c=t-(t-c)/h.current*p.current}h.current=p.current,!r&&(r=(e-a)/2),!c&&(c=(t-n)/2);const i=H(),l=q(r,c);l.left&&(r=i.left),l.right&&(r=i.right),l.top&&(c=i.top),l.bottom&&(c=i.bottom),_a.d.set(u.current,r,c),m.current.globalCompositeOperation="destination-over",m.current.drawImage(s.current,C(u.current[0]),C(u.current[1]),C(a),C(n)),m.current.restore()},S=()=>{if(!m.current)throw new Error("has error with canvas context");m.current.save(),m.current.translate(0,0),m.current.fillStyle="rgba(0,0,0,0.8)";const[t,a]=e.border;let n=e.borderRadius;n=Math.max(n,0),n=Math.min(n,o.width/2-t,o.height/2-a),m.current.beginPath(),P(t,a,o.width-2*t,o.height-2*a,n),m.current.rect(0,0,C(o.width),C(o.height)),m.current.fill("evenodd"),m.current.restore()},P=(e,t,a,n,r)=>{if(!m.current)throw new Error("has error with canvas context");if(0===r)m.current.rect(e,t,a,n);else{const c=a-r,i=n-r;m.current.translate(C(e),C(t)),m.current.arc(C(r),C(r),C(r),Math.PI,1.5*Math.PI),m.current.lineTo(C(c),0),m.current.arc(C(c),C(r),C(r),1.5*Math.PI,2*Math.PI),m.current.lineTo(C(a),C(i)),m.current.arc(C(c),C(i),C(r),2*Math.PI,.5*Math.PI),m.current.lineTo(C(r),C(n)),m.current.arc(C(r),C(i),C(r),.5*Math.PI,Math.PI),m.current.translate(-C(e),-C(t))}},D=()=>{g.current=270===g.current?0:g.current+90,N(),y(),S(),k()},I=(e=null)=>{M(e),y(),N(),S(),k()},M=(t=null)=>{if(!s.current)throw new Error("invalid image origin data");const{width:a,height:n}=s.current,{width:r,height:l}=_();let o=null!==t?+t:status?p.current+c:p.current-c;if(o*a=1?l/n:r/a}const d=e.maxScale&&o>e.maxScale?e.maxScale:o;p.current=Object(it.a)(d,i)},z=()=>{N(),y(),k(),S(),v.current=requestAnimationFrame(z)},T=e=>{if(e.preventDefault(),!d.current)throw new Error("canvas is not a dom");_a.d.set(O.current,e.clientX,e.clientY),E.current=!0,d.current.addEventListener("mouseup",L),d.current.addEventListener("mousemove",R),v.current=requestAnimationFrame(z)},B=e=>{if(e.preventDefault(),!d.current)throw new Error("canvas is not a dom");e.touches.length>=2?(w.current=!0,_a.d.set(f.current[0],e.touches[0].clientX,e.touches[0].clientY),_a.d.set(f.current[1],e.touches[1].clientX,e.touches[1].clientY),_a.d.set(b.current,(e.touches[1].clientX+e.touches[0].clientX)/2,(e.touches[1].clientY-e.touches[0].clientY)/2)):(_a.d.set(O.current,e.touches[0].clientX,e.touches[0].clientY),E.current=!0),d.current.addEventListener("touchend",F),d.current.addEventListener("touchmove",A),v.current=requestAnimationFrame(z)},L=e=>{if(e.preventDefault(),!d.current)throw new Error("canvas is not a dom");E.current=!1,_a.d.set(O.current,0,0),cancelAnimationFrame(v.current),d.current.removeEventListener("mouseup",L),d.current.removeEventListener("mousemove",R)},F=e=>{if(e.preventDefault(),!d.current)throw new Error("canvas is not a dom");E.current=!1,w.current=!1,_a.d.set(f.current[0],0,0),_a.d.set(f.current[1],0,0),_a.d.set(O.current,0,0),cancelAnimationFrame(v.current),d.current.removeEventListener("touchend",F),d.current.removeEventListener("touchmove",A)},R=e=>{if(e.preventDefault(),!E.current)return;const t=e.clientX,a=e.clientY;U(t,a)},A=e=>{if(e.preventDefault(),E.current){const t=e.touches[0].clientX,a=e.touches[0].clientY;U(t,a)}else if(w.current&&f.current){const t=_a.d.distance(f.current[0],f.current[1]);_a.d.set(Sa,e.touches[0].clientX,e.touches[0].clientY),_a.d.set(Pa,e.touches[1].clientX,e.touches[1].clientY);const a=_a.d.distance(Sa,Pa)/t*p.current;M(a),_a.d.set(f.current[0],e.touches[0].clientX,e.touches[0].clientY),_a.d.set(f.current[1],e.touches[1].clientX,e.touches[1].clientY)}},U=(e,t)=>{if(O.current){let a=e-O.current[0],n=t-O.current[1];switch(g.current){case 90:a=t-O.current[1],n=-(e-O.current[0]);break;case 180:a=-(e-O.current[0]),n=-(t-O.current[1]);break;case 270:a=-(t-O.current[1]),n=e-O.current[0]}_a.d.set(u.current,u.current[0]+a,u.current[1]+n)}_a.d.set(O.current,e,t)},H=()=>{if(!s.current)throw new Error("invalid image origin data");const t={left:0,right:0,top:0,bottom:0},[a,n]=e.border,r=x(s.current.width),c=x(s.current.height);return g.current%180==0?(t.left=a,t.right=o.width-a-r,t.top=n,t.bottom=o.height-n-c):(t.top=a,t.bottom=o.width-a-c,t.left=n,t.right=o.height-n-r),t},q=(t,a)=>{if(!s.current)throw new Error("invalid image origin data");const n={left:!1,right:!1,top:!1,bottom:!1},[r,c]=e.border,i=x(s.current.width),l=x(s.current.height);return g.current%180==0?(n.left=t>r,n.right=o.width-(i+t)>r,n.top=a>c,n.bottom=o.height-(l+a)>c):(n.left=t>c,n.right=o.height-(i+t)>c,n.top=a>r,n.bottom=o.width-(l+a)>r),n},Y=()=>{if(!s.current)throw new Error("invalid image origin data");const[t,a]=e.border;let{width:n,height:r}=_();const c=document.createElement("canvas");c.style.display="none",c.width=n,c.height=r;const i=c.getContext("2d");if(!i)throw new Error("error");let l=-t+u.current[0],o=-a+u.current[1];return i.save(),i.translate(n/2,r/2),i.rotate(g.current*Math.PI/180),g.current%180!=0&&([n,r]=[r,n],l=-a+u.current[0],o=-t+u.current[1]),i.translate(-n/2,-r/2),i.drawImage(s.current,l,o,x(s.current.width),x(s.current.height)),i.restore(),new Promise((e,t)=>{const a=Object(Ca.a)(c,{type:"png"});a?e(a):t()})};return r.a.createElement("canvas",{width:e.width,height:e.height,ref:d,className:Na.canvas},"Browse don't support canvas!")});var Ia=a(509);const Ma=a(1429),za=e=>{const{min:t,max:a,step:n,width:c,defaultValue:i=t,onChange:l}=e,o={width:c};return r.a.createElement("input",{type:"range",min:t,max:a,step:n,defaultValue:i,onChange:e=>{const t=e.target.value;null==l||l(t)},style:o,className:Ma.slider})};var Ta=Object.defineProperty,Ba=Object.getOwnPropertySymbols,La=Object.prototype.hasOwnProperty,Fa=Object.prototype.propertyIsEnumerable,Ra=(e,t,a)=>t in e?Ta(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Aa=(e,t)=>{for(var a in t||(t={}))La.call(t,a)&&Ra(e,a,t[a]);if(Ba)for(var a of Ba(t))Fa.call(t,a)&&Ra(e,a,t[a]);return e},Ua=(e,t,a)=>new Promise((n,r)=>{var c=e=>{try{l(a.next(e))}catch(e){r(e)}},i=e=>{try{l(a.throw(e))}catch(e){r(e)}},l=e=>e.done?n(e.value):Promise.resolve(e.value).then(c,i);l((a=a.apply(e,t)).next())});const Ha=a(1430);function Ga(){const e=Object(s.b)(),t=Object(k.b)(S.c),[a,c]=Object(n.useState)(!1),[i,d]=Object(n.useState)(null),[m,u]=Object(n.useState)(!1),[p,h]=Object(n.useState)(0),[g,E]=Object(n.useState)(),w=M.c.api.getAvatarStatus.ret.clone(M.c.api.getAvatarStatus.ret.identity),[f,O]=Object(n.useState)(w),[v,j]=Object(n.useState)(null),[y,x]=Object(n.useState)(),_=Object(n.useRef)(null),C=Object(N.d)(),P=window.innerHeight-200,D=C>P?[(C-(P-48))/2,24]:[24,(window.innerHeight-200-(C-48))/2],I=()=>{e.rpc.user.api.getAvatarStatus().then(t=>{O(t),t.status===l.a.AvatarStatus.accepted?(z.a.success(Object(o.e)("approvedAndCustomAvatarUpdateSuccessfully")),e.rpc.user.api.noticeAvatarStatus().catch(e=>z.a.rpcError(e))):t.status===l.a.AvatarStatus.rejected&&(z.a.error(Object(o.e)("notApprovedAndCustomAvatarContainsBadContent")),e.rpc.user.api.noticeAvatarStatus().catch(e=>z.a.rpcError(e)))}).catch(e=>{z.a.rpcError(e)})};Object(n.useEffect)(()=>{I(),t.update().catch(e=>z.a.rpcError(e))},[]);const T=a=>{e.rpc.user.api.updateUserInfo({type:"gender",data:+a}).then(()=>{z.a.success(Object(o.e)("submitSuccess")),t.setData({gender:a})}).catch(e=>{z.a.rpcError(e)})},B=a=>{e.rpc.user.api.updateUserInfo({type:"birthday",data:a}).then(()=>{z.a.success(Object(o.e)("submitSuccess")),t.setData({birthday:a})}).catch(e=>{z.a.rpcError(e)})},R=t=>Ua(this,null,(function*(){try{u(!0);const a=yield Object(Ia.a)(new Blob([t]),M.b.avatarUpdate);"string"==typeof a&&(yield e.rpc.user.api.updateUserInfo({type:"avatar",data:a}),I(),Object(ra.a)(()=>{I()},5e3)),u(!1),E(window.URL.createObjectURL(t))}catch(e){throw new Error(e)}})),U=()=>{I(),E(null)},q=()=>Ua(this,null,(function*(){var e,t;const a=null!=(t=yield null==(e=_.current)?void 0:e.doCrop())?t:null;if(a){try{yield R(a),z.a.success(Object(o.e)("updateSuccess"))}catch(e){z.a.rpcError(e)}j(null)}else z.a.error("image crop error!")}));if(!t.data)return null;const Y=Object(G.f)(),X=Ya({title:Object(o.e)("basicInfo"),subTitle:Object(o.e)("showPublic")}),W=Ya({title:Object(o.e)("otherInfo"),subTitle:Object(o.e)("showOnlyForMe"),children:t.data.hasAuthenticateIdcard&&r.a.createElement("div",{className:`${Ha.verifyWrap} ${Ha.mobile}`},r.a.createElement(F.a,{className:Ha.icon,icon:"user-verify-logo"}),r.a.createElement("span",null,"已实名认证"))}),V=r.a.createElement("div",{className:Ha.selfAvatar},r.a.createElement(te.a,{posX:"center",className:Object(rt.a)(m&&Ha.cursorDef),shouldShowPopup:()=>!m,clickCallback:()=>e.rpc.user.api.avatarUploadStatus().then(e=>{h(e.canUpload)}).catch(e=>{z.a.rpcError(e)}),popup:r.a.createElement("div",{className:Ha.avatarPopup},Wa({title:Object(o.e)("systemAvatar"),onClick:()=>{Object(G.f)()?d(r.a.createElement(Qa,{currentAvatar:g||f.avatar,avatarStatus:g?f.status:void 0,avatarIsHash:!g,onClose:()=>d(null),onSave:U})):c(!0)}}),Wa({title:Object(o.e)("customized"),disable:0===p,subtitle:Object(o.e)("NumberOfTodayCanUpload",{number:p}),onClick:()=>Ua(this,null,(function*(){try{const e=yield Object(xa.a)({size:2097152,accept:".jpeg, .png, .jpg"}),t=new FileReader;t.onload=t=>Ua(this,null,(function*(){t.target&&t.target.result&&j(window.URL.createObjectURL(e))})),t.readAsArrayBuffer(e)}catch(e){z.a.error({title:Object(o.e)("uploadFailed"),detail:Object(o.e)("fileTooLarge")+" 2MB"})}}))}))},r.a.createElement(Va,{img:g||f.avatar,avatarStatus:f.status,isHash:!g,uploading:m,canHover:!0}))),Q={[l.a.Gender.female]:Object(o.e)("female"),[l.a.Gender.male]:Object(o.e)("male"),[l.a.Gender.unknow]:Object(o.e)("secret")};return Y?r.a.createElement("div",{className:Ha.container},r.a.createElement("div",{className:Ha.card+" "+Ha.center},V),r.a.createElement("div",{className:Ha.card},X,Xa(Object(o.e)("nickname"),t.data.displayname,()=>{d(r.a.createElement(qa,{title:Object(o.e)("nickname"),value:t.data.displayname,maxBytes:va.b,minBytes:va.d,onClose:()=>d(r.a.createElement(r.a.Fragment,null)),onConfirm:e=>Ua(this,null,(function*(){yield Te.a.user.updateUserInfoUsingPut({displayname:e}),t.setData({displayname:e})}))}))}),Xa(Object(o.e)("signature"),t.data.description||"",()=>{d(r.a.createElement(qa,{title:Object(o.e)("signature"),value:t.data.description||"",onClose:()=>d(r.a.createElement(r.a.Fragment,null)),textArea:!0,textAreaProps:{rows:5.5},maxBytes:va.a,onConfirm:e=>Ua(this,null,(function*(){yield Te.a.user.updateUserInfoUsingPut({description:e}),t.setData({description:e})}))}))})),r.a.createElement("div",{className:Ha.card},W,Xa(Object(o.e)("gender"),Q[t.data.gender],()=>{d(r.a.createElement(Ka,{onClose:()=>d(null),defaultValue:t.data.gender,onSave:T}))}),Xa(Object(o.e)("birthday"),Object(ct.b)(t.data.birthday,!0,"/"),()=>{},r.a.createElement("input",{type:"date",value:t.data.birthday?Object(ct.b)(t.data.birthday,!0):"1980-01-01",onChange:e=>{B(new Date(e.target.value))}}))),i,v&&r.a.createElement(b.a,{className:Ha.cropMobileOverlay},r.a.createElement("div",{className:Ha.cropMobileRest}),r.a.createElement(Da,{ref:_,image:v,width:C,height:window.innerHeight-200,border:[D[0],D[1]],borderRadius:(C-24)/2,maxScale:2}),v&&r.a.createElement("div",{className:Ha.cropMobileRest},r.a.createElement("div",{className:"flex justify-end"},r.a.createElement(F.a,{icon:"rotate-solid",size:24,className:Ha.cropRotateIcon,onClick:()=>{var e;return null==(e=_.current)?void 0:e.doRotate()}}),r.a.createElement(de.a.h,{size:Object(G.g)()?8:24})),r.a.createElement("div",{className:Ha.cropMobileOptContainer},r.a.createElement(A.a,{type:"text",color:"white",onClick:()=>j(null),className:Ha.cropMobileOptBtn},Object(o.e)("cancel")),r.a.createElement(A.a,{type:"text",color:"white",onClick:q,className:Ha.cropMobileOptBtn,loading:m},Object(o.e)("save")),r.a.createElement(de.a.h,{size:24}))))):r.a.createElement("div",{className:Ha.container},r.a.createElement("div",{className:Ha.card},X,V,r.a.createElement(qa,{title:"*"+Object(o.e)("nickname"),value:t.data.displayname,maxBytes:va.b,minBytes:va.d,handleMsg:"*"+Object(o.e)("nickNameLimit"),onConfirm:e=>Ua(this,null,(function*(){yield Te.a.user.updateUserInfoUsingPut({displayname:e}),t.setData({displayname:e})}))}),r.a.createElement(qa,{title:Object(o.e)("signature"),value:t.data.description||"",maxBytes:va.a,onConfirm:e=>Ua(this,null,(function*(){yield Te.a.user.updateUserInfoUsingPut({description:e}),t.setData({description:e})})),textAreaProps:{maxLine:6.5,rows:3},textArea:!0})),r.a.createElement("div",{className:Ha.card},r.a.createElement("div",{className:Ha.header},W),r.a.createElement("div",{className:Ha.flex},r.a.createElement("div",{className:Ha.inputContainer+" "+Ha.gender},r.a.createElement(L.a,null,Object(o.e)("gender")),r.a.createElement(H.a,{posX:"unset",list:Q,onSelect:T,className:Ha.dropdown},r.a.createElement(L.a,null,Q[t.data.gender]))),r.a.createElement("div",{className:Ha.inputContainer+" "+Ha.birthday},r.a.createElement(L.a,null,Object(o.e)("birthday")),function(e,t){const a=new Date,n={},c={},i={},l=e.getFullYear();let s="",d="",m="";o.f===o.b.zh&&(s=Object(o.e)("month"),m=Object(o.e)("day"),d=Object(o.e)("year"));for(let e=a.getFullYear()-80;e<=a.getFullYear();e++)n[e]=e+d;for(let e=0;e<12;e++)c[e]=e+1+s;const u=e.getMonth()+1;let p=31;2===u?p=l%4==0?29:28:[4,6,9,11].indexOf(u)>=0&&(p=30);for(let e=1;e<=p;e++)i[e]=e+m;return r.a.createElement("div",{className:Ha.birthdayDropdownContainer},r.a.createElement(H.a,{posX:"unset",list:n,reverse:!0,onSelect:a=>t(new Date(e.setFullYear(a))),className:Ha.dropdown,popupClassName:Ha.dropdownPopup},r.a.createElement(L.a,null,l+d)),r.a.createElement(H.a,{list:c,posX:"unset",onSelect:a=>t(new Date(e.setMonth(a))),popupClassName:Ha.dropdownPopup,className:Ha.dropdown},r.a.createElement(L.a,null,u+s)),r.a.createElement(H.a,{list:i,posX:"unset",onSelect:a=>t(new Date(e.setDate(a))),popupClassName:Ha.dropdownPopup,className:Ha.dropdown},r.a.createElement(L.a,null,e.getDate()+m)))}(new Date(t.data.birthday||"1980-01-01"),B)))),a&&r.a.createElement(Qa,{currentAvatar:g||f.avatar,avatarIsHash:!g,onClose:()=>c(!1),onSave:U}),v&&r.a.createElement(wt.a,{title:Object(o.e)("uploadCustomAvatar"),onClose:()=>j(null)},r.a.createElement(Da,{ref:_,image:v,maxScale:2,width:552,height:360,scaleStep:.1,border:[120,24],borderRadius:168,onInitialized:({scale:e})=>x(e)}),r.a.createElement(de.a.v,{size:16}),v&&void 0!==y&&r.a.createElement("div",{className:"flex justify-between"},r.a.createElement(de.a.h,{size:24}),r.a.createElement(za,{min:y,max:2,width:312,step:.1,onChange:e=>{var t;null==(t=_.current)||t.doScale(e)}}),r.a.createElement(F.a,{icon:"rotate-solid",size:24,onClick:()=>{var e;null==(e=_.current)||e.doRotate()}})),r.a.createElement(de.a.v,{size:24}),r.a.createElement("div",{className:"flex justify-center"},r.a.createElement(A.a,{color:"grey",width:200,onClick:()=>j(null)},Object(o.e)("cancel")),r.a.createElement(de.a.h,{size:24}),r.a.createElement(A.a,{color:"red-gradient",type:"primary",width:200,loading:m,onClick:q},Object(o.e)("save")))))}function qa(e){const[t,a]=Object(n.useState)(e.value),[c,i]=Object(n.useState)(!1),[l,s]=Object(n.useState)(!1),[d,m]=Object(n.useState)(""),u=t===e.value||!!(e.minBytes&&new Blob([t]).size{a(e.value),i(!1),s(!1),m("")},[e.value]);const p=()=>{u||(s(!0),e.onConfirm(t).then(()=>{z.a.success(Object(o.e)("submitSuccess")),s(!1),i(!1),m(""),e.onClose&&e.onClose()}).catch(e=>{s(!1);const t=Object($.a)(e);m(Object(o.e)(t.i18n))}))},h=()=>{a(e.value),i(!1),s(!1),m("")},g=e.maxBytes?e.maxBytes-new Blob([t]).size:"";return Object(G.f)()?r.a.createElement(b.a,{className:Ha.inputOverlay},r.a.createElement(N.c,null,r.a.createElement(Q.a,{showBack:!0,rightElement:r.a.createElement(L.a,{color:!u&&"orange",weight:u?"disabled":"default",size:20,onClick:()=>{u||p()}},r.a.createElement("b",null,Object(o.e)("save")))},r.a.createElement(L.a,null,e.title)),r.a.createElement("div",{className:Ha.overlayBody},e.textArea?r.a.createElement(Oa.f,Aa({value:t,onChange:a,errorMsg:d,autoFocus:!0,maxBytes:e.maxBytes},e.textAreaProps)):r.a.createElement(Oa.e,{value:t,onChange:a,errorMsg:d,autoFocus:!0,maxBytes:e.maxBytes}),e.maxBytes&&r.a.createElement("div",{className:Ha.inputTitleContainer},r.a.createElement(L.a,{weight:"disabled",className:Ha.restChar},g))))):r.a.createElement("div",{className:Ha.inputContainer},r.a.createElement("div",{className:Ha.inputTitleContainer},r.a.createElement(L.a,null,e.title),e.maxBytes&&c&&r.a.createElement(L.a,{size:12,weight:"disabled"},g)),e.textArea?r.a.createElement(Oa.f,Aa({value:t,onChange:e=>a(e),errorMsg:d,onFocus:()=>i(!0),onCancel:h,maxBytes:e.maxBytes},e.textAreaProps)):r.a.createElement(Oa.e,{className:Ha.input,value:t,onChange:e=>a(e),onFocus:()=>i(!0),errorMsg:d,onConfirm:p,onCancel:h,handleMsg:e.handleMsg,maxBytes:e.maxBytes}),c&&r.a.createElement("div",{className:Ha.buttonGroup},r.a.createElement(A.a,{className:Ha.cancelBtn,color:"white",width:104,onClick:h},Object(o.e)("cancel")),r.a.createElement(A.a,{width:104,loading:l,disabled:u,onClick:p},Object(o.e)("save"))))}function Ya(e){return r.a.createElement("div",{className:Ha.titleContainer},r.a.createElement(L.a,{bold:Object(G.f)()},e.title),r.a.createElement(L.a,{size:Object(G.f)()?14:16,weight:"minor"},e.subTitle),e.children)}function Xa(e,t,a,n){return r.a.createElement("div",{className:Ha.listItem,onClick:a},r.a.createElement(L.a,{size:14},e),r.a.createElement("div",{className:Ha.itemBody},n||r.a.createElement(L.a,{size:14,lineClamp:1},t),r.a.createElement(F.a,{icon:"arrow-right2",size:16})))}const Wa=e=>r.a.createElement("div",{className:Object(rt.a)(Ha.avatarPopupItem,!e.disable&&"cursor-pointer"),onClick:e.disable?void 0:e.onClick},r.a.createElement(L.a,{disabled:e.disable},e.title),!!e.subtitle&&r.a.createElement(L.a,{size:12,weight:"minor",className:"mt-4",disabled:e.disable},e.subtitle)),Va=e=>{const{img:t,avatarStatus:a,uploading:c=!1,isHash:i=!0,size:s=(Object(G.g)()?64:100)}=e,d=!!e.canHover&&!(c||a===l.a.AvatarStatus.waiting),[m,u]=Object(n.useState)("");return Object(n.useEffect)(()=>{c?u(Object(o.e)("uploading2")):a===l.a.AvatarStatus.waiting?u(Object(o.e)("pending2")):u(null)},[c,a]),t?r.a.createElement("div",{onMouseOver:d?()=>u(Object(o.e)("updateAvatar")):void 0},i?r.a.createElement(ce.c,{hash:t,className:Ha.avatar,width:s,height:s}):r.a.createElement(ce.a,{src:t,width:s,height:s,className:Ha.avatar}),!!m&&r.a.createElement("div",{className:Ha.avatarOverlay,onMouseOut:d?()=>u(null):void 0},r.a.createElement(L.a,{color:"white",size:Object(G.f)()?12:16,className:"flex justify-center h-full w-full"},m))):r.a.createElement("div",{className:Ha.avatarOverlay},r.a.createElement(L.a,{color:"white"},Object(o.e)("notUploaded")))};function Qa(e){const t=Object(s.b)(),a=Object(k.b)(S.c),[c,i]=Object(n.useState)(!1),[d,m]=Object(n.useState)(""),[u,p]=Object(n.useState)(!1),h=!u||d===e.currentAvatar||c,E=()=>{var n;if(u)return d?(n=d,i(!0),void t.rpc.user.api.updateUserInfo({type:"avatar",data:n}).then(t=>{var n;i(!1),a.setData({avatar_hash:ja.a.head[d],avatar_status:l.a.AvatarStatus.accepted}),z.a.success(Object(o.e)("submitSuccess")),null==(n=e.onSave)||n.call(e),e.onClose()}).catch(e=>{i(!1),z.a.rpcError(e)})):void 0},w=Object(o.e)("selectAvatar"),f=r.a.createElement(g.a,{columnGap:16,rowGap:16,maxWidth:74},ya.a.map(e=>{const t=e===d;return r.a.createElement("div",{className:Object(rt.a)(Ha.sysAvatar,t&&Ha.selected),key:e,onClick:()=>{m(e),p(!0)}},r.a.createElement(ce.c,{hash:ja.a.head[e],width:72,height:72}))}));let O;O=d?{img:ja.a.head[d],size:72}:{img:e.currentAvatar,avatarStatus:e.avatarStatus,isHash:e.avatarIsHash,size:72};const v=r.a.createElement("div",{className:Ha.avatarSelectorBody},r.a.createElement("div",{className:Ha.avatarSelectorCard},r.a.createElement(L.a,{className:"mb-16"},Object(o.e)("currentAvatar")),r.a.createElement("div",{className:Ha.selfAvatar},r.a.createElement(Va,Aa({},O)))),r.a.createElement("div",{className:Ha.avatarSelectorCard},r.a.createElement(L.a,{className:"mb-16"},Object(o.e)("systemAvatar")),f));return Object(G.g)()?r.a.createElement(b.a,{className:Ha.avatarSelectorOverlay},r.a.createElement(N.c,{fullWidth:!0},r.a.createElement(Q.a,{showBack:!0,rightElement:r.a.createElement(L.a,{size:20,bold:!0,color:!h&&"orange",onClick:()=>{h||E()},weight:h?"disabled":"default"},Object(o.e)("save"))},w),v)):r.a.createElement(wt.a,{title:w,onClose:e.onClose,buttons:[{text:Object(o.e)("cancel"),onClick:e.onClose,color:"white"},{text:Object(o.e)("save"),color:"primary",disabled:h,onClick:E}]},v)}function Ka(e){const[t,a]=Object(n.useState)(e.defaultValue);return r.a.createElement(wt.a,{title:Object(o.e)("selectGender"),onClose:e.onClose,buttons:[{text:Object(o.e)("cancel"),color:"white",onClick:e.onClose},{text:Object(o.e)("save"),disabled:e.defaultValue===t,onClick:()=>{e.onSave(t),e.onClose()}}]},r.a.createElement("div",{className:Ha.radioContainer},r.a.createElement(Oa.g,{checked:t===l.a.Gender.male,onChange:()=>a(l.a.Gender.male),text:Object(o.e)("male")}),r.a.createElement(Oa.g,{checked:t===l.a.Gender.female,onChange:()=>a(l.a.Gender.female),text:Object(o.e)("female")}),r.a.createElement(Oa.g,{checked:t===l.a.Gender.unknow,onChange:()=>a(l.a.Gender.unknow),text:Object(o.e)("secret")})))}const Ja=a(1431);function Za(){const e=Object(c.h)(),t=new URLSearchParams(e.search).get("tab")||W.a.profile,a=Object(G.f)();let n,l="";switch(t){case W.a.profile:l=Object(o.e)("accountData"),n=r.a.createElement(Ga,null);break;case W.a.privacy:l=Object(o.e)("blockManage"),n=r.a.createElement(fa,null);break;case W.a.setting:l=Object(o.e)("accountSetting"),n=r.a.createElement(ga,null);break;default:l="404",n=r.a.createElement(q.a,null)}const s=(e,n)=>{const c=a?14:16,l=e===t;return r.a.createElement(J.a,{to:i.b.meAccount({tab:e})},r.a.createElement(L.a,{size:c,color:l&&"orange"},n))};return r.a.createElement(N.c,{className:Ja.pageContainer,fullWidth:a},r.a.createElement(Q.a,{showBack:!0},l),r.a.createElement("div",{className:Ja.container},!a&&r.a.createElement("div",{className:Ja.tabs},s(W.a.profile,Object(o.e)("accountData")),s(W.a.setting,Object(o.e)("accountSetting")),s(W.a.privacy,Object(o.e)("blockManage"))),r.a.createElement("div",{className:Ja.body},n)))}var $a=a(515),en=a(155),tn=a(502);const an=a(1432),nn=e=>{const t=Object(c.g)(),a=Object(s.b)(),l=Object(k.b)(S.c),d=Object(k.b)(S.a,()=>[]),m=Object(me.a)(),[p,h]=Object(n.useState)(!1),[b,g]=Object(n.useState)(),{data:{value:E}={value:!1}}=Object(tn.a)(Ot.a.User.getUserCertUsingGet,{toastError:!1}),{getModalProps:w}=Object($a.a)();Object(n.useEffect)(()=>{l.isLogin&&(h(!0),a.rpc.user.api.get({condition:"id",value:l.id.toString(),publishedContentsCount:!1}).then(e=>{g(e),h(!1)}).catch(e=>{a.logger.error(e.toString()),h(!1)}))},[l.id]);const f=e=>r.a.createElement(J.a,{to:e.to},e.showDot?r.a.createElement(Z.a,{hideDot:e.hideDot,size:4},r.a.createElement(L.a,{style:{padding:"0 4px 0 0"},size:14},e.text)):r.a.createElement(L.a,{size:14},e.text),r.a.createElement("div",{className:an.rowBox},e.children&&e.children,r.a.createElement(F.a,{icon:"arrow-right",size:16,style:{stroke:"#888"}})));if(!Object(G.f)())return r.a.createElement(q.a,null);if(p)return r.a.createElement(N.c,{center:!0},r.a.createElement(u.a,null));if(!l.isLogin)return r.a.createElement(N.c,{center:!0},r.a.createElement(Q.a,{rightElement:!nt.b.isbnPreview&&r.a.createElement(L.a,{onClick:()=>{a.switchLang()}},Object(o.e)("zh/en"))||""}),r.a.createElement(ce.c,{hash:Y.a.creation,width:240,height:240}),r.a.createElement(L.a,{size:20,bold:!0},Object(o.e)("loginGetMoreFeatures")),r.a.createElement(A.a,{color:"red",width:160,className:"mt-16",onClick:m.handleLogin},`${Object(o.e)("loginTitle")} / ${Object(o.e)("signup")}`));if(!l.data||!b)return null;const O=w(a.logger,d.close,!0);return r.a.createElement(N.c,{style:{paddingTop:0}},r.a.createElement(St.a,null),r.a.createElement("div",{className:an.headCard},r.a.createElement(J.a,{to:i.a.me},r.a.createElement(ce.b,{hash:b.avatar_hash,width:60,height:60,className:"rounded-full"})),r.a.createElement("div",{className:an.userDetail},r.a.createElement("div",{className:an.headOne},r.a.createElement(J.a,{to:i.a.me,className:"overflow-hidden"},r.a.createElement(L.a,null,r.a.createElement("b",null,b.displayname))),r.a.createElement(Z.a,{hideDot:!l.lastPunish},r.a.createElement("div",{className:an.reputation,onClick:e=>{e.stopPropagation(),e.preventDefault(),d.showSpecial(ee.b.reputation)}},r.a.createElement(F.a,{icon:"reputation",size:16}),r.a.createElement(L.a,{size:12,color:"orange"},b.reputation)))),r.a.createElement(oe.a,{lineClamp:3,className:"mb-12",moreComp:r.a.createElement(L.a,{className:an.expand,size:12,color:"green"},Object(o.e)("more")),lessComp:r.a.createElement(L.a,{className:an.expand,size:12,color:"green"},Object(o.e)("collapse"))},r.a.createElement(L.a,{className:"overflow-unset",size:12,weight:"minor",wrap:!0},b.description||Object(o.e)("noUserDescription"))),r.a.createElement("div",{className:"flex"},r.a.createElement(J.a,{to:i.b.userFollow(l.data.username,!0)},r.a.createElement(L.a,{size:14},r.a.createElement("span",null,Object(o.e)("follow"),":"),r.a.createElement("span",{className:"ml-8"},b.following_count))),r.a.createElement(J.a,{className:"ml-16",to:i.b.userFollow(l.data.username,!0,le.a.follower)},r.a.createElement(L.a,{size:14},r.a.createElement("span",null,Object(o.e)("follower"),":"),r.a.createElement("span",{className:"ml-8"},b.follower_count)))))),r.a.createElement("div",{className:an.list+" rounded-8 overflow-hidden"},r.a.createElement(J.a,{to:ot.a.homepage,target:"_blank"},r.a.createElement(L.a,null,"新平台入口"),r.a.createElement(A.a,{type:"primary",color:"red-gradient",onClick:()=>Object(ot.e)("homepage"),style:{padding:"0 1.5em",height:"24px",fontSize:"14px"}},"前往神岛PRO"))),r.a.createElement("br",null),r.a.createElement("div",{className:an.list+" rounded-8 overflow-hidden"},f({text:Object(o.e)("myHomepage"),to:i.a.me}),E&&f({text:r.a.createElement(r.a.Fragment,null,Object(o.e)("goToPro"),r.a.createElement(L.a,{className:an.tag,size:10,lineHeight:14},"限定")),to:new URL("/creator",en.b).href}),f({text:Object(o.e)("editProfile"),to:i.b.meAccount({tab:W.a.profile}),showDot:!0,hideDot:!l.showUserVerify,children:l.data.hasAuthenticateIdcard?null:r.a.createElement("div",{className:an.verify,onClick:e=>{e.preventDefault(),d.showVerifyModal(),l.updateShowVerify(!1)}},r.a.createElement(F.a,{className:an.verifyIcon,icon:"user-verify",size:12}),r.a.createElement("span",{className:an.text},"前往实名认证"))}),f({text:Object(o.e)("accountSetting"),to:i.b.meAccount({tab:W.a.setting})}),f({text:Object(o.e)("blockManage"),to:i.b.meAccount({tab:W.a.privacy})}),!nt.b.isbnPreview&&r.a.createElement("div",{onClick:()=>{a.switchLang()}},r.a.createElement(L.a,{size:14},Object(o.e)("language")),r.a.createElement(L.a,{size:14,weight:"minor"},Object(o.e)("switchLang"))),r.a.createElement("div",{onClick:()=>d.show(O)},r.a.createElement(L.a,{size:14},Object(o.e)("clearCache"))),l.isAdmin&&f({text:Object(o.e)("backendManage"),to:i.a.admin}),f({text:Object(o.e)("aboutBox"),to:i.a.about})),r.a.createElement("br",null),r.a.createElement("div",{className:an.bar,onClick:()=>{return e=void 0,a=null,n=function*(){yield l.logout(),t.push(i.a.home)},new Promise((t,r)=>{var c=e=>{try{l(n.next(e))}catch(e){r(e)}},i=e=>{try{l(n.throw(e))}catch(e){r(e)}},l=e=>e.done?t(e.value):Promise.resolve(e.value).then(c,i);l((n=n.apply(e,a)).next())});var e,a,n}},r.a.createElement(L.a,{size:14,color:"red-gradient"},Object(o.e)("signOut"))))};var rn=a(501),cn=(e,t,a)=>new Promise((n,r)=>{var c=e=>{try{l(a.next(e))}catch(e){r(e)}},i=e=>{try{l(a.throw(e))}catch(e){r(e)}},l=e=>e.done?n(e.value):Promise.resolve(e.value).then(c,i);l((a=a.apply(e,t)).next())});const ln=a(1433),on=e=>{var t,a;const{type:l}=e,m=Object(s.b)(),p=Object(c.g)(),h=Object(k.b)(S.c),{params:b}=Object(c.j)(),E=!b.username||h.data&&h.data.username===b.username,w=Object(N.e)(),[f,O]=Object(n.useState)();Object(n.useEffect)(()=>{E?h.id&&m.rpc.user.api.get({condition:"id",value:h.id.toString(),publishedContentsCount:!1}).then(e=>{O(e)}).catch(e=>{m.logger.error(e.toString())}):m.rpc.user.api.get({condition:"username",value:b.username,publishedContentsCount:!1}).then(e=>{O(e)}).catch(e=>{m.logger.error(e.toString())})},[b.username,h.id]);const{list:v,isLoading:j,count:y,initialized:x}=Object(d.i)(e=>cn(void 0,[e],(function*({offset:e,reload:t}){if(!f)return;let a;const n={targetId:f.id,limit:10,offset:t?0:e};return a=l===le.a.follower?yield m.rpc.user.api.getFollower(n):yield m.rpc.user.api.getFollowing(n),{rows:a.rows,count:a.count}})),e=>{m.logger.error(e.toString())},[f,l]),_=e=>{const t=h.data.username===e.username?null:r.a.createElement(rn.a,{initValue:{isFollowing:e.is_following,followerCount:0,followingCount:0},onFollowChange:t=>cn(void 0,null,(function*(){try{return yield m.rpc.user.api.follow({id:e.id,isFollow:t.isFollowing}),t.isFollowing||z.a.success(Object(o.e)("cancelFollowSuccess")),!0}catch(e){return z.a.rpcError(e),m.logger.error(e.toString()),!1}}))});return r.a.createElement(Ea.a,{key:e.id,className:ln.userCard,avatarHash:e.avatar_hash,name:e.displayname,tag:e.tag,description:e.description,userRoute:i.b.user(e.id),tailling:t})};let C=r.a.createElement(r.a.Fragment,null);if(f)if(x)if(v.length){const e=Object(G.f)()?Object(G.g)()?8:16:24;C=r.a.createElement("div",{className:"m-12"},r.a.createElement(g.a,{rowGap:e,columnGap:e,maxWidth:Object(G.f)()?w:w/2},v.map(_)))}else C=r.a.createElement("div",{className:ln.noResult},r.a.createElement(L.a,{size:20},r.a.createElement("b",null,l===le.a.following?Object(o.e)("noFollowings"):Object(o.e)("noFollowers"))));else C=r.a.createElement(u.a,{className:ln.loading});else C=null;return r.a.createElement(r.a.Fragment,null,r.a.createElement(N.c,{fullWidth:Object(G.f)()},r.a.createElement(Q.a,{showBack:!0},null!=(t=null==f?void 0:f.displayname)?t:""),!Object(G.f)()&&r.a.createElement("div",{className:ln.title},r.a.createElement(L.a,{size:20},r.a.createElement("b",null,null!=(a=null==f?void 0:f.displayname)?a:""))),r.a.createElement(R.a,{tabs:{[le.a.following]:{text:Object(o.e)("follow")},[le.a.follower]:{text:Object(o.e)("follower")}},onTab:l,onSelectTab:e=>{var t;t=e,f&&p.replace(i.b.userFollow(f.username,E,t))},barStyle:Object(G.f)()}),C,j&&x&&r.a.createElement(u.a,null),!j&&v.length>=y&&v.length>0&&r.a.createElement(T.a,null)))};function sn(){return r.a.createElement(c.d,null,r.a.createElement(c.a,{from:i.a.meCenter,to:i.a.me}),r.a.createElement(c.b,{exact:!0,path:i.a.me},r.a.createElement(at,null)),r.a.createElement(c.b,{path:[i.a.meFollowing,i.a.user+"/:username"+i.a.following]},r.a.createElement(on,{type:le.a.following})),r.a.createElement(c.b,{path:[i.a.meFollowers,i.a.user+"/:username"+i.a.followers]},r.a.createElement(on,{type:le.a.follower})),r.a.createElement(c.b,{path:i.a.user+"/:username"},r.a.createElement(at,null)),r.a.createElement(c.b,{path:i.a.meContent},r.a.createElement(Zt,null)),r.a.createElement(c.b,{path:i.a.meMobileHome},r.a.createElement(nn,null)),r.a.createElement(c.b,{path:i.a.meHistory},r.a.createElement($t.a,null,r.a.createElement(D,null))),r.a.createElement(c.b,{path:i.a.meAccount},r.a.createElement($t.a,null,r.a.createElement(Za,null))),r.a.createElement(c.b,null,r.a.createElement(q.a,null)))}},571:function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));"undefined"==typeof window||window.URL||window.webkitURL;function n(e,t){const a={sx:0,sy:0,sw:0,sh:0,dw:0,dh:0},n=document.createElement("canvas"),r=n.getContext("2d");if(!r)return;const c=t.scale||1;return a.sw=t.sw||e.width,a.sh=t.sh||e.height,a.sx=t.sx||(e.width-a.sw)/2,a.sy=t.sy||(e.height-a.sh)/2,a.dw=a.sw*c,a.dh=a.sh*c,n.width=a.dw,n.height=a.dh,r.drawImage(e,a.sx,a.sy,a.sw,a.sh,0,0,a.dw,a.dh),n}function r(e,t){return new Promise((a,r)=>{const c=n(e,t);if(!c)return r(new Error(`Error in canvasToBlob: cannot draw canvas with ${e}, ${JSON.stringify(t)}`));let i=t.quality||1;i=i<0?0:i,i=i>1?1:i,c.toBlob(e=>{e?a(e):r(new Error("Error in canvasToBlob: blob is null"))},"image/"+t.type,i)})}}}]);