@chenghongyu/xpt-file-viewer 1.1.10 → 1.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ import{ref as e,watch as t,onMounted as n,nextTick as i,onUnmounted as a,openBlock as r,createElementBlock as o,createElementVNode as l}from"vue";import{g as s}from"./_commonjsHelpers-CXUWDbkB.mjs";import{ElMessage as u}from"element-plus";import{_ as c}from"./main-CxM1-xky.mjs";var p,d={exports:{}};const h=/* @__PURE__ */s((p||(p=1,window,d.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var a=t[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=41)}([function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=/mobile/i.test(window.navigator.userAgent),a={secondToTime:function(e){var t=Math.floor(e/3600),n=Math.floor((e-3600*t)/60),i=Math.floor(e-3600*t-60*n);return(t>0?[t,n,i]:[n,i]).map(function(e){return e<10?"0"+e:""+e}).join(":")},getElementViewLeft:function(e){var t=e.offsetLeft,n=e.offsetParent,i=document.body.scrollLeft+document.documentElement.scrollLeft;if(document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement)for(;null!==n&&n!==e;)t+=n.offsetLeft,n=n.offsetParent;else for(;null!==n;)t+=n.offsetLeft,n=n.offsetParent;return t-i},getElementViewTop:function(e,t){for(var n,i=e.offsetTop,a=e.offsetParent;null!==a;)i+=a.offsetTop,a=a.offsetParent;return n=document.body.scrollTop+document.documentElement.scrollTop,t?i:i-n},isMobile:i,storage:{set:function(e,t){localStorage.setItem(e,t)},get:function(e){return localStorage.getItem(e)}},nameMap:{dragStart:i?"touchstart":"mousedown",dragMove:i?"touchmove":"mousemove",dragEnd:i?"touchend":"mouseup"},randomOrder:function(e){return function(e){for(var t=e.length-1;t>=0;t--){var n=Math.floor(Math.random()*(t+1)),i=e[n];e[n]=e[t],e[t]=i}return e}([].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(Array(e))).map(function(e,t){return t}))}};t.default=a},function(e,t,n){var i=n(2);e.exports=function(e){e=e||{};var t="",n=i.$each,a=e.audio,r=(e.$value,e.$index,i.$escape),o=e.theme,l=e.index;return n(a,function(e,n){t+='\n<li>\n <span class="aplayer-list-cur" style="background-color: ',t+=r(e.theme||o),t+=';"></span>\n <span class="aplayer-list-index">',t+=r(n+l),t+='</span>\n <span class="aplayer-list-title">',t+=r(e.name),t+='</span>\n <span class="aplayer-list-author">',t+=r(e.artist),t+="</span>\n</li>\n"}),t}},function(e,t,n){e.exports=n(15)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=g(n(33)),a=g(n(32)),r=g(n(31)),o=g(n(30)),l=g(n(29)),s=g(n(28)),u=g(n(27)),c=g(n(26)),p=g(n(25)),d=g(n(24)),h=g(n(23)),y=g(n(22)),f=g(n(21)),v=g(n(20)),m=g(n(19));function g(e){return e&&e.__esModule?e:{default:e}}var w={play:i.default,pause:a.default,volumeUp:r.default,volumeDown:o.default,volumeOff:l.default,orderRandom:s.default,orderList:u.default,menu:c.default,loopAll:p.default,loopOne:d.default,loopNone:h.default,loading:y.default,right:f.default,skip:v.default,lrc:m.default};t.default=w},function(e,t,n){var i,a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};i=/* @__PURE__ */function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(r){"object"===("undefined"==typeof window?"undefined":a(window))&&(i=window)}e.exports=i},function(e,t,n){var i,a,r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};void 0===(a="function"==typeof(i=function(){if("object"===("undefined"==typeof window?"undefined":r(window))&&void 0!==document.querySelectorAll&&void 0!==window.pageYOffset&&void 0!==history.pushState){var e=function(e,t,n,i){return n>i?t:e+(t-e)*((a=n/i)<.5?4*a*a*a:(a-1)*(2*a-2)*(2*a-2)+1);var a},t=function(t,n,i,a){n=n||500;var r,o,l=(a=a||window).scrollTop||window.pageYOffset;if("number"==typeof t)var s=parseInt(t);else o=l,s="HTML"===(r=t).nodeName?-o:r.getBoundingClientRect().top+o;var u=Date.now(),c=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(e){window.setTimeout(e,15)};!function r(){var o=Date.now()-u;a!==window?a.scrollTop=e(l,s,o,n):window.scroll(0,e(l,s,o,n)),o>n?"function"==typeof i&&i(t):c(r)}()},n=function(e){if(!e.defaultPrevented){e.preventDefault(),location.hash!==this.hash&&window.history.pushState(null,null,this.hash);var n=document.getElementById(this.hash.substring(1));if(!n)return;t(n,500,function(e){location.replace("#"+e.id)})}};return document.addEventListener("DOMContentLoaded",function(){for(var e,t=document.querySelectorAll('a[href^="#"]:not([href="#"])'),i=t.length;e=t[--i];)e.addEventListener("click",n,!1)}),t}})?i.call(t,n,t,e):i)||(e.exports=a)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=/* @__PURE__ */function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=l(n(1)),r=l(n(0)),o=l(n(5));function l(e){return e&&e.__esModule?e:{default:e}}var s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.player=t,this.index=0,this.audios=this.player.options.audio,this.bindEvents()}return i(e,[{key:"bindEvents",value:function(){var e=this;this.player.template.list.addEventListener("click",function(t){var n=void 0;n="LI"===t.target.tagName.toUpperCase()?t.target:t.target.parentElement;var i=parseInt(n.getElementsByClassName("aplayer-list-index")[0].innerHTML)-1;i!==e.index?(e.switch(i),e.player.play()):e.player.toggle()})}},{key:"show",value:function(){this.player.events.trigger("listshow"),this.player.template.list.classList.remove("aplayer-list-hide"),this.player.template.listOl.scrollTop=33*this.index}},{key:"hide",value:function(){this.player.events.trigger("listhide"),this.player.template.list.classList.add("aplayer-list-hide")}},{key:"toggle",value:function(){this.player.template.list.classList.contains("aplayer-list-hide")?this.show():this.hide()}},{key:"add",value:function(e){this.player.events.trigger("listadd",{audios:e}),"[object Array]"!==Object.prototype.toString.call(e)&&(e=[e]),e.map(function(e){return e.name=e.name||e.title||"Audio name",e.artist=e.artist||e.author||"Audio artist",e.cover=e.cover||e.pic,e.type=e.type||"normal",e});var t=!(this.audios.length>1),n=0===this.audios.length;this.player.template.listOl.innerHTML+=(0,a.default)({theme:this.player.options.theme,audio:e,index:this.audios.length+1}),this.audios=this.audios.concat(e),t&&this.audios.length>1&&this.player.container.classList.add("aplayer-withlist"),this.player.randomOrder=r.default.randomOrder(this.audios.length),this.player.template.listCurs=this.player.container.querySelectorAll(".aplayer-list-cur"),this.player.template.listCurs[this.audios.length-1].style.backgroundColor=e.theme||this.player.options.theme,n&&("random"===this.player.options.order?this.switch(this.player.randomOrder[0]):this.switch(0))}},{key:"remove",value:function(e){if(this.player.events.trigger("listremove",{index:e}),this.audios[e])if(this.audios.length>1){var t=this.player.container.querySelectorAll(".aplayer-list li");t[e].remove(),this.audios.splice(e,1),this.player.lrc&&this.player.lrc.remove(e),e===this.index&&(this.audios[e]?this.switch(e):this.switch(e-1)),this.index>e&&this.index--;for(var n=e;n<t.length;n++)t[n].getElementsByClassName("aplayer-list-index")[0].textContent=n;1===this.audios.length&&this.player.container.classList.remove("aplayer-withlist"),this.player.template.listCurs=this.player.container.querySelectorAll(".aplayer-list-cur")}else this.clear()}},{key:"switch",value:function(e){if(this.player.events.trigger("listswitch",{index:e}),void 0!==e&&this.audios[e]){this.index=e;var t=this.audios[this.index];this.player.template.pic.style.backgroundImage=t.cover?"url('"+t.cover+"')":"",this.player.theme(this.audios[this.index].theme||this.player.options.theme,this.index,!1),this.player.template.title.innerHTML=t.name,this.player.template.author.innerHTML=t.artist?" - "+t.artist:"";var n=this.player.container.getElementsByClassName("aplayer-list-light")[0];n&&n.classList.remove("aplayer-list-light"),this.player.container.querySelectorAll(".aplayer-list li")[this.index].classList.add("aplayer-list-light"),(0,o.default)(33*this.index,500,null,this.player.template.listOl),this.player.setAudio(t),this.player.lrc&&this.player.lrc.switch(this.index),this.player.lrc&&this.player.lrc.update(0),1!==this.player.duration&&(this.player.template.dtime.innerHTML=r.default.secondToTime(this.player.duration))}}},{key:"clear",value:function(){this.player.events.trigger("listclear"),this.index=0,this.player.container.classList.remove("aplayer-withlist"),this.player.pause(),this.audios=[],this.player.lrc&&this.player.lrc.clear(),this.player.audio.src="",this.player.template.listOl.innerHTML="",this.player.template.pic.style.backgroundImage="",this.player.theme(this.player.options.theme,this.index,!1),this.player.template.title.innerHTML="No audio",this.player.template.author.innerHTML="",this.player.bar.set("loaded",0,"width"),this.player.template.dtime.innerHTML=r.default.secondToTime(0)}}]),e}();t.default=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=/* @__PURE__ */function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.events={},this.audioEvents=["abort","canplay","canplaythrough","durationchange","emptied","ended","error","loadeddata","loadedmetadata","loadstart","mozaudioavailable","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],this.playerEvents=["destroy","listshow","listhide","listadd","listremove","listswitch","listclear","noticeshow","noticehide","lrcshow","lrchide"]}return i(e,[{key:"on",value:function(e,t){this.type(e)&&"function"==typeof t&&(this.events[e]||(this.events[e]=[]),this.events[e].push(t))}},{key:"trigger",value:function(e,t){if(this.events[e]&&this.events[e].length)for(var n=0;n<this.events[e].length;n++)this.events[e][n](t)}},{key:"type",value:function(e){return-1!==this.playerEvents.indexOf(e)?"player":-1!==this.audioEvents.indexOf(e)?"audio":(console.error("Unknown event name: "+e),null)}}]),e}();t.default=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=/* @__PURE__ */function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.player=t,window.requestAnimationFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)},this.types=["loading"],this.init()}return i(e,[{key:"init",value:function(){var e=this;this.types.forEach(function(t){e["init"+t+"Checker"]()})}},{key:"initloadingChecker",value:function(){var e=this,t=0,n=0,i=!1;this.loadingChecker=setInterval(function(){e.enableloadingChecker&&(n=e.player.audio.currentTime,i||n!==t||e.player.audio.paused||(e.player.container.classList.add("aplayer-loading"),i=!0),i&&n>t&&!e.player.audio.paused&&(e.player.container.classList.remove("aplayer-loading"),i=!1),t=n)},100)}},{key:"enable",value:function(e){this["enable"+e+"Checker"]=!0,"fps"===e&&this.initfpsChecker()}},{key:"disable",value:function(e){this["enable"+e+"Checker"]=!1}},{key:"destroy",value:function(){var e=this;this.types.forEach(function(t){e["enable"+t+"Checker"]=!1,e[t+"Checker"]&&clearInterval(e[t+"Checker"])})}}]),e}();t.default=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=/* @__PURE__ */function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=o(n(0)),r=o(n(3));function o(e){return e&&e.__esModule?e:{default:e}}var l=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.player=t,this.initPlayButton(),this.initPlayBar(),this.initOrderButton(),this.initLoopButton(),this.initMenuButton(),a.default.isMobile||this.initVolumeButton(),this.initMiniSwitcher(),this.initSkipButton(),this.initLrcButton()}return i(e,[{key:"initPlayButton",value:function(){var e=this;this.player.template.pic.addEventListener("click",function(){e.player.toggle()})}},{key:"initPlayBar",value:function(){var e=this,t=function(t){var n=((t.clientX||t.changedTouches[0].clientX)-a.default.getElementViewLeft(e.player.template.barWrap))/e.player.template.barWrap.clientWidth;n=Math.max(n,0),n=Math.min(n,1),e.player.bar.set("played",n,"width"),e.player.lrc&&e.player.lrc.update(n*e.player.duration),e.player.template.ptime.innerHTML=a.default.secondToTime(n*e.player.duration)},n=function n(i){document.removeEventListener(a.default.nameMap.dragEnd,n),document.removeEventListener(a.default.nameMap.dragMove,t);var r=((i.clientX||i.changedTouches[0].clientX)-a.default.getElementViewLeft(e.player.template.barWrap))/e.player.template.barWrap.clientWidth;r=Math.max(r,0),r=Math.min(r,1),e.player.bar.set("played",r,"width"),e.player.seek(e.player.bar.get("played","width")*e.player.duration),e.player.disableTimeupdate=!1};this.player.template.barWrap.addEventListener(a.default.nameMap.dragStart,function(){e.player.disableTimeupdate=!0,document.addEventListener(a.default.nameMap.dragMove,t),document.addEventListener(a.default.nameMap.dragEnd,n)})}},{key:"initVolumeButton",value:function(){var e=this;this.player.template.volumeButton.addEventListener("click",function(){e.player.audio.muted?(e.player.audio.muted=!1,e.player.switchVolumeIcon(),e.player.bar.set("volume",e.player.volume(),"height")):(e.player.audio.muted=!0,e.player.switchVolumeIcon(),e.player.bar.set("volume",0,"height"))});var t=function(t){var n=1-((t.clientY||t.changedTouches[0].clientY)-a.default.getElementViewTop(e.player.template.volumeBar,e.player.options.fixed))/e.player.template.volumeBar.clientHeight;n=Math.max(n,0),n=Math.min(n,1),e.player.volume(n)},n=function n(i){e.player.template.volumeBarWrap.classList.remove("aplayer-volume-bar-wrap-active"),document.removeEventListener(a.default.nameMap.dragEnd,n),document.removeEventListener(a.default.nameMap.dragMove,t);var r=1-((i.clientY||i.changedTouches[0].clientY)-a.default.getElementViewTop(e.player.template.volumeBar,e.player.options.fixed))/e.player.template.volumeBar.clientHeight;r=Math.max(r,0),r=Math.min(r,1),e.player.volume(r)};this.player.template.volumeBarWrap.addEventListener(a.default.nameMap.dragStart,function(){e.player.template.volumeBarWrap.classList.add("aplayer-volume-bar-wrap-active"),document.addEventListener(a.default.nameMap.dragMove,t),document.addEventListener(a.default.nameMap.dragEnd,n)})}},{key:"initOrderButton",value:function(){var e=this;this.player.template.order.addEventListener("click",function(){"list"===e.player.options.order?(e.player.options.order="random",e.player.template.order.innerHTML=r.default.orderRandom):"random"===e.player.options.order&&(e.player.options.order="list",e.player.template.order.innerHTML=r.default.orderList)})}},{key:"initLoopButton",value:function(){var e=this;this.player.template.loop.addEventListener("click",function(){e.player.list.audios.length>1?"one"===e.player.options.loop?(e.player.options.loop="none",e.player.template.loop.innerHTML=r.default.loopNone):"none"===e.player.options.loop?(e.player.options.loop="all",e.player.template.loop.innerHTML=r.default.loopAll):"all"===e.player.options.loop&&(e.player.options.loop="one",e.player.template.loop.innerHTML=r.default.loopOne):"one"===e.player.options.loop||"all"===e.player.options.loop?(e.player.options.loop="none",e.player.template.loop.innerHTML=r.default.loopNone):"none"===e.player.options.loop&&(e.player.options.loop="all",e.player.template.loop.innerHTML=r.default.loopAll)})}},{key:"initMenuButton",value:function(){var e=this;this.player.template.menu.addEventListener("click",function(){e.player.list.toggle()})}},{key:"initMiniSwitcher",value:function(){var e=this;this.player.template.miniSwitcher.addEventListener("click",function(){e.player.setMode("mini"===e.player.mode?"normal":"mini")})}},{key:"initSkipButton",value:function(){var e=this;this.player.template.skipBackButton.addEventListener("click",function(){e.player.skipBack()}),this.player.template.skipForwardButton.addEventListener("click",function(){e.player.skipForward()}),this.player.template.skipPlayButton.addEventListener("click",function(){e.player.toggle()})}},{key:"initLrcButton",value:function(){var e=this;this.player.template.lrcButton.addEventListener("click",function(){e.player.template.lrcButton.classList.contains("aplayer-icon-lrc-inactivity")?(e.player.template.lrcButton.classList.remove("aplayer-icon-lrc-inactivity"),e.player.lrc&&e.player.lrc.show()):(e.player.template.lrcButton.classList.add("aplayer-icon-lrc-inactivity"),e.player.lrc&&e.player.lrc.hide())})}}]),e}();t.default=l},function(e,t,n){var i=n(2);e.exports=function(e){e=e||{};var t="",n=i.$each,a=e.lyrics,r=(e.$value,e.$index,i.$escape);return n(a,function(e,n){t+="\n <p",0===n&&(t+=' class="aplayer-lrc-current"'),t+=">",t+=r(e[1]),t+="</p>\n"}),t}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i,a=/* @__PURE__ */function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=(i=n(10))&&i.__esModule?i:{default:i},o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.container=t.container,this.async=t.async,this.player=t.player,this.parsed=[],this.index=0,this.current=[]}return a(e,[{key:"show",value:function(){this.player.events.trigger("lrcshow"),this.player.template.lrcWrap.classList.remove("aplayer-lrc-hide")}},{key:"hide",value:function(){this.player.events.trigger("lrchide"),this.player.template.lrcWrap.classList.add("aplayer-lrc-hide")}},{key:"toggle",value:function(){this.player.template.lrcWrap.classList.contains("aplayer-lrc-hide")?this.show():this.hide()}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.player.audio.currentTime;if(this.index>this.current.length-1||e<this.current[this.index][0]||!this.current[this.index+1]||e>=this.current[this.index+1][0])for(var t=0;t<this.current.length;t++)e>=this.current[t][0]&&(!this.current[t+1]||e<this.current[t+1][0])&&(this.index=t,this.container.style.transform="translateY("+16*-this.index+"px)",this.container.style.webkitTransform="translateY("+16*-this.index+"px)",this.container.getElementsByClassName("aplayer-lrc-current")[0].classList.remove("aplayer-lrc-current"),this.container.getElementsByTagName("p")[t].classList.add("aplayer-lrc-current"))}},{key:"switch",value:function(e){var t=this;if(!this.parsed[e])if(this.async){this.parsed[e]=[["00:00","Loading"]];var n=new XMLHttpRequest;n.onreadystatechange=function(){e===t.player.list.index&&4===n.readyState&&(n.status>=200&&n.status<300||304===n.status?t.parsed[e]=t.parse(n.responseText):(t.player.notice("LRC file request fails: status "+n.status),t.parsed[e]=[["00:00","Not available"]]),t.container.innerHTML=(0,r.default)({lyrics:t.parsed[e]}),t.update(0),t.current=t.parsed[e])};var i=this.player.list.audios[e].lrc;n.open("get",i,!0),n.send(null)}else this.player.list.audios[e].lrc?this.parsed[e]=this.parse(this.player.list.audios[e].lrc):this.parsed[e]=[["00:00","Not available"]];this.container.innerHTML=(0,r.default)({lyrics:this.parsed[e]}),this.update(0),this.current=this.parsed[e]}},{key:"parse",value:function(e){if(e){for(var t=(e=e.replace(/([^\]^\n])\[/g,function(e,t){return t+"\n["})).split("\n"),n=[],i=t.length,a=0;a<i;a++){var r=t[a].match(/\[(\d{2}):(\d{2})(\.(\d{2,3}))?]/g),o=t[a].replace(/.*\[(\d{2}):(\d{2})(\.(\d{2,3}))?]/g,"").replace(/<(\d{2}):(\d{2})(\.(\d{2,3}))?>/g,"").replace(/^\s+|\s+$/g,"");if(r)for(var l=r.length,s=0;s<l;s++){var u=/\[(\d{2}):(\d{2})(\.(\d{2,3}))?]/.exec(r[s]),c=60*u[1]+parseInt(u[2])+(u[4]?parseInt(u[4])/(2===(u[4]+"").length?100:1e3):0);n.push([c,o])}}return(n=n.filter(function(e){return e[1]})).sort(function(e,t){return e[0]-t[0]}),n}return[]}},{key:"remove",value:function(e){this.parsed.splice(e,1)}},{key:"clear",value:function(){this.parsed=[],this.container.innerHTML=""}}]),e}();t.default=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i,a=/* @__PURE__ */function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=(i=n(0))&&i.__esModule?i:{default:i},o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.storageName=t.options.storageName,this.data=JSON.parse(r.default.storage.get(this.storageName)),this.data||(this.data={}),this.data.volume=this.data.volume||t.options.volume}return a(e,[{key:"get",value:function(e){return this.data[e]}},{key:"set",value:function(e,t){this.data[e]=t,r.default.storage.set(this.storageName,JSON.stringify(this.data))}}]),e}();t.default=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=/* @__PURE__ */function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.elements={},this.elements.volume=t.volume,this.elements.played=t.played,this.elements.loaded=t.loaded}return i(e,[{key:"set",value:function(e,t,n){t=Math.max(t,0),t=Math.min(t,1),this.elements[e].style[n]=100*t+"%"}},{key:"get",value:function(e,t){return parseFloat(this.elements[e].style[t])/100}}]),e}();t.default=a},function(e,t,n){(function(t){e.exports=!1;try{e.exports="[object process]"===Object.prototype.toString.call(t.process)}catch(n){}}).call(this,n(4))},function(e,t,n){(function(t){var i=n(14),a=Object.create(i?t:window),r=/["&'<>]/;a.$escape=function(e){return function(e){var t=""+e,n=r.exec(t);if(!n)return e;var i="",a=void 0,o=void 0,l=void 0;for(a=n.index,o=0;a<t.length;a++){switch(t.charCodeAt(a)){case 34:l="&#34;";break;case 38:l="&#38;";break;case 39:l="&#39;";break;case 60:l="&#60;";break;case 62:l="&#62;";break;default:continue}o!==a&&(i+=t.substring(o,a)),o=a+1,i+=l}return o!==a?i+t.substring(o,a):i}(function e(t){return"string"!=typeof t&&(t=null==t?"":"function"==typeof t?e(t.call(t)):JSON.stringify(t)),t}(e))},a.$each=function(e,t){if(Array.isArray(e))for(var n=0,i=e.length;n<i;n++)t(e[n],n);else for(var a in e)t(e[a],a)},e.exports=a}).call(this,n(4))},function(e,t,n){var i=n(2);e.exports=function(e){var t="",a=(e=e||{}).options,r=e.cover,o=i.$escape,l=e.icons,s=function(e){return t+=e},u=e.getObject;return e.theme,e.audio,e.index,a.fixed?(t+='\n<div class="aplayer-list',a.listFolded&&(t+=" aplayer-list-hide"),t+='"',a.listMaxHeight&&(t+=' style="max-height: ',t+=o(a.listMaxHeight),t+='"'),t+=">\n <ol",a.listMaxHeight&&(t+=' style="max-height: ',t+=o(a.listMaxHeight),t+='"'),t+=">\n ",s(n(1)(u({theme:a.theme,audio:a.audio,index:1}))),t+='\n </ol>\n</div>\n<div class="aplayer-body">\n <div class="aplayer-pic" style="',r&&(t+="background-image: url(&quot;",t+=o(r),t+="&quot;);"),t+="background-color: ",t+=o(a.theme),t+=';">\n <div class="aplayer-button aplayer-play">',t+=l.play,t+='</div>\n </div>\n <div class="aplayer-info" style="display: none;">\n <div class="aplayer-music">\n <span class="aplayer-title">No audio</span>\n <span class="aplayer-author"></span>\n </div>\n <div class="aplayer-controller">\n <div class="aplayer-bar-wrap">\n <div class="aplayer-bar">\n <div class="aplayer-loaded" style="width: 0"></div>\n <div class="aplayer-played" style="width: 0; background: ',t+=o(a.theme),t+=';">\n <span class="aplayer-thumb" style="background: ',t+=o(a.theme),t+=';">\n <span class="aplayer-loading-icon">',t+=l.loading,t+='</span>\n </span>\n </div>\n </div>\n </div>\n <div class="aplayer-time">\n <span class="aplayer-time-inner">\n <span class="aplayer-ptime">00:00</span> / <span class="aplayer-dtime">00:00</span>\n </span>\n <span class="aplayer-icon aplayer-icon-back">\n ',t+=l.skip,t+='\n </span>\n <span class="aplayer-icon aplayer-icon-play">\n ',t+=l.play,t+='\n </span>\n <span class="aplayer-icon aplayer-icon-forward">\n ',t+=l.skip,t+='\n </span>\n <div class="aplayer-volume-wrap">\n <button type="button" class="aplayer-icon aplayer-icon-volume-down">\n ',t+=l.volumeDown,t+='\n </button>\n <div class="aplayer-volume-bar-wrap">\n <div class="aplayer-volume-bar">\n <div class="aplayer-volume" style="height: 80%; background: ',t+=o(a.theme),t+=';"></div>\n </div>\n </div>\n </div>\n <button type="button" class="aplayer-icon aplayer-icon-order">\n ',"list"===a.order?t+=l.orderList:"random"===a.order&&(t+=l.orderRandom),t+='\n </button>\n <button type="button" class="aplayer-icon aplayer-icon-loop">\n ',"one"===a.loop?t+=l.loopOne:"all"===a.loop?t+=l.loopAll:"none"===a.loop&&(t+=l.loopNone),t+='\n </button>\n <button type="button" class="aplayer-icon aplayer-icon-menu">\n ',t+=l.menu,t+='\n </button>\n <button type="button" class="aplayer-icon aplayer-icon-lrc">\n ',t+=l.lrc,t+='\n </button>\n </div>\n </div>\n </div>\n <div class="aplayer-notice"></div>\n <div class="aplayer-miniswitcher"><button class="aplayer-icon">',t+=l.right,t+='</button></div>\n</div>\n<div class="aplayer-lrc">\n <div class="aplayer-lrc-contents" style="transform: translateY(0); -webkit-transform: translateY(0);"></div>\n</div>\n'):(t+='\n<div class="aplayer-body">\n <div class="aplayer-pic" style="',r&&(t+="background-image: url(&quot;",t+=o(r),t+="&quot;);"),t+="background-color: ",t+=o(a.theme),t+=';">\n <div class="aplayer-button aplayer-play">',t+=l.play,t+='</div>\n </div>\n <div class="aplayer-info">\n <div class="aplayer-music">\n <span class="aplayer-title">No audio</span>\n <span class="aplayer-author"></span>\n </div>\n <div class="aplayer-lrc">\n <div class="aplayer-lrc-contents" style="transform: translateY(0); -webkit-transform: translateY(0);"></div>\n </div>\n <div class="aplayer-controller">\n <div class="aplayer-bar-wrap">\n <div class="aplayer-bar">\n <div class="aplayer-loaded" style="width: 0"></div>\n <div class="aplayer-played" style="width: 0; background: ',t+=o(a.theme),t+=';">\n <span class="aplayer-thumb" style="background: ',t+=o(a.theme),t+=';">\n <span class="aplayer-loading-icon">',t+=l.loading,t+='</span>\n </span>\n </div>\n </div>\n </div>\n <div class="aplayer-time">\n <span class="aplayer-time-inner">\n <span class="aplayer-ptime">00:00</span> / <span class="aplayer-dtime">00:00</span>\n </span>\n <span class="aplayer-icon aplayer-icon-back">\n ',t+=l.skip,t+='\n </span>\n <span class="aplayer-icon aplayer-icon-play">\n ',t+=l.play,t+='\n </span>\n <span class="aplayer-icon aplayer-icon-forward">\n ',t+=l.skip,t+='\n </span>\n <div class="aplayer-volume-wrap">\n <button type="button" class="aplayer-icon aplayer-icon-volume-down">\n ',t+=l.volumeDown,t+='\n </button>\n <div class="aplayer-volume-bar-wrap">\n <div class="aplayer-volume-bar">\n <div class="aplayer-volume" style="height: 80%; background: ',t+=o(a.theme),t+=';"></div>\n </div>\n </div>\n </div>\n <button type="button" class="aplayer-icon aplayer-icon-order">\n ',"list"===a.order?t+=l.orderList:"random"===a.order&&(t+=l.orderRandom),t+='\n </button>\n <button type="button" class="aplayer-icon aplayer-icon-loop">\n ',"one"===a.loop?t+=l.loopOne:"all"===a.loop?t+=l.loopAll:"none"===a.loop&&(t+=l.loopNone),t+='\n </button>\n <button type="button" class="aplayer-icon aplayer-icon-menu">\n ',t+=l.menu,t+='\n </button>\n <button type="button" class="aplayer-icon aplayer-icon-lrc">\n ',t+=l.lrc,t+='\n </button>\n </div>\n </div>\n </div>\n <div class="aplayer-notice"></div>\n <div class="aplayer-miniswitcher"><button class="aplayer-icon">',t+=l.right,t+='</button></div>\n</div>\n<div class="aplayer-list',a.listFolded&&(t+=" aplayer-list-hide"),t+='"',a.listMaxHeight&&(t+=' style="max-height: ',t+=o(a.listMaxHeight),t+='"'),t+=">\n <ol",a.listMaxHeight&&(t+=' style="max-height: ',t+=o(a.listMaxHeight),t+='"'),t+=">\n ",s(n(1)(u({theme:a.theme,audio:a.audio,index:1}))),t+="\n </ol>\n</div>\n"),t}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=/* @__PURE__ */function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=o(n(3)),r=o(n(16));function o(e){return e&&e.__esModule?e:{default:e}}var l=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.container=t.container,this.options=t.options,this.randomOrder=t.randomOrder,this.init()}return i(e,[{key:"init",value:function(){var e="";this.options.audio.length&&(e="random"===this.options.order?this.options.audio[this.randomOrder[0]].cover:this.options.audio[0].cover),this.container.innerHTML=(0,r.default)({options:this.options,icons:a.default,cover:e,getObject:function(e){return e}}),this.lrc=this.container.querySelector(".aplayer-lrc-contents"),this.lrcWrap=this.container.querySelector(".aplayer-lrc"),this.ptime=this.container.querySelector(".aplayer-ptime"),this.info=this.container.querySelector(".aplayer-info"),this.time=this.container.querySelector(".aplayer-time"),this.barWrap=this.container.querySelector(".aplayer-bar-wrap"),this.button=this.container.querySelector(".aplayer-button"),this.body=this.container.querySelector(".aplayer-body"),this.list=this.container.querySelector(".aplayer-list"),this.listOl=this.container.querySelector(".aplayer-list ol"),this.listCurs=this.container.querySelectorAll(".aplayer-list-cur"),this.played=this.container.querySelector(".aplayer-played"),this.loaded=this.container.querySelector(".aplayer-loaded"),this.thumb=this.container.querySelector(".aplayer-thumb"),this.volume=this.container.querySelector(".aplayer-volume"),this.volumeBar=this.container.querySelector(".aplayer-volume-bar"),this.volumeButton=this.container.querySelector(".aplayer-time button"),this.volumeBarWrap=this.container.querySelector(".aplayer-volume-bar-wrap"),this.loop=this.container.querySelector(".aplayer-icon-loop"),this.order=this.container.querySelector(".aplayer-icon-order"),this.menu=this.container.querySelector(".aplayer-icon-menu"),this.pic=this.container.querySelector(".aplayer-pic"),this.title=this.container.querySelector(".aplayer-title"),this.author=this.container.querySelector(".aplayer-author"),this.dtime=this.container.querySelector(".aplayer-dtime"),this.notice=this.container.querySelector(".aplayer-notice"),this.miniSwitcher=this.container.querySelector(".aplayer-miniswitcher"),this.skipBackButton=this.container.querySelector(".aplayer-icon-back"),this.skipForwardButton=this.container.querySelector(".aplayer-icon-forward"),this.skipPlayButton=this.container.querySelector(".aplayer-icon-play"),this.lrcButton=this.container.querySelector(".aplayer-icon-lrc")}}]),e}();t.default=l},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t={container:e.element||document.getElementsByClassName("aplayer")[0],mini:e.narrow||e.fixed||!1,fixed:!1,autoplay:!1,mutex:!0,lrcType:e.showlrc||e.lrc||0,preload:"auto",theme:"#b7daff",loop:"all",order:"list",volume:.7,listFolded:e.fixed,listMaxHeight:e.listmaxheight||"250px",audio:e.music||[],storageName:"aplayer-setting"};for(var n in t)t.hasOwnProperty(n)&&!e.hasOwnProperty(n)&&(e[n]=t[n]);return"[object Array]"!==Object.prototype.toString.call(e.audio)&&(e.audio=[e.audio]),e.audio.map(function(e){return e.name=e.name||e.title||"Audio name",e.artist=e.artist||e.author||"Audio artist",e.cover=e.cover||e.pic,e.type=e.type||"normal",e}),e.audio.length<=1&&"one"===e.loop&&(e.loop="all"),e}},function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32"><path d="M26.667 5.333h-21.333c-0 0-0.001 0-0.001 0-1.472 0-2.666 1.194-2.666 2.666 0 0 0 0.001 0 0.001v-0 16c0 0 0 0.001 0 0.001 0 1.472 1.194 2.666 2.666 2.666 0 0 0.001 0 0.001 0h21.333c0 0 0.001 0 0.001 0 1.472 0 2.666-1.194 2.666-2.666 0-0 0-0.001 0-0.001v0-16c0-0 0-0.001 0-0.001 0-1.472-1.194-2.666-2.666-2.666-0 0-0.001 0-0.001 0h0zM5.333 16h5.333v2.667h-5.333v-2.667zM18.667 24h-13.333v-2.667h13.333v2.667zM26.667 24h-5.333v-2.667h5.333v2.667zM26.667 18.667h-13.333v-2.667h13.333v2.667z"></path></svg>'},function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32"><path d="M25.468 6.947c-0.326-0.172-0.724-0.151-1.030 0.057l-6.438 4.38v-3.553c0-0.371-0.205-0.71-0.532-0.884-0.326-0.172-0.724-0.151-1.030 0.057l-12 8.164c-0.274 0.186-0.438 0.496-0.438 0.827s0.164 0.641 0.438 0.827l12 8.168c0.169 0.115 0.365 0.174 0.562 0.174 0.16 0 0.321-0.038 0.468-0.116 0.327-0.173 0.532-0.514 0.532-0.884v-3.556l6.438 4.382c0.169 0.115 0.365 0.174 0.562 0.174 0.16 0 0.321-0.038 0.468-0.116 0.327-0.173 0.532-0.514 0.532-0.884v-16.333c0-0.371-0.205-0.71-0.532-0.884z"></path></svg>'},function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32"><path d="M22 16l-10.105-10.6-1.895 1.987 8.211 8.613-8.211 8.612 1.895 1.988 8.211-8.613z"></path></svg>'},function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32"><path d="M4 16c0-6.6 5.4-12 12-12s12 5.4 12 12c0 1.2-0.8 2-2 2s-2-0.8-2-2c0-4.4-3.6-8-8-8s-8 3.6-8 8 3.6 8 8 8c1.2 0 2 0.8 2 2s-0.8 2-2 2c-6.6 0-12-5.4-12-12z"></path></svg>'},function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 29 32"><path d="M2.667 7.027l1.707-1.693 22.293 22.293-1.693 1.707-4-4h-11.64v4l-5.333-5.333 5.333-5.333v4h8.973l-8.973-8.973v0.973h-2.667v-3.64l-4-4zM22.667 17.333h2.667v5.573l-2.667-2.667v-2.907zM22.667 6.667v-4l5.333 5.333-5.333 5.333v-4h-10.907l-2.667-2.667h13.573z"></path></svg>'},function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 33 32"><path d="M9.333 9.333h13.333v4l5.333-5.333-5.333-5.333v4h-16v8h2.667v-5.333zM22.667 22.667h-13.333v-4l-5.333 5.333 5.333 5.333v-4h16v-8h-2.667v5.333zM17.333 20v-8h-1.333l-2.667 1.333v1.333h2v5.333h2z"></path></svg>'},function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 29 32"><path d="M9.333 9.333h13.333v4l5.333-5.333-5.333-5.333v4h-16v8h2.667v-5.333zM22.667 22.667h-13.333v-4l-5.333 5.333 5.333 5.333v-4h16v-8h-2.667v5.333z"></path></svg>'},function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 22 32"><path d="M20.8 14.4q0.704 0 1.152 0.48t0.448 1.12-0.48 1.12-1.12 0.48h-19.2q-0.64 0-1.12-0.48t-0.48-1.12 0.448-1.12 1.152-0.48h19.2zM1.6 11.2q-0.64 0-1.12-0.48t-0.48-1.12 0.448-1.12 1.152-0.48h19.2q0.704 0 1.152 0.48t0.448 1.12-0.48 1.12-1.12 0.48h-19.2zM20.8 20.8q0.704 0 1.152 0.48t0.448 1.12-0.48 1.12-1.12 0.48h-19.2q-0.64 0-1.12-0.48t-0.48-1.12 0.448-1.12 1.152-0.48h19.2z"></path></svg>'},function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32"><path d="M0.622 18.334h19.54v7.55l11.052-9.412-11.052-9.413v7.549h-19.54v3.725z"></path></svg>'},function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32"><path d="M22.667 4l7 6-7 6 7 6-7 6v-4h-3.653l-3.76-3.76 2.827-2.827 2.587 2.587h2v-8h-2l-12 12h-6v-4h4.347l12-12h3.653v-4zM2.667 8h6l3.76 3.76-2.827 2.827-2.587-2.587h-4.347v-4z"></path></svg>'},function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 28 32"><path d="M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8z"></path></svg>'},function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 28 32"><path d="M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8zM20.576 16q0 1.344-0.768 2.528t-2.016 1.664q-0.16 0.096-0.448 0.096-0.448 0-0.8-0.32t-0.32-0.832q0-0.384 0.192-0.64t0.544-0.448 0.608-0.384 0.512-0.64 0.192-1.024-0.192-1.024-0.512-0.64-0.608-0.384-0.544-0.448-0.192-0.64q0-0.48 0.32-0.832t0.8-0.32q0.288 0 0.448 0.096 1.248 0.48 2.016 1.664t0.768 2.528z"></path></svg>'},function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 28 32"><path d="M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8zM20.576 16q0 1.344-0.768 2.528t-2.016 1.664q-0.16 0.096-0.448 0.096-0.448 0-0.8-0.32t-0.32-0.832q0-0.384 0.192-0.64t0.544-0.448 0.608-0.384 0.512-0.64 0.192-1.024-0.192-1.024-0.512-0.64-0.608-0.384-0.544-0.448-0.192-0.64q0-0.48 0.32-0.832t0.8-0.32q0.288 0 0.448 0.096 1.248 0.48 2.016 1.664t0.768 2.528zM25.152 16q0 2.72-1.536 5.056t-4 3.36q-0.256 0.096-0.448 0.096-0.48 0-0.832-0.352t-0.32-0.8q0-0.704 0.672-1.056 1.024-0.512 1.376-0.8 1.312-0.96 2.048-2.4t0.736-3.104-0.736-3.104-2.048-2.4q-0.352-0.288-1.376-0.8-0.672-0.352-0.672-1.056 0-0.448 0.32-0.8t0.8-0.352q0.224 0 0.48 0.096 2.496 1.056 4 3.36t1.536 5.056zM29.728 16q0 4.096-2.272 7.552t-6.048 5.056q-0.224 0.096-0.448 0.096-0.48 0-0.832-0.352t-0.32-0.8q0-0.64 0.704-1.056 0.128-0.064 0.384-0.192t0.416-0.192q0.8-0.448 1.44-0.896 2.208-1.632 3.456-4.064t1.216-5.152-1.216-5.152-3.456-4.064q-0.64-0.448-1.44-0.896-0.128-0.096-0.416-0.192t-0.384-0.192q-0.704-0.416-0.704-1.056 0-0.448 0.32-0.8t0.832-0.352q0.224 0 0.448 0.096 3.776 1.632 6.048 5.056t2.272 7.552z"></path></svg>'},function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 17 32"><path d="M14.080 4.8q2.88 0 2.88 2.048v18.24q0 2.112-2.88 2.112t-2.88-2.112v-18.24q0-2.048 2.88-2.048zM2.88 4.8q2.88 0 2.88 2.048v18.24q0 2.112-2.88 2.112t-2.88-2.112v-18.24q0-2.048 2.88-2.048z"></path></svg>'},function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 16 31"><path d="M15.552 15.168q0.448 0.32 0.448 0.832 0 0.448-0.448 0.768l-13.696 8.512q-0.768 0.512-1.312 0.192t-0.544-1.28v-16.448q0-0.96 0.544-1.28t1.312 0.192z"></path></svg>'},function(e,t,n){var i,a,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function l(){throw new Error("clearTimeout has not been defined")}function s(e){if(i===setTimeout)return setTimeout(e,0);if((i===o||!i)&&setTimeout)return i=setTimeout,setTimeout(e,0);try{return i(e,0)}catch(t){try{return i.call(null,e,0)}catch(n){return i.call(this,e,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:o}catch(e){i=o}try{a="function"==typeof clearTimeout?clearTimeout:l}catch(e){a=l}}();var u,c=[],p=!1,d=-1;function h(){p&&u&&(p=!1,u.length?c=u.concat(c):d=-1,c.length&&y())}function y(){if(!p){var e=s(h);p=!0;for(var t=c.length;t;){for(u=c,c=[];++d<t;)u&&u[d].run();d=-1,t=c.length}u=null,p=!1,function(e){if(a===clearTimeout)return clearTimeout(e);if((a===l||!a)&&clearTimeout)return a=clearTimeout,clearTimeout(e);try{a(e)}catch(t){try{return a.call(null,e)}catch(n){return a.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function v(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new f(e,t)),1!==c.length||p||s(y)},f.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=v,r.addListener=v,r.once=v,r.off=v,r.removeListener=v,r.removeAllListeners=v,r.emit=v,r.prependListener=v,r.prependOnceListener=v,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(e,t,n){(function(e,t){!function(e,n){if(!e.setImmediate){var i,a,r,o,l,s=1,u={},c=!1,p=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?i=function(e){t.nextTick(function(){y(e)})}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?(o="setImmediate$"+Math.random()+"$",l=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&y(+t.data.slice(o.length))},e.addEventListener?e.addEventListener("message",l,!1):e.attachEvent("onmessage",l),i=function(t){e.postMessage(o+t,"*")}):e.MessageChannel?((r=new MessageChannel).port1.onmessage=function(e){y(e.data)},i=function(e){r.port2.postMessage(e)}):p&&"onreadystatechange"in p.createElement("script")?(a=p.documentElement,i=function(e){var t=p.createElement("script");t.onreadystatechange=function(){y(e),t.onreadystatechange=null,a.removeChild(t),t=null},a.appendChild(t)}):i=function(e){setTimeout(y,0,e)},d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var a={callback:e,args:t};return u[s]=a,i(s),s++},d.clearImmediate=h}function h(e){delete u[e]}function y(e){if(c)setTimeout(y,0,e);else{var t=u[e];if(t){c=!0;try{!function(e){var t=e.callback,i=e.args;switch(i.length){case 0:t();break;case 1:t(i[0]);break;case 2:t(i[0],i[1]);break;case 3:t(i[0],i[1],i[2]);break;default:t.apply(n,i)}}(t)}finally{h(e),c=!1}}}}}("undefined"==typeof self?void 0===e?void 0:e:self)}).call(this,n(4),n(34))},function(e,t,n){var i=Function.prototype.apply;function a(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new a(i.call(setTimeout,window,arguments),clearTimeout)},t.setInterval=function(){return new a(i.call(setInterval,window,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(window,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(35),t.setImmediate=setImmediate,t.clearImmediate=clearImmediate},function(e,t,n){(function(t){var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=setTimeout;function a(){}function r(e){if(!(this instanceof r))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],c(e,this)}function o(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,r._immediateFn(function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var i;try{i=n(e._value)}catch(a){return void s(t.promise,a)}l(t.promise,i)}else(1===e._state?l:s)(t.promise,e._value)})):e._deferreds.push(t)}function l(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"===(void 0===t?"undefined":n(t))||"function"==typeof t)){var i=t.then;if(t instanceof r)return e._state=3,e._value=t,void u(e);if("function"==typeof i)return void c((a=i,o=t,function(){a.apply(o,arguments)}),e)}e._state=1,e._value=t,u(e)}catch(l){s(e,l)}var a,o}function s(e,t){e._state=2,e._value=t,u(e)}function u(e){2===e._state&&0===e._deferreds.length&&r._immediateFn(function(){e._handled||r._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t<n;t++)o(e,e._deferreds[t]);e._deferreds=null}function c(e,t){var n=!1;try{e(function(e){n||(n=!0,l(t,e))},function(e){n||(n=!0,s(t,e))})}catch(i){if(n)return;n=!0,s(t,i)}}r.prototype.catch=function(e){return this.then(null,e)},r.prototype.then=function(e,t){var n=new this.constructor(a);return o(this,new function(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}(e,t,n)),n},r.prototype.finally=function(e){var t=this.constructor;return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){return t.reject(n)})})},r.all=function(e){return new r(function(t,i){if(!e||void 0===e.length)throw new TypeError("Promise.all accepts an array");var a=Array.prototype.slice.call(e);if(0===a.length)return t([]);var r=a.length;function o(e,l){try{if(l&&("object"===(void 0===l?"undefined":n(l))||"function"==typeof l)){var s=l.then;if("function"==typeof s)return void s.call(l,function(t){o(e,t)},i)}a[e]=l,0==--r&&t(a)}catch(u){i(u)}}for(var l=0;l<a.length;l++)o(l,a[l])})},r.resolve=function(e){return e&&"object"===(void 0===e?"undefined":n(e))&&e.constructor===r?e:new r(function(t){t(e)})},r.reject=function(e){return new r(function(t,n){n(e)})},r.race=function(e){return new r(function(t,n){for(var i=0,a=e.length;i<a;i++)e[i].then(t,n)})},r._immediateFn="function"==typeof t&&function(e){t(e)}||function(e){i(e,0)},r._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)},e.exports=r}).call(this,n(36).setImmediate)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=/* @__PURE__ */function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=v(n(37)),r=v(n(0)),o=v(n(3)),l=v(n(18)),s=v(n(17)),u=v(n(13)),c=v(n(12)),p=v(n(11)),d=v(n(9)),h=v(n(8)),y=v(n(7)),f=v(n(6));function v(e){return e&&e.__esModule?e:{default:e}}var m=[],g=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=(0,l.default)(t),this.container=this.options.container,this.paused=!0,this.playedPromise=a.default.resolve(),this.mode="normal",this.randomOrder=r.default.randomOrder(this.options.audio.length),this.container.classList.add("aplayer"),this.options.lrcType&&!this.options.fixed&&this.container.classList.add("aplayer-withlrc"),this.options.audio.length>1&&this.container.classList.add("aplayer-withlist"),r.default.isMobile&&this.container.classList.add("aplayer-mobile"),this.arrow=this.container.offsetWidth<=300,this.arrow&&this.container.classList.add("aplayer-arrow"),this.container=this.options.container,2===this.options.lrcType||!0===this.options.lrcType)for(var n=this.container.getElementsByClassName("aplayer-lrc-content"),i=0;i<n.length;i++)this.options.audio[i]&&(this.options.audio[i].lrc=n[i].innerHTML);this.template=new s.default({container:this.container,options:this.options,randomOrder:this.randomOrder}),this.options.fixed&&(this.container.classList.add("aplayer-fixed"),this.template.body.style.width=this.template.body.offsetWidth-18+"px"),this.options.mini&&(this.setMode("mini"),this.template.info.style.display="block"),this.template.info.offsetWidth<200&&this.template.time.classList.add("aplayer-time-narrow"),this.options.lrcType&&(this.lrc=new p.default({container:this.template.lrc,async:3===this.options.lrcType,player:this})),this.events=new y.default,this.storage=new c.default(this),this.bar=new u.default(this.template),this.controller=new d.default(this),this.timer=new h.default(this),this.list=new f.default(this),this.initAudio(),this.bindEvents(),"random"===this.options.order?this.list.switch(this.randomOrder[0]):this.list.switch(0),this.options.autoplay&&this.play(),m.push(this)}return i(e,[{key:"initAudio",value:function(){var e=this;this.audio=document.createElement("audio"),this.audio.preload=this.options.preload;for(var t=function(t){e.audio.addEventListener(e.events.audioEvents[t],function(n){e.events.trigger(e.events.audioEvents[t],n)})},n=0;n<this.events.audioEvents.length;n++)t(n);this.volume(this.storage.get("volume"),!0)}},{key:"bindEvents",value:function(){var e=this;this.on("play",function(){e.paused&&e.setUIPlaying()}),this.on("pause",function(){e.paused||e.setUIPaused()}),this.on("timeupdate",function(){if(!e.disableTimeupdate){e.bar.set("played",e.audio.currentTime/e.duration,"width"),e.lrc&&e.lrc.update();var t=r.default.secondToTime(e.audio.currentTime);e.template.ptime.innerHTML!==t&&(e.template.ptime.innerHTML=t)}}),this.on("durationchange",function(){1!==e.duration&&(e.template.dtime.innerHTML=r.default.secondToTime(e.duration))}),this.on("progress",function(){var t=e.audio.buffered.length?e.audio.buffered.end(e.audio.buffered.length-1)/e.duration:0;e.bar.set("loaded",t,"width")});var t=void 0;this.on("error",function(){e.list.audios.length>1?(e.notice("An audio error has occurred, player will skip forward in 2 seconds."),t=setTimeout(function(){e.skipForward(),e.paused||e.play()},2e3)):1===e.list.audios.length&&e.notice("An audio error has occurred.")}),this.events.on("listswitch",function(){t&&clearTimeout(t)}),this.on("ended",function(){"none"===e.options.loop?"list"===e.options.order?e.list.index<e.list.audios.length-1?(e.list.switch((e.list.index+1)%e.list.audios.length),e.play()):(e.list.switch((e.list.index+1)%e.list.audios.length),e.pause()):"random"===e.options.order&&(e.randomOrder.indexOf(e.list.index)<e.randomOrder.length-1?(e.list.switch(e.nextIndex()),e.play()):(e.list.switch(e.nextIndex()),e.pause())):"one"===e.options.loop?(e.list.switch(e.list.index),e.play()):"all"===e.options.loop&&(e.skipForward(),e.play())})}},{key:"setAudio",value:function(e){this.hls&&(this.hls.destroy(),this.hls=null);var t=e.type;this.options.customAudioType&&this.options.customAudioType[t]?"[object Function]"===Object.prototype.toString.call(this.options.customAudioType[t])?this.options.customAudioType[t](this.audio,e,this):console.error("Illegal customType: "+t):(t&&"auto"!==t||(t=/m3u8(#|\?|$)/i.exec(e.url)?"hls":"normal"),"hls"===t?Hls.isSupported()?(this.hls=new Hls,this.hls.loadSource(e.url),this.hls.attachMedia(this.audio)):this.audio.canPlayType("application/x-mpegURL")||this.audio.canPlayType("application/vnd.apple.mpegURL")?this.audio.src=e.url:this.notice("Error: HLS is not supported."):"normal"===t&&(this.audio.src=e.url)),this.seek(0),this.paused||this.audio.play()}},{key:"theme",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.list.audios[this.list.index].theme||this.options.theme,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.list.index;(!(arguments.length>2&&void 0!==arguments[2])||arguments[2])&&this.list.audios[t]&&(this.list.audios[t].theme=e),this.template.listCurs[t]&&(this.template.listCurs[t].style.backgroundColor=e),t===this.list.index&&(this.template.pic.style.backgroundColor=e,this.template.played.style.background=e,this.template.thumb.style.background=e,this.template.volume.style.background=e)}},{key:"seek",value:function(e){e=Math.max(e,0),e=Math.min(e,this.duration),this.audio.currentTime=e,this.bar.set("played",e/this.duration,"width"),this.template.ptime.innerHTML=r.default.secondToTime(e)}},{key:"setUIPlaying",value:function(){var e=this;if(this.paused&&(this.paused=!1,this.template.button.classList.remove("aplayer-play"),this.template.button.classList.add("aplayer-pause"),this.template.button.innerHTML="",setTimeout(function(){e.template.button.innerHTML=o.default.pause},100),this.template.skipPlayButton.innerHTML=o.default.pause),this.timer.enable("loading"),this.options.mutex)for(var t=0;t<m.length;t++)this!==m[t]&&m[t].pause()}},{key:"play",value:function(){var e=this;this.setUIPlaying();var t=this.audio.play();t&&t.catch(function(t){console.warn(t),"NotAllowedError"===t.name&&e.setUIPaused()})}},{key:"setUIPaused",value:function(){var e=this;this.paused||(this.paused=!0,this.template.button.classList.remove("aplayer-pause"),this.template.button.classList.add("aplayer-play"),this.template.button.innerHTML="",setTimeout(function(){e.template.button.innerHTML=o.default.play},100),this.template.skipPlayButton.innerHTML=o.default.play),this.container.classList.remove("aplayer-loading"),this.timer.disable("loading")}},{key:"pause",value:function(){this.setUIPaused(),this.audio.pause()}},{key:"switchVolumeIcon",value:function(){this.volume()>=.95?this.template.volumeButton.innerHTML=o.default.volumeUp:this.volume()>0?this.template.volumeButton.innerHTML=o.default.volumeDown:this.template.volumeButton.innerHTML=o.default.volumeOff}},{key:"volume",value:function(e,t){return e=parseFloat(e),isNaN(e)||(e=Math.max(e,0),e=Math.min(e,1),this.bar.set("volume",e,"height"),t||this.storage.set("volume",e),this.audio.volume=e,this.audio.muted&&(this.audio.muted=!1),this.switchVolumeIcon()),this.audio.muted?0:this.audio.volume}},{key:"on",value:function(e,t){this.events.on(e,t)}},{key:"toggle",value:function(){this.template.button.classList.contains("aplayer-play")?this.play():this.template.button.classList.contains("aplayer-pause")&&this.pause()}},{key:"switchAudio",value:function(e){this.list.switch(e)}},{key:"addAudio",value:function(e){this.list.add(e)}},{key:"removeAudio",value:function(e){this.list.remove(e)}},{key:"destroy",value:function(){m.splice(m.indexOf(this),1),this.pause(),this.container.innerHTML="",this.audio.src="",this.timer.destroy(),this.events.trigger("destroy")}},{key:"setMode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"normal";this.mode=e,"mini"===e?this.container.classList.add("aplayer-narrow"):"normal"===e&&this.container.classList.remove("aplayer-narrow")}},{key:"notice",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2e3,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.8;this.template.notice.innerHTML=e,this.template.notice.style.opacity=i,this.noticeTime&&clearTimeout(this.noticeTime),this.events.trigger("noticeshow",{text:e}),n&&(this.noticeTime=setTimeout(function(){t.template.notice.style.opacity=0,t.events.trigger("noticehide")},n))}},{key:"prevIndex",value:function(){if(!(this.list.audios.length>1))return 0;if("list"===this.options.order)return this.list.index-1<0?this.list.audios.length-1:this.list.index-1;if("random"===this.options.order){var e=this.randomOrder.indexOf(this.list.index);return 0===e?this.randomOrder[this.randomOrder.length-1]:this.randomOrder[e-1]}}},{key:"nextIndex",value:function(){if(!(this.list.audios.length>1))return 0;if("list"===this.options.order)return(this.list.index+1)%this.list.audios.length;if("random"===this.options.order){var e=this.randomOrder.indexOf(this.list.index);return e===this.randomOrder.length-1?this.randomOrder[0]:this.randomOrder[e+1]}}},{key:"skipBack",value:function(){this.list.switch(this.prevIndex())}},{key:"skipForward",value:function(){this.list.switch(this.nextIndex())}},{key:"duration",get:function(){return isNaN(this.audio.duration)?0:this.audio.duration}}],[{key:"version",get:function(){return"1.10.1"}}]),e}();t.default=g},,function(e,t,n){},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),n(40);var i,a=(i=n(38))&&i.__esModule?i:{default:i};console.log("\n %c APlayer v1.10.1 af84efb %c http://aplayer.js.org \n","color: #fadfa3; background: #030307; padding:5px 0;","background: #fadfa3; padding:5px 0;"),t.default=a.default}]).default),d.exports)),y={class:"audio-player-container"},f=/* @__PURE__ */c({__name:"AudioPlayer",props:{fileUrl:{type:String,default:""},fileName:{type:String,default:""},audioList:{type:Array,default:()=>[]},defaultIndex:{type:Number,default:0},autoPlay:{type:Boolean,default:!0},fixed:{type:Boolean,default:!1},showList:{type:Boolean,default:!0}},emits:["play","pause","ended","error","switch"],setup(s,{expose:c,emit:p}){const d=s,f=p,v=e(null);let m=null;const g=(e,t)=>({name:t||"未知音频",artist:"未知艺术家",url:e,cover:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAACXBIWXMAAAsTAAALEwEAmpwYAAAF8WlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDUgNzkuMTYzNDk5LCAyMDE4LzA4LzEzLTE2OjQwOjIyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdEV2dD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlRXZlbnQjIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDE5LTAzLTIxVDE1OjE3OjQ0KzA4OjAwIiB4bXA6TWV0YWRhdGFEYXRlPSIyMDE5LTAzLTIxVDE1OjE3OjQ0KzA4OjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAxOS0wMy0yMVQxNToxNzo0NCswODowMCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo0NzQ3NjEwNy0xNGQ1LTA1NGYtYjQxNy1mNjYwNzE5MjU5NzQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDc0NzYxMDctMTRkNS0wNTRmLWI0MTctZjY2MDcxOTI1OTc0IiB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6NDc0NzYxMDctMTRkNS0wNTRmLWI0MTctZjY2MDcxOTI1OTc0IiBkYzpmb3JtYXQ9ImltYWdlL3BuZyIgcGhvdG9zaG9wOkNvbG9yTW9kZT0iMyI+IDx4bXBNTTpIaXN0b3J5PiA8cmRmOlNlcT4gPHJkZjpsaSBzdEV2dDphY3Rpb249ImNyZWF0ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6NDc0NzYxMDctMTRkNS0wNTRmLWI0MTctZjY2MDcxOTI1OTc0IiBzdEV2dDp3aGVuPSIyMDE5LTAzLTIxVDE1OjE3OjQ0KzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiLz4gPC9yZGY6U2VxPiA8L3htcE1NOkhpc3Rvcnk+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+"}),w=()=>d.audioList&&d.audioList.length>0?d.audioList.map(e=>({name:e.name||e.fileName||"未知音频",artist:e.artist||"未知艺术家",url:e.url||e.fileUrl||e.path,cover:e.cover||g().cover})):d.fileUrl?[g(d.fileUrl,d.fileName)]:[],b=async()=>{const e=w();if(!e||0===e.length)return void console.warn("音频列表为空");let t=d.defaultIndex;if((t<0||t>=e.length)&&(t=0),m&&(m.destroy(),m=null),await i(),v.value){v.value.innerHTML="";try{m=new h({container:v.value,audio:e,fixed:d.fixed,autoplay:!1,preload:"metadata",theme:"#23ade5",loop:"all",order:"list",volume:.7,mutex:!0,listFolded:!d.showList}),m.on("play",()=>{f("play",x())}),m.on("pause",()=>{f("pause",x())}),m.on("ended",()=>{f("ended",x())}),m.on("error",e=>{f("error",e)}),m.on("listswitch",()=>{f("switch",x())}),t>=0&&t<e.length&&(m.list.switch(t),d.autoPlay&&m.play())}catch(n){console.error("APlayer初始化失败:",n),u.error("播放器初始化失败")}}else console.error("播放器容器未找到")},x=()=>m&&m.list&&m.list.audios?m.list.audios[m.list.index]:null,k=()=>{m&&(m.destroy(),m=null)};return t(()=>[d.fileUrl,d.fileName],async()=>{d.fileUrl&&await b()},{immediate:!0}),t(()=>d.audioList,async e=>{e&&e.length>0&&await b()},{deep:!0}),t(()=>d.defaultIndex,e=>{m&&e>=0&&e<w().length&&(m.list.switch(e),d.autoPlay&&m.play())}),n(async()=>{await i(),(d.fileUrl||d.audioList&&d.audioList.length>0)&&await b()}),a(()=>{k()}),c({play:()=>{m&&m.play()},pause:()=>{m&&m.pause()},switchAudio:e=>{m&&e>=0&&e<w().length&&(m.list.switch(e),m.play())},destroy:k,getCurrentAudio:x}),(e,t)=>(r(),o("div",y,[l("div",{id:"aplayer",ref_key:"playerRef",ref:v},null,512)]))}},[["__scopeId","data-v-5578b5dc"]]);export{f as default};
@@ -0,0 +1 @@
1
+ import{ref as e,computed as a,watch as t,onMounted as l,nextTick as i,openBlock as r,createElementBlock as o,createElementVNode as u}from"vue";import"element-plus";import{_ as n}from"./main-CxM1-xky.mjs";const m={class:"image-preview-container"},g=["src"],s=/* @__PURE__ */n({__name:"ImageViewer",props:{fileUrl:{type:String,default:""},fileName:{type:String,default:""},imageList:{type:Array,default:()=>[]},defaultIndex:{type:Number,default:0},showToolbar:{type:Boolean,default:!0},showThumbnail:{type:Boolean,default:!0},initialZoom:{type:Number,default:100},draggable:{type:Boolean,default:!0},wheelZoom:{type:Boolean,default:!0}},emits:["load","error","switch","zoom","rotate"],setup(n,{expose:s,emit:v}){const d=n,p=v,c=e(null),f=e({url:"",name:""}),h=e(0),w=e(d.initialZoom),y=e(0),I=e(0),x=e(0),b=e(!1);e(0),e(0);const L=()=>d.imageList&&d.imageList.length>0?d.imageList.map(e=>({name:e.name||e.imageName||"未知图片",url:e.url||e.imageUrl||e.path})):d.imageUrl?[{name:d.imageName||"图片",url:d.imageUrl}]:[];a(()=>({transform:`\n scale(${w.value/100}) \n rotate(${y.value}deg) \n translate(${I.value}px, ${x.value}px)\n `,cursor:d.draggable?b.value?"grabbing":"grab":"default"}));const U=async()=>{const e=L();if(!e||0===e.length)return void console.warn("图片列表为空");let a=d.defaultIndex;(a<0||a>=e.length)&&(a=0),h.value=a,f.value=e[a],await i(),z()},z=()=>{w.value=d.initialZoom,y.value=0,I.value=0,x.value=0,p("zoom",w.value),p("rotate",y.value)},N=e=>{const a=L();e>=0&&e<a.length&&(h.value=e,f.value=a[e],z(),p("switch",{...f.value,index:e}))};return t(()=>[d.imageUrl,d.imageName],async()=>{d.imageUrl&&await U()},{immediate:!0}),t(()=>d.imageList,async e=>{e&&e.length>0&&await U()},{deep:!0}),t(()=>d.defaultIndex,e=>{const a=L();e>=0&&e<a.length&&N(e)}),l(async()=>{await i(),(d.imageUrl||d.imageList&&d.imageList.length>0)&&await U()}),s({zoomIn:()=>{w.value<500&&(w.value+=25,p("zoom",w.value))},zoomOut:()=>{w.value>25&&(w.value-=25,p("zoom",w.value))},rotateLeft:()=>{y.value-=90,p("rotate",y.value)},rotateRight:()=>{y.value+=90,p("rotate",y.value)},reset:z,prevImage:()=>{h.value>0&&N(h.value-1)},nextImage:()=>{h.value<L().length-1&&N(h.value+1)},switchImage:N,getCurrentImage:()=>f.value,getCurrentIndex:()=>h.value}),(e,a)=>(r(),o("div",m,[u("div",{ref_key:"containerRef",ref:c,class:"preview-area"},[u("img",{src:d.fileUrl,alt:""},null,8,g)],512)]))}},[["__scopeId","data-v-e69cde49"]]);export{s as default};
@@ -0,0 +1 @@
1
+ import{ref as e,watchEffect as a,openBlock as r,createElementBlock as l,toDisplayString as i,createCommentVNode as u}from"vue";import{u as s}from"./storage-config-Z9VU4Vvo.mjs";import{b as v}from"./path-DMjcXuQN.mjs";import{_ as t}from"./main-CxM1-xky.mjs";const o={class:"zfile-kkfile-viewer"},m={key:0,class:"viewer-status"},n={key:1,class:"viewer-status error"},d=["src"],f=/* @__PURE__ */t({__name:"KkFileViewer",props:{url:String,name:String},setup(t){const f=s(),c=t,p=e(!0),k=e(""),g=e("");return a(()=>{p.value=!0,k.value="",g.value="";const e=f.globalConfig.kkFileViewUrl,a=c.url,r=c.name;if(!e)return k.value="预览服务地址未配置。",void(p.value=!1);if(!a)return k.value="文件URL无效,无法预览。",void(p.value=!1);if(!r)return k.value="文件名无效,无法预览。",void(p.value=!1);const l={name:r,url:a};g.value=v(l,e),p.value=!1}),(e,a)=>(r(),l("div",o,[p.value?(r(),l("div",m," 正在加载预览, 请稍候... ")):k.value?(r(),l("div",n," 加载预览失败:"+i(k.value),1)):g.value?(r(),l("iframe",{key:2,src:g.value,width:"100%",height:"100%",frameborder:"0"},null,8,d)):u("",!0)]))}},[["__scopeId","data-v-d0d7ac6d"]]);export{f as default};
@@ -0,0 +1 @@
1
+ import{onMounted as t,onUnmounted as e,openBlock as s,createElementBlock as i,createElementVNode as n}from"vue";import{u as r}from"./storage-config-Z9VU4Vvo.mjs";import{a as o,u as a,M as h}from"./useRouterData-CMHly-uV.mjs";import{r as p,c as l}from"./path-DMjcXuQN.mjs";import{_ as c}from"./main-CxM1-xky.mjs";import{useStorage as u}from"@vueuse/core";import{g as f}from"./_commonjsHelpers-CXUWDbkB.mjs";import{ElMessage as g}from"element-plus";var d,m,y,w;const b=/* @__PURE__ */f(function(){if(w)return y;w=1;var t=function(){if(m)return d;function t(t,i,n){t instanceof RegExp&&(t=e(t,n)),i instanceof RegExp&&(i=e(i,n));var r=s(t,i,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+t.length,r[1]),post:n.slice(r[1]+i.length)}}function e(t,e){var s=e.match(t);return s?s[0]:null}function s(t,e,s){var i,n,r,o,a,h=s.indexOf(t),p=s.indexOf(e,h+1),l=h;if(h>=0&&p>0){if(t===e)return[h,p];for(i=[],r=s.length;l>=0&&!a;)l==h?(i.push(l),h=s.indexOf(t,l+1)):1==i.length?a=[i.pop(),p]:((n=i.pop())<r&&(r=n,o=p),p=s.indexOf(e,l+1)),l=h<p&&h>=0?h:p;i.length&&(a=[r,o])}return a}return m=1,d=t,t.range=s,d}();y=function(t,o){if(!t)return[];var h=null==(o=o||{}).max?1/0:o.max;"{}"===t.substr(0,2)&&(t="\\{\\}"+t.substr(2));return f(function(t){return t.split("\\\\").join(e).split("\\{").join(s).split("\\}").join(i).split("\\,").join(n).split("\\.").join(r)}(t),h,!0).map(a)};var e="\0SLASH"+Math.random()+"\0",s="\0OPEN"+Math.random()+"\0",i="\0CLOSE"+Math.random()+"\0",n="\0COMMA"+Math.random()+"\0",r="\0PERIOD"+Math.random()+"\0";function o(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function a(t){return t.split(e).join("\\").split(s).join("{").split(i).join("}").split(n).join(",").split(r).join(".")}function h(e){if(!e)return[""];var s=[],i=t("{","}",e);if(!i)return e.split(",");var n=i.pre,r=i.body,o=i.post,a=n.split(",");a[a.length-1]+="{"+r+"}";var p=h(o);return o.length&&(a[a.length-1]+=p.shift(),a.push.apply(a,p)),s.push.apply(s,a),s}function p(t){return"{"+t+"}"}function l(t){return/^-?0\d/.test(t)}function c(t,e){return t<=e}function u(t,e){return t>=e}function f(e,s,n){var r=[],a=t("{","}",e);if(!a)return[e];var g=a.pre,d=a.post.length?f(a.post,s,!1):[""];if(/\$$/.test(a.pre))for(var m=0;m<d.length&&m<s;m++){var y=g+"{"+a.body+"}"+d[m];r.push(y)}else{var w,b,v=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(a.body),S=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(a.body),x=v||S,M=a.body.indexOf(",")>=0;if(!x&&!M)return a.post.match(/,(?!,).*\}/)?f(e=a.pre+"{"+a.body+i+a.post,s,!0):[e];if(x)w=a.body.split(/\.\./);else if(1===(w=h(a.body)).length&&1===(w=f(w[0],s,!1).map(p)).length)return d.map(function(t){return a.pre+w[0]+t});if(x){var E=o(w[0]),O=o(w[1]),j=Math.max(w[0].length,w[1].length),P=3==w.length?Math.max(Math.abs(o(w[2])),1):1,A=c;O<E&&(P*=-1,A=u);var $=w.some(l);b=[];for(var W=E;A(W,O);W+=P){var N;if(S)"\\"===(N=String.fromCharCode(W))&&(N="");else if(N=String(W),$){var R=j-N.length;if(R>0){var T=new Array(R+1).join("0");N=W<0?"-"+T+N.slice(1):T+N}}b.push(N)}}else{b=[];for(var L=0;L<w.length;L++)b.push.apply(b,f(w[L],s,!1))}for(L=0;L<b.length;L++)for(m=0;m<d.length&&r.length<s;m++){y=g+b[L]+d[m];(!n||x||y)&&r.push(y)}}return r}return y}()),v=t=>{if("string"!=typeof t)throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")},S={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},x=t=>t.replace(/[[\]\\-]/g,"\\$&"),M=t=>t.join(""),E=(t,e)=>{const s=e;if("["!==t.charAt(s))throw new Error("not in a brace expression");const i=[],n=[];let r=s+1,o=!1,a=!1,h=!1,p=!1,l=s,c="";t:for(;r<t.length;){const e=t.charAt(r);if("!"!==e&&"^"!==e||r!==s+1){if("]"===e&&o&&!h){l=r+1;break}if(o=!0,"\\"!==e||h){if("["===e&&!h)for(const[e,[o,h,p]]of Object.entries(S))if(t.startsWith(e,r)){if(c)return["$.",!1,t.length-s,!0];r+=e.length,p?n.push(o):i.push(o),a=a||h;continue t}h=!1,c?(e>c?i.push(x(c)+"-"+x(e)):e===c&&i.push(x(e)),c="",r++):t.startsWith("-]",r+1)?(i.push(x(e+"-")),r+=2):t.startsWith("-",r+1)?(c=e,r+=2):(i.push(x(e)),r++)}else h=!0,r++}else p=!0,r++}if(l<r)return["",!1,0,!1];if(!i.length&&!n.length)return["$.",!1,t.length-s,!0];if(0===n.length&&1===i.length&&/^\\?.$/.test(i[0])&&!p){const t=2===i[0].length?i[0].slice(-1):i[0];return[(u=t,u.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,l-s,!1]}var u;const f="["+(p?"^":"")+M(i)+"]",g="["+(p?"":"^")+M(n)+"]";return[i.length&&n.length?"("+f+"|"+g+")":i.length?f:g,a,l-s,!0]},O=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var j;const P=/* @__PURE__ */new Set(["!","?","+","*","@"]),A=t=>P.has(t),$=t=>A(t.type),W=/* @__PURE__ */new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),N=/* @__PURE__ */new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),R=/* @__PURE__ */new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),T=/* @__PURE__ */new Map([["!",/* @__PURE__ */new Map([["!","@"]])],["?",/* @__PURE__ */new Map([["*","*"],["+","*"]])],["@",/* @__PURE__ */new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",/* @__PURE__ */new Map([["?","*"],["*","*"]])]]),L="(?!\\.)",C=/* @__PURE__ */new Set(["[","."]),I=/* @__PURE__ */new Set(["..","."]),k=new Set("().*{}+?[]^$\\!"),G=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),z="[^/]",_=z+"*?",B=z+"+?";class U{type;#t;#e;#s=!1;#i=[];#n;#r;#o;#a=!1;#h;#p;#l=!1;constructor(t,e,s={}){this.type=t,t&&(this.#e=!0),this.#n=e,this.#t=this.#n?this.#n.#t:this,this.#h=this.#t===this?s:this.#t.#h,this.#o=this.#t===this?[]:this.#t.#o,"!"!==t||this.#t.#a||this.#o.push(this),this.#r=this.#n?this.#n.#i.length:0}get hasMagic(){if(void 0!==this.#e)return this.#e;for(const t of this.#i)if("string"!=typeof t&&(t.type||t.hasMagic))return this.#e=!0;return this.#e}toString(){return void 0!==this.#p?this.#p:this.type?this.#p=this.type+"("+this.#i.map(t=>String(t)).join("|")+")":this.#p=this.#i.map(t=>String(t)).join("")}#c(){if(this!==this.#t)throw new Error("should only call on root");if(this.#a)return this;let t;for(this.toString(),this.#a=!0;t=this.#o.pop();){if("!"!==t.type)continue;let e=t,s=e.#n;for(;s;){for(let i=e.#r+1;!s.type&&i<s.#i.length;i++)for(const e of t.#i){if("string"==typeof e)throw new Error("string part in extglob AST??");e.copyIn(s.#i[i])}e=s,s=e.#n}}return this}push(...t){for(const e of t)if(""!==e){if("string"!=typeof e&&!(e instanceof j&&e.#n===this))throw new Error("invalid part: "+e);this.#i.push(e)}}toJSON(){const t=null===this.type?this.#i.slice().map(t=>"string"==typeof t?t:t.toJSON()):[this.type,...this.#i.map(t=>t.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#a&&"!"===this.#n?.type)&&t.push({}),t}isStart(){if(this.#t===this)return!0;if(!this.#n?.isStart())return!1;if(0===this.#r)return!0;const t=this.#n;for(let e=0;e<this.#r;e++){const s=t.#i[e];if(!(s instanceof j&&"!"===s.type))return!1}return!0}isEnd(){if(this.#t===this)return!0;if("!"===this.#n?.type)return!0;if(!this.#n?.isEnd())return!1;if(!this.type)return this.#n?.isEnd();const t=this.#n?this.#n.#i.length:0;return this.#r===t-1}copyIn(t){"string"==typeof t?this.push(t):this.push(t.clone(this))}clone(t){const e=new j(this.type,t);for(const s of this.#i)e.copyIn(s);return e}static#u(t,e,s,i,n){const r=i.maxExtglobRecursion??2;let o=!1,a=!1,h=-1,p=!1;if(null===e.type){let l=s,c="";for(;l<t.length;){const s=t.charAt(l++);if(o||"\\"===s){o=!o,c+=s;continue}if(a){l===h+1?"^"!==s&&"!"!==s||(p=!0):"]"!==s||l===h+2&&p||(a=!1),c+=s;continue}if("["===s){a=!0,h=l,p=!1,c+=s;continue}if(!i.noext&&A(s)&&"("===t.charAt(l)&&n<=r){e.push(c),c="";const r=new j(s,e);l=j.#u(t,r,l,i,n+1),e.push(r);continue}c+=s}return e.push(c),l}let l=s+1,c=new j(null,e);const u=[];let f="";for(;l<t.length;){const s=t.charAt(l++);if(o||"\\"===s){o=!o,f+=s;continue}if(a){l===h+1?"^"!==s&&"!"!==s||(p=!0):"]"!==s||l===h+2&&p||(a=!1),f+=s;continue}if("["===s){a=!0,h=l,p=!1,f+=s;continue}if(A(s)&&"("===t.charAt(l)&&(n<=r||e&&e.#f(s))){const r=e&&e.#f(s)?0:1;c.push(f),f="";const o=new j(s,c);c.push(o),l=j.#u(t,o,l,i,n+r);continue}if("|"!==s){if(")"===s)return""===f&&0===e.#i.length&&(e.#l=!0),c.push(f),f="",e.push(...u,c),l;f+=s}else c.push(f),f="",u.push(c),c=new j(null,e)}return e.type=null,e.#e=void 0,e.#i=[t.substring(s-1)],l}#g(t){return this.#d(t,N)}#d(t,e=W){if(!t||"object"!=typeof t||null!==t.type||1!==t.#i.length||null===this.type)return!1;const s=t.#i[0];return!(!s||"object"!=typeof s||null===s.type)&&this.#f(s.type,e)}#f(t,e=R){return!!e.get(this.type)?.includes(t)}#m(t,e){const s=t.#i[0],i=new j(null,s,this.options);i.#i.push(""),s.push(i),this.#y(t,e)}#y(t,e){const s=t.#i[0];this.#i.splice(e,1,...s.#i);for(const i of s.#i)"object"==typeof i&&(i.#n=this);this.#p=void 0}#w(t){const e=T.get(this.type);return!!e?.has(t)}#b(t){if(!t||"object"!=typeof t||null!==t.type||1!==t.#i.length||null===this.type||1!==this.#i.length)return!1;const e=t.#i[0];return!(!e||"object"!=typeof e||null===e.type)&&this.#w(e.type)}#v(t){const e=T.get(this.type),s=t.#i[0],i=e?.get(s.type);if(!i)return!1;this.#i=s.#i;for(const n of this.#i)"object"==typeof n&&(n.#n=this);this.type=i,this.#p=void 0,this.#l=!1}#S(){if($(this)){let t=0,e=!1;do{e=!0;for(let t=0;t<this.#i.length;t++){const s=this.#i[t];"object"==typeof s&&(s.#S(),this.#d(s)?(e=!1,this.#y(s,t)):this.#g(s)?(e=!1,this.#m(s,t)):this.#b(s)&&(e=!1,this.#v(s)))}}while(!e&&++t<10)}else for(const t of this.#i)"object"==typeof t&&t.#S();this.#p=void 0}static fromGlob(t,e={}){const s=new j(null,void 0,e);return j.#u(t,s,0,e,0),s}toMMPattern(){if(this!==this.#t)return this.#t.toMMPattern();const t=this.toString(),[e,s,i,n]=this.toRegExpSource();if(!(i||this.#e||this.#h.nocase&&!this.#h.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return s;const r=(this.#h.nocase?"i":"")+(n?"u":"");return Object.assign(new RegExp(`^${e}$`,r),{_src:e,_glob:t})}get options(){return this.#h}toRegExpSource(t){const e=t??!!this.#h.dot;if(this.#t===this&&(this.#S(),this.#c()),!$(this)){const s=this.isStart()&&this.isEnd(),i=this.#i.map(e=>{const[i,n,r,o]="string"==typeof e?j.#x(e,this.#e,s):e.toRegExpSource(t);return this.#e=this.#e||r,this.#s=this.#s||o,i}).join("");let n="";if(this.isStart()&&"string"==typeof this.#i[0]){if(!(1===this.#i.length&&I.has(this.#i[0]))){const s=C,r=e&&s.has(i.charAt(0))||i.startsWith("\\.")&&s.has(i.charAt(2))||i.startsWith("\\.\\.")&&s.has(i.charAt(4)),o=!e&&!t&&s.has(i.charAt(0));n=r?"(?!(?:^|/)\\.\\.?(?:$|/))":o?L:""}}let r="";this.isEnd()&&this.#t.#a&&"!"===this.#n?.type&&(r="(?:$|\\/)");return[n+i+r,O(i),this.#e=!!this.#e,this.#s]}const s="*"===this.type||"+"===this.type,i="!"===this.type?"(?:(?!(?:":"(?:";let n=this.#M(e);if(this.isStart()&&this.isEnd()&&!n&&"!"!==this.type){const t=this.toString(),e=this;return e.#i=[t],e.type=null,e.#e=void 0,[t,O(this.toString()),!1,!1]}let r=!s||t||e?"":this.#M(!0);r===n&&(r=""),r&&(n=`(?:${n})(?:${r})*?`);let o="";if("!"===this.type&&this.#l)o=(this.isStart()&&!e?L:"")+B;else{o=i+n+("!"===this.type?"))"+(!this.isStart()||e||t?"":L)+_+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&r?")":"*"===this.type&&r?")?":`)${this.type}`)}return[o,O(n),this.#e=!!this.#e,this.#s]}#M(t){return this.#i.map(e=>{if("string"==typeof e)throw new Error("string type in extglob ast??");const[s,i,n,r]=e.toRegExpSource(t);return this.#s=this.#s||r,s}).filter(t=>!(this.isStart()&&this.isEnd()&&!t)).join("|")}static#x(t,e,s=!1){let i=!1,n="",r=!1,o=!1;for(let a=0;a<t.length;a++){const h=t.charAt(a);if(i)i=!1,n+=(k.has(h)?"\\":"")+h,o=!1;else if("\\"!==h){if("["===h){const[s,i,h,p]=E(t,a);if(h){n+=s,r=r||i,a+=h-1,e=e||p,o=!1;continue}}if("*"!==h)o=!1,"?"!==h?n+=G(h):(n+=z,e=!0);else{if(o)continue;o=!0,n+=s&&/^[*]+$/.test(t)?B:_,e=!0}}else a===t.length-1?n+="\\\\":i=!0}return[n,O(t),!!e,r]}}j=U;const D=(t,e,s={})=>(v(e),!(!s.nocomment&&"#"===e.charAt(0))&&new dt(e,s).match(t)),F=/^\*+([^+@!?\*\[\(]*)$/,J=t=>e=>!e.startsWith(".")&&e.endsWith(t),Z=t=>e=>e.endsWith(t),H=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),K=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),V=/^\*+\.\*+$/,q=t=>!t.startsWith(".")&&t.includes("."),Q=t=>"."!==t&&".."!==t&&t.includes("."),X=/^\.\*+$/,Y=t=>"."!==t&&".."!==t&&t.startsWith("."),tt=/^\*+$/,et=t=>0!==t.length&&!t.startsWith("."),st=t=>0!==t.length&&"."!==t&&".."!==t,it=/^\?+([^+@!?\*\[\(]*)?$/,nt=([t,e=""])=>{const s=ht([t]);return e?(e=e.toLowerCase(),t=>s(t)&&t.toLowerCase().endsWith(e)):s},rt=([t,e=""])=>{const s=pt([t]);return e?(e=e.toLowerCase(),t=>s(t)&&t.toLowerCase().endsWith(e)):s},ot=([t,e=""])=>{const s=pt([t]);return e?t=>s(t)&&t.endsWith(e):s},at=([t,e=""])=>{const s=ht([t]);return e?t=>s(t)&&t.endsWith(e):s},ht=([t])=>{const e=t.length;return t=>t.length===e&&!t.startsWith(".")},pt=([t])=>{const e=t.length;return t=>t.length===e&&"."!==t&&".."!==t},lt="object"==typeof process&&process?"object"==typeof process.env&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";D.sep="win32"===lt?{sep:"\\"}.sep:{sep:"/"}.sep;const ct=/* @__PURE__ */Symbol("globstar **");D.GLOBSTAR=ct;D.filter=(t,e={})=>s=>D(s,t,e);const ut=(t,e={})=>Object.assign({},t,e);D.defaults=t=>{if(!t||"object"!=typeof t||!Object.keys(t).length)return D;const e=D;return Object.assign((s,i,n={})=>e(s,i,ut(t,n)),{Minimatch:class extends e.Minimatch{constructor(e,s={}){super(e,ut(t,s))}static defaults(s){return e.defaults(ut(t,s)).Minimatch}},AST:class extends e.AST{constructor(e,s,i={}){super(e,s,ut(t,i))}static fromGlob(s,i={}){return e.AST.fromGlob(s,ut(t,i))}},unescape:(s,i={})=>e.unescape(s,ut(t,i)),escape:(s,i={})=>e.escape(s,ut(t,i)),filter:(s,i={})=>e.filter(s,ut(t,i)),defaults:s=>e.defaults(ut(t,s)),makeRe:(s,i={})=>e.makeRe(s,ut(t,i)),braceExpand:(s,i={})=>e.braceExpand(s,ut(t,i)),match:(s,i,n={})=>e.match(s,i,ut(t,n)),sep:e.sep,GLOBSTAR:ct})};const ft=(t,e={})=>(v(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:b(t));D.braceExpand=ft;D.makeRe=(t,e={})=>new dt(t,e).makeRe();D.match=(t,e,s={})=>{const i=new dt(e,s);return t=t.filter(t=>i.match(t)),i.options.nonull&&!t.length&&t.push(e),t};const gt=/[?*]|[+@!]\(.*?\)|\[|\]/;class dt{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,e={}){v(t),e=e||{},this.options=e,this.maxGlobstarRecursion=e.maxGlobstarRecursion??200,this.pattern=t,this.platform=e.platform||lt,this.isWindows="win32"===this.platform,this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||!1===e.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=void 0!==e.windowsNoMagicRoot?e.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const e of t)if("string"!=typeof e)return!0;return!1}debug(...t){}make(){const t=this.pattern,e=this.options;if(!e.nocomment&&"#"===t.charAt(0))return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...t)=>console.error(...t)),this.debug(this.pattern,this.globSet);const s=this.globSet.map(t=>this.slashSplit(t));this.globParts=this.preprocess(s),this.debug(this.pattern,this.globParts);let i=this.globParts.map((t,e,s)=>{if(this.isWindows&&this.windowsNoMagicRoot){const e=!(""!==t[0]||""!==t[1]||"?"!==t[2]&&gt.test(t[2])||gt.test(t[3])),s=/^[a-z]:/i.test(t[0]);if(e)return[...t.slice(0,4),...t.slice(4).map(t=>this.parse(t))];if(s)return[t[0],...t.slice(1).map(t=>this.parse(t))]}return t.map(t=>this.parse(t))});if(this.debug(this.pattern,i),this.set=i.filter(t=>-1===t.indexOf(!1)),this.isWindows)for(let n=0;n<this.set.length;n++){const t=this.set[n];""===t[0]&&""===t[1]&&"?"===this.globParts[n][2]&&"string"==typeof t[3]&&/^[a-z]:$/i.test(t[3])&&(t[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let s=0;s<t.length;s++)for(let e=0;e<t[s].length;e++)"**"===t[s][e]&&(t[s][e]="*");const{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):t=e>=1?this.levelOneOptimize(t):this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(t=>{let e=-1;for(;-1!==(e=t.indexOf("**",e+1));){let s=e;for(;"**"===t[s+1];)s++;s!==e&&t.splice(e,s-e)}return t})}levelOneOptimize(t){return t.map(t=>0===(t=t.reduce((t,e)=>{const s=t[t.length-1];return"**"===e&&"**"===s?t:".."===e&&s&&".."!==s&&"."!==s&&"**"!==s?(t.pop(),t):(t.push(e),t)},[])).length?[""]:t)}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let s=1;s<t.length-1;s++){const i=t[s];1===s&&""===i&&""===t[0]||("."!==i&&""!==i||(e=!0,t.splice(s,1),s--))}"."!==t[0]||2!==t.length||"."!==t[1]&&""!==t[1]||(e=!0,t.pop())}let s=0;for(;-1!==(s=t.indexOf("..",s+1));){const i=t[s-1];i&&"."!==i&&".."!==i&&"**"!==i&&(e=!0,t.splice(s-1,2),s-=2)}}while(e);return 0===t.length?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let s of t){let i=-1;for(;-1!==(i=s.indexOf("**",i+1));){let n=i;for(;"**"===s[n+1];)n++;n>i&&s.splice(i+1,n-i);let r=s[i+1];const o=s[i+2],a=s[i+3];if(".."!==r)continue;if(!o||"."===o||".."===o||!a||"."===a||".."===a)continue;e=!0,s.splice(i,1);const h=s.slice(0);h[i]="**",t.push(h),i--}if(!this.preserveMultipleSlashes){for(let t=1;t<s.length-1;t++){const i=s[t];1===t&&""===i&&""===s[0]||("."!==i&&""!==i||(e=!0,s.splice(t,1),t--))}"."!==s[0]||2!==s.length||"."!==s[1]&&""!==s[1]||(e=!0,s.pop())}let n=0;for(;-1!==(n=s.indexOf("..",n+1));){const t=s[n-1];if(t&&"."!==t&&".."!==t&&"**"!==t){e=!0;const t=1===n&&"**"===s[n+1]?["."]:[];s.splice(n-1,2,...t),0===s.length&&s.push(""),n-=2}}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let s=e+1;s<t.length;s++){const i=this.partsMatch(t[e],t[s],!this.preserveMultipleSlashes);if(i){t[e]=[],t[s]=i;break}}return t.filter(t=>t.length)}partsMatch(t,e,s=!1){let i=0,n=0,r=[],o="";for(;i<t.length&&n<e.length;)if(t[i]===e[n])r.push("b"===o?e[n]:t[i]),i++,n++;else if(s&&"**"===t[i]&&e[n]===t[i+1])r.push(t[i]),i++;else if(s&&"**"===e[n]&&t[i]===e[n+1])r.push(e[n]),n++;else if("*"!==t[i]||!e[n]||!this.options.dot&&e[n].startsWith(".")||"**"===e[n]){if("*"!==e[n]||!t[i]||!this.options.dot&&t[i].startsWith(".")||"**"===t[i])return!1;if("a"===o)return!1;o="b",r.push(e[n]),i++,n++}else{if("b"===o)return!1;o="a",r.push(t[i]),i++,n++}return t.length===e.length&&r}parseNegate(){if(this.nonegate)return;const t=this.pattern;let e=!1,s=0;for(let i=0;i<t.length&&"!"===t.charAt(i);i++)e=!e,s++;s&&(this.pattern=t.slice(s)),this.negate=e}matchOne(t,e,s=!1){let i=0,n=0;if(this.isWindows){const s="string"==typeof t[0]&&/^[a-z]:$/i.test(t[0]),r=!s&&""===t[0]&&""===t[1]&&"?"===t[2]&&/^[a-z]:$/i.test(t[3]),o="string"==typeof e[0]&&/^[a-z]:$/i.test(e[0]),a=r?3:s?0:void 0,h=!o&&""===e[0]&&""===e[1]&&"?"===e[2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3])?3:o?0:void 0;if("number"==typeof a&&"number"==typeof h){const[s,r]=[t[a],e[h]];s.toLowerCase()===r.toLowerCase()&&(e[h]=s,n=h,i=a)}}const{optimizationLevel:r=1}=this.options;return r>=2&&(t=this.levelTwoFileOptimize(t)),e.includes(ct)?this.#E(t,e,s,i,n):this.#O(t,e,s,i,n)}#E(t,e,s,i,n){const r=e.indexOf(ct,n),o=e.lastIndexOf(ct),[a,h,p]=s?[e.slice(n,r),e.slice(r+1),[]]:[e.slice(n,r),e.slice(r+1,o),e.slice(o+1)];if(a.length){const e=t.slice(i,i+a.length);if(!this.#O(e,a,s,0,0))return!1;i+=a.length}let l=0;if(p.length){if(p.length+i>t.length)return!1;let e=t.length-p.length;if(this.#O(t,p,s,e,0))l=p.length;else{if(""!==t[t.length-1]||i+p.length===t.length)return!1;if(e--,!this.#O(t,p,s,e,0))return!1;l=p.length+1}}if(!h.length){let e=!!l;for(let s=i;s<t.length-l;s++){const i=String(t[s]);if(e=!0,"."===i||".."===i||!this.options.dot&&i.startsWith("."))return!1}return s||e}const c=[[[],0]];let u=c[0],f=0;const g=[0];for(const y of h)y===ct?(g.push(f),u=[[],0],c.push(u)):(u[0].push(y),f++);let d=c.length-1;const m=t.length-l;for(const y of c)y[1]=m-(g[d--]+y[0].length);return!!this.#j(t,c,i,0,s,0,!!l)}#j(t,e,s,i,n,r,o){const a=e[i];if(!a){for(let e=s;e<t.length;e++){o=!0;const s=t[e];if("."===s||".."===s||!this.options.dot&&s.startsWith("."))return!1}return o}const[h,p]=a;for(;s<=p;){if(this.#O(t.slice(0,s+h.length),h,n,s,0)&&r<this.maxGlobstarRecursion){const a=this.#j(t,e,s+h.length,i+1,n,r+1,o);if(!1!==a)return a}const a=t[s];if("."===a||".."===a||!this.options.dot&&a.startsWith("."))return!1;s++}return n||null}#O(t,e,s,i,n){let r,o,a,h;for(r=i,o=n,h=t.length,a=e.length;r<h&&o<a;r++,o++){this.debug("matchOne loop");let s,i=e[o],n=t[r];if(this.debug(e,i,n),!1===i||i===ct)return!1;if("string"==typeof i?(s=n===i,this.debug("string match",i,n,s)):(s=i.test(n),this.debug("pattern match",i,n,s)),!s)return!1}if(r===h&&o===a)return!0;if(r===h)return s;if(o===a)return r===h-1&&""===t[r];throw new Error("wtf?")}braceExpand(){return ft(this.pattern,this.options)}parse(t){v(t);const e=this.options;if("**"===t)return ct;if(""===t)return"";let s,i=null;(s=t.match(tt))?i=e.dot?st:et:(s=t.match(F))?i=(e.nocase?e.dot?K:H:e.dot?Z:J)(s[1]):(s=t.match(it))?i=(e.nocase?e.dot?rt:nt:e.dot?ot:at)(s):(s=t.match(V))?i=e.dot?Q:q:(s=t.match(X))&&(i=Y);const n=U.fromGlob(t,this.options).toMMPattern();return i&&"object"==typeof n&&Reflect.defineProperty(n,"test",{value:i}),n}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const e=this.options,s=e.noglobstar?"[^/]*?":e.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",i=new Set(e.nocase?["i"]:[]);let n=t.map(t=>{const e=t.map(t=>{if(t instanceof RegExp)for(const e of t.flags.split(""))i.add(e);return"string"==typeof t?t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):t===ct?ct:t._src});return e.forEach((t,i)=>{const n=e[i+1],r=e[i-1];t===ct&&r!==ct&&(void 0===r?void 0!==n&&n!==ct?e[i+1]="(?:\\/|"+s+"\\/)?"+n:e[i]=s:void 0===n?e[i-1]=r+"(?:\\/|"+s+")?":n!==ct&&(e[i-1]=r+"(?:\\/|\\/"+s+"\\/)"+n,e[i+1]=ct))}),e.filter(t=>t!==ct).join("/")}).join("|");const[r,o]=t.length>1?["(?:",")"]:["",""];n="^"+r+n+o+"$",this.negate&&(n="^(?!"+n+").+$");try{this.regexp=new RegExp(n,[...i].join(""))}catch(a){this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return""===t;if("/"===t&&e)return!0;const s=this.options;this.isWindows&&(t=t.split("\\").join("/"));const i=this.slashSplit(t);this.debug(this.pattern,"split",i);const n=this.set;this.debug(this.pattern,"set",n);let r=i[i.length-1];if(!r)for(let o=i.length-2;!r&&o>=0;o--)r=i[o];for(let o=0;o<n.length;o++){const t=n[o];let a=i;s.matchBase&&1===t.length&&(a=[r]);if(this.matchOne(a,t,e))return!!s.flipNegate||!this.negate}return!s.flipNegate&&this.negate}static defaults(t){return D.defaults(t).Minimatch}}D.AST=U,D.Minimatch=dt,D.escape=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&"),D.unescape=O;let{storageKey:mt,currentPath:yt}=a();const wt=u("zfile-pwd-cache",{}),bt=u("zfile-pwd-full-cache",{},sessionStorage);let vt=r();const St={class:"zfile-office-viewer"},xt=/* @__PURE__ */c({__name:"OfficeViewer",props:{fileName:String},setup(c){let{getPathPwd:u}=function(){let t=(t,e)=>{let s=t||yt.value,i=vt.user.rootPath;s=l("/",i,s,"/"),0===Object.keys(bt.value).length&&0!==Object.keys(wt.value).length&&(bt.value=JSON.parse(JSON.stringify(wt.value)),console.log("检测到全量密码缓存为空,自动将其初始化为:",bt.value));let n=e?wt.value:bt.value;for(let r of Object.keys(n))if(r===mt.value)for(let t of Object.keys(n[r]))if(t.endsWith("*")&&(s+="*"),D(s,t))return n[r][t];return""};return{putPathPwd:(t,e,s)=>{t&&(t=t.startsWith("/")?t:"/"+t,wt.value[mt.value]||(wt.value[mt.value]={}),bt.value[mt.value]||(bt.value[mt.value]={}),t.endsWith("**")&&!t.endsWith("/**")&&(t=p(t.substring(0,t.length-2)+"/**"),console.log("检测到密码文件夹通配符 ** 前未写 /,自动将其修正为为:",t)),s&&(wt.value[mt.value][t]=e),bt.value[mt.value][t]=e)},getPathPwd:t,popPassword:(e,s)=>{const i="function"==typeof e||"function"==typeof s,n=i?e:null,r=i?s:null,o=i?{}:e||{},{showRemember:a=!0,defaultRemember:p=vt.globalConfig?.defaultSavePwd,defaultValue:l=t(null,!0),title:c="提示",message:u="此文件夹已加密,请输入密码:",inputPlaceholder:f="请输入"}=o,g=h.prompt(u,c,{confirmButtonText:"确定",cancelButtonText:"取消",inputType:"password",inputPlaceholder:f,checkbox:!!a,defaultChecked:!!p,inputDefault:l||"",checkboxLabel:"记住密码",inputValidator:t=>!!t,inputErrorMessage:"密码不能为空."});if(!i)return g.then(({value:t,checkbox:e})=>({value:t,checkbox:e}));g.then(({value:t,checkbox:e})=>{n&&n(t,e)}).catch(()=>{r&&r()})},clearPwdCache:()=>{wt.value={},bt.value={},ElMessage.success("操作成功")}}}(),f=r(),{storageKey:d,currentPath:m}=a();const y=c;return t(()=>{!function(t,e){if(document.getElementById(scriptId)&&window.DocsAPI)return void e();let s=document.createElement("script");s.id=scriptId,s.type="text/javascript",s.charset="UTF-8",s.src=t;const i=document.getElementsByTagName("head")[0];s.addEventListener?(s.addEventListener("load",function(){e()},!1),s.addEventListener("error",function(){g.warning("调用在线文档服务失败,请检查在线文档服务是否正常")},!1)):s.attachEvent&&s.attachEvent("onreadystatechange",function(){"loaded"===window.event.srcElement.readyState&&e()});i.appendChild(s)}(`${f.globalConfig.onlyOfficeUrl}/web-apps/apps/api/documents/api.js`,()=>{let t=l(m.value,y.fileName),e={storageKey:d.value,path:t,password:u()};var s;(s=e,o({url:"/onlyOffice/config/token",method:"post",data:s})).then(t=>{let e=t.data;document.getElementById("office-body")&&(docEditor=new DocsAPI.DocEditor("office-body",e))})})}),e(()=>{if(docEditor){try{docEditor.destroyEditor()}catch(t){console.warn("OnlyOffice destroy error:",t)}docEditor=null}}),(t,e)=>(s(),i("div",St,[...e[0]||(e[0]=[n("div",{id:"office-body"},null,-1)])]))}},[["__scopeId","data-v-94832868"]]);export{xt as default};