function loadAudio(){function g(l,k){var r={container:l,audio:k,mini:null,fixed:null,autoplay:!1,mutex:!0,lrcType:3,listFolded:!1,preload:"auto",theme:"#2980b9",loop:"all",order:"list",volume:null,listMaxHeight:null,customAudioType:null,storageName:"sakura"};if(k.length){k[0].lrc||(r.lrcType=0);var q={};for(var p in r){var o=p.toLowerCase();(l.dataset.hasOwnProperty(o)||l.dataset.hasOwnProperty(p)||null!==r[p])&&(q[p]=l.dataset[o]||l.dataset[p]||r[p],("true"===q[p]||"false"===q[p])&&(q[p]="true"==q[p]))}ap.push(new APlayer(q))}for(var o=0;o<ap.length;o++){try{if($(ap[o].container).is(".aplayer-fixed")){ap[o].lrc.hide()}}catch(l){console.log(l)}}var m=1;$(".aplayer.aplayer-fixed").click(function(){if(m==1){for(var c=0;c<globalAp.length;c++){try{globalAp[c].lrc.show()}catch(b){console.log(b)}}}m=2});var n=0;$(".aplayer.aplayer-fixed .aplayer-body").addClass("ap-hover");$(".aplayer-miniswitcher").click(function(){if(n==0){$(".aplayer.aplayer-fixed .aplayer-body").removeClass("ap-hover");n=1}else{$(".aplayer.aplayer-fixed .aplayer-body").addClass("ap-hover");n=0}});if(l.dataset.global=="true"){globalAp.push(ap.pop())}}var f="https://api.lixingyong.com/api/:server?type=:type&id=:id&r=:r";"undefined"!=typeof audio_api&&(f=audio_api);for(var j=document.querySelectorAll(".aplayer"),i=function(){var k=j[h],e=k.dataset.id;isGlobal=k.dataset.global;if(isGlobal=="true"){for(var a=0;a<globalAp.length;a++){if(globalAp[a].container==k){return}}}if(e){var c=k.dataset.api||f;c=c.replace(":server",k.dataset.server),c=c.replace(":type",k.dataset.type),c=c.replace(":id",k.dataset.id),c=c.replace(":auth",k.dataset.auth),c=c.replace(":r",Math.random());var b=new XMLHttpRequest;b.onreadystatechange=function(){if(4===b.readyState&&(200<=b.status&&300>b.status||304===b.status)){var d=JSON.parse(b.responseText);g(k,d)}},b.open("get",c,true),b.send(null)}else{if(k.dataset.url){var a=[{name:k.dataset.name||k.dataset.title||"Audio name",artist:k.dataset.artist||k.dataset.author||"Audio artist",url:k.dataset.url,cover:k.dataset.cover||k.dataset.pic,lrc:k.dataset.lrc,type:k.dataset.type||"auto"}];g(k,a)}}},h=0;h<j.length;h++){i()}}function reloadAplayer(){for(var d=0;d<ap.length;d++){try{ap[d].destroy();ap.splice(d,1)}catch(c){}}loadAudio()}var ap=[];var globalAp=[];document.addEventListener("DOMContentLoaded",function(){reloadAplayer()});