From 11041a317de0e615f8a228b32d7d387946b2c16a Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Fri, 9 Aug 2024 01:55:20 +0000
Subject: [PATCH] GitHub Actions: Aug 09 2024 (Build 59)
---
asset-manifest.json | 4 ++--
index.html | 2 +-
mark/anglerCompany.png | Bin 0 -> 981 bytes
mark/tirnog.png | Bin 0 -> 951 bytes
...n.2ef7d739.chunk.js => main.a6243e6f.chunk.js} | 2 +-
5 files changed, 4 insertions(+), 4 deletions(-)
create mode 100644 mark/anglerCompany.png
create mode 100644 mark/tirnog.png
rename static/js/{main.2ef7d739.chunk.js => main.a6243e6f.chunk.js} (99%)
diff --git a/asset-manifest.json b/asset-manifest.json
index 1ea6b8f..2be86bf 100644
--- a/asset-manifest.json
+++ b/asset-manifest.json
@@ -1,7 +1,7 @@
{
"files": {
"main.css": "/static/css/main.6167e0b5.chunk.css",
- "main.js": "/static/js/main.2ef7d739.chunk.js",
+ "main.js": "/static/js/main.a6243e6f.chunk.js",
"runtime-main.js": "/static/js/runtime-main.d2bd7279.js",
"static/css/2.27305ffe.chunk.css": "/static/css/2.27305ffe.chunk.css",
"static/js/2.bf1710c3.chunk.js": "/static/js/2.bf1710c3.chunk.js",
@@ -13,6 +13,6 @@
"static/css/2.27305ffe.chunk.css",
"static/js/2.bf1710c3.chunk.js",
"static/css/main.6167e0b5.chunk.css",
- "static/js/main.2ef7d739.chunk.js"
+ "static/js/main.a6243e6f.chunk.js"
]
}
\ No newline at end of file
diff --git a/index.html b/index.html
index b84c938..30a19bb 100644
--- a/index.html
+++ b/index.html
@@ -1 +1 @@
-
MapleStory Music - BGM & OST Database
\ No newline at end of file
+MapleStory Music - BGM & OST Database
\ No newline at end of file
diff --git a/mark/anglerCompany.png b/mark/anglerCompany.png
new file mode 100644
index 0000000000000000000000000000000000000000..6385f4b0af4db7626db9ae51d0520c08a5d89aa0
GIT binary patch
literal 981
zcmV;`11kK9P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D18PY`K~z{r&6o?Z
z;y@5ZV<8r>fQ4AV0v50k3s}Gc7GePlSjgryxp_CucLUvA=nX#!)Rs;aL_a1)rIn)Wg2bnjPner)S9oSSvNb#Ky|;Ql)p5V>9$
z3vLxG7Cr=vpbPz~K7`yM7fo<~?bvxZ$NK`HsqX@)Ikz(~f%+T`h<#wU=L`zrfR7!5
z=3~^|F99%fuI>8zaC!r#?E>rCzJCnCx$Xh;6iyI~pRe&_7yyOSKxH^F(B8lfmme^o
zXj~n};XIuZfu?}d_!c07Lb#dXc7c@~D=C91eS(rx!`pHKaWVH1m{fvs$u$lakj97O
z;F6{9c=~Y(F<&2=eP9``^bllmFo6Wd6{nO!f#9a#GStUl0XGIm^z%cI(-$s{PGy&n
zpl;1Q_H!QE1amk6>FylJrF}RhM+D+3OEkNDFr5d1jZ?@{qyBghLclqhSes0LAn;ffRal}
zo2Sp~$)UKSB{%`GCa^3(R~^ePDX7;I1+73+Ev0@{{{RtK>B~U=BViTHr66ndM4zAz
zrG2bB#FiGpJatR;gj7=wCuyHvIVAu@P0@UA6)X-PVRAj8TvHC`P+SGZ6XyUf)_|nH
z2kk=FPl&SA~rdk|}K7%kItdPxv44jLvWsI;QUt#djusg+9sG>awuv_b(P_?FQ-pnf)W_D8=oJ>IJw)g
z5|sK%-Q-FEN??*hvB&31S_IPpQmN39iakRK%)f87FU~dy-t@1h^|=jJs-se&hekL7
zQBN66aGpZaCJ+>_ive;KjKE7pj`BlsxLhYV6}yA!9G`QjtW~fGSb&pL8j~J5l)=*-u_V(+&7yz1Qu|=OHK6$m|i+;(PpNkvXXu0mjf
DqAavN
literal 0
HcmV?d00001
diff --git a/mark/tirnog.png b/mark/tirnog.png
new file mode 100644
index 0000000000000000000000000000000000000000..4900c68bd42e0c292c0d6700f5dce84120a7239b
GIT binary patch
literal 951
zcmV;o14#UdP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D158OoK~z{r&6fdj
z<3J2WL!lH(ArwNv6iOi!Od%9P!4yIv6iUIjZ=07>D+W@{&~HUzFuY5ojaUP
zCv^E`I#j6J?e?n#(L9xano4o
zK~45q^XP(UsLA>EUgdp+TU!|_`}E*;fnikst-5{=^=!HfPgAZf86%e(YV{G$yxjja
zu={1co{vue8n-iN!|}jcs0P=W!gXd_>+8%aC~Jr}u8K2vy&Ua?MaQ1q1*dS4$Z%!bR^E
z+yYD}jOt7OfTB@^ia_MFWE`Ie$C+@%IL~lhFp4SQ8|1WvVp0)^JvC7|o+pPV-rQTi
z3rs_l!JJlvvR*|vt}QUm&DjJ)!XXVX>p?L=WPP1zd4Dn-=Xl`7J>K?-P^bxpYGzp!
z^`=FPT%jT$U|h-RO-cxlvs(L_r4QWzAqhL|!j7MVA2p5&(OfrHw?YJVt0*nOB-N$cPo>~ORGH!l^@*8Fk_f0U9`0c^O0-9ii
zX@qkM0%RFSLLt2H)SnnV*$W3#1rv%S3`rD71E(gOfQmYQ^OSkk`3Mo-#A>fnD=e$j
zE+-Zn#$*j`qHLa(^Q_kk?^d71ql|DQ`Y2)%i#>`H>?uyj#a^g9DLI;8tXPaR*MQ|c
z&0C83?$K%d`?&KDy$VL+c>9=#YxxsYu2GoACVMsU5e{nkbip#z@m&6QQ?79@+;ku2
zaVlT+a*c{->}zfTIZyBN$K|bxy>Kx1?"multi":t[0]:"undefined"})),le=Object(J.atom)(new Set),se="site-preferences",ue=l.a.createContext(void 0),be={hideMinorTracks:!1,distinctKmstVersion:!1,jsonOptimizedTrackIdCopy:!1};function de(e){localStorage.setItem(se,JSON.stringify(e))}var fe,he,Oe,je,me,pe,ge,ve,ye,Ce,Se,ke,we,xe,Ae,Be,Me=function(e){var t=e.children,n=l.a.useState(function(){var e=localStorage.getItem(se);if(null===e){var t=be;return de(t),t}return JSON.parse(e)}()),r=Object(d.a)(n,2),a=r[0],c=r[1];return Object(M.jsx)(ue.Provider,{value:{settings:a,setSettings:function(e){c(e),de(e)}},children:t})},Ne=function(){var e=l.a.useContext(ue);if(!e)throw new Error("useSettings must be used within a SettingsProvider");return e},Te=function(e){var t=Ne().settings,n=e.data,r=Object(i.useMemo)((function(){return te(n.source.structure,n.filename)}),[n.source.structure,n.filename]),a=Object(J.useAtom)(le),c=Object(d.a)(a,2),o=c[0],l=c[1],s=Object(i.useMemo)((function(){return o.has(r)}),[r,o]),u=Object(i.useCallback)((function(){t.jsonOptimizedTrackIdCopy?navigator.clipboard.writeText('"'.concat(r,'",\n')):navigator.clipboard.writeText(r)}),[r,t.jsonOptimizedTrackIdCopy]);return Object(y.c)("span",{css:Object(f.a)(fe||(fe=Object(b.a)(["\n display: flex;\n justify-content: center;\n "]))),children:[Object(y.b)("div",{css:Object(f.a)(he||(he=Object(b.a)(["\n margin: 0 5px;\n "]))),onClick:u,children:Object(y.b)(T.a,{delay:{show:1e3,hide:100},overlay:Object(y.b)(D.a,{id:"tooltip-copy-track-id",children:"Copy Track ID"}),children:Object(y.b)("i",{css:Object(f.a)(Oe||(Oe=Object(b.a)(["\n cursor: pointer;\n "]))),className:"fa-regular fa-copy"})})}),Object(y.b)("div",{onClick:function(){s?o.delete(r):o.add(r);var e=new Set(o);l(e)},children:Object(y.b)(T.a,{delay:{show:1e3,hide:100},overlay:Object(y.b)(D.a,{id:"tooltip-export",children:s?"Remove from Export Set":"Add to Export Set"}),children:Object(y.b)("i",{css:Object(f.a)(je||(je=Object(b.a)(["\n cursor: pointer;\n color: ",";\n "])),s?"red":"green"),className:"fa-regular ".concat(s?"fa-square-minus":"fa-square-plus")})})})]})},De=function(e){return e?e.startsWith("en")?"en":e.startsWith("ko")?"ko":e.startsWith("ja")?"ja":"zh-CN"===e?"zh-CN":e.startsWith("zh")?"zh-TW":"en":"en"},Ee=function(e){var t=e.dataSource,n=e.disableInitSort,r=e.enableTrackIdCol,a=Object(_.a)().i18n,c=Object(J.useAtomValue)(U),o=Object(i.useRef)(null),l=Object(i.useRef)(null),s=Object(i.useRef)([]),u=Object(i.useRef)(void 0),h=L(),O=Object(J.useSetAtom)(H),j=Object(J.useAtomValue)(q),m=Object(J.useAtomValue)(K),p=Object(J.useSetAtom)(Y),g=Object(J.useSetAtom)($),v=Object(J.useSetAtom)(X);s.current=function(e,t){return[{headerName:"",field:"mark",minWidth:70,maxWidth:70,resizable:!1,cellRendererFramework:N,getQuickFilterText:function(){return""}},{hide:!t,cellRendererFramework:Te,resizable:!1,maxWidth:35},{headerName:"Title",field:"metadata.title",minWidth:250,valueGetter:function(e){var t,n,r,a,c=e.context.i18n,o=e.data,i=De(c.language);return"en"===i?o.metadata.title:null!==(t=null===(n=o.locale)||void 0===n||null===(r=n[i])||void 0===r||null===(a=r.metadata)||void 0===a?void 0:a.title)&&void 0!==t?t:o.metadata.title},cellRendererFramework:F,cellRendererParams:function(t){return{title:t.value,youtube:t.data.youtube,onGridSongChange:e}}},{headerName:"Description",minWidth:375,field:"description",valueGetter:function(e){var t,n,r,a=e.context.i18n,c=e.data,o=De(a.language);return"en"===o?c.description:null!==(t=null===(n=c.locale)||void 0===n||null===(r=n[o])||void 0===r?void 0:r.description)&&void 0!==t?t:c.description}},{headerName:"Folder",field:"source.structure",getQuickFilterText:function(){return""}},{headerName:"Date",field:"source.date",filter:"agDateColumnFilter",valueFormatter:function(e){return e.data.source.date?Object(w.a)(e.data.source.date,"yyyy-MM-dd"):""},cellRendererFramework:Q,getQuickFilterText:function(){return""}},{headerName:"Client",field:"source.clientVersion",getQuickFilterText:function(){return""},cellStyle:G}]}((function(e){v(!0),O({currentSong:e,currentQueue:[],currentQueueSong:-1,repeatQueue:j})}),r),u.current={animateRows:!1,pagination:!0,paginationPageSize:25,suppressColumnVirtualisation:!0,suppressMovableColumns:!0,rowHeight:45,defaultColDef:{sortable:!0,filter:!0,resizable:!0},domLayout:"autoHeight"},Object(i.useEffect)((function(){var e;null===(e=o.current)||void 0===e||e.setQuickFilter(c)}),[c]),Object(i.useEffect)((function(){(null===m||void 0===m?void 0:m.songId)&&C(m.songId)}),[m]);var C=function(e){var t,n,r;if(e){var a=-1,c=[];if(null===(t=o.current)||void 0===t||t.forEachNodeAfterFilterAndSort((function(t,n){t.data.youtube===e&&(a=n,c.push(t))})),-1!==a&&1===c.length){var i=Math.ceil((a+1)/25)-1;null===(n=o.current)||void 0===n||n.paginationGoToPage(i),null===(r=o.current)||void 0===r||r.ensureIndexVisible(a,"middle"),c[0].setSelected(!0),setTimeout((function(){!function(e){var t;if(null!==e){var n=document.querySelector("div.ag-root-wrapper div[row-index='".concat(e,"']")),r=null===n||void 0===n?void 0:n.style.transform;if(r){var a=new RegExp(/^translateY\((\d+)px\)$/g).exec(r);if(a){var c=Object(d.a)(a,2)[1],o=null===(t=document.querySelector("div.ag-root-wrapper"))||void 0===t?void 0:t.offsetTop;if(void 0!==o){var i=o+Number(c);window.scrollTo({top:i,behavior:"smooth"})}}}}}(c[0].rowIndex)}),0)}}},S=Object(i.useCallback)((function(e,t){p(e),g(t)}),[p,g]),x=function(e,t){var n,r=null!==(n=null===e||void 0===e?void 0:e.isAnyFilterPresent())&&void 0!==n&&n,a=[];null===e||void 0===e||e.forEachNodeAfterFilterAndSort((function(e){a.push(e.data)})),t(r,a)};Object(i.useEffect)((function(){x(o.current,S)}),[t,S]);var A={i18n:a};return Object(y.b)("div",{css:Object(f.a)(me||(me=Object(b.a)(["\n margin: auto;\n width: 95vw;\n margin-bottom: 15px;\n "]))),className:h.darkMode?"ag-theme-balham-dark":"ag-theme-balham",children:Object(y.b)(k.AgGridReact,{columnDefs:s.current,rowData:t,gridOptions:u.current,onFirstDataRendered:function(e){e.columnApi.autoSizeAllColumns()},onFilterChanged:function(e){x(e.api,S)},onSortChanged:function(e){x(e.api,S)},onModelUpdated:function(e){e.api.getDisplayedRowCount()>0?e.api.hideOverlay():e.api.showNoRowsOverlay()},onGridReady:function(e){if(o.current=e.api,l.current=e.columnApi,!n){e.columnApi.applyColumnState({state:[{colId:"source.date",sort:"desc"}]})}},reactUi:!0,context:A})})},Fe=n(190),Ie=n.n(Fe),ze=n(308),Qe=n(301),_e=n(191),Re=n(320),We=function(e){var t=Object(i.useRef)(null),n=e.playingState,r=e.setCurrentQueueSong,a=Object(J.useAtomValue)(ie),c=Object(J.useAtom)(X),o=Object(d.a)(c,2),l=o[0],s=o[1];Object(Re.a)("pausevideo",(function(){s(!1)}));return Object(y.c)("div",{children:[Object(y.b)(Ie.a,{css:Object(f.a)(pe||(pe=Object(b.a)(["\n display: block;\n margin-left: auto;\n margin-right: auto;\n max-width: 100vw;\n "]))),ref:t,url:"https://youtu.be/".concat(n.currentSong),playing:l,controls:!0,onPlay:function(){return s(!0)},onPause:function(){return s(!1)},onEnded:function(){if(null!==t.current)if(n.currentQueue.length){var e;if(gtag("event","ce_complete_queue_video",{ce_category:"video",ce_youtube:n.currentSong,ce_playlist_name:a}),n.currentQueueSong===n.currentQueue.length-1){if(!n.repeatQueue)return;e=0}else e=n.currentQueueSong+1;r(e)}else t.current.seekTo(0),gtag("event","ce_loop_embedded_video",{ce_category:"video",ce_youtube:n.currentSong})}}),n.currentQueue.length>0&&Object(y.b)("div",{className:"text-center",css:Object(f.a)(ge||(ge=Object(b.a)(["\n margin-top: 5px;\n "]))),children:Object(y.c)(Qe.a,{size:"sm",children:[Object(y.b)(_e.a,{variant:"outline-primary",onClick:function(){n.currentQueueSong<1||r(n.currentQueueSong-1)},disabled:0===n.currentQueueSong,children:Object(y.b)("i",{className:"fa fa-step-backward"})}),Object(y.b)("span",{css:Object(f.a)(ve||(ve=Object(b.a)(["\n background-color: #343a40;\n border-color: #343a40;\n color: white;\n padding: 0.25rem 0.5rem;\n font-size: 0.875rem;\n line-height: 1.5;\n border: 1px solid transparent;\n margin-left: -1px;\n "]))),children:"".concat(Object(ze.a)((n.currentQueueSong+1).toString(),n.currentQueue.length.toString().length,"0")," | ").concat(n.currentQueue.length)}),Object(y.b)(_e.a,{variant:"outline-primary",onClick:function(){n.currentQueueSong!==n.currentQueue.length-1&&r(n.currentQueueSong+1)},disabled:n.currentQueueSong+1===n.currentQueue.length,children:Object(y.b)("i",{className:"fa fa-step-forward"})})]})})]})},Le=function(e){var t=e.noText;return Object(y.c)(i.Fragment,{children:[Object(y.b)("div",{children:Object(y.b)("img",{css:Object(f.a)(ye||(ye=Object(b.a)(["\n display: block;\n margin-left: auto;\n margin-right: auto;\n margin-bottom: 10px;\n "]))),id:"header-logo",src:"assets/pink-bean.png",alt:"header logo"})}),t?null:Object(y.b)("div",{children:Object(y.b)("p",{children:"Welcome to the MapleStory Music database. This site provides a complete listing of the background music (BGM) used in MapleStory. Collectively, the songs are also known as MapleStory's original soundtrack (OST)."})})]})},Pe=n(310),Ge=n(302),Je=n(74),Ve=function(e){var t=e.iconClass,n=e.actionName,r=e.onClick,a=e.active;return Object(y.b)(Je.a.Item,{onClick:r,active:a,children:Object(y.c)("span",{children:[Object(y.b)("i",{className:t,css:Object(f.a)(Ce||(Ce=Object(b.a)(["\n width: 24px;\n "])))}),n]})})},Ue=n(314),Ke=function(){var e=Object(J.useSetAtom)(U),t=Object(J.useSetAtom)(K),n=Object(J.useAtom)(q),r=Object(d.a)(n,2),a=r[0],c=r[1],o=Object(J.useAtom)(H),i=Object(d.a)(o,2),l=i[0],s=i[1],u=Object(J.useAtomValue)($),h=Object(J.useAtomValue)(Y),O=Object(J.useAtomValue)(ie),j=Object(J.useSetAtom)(X);return Object(y.b)(Pe.a.Group,{css:Object(f.a)(Se||(Se=Object(b.a)(["\n margin: 10px 14vw;\n "]))),className:"filter-text",children:Object(y.c)(Ge.a,{size:"lg",children:[Object(y.b)(T.a,{delay:{show:250,hide:100},overlay:Object(y.b)(D.a,{id:"tooltip-locate-song",children:"Locate Current Song"}),children:Object(y.b)(Ge.a.Text,{css:Object(f.a)(ke||(ke=Object(b.a)(["\n cursor: pointer;\n "]))),onClick:function(){t({songId:l.currentSong})},children:Object(y.b)("i",{className:"fa fa-search"})})}),Object(y.b)(Pe.a.Control,{type:"search",placeholder:"Song title or keyword",onChange:function(t){e(t.target.value)},onKeyPress:function(e){"Enter"===e.key&&document.activeElement&&document.activeElement.blur()}}),Object(y.c)(Je.a,{children:[Object(y.b)(T.a,{delay:{show:250,hide:100},overlay:Object(y.b)(D.a,{id:"tooltip-queue-actions",children:h?"Queue Actions (Filtered)":"Queue Actions"}),children:Object(y.b)(Je.a.Toggle,{variant:h?"outline-warning":"outline-success",id:"dropdown-queue-actions",children:Object(y.b)("i",{className:"fa fa-play"})})}),Object(y.c)(Je.a.Menu,{children:[Object(y.b)(Ve,{actionName:"Start Queue",iconClass:"fa fa-play",onClick:function(){var e=u.filter((function(e){return""!==e.youtube}));e.length&&(j(!0),s({currentSong:e[0].youtube,currentQueue:e,currentQueueSong:0,repeatQueue:a}),gtag("event","ce_start_queue",{ce_category:"queue",ce_source:"play_button",ce_filtered:h,ce_playlist_name:O}))}}),Object(y.b)(Ve,{actionName:"Start Shuffled Queue",iconClass:"fa fa-random",onClick:function(){var e=Object(Ue.a)(u.filter((function(e){return""!==e.youtube})));e.length&&(j(!0),s({currentSong:e[0].youtube,currentQueue:e,currentQueueSong:0,repeatQueue:a}),gtag("event","ce_start_shuffled_queue",{ce_category:"queue",ce_source:"shuffle_button",ce_filtered:h,ce_playlist_name:O}))}}),Object(y.b)(Je.a.Divider,{}),Object(y.b)(Ve,{actionName:a?"Turn Off Queue Repeat":"Turn On Queue Repeat",iconClass:"fa fa-repeat",onClick:function(){var e=!a;c(e),j(!0),s((function(t){return Object(S.a)(Object(S.a)({},t),{},{repeatQueue:e})}))},active:a})]})]})]})})},qe=l.a.createContext(void 0),He=function(e,t,n,r){if(r&&"KMST"===e&&null!==n&&n>=A){var a=t.split("."),c=Object(d.a)(a,3),o=c[0],i=c[1],l=c[2];return"".concat(e," ").concat(o,".").concat(i,".1").concat(l)}return"".concat(e," ").concat(t)},Ye=function(e){var t=e.children,n=l.a.useState([]),r=Object(d.a)(n,2),a=r[0],c=r[1],o=Object(J.useSetAtom)(ce),s=Ne().settings;return Object(i.useEffect)((function(){fetch("https://raw.githubusercontent.com/maplestory-music/maplebgm-db/prod/bgm.min.json").then((function(e){return e.json()})).then((function(e){var t=e.filter((function(e){var t,n;return!s.hideMinorTracks||(null===(t=!(null===(n=e.decoration)||void 0===n?void 0:n.minorTrack))||void 0===t||t)})).map((function(e){var t=e.source.date?Object(x.a)(e.source.date):null,n={client:e.source.client,date:t,structure:e.source.structure,version:e.source.version,clientVersion:e.source.client&&e.source.version?He(e.source.client,e.source.version,t,s.distinctKmstVersion):""};return Object.assign({},e,{source:n})}));c(t)})),fetch("https://raw.githubusercontent.com/maplestory-music/maplebgm-db/prod/playlist.min.json").then((function(e){return e.json()})).then((function(e){o(ae(e))}))}),[c,s.hideMinorTracks,s.distinctKmstVersion,o]),Object(M.jsx)(qe.Provider,{value:a,children:t})},$e=function(){var e=l.a.useContext(qe);if(!e)throw new Error("useDataSourceState must be used within a DataSourceProvider");return e},Xe=function(){var e=$e(),t=Object(J.useAtom)(H),n=Object(d.a)(t,2),r=n[0],a=n[1],c=Object(J.useSetAtom)(X);Object(i.useEffect)((function(){a(V)}),[a]);return Object(y.c)("div",{children:[void 0===r.currentSong?Object(y.b)(Le,{}):Object(y.b)(We,{playingState:r,setCurrentQueueSong:function(e){c(!0),a((function(t){return Object(S.a)(Object(S.a)({},t),{},{currentSong:t.currentQueue[e].youtube,currentQueueSong:e})}))}}),Object(y.b)(Ke,{}),Object(y.b)(Ee,{dataSource:e})]})},Ze=n(318),et=n(319),tt=n(304),nt=n(303),rt=n(195),at=n.n(rt),ct=n(196),ot=n.n(ct),it={colors:["#8087E8","#A3EDBA","#F19E53","#6699A1","#E1D369","#87B4E7","#DA6D85","#BBBAC5"],chart:{backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"#1f1836"],[1,"#45445d"]]},style:{fontFamily:"IBM Plex Sans, sans-serif"}},title:{style:{fontSize:"22px",fontWeight:"500",color:"#fff"}},subtitle:{style:{fontSize:"16px",fontWeight:"400",color:"#fff"}},credits:{style:{color:"#f0f0f0"}},caption:{style:{color:"#f0f0f0"}},tooltip:{borderWidth:0,backgroundColor:"#000000",style:{color:"#f0f0f0"},shadow:!0},legend:{backgroundColor:"transparent",itemStyle:{fontWeight:"400",fontSize:"12px",color:"#fff"},itemHoverStyle:{fontWeight:"700",color:"#fff"}},labels:{style:{color:"#707073"}},plotOptions:{series:{dataLabels:{color:"#46465C",style:{fontSize:"13px"}},marker:{lineColor:"#333"}},boxplot:{fillColor:"#505053"},candlestick:{lineColor:null,upColor:"#DA6D85",upLineColor:"#DA6D85"},errorbar:{color:"white"},dumbbell:{lowColor:"#f0f0f0"},map:{borderColor:"rgba(200, 200, 200, 1)",nullColor:"#78758C"}},drilldown:{activeAxisLabelStyle:{color:"#F0F0F3"},activeDataLabelStyle:{color:"#F0F0F3"},drillUpButton:{theme:{fill:"#fff"}}},xAxis:{gridLineColor:"#707073",labels:{style:{color:"#fff",fontSize:"12px"}},lineColor:"#707073",minorGridLineColor:"#505053",tickColor:"#707073",title:{style:{color:"#fff"}}},yAxis:{gridLineColor:"#707073",labels:{style:{color:"#fff",fontSize:"12px"}},lineColor:"#707073",minorGridLineColor:"#505053",tickColor:"#707073",tickWidth:1,title:{style:{color:"#fff",fontWeight:"300"}}},mapNavigation:{enabled:!0,buttonOptions:{theme:{fill:"#46465C","stroke-width":1,stroke:"#BBBAC5",r:2,style:{color:"#fff"},states:{hover:{fill:"#000","stroke-width":1,stroke:"#f0f0f0",style:{color:"#fff"}},select:{fill:"#000","stroke-width":1,stroke:"#f0f0f0",style:{color:"#fff"}}}},verticalAlign:"bottom"}},rangeSelector:{buttonTheme:{fill:"#46465C",stroke:"#BBBAC5","stroke-width":1,style:{color:"#fff"},states:{hover:{fill:"#1f1836",style:{color:"#fff"},"stroke-width":1,stroke:"white"},select:{fill:"#1f1836",style:{color:"#fff"},"stroke-width":1,stroke:"white"}}},inputBoxBorderColor:"#BBBAC5",inputStyle:{backgroundColor:"#2F2B38",color:"#fff"},labelStyle:{color:"#fff"}},navigator:{handles:{backgroundColor:"#BBBAC5",borderColor:"#2F2B38"},outlineColor:"#CCC",maskFill:"rgba(255,255,255,0.1)",series:{color:"#A3EDBA",lineColor:"#A3EDBA"},xAxis:{gridLineColor:"#505053"}},scrollbar:{barBackgroundColor:"#BBBAC5",barBorderColor:"#808083",buttonArrowColor:"#2F2B38",buttonBackgroundColor:"#BBBAC5",buttonBorderColor:"#2F2B38",rifleColor:"#2F2B38",trackBackgroundColor:"#78758C",trackBorderColor:"#2F2B38"}},lt={colors:["#8087E8","#A3EDBA","#F19E53","#6699A1","#E1D369","#87B4E7","#DA6D85","#BBBAC5"],chart:{backgroundColor:"#f0f0f0",style:{fontFamily:"IBM Plex Sans, sans-serif"}},title:{style:{fontSize:"22px",fontWeight:"500",color:"#2F2B38"}},subtitle:{style:{fontSize:"16px",fontWeight:"400",color:"#2F2B38"}},tooltip:{borderWidth:0,backgroundColor:"#46465C",style:{color:"#f0f0f0"},shadow:!0},legend:{backgroundColor:"#f0f0f0",borderColor:"#BBBAC5",borderWidth:1,borderRadius:2,itemStyle:{fontWeight:"400",fontSize:"12px",color:"#2F2B38"},itemHoverStyle:{fontWeight:"700",color:"#46465C"}},navigation:{buttonOptions:{symbolStroke:"#2F2B38",theme:{fill:"#fff",states:{hover:{stroke:"#46465C",fill:"#fff"},select:{stroke:"#46465C",fill:"#fff"}}}}},labels:{style:{color:"#46465C"}},credits:{style:{color:"#46465C"}},drilldown:{activeAxisLabelStyle:{color:"#2F2B38"},activeDataLabelStyle:{color:"#2F2B38"},drillUpButton:{theme:{fill:"#2F2B38",style:{color:"#fff"}}}},xAxis:{gridLineColor:"#ccc",labels:{style:{color:"#46465C",fontSize:"12px"}},lineColor:"#ccc",minorGridLineColor:"#ebebeb",tickColor:"#ccc",title:{style:{color:"#2F2B38"}}},yAxis:{gridLineColor:"#ccc",labels:{style:{color:"#46465C",fontSize:"12px"}},lineColor:"#ccc",minorGridLineColor:"#ebebeb",tickColor:"#ccc",tickWidth:1,title:{style:{color:"#2F2B38",fontWeight:"300"}}},rangeSelector:{buttonTheme:{fill:"#fff",style:{color:"#46465C",stroke:"transparent"},states:{hover:{fill:"#fff",style:{color:"#46465C"},"stroke-width":1,stroke:"#46465C"},select:{fill:"#fff",style:{color:"#46465C"},"stroke-width":1,stroke:"#46465C"}}},inputBoxBorderColor:"#BBBAC5",inputStyle:{backgroundColor:"#fff",color:"#46465C"},labelStyle:{color:"#46465C"}},scrollbar:{barBackgroundColor:"#BBBAC5",barBorderColor:"#808083",buttonArrowColor:"#fff",buttonBackgroundColor:"#BBBAC5",buttonBorderColor:"#46465C",rifleColor:"#FFF",trackBackgroundColor:"#dedede",trackBorderColor:"#BBBAC5"},plotOptions:{series:{borderWidth:1,borderColor:"#BBBAC5",dataLabels:{color:"#46465C",style:{fontSize:"13px"}},marker:{lineColor:"#46465C"}},boxplot:{fillColor:"#505053"},candlestick:{lineColor:null,upColor:"#DA6D85",upLineColor:"#DA6D85"},errorbar:{color:"white"},map:{borderColor:"rgba(200, 200, 200, 0.3)",nullColor:"rgba(200, 200, 200, 0.3)"}}},st=function(e){var t=L();return Object(i.useEffect)((function(){var n,r,a=t.darkMode?it:lt,c=Object(S.a)(Object(S.a)({},e.options),a);null===(n=e.chartComponent.current)||void 0===n||null===(r=n.chart)||void 0===r||r.update(c)}),[e.chartComponent,e.options,t]),Object(y.b)("div",{css:[Object(f.a)(we||(we=Object(b.a)(["\n display: inline-block;\n margin: 10px;\n @media (max-width: 1024px) {\n width: 100%;\n }\n "]))),e.styles],children:Object(y.b)(ot.a,{containerProps:{className:"react-highcharts-container",style:{width:"100%",height:"100%"}},highcharts:at.a,options:e.options,ref:e.chartComponent})})},ut=function(e,t){var n=Date.now(),r=Object(nt.a)(n)+1;return t===Object(tt.a)(n)?e.slice(0,1===r?r+1:r):e},bt=function(e){var t=Object(i.useRef)(null),n=$e(),r=e.selectedYear,a=n.reduce((function(e,t){return t.metadata.year===r.toString()&&t.source.date&&e[Object(nt.a)(t.source.date)]++,e}),new Array(12).fill(0)),c=a.reduce((function(e,t,n){return 0===n?e[0]=t:e[n]=e[n-1]+t,e}),new Array(12).fill(0)),o={chart:{type:"line"},title:{text:"Song frequency per month"},xAxis:{type:"datetime"},yAxis:[{title:{text:"Songs"},allowDecimals:!1},{title:{text:"Cumulative"},allowDecimals:!1,opposite:!0}],series:[{name:"Songs",type:"line",yAxis:0,pointStart:Date.UTC(r,0,1),pointIntervalUnit:"month",data:ut(a,r)},{name:"Cumulative",type:"line",yAxis:1,pointStart:Date.UTC(r,0,1),pointIntervalUnit:"month",data:ut(c,r)}]};return Object(y.b)(st,{styles:Object(f.a)(xe||(xe=Object(b.a)(["\n width: 55vw;\n flex: 2;\n "]))),options:o,chartComponent:t})},dt=function(e){var t=Object(i.useRef)(null),n=$e(),r=e.selectedYear,a=n.filter((function(e){var t;return(null===(t=e.source.date)||void 0===t?void 0:t.getFullYear())===r&&e.source.client})),c=function(e){return a.filter((function(t){var n;return null===(n=t.source.client)||void 0===n?void 0:n.includes(e)})).length},l=c(o.Korea),s=a.length-l,u={chart:{type:"pie"},title:{text:"Distribution of song region"},series:[{id:"domesticVsOverseas",name:"Total Songs",type:"pie",data:[{name:"Domestic",color:B,y:l},{name:"Overseas",color:Object(P.a)(B),y:s}],size:"70%",dataLabels:{enabled:!1}},{id:"regional",name:"Songs",type:"pie",data:[{name:"Korea",color:B,y:l},{name:"Japan",y:c(o.Japan)},{name:"China",y:c(o.China)},{name:"Taiwan",y:c(o.Taiwan)},{name:"Thailand",y:c(o.Thailand)},{name:"SEA",y:c(o.SEA)},{name:"Global",y:c(o.Global)},{name:"Brazil",y:c(o.Brazil)}],size:"100%",innerSize:"70%",dataLabels:{formatter:function(e){if(this.y)return this.key}}}]};return Object(y.b)(st,{styles:Object(f.a)(Ae||(Ae=Object(b.a)(["\n width: 35vw;\n flex: 1;\n "]))),options:u,chartComponent:t})},ft=n(16),ht=n(315),Ot=function(){var e=L(),t=$e(),n=Object(i.useRef)(null),r=Object(i.useRef)(null),a=Object(i.useRef)([{headerName:"",field:"mark",minWidth:70,maxWidth:70,resizable:!1,cellRendererFramework:N},{headerName:"Folder",field:"folderName"},{headerName:"Creation",field:"creation",initialWidth:145,cellRendererFramework:Q,cellRendererParams:{disableRecentTrack:!0},filter:"agDateColumnFilter",valueFormatter:function(e){return Number.isNaN(e.data.creation.valueOf())?"":Object(w.a)(e.data.creation,"yyyy-MM-dd")}},{headerName:"Creation Client",field:"creationClient",initialWidth:125,cellStyle:G},{headerName:"Last Update",field:"lastUpdate",initialWidth:145,cellRendererFramework:Q,cellRendererParams:{disableRecentTrack:!0},filter:"agDateColumnFilter",valueFormatter:function(e){return Number.isNaN(e.data.lastUpdate.valueOf())?"":Object(w.a)(e.data.lastUpdate,"yyyy-MM-dd")}},{headerName:"Last Update Client",field:"lastUpdateClient",initialWidth:140,cellStyle:G},{headerName:"Track Count",field:"trackCount",initialWidth:110}]),c=Object(i.useRef)({animateRows:!1,pagination:!0,paginationPageSize:10,suppressColumnVirtualisation:!0,suppressMovableColumns:!0,rowHeight:45,defaultColDef:{sortable:!0,filter:!0,resizable:!0},domLayout:"autoHeight"}),o=Object(i.useMemo)((function(){var e,n=new Map,r=Object(Z.a)(t);try{for(r.s();!(e=r.n()).done;){var a=e.value,c=a.source.structure,o=n.get(c);o?n.set(c,[].concat(Object(ft.a)(o),[a])):n.set(c,[a])}}catch(i){r.e(i)}finally{r.f()}return Array.from(n.entries()).reduce((function(e,t){var n=Object(d.a)(t,2),r=n[0],a=n[1],c=a.map((function(e){var t,n;return{date:null!==(t=null===(n=e.source.date)||void 0===n?void 0:n.valueOf())&&void 0!==t?t:Number.NaN,clientVersion:e.source.clientVersion}})).sort((function(e,t){return e.date-t.date})),o=Object.entries(Object(ht.a)(a.map((function(e){return e.mark})))).sort((function(e,t){return t[1]-e[1]})),i=c[0],l=c[c.length-1],s={folderName:r,trackCount:a.length,mark:o[0][0],creation:new Date(i.date),creationClient:i.clientVersion,lastUpdate:new Date(l.date),lastUpdateClient:l.clientVersion};return e.push(s),e}),[])}),[t]);return Object(M.jsx)("div",{className:e.darkMode?"ag-theme-balham-dark":"ag-theme-balham",children:Object(M.jsx)(k.AgGridReact,{columnDefs:a.current,rowData:o,gridOptions:c.current,onGridReady:function(e){n.current=e.api,r.current=e.columnApi;e.columnApi.applyColumnState({state:[{colId:"lastUpdate",sort:"desc"}]})},reactUi:!0})})},jt=n(197),mt=["KMS","JMS","CMS","TMS","MSEA","GMS","ThMS","BMS"];function pt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US",t=new Intl.DateTimeFormat(e,{month:"long"}).format;return Object(ft.a)(Array(12).keys()).map((function(e){return t(new Date(Date.UTC(2003,(e+1)%12)))}))}var gt,vt,yt,Ct,St,kt,wt,xt,At,Bt,Mt,Nt,Tt,Dt,Et,Ft,It,zt,Qt,_t,Rt,Wt,Lt,Pt,Gt,Jt,Vt,Ut,Kt=function(){var e=Object(_.a)().i18n,t=Object(i.useRef)(null),n=$e(),r=Object(i.useMemo)((function(){return n.reduce((function(e,t){var n,r=function(e){if(!e)return"None";var t,n=Object(Z.a)(mt);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(e.includes(r))return r}}catch(a){n.e(a)}finally{n.f()}return"None"}(t.source.client),a=Object(nt.a)(null!==(n=t.source.date)&&void 0!==n?n:0),c=Object(jt.a)(e,r);return c&&(c[a]+=1),e}),{KMS:new Array(12).fill(0),JMS:new Array(12).fill(0),CMS:new Array(12).fill(0),TMS:new Array(12).fill(0),MSEA:new Array(12).fill(0),GMS:new Array(12).fill(0),ThMS:new Array(12).fill(0),BMS:new Array(12).fill(0)})}),[n]),a={chart:{type:"area"},title:{text:"Song frequency per month (all years)"},xAxis:{categories:pt(e.language)},yAxis:[{title:{text:"Songs"},allowDecimals:!1}],tooltip:{shared:!0},plotOptions:{area:{stacking:"normal"}},series:mt.map((function(e){return{name:e,type:"area",yAxis:0,visible:e===o.Korea||e===o.Japan||e===o.China,data:Object(jt.a)(r,e)}}))};return Object(y.b)(st,{styles:Object(f.a)(Be||(Be=Object(b.a)(["\n width: 55vw;\n flex: 2;\n "]))),options:a,chartComponent:t})},qt=function(){var e=Object(tt.a)(new Date),t=Object(i.useState)(e),n=Object(d.a)(t,2),r=n[0],a=n[1],c=Array(Object(tt.a)(new Date)-2003+1).fill(0).map((function(e,t){return 2003+t}));return Object(y.c)("div",{children:[Object(y.b)("h2",{children:"Stats"}),Object(y.c)(Ze.a,{defaultActiveKey:"yearly",children:[Object(y.c)(et.a,{eventKey:"yearly",title:"Yearly",children:[Object(y.b)(Pe.a,{css:Object(f.a)(gt||(gt=Object(b.a)(["\n margin-top: 10px;\n "]))),children:Object(y.b)(Pe.a.Group,{controlId:"year-select",children:Object(y.b)(Pe.a.Select,{css:Object(f.a)(vt||(vt=Object(b.a)(["\n width: 100px;\n "]))),defaultValue:e,onChange:function(e){e.target.value&&a(+e.target.value)},children:c.map((function(e){return Object(y.b)("option",{value:e,children:e},e)}))})})}),Object(y.c)("div",{css:Object(f.a)(yt||(yt=Object(b.a)(["\n display: flex;\n align-items: center;\n flex-direction: row;\n flex-wrap: wrap;\n "]))),children:[Object(y.b)(bt,{selectedYear:r}),Object(y.b)(dt,{selectedYear:r})]})]}),Object(y.b)(et.a,{eventKey:"overview",title:"Overview",children:Object(y.b)(y.a,{children:Object(y.b)(Kt,{})})})]}),Object(y.b)("div",{children:Object(y.b)(Ot,{})})]})},Ht=n(306),Yt=n(313),$t=function(e){var t=e.id,n=e.label,r=e.checked,a=e.tooltip,c=e.onChange;return Object(y.c)("div",{css:Object(f.a)(Ct||(Ct=Object(b.a)(["\n display: flex;\n align-items: center;\n "]))),children:[Object(y.b)(Pe.a.Check,{type:"switch",id:"".concat(t,"-switch"),label:n,checked:r,onChange:c}),Object(y.b)(T.a,{delay:{show:250,hide:100},placement:"right",overlay:Object(y.b)(D.a,{id:"tooltip-".concat(t),children:a}),children:Object(y.b)("i",{css:Object(f.a)(St||(St=Object(b.a)(["\n margin: 0 4px;\n "]))),className:"fa fa-question-circle","aria-hidden":!0})})]})},Xt=function(e){var t=e.show,n=e.onModalClose,r=Ne(),a=r.settings,c=r.setSettings,o=Object(i.useState)(a.hideMinorTracks),l=Object(d.a)(o,2),s=l[0],u=l[1],h=Object(i.useState)(a.distinctKmstVersion),O=Object(d.a)(h,2),j=O[0],m=O[1],p=Object(i.useState)(a.jsonOptimizedTrackIdCopy),g=Object(d.a)(p,2),v=g[0],C=g[1];return Object(y.c)(Yt.a,{show:t,onShow:function(){u(a.hideMinorTracks),m(a.distinctKmstVersion),C(a.jsonOptimizedTrackIdCopy)},onHide:n,children:[Object(y.b)(Yt.a.Header,{closeButton:!0,children:Object(y.b)(Yt.a.Title,{children:"Settings"})}),Object(y.b)(Yt.a.Body,{children:Object(y.b)(Pe.a,{children:Object(y.b)(y.a,{children:Object(y.c)("div",{css:Object(f.a)(kt||(kt=Object(b.a)(["\n display: flex;\n flex-direction: column;\n "]))),children:[Object(y.b)($t,{id:"minorTrack",label:"Hide Minor Tracks",checked:s,tooltip:"Minor tracks feature segments of another song",onChange:function(){u((function(e){return!e}))}}),Object(y.b)($t,{id:"distinctKmstVersion",label:"Distinct KMST Version",checked:j,tooltip:"Prevent collisions resulting from KMST version reset",onChange:function(){m((function(e){return!e}))}}),Object(y.b)($t,{id:"jsonOptimizedTrackIdCopy",label:"JSON Optimized Track ID Copy",checked:v,tooltip:"Wrap track ID in JSON compatible syntax",onChange:function(){C((function(e){return!e}))}})]})})})}),Object(y.b)(Yt.a.Footer,{children:Object(y.b)(_e.a,{variant:"primary",onClick:function(){c({hideMinorTracks:s,distinctKmstVersion:j,jsonOptimizedTrackIdCopy:v}),n()},children:"Save"})})]})},Zt=function(e){var t=e.theme,n=e.margin,r="light"===t?"fa fa-sun":"fa fa-moon";return Object(y.b)("i",{className:r,css:Object(f.a)(wt||(wt=Object(b.a)(["\n width: 16px;\n height: 16px;\n text-align: center;\n margin-right: ",";\n "])),n?"5px":void 0)})},en=n(199),tn=n(309),nn=function(){var e=L(),t=$e(),n=Object(i.useState)(t),r=Object(d.a)(n,2),a=r[0],c=r[1],o=Object(J.useAtomValue)(ce),l=Object(i.useMemo)((function(){return function(){var e=localStorage.getItem(ee);if(e){var t=JSON.parse(e);return ae(t)}return new Map}()}),[]),s=Object(J.useAtom)(H),u=Object(d.a)(s,2),h=u[0],O=u[1],j=Object(J.useSetAtom)(X),m=Object(i.useRef)(null),p=Object(i.useState)([]),g=Object(d.a)(p,2),v=g[0],C=g[1],k=Object(i.useMemo)((function(){return Array.from(o.values()).map((function(e){return{value:e.name,label:e.name}}))}),[o]),w=Object(i.useMemo)((function(){return Array.from(l.values()).map((function(e){return{value:e.name,label:"[Custom] ".concat(e.name),custom:!0}}))}),[l]),x=Object(i.useMemo)((function(){return[].concat(Object(ft.a)(k),Object(ft.a)(w))}),[k,w]),A=Object(J.useSetAtom)(oe),B=Object(J.useAtom)(le),M=Object(d.a)(B,2),N=M[0],T=M[1];Object(i.useEffect)((function(){O(V)}),[O]),Object(i.useEffect)((function(){if(t.length)if(v&&v.length){var e,n=new Set,r=Object(Z.a)(v);try{for(r.s();!(e=r.n()).done;){var a=e.value,i=(a.custom?l:o).get(a.value);if(!i)return;i.tracks.forEach((function(e){return n.add(e)}))}}catch(d){r.e(d)}finally{r.f()}var s=Array.from(n),u=t.filter((function(e){var t=te(e.source.structure,e.filename);return n.has(t)})),b=Object(tn.a)(u,(function(e){var t=te(e.source.structure,e.filename);return s.indexOf(t)}));c(b)}else c(t)}),[t,o,l,v]);return Object(y.c)("div",{children:[void 0===h.currentSong?Object(y.b)(Le,{noText:!0}):Object(y.b)(We,{playingState:h,setCurrentQueueSong:function(e){j(!0),O((function(t){return Object(S.a)(Object(S.a)({},t),{},{currentSong:t.currentQueue[e].youtube,currentQueueSong:e})}))}}),Object(y.c)("div",{css:Object(f.a)(xt||(xt=Object(b.a)(["\n display: flex;\n margin: 10px 25vw;\n justify-content: center;\n align-items: center;\n height: 46px;\n "]))),children:[Object(y.b)(en.a,{css:Object(f.a)(At||(At=Object(b.a)(["\n width: 100%;\n "]))),classNamePrefix:e.darkMode?"playlist-select-dark":"playlist-select",isMulti:!0,options:x,ref:m,value:v,onChange:function(e){C(e),A(e.map((function(e){return e.value})))},placeholder:"Select playlist"}),Object(y.c)(Je.a,{css:Object(f.a)(Bt||(Bt=Object(b.a)(["\n height: 100%;\n "]))),children:[Object(y.b)(Je.a.Toggle,{css:Object(f.a)(Mt||(Mt=Object(b.a)(["\n height: 100%;\n "]))),variant:"outline-primary",children:Object(y.b)("i",{className:"fa fa-cog"})}),Object(y.c)(Je.a.Menu,{children:[Object(y.b)(Ve,{actionName:"Copy Export Set",iconClass:"fa fa-copy",onClick:function(){var e=Array.from(N),t=JSON.stringify(e,null,2);navigator.clipboard.writeText(t)}}),Object(y.b)(Ve,{actionName:"Clear Export Set",iconClass:"fa fa-trash",onClick:function(){T(new Set)}})]})]})]}),Object(y.b)(Ke,{}),Object(y.b)(Ee,{dataSource:a,disableInitSort:!0,enableTrackIdCol:!0})]})},rn=new FileReader,an=function(){var e=Object(i.useState)(void 0),t=Object(d.a)(e,2),n=t[0],r=t[1],a=Object(i.useState)(""),c=Object(d.a)(a,2),o=c[0],l=c[1];return Object(i.useEffect)((function(){rn.onload=function(){var e=rn.result;if("string"===typeof e)try{var t=JSON.parse(e);if(null===t||void 0===t?void 0:t.length){var n,r=Object(Z.a)(t);try{for(r.s();!(n=r.n()).done;){var a=n.value;if(!re(a))return void l("Incorrect JSON structure")}}catch(c){r.e(c)}finally{r.f()}ne(t)}else{if(!re(t))return void l("Incorrect JSON structure");ne([t])}}catch(o){l("Cannot parse JSON")}else l("File content not string")}}),[]),Object(y.c)("div",{children:[Object(y.c)("div",{css:Object(f.a)(Nt||(Nt=Object(b.a)(["\n @media (min-width: 1024px) {\n margin-right: 33vw;\n }\n "]))),children:[Object(y.b)("h2",{children:"Playlist Builder"}),Object(y.c)("p",{children:["Import and export custom playlists. JSON structure can be found"," ",Object(y.b)("a",{href:"https://github.com/maplestory-music/maplebgm-db/blob/master/playlist/blockbuster/BlackHeaven.jsonc",target:"_blank",rel:"noreferrer",children:"here"}),"; track IDs may be copied from the Playlist page. Tracks can also be added to and removed from the Export Set on the Playlist page. The Export Set can be copied and cleared from the Playlist Settings dropdown."]}),Object(y.b)("p",{css:Object(f.a)(Tt||(Tt=Object(b.a)(["\n color: red;\n "]))),children:"All custom playlists are stored in the browser's localStorage and may be cleared without notice. Export frequently and use at your own risk."})]}),Object(y.c)("div",{css:Object(f.a)(Dt||(Dt=Object(b.a)(["\n margin: 10px 0;\n "]))),children:[Object(y.b)("h4",{children:"Import"}),Object(y.b)("div",{css:Object(f.a)(Et||(Et=Object(b.a)(["\n margin: 10px 0;\n "]))),children:Object(y.c)("span",{children:["Import custom playlists from a JSON file."," ",Object(y.b)("span",{css:Object(f.a)(Ft||(Ft=Object(b.a)(["\n color: red;\n "]))),children:"This will overwrite existing custom playlists."})]})}),Object(y.c)("div",{children:[Object(y.b)("input",{type:"file",accept:".json",onChange:function(e){e.target.files&&e.target.files.length&&r(e.target.files[0])},onClick:function(){l("")}}),Object(y.b)("button",{onClick:function(){n&&("application/json"===n.type?rn.readAsText(n):l("File type not JSON"))},children:"Import"}),o&&Object(y.c)("div",{css:Object(f.a)(It||(It=Object(b.a)(["\n color: red;\n "]))),children:["Error: ",o]})]})]}),Object(y.c)("div",{css:Object(f.a)(zt||(zt=Object(b.a)(["\n margin: 20px 0;\n "]))),children:[Object(y.b)("h4",{children:"Export"}),Object(y.b)("div",{css:Object(f.a)(Qt||(Qt=Object(b.a)(["\n margin: 10px 0;\n "]))),children:Object(y.b)("span",{children:"Export all custom playlists into a JSON file."})}),Object(y.b)("div",{children:Object(y.b)("button",{onClick:function(){var e=null,t=function(){var e=localStorage.getItem(ee);if(e)try{return JSON.parse(e)}catch(t){throw new Error("Error parsing JSON from localStorage")}return[]}(),n=JSON.stringify(t,null,2);if(n&&t.length){var r=document.createElement("a");r.setAttribute("download","maplestory-custom-playlists.json"),r.href=function(){var t=new Blob([n],{type:"application/json"});return null!==e&&window.URL.revokeObjectURL(e),e=window.URL.createObjectURL(t)}(),r.click()}else window.alert("Nothing to export")},children:"Export"})})]}),Object(y.c)("div",{css:Object(f.a)(_t||(_t=Object(b.a)(["\n margin: 20px 0;\n "]))),children:[Object(y.b)("h4",{children:"Reset"}),Object(y.b)("div",{css:Object(f.a)(Rt||(Rt=Object(b.a)(["\n margin: 10px 0;\n "]))),children:Object(y.b)("span",{children:"If there are any issues, you can wipe all custom playlists."})}),Object(y.b)("div",{children:Object(y.b)("button",{onClick:function(){window.confirm("Wipe all custom playlists?")&&localStorage.removeItem(ee)},children:"Wipe"})})]})]})},cn=Object(j.a)(),on=function(e){e.currentTarget.pathname===window.location.pathname&&e.preventDefault()},ln=function(){var e,t,n,r=Object(_.a)().i18n,a=L(),c=Object(i.useState)(!1),o=Object(d.a)(c,2),l=o[0],s=o[1];return Object(y.c)(y.a,{children:[Object(y.c)(m.a,{css:Object(f.a)(Wt||(Wt=Object(b.a)(["\n margin-bottom: 10px;\n "]))),bg:"dark",variant:"dark",expand:"lg",children:[Object(y.c)(m.a.Brand,{css:Object(f.a)(Lt||(Lt=Object(b.a)(["\n margin-left: 1rem;\n "]))),as:h.a,to:"/",onClick:on,children:[Object(y.b)("img",{css:Object(f.a)(Pt||(Pt=Object(b.a)(["\n margin-right: 8px;\n "]))),alt:"",src:"./assets/pb-logo.svg",width:"30",height:"30",className:"d-inline-block align-top"})," ","MapleStory Music"]}),Object(y.b)(m.a.Toggle,{"aria-controls":"basic-navbar-nav"}),Object(y.b)(m.a.Collapse,{id:"basic-navbar-nav",children:Object(y.c)(p.a,{className:"mr-auto",children:[Object(y.b)(p.a.Link,{as:h.b,exact:!0,to:"/",onClick:on,children:"Home"}),Object(y.b)(p.a.Link,{as:h.b,exact:!0,to:"/playlist",onClick:on,children:"Playlist"}),Object(y.b)(p.a.Link,{as:h.b,exact:!0,to:"/stats",onClick:on,children:"Stats"}),Object(y.b)(p.a.Link,{as:h.b,exact:!0,to:"/about",onClick:on,children:"About"}),Object(y.b)(g.a,{title:"Extras",children:Object(y.b)(g.a.Item,{as:h.b,exact:!0,to:"/playlist-builder",onClick:on,children:"Playlist Builder"})}),Object(y.c)(g.a,{title:a.darkMode?Object(y.b)(Zt,{theme:"dark"}):Object(y.b)(Zt,{theme:"light"}),children:[Object(y.c)(g.a.Item,{active:!a.darkMode,onClick:function(){a.darkMode&&(darkmode.setDarkMode(!1),gtag("event","ce_ui_light",{ce_category:"ui",ce_source:"navbar"}))},children:[Object(y.b)(Zt,{theme:"light",margin:!0}),"Light"]}),Object(y.c)(g.a.Item,{active:a.darkMode,onClick:function(){a.darkMode||(darkmode.setDarkMode(!0),gtag("event","ce_ui_dark",{ce_category:"ui",ce_source:"navbar"}))},children:[Object(y.b)(Zt,{theme:"dark",margin:!0}),"Dark"]})]}),Object(y.c)(g.a,{title:Object(y.b)("i",{className:"fa fa-earth-americas"}),children:[Object(y.b)(g.a.Item,{active:null===(e=r.language)||void 0===e?void 0:e.startsWith("en"),onClick:function(){return r.changeLanguage("en")},children:"English"}),Object(y.b)(g.a.Item,{active:null===(t=r.language)||void 0===t?void 0:t.startsWith("ko"),onClick:function(){return r.changeLanguage("ko")},children:"Korean"}),Object(y.b)(g.a.Item,{active:null===(n=r.language)||void 0===n?void 0:n.startsWith("ja"),onClick:function(){return r.changeLanguage("ja")},children:"Japanese"}),Object(y.b)(g.a.Item,{active:"zh-CN"===r.language,onClick:function(){return r.changeLanguage("zh-CN")},children:"Chinese (Simplified)"}),Object(y.b)(g.a.Item,{active:"zh-TW"===r.language,onClick:function(){return r.changeLanguage("zh-TW")},children:"Chinese (Traditional)"})]}),Object(y.b)(p.a.Link,{as:h.b,to:"#",onClick:function(){return s(!0)},children:Object(y.b)("i",{className:"fa fa-cog"})})]})})]}),Object(y.b)(Xt,{show:l,onModalClose:function(){return s(!1)}})]})},sn=function(){var e,t,n=null!==(e="cd40d9f")?e:"Dev",r=null!==(t="2024-07-19")?t:Object(Ht.a)(new Date,{representation:"date"});return Object(y.b)("div",{css:Object(f.a)(Gt||(Gt=Object(b.a)(["\n text-align: center;\n margin-bottom: 10px;\n "]))),className:"footer",children:Object(y.b)("span",{children:"Build: ".concat(n," (").concat(r,")")})})},un="MapleStory Music - BGM & OST Database",bn={"/":un,"/playlist":"".concat(un," - Playlist"),"/stats":"".concat(un," - Stats"),"/about":"".concat(un," - About"),"/playlist-builder":"".concat(un," - Playlist Builder")},dn=function(){var e=Object(O.f)();return Object(i.useEffect)((function(){var t;document.title=null!==(t=bn[e.pathname])&&void 0!==t?t:un}),[e]),Object(y.b)("main",{children:Object(y.c)(O.c,{children:[Object(y.b)(O.a,{exact:!0,path:"/",component:fn}),Object(y.b)(O.a,{path:"/playlist",component:hn}),Object(y.b)(O.a,{path:"/stats",component:jn}),Object(y.b)(O.a,{path:"/about",component:On}),Object(y.b)(O.a,{path:"/playlist-builder",component:mn})]})})},fn=function(){return Object(y.b)("div",{className:"App",children:Object(y.b)(Xe,{})})},hn=function(){return Object(y.b)("div",{className:"App",children:Object(y.b)(nn,{})})},On=function(){return Object(y.b)("div",{css:Object(f.a)(Jt||(Jt=Object(b.a)(["\n margin: 2% 3% 3% 3%;\n "]))),className:"About",children:Object(y.b)(C,{})})},jn=function(){return Object(y.b)("div",{css:Object(f.a)(Vt||(Vt=Object(b.a)(["\n margin: 2% 3% 1% 3%;\n "]))),className:"Stats",children:Object(y.b)(qt,{})})},mn=function(){return Object(y.b)("div",{css:Object(f.a)(Ut||(Ut=Object(b.a)(["\n margin: 2% 3% 3% 3%;\n "]))),className:"About",children:Object(y.b)(an,{})})},pn=function(){return Object(y.b)(W,{children:Object(y.b)(Me,{children:Object(y.b)(Ye,{children:Object(y.b)(O.b,{history:cn,children:Object(y.c)("div",{children:[Object(y.b)(ln,{}),Object(y.b)(dn,{}),Object(y.b)(sn,{})]})})})})})},gn=n(200),vn=n(116),yn=n(201);gn.a.use(yn.a).use(vn.e).init({fallbackLng:{zh:["zh-TW","zh-CN","en"],default:["en"]},nonExplicitSupportedLngs:!0,supportedLngs:["en","ko","ja","zh"]});Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));u.a.render(Object(M.jsx)(l.a.StrictMode,{children:Object(M.jsx)(i.Suspense,{fallback:Object(M.jsx)("div",{children:"Loading..."}),children:Object(M.jsx)(pn,{})})}),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()})).catch((function(e){console.error(e.message)}))}},[[291,1,2]]]);
\ No newline at end of file
+(this["webpackJsonpmaplestory-music"]=this["webpackJsonpmaplestory-music"]||[]).push([[0],{209:function(e,t,n){},210:function(e,t,n){},291:function(e,t,n){"use strict";n.r(t);var r,a,c,o,i=n(0),l=n.n(i),s=n(27),u=n.n(s),b=(n(209),n(8)),d=n(5),f=n(9),h=(n(210),n(73)),O=n(23),j=n(40),m=n(311),p=n(202),g=n(305),v=n(168),y=n(1),C=function(){return Object(y.c)("div",{children:[Object(y.c)("div",{css:Object(f.a)(r||(r=Object(b.a)(["\n @media (min-width: 1024px) {\n margin-right: 33vw;\n }\n "]))),children:[Object(y.b)("h2",{children:"About"}),Object(y.b)("p",{children:"This database catalogs music from every region of MapleStory and aims to be the definitive resource for MapleStory music. It will be updated whenever new songs are added to the client of any region."}),Object(y.b)("h6",{children:Object(y.b)("b",{children:"Music Playback"})}),Object(y.b)("p",{children:"Music is played within an embedded YouTube player. The track is looped upon completion, unless in the shuffled queue mode (see below)."}),Object(y.b)("h6",{children:Object(y.b)("b",{children:"Shuffled Queue"})}),Object(y.b)("p",{children:"The shuffled queue feature randomizes the entire music collection and plays upcoming songs automatically. Skip to the next track or return to the previous track with the controls under the media player. When filters are applied to the grid, the song pool is limited to the filtered entries."}),Object(y.b)("h6",{children:Object(y.b)("b",{children:"Grid Controls"})}),Object(y.b)("p",{children:"To sort by a column, press the column header. Hover over a column header and press the menu icon to access the advanced filter dialog. Mobile users can access the filter dialog by pressing and holding the column header."}),Object(y.b)("h6",{children:Object(y.b)("b",{children:"Language"})}),Object(y.b)("p",{children:"Language support is a work in progress. Changing the language will translate metadata displayed for the songs in the grid. If there are no translations for an entry, English will be used as the default language."})]}),Object(y.b)("h2",{children:"Source"}),Object(y.b)("p",{children:"The following GitHub projects power this site."}),Object(y.c)("div",{className:"gh-project-entry",children:[Object(y.b)(v.a,{href:"https://github.com/maplestory-music/maplebgm-db","data-size":"large","data-show-count":!0,"aria-label":"Star maplestory-music/maplebgm-db on GitHub",children:"Star"}),Object(y.b)("h5",{className:"gh-project-name",children:"maplebgm-db: Definitive MapleStory music database"})]}),Object(y.c)("div",{className:"gh-project-entry",children:[Object(y.b)(v.a,{href:"https://github.com/maplestory-music/maplestory-music.github.io","data-size":"large","data-show-count":!0,"aria-label":"Star maplestory-music/maplestory-music.github.io on GitHub",children:"Star"}),Object(y.b)("h5",{className:"gh-project-name",children:"maplestory-music: MapleStory Music website"})]})]})},S=n(2),k=n(123),w=(n(238),n(239),n(240),n(307)),x=n(298),A=Object(x.a)("2014-11-20"),B="#6495ed",M=n(3),N=function(e){return Object(M.jsx)("span",{children:Object(M.jsx)("img",{src:"mark/".concat(e.value,".png"),alt:"icon"})})},T=n(312),D=n(299),E=new Event("pausevideo"),F=function(e){var t=e.youtube,n=e.title;return""!==t?Object(y.c)("span",{children:[Object(y.b)(T.a,{delay:{show:1e3,hide:100},overlay:Object(y.b)(D.a,{id:"tooltip-ext-link",children:"View on YouTube"}),children:Object(y.b)("a",{css:Object(f.a)(a||(a=Object(b.a)(["\n margin-right: 3px;\n "]))),className:"bgm-external-link-icon",href:"https://youtu.be/".concat(t),rel:"noopener noreferrer",target:"_blank",onClick:function(){window.dispatchEvent(E),gtag("event","ce_view_external_video",{ce_category:"video",ce_youtube:e.youtube})},children:Object(y.b)("i",{className:"fa fa-external-link"})})}),Object(y.b)("a",{href:"# ",rel:"noopener noreferrer",onClick:function(t){gtag("event","ce_view_embedded_video",{ce_category:"video",ce_youtube:e.youtube}),e.onGridSongChange(e.youtube),t.preventDefault()},children:n})]}):Object(y.b)("span",{children:n})},I=n(316),z=n(300),Q=function(e){var t=e.value,n=new Date,r=Object(I.a)(n,t)<3||Object(z.a)(t);return Object(y.c)("div",{className:"date-col",children:[Object(y.b)("span",{css:Object(f.a)(c||(c=Object(b.a)(["\n margin-right: 3px;\n "]))),children:e.valueFormatted}),!e.disableRecentTrack&&r&&Object(y.b)(T.a,{delay:{show:250,hide:100},overlay:Object(y.b)(D.a,{id:"tooltip-recent-track",children:"Recent Track"}),children:Object(y.b)("i",{className:"fa fa-star","aria-hidden":!0})})]})},_=n(317),R=l.a.createContext(void 0),W=function(e){var t=e.children,n=l.a.useState(darkmode.inDarkMode),r=Object(d.a)(n,2),a=r[0],c=r[1];return Object(i.useEffect)((function(){var e=localStorage.getItem("bs.prefers-color-scheme");void 0!==e&&c("dark"===e)}),[]),Object(i.useEffect)((function(){var e=document.documentElement,t=new MutationObserver((function(e){var t=null===e||void 0===e?void 0:e[0].target;"dark"===t.className?c(!0):"light"===t.className&&c(!1)}));return t.observe(e,{attributes:!0}),function(){t.disconnect()}}),[]),Object(M.jsx)(R.Provider,{value:{darkMode:a},children:t})},L=function(){var e=l.a.useContext(R);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e},P=n(113);!function(e){e.Korea="KMS",e.Japan="JMS",e.China="CMS",e.Taiwan="TMS",e.SEA="MSEA",e.Global="GMS",e.Thailand="ThMS",e.Brazil="BMS"}(o||(o={}));var G=function(e){if(!e.value)return{};var t=Object(P.b)(B,.5);return{backgroundColor:e.value.startsWith(o.Korea)?t:Object(P.a)(t)}},J=n(11),V={currentSong:void 0,currentQueue:[],currentQueueSong:-1,repeatQueue:!1},U=Object(J.atom)(void 0),K=Object(J.atom)(void 0),q=Object(J.atom)(!1),H=Object(J.atom)(V),Y=Object(J.atom)(!1),$=Object(J.atom)([]),X=Object(J.atom)(!1),Z=n(39),ee="custom-playlists",te=function(e,t){return"".concat(e,"/").concat(t)};function ne(e){localStorage.setItem(ee,JSON.stringify(e))}var re=function(e){return"name"in e&&"tracks"in e},ae=function(e){var t,n=new Map,r=Object(Z.a)(e);try{for(r.s();!(t=r.n()).done;){var a=t.value;n.set(a.name,a)}}catch(c){r.e(c)}finally{r.f()}return n},ce=(Object(J.atom)([]),Object(J.atom)(new Map)),oe=Object(J.atom)([]),ie=Object(J.atom)((function(e){var t=e(oe);return t.length?t.length>1?"multi":t[0]:"undefined"})),le=Object(J.atom)(new Set),se="site-preferences",ue=l.a.createContext(void 0),be={hideMinorTracks:!1,distinctKmstVersion:!1,jsonOptimizedTrackIdCopy:!1};function de(e){localStorage.setItem(se,JSON.stringify(e))}var fe,he,Oe,je,me,pe,ge,ve,ye,Ce,Se,ke,we,xe,Ae,Be,Me=function(e){var t=e.children,n=l.a.useState(function(){var e=localStorage.getItem(se);if(null===e){var t=be;return de(t),t}return JSON.parse(e)}()),r=Object(d.a)(n,2),a=r[0],c=r[1];return Object(M.jsx)(ue.Provider,{value:{settings:a,setSettings:function(e){c(e),de(e)}},children:t})},Ne=function(){var e=l.a.useContext(ue);if(!e)throw new Error("useSettings must be used within a SettingsProvider");return e},Te=function(e){var t=Ne().settings,n=e.data,r=Object(i.useMemo)((function(){return te(n.source.structure,n.filename)}),[n.source.structure,n.filename]),a=Object(J.useAtom)(le),c=Object(d.a)(a,2),o=c[0],l=c[1],s=Object(i.useMemo)((function(){return o.has(r)}),[r,o]),u=Object(i.useCallback)((function(){t.jsonOptimizedTrackIdCopy?navigator.clipboard.writeText('"'.concat(r,'",\n')):navigator.clipboard.writeText(r)}),[r,t.jsonOptimizedTrackIdCopy]);return Object(y.c)("span",{css:Object(f.a)(fe||(fe=Object(b.a)(["\n display: flex;\n justify-content: center;\n "]))),children:[Object(y.b)("div",{css:Object(f.a)(he||(he=Object(b.a)(["\n margin: 0 5px;\n "]))),onClick:u,children:Object(y.b)(T.a,{delay:{show:1e3,hide:100},overlay:Object(y.b)(D.a,{id:"tooltip-copy-track-id",children:"Copy Track ID"}),children:Object(y.b)("i",{css:Object(f.a)(Oe||(Oe=Object(b.a)(["\n cursor: pointer;\n "]))),className:"fa-regular fa-copy"})})}),Object(y.b)("div",{onClick:function(){s?o.delete(r):o.add(r);var e=new Set(o);l(e)},children:Object(y.b)(T.a,{delay:{show:1e3,hide:100},overlay:Object(y.b)(D.a,{id:"tooltip-export",children:s?"Remove from Export Set":"Add to Export Set"}),children:Object(y.b)("i",{css:Object(f.a)(je||(je=Object(b.a)(["\n cursor: pointer;\n color: ",";\n "])),s?"red":"green"),className:"fa-regular ".concat(s?"fa-square-minus":"fa-square-plus")})})})]})},De=function(e){return e?e.startsWith("en")?"en":e.startsWith("ko")?"ko":e.startsWith("ja")?"ja":"zh-CN"===e?"zh-CN":e.startsWith("zh")?"zh-TW":"en":"en"},Ee=function(e){var t=e.dataSource,n=e.disableInitSort,r=e.enableTrackIdCol,a=Object(_.a)().i18n,c=Object(J.useAtomValue)(U),o=Object(i.useRef)(null),l=Object(i.useRef)(null),s=Object(i.useRef)([]),u=Object(i.useRef)(void 0),h=L(),O=Object(J.useSetAtom)(H),j=Object(J.useAtomValue)(q),m=Object(J.useAtomValue)(K),p=Object(J.useSetAtom)(Y),g=Object(J.useSetAtom)($),v=Object(J.useSetAtom)(X);s.current=function(e,t){return[{headerName:"",field:"mark",minWidth:70,maxWidth:70,resizable:!1,cellRendererFramework:N,getQuickFilterText:function(){return""}},{hide:!t,cellRendererFramework:Te,resizable:!1,maxWidth:35},{headerName:"Title",field:"metadata.title",minWidth:250,valueGetter:function(e){var t,n,r,a,c=e.context.i18n,o=e.data,i=De(c.language);return"en"===i?o.metadata.title:null!==(t=null===(n=o.locale)||void 0===n||null===(r=n[i])||void 0===r||null===(a=r.metadata)||void 0===a?void 0:a.title)&&void 0!==t?t:o.metadata.title},cellRendererFramework:F,cellRendererParams:function(t){return{title:t.value,youtube:t.data.youtube,onGridSongChange:e}}},{headerName:"Description",minWidth:375,field:"description",valueGetter:function(e){var t,n,r,a=e.context.i18n,c=e.data,o=De(a.language);return"en"===o?c.description:null!==(t=null===(n=c.locale)||void 0===n||null===(r=n[o])||void 0===r?void 0:r.description)&&void 0!==t?t:c.description}},{headerName:"Folder",field:"source.structure",getQuickFilterText:function(){return""}},{headerName:"Date",field:"source.date",filter:"agDateColumnFilter",valueFormatter:function(e){return e.data.source.date?Object(w.a)(e.data.source.date,"yyyy-MM-dd"):""},cellRendererFramework:Q,getQuickFilterText:function(){return""}},{headerName:"Client",field:"source.clientVersion",getQuickFilterText:function(){return""},cellStyle:G}]}((function(e){v(!0),O({currentSong:e,currentQueue:[],currentQueueSong:-1,repeatQueue:j})}),r),u.current={animateRows:!1,pagination:!0,paginationPageSize:25,suppressColumnVirtualisation:!0,suppressMovableColumns:!0,rowHeight:45,defaultColDef:{sortable:!0,filter:!0,resizable:!0},domLayout:"autoHeight"},Object(i.useEffect)((function(){var e;null===(e=o.current)||void 0===e||e.setQuickFilter(c)}),[c]),Object(i.useEffect)((function(){(null===m||void 0===m?void 0:m.songId)&&C(m.songId)}),[m]);var C=function(e){var t,n,r;if(e){var a=-1,c=[];if(null===(t=o.current)||void 0===t||t.forEachNodeAfterFilterAndSort((function(t,n){t.data.youtube===e&&(a=n,c.push(t))})),-1!==a&&1===c.length){var i=Math.ceil((a+1)/25)-1;null===(n=o.current)||void 0===n||n.paginationGoToPage(i),null===(r=o.current)||void 0===r||r.ensureIndexVisible(a,"middle"),c[0].setSelected(!0),setTimeout((function(){!function(e){var t;if(null!==e){var n=document.querySelector("div.ag-root-wrapper div[row-index='".concat(e,"']")),r=null===n||void 0===n?void 0:n.style.transform;if(r){var a=new RegExp(/^translateY\((\d+)px\)$/g).exec(r);if(a){var c=Object(d.a)(a,2)[1],o=null===(t=document.querySelector("div.ag-root-wrapper"))||void 0===t?void 0:t.offsetTop;if(void 0!==o){var i=o+Number(c);window.scrollTo({top:i,behavior:"smooth"})}}}}}(c[0].rowIndex)}),0)}}},S=Object(i.useCallback)((function(e,t){p(e),g(t)}),[p,g]),x=function(e,t){var n,r=null!==(n=null===e||void 0===e?void 0:e.isAnyFilterPresent())&&void 0!==n&&n,a=[];null===e||void 0===e||e.forEachNodeAfterFilterAndSort((function(e){a.push(e.data)})),t(r,a)};Object(i.useEffect)((function(){x(o.current,S)}),[t,S]);var A={i18n:a};return Object(y.b)("div",{css:Object(f.a)(me||(me=Object(b.a)(["\n margin: auto;\n width: 95vw;\n margin-bottom: 15px;\n "]))),className:h.darkMode?"ag-theme-balham-dark":"ag-theme-balham",children:Object(y.b)(k.AgGridReact,{columnDefs:s.current,rowData:t,gridOptions:u.current,onFirstDataRendered:function(e){e.columnApi.autoSizeAllColumns()},onFilterChanged:function(e){x(e.api,S)},onSortChanged:function(e){x(e.api,S)},onModelUpdated:function(e){e.api.getDisplayedRowCount()>0?e.api.hideOverlay():e.api.showNoRowsOverlay()},onGridReady:function(e){if(o.current=e.api,l.current=e.columnApi,!n){e.columnApi.applyColumnState({state:[{colId:"source.date",sort:"desc"}]})}},reactUi:!0,context:A})})},Fe=n(190),Ie=n.n(Fe),ze=n(308),Qe=n(301),_e=n(191),Re=n(320),We=function(e){var t=Object(i.useRef)(null),n=e.playingState,r=e.setCurrentQueueSong,a=Object(J.useAtomValue)(ie),c=Object(J.useAtom)(X),o=Object(d.a)(c,2),l=o[0],s=o[1];Object(Re.a)("pausevideo",(function(){s(!1)}));return Object(y.c)("div",{children:[Object(y.b)(Ie.a,{css:Object(f.a)(pe||(pe=Object(b.a)(["\n display: block;\n margin-left: auto;\n margin-right: auto;\n max-width: 100vw;\n "]))),ref:t,url:"https://youtu.be/".concat(n.currentSong),playing:l,controls:!0,onPlay:function(){return s(!0)},onPause:function(){return s(!1)},onEnded:function(){if(null!==t.current)if(n.currentQueue.length){var e;if(gtag("event","ce_complete_queue_video",{ce_category:"video",ce_youtube:n.currentSong,ce_playlist_name:a}),n.currentQueueSong===n.currentQueue.length-1){if(!n.repeatQueue)return;e=0}else e=n.currentQueueSong+1;r(e)}else t.current.seekTo(0),gtag("event","ce_loop_embedded_video",{ce_category:"video",ce_youtube:n.currentSong})}}),n.currentQueue.length>0&&Object(y.b)("div",{className:"text-center",css:Object(f.a)(ge||(ge=Object(b.a)(["\n margin-top: 5px;\n "]))),children:Object(y.c)(Qe.a,{size:"sm",children:[Object(y.b)(_e.a,{variant:"outline-primary",onClick:function(){n.currentQueueSong<1||r(n.currentQueueSong-1)},disabled:0===n.currentQueueSong,children:Object(y.b)("i",{className:"fa fa-step-backward"})}),Object(y.b)("span",{css:Object(f.a)(ve||(ve=Object(b.a)(["\n background-color: #343a40;\n border-color: #343a40;\n color: white;\n padding: 0.25rem 0.5rem;\n font-size: 0.875rem;\n line-height: 1.5;\n border: 1px solid transparent;\n margin-left: -1px;\n "]))),children:"".concat(Object(ze.a)((n.currentQueueSong+1).toString(),n.currentQueue.length.toString().length,"0")," | ").concat(n.currentQueue.length)}),Object(y.b)(_e.a,{variant:"outline-primary",onClick:function(){n.currentQueueSong!==n.currentQueue.length-1&&r(n.currentQueueSong+1)},disabled:n.currentQueueSong+1===n.currentQueue.length,children:Object(y.b)("i",{className:"fa fa-step-forward"})})]})})]})},Le=function(e){var t=e.noText;return Object(y.c)(i.Fragment,{children:[Object(y.b)("div",{children:Object(y.b)("img",{css:Object(f.a)(ye||(ye=Object(b.a)(["\n display: block;\n margin-left: auto;\n margin-right: auto;\n margin-bottom: 10px;\n "]))),id:"header-logo",src:"assets/pink-bean.png",alt:"header logo"})}),t?null:Object(y.b)("div",{children:Object(y.b)("p",{children:"Welcome to the MapleStory Music database. This site provides a complete listing of the background music (BGM) used in MapleStory. Collectively, the songs are also known as MapleStory's original soundtrack (OST)."})})]})},Pe=n(310),Ge=n(302),Je=n(74),Ve=function(e){var t=e.iconClass,n=e.actionName,r=e.onClick,a=e.active;return Object(y.b)(Je.a.Item,{onClick:r,active:a,children:Object(y.c)("span",{children:[Object(y.b)("i",{className:t,css:Object(f.a)(Ce||(Ce=Object(b.a)(["\n width: 24px;\n "])))}),n]})})},Ue=n(314),Ke=function(){var e=Object(J.useSetAtom)(U),t=Object(J.useSetAtom)(K),n=Object(J.useAtom)(q),r=Object(d.a)(n,2),a=r[0],c=r[1],o=Object(J.useAtom)(H),i=Object(d.a)(o,2),l=i[0],s=i[1],u=Object(J.useAtomValue)($),h=Object(J.useAtomValue)(Y),O=Object(J.useAtomValue)(ie),j=Object(J.useSetAtom)(X);return Object(y.b)(Pe.a.Group,{css:Object(f.a)(Se||(Se=Object(b.a)(["\n margin: 10px 14vw;\n "]))),className:"filter-text",children:Object(y.c)(Ge.a,{size:"lg",children:[Object(y.b)(T.a,{delay:{show:250,hide:100},overlay:Object(y.b)(D.a,{id:"tooltip-locate-song",children:"Locate Current Song"}),children:Object(y.b)(Ge.a.Text,{css:Object(f.a)(ke||(ke=Object(b.a)(["\n cursor: pointer;\n "]))),onClick:function(){t({songId:l.currentSong})},children:Object(y.b)("i",{className:"fa fa-search"})})}),Object(y.b)(Pe.a.Control,{type:"search",placeholder:"Song title or keyword",onChange:function(t){e(t.target.value)},onKeyPress:function(e){"Enter"===e.key&&document.activeElement&&document.activeElement.blur()}}),Object(y.c)(Je.a,{children:[Object(y.b)(T.a,{delay:{show:250,hide:100},overlay:Object(y.b)(D.a,{id:"tooltip-queue-actions",children:h?"Queue Actions (Filtered)":"Queue Actions"}),children:Object(y.b)(Je.a.Toggle,{variant:h?"outline-warning":"outline-success",id:"dropdown-queue-actions",children:Object(y.b)("i",{className:"fa fa-play"})})}),Object(y.c)(Je.a.Menu,{children:[Object(y.b)(Ve,{actionName:"Start Queue",iconClass:"fa fa-play",onClick:function(){var e=u.filter((function(e){return""!==e.youtube}));e.length&&(j(!0),s({currentSong:e[0].youtube,currentQueue:e,currentQueueSong:0,repeatQueue:a}),gtag("event","ce_start_queue",{ce_category:"queue",ce_source:"play_button",ce_filtered:h,ce_playlist_name:O}))}}),Object(y.b)(Ve,{actionName:"Start Shuffled Queue",iconClass:"fa fa-random",onClick:function(){var e=Object(Ue.a)(u.filter((function(e){return""!==e.youtube})));e.length&&(j(!0),s({currentSong:e[0].youtube,currentQueue:e,currentQueueSong:0,repeatQueue:a}),gtag("event","ce_start_shuffled_queue",{ce_category:"queue",ce_source:"shuffle_button",ce_filtered:h,ce_playlist_name:O}))}}),Object(y.b)(Je.a.Divider,{}),Object(y.b)(Ve,{actionName:a?"Turn Off Queue Repeat":"Turn On Queue Repeat",iconClass:"fa fa-repeat",onClick:function(){var e=!a;c(e),j(!0),s((function(t){return Object(S.a)(Object(S.a)({},t),{},{repeatQueue:e})}))},active:a})]})]})]})})},qe=l.a.createContext(void 0),He=function(e,t,n,r){if(r&&"KMST"===e&&null!==n&&n>=A){var a=t.split("."),c=Object(d.a)(a,3),o=c[0],i=c[1],l=c[2];return"".concat(e," ").concat(o,".").concat(i,".1").concat(l)}return"".concat(e," ").concat(t)},Ye=function(e){var t=e.children,n=l.a.useState([]),r=Object(d.a)(n,2),a=r[0],c=r[1],o=Object(J.useSetAtom)(ce),s=Ne().settings;return Object(i.useEffect)((function(){fetch("https://raw.githubusercontent.com/maplestory-music/maplebgm-db/prod/bgm.min.json").then((function(e){return e.json()})).then((function(e){var t=e.filter((function(e){var t,n;return!s.hideMinorTracks||(null===(t=!(null===(n=e.decoration)||void 0===n?void 0:n.minorTrack))||void 0===t||t)})).map((function(e){var t=e.source.date?Object(x.a)(e.source.date):null,n={client:e.source.client,date:t,structure:e.source.structure,version:e.source.version,clientVersion:e.source.client&&e.source.version?He(e.source.client,e.source.version,t,s.distinctKmstVersion):""};return Object.assign({},e,{source:n})}));c(t)})),fetch("https://raw.githubusercontent.com/maplestory-music/maplebgm-db/prod/playlist.min.json").then((function(e){return e.json()})).then((function(e){o(ae(e))}))}),[c,s.hideMinorTracks,s.distinctKmstVersion,o]),Object(M.jsx)(qe.Provider,{value:a,children:t})},$e=function(){var e=l.a.useContext(qe);if(!e)throw new Error("useDataSourceState must be used within a DataSourceProvider");return e},Xe=function(){var e=$e(),t=Object(J.useAtom)(H),n=Object(d.a)(t,2),r=n[0],a=n[1],c=Object(J.useSetAtom)(X);Object(i.useEffect)((function(){a(V)}),[a]);return Object(y.c)("div",{children:[void 0===r.currentSong?Object(y.b)(Le,{}):Object(y.b)(We,{playingState:r,setCurrentQueueSong:function(e){c(!0),a((function(t){return Object(S.a)(Object(S.a)({},t),{},{currentSong:t.currentQueue[e].youtube,currentQueueSong:e})}))}}),Object(y.b)(Ke,{}),Object(y.b)(Ee,{dataSource:e})]})},Ze=n(318),et=n(319),tt=n(304),nt=n(303),rt=n(195),at=n.n(rt),ct=n(196),ot=n.n(ct),it={colors:["#8087E8","#A3EDBA","#F19E53","#6699A1","#E1D369","#87B4E7","#DA6D85","#BBBAC5"],chart:{backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"#1f1836"],[1,"#45445d"]]},style:{fontFamily:"IBM Plex Sans, sans-serif"}},title:{style:{fontSize:"22px",fontWeight:"500",color:"#fff"}},subtitle:{style:{fontSize:"16px",fontWeight:"400",color:"#fff"}},credits:{style:{color:"#f0f0f0"}},caption:{style:{color:"#f0f0f0"}},tooltip:{borderWidth:0,backgroundColor:"#000000",style:{color:"#f0f0f0"},shadow:!0},legend:{backgroundColor:"transparent",itemStyle:{fontWeight:"400",fontSize:"12px",color:"#fff"},itemHoverStyle:{fontWeight:"700",color:"#fff"}},labels:{style:{color:"#707073"}},plotOptions:{series:{dataLabels:{color:"#46465C",style:{fontSize:"13px"}},marker:{lineColor:"#333"}},boxplot:{fillColor:"#505053"},candlestick:{lineColor:null,upColor:"#DA6D85",upLineColor:"#DA6D85"},errorbar:{color:"white"},dumbbell:{lowColor:"#f0f0f0"},map:{borderColor:"rgba(200, 200, 200, 1)",nullColor:"#78758C"}},drilldown:{activeAxisLabelStyle:{color:"#F0F0F3"},activeDataLabelStyle:{color:"#F0F0F3"},drillUpButton:{theme:{fill:"#fff"}}},xAxis:{gridLineColor:"#707073",labels:{style:{color:"#fff",fontSize:"12px"}},lineColor:"#707073",minorGridLineColor:"#505053",tickColor:"#707073",title:{style:{color:"#fff"}}},yAxis:{gridLineColor:"#707073",labels:{style:{color:"#fff",fontSize:"12px"}},lineColor:"#707073",minorGridLineColor:"#505053",tickColor:"#707073",tickWidth:1,title:{style:{color:"#fff",fontWeight:"300"}}},mapNavigation:{enabled:!0,buttonOptions:{theme:{fill:"#46465C","stroke-width":1,stroke:"#BBBAC5",r:2,style:{color:"#fff"},states:{hover:{fill:"#000","stroke-width":1,stroke:"#f0f0f0",style:{color:"#fff"}},select:{fill:"#000","stroke-width":1,stroke:"#f0f0f0",style:{color:"#fff"}}}},verticalAlign:"bottom"}},rangeSelector:{buttonTheme:{fill:"#46465C",stroke:"#BBBAC5","stroke-width":1,style:{color:"#fff"},states:{hover:{fill:"#1f1836",style:{color:"#fff"},"stroke-width":1,stroke:"white"},select:{fill:"#1f1836",style:{color:"#fff"},"stroke-width":1,stroke:"white"}}},inputBoxBorderColor:"#BBBAC5",inputStyle:{backgroundColor:"#2F2B38",color:"#fff"},labelStyle:{color:"#fff"}},navigator:{handles:{backgroundColor:"#BBBAC5",borderColor:"#2F2B38"},outlineColor:"#CCC",maskFill:"rgba(255,255,255,0.1)",series:{color:"#A3EDBA",lineColor:"#A3EDBA"},xAxis:{gridLineColor:"#505053"}},scrollbar:{barBackgroundColor:"#BBBAC5",barBorderColor:"#808083",buttonArrowColor:"#2F2B38",buttonBackgroundColor:"#BBBAC5",buttonBorderColor:"#2F2B38",rifleColor:"#2F2B38",trackBackgroundColor:"#78758C",trackBorderColor:"#2F2B38"}},lt={colors:["#8087E8","#A3EDBA","#F19E53","#6699A1","#E1D369","#87B4E7","#DA6D85","#BBBAC5"],chart:{backgroundColor:"#f0f0f0",style:{fontFamily:"IBM Plex Sans, sans-serif"}},title:{style:{fontSize:"22px",fontWeight:"500",color:"#2F2B38"}},subtitle:{style:{fontSize:"16px",fontWeight:"400",color:"#2F2B38"}},tooltip:{borderWidth:0,backgroundColor:"#46465C",style:{color:"#f0f0f0"},shadow:!0},legend:{backgroundColor:"#f0f0f0",borderColor:"#BBBAC5",borderWidth:1,borderRadius:2,itemStyle:{fontWeight:"400",fontSize:"12px",color:"#2F2B38"},itemHoverStyle:{fontWeight:"700",color:"#46465C"}},navigation:{buttonOptions:{symbolStroke:"#2F2B38",theme:{fill:"#fff",states:{hover:{stroke:"#46465C",fill:"#fff"},select:{stroke:"#46465C",fill:"#fff"}}}}},labels:{style:{color:"#46465C"}},credits:{style:{color:"#46465C"}},drilldown:{activeAxisLabelStyle:{color:"#2F2B38"},activeDataLabelStyle:{color:"#2F2B38"},drillUpButton:{theme:{fill:"#2F2B38",style:{color:"#fff"}}}},xAxis:{gridLineColor:"#ccc",labels:{style:{color:"#46465C",fontSize:"12px"}},lineColor:"#ccc",minorGridLineColor:"#ebebeb",tickColor:"#ccc",title:{style:{color:"#2F2B38"}}},yAxis:{gridLineColor:"#ccc",labels:{style:{color:"#46465C",fontSize:"12px"}},lineColor:"#ccc",minorGridLineColor:"#ebebeb",tickColor:"#ccc",tickWidth:1,title:{style:{color:"#2F2B38",fontWeight:"300"}}},rangeSelector:{buttonTheme:{fill:"#fff",style:{color:"#46465C",stroke:"transparent"},states:{hover:{fill:"#fff",style:{color:"#46465C"},"stroke-width":1,stroke:"#46465C"},select:{fill:"#fff",style:{color:"#46465C"},"stroke-width":1,stroke:"#46465C"}}},inputBoxBorderColor:"#BBBAC5",inputStyle:{backgroundColor:"#fff",color:"#46465C"},labelStyle:{color:"#46465C"}},scrollbar:{barBackgroundColor:"#BBBAC5",barBorderColor:"#808083",buttonArrowColor:"#fff",buttonBackgroundColor:"#BBBAC5",buttonBorderColor:"#46465C",rifleColor:"#FFF",trackBackgroundColor:"#dedede",trackBorderColor:"#BBBAC5"},plotOptions:{series:{borderWidth:1,borderColor:"#BBBAC5",dataLabels:{color:"#46465C",style:{fontSize:"13px"}},marker:{lineColor:"#46465C"}},boxplot:{fillColor:"#505053"},candlestick:{lineColor:null,upColor:"#DA6D85",upLineColor:"#DA6D85"},errorbar:{color:"white"},map:{borderColor:"rgba(200, 200, 200, 0.3)",nullColor:"rgba(200, 200, 200, 0.3)"}}},st=function(e){var t=L();return Object(i.useEffect)((function(){var n,r,a=t.darkMode?it:lt,c=Object(S.a)(Object(S.a)({},e.options),a);null===(n=e.chartComponent.current)||void 0===n||null===(r=n.chart)||void 0===r||r.update(c)}),[e.chartComponent,e.options,t]),Object(y.b)("div",{css:[Object(f.a)(we||(we=Object(b.a)(["\n display: inline-block;\n margin: 10px;\n @media (max-width: 1024px) {\n width: 100%;\n }\n "]))),e.styles],children:Object(y.b)(ot.a,{containerProps:{className:"react-highcharts-container",style:{width:"100%",height:"100%"}},highcharts:at.a,options:e.options,ref:e.chartComponent})})},ut=function(e,t){var n=Date.now(),r=Object(nt.a)(n)+1;return t===Object(tt.a)(n)?e.slice(0,1===r?r+1:r):e},bt=function(e){var t=Object(i.useRef)(null),n=$e(),r=e.selectedYear,a=n.reduce((function(e,t){return t.metadata.year===r.toString()&&t.source.date&&e[Object(nt.a)(t.source.date)]++,e}),new Array(12).fill(0)),c=a.reduce((function(e,t,n){return 0===n?e[0]=t:e[n]=e[n-1]+t,e}),new Array(12).fill(0)),o={chart:{type:"line"},title:{text:"Song frequency per month"},xAxis:{type:"datetime"},yAxis:[{title:{text:"Songs"},allowDecimals:!1},{title:{text:"Cumulative"},allowDecimals:!1,opposite:!0}],series:[{name:"Songs",type:"line",yAxis:0,pointStart:Date.UTC(r,0,1),pointIntervalUnit:"month",data:ut(a,r)},{name:"Cumulative",type:"line",yAxis:1,pointStart:Date.UTC(r,0,1),pointIntervalUnit:"month",data:ut(c,r)}]};return Object(y.b)(st,{styles:Object(f.a)(xe||(xe=Object(b.a)(["\n width: 55vw;\n flex: 2;\n "]))),options:o,chartComponent:t})},dt=function(e){var t=Object(i.useRef)(null),n=$e(),r=e.selectedYear,a=n.filter((function(e){var t;return(null===(t=e.source.date)||void 0===t?void 0:t.getFullYear())===r&&e.source.client})),c=function(e){return a.filter((function(t){var n;return null===(n=t.source.client)||void 0===n?void 0:n.includes(e)})).length},l=c(o.Korea),s=a.length-l,u={chart:{type:"pie"},title:{text:"Distribution of song region"},series:[{id:"domesticVsOverseas",name:"Total Songs",type:"pie",data:[{name:"Domestic",color:B,y:l},{name:"Overseas",color:Object(P.a)(B),y:s}],size:"70%",dataLabels:{enabled:!1}},{id:"regional",name:"Songs",type:"pie",data:[{name:"Korea",color:B,y:l},{name:"Japan",y:c(o.Japan)},{name:"China",y:c(o.China)},{name:"Taiwan",y:c(o.Taiwan)},{name:"Thailand",y:c(o.Thailand)},{name:"SEA",y:c(o.SEA)},{name:"Global",y:c(o.Global)},{name:"Brazil",y:c(o.Brazil)}],size:"100%",innerSize:"70%",dataLabels:{formatter:function(e){if(this.y)return this.key}}}]};return Object(y.b)(st,{styles:Object(f.a)(Ae||(Ae=Object(b.a)(["\n width: 35vw;\n flex: 1;\n "]))),options:u,chartComponent:t})},ft=n(16),ht=n(315),Ot=function(){var e=L(),t=$e(),n=Object(i.useRef)(null),r=Object(i.useRef)(null),a=Object(i.useRef)([{headerName:"",field:"mark",minWidth:70,maxWidth:70,resizable:!1,cellRendererFramework:N},{headerName:"Folder",field:"folderName"},{headerName:"Creation",field:"creation",initialWidth:145,cellRendererFramework:Q,cellRendererParams:{disableRecentTrack:!0},filter:"agDateColumnFilter",valueFormatter:function(e){return Number.isNaN(e.data.creation.valueOf())?"":Object(w.a)(e.data.creation,"yyyy-MM-dd")}},{headerName:"Creation Client",field:"creationClient",initialWidth:125,cellStyle:G},{headerName:"Last Update",field:"lastUpdate",initialWidth:145,cellRendererFramework:Q,cellRendererParams:{disableRecentTrack:!0},filter:"agDateColumnFilter",valueFormatter:function(e){return Number.isNaN(e.data.lastUpdate.valueOf())?"":Object(w.a)(e.data.lastUpdate,"yyyy-MM-dd")}},{headerName:"Last Update Client",field:"lastUpdateClient",initialWidth:140,cellStyle:G},{headerName:"Track Count",field:"trackCount",initialWidth:110}]),c=Object(i.useRef)({animateRows:!1,pagination:!0,paginationPageSize:10,suppressColumnVirtualisation:!0,suppressMovableColumns:!0,rowHeight:45,defaultColDef:{sortable:!0,filter:!0,resizable:!0},domLayout:"autoHeight"}),o=Object(i.useMemo)((function(){var e,n=new Map,r=Object(Z.a)(t);try{for(r.s();!(e=r.n()).done;){var a=e.value,c=a.source.structure,o=n.get(c);o?n.set(c,[].concat(Object(ft.a)(o),[a])):n.set(c,[a])}}catch(i){r.e(i)}finally{r.f()}return Array.from(n.entries()).reduce((function(e,t){var n=Object(d.a)(t,2),r=n[0],a=n[1],c=a.map((function(e){var t,n;return{date:null!==(t=null===(n=e.source.date)||void 0===n?void 0:n.valueOf())&&void 0!==t?t:Number.NaN,clientVersion:e.source.clientVersion}})).sort((function(e,t){return e.date-t.date})),o=Object.entries(Object(ht.a)(a.map((function(e){return e.mark})))).sort((function(e,t){return t[1]-e[1]})),i=c[0],l=c[c.length-1],s={folderName:r,trackCount:a.length,mark:o[0][0],creation:new Date(i.date),creationClient:i.clientVersion,lastUpdate:new Date(l.date),lastUpdateClient:l.clientVersion};return e.push(s),e}),[])}),[t]);return Object(M.jsx)("div",{className:e.darkMode?"ag-theme-balham-dark":"ag-theme-balham",children:Object(M.jsx)(k.AgGridReact,{columnDefs:a.current,rowData:o,gridOptions:c.current,onGridReady:function(e){n.current=e.api,r.current=e.columnApi;e.columnApi.applyColumnState({state:[{colId:"lastUpdate",sort:"desc"}]})},reactUi:!0})})},jt=n(197),mt=["KMS","JMS","CMS","TMS","MSEA","GMS","ThMS","BMS"];function pt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US",t=new Intl.DateTimeFormat(e,{month:"long"}).format;return Object(ft.a)(Array(12).keys()).map((function(e){return t(new Date(Date.UTC(2003,(e+1)%12)))}))}var gt,vt,yt,Ct,St,kt,wt,xt,At,Bt,Mt,Nt,Tt,Dt,Et,Ft,It,zt,Qt,_t,Rt,Wt,Lt,Pt,Gt,Jt,Vt,Ut,Kt=function(){var e=Object(_.a)().i18n,t=Object(i.useRef)(null),n=$e(),r=Object(i.useMemo)((function(){return n.reduce((function(e,t){var n,r=function(e){if(!e)return"None";var t,n=Object(Z.a)(mt);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(e.includes(r))return r}}catch(a){n.e(a)}finally{n.f()}return"None"}(t.source.client),a=Object(nt.a)(null!==(n=t.source.date)&&void 0!==n?n:0),c=Object(jt.a)(e,r);return c&&(c[a]+=1),e}),{KMS:new Array(12).fill(0),JMS:new Array(12).fill(0),CMS:new Array(12).fill(0),TMS:new Array(12).fill(0),MSEA:new Array(12).fill(0),GMS:new Array(12).fill(0),ThMS:new Array(12).fill(0),BMS:new Array(12).fill(0)})}),[n]),a={chart:{type:"area"},title:{text:"Song frequency per month (all years)"},xAxis:{categories:pt(e.language)},yAxis:[{title:{text:"Songs"},allowDecimals:!1}],tooltip:{shared:!0},plotOptions:{area:{stacking:"normal"}},series:mt.map((function(e){return{name:e,type:"area",yAxis:0,visible:e===o.Korea||e===o.Japan||e===o.China,data:Object(jt.a)(r,e)}}))};return Object(y.b)(st,{styles:Object(f.a)(Be||(Be=Object(b.a)(["\n width: 55vw;\n flex: 2;\n "]))),options:a,chartComponent:t})},qt=function(){var e=Object(tt.a)(new Date),t=Object(i.useState)(e),n=Object(d.a)(t,2),r=n[0],a=n[1],c=Array(Object(tt.a)(new Date)-2003+1).fill(0).map((function(e,t){return 2003+t}));return Object(y.c)("div",{children:[Object(y.b)("h2",{children:"Stats"}),Object(y.c)(Ze.a,{defaultActiveKey:"yearly",children:[Object(y.c)(et.a,{eventKey:"yearly",title:"Yearly",children:[Object(y.b)(Pe.a,{css:Object(f.a)(gt||(gt=Object(b.a)(["\n margin-top: 10px;\n "]))),children:Object(y.b)(Pe.a.Group,{controlId:"year-select",children:Object(y.b)(Pe.a.Select,{css:Object(f.a)(vt||(vt=Object(b.a)(["\n width: 100px;\n "]))),defaultValue:e,onChange:function(e){e.target.value&&a(+e.target.value)},children:c.map((function(e){return Object(y.b)("option",{value:e,children:e},e)}))})})}),Object(y.c)("div",{css:Object(f.a)(yt||(yt=Object(b.a)(["\n display: flex;\n align-items: center;\n flex-direction: row;\n flex-wrap: wrap;\n "]))),children:[Object(y.b)(bt,{selectedYear:r}),Object(y.b)(dt,{selectedYear:r})]})]}),Object(y.b)(et.a,{eventKey:"overview",title:"Overview",children:Object(y.b)(y.a,{children:Object(y.b)(Kt,{})})})]}),Object(y.b)("div",{children:Object(y.b)(Ot,{})})]})},Ht=n(306),Yt=n(313),$t=function(e){var t=e.id,n=e.label,r=e.checked,a=e.tooltip,c=e.onChange;return Object(y.c)("div",{css:Object(f.a)(Ct||(Ct=Object(b.a)(["\n display: flex;\n align-items: center;\n "]))),children:[Object(y.b)(Pe.a.Check,{type:"switch",id:"".concat(t,"-switch"),label:n,checked:r,onChange:c}),Object(y.b)(T.a,{delay:{show:250,hide:100},placement:"right",overlay:Object(y.b)(D.a,{id:"tooltip-".concat(t),children:a}),children:Object(y.b)("i",{css:Object(f.a)(St||(St=Object(b.a)(["\n margin: 0 4px;\n "]))),className:"fa fa-question-circle","aria-hidden":!0})})]})},Xt=function(e){var t=e.show,n=e.onModalClose,r=Ne(),a=r.settings,c=r.setSettings,o=Object(i.useState)(a.hideMinorTracks),l=Object(d.a)(o,2),s=l[0],u=l[1],h=Object(i.useState)(a.distinctKmstVersion),O=Object(d.a)(h,2),j=O[0],m=O[1],p=Object(i.useState)(a.jsonOptimizedTrackIdCopy),g=Object(d.a)(p,2),v=g[0],C=g[1];return Object(y.c)(Yt.a,{show:t,onShow:function(){u(a.hideMinorTracks),m(a.distinctKmstVersion),C(a.jsonOptimizedTrackIdCopy)},onHide:n,children:[Object(y.b)(Yt.a.Header,{closeButton:!0,children:Object(y.b)(Yt.a.Title,{children:"Settings"})}),Object(y.b)(Yt.a.Body,{children:Object(y.b)(Pe.a,{children:Object(y.b)(y.a,{children:Object(y.c)("div",{css:Object(f.a)(kt||(kt=Object(b.a)(["\n display: flex;\n flex-direction: column;\n "]))),children:[Object(y.b)($t,{id:"minorTrack",label:"Hide Minor Tracks",checked:s,tooltip:"Minor tracks feature segments of another song",onChange:function(){u((function(e){return!e}))}}),Object(y.b)($t,{id:"distinctKmstVersion",label:"Distinct KMST Version",checked:j,tooltip:"Prevent collisions resulting from KMST version reset",onChange:function(){m((function(e){return!e}))}}),Object(y.b)($t,{id:"jsonOptimizedTrackIdCopy",label:"JSON Optimized Track ID Copy",checked:v,tooltip:"Wrap track ID in JSON compatible syntax",onChange:function(){C((function(e){return!e}))}})]})})})}),Object(y.b)(Yt.a.Footer,{children:Object(y.b)(_e.a,{variant:"primary",onClick:function(){c({hideMinorTracks:s,distinctKmstVersion:j,jsonOptimizedTrackIdCopy:v}),n()},children:"Save"})})]})},Zt=function(e){var t=e.theme,n=e.margin,r="light"===t?"fa fa-sun":"fa fa-moon";return Object(y.b)("i",{className:r,css:Object(f.a)(wt||(wt=Object(b.a)(["\n width: 16px;\n height: 16px;\n text-align: center;\n margin-right: ",";\n "])),n?"5px":void 0)})},en=n(199),tn=n(309),nn=function(){var e=L(),t=$e(),n=Object(i.useState)(t),r=Object(d.a)(n,2),a=r[0],c=r[1],o=Object(J.useAtomValue)(ce),l=Object(i.useMemo)((function(){return function(){var e=localStorage.getItem(ee);if(e){var t=JSON.parse(e);return ae(t)}return new Map}()}),[]),s=Object(J.useAtom)(H),u=Object(d.a)(s,2),h=u[0],O=u[1],j=Object(J.useSetAtom)(X),m=Object(i.useRef)(null),p=Object(i.useState)([]),g=Object(d.a)(p,2),v=g[0],C=g[1],k=Object(i.useMemo)((function(){return Array.from(o.values()).map((function(e){return{value:e.name,label:e.name}}))}),[o]),w=Object(i.useMemo)((function(){return Array.from(l.values()).map((function(e){return{value:e.name,label:"[Custom] ".concat(e.name),custom:!0}}))}),[l]),x=Object(i.useMemo)((function(){return[].concat(Object(ft.a)(k),Object(ft.a)(w))}),[k,w]),A=Object(J.useSetAtom)(oe),B=Object(J.useAtom)(le),M=Object(d.a)(B,2),N=M[0],T=M[1];Object(i.useEffect)((function(){O(V)}),[O]),Object(i.useEffect)((function(){if(t.length)if(v&&v.length){var e,n=new Set,r=Object(Z.a)(v);try{for(r.s();!(e=r.n()).done;){var a=e.value,i=(a.custom?l:o).get(a.value);if(!i)return;i.tracks.forEach((function(e){return n.add(e)}))}}catch(d){r.e(d)}finally{r.f()}var s=Array.from(n),u=t.filter((function(e){var t=te(e.source.structure,e.filename);return n.has(t)})),b=Object(tn.a)(u,(function(e){var t=te(e.source.structure,e.filename);return s.indexOf(t)}));c(b)}else c(t)}),[t,o,l,v]);return Object(y.c)("div",{children:[void 0===h.currentSong?Object(y.b)(Le,{noText:!0}):Object(y.b)(We,{playingState:h,setCurrentQueueSong:function(e){j(!0),O((function(t){return Object(S.a)(Object(S.a)({},t),{},{currentSong:t.currentQueue[e].youtube,currentQueueSong:e})}))}}),Object(y.c)("div",{css:Object(f.a)(xt||(xt=Object(b.a)(["\n display: flex;\n margin: 10px 25vw;\n justify-content: center;\n align-items: center;\n height: 46px;\n "]))),children:[Object(y.b)(en.a,{css:Object(f.a)(At||(At=Object(b.a)(["\n width: 100%;\n "]))),classNamePrefix:e.darkMode?"playlist-select-dark":"playlist-select",isMulti:!0,options:x,ref:m,value:v,onChange:function(e){C(e),A(e.map((function(e){return e.value})))},placeholder:"Select playlist"}),Object(y.c)(Je.a,{css:Object(f.a)(Bt||(Bt=Object(b.a)(["\n height: 100%;\n "]))),children:[Object(y.b)(Je.a.Toggle,{css:Object(f.a)(Mt||(Mt=Object(b.a)(["\n height: 100%;\n "]))),variant:"outline-primary",children:Object(y.b)("i",{className:"fa fa-cog"})}),Object(y.c)(Je.a.Menu,{children:[Object(y.b)(Ve,{actionName:"Copy Export Set",iconClass:"fa fa-copy",onClick:function(){var e=Array.from(N),t=JSON.stringify(e,null,2);navigator.clipboard.writeText(t)}}),Object(y.b)(Ve,{actionName:"Clear Export Set",iconClass:"fa fa-trash",onClick:function(){T(new Set)}})]})]})]}),Object(y.b)(Ke,{}),Object(y.b)(Ee,{dataSource:a,disableInitSort:!0,enableTrackIdCol:!0})]})},rn=new FileReader,an=function(){var e=Object(i.useState)(void 0),t=Object(d.a)(e,2),n=t[0],r=t[1],a=Object(i.useState)(""),c=Object(d.a)(a,2),o=c[0],l=c[1];return Object(i.useEffect)((function(){rn.onload=function(){var e=rn.result;if("string"===typeof e)try{var t=JSON.parse(e);if(null===t||void 0===t?void 0:t.length){var n,r=Object(Z.a)(t);try{for(r.s();!(n=r.n()).done;){var a=n.value;if(!re(a))return void l("Incorrect JSON structure")}}catch(c){r.e(c)}finally{r.f()}ne(t)}else{if(!re(t))return void l("Incorrect JSON structure");ne([t])}}catch(o){l("Cannot parse JSON")}else l("File content not string")}}),[]),Object(y.c)("div",{children:[Object(y.c)("div",{css:Object(f.a)(Nt||(Nt=Object(b.a)(["\n @media (min-width: 1024px) {\n margin-right: 33vw;\n }\n "]))),children:[Object(y.b)("h2",{children:"Playlist Builder"}),Object(y.c)("p",{children:["Import and export custom playlists. JSON structure can be found"," ",Object(y.b)("a",{href:"https://github.com/maplestory-music/maplebgm-db/blob/master/playlist/blockbuster/BlackHeaven.jsonc",target:"_blank",rel:"noreferrer",children:"here"}),"; track IDs may be copied from the Playlist page. Tracks can also be added to and removed from the Export Set on the Playlist page. The Export Set can be copied and cleared from the Playlist Settings dropdown."]}),Object(y.b)("p",{css:Object(f.a)(Tt||(Tt=Object(b.a)(["\n color: red;\n "]))),children:"All custom playlists are stored in the browser's localStorage and may be cleared without notice. Export frequently and use at your own risk."})]}),Object(y.c)("div",{css:Object(f.a)(Dt||(Dt=Object(b.a)(["\n margin: 10px 0;\n "]))),children:[Object(y.b)("h4",{children:"Import"}),Object(y.b)("div",{css:Object(f.a)(Et||(Et=Object(b.a)(["\n margin: 10px 0;\n "]))),children:Object(y.c)("span",{children:["Import custom playlists from a JSON file."," ",Object(y.b)("span",{css:Object(f.a)(Ft||(Ft=Object(b.a)(["\n color: red;\n "]))),children:"This will overwrite existing custom playlists."})]})}),Object(y.c)("div",{children:[Object(y.b)("input",{type:"file",accept:".json",onChange:function(e){e.target.files&&e.target.files.length&&r(e.target.files[0])},onClick:function(){l("")}}),Object(y.b)("button",{onClick:function(){n&&("application/json"===n.type?rn.readAsText(n):l("File type not JSON"))},children:"Import"}),o&&Object(y.c)("div",{css:Object(f.a)(It||(It=Object(b.a)(["\n color: red;\n "]))),children:["Error: ",o]})]})]}),Object(y.c)("div",{css:Object(f.a)(zt||(zt=Object(b.a)(["\n margin: 20px 0;\n "]))),children:[Object(y.b)("h4",{children:"Export"}),Object(y.b)("div",{css:Object(f.a)(Qt||(Qt=Object(b.a)(["\n margin: 10px 0;\n "]))),children:Object(y.b)("span",{children:"Export all custom playlists into a JSON file."})}),Object(y.b)("div",{children:Object(y.b)("button",{onClick:function(){var e=null,t=function(){var e=localStorage.getItem(ee);if(e)try{return JSON.parse(e)}catch(t){throw new Error("Error parsing JSON from localStorage")}return[]}(),n=JSON.stringify(t,null,2);if(n&&t.length){var r=document.createElement("a");r.setAttribute("download","maplestory-custom-playlists.json"),r.href=function(){var t=new Blob([n],{type:"application/json"});return null!==e&&window.URL.revokeObjectURL(e),e=window.URL.createObjectURL(t)}(),r.click()}else window.alert("Nothing to export")},children:"Export"})})]}),Object(y.c)("div",{css:Object(f.a)(_t||(_t=Object(b.a)(["\n margin: 20px 0;\n "]))),children:[Object(y.b)("h4",{children:"Reset"}),Object(y.b)("div",{css:Object(f.a)(Rt||(Rt=Object(b.a)(["\n margin: 10px 0;\n "]))),children:Object(y.b)("span",{children:"If there are any issues, you can wipe all custom playlists."})}),Object(y.b)("div",{children:Object(y.b)("button",{onClick:function(){window.confirm("Wipe all custom playlists?")&&localStorage.removeItem(ee)},children:"Wipe"})})]})]})},cn=Object(j.a)(),on=function(e){e.currentTarget.pathname===window.location.pathname&&e.preventDefault()},ln=function(){var e,t,n,r=Object(_.a)().i18n,a=L(),c=Object(i.useState)(!1),o=Object(d.a)(c,2),l=o[0],s=o[1];return Object(y.c)(y.a,{children:[Object(y.c)(m.a,{css:Object(f.a)(Wt||(Wt=Object(b.a)(["\n margin-bottom: 10px;\n "]))),bg:"dark",variant:"dark",expand:"lg",children:[Object(y.c)(m.a.Brand,{css:Object(f.a)(Lt||(Lt=Object(b.a)(["\n margin-left: 1rem;\n "]))),as:h.a,to:"/",onClick:on,children:[Object(y.b)("img",{css:Object(f.a)(Pt||(Pt=Object(b.a)(["\n margin-right: 8px;\n "]))),alt:"",src:"./assets/pb-logo.svg",width:"30",height:"30",className:"d-inline-block align-top"})," ","MapleStory Music"]}),Object(y.b)(m.a.Toggle,{"aria-controls":"basic-navbar-nav"}),Object(y.b)(m.a.Collapse,{id:"basic-navbar-nav",children:Object(y.c)(p.a,{className:"mr-auto",children:[Object(y.b)(p.a.Link,{as:h.b,exact:!0,to:"/",onClick:on,children:"Home"}),Object(y.b)(p.a.Link,{as:h.b,exact:!0,to:"/playlist",onClick:on,children:"Playlist"}),Object(y.b)(p.a.Link,{as:h.b,exact:!0,to:"/stats",onClick:on,children:"Stats"}),Object(y.b)(p.a.Link,{as:h.b,exact:!0,to:"/about",onClick:on,children:"About"}),Object(y.b)(g.a,{title:"Extras",children:Object(y.b)(g.a.Item,{as:h.b,exact:!0,to:"/playlist-builder",onClick:on,children:"Playlist Builder"})}),Object(y.c)(g.a,{title:a.darkMode?Object(y.b)(Zt,{theme:"dark"}):Object(y.b)(Zt,{theme:"light"}),children:[Object(y.c)(g.a.Item,{active:!a.darkMode,onClick:function(){a.darkMode&&(darkmode.setDarkMode(!1),gtag("event","ce_ui_light",{ce_category:"ui",ce_source:"navbar"}))},children:[Object(y.b)(Zt,{theme:"light",margin:!0}),"Light"]}),Object(y.c)(g.a.Item,{active:a.darkMode,onClick:function(){a.darkMode||(darkmode.setDarkMode(!0),gtag("event","ce_ui_dark",{ce_category:"ui",ce_source:"navbar"}))},children:[Object(y.b)(Zt,{theme:"dark",margin:!0}),"Dark"]})]}),Object(y.c)(g.a,{title:Object(y.b)("i",{className:"fa fa-earth-americas"}),children:[Object(y.b)(g.a.Item,{active:null===(e=r.language)||void 0===e?void 0:e.startsWith("en"),onClick:function(){return r.changeLanguage("en")},children:"English"}),Object(y.b)(g.a.Item,{active:null===(t=r.language)||void 0===t?void 0:t.startsWith("ko"),onClick:function(){return r.changeLanguage("ko")},children:"Korean"}),Object(y.b)(g.a.Item,{active:null===(n=r.language)||void 0===n?void 0:n.startsWith("ja"),onClick:function(){return r.changeLanguage("ja")},children:"Japanese"}),Object(y.b)(g.a.Item,{active:"zh-CN"===r.language,onClick:function(){return r.changeLanguage("zh-CN")},children:"Chinese (Simplified)"}),Object(y.b)(g.a.Item,{active:"zh-TW"===r.language,onClick:function(){return r.changeLanguage("zh-TW")},children:"Chinese (Traditional)"})]}),Object(y.b)(p.a.Link,{as:h.b,to:"#",onClick:function(){return s(!0)},children:Object(y.b)("i",{className:"fa fa-cog"})})]})})]}),Object(y.b)(Xt,{show:l,onModalClose:function(){return s(!1)}})]})},sn=function(){var e,t,n=null!==(e="2916c3e")?e:"Dev",r=null!==(t="2024-08-09")?t:Object(Ht.a)(new Date,{representation:"date"});return Object(y.b)("div",{css:Object(f.a)(Gt||(Gt=Object(b.a)(["\n text-align: center;\n margin-bottom: 10px;\n "]))),className:"footer",children:Object(y.b)("span",{children:"Build: ".concat(n," (").concat(r,")")})})},un="MapleStory Music - BGM & OST Database",bn={"/":un,"/playlist":"".concat(un," - Playlist"),"/stats":"".concat(un," - Stats"),"/about":"".concat(un," - About"),"/playlist-builder":"".concat(un," - Playlist Builder")},dn=function(){var e=Object(O.f)();return Object(i.useEffect)((function(){var t;document.title=null!==(t=bn[e.pathname])&&void 0!==t?t:un}),[e]),Object(y.b)("main",{children:Object(y.c)(O.c,{children:[Object(y.b)(O.a,{exact:!0,path:"/",component:fn}),Object(y.b)(O.a,{path:"/playlist",component:hn}),Object(y.b)(O.a,{path:"/stats",component:jn}),Object(y.b)(O.a,{path:"/about",component:On}),Object(y.b)(O.a,{path:"/playlist-builder",component:mn})]})})},fn=function(){return Object(y.b)("div",{className:"App",children:Object(y.b)(Xe,{})})},hn=function(){return Object(y.b)("div",{className:"App",children:Object(y.b)(nn,{})})},On=function(){return Object(y.b)("div",{css:Object(f.a)(Jt||(Jt=Object(b.a)(["\n margin: 2% 3% 3% 3%;\n "]))),className:"About",children:Object(y.b)(C,{})})},jn=function(){return Object(y.b)("div",{css:Object(f.a)(Vt||(Vt=Object(b.a)(["\n margin: 2% 3% 1% 3%;\n "]))),className:"Stats",children:Object(y.b)(qt,{})})},mn=function(){return Object(y.b)("div",{css:Object(f.a)(Ut||(Ut=Object(b.a)(["\n margin: 2% 3% 3% 3%;\n "]))),className:"About",children:Object(y.b)(an,{})})},pn=function(){return Object(y.b)(W,{children:Object(y.b)(Me,{children:Object(y.b)(Ye,{children:Object(y.b)(O.b,{history:cn,children:Object(y.c)("div",{children:[Object(y.b)(ln,{}),Object(y.b)(dn,{}),Object(y.b)(sn,{})]})})})})})},gn=n(200),vn=n(116),yn=n(201);gn.a.use(yn.a).use(vn.e).init({fallbackLng:{zh:["zh-TW","zh-CN","en"],default:["en"]},nonExplicitSupportedLngs:!0,supportedLngs:["en","ko","ja","zh"]});Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));u.a.render(Object(M.jsx)(l.a.StrictMode,{children:Object(M.jsx)(i.Suspense,{fallback:Object(M.jsx)("div",{children:"Loading..."}),children:Object(M.jsx)(pn,{})})}),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()})).catch((function(e){console.error(e.message)}))}},[[291,1,2]]]);
\ No newline at end of file