diff --git a/docs/compiled/artplayer-plugin-danmuku.js b/docs/compiled/artplayer-plugin-danmuku.js index 4c8b7acd9..e0bb36cf0 100644 --- a/docs/compiled/artplayer-plugin-danmuku.js +++ b/docs/compiled/artplayer-plugin-danmuku.js @@ -1,7 +1,7 @@ /*! - * artplayer-plugin-danmuku.js v4.3.19 + * artplayer-plugin-danmuku.js v4.3.21 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2022 Harvey Zack * Released under the MIT License. */ -!function(t,e,i,r,n){var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},o="function"==typeof s.parcelRequire93cf&&s.parcelRequire93cf,a=o.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function h(e,i){if(!a[e]){if(!t[e]){var r="function"==typeof s.parcelRequire93cf&&s.parcelRequire93cf;if(!i&&r)return r(e,!0);if(o)return o(e,!0);if(l&&"string"==typeof e)return l(e);var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}p.resolve=function(i){var r=t[e][1][i];return null!=r?r:i},p.cache={};var u=a[e]=new h.Module(e);t[e][0].call(u.exports,p,u,u.exports,this)}return a[e].exports;function p(t){var e=p.resolve(t);return!1===e?{}:h(e)}}h.isParcelRequire=!0,h.Module=function(t){this.id=t,this.bundle=h,this.exports={}},h.modules=t,h.cache=a,h.parent=o,h.register=function(e,i){t[e]=[function(t,e){e.exports=i},{}]},Object.defineProperty(h,"root",{get:function(){return s.parcelRequire93cf}}),s.parcelRequire93cf=h;for(var u=0;u{const i=new s.default(e,t);return{name:"artplayerPluginDanmuku",emit:i.emit.bind(i),config:i.config.bind(i),hide:i.hide.bind(i),show:i.show.bind(i),get isHide(){return i.isHide}}}}i.default=o,window.artplayerPluginDanmuku=o},{"./danmuku":"8Gtnh","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"8Gtnh":[function(t,e,i){var r=t("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(i);var n=t("./bilibili"),s=t("./getDanmuTop"),o=r.interopDefault(s);class a{constructor(e,i){const{constructor:r,template:n}=e;if(this.utils=r.utils,this.validator=r.validator,this.$danmuku=n.$danmuku,this.$player=n.$player,this.art=e,this.queue=[],this.option={},this.$refs=[],this.isStop=!1,this.isHide=!1,this.timer=null,this.config(i),this.option.useWorker)try{this.worker=new Worker(t("85d40535eae5f839"))}catch(t){}e.on("video:play",this.start.bind(this)),e.on("video:playing",this.start.bind(this)),e.on("video:pause",this.stop.bind(this)),e.on("video:waiting",this.stop.bind(this)),e.on("fullscreen",this.reset.bind(this)),e.on("fullscreenWeb",this.reset.bind(this)),e.on("destroy",this.stop.bind(this)),this.load()}static get option(){return{danmuku:[],speed:5,margin:[10,100],opacity:1,fontSize:25,filter:()=>!0,antiOverlap:!0,useWorker:!0,synchronousPlayback:!1}}static get scheme(){return{danmuku:"array|function|string",speed:"number",margin:"array",opacity:"number",fontSize:"number",filter:"function",antiOverlap:"boolean",useWorker:"boolean",synchronousPlayback:"boolean"}}get isRotate(){return this.art.plugins.autoOrientation&&this.art.plugins.autoOrientation.state}get marginTop(){const{clamp:t}=this.utils,{$player:e}=this.art.template,i=this.option.margin[0];if("number"==typeof i)return t(i,0,e.clientHeight);if("string"==typeof i&&i.endsWith("%")){const r=parseFloat(i)/100;return t(e.clientHeight*r,0,e.clientHeight)}return a.option.margin[0]}get marginBottom(){const{clamp:t}=this.utils,{$player:e}=this.art.template,i=this.option.margin[1];if("number"==typeof i)return t(i,0,e.clientHeight);if("string"==typeof i&&i.endsWith("%")){const r=parseFloat(i)/100;return t(e.clientHeight*r,0,e.clientHeight)}return a.option.margin[1]}filter(t,e){return this.queue.filter((e=>e.$state===t)).map(e)}getLeft(t){const e=t.getBoundingClientRect();return this.isRotate?e.top:e.left}getRef(){const t=this.$refs.pop();if(t)return t;const e=document.createElement("div");return e.style.cssText='\n user-select: none;\n position: absolute;\n white-space: pre;\n pointer-events: none;\n perspective: 500px;\n display: inline-block;\n will-change: transform;\n font-weight: normal;\n line-height: 1.125;\n visibility: hidden;\n font-family: SimHei, "Microsoft JhengHei", Arial, Helvetica, sans-serif;\n text-shadow: rgb(0, 0, 0) 1px 0px 1px, rgb(0, 0, 0) 0px 1px 1px, rgb(0, 0, 0) 0px -1px 1px, rgb(0, 0, 0) -1px 0px 1px;\n ',e}getReady(){const{currentTime:t}=this.art;return this.queue.filter((e=>"ready"===e.$state||"wait"===e.$state&&t+.2>=e.time&&e.time>=t-.2))}getEmits(){const t=[],{clientWidth:e}=this.$player,i=this.getLeft(this.$player);return this.filter("emit",(r=>{const n=r.$ref.offsetTop,s=this.getLeft(r.$ref)-i,o=r.$ref.clientHeight,a=r.$ref.clientWidth,l=s+a,h=e-l,u=l/r.$restTime,p={};p.top=n,p.left=s,p.height=o,p.width=a,p.right=h,p.speed=u,p.distance=l,p.time=r.$restTime,p.mode=r.mode,t.push(p)})),t}postMessage(t={}){return new Promise((e=>{if(this.option.useWorker&&this.worker&&this.worker.postMessage)t.id=Date.now(),this.worker.postMessage(t),this.worker.onmessage=i=>{const{data:r}=i;r.id===t.id&&e(r)};else{const i=o.default(t);e({top:i})}}))}async load(){try{let t=[];t="function"==typeof this.option.danmuku?await this.option.danmuku():"function"==typeof this.option.danmuku.then?await this.option.danmuku:"string"==typeof this.option.danmuku?await n.bilibiliDanmuParseFromUrl(this.option.danmuku):this.option.danmuku,this.utils.errorHandle(Array.isArray(t),"Danmuku need return an array as result"),this.art.emit("artplayerPluginDanmuku:loaded",t),this.queue=[],this.$danmuku.innerText="",t.forEach((t=>this.emit(t)))}catch(t){throw this.art.emit("artplayerPluginDanmuku:error",t),t}return this}config(t){const{clamp:e}=this.utils;return this.option=Object.assign({},a.option,this.option,t),this.validator(this.option,a.scheme),t.fontSize&&this.reset(),this.option.speed=e(this.option.speed,1,10),this.option.opacity=e(this.option.opacity,0,1),this.option.fontSize=e(this.option.fontSize,12,100),this.art.emit("artplayerPluginDanmuku:config",this.option),this}makeWait(t){t.$state="wait",t.$ref&&(t.$ref.style.visibility="hidden",t.$ref.style.marginLeft="0px",t.$ref.style.transform="translateX(0px)",t.$ref.style.transition="transform 0s linear 0s",this.$refs.push(t.$ref),t.$ref=null)}continue(){const{clientWidth:t}=this.$player;return this.filter("stop",(e=>{switch(e.$state="emit",e.$lastStartTime=Date.now(),e.mode){case 0:{const i=t+e.$ref.clientWidth;e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition=`transform ${e.$restTime}s linear 0s`;break}}})),this}suspend(){const{clientWidth:t}=this.$player;return this.filter("emit",(e=>{switch(e.$state="stop",e.mode){case 0:{const i=t-(this.getLeft(e.$ref)-this.getLeft(this.$player));e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition="transform 0s linear 0s";break}}})),this}reset(){this.queue.forEach((t=>this.makeWait(t)))}update(){const{clientWidth:t}=this.$player;return this.timer=window.requestAnimationFrame((async()=>{if(this.art.playing&&!this.isHide){this.filter("emit",(t=>{const e=(Date.now()-t.$lastStartTime)/1e3;t.$restTime-=e,t.$lastStartTime=Date.now(),t.$restTime<=0&&this.makeWait(t)}));const e=this.getReady();for(let i=0;ithis.makeWait(t))),this.$danmuku.style.display="none",this.art.emit("artplayerPluginDanmuku:hide"),this}emit(t){return this.validator(t,{text:"string",mode:"number|undefined",color:"string|undefined",time:"number|undefined",border:"boolean|undefined"}),t.text.trim()&&this.option.filter(t)?(t.time?t.time=this.utils.clamp(t.time,0,1/0):t.time=this.art.currentTime+1,this.queue.push({mode:0,...t,$state:"wait",$ref:null,$restTime:0,$lastStartTime:0}),this):this}}i.default=a},{"./bilibili":"KnwDr","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY","85d40535eae5f839":"5sXKb","./getDanmuTop":"2Abxf"}],KnwDr:[function(t,e,i){var r=t("@parcel/transformer-js/src/esmodule-helpers.js");function n(t){switch(t){case 1:case 2:case 3:default:return 0;case 4:case 5:return 1}}function s(t){if("string"!=typeof t)return[];const e=t.match(/[\S ]*?)<\/d>/gi);return e&&e.length?e.map((t=>{const[,e,i]=t.match(/(.+)<\/d>/),r=e.split(",");return 8===r.length&&i.trim()?{text:i,time:Number(r[0]),mode:n(Number(r[1])),fontSize:Number(r[2]),color:`#${Number(r[3]).toString(16)}`,timestamp:Number(r[4]),pool:Number(r[5]),userID:r[6],rowID:Number(r[7])}:null})):[]}function o(t){return fetch(t).then((t=>t.text())).then((t=>s(t)))}r.defineInteropFlag(i),r.export(i,"getMode",(()=>n)),r.export(i,"bilibiliDanmuParseFromXml",(()=>s)),r.export(i,"bilibiliDanmuParseFromUrl",(()=>o))},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],b7MJY:[function(t,e,i){i.interopDefault=function(t){return t&&t.__esModule?t:{default:t}},i.defineInteropFlag=function(t){Object.defineProperty(t,"__esModule",{value:!0})},i.exportAll=function(t,e){return Object.keys(t).forEach((function(i){"default"===i||"__esModule"===i||e.hasOwnProperty(i)||Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[i]}})})),e},i.export=function(t,e,i){Object.defineProperty(t,e,{enumerable:!0,get:i})}},{}],"5sXKb":[function(t,e,i){e.exports="data:application/javascript,function%20getDanmuTop%28%7Btarget%3At%2Cemits%3Ae%2CclientWidth%3An%2CclientHeight%3Ai%2CmarginBottom%3Ao%2CmarginTop%3As%2CantiOverlap%3Ah%7D%29%7Bconst%20r%3De.filter%28%28e%3D%3Ee.mode%3D%3D%3Dt.mode%26%26e.top%3Es%26%26e.top%3C%3Di-o%29%29.sort%28%28%28t%2Ce%29%3D%3Et.top-e.top%29%29%3Bif%280%3D%3D%3Dr.length%29return%20s%3Br.unshift%28%7Btop%3A0%2Cleft%3A0%2Cright%3A0%2Cheight%3As%2Cwidth%3An%2Cspeed%3A0%2Cdistance%3An%7D%29%2Cr.push%28%7Btop%3Ai-o%2Cleft%3A0%2Cright%3A0%2Cheight%3Ao%2Cwidth%3An%2Cspeed%3A0%2Cdistance%3An%7D%29%3Bfor%28let%20e%3D1%3Be%3Cr.length%3Be%2B%3D1%29%7Bconst%20n%3Dr%5Be%5D%2Ci%3Dr%5Be-1%5D%2Co%3Di.top%2Bi.height%3Bif%28n.top-o%3E%3Dt.height%29return%20o%7Dconst%20p%3D%5B%5D%3Bfor%28let%20t%3D1%3Bt%3Cr.length-1%3Bt%2B%3D1%29%7Bconst%20e%3Dr%5Bt%5D%3Bif%28p.length%29%7Bconst%20t%3Dp%5Bp.length-1%5D%3Bt%5B0%5D.top%3D%3D%3De.top%3Ft.push%28e%29%3Ap.push%28%5Be%5D%29%7Delse%20p.push%28%5Be%5D%29%7Dif%28%21h%29%7Bswitch%28t.mode%29%7Bcase%200%3Ap.sort%28%28%28t%2Ce%29%3D%3E%7Bconst%20n%3DMath.min%28...e.map%28%28t%3D%3Et.right%29%29%29%2Ci%3DMath.min%28...t.map%28%28t%3D%3Et.right%29%29%29%3Breturn%20n%2ae.length-i%2at.length%7D%29%29%3Bbreak%3Bcase%201%3Ap.sort%28%28%28t%2Ce%29%3D%3E%7Bconst%20n%3DMath.max%28...e.map%28%28t%3D%3Et.width%29%29%29%3Breturn%20Math.max%28...t.map%28%28t%3D%3Et.width%29%29%29%2at.length-n%2ae.length%7D%29%29%7Dreturn%20p%5B0%5D%5B0%5D.top%7Dswitch%28t.mode%29%7Bcase%200%3A%7Bconst%20e%3Dp.find%28%28e%3D%3Ee.every%28%28e%3D%3E%7Bif%28n%3Ce.distance%29return%211%3Bif%28t.speed%3Ce.speed%29return%210%3Breturn%20e.right%2F%28t.speed-e.speed%29%3Ee.time%7D%29%29%29%29%3Breturn%20e%26%26e%5B0%5D%3Fe%5B0%5D.top%3Avoid%200%7Dcase%201%3Areturn%7D%7Donmessage%3Dt%3D%3E%7Bconst%7Bdata%3Ae%7D%3Dt%2Cn%3DgetDanmuTop%28e%29%3Bself.postMessage%28%7Btop%3An%2Cid%3Ae.id%7D%29%7D%3B"},{}],"2Abxf":[function(t,e,i){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i),i.default=function({target:t,emits:e,clientWidth:i,clientHeight:r,marginBottom:n,marginTop:s,antiOverlap:o}){const a=e.filter((e=>e.mode===t.mode&&e.top>s&&e.top<=r-n)).sort(((t,e)=>t.top-e.top));if(0===a.length)return s;a.unshift({top:0,left:0,right:0,height:s,width:i,speed:0,distance:i}),a.push({top:r-n,left:0,right:0,height:n,width:i,speed:0,distance:i});for(let e=1;e=t.height)return n}const l=[];for(let t=1;t{const i=Math.min(...e.map((t=>t.right))),r=Math.min(...t.map((t=>t.right)));return i*e.length-r*t.length}));break;case 1:l.sort(((t,e)=>{const i=Math.max(...e.map((t=>t.width)));return Math.max(...t.map((t=>t.width)))*t.length-i*e.length}))}return l[0][0].top}switch(t.mode){case 0:{const e=l.find((e=>e.every((e=>{if(ie.time}))));return e&&e[0]?e[0].top:void 0}case 1:return}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}]},["E13ST"],"E13ST"); \ No newline at end of file +!function(t,e,i,r,n){var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},o="function"==typeof s.parcelRequire93cf&&s.parcelRequire93cf,a=o.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function h(e,i){if(!a[e]){if(!t[e]){var r="function"==typeof s.parcelRequire93cf&&s.parcelRequire93cf;if(!i&&r)return r(e,!0);if(o)return o(e,!0);if(l&&"string"==typeof e)return l(e);var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}p.resolve=function(i){var r=t[e][1][i];return null!=r?r:i},p.cache={};var u=a[e]=new h.Module(e);t[e][0].call(u.exports,p,u,u.exports,this)}return a[e].exports;function p(t){var e=p.resolve(t);return!1===e?{}:h(e)}}h.isParcelRequire=!0,h.Module=function(t){this.id=t,this.bundle=h,this.exports={}},h.modules=t,h.cache=a,h.parent=o,h.register=function(e,i){t[e]=[function(t,e){e.exports=i},{}]},Object.defineProperty(h,"root",{get:function(){return s.parcelRequire93cf}}),s.parcelRequire93cf=h;for(var u=0;u{const i=new s.default(e,t);return{name:"artplayerPluginDanmuku",emit:i.emit.bind(i),config:i.config.bind(i),hide:i.hide.bind(i),show:i.show.bind(i),get isHide(){return i.isHide}}}}i.default=o,window.artplayerPluginDanmuku=o},{"./danmuku":"8Gtnh","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"8Gtnh":[function(t,e,i){var r=t("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(i);var n=t("./bilibili"),s=t("./getDanmuTop"),o=r.interopDefault(s);class a{constructor(e,i){const{constructor:r,template:n}=e;if(this.utils=r.utils,this.validator=r.validator,this.$danmuku=n.$danmuku,this.$player=n.$player,this.art=e,this.queue=[],this.option={},this.$refs=[],this.isStop=!1,this.isHide=!1,this.timer=null,this.config(i),this.option.useWorker)try{this.worker=new Worker(t("85d40535eae5f839"))}catch(t){}e.on("video:play",this.start.bind(this)),e.on("video:playing",this.start.bind(this)),e.on("video:pause",this.stop.bind(this)),e.on("video:waiting",this.stop.bind(this)),e.on("fullscreen",this.reset.bind(this)),e.on("fullscreenWeb",this.reset.bind(this)),e.on("destroy",this.stop.bind(this)),this.load()}static get option(){return{danmuku:[],speed:5,margin:[10,100],opacity:1,fontSize:25,filter:()=>!0,antiOverlap:!0,useWorker:!0,synchronousPlayback:!1}}static get scheme(){return{danmuku:"array|function|string",speed:"number",margin:"array",opacity:"number",fontSize:"number",filter:"function",antiOverlap:"boolean",useWorker:"boolean",synchronousPlayback:"boolean"}}get isRotate(){return this.art.plugins.autoOrientation&&this.art.plugins.autoOrientation.state}get marginTop(){const{clamp:t}=this.utils,{$player:e}=this.art.template,i=this.option.margin[0];if("number"==typeof i)return t(i,0,e.clientHeight);if("string"==typeof i&&i.endsWith("%")){const r=parseFloat(i)/100;return t(e.clientHeight*r,0,e.clientHeight)}return a.option.margin[0]}get marginBottom(){const{clamp:t}=this.utils,{$player:e}=this.art.template,i=this.option.margin[1];if("number"==typeof i)return t(i,0,e.clientHeight);if("string"==typeof i&&i.endsWith("%")){const r=parseFloat(i)/100;return t(e.clientHeight*r,0,e.clientHeight)}return a.option.margin[1]}filter(t,e){return this.queue.filter((e=>e.$state===t)).map(e)}getLeft(t){const e=t.getBoundingClientRect();return this.isRotate?e.top:e.left}getRef(){const t=this.$refs.pop();if(t)return t;const e=document.createElement("div");return e.style.cssText='\n user-select: none;\n position: absolute;\n white-space: pre;\n pointer-events: none;\n perspective: 500px;\n display: inline-block;\n will-change: transform;\n font-weight: normal;\n line-height: 1.125;\n visibility: hidden;\n font-family: SimHei, "Microsoft JhengHei", Arial, Helvetica, sans-serif;\n text-shadow: rgb(0, 0, 0) 1px 0px 1px, rgb(0, 0, 0) 0px 1px 1px, rgb(0, 0, 0) 0px -1px 1px, rgb(0, 0, 0) -1px 0px 1px;\n ',e}getReady(){const{currentTime:t}=this.art;return this.queue.filter((e=>"ready"===e.$state||"wait"===e.$state&&t+.1>=e.time&&e.time>=t-.1))}getEmits(){const t=[],{clientWidth:e}=this.$player,i=this.getLeft(this.$player);return this.filter("emit",(r=>{const n=r.$ref.offsetTop,s=this.getLeft(r.$ref)-i,o=r.$ref.clientHeight,a=r.$ref.clientWidth,l=s+a,h=e-l,u=l/r.$restTime,p={};p.top=n,p.left=s,p.height=o,p.width=a,p.right=h,p.speed=u,p.distance=l,p.time=r.$restTime,p.mode=r.mode,t.push(p)})),t}postMessage(t={}){return new Promise((e=>{if(this.option.useWorker&&this.worker&&this.worker.postMessage)t.id=Date.now(),this.worker.postMessage(t),this.worker.onmessage=i=>{const{data:r}=i;r.id===t.id&&e(r)};else{const i=o.default(t);e({top:i})}}))}async load(){try{let t=[];t="function"==typeof this.option.danmuku?await this.option.danmuku():"function"==typeof this.option.danmuku.then?await this.option.danmuku:"string"==typeof this.option.danmuku?await n.bilibiliDanmuParseFromUrl(this.option.danmuku):this.option.danmuku,this.utils.errorHandle(Array.isArray(t),"Danmuku need return an array as result"),this.art.emit("artplayerPluginDanmuku:loaded",t),this.queue=[],this.$danmuku.innerText="",t.forEach((t=>this.emit(t)))}catch(t){throw this.art.emit("artplayerPluginDanmuku:error",t),t}return this}config(t){const{clamp:e}=this.utils;return this.option=Object.assign({},a.option,this.option,t),this.validator(this.option,a.scheme),t.fontSize&&this.reset(),this.option.speed=e(this.option.speed,1,10),this.option.opacity=e(this.option.opacity,0,1),this.option.fontSize=e(this.option.fontSize,12,100),this.art.emit("artplayerPluginDanmuku:config",this.option),this}makeWait(t){t.$state="wait",t.$ref&&(t.$ref.style.visibility="hidden",t.$ref.style.marginLeft="0px",t.$ref.style.transform="translateX(0px)",t.$ref.style.transition="transform 0s linear 0s",this.$refs.push(t.$ref),t.$ref=null)}continue(){const{clientWidth:t}=this.$player;return this.filter("stop",(e=>{switch(e.$state="emit",e.$lastStartTime=Date.now(),e.mode){case 0:{const i=t+e.$ref.clientWidth;e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition=`transform ${e.$restTime}s linear 0s`;break}}})),this}suspend(){const{clientWidth:t}=this.$player;return this.filter("emit",(e=>{switch(e.$state="stop",e.mode){case 0:{const i=t-(this.getLeft(e.$ref)-this.getLeft(this.$player));e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition="transform 0s linear 0s";break}}})),this}reset(){this.queue.forEach((t=>this.makeWait(t)))}update(){const{clientWidth:t}=this.$player;return this.timer=window.requestAnimationFrame((async()=>{if(this.art.playing&&!this.isHide){this.filter("emit",(t=>{const e=(Date.now()-t.$lastStartTime)/1e3;t.$restTime-=e,t.$lastStartTime=Date.now(),t.$restTime<=0&&this.makeWait(t)}));const e=this.getReady();for(let i=0;ithis.makeWait(t))),this.$danmuku.style.display="none",this.art.emit("artplayerPluginDanmuku:hide"),this}emit(t){return this.validator(t,{text:"string",mode:"number|undefined",color:"string|undefined",time:"number|undefined",border:"boolean|undefined"}),t.text.trim()&&this.option.filter(t)?(t.time?t.time=this.utils.clamp(t.time,0,1/0):t.time=this.art.currentTime+1,this.queue.push({mode:0,...t,$state:"wait",$ref:null,$restTime:0,$lastStartTime:0}),this):this}}i.default=a},{"./bilibili":"KnwDr","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY","85d40535eae5f839":"5sXKb","./getDanmuTop":"2Abxf"}],KnwDr:[function(t,e,i){var r=t("@parcel/transformer-js/src/esmodule-helpers.js");function n(t){switch(t){case 1:case 2:case 3:default:return 0;case 4:case 5:return 1}}function s(t){if("string"!=typeof t)return[];const e=t.match(/[\S ]*?)<\/d>/gi);return e&&e.length?e.map((t=>{const[,e,i]=t.match(/(.+)<\/d>/),r=e.split(",");return 8===r.length&&i.trim()?{text:i,time:Number(r[0]),mode:n(Number(r[1])),fontSize:Number(r[2]),color:`#${Number(r[3]).toString(16)}`,timestamp:Number(r[4]),pool:Number(r[5]),userID:r[6],rowID:Number(r[7])}:null})):[]}function o(t){return fetch(t).then((t=>t.text())).then((t=>s(t)))}r.defineInteropFlag(i),r.export(i,"getMode",(()=>n)),r.export(i,"bilibiliDanmuParseFromXml",(()=>s)),r.export(i,"bilibiliDanmuParseFromUrl",(()=>o))},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],b7MJY:[function(t,e,i){i.interopDefault=function(t){return t&&t.__esModule?t:{default:t}},i.defineInteropFlag=function(t){Object.defineProperty(t,"__esModule",{value:!0})},i.exportAll=function(t,e){return Object.keys(t).forEach((function(i){"default"===i||"__esModule"===i||e.hasOwnProperty(i)||Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[i]}})})),e},i.export=function(t,e,i){Object.defineProperty(t,e,{enumerable:!0,get:i})}},{}],"5sXKb":[function(t,e,i){e.exports="data:application/javascript,function%20getDanmuTop%28%7Btarget%3At%2Cemits%3Ae%2CclientWidth%3An%2CclientHeight%3Ai%2CmarginBottom%3Ao%2CmarginTop%3As%2CantiOverlap%3Ah%7D%29%7Bconst%20r%3De.filter%28%28e%3D%3Ee.mode%3D%3D%3Dt.mode%26%26e.top%3E%3Ds%26%26e.top%3C%3Di-o%29%29.sort%28%28%28t%2Ce%29%3D%3Et.top-e.top%29%29%3Bif%280%3D%3D%3Dr.length%29return%20s%3Br.unshift%28%7Btop%3A0%2Cleft%3A0%2Cright%3A0%2Cheight%3As%2Cwidth%3An%2Cspeed%3A0%2Cdistance%3An%7D%29%2Cr.push%28%7Btop%3Ai-o%2Cleft%3A0%2Cright%3A0%2Cheight%3Ao%2Cwidth%3An%2Cspeed%3A0%2Cdistance%3An%7D%29%3Bfor%28let%20e%3D1%3Be%3Cr.length%3Be%2B%3D1%29%7Bconst%20n%3Dr%5Be%5D%2Ci%3Dr%5Be-1%5D%2Co%3Di.top%2Bi.height%3Bif%28n.top-o%3E%3Dt.height%29return%20o%7Dconst%20p%3D%5B%5D%3Bfor%28let%20t%3D1%3Bt%3Cr.length-1%3Bt%2B%3D1%29%7Bconst%20e%3Dr%5Bt%5D%3Bif%28p.length%29%7Bconst%20t%3Dp%5Bp.length-1%5D%3Bt%5B0%5D.top%3D%3D%3De.top%3Ft.push%28e%29%3Ap.push%28%5Be%5D%29%7Delse%20p.push%28%5Be%5D%29%7Dif%28%21h%29%7Bswitch%28t.mode%29%7Bcase%200%3Ap.sort%28%28%28t%2Ce%29%3D%3E%7Bconst%20n%3DMath.min%28...e.map%28%28t%3D%3Et.right%29%29%29%2Ci%3DMath.min%28...t.map%28%28t%3D%3Et.right%29%29%29%3Breturn%20n%2ae.length-i%2at.length%7D%29%29%3Bbreak%3Bcase%201%3Ap.sort%28%28%28t%2Ce%29%3D%3E%7Bconst%20n%3DMath.max%28...e.map%28%28t%3D%3Et.width%29%29%29%3Breturn%20Math.max%28...t.map%28%28t%3D%3Et.width%29%29%29%2at.length-n%2ae.length%7D%29%29%7Dreturn%20p%5B0%5D%5B0%5D.top%7Dswitch%28t.mode%29%7Bcase%200%3A%7Bconst%20e%3Dp.find%28%28e%3D%3Ee.every%28%28e%3D%3E%7Bif%28n%3Ce.distance%29return%211%3Bif%28t.speed%3Ce.speed%29return%210%3Breturn%20e.right%2F%28t.speed-e.speed%29%3Ee.time%7D%29%29%29%29%3Breturn%20e%26%26e%5B0%5D%3Fe%5B0%5D.top%3Avoid%200%7Dcase%201%3Areturn%7D%7Donmessage%3Dt%3D%3E%7Bconst%7Bdata%3Ae%7D%3Dt%2Cn%3DgetDanmuTop%28e%29%3Bself.postMessage%28%7Btop%3An%2Cid%3Ae.id%7D%29%7D%3B"},{}],"2Abxf":[function(t,e,i){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i),i.default=function({target:t,emits:e,clientWidth:i,clientHeight:r,marginBottom:n,marginTop:s,antiOverlap:o}){const a=e.filter((e=>e.mode===t.mode&&e.top>=s&&e.top<=r-n)).sort(((t,e)=>t.top-e.top));if(0===a.length)return s;a.unshift({top:0,left:0,right:0,height:s,width:i,speed:0,distance:i}),a.push({top:r-n,left:0,right:0,height:n,width:i,speed:0,distance:i});for(let e=1;e=t.height)return n}const l=[];for(let t=1;t{const i=Math.min(...e.map((t=>t.right))),r=Math.min(...t.map((t=>t.right)));return i*e.length-r*t.length}));break;case 1:l.sort(((t,e)=>{const i=Math.max(...e.map((t=>t.width)));return Math.max(...t.map((t=>t.width)))*t.length-i*e.length}))}return l[0][0].top}switch(t.mode){case 0:{const e=l.find((e=>e.every((e=>{if(ie.time}))));return e&&e[0]?e[0].top:void 0}case 1:return}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}]},["E13ST"],"E13ST"); \ No newline at end of file diff --git a/docs/compiled/artplayer.js b/docs/compiled/artplayer.js index 8ba7eda0c..30318deb9 100644 --- a/docs/compiled/artplayer.js +++ b/docs/compiled/artplayer.js @@ -1,7 +1,7 @@ /*! - * artplayer.js v4.3.17 + * artplayer.js v4.3.18 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2022 Harvey Zack * Released under the MIT License. */ -!function(e,t,r,o,i){var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof n.parcelRequireb749&&n.parcelRequireb749,s=a.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,r){if(!s[t]){if(!e[t]){var o="function"==typeof n.parcelRequireb749&&n.parcelRequireb749;if(!r&&o)return o(t,!0);if(a)return a(t,!0);if(l&&"string"==typeof t)return l(t);var i=new Error("Cannot find module '"+t+"'");throw i.code="MODULE_NOT_FOUND",i}u.resolve=function(r){var o=e[t][1][r];return null!=o?o:r},u.cache={};var p=s[t]=new c.Module(t);e[t][0].call(p.exports,u,p,p.exports,this)}return s[t].exports;function u(e){var t=u.resolve(e);return!1===t?{}:c(t)}}c.isParcelRequire=!0,c.Module=function(e){this.id=e,this.bundle=c,this.exports={}},c.modules=e,c.cache=s,c.parent=a,c.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(c,"root",{get:function(){return n.parcelRequireb749}}),n.parcelRequireb749=c;for(var p=0;pt.call(this))),re.push(this)}static get instances(){return re}static get version(){return"4.3.17"}static get env(){return"production"}static get build(){return"1651540113918"}static get config(){return h.default}static get utils(){return p}static get scheme(){return d.default}static get Emitter(){return c.default}static get validator(){return s.default}static get kindOf(){return s.default.kindOf}static get html(){return v.default.html}static get option(){return{container:"#artplayer",url:"",poster:"",title:"",type:"",theme:"#f00",volume:.7,isLive:!1,muted:!1,autoplay:!1,autoSize:!1,autoMini:!1,loop:!1,flip:!1,playbackRate:!1,aspectRatio:!1,screenshot:!1,setting:!1,hotkey:!0,pip:!1,mutex:!0,backdrop:!0,fullscreen:!1,fullscreenWeb:!1,subtitleOffset:!1,miniProgressBar:!1,useSSR:!1,playsInline:!0,lock:!1,fastForward:!1,autoPlayback:!1,autoOrientation:!1,ads:[],layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],whitelist:[],thumbnails:{url:"",number:60,column:10},subtitle:{url:"",type:"",style:{},encoding:"utf-8"},moreVideoAttr:{controls:!1,preload:p.isSafari?"auto":"metadata"},icons:{},customType:{},lang:navigator.language.toLowerCase()}}get proxy(){return this.events.proxy}get query(){return this.template.query}destroy(e=!0){this.events.destroy(),this.template.destroy(e),re.splice(re.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}if(r.default=oe,oe.NOTICE_TIME=2e3,oe.SETTING_WIDTH=250,oe.SETTING_ITEM_WIDTH=200,oe.SETTING_ITEM_HEIGHT=35,oe.INDICATOR_SIZE=14,oe.INDICATOR_SIZE_ICON=16,oe.INDICATOR_SIZE_MOBILE=18,oe.INDICATOR_SIZE_MOBILE_ICON=20,oe.VOLUME_PANEL_WIDTH=60,oe.VOLUME_HANDLE_WIDTH=12,oe.RESIZE_TIME=500,oe.SCROLL_TIME=200,oe.SCROLL_GAP=50,oe.AUTO_PLAYBACK_MAX=10,oe.RECONNECT_TIME_MAX=5,oe.RECONNECT_SLEEP_TIME=1e3,oe.CONTROL_HIDE_TIME=3e3,oe.DB_CLICE_TIME=300,oe.MOBILE_AUTO_PLAYBACKRATE=3,oe.MOBILE_AUTO_PLAYBACKRATE_TIME=1e3,oe.MOBILE_AUTO_ORIENTATION_TIME=200,oe.INFO_LOOP_TIME=1e3,oe.FAST_FORWARD_VALUE=3,oe.FAST_FORWARD_TIME=1e3,"undefined"!=typeof document){const e=document.createElement("style");e.dataset.from="artplayer",e.textContent=n.default,document.head.appendChild(e)}"undefined"!=typeof window&&(window.Artplayer=oe),console.log(`%c ArtPlayer %c ${oe.version} %c https://artplayer.org`,"color: #fff; background: #5f5f5f","color: #fff; background: #4bc729","")},{"bundle-text:./style/index.less":"6U764","option-validator":"2A2W5","./utils/emitter":"1SgiG","./utils":"5yYFo","./scheme":"3izFE","./config":"ej4fZ","./whitelist":"7CkCt","./template":"8iGAh","./i18n":"3mM4M","./player":"bCaa0","./control":"3qXcr","./contextmenu":"hTnNz","./info":"bfwuE","./subtitle":"bWZ2U","./events":"9oLaG","./hotkey":"cKO4X","./layer":"kZD92","./loading":"c9b9e","./notice":"SxQeL","./mask":"aJ0dF","./icons":"jx1Wu","./setting":"hdF39","./storage":"bCcu0","./plugins":"1v13t","./ads":"jXgJj","./mobile":"eD5Ch","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"6U764":[function(e,t,r){t.exports='.art-video-player{z-index:20;width:100%;height:100%;zoom:1;color:#eee;text-align:left;direction:ltr;user-select:none;-webkit-tap-highlight-color:#0000;touch-action:manipulation;-ms-high-contrast-adjust:none;background-color:#000;outline:0;margin:0 auto;font-family:Roboto,Arial,Helvetica,sans-serif;font-size:14px;line-height:1.3;display:flex;position:relative}.art-video-player *{box-sizing:border-box;margin:0;padding:0}.art-video-player ::-webkit-scrollbar{width:5px;height:5px}.art-video-player ::-webkit-scrollbar-thumb{background-color:#666}.art-video-player ::-webkit-scrollbar-thumb:hover{background-color:#ccc}.art-video-player .art-icon{justify-content:center;align-items:center;line-height:1.5;display:inline-flex}.art-video-player .art-icon svg{fill:#fff}.art-video-player img{max-width:100%;vertical-align:top}@supports ((-webkit-backdrop-filter: initial) or (backdrop-filter: initial)){.art-video-player .art-backdrop-filter{-webkit-backdrop-filter:saturate(180%)blur(20px);backdrop-filter:saturate(180%)blur(20px);background-color:#000000b3!important}}.art-video-player .art-video{z-index:10;width:100%;height:100%;cursor:pointer;background-color:#000;position:absolute;inset:0}.art-video-player .art-poster{z-index:11;width:100%;height:100%;user-select:none;pointer-events:none;background-position:50%;background-repeat:no-repeat;background-size:cover;position:absolute;inset:0}.art-video-player .art-subtitle{z-index:20;width:100%;text-align:center;color:#fff;pointer-events:none;text-shadow:1px 0 1px #000,0 1px 1px #000,-1px 0 1px #000,0 -1px 1px #000,1px 1px 1px #000,-1px -1px 1px #000,1px -1px 1px #000,-1px 1px 1px #000;padding:0 20px;font-size:20px;display:none;position:absolute;bottom:10px}.art-video-player .art-subtitle p{word-break:break-all;height:fit-content;margin:5px 0 0;line-height:1.2}.art-video-player.art-subtitle-show .art-subtitle{display:block}.art-video-player.art-control-show .art-subtitle{bottom:50px}.art-video-player .art-danmuku{z-index:30;width:100%;height:100%;pointer-events:none;position:absolute;inset:0;overflow:hidden}.art-video-player .art-layers{z-index:40;width:100%;height:100%;pointer-events:none;display:none;position:absolute;inset:0;overflow:hidden}.art-video-player .art-layers .art-layer{pointer-events:auto}.art-video-player.art-layer-show .art-layers{display:block}.art-video-player .art-mask{z-index:50;width:100%;height:100%;pointer-events:none;justify-content:center;align-items:center;display:none;position:absolute;inset:0;overflow:hidden}.art-video-player .art-mask .art-state{width:60px;height:60px;opacity:.85;cursor:pointer;pointer-events:all;justify-content:center;align-items:center;display:flex;position:absolute;bottom:65px;right:30px}.art-video-player.art-mask-show .art-mask{display:flex}.art-video-player.art-mobile .art-state{position:static}.art-video-player .art-loading{z-index:70;width:100%;height:100%;pointer-events:none;justify-content:center;align-items:center;display:none;position:absolute;inset:0}.art-video-player.art-loading-show .art-loading{display:flex}.art-video-player .art-bottom{z-index:60;height:100px;opacity:0;visibility:hidden;pointer-events:none;background-image:linear-gradient(#0000,#0006,#000);background-position:bottom;background-repeat:repeat-x;flex-direction:column;justify-content:space-between;padding:50px 10px 0;transition:all .2s ease-in-out;display:flex;position:absolute;bottom:0;left:0;right:0}.art-video-player .art-bottom .art-progress{z-index:0;pointer-events:auto;flex:1;position:relative}.art-video-player .art-bottom .art-progress .art-control-progress{height:4px;cursor:pointer;flex-direction:row;align-items:center;display:flex;position:relative}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner{height:50%;width:100%;background:#fff3;align-items:center;display:flex;position:relative}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-loaded{z-index:10;height:100%;width:0;background:#fff6;position:absolute;inset:0}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-played{z-index:20;height:100%;width:0;position:absolute;inset:0}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight{z-index:30;height:100%;pointer-events:none;position:absolute;inset:0}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight span{width:7px;height:100%;pointer-events:auto;background:#fff;display:inline-block;position:absolute;top:0;left:0}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator{visibility:hidden;z-index:40;border-radius:50%;justify-content:center;align-items:center;transition:transform .1s ease-in-out;position:absolute;transform:scale(.1)}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator .art-icon{width:100%;height:100%;pointer-events:none;user-select:none}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-tip{z-index:50;height:20px;color:#fff;text-align:center;white-space:nowrap;background:#000000b3;border-radius:3px;padding:0 5px;font-size:12px;font-weight:700;line-height:20px;display:none;position:absolute;top:-25px;left:0}.art-video-player .art-bottom .art-progress .art-control-thumbnails{pointer-events:none;background-color:#000000b3;display:none;position:absolute;bottom:8px;left:0}.art-video-player .art-bottom .art-progress .art-control-loop{width:100%;height:100%;pointer-events:none;display:none;position:absolute;inset:0}.art-video-player .art-bottom .art-progress .art-control-loop .art-loop-point{width:2px;height:8px;background:#ffffffbf;position:absolute;top:-2px;left:0}.art-video-player .art-bottom .art-controls{z-index:1;pointer-events:auto;height:45px;justify-content:space-between;align-items:center;display:flex;position:relative}.art-video-player .art-bottom .art-controls .art-controls-left,.art-video-player .art-bottom .art-controls .art-controls-right{display:flex}.art-video-player .art-bottom .art-controls .art-controls-right{justify-content:flex-end}.art-video-player .art-bottom .art-controls .art-control{opacity:.9;min-height:36px;min-width:36px;text-align:center;cursor:pointer;white-space:nowrap;justify-content:center;align-items:center;font-size:12px;line-height:1;display:flex}.art-video-player .art-bottom .art-controls .art-control .art-icon{float:left;height:36px;width:36px;justify-content:center;align-items:center;display:flex}.art-video-player .art-bottom .art-controls .art-control:hover{opacity:1}.art-video-player .art-bottom .art-controls .art-control-onlyText{padding:0 10px}.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel{float:left;width:0;height:100%;transition:margin .2s cubic-bezier(.4,0,1,1),width .2s cubic-bezier(.4,0,1,1);position:relative;overflow:hidden}.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel .art-volume-slider-handle{width:12px;height:12px;background:#fff;border-radius:12px;margin-top:-6px;position:absolute;top:50%;left:0}.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel .art-volume-slider-handle:before{background:#fff;left:-54px}.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel .art-volume-slider-handle:after{background:#fff3;left:6px}.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel .art-volume-slider-handle:before,.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel .art-volume-slider-handle:after{content:"";height:3px;width:60px;margin-top:-2px;display:block;position:absolute;top:50%}.art-video-player .art-bottom .art-controls .art-control-volume:hover .art-volume-panel{width:60px}.art-video-player .art-bottom .art-controls .art-control-quality{z-index:30;position:relative}.art-video-player .art-bottom .art-controls .art-control-quality .art-qualitys{width:100px;text-align:center;color:#fff;background:#000c;border-radius:3px;padding:5px 0;display:none;position:absolute;bottom:35px}.art-video-player .art-bottom .art-controls .art-control-quality .art-qualitys .art-quality-item{height:30px;text-overflow:ellipsis;white-space:nowrap;text-shadow:0 0 2px #00000080;line-height:30px;overflow:hidden}.art-video-player .art-bottom .art-controls .art-control-quality .art-qualitys .art-quality-item:hover{background-color:#ffffff1a}.art-video-player .art-bottom .art-controls .art-control-quality:hover .art-qualitys{display:block}.art-video-player .art-bottom:hover .art-progress .art-control-progress .art-control-progress-inner{height:100%}.art-video-player .art-bottom:hover .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator{visibility:visible;transform:scale(1)}.art-video-player.art-control-show .art-bottom,.art-video-player.art-hover .art-bottom{opacity:1;visibility:visible}.art-video-player.art-error .art-progress-indicator,.art-video-player.art-destroy .art-progress-indicator,.art-video-player.art-error .art-progress-tip,.art-video-player.art-destroy .art-progress-tip{display:none!important}.art-video-player.art-mobile .art-bottom{padding:50px 7px 0}.art-video-player.art-mobile .art-bottom .art-controls{height:40px}.art-video-player.art-mobile .art-bottom .art-progress-indicator{visibility:visible!important;transform:scale(1)!important}.art-video-player .art-notice{z-index:80;width:100%;pointer-events:none;padding:10px;font-size:14px;display:none;position:absolute;top:0;left:0}.art-video-player .art-notice .art-notice-inner{color:#fff;background-color:#0009;border-radius:3px;padding:5px 10px;display:inline-block}.art-video-player.art-notice-show .art-notice{display:flex}.art-video-player .art-contextmenus{z-index:120;min-width:200px;background-color:#000000e6;border-radius:3px;flex-direction:column;padding:5px 0;display:none;position:absolute;top:10px;left:10px}.art-video-player .art-contextmenus .art-contextmenu{cursor:pointer;color:#fff;text-overflow:ellipsis;white-space:nowrap;text-shadow:0 0 2px #00000080;border-bottom:1px solid #ffffff1a;padding:10px 15px;font-size:12px;display:block;overflow:hidden}.art-video-player .art-contextmenus .art-contextmenu a{color:#fff;text-decoration:none}.art-video-player .art-contextmenus .art-contextmenu span{padding:0 7px;display:inline-block}.art-video-player .art-contextmenus .art-contextmenu span:hover,.art-video-player .art-contextmenus .art-contextmenu span.art-current{color:#00c9ff}.art-video-player .art-contextmenus .art-contextmenu:hover{background-color:#ffffff1a}.art-video-player .art-contextmenus .art-contextmenu:last-child{border-bottom:0}.art-video-player.art-contextmenu-show .art-contextmenus{display:flex}.art-video-player .art-settings{z-index:90;height:auto;max-height:300px;background-color:#000000e6;border-radius:3px;font-size:13px;transition:all .2s;display:none;position:absolute;bottom:50px;right:10px;overflow:auto}.art-video-player .art-settings .art-setting-panel{display:none}.art-video-player .art-settings .art-setting-panel.art-current{display:block}.art-video-player .art-settings .art-setting-panel .art-setting-item{height:35px;cursor:pointer;color:#fffc;justify-content:space-between;align-items:center;padding:0 5px;line-height:1;display:flex;overflow:hidden}.art-video-player .art-settings .art-setting-panel .art-setting-item:hover,.art-video-player .art-settings .art-setting-panel .art-setting-item.art-current{color:#fff;background-color:#ffffff1a}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-icon{width:30px;height:30px;justify-content:center;align-items:center;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-icon-check{visibility:hidden;height:15px}.art-video-player .art-settings .art-setting-panel .art-setting-item.art-current .art-icon-check{visibility:visible}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-left{white-space:nowrap;align-items:center;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-left .art-setting-item-left-icon{height:24px;width:24px;justify-content:center;align-items:center;margin-right:10px;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right{align-items:center;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-item-right-tooltip{white-space:nowrap;color:#ffffff80;font-size:12px}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-item-right-icon{height:24px;width:24px;justify-content:center;align-items:center;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item-back{border-bottom:1px solid #ffffff1a}.art-video-player.art-setting-show .art-settings{display:block}.art-video-player.art-mobile .art-settings{max-height:200px}.art-video-player .art-info{z-index:100;width:350px;color:#fff;-webkit-font-smoothing:antialiased;background-color:#000000e6;flex-direction:column;padding:10px;font-family:Noto Sans CJK SC DemiLight,Roboto,Segoe UI,Tahoma,Arial,Helvetica,sans-serif;font-size:12px;display:none;position:absolute;top:10px;left:10px}.art-video-player .art-info .art-info-item{margin-bottom:5px;display:flex}.art-video-player .art-info .art-info-item .art-info-title{width:100px;text-align:right}.art-video-player .art-info .art-info-item .art-info-content{text-overflow:ellipsis;white-space:nowrap;flex:1;padding-left:5px;overflow:hidden}.art-video-player .art-info .art-info-item:last-child{margin-bottom:0}.art-video-player .art-info .art-info-close{cursor:pointer;position:absolute;top:5px;right:5px}.art-video-player.art-info-show .art-info{display:flex}.art-video-player.art-hide-cursor *{cursor:none!important}.art-video-player[data-aspect-ratio] video{box-sizing:content-box;object-fit:fill}.art-video-player.art-fullscreen-web{z-index:9999;width:100%;height:100%;position:fixed;inset:0}.art-fullscreen-rotate{z-index:9999;width:100%;height:100%;background-color:#000;position:fixed;inset:0}.art-video-player .art-mini-header{z-index:110;height:35px;color:#fff;opacity:0;visibility:hidden;background-color:#00000080;justify-content:space-between;align-items:center;line-height:35px;transition:all .2s ease-in-out;display:none;position:absolute;top:0;left:0;right:0}.art-video-player .art-mini-header .art-mini-title{text-overflow:ellipsis;white-space:nowrap;cursor:move;flex:1;padding:0 10px;overflow:hidden}.art-video-player .art-mini-header .art-mini-close{width:35px;text-align:center;cursor:pointer;font-size:22px}.art-video-player.art-is-dragging{opacity:.7}.art-video-player.art-mini{z-index:9999;width:400px;height:225px;position:fixed;box-shadow:0 2px 5px #00000029,0 3px 6px #0003}.art-video-player.art-mini .art-mini-header{user-select:none;display:flex}.art-video-player.art-mini.art-hover .art-mini-header{opacity:1;visibility:visible}.art-video-player.art-mini .art-mask .art-state{position:static}.art-video-player.art-mini .art-contextmenu,.art-video-player.art-mini .art-bottom,.art-video-player.art-mini .art-danmu,.art-video-player.art-mini .art-info,.art-video-player.art-mini .art-layers,.art-video-player.art-mini .art-notice,.art-video-player.art-mini .art-setting,.art-video-player.art-mini .art-subtitle{display:none!important}.art-auto-size{justify-content:center;align-items:center;display:flex}.art-video-player[data-flip=horizontal] .art-video{transform:scaleX(-1)}.art-video-player[data-flip=vertical] .art-video{transform:scaleY(-1)}.art-video-player .art-layer-miniProgressBar{height:2px;background-color:var(--theme);display:block;position:absolute;bottom:0;left:0;right:0}.art-video-player .art-layer-lock{height:34px;width:34px;color:#fff;background-color:#00000080;border-radius:50%;justify-content:center;align-items:center;display:none;position:absolute;top:calc(50% - 17px);left:15px}.art-video-player.art-lock .art-bottom{display:none!important}.art-video-player.art-lock .art-subtitle{bottom:10px!important}.art-video-player.art-lock .art-layer-miniProgressBar{display:block!important}.art-video-player.art-control-show .art-layer-miniProgressBar{display:none}.art-video-player.art-control-show .art-layer-lock{display:flex}.art-video-player .art-control-selector{position:relative}.art-video-player .art-control-selector .art-selector-list{min-width:100px;max-width:200px;max-height:200px;text-align:center;color:#fff;background-color:#000c;border-radius:3px;padding:5px 0;display:none;position:absolute;bottom:35px;overflow:auto}.art-video-player .art-control-selector .art-selector-list .art-selector-item{height:30px;text-overflow:ellipsis;white-space:nowrap;text-shadow:0 0 2px #00000080;padding:0 5px;line-height:30px;overflow:hidden}.art-video-player .art-control-selector .art-selector-list .art-selector-item:hover{background-color:#ffffff1a}.art-video-player .art-control-selector .art-selector-list .art-selector-item:hover,.art-video-player .art-control-selector .art-selector-list .art-selector-item.art-current{color:#00c9ff}.art-video-player .art-control-selector:hover .art-selector-list{display:block}[class*=hint--]{font-style:normal;display:inline-block;position:relative}[class*=hint--]:before,[class*=hint--]:after{visibility:hidden;opacity:0;z-index:1000000;pointer-events:none;transition:all .3s;position:absolute;transform:translate(0,0)}[class*=hint--]:hover:before,[class*=hint--]:hover:after{visibility:visible;opacity:1;transition-delay:.1s}[class*=hint--]:before{content:"";z-index:1000000;background:0 0;border:6px solid #0000;position:absolute}[class*=hint--]:after{color:#fff;white-space:nowrap;background:#000;padding:8px 10px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:12px;line-height:12px}[class*=hint--][aria-label]:after{content:attr(aria-label)}[class*=hint--][data-hint]:after{content:attr(data-hint)}[aria-label=""]:before,[aria-label=""]:after,[data-hint=""]:before,[data-hint=""]:after{display:none!important}.hint--top-left:before,.hint--top-right:before,.hint--top:before{border-top-color:#000}.hint--bottom-left:before,.hint--bottom-right:before,.hint--bottom:before{border-bottom-color:#000}.hint--left:before{border-left-color:#000}.hint--right:before{border-right-color:#000}.hint--top:before{margin-bottom:-11px}.hint--top:before,.hint--top:after{bottom:100%;left:50%}.hint--top:before{left:calc(50% - 6px)}.hint--top:after{transform:translate(-50%)}.hint--top:hover:before{transform:translateY(-8px)}.hint--top:hover:after{transform:translate(-50%)translateY(-8px)}.hint--bottom:before{margin-top:-11px}.hint--bottom:before,.hint--bottom:after{top:100%;left:50%}.hint--bottom:before{left:calc(50% - 6px)}.hint--bottom:after{transform:translate(-50%)}.hint--bottom:hover:before{transform:translateY(8px)}.hint--bottom:hover:after{transform:translate(-50%)translateY(8px)}.hint--right:before{margin-bottom:-6px;margin-left:-11px}.hint--right:after{margin-bottom:-14px}.hint--right:before,.hint--right:after{bottom:50%;left:100%}.hint--right:hover:before,.hint--right:hover:after{transform:translate(8px)}.hint--left:before{margin-bottom:-6px;margin-right:-11px}.hint--left:after{margin-bottom:-14px}.hint--left:before,.hint--left:after{bottom:50%;right:100%}.hint--left:hover:before,.hint--left:hover:after{transform:translate(-8px)}.hint--top-left:before{margin-bottom:-11px}.hint--top-left:before,.hint--top-left:after{bottom:100%;left:50%}.hint--top-left:before{left:calc(50% - 6px)}.hint--top-left:after{margin-left:12px;transform:translate(-100%)}.hint--top-left:hover:before{transform:translateY(-8px)}.hint--top-left:hover:after{transform:translate(-100%)translateY(-8px)}.hint--top-right:before{margin-bottom:-11px}.hint--top-right:before,.hint--top-right:after{bottom:100%;left:50%}.hint--top-right:before{left:calc(50% - 6px)}.hint--top-right:after{margin-left:-12px;transform:translate(0)}.hint--top-right:hover:before,.hint--top-right:hover:after{transform:translateY(-8px)}.hint--bottom-left:before{margin-top:-11px}.hint--bottom-left:before,.hint--bottom-left:after{top:100%;left:50%}.hint--bottom-left:before{left:calc(50% - 6px)}.hint--bottom-left:after{margin-left:12px;transform:translate(-100%)}.hint--bottom-left:hover:before{transform:translateY(8px)}.hint--bottom-left:hover:after{transform:translate(-100%)translateY(8px)}.hint--bottom-right:before{margin-top:-11px}.hint--bottom-right:before,.hint--bottom-right:after{top:100%;left:50%}.hint--bottom-right:before{left:calc(50% - 6px)}.hint--bottom-right:after{margin-left:-12px;transform:translate(0)}.hint--bottom-right:hover:before,.hint--bottom-right:hover:after{transform:translateY(8px)}.hint--small:after,.hint--medium:after,.hint--large:after{white-space:normal;word-wrap:break-word;line-height:1.4em}.hint--small:after{width:80px}.hint--medium:after{width:150px}.hint--large:after{width:300px}[class*=hint--]:after{text-shadow:0 -1px #000;box-shadow:4px 4px 8px #0000004d}.hint--error:after{text-shadow:0 -1px #592726;background-color:#b34e4d}.hint--error.hint--top-left:before,.hint--error.hint--top-right:before,.hint--error.hint--top:before{border-top-color:#b34e4d}.hint--error.hint--bottom-left:before,.hint--error.hint--bottom-right:before,.hint--error.hint--bottom:before{border-bottom-color:#b34e4d}.hint--error.hint--left:before{border-left-color:#b34e4d}.hint--error.hint--right:before{border-right-color:#b34e4d}.hint--warning:after{text-shadow:0 -1px #6c5328;background-color:#c09854}.hint--warning.hint--top-left:before,.hint--warning.hint--top-right:before,.hint--warning.hint--top:before{border-top-color:#c09854}.hint--warning.hint--bottom-left:before,.hint--warning.hint--bottom-right:before,.hint--warning.hint--bottom:before{border-bottom-color:#c09854}.hint--warning.hint--left:before{border-left-color:#c09854}.hint--warning.hint--right:before{border-right-color:#c09854}.hint--info:after{text-shadow:0 -1px #1a3c4d;background-color:#3986ac}.hint--info.hint--top-left:before,.hint--info.hint--top-right:before,.hint--info.hint--top:before{border-top-color:#3986ac}.hint--info.hint--bottom-left:before,.hint--info.hint--bottom-right:before,.hint--info.hint--bottom:before{border-bottom-color:#3986ac}.hint--info.hint--left:before{border-left-color:#3986ac}.hint--info.hint--right:before{border-right-color:#3986ac}.hint--success:after{text-shadow:0 -1px #1a321a;background-color:#458746}.hint--success.hint--top-left:before,.hint--success.hint--top-right:before,.hint--success.hint--top:before{border-top-color:#458746}.hint--success.hint--bottom-left:before,.hint--success.hint--bottom-right:before,.hint--success.hint--bottom:before{border-bottom-color:#458746}.hint--success.hint--left:before{border-left-color:#458746}.hint--success.hint--right:before{border-right-color:#458746}.hint--always:after,.hint--always:before{opacity:1;visibility:visible}.hint--always.hint--top:before{transform:translateY(-8px)}.hint--always.hint--top:after{transform:translate(-50%)translateY(-8px)}.hint--always.hint--top-left:before{transform:translateY(-8px)}.hint--always.hint--top-left:after{transform:translate(-100%)translateY(-8px)}.hint--always.hint--top-right:before,.hint--always.hint--top-right:after{transform:translateY(-8px)}.hint--always.hint--bottom:before{transform:translateY(8px)}.hint--always.hint--bottom:after{transform:translate(-50%)translateY(8px)}.hint--always.hint--bottom-left:before{transform:translateY(8px)}.hint--always.hint--bottom-left:after{transform:translate(-100%)translateY(8px)}.hint--always.hint--bottom-right:before,.hint--always.hint--bottom-right:after{transform:translateY(8px)}.hint--always.hint--left:before,.hint--always.hint--left:after{transform:translate(-8px)}.hint--always.hint--right:before,.hint--always.hint--right:after{transform:translate(8px)}.hint--rounded:after{border-radius:4px}.hint--no-animate:before,.hint--no-animate:after{transition-duration:0s}.hint--bounce:before,.hint--bounce:after{-webkit-transition:opacity .3s,visibility .3s,-webkit-transform .3s cubic-bezier(.71,1.7,.77,1.24);-moz-transition:opacity .3s,visibility .3s,-moz-transform .3s cubic-bezier(.71,1.7,.77,1.24);transition:opacity .3s,visibility .3s,transform .3s cubic-bezier(.71,1.7,.77,1.24)}.hint--no-shadow:before,.hint--no-shadow:after{text-shadow:initial;box-shadow:initial}.hint--no-arrow:before{display:none}'},{}],"2A2W5":[function(e,t,r){t.exports=function(){"use strict";function e(t){return(e="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})(t)}var t=Object.prototype.toString,r=function(r){if(void 0===r)return"undefined";if(null===r)return"null";var i=e(r);if("boolean"===i)return"boolean";if("string"===i)return"string";if("number"===i)return"number";if("symbol"===i)return"symbol";if("function"===i)return function(e){return"GeneratorFunction"===o(e)}(r)?"generatorfunction":"function";if(function(e){return Array.isArray?Array.isArray(e):e instanceof Array}(r))return"array";if(function(e){return!(!e.constructor||"function"!=typeof e.constructor.isBuffer)&&e.constructor.isBuffer(e)}(r))return"buffer";if(function(e){try{if("number"==typeof e.length&&"function"==typeof e.callee)return!0}catch(e){if(-1!==e.message.indexOf("callee"))return!0}return!1}(r))return"arguments";if(function(e){return e instanceof Date||"function"==typeof e.toDateString&&"function"==typeof e.getDate&&"function"==typeof e.setDate}(r))return"date";if(function(e){return e instanceof Error||"string"==typeof e.message&&e.constructor&&"number"==typeof e.constructor.stackTraceLimit}(r))return"error";if(function(e){return e instanceof RegExp||"string"==typeof e.flags&&"boolean"==typeof e.ignoreCase&&"boolean"==typeof e.multiline&&"boolean"==typeof e.global}(r))return"regexp";switch(o(r)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(e){return"function"==typeof e.throw&&"function"==typeof e.return&&"function"==typeof e.next}(r))return"generator";switch(i=t.call(r)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return i.slice(8,-1).toLowerCase().replace(/\s/g,"")};function o(e){return e.constructor?e.constructor.name:null}function i(e,t){var o=2n)),o.export(r,"queryAll",(()=>a)),o.export(r,"addClass",(()=>s)),o.export(r,"removeClass",(()=>l)),o.export(r,"hasClass",(()=>c)),o.export(r,"append",(()=>p)),o.export(r,"remove",(()=>u)),o.export(r,"setStyle",(()=>d)),o.export(r,"setStyles",(()=>f)),o.export(r,"getStyle",(()=>h)),o.export(r,"sublings",(()=>m)),o.export(r,"inverseClass",(()=>g)),o.export(r,"tooltip",(()=>y)),o.export(r,"isInViewport",(()=>v)),o.export(r,"includeFromEvent",(()=>b)),o.export(r,"replaceElement",(()=>x));var i=e("./compatibility");function n(e,t=document){return t.querySelector(e)}function a(e,t=document){return Array.from(t.querySelectorAll(e))}function s(e,t){return e.classList.add(t)}function l(e,t){return e.classList.remove(t)}function c(e,t){return e.classList.contains(t)}function p(e,t){return t instanceof Element?e.appendChild(t):e.insertAdjacentHTML("beforeend",String(t)),e.lastElementChild||e.lastChild}function u(e){return e.parentNode.removeChild(e)}function d(e,t,r){return e.style[t]=r,e}function f(e,t){return Object.keys(t).forEach((r=>{d(e,r,t[r])})),e}function h(e,t,r=!0){const o=window.getComputedStyle(e,null).getPropertyValue(t);return r?parseFloat(o):o}function m(e){return Array.from(e.parentElement.children).filter((t=>t!==e))}function g(e,t){m(e).forEach((e=>l(e,t))),s(e,t)}function y(e,t,r="top"){i.isMobile||(e.setAttribute("aria-label",t),s(e,"hint--rounded"),s(e,`hint--${r}`))}function v(e,t=0){const r=e.getBoundingClientRect(),o=window.innerHeight||document.documentElement.clientHeight,i=window.innerWidth||document.documentElement.clientWidth,n=r.top-t<=o&&r.top+r.height+t>=0,a=r.left-t<=i+t&&r.left+r.width+t>=0;return n&&a}function b(e,t){return e.composedPath&&e.composedPath().indexOf(t)>-1}function x(e,t){return t.parentNode.replaceChild(e,t),e}},{"./compatibility":"e9wVp","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],e9wVp:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"userAgent",(()=>i)),o.export(r,"isMobile",(()=>n)),o.export(r,"isSafari",(()=>a)),o.export(r,"isWechat",(()=>s)),o.export(r,"isIE",(()=>l));const i="undefined"!=typeof window?window.navigator.userAgent:"",n=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(i),a=/^((?!chrome|android).)*safari/i.test(i),s=/MicroMessenger/i.test(i),l=/MSIE|Trident/i.test(i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],kNZvP:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"ArtPlayerError",(()=>i)),o.export(r,"errorHandle",(()=>n));class i extends Error{constructor(e,t){super(e),"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,t||this.constructor),this.name="ArtPlayerError"}}function n(e,t){if(!e)throw new i(t);return e}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],eZUgm:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e){return"WEBVTT \r\n\r\n".concat((t=e,t.replace(/(\d\d:\d\d:\d\d)[,.](\d+)/g,((e,t,r)=>{let o=r.slice(0,3);return 1===r.length&&(o=r+"00"),2===r.length&&(o=r+"0"),`${t},${o}`}))).replace(/\{\\([ibu])\}/g,"").replace(/\{\\([ibu])1\}/g,"<$1>").replace(/\{([ibu])\}/g,"<$1>").replace(/\{\/([ibu])\}/g,"").replace(/(\d\d:\d\d:\d\d),(\d\d\d)/g,"$1.$2").replace(/{[\s\S]*?}/g,"").concat("\r\n\r\n"));var t}function n(e){return URL.createObjectURL(new Blob([e],{type:"text/vtt"}))}function a(e){const t=new RegExp("Dialogue:\\s\\d,(\\d+:\\d\\d:\\d\\d.\\d\\d),(\\d+:\\d\\d:\\d\\d.\\d\\d),([^,]*),([^,]*),(?:[^,]*,){4}([\\s\\S]*)$","i");function r(e=""){return e.split(/[:.]/).map(((e,t,r)=>{if(t===r.length-1){if(1===e.length)return`.${e}00`;if(2===e.length)return`.${e}0`}else if(1===e.length)return(0===t?"0":":0")+e;return 0===t?e:t===r.length-1?`.${e}`:`:${e}`})).join("")}return`WEBVTT\n\n${e.split(/\r?\n/).map((e=>{const o=e.match(t);return o?{start:r(o[1].trim()),end:r(o[2].trim()),text:o[5].replace(/{[\s\S]*?}/g,"").replace(/(\\N)/g,"\n").trim().split(/\r?\n/).map((e=>e.trim())).join("\n")}:null})).filter((e=>e)).map(((e,t)=>e?`${t+1}\n${e.start} --\x3e ${e.end}\n${e.text}`:"")).filter((e=>e.trim())).join("\n\n")}`}o.defineInteropFlag(r),o.export(r,"srtToVtt",(()=>i)),o.export(r,"vttToBlob",(()=>n)),o.export(r,"assToVtt",(()=>a))},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],dYeSt:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e){return e.includes("?")?i(e.split("?")[0]):e.includes("#")?i(e.split("#")[0]):e.trim().toLowerCase().split(".").pop()}function n(e,t){const r=document.createElement("a");r.style.display="none",r.href=e,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r)}o.defineInteropFlag(r),o.export(r,"getExt",(()=>i)),o.export(r,"download",(()=>n))},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"5ynPA":[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"def",(()=>i)),o.export(r,"has",(()=>a)),o.export(r,"get",(()=>s)),o.export(r,"mergeDeep",(()=>l));const i=Object.defineProperty,{hasOwnProperty:n}=Object.prototype;function a(e,t){return n.call(e,t)}function s(e,t){return Object.getOwnPropertyDescriptor(e,t)}function l(...e){const t=e=>e&&"object"==typeof e&&!Array.isArray(e);return e.reduce(((e,r)=>(Object.keys(r).forEach((o=>{const i=e[o],n=r[o];Array.isArray(i)&&Array.isArray(n)?e[o]=i.concat(...n):!t(i)||!t(n)||n instanceof Element?e[o]=n:e[o]=l(i,n)})),e)),{})}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],kXYeR:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e=0){return new Promise((t=>setTimeout(t,e)))}function n(e,t,r){let o;function i(...i){clearTimeout(o),o=setTimeout((function(){o=null,e.apply(r,i)}),t)}return i.clearTimeout=function(){clearTimeout(o)},i}function a(e,t){let r,o,i=!1;return function n(...a){if(i)return r=a,void(o=this);i=!0,e.apply(this,a),setTimeout((()=>{i=!1,r&&(n.apply(o,r),r=null,o=null)}),t)}}o.defineInteropFlag(r),o.export(r,"sleep",(()=>i)),o.export(r,"debounce",(()=>n)),o.export(r,"throttle",(()=>a))},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],anS7L:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e,t,r){return Math.max(Math.min(e,Math.max(t,r)),Math.min(t,r))}function n(e){const t=Math.floor(e/3600),r=Math.floor((e-3600*t)/60),o=Math.floor(e-3600*t-60*r);return(t>0?[t,r,o]:[r,o]).map((e=>e<10?`0${e}`:String(e))).join(":")}function a(e){return e.replace(/[&<>'"]/g,(e=>({"&":"&","<":"<",">":">","'":"'",'"':"""}[e]||e)))}o.defineInteropFlag(r),o.export(r,"clamp",(()=>i)),o.export(r,"secondToTime",(()=>n)),o.export(r,"escape",(()=>a))},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"3izFE":[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"ComponentOption",(()=>u));var i=e("../utils");const n="boolean",a="string",s="number",l="object",c="function";function p(e,t,r){return i.errorHandle(t===a||e instanceof Element,`${r.join(".")} require '${a}' or 'Element' type`)}const u={html:p,disable:`?${n}`,name:`?${a}`,index:`?${s}`,style:`?${l}`,click:`?${c}`,mounted:`?${c}`,tooltip:`?${a}`,width:`?${s}`,selector:"?array",onSelect:`?${c}`};r.default={container:p,url:a,poster:a,title:a,type:a,theme:a,lang:a,volume:s,isLive:n,muted:n,autoplay:n,autoSize:n,autoMini:n,loop:n,flip:n,playbackRate:n,aspectRatio:n,screenshot:n,setting:n,hotkey:n,pip:n,mutex:n,backdrop:n,fullscreen:n,fullscreenWeb:n,subtitleOffset:n,miniProgressBar:n,useSSR:n,playsInline:n,lock:n,fastForward:n,autoPlayback:n,autoOrientation:n,ads:[{url:a}],plugins:[c],whitelist:[`${a}|${c}|regexp`],layers:[u],contextmenu:[u],settings:[u],controls:[{...u,position:(e,t,r)=>{const o=["top","left","right"];return i.errorHandle(o.includes(e),`${r.join(".")} only accept ${o.toString()} as parameters`)}}],quality:[{default:`?${n}`,html:a,url:a}],highlight:[{time:s,text:a}],thumbnails:{url:a,number:s,column:s},subtitle:{url:a,type:a,style:l,encoding:a},moreVideoAttr:l,icons:l,customType:l}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],ej4fZ:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default={propertys:["audioTracks","autoplay","buffered","controller","controls","crossOrigin","currentSrc","currentTime","defaultMuted","defaultPlaybackRate","duration","ended","error","loop","mediaGroup","muted","networkState","paused","playbackRate","played","preload","readyState","seekable","seeking","src","startDate","textTracks","videoTracks","volume"],methods:["addTextTrack","canPlayType","load","play","pause"],events:["abort","canplay","canplaythrough","durationchange","emptied","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],prototypes:["width","height","videoWidth","videoHeight","poster","webkitDecodedFrameCount","webkitDroppedFrameCount","playsInline","webkitSupportsFullscreen","webkitDisplayingFullscreen","onenterpictureinpicture","onleavepictureinpicture","disablePictureInPicture","cancelVideoFrameCallback","requestVideoFrameCallback","getVideoPlaybackQuality","requestPictureInPicture","webkitEnterFullScreen","webkitEnterFullscreen","webkitExitFullScreen","webkitExitFullscreen"]}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"7CkCt":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("./utils");r.default=class{constructor(e){this.art=e}get state(){const{option:e,constructor:{kindOf:t}}=this.art;return!o.isMobile||e.whitelist.some((e=>{switch(t(e)){case"string":return"*"===e||o.userAgent.indexOf(e)>-1;case"function":return e(o.userAgent);case"regexp":return e.test(o.userAgent);default:return!1}}))}}},{"./utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"8iGAh":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("./utils");class i{constructor(e){this.art=e;const{option:t,constructor:r,whitelist:i}=e;t.container instanceof Element?this.$container=t.container:(this.$container=o.query(t.container),o.errorHandle(this.$container,`No container element found by ${t.container}`));const n=this.$container.tagName.toLowerCase();o.errorHandle("div"===n,`Unsupported container element type, only support 'div' but got '${n}'`),o.errorHandle(r.instances.every((e=>e.template.$container!==this.$container)),"Cannot mount multiple instances on the same dom element"),this.query=this.query.bind(this),this.$container.dataset.artId=e.id,this.$original=this.$container.cloneNode(!0),i.state?this.desktop():this.mobile()}static get html(){return'
Player version:
4.3.17
Video url:
Video volume:
Video time:
Video duration:
Video resolution:
x
[x]
×
'}query(e){return o.query(e,this.$container)}desktop(){const{option:e}=this.art;e.useSSR||(this.$container.innerHTML=i.html),this.$player=this.query(".art-video-player"),this.$video=this.query(".art-video"),this.$poster=this.query(".art-poster"),this.$subtitle=this.query(".art-subtitle"),this.$danmuku=this.query(".art-danmuku"),this.$bottom=this.query(".art-bottom"),this.$progress=this.query(".art-progress"),this.$controls=this.query(".art-controls"),this.$controlsLeft=this.query(".art-controls-left"),this.$controlsRight=this.query(".art-controls-right"),this.$layer=this.query(".art-layers"),this.$loading=this.query(".art-loading"),this.$notice=this.query(".art-notice"),this.$noticeInner=this.query(".art-notice-inner"),this.$mask=this.query(".art-mask"),this.$state=this.query(".art-state"),this.$setting=this.query(".art-settings"),this.$info=this.query(".art-info"),this.$infoPanel=this.query(".art-info-panel"),this.$infoClose=this.query(".art-info-close"),this.$miniHeader=this.query(".art-mini-header"),this.$miniTitle=this.query(".art-mini-title"),this.$miniClose=this.query(".art-mini-close"),this.$contextmenu=this.query(".art-contextmenus"),e.backdrop&&(o.addClass(this.$setting,"art-backdrop-filter"),o.addClass(this.$contextmenu,"art-backdrop-filter"),o.addClass(this.$info,"art-backdrop-filter")),o.isMobile&&o.addClass(this.$player,"art-mobile")}mobile(){this.$container.innerHTML='
',this.$player=this.query(".art-video-player"),this.$video=this.query(".art-video")}destroy(e){e?o.replaceElement(this.$original,this.$container):o.addClass(this.$player,"art-destroy")}}r.default=i},{"./utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"3mM4M":[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../utils"),n=e("./zh-cn.json"),a=o.interopDefault(n),s=e("./zh-tw.json"),l=o.interopDefault(s),c=e("./pl.json"),p=o.interopDefault(c),u=e("./cs.json"),d=o.interopDefault(u);r.default=class{constructor(e){this.art=e,this.languages={"zh-cn":a.default,"zh-tw":l.default,pl:p.default,cs:d.default},this.init()}init(){const e=this.art.option.lang.toLowerCase();this.language=this.languages[e]||{}}get(e){return this.language[e]||e}update(e){this.languages=i.mergeDeep(this.languages,e),this.init()}}},{"../utils":"5yYFo","./zh-cn.json":"1f1tr","./zh-tw.json":"3hy9S","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY","./pl.json":"aFOXc","./cs.json":"aNfUP"}],"1f1tr":[function(e,t,r){t.exports=JSON.parse('{"Video Info":"统计信息","Close":"关闭","Video Load Failed":"加载失败","Volume":"音量","Play":"播放","Pause":"暂停","Rate":"速度","Mute":"静音","Video Flip":"画面翻转","Horizontal":"水平","Vertical":"垂直","Reconnect":"重新连接","Hide Subtitle":"隐藏字幕","Show Subtitle":"显示字幕","Show Setting":"显示设置","Hide Setting":"隐藏设置","Screenshot":"截图","Play Speed":"播放速度","Aspect Ratio":"画面比例","Default":"默认","Normal":"正常","Open":"打开","Switch Video":"切换","Switch Subtitle":"切换字幕","Fullscreen":"全屏","Exit Fullscreen":"退出全屏","Web Fullscreen":"网页全屏","Exit Web Fullscreen":"退出网页全屏","Mini Player":"迷你播放器","PIP Mode":"开启画中画","Exit PIP Mode":"退出画中画","PIP Not Supported":"不支持画中画","Fullscreen Not Supported":"不支持全屏","Subtitle Offset":"字幕偏移","Auto playback at":"已为您定位至"}')},{}],"3hy9S":[function(e,t,r){t.exports=JSON.parse('{"Video Info":"統計訊息","Close":"關閉","Video Load Failed":"載入失敗","Volume":"音量","Play":"播放","Pause":"暫停","Rate":"速度","Mute":"靜音","Video Flip":"畫面翻轉","Horizontal":"水平","Vertical":"垂直","Reconnect":"重新連接","Hide Subtitle":"隱藏字幕","Show Subtitle":"顯示字幕","Show Setting":"顯示设置","Hide Setting":"隱藏设置","Screenshot":"截圖","Play Speed":"播放速度","Aspect Ratio":"畫面比例","Default":"默認","Normal":"正常","Open":"打開","Switch Video":"切換","Switch Subtitle":"切換字幕","Fullscreen":"全屏","Exit Fullscreen":"退出全屏","Web Fullscreen":"網頁全屏","Exit Web Fullscreen":"退出網頁全屏","Mini Player":"迷你播放器","PIP Mode":"開啟畫中畫","Exit PIP Mode":"退出畫中畫","PIP Not Supported":"不支持畫中畫","Fullscreen Not Supported":"不支持全屏","Subtitle Offset":"字幕偏移","Auto playback at":"已為您定位至"}')},{}],aFOXc:[function(e,t,r){t.exports=JSON.parse('{"Video Info":"Informacje o wideo","Close":"Zamknij","Video Load Failed":"Błąd ładowania wideo","Volume":"Głośność","Play":"Odtwórz","Pause":"Wstrzymaj","Rate":"Oceń","Mute":"Wycisz","Video Flip":"Rotacja wideo","Horizontal":"Pozioma","Vertical":"Pionowa","Reconnect":"Połącz ponownie","Hide Subtitle":"Ukryj napisy","Show Subtitle":"Pokaż napisy","Show Setting":"Pokaż ustawienia","Hide Setting":"Ukryj ustawienia","Screenshot":"Zrzut ekranu","Play Speed":"Prędkość odtwarzania","Aspect Ratio":"Współczynnik proporcji","Default":"Domyślny","Normal":"Normalny","Open":"Otwórz","Switch Video":"Przełącz wideo","Switch Subtitle":"Przełącz napisy","Fullscreen":"Pełny ekran","Exit Fullscreen":"Zamknij pełny ekran","Web Fullscreen":"Tryb pełnej strony","Exit Web Fullscreen":"Zamknij tryb pełnej strony","Mini Player":"Miniodtwarzacz","PIP Mode":"Tryb PiP","Exit PIP Mode":"Zamknij tryb PiP","PIP Not Supported":"Tryb PiP nieobsługiwany","Fullscreen Not Supported":"Pełny ekran nieobsługiwany","Subtitle Offset":"Przesunięcie napisów","Auto playback at":"Automatyczne odtwarzanie za"}')},{}],aNfUP:[function(e,t,r){t.exports=JSON.parse('{"Video Info":"Info o videu","Close":"Zavřít","Video Load Failed":"Nahrání videa selhalo","Volume":"Hlasitost","Play":"Přehrát","Pause":"Pozastavit","Rate":"Hodnocení","Mute":"Ztlumit","Video Flip":"Otočit video","Horizontal":"Horizontálně","Vertical":"Vertikálně","Reconnect":"Opětovné připojení","Hide Subtitle":"Skrýt titulky","Show Subtitle":"Ukázat titulky","Show Setting":"Zobrazit nastavení","Hide Setting":"Skrýt nastavení","Screenshot":"Snímek obrazovky","Play Speed":"Rychlost přehrávání","Aspect Ratio":"Poměr stran","Default":"Výchozí","Normal":"Normální","Open":"Otevřít","Switch Video":"Přepnout video","Switch Subtitle":"Přepnout titulky","Fullscreen":"Celá obrazovka","Exit Fullscreen":"Opustit režim celé obrazovky","Web Fullscreen":"Celá stránka","Exit Web Fullscreen":"Zavřít režim celé stránky","Mini Player":"Mini přehrávač","PIP Mode":"Režim PIP","Exit PIP Mode":"Opustit režim PIP","PIP Not Supported":"Režim PIP není podporován","Fullscreen Not Supported":"Režim celé obrazovky není podporován","Subtitle Offset":"Posun titulků","Auto playback at":"Automatické přehrávání za"}')},{}],bCaa0:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./urlMix"),n=o.interopDefault(i),a=e("./attrMix"),s=o.interopDefault(a),l=e("./playMix"),c=o.interopDefault(l),p=e("./pauseMix"),u=o.interopDefault(p),d=e("./toggleMix"),f=o.interopDefault(d),h=e("./seekMix"),m=o.interopDefault(h),g=e("./volumeMix"),y=o.interopDefault(g),v=e("./currentTimeMix"),b=o.interopDefault(v),x=e("./durationMix"),w=o.interopDefault(x),j=e("./switchMix"),k=o.interopDefault(j),M=e("./playbackRateMix"),S=o.interopDefault(M),I=e("./aspectRatioMix"),F=o.interopDefault(I),$=e("./screenshotMix"),T=o.interopDefault($),E=e("./fullscreenMix"),C=o.interopDefault(E),z=e("./fullscreenWebMix"),Y=o.interopDefault(z),D=e("./pipMix"),P=o.interopDefault(D),R=e("./loadedMix"),A=o.interopDefault(R),O=e("./playedMix"),L=o.interopDefault(O),H=e("./playingMix"),_=o.interopDefault(H),N=e("./autoSizeMix"),J=o.interopDefault(N),V=e("./rectMix"),q=o.interopDefault(V),W=e("./flipMix"),B=o.interopDefault(W),U=e("./miniMix"),Z=o.interopDefault(U),X=e("./loopMix"),G=o.interopDefault(X),Q=e("./posterMix"),K=o.interopDefault(Q),ee=e("./autoHeightMix"),te=o.interopDefault(ee),re=e("./themeMix"),oe=o.interopDefault(re),ie=e("./titleMix"),ne=o.interopDefault(ie),ae=e("./normalSizeMix"),se=o.interopDefault(ae),le=e("./subtitleOffsetMix"),ce=o.interopDefault(le),pe=e("./optionInit"),ue=o.interopDefault(pe),de=e("./eventInit"),fe=o.interopDefault(de);r.default=class{constructor(e){n.default(e),s.default(e),c.default(e),u.default(e),f.default(e),m.default(e),y.default(e),b.default(e),w.default(e),k.default(e),S.default(e),F.default(e),T.default(e),C.default(e),Y.default(e),P.default(e),A.default(e),L.default(e),_.default(e),J.default(e),q.default(e),B.default(e),Z.default(e),G.default(e),K.default(e),te.default(e),oe.default(e),ne.default(e),se.default(e),ce.default(e),fe.default(e),ue.default(e)}}},{"./urlMix":"9mMBB","./attrMix":"ghisN","./playMix":"l5N6R","./pauseMix":"fVR5i","./toggleMix":"cZiBO","./seekMix":"bsO1Q","./volumeMix":"ivSmC","./currentTimeMix":"8LbXb","./durationMix":"f7tNT","./switchMix":"ejQWi","./playbackRateMix":"kNcxE","./aspectRatioMix":"8v5yt","./screenshotMix":"eLUEv","./fullscreenMix":"ifvhR","./fullscreenWebMix":"dsFtO","./pipMix":"gYMLD","./loadedMix":"fMSRd","./playedMix":"iRHNE","./playingMix":"dQ40z","./autoSizeMix":"iF844","./rectMix":"1hAm8","./flipMix":"dhi4g","./miniMix":"eQPx9","./loopMix":"gQaVE","./posterMix":"7n9Pt","./autoHeightMix":"8Az1F","./themeMix":"kXlsI","./titleMix":"b8f4Q","./normalSizeMix":"4fP62","./subtitleOffsetMix":"gdNfa","./optionInit":"luxZi","./eventInit":"b25aJ","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"9mMBB":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{option:t,template:{$video:r}}=e;o.def(e,"url",{get:()=>r.currentSrc,async set(i){const n=t.type||o.getExt(i),a=t.customType[n];n&&a?(await o.sleep(),e.loading.show=!0,a.call(e,r,i,e)):(e.url&&e.url!==i&&e.once("video:canplay",(()=>{e.isReady&&e.emit("restart")})),r.src=i,e.option.url=i,e.emit("url",i))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],ghisN:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{template:{$video:t}}=e;o.def(e,"attr",{value(e,r){if(void 0===r)return t[e];t[e]=r}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],l5N6R:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{i18n:t,notice:r,option:i,constructor:{instances:n},template:{$video:a}}=e;o.def(e,"play",{value(){const o=a.play();if(o&&o.then&&o.then().catch((e=>{throw r.show=e,e})),i.mutex)for(let t=0;te.playing?e.pause():e.play()})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],bsO1Q:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{notice:t}=e;o.def(e,"seek",{set(r){e.currentTime=r,e.emit("seek",e.currentTime),e.duration&&(t.show=`${o.secondToTime(e.currentTime)} / ${o.secondToTime(e.duration)}`)}}),o.def(e,"forward",{set(t){e.seek=e.currentTime+t}}),o.def(e,"backward",{set(t){e.seek=e.currentTime-t}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],ivSmC:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{template:{$video:t},i18n:r,notice:i,storage:n}=e;o.def(e,"volume",{get:()=>t.volume||0,set:a=>{t.volume=o.clamp(a,0,1),i.show=`${r.get("Volume")}: ${parseInt(100*t.volume,10)}`,0!==t.volume&&n.set("volume",t.volume),e.emit("volume",t.volume)}}),o.def(e,"muted",{get:()=>t.muted,set:r=>{t.muted=r,e.emit("volume",t.volume)}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"8LbXb":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{$video:t}=e.template;o.def(e,"currentTime",{get:()=>t.currentTime||0,set:r=>{r=parseFloat(r),Number.isNaN(r)||(t.currentTime=o.clamp(r,0,e.duration))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],f7tNT:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){o.def(e,"duration",{get:()=>{const{duration:t}=e.template.$video;return t===1/0?0:t||0}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],ejQWi:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{i18n:t,option:r,notice:i}=e;function n(o,n,a){return new Promise((s=>{if(o===e.url)return s(o);const{playing:l}=e;e.pause(),URL.revokeObjectURL(e.url),e.url=o,e.once("video:canplay",(()=>{e.playbackRate=!1,e.aspectRatio=!1,e.flip="normal",e.autoSize=r.autoSize,e.currentTime=a,e.notice.show="",l&&e.play(),n&&(i.show=`${t.get("Switch Video")}: ${n}`),e.emit("switch",o),s(o)}))}))}o.def(e,"switchQuality",{value:(t,r)=>n(t,r,e.currentTime)}),o.def(e,"switchUrl",{value:(e,t)=>n(e,t,0)})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],kNcxE:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{template:{$video:t},i18n:r,notice:i}=e;o.def(e,"playbackRate",{get:()=>t.playbackRate,set(n){if(n){if(n===t.playbackRate)return;const a=[.25,.5,.75,1,1.25,1.5,1.75,2,3,4];o.errorHandle(a.includes(n),`'playbackRate' only accept ${a.toString()} as parameters`),t.playbackRate=n,i.show=`${r.get("Rate")}: ${1===n?r.get("Normal"):`${n}x`}`,e.emit("playbackRate",n)}else e.playbackRate=1,e.emit("playbackRate")}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"8v5yt":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{template:{$video:t,$player:r},i18n:i,notice:n}=e;o.def(e,"aspectRatio",{get:()=>r.dataset.aspectRatio||"default",set(a){a||(a="default");const s=["default","4:3","16:9"];if(o.errorHandle(s.includes(a),`'aspectRatio' only accept ${s.toString()} as parameters`),"default"===a)o.setStyle(t,"width",null),o.setStyle(t,"height",null),o.setStyle(t,"padding",null),delete r.dataset.aspectRatio;else{const e=a.split(":").map(Number),{videoWidth:i,videoHeight:n}=t,{clientWidth:s,clientHeight:l}=r,c=i/n,p=e[0]/e[1];if(c>p){const e=p*n/i;o.setStyle(t,"width",100*e+"%"),o.setStyle(t,"height","100%"),o.setStyle(t,"padding",`0 ${(s-s*e)/2}px`)}else{const e=i/p/n;o.setStyle(t,"width","100%"),o.setStyle(t,"height",100*e+"%"),o.setStyle(t,"padding",(l-l*e)/2+"px 0")}r.dataset.aspectRatio=a}n.show=`${i.get("Aspect Ratio")}: ${"default"===a?i.get("Default"):a}`,e.emit("aspectRatio",a)}}),o.def(e,"aspectRatioReset",{set(t){if(t){const{aspectRatio:t}=e;e.aspectRatio=t}}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],eLUEv:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{option:t,notice:r,template:{$video:i}}=e,n=document.createElement("canvas");o.def(e,"getDataURL",{value:()=>new Promise(((e,t)=>{try{n.width=i.videoWidth,n.height=i.videoHeight,n.getContext("2d").drawImage(i,0,0),e(n.toDataURL("image/png"))}catch(e){r.show=e,t(e)}}))}),o.def(e,"getBlobUrl",{value:()=>new Promise(((e,t)=>{try{n.width=i.videoWidth,n.height=i.videoHeight,n.getContext("2d").drawImage(i,0,0),n.toBlob((t=>{e(URL.createObjectURL(t))}))}catch(e){r.show=e,t(e)}}))}),o.def(e,"screenshot",{value:async()=>{const r=await e.getDataURL();return o.download(r,`${t.title||"artplayer"}_${o.secondToTime(i.currentTime)}.png`),e.emit("screenshot",r),r}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],ifvhR:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../libs/screenfull"),n=o.interopDefault(i),a=e("../utils");r.default=function(e){const{i18n:t,notice:r,template:{$video:o,$player:i}}=e,s=n.default();e.once("video:loadedmetadata",(()=>{var n;s.isEnabled?(n=e,s.on("change",(()=>n.emit("fullscreen",s.isFullscreen))),a.def(n,"fullscreen",{get:()=>s.isFullscreen,async set(e){e?(n.normalSize="fullscreen",n.aspectRatioReset=!0,n.autoSize=!1,await s.request(i),a.addClass(i,"art-fullscreen"),n.emit("resize"),n.emit("fullscreen",!0),r.show=""):(n.aspectRatioReset=!0,n.autoSize=n.option.autoSize,await s.exit(),a.removeClass(i,"art-fullscreen"),n.emit("resize"),n.emit("fullscreen"),r.show="")}})):document.fullscreenEnabled||o.webkitSupportsFullscreen?(e=>{a.def(e,"fullscreen",{get:()=>o.webkitDisplayingFullscreen,set(t){t?(e.normalSize="fullscreen",o.webkitEnterFullscreen(),e.emit("fullscreen",!0),r.show=""):(o.webkitExitFullscreen(),e.emit("fullscreen"),r.show="")}})})(e):a.def(e,"fullscreen",{get:()=>!1,set(){r.show=t.get("Fullscreen Not Supported")}}),a.def(e,"fullscreen",a.get(e,"fullscreen"))}))}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY","../libs/screenfull":"hXAU9"}],hXAU9:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(){const e=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],t=(()=>{const t=e[0],r={};for(const o of e){const e=o?.[1];if(e in document){for(const[e,i]of o.entries())r[t[e]]=i;return r}}return!1})(),r={change:t.fullscreenchange,error:t.fullscreenerror};let o={request:(e=document.documentElement,r)=>new Promise(((i,n)=>{const a=()=>{o.off("change",a),i()};o.on("change",a);const s=e[t.requestFullscreen](r);s instanceof Promise&&s.then(a).catch(n)})),exit:()=>new Promise(((e,r)=>{if(!o.isFullscreen)return void e();const i=()=>{o.off("change",i),e()};o.on("change",i);const n=document[t.exitFullscreen]();n instanceof Promise&&n.then(i).catch(r)})),toggle:(e,t)=>o.isFullscreen?o.exit():o.request(e,t),onchange(e){o.on("change",e)},onerror(e){o.on("error",e)},on(e,t){const o=r[e];o&&document.addEventListener(o,t,!1)},off(e,t){const o=r[e];o&&document.removeEventListener(o,t,!1)},raw:t};return Object.defineProperties(o,{isFullscreen:{get:()=>Boolean(document[t.fullscreenElement])},element:{enumerable:!0,get:()=>document[t.fullscreenElement]??void 0},isEnabled:{enumerable:!0,get:()=>Boolean(document[t.fullscreenEnabled])}}),t||(o={isEnabled:!1}),o}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],dsFtO:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{notice:t,template:{$player:r}}=e;o.def(e,"fullscreenWeb",{get:()=>o.hasClass(r,"art-fullscreen-web"),set(i){i?(e.normalSize="fullscreenWeb",o.addClass(r,"art-fullscreen-web"),e.aspectRatioReset=!0,e.autoSize=!1,e.emit("resize"),e.emit("fullscreenWeb",!0),t.show=""):(o.removeClass(r,"art-fullscreen-web"),e.aspectRatioReset=!0,e.autoSize=e.option.autoSize,e.emit("resize"),e.emit("fullscreenWeb"),t.show="")}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],gYMLD:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{i18n:t,notice:r,template:{$video:i}}=e;document.pictureInPictureEnabled?function(e){const{template:{$video:t},events:{proxy:r},notice:i}=e;t.disablePictureInPicture=!1,o.def(e,"pip",{get:()=>document.pictureInPictureElement,set(r){r?(e.normalSize="pip",t.requestPictureInPicture().catch((e=>{throw i.show=e,e}))):document.exitPictureInPicture().catch((e=>{throw i.show=e,e}))}}),r(t,"enterpictureinpicture",(()=>{e.emit("pip",!0)})),r(t,"leavepictureinpicture",(()=>{e.emit("pip")}))}(e):i.webkitSupportsPresentationMode?function(e){const{$video:t}=e.template;t.webkitSetPresentationMode("inline"),o.def(e,"pip",{get:()=>"picture-in-picture"===t.webkitPresentationMode,set(r){r?(e.normalSize="pip",t.webkitSetPresentationMode("picture-in-picture"),e.emit("pip",!0)):(t.webkitSetPresentationMode("inline"),e.emit("pip"))}})}(e):o.def(e,"pip",{get:()=>!1,set(){r.show=t.get("PIP Not Supported")}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],fMSRd:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{$video:t}=e.template;o.def(e,"loaded",{get:()=>e.loadedTime/t.duration}),o.def(e,"loadedTime",{get:()=>t.buffered.length?t.buffered.end(t.buffered.length-1):0})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],iRHNE:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){o.def(e,"played",{get:()=>e.currentTime/e.duration})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],dQ40z:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{$video:t}=e.template;o.def(e,"playing",{get:()=>!!(t.currentTime>0&&!t.paused&&!t.ended&&t.readyState>2)})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],iF844:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{$container:t,$player:r,$video:i}=e.template;o.def(e,"autoSize",{get:()=>o.hasClass(t,"art-auto-size"),set(n){if(n){const{videoWidth:n,videoHeight:a}=i,{width:s,height:l}=t.getBoundingClientRect(),c=n/a,p=s/l;if(o.addClass(t,"art-auto-size"),p>c){const e=l*c/s*100;o.setStyle(r,"width",`${e}%`),o.setStyle(r,"height","100%")}else{const e=s/c/l*100;o.setStyle(r,"width","100%"),o.setStyle(r,"height",`${e}%`)}e.emit("autoSize",{width:e.width,height:e.height})}else o.removeClass(t,"art-auto-size"),o.setStyle(r,"width",null),o.setStyle(r,"height",null),e.emit("autoSize")}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"1hAm8":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){o.def(e,"rect",{get:()=>e.template.$player.getBoundingClientRect()});const t=["bottom","height","left","right","top","width"];for(let r=0;re.rect[i]})}o.def(e,"x",{get:()=>e.left+window.pageXOffset}),o.def(e,"y",{get:()=>e.top+window.pageYOffset})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],dhi4g:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{template:{$player:t},i18n:r,notice:i}=e;o.def(e,"flip",{get:()=>t.dataset.flip||"normal",set(n){n||(n="normal");const a=["normal","horizontal","vertical"];o.errorHandle(a.includes(n),`'flip' only accept ${a.toString()} as parameters`),"normal"===n?delete t.dataset.flip:(e.rotate=!1,t.dataset.flip=n);const s=n.replace(n[0],n[0].toUpperCase());i.show=`${r.get("Video Flip")}: ${r.get(s)}`,e.emit("flip",n)}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],eQPx9:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{i18n:t,option:r,storage:i,events:{proxy:n},template:{$player:a,$miniClose:s,$miniTitle:l,$miniHeader:c}}=e;let p="",u=!1,d=0,f=0,h=0,m=0;n(c,"mousedown",(t=>{u=!0,d=t.pageX,f=t.pageY,h=e.left,m=e.top})),n(document,"mousemove",(e=>{if(u){o.addClass(a,"art-is-dragging");const t=m+e.pageY-f,r=h+e.pageX-d;o.setStyle(a,"top",`${t}px`),o.setStyle(a,"left",`${r}px`),i.set("top",t),i.set("left",r)}})),n(document,"mouseup",(()=>{u=!1,o.removeClass(a,"art-is-dragging")})),n(s,"click",(()=>{e.mini=!1,u=!1,o.removeClass(a,"art-is-dragging")})),o.append(l,r.title||t.get("Mini Player")),o.def(e,"mini",{get:()=>o.hasClass(a,"art-mini"),set(t){if(t){e.normalSize="mini",e.autoSize=!1,p=a.style.cssText,o.addClass(a,"art-mini");const t=i.get("top"),r=i.get("left");if(t&&r)o.setStyle(a,"top",`${t}px`),o.setStyle(a,"left",`${r}px`),o.isInViewport(c)||(i.del("top"),i.del("left"),e.mini=!0);else{const t=document.body,r=t.clientHeight-e.height-50,n=t.clientWidth-e.width-50;i.set("top",r),i.set("left",n),o.setStyle(a,"top",`${r}px`),o.setStyle(a,"left",`${n}px`)}e.aspectRatio=!1,e.playbackRate=!1,e.notice.show="",e.emit("mini",!0)}else a.style.cssText=p,o.removeClass(a,"art-mini"),o.setStyle(a,"top",null),o.setStyle(a,"left",null),e.aspectRatio=!1,e.playbackRate=!1,e.autoSize=r.autoSize,e.notice.show="",e.emit("mini")}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],gQaVE:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){let t=[];o.def(e,"loop",{get:()=>t,set:r=>{if(Array.isArray(r)&&"number"==typeof r[0]&&"number"==typeof r[1]){const i=o.clamp(r[0],0,Math.min(r[1],e.duration)),n=o.clamp(r[1],i,e.duration);n-i>=1?(t=[i,n],e.emit("loop",t)):(t=[],e.emit("loop"))}else t=[],e.emit("loop")}}),e.on("video:timeupdate",(()=>{t.length&&(e.currentTimet[1])&&(e.seek=t[0])}))}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"7n9Pt":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{option:t,template:{$poster:r}}=e;o.def(e,"poster",{get:()=>t.poster,set(e){t.poster=e,o.setStyle(r,"backgroundImage",`url(${e})`)}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"8Az1F":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{option:t,template:{$container:r,$video:i}}=e,n=r.style.height;o.def(e,"autoHeight",{get:()=>o.hasClass(r,"art-auto-height"),set(a){if(a){const{clientWidth:n}=r,{videoHeight:a,videoWidth:s}=i,l=a*(n/s);o.setStyle(r,"height",l+"px"),o.addClass(r,"art-auto-height"),e.autoSize=t.autoSize,e.emit("autoHeight",l)}else o.setStyle(r,"height",n),o.removeClass(r,"art-auto-height"),e.autoSize=t.autoSize,e.emit("autoHeight")}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],kXlsI:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{option:t,template:{$player:r}}=e;o.def(e,"theme",{get:()=>getComputedStyle(r).getPropertyValue("--theme"),set(e){t.theme=e,r.style.setProperty("--theme",e)}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],b8f4Q:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){o.def(e,"title",{get:()=>e.option.title,set(t){e.option.title=t}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"4fP62":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const t=["mini","pip","fullscreen","fullscreenWeb"];o.def(e,"normalSize",{get:()=>t.every((t=>!e[t])),set(r){t.filter((e=>e!==r)).forEach((t=>{e[t]&&(e[t]=!1)}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],gdNfa:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{clamp:t}=e.constructor.utils,{notice:r,template:i,i18n:n}=e;let a=0,s=[];e.on("subtitle:switch",(()=>{s=[]})),o.def(e,"subtitleOffset",{get:()=>a,set(o){if(i.$track&&i.$track.track){const l=Array.from(i.$track.track.cues);a=t(o,-5,5);for(let r=0;r{e.attr(r,t.moreVideoAttr[r])})),t.muted&&(e.muted=t.muted),t.volume&&(i.volume=o.clamp(t.volume,0,1));const a=r.get("volume");"number"==typeof a&&(i.volume=o.clamp(a,0,1)),t.poster&&o.setStyle(n,"backgroundImage",`url(${t.poster})`),t.autoplay&&(i.autoplay=t.autoplay),t.playsInline&&(i.playsInline=!0,i["webkit-playsinline"]=!0),t.theme&&(e.theme=t.theme),0===t.ads.length&&(e.url=t.url)}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],b25aJ:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../config"),n=o.interopDefault(i),a=e("../utils");r.default=function(e){const{i18n:t,notice:r,option:o,constructor:i,events:{proxy:s},template:{$player:l,$video:c,$poster:p}}=e;let u=0;for(let t=0;t{e.emit(`video:${t.type}`,t)}));e.on("video:canplay",(()=>{u=0,e.loading.show=!1})),e.once("video:canplay",(()=>{e.loading.show=!1,e.controls.show=!0,e.mask.show=!0,e.isReady=!0,e.emit("ready")})),e.on("video:ended",(()=>{o.loop?(e.seek=0,e.play(),e.controls.show=!1,e.mask.show=!1):(e.controls.show=!0,e.mask.show=!0)})),e.on("video:error",(async()=>{u{e.autoSize=o.autoSize,a.isMobile&&(e.loading.show=!1,e.controls.show=!0,e.mask.show=!0)})),e.on("video:loadstart",(()=>{e.loading.show=!0})),e.on("video:pause",(()=>{e.controls.show=!0,e.mask.show=!0})),e.on("video:play",(()=>{e.mask.show=!1,a.setStyle(p,"display","none")})),e.on("video:playing",(()=>{e.mask.show=!1})),e.on("video:seeked",(()=>{e.loading.show=!1})),e.on("video:seeking",(()=>{e.loading.show=!0})),e.on("video:timeupdate",(()=>{e.mask.show=!1})),e.on("video:waiting",(()=>{e.loading.show=!0}))}},{"../config":"ej4fZ","../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"3qXcr":[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../utils"),n=e("../utils/component"),a=o.interopDefault(n),s=e("./fullscreen"),l=o.interopDefault(s),c=e("./fullscreenWeb"),p=o.interopDefault(c),u=e("./pip"),d=o.interopDefault(u),f=e("./playAndPause"),h=o.interopDefault(f),m=e("./progress"),g=o.interopDefault(m),y=e("./subtitle"),v=o.interopDefault(y),b=e("./time"),x=o.interopDefault(b),w=e("./volume"),j=o.interopDefault(w),k=e("./setting"),M=o.interopDefault(k),S=e("./thumbnails"),I=o.interopDefault(S),F=e("./screenshot"),$=o.interopDefault(F),T=e("./quality"),E=o.interopDefault(T),C=e("./loop"),z=o.interopDefault(C);class Y extends a.default{constructor(e){super(e),this.name="control";const{option:t,constructor:r,events:{proxy:o},template:{$player:n}}=e;let a=Date.now();o(n,["click","mousemove","touchstart","touchmove"],(()=>{this.show=!0,i.removeClass(n,"art-hide-cursor"),i.addClass(n,"art-hover"),a=Date.now()})),e.on("video:timeupdate",(()=>{e.playing&&this.show&&Date.now()-a>=r.CONTROL_HIDE_TIME&&(this.show=!1,i.addClass(n,"art-hide-cursor"),i.removeClass(n,"art-hover"))})),e.once("video:loadedmetadata",(()=>{this.add(g.default({name:"progress",disable:t.isLive,position:"top",index:10})),this.add(I.default({name:"thumbnails",disable:!t.thumbnails.url||t.isLive||i.isMobile,position:"top",index:20})),this.add(z.default({name:"loop",disable:!1,position:"top",index:30})),this.add(h.default({name:"playAndPause",disable:!1,position:"left",index:10})),this.add(j.default({name:"volume",disable:!1,position:"left",index:20})),this.add(x.default({name:"time",disable:t.isLive,position:"left",index:30})),this.add(E.default({name:"quality",disable:0===t.quality.length,position:"right",index:10})),this.add($.default({name:"screenshot",disable:!t.screenshot||i.isMobile,position:"right",index:20})),this.add(v.default({name:"subtitle",disable:!t.subtitle.url,position:"right",index:30})),this.add(M.default({name:"setting",disable:!t.setting,position:"right",index:40})),this.add(d.default({name:"pip",disable:!t.pip,position:"right",index:50})),this.add(p.default({name:"fullscreenWeb",disable:!t.fullscreenWeb,position:"right",index:60})),this.add(l.default({name:"fullscreen",disable:!t.fullscreen,position:"right",index:70}));for(let e=0;eNumber(e.dataset.index)>=Number(o.dataset.index)));return p?p.insertAdjacentElement("beforebegin",o):i.append(this.$parent,o),t.html&&i.append(o,t.html),t.style&&i.setStyles(o,t.style),t.tooltip&&i.tooltip(o,t.tooltip),t.click&&this.art.events.proxy(o,"click",(e=>{e.preventDefault(),t.click.call(this.art,this,e)})),t.selector&&["left","right"].includes(t.position)&&this.selector(t,o),t.mounted&&t.mounted.call(this.art,o),1===o.childNodes.length&&3===o.childNodes[0].nodeType&&i.addClass(o,"art-control-onlyText"),l.def(this,r,{value:o}),o}selector(e,t){const{hover:r,proxy:o}=this.art.events;i.addClass(t,"art-control-selector");const n=document.createElement("div");i.addClass(n,"art-selector-value"),i.append(n,e.html),t.innerText="",i.append(t,n);const a=e.selector.map(((e,t)=>`
${e.html}
`)).join(""),s=document.createElement("div");i.addClass(s,"art-selector-list"),i.append(s,a),i.append(t,s);const l=()=>{const e=i.getStyle(t,"width")/2-i.getStyle(s,"width")/2;s.style.left=`${e}px`};r(t,l),o(s,"click",(async t=>{const r=(t.composedPath()||[]).find((e=>i.hasClass(e,"art-selector-item")));if(!r)return;i.inverseClass(r,"art-current");const o=Number(r.dataset.index),a=e.selector[o]||{};if(n.innerText=r.innerText,e.onSelect){const o=await e.onSelect.call(this.art,a,r,t);"string"!=typeof o&&"number"!=typeof o||(n.innerHTML=o)}l(),this.art.emit("selector",a,r)}))}}},{"./dom":"fqaW9","option-validator":"2A2W5","../scheme":"3izFE","./property":"5ynPA","./error":"kNZvP","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"43BKT":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>({...e,tooltip:t.i18n.get("Fullscreen"),mounted:e=>{const{events:{proxy:r},icons:i,i18n:n}=t,a=o.append(e,i.fullscreenOn),s=o.append(e,i.fullscreenOff);o.setStyle(s,"display","none"),r(e,"click",(()=>{t.fullscreen=!t.fullscreen})),t.on("fullscreen",(t=>{t?(o.tooltip(e,n.get("Exit Fullscreen")),o.setStyle(a,"display","none"),o.setStyle(s,"display","inline-flex")):(o.tooltip(e,n.get("Fullscreen")),o.setStyle(a,"display","inline-flex"),o.setStyle(s,"display","none"))}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],kQJHz:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>({...e,tooltip:t.i18n.get("Web Fullscreen"),mounted:e=>{const{events:{proxy:r},icons:i,i18n:n}=t,a=o.append(e,i.fullscreenWebOn),s=o.append(e,i.fullscreenWebOff);o.setStyle(s,"display","none"),r(e,"click",(()=>{t.fullscreenWeb=!t.fullscreenWeb})),t.on("fullscreenWeb",(t=>{t?(o.tooltip(e,n.get("Exit Web Fullscreen")),o.setStyle(a,"display","none"),o.setStyle(s,"display","inline-flex")):(o.tooltip(e,n.get("Web Fullscreen")),o.setStyle(a,"display","inline-flex"),o.setStyle(s,"display","none"))}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],aWne0:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>({...e,tooltip:t.i18n.get("PIP Mode"),mounted:e=>{const{events:{proxy:r},icons:i,i18n:n}=t;o.append(e,i.pip),r(e,"click",(()=>{t.pip=!t.pip})),t.on("pip",(t=>{o.tooltip(e,n.get(t?"Exit PIP Mode":"PIP Mode"))}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"4z78f":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>({...e,mounted:e=>{const{events:{proxy:r},icons:i,i18n:n}=t,a=o.append(e,i.play),s=o.append(e,i.pause);function l(){o.setStyle(a,"display","flex"),o.setStyle(s,"display","none")}function c(){o.setStyle(a,"display","none"),o.setStyle(s,"display","flex")}o.tooltip(a,n.get("Play")),o.tooltip(s,n.get("Pause")),r(a,"click",(()=>{t.play()})),r(s,"click",(()=>{t.pause()})),t.playing?c():l(),t.on("video:playing",(()=>{c()})),t.on("video:pause",(()=>{l()}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"19nwD":[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"getPosFromEvent",(()=>n));var i=e("../utils");function n(e,t){const{$progress:r}=e.template,{left:o}=r.getBoundingClientRect(),n=t.pageX,a=i.clamp(n-o,0,r.clientWidth),s=a/r.clientWidth*e.duration;return{second:s,time:i.secondToTime(s),width:a,percentage:i.clamp(a/r.clientWidth,0,1)}}r.default=function(e){return t=>{const{icons:r,option:o,events:{proxy:a}}=t;return{...e,html:'
',mounted:e=>{let s=!1;const l=i.query(".art-progress-loaded",e),c=i.query(".art-progress-played",e),p=i.query(".art-progress-highlight",e),u=i.query(".art-progress-indicator",e),d=i.query(".art-progress-tip",e);i.setStyle(c,"backgroundColor","var(--theme)");let f=t.constructor.INDICATOR_SIZE;function h(e,t){"loaded"===e&&i.setStyle(l,"width",100*t+"%"),"played"===e&&(i.setStyle(c,"width",100*t+"%"),i.setStyle(u,"left",`calc(${100*t}% - ${f/2}px)`))}r.indicator?(f=t.constructor.INDICATOR_SIZE_ICON,i.append(u,r.indicator)):i.setStyles(u,{backgroundColor:"var(--theme)"}),i.isMobile&&(f=t.constructor.INDICATOR_SIZE_MOBILE,r.indicator&&(f=t.constructor.INDICATOR_SIZE_MOBILE_ICON)),i.setStyles(u,{left:`-${f/2}px`,width:`${f}px`,height:`${f}px`});for(let e=0;e`)}h("loaded",t.loaded),t.on("setBar",((e,t)=>{h(e,t)})),t.on("video:progress",(()=>{h("loaded",t.loaded)})),t.on("video:timeupdate",(()=>{h("played",t.played)})),t.on("video:ended",(()=>{h("played",1)})),i.isMobile||(a(e,"click",(e=>{if(e.target!==u){const{second:r,percentage:o}=n(t,e);h("played",o),t.seek=r}})),a(e,"mousemove",(r=>{i.setStyle(d,"display","block"),i.includeFromEvent(r,p)?function(r){const{width:o}=n(t,r),{text:a}=r.target.dataset;d.innerHTML=a;const s=d.clientWidth;o<=s/2?i.setStyle(d,"left",0):o>e.clientWidth-s/2?i.setStyle(d,"left",e.clientWidth-s+"px"):i.setStyle(d,"left",o-s/2+"px")}(r):function(r){const{width:o,time:a}=n(t,r);d.innerHTML=a;const s=d.clientWidth;o<=s/2?i.setStyle(d,"left",0):o>e.clientWidth-s/2?i.setStyle(d,"left",e.clientWidth-s+"px"):i.setStyle(d,"left",o-s/2+"px")}(r)})),a(e,"mouseout",(()=>{i.setStyle(d,"display","none")})),a(u,"mousedown",(()=>{s=!0})),a(document,"mousemove",(e=>{if(s){const{second:r,percentage:o}=n(t,e);h("played",o),t.seek=r}})),a(document,"mouseup",(()=>{s&&(s=!1)})))}}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"31jqM":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>({...e,tooltip:t.i18n.get("Hide Subtitle"),mounted:e=>{const{events:{proxy:r},icons:i,i18n:n,subtitle:a}=t;o.append(e,i.subtitle),r(e,"click",(()=>{a.toggle=!0})),t.on("subtitle",(t=>{o.tooltip(e,n.get(t?"Hide Subtitle":"Show Subtitle"))}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],lh90q:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>({...e,style:{cursor:"auto"},mounted:e=>{function r(){const r=`${o.secondToTime(t.currentTime)} / ${o.secondToTime(t.duration)}`;r!==e.innerText&&(e.innerText=r)}r();const i=["video:loadedmetadata","video:timeupdate","video:progress"];for(let e=0;e({...e,mounted:e=>{const{events:{proxy:r},icons:i,i18n:n}=t;let a=!1;const s=t.constructor.VOLUME_PANEL_WIDTH,l=t.constructor.VOLUME_HANDLE_WIDTH,c=o.append(e,i.volume),p=o.append(e,i.volumeClose),u=o.append(e,'
'),d=o.append(u,'
');function f(e){const{left:t}=u.getBoundingClientRect();return o.clamp(e.pageX-t-l/2,0,s-l/2)/(s-l)}function h(e=.7){if(t.muted||0===e)o.setStyle(c,"display","none"),o.setStyle(p,"display","flex"),o.setStyle(d,"left","0");else{const t=(s-l)*e;o.setStyle(c,"display","flex"),o.setStyle(p,"display","none"),o.setStyle(d,"left",`${t}px`)}}o.tooltip(c,n.get("Mute")),o.setStyle(p,"display","none"),o.isMobile&&o.setStyle(u,"display","none"),h(t.volume),t.on("video:volumechange",(()=>{h(t.volume)})),r(c,"click",(()=>{t.muted=!0})),r(p,"click",(()=>{t.muted=!1})),r(u,"click",(e=>{t.muted=!1,t.volume=f(e)})),r(d,"mousedown",(()=>{a=!0})),r(e,"mousemove",(e=>{a&&(t.muted=!1,t.volume=f(e))})),r(document,"mouseup",(()=>{a&&(a=!1)}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"4rv3i":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>({...e,tooltip:t.i18n.get("Show Setting"),mounted:e=>{const{events:{proxy:r},icons:i,i18n:n,setting:a}=t;o.append(e,i.setting),r(e,"click",(()=>{a.toggle=!0})),t.on("setting",(t=>{o.tooltip(e,n.get(t?"Hide Setting":"Show Setting"))}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],lTgvI:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils"),i=e("./progress");r.default=function(e){return t=>({...e,mounted:e=>{const{option:r,template:{$progress:n,$video:a},events:{proxy:s,loadImg:l}}=t;let c=null,p=!1,u=!1;s(n,"mousemove",(async s=>{if(!p){p=!0;const e=await l(r.thumbnails.url);c=e,u=!0}u&&(o.setStyle(e,"display","block"),function(s){const{width:l}=i.getPosFromEvent(t,s),{url:p,number:u,column:d}=r.thumbnails,f=c.naturalWidth/d,h=f/(a.videoWidth/a.videoHeight),m=n.clientWidth/u,g=Math.floor(l/m),y=Math.ceil(g/d)-1,v=g%d||d-1;o.setStyle(e,"backgroundImage",`url(${p})`),o.setStyle(e,"height",`${h}px`),o.setStyle(e,"width",`${f}px`),o.setStyle(e,"backgroundPosition",`-${v*f}px -${y*h}px`),l<=f/2?o.setStyle(e,"left",0):l>n.clientWidth-f/2?o.setStyle(e,"left",n.clientWidth-f+"px"):o.setStyle(e,"left",l-f/2+"px")}(s))})),s(n,"mouseout",(()=>{o.setStyle(e,"display","none")}))}})}},{"../utils":"5yYFo","./progress":"19nwD","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"71GuX":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>({...e,tooltip:t.i18n.get("Screenshot"),mounted:e=>{const{events:{proxy:r},icons:i}=t;o.append(e,i.screenshot),r(e,"click",(()=>{t.screenshot()}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],f9VNW:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(e){return t=>{const r=t.option.quality,o=r.find((e=>e.default))||r[0];return{...e,html:o?o.html:"",selector:r,onSelect(e){t.switchQuality(e.url,e.html)}}}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],d1O2Q:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>({...e,mounted:e=>{const r=o.append(e,''),i=o.append(e,'');t.on("loop",(n=>{n?(o.setStyle(e,"display","block"),o.setStyle(r,"left",`calc(${n[0]/t.duration*100}% - ${r.clientWidth}px)`),o.setStyle(i,"left",n[1]/t.duration*100+"%")):o.setStyle(e,"display","none")}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],hTnNz:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../utils"),n=e("../utils/component"),a=o.interopDefault(n),s=e("./playbackRate"),l=o.interopDefault(s),c=e("./aspectRatio"),p=o.interopDefault(c),u=e("./flip"),d=o.interopDefault(u),f=e("./info"),h=o.interopDefault(f),m=e("./version"),g=o.interopDefault(m),y=e("./close"),v=o.interopDefault(y);class b extends a.default{constructor(e){super(e),this.art=e,this.name="contextmenu",this.$parent=e.template.$contextmenu,e.once("video:loadedmetadata",(()=>{i.isMobile||this.init()}))}init(){const{option:e,template:{$player:t,$contextmenu:r},events:{proxy:o}}=this.art;this.add(l.default({disable:!e.playbackRate,name:"playbackRate",index:10})),this.add(p.default({disable:!e.aspectRatio,name:"aspectRatio",index:20})),this.add(d.default({disable:!e.flip,name:"flip",index:30})),this.add(h.default({disable:!1,name:"info",index:40})),this.add(g.default({disable:!1,name:"version",index:50})),this.add(v.default({disable:!1,name:"close",index:60}));for(let t=0;t{e.preventDefault(),this.show=!0;const o=e.clientX,n=e.clientY,{height:a,width:s,left:l,top:c}=t.getBoundingClientRect(),{height:p,width:u}=r.getBoundingClientRect();let d=o-l,f=n-c;o+u>l+s&&(d=s-u),n+p>c+a&&(f=a-p),i.setStyles(r,{top:`${f}px`,left:`${d}px`})})),o(t,"click",(e=>{i.includeFromEvent(e,r)||(this.show=!1)})),this.art.on("blur",(()=>{this.show=!1}))}}r.default=b},{"../utils":"5yYFo","../utils/component":"5MLcx","./playbackRate":"1uTBJ","./aspectRatio":"cFKj0","./flip":"l7S3g","./info":"ihHBb","./version":"3q8wK","./close":"sLP7j","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"1uTBJ":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>{const{i18n:r}=t;return{...e,html:`${r.get("Play Speed")}:0.50.75${r.get("Normal")}1.251.52.0`,click:(e,r)=>{const{value:o}=r.target.dataset;o&&(t.playbackRate=Number(o),e.show=!1)},mounted:e=>{t.on("playbackRate",(t=>{const r=o.queryAll("span",e).find((e=>Number(e.dataset.value)===t));r&&o.inverseClass(r,"art-current")}))}}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],cFKj0:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>{const{i18n:r}=t;return{...e,html:`${r.get("Aspect Ratio")}:${r.get("Default")}4:316:9`,click:(e,r)=>{const{value:o}=r.target.dataset;o&&(t.aspectRatio=o,e.show=!1)},mounted:e=>{t.on("aspectRatio",(t=>{const r=o.queryAll("span",e).find((e=>e.dataset.value===t));r&&o.inverseClass(r,"art-current")}))}}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],l7S3g:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>{const{i18n:r}=t;return{...e,html:`${r.get("Video Flip")}:${r.get("Normal")}${r.get("Horizontal")}${r.get("Vertical")}`,click:(e,r)=>{const{value:o}=r.target.dataset;o&&(t.flip=o,e.show=!1)},mounted:e=>{t.on("flip",(t=>{const r=o.queryAll("span",e).find((e=>e.dataset.value===t));r&&o.inverseClass(r,"art-current")}))}}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],ihHBb:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(e){return t=>({...e,html:t.i18n.get("Video Info"),click:e=>{t.info.show=!0,e.show=!1}})}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"3q8wK":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(e){return{...e,html:'ArtPlayer 4.3.17'}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],sLP7j:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(e){return t=>({...e,html:t.i18n.get("Close"),click:e=>{e.show=!1}})}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],bfwuE:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./utils"),n=e("./utils/component"),a=o.interopDefault(n);class s extends a.default{constructor(e){super(e),this.name="info",e.once("video:loadedmetadata",(()=>{i.isMobile||this.init()}))}init(){const{constructor:e,events:{proxy:t},template:{$infoPanel:r,$infoClose:o,$video:n}}=this.art;t(o,"click",(()=>{this.show=!1}));let a=null;const s=i.queryAll("[data-video]",r)||[];this.art.on("destroy",(()=>{clearTimeout(a)})),function t(){for(let e=0;e{this.init(e.option.subtitle)}))}get url(){return this.art.template.$track.src}set url(e){this.switch(e)}get textTrack(){return this.art.template.$video.textTracks[0]}get activeCue(){return this.textTrack.activeCues[0]}style(e,t){const{$subtitle:r}=this.art.template;return"object"==typeof e?i.setStyles(r,e):i.setStyle(r,e,t)}update(){const{$subtitle:e}=this.art.template;e.innerHTML="",this.activeCue&&(e.innerHTML=this.activeCue.text.split(/\r?\n/).map((e=>`

${i.escape(e)}

`)).join(""),this.art.emit("subtitleUpdate",this.activeCue.text))}async switch(e,t={}){const{i18n:r,notice:o,option:i}=this.art,n={...i.subtitle,...t,url:e},a=await this.init(n);return t.name&&(o.show=`${r.get("Switch Subtitle")}: ${t.name}`),a}init(e){if(l.default(e,p.default.subtitle),!e.url)return;const{notice:t,events:{proxy:r},template:{$subtitle:o,$video:n,$track:a}}=this.art;if(!a){const e=document.createElement("track");e.default=!0,e.kind="metadata",n.appendChild(e),this.art.template.$track=e,r(this.textTrack,"cuechange",this.update.bind(this))}return this.style(e.style),i.errorHandle(window.fetch,"fetch not support"),fetch(e.url).then((e=>e.arrayBuffer())).then((t=>{i.errorHandle(window.TextDecoder,"TextDecoder not support");const r=new TextDecoder(e.encoding).decode(t);switch(this.art.emit("subtitleLoad",e.url),e.type||i.getExt(e.url)){case"srt":return i.vttToBlob(i.srtToVtt(r));case"ass":return i.vttToBlob(i.assToVtt(r));case"vtt":return i.vttToBlob(r);default:return e.url}})).then((e=>(o.innerHTML="",this.url===e||(URL.revokeObjectURL(this.url),this.art.template.$track.src=e,this.art.emit("subtitleSwitch",e)),e))).catch((e=>{throw t.show=e,e}))}}r.default=u},{"./utils":"5yYFo","./utils/component":"5MLcx","option-validator":"2A2W5","./scheme":"3izFE","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"9oLaG":[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../utils/error"),n=e("./clickInit"),a=o.interopDefault(n),s=e("./hoverInit"),l=o.interopDefault(s),c=e("./mousemoveInit"),p=o.interopDefault(c),u=e("./resizeInit"),d=o.interopDefault(u),f=e("./gestureInit"),h=o.interopDefault(f),m=e("./viewInit"),g=o.interopDefault(m);r.default=class{constructor(e){this.destroyEvents=[],this.proxy=this.proxy.bind(this),this.hover=this.hover.bind(this),this.loadImg=this.loadImg.bind(this),e.whitelist.state&&e.once("video:loadedmetadata",(()=>{a.default(e,this),l.default(e,this),p.default(e,this),d.default(e,this),h.default(e,this),g.default(e,this)}))}proxy(e,t,r,o={}){if(Array.isArray(t))return t.map((t=>this.proxy(e,t,r,o)));e.addEventListener(t,r,o);const i=()=>e.removeEventListener(t,r,o);return this.destroyEvents.push(i),i}hover(e,t,r){t&&this.proxy(e,"mouseenter",t),r&&this.proxy(e,"mouseleave",r)}loadImg(e){return new Promise(((t,r)=>{let o;if(e instanceof HTMLImageElement)o=e;else{if("string"!=typeof e)return r(new i.ArtPlayerError("Unable to get Image"));o=new Image,o.src=e}if(o.complete)return t(o);this.proxy(o,"load",(()=>t(o))),this.proxy(o,"error",(()=>r(new i.ArtPlayerError(`Failed to load Image: ${o.src}`))))}))}destroy(){for(let e=0;e{o.includeFromEvent(t,i)?(e.isFocus=!0,e.emit("focus")):(e.isFocus=!1,e.emit("blur"))}));let a=0;t.proxy(n,"click",(()=>{const t=Date.now();t-a<=r.DB_CLICE_TIME?(e.emit("dblclick"),o.isMobile?e.toggle():e.fullscreen=!e.fullscreen):(e.emit("click"),o.isMobile||e.toggle()),a=t}))}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],eIqcL:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e,t){const{$player:r}=e.template;t.hover(r,(()=>{o.addClass(r,"art-hover"),e.emit("hover",!0)}),(()=>{o.removeClass(r,"art-hover"),e.emit("hover")}))}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],hEy8X:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(e,t){const{$player:r}=e.template;t.proxy(r,"mousemove",(t=>{e.emit("mousemove",t)}))}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"9c8lQ":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e,t){const{notice:r,option:i}=e,n=o.throttle((()=>{e.normalSize&&(e.autoSize=i.autoSize),e.aspectRatioReset=!0,r.show="",e.emit("resize")}),e.constructor.RESIZE_TIME);t.proxy(window,["orientationchange","resize"],(()=>{n()})),screen&&screen.orientation&&screen.orientation.onchange&&t.proxy(screen.orientation,"change",(()=>{n()}))}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],gzHdo:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e,t){if(o.isMobile&&!e.option.isLive){const{notice:r,plugins:i,template:{$video:n,$bottom:a,$controls:s}}=e;let l=!1,c=0,p=0,u=0;const d=t=>{if(1===t.touches.length){l=!0;const{clientX:r,clientY:o}=t.touches[0];c=r,p=o,u=e.currentTime}},f=t=>{if(1===t.touches.length&&l&&e.duration){const n=i.autoOrientation&&i.autoOrientation.state,{clientX:a,clientY:s}=t.touches[0],l=o.clamp((a-c)/e.width,-1,1),d=o.clamp((s-p)/e.height,-1,1),f=n?d:l,h=o.clamp(u+e.duration*f/2,0,e.duration);e.seek=h,e.emit("setBar","played",o.clamp(h/e.duration,0,1)),r.show=`${o.secondToTime(h)} / ${o.secondToTime(e.duration)}`}},h=()=>{l&&(c=0,p=0,u=0,l=!1)};t.proxy(a,"touchstart",(e=>{o.includeFromEvent(e,s)||d(e)})),t.proxy(a,"touchmove",f),t.proxy(n,"touchstart",d),t.proxy(n,"touchmove",f),t.proxy(document,"touchend",h)}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],cJlT5:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e,t){const{option:r,constructor:i,template:{$container:n}}=e,a=o.throttle((()=>{e.emit("view",o.isInViewport(n,i.SCROLL_GAP))}),i.SCROLL_TIME);t.proxy(window,"scroll",(()=>{a()})),e.on("view",(t=>{r.autoMini&&(e.mini=!t)}))}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],cKO4X:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("./utils");r.default=class{constructor(e){this.art=e,this.keys={},e.once("video:loadedmetadata",(()=>{e.option.hotkey&&!o.isMobile&&this.init()}))}init(){const{proxy:e}=this.art.events;this.add(27,(()=>{this.art.fullscreenWeb&&(this.art.fullscreenWeb=!1)})),this.add(32,(()=>{this.art.toggle()})),this.add(37,(()=>{this.art.backward=5})),this.add(38,(()=>{this.art.volume+=.1})),this.add(39,(()=>{this.art.forward=5})),this.add(40,(()=>{this.art.volume-=.1})),e(window,"keydown",(e=>{if(this.art.isFocus){const t=document.activeElement.tagName.toUpperCase(),r=document.activeElement.getAttribute("contenteditable");if("INPUT"!==t&&"TEXTAREA"!==t&&""!==r&&"true"!==r){const t=this.keys[e.keyCode];if(t){e.preventDefault();for(let r=0;r{for(let e=0;e{i.innerText="",o.removeClass(r,"art-notice-show")}),t.NOTICE_TIME)):o.removeClass(r,"art-notice-show")}}},{"./utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],aJ0dF:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./utils"),n=e("./utils/component"),a=o.interopDefault(n);class s extends a.default{constructor(e){super(e),this.name="mask";const{template:t,icons:r,events:o}=e;i.append(t.$state,r.state),o.proxy(t.$state,"click",(()=>e.play()))}}r.default=s},{"./utils":"5yYFo","./utils/component":"5MLcx","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],jx1Wu:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../utils"),n=e("bundle-text:./loading.svg"),a=o.interopDefault(n),s=e("bundle-text:./state.svg"),l=o.interopDefault(s),c=e("bundle-text:./check.svg"),p=o.interopDefault(c),u=e("bundle-text:./play.svg"),d=o.interopDefault(u),f=e("bundle-text:./pause.svg"),h=o.interopDefault(f),m=e("bundle-text:./volume.svg"),g=o.interopDefault(m),y=e("bundle-text:./volume-close.svg"),v=o.interopDefault(y),b=e("bundle-text:./subtitle.svg"),x=o.interopDefault(b),w=e("bundle-text:./screenshot.svg"),j=o.interopDefault(w),k=e("bundle-text:./setting.svg"),M=o.interopDefault(k),S=e("bundle-text:./arrow-left.svg"),I=o.interopDefault(S),F=e("bundle-text:./arrow-right.svg"),$=o.interopDefault(F),T=e("bundle-text:./playback-rate.svg"),E=o.interopDefault(T),C=e("bundle-text:./aspect-ratio.svg"),z=o.interopDefault(C),Y=e("bundle-text:./config.svg"),D=o.interopDefault(Y),P=e("bundle-text:./pip.svg"),R=o.interopDefault(P),A=e("bundle-text:./lock.svg"),O=o.interopDefault(A),L=e("bundle-text:./unlock.svg"),H=o.interopDefault(L),_=e("bundle-text:./fullscreen-off.svg"),N=o.interopDefault(_),J=e("bundle-text:./fullscreen-on.svg"),V=o.interopDefault(J),q=e("bundle-text:./fullscreen-web-off.svg"),W=o.interopDefault(q),B=e("bundle-text:./fullscreen-web-on.svg"),U=o.interopDefault(B);r.default=class{constructor(e){const t={loading:a.default,state:l.default,play:d.default,pause:h.default,check:p.default,volume:g.default,volumeClose:v.default,subtitle:x.default,screenshot:j.default,setting:M.default,pip:R.default,arrowLeft:I.default,arrowRight:$.default,playbackRate:E.default,aspectRatio:z.default,config:D.default,lock:O.default,unlock:H.default,fullscreenOff:N.default,fullscreenOn:V.default,fullscreenWebOff:W.default,fullscreenWebOn:U.default,...e.option.icons};Object.keys(t).forEach((e=>{i.def(this,e,{get:()=>{const r=document.createElement("i");return i.addClass(r,"art-icon"),i.addClass(r,`art-icon-${e}`),i.append(r,t[e]),r}})}))}}},{"../utils":"5yYFo","bundle-text:./loading.svg":"gFMCI","bundle-text:./state.svg":"iYMJD","bundle-text:./check.svg":"hyrDV","bundle-text:./play.svg":"eZys6","bundle-text:./pause.svg":"hITjK","bundle-text:./volume.svg":"hNNiX","bundle-text:./volume-close.svg":"dC2M2","bundle-text:./subtitle.svg":"iCL9K","bundle-text:./screenshot.svg":"9hKk0","bundle-text:./setting.svg":"47p50","bundle-text:./arrow-left.svg":"5je49","bundle-text:./arrow-right.svg":"2HKZ5","bundle-text:./playback-rate.svg":"hdBpQ","bundle-text:./aspect-ratio.svg":"alUG1","bundle-text:./config.svg":"6B4Bn","bundle-text:./pip.svg":"2Ya1d","bundle-text:./lock.svg":"5Bna4","bundle-text:./unlock.svg":"daCyz","bundle-text:./fullscreen-off.svg":"bx7Yh","bundle-text:./fullscreen-on.svg":"fxY8n","bundle-text:./fullscreen-web-off.svg":"96euD","bundle-text:./fullscreen-web-on.svg":"ccnBB","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],gFMCI:[function(e,t,r){t.exports=''},{}],iYMJD:[function(e,t,r){t.exports=''},{}],hyrDV:[function(e,t,r){t.exports=''},{}],eZys6:[function(e,t,r){t.exports=''},{}],hITjK:[function(e,t,r){t.exports=''},{}],hNNiX:[function(e,t,r){t.exports=''},{}],dC2M2:[function(e,t,r){t.exports=''},{}],iCL9K:[function(e,t,r){t.exports=''},{}],"9hKk0":[function(e,t,r){t.exports=''},{}],"47p50":[function(e,t,r){t.exports=''},{}],"5je49":[function(e,t,r){t.exports=''},{}],"2HKZ5":[function(e,t,r){t.exports=''},{}],hdBpQ:[function(e,t,r){t.exports=''},{}],alUG1:[function(e,t,r){t.exports=''},{}],"6B4Bn":[function(e,t,r){t.exports=''},{}],"2Ya1d":[function(e,t,r){t.exports=''},{}],"5Bna4":[function(e,t,r){t.exports=''},{}],daCyz:[function(e,t,r){t.exports=''},{}],bx7Yh:[function(e,t,r){t.exports=''},{}],fxY8n:[function(e,t,r){t.exports=''},{}],"96euD":[function(e,t,r){t.exports=''},{}],ccnBB:[function(e,t,r){t.exports=''},{}],hdF39:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./flip"),n=o.interopDefault(i),a=e("./aspectRatio"),s=o.interopDefault(a),l=e("./playbackRate"),c=o.interopDefault(l),p=e("./subtitleOffset"),u=o.interopDefault(p),d=e("../utils/component"),f=o.interopDefault(d),h=e("../utils");function m(e,t,r){for(let o=0;o{t.playbackRate&&this.option.push(c.default(e)),t.aspectRatio&&this.option.push(s.default(e)),t.flip&&this.option.push(n.default(e)),t.subtitleOffset&&this.option.push(u.default(e));for(let e=0;e{this.show&&(this.show=!1,this.init(this.option))})),r(i,"click",(t=>{!this.show||h.includeFromEvent(t,e.controls.setting)||h.includeFromEvent(t,this.$parent)||(this.show=!1,this.init(this.option))})))}add(e){"function"==typeof e?this.option.push(e(this.art)):this.option.push(e),this.cache=new Map,this.events.forEach((e=>e())),this.events=[],this.$parent.innerHTML="",this.option=m(this.option),this.init(this.option)}creatHeader(e){const{icons:t,events:{proxy:r}}=this.art,o=document.createElement("div");h.addClass(o,"art-setting-item"),h.addClass(o,"art-setting-item-back");const i=h.append(o,'
'),n=document.createElement("div");h.addClass(n,"art-setting-item-left-icon"),h.append(n,t.arrowLeft),h.append(i,n),h.append(i,e._parentItem.html);const a=r(o,"click",(()=>{this.init(e._parentList)}));return this.events.push(a),o}creatItem(e){const{icons:t,events:{proxy:r}}=this.art,o=e.selector&&e.selector.length,i=document.createElement("div");h.addClass(i,"art-setting-item"),e.default&&h.addClass(i,"art-current");const n=h.append(i,'
'),a=h.append(i,'
'),s=document.createElement("div");h.addClass(s,"art-setting-item-left-icon"),h.append(s,o?e.icon||t.config:t.check),h.append(n,s),e._$icon=s,h.def(e,"icon",{get:()=>s.innerHTML,set(e){"string"!=typeof e&&"number"!=typeof e||(s.innerHTML=e)}});const l=document.createElement("div");if(h.addClass(l,"art-setting-item-left-text"),h.append(l,e.html||""),h.append(n,l),e._$html=l,h.def(e,"html",{get:()=>l.innerHTML,set(e){"string"!=typeof e&&"number"!=typeof e||(l.innerHTML=e)}}),o){const r=document.createElement("div");h.addClass(r,"art-setting-item-right-tooltip"),h.append(r,e.tooltip||""),h.append(a,r),e._$tooltip=r,h.def(e,"tooltip",{get:()=>r.innerHTML,set(e){"string"!=typeof e&&"number"!=typeof e||(r.innerHTML=e)}});const o=document.createElement("div");h.addClass(o,"art-setting-item-right-icon"),h.append(o,t.arrowRight),h.append(a,o)}const c=r(i,"click",(async t=>{if(o)this.init(e.selector,e.width);else if(h.inverseClass(i,"art-current"),e._parentList&&this.init(e._parentList),e._parentItem&&e._parentItem.onSelect){const r=await e._parentItem.onSelect.call(this.art,e,i,t);e._parentItem._$tooltip&&("string"!=typeof r&&"number"!=typeof r||(e._parentItem._$tooltip.innerHTML=r))}}));return this.events.push(c),i}init(e,t){const{constructor:r}=this.art;if(this.cache.has(e)){const t=this.cache.get(e);h.inverseClass(t,"art-current"),h.setStyle(this.$parent,"width",`${t.dataset.width}px`),h.setStyle(this.$parent,"height",`${t.dataset.height}px`)}else{const o=document.createElement("div");h.addClass(o,"art-setting-panel"),o.dataset.width=t||r.SETTING_WIDTH,o.dataset.height=e.length*r.SETTING_ITEM_HEIGHT,e[0]&&e[0]._parentItem&&(h.append(o,this.creatHeader(e[0])),o.dataset.height=Number(o.dataset.height)+r.SETTING_ITEM_HEIGHT);for(let t=0;te.dataset.value===i));a&&o.inverseClass(a,"art-current")}return{width:i.SETTING_ITEM_WIDTH,html:t.get("Video Flip"),tooltip:t.get(n[e.flip]),icon:r.config,selector:Object.keys(n).map((r=>({value:r,default:r===e.flip,html:t.get(n[r])}))),onSelect(t){e.flip=t.value},mounted:(t,r)=>{a(t,r._$tooltip,e.flip),e.on("flip",(()=>{a(t,r._$tooltip,e.flip)}))}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],jTfLi:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{i18n:t,icons:r,constructor:i}=e;function n(e){return"default"===e?t.get("Default"):e}function a(e,t,r){t&&(t.innerText=n(r));const i=o.queryAll(".art-setting-item",e).find((e=>e.dataset.value===r));i&&o.inverseClass(i,"art-current")}return{width:i.SETTING_ITEM_WIDTH,html:t.get("Aspect Ratio"),icon:r.aspectRatio,tooltip:n(e.aspectRatio),selector:["default","4:3","16:9"].map((t=>({value:t,default:t===e.aspectRatio,html:n(t)}))),onSelect(t){e.aspectRatio=t.value},mounted:(t,r)=>{a(t,r._$tooltip,e.aspectRatio),e.on("aspectRatio",(()=>{a(t,r._$tooltip,e.aspectRatio)}))}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],aowja:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{i18n:t,icons:r,constructor:i}=e;function n(e){return 1===e?t.get("Normal"):e}function a(e,t,r){t&&(t.innerText=n(r));const i=o.queryAll(".art-setting-item",e).find((e=>Number(e.dataset.value)===r));i&&o.inverseClass(i,"art-current")}return{width:i.SETTING_ITEM_WIDTH,html:t.get("Play Speed"),tooltip:n(e.playbackRate),icon:r.playbackRate,selector:[.5,.75,1,1.25,1.5,2].map((t=>({value:t,default:t===e.playbackRate,html:n(t)}))),onSelect(t){e.playbackRate=t.value},mounted:(t,r)=>{a(t,r._$tooltip,e.playbackRate),e.on("playbackRate",(()=>{a(t,r._$tooltip,e.playbackRate)}))}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],aPjJK:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{i18n:t,icons:r,constructor:i}=e;function n(e){return 0===e?t.get("Normal"):e}function a(e,t,r){t&&(t.innerText=n(r));const i=o.queryAll(".art-setting-item",e).find((e=>Number(e.dataset.value)===r));i&&o.inverseClass(i,"art-current")}return{width:i.SETTING_ITEM_WIDTH,html:t.get("Subtitle Offset"),tooltip:n(e.subtitleOffset),icon:r.subtitle,selector:[-5,-4,-3,-2,-1,0,1,2,3,4,5].map((t=>({value:t,default:t===e.subtitleOffset,html:n(t)}))),onSelect(t){e.subtitleOffset=t.value},mounted:(t,r)=>{a(t,r._$tooltip,e.subtitleOffset),e.on("subtitleOffset",(()=>{a(t,r._$tooltip,e.subtitleOffset)}))}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],bCcu0:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);r.default=class{constructor(){this.name="artplayer_settings",this.settings={}}get(e){try{const t=JSON.parse(window.localStorage.getItem(this.name))||{};return e?t[e]:t}catch(t){return e?this.settings[e]:this.settings}}set(e,t){try{const r=Object.assign({},this.get(),{[e]:t});window.localStorage.setItem(this.name,JSON.stringify(r))}catch(r){this.settings[e]=t}}del(e){try{const t=this.get();delete t[e],window.localStorage.setItem(this.name,JSON.stringify(t))}catch(t){delete this.settings[e]}}clear(){try{window.localStorage.removeItem(this.name)}catch(e){this.settings={}}}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"1v13t":[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../utils"),n=e("./miniProgressBar"),a=o.interopDefault(n),s=e("./autoOrientation"),l=o.interopDefault(s),c=e("./autoPlayback"),p=o.interopDefault(c),u=e("./fastForward"),d=o.interopDefault(u),f=e("./lock"),h=o.interopDefault(f);r.default=class{constructor(e){this.art=e,this.id=0;const{option:t}=e;t.miniProgressBar&&!t.isLive&&this.add(a.default),t.lock&&i.isMobile&&this.add(h.default),t.autoPlayback&&this.add(p.default),t.autoOrientation&&i.isMobile&&this.add(l.default),t.fastForward&&i.isMobile&&!t.isLive&&this.add(d.default);for(let e=0;e{e.layers.add({name:"miniProgressBar",mounted(t){e.on("destroy",(()=>{t.style.display="none"})),e.on("video:timeupdate",(()=>{t.style.width=100*e.played+"%"})),e.on("setBar",((e,r)=>{"played"===e&&(t.style.width=100*r+"%")}))}})})),{name:"miniProgressBar"}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],bcdCk:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{option:t,constructor:r,template:{$player:i,$video:n}}=e;return e.on("fullscreenWeb",(a=>{if(a){const{videoWidth:t,videoHeight:a}=n,{clientWidth:s,clientHeight:l}=document.documentElement;(t>a&&sl)&&setTimeout((()=>{o.setStyle(i,"width",`${l}px`),o.setStyle(i,"height",`${s}px`),o.setStyle(i,"transform-origin","0 0"),o.setStyle(i,"transform",`rotate(90deg) translate(0, -${s}px)`),o.addClass(i,"art-auto-orientation"),e.emit("resize")}),r.MOBILE_AUTO_ORIENTATION_TIME)}else o.hasClass(i,"art-auto-orientation")&&(o.setStyle(i,"width",null),o.setStyle(i,"height",null),o.setStyle(i,"transform",null),o.setStyle(i,"transform-origin",null),o.removeClass(i,"art-auto-orientation"),e.aspectRatioReset=!0,e.autoSize=t.autoSize,e.notice.show="",e.emit("resize"))})),e.on("fullscreen",(async e=>{const t=screen.orientation.type;if(e){const{videoWidth:e,videoHeight:r}=n,{clientWidth:a,clientHeight:s}=document.documentElement;if(e>r&&as){const e=t.startsWith("portrait")?"landscape":"portrait";await screen.orientation.lock(e),o.addClass(i,"art-auto-orientation-fullscreen")}}else o.hasClass(i,"art-auto-orientation-fullscreen")&&(await screen.orientation.lock(t),o.removeClass(i,"art-auto-orientation-fullscreen"))})),{name:"autoOrientation",get state(){return o.hasClass(i,"art-auto-orientation")}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"1nHHC":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{i18n:t,storage:r,constructor:i,template:{$poster:n}}=e;return e.on("video:timeupdate",(()=>{const t=r.get("times")||{},o=Object.keys(t);o.length>i.AUTO_PLAYBACK_MAX&&delete t[o[0]],t[e.option.url]=e.currentTime,r.set("times",t)})),e.on("ready",(()=>{const i=(r.get("times")||{})[e.option.url];i&&(e.seek=i,o.setStyle(n,"display","none"),e.notice.show=`${t.get("Auto playback at")} ${o.secondToTime(i)}`)})),{name:"autoPlayback",get times(){return r.get("times")||{}},clear:()=>r.del("times")}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"4gkmX":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{constructor:t,events:{proxy:r},template:{$player:i,$video:n}}=e;let a=null,s=!1;const l=()=>{clearTimeout(a),s&&(s=!1,e.playbackRate=1,o.removeClass(i,"art-fast-forward"))};return r(n,"touchstart",(r=>{1===r.touches.length&&e.playing&&(a=setTimeout((()=>{s=!0,e.playbackRate=t.FAST_FORWARD_VALUE,o.addClass(i,"art-fast-forward")}),t.FAST_FORWARD_TIME))})),r(document,"touchmove",l),r(document,"touchend",l),{name:"fastForward",get state(){return o.hasClass(i,"art-fast-forward")}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],ij5nM:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{layers:t,icons:r,template:{$player:i}}=e;return t.add({name:"lock",mounted(t){const i=o.append(t,r.lock),n=o.append(t,r.unlock);o.setStyle(i,"display","none"),e.on("lock",(e=>{e?(o.setStyle(i,"display","inline-flex"),o.setStyle(n,"display","none")):(o.setStyle(i,"display","none"),o.setStyle(n,"display","inline-flex"))}))},click(){o.hasClass(i,"art-lock")?(o.removeClass(i,"art-lock"),e.emit("lock",!1)):(o.addClass(i,"art-lock"),e.emit("lock",!0))}}),{name:"lock",get state(){return o.hasClass(i,"art-lock")}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],jXgJj:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);r.default=class{constructor(e){this.art=e,this.init()}get current(){return this.art.option.ads[this.index]}get prev(){return this.art.option.ads[this.index-1]}get next(){return this.art.option.ads[this.index+1]}init(){this.index=0,this.isEnd=!1,this.playing=!1,this.urlCache=this.art.option.url,this.current&&(this.playing=!0,this.play(this.current))}play(e={}){this.isEnd||(this.art.switchUrl(e.url),this.art.once("video:timeupdate",(()=>{this.art.emit("ads:start",e)})),this.art.once("video:ended",(()=>{const e=this.next;e?(this.index+=1,this.play(e)):this.end()})))}end(){this.isEnd||(this.isEnd=!0,this.playing=!1,this.art.option.url=this.urlCache,this.art.switchUrl(this.urlCache),this.art.emit("ads:end"))}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],eD5Ch:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./config"),n=o.interopDefault(i),a=e("./utils");r.default=class{constructor(e){const{option:t,events:{proxy:r},template:{$video:o}}=e;for(let t=0;t{e.emit(`video:${t.type}`,t)}));Object.keys(t.moreVideoAttr).forEach((e=>{o[e]=t.moreVideoAttr[e]})),t.muted&&(o.muted=t.muted),t.volume&&(o.volume=a.clamp(t.volume,0,1)),t.poster&&(o.poster=t.poster),t.autoplay&&(o.autoplay=t.autoplay),t.playsInline&&(o.playsInline=!0,o["webkit-playsinline"]=!0);const i=t.type||a.getExt(t.url),s=t.customType[i];i&&s?(s(o,t.url,e),e.emit("customType",i)):(o.src=t.url,e.emit("url",o.src))}}},{"./config":"ej4fZ","./utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}]},["E13ST"],"E13ST"); \ No newline at end of file +!function(e,t,r,o,i){var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof n.parcelRequireb749&&n.parcelRequireb749,s=a.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,r){if(!s[t]){if(!e[t]){var o="function"==typeof n.parcelRequireb749&&n.parcelRequireb749;if(!r&&o)return o(t,!0);if(a)return a(t,!0);if(l&&"string"==typeof t)return l(t);var i=new Error("Cannot find module '"+t+"'");throw i.code="MODULE_NOT_FOUND",i}u.resolve=function(r){var o=e[t][1][r];return null!=o?o:r},u.cache={};var p=s[t]=new c.Module(t);e[t][0].call(p.exports,u,p,p.exports,this)}return s[t].exports;function u(e){var t=u.resolve(e);return!1===t?{}:c(t)}}c.isParcelRequire=!0,c.Module=function(e){this.id=e,this.bundle=c,this.exports={}},c.modules=e,c.cache=s,c.parent=a,c.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(c,"root",{get:function(){return n.parcelRequireb749}}),n.parcelRequireb749=c;for(var p=0;pt.call(this))),re.push(this)}static get instances(){return re}static get version(){return"4.3.18"}static get env(){return"production"}static get build(){return"1651549870334"}static get config(){return h.default}static get utils(){return p}static get scheme(){return d.default}static get Emitter(){return c.default}static get validator(){return s.default}static get kindOf(){return s.default.kindOf}static get html(){return v.default.html}static get option(){return{container:"#artplayer",url:"",poster:"",title:"",type:"",theme:"#f00",volume:.7,isLive:!1,muted:!1,autoplay:!1,autoSize:!1,autoMini:!1,loop:!1,flip:!1,playbackRate:!1,aspectRatio:!1,screenshot:!1,setting:!1,hotkey:!0,pip:!1,mutex:!0,backdrop:!0,fullscreen:!1,fullscreenWeb:!1,subtitleOffset:!1,miniProgressBar:!1,useSSR:!1,playsInline:!0,lock:!1,fastForward:!1,autoPlayback:!1,autoOrientation:!1,ads:[],layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],whitelist:[],thumbnails:{url:"",number:60,column:10},subtitle:{url:"",type:"",style:{},encoding:"utf-8"},moreVideoAttr:{controls:!1,preload:p.isSafari?"auto":"metadata"},icons:{},customType:{},lang:navigator.language.toLowerCase()}}get proxy(){return this.events.proxy}get query(){return this.template.query}destroy(e=!0){this.events.destroy(),this.template.destroy(e),re.splice(re.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}if(r.default=oe,oe.NOTICE_TIME=2e3,oe.SETTING_WIDTH=250,oe.SETTING_ITEM_WIDTH=200,oe.SETTING_ITEM_HEIGHT=35,oe.INDICATOR_SIZE=14,oe.INDICATOR_SIZE_ICON=16,oe.INDICATOR_SIZE_MOBILE=18,oe.INDICATOR_SIZE_MOBILE_ICON=20,oe.VOLUME_PANEL_WIDTH=60,oe.VOLUME_HANDLE_WIDTH=12,oe.RESIZE_TIME=500,oe.SCROLL_TIME=200,oe.SCROLL_GAP=50,oe.AUTO_PLAYBACK_MAX=10,oe.RECONNECT_TIME_MAX=5,oe.RECONNECT_SLEEP_TIME=1e3,oe.CONTROL_HIDE_TIME=3e3,oe.DB_CLICE_TIME=300,oe.MOBILE_AUTO_PLAYBACKRATE=3,oe.MOBILE_AUTO_PLAYBACKRATE_TIME=1e3,oe.MOBILE_AUTO_ORIENTATION_TIME=200,oe.INFO_LOOP_TIME=1e3,oe.FAST_FORWARD_VALUE=3,oe.FAST_FORWARD_TIME=1e3,"undefined"!=typeof document){const e=document.createElement("style");e.dataset.from="artplayer",e.textContent=n.default,document.head.appendChild(e)}"undefined"!=typeof window&&(window.Artplayer=oe),console.log(`%c ArtPlayer %c ${oe.version} %c https://artplayer.org`,"color: #fff; background: #5f5f5f","color: #fff; background: #4bc729","")},{"bundle-text:./style/index.less":"6U764","option-validator":"2A2W5","./utils/emitter":"1SgiG","./utils":"5yYFo","./scheme":"3izFE","./config":"ej4fZ","./whitelist":"7CkCt","./template":"8iGAh","./i18n":"3mM4M","./player":"bCaa0","./control":"3qXcr","./contextmenu":"hTnNz","./info":"bfwuE","./subtitle":"bWZ2U","./events":"9oLaG","./hotkey":"cKO4X","./layer":"kZD92","./loading":"c9b9e","./notice":"SxQeL","./mask":"aJ0dF","./icons":"jx1Wu","./setting":"hdF39","./storage":"bCcu0","./plugins":"1v13t","./ads":"jXgJj","./mobile":"eD5Ch","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"6U764":[function(e,t,r){t.exports='.art-video-player{z-index:20;width:100%;height:100%;zoom:1;color:#eee;text-align:left;direction:ltr;user-select:none;-webkit-tap-highlight-color:#0000;touch-action:manipulation;-ms-high-contrast-adjust:none;background-color:#000;outline:0;margin:0 auto;font-family:Roboto,Arial,Helvetica,sans-serif;font-size:14px;line-height:1.3;display:flex;position:relative}.art-video-player *{box-sizing:border-box;margin:0;padding:0}.art-video-player ::-webkit-scrollbar{width:5px;height:5px}.art-video-player ::-webkit-scrollbar-thumb{background-color:#666}.art-video-player ::-webkit-scrollbar-thumb:hover{background-color:#ccc}.art-video-player .art-icon{justify-content:center;align-items:center;line-height:1.5;display:inline-flex}.art-video-player .art-icon svg{fill:#fff}.art-video-player img{max-width:100%;vertical-align:top}@supports ((-webkit-backdrop-filter: initial) or (backdrop-filter: initial)){.art-video-player .art-backdrop-filter{-webkit-backdrop-filter:saturate(180%)blur(20px);backdrop-filter:saturate(180%)blur(20px);background-color:#000000b3!important}}.art-video-player .art-video{z-index:10;width:100%;height:100%;cursor:pointer;background-color:#000;position:absolute;inset:0}.art-video-player .art-poster{z-index:11;width:100%;height:100%;user-select:none;pointer-events:none;background-position:50%;background-repeat:no-repeat;background-size:cover;position:absolute;inset:0}.art-video-player .art-subtitle{z-index:20;width:100%;text-align:center;color:#fff;pointer-events:none;text-shadow:1px 0 1px #000,0 1px 1px #000,-1px 0 1px #000,0 -1px 1px #000,1px 1px 1px #000,-1px -1px 1px #000,1px -1px 1px #000,-1px 1px 1px #000;padding:0 20px;font-size:20px;display:none;position:absolute;bottom:10px}.art-video-player .art-subtitle p{word-break:break-all;height:fit-content;margin:5px 0 0;line-height:1.2}.art-video-player.art-subtitle-show .art-subtitle{display:block}.art-video-player.art-control-show .art-subtitle{bottom:50px}.art-video-player .art-danmuku{z-index:30;width:100%;height:100%;pointer-events:none;position:absolute;inset:0;overflow:hidden}.art-video-player .art-layers{z-index:40;width:100%;height:100%;pointer-events:none;display:none;position:absolute;inset:0;overflow:hidden}.art-video-player .art-layers .art-layer{pointer-events:auto}.art-video-player.art-layer-show .art-layers{display:block}.art-video-player .art-mask{z-index:50;width:100%;height:100%;pointer-events:none;justify-content:center;align-items:center;display:none;position:absolute;inset:0;overflow:hidden}.art-video-player .art-mask .art-state{width:60px;height:60px;opacity:.85;cursor:pointer;pointer-events:all;justify-content:center;align-items:center;display:flex;position:absolute;bottom:65px;right:30px}.art-video-player.art-mask-show .art-mask{display:flex}.art-video-player.art-mobile .art-state{position:static}.art-video-player .art-loading{z-index:70;width:100%;height:100%;pointer-events:none;justify-content:center;align-items:center;display:none;position:absolute;inset:0}.art-video-player.art-loading-show .art-loading{display:flex}.art-video-player .art-bottom{z-index:60;height:100px;opacity:0;visibility:hidden;pointer-events:none;background-image:linear-gradient(#0000,#0006,#000);background-position:bottom;background-repeat:repeat-x;flex-direction:column;justify-content:space-between;padding:50px 10px 0;transition:all .2s ease-in-out;display:flex;position:absolute;bottom:0;left:0;right:0}.art-video-player .art-bottom .art-progress{z-index:0;pointer-events:auto;flex:1;position:relative}.art-video-player .art-bottom .art-progress .art-control-progress{height:4px;cursor:pointer;flex-direction:row;align-items:center;display:flex;position:relative}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner{height:50%;width:100%;background:#fff3;align-items:center;display:flex;position:relative}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-loaded{z-index:10;height:100%;width:0;background:#fff6;position:absolute;inset:0}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-played{z-index:20;height:100%;width:0;position:absolute;inset:0}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight{z-index:30;height:100%;pointer-events:none;position:absolute;inset:0}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight span{width:7px;height:100%;pointer-events:auto;background:#fff;display:inline-block;position:absolute;top:0;left:0}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator{visibility:hidden;z-index:40;border-radius:50%;justify-content:center;align-items:center;transition:transform .1s ease-in-out;position:absolute;transform:scale(.1)}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator .art-icon{width:100%;height:100%;pointer-events:none;user-select:none}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-tip{z-index:50;height:20px;color:#fff;text-align:center;white-space:nowrap;background:#000000b3;border-radius:3px;padding:0 5px;font-size:12px;font-weight:700;line-height:20px;display:none;position:absolute;top:-25px;left:0}.art-video-player .art-bottom .art-progress .art-control-thumbnails{pointer-events:none;background-color:#000000b3;display:none;position:absolute;bottom:8px;left:0}.art-video-player .art-bottom .art-progress .art-control-loop{width:100%;height:100%;pointer-events:none;display:none;position:absolute;inset:0}.art-video-player .art-bottom .art-progress .art-control-loop .art-loop-point{width:2px;height:8px;background:#ffffffbf;position:absolute;top:-2px;left:0}.art-video-player .art-bottom .art-controls{z-index:1;pointer-events:auto;height:45px;justify-content:space-between;align-items:center;display:flex;position:relative}.art-video-player .art-bottom .art-controls .art-controls-left,.art-video-player .art-bottom .art-controls .art-controls-right{display:flex}.art-video-player .art-bottom .art-controls .art-controls-right{justify-content:flex-end}.art-video-player .art-bottom .art-controls .art-control{opacity:.9;min-height:36px;min-width:36px;text-align:center;cursor:pointer;white-space:nowrap;justify-content:center;align-items:center;font-size:12px;line-height:1;display:flex}.art-video-player .art-bottom .art-controls .art-control .art-icon{float:left;height:36px;width:36px;justify-content:center;align-items:center;display:flex}.art-video-player .art-bottom .art-controls .art-control:hover{opacity:1}.art-video-player .art-bottom .art-controls .art-control-onlyText{padding:0 10px}.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel{float:left;width:0;height:100%;transition:margin .2s cubic-bezier(.4,0,1,1),width .2s cubic-bezier(.4,0,1,1);position:relative;overflow:hidden}.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel .art-volume-slider-handle{width:12px;height:12px;background:#fff;border-radius:12px;margin-top:-6px;position:absolute;top:50%;left:0}.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel .art-volume-slider-handle:before{background:#fff;left:-54px}.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel .art-volume-slider-handle:after{background:#fff3;left:6px}.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel .art-volume-slider-handle:before,.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel .art-volume-slider-handle:after{content:"";height:3px;width:60px;margin-top:-2px;display:block;position:absolute;top:50%}.art-video-player .art-bottom .art-controls .art-control-volume:hover .art-volume-panel{width:60px}.art-video-player .art-bottom .art-controls .art-control-quality{z-index:30;position:relative}.art-video-player .art-bottom .art-controls .art-control-quality .art-qualitys{width:100px;text-align:center;color:#fff;background:#000c;border-radius:3px;padding:5px 0;display:none;position:absolute;bottom:35px}.art-video-player .art-bottom .art-controls .art-control-quality .art-qualitys .art-quality-item{height:30px;text-overflow:ellipsis;white-space:nowrap;text-shadow:0 0 2px #00000080;line-height:30px;overflow:hidden}.art-video-player .art-bottom .art-controls .art-control-quality .art-qualitys .art-quality-item:hover{background-color:#ffffff1a}.art-video-player .art-bottom .art-controls .art-control-quality:hover .art-qualitys{display:block}.art-video-player .art-bottom:hover .art-progress .art-control-progress .art-control-progress-inner{height:100%}.art-video-player .art-bottom:hover .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator{visibility:visible;transform:scale(1)}.art-video-player.art-control-show .art-bottom,.art-video-player.art-hover .art-bottom{opacity:1;visibility:visible}.art-video-player.art-error .art-progress-indicator,.art-video-player.art-destroy .art-progress-indicator,.art-video-player.art-error .art-progress-tip,.art-video-player.art-destroy .art-progress-tip{display:none!important}.art-video-player.art-mobile .art-bottom{padding:50px 7px 0}.art-video-player.art-mobile .art-bottom .art-controls{height:40px}.art-video-player.art-mobile .art-bottom .art-progress-indicator{visibility:visible!important;transform:scale(1)!important}.art-video-player .art-notice{z-index:80;width:100%;pointer-events:none;padding:10px;font-size:14px;display:none;position:absolute;top:0;left:0}.art-video-player .art-notice .art-notice-inner{color:#fff;background-color:#0009;border-radius:3px;padding:5px 10px;display:inline-block}.art-video-player.art-notice-show .art-notice{display:flex}.art-video-player .art-contextmenus{z-index:120;min-width:200px;background-color:#000000e6;border-radius:3px;flex-direction:column;padding:5px 0;display:none;position:absolute;top:10px;left:10px}.art-video-player .art-contextmenus .art-contextmenu{cursor:pointer;color:#fff;text-overflow:ellipsis;white-space:nowrap;text-shadow:0 0 2px #00000080;border-bottom:1px solid #ffffff1a;padding:10px 15px;font-size:12px;display:block;overflow:hidden}.art-video-player .art-contextmenus .art-contextmenu a{color:#fff;text-decoration:none}.art-video-player .art-contextmenus .art-contextmenu span{padding:0 7px;display:inline-block}.art-video-player .art-contextmenus .art-contextmenu span:hover,.art-video-player .art-contextmenus .art-contextmenu span.art-current{color:#00c9ff}.art-video-player .art-contextmenus .art-contextmenu:hover{background-color:#ffffff1a}.art-video-player .art-contextmenus .art-contextmenu:last-child{border-bottom:0}.art-video-player.art-contextmenu-show .art-contextmenus{display:flex}.art-video-player .art-settings{z-index:90;height:auto;max-height:300px;background-color:#000000e6;border-radius:3px;font-size:13px;transition:all .2s;display:none;position:absolute;bottom:50px;right:10px;overflow:auto}.art-video-player .art-settings .art-setting-panel{display:none}.art-video-player .art-settings .art-setting-panel.art-current{display:block}.art-video-player .art-settings .art-setting-panel .art-setting-item{height:35px;cursor:pointer;color:#fffc;justify-content:space-between;align-items:center;padding:0 5px;line-height:1;display:flex;overflow:hidden}.art-video-player .art-settings .art-setting-panel .art-setting-item:hover,.art-video-player .art-settings .art-setting-panel .art-setting-item.art-current{color:#fff;background-color:#ffffff1a}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-icon{width:30px;height:30px;justify-content:center;align-items:center;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-icon-check{visibility:hidden;height:15px}.art-video-player .art-settings .art-setting-panel .art-setting-item.art-current .art-icon-check{visibility:visible}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-left{white-space:nowrap;align-items:center;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-left .art-setting-item-left-icon{height:24px;width:24px;justify-content:center;align-items:center;margin-right:10px;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right{align-items:center;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-item-right-tooltip{white-space:nowrap;color:#ffffff80;font-size:12px}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-item-right-icon{height:24px;width:24px;justify-content:center;align-items:center;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item-back{border-bottom:1px solid #ffffff1a}.art-video-player.art-setting-show .art-settings{display:block}.art-video-player.art-mobile .art-settings{max-height:200px}.art-video-player .art-info{z-index:100;width:350px;color:#fff;-webkit-font-smoothing:antialiased;background-color:#000000e6;flex-direction:column;padding:10px;font-family:Noto Sans CJK SC DemiLight,Roboto,Segoe UI,Tahoma,Arial,Helvetica,sans-serif;font-size:12px;display:none;position:absolute;top:10px;left:10px}.art-video-player .art-info .art-info-item{margin-bottom:5px;display:flex}.art-video-player .art-info .art-info-item .art-info-title{width:100px;text-align:right}.art-video-player .art-info .art-info-item .art-info-content{text-overflow:ellipsis;white-space:nowrap;flex:1;padding-left:5px;overflow:hidden}.art-video-player .art-info .art-info-item:last-child{margin-bottom:0}.art-video-player .art-info .art-info-close{cursor:pointer;position:absolute;top:5px;right:5px}.art-video-player.art-info-show .art-info{display:flex}.art-video-player.art-hide-cursor *{cursor:none!important}.art-video-player[data-aspect-ratio] video{box-sizing:content-box;object-fit:fill}.art-video-player.art-fullscreen-web{z-index:9999;width:100%;height:100%;position:fixed;inset:0}.art-fullscreen-rotate{z-index:9999;width:100%;height:100%;background-color:#000;position:fixed;inset:0}.art-video-player .art-mini-header{z-index:110;height:35px;color:#fff;opacity:0;visibility:hidden;background-color:#00000080;justify-content:space-between;align-items:center;line-height:35px;transition:all .2s ease-in-out;display:none;position:absolute;top:0;left:0;right:0}.art-video-player .art-mini-header .art-mini-title{text-overflow:ellipsis;white-space:nowrap;cursor:move;flex:1;padding:0 10px;overflow:hidden}.art-video-player .art-mini-header .art-mini-close{width:35px;text-align:center;cursor:pointer;font-size:22px}.art-video-player.art-is-dragging{opacity:.7}.art-video-player.art-mini{z-index:9999;width:400px;height:225px;position:fixed;box-shadow:0 2px 5px #00000029,0 3px 6px #0003}.art-video-player.art-mini .art-mini-header{user-select:none;display:flex}.art-video-player.art-mini.art-hover .art-mini-header{opacity:1;visibility:visible}.art-video-player.art-mini .art-mask .art-state{position:static}.art-video-player.art-mini .art-contextmenu,.art-video-player.art-mini .art-bottom,.art-video-player.art-mini .art-danmu,.art-video-player.art-mini .art-info,.art-video-player.art-mini .art-layers,.art-video-player.art-mini .art-notice,.art-video-player.art-mini .art-setting,.art-video-player.art-mini .art-subtitle{display:none!important}.art-auto-size{justify-content:center;align-items:center;display:flex}.art-video-player[data-flip=horizontal] .art-video{transform:scaleX(-1)}.art-video-player[data-flip=vertical] .art-video{transform:scaleY(-1)}.art-video-player .art-layer-miniProgressBar{height:2px;background-color:var(--theme);display:block;position:absolute;bottom:0;left:0;right:0}.art-video-player .art-layer-lock{height:34px;width:34px;color:#fff;background-color:#00000080;border-radius:50%;justify-content:center;align-items:center;display:none;position:absolute;top:calc(50% - 17px);left:15px}.art-video-player.art-lock .art-bottom{display:none!important}.art-video-player.art-lock .art-subtitle{bottom:10px!important}.art-video-player.art-lock .art-layer-miniProgressBar{display:block!important}.art-video-player.art-control-show .art-layer-miniProgressBar{display:none}.art-video-player.art-control-show .art-layer-lock{display:flex}.art-video-player .art-control-selector{position:relative}.art-video-player .art-control-selector .art-selector-list{min-width:100px;max-width:200px;max-height:200px;text-align:center;color:#fff;background-color:#000c;border-radius:3px;padding:5px 0;display:none;position:absolute;bottom:35px;overflow:auto}.art-video-player .art-control-selector .art-selector-list .art-selector-item{height:30px;text-overflow:ellipsis;white-space:nowrap;text-shadow:0 0 2px #00000080;padding:0 5px;line-height:30px;overflow:hidden}.art-video-player .art-control-selector .art-selector-list .art-selector-item:hover{background-color:#ffffff1a}.art-video-player .art-control-selector .art-selector-list .art-selector-item:hover,.art-video-player .art-control-selector .art-selector-list .art-selector-item.art-current{color:#00c9ff}.art-video-player .art-control-selector:hover .art-selector-list{display:block}[class*=hint--]{font-style:normal;display:inline-block;position:relative}[class*=hint--]:before,[class*=hint--]:after{visibility:hidden;opacity:0;z-index:1000000;pointer-events:none;transition:all .3s;position:absolute;transform:translate(0,0)}[class*=hint--]:hover:before,[class*=hint--]:hover:after{visibility:visible;opacity:1;transition-delay:.1s}[class*=hint--]:before{content:"";z-index:1000000;background:0 0;border:6px solid #0000;position:absolute}[class*=hint--]:after{color:#fff;white-space:nowrap;background:#000;padding:8px 10px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:12px;line-height:12px}[class*=hint--][aria-label]:after{content:attr(aria-label)}[class*=hint--][data-hint]:after{content:attr(data-hint)}[aria-label=""]:before,[aria-label=""]:after,[data-hint=""]:before,[data-hint=""]:after{display:none!important}.hint--top-left:before,.hint--top-right:before,.hint--top:before{border-top-color:#000}.hint--bottom-left:before,.hint--bottom-right:before,.hint--bottom:before{border-bottom-color:#000}.hint--left:before{border-left-color:#000}.hint--right:before{border-right-color:#000}.hint--top:before{margin-bottom:-11px}.hint--top:before,.hint--top:after{bottom:100%;left:50%}.hint--top:before{left:calc(50% - 6px)}.hint--top:after{transform:translate(-50%)}.hint--top:hover:before{transform:translateY(-8px)}.hint--top:hover:after{transform:translate(-50%)translateY(-8px)}.hint--bottom:before{margin-top:-11px}.hint--bottom:before,.hint--bottom:after{top:100%;left:50%}.hint--bottom:before{left:calc(50% - 6px)}.hint--bottom:after{transform:translate(-50%)}.hint--bottom:hover:before{transform:translateY(8px)}.hint--bottom:hover:after{transform:translate(-50%)translateY(8px)}.hint--right:before{margin-bottom:-6px;margin-left:-11px}.hint--right:after{margin-bottom:-14px}.hint--right:before,.hint--right:after{bottom:50%;left:100%}.hint--right:hover:before,.hint--right:hover:after{transform:translate(8px)}.hint--left:before{margin-bottom:-6px;margin-right:-11px}.hint--left:after{margin-bottom:-14px}.hint--left:before,.hint--left:after{bottom:50%;right:100%}.hint--left:hover:before,.hint--left:hover:after{transform:translate(-8px)}.hint--top-left:before{margin-bottom:-11px}.hint--top-left:before,.hint--top-left:after{bottom:100%;left:50%}.hint--top-left:before{left:calc(50% - 6px)}.hint--top-left:after{margin-left:12px;transform:translate(-100%)}.hint--top-left:hover:before{transform:translateY(-8px)}.hint--top-left:hover:after{transform:translate(-100%)translateY(-8px)}.hint--top-right:before{margin-bottom:-11px}.hint--top-right:before,.hint--top-right:after{bottom:100%;left:50%}.hint--top-right:before{left:calc(50% - 6px)}.hint--top-right:after{margin-left:-12px;transform:translate(0)}.hint--top-right:hover:before,.hint--top-right:hover:after{transform:translateY(-8px)}.hint--bottom-left:before{margin-top:-11px}.hint--bottom-left:before,.hint--bottom-left:after{top:100%;left:50%}.hint--bottom-left:before{left:calc(50% - 6px)}.hint--bottom-left:after{margin-left:12px;transform:translate(-100%)}.hint--bottom-left:hover:before{transform:translateY(8px)}.hint--bottom-left:hover:after{transform:translate(-100%)translateY(8px)}.hint--bottom-right:before{margin-top:-11px}.hint--bottom-right:before,.hint--bottom-right:after{top:100%;left:50%}.hint--bottom-right:before{left:calc(50% - 6px)}.hint--bottom-right:after{margin-left:-12px;transform:translate(0)}.hint--bottom-right:hover:before,.hint--bottom-right:hover:after{transform:translateY(8px)}.hint--small:after,.hint--medium:after,.hint--large:after{white-space:normal;word-wrap:break-word;line-height:1.4em}.hint--small:after{width:80px}.hint--medium:after{width:150px}.hint--large:after{width:300px}[class*=hint--]:after{text-shadow:0 -1px #000;box-shadow:4px 4px 8px #0000004d}.hint--error:after{text-shadow:0 -1px #592726;background-color:#b34e4d}.hint--error.hint--top-left:before,.hint--error.hint--top-right:before,.hint--error.hint--top:before{border-top-color:#b34e4d}.hint--error.hint--bottom-left:before,.hint--error.hint--bottom-right:before,.hint--error.hint--bottom:before{border-bottom-color:#b34e4d}.hint--error.hint--left:before{border-left-color:#b34e4d}.hint--error.hint--right:before{border-right-color:#b34e4d}.hint--warning:after{text-shadow:0 -1px #6c5328;background-color:#c09854}.hint--warning.hint--top-left:before,.hint--warning.hint--top-right:before,.hint--warning.hint--top:before{border-top-color:#c09854}.hint--warning.hint--bottom-left:before,.hint--warning.hint--bottom-right:before,.hint--warning.hint--bottom:before{border-bottom-color:#c09854}.hint--warning.hint--left:before{border-left-color:#c09854}.hint--warning.hint--right:before{border-right-color:#c09854}.hint--info:after{text-shadow:0 -1px #1a3c4d;background-color:#3986ac}.hint--info.hint--top-left:before,.hint--info.hint--top-right:before,.hint--info.hint--top:before{border-top-color:#3986ac}.hint--info.hint--bottom-left:before,.hint--info.hint--bottom-right:before,.hint--info.hint--bottom:before{border-bottom-color:#3986ac}.hint--info.hint--left:before{border-left-color:#3986ac}.hint--info.hint--right:before{border-right-color:#3986ac}.hint--success:after{text-shadow:0 -1px #1a321a;background-color:#458746}.hint--success.hint--top-left:before,.hint--success.hint--top-right:before,.hint--success.hint--top:before{border-top-color:#458746}.hint--success.hint--bottom-left:before,.hint--success.hint--bottom-right:before,.hint--success.hint--bottom:before{border-bottom-color:#458746}.hint--success.hint--left:before{border-left-color:#458746}.hint--success.hint--right:before{border-right-color:#458746}.hint--always:after,.hint--always:before{opacity:1;visibility:visible}.hint--always.hint--top:before{transform:translateY(-8px)}.hint--always.hint--top:after{transform:translate(-50%)translateY(-8px)}.hint--always.hint--top-left:before{transform:translateY(-8px)}.hint--always.hint--top-left:after{transform:translate(-100%)translateY(-8px)}.hint--always.hint--top-right:before,.hint--always.hint--top-right:after{transform:translateY(-8px)}.hint--always.hint--bottom:before{transform:translateY(8px)}.hint--always.hint--bottom:after{transform:translate(-50%)translateY(8px)}.hint--always.hint--bottom-left:before{transform:translateY(8px)}.hint--always.hint--bottom-left:after{transform:translate(-100%)translateY(8px)}.hint--always.hint--bottom-right:before,.hint--always.hint--bottom-right:after{transform:translateY(8px)}.hint--always.hint--left:before,.hint--always.hint--left:after{transform:translate(-8px)}.hint--always.hint--right:before,.hint--always.hint--right:after{transform:translate(8px)}.hint--rounded:after{border-radius:4px}.hint--no-animate:before,.hint--no-animate:after{transition-duration:0s}.hint--bounce:before,.hint--bounce:after{-webkit-transition:opacity .3s,visibility .3s,-webkit-transform .3s cubic-bezier(.71,1.7,.77,1.24);-moz-transition:opacity .3s,visibility .3s,-moz-transform .3s cubic-bezier(.71,1.7,.77,1.24);transition:opacity .3s,visibility .3s,transform .3s cubic-bezier(.71,1.7,.77,1.24)}.hint--no-shadow:before,.hint--no-shadow:after{text-shadow:initial;box-shadow:initial}.hint--no-arrow:before{display:none}'},{}],"2A2W5":[function(e,t,r){t.exports=function(){"use strict";function e(t){return(e="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})(t)}var t=Object.prototype.toString,r=function(r){if(void 0===r)return"undefined";if(null===r)return"null";var i=e(r);if("boolean"===i)return"boolean";if("string"===i)return"string";if("number"===i)return"number";if("symbol"===i)return"symbol";if("function"===i)return function(e){return"GeneratorFunction"===o(e)}(r)?"generatorfunction":"function";if(function(e){return Array.isArray?Array.isArray(e):e instanceof Array}(r))return"array";if(function(e){return!(!e.constructor||"function"!=typeof e.constructor.isBuffer)&&e.constructor.isBuffer(e)}(r))return"buffer";if(function(e){try{if("number"==typeof e.length&&"function"==typeof e.callee)return!0}catch(e){if(-1!==e.message.indexOf("callee"))return!0}return!1}(r))return"arguments";if(function(e){return e instanceof Date||"function"==typeof e.toDateString&&"function"==typeof e.getDate&&"function"==typeof e.setDate}(r))return"date";if(function(e){return e instanceof Error||"string"==typeof e.message&&e.constructor&&"number"==typeof e.constructor.stackTraceLimit}(r))return"error";if(function(e){return e instanceof RegExp||"string"==typeof e.flags&&"boolean"==typeof e.ignoreCase&&"boolean"==typeof e.multiline&&"boolean"==typeof e.global}(r))return"regexp";switch(o(r)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(e){return"function"==typeof e.throw&&"function"==typeof e.return&&"function"==typeof e.next}(r))return"generator";switch(i=t.call(r)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return i.slice(8,-1).toLowerCase().replace(/\s/g,"")};function o(e){return e.constructor?e.constructor.name:null}function i(e,t){var o=2n)),o.export(r,"queryAll",(()=>a)),o.export(r,"addClass",(()=>s)),o.export(r,"removeClass",(()=>l)),o.export(r,"hasClass",(()=>c)),o.export(r,"append",(()=>p)),o.export(r,"remove",(()=>u)),o.export(r,"setStyle",(()=>d)),o.export(r,"setStyles",(()=>f)),o.export(r,"getStyle",(()=>h)),o.export(r,"sublings",(()=>m)),o.export(r,"inverseClass",(()=>g)),o.export(r,"tooltip",(()=>y)),o.export(r,"isInViewport",(()=>v)),o.export(r,"includeFromEvent",(()=>b)),o.export(r,"replaceElement",(()=>x));var i=e("./compatibility");function n(e,t=document){return t.querySelector(e)}function a(e,t=document){return Array.from(t.querySelectorAll(e))}function s(e,t){return e.classList.add(t)}function l(e,t){return e.classList.remove(t)}function c(e,t){return e.classList.contains(t)}function p(e,t){return t instanceof Element?e.appendChild(t):e.insertAdjacentHTML("beforeend",String(t)),e.lastElementChild||e.lastChild}function u(e){return e.parentNode.removeChild(e)}function d(e,t,r){return e.style[t]=r,e}function f(e,t){return Object.keys(t).forEach((r=>{d(e,r,t[r])})),e}function h(e,t,r=!0){const o=window.getComputedStyle(e,null).getPropertyValue(t);return r?parseFloat(o):o}function m(e){return Array.from(e.parentElement.children).filter((t=>t!==e))}function g(e,t){m(e).forEach((e=>l(e,t))),s(e,t)}function y(e,t,r="top"){i.isMobile||(e.setAttribute("aria-label",t),s(e,"hint--rounded"),s(e,`hint--${r}`))}function v(e,t=0){const r=e.getBoundingClientRect(),o=window.innerHeight||document.documentElement.clientHeight,i=window.innerWidth||document.documentElement.clientWidth,n=r.top-t<=o&&r.top+r.height+t>=0,a=r.left-t<=i+t&&r.left+r.width+t>=0;return n&&a}function b(e,t){return e.composedPath&&e.composedPath().indexOf(t)>-1}function x(e,t){return t.parentNode.replaceChild(e,t),e}},{"./compatibility":"e9wVp","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],e9wVp:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"userAgent",(()=>i)),o.export(r,"isMobile",(()=>n)),o.export(r,"isSafari",(()=>a)),o.export(r,"isWechat",(()=>s)),o.export(r,"isIE",(()=>l));const i="undefined"!=typeof window?window.navigator.userAgent:"",n=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(i),a=/^((?!chrome|android).)*safari/i.test(i),s=/MicroMessenger/i.test(i),l=/MSIE|Trident/i.test(i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],kNZvP:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"ArtPlayerError",(()=>i)),o.export(r,"errorHandle",(()=>n));class i extends Error{constructor(e,t){super(e),"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,t||this.constructor),this.name="ArtPlayerError"}}function n(e,t){if(!e)throw new i(t);return e}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],eZUgm:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e){return"WEBVTT \r\n\r\n".concat((t=e,t.replace(/(\d\d:\d\d:\d\d)[,.](\d+)/g,((e,t,r)=>{let o=r.slice(0,3);return 1===r.length&&(o=r+"00"),2===r.length&&(o=r+"0"),`${t},${o}`}))).replace(/\{\\([ibu])\}/g,"").replace(/\{\\([ibu])1\}/g,"<$1>").replace(/\{([ibu])\}/g,"<$1>").replace(/\{\/([ibu])\}/g,"").replace(/(\d\d:\d\d:\d\d),(\d\d\d)/g,"$1.$2").replace(/{[\s\S]*?}/g,"").concat("\r\n\r\n"));var t}function n(e){return URL.createObjectURL(new Blob([e],{type:"text/vtt"}))}function a(e){const t=new RegExp("Dialogue:\\s\\d,(\\d+:\\d\\d:\\d\\d.\\d\\d),(\\d+:\\d\\d:\\d\\d.\\d\\d),([^,]*),([^,]*),(?:[^,]*,){4}([\\s\\S]*)$","i");function r(e=""){return e.split(/[:.]/).map(((e,t,r)=>{if(t===r.length-1){if(1===e.length)return`.${e}00`;if(2===e.length)return`.${e}0`}else if(1===e.length)return(0===t?"0":":0")+e;return 0===t?e:t===r.length-1?`.${e}`:`:${e}`})).join("")}return`WEBVTT\n\n${e.split(/\r?\n/).map((e=>{const o=e.match(t);return o?{start:r(o[1].trim()),end:r(o[2].trim()),text:o[5].replace(/{[\s\S]*?}/g,"").replace(/(\\N)/g,"\n").trim().split(/\r?\n/).map((e=>e.trim())).join("\n")}:null})).filter((e=>e)).map(((e,t)=>e?`${t+1}\n${e.start} --\x3e ${e.end}\n${e.text}`:"")).filter((e=>e.trim())).join("\n\n")}`}o.defineInteropFlag(r),o.export(r,"srtToVtt",(()=>i)),o.export(r,"vttToBlob",(()=>n)),o.export(r,"assToVtt",(()=>a))},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],dYeSt:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e){return e.includes("?")?i(e.split("?")[0]):e.includes("#")?i(e.split("#")[0]):e.trim().toLowerCase().split(".").pop()}function n(e,t){const r=document.createElement("a");r.style.display="none",r.href=e,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r)}o.defineInteropFlag(r),o.export(r,"getExt",(()=>i)),o.export(r,"download",(()=>n))},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"5ynPA":[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"def",(()=>i)),o.export(r,"has",(()=>a)),o.export(r,"get",(()=>s)),o.export(r,"mergeDeep",(()=>l));const i=Object.defineProperty,{hasOwnProperty:n}=Object.prototype;function a(e,t){return n.call(e,t)}function s(e,t){return Object.getOwnPropertyDescriptor(e,t)}function l(...e){const t=e=>e&&"object"==typeof e&&!Array.isArray(e);return e.reduce(((e,r)=>(Object.keys(r).forEach((o=>{const i=e[o],n=r[o];Array.isArray(i)&&Array.isArray(n)?e[o]=i.concat(...n):!t(i)||!t(n)||n instanceof Element?e[o]=n:e[o]=l(i,n)})),e)),{})}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],kXYeR:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e=0){return new Promise((t=>setTimeout(t,e)))}function n(e,t,r){let o;function i(...i){clearTimeout(o),o=setTimeout((function(){o=null,e.apply(r,i)}),t)}return i.clearTimeout=function(){clearTimeout(o)},i}function a(e,t){let r,o,i=!1;return function n(...a){if(i)return r=a,void(o=this);i=!0,e.apply(this,a),setTimeout((()=>{i=!1,r&&(n.apply(o,r),r=null,o=null)}),t)}}o.defineInteropFlag(r),o.export(r,"sleep",(()=>i)),o.export(r,"debounce",(()=>n)),o.export(r,"throttle",(()=>a))},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],anS7L:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e,t,r){return Math.max(Math.min(e,Math.max(t,r)),Math.min(t,r))}function n(e){const t=Math.floor(e/3600),r=Math.floor((e-3600*t)/60),o=Math.floor(e-3600*t-60*r);return(t>0?[t,r,o]:[r,o]).map((e=>e<10?`0${e}`:String(e))).join(":")}function a(e){return e.replace(/[&<>'"]/g,(e=>({"&":"&","<":"<",">":">","'":"'",'"':"""}[e]||e)))}o.defineInteropFlag(r),o.export(r,"clamp",(()=>i)),o.export(r,"secondToTime",(()=>n)),o.export(r,"escape",(()=>a))},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"3izFE":[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"ComponentOption",(()=>u));var i=e("../utils");const n="boolean",a="string",s="number",l="object",c="function";function p(e,t,r){return i.errorHandle(t===a||e instanceof Element,`${r.join(".")} require '${a}' or 'Element' type`)}const u={html:p,disable:`?${n}`,name:`?${a}`,index:`?${s}`,style:`?${l}`,click:`?${c}`,mounted:`?${c}`,tooltip:`?${a}`,width:`?${s}`,selector:"?array",onSelect:`?${c}`};r.default={container:p,url:a,poster:a,title:a,type:a,theme:a,lang:a,volume:s,isLive:n,muted:n,autoplay:n,autoSize:n,autoMini:n,loop:n,flip:n,playbackRate:n,aspectRatio:n,screenshot:n,setting:n,hotkey:n,pip:n,mutex:n,backdrop:n,fullscreen:n,fullscreenWeb:n,subtitleOffset:n,miniProgressBar:n,useSSR:n,playsInline:n,lock:n,fastForward:n,autoPlayback:n,autoOrientation:n,ads:[{url:a}],plugins:[c],whitelist:[`${a}|${c}|regexp`],layers:[u],contextmenu:[u],settings:[u],controls:[{...u,position:(e,t,r)=>{const o=["top","left","right"];return i.errorHandle(o.includes(e),`${r.join(".")} only accept ${o.toString()} as parameters`)}}],quality:[{default:`?${n}`,html:a,url:a}],highlight:[{time:s,text:a}],thumbnails:{url:a,number:s,column:s},subtitle:{url:a,type:a,style:l,encoding:a},moreVideoAttr:l,icons:l,customType:l}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],ej4fZ:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default={propertys:["audioTracks","autoplay","buffered","controller","controls","crossOrigin","currentSrc","currentTime","defaultMuted","defaultPlaybackRate","duration","ended","error","loop","mediaGroup","muted","networkState","paused","playbackRate","played","preload","readyState","seekable","seeking","src","startDate","textTracks","videoTracks","volume"],methods:["addTextTrack","canPlayType","load","play","pause"],events:["abort","canplay","canplaythrough","durationchange","emptied","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],prototypes:["width","height","videoWidth","videoHeight","poster","webkitDecodedFrameCount","webkitDroppedFrameCount","playsInline","webkitSupportsFullscreen","webkitDisplayingFullscreen","onenterpictureinpicture","onleavepictureinpicture","disablePictureInPicture","cancelVideoFrameCallback","requestVideoFrameCallback","getVideoPlaybackQuality","requestPictureInPicture","webkitEnterFullScreen","webkitEnterFullscreen","webkitExitFullScreen","webkitExitFullscreen"]}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"7CkCt":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("./utils");r.default=class{constructor(e){this.art=e}get state(){const{option:e,constructor:{kindOf:t}}=this.art;return!o.isMobile||e.whitelist.some((e=>{switch(t(e)){case"string":return"*"===e||o.userAgent.indexOf(e)>-1;case"function":return e(o.userAgent);case"regexp":return e.test(o.userAgent);default:return!1}}))}}},{"./utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"8iGAh":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("./utils");class i{constructor(e){this.art=e;const{option:t,constructor:r,whitelist:i}=e;t.container instanceof Element?this.$container=t.container:(this.$container=o.query(t.container),o.errorHandle(this.$container,`No container element found by ${t.container}`));const n=this.$container.tagName.toLowerCase();o.errorHandle("div"===n,`Unsupported container element type, only support 'div' but got '${n}'`),o.errorHandle(r.instances.every((e=>e.template.$container!==this.$container)),"Cannot mount multiple instances on the same dom element"),this.query=this.query.bind(this),this.$container.dataset.artId=e.id,this.$original=this.$container.cloneNode(!0),i.state?this.desktop():this.mobile()}static get html(){return'
Player version:
4.3.18
Video url:
Video volume:
Video time:
Video duration:
Video resolution:
x
[x]
×
'}query(e){return o.query(e,this.$container)}desktop(){const{option:e}=this.art;e.useSSR||(this.$container.innerHTML=i.html),this.$player=this.query(".art-video-player"),this.$video=this.query(".art-video"),this.$poster=this.query(".art-poster"),this.$subtitle=this.query(".art-subtitle"),this.$danmuku=this.query(".art-danmuku"),this.$bottom=this.query(".art-bottom"),this.$progress=this.query(".art-progress"),this.$controls=this.query(".art-controls"),this.$controlsLeft=this.query(".art-controls-left"),this.$controlsRight=this.query(".art-controls-right"),this.$layer=this.query(".art-layers"),this.$loading=this.query(".art-loading"),this.$notice=this.query(".art-notice"),this.$noticeInner=this.query(".art-notice-inner"),this.$mask=this.query(".art-mask"),this.$state=this.query(".art-state"),this.$setting=this.query(".art-settings"),this.$info=this.query(".art-info"),this.$infoPanel=this.query(".art-info-panel"),this.$infoClose=this.query(".art-info-close"),this.$miniHeader=this.query(".art-mini-header"),this.$miniTitle=this.query(".art-mini-title"),this.$miniClose=this.query(".art-mini-close"),this.$contextmenu=this.query(".art-contextmenus"),e.backdrop&&(o.addClass(this.$setting,"art-backdrop-filter"),o.addClass(this.$contextmenu,"art-backdrop-filter"),o.addClass(this.$info,"art-backdrop-filter")),o.isMobile&&o.addClass(this.$player,"art-mobile")}mobile(){this.$container.innerHTML='
',this.$player=this.query(".art-video-player"),this.$video=this.query(".art-video")}destroy(e){e?o.replaceElement(this.$original,this.$container):o.addClass(this.$player,"art-destroy")}}r.default=i},{"./utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"3mM4M":[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../utils"),n=e("./zh-cn.json"),a=o.interopDefault(n),s=e("./zh-tw.json"),l=o.interopDefault(s),c=e("./pl.json"),p=o.interopDefault(c),u=e("./cs.json"),d=o.interopDefault(u);r.default=class{constructor(e){this.art=e,this.languages={"zh-cn":a.default,"zh-tw":l.default,pl:p.default,cs:d.default},this.init()}init(){const e=this.art.option.lang.toLowerCase();this.language=this.languages[e]||{}}get(e){return this.language[e]||e}update(e){this.languages=i.mergeDeep(this.languages,e),this.init()}}},{"../utils":"5yYFo","./zh-cn.json":"1f1tr","./zh-tw.json":"3hy9S","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY","./pl.json":"aFOXc","./cs.json":"aNfUP"}],"1f1tr":[function(e,t,r){t.exports=JSON.parse('{"Video Info":"统计信息","Close":"关闭","Video Load Failed":"加载失败","Volume":"音量","Play":"播放","Pause":"暂停","Rate":"速度","Mute":"静音","Video Flip":"画面翻转","Horizontal":"水平","Vertical":"垂直","Reconnect":"重新连接","Hide Subtitle":"隐藏字幕","Show Subtitle":"显示字幕","Show Setting":"显示设置","Hide Setting":"隐藏设置","Screenshot":"截图","Play Speed":"播放速度","Aspect Ratio":"画面比例","Default":"默认","Normal":"正常","Open":"打开","Switch Video":"切换","Switch Subtitle":"切换字幕","Fullscreen":"全屏","Exit Fullscreen":"退出全屏","Web Fullscreen":"网页全屏","Exit Web Fullscreen":"退出网页全屏","Mini Player":"迷你播放器","PIP Mode":"开启画中画","Exit PIP Mode":"退出画中画","PIP Not Supported":"不支持画中画","Fullscreen Not Supported":"不支持全屏","Subtitle Offset":"字幕偏移","Auto playback at":"已为您定位至"}')},{}],"3hy9S":[function(e,t,r){t.exports=JSON.parse('{"Video Info":"統計訊息","Close":"關閉","Video Load Failed":"載入失敗","Volume":"音量","Play":"播放","Pause":"暫停","Rate":"速度","Mute":"靜音","Video Flip":"畫面翻轉","Horizontal":"水平","Vertical":"垂直","Reconnect":"重新連接","Hide Subtitle":"隱藏字幕","Show Subtitle":"顯示字幕","Show Setting":"顯示设置","Hide Setting":"隱藏设置","Screenshot":"截圖","Play Speed":"播放速度","Aspect Ratio":"畫面比例","Default":"默認","Normal":"正常","Open":"打開","Switch Video":"切換","Switch Subtitle":"切換字幕","Fullscreen":"全屏","Exit Fullscreen":"退出全屏","Web Fullscreen":"網頁全屏","Exit Web Fullscreen":"退出網頁全屏","Mini Player":"迷你播放器","PIP Mode":"開啟畫中畫","Exit PIP Mode":"退出畫中畫","PIP Not Supported":"不支持畫中畫","Fullscreen Not Supported":"不支持全屏","Subtitle Offset":"字幕偏移","Auto playback at":"已為您定位至"}')},{}],aFOXc:[function(e,t,r){t.exports=JSON.parse('{"Video Info":"Informacje o wideo","Close":"Zamknij","Video Load Failed":"Błąd ładowania wideo","Volume":"Głośność","Play":"Odtwórz","Pause":"Wstrzymaj","Rate":"Oceń","Mute":"Wycisz","Video Flip":"Rotacja wideo","Horizontal":"Pozioma","Vertical":"Pionowa","Reconnect":"Połącz ponownie","Hide Subtitle":"Ukryj napisy","Show Subtitle":"Pokaż napisy","Show Setting":"Pokaż ustawienia","Hide Setting":"Ukryj ustawienia","Screenshot":"Zrzut ekranu","Play Speed":"Prędkość odtwarzania","Aspect Ratio":"Współczynnik proporcji","Default":"Domyślny","Normal":"Normalny","Open":"Otwórz","Switch Video":"Przełącz wideo","Switch Subtitle":"Przełącz napisy","Fullscreen":"Pełny ekran","Exit Fullscreen":"Zamknij pełny ekran","Web Fullscreen":"Tryb pełnej strony","Exit Web Fullscreen":"Zamknij tryb pełnej strony","Mini Player":"Miniodtwarzacz","PIP Mode":"Tryb PiP","Exit PIP Mode":"Zamknij tryb PiP","PIP Not Supported":"Tryb PiP nieobsługiwany","Fullscreen Not Supported":"Pełny ekran nieobsługiwany","Subtitle Offset":"Przesunięcie napisów","Auto playback at":"Automatyczne odtwarzanie za"}')},{}],aNfUP:[function(e,t,r){t.exports=JSON.parse('{"Video Info":"Info o videu","Close":"Zavřít","Video Load Failed":"Nahrání videa selhalo","Volume":"Hlasitost","Play":"Přehrát","Pause":"Pozastavit","Rate":"Hodnocení","Mute":"Ztlumit","Video Flip":"Otočit video","Horizontal":"Horizontálně","Vertical":"Vertikálně","Reconnect":"Opětovné připojení","Hide Subtitle":"Skrýt titulky","Show Subtitle":"Ukázat titulky","Show Setting":"Zobrazit nastavení","Hide Setting":"Skrýt nastavení","Screenshot":"Snímek obrazovky","Play Speed":"Rychlost přehrávání","Aspect Ratio":"Poměr stran","Default":"Výchozí","Normal":"Normální","Open":"Otevřít","Switch Video":"Přepnout video","Switch Subtitle":"Přepnout titulky","Fullscreen":"Celá obrazovka","Exit Fullscreen":"Opustit režim celé obrazovky","Web Fullscreen":"Celá stránka","Exit Web Fullscreen":"Zavřít režim celé stránky","Mini Player":"Mini přehrávač","PIP Mode":"Režim PIP","Exit PIP Mode":"Opustit režim PIP","PIP Not Supported":"Režim PIP není podporován","Fullscreen Not Supported":"Režim celé obrazovky není podporován","Subtitle Offset":"Posun titulků","Auto playback at":"Automatické přehrávání za"}')},{}],bCaa0:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./urlMix"),n=o.interopDefault(i),a=e("./attrMix"),s=o.interopDefault(a),l=e("./playMix"),c=o.interopDefault(l),p=e("./pauseMix"),u=o.interopDefault(p),d=e("./toggleMix"),f=o.interopDefault(d),h=e("./seekMix"),m=o.interopDefault(h),g=e("./volumeMix"),y=o.interopDefault(g),v=e("./currentTimeMix"),b=o.interopDefault(v),x=e("./durationMix"),w=o.interopDefault(x),j=e("./switchMix"),k=o.interopDefault(j),M=e("./playbackRateMix"),S=o.interopDefault(M),I=e("./aspectRatioMix"),F=o.interopDefault(I),$=e("./screenshotMix"),T=o.interopDefault($),E=e("./fullscreenMix"),C=o.interopDefault(E),z=e("./fullscreenWebMix"),Y=o.interopDefault(z),D=e("./pipMix"),P=o.interopDefault(D),R=e("./loadedMix"),A=o.interopDefault(R),O=e("./playedMix"),L=o.interopDefault(O),H=e("./playingMix"),_=o.interopDefault(H),N=e("./autoSizeMix"),J=o.interopDefault(N),V=e("./rectMix"),q=o.interopDefault(V),W=e("./flipMix"),B=o.interopDefault(W),U=e("./miniMix"),Z=o.interopDefault(U),X=e("./loopMix"),G=o.interopDefault(X),Q=e("./posterMix"),K=o.interopDefault(Q),ee=e("./autoHeightMix"),te=o.interopDefault(ee),re=e("./themeMix"),oe=o.interopDefault(re),ie=e("./titleMix"),ne=o.interopDefault(ie),ae=e("./normalSizeMix"),se=o.interopDefault(ae),le=e("./subtitleOffsetMix"),ce=o.interopDefault(le),pe=e("./optionInit"),ue=o.interopDefault(pe),de=e("./eventInit"),fe=o.interopDefault(de);r.default=class{constructor(e){n.default(e),s.default(e),c.default(e),u.default(e),f.default(e),m.default(e),y.default(e),b.default(e),w.default(e),k.default(e),S.default(e),F.default(e),T.default(e),C.default(e),Y.default(e),P.default(e),A.default(e),L.default(e),_.default(e),J.default(e),q.default(e),B.default(e),Z.default(e),G.default(e),K.default(e),te.default(e),oe.default(e),ne.default(e),se.default(e),ce.default(e),fe.default(e),ue.default(e)}}},{"./urlMix":"9mMBB","./attrMix":"ghisN","./playMix":"l5N6R","./pauseMix":"fVR5i","./toggleMix":"cZiBO","./seekMix":"bsO1Q","./volumeMix":"ivSmC","./currentTimeMix":"8LbXb","./durationMix":"f7tNT","./switchMix":"ejQWi","./playbackRateMix":"kNcxE","./aspectRatioMix":"8v5yt","./screenshotMix":"eLUEv","./fullscreenMix":"ifvhR","./fullscreenWebMix":"dsFtO","./pipMix":"gYMLD","./loadedMix":"fMSRd","./playedMix":"iRHNE","./playingMix":"dQ40z","./autoSizeMix":"iF844","./rectMix":"1hAm8","./flipMix":"dhi4g","./miniMix":"eQPx9","./loopMix":"gQaVE","./posterMix":"7n9Pt","./autoHeightMix":"8Az1F","./themeMix":"kXlsI","./titleMix":"b8f4Q","./normalSizeMix":"4fP62","./subtitleOffsetMix":"gdNfa","./optionInit":"luxZi","./eventInit":"b25aJ","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"9mMBB":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{option:t,template:{$video:r}}=e;o.def(e,"url",{get:()=>r.currentSrc,async set(i){const n=t.type||o.getExt(i),a=t.customType[n];n&&a?(await o.sleep(),e.loading.show=!0,a.call(e,r,i,e)):(e.url&&e.url!==i&&e.once("video:canplay",(()=>{e.isReady&&e.emit("restart")})),r.src=i,e.option.url=i,e.emit("url",i))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],ghisN:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{template:{$video:t}}=e;o.def(e,"attr",{value(e,r){if(void 0===r)return t[e];t[e]=r}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],l5N6R:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{i18n:t,notice:r,option:i,constructor:{instances:n},template:{$video:a}}=e;o.def(e,"play",{value(){const o=a.play();if(o&&o.then&&o.then().catch((e=>{throw r.show=e,e})),i.mutex)for(let t=0;te.playing?e.pause():e.play()})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],bsO1Q:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{notice:t}=e;o.def(e,"seek",{set(r){e.currentTime=r,e.emit("seek",e.currentTime),e.duration&&(t.show=`${o.secondToTime(e.currentTime)} / ${o.secondToTime(e.duration)}`)}}),o.def(e,"forward",{set(t){e.seek=e.currentTime+t}}),o.def(e,"backward",{set(t){e.seek=e.currentTime-t}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],ivSmC:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{template:{$video:t},i18n:r,notice:i,storage:n}=e;o.def(e,"volume",{get:()=>t.volume||0,set:a=>{t.volume=o.clamp(a,0,1),i.show=`${r.get("Volume")}: ${parseInt(100*t.volume,10)}`,0!==t.volume&&n.set("volume",t.volume),e.emit("volume",t.volume)}}),o.def(e,"muted",{get:()=>t.muted,set:r=>{t.muted=r,e.emit("volume",t.volume)}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"8LbXb":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{$video:t}=e.template;o.def(e,"currentTime",{get:()=>t.currentTime||0,set:r=>{r=parseFloat(r),Number.isNaN(r)||(t.currentTime=o.clamp(r,0,e.duration))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],f7tNT:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){o.def(e,"duration",{get:()=>{const{duration:t}=e.template.$video;return t===1/0?0:t||0}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],ejQWi:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{i18n:t,option:r,notice:i}=e;function n(o,n,a){return new Promise((s=>{if(o===e.url)return s(o);const{playing:l}=e;e.pause(),URL.revokeObjectURL(e.url),e.url=o,e.once("video:canplay",(()=>{e.playbackRate=!1,e.aspectRatio=!1,e.flip="normal",e.autoSize=r.autoSize,e.currentTime=a,e.notice.show="",l&&e.play(),n&&(i.show=`${t.get("Switch Video")}: ${n}`),e.emit("switch",o),s(o)}))}))}o.def(e,"switchQuality",{value:(t,r)=>n(t,r,e.currentTime)}),o.def(e,"switchUrl",{value:(e,t)=>n(e,t,0)})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],kNcxE:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{template:{$video:t},i18n:r,notice:i}=e;o.def(e,"playbackRate",{get:()=>t.playbackRate,set(n){if(n){if(n===t.playbackRate)return;const a=[.25,.5,.75,1,1.25,1.5,1.75,2,3,4];o.errorHandle(a.includes(n),`'playbackRate' only accept ${a.toString()} as parameters`),t.playbackRate=n,i.show=`${r.get("Rate")}: ${1===n?r.get("Normal"):`${n}x`}`,e.emit("playbackRate",n)}else e.playbackRate=1,e.emit("playbackRate")}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"8v5yt":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{template:{$video:t,$player:r},i18n:i,notice:n}=e;o.def(e,"aspectRatio",{get:()=>r.dataset.aspectRatio||"default",set(a){a||(a="default");const s=["default","4:3","16:9"];if(o.errorHandle(s.includes(a),`'aspectRatio' only accept ${s.toString()} as parameters`),"default"===a)o.setStyle(t,"width",null),o.setStyle(t,"height",null),o.setStyle(t,"padding",null),delete r.dataset.aspectRatio;else{const e=a.split(":").map(Number),{videoWidth:i,videoHeight:n}=t,{clientWidth:s,clientHeight:l}=r,c=i/n,p=e[0]/e[1];if(c>p){const e=p*n/i;o.setStyle(t,"width",100*e+"%"),o.setStyle(t,"height","100%"),o.setStyle(t,"padding",`0 ${(s-s*e)/2}px`)}else{const e=i/p/n;o.setStyle(t,"width","100%"),o.setStyle(t,"height",100*e+"%"),o.setStyle(t,"padding",(l-l*e)/2+"px 0")}r.dataset.aspectRatio=a}n.show=`${i.get("Aspect Ratio")}: ${"default"===a?i.get("Default"):a}`,e.emit("aspectRatio",a)}}),o.def(e,"aspectRatioReset",{set(t){if(t){const{aspectRatio:t}=e;e.aspectRatio=t}}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],eLUEv:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{option:t,notice:r,template:{$video:i}}=e,n=document.createElement("canvas");o.def(e,"getDataURL",{value:()=>new Promise(((e,t)=>{try{n.width=i.videoWidth,n.height=i.videoHeight,n.getContext("2d").drawImage(i,0,0),e(n.toDataURL("image/png"))}catch(e){r.show=e,t(e)}}))}),o.def(e,"getBlobUrl",{value:()=>new Promise(((e,t)=>{try{n.width=i.videoWidth,n.height=i.videoHeight,n.getContext("2d").drawImage(i,0,0),n.toBlob((t=>{e(URL.createObjectURL(t))}))}catch(e){r.show=e,t(e)}}))}),o.def(e,"screenshot",{value:async()=>{const r=await e.getDataURL();return o.download(r,`${t.title||"artplayer"}_${o.secondToTime(i.currentTime)}.png`),e.emit("screenshot",r),r}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],ifvhR:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../libs/screenfull"),n=o.interopDefault(i),a=e("../utils");r.default=function(e){const{i18n:t,notice:r,template:{$video:o,$player:i}}=e,s=n.default();e.once("video:loadedmetadata",(()=>{var n;s.isEnabled?(n=e,s.on("change",(()=>n.emit("fullscreen",s.isFullscreen))),a.def(n,"fullscreen",{get:()=>s.isFullscreen,async set(e){e?(n.normalSize="fullscreen",n.aspectRatioReset=!0,n.autoSize=!1,await s.request(i),a.addClass(i,"art-fullscreen"),n.emit("resize"),n.emit("fullscreen",!0),r.show=""):(n.aspectRatioReset=!0,n.autoSize=n.option.autoSize,await s.exit(),a.removeClass(i,"art-fullscreen"),n.emit("resize"),n.emit("fullscreen"),r.show="")}})):document.fullscreenEnabled||o.webkitSupportsFullscreen?(e=>{a.def(e,"fullscreen",{get:()=>o.webkitDisplayingFullscreen,set(t){t?(e.normalSize="fullscreen",o.webkitEnterFullscreen(),e.emit("fullscreen",!0),r.show=""):(o.webkitExitFullscreen(),e.emit("fullscreen"),r.show="")}})})(e):a.def(e,"fullscreen",{get:()=>!1,set(){r.show=t.get("Fullscreen Not Supported")}}),a.def(e,"fullscreen",a.get(e,"fullscreen"))}))}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY","../libs/screenfull":"hXAU9"}],hXAU9:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(){const e=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],t=(()=>{const t=e[0],r={};for(const o of e){const e=o?.[1];if(e in document){for(const[e,i]of o.entries())r[t[e]]=i;return r}}return!1})(),r={change:t.fullscreenchange,error:t.fullscreenerror};let o={request:(e=document.documentElement,r)=>new Promise(((i,n)=>{const a=()=>{o.off("change",a),i()};o.on("change",a);const s=e[t.requestFullscreen](r);s instanceof Promise&&s.then(a).catch(n)})),exit:()=>new Promise(((e,r)=>{if(!o.isFullscreen)return void e();const i=()=>{o.off("change",i),e()};o.on("change",i);const n=document[t.exitFullscreen]();n instanceof Promise&&n.then(i).catch(r)})),toggle:(e,t)=>o.isFullscreen?o.exit():o.request(e,t),onchange(e){o.on("change",e)},onerror(e){o.on("error",e)},on(e,t){const o=r[e];o&&document.addEventListener(o,t,!1)},off(e,t){const o=r[e];o&&document.removeEventListener(o,t,!1)},raw:t};return Object.defineProperties(o,{isFullscreen:{get:()=>Boolean(document[t.fullscreenElement])},element:{enumerable:!0,get:()=>document[t.fullscreenElement]??void 0},isEnabled:{enumerable:!0,get:()=>Boolean(document[t.fullscreenEnabled])}}),t||(o={isEnabled:!1}),o}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],dsFtO:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{notice:t,template:{$player:r}}=e;o.def(e,"fullscreenWeb",{get:()=>o.hasClass(r,"art-fullscreen-web"),set(i){i?(e.normalSize="fullscreenWeb",o.addClass(r,"art-fullscreen-web"),e.aspectRatioReset=!0,e.autoSize=!1,e.emit("resize"),e.emit("fullscreenWeb",!0),t.show=""):(o.removeClass(r,"art-fullscreen-web"),e.aspectRatioReset=!0,e.autoSize=e.option.autoSize,e.emit("resize"),e.emit("fullscreenWeb"),t.show="")}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],gYMLD:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{i18n:t,notice:r,template:{$video:i}}=e;document.pictureInPictureEnabled?function(e){const{template:{$video:t},events:{proxy:r},notice:i}=e;t.disablePictureInPicture=!1,o.def(e,"pip",{get:()=>document.pictureInPictureElement,set(r){r?(e.normalSize="pip",t.requestPictureInPicture().catch((e=>{throw i.show=e,e}))):document.exitPictureInPicture().catch((e=>{throw i.show=e,e}))}}),r(t,"enterpictureinpicture",(()=>{e.emit("pip",!0)})),r(t,"leavepictureinpicture",(()=>{e.emit("pip")}))}(e):i.webkitSupportsPresentationMode?function(e){const{$video:t}=e.template;t.webkitSetPresentationMode("inline"),o.def(e,"pip",{get:()=>"picture-in-picture"===t.webkitPresentationMode,set(r){r?(e.normalSize="pip",t.webkitSetPresentationMode("picture-in-picture"),e.emit("pip",!0)):(t.webkitSetPresentationMode("inline"),e.emit("pip"))}})}(e):o.def(e,"pip",{get:()=>!1,set(){r.show=t.get("PIP Not Supported")}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],fMSRd:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{$video:t}=e.template;o.def(e,"loaded",{get:()=>e.loadedTime/t.duration}),o.def(e,"loadedTime",{get:()=>t.buffered.length?t.buffered.end(t.buffered.length-1):0})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],iRHNE:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){o.def(e,"played",{get:()=>e.currentTime/e.duration})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],dQ40z:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{$video:t}=e.template;o.def(e,"playing",{get:()=>!!(t.currentTime>0&&!t.paused&&!t.ended&&t.readyState>2)})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],iF844:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{$container:t,$player:r,$video:i}=e.template;o.def(e,"autoSize",{get:()=>o.hasClass(t,"art-auto-size"),set(n){if(n){const{videoWidth:n,videoHeight:a}=i,{width:s,height:l}=t.getBoundingClientRect(),c=n/a,p=s/l;if(o.addClass(t,"art-auto-size"),p>c){const e=l*c/s*100;o.setStyle(r,"width",`${e}%`),o.setStyle(r,"height","100%")}else{const e=s/c/l*100;o.setStyle(r,"width","100%"),o.setStyle(r,"height",`${e}%`)}e.emit("autoSize",{width:e.width,height:e.height})}else o.removeClass(t,"art-auto-size"),o.setStyle(r,"width",null),o.setStyle(r,"height",null),e.emit("autoSize")}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"1hAm8":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){o.def(e,"rect",{get:()=>e.template.$player.getBoundingClientRect()});const t=["bottom","height","left","right","top","width"];for(let r=0;re.rect[i]})}o.def(e,"x",{get:()=>e.left+window.pageXOffset}),o.def(e,"y",{get:()=>e.top+window.pageYOffset})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],dhi4g:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{template:{$player:t},i18n:r,notice:i}=e;o.def(e,"flip",{get:()=>t.dataset.flip||"normal",set(n){n||(n="normal");const a=["normal","horizontal","vertical"];o.errorHandle(a.includes(n),`'flip' only accept ${a.toString()} as parameters`),"normal"===n?delete t.dataset.flip:(e.rotate=!1,t.dataset.flip=n);const s=n.replace(n[0],n[0].toUpperCase());i.show=`${r.get("Video Flip")}: ${r.get(s)}`,e.emit("flip",n)}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],eQPx9:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{i18n:t,option:r,storage:i,events:{proxy:n},template:{$player:a,$miniClose:s,$miniTitle:l,$miniHeader:c}}=e;let p="",u=!1,d=0,f=0,h=0,m=0;n(c,"mousedown",(t=>{u=!0,d=t.pageX,f=t.pageY,h=e.left,m=e.top})),n(document,"mousemove",(e=>{if(u){o.addClass(a,"art-is-dragging");const t=m+e.pageY-f,r=h+e.pageX-d;o.setStyle(a,"top",`${t}px`),o.setStyle(a,"left",`${r}px`),i.set("top",t),i.set("left",r)}})),n(document,"mouseup",(()=>{u=!1,o.removeClass(a,"art-is-dragging")})),n(s,"click",(()=>{e.mini=!1,u=!1,o.removeClass(a,"art-is-dragging")})),o.append(l,r.title||t.get("Mini Player")),o.def(e,"mini",{get:()=>o.hasClass(a,"art-mini"),set(t){if(t){e.normalSize="mini",e.autoSize=!1,p=a.style.cssText,o.addClass(a,"art-mini");const t=i.get("top"),r=i.get("left");if(t&&r)o.setStyle(a,"top",`${t}px`),o.setStyle(a,"left",`${r}px`),o.isInViewport(c)||(i.del("top"),i.del("left"),e.mini=!0);else{const t=document.body,r=t.clientHeight-e.height-50,n=t.clientWidth-e.width-50;i.set("top",r),i.set("left",n),o.setStyle(a,"top",`${r}px`),o.setStyle(a,"left",`${n}px`)}e.aspectRatio=!1,e.playbackRate=!1,e.notice.show="",e.emit("mini",!0)}else a.style.cssText=p,o.removeClass(a,"art-mini"),o.setStyle(a,"top",null),o.setStyle(a,"left",null),e.aspectRatio=!1,e.playbackRate=!1,e.autoSize=r.autoSize,e.notice.show="",e.emit("mini")}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],gQaVE:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){let t=[];o.def(e,"loop",{get:()=>t,set:r=>{if(Array.isArray(r)&&"number"==typeof r[0]&&"number"==typeof r[1]){const i=o.clamp(r[0],0,Math.min(r[1],e.duration)),n=o.clamp(r[1],i,e.duration);n-i>=1?(t=[i,n],e.emit("loop",t)):(t=[],e.emit("loop"))}else t=[],e.emit("loop")}}),e.on("video:timeupdate",(()=>{t.length&&(e.currentTimet[1])&&(e.seek=t[0])}))}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"7n9Pt":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{option:t,template:{$poster:r}}=e;o.def(e,"poster",{get:()=>t.poster,set(e){t.poster=e,o.setStyle(r,"backgroundImage",`url(${e})`)}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"8Az1F":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{option:t,template:{$container:r,$video:i}}=e,n=r.style.height;o.def(e,"autoHeight",{get:()=>o.hasClass(r,"art-auto-height"),set(a){if(a){const{clientWidth:n}=r,{videoHeight:a,videoWidth:s}=i,l=a*(n/s);o.setStyle(r,"height",l+"px"),o.addClass(r,"art-auto-height"),e.autoSize=t.autoSize,e.emit("autoHeight",l)}else o.setStyle(r,"height",n),o.removeClass(r,"art-auto-height"),e.autoSize=t.autoSize,e.emit("autoHeight")}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],kXlsI:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{option:t,template:{$player:r}}=e;o.def(e,"theme",{get:()=>getComputedStyle(r).getPropertyValue("--theme"),set(e){t.theme=e,r.style.setProperty("--theme",e)}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],b8f4Q:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){o.def(e,"title",{get:()=>e.option.title,set(t){e.option.title=t}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"4fP62":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const t=["mini","pip","fullscreen","fullscreenWeb"];o.def(e,"normalSize",{get:()=>t.every((t=>!e[t])),set(r){t.filter((e=>e!==r)).forEach((t=>{e[t]&&(e[t]=!1)}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],gdNfa:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{clamp:t}=e.constructor.utils,{notice:r,template:i,i18n:n}=e;let a=0,s=[];e.on("subtitle:switch",(()=>{s=[]})),o.def(e,"subtitleOffset",{get:()=>a,set(o){if(i.$track&&i.$track.track){const l=Array.from(i.$track.track.cues);a=t(o,-5,5);for(let r=0;r{e.attr(r,t.moreVideoAttr[r])})),t.muted&&(e.muted=t.muted),t.volume&&(i.volume=o.clamp(t.volume,0,1));const a=r.get("volume");"number"==typeof a&&(i.volume=o.clamp(a,0,1)),t.poster&&o.setStyle(n,"backgroundImage",`url(${t.poster})`),t.autoplay&&(i.autoplay=t.autoplay),t.playsInline&&(i.playsInline=!0,i["webkit-playsinline"]=!0),t.theme&&(e.theme=t.theme),0===t.ads.length&&(e.url=t.url)}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],b25aJ:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../config"),n=o.interopDefault(i),a=e("../utils");r.default=function(e){const{i18n:t,notice:r,option:o,constructor:i,events:{proxy:s},template:{$player:l,$video:c,$poster:p}}=e;let u=0;for(let t=0;t{e.emit(`video:${t.type}`,t)}));e.on("video:canplay",(()=>{u=0,e.loading.show=!1})),e.once("video:canplay",(()=>{e.loading.show=!1,e.controls.show=!0,e.mask.show=!0,e.isReady=!0,e.emit("ready")})),e.on("video:ended",(()=>{o.loop?(e.seek=0,e.play(),e.controls.show=!1,e.mask.show=!1):(e.controls.show=!0,e.mask.show=!0)})),e.on("video:error",(async()=>{u{e.autoSize=o.autoSize,a.isMobile&&(e.loading.show=!1,e.controls.show=!0,e.mask.show=!0)})),e.on("video:loadstart",(()=>{e.loading.show=!0})),e.on("video:pause",(()=>{e.controls.show=!0,e.mask.show=!0})),e.on("video:play",(()=>{e.mask.show=!1,a.setStyle(p,"display","none")})),e.on("video:playing",(()=>{e.mask.show=!1})),e.on("video:seeked",(()=>{e.loading.show=!1})),e.on("video:seeking",(()=>{e.loading.show=!0})),e.on("video:timeupdate",(()=>{e.mask.show=!1})),e.on("video:waiting",(()=>{e.loading.show=!0}))}},{"../config":"ej4fZ","../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"3qXcr":[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../utils"),n=e("../utils/component"),a=o.interopDefault(n),s=e("./fullscreen"),l=o.interopDefault(s),c=e("./fullscreenWeb"),p=o.interopDefault(c),u=e("./pip"),d=o.interopDefault(u),f=e("./playAndPause"),h=o.interopDefault(f),m=e("./progress"),g=o.interopDefault(m),y=e("./subtitle"),v=o.interopDefault(y),b=e("./time"),x=o.interopDefault(b),w=e("./volume"),j=o.interopDefault(w),k=e("./setting"),M=o.interopDefault(k),S=e("./thumbnails"),I=o.interopDefault(S),F=e("./screenshot"),$=o.interopDefault(F),T=e("./quality"),E=o.interopDefault(T),C=e("./loop"),z=o.interopDefault(C);class Y extends a.default{constructor(e){super(e),this.name="control";const{option:t,constructor:r,events:{proxy:o},template:{$player:n}}=e;let a=Date.now();o(n,["click","mousemove","touchstart","touchmove"],(()=>{this.show=!0,i.removeClass(n,"art-hide-cursor"),i.addClass(n,"art-hover"),a=Date.now()})),e.on("video:timeupdate",(()=>{e.playing&&this.show&&Date.now()-a>=r.CONTROL_HIDE_TIME&&(this.show=!1,i.addClass(n,"art-hide-cursor"),i.removeClass(n,"art-hover"))})),e.once("video:loadedmetadata",(()=>{this.add(g.default({name:"progress",disable:t.isLive,position:"top",index:10})),this.add(I.default({name:"thumbnails",disable:!t.thumbnails.url||t.isLive||i.isMobile,position:"top",index:20})),this.add(z.default({name:"loop",disable:!1,position:"top",index:30})),this.add(h.default({name:"playAndPause",disable:!1,position:"left",index:10})),this.add(j.default({name:"volume",disable:!1,position:"left",index:20})),this.add(x.default({name:"time",disable:t.isLive,position:"left",index:30})),this.add(E.default({name:"quality",disable:0===t.quality.length,position:"right",index:10})),this.add($.default({name:"screenshot",disable:!t.screenshot||i.isMobile,position:"right",index:20})),this.add(v.default({name:"subtitle",disable:!t.subtitle.url,position:"right",index:30})),this.add(M.default({name:"setting",disable:!t.setting,position:"right",index:40})),this.add(d.default({name:"pip",disable:!t.pip,position:"right",index:50})),this.add(p.default({name:"fullscreenWeb",disable:!t.fullscreenWeb,position:"right",index:60})),this.add(l.default({name:"fullscreen",disable:!t.fullscreen,position:"right",index:70}));for(let e=0;eNumber(e.dataset.index)>=Number(o.dataset.index)));return p?p.insertAdjacentElement("beforebegin",o):i.append(this.$parent,o),t.html&&i.append(o,t.html),t.style&&i.setStyles(o,t.style),t.tooltip&&i.tooltip(o,t.tooltip),t.click&&this.art.events.proxy(o,"click",(e=>{e.preventDefault(),t.click.call(this.art,this,e)})),t.selector&&["left","right"].includes(t.position)&&this.selector(t,o),t.mounted&&t.mounted.call(this.art,o),1===o.childNodes.length&&3===o.childNodes[0].nodeType&&i.addClass(o,"art-control-onlyText"),l.def(this,r,{value:o}),o}selector(e,t){const{hover:r,proxy:o}=this.art.events;i.addClass(t,"art-control-selector");const n=document.createElement("div");i.addClass(n,"art-selector-value"),i.append(n,e.html),t.innerText="",i.append(t,n);const a=e.selector.map(((e,t)=>`
${e.html}
`)).join(""),s=document.createElement("div");i.addClass(s,"art-selector-list"),i.append(s,a),i.append(t,s);const l=()=>{const e=i.getStyle(t,"width")/2-i.getStyle(s,"width")/2;s.style.left=`${e}px`};r(t,l),o(s,"click",(async t=>{const r=(t.composedPath()||[]).find((e=>i.hasClass(e,"art-selector-item")));if(!r)return;i.inverseClass(r,"art-current");const o=Number(r.dataset.index),a=e.selector[o]||{};if(n.innerText=r.innerText,e.onSelect){const o=await e.onSelect.call(this.art,a,r,t);"string"!=typeof o&&"number"!=typeof o||(n.innerHTML=o)}l(),this.art.emit("selector",a,r)}))}}},{"./dom":"fqaW9","option-validator":"2A2W5","../scheme":"3izFE","./property":"5ynPA","./error":"kNZvP","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"43BKT":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>({...e,tooltip:t.i18n.get("Fullscreen"),mounted:e=>{const{events:{proxy:r},icons:i,i18n:n}=t,a=o.append(e,i.fullscreenOn),s=o.append(e,i.fullscreenOff);o.setStyle(s,"display","none"),r(e,"click",(()=>{t.fullscreen=!t.fullscreen})),t.on("fullscreen",(t=>{t?(o.tooltip(e,n.get("Exit Fullscreen")),o.setStyle(a,"display","none"),o.setStyle(s,"display","inline-flex")):(o.tooltip(e,n.get("Fullscreen")),o.setStyle(a,"display","inline-flex"),o.setStyle(s,"display","none"))}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],kQJHz:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>({...e,tooltip:t.i18n.get("Web Fullscreen"),mounted:e=>{const{events:{proxy:r},icons:i,i18n:n}=t,a=o.append(e,i.fullscreenWebOn),s=o.append(e,i.fullscreenWebOff);o.setStyle(s,"display","none"),r(e,"click",(()=>{t.fullscreenWeb=!t.fullscreenWeb})),t.on("fullscreenWeb",(t=>{t?(o.tooltip(e,n.get("Exit Web Fullscreen")),o.setStyle(a,"display","none"),o.setStyle(s,"display","inline-flex")):(o.tooltip(e,n.get("Web Fullscreen")),o.setStyle(a,"display","inline-flex"),o.setStyle(s,"display","none"))}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],aWne0:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>({...e,tooltip:t.i18n.get("PIP Mode"),mounted:e=>{const{events:{proxy:r},icons:i,i18n:n}=t;o.append(e,i.pip),r(e,"click",(()=>{t.pip=!t.pip})),t.on("pip",(t=>{o.tooltip(e,n.get(t?"Exit PIP Mode":"PIP Mode"))}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"4z78f":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>({...e,mounted:e=>{const{events:{proxy:r},icons:i,i18n:n}=t,a=o.append(e,i.play),s=o.append(e,i.pause);function l(){o.setStyle(a,"display","flex"),o.setStyle(s,"display","none")}function c(){o.setStyle(a,"display","none"),o.setStyle(s,"display","flex")}o.tooltip(a,n.get("Play")),o.tooltip(s,n.get("Pause")),r(a,"click",(()=>{t.play()})),r(s,"click",(()=>{t.pause()})),t.playing?c():l(),t.on("video:playing",(()=>{c()})),t.on("video:pause",(()=>{l()}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"19nwD":[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"getPosFromEvent",(()=>n));var i=e("../utils");function n(e,t){const{$progress:r}=e.template,{left:o}=r.getBoundingClientRect(),n=t.pageX,a=i.clamp(n-o,0,r.clientWidth),s=a/r.clientWidth*e.duration;return{second:s,time:i.secondToTime(s),width:a,percentage:i.clamp(a/r.clientWidth,0,1)}}r.default=function(e){return t=>{const{icons:r,option:o,events:{proxy:a}}=t;return{...e,html:'
',mounted:e=>{let s=!1;const l=i.query(".art-progress-loaded",e),c=i.query(".art-progress-played",e),p=i.query(".art-progress-highlight",e),u=i.query(".art-progress-indicator",e),d=i.query(".art-progress-tip",e);i.setStyle(c,"backgroundColor","var(--theme)");let f=t.constructor.INDICATOR_SIZE;function h(e,t){"loaded"===e&&i.setStyle(l,"width",100*t+"%"),"played"===e&&(i.setStyle(c,"width",100*t+"%"),i.setStyle(u,"left",`calc(${100*t}% - ${f/2}px)`))}r.indicator?(f=t.constructor.INDICATOR_SIZE_ICON,i.append(u,r.indicator)):i.setStyles(u,{backgroundColor:"var(--theme)"}),i.isMobile&&(f=t.constructor.INDICATOR_SIZE_MOBILE,r.indicator&&(f=t.constructor.INDICATOR_SIZE_MOBILE_ICON)),i.setStyles(u,{left:`-${f/2}px`,width:`${f}px`,height:`${f}px`});for(let e=0;e`)}h("loaded",t.loaded),t.on("setBar",((e,t)=>{h(e,t)})),t.on("video:progress",(()=>{h("loaded",t.loaded)})),t.on("video:timeupdate",(()=>{h("played",t.played)})),t.on("video:ended",(()=>{h("played",1)})),i.isMobile||(a(e,"click",(e=>{if(e.target!==u){const{second:r,percentage:o}=n(t,e);h("played",o),t.seek=r}})),a(e,"mousemove",(r=>{i.setStyle(d,"display","block"),i.includeFromEvent(r,p)?function(r){const{width:o}=n(t,r),{text:a}=r.target.dataset;d.innerHTML=a;const s=d.clientWidth;o<=s/2?i.setStyle(d,"left",0):o>e.clientWidth-s/2?i.setStyle(d,"left",e.clientWidth-s+"px"):i.setStyle(d,"left",o-s/2+"px")}(r):function(r){const{width:o,time:a}=n(t,r);d.innerHTML=a;const s=d.clientWidth;o<=s/2?i.setStyle(d,"left",0):o>e.clientWidth-s/2?i.setStyle(d,"left",e.clientWidth-s+"px"):i.setStyle(d,"left",o-s/2+"px")}(r)})),a(e,"mouseout",(()=>{i.setStyle(d,"display","none")})),a(u,"mousedown",(()=>{s=!0})),a(document,"mousemove",(e=>{if(s){const{second:r,percentage:o}=n(t,e);h("played",o),t.seek=r}})),a(document,"mouseup",(()=>{s&&(s=!1)})))}}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"31jqM":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>({...e,tooltip:t.i18n.get("Hide Subtitle"),mounted:e=>{const{events:{proxy:r},icons:i,i18n:n,subtitle:a}=t;o.append(e,i.subtitle),r(e,"click",(()=>{a.toggle=!0})),t.on("subtitle",(t=>{o.tooltip(e,n.get(t?"Hide Subtitle":"Show Subtitle"))}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],lh90q:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>({...e,style:{cursor:"auto"},mounted:e=>{function r(){const r=`${o.secondToTime(t.currentTime)} / ${o.secondToTime(t.duration)}`;r!==e.innerText&&(e.innerText=r)}r();const i=["video:loadedmetadata","video:timeupdate","video:progress"];for(let e=0;e({...e,mounted:e=>{const{events:{proxy:r},icons:i,i18n:n}=t;let a=!1;const s=t.constructor.VOLUME_PANEL_WIDTH,l=t.constructor.VOLUME_HANDLE_WIDTH,c=o.append(e,i.volume),p=o.append(e,i.volumeClose),u=o.append(e,'
'),d=o.append(u,'
');function f(e){const{left:t}=u.getBoundingClientRect();return o.clamp(e.pageX-t-l/2,0,s-l/2)/(s-l)}function h(e=.7){if(t.muted||0===e)o.setStyle(c,"display","none"),o.setStyle(p,"display","flex"),o.setStyle(d,"left","0");else{const t=(s-l)*e;o.setStyle(c,"display","flex"),o.setStyle(p,"display","none"),o.setStyle(d,"left",`${t}px`)}}o.tooltip(c,n.get("Mute")),o.setStyle(p,"display","none"),o.isMobile&&o.setStyle(u,"display","none"),h(t.volume),t.on("video:volumechange",(()=>{h(t.volume)})),r(c,"click",(()=>{t.muted=!0})),r(p,"click",(()=>{t.muted=!1})),r(u,"click",(e=>{t.muted=!1,t.volume=f(e)})),r(d,"mousedown",(()=>{a=!0})),r(e,"mousemove",(e=>{a&&(t.muted=!1,t.volume=f(e))})),r(document,"mouseup",(()=>{a&&(a=!1)}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"4rv3i":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>({...e,tooltip:t.i18n.get("Show Setting"),mounted:e=>{const{events:{proxy:r},icons:i,i18n:n,setting:a}=t;o.append(e,i.setting),r(e,"click",(()=>{a.toggle=!0})),t.on("setting",(t=>{o.tooltip(e,n.get(t?"Hide Setting":"Show Setting"))}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],lTgvI:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils"),i=e("./progress");r.default=function(e){return t=>({...e,mounted:e=>{const{option:r,template:{$progress:n,$video:a},events:{proxy:s,loadImg:l}}=t;let c=null,p=!1,u=!1;s(n,"mousemove",(async s=>{if(!p){p=!0;const e=await l(r.thumbnails.url);c=e,u=!0}u&&(o.setStyle(e,"display","block"),function(s){const{width:l}=i.getPosFromEvent(t,s),{url:p,number:u,column:d}=r.thumbnails,f=c.naturalWidth/d,h=f/(a.videoWidth/a.videoHeight),m=n.clientWidth/u,g=Math.floor(l/m),y=Math.ceil(g/d)-1,v=g%d||d-1;o.setStyle(e,"backgroundImage",`url(${p})`),o.setStyle(e,"height",`${h}px`),o.setStyle(e,"width",`${f}px`),o.setStyle(e,"backgroundPosition",`-${v*f}px -${y*h}px`),l<=f/2?o.setStyle(e,"left",0):l>n.clientWidth-f/2?o.setStyle(e,"left",n.clientWidth-f+"px"):o.setStyle(e,"left",l-f/2+"px")}(s))})),s(n,"mouseout",(()=>{o.setStyle(e,"display","none")}))}})}},{"../utils":"5yYFo","./progress":"19nwD","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"71GuX":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>({...e,tooltip:t.i18n.get("Screenshot"),mounted:e=>{const{events:{proxy:r},icons:i}=t;o.append(e,i.screenshot),r(e,"click",(()=>{t.screenshot()}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],f9VNW:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(e){return t=>{const r=t.option.quality,o=r.find((e=>e.default))||r[0];return{...e,html:o?o.html:"",selector:r,onSelect(e){t.switchQuality(e.url,e.html)}}}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],d1O2Q:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>({...e,mounted:e=>{const r=o.append(e,''),i=o.append(e,'');t.on("loop",(n=>{n?(o.setStyle(e,"display","block"),o.setStyle(r,"left",`calc(${n[0]/t.duration*100}% - ${r.clientWidth}px)`),o.setStyle(i,"left",n[1]/t.duration*100+"%")):o.setStyle(e,"display","none")}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],hTnNz:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../utils"),n=e("../utils/component"),a=o.interopDefault(n),s=e("./playbackRate"),l=o.interopDefault(s),c=e("./aspectRatio"),p=o.interopDefault(c),u=e("./flip"),d=o.interopDefault(u),f=e("./info"),h=o.interopDefault(f),m=e("./version"),g=o.interopDefault(m),y=e("./close"),v=o.interopDefault(y);class b extends a.default{constructor(e){super(e),this.art=e,this.name="contextmenu",this.$parent=e.template.$contextmenu,e.once("video:loadedmetadata",(()=>{i.isMobile||this.init()}))}init(){const{option:e,template:{$player:t,$contextmenu:r},events:{proxy:o}}=this.art;this.add(l.default({disable:!e.playbackRate,name:"playbackRate",index:10})),this.add(p.default({disable:!e.aspectRatio,name:"aspectRatio",index:20})),this.add(d.default({disable:!e.flip,name:"flip",index:30})),this.add(h.default({disable:!1,name:"info",index:40})),this.add(g.default({disable:!1,name:"version",index:50})),this.add(v.default({disable:!1,name:"close",index:60}));for(let t=0;t{e.preventDefault(),this.show=!0;const o=e.clientX,n=e.clientY,{height:a,width:s,left:l,top:c}=t.getBoundingClientRect(),{height:p,width:u}=r.getBoundingClientRect();let d=o-l,f=n-c;o+u>l+s&&(d=s-u),n+p>c+a&&(f=a-p),i.setStyles(r,{top:`${f}px`,left:`${d}px`})})),o(t,"click",(e=>{i.includeFromEvent(e,r)||(this.show=!1)})),this.art.on("blur",(()=>{this.show=!1}))}}r.default=b},{"../utils":"5yYFo","../utils/component":"5MLcx","./playbackRate":"1uTBJ","./aspectRatio":"cFKj0","./flip":"l7S3g","./info":"ihHBb","./version":"3q8wK","./close":"sLP7j","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"1uTBJ":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>{const{i18n:r}=t;return{...e,html:`${r.get("Play Speed")}:0.50.75${r.get("Normal")}1.251.52.0`,click:(e,r)=>{const{value:o}=r.target.dataset;o&&(t.playbackRate=Number(o),e.show=!1)},mounted:e=>{t.on("playbackRate",(t=>{const r=o.queryAll("span",e).find((e=>Number(e.dataset.value)===t));r&&o.inverseClass(r,"art-current")}))}}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],cFKj0:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>{const{i18n:r}=t;return{...e,html:`${r.get("Aspect Ratio")}:${r.get("Default")}4:316:9`,click:(e,r)=>{const{value:o}=r.target.dataset;o&&(t.aspectRatio=o,e.show=!1)},mounted:e=>{t.on("aspectRatio",(t=>{const r=o.queryAll("span",e).find((e=>e.dataset.value===t));r&&o.inverseClass(r,"art-current")}))}}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],l7S3g:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>{const{i18n:r}=t;return{...e,html:`${r.get("Video Flip")}:${r.get("Normal")}${r.get("Horizontal")}${r.get("Vertical")}`,click:(e,r)=>{const{value:o}=r.target.dataset;o&&(t.flip=o,e.show=!1)},mounted:e=>{t.on("flip",(t=>{const r=o.queryAll("span",e).find((e=>e.dataset.value===t));r&&o.inverseClass(r,"art-current")}))}}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],ihHBb:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(e){return t=>({...e,html:t.i18n.get("Video Info"),click:e=>{t.info.show=!0,e.show=!1}})}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"3q8wK":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(e){return{...e,html:'ArtPlayer 4.3.18'}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],sLP7j:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(e){return t=>({...e,html:t.i18n.get("Close"),click:e=>{e.show=!1}})}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],bfwuE:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./utils"),n=e("./utils/component"),a=o.interopDefault(n);class s extends a.default{constructor(e){super(e),this.name="info",e.once("video:loadedmetadata",(()=>{i.isMobile||this.init()}))}init(){const{constructor:e,events:{proxy:t},template:{$infoPanel:r,$infoClose:o,$video:n}}=this.art;t(o,"click",(()=>{this.show=!1}));let a=null;const s=i.queryAll("[data-video]",r)||[];this.art.on("destroy",(()=>{clearTimeout(a)})),function t(){for(let e=0;e{this.init(e.option.subtitle)}))}get url(){return this.art.template.$track.src}set url(e){this.switch(e)}get textTrack(){return this.art.template.$video.textTracks[0]}get activeCue(){return this.textTrack.activeCues[0]}style(e,t){const{$subtitle:r}=this.art.template;return"object"==typeof e?i.setStyles(r,e):i.setStyle(r,e,t)}update(){const{$subtitle:e}=this.art.template;e.innerHTML="",this.activeCue&&(e.innerHTML=this.activeCue.text.split(/\r?\n/).map((e=>`

${i.escape(e)}

`)).join(""),this.art.emit("subtitleUpdate",this.activeCue.text))}async switch(e,t={}){const{i18n:r,notice:o,option:i}=this.art,n={...i.subtitle,...t,url:e},a=await this.init(n);return t.name&&(o.show=`${r.get("Switch Subtitle")}: ${t.name}`),a}init(e){if(l.default(e,p.default.subtitle),!e.url)return;const{notice:t,events:{proxy:r},template:{$subtitle:o,$video:n,$track:a}}=this.art;if(!a){const e=document.createElement("track");e.default=!0,e.kind="metadata",n.appendChild(e),this.art.template.$track=e,r(this.textTrack,"cuechange",this.update.bind(this))}return this.style(e.style),i.errorHandle(window.fetch,"fetch not support"),fetch(e.url).then((e=>e.arrayBuffer())).then((t=>{i.errorHandle(window.TextDecoder,"TextDecoder not support");const r=new TextDecoder(e.encoding).decode(t);switch(this.art.emit("subtitleLoad",e.url),e.type||i.getExt(e.url)){case"srt":return i.vttToBlob(i.srtToVtt(r));case"ass":return i.vttToBlob(i.assToVtt(r));case"vtt":return i.vttToBlob(r);default:return e.url}})).then((e=>(o.innerHTML="",this.url===e||(URL.revokeObjectURL(this.url),this.art.template.$track.src=e,this.art.emit("subtitleSwitch",e)),e))).catch((e=>{throw t.show=e,e}))}}r.default=u},{"./utils":"5yYFo","./utils/component":"5MLcx","option-validator":"2A2W5","./scheme":"3izFE","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"9oLaG":[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../utils/error"),n=e("./clickInit"),a=o.interopDefault(n),s=e("./hoverInit"),l=o.interopDefault(s),c=e("./mousemoveInit"),p=o.interopDefault(c),u=e("./resizeInit"),d=o.interopDefault(u),f=e("./gestureInit"),h=o.interopDefault(f),m=e("./viewInit"),g=o.interopDefault(m);r.default=class{constructor(e){this.destroyEvents=[],this.proxy=this.proxy.bind(this),this.hover=this.hover.bind(this),this.loadImg=this.loadImg.bind(this),e.whitelist.state&&e.once("video:loadedmetadata",(()=>{a.default(e,this),l.default(e,this),p.default(e,this),d.default(e,this),h.default(e,this),g.default(e,this)}))}proxy(e,t,r,o={}){if(Array.isArray(t))return t.map((t=>this.proxy(e,t,r,o)));e.addEventListener(t,r,o);const i=()=>e.removeEventListener(t,r,o);return this.destroyEvents.push(i),i}hover(e,t,r){t&&this.proxy(e,"mouseenter",t),r&&this.proxy(e,"mouseleave",r)}loadImg(e){return new Promise(((t,r)=>{let o;if(e instanceof HTMLImageElement)o=e;else{if("string"!=typeof e)return r(new i.ArtPlayerError("Unable to get Image"));o=new Image,o.src=e}if(o.complete)return t(o);this.proxy(o,"load",(()=>t(o))),this.proxy(o,"error",(()=>r(new i.ArtPlayerError(`Failed to load Image: ${o.src}`))))}))}destroy(){for(let e=0;e{o.includeFromEvent(t,i)?(e.isFocus=!0,e.emit("focus")):(e.isFocus=!1,e.emit("blur"))}));let a=0;t.proxy(n,"click",(()=>{const t=Date.now();t-a<=r.DB_CLICE_TIME?(e.emit("dblclick"),o.isMobile?e.toggle():e.fullscreen=!e.fullscreen):(e.emit("click"),o.isMobile||e.toggle()),a=t}))}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],eIqcL:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e,t){const{$player:r}=e.template;t.hover(r,(()=>{o.addClass(r,"art-hover"),e.emit("hover",!0)}),(()=>{o.removeClass(r,"art-hover"),e.emit("hover")}))}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],hEy8X:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(e,t){const{$player:r}=e.template;t.proxy(r,"mousemove",(t=>{e.emit("mousemove",t)}))}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"9c8lQ":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e,t){const{notice:r,option:i}=e,n=o.throttle((()=>{e.normalSize&&(e.autoSize=i.autoSize),e.aspectRatioReset=!0,r.show="",e.emit("resize")}),e.constructor.RESIZE_TIME);t.proxy(window,["orientationchange","resize"],(()=>{n()})),screen&&screen.orientation&&screen.orientation.onchange&&t.proxy(screen.orientation,"change",(()=>{n()}))}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],gzHdo:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e,t){if(o.isMobile&&!e.option.isLive){const{notice:r,plugins:i,template:{$video:n,$bottom:a,$controls:s}}=e;let l=!1,c=0,p=0,u=0;const d=t=>{if(1===t.touches.length){l=!0;const{clientX:r,clientY:o}=t.touches[0];c=r,p=o,u=e.currentTime}},f=t=>{if(1===t.touches.length&&l&&e.duration){const n=i.autoOrientation&&i.autoOrientation.state,{clientX:a,clientY:s}=t.touches[0],l=o.clamp((a-c)/e.width,-1,1),d=o.clamp((s-p)/e.height,-1,1),f=n?d:l,h=o.clamp(u+e.duration*f/2,0,e.duration);e.seek=h,e.emit("setBar","played",o.clamp(h/e.duration,0,1)),r.show=`${o.secondToTime(h)} / ${o.secondToTime(e.duration)}`}},h=()=>{l&&(c=0,p=0,u=0,l=!1)};t.proxy(a,"touchstart",(e=>{o.includeFromEvent(e,s)||d(e)})),t.proxy(a,"touchmove",f),t.proxy(n,"touchstart",d),t.proxy(n,"touchmove",f),t.proxy(document,"touchend",h)}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],cJlT5:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e,t){const{option:r,constructor:i,template:{$container:n}}=e,a=o.throttle((()=>{e.emit("view",o.isInViewport(n,i.SCROLL_GAP))}),i.SCROLL_TIME);t.proxy(window,"scroll",(()=>{a()})),e.on("view",(t=>{r.autoMini&&(e.mini=!t)}))}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],cKO4X:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("./utils");r.default=class{constructor(e){this.art=e,this.keys={},e.once("video:loadedmetadata",(()=>{e.option.hotkey&&!o.isMobile&&this.init()}))}init(){const{proxy:e}=this.art.events;this.add(27,(()=>{this.art.fullscreenWeb&&(this.art.fullscreenWeb=!1)})),this.add(32,(()=>{this.art.toggle()})),this.add(37,(()=>{this.art.backward=5})),this.add(38,(()=>{this.art.volume+=.1})),this.add(39,(()=>{this.art.forward=5})),this.add(40,(()=>{this.art.volume-=.1})),e(window,"keydown",(e=>{if(this.art.isFocus){const t=document.activeElement.tagName.toUpperCase(),r=document.activeElement.getAttribute("contenteditable");if("INPUT"!==t&&"TEXTAREA"!==t&&""!==r&&"true"!==r){const t=this.keys[e.keyCode];if(t){e.preventDefault();for(let r=0;r{for(let e=0;e{i.innerText="",o.removeClass(r,"art-notice-show")}),t.NOTICE_TIME)):o.removeClass(r,"art-notice-show")}}},{"./utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],aJ0dF:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./utils"),n=e("./utils/component"),a=o.interopDefault(n);class s extends a.default{constructor(e){super(e),this.name="mask";const{template:t,icons:r,events:o}=e;i.append(t.$state,r.state),o.proxy(t.$state,"click",(()=>e.play()))}}r.default=s},{"./utils":"5yYFo","./utils/component":"5MLcx","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],jx1Wu:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../utils"),n=e("bundle-text:./loading.svg"),a=o.interopDefault(n),s=e("bundle-text:./state.svg"),l=o.interopDefault(s),c=e("bundle-text:./check.svg"),p=o.interopDefault(c),u=e("bundle-text:./play.svg"),d=o.interopDefault(u),f=e("bundle-text:./pause.svg"),h=o.interopDefault(f),m=e("bundle-text:./volume.svg"),g=o.interopDefault(m),y=e("bundle-text:./volume-close.svg"),v=o.interopDefault(y),b=e("bundle-text:./subtitle.svg"),x=o.interopDefault(b),w=e("bundle-text:./screenshot.svg"),j=o.interopDefault(w),k=e("bundle-text:./setting.svg"),M=o.interopDefault(k),S=e("bundle-text:./arrow-left.svg"),I=o.interopDefault(S),F=e("bundle-text:./arrow-right.svg"),$=o.interopDefault(F),T=e("bundle-text:./playback-rate.svg"),E=o.interopDefault(T),C=e("bundle-text:./aspect-ratio.svg"),z=o.interopDefault(C),Y=e("bundle-text:./config.svg"),D=o.interopDefault(Y),P=e("bundle-text:./pip.svg"),R=o.interopDefault(P),A=e("bundle-text:./lock.svg"),O=o.interopDefault(A),L=e("bundle-text:./unlock.svg"),H=o.interopDefault(L),_=e("bundle-text:./fullscreen-off.svg"),N=o.interopDefault(_),J=e("bundle-text:./fullscreen-on.svg"),V=o.interopDefault(J),q=e("bundle-text:./fullscreen-web-off.svg"),W=o.interopDefault(q),B=e("bundle-text:./fullscreen-web-on.svg"),U=o.interopDefault(B);r.default=class{constructor(e){const t={loading:a.default,state:l.default,play:d.default,pause:h.default,check:p.default,volume:g.default,volumeClose:v.default,subtitle:x.default,screenshot:j.default,setting:M.default,pip:R.default,arrowLeft:I.default,arrowRight:$.default,playbackRate:E.default,aspectRatio:z.default,config:D.default,lock:O.default,unlock:H.default,fullscreenOff:N.default,fullscreenOn:V.default,fullscreenWebOff:W.default,fullscreenWebOn:U.default,...e.option.icons};Object.keys(t).forEach((e=>{i.def(this,e,{get:()=>{const r=document.createElement("i");return i.addClass(r,"art-icon"),i.addClass(r,`art-icon-${e}`),i.append(r,t[e]),r}})}))}}},{"../utils":"5yYFo","bundle-text:./loading.svg":"gFMCI","bundle-text:./state.svg":"iYMJD","bundle-text:./check.svg":"hyrDV","bundle-text:./play.svg":"eZys6","bundle-text:./pause.svg":"hITjK","bundle-text:./volume.svg":"hNNiX","bundle-text:./volume-close.svg":"dC2M2","bundle-text:./subtitle.svg":"iCL9K","bundle-text:./screenshot.svg":"9hKk0","bundle-text:./setting.svg":"47p50","bundle-text:./arrow-left.svg":"5je49","bundle-text:./arrow-right.svg":"2HKZ5","bundle-text:./playback-rate.svg":"hdBpQ","bundle-text:./aspect-ratio.svg":"alUG1","bundle-text:./config.svg":"6B4Bn","bundle-text:./pip.svg":"2Ya1d","bundle-text:./lock.svg":"5Bna4","bundle-text:./unlock.svg":"daCyz","bundle-text:./fullscreen-off.svg":"bx7Yh","bundle-text:./fullscreen-on.svg":"fxY8n","bundle-text:./fullscreen-web-off.svg":"96euD","bundle-text:./fullscreen-web-on.svg":"ccnBB","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],gFMCI:[function(e,t,r){t.exports=''},{}],iYMJD:[function(e,t,r){t.exports=''},{}],hyrDV:[function(e,t,r){t.exports=''},{}],eZys6:[function(e,t,r){t.exports=''},{}],hITjK:[function(e,t,r){t.exports=''},{}],hNNiX:[function(e,t,r){t.exports=''},{}],dC2M2:[function(e,t,r){t.exports=''},{}],iCL9K:[function(e,t,r){t.exports=''},{}],"9hKk0":[function(e,t,r){t.exports=''},{}],"47p50":[function(e,t,r){t.exports=''},{}],"5je49":[function(e,t,r){t.exports=''},{}],"2HKZ5":[function(e,t,r){t.exports=''},{}],hdBpQ:[function(e,t,r){t.exports=''},{}],alUG1:[function(e,t,r){t.exports=''},{}],"6B4Bn":[function(e,t,r){t.exports=''},{}],"2Ya1d":[function(e,t,r){t.exports=''},{}],"5Bna4":[function(e,t,r){t.exports=''},{}],daCyz:[function(e,t,r){t.exports=''},{}],bx7Yh:[function(e,t,r){t.exports=''},{}],fxY8n:[function(e,t,r){t.exports=''},{}],"96euD":[function(e,t,r){t.exports=''},{}],ccnBB:[function(e,t,r){t.exports=''},{}],hdF39:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./flip"),n=o.interopDefault(i),a=e("./aspectRatio"),s=o.interopDefault(a),l=e("./playbackRate"),c=o.interopDefault(l),p=e("./subtitleOffset"),u=o.interopDefault(p),d=e("../utils/component"),f=o.interopDefault(d),h=e("../utils");function m(e,t,r){for(let o=0;o{t.playbackRate&&this.option.push(c.default(e)),t.aspectRatio&&this.option.push(s.default(e)),t.flip&&this.option.push(n.default(e)),t.subtitleOffset&&this.option.push(u.default(e));for(let e=0;e{this.show&&(this.show=!1,this.init(this.option))})),r(i,"click",(t=>{!this.show||h.includeFromEvent(t,e.controls.setting)||h.includeFromEvent(t,this.$parent)||(this.show=!1,this.init(this.option))})))}add(e){"function"==typeof e?this.option.push(e(this.art)):this.option.push(e),this.cache=new Map,this.events.forEach((e=>e())),this.events=[],this.$parent.innerHTML="",this.option=m(this.option),this.init(this.option)}creatHeader(e){const{icons:t,events:{proxy:r}}=this.art,o=document.createElement("div");h.addClass(o,"art-setting-item"),h.addClass(o,"art-setting-item-back");const i=h.append(o,'
'),n=document.createElement("div");h.addClass(n,"art-setting-item-left-icon"),h.append(n,t.arrowLeft),h.append(i,n),h.append(i,e._parentItem.html);const a=r(o,"click",(()=>{this.init(e._parentList)}));return this.events.push(a),o}creatItem(e){const{icons:t,events:{proxy:r}}=this.art,o=e.selector&&e.selector.length,i=document.createElement("div");h.addClass(i,"art-setting-item"),e.default&&h.addClass(i,"art-current");const n=h.append(i,'
'),a=h.append(i,'
'),s=document.createElement("div");h.addClass(s,"art-setting-item-left-icon"),h.append(s,o?e.icon||t.config:t.check),h.append(n,s),e._$icon=s,h.def(e,"icon",{get:()=>s.innerHTML,set(e){"string"!=typeof e&&"number"!=typeof e||(s.innerHTML=e)}});const l=document.createElement("div");if(h.addClass(l,"art-setting-item-left-text"),h.append(l,e.html||""),h.append(n,l),e._$html=l,h.def(e,"html",{get:()=>l.innerHTML,set(e){"string"!=typeof e&&"number"!=typeof e||(l.innerHTML=e)}}),o){const r=document.createElement("div");h.addClass(r,"art-setting-item-right-tooltip"),h.append(r,e.tooltip||""),h.append(a,r),e._$tooltip=r,h.def(e,"tooltip",{get:()=>r.innerHTML,set(e){"string"!=typeof e&&"number"!=typeof e||(r.innerHTML=e)}});const o=document.createElement("div");h.addClass(o,"art-setting-item-right-icon"),h.append(o,t.arrowRight),h.append(a,o)}const c=r(i,"click",(async t=>{if(o)this.init(e.selector,e.width);else if(h.inverseClass(i,"art-current"),e._parentList&&this.init(e._parentList),e._parentItem&&e._parentItem.onSelect){const r=await e._parentItem.onSelect.call(this.art,e,i,t);e._parentItem._$tooltip&&("string"!=typeof r&&"number"!=typeof r||(e._parentItem._$tooltip.innerHTML=r))}}));return this.events.push(c),i}init(e,t){const{constructor:r}=this.art;if(this.cache.has(e)){const t=this.cache.get(e);h.inverseClass(t,"art-current"),h.setStyle(this.$parent,"width",`${t.dataset.width}px`),h.setStyle(this.$parent,"height",`${t.dataset.height}px`)}else{const o=document.createElement("div");h.addClass(o,"art-setting-panel"),o.dataset.width=t||r.SETTING_WIDTH,o.dataset.height=e.length*r.SETTING_ITEM_HEIGHT,e[0]&&e[0]._parentItem&&(h.append(o,this.creatHeader(e[0])),o.dataset.height=Number(o.dataset.height)+r.SETTING_ITEM_HEIGHT);for(let t=0;te.dataset.value===i));a&&o.inverseClass(a,"art-current")}return{width:i.SETTING_ITEM_WIDTH,html:t.get("Video Flip"),tooltip:t.get(n[e.flip]),icon:r.config,selector:Object.keys(n).map((r=>({value:r,default:r===e.flip,html:t.get(n[r])}))),onSelect(t){e.flip=t.value},mounted:(t,r)=>{a(t,r._$tooltip,e.flip),e.on("flip",(()=>{a(t,r._$tooltip,e.flip)}))}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],jTfLi:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{i18n:t,icons:r,constructor:i}=e;function n(e){return"default"===e?t.get("Default"):e}function a(e,t,r){t&&(t.innerText=n(r));const i=o.queryAll(".art-setting-item",e).find((e=>e.dataset.value===r));i&&o.inverseClass(i,"art-current")}return{width:i.SETTING_ITEM_WIDTH,html:t.get("Aspect Ratio"),icon:r.aspectRatio,tooltip:n(e.aspectRatio),selector:["default","4:3","16:9"].map((t=>({value:t,default:t===e.aspectRatio,html:n(t)}))),onSelect(t){e.aspectRatio=t.value},mounted:(t,r)=>{a(t,r._$tooltip,e.aspectRatio),e.on("aspectRatio",(()=>{a(t,r._$tooltip,e.aspectRatio)}))}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],aowja:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{i18n:t,icons:r,constructor:i}=e;function n(e){return 1===e?t.get("Normal"):e}function a(e,t,r){t&&(t.innerText=n(r));const i=o.queryAll(".art-setting-item",e).find((e=>Number(e.dataset.value)===r));i&&o.inverseClass(i,"art-current")}return{width:i.SETTING_ITEM_WIDTH,html:t.get("Play Speed"),tooltip:n(e.playbackRate),icon:r.playbackRate,selector:[.5,.75,1,1.25,1.5,2].map((t=>({value:t,default:t===e.playbackRate,html:n(t)}))),onSelect(t){e.playbackRate=t.value},mounted:(t,r)=>{a(t,r._$tooltip,e.playbackRate),e.on("playbackRate",(()=>{a(t,r._$tooltip,e.playbackRate)}))}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],aPjJK:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{i18n:t,icons:r,constructor:i}=e;function n(e){return 0===e?t.get("Normal"):e}function a(e,t,r){t&&(t.innerText=n(r));const i=o.queryAll(".art-setting-item",e).find((e=>Number(e.dataset.value)===r));i&&o.inverseClass(i,"art-current")}return{width:i.SETTING_ITEM_WIDTH,html:t.get("Subtitle Offset"),tooltip:n(e.subtitleOffset),icon:r.subtitle,selector:[-5,-4,-3,-2,-1,0,1,2,3,4,5].map((t=>({value:t,default:t===e.subtitleOffset,html:n(t)}))),onSelect(t){e.subtitleOffset=t.value},mounted:(t,r)=>{a(t,r._$tooltip,e.subtitleOffset),e.on("subtitleOffset",(()=>{a(t,r._$tooltip,e.subtitleOffset)}))}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],bCcu0:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);r.default=class{constructor(){this.name="artplayer_settings",this.settings={}}get(e){try{const t=JSON.parse(window.localStorage.getItem(this.name))||{};return e?t[e]:t}catch(t){return e?this.settings[e]:this.settings}}set(e,t){try{const r=Object.assign({},this.get(),{[e]:t});window.localStorage.setItem(this.name,JSON.stringify(r))}catch(r){this.settings[e]=t}}del(e){try{const t=this.get();delete t[e],window.localStorage.setItem(this.name,JSON.stringify(t))}catch(t){delete this.settings[e]}}clear(){try{window.localStorage.removeItem(this.name)}catch(e){this.settings={}}}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"1v13t":[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../utils"),n=e("./miniProgressBar"),a=o.interopDefault(n),s=e("./autoOrientation"),l=o.interopDefault(s),c=e("./autoPlayback"),p=o.interopDefault(c),u=e("./fastForward"),d=o.interopDefault(u),f=e("./lock"),h=o.interopDefault(f);r.default=class{constructor(e){this.art=e,this.id=0;const{option:t}=e;t.miniProgressBar&&!t.isLive&&this.add(a.default),t.lock&&i.isMobile&&this.add(h.default),t.autoPlayback&&this.add(p.default),t.autoOrientation&&i.isMobile&&this.add(l.default),t.fastForward&&i.isMobile&&!t.isLive&&this.add(d.default);for(let e=0;e{e.layers.add({name:"miniProgressBar",mounted(t){e.on("destroy",(()=>{t.style.display="none"})),e.on("video:timeupdate",(()=>{t.style.width=100*e.played+"%"})),e.on("setBar",((e,r)=>{"played"===e&&(t.style.width=100*r+"%")}))}})})),{name:"miniProgressBar"}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],bcdCk:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{option:t,constructor:r,template:{$player:i,$video:n}}=e;return e.on("fullscreenWeb",(a=>{if(a){const{videoWidth:t,videoHeight:a}=n,{clientWidth:s,clientHeight:l}=document.documentElement;(t>a&&sl)&&setTimeout((()=>{o.setStyle(i,"width",`${l}px`),o.setStyle(i,"height",`${s}px`),o.setStyle(i,"transform-origin","0 0"),o.setStyle(i,"transform",`rotate(90deg) translate(0, -${s}px)`),o.addClass(i,"art-auto-orientation"),e.emit("resize")}),r.MOBILE_AUTO_ORIENTATION_TIME)}else o.hasClass(i,"art-auto-orientation")&&(o.setStyle(i,"width",null),o.setStyle(i,"height",null),o.setStyle(i,"transform",null),o.setStyle(i,"transform-origin",null),o.removeClass(i,"art-auto-orientation"),e.aspectRatioReset=!0,e.autoSize=t.autoSize,e.notice.show="",e.emit("resize"))})),e.on("fullscreen",(async e=>{const t=screen.orientation.type;if(e){const{videoWidth:e,videoHeight:r}=n,{clientWidth:a,clientHeight:s}=document.documentElement;if(e>r&&as){const e=t.startsWith("portrait")?"landscape":"portrait";await screen.orientation.lock(e),o.addClass(i,"art-auto-orientation-fullscreen")}}else o.hasClass(i,"art-auto-orientation-fullscreen")&&(await screen.orientation.lock(t),o.removeClass(i,"art-auto-orientation-fullscreen"))})),{name:"autoOrientation",get state(){return o.hasClass(i,"art-auto-orientation")}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"1nHHC":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{i18n:t,storage:r,constructor:i,template:{$poster:n}}=e;return e.on("video:timeupdate",(()=>{const t=r.get("times")||{},o=Object.keys(t);o.length>i.AUTO_PLAYBACK_MAX&&delete t[o[0]],t[e.option.url]=e.currentTime,r.set("times",t)})),e.on("ready",(()=>{const i=(r.get("times")||{})[e.option.url];i&&(e.seek=i,o.setStyle(n,"display","none"),e.notice.show=`${t.get("Auto playback at")} ${o.secondToTime(i)}`)})),{name:"autoPlayback",get times(){return r.get("times")||{}},clear:()=>r.del("times")}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"4gkmX":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{constructor:t,events:{proxy:r},template:{$player:i,$video:n}}=e;let a=null,s=!1;const l=()=>{clearTimeout(a),s&&(s=!1,e.playbackRate=1,o.removeClass(i,"art-fast-forward"))};return r(n,"touchstart",(r=>{1===r.touches.length&&e.playing&&(a=setTimeout((()=>{s=!0,e.playbackRate=t.FAST_FORWARD_VALUE,o.addClass(i,"art-fast-forward")}),t.FAST_FORWARD_TIME))})),r(document,"touchmove",l),r(document,"touchend",l),{name:"fastForward",get state(){return o.hasClass(i,"art-fast-forward")}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],ij5nM:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{layers:t,icons:r,template:{$player:i}}=e;return t.add({name:"lock",mounted(t){const i=o.append(t,r.lock),n=o.append(t,r.unlock);o.setStyle(i,"display","none"),e.on("lock",(e=>{e?(o.setStyle(i,"display","inline-flex"),o.setStyle(n,"display","none")):(o.setStyle(i,"display","none"),o.setStyle(n,"display","inline-flex"))}))},click(){o.hasClass(i,"art-lock")?(o.removeClass(i,"art-lock"),e.emit("lock",!1)):(o.addClass(i,"art-lock"),e.emit("lock",!0))}}),{name:"lock",get state(){return o.hasClass(i,"art-lock")}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],jXgJj:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);r.default=class{constructor(e){this.art=e,this.init()}get current(){return this.art.option.ads[this.index]}get prev(){return this.art.option.ads[this.index-1]}get next(){return this.art.option.ads[this.index+1]}init(){this.index=0,this.isEnd=!1,this.playing=!1,this.urlCache=this.art.option.url,this.current&&(this.playing=!0,this.play(this.current))}play(e={}){this.isEnd||(this.art.switchUrl(e.url),this.art.once("video:timeupdate",(()=>{this.art.emit("ads:start",e)})),this.art.once("video:ended",(()=>{const e=this.next;e?(this.index+=1,this.play(e)):this.end()})))}end(){this.isEnd||(this.isEnd=!0,this.playing=!1,this.art.option.url=this.urlCache,this.art.switchUrl(this.urlCache),this.art.emit("ads:end"))}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],eD5Ch:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./config"),n=o.interopDefault(i),a=e("./utils");r.default=class{constructor(e){const{option:t,events:{proxy:r},template:{$video:o}}=e;for(let t=0;t{e.emit(`video:${t.type}`,t)}));Object.keys(t.moreVideoAttr).forEach((e=>{o[e]=t.moreVideoAttr[e]})),t.muted&&(o.muted=t.muted),t.volume&&(o.volume=a.clamp(t.volume,0,1)),t.poster&&(o.poster=t.poster),t.autoplay&&(o.autoplay=t.autoplay),t.playsInline&&(o.playsInline=!0,o["webkit-playsinline"]=!0);const i=t.type||a.getExt(t.url),s=t.customType[i];i&&s?(s(o,t.url,e),e.emit("customType",i)):(o.src=t.url,e.emit("url",o.src))}}},{"./config":"ej4fZ","./utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}]},["E13ST"],"E13ST"); \ No newline at end of file diff --git a/docs/uncompiled/artplayer-plugin-danmuku/index.js b/docs/uncompiled/artplayer-plugin-danmuku/index.js index 0333891de..ba182e6f0 100644 --- a/docs/uncompiled/artplayer-plugin-danmuku/index.js +++ b/docs/uncompiled/artplayer-plugin-danmuku/index.js @@ -619,7 +619,7 @@ exports.export = function(dest, destName, get) { var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js"); parcelHelpers.defineInteropFlag(exports); function getDanmuTop({ target , emits , clientWidth , clientHeight , marginBottom , marginTop , antiOverlap , }) { - const danmus = emits.filter((item)=>item.mode === target.mode && item.top > marginTop && item.top <= clientHeight - marginBottom + const danmus = emits.filter((item)=>item.mode === target.mode && item.top >= marginTop && item.top <= clientHeight - marginBottom ).sort((prev, next)=>prev.top - next.top ); if (danmus.length === 0) return marginTop; @@ -709,7 +709,7 @@ function getDanmuTop({ target , emits , clientWidth , clientHeight , marginBotto exports.default = getDanmuTop; },{"@parcel/transformer-js/src/esmodule-helpers.js":"6SDkN"}],"cDlY2":[function(require,module,exports) { -module.exports = "data:application/javascript,function%20getDanmuTop%28%7B%20target%20%2C%20emits%20%2C%20clientWidth%20%2C%20clientHeight%20%2C%20marginBottom%20%2C%20marginTop%20%2C%20antiOverlap%20%20%7D%29%20%7B%0A%20%20%20%20const%20danmus%20%3D%20emits.filter%28%28item%29%3D%3Eitem.mode%20%3D%3D%3D%20target.mode%20%26%26%20item.top%20%3E%20marginTop%20%26%26%20item.top%20%3C%3D%20clientHeight%20-%20marginBottom%0A%20%20%20%20%29.sort%28%28prev%2C%20next%29%3D%3Eprev.top%20-%20next.top%0A%20%20%20%20%29%3B%0A%20%20%20%20if%20%28danmus.length%20%3D%3D%3D%200%29%20return%20marginTop%3B%0A%20%20%20%20danmus.unshift%28%7B%0A%20%20%20%20%20%20%20%20top%3A%200%2C%0A%20%20%20%20%20%20%20%20left%3A%200%2C%0A%20%20%20%20%20%20%20%20right%3A%200%2C%0A%20%20%20%20%20%20%20%20height%3A%20marginTop%2C%0A%20%20%20%20%20%20%20%20width%3A%20clientWidth%2C%0A%20%20%20%20%20%20%20%20speed%3A%200%2C%0A%20%20%20%20%20%20%20%20distance%3A%20clientWidth%0A%20%20%20%20%7D%29%3B%0A%20%20%20%20danmus.push%28%7B%0A%20%20%20%20%20%20%20%20top%3A%20clientHeight%20-%20marginBottom%2C%0A%20%20%20%20%20%20%20%20left%3A%200%2C%0A%20%20%20%20%20%20%20%20right%3A%200%2C%0A%20%20%20%20%20%20%20%20height%3A%20marginBottom%2C%0A%20%20%20%20%20%20%20%20width%3A%20clientWidth%2C%0A%20%20%20%20%20%20%20%20speed%3A%200%2C%0A%20%20%20%20%20%20%20%20distance%3A%20clientWidth%0A%20%20%20%20%7D%29%3B%0A%20%20%20%20for%28let%20index%20%3D%201%3B%20index%20%3C%20danmus.length%3B%20index%20%2B%3D%201%29%7B%0A%20%20%20%20%20%20%20%20const%20item%20%3D%20danmus%5Bindex%5D%3B%0A%20%20%20%20%20%20%20%20const%20prev%20%3D%20danmus%5Bindex%20-%201%5D%3B%0A%20%20%20%20%20%20%20%20const%20prevBottom%20%3D%20prev.top%20%2B%20prev.height%3B%0A%20%20%20%20%20%20%20%20const%20diff%20%3D%20item.top%20-%20prevBottom%3B%0A%20%20%20%20%20%20%20%20if%20%28diff%20%3E%3D%20target.height%29%20return%20prevBottom%3B%0A%20%20%20%20%7D%0A%20%20%20%20const%20topMap%20%3D%20%5B%5D%3B%0A%20%20%20%20for%28let%20index1%20%3D%201%3B%20index1%20%3C%20danmus.length%20-%201%3B%20index1%20%2B%3D%201%29%7B%0A%20%20%20%20%20%20%20%20const%20item%20%3D%20danmus%5Bindex1%5D%3B%0A%20%20%20%20%20%20%20%20if%20%28topMap.length%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20const%20last%20%3D%20topMap%5BtopMap.length%20-%201%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28last%5B0%5D.top%20%3D%3D%3D%20item.top%29%20last.push%28item%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20else%20topMap.push%28%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20item%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%29%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20topMap.push%28%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20item%0A%20%20%20%20%20%20%20%20%5D%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20if%20%28antiOverlap%29%20switch%28target.mode%29%7B%0A%20%20%20%20%20%20%20%20case%200%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20const%20result%20%3D%20topMap.find%28%28list%29%3D%3E%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20list.every%28%28danmu%29%3D%3E%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20%28clientWidth%20%3C%20danmu.distance%29%20return%20false%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20%28target.speed%20%3C%20danmu.speed%29%20return%20true%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20const%20overlapTime%20%3D%20danmu.right%20%2F%20%28target.speed%20-%20danmu.speed%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20%28overlapTime%20%3E%20danmu.time%29%20return%20true%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20false%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20result%20%26%26%20result%5B0%5D%20%3F%20result%5B0%5D.top%20%3A%20undefined%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20case%201%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20undefined%3B%0A%20%20%20%20%20%20%20%20default%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%7D%0A%20%20%20%20else%20%7B%0A%20%20%20%20%20%20%20%20switch%28target.mode%29%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20case%200%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20topMap.sort%28%28prev%2C%20next%29%3D%3E%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20const%20nextMinRight%20%3D%20Math.min%28...next.map%28%28item%29%3D%3Eitem.right%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20const%20prevMinRight%20%3D%20Math.min%28...prev.map%28%28item%29%3D%3Eitem.right%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20nextMinRight%20%2a%20next.length%20-%20prevMinRight%20%2a%20prev.length%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20case%201%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20topMap.sort%28%28prev%2C%20next%29%3D%3E%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20const%20nextMaxWidth%20%3D%20Math.max%28...next.map%28%28item%29%3D%3Eitem.width%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20const%20prevMaxWidth%20%3D%20Math.max%28...prev.map%28%28item%29%3D%3Eitem.width%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20prevMaxWidth%20%2a%20prev.length%20-%20nextMaxWidth%20%2a%20next.length%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20default%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20return%20topMap%5B0%5D%5B0%5D.top%3B%0A%20%20%20%20%7D%0A%7D%0Aonmessage%20%3D%20%28event%29%3D%3E%7B%0A%20%20%20%20const%20%7B%20data%20%20%7D%20%3D%20event%3B%0A%20%20%20%20const%20top%20%3D%20getDanmuTop%28data%29%3B%0A%20%20%20%20self.postMessage%28%7B%0A%20%20%20%20%20%20%20%20top%2C%0A%20%20%20%20%20%20%20%20id%3A%20data.id%0A%20%20%20%20%7D%29%3B%0A%7D%3B%0A%0A"; +module.exports = "data:application/javascript,function%20getDanmuTop%28%7B%20target%20%2C%20emits%20%2C%20clientWidth%20%2C%20clientHeight%20%2C%20marginBottom%20%2C%20marginTop%20%2C%20antiOverlap%20%20%7D%29%20%7B%0A%20%20%20%20const%20danmus%20%3D%20emits.filter%28%28item%29%3D%3Eitem.mode%20%3D%3D%3D%20target.mode%20%26%26%20item.top%20%3E%3D%20marginTop%20%26%26%20item.top%20%3C%3D%20clientHeight%20-%20marginBottom%0A%20%20%20%20%29.sort%28%28prev%2C%20next%29%3D%3Eprev.top%20-%20next.top%0A%20%20%20%20%29%3B%0A%20%20%20%20if%20%28danmus.length%20%3D%3D%3D%200%29%20return%20marginTop%3B%0A%20%20%20%20danmus.unshift%28%7B%0A%20%20%20%20%20%20%20%20top%3A%200%2C%0A%20%20%20%20%20%20%20%20left%3A%200%2C%0A%20%20%20%20%20%20%20%20right%3A%200%2C%0A%20%20%20%20%20%20%20%20height%3A%20marginTop%2C%0A%20%20%20%20%20%20%20%20width%3A%20clientWidth%2C%0A%20%20%20%20%20%20%20%20speed%3A%200%2C%0A%20%20%20%20%20%20%20%20distance%3A%20clientWidth%0A%20%20%20%20%7D%29%3B%0A%20%20%20%20danmus.push%28%7B%0A%20%20%20%20%20%20%20%20top%3A%20clientHeight%20-%20marginBottom%2C%0A%20%20%20%20%20%20%20%20left%3A%200%2C%0A%20%20%20%20%20%20%20%20right%3A%200%2C%0A%20%20%20%20%20%20%20%20height%3A%20marginBottom%2C%0A%20%20%20%20%20%20%20%20width%3A%20clientWidth%2C%0A%20%20%20%20%20%20%20%20speed%3A%200%2C%0A%20%20%20%20%20%20%20%20distance%3A%20clientWidth%0A%20%20%20%20%7D%29%3B%0A%20%20%20%20for%28let%20index%20%3D%201%3B%20index%20%3C%20danmus.length%3B%20index%20%2B%3D%201%29%7B%0A%20%20%20%20%20%20%20%20const%20item%20%3D%20danmus%5Bindex%5D%3B%0A%20%20%20%20%20%20%20%20const%20prev%20%3D%20danmus%5Bindex%20-%201%5D%3B%0A%20%20%20%20%20%20%20%20const%20prevBottom%20%3D%20prev.top%20%2B%20prev.height%3B%0A%20%20%20%20%20%20%20%20const%20diff%20%3D%20item.top%20-%20prevBottom%3B%0A%20%20%20%20%20%20%20%20if%20%28diff%20%3E%3D%20target.height%29%20return%20prevBottom%3B%0A%20%20%20%20%7D%0A%20%20%20%20const%20topMap%20%3D%20%5B%5D%3B%0A%20%20%20%20for%28let%20index1%20%3D%201%3B%20index1%20%3C%20danmus.length%20-%201%3B%20index1%20%2B%3D%201%29%7B%0A%20%20%20%20%20%20%20%20const%20item%20%3D%20danmus%5Bindex1%5D%3B%0A%20%20%20%20%20%20%20%20if%20%28topMap.length%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20const%20last%20%3D%20topMap%5BtopMap.length%20-%201%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28last%5B0%5D.top%20%3D%3D%3D%20item.top%29%20last.push%28item%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20else%20topMap.push%28%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20item%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%29%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20topMap.push%28%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20item%0A%20%20%20%20%20%20%20%20%5D%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20if%20%28antiOverlap%29%20switch%28target.mode%29%7B%0A%20%20%20%20%20%20%20%20case%200%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20const%20result%20%3D%20topMap.find%28%28list%29%3D%3E%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20list.every%28%28danmu%29%3D%3E%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20%28clientWidth%20%3C%20danmu.distance%29%20return%20false%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20%28target.speed%20%3C%20danmu.speed%29%20return%20true%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20const%20overlapTime%20%3D%20danmu.right%20%2F%20%28target.speed%20-%20danmu.speed%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20%28overlapTime%20%3E%20danmu.time%29%20return%20true%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20false%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20result%20%26%26%20result%5B0%5D%20%3F%20result%5B0%5D.top%20%3A%20undefined%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20case%201%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20undefined%3B%0A%20%20%20%20%20%20%20%20default%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%7D%0A%20%20%20%20else%20%7B%0A%20%20%20%20%20%20%20%20switch%28target.mode%29%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20case%200%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20topMap.sort%28%28prev%2C%20next%29%3D%3E%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20const%20nextMinRight%20%3D%20Math.min%28...next.map%28%28item%29%3D%3Eitem.right%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20const%20prevMinRight%20%3D%20Math.min%28...prev.map%28%28item%29%3D%3Eitem.right%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20nextMinRight%20%2a%20next.length%20-%20prevMinRight%20%2a%20prev.length%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20case%201%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20topMap.sort%28%28prev%2C%20next%29%3D%3E%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20const%20nextMaxWidth%20%3D%20Math.max%28...next.map%28%28item%29%3D%3Eitem.width%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20const%20prevMaxWidth%20%3D%20Math.max%28...prev.map%28%28item%29%3D%3Eitem.width%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20prevMaxWidth%20%2a%20prev.length%20-%20nextMaxWidth%20%2a%20next.length%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20default%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20return%20topMap%5B0%5D%5B0%5D.top%3B%0A%20%20%20%20%7D%0A%7D%0Aonmessage%20%3D%20%28event%29%3D%3E%7B%0A%20%20%20%20const%20%7B%20data%20%20%7D%20%3D%20event%3B%0A%20%20%20%20const%20top%20%3D%20getDanmuTop%28data%29%3B%0A%20%20%20%20self.postMessage%28%7B%0A%20%20%20%20%20%20%20%20top%2C%0A%20%20%20%20%20%20%20%20id%3A%20data.id%0A%20%20%20%20%7D%29%3B%0A%7D%3B%0A%0A"; },{}]},["gEVO5"], "gEVO5", "parcelRequire93cf") diff --git a/docs/uncompiled/artplayer-plugin-danmuku/index.js.map b/docs/uncompiled/artplayer-plugin-danmuku/index.js.map index 2805d107a..26c8928f0 100644 --- a/docs/uncompiled/artplayer-plugin-danmuku/index.js.map +++ b/docs/uncompiled/artplayer-plugin-danmuku/index.js.map @@ -1 +1 @@ -{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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GAAG,CAAC,CAAC,IAAI,GAAK,IAAI,CAAC,KAAK;oBAAA,CAAC,CAAC,AAAC;oBACjE,OAAO,YAAY,GAAG,IAAI,CAAC,MAAM,GAAG,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC;iBAClE,CAAC,CAAC;gBACH,MAAM;YACV;gBACI,MAAM;SACb;QAED,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;KAC3B;CACJ;kBAxGuB,WAAW;;;ACAnC,MAAM,CAAC,OAAO,GAAG,kBAAkB,CAAC","sources":["src/index.js","src/danmuku.js","src/bilibili.js","../../node_modules/@parcel/transformer-js/src/esmodule-helpers.js","src/getDanmuTop.js","../../node_modules/@parcel/runtime-js/lib/bundles/runtime-5395621aae5f7f00.js"],"sourcesContent":["import Danmuku from './danmuku';\n\nexport default function artplayerPluginDanmuku(option) {\n return (art) => {\n const danmuku = new Danmuku(art, option);\n return {\n name: 'artplayerPluginDanmuku',\n emit: danmuku.emit.bind(danmuku),\n config: danmuku.config.bind(danmuku),\n hide: danmuku.hide.bind(danmuku),\n show: danmuku.show.bind(danmuku),\n get isHide() {\n return danmuku.isHide;\n },\n };\n };\n}\n\nwindow['artplayerPluginDanmuku'] = artplayerPluginDanmuku;\n","import { bilibiliDanmuParseFromUrl } from './bilibili';\nimport getDanmuTop from './getDanmuTop';\n\nexport default class Danmuku {\n constructor(art, option) {\n const { constructor, template } = art;\n\n this.utils = constructor.utils;\n this.validator = constructor.validator;\n this.$danmuku = template.$danmuku;\n this.$player = template.$player;\n\n this.art = art;\n this.queue = [];\n this.option = {};\n this.$refs = [];\n this.isStop = false;\n this.isHide = false;\n this.timer = null;\n this.config(option);\n\n if (this.option.useWorker) {\n try {\n this.worker = new Worker(new URL('data-url:./worker.js', import.meta.url));\n } catch (error) {\n //\n }\n }\n\n art.on('video:play', this.start.bind(this));\n art.on('video:playing', this.start.bind(this));\n art.on('video:pause', this.stop.bind(this));\n art.on('video:waiting', this.stop.bind(this));\n art.on('fullscreen', this.reset.bind(this));\n art.on('fullscreenWeb', this.reset.bind(this));\n art.on('destroy', this.stop.bind(this));\n\n this.load();\n }\n\n static get option() {\n return {\n danmuku: [],\n speed: 5,\n margin: [10, 100],\n opacity: 1,\n fontSize: 25,\n filter: () => true,\n antiOverlap: true,\n useWorker: true,\n synchronousPlayback: false,\n };\n }\n\n static get scheme() {\n return {\n danmuku: 'array|function|string',\n speed: 'number',\n margin: 'array',\n opacity: 'number',\n fontSize: 'number',\n filter: 'function',\n antiOverlap: 'boolean',\n useWorker: 'boolean',\n synchronousPlayback: 'boolean',\n };\n }\n\n get isRotate() {\n return this.art.plugins.autoOrientation && this.art.plugins.autoOrientation.state;\n }\n\n get marginTop() {\n const { clamp } = this.utils;\n const { $player } = this.art.template;\n const value = this.option.margin[0];\n\n if (typeof value === 'number') {\n return clamp(value, 0, $player.clientHeight);\n }\n\n if (typeof value === 'string' && value.endsWith('%')) {\n const ratio = parseFloat(value) / 100;\n return clamp($player.clientHeight * ratio, 0, $player.clientHeight);\n }\n\n return Danmuku.option.margin[0];\n }\n\n get marginBottom() {\n const { clamp } = this.utils;\n const { $player } = this.art.template;\n const value = this.option.margin[1];\n\n if (typeof value === 'number') {\n return clamp(value, 0, $player.clientHeight);\n }\n\n if (typeof value === 'string' && value.endsWith('%')) {\n const ratio = parseFloat(value) / 100;\n return clamp($player.clientHeight * ratio, 0, $player.clientHeight);\n }\n\n return Danmuku.option.margin[1];\n }\n\n filter(state, callback) {\n return this.queue.filter((danmu) => danmu.$state === state).map(callback);\n }\n\n getLeft($ref) {\n const rect = $ref.getBoundingClientRect();\n return this.isRotate ? rect.top : rect.left;\n }\n\n getRef() {\n const $refCache = this.$refs.pop();\n if ($refCache) return $refCache;\n\n const $ref = document.createElement('div');\n\n $ref.style.cssText = `\n user-select: none;\n position: absolute;\n white-space: pre;\n pointer-events: none;\n perspective: 500px;\n display: inline-block;\n will-change: transform;\n font-weight: normal;\n line-height: 1.125;\n visibility: hidden;\n font-family: SimHei, \"Microsoft JhengHei\", Arial, Helvetica, sans-serif;\n text-shadow: rgb(0, 0, 0) 1px 0px 1px, rgb(0, 0, 0) 0px 1px 1px, rgb(0, 0, 0) 0px -1px 1px, rgb(0, 0, 0) -1px 0px 1px;\n `;\n\n return $ref;\n }\n\n getReady() {\n const { currentTime } = this.art;\n return this.queue.filter((danmu) => {\n return (\n danmu.$state === 'ready' ||\n (danmu.$state === 'wait' && currentTime + 0.1 >= danmu.time && danmu.time >= currentTime - 0.1)\n );\n });\n }\n\n getEmits() {\n const result = [];\n const { clientWidth } = this.$player;\n const clientLeft = this.getLeft(this.$player);\n\n this.filter('emit', (danmu) => {\n const top = danmu.$ref.offsetTop;\n const left = this.getLeft(danmu.$ref) - clientLeft;\n const height = danmu.$ref.clientHeight;\n const width = danmu.$ref.clientWidth;\n const distance = left + width;\n const right = clientWidth - distance;\n const speed = distance / danmu.$restTime;\n\n const emit = {};\n emit.top = top;\n emit.left = left;\n emit.height = height;\n emit.width = width;\n emit.right = right;\n emit.speed = speed;\n emit.distance = distance;\n emit.time = danmu.$restTime;\n emit.mode = danmu.mode;\n\n result.push(emit);\n });\n\n return result;\n }\n\n postMessage(message = {}) {\n return new Promise((resolve) => {\n if (this.option.useWorker && this.worker && this.worker.postMessage) {\n message.id = Date.now();\n this.worker.postMessage(message);\n this.worker.onmessage = (event) => {\n const { data } = event;\n if (data.id === message.id) {\n resolve(data);\n }\n };\n } else {\n const top = getDanmuTop(message);\n resolve({ top });\n }\n });\n }\n\n async load() {\n try {\n let danmus = [];\n if (typeof this.option.danmuku === 'function') {\n danmus = await this.option.danmuku();\n } else if (typeof this.option.danmuku.then === 'function') {\n danmus = await this.option.danmuku;\n } else if (typeof this.option.danmuku === 'string') {\n danmus = await bilibiliDanmuParseFromUrl(this.option.danmuku);\n } else {\n danmus = this.option.danmuku;\n }\n\n this.utils.errorHandle(Array.isArray(danmus), 'Danmuku need return an array as result');\n this.art.emit('artplayerPluginDanmuku:loaded', danmus);\n\n this.queue = [];\n this.$danmuku.innerText = '';\n danmus.forEach((danmu) => this.emit(danmu));\n } catch (error) {\n this.art.emit('artplayerPluginDanmuku:error', error);\n throw error;\n }\n\n return this;\n }\n\n config(option) {\n const { clamp } = this.utils;\n\n this.option = Object.assign({}, Danmuku.option, this.option, option);\n this.validator(this.option, Danmuku.scheme);\n if (option.fontSize) this.reset();\n\n this.option.speed = clamp(this.option.speed, 1, 10);\n this.option.opacity = clamp(this.option.opacity, 0, 1);\n this.option.fontSize = clamp(this.option.fontSize, 12, 100);\n\n this.art.emit('artplayerPluginDanmuku:config', this.option);\n\n return this;\n }\n\n makeWait(danmu) {\n danmu.$state = 'wait';\n if (danmu.$ref) {\n danmu.$ref.style.visibility = 'hidden';\n danmu.$ref.style.marginLeft = '0px';\n danmu.$ref.style.transform = 'translateX(0px)';\n danmu.$ref.style.transition = 'transform 0s linear 0s';\n this.$refs.push(danmu.$ref);\n danmu.$ref = null;\n }\n }\n\n continue() {\n const { clientWidth } = this.$player;\n this.filter('stop', (danmu) => {\n danmu.$state = 'emit';\n danmu.$lastStartTime = Date.now();\n switch (danmu.mode) {\n case 0: {\n const translateX = clientWidth + danmu.$ref.clientWidth;\n danmu.$ref.style.transform = `translateX(${-translateX}px)`;\n danmu.$ref.style.transition = `transform ${danmu.$restTime}s linear 0s`;\n break;\n }\n default:\n break;\n }\n });\n\n return this;\n }\n\n suspend() {\n const { clientWidth } = this.$player;\n this.filter('emit', (danmu) => {\n danmu.$state = 'stop';\n switch (danmu.mode) {\n case 0: {\n const translateX = clientWidth - (this.getLeft(danmu.$ref) - this.getLeft(this.$player));\n danmu.$ref.style.transform = `translateX(${-translateX}px)`;\n danmu.$ref.style.transition = 'transform 0s linear 0s';\n break;\n }\n default:\n break;\n }\n });\n\n return this;\n }\n\n reset() {\n this.queue.forEach((danmu) => this.makeWait(danmu));\n }\n\n update() {\n const { clientWidth } = this.$player;\n\n this.timer = window.requestAnimationFrame(async () => {\n if (this.art.playing && !this.isHide) {\n this.filter('emit', (danmu) => {\n const emitTime = (Date.now() - danmu.$lastStartTime) / 1000;\n danmu.$restTime -= emitTime;\n danmu.$lastStartTime = Date.now();\n if (danmu.$restTime <= 0) {\n this.makeWait(danmu);\n }\n });\n\n const readys = this.getReady();\n for (let index = 0; index < readys.length; index++) {\n const danmu = readys[index];\n danmu.$ref = this.getRef();\n danmu.$ref.innerText = danmu.text;\n this.$danmuku.appendChild(danmu.$ref);\n\n danmu.$ref.style.left = `${clientWidth}px`;\n danmu.$ref.style.opacity = this.option.opacity;\n danmu.$ref.style.fontSize = `${this.option.fontSize}px`;\n danmu.$ref.style.color = danmu.color || '#fff';\n danmu.$ref.style.border = danmu.border ? `1px solid ${danmu.color || '#fff'}` : 'none';\n danmu.$ref.style.marginLeft = '0px';\n\n danmu.$lastStartTime = Date.now();\n danmu.$restTime =\n this.option.synchronousPlayback && this.art.playbackRate\n ? this.option.speed / Number(this.art.playbackRate)\n : this.option.speed;\n\n const target = {\n mode: danmu.mode,\n height: danmu.$ref.clientHeight,\n speed: (clientWidth + danmu.$ref.clientWidth) / danmu.$restTime,\n };\n\n const { top } = await this.postMessage({\n target,\n emits: this.getEmits(),\n antiOverlap: this.option.antiOverlap,\n clientWidth: this.$player.clientWidth,\n clientHeight: this.$player.clientHeight,\n marginBottom: this.marginBottom,\n marginTop: this.marginTop,\n });\n\n if (!this.isStop && top !== undefined) {\n danmu.$state = 'emit';\n danmu.$ref.style.visibility = 'visible';\n\n switch (danmu.mode) {\n case 0: {\n danmu.$ref.style.top = `${top}px`;\n const translateX = clientWidth + danmu.$ref.clientWidth;\n danmu.$ref.style.transform = `translateX(${-translateX}px)`;\n danmu.$ref.style.transition = `transform ${danmu.$restTime}s linear 0s`;\n break;\n }\n case 1:\n danmu.$ref.style.left = '50%';\n danmu.$ref.style.top = `${top}px`;\n danmu.$ref.style.marginLeft = `-${danmu.$ref.clientWidth / 2}px`;\n break;\n default:\n break;\n }\n } else {\n danmu.$state = 'ready';\n this.$refs.push(danmu.$ref);\n danmu.$ref = null;\n }\n }\n }\n\n if (!this.isStop) {\n this.update();\n }\n });\n return this;\n }\n\n stop() {\n this.isStop = true;\n this.suspend();\n window.cancelAnimationFrame(this.timer);\n this.art.emit('artplayerPluginDanmuku:stop');\n return this;\n }\n\n start() {\n this.isStop = false;\n this.continue();\n this.update();\n this.art.emit('artplayerPluginDanmuku:start');\n return this;\n }\n\n show() {\n this.isHide = false;\n this.start();\n this.$danmuku.style.display = 'block';\n this.art.emit('artplayerPluginDanmuku:show');\n return this;\n }\n\n hide() {\n this.isHide = true;\n this.stop();\n this.queue.forEach((item) => this.makeWait(item));\n this.$danmuku.style.display = 'none';\n this.art.emit('artplayerPluginDanmuku:hide');\n return this;\n }\n\n emit(danmu) {\n this.validator(danmu, {\n text: 'string',\n mode: 'number|undefined',\n color: 'string|undefined',\n time: 'number|undefined',\n border: 'boolean|undefined',\n });\n\n if (!danmu.text.trim()) return this;\n if (!this.option.filter(danmu)) return this;\n\n if (danmu.time) {\n danmu.time = this.utils.clamp(danmu.time, 0, Infinity);\n } else {\n danmu.time = this.art.currentTime + 1;\n }\n\n this.queue.push({\n mode: 0,\n ...danmu,\n $state: 'wait',\n $ref: null,\n $restTime: 0,\n $lastStartTime: 0,\n });\n\n return this;\n }\n}\n","export function getMode(key) {\n switch (key) {\n case 1:\n case 2:\n case 3:\n return 0;\n case 4:\n case 5:\n return 1;\n default:\n return 0;\n }\n}\n\nexport function bilibiliDanmuParseFromXml(xmlString) {\n if (typeof xmlString !== 'string') return [];\n const srtList = xmlString.match(/[\\S ]*?)<\\/d>/gi);\n return srtList && srtList.length\n ? srtList.map((item) => {\n const [, attrStr, text] = item.match(/(.+)<\\/d>/);\n const attr = attrStr.split(',');\n return attr.length === 8 && text.trim()\n ? {\n text,\n time: Number(attr[0]),\n mode: getMode(Number(attr[1])),\n fontSize: Number(attr[2]),\n color: `#${Number(attr[3]).toString(16)}`,\n timestamp: Number(attr[4]),\n pool: Number(attr[5]),\n userID: attr[6],\n rowID: Number(attr[7]),\n }\n : null;\n })\n : [];\n}\n\nexport function bilibiliDanmuParseFromUrl(url) {\n return fetch(url)\n .then((res) => res.text())\n .then((xmlString) => bilibiliDanmuParseFromXml(xmlString));\n}\n","exports.interopDefault = function (a) {\n return a && a.__esModule ? a : {default: a};\n};\n\nexports.defineInteropFlag = function (a) {\n Object.defineProperty(a, '__esModule', {value: true});\n};\n\nexports.exportAll = function (source, dest) {\n Object.keys(source).forEach(function (key) {\n if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function () {\n return source[key];\n },\n });\n });\n\n return dest;\n};\n\nexports.export = function (dest, destName, get) {\n Object.defineProperty(dest, destName, {\n enumerable: true,\n get: get,\n });\n};\n","export default function getDanmuTop({\n target,\n emits,\n clientWidth,\n clientHeight,\n marginBottom,\n marginTop,\n antiOverlap,\n}) {\n const danmus = emits\n .filter((item) => item.mode === target.mode && item.top > marginTop && item.top <= clientHeight - marginBottom)\n .sort((prev, next) => prev.top - next.top);\n\n if (danmus.length === 0) {\n return marginTop;\n }\n\n danmus.unshift({\n top: 0,\n left: 0,\n right: 0,\n height: marginTop,\n width: clientWidth,\n speed: 0,\n distance: clientWidth,\n });\n\n danmus.push({\n top: clientHeight - marginBottom,\n left: 0,\n right: 0,\n height: marginBottom,\n width: clientWidth,\n speed: 0,\n distance: clientWidth,\n });\n\n for (let index = 1; index < danmus.length; index += 1) {\n const item = danmus[index];\n const prev = danmus[index - 1];\n const prevBottom = prev.top + prev.height;\n const diff = item.top - prevBottom;\n if (diff >= target.height) {\n return prevBottom;\n }\n }\n\n const topMap = [];\n for (let index = 1; index < danmus.length - 1; index += 1) {\n const item = danmus[index];\n if (topMap.length) {\n const last = topMap[topMap.length - 1];\n if (last[0].top === item.top) {\n last.push(item);\n } else {\n topMap.push([item]);\n }\n } else {\n topMap.push([item]);\n }\n }\n\n if (antiOverlap) {\n switch (target.mode) {\n case 0: {\n const result = topMap.find((list) => {\n return list.every((danmu) => {\n if (clientWidth < danmu.distance) return false;\n if (target.speed < danmu.speed) return true;\n const overlapTime = danmu.right / (target.speed - danmu.speed);\n if (overlapTime > danmu.time) return true;\n return false;\n });\n });\n\n return result && result[0] ? result[0].top : undefined;\n }\n case 1:\n return undefined;\n default:\n break;\n }\n } else {\n switch (target.mode) {\n case 0:\n topMap.sort((prev, next) => {\n const nextMinRight = Math.min(...next.map((item) => item.right));\n const prevMinRight = Math.min(...prev.map((item) => item.right));\n return nextMinRight * next.length - prevMinRight * prev.length;\n });\n break;\n case 1:\n topMap.sort((prev, next) => {\n const nextMaxWidth = Math.max(...next.map((item) => item.width));\n const prevMaxWidth = Math.max(...prev.map((item) => item.width));\n return prevMaxWidth * prev.length - nextMaxWidth * next.length;\n });\n break;\n default:\n break;\n }\n\n return topMap[0][0].top;\n }\n}\n","module.exports = \"4eed92ff70f9a7c8\";"],"names":[],"version":3,"file":"index.js.map","sourceRoot":"../../../packages/artplayer-plugin-danmuku/"} \ No newline at end of file +{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAAA,mCAAgC;;AAEjB,SAAS,sBAAsB,CAAC,MAAM,EAAE;IACnD,OAAO,CAAC,GAAG,GAAK;QACZ,MAAM,OAAO,GAAG,IAAI,uBAAO,CAAC,GAAG,EAAE,MAAM,CAAC,AAAC;QACzC,OAAO;YACH,IAAI,EAAE,wBAAwB;YAC9B,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;YAChC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;YACpC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI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anmuTop.js","../../node_modules/@parcel/runtime-js/lib/bundles/runtime-5395621aae5f7f00.js"],"sourcesContent":["import Danmuku from './danmuku';\n\nexport default function artplayerPluginDanmuku(option) {\n return (art) => {\n const danmuku = new Danmuku(art, option);\n return {\n name: 'artplayerPluginDanmuku',\n emit: danmuku.emit.bind(danmuku),\n config: danmuku.config.bind(danmuku),\n hide: danmuku.hide.bind(danmuku),\n show: danmuku.show.bind(danmuku),\n get isHide() {\n return danmuku.isHide;\n },\n };\n };\n}\n\nwindow['artplayerPluginDanmuku'] = artplayerPluginDanmuku;\n","import { bilibiliDanmuParseFromUrl } from './bilibili';\nimport getDanmuTop from './getDanmuTop';\n\nexport default class Danmuku {\n constructor(art, option) {\n const { constructor, template } = art;\n\n this.utils = constructor.utils;\n this.validator = constructor.validator;\n this.$danmuku = template.$danmuku;\n this.$player = template.$player;\n\n this.art = art;\n this.queue = [];\n this.option = {};\n this.$refs = [];\n this.isStop = false;\n this.isHide = false;\n this.timer = null;\n this.config(option);\n\n if (this.option.useWorker) {\n try {\n this.worker = new Worker(new URL('data-url:./worker.js', import.meta.url));\n } catch (error) {\n //\n }\n }\n\n art.on('video:play', this.start.bind(this));\n art.on('video:playing', this.start.bind(this));\n art.on('video:pause', this.stop.bind(this));\n art.on('video:waiting', this.stop.bind(this));\n art.on('fullscreen', this.reset.bind(this));\n art.on('fullscreenWeb', this.reset.bind(this));\n art.on('destroy', this.stop.bind(this));\n\n this.load();\n }\n\n static get option() {\n return {\n danmuku: [],\n speed: 5,\n margin: [10, 100],\n opacity: 1,\n fontSize: 25,\n filter: () => true,\n antiOverlap: true,\n useWorker: true,\n synchronousPlayback: false,\n };\n }\n\n static get scheme() {\n return {\n danmuku: 'array|function|string',\n speed: 'number',\n margin: 'array',\n opacity: 'number',\n fontSize: 'number',\n filter: 'function',\n antiOverlap: 'boolean',\n useWorker: 'boolean',\n synchronousPlayback: 'boolean',\n };\n }\n\n get isRotate() {\n return this.art.plugins.autoOrientation && this.art.plugins.autoOrientation.state;\n }\n\n get marginTop() {\n const { clamp } = this.utils;\n const { $player } = this.art.template;\n const value = this.option.margin[0];\n\n if (typeof value === 'number') {\n return clamp(value, 0, $player.clientHeight);\n }\n\n if (typeof value === 'string' && value.endsWith('%')) {\n const ratio = parseFloat(value) / 100;\n return clamp($player.clientHeight * ratio, 0, $player.clientHeight);\n }\n\n return Danmuku.option.margin[0];\n }\n\n get marginBottom() {\n const { clamp } = this.utils;\n const { $player } = this.art.template;\n const value = this.option.margin[1];\n\n if (typeof value === 'number') {\n return clamp(value, 0, $player.clientHeight);\n }\n\n if (typeof value === 'string' && value.endsWith('%')) {\n const ratio = parseFloat(value) / 100;\n return clamp($player.clientHeight * ratio, 0, $player.clientHeight);\n }\n\n return Danmuku.option.margin[1];\n }\n\n filter(state, callback) {\n return this.queue.filter((danmu) => danmu.$state === state).map(callback);\n }\n\n getLeft($ref) {\n const rect = $ref.getBoundingClientRect();\n return this.isRotate ? rect.top : rect.left;\n }\n\n getRef() {\n const $refCache = this.$refs.pop();\n if ($refCache) return $refCache;\n\n const $ref = document.createElement('div');\n\n $ref.style.cssText = `\n user-select: none;\n position: absolute;\n white-space: pre;\n pointer-events: none;\n perspective: 500px;\n display: inline-block;\n will-change: transform;\n font-weight: normal;\n line-height: 1.125;\n visibility: hidden;\n font-family: SimHei, \"Microsoft JhengHei\", Arial, Helvetica, sans-serif;\n text-shadow: rgb(0, 0, 0) 1px 0px 1px, rgb(0, 0, 0) 0px 1px 1px, rgb(0, 0, 0) 0px -1px 1px, rgb(0, 0, 0) -1px 0px 1px;\n `;\n\n return $ref;\n }\n\n getReady() {\n const { currentTime } = this.art;\n return this.queue.filter((danmu) => {\n return (\n danmu.$state === 'ready' ||\n (danmu.$state === 'wait' && currentTime + 0.1 >= danmu.time && danmu.time >= currentTime - 0.1)\n );\n });\n }\n\n getEmits() {\n const result = [];\n const { clientWidth } = this.$player;\n const clientLeft = this.getLeft(this.$player);\n\n this.filter('emit', (danmu) => {\n const top = danmu.$ref.offsetTop;\n const left = this.getLeft(danmu.$ref) - clientLeft;\n const height = danmu.$ref.clientHeight;\n const width = danmu.$ref.clientWidth;\n const distance = left + width;\n const right = clientWidth - distance;\n const speed = distance / danmu.$restTime;\n\n const emit = {};\n emit.top = top;\n emit.left = left;\n emit.height = height;\n emit.width = width;\n emit.right = right;\n emit.speed = speed;\n emit.distance = distance;\n emit.time = danmu.$restTime;\n emit.mode = danmu.mode;\n\n result.push(emit);\n });\n\n return result;\n }\n\n postMessage(message = {}) {\n return new Promise((resolve) => {\n if (this.option.useWorker && this.worker && this.worker.postMessage) {\n message.id = Date.now();\n this.worker.postMessage(message);\n this.worker.onmessage = (event) => {\n const { data } = event;\n if (data.id === message.id) {\n resolve(data);\n }\n };\n } else {\n const top = getDanmuTop(message);\n resolve({ top });\n }\n });\n }\n\n async load() {\n try {\n let danmus = [];\n if (typeof this.option.danmuku === 'function') {\n danmus = await this.option.danmuku();\n } else if (typeof this.option.danmuku.then === 'function') {\n danmus = await this.option.danmuku;\n } else if (typeof this.option.danmuku === 'string') {\n danmus = await bilibiliDanmuParseFromUrl(this.option.danmuku);\n } else {\n danmus = this.option.danmuku;\n }\n\n this.utils.errorHandle(Array.isArray(danmus), 'Danmuku need return an array as result');\n this.art.emit('artplayerPluginDanmuku:loaded', danmus);\n\n this.queue = [];\n this.$danmuku.innerText = '';\n danmus.forEach((danmu) => this.emit(danmu));\n } catch (error) {\n this.art.emit('artplayerPluginDanmuku:error', error);\n throw error;\n }\n\n return this;\n }\n\n config(option) {\n const { clamp } = this.utils;\n\n this.option = Object.assign({}, Danmuku.option, this.option, option);\n this.validator(this.option, Danmuku.scheme);\n if (option.fontSize) this.reset();\n\n this.option.speed = clamp(this.option.speed, 1, 10);\n this.option.opacity = clamp(this.option.opacity, 0, 1);\n this.option.fontSize = clamp(this.option.fontSize, 12, 100);\n\n this.art.emit('artplayerPluginDanmuku:config', this.option);\n\n return this;\n }\n\n makeWait(danmu) {\n danmu.$state = 'wait';\n if (danmu.$ref) {\n danmu.$ref.style.visibility = 'hidden';\n danmu.$ref.style.marginLeft = '0px';\n danmu.$ref.style.transform = 'translateX(0px)';\n danmu.$ref.style.transition = 'transform 0s linear 0s';\n this.$refs.push(danmu.$ref);\n danmu.$ref = null;\n }\n }\n\n continue() {\n const { clientWidth } = this.$player;\n this.filter('stop', (danmu) => {\n danmu.$state = 'emit';\n danmu.$lastStartTime = Date.now();\n switch (danmu.mode) {\n case 0: {\n const translateX = clientWidth + danmu.$ref.clientWidth;\n danmu.$ref.style.transform = `translateX(${-translateX}px)`;\n danmu.$ref.style.transition = `transform ${danmu.$restTime}s linear 0s`;\n break;\n }\n default:\n break;\n }\n });\n\n return this;\n }\n\n suspend() {\n const { clientWidth } = this.$player;\n this.filter('emit', (danmu) => {\n danmu.$state = 'stop';\n switch (danmu.mode) {\n case 0: {\n const translateX = clientWidth - (this.getLeft(danmu.$ref) - this.getLeft(this.$player));\n danmu.$ref.style.transform = `translateX(${-translateX}px)`;\n danmu.$ref.style.transition = 'transform 0s linear 0s';\n break;\n }\n default:\n break;\n }\n });\n\n return this;\n }\n\n reset() {\n this.queue.forEach((danmu) => this.makeWait(danmu));\n }\n\n update() {\n const { clientWidth } = this.$player;\n\n this.timer = window.requestAnimationFrame(async () => {\n if (this.art.playing && !this.isHide) {\n this.filter('emit', (danmu) => {\n const emitTime = (Date.now() - danmu.$lastStartTime) / 1000;\n danmu.$restTime -= emitTime;\n danmu.$lastStartTime = Date.now();\n if (danmu.$restTime <= 0) {\n this.makeWait(danmu);\n }\n });\n\n const readys = this.getReady();\n for (let index = 0; index < readys.length; index++) {\n const danmu = readys[index];\n danmu.$ref = this.getRef();\n danmu.$ref.innerText = danmu.text;\n this.$danmuku.appendChild(danmu.$ref);\n\n danmu.$ref.style.left = `${clientWidth}px`;\n danmu.$ref.style.opacity = this.option.opacity;\n danmu.$ref.style.fontSize = `${this.option.fontSize}px`;\n danmu.$ref.style.color = danmu.color || '#fff';\n danmu.$ref.style.border = danmu.border ? `1px solid ${danmu.color || '#fff'}` : 'none';\n danmu.$ref.style.marginLeft = '0px';\n\n danmu.$lastStartTime = Date.now();\n danmu.$restTime =\n this.option.synchronousPlayback && this.art.playbackRate\n ? this.option.speed / Number(this.art.playbackRate)\n : this.option.speed;\n\n const target = {\n mode: danmu.mode,\n height: danmu.$ref.clientHeight,\n speed: (clientWidth + danmu.$ref.clientWidth) / danmu.$restTime,\n };\n\n const { top } = await this.postMessage({\n target,\n emits: this.getEmits(),\n antiOverlap: this.option.antiOverlap,\n clientWidth: this.$player.clientWidth,\n clientHeight: this.$player.clientHeight,\n marginBottom: this.marginBottom,\n marginTop: this.marginTop,\n });\n\n if (!this.isStop && top !== undefined) {\n danmu.$state = 'emit';\n danmu.$ref.style.visibility = 'visible';\n\n switch (danmu.mode) {\n case 0: {\n danmu.$ref.style.top = `${top}px`;\n const translateX = clientWidth + danmu.$ref.clientWidth;\n danmu.$ref.style.transform = `translateX(${-translateX}px)`;\n danmu.$ref.style.transition = `transform ${danmu.$restTime}s linear 0s`;\n break;\n }\n case 1:\n danmu.$ref.style.left = '50%';\n danmu.$ref.style.top = `${top}px`;\n danmu.$ref.style.marginLeft = `-${danmu.$ref.clientWidth / 2}px`;\n break;\n default:\n break;\n }\n } else {\n danmu.$state = 'ready';\n this.$refs.push(danmu.$ref);\n danmu.$ref = null;\n }\n }\n }\n\n if (!this.isStop) {\n this.update();\n }\n });\n return this;\n }\n\n stop() {\n this.isStop = true;\n this.suspend();\n window.cancelAnimationFrame(this.timer);\n this.art.emit('artplayerPluginDanmuku:stop');\n return this;\n }\n\n start() {\n this.isStop = false;\n this.continue();\n this.update();\n this.art.emit('artplayerPluginDanmuku:start');\n return this;\n }\n\n show() {\n this.isHide = false;\n this.start();\n this.$danmuku.style.display = 'block';\n this.art.emit('artplayerPluginDanmuku:show');\n return this;\n }\n\n hide() {\n this.isHide = true;\n this.stop();\n this.queue.forEach((item) => this.makeWait(item));\n this.$danmuku.style.display = 'none';\n this.art.emit('artplayerPluginDanmuku:hide');\n return this;\n }\n\n emit(danmu) {\n this.validator(danmu, {\n text: 'string',\n mode: 'number|undefined',\n color: 'string|undefined',\n time: 'number|undefined',\n border: 'boolean|undefined',\n });\n\n if (!danmu.text.trim()) return this;\n if (!this.option.filter(danmu)) return this;\n\n if (danmu.time) {\n danmu.time = this.utils.clamp(danmu.time, 0, Infinity);\n } else {\n danmu.time = this.art.currentTime + 1;\n }\n\n this.queue.push({\n mode: 0,\n ...danmu,\n $state: 'wait',\n $ref: null,\n $restTime: 0,\n $lastStartTime: 0,\n });\n\n return this;\n }\n}\n","export function getMode(key) {\n switch (key) {\n case 1:\n case 2:\n case 3:\n return 0;\n case 4:\n case 5:\n return 1;\n default:\n return 0;\n }\n}\n\nexport function bilibiliDanmuParseFromXml(xmlString) {\n if (typeof xmlString !== 'string') return [];\n const srtList = xmlString.match(/[\\S ]*?)<\\/d>/gi);\n return srtList && srtList.length\n ? srtList.map((item) => {\n const [, attrStr, text] = item.match(/(.+)<\\/d>/);\n const attr = attrStr.split(',');\n return attr.length === 8 && text.trim()\n ? {\n text,\n time: Number(attr[0]),\n mode: getMode(Number(attr[1])),\n fontSize: Number(attr[2]),\n color: `#${Number(attr[3]).toString(16)}`,\n timestamp: Number(attr[4]),\n pool: Number(attr[5]),\n userID: attr[6],\n rowID: Number(attr[7]),\n }\n : null;\n })\n : [];\n}\n\nexport function bilibiliDanmuParseFromUrl(url) {\n return fetch(url)\n .then((res) => res.text())\n .then((xmlString) => bilibiliDanmuParseFromXml(xmlString));\n}\n","exports.interopDefault = function (a) {\n return a && a.__esModule ? a : {default: a};\n};\n\nexports.defineInteropFlag = function (a) {\n Object.defineProperty(a, '__esModule', {value: true});\n};\n\nexports.exportAll = function (source, dest) {\n Object.keys(source).forEach(function (key) {\n if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function () {\n return source[key];\n },\n });\n });\n\n return dest;\n};\n\nexports.export = function (dest, destName, get) {\n Object.defineProperty(dest, destName, {\n enumerable: true,\n get: get,\n });\n};\n","export default function getDanmuTop({\n target,\n emits,\n clientWidth,\n clientHeight,\n marginBottom,\n marginTop,\n antiOverlap,\n}) {\n const danmus = emits\n .filter((item) => item.mode === target.mode && item.top >= marginTop && item.top <= clientHeight - marginBottom)\n .sort((prev, next) => prev.top - next.top);\n\n if (danmus.length === 0) {\n return marginTop;\n }\n\n danmus.unshift({\n top: 0,\n left: 0,\n right: 0,\n height: marginTop,\n width: clientWidth,\n speed: 0,\n distance: clientWidth,\n });\n\n danmus.push({\n top: clientHeight - marginBottom,\n left: 0,\n right: 0,\n height: marginBottom,\n width: clientWidth,\n speed: 0,\n distance: clientWidth,\n });\n\n for (let index = 1; index < danmus.length; index += 1) {\n const item = danmus[index];\n const prev = danmus[index - 1];\n const prevBottom = prev.top + prev.height;\n const diff = item.top - prevBottom;\n if (diff >= target.height) {\n return prevBottom;\n }\n }\n\n const topMap = [];\n for (let index = 1; index < danmus.length - 1; index += 1) {\n const item = danmus[index];\n if (topMap.length) {\n const last = topMap[topMap.length - 1];\n if (last[0].top === item.top) {\n last.push(item);\n } else {\n topMap.push([item]);\n }\n } else {\n topMap.push([item]);\n }\n }\n\n if (antiOverlap) {\n switch (target.mode) {\n case 0: {\n const result = topMap.find((list) => {\n return list.every((danmu) => {\n if (clientWidth < danmu.distance) return false;\n if (target.speed < danmu.speed) return true;\n const overlapTime = danmu.right / (target.speed - danmu.speed);\n if (overlapTime > danmu.time) return true;\n return false;\n });\n });\n\n return result && result[0] ? result[0].top : undefined;\n }\n case 1:\n return undefined;\n default:\n break;\n }\n } else {\n switch (target.mode) {\n case 0:\n topMap.sort((prev, next) => {\n const nextMinRight = Math.min(...next.map((item) => item.right));\n const prevMinRight = Math.min(...prev.map((item) => item.right));\n return nextMinRight * next.length - prevMinRight * prev.length;\n });\n break;\n case 1:\n topMap.sort((prev, next) => {\n const nextMaxWidth = Math.max(...next.map((item) => item.width));\n const prevMaxWidth = Math.max(...prev.map((item) => item.width));\n return prevMaxWidth * prev.length - nextMaxWidth * next.length;\n });\n break;\n default:\n break;\n }\n\n return topMap[0][0].top;\n }\n}\n","module.exports = \"4eed92ff70f9a7c8\";"],"names":[],"version":3,"file":"index.js.map","sourceRoot":"../../../packages/artplayer-plugin-danmuku/"} \ No newline at end of file diff --git a/packages/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js b/packages/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js index 4c8b7acd9..e0bb36cf0 100644 --- a/packages/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js +++ b/packages/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js @@ -1,7 +1,7 @@ /*! - * artplayer-plugin-danmuku.js v4.3.19 + * artplayer-plugin-danmuku.js v4.3.21 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2022 Harvey Zack * Released under the MIT License. */ -!function(t,e,i,r,n){var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},o="function"==typeof s.parcelRequire93cf&&s.parcelRequire93cf,a=o.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function h(e,i){if(!a[e]){if(!t[e]){var r="function"==typeof s.parcelRequire93cf&&s.parcelRequire93cf;if(!i&&r)return r(e,!0);if(o)return o(e,!0);if(l&&"string"==typeof e)return l(e);var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}p.resolve=function(i){var r=t[e][1][i];return null!=r?r:i},p.cache={};var u=a[e]=new h.Module(e);t[e][0].call(u.exports,p,u,u.exports,this)}return a[e].exports;function p(t){var e=p.resolve(t);return!1===e?{}:h(e)}}h.isParcelRequire=!0,h.Module=function(t){this.id=t,this.bundle=h,this.exports={}},h.modules=t,h.cache=a,h.parent=o,h.register=function(e,i){t[e]=[function(t,e){e.exports=i},{}]},Object.defineProperty(h,"root",{get:function(){return s.parcelRequire93cf}}),s.parcelRequire93cf=h;for(var u=0;u{const i=new s.default(e,t);return{name:"artplayerPluginDanmuku",emit:i.emit.bind(i),config:i.config.bind(i),hide:i.hide.bind(i),show:i.show.bind(i),get isHide(){return i.isHide}}}}i.default=o,window.artplayerPluginDanmuku=o},{"./danmuku":"8Gtnh","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"8Gtnh":[function(t,e,i){var r=t("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(i);var n=t("./bilibili"),s=t("./getDanmuTop"),o=r.interopDefault(s);class a{constructor(e,i){const{constructor:r,template:n}=e;if(this.utils=r.utils,this.validator=r.validator,this.$danmuku=n.$danmuku,this.$player=n.$player,this.art=e,this.queue=[],this.option={},this.$refs=[],this.isStop=!1,this.isHide=!1,this.timer=null,this.config(i),this.option.useWorker)try{this.worker=new Worker(t("85d40535eae5f839"))}catch(t){}e.on("video:play",this.start.bind(this)),e.on("video:playing",this.start.bind(this)),e.on("video:pause",this.stop.bind(this)),e.on("video:waiting",this.stop.bind(this)),e.on("fullscreen",this.reset.bind(this)),e.on("fullscreenWeb",this.reset.bind(this)),e.on("destroy",this.stop.bind(this)),this.load()}static get option(){return{danmuku:[],speed:5,margin:[10,100],opacity:1,fontSize:25,filter:()=>!0,antiOverlap:!0,useWorker:!0,synchronousPlayback:!1}}static get scheme(){return{danmuku:"array|function|string",speed:"number",margin:"array",opacity:"number",fontSize:"number",filter:"function",antiOverlap:"boolean",useWorker:"boolean",synchronousPlayback:"boolean"}}get isRotate(){return this.art.plugins.autoOrientation&&this.art.plugins.autoOrientation.state}get marginTop(){const{clamp:t}=this.utils,{$player:e}=this.art.template,i=this.option.margin[0];if("number"==typeof i)return t(i,0,e.clientHeight);if("string"==typeof i&&i.endsWith("%")){const r=parseFloat(i)/100;return t(e.clientHeight*r,0,e.clientHeight)}return a.option.margin[0]}get marginBottom(){const{clamp:t}=this.utils,{$player:e}=this.art.template,i=this.option.margin[1];if("number"==typeof i)return t(i,0,e.clientHeight);if("string"==typeof i&&i.endsWith("%")){const r=parseFloat(i)/100;return t(e.clientHeight*r,0,e.clientHeight)}return a.option.margin[1]}filter(t,e){return this.queue.filter((e=>e.$state===t)).map(e)}getLeft(t){const e=t.getBoundingClientRect();return this.isRotate?e.top:e.left}getRef(){const t=this.$refs.pop();if(t)return t;const e=document.createElement("div");return e.style.cssText='\n user-select: none;\n position: absolute;\n white-space: pre;\n pointer-events: none;\n perspective: 500px;\n display: inline-block;\n will-change: transform;\n font-weight: normal;\n line-height: 1.125;\n visibility: hidden;\n font-family: SimHei, "Microsoft JhengHei", Arial, Helvetica, sans-serif;\n text-shadow: rgb(0, 0, 0) 1px 0px 1px, rgb(0, 0, 0) 0px 1px 1px, rgb(0, 0, 0) 0px -1px 1px, rgb(0, 0, 0) -1px 0px 1px;\n ',e}getReady(){const{currentTime:t}=this.art;return this.queue.filter((e=>"ready"===e.$state||"wait"===e.$state&&t+.2>=e.time&&e.time>=t-.2))}getEmits(){const t=[],{clientWidth:e}=this.$player,i=this.getLeft(this.$player);return this.filter("emit",(r=>{const n=r.$ref.offsetTop,s=this.getLeft(r.$ref)-i,o=r.$ref.clientHeight,a=r.$ref.clientWidth,l=s+a,h=e-l,u=l/r.$restTime,p={};p.top=n,p.left=s,p.height=o,p.width=a,p.right=h,p.speed=u,p.distance=l,p.time=r.$restTime,p.mode=r.mode,t.push(p)})),t}postMessage(t={}){return new Promise((e=>{if(this.option.useWorker&&this.worker&&this.worker.postMessage)t.id=Date.now(),this.worker.postMessage(t),this.worker.onmessage=i=>{const{data:r}=i;r.id===t.id&&e(r)};else{const i=o.default(t);e({top:i})}}))}async load(){try{let t=[];t="function"==typeof this.option.danmuku?await this.option.danmuku():"function"==typeof this.option.danmuku.then?await this.option.danmuku:"string"==typeof this.option.danmuku?await n.bilibiliDanmuParseFromUrl(this.option.danmuku):this.option.danmuku,this.utils.errorHandle(Array.isArray(t),"Danmuku need return an array as result"),this.art.emit("artplayerPluginDanmuku:loaded",t),this.queue=[],this.$danmuku.innerText="",t.forEach((t=>this.emit(t)))}catch(t){throw this.art.emit("artplayerPluginDanmuku:error",t),t}return this}config(t){const{clamp:e}=this.utils;return this.option=Object.assign({},a.option,this.option,t),this.validator(this.option,a.scheme),t.fontSize&&this.reset(),this.option.speed=e(this.option.speed,1,10),this.option.opacity=e(this.option.opacity,0,1),this.option.fontSize=e(this.option.fontSize,12,100),this.art.emit("artplayerPluginDanmuku:config",this.option),this}makeWait(t){t.$state="wait",t.$ref&&(t.$ref.style.visibility="hidden",t.$ref.style.marginLeft="0px",t.$ref.style.transform="translateX(0px)",t.$ref.style.transition="transform 0s linear 0s",this.$refs.push(t.$ref),t.$ref=null)}continue(){const{clientWidth:t}=this.$player;return this.filter("stop",(e=>{switch(e.$state="emit",e.$lastStartTime=Date.now(),e.mode){case 0:{const i=t+e.$ref.clientWidth;e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition=`transform ${e.$restTime}s linear 0s`;break}}})),this}suspend(){const{clientWidth:t}=this.$player;return this.filter("emit",(e=>{switch(e.$state="stop",e.mode){case 0:{const i=t-(this.getLeft(e.$ref)-this.getLeft(this.$player));e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition="transform 0s linear 0s";break}}})),this}reset(){this.queue.forEach((t=>this.makeWait(t)))}update(){const{clientWidth:t}=this.$player;return this.timer=window.requestAnimationFrame((async()=>{if(this.art.playing&&!this.isHide){this.filter("emit",(t=>{const e=(Date.now()-t.$lastStartTime)/1e3;t.$restTime-=e,t.$lastStartTime=Date.now(),t.$restTime<=0&&this.makeWait(t)}));const e=this.getReady();for(let i=0;ithis.makeWait(t))),this.$danmuku.style.display="none",this.art.emit("artplayerPluginDanmuku:hide"),this}emit(t){return this.validator(t,{text:"string",mode:"number|undefined",color:"string|undefined",time:"number|undefined",border:"boolean|undefined"}),t.text.trim()&&this.option.filter(t)?(t.time?t.time=this.utils.clamp(t.time,0,1/0):t.time=this.art.currentTime+1,this.queue.push({mode:0,...t,$state:"wait",$ref:null,$restTime:0,$lastStartTime:0}),this):this}}i.default=a},{"./bilibili":"KnwDr","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY","85d40535eae5f839":"5sXKb","./getDanmuTop":"2Abxf"}],KnwDr:[function(t,e,i){var r=t("@parcel/transformer-js/src/esmodule-helpers.js");function n(t){switch(t){case 1:case 2:case 3:default:return 0;case 4:case 5:return 1}}function s(t){if("string"!=typeof t)return[];const e=t.match(/[\S ]*?)<\/d>/gi);return e&&e.length?e.map((t=>{const[,e,i]=t.match(/(.+)<\/d>/),r=e.split(",");return 8===r.length&&i.trim()?{text:i,time:Number(r[0]),mode:n(Number(r[1])),fontSize:Number(r[2]),color:`#${Number(r[3]).toString(16)}`,timestamp:Number(r[4]),pool:Number(r[5]),userID:r[6],rowID:Number(r[7])}:null})):[]}function o(t){return fetch(t).then((t=>t.text())).then((t=>s(t)))}r.defineInteropFlag(i),r.export(i,"getMode",(()=>n)),r.export(i,"bilibiliDanmuParseFromXml",(()=>s)),r.export(i,"bilibiliDanmuParseFromUrl",(()=>o))},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],b7MJY:[function(t,e,i){i.interopDefault=function(t){return t&&t.__esModule?t:{default:t}},i.defineInteropFlag=function(t){Object.defineProperty(t,"__esModule",{value:!0})},i.exportAll=function(t,e){return Object.keys(t).forEach((function(i){"default"===i||"__esModule"===i||e.hasOwnProperty(i)||Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[i]}})})),e},i.export=function(t,e,i){Object.defineProperty(t,e,{enumerable:!0,get:i})}},{}],"5sXKb":[function(t,e,i){e.exports="data:application/javascript,function%20getDanmuTop%28%7Btarget%3At%2Cemits%3Ae%2CclientWidth%3An%2CclientHeight%3Ai%2CmarginBottom%3Ao%2CmarginTop%3As%2CantiOverlap%3Ah%7D%29%7Bconst%20r%3De.filter%28%28e%3D%3Ee.mode%3D%3D%3Dt.mode%26%26e.top%3Es%26%26e.top%3C%3Di-o%29%29.sort%28%28%28t%2Ce%29%3D%3Et.top-e.top%29%29%3Bif%280%3D%3D%3Dr.length%29return%20s%3Br.unshift%28%7Btop%3A0%2Cleft%3A0%2Cright%3A0%2Cheight%3As%2Cwidth%3An%2Cspeed%3A0%2Cdistance%3An%7D%29%2Cr.push%28%7Btop%3Ai-o%2Cleft%3A0%2Cright%3A0%2Cheight%3Ao%2Cwidth%3An%2Cspeed%3A0%2Cdistance%3An%7D%29%3Bfor%28let%20e%3D1%3Be%3Cr.length%3Be%2B%3D1%29%7Bconst%20n%3Dr%5Be%5D%2Ci%3Dr%5Be-1%5D%2Co%3Di.top%2Bi.height%3Bif%28n.top-o%3E%3Dt.height%29return%20o%7Dconst%20p%3D%5B%5D%3Bfor%28let%20t%3D1%3Bt%3Cr.length-1%3Bt%2B%3D1%29%7Bconst%20e%3Dr%5Bt%5D%3Bif%28p.length%29%7Bconst%20t%3Dp%5Bp.length-1%5D%3Bt%5B0%5D.top%3D%3D%3De.top%3Ft.push%28e%29%3Ap.push%28%5Be%5D%29%7Delse%20p.push%28%5Be%5D%29%7Dif%28%21h%29%7Bswitch%28t.mode%29%7Bcase%200%3Ap.sort%28%28%28t%2Ce%29%3D%3E%7Bconst%20n%3DMath.min%28...e.map%28%28t%3D%3Et.right%29%29%29%2Ci%3DMath.min%28...t.map%28%28t%3D%3Et.right%29%29%29%3Breturn%20n%2ae.length-i%2at.length%7D%29%29%3Bbreak%3Bcase%201%3Ap.sort%28%28%28t%2Ce%29%3D%3E%7Bconst%20n%3DMath.max%28...e.map%28%28t%3D%3Et.width%29%29%29%3Breturn%20Math.max%28...t.map%28%28t%3D%3Et.width%29%29%29%2at.length-n%2ae.length%7D%29%29%7Dreturn%20p%5B0%5D%5B0%5D.top%7Dswitch%28t.mode%29%7Bcase%200%3A%7Bconst%20e%3Dp.find%28%28e%3D%3Ee.every%28%28e%3D%3E%7Bif%28n%3Ce.distance%29return%211%3Bif%28t.speed%3Ce.speed%29return%210%3Breturn%20e.right%2F%28t.speed-e.speed%29%3Ee.time%7D%29%29%29%29%3Breturn%20e%26%26e%5B0%5D%3Fe%5B0%5D.top%3Avoid%200%7Dcase%201%3Areturn%7D%7Donmessage%3Dt%3D%3E%7Bconst%7Bdata%3Ae%7D%3Dt%2Cn%3DgetDanmuTop%28e%29%3Bself.postMessage%28%7Btop%3An%2Cid%3Ae.id%7D%29%7D%3B"},{}],"2Abxf":[function(t,e,i){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i),i.default=function({target:t,emits:e,clientWidth:i,clientHeight:r,marginBottom:n,marginTop:s,antiOverlap:o}){const a=e.filter((e=>e.mode===t.mode&&e.top>s&&e.top<=r-n)).sort(((t,e)=>t.top-e.top));if(0===a.length)return s;a.unshift({top:0,left:0,right:0,height:s,width:i,speed:0,distance:i}),a.push({top:r-n,left:0,right:0,height:n,width:i,speed:0,distance:i});for(let e=1;e=t.height)return n}const l=[];for(let t=1;t{const i=Math.min(...e.map((t=>t.right))),r=Math.min(...t.map((t=>t.right)));return i*e.length-r*t.length}));break;case 1:l.sort(((t,e)=>{const i=Math.max(...e.map((t=>t.width)));return Math.max(...t.map((t=>t.width)))*t.length-i*e.length}))}return l[0][0].top}switch(t.mode){case 0:{const e=l.find((e=>e.every((e=>{if(ie.time}))));return e&&e[0]?e[0].top:void 0}case 1:return}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}]},["E13ST"],"E13ST"); \ No newline at end of file +!function(t,e,i,r,n){var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},o="function"==typeof s.parcelRequire93cf&&s.parcelRequire93cf,a=o.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function h(e,i){if(!a[e]){if(!t[e]){var r="function"==typeof s.parcelRequire93cf&&s.parcelRequire93cf;if(!i&&r)return r(e,!0);if(o)return o(e,!0);if(l&&"string"==typeof e)return l(e);var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}p.resolve=function(i){var r=t[e][1][i];return null!=r?r:i},p.cache={};var u=a[e]=new h.Module(e);t[e][0].call(u.exports,p,u,u.exports,this)}return a[e].exports;function p(t){var e=p.resolve(t);return!1===e?{}:h(e)}}h.isParcelRequire=!0,h.Module=function(t){this.id=t,this.bundle=h,this.exports={}},h.modules=t,h.cache=a,h.parent=o,h.register=function(e,i){t[e]=[function(t,e){e.exports=i},{}]},Object.defineProperty(h,"root",{get:function(){return s.parcelRequire93cf}}),s.parcelRequire93cf=h;for(var u=0;u{const i=new s.default(e,t);return{name:"artplayerPluginDanmuku",emit:i.emit.bind(i),config:i.config.bind(i),hide:i.hide.bind(i),show:i.show.bind(i),get isHide(){return i.isHide}}}}i.default=o,window.artplayerPluginDanmuku=o},{"./danmuku":"8Gtnh","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"8Gtnh":[function(t,e,i){var r=t("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(i);var n=t("./bilibili"),s=t("./getDanmuTop"),o=r.interopDefault(s);class a{constructor(e,i){const{constructor:r,template:n}=e;if(this.utils=r.utils,this.validator=r.validator,this.$danmuku=n.$danmuku,this.$player=n.$player,this.art=e,this.queue=[],this.option={},this.$refs=[],this.isStop=!1,this.isHide=!1,this.timer=null,this.config(i),this.option.useWorker)try{this.worker=new Worker(t("85d40535eae5f839"))}catch(t){}e.on("video:play",this.start.bind(this)),e.on("video:playing",this.start.bind(this)),e.on("video:pause",this.stop.bind(this)),e.on("video:waiting",this.stop.bind(this)),e.on("fullscreen",this.reset.bind(this)),e.on("fullscreenWeb",this.reset.bind(this)),e.on("destroy",this.stop.bind(this)),this.load()}static get option(){return{danmuku:[],speed:5,margin:[10,100],opacity:1,fontSize:25,filter:()=>!0,antiOverlap:!0,useWorker:!0,synchronousPlayback:!1}}static get scheme(){return{danmuku:"array|function|string",speed:"number",margin:"array",opacity:"number",fontSize:"number",filter:"function",antiOverlap:"boolean",useWorker:"boolean",synchronousPlayback:"boolean"}}get isRotate(){return this.art.plugins.autoOrientation&&this.art.plugins.autoOrientation.state}get marginTop(){const{clamp:t}=this.utils,{$player:e}=this.art.template,i=this.option.margin[0];if("number"==typeof i)return t(i,0,e.clientHeight);if("string"==typeof i&&i.endsWith("%")){const r=parseFloat(i)/100;return t(e.clientHeight*r,0,e.clientHeight)}return a.option.margin[0]}get marginBottom(){const{clamp:t}=this.utils,{$player:e}=this.art.template,i=this.option.margin[1];if("number"==typeof i)return t(i,0,e.clientHeight);if("string"==typeof i&&i.endsWith("%")){const r=parseFloat(i)/100;return t(e.clientHeight*r,0,e.clientHeight)}return a.option.margin[1]}filter(t,e){return this.queue.filter((e=>e.$state===t)).map(e)}getLeft(t){const e=t.getBoundingClientRect();return this.isRotate?e.top:e.left}getRef(){const t=this.$refs.pop();if(t)return t;const e=document.createElement("div");return e.style.cssText='\n user-select: none;\n position: absolute;\n white-space: pre;\n pointer-events: none;\n perspective: 500px;\n display: inline-block;\n will-change: transform;\n font-weight: normal;\n line-height: 1.125;\n visibility: hidden;\n font-family: SimHei, "Microsoft JhengHei", Arial, Helvetica, sans-serif;\n text-shadow: rgb(0, 0, 0) 1px 0px 1px, rgb(0, 0, 0) 0px 1px 1px, rgb(0, 0, 0) 0px -1px 1px, rgb(0, 0, 0) -1px 0px 1px;\n ',e}getReady(){const{currentTime:t}=this.art;return this.queue.filter((e=>"ready"===e.$state||"wait"===e.$state&&t+.1>=e.time&&e.time>=t-.1))}getEmits(){const t=[],{clientWidth:e}=this.$player,i=this.getLeft(this.$player);return this.filter("emit",(r=>{const n=r.$ref.offsetTop,s=this.getLeft(r.$ref)-i,o=r.$ref.clientHeight,a=r.$ref.clientWidth,l=s+a,h=e-l,u=l/r.$restTime,p={};p.top=n,p.left=s,p.height=o,p.width=a,p.right=h,p.speed=u,p.distance=l,p.time=r.$restTime,p.mode=r.mode,t.push(p)})),t}postMessage(t={}){return new Promise((e=>{if(this.option.useWorker&&this.worker&&this.worker.postMessage)t.id=Date.now(),this.worker.postMessage(t),this.worker.onmessage=i=>{const{data:r}=i;r.id===t.id&&e(r)};else{const i=o.default(t);e({top:i})}}))}async load(){try{let t=[];t="function"==typeof this.option.danmuku?await this.option.danmuku():"function"==typeof this.option.danmuku.then?await this.option.danmuku:"string"==typeof this.option.danmuku?await n.bilibiliDanmuParseFromUrl(this.option.danmuku):this.option.danmuku,this.utils.errorHandle(Array.isArray(t),"Danmuku need return an array as result"),this.art.emit("artplayerPluginDanmuku:loaded",t),this.queue=[],this.$danmuku.innerText="",t.forEach((t=>this.emit(t)))}catch(t){throw this.art.emit("artplayerPluginDanmuku:error",t),t}return this}config(t){const{clamp:e}=this.utils;return this.option=Object.assign({},a.option,this.option,t),this.validator(this.option,a.scheme),t.fontSize&&this.reset(),this.option.speed=e(this.option.speed,1,10),this.option.opacity=e(this.option.opacity,0,1),this.option.fontSize=e(this.option.fontSize,12,100),this.art.emit("artplayerPluginDanmuku:config",this.option),this}makeWait(t){t.$state="wait",t.$ref&&(t.$ref.style.visibility="hidden",t.$ref.style.marginLeft="0px",t.$ref.style.transform="translateX(0px)",t.$ref.style.transition="transform 0s linear 0s",this.$refs.push(t.$ref),t.$ref=null)}continue(){const{clientWidth:t}=this.$player;return this.filter("stop",(e=>{switch(e.$state="emit",e.$lastStartTime=Date.now(),e.mode){case 0:{const i=t+e.$ref.clientWidth;e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition=`transform ${e.$restTime}s linear 0s`;break}}})),this}suspend(){const{clientWidth:t}=this.$player;return this.filter("emit",(e=>{switch(e.$state="stop",e.mode){case 0:{const i=t-(this.getLeft(e.$ref)-this.getLeft(this.$player));e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition="transform 0s linear 0s";break}}})),this}reset(){this.queue.forEach((t=>this.makeWait(t)))}update(){const{clientWidth:t}=this.$player;return this.timer=window.requestAnimationFrame((async()=>{if(this.art.playing&&!this.isHide){this.filter("emit",(t=>{const e=(Date.now()-t.$lastStartTime)/1e3;t.$restTime-=e,t.$lastStartTime=Date.now(),t.$restTime<=0&&this.makeWait(t)}));const e=this.getReady();for(let i=0;ithis.makeWait(t))),this.$danmuku.style.display="none",this.art.emit("artplayerPluginDanmuku:hide"),this}emit(t){return this.validator(t,{text:"string",mode:"number|undefined",color:"string|undefined",time:"number|undefined",border:"boolean|undefined"}),t.text.trim()&&this.option.filter(t)?(t.time?t.time=this.utils.clamp(t.time,0,1/0):t.time=this.art.currentTime+1,this.queue.push({mode:0,...t,$state:"wait",$ref:null,$restTime:0,$lastStartTime:0}),this):this}}i.default=a},{"./bilibili":"KnwDr","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY","85d40535eae5f839":"5sXKb","./getDanmuTop":"2Abxf"}],KnwDr:[function(t,e,i){var r=t("@parcel/transformer-js/src/esmodule-helpers.js");function n(t){switch(t){case 1:case 2:case 3:default:return 0;case 4:case 5:return 1}}function s(t){if("string"!=typeof t)return[];const e=t.match(/[\S ]*?)<\/d>/gi);return e&&e.length?e.map((t=>{const[,e,i]=t.match(/(.+)<\/d>/),r=e.split(",");return 8===r.length&&i.trim()?{text:i,time:Number(r[0]),mode:n(Number(r[1])),fontSize:Number(r[2]),color:`#${Number(r[3]).toString(16)}`,timestamp:Number(r[4]),pool:Number(r[5]),userID:r[6],rowID:Number(r[7])}:null})):[]}function o(t){return fetch(t).then((t=>t.text())).then((t=>s(t)))}r.defineInteropFlag(i),r.export(i,"getMode",(()=>n)),r.export(i,"bilibiliDanmuParseFromXml",(()=>s)),r.export(i,"bilibiliDanmuParseFromUrl",(()=>o))},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],b7MJY:[function(t,e,i){i.interopDefault=function(t){return t&&t.__esModule?t:{default:t}},i.defineInteropFlag=function(t){Object.defineProperty(t,"__esModule",{value:!0})},i.exportAll=function(t,e){return Object.keys(t).forEach((function(i){"default"===i||"__esModule"===i||e.hasOwnProperty(i)||Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[i]}})})),e},i.export=function(t,e,i){Object.defineProperty(t,e,{enumerable:!0,get:i})}},{}],"5sXKb":[function(t,e,i){e.exports="data:application/javascript,function%20getDanmuTop%28%7Btarget%3At%2Cemits%3Ae%2CclientWidth%3An%2CclientHeight%3Ai%2CmarginBottom%3Ao%2CmarginTop%3As%2CantiOverlap%3Ah%7D%29%7Bconst%20r%3De.filter%28%28e%3D%3Ee.mode%3D%3D%3Dt.mode%26%26e.top%3E%3Ds%26%26e.top%3C%3Di-o%29%29.sort%28%28%28t%2Ce%29%3D%3Et.top-e.top%29%29%3Bif%280%3D%3D%3Dr.length%29return%20s%3Br.unshift%28%7Btop%3A0%2Cleft%3A0%2Cright%3A0%2Cheight%3As%2Cwidth%3An%2Cspeed%3A0%2Cdistance%3An%7D%29%2Cr.push%28%7Btop%3Ai-o%2Cleft%3A0%2Cright%3A0%2Cheight%3Ao%2Cwidth%3An%2Cspeed%3A0%2Cdistance%3An%7D%29%3Bfor%28let%20e%3D1%3Be%3Cr.length%3Be%2B%3D1%29%7Bconst%20n%3Dr%5Be%5D%2Ci%3Dr%5Be-1%5D%2Co%3Di.top%2Bi.height%3Bif%28n.top-o%3E%3Dt.height%29return%20o%7Dconst%20p%3D%5B%5D%3Bfor%28let%20t%3D1%3Bt%3Cr.length-1%3Bt%2B%3D1%29%7Bconst%20e%3Dr%5Bt%5D%3Bif%28p.length%29%7Bconst%20t%3Dp%5Bp.length-1%5D%3Bt%5B0%5D.top%3D%3D%3De.top%3Ft.push%28e%29%3Ap.push%28%5Be%5D%29%7Delse%20p.push%28%5Be%5D%29%7Dif%28%21h%29%7Bswitch%28t.mode%29%7Bcase%200%3Ap.sort%28%28%28t%2Ce%29%3D%3E%7Bconst%20n%3DMath.min%28...e.map%28%28t%3D%3Et.right%29%29%29%2Ci%3DMath.min%28...t.map%28%28t%3D%3Et.right%29%29%29%3Breturn%20n%2ae.length-i%2at.length%7D%29%29%3Bbreak%3Bcase%201%3Ap.sort%28%28%28t%2Ce%29%3D%3E%7Bconst%20n%3DMath.max%28...e.map%28%28t%3D%3Et.width%29%29%29%3Breturn%20Math.max%28...t.map%28%28t%3D%3Et.width%29%29%29%2at.length-n%2ae.length%7D%29%29%7Dreturn%20p%5B0%5D%5B0%5D.top%7Dswitch%28t.mode%29%7Bcase%200%3A%7Bconst%20e%3Dp.find%28%28e%3D%3Ee.every%28%28e%3D%3E%7Bif%28n%3Ce.distance%29return%211%3Bif%28t.speed%3Ce.speed%29return%210%3Breturn%20e.right%2F%28t.speed-e.speed%29%3Ee.time%7D%29%29%29%29%3Breturn%20e%26%26e%5B0%5D%3Fe%5B0%5D.top%3Avoid%200%7Dcase%201%3Areturn%7D%7Donmessage%3Dt%3D%3E%7Bconst%7Bdata%3Ae%7D%3Dt%2Cn%3DgetDanmuTop%28e%29%3Bself.postMessage%28%7Btop%3An%2Cid%3Ae.id%7D%29%7D%3B"},{}],"2Abxf":[function(t,e,i){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i),i.default=function({target:t,emits:e,clientWidth:i,clientHeight:r,marginBottom:n,marginTop:s,antiOverlap:o}){const a=e.filter((e=>e.mode===t.mode&&e.top>=s&&e.top<=r-n)).sort(((t,e)=>t.top-e.top));if(0===a.length)return s;a.unshift({top:0,left:0,right:0,height:s,width:i,speed:0,distance:i}),a.push({top:r-n,left:0,right:0,height:n,width:i,speed:0,distance:i});for(let e=1;e=t.height)return n}const l=[];for(let t=1;t{const i=Math.min(...e.map((t=>t.right))),r=Math.min(...t.map((t=>t.right)));return i*e.length-r*t.length}));break;case 1:l.sort(((t,e)=>{const i=Math.max(...e.map((t=>t.width)));return Math.max(...t.map((t=>t.width)))*t.length-i*e.length}))}return l[0][0].top}switch(t.mode){case 0:{const e=l.find((e=>e.every((e=>{if(ie.time}))));return e&&e[0]?e[0].top:void 0}case 1:return}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}]},["E13ST"],"E13ST"); \ No newline at end of file diff --git a/packages/artplayer-plugin-danmuku/package.json b/packages/artplayer-plugin-danmuku/package.json index 7d86e59e4..c710f7419 100644 --- a/packages/artplayer-plugin-danmuku/package.json +++ b/packages/artplayer-plugin-danmuku/package.json @@ -1,6 +1,6 @@ { "license": "MIT", - "version": "4.3.20", + "version": "4.3.21", "name": "artplayer-plugin-danmuku", "description": "Danmuku plugin for ArtPlayer", "main": "dist/artplayer-plugin-danmuku.js", diff --git a/packages/artplayer-plugin-danmuku/src/getDanmuTop.js b/packages/artplayer-plugin-danmuku/src/getDanmuTop.js index 47f5250af..bc1a2d97a 100644 --- a/packages/artplayer-plugin-danmuku/src/getDanmuTop.js +++ b/packages/artplayer-plugin-danmuku/src/getDanmuTop.js @@ -8,7 +8,7 @@ export default function getDanmuTop({ antiOverlap, }) { const danmus = emits - .filter((item) => item.mode === target.mode && item.top > marginTop && item.top <= clientHeight - marginBottom) + .filter((item) => item.mode === target.mode && item.top >= marginTop && item.top <= clientHeight - marginBottom) .sort((prev, next) => prev.top - next.top); if (danmus.length === 0) { diff --git a/packages/artplayer-plugin-danmuku/src/worker.js b/packages/artplayer-plugin-danmuku/src/worker.js index 21b7a4722..f4eefda37 100644 --- a/packages/artplayer-plugin-danmuku/src/worker.js +++ b/packages/artplayer-plugin-danmuku/src/worker.js @@ -1,6 +1,6 @@ function getDanmuTop({ target, emits, clientWidth, clientHeight, marginBottom, marginTop, antiOverlap }) { const danmus = emits - .filter((item) => item.mode === target.mode && item.top > marginTop && item.top <= clientHeight - marginBottom) + .filter((item) => item.mode === target.mode && item.top >= marginTop && item.top <= clientHeight - marginBottom) .sort((prev, next) => prev.top - next.top); if (danmus.length === 0) { diff --git a/packages/artplayer/dist/artplayer.js b/packages/artplayer/dist/artplayer.js index 8ba7eda0c..30318deb9 100644 --- a/packages/artplayer/dist/artplayer.js +++ b/packages/artplayer/dist/artplayer.js @@ -1,7 +1,7 @@ /*! - * artplayer.js v4.3.17 + * artplayer.js v4.3.18 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2022 Harvey Zack * Released under the MIT License. */ -!function(e,t,r,o,i){var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof n.parcelRequireb749&&n.parcelRequireb749,s=a.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,r){if(!s[t]){if(!e[t]){var o="function"==typeof n.parcelRequireb749&&n.parcelRequireb749;if(!r&&o)return o(t,!0);if(a)return a(t,!0);if(l&&"string"==typeof t)return l(t);var i=new Error("Cannot find module '"+t+"'");throw i.code="MODULE_NOT_FOUND",i}u.resolve=function(r){var o=e[t][1][r];return null!=o?o:r},u.cache={};var p=s[t]=new c.Module(t);e[t][0].call(p.exports,u,p,p.exports,this)}return s[t].exports;function u(e){var t=u.resolve(e);return!1===t?{}:c(t)}}c.isParcelRequire=!0,c.Module=function(e){this.id=e,this.bundle=c,this.exports={}},c.modules=e,c.cache=s,c.parent=a,c.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(c,"root",{get:function(){return n.parcelRequireb749}}),n.parcelRequireb749=c;for(var p=0;pt.call(this))),re.push(this)}static get instances(){return re}static get version(){return"4.3.17"}static get env(){return"production"}static get build(){return"1651540113918"}static get config(){return h.default}static get utils(){return p}static get scheme(){return d.default}static get Emitter(){return c.default}static get validator(){return s.default}static get kindOf(){return s.default.kindOf}static get html(){return v.default.html}static get option(){return{container:"#artplayer",url:"",poster:"",title:"",type:"",theme:"#f00",volume:.7,isLive:!1,muted:!1,autoplay:!1,autoSize:!1,autoMini:!1,loop:!1,flip:!1,playbackRate:!1,aspectRatio:!1,screenshot:!1,setting:!1,hotkey:!0,pip:!1,mutex:!0,backdrop:!0,fullscreen:!1,fullscreenWeb:!1,subtitleOffset:!1,miniProgressBar:!1,useSSR:!1,playsInline:!0,lock:!1,fastForward:!1,autoPlayback:!1,autoOrientation:!1,ads:[],layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],whitelist:[],thumbnails:{url:"",number:60,column:10},subtitle:{url:"",type:"",style:{},encoding:"utf-8"},moreVideoAttr:{controls:!1,preload:p.isSafari?"auto":"metadata"},icons:{},customType:{},lang:navigator.language.toLowerCase()}}get proxy(){return this.events.proxy}get query(){return this.template.query}destroy(e=!0){this.events.destroy(),this.template.destroy(e),re.splice(re.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}if(r.default=oe,oe.NOTICE_TIME=2e3,oe.SETTING_WIDTH=250,oe.SETTING_ITEM_WIDTH=200,oe.SETTING_ITEM_HEIGHT=35,oe.INDICATOR_SIZE=14,oe.INDICATOR_SIZE_ICON=16,oe.INDICATOR_SIZE_MOBILE=18,oe.INDICATOR_SIZE_MOBILE_ICON=20,oe.VOLUME_PANEL_WIDTH=60,oe.VOLUME_HANDLE_WIDTH=12,oe.RESIZE_TIME=500,oe.SCROLL_TIME=200,oe.SCROLL_GAP=50,oe.AUTO_PLAYBACK_MAX=10,oe.RECONNECT_TIME_MAX=5,oe.RECONNECT_SLEEP_TIME=1e3,oe.CONTROL_HIDE_TIME=3e3,oe.DB_CLICE_TIME=300,oe.MOBILE_AUTO_PLAYBACKRATE=3,oe.MOBILE_AUTO_PLAYBACKRATE_TIME=1e3,oe.MOBILE_AUTO_ORIENTATION_TIME=200,oe.INFO_LOOP_TIME=1e3,oe.FAST_FORWARD_VALUE=3,oe.FAST_FORWARD_TIME=1e3,"undefined"!=typeof document){const e=document.createElement("style");e.dataset.from="artplayer",e.textContent=n.default,document.head.appendChild(e)}"undefined"!=typeof window&&(window.Artplayer=oe),console.log(`%c ArtPlayer %c ${oe.version} %c https://artplayer.org`,"color: #fff; background: #5f5f5f","color: #fff; background: #4bc729","")},{"bundle-text:./style/index.less":"6U764","option-validator":"2A2W5","./utils/emitter":"1SgiG","./utils":"5yYFo","./scheme":"3izFE","./config":"ej4fZ","./whitelist":"7CkCt","./template":"8iGAh","./i18n":"3mM4M","./player":"bCaa0","./control":"3qXcr","./contextmenu":"hTnNz","./info":"bfwuE","./subtitle":"bWZ2U","./events":"9oLaG","./hotkey":"cKO4X","./layer":"kZD92","./loading":"c9b9e","./notice":"SxQeL","./mask":"aJ0dF","./icons":"jx1Wu","./setting":"hdF39","./storage":"bCcu0","./plugins":"1v13t","./ads":"jXgJj","./mobile":"eD5Ch","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"6U764":[function(e,t,r){t.exports='.art-video-player{z-index:20;width:100%;height:100%;zoom:1;color:#eee;text-align:left;direction:ltr;user-select:none;-webkit-tap-highlight-color:#0000;touch-action:manipulation;-ms-high-contrast-adjust:none;background-color:#000;outline:0;margin:0 auto;font-family:Roboto,Arial,Helvetica,sans-serif;font-size:14px;line-height:1.3;display:flex;position:relative}.art-video-player *{box-sizing:border-box;margin:0;padding:0}.art-video-player ::-webkit-scrollbar{width:5px;height:5px}.art-video-player ::-webkit-scrollbar-thumb{background-color:#666}.art-video-player ::-webkit-scrollbar-thumb:hover{background-color:#ccc}.art-video-player .art-icon{justify-content:center;align-items:center;line-height:1.5;display:inline-flex}.art-video-player .art-icon svg{fill:#fff}.art-video-player img{max-width:100%;vertical-align:top}@supports ((-webkit-backdrop-filter: initial) or (backdrop-filter: initial)){.art-video-player .art-backdrop-filter{-webkit-backdrop-filter:saturate(180%)blur(20px);backdrop-filter:saturate(180%)blur(20px);background-color:#000000b3!important}}.art-video-player .art-video{z-index:10;width:100%;height:100%;cursor:pointer;background-color:#000;position:absolute;inset:0}.art-video-player .art-poster{z-index:11;width:100%;height:100%;user-select:none;pointer-events:none;background-position:50%;background-repeat:no-repeat;background-size:cover;position:absolute;inset:0}.art-video-player .art-subtitle{z-index:20;width:100%;text-align:center;color:#fff;pointer-events:none;text-shadow:1px 0 1px #000,0 1px 1px #000,-1px 0 1px #000,0 -1px 1px #000,1px 1px 1px #000,-1px -1px 1px #000,1px -1px 1px #000,-1px 1px 1px #000;padding:0 20px;font-size:20px;display:none;position:absolute;bottom:10px}.art-video-player .art-subtitle p{word-break:break-all;height:fit-content;margin:5px 0 0;line-height:1.2}.art-video-player.art-subtitle-show .art-subtitle{display:block}.art-video-player.art-control-show .art-subtitle{bottom:50px}.art-video-player .art-danmuku{z-index:30;width:100%;height:100%;pointer-events:none;position:absolute;inset:0;overflow:hidden}.art-video-player .art-layers{z-index:40;width:100%;height:100%;pointer-events:none;display:none;position:absolute;inset:0;overflow:hidden}.art-video-player .art-layers .art-layer{pointer-events:auto}.art-video-player.art-layer-show .art-layers{display:block}.art-video-player .art-mask{z-index:50;width:100%;height:100%;pointer-events:none;justify-content:center;align-items:center;display:none;position:absolute;inset:0;overflow:hidden}.art-video-player .art-mask .art-state{width:60px;height:60px;opacity:.85;cursor:pointer;pointer-events:all;justify-content:center;align-items:center;display:flex;position:absolute;bottom:65px;right:30px}.art-video-player.art-mask-show .art-mask{display:flex}.art-video-player.art-mobile .art-state{position:static}.art-video-player .art-loading{z-index:70;width:100%;height:100%;pointer-events:none;justify-content:center;align-items:center;display:none;position:absolute;inset:0}.art-video-player.art-loading-show .art-loading{display:flex}.art-video-player .art-bottom{z-index:60;height:100px;opacity:0;visibility:hidden;pointer-events:none;background-image:linear-gradient(#0000,#0006,#000);background-position:bottom;background-repeat:repeat-x;flex-direction:column;justify-content:space-between;padding:50px 10px 0;transition:all .2s ease-in-out;display:flex;position:absolute;bottom:0;left:0;right:0}.art-video-player .art-bottom .art-progress{z-index:0;pointer-events:auto;flex:1;position:relative}.art-video-player .art-bottom .art-progress .art-control-progress{height:4px;cursor:pointer;flex-direction:row;align-items:center;display:flex;position:relative}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner{height:50%;width:100%;background:#fff3;align-items:center;display:flex;position:relative}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-loaded{z-index:10;height:100%;width:0;background:#fff6;position:absolute;inset:0}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-played{z-index:20;height:100%;width:0;position:absolute;inset:0}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight{z-index:30;height:100%;pointer-events:none;position:absolute;inset:0}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight span{width:7px;height:100%;pointer-events:auto;background:#fff;display:inline-block;position:absolute;top:0;left:0}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator{visibility:hidden;z-index:40;border-radius:50%;justify-content:center;align-items:center;transition:transform .1s ease-in-out;position:absolute;transform:scale(.1)}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator .art-icon{width:100%;height:100%;pointer-events:none;user-select:none}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-tip{z-index:50;height:20px;color:#fff;text-align:center;white-space:nowrap;background:#000000b3;border-radius:3px;padding:0 5px;font-size:12px;font-weight:700;line-height:20px;display:none;position:absolute;top:-25px;left:0}.art-video-player .art-bottom .art-progress .art-control-thumbnails{pointer-events:none;background-color:#000000b3;display:none;position:absolute;bottom:8px;left:0}.art-video-player .art-bottom .art-progress .art-control-loop{width:100%;height:100%;pointer-events:none;display:none;position:absolute;inset:0}.art-video-player .art-bottom .art-progress .art-control-loop .art-loop-point{width:2px;height:8px;background:#ffffffbf;position:absolute;top:-2px;left:0}.art-video-player .art-bottom .art-controls{z-index:1;pointer-events:auto;height:45px;justify-content:space-between;align-items:center;display:flex;position:relative}.art-video-player .art-bottom .art-controls .art-controls-left,.art-video-player .art-bottom .art-controls .art-controls-right{display:flex}.art-video-player .art-bottom .art-controls .art-controls-right{justify-content:flex-end}.art-video-player .art-bottom .art-controls .art-control{opacity:.9;min-height:36px;min-width:36px;text-align:center;cursor:pointer;white-space:nowrap;justify-content:center;align-items:center;font-size:12px;line-height:1;display:flex}.art-video-player .art-bottom .art-controls .art-control .art-icon{float:left;height:36px;width:36px;justify-content:center;align-items:center;display:flex}.art-video-player .art-bottom .art-controls .art-control:hover{opacity:1}.art-video-player .art-bottom .art-controls .art-control-onlyText{padding:0 10px}.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel{float:left;width:0;height:100%;transition:margin .2s cubic-bezier(.4,0,1,1),width .2s cubic-bezier(.4,0,1,1);position:relative;overflow:hidden}.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel .art-volume-slider-handle{width:12px;height:12px;background:#fff;border-radius:12px;margin-top:-6px;position:absolute;top:50%;left:0}.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel .art-volume-slider-handle:before{background:#fff;left:-54px}.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel .art-volume-slider-handle:after{background:#fff3;left:6px}.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel .art-volume-slider-handle:before,.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel .art-volume-slider-handle:after{content:"";height:3px;width:60px;margin-top:-2px;display:block;position:absolute;top:50%}.art-video-player .art-bottom .art-controls .art-control-volume:hover .art-volume-panel{width:60px}.art-video-player .art-bottom .art-controls .art-control-quality{z-index:30;position:relative}.art-video-player .art-bottom .art-controls .art-control-quality .art-qualitys{width:100px;text-align:center;color:#fff;background:#000c;border-radius:3px;padding:5px 0;display:none;position:absolute;bottom:35px}.art-video-player .art-bottom .art-controls .art-control-quality .art-qualitys .art-quality-item{height:30px;text-overflow:ellipsis;white-space:nowrap;text-shadow:0 0 2px #00000080;line-height:30px;overflow:hidden}.art-video-player .art-bottom .art-controls .art-control-quality .art-qualitys .art-quality-item:hover{background-color:#ffffff1a}.art-video-player .art-bottom .art-controls .art-control-quality:hover .art-qualitys{display:block}.art-video-player .art-bottom:hover .art-progress .art-control-progress .art-control-progress-inner{height:100%}.art-video-player .art-bottom:hover .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator{visibility:visible;transform:scale(1)}.art-video-player.art-control-show .art-bottom,.art-video-player.art-hover .art-bottom{opacity:1;visibility:visible}.art-video-player.art-error .art-progress-indicator,.art-video-player.art-destroy .art-progress-indicator,.art-video-player.art-error .art-progress-tip,.art-video-player.art-destroy .art-progress-tip{display:none!important}.art-video-player.art-mobile .art-bottom{padding:50px 7px 0}.art-video-player.art-mobile .art-bottom .art-controls{height:40px}.art-video-player.art-mobile .art-bottom .art-progress-indicator{visibility:visible!important;transform:scale(1)!important}.art-video-player .art-notice{z-index:80;width:100%;pointer-events:none;padding:10px;font-size:14px;display:none;position:absolute;top:0;left:0}.art-video-player .art-notice .art-notice-inner{color:#fff;background-color:#0009;border-radius:3px;padding:5px 10px;display:inline-block}.art-video-player.art-notice-show .art-notice{display:flex}.art-video-player .art-contextmenus{z-index:120;min-width:200px;background-color:#000000e6;border-radius:3px;flex-direction:column;padding:5px 0;display:none;position:absolute;top:10px;left:10px}.art-video-player .art-contextmenus .art-contextmenu{cursor:pointer;color:#fff;text-overflow:ellipsis;white-space:nowrap;text-shadow:0 0 2px #00000080;border-bottom:1px solid #ffffff1a;padding:10px 15px;font-size:12px;display:block;overflow:hidden}.art-video-player .art-contextmenus .art-contextmenu a{color:#fff;text-decoration:none}.art-video-player .art-contextmenus .art-contextmenu span{padding:0 7px;display:inline-block}.art-video-player .art-contextmenus .art-contextmenu span:hover,.art-video-player .art-contextmenus .art-contextmenu span.art-current{color:#00c9ff}.art-video-player .art-contextmenus .art-contextmenu:hover{background-color:#ffffff1a}.art-video-player .art-contextmenus .art-contextmenu:last-child{border-bottom:0}.art-video-player.art-contextmenu-show .art-contextmenus{display:flex}.art-video-player .art-settings{z-index:90;height:auto;max-height:300px;background-color:#000000e6;border-radius:3px;font-size:13px;transition:all .2s;display:none;position:absolute;bottom:50px;right:10px;overflow:auto}.art-video-player .art-settings .art-setting-panel{display:none}.art-video-player .art-settings .art-setting-panel.art-current{display:block}.art-video-player .art-settings .art-setting-panel .art-setting-item{height:35px;cursor:pointer;color:#fffc;justify-content:space-between;align-items:center;padding:0 5px;line-height:1;display:flex;overflow:hidden}.art-video-player .art-settings .art-setting-panel .art-setting-item:hover,.art-video-player .art-settings .art-setting-panel .art-setting-item.art-current{color:#fff;background-color:#ffffff1a}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-icon{width:30px;height:30px;justify-content:center;align-items:center;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-icon-check{visibility:hidden;height:15px}.art-video-player .art-settings .art-setting-panel .art-setting-item.art-current .art-icon-check{visibility:visible}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-left{white-space:nowrap;align-items:center;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-left .art-setting-item-left-icon{height:24px;width:24px;justify-content:center;align-items:center;margin-right:10px;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right{align-items:center;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-item-right-tooltip{white-space:nowrap;color:#ffffff80;font-size:12px}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-item-right-icon{height:24px;width:24px;justify-content:center;align-items:center;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item-back{border-bottom:1px solid #ffffff1a}.art-video-player.art-setting-show .art-settings{display:block}.art-video-player.art-mobile .art-settings{max-height:200px}.art-video-player .art-info{z-index:100;width:350px;color:#fff;-webkit-font-smoothing:antialiased;background-color:#000000e6;flex-direction:column;padding:10px;font-family:Noto Sans CJK SC DemiLight,Roboto,Segoe UI,Tahoma,Arial,Helvetica,sans-serif;font-size:12px;display:none;position:absolute;top:10px;left:10px}.art-video-player .art-info .art-info-item{margin-bottom:5px;display:flex}.art-video-player .art-info .art-info-item .art-info-title{width:100px;text-align:right}.art-video-player .art-info .art-info-item .art-info-content{text-overflow:ellipsis;white-space:nowrap;flex:1;padding-left:5px;overflow:hidden}.art-video-player .art-info .art-info-item:last-child{margin-bottom:0}.art-video-player .art-info .art-info-close{cursor:pointer;position:absolute;top:5px;right:5px}.art-video-player.art-info-show .art-info{display:flex}.art-video-player.art-hide-cursor *{cursor:none!important}.art-video-player[data-aspect-ratio] video{box-sizing:content-box;object-fit:fill}.art-video-player.art-fullscreen-web{z-index:9999;width:100%;height:100%;position:fixed;inset:0}.art-fullscreen-rotate{z-index:9999;width:100%;height:100%;background-color:#000;position:fixed;inset:0}.art-video-player .art-mini-header{z-index:110;height:35px;color:#fff;opacity:0;visibility:hidden;background-color:#00000080;justify-content:space-between;align-items:center;line-height:35px;transition:all .2s ease-in-out;display:none;position:absolute;top:0;left:0;right:0}.art-video-player .art-mini-header .art-mini-title{text-overflow:ellipsis;white-space:nowrap;cursor:move;flex:1;padding:0 10px;overflow:hidden}.art-video-player .art-mini-header .art-mini-close{width:35px;text-align:center;cursor:pointer;font-size:22px}.art-video-player.art-is-dragging{opacity:.7}.art-video-player.art-mini{z-index:9999;width:400px;height:225px;position:fixed;box-shadow:0 2px 5px #00000029,0 3px 6px #0003}.art-video-player.art-mini .art-mini-header{user-select:none;display:flex}.art-video-player.art-mini.art-hover .art-mini-header{opacity:1;visibility:visible}.art-video-player.art-mini .art-mask .art-state{position:static}.art-video-player.art-mini .art-contextmenu,.art-video-player.art-mini .art-bottom,.art-video-player.art-mini .art-danmu,.art-video-player.art-mini .art-info,.art-video-player.art-mini .art-layers,.art-video-player.art-mini .art-notice,.art-video-player.art-mini .art-setting,.art-video-player.art-mini .art-subtitle{display:none!important}.art-auto-size{justify-content:center;align-items:center;display:flex}.art-video-player[data-flip=horizontal] .art-video{transform:scaleX(-1)}.art-video-player[data-flip=vertical] .art-video{transform:scaleY(-1)}.art-video-player .art-layer-miniProgressBar{height:2px;background-color:var(--theme);display:block;position:absolute;bottom:0;left:0;right:0}.art-video-player .art-layer-lock{height:34px;width:34px;color:#fff;background-color:#00000080;border-radius:50%;justify-content:center;align-items:center;display:none;position:absolute;top:calc(50% - 17px);left:15px}.art-video-player.art-lock .art-bottom{display:none!important}.art-video-player.art-lock .art-subtitle{bottom:10px!important}.art-video-player.art-lock .art-layer-miniProgressBar{display:block!important}.art-video-player.art-control-show .art-layer-miniProgressBar{display:none}.art-video-player.art-control-show .art-layer-lock{display:flex}.art-video-player .art-control-selector{position:relative}.art-video-player .art-control-selector .art-selector-list{min-width:100px;max-width:200px;max-height:200px;text-align:center;color:#fff;background-color:#000c;border-radius:3px;padding:5px 0;display:none;position:absolute;bottom:35px;overflow:auto}.art-video-player .art-control-selector .art-selector-list .art-selector-item{height:30px;text-overflow:ellipsis;white-space:nowrap;text-shadow:0 0 2px #00000080;padding:0 5px;line-height:30px;overflow:hidden}.art-video-player .art-control-selector .art-selector-list .art-selector-item:hover{background-color:#ffffff1a}.art-video-player .art-control-selector .art-selector-list .art-selector-item:hover,.art-video-player .art-control-selector .art-selector-list .art-selector-item.art-current{color:#00c9ff}.art-video-player .art-control-selector:hover .art-selector-list{display:block}[class*=hint--]{font-style:normal;display:inline-block;position:relative}[class*=hint--]:before,[class*=hint--]:after{visibility:hidden;opacity:0;z-index:1000000;pointer-events:none;transition:all .3s;position:absolute;transform:translate(0,0)}[class*=hint--]:hover:before,[class*=hint--]:hover:after{visibility:visible;opacity:1;transition-delay:.1s}[class*=hint--]:before{content:"";z-index:1000000;background:0 0;border:6px solid #0000;position:absolute}[class*=hint--]:after{color:#fff;white-space:nowrap;background:#000;padding:8px 10px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:12px;line-height:12px}[class*=hint--][aria-label]:after{content:attr(aria-label)}[class*=hint--][data-hint]:after{content:attr(data-hint)}[aria-label=""]:before,[aria-label=""]:after,[data-hint=""]:before,[data-hint=""]:after{display:none!important}.hint--top-left:before,.hint--top-right:before,.hint--top:before{border-top-color:#000}.hint--bottom-left:before,.hint--bottom-right:before,.hint--bottom:before{border-bottom-color:#000}.hint--left:before{border-left-color:#000}.hint--right:before{border-right-color:#000}.hint--top:before{margin-bottom:-11px}.hint--top:before,.hint--top:after{bottom:100%;left:50%}.hint--top:before{left:calc(50% - 6px)}.hint--top:after{transform:translate(-50%)}.hint--top:hover:before{transform:translateY(-8px)}.hint--top:hover:after{transform:translate(-50%)translateY(-8px)}.hint--bottom:before{margin-top:-11px}.hint--bottom:before,.hint--bottom:after{top:100%;left:50%}.hint--bottom:before{left:calc(50% - 6px)}.hint--bottom:after{transform:translate(-50%)}.hint--bottom:hover:before{transform:translateY(8px)}.hint--bottom:hover:after{transform:translate(-50%)translateY(8px)}.hint--right:before{margin-bottom:-6px;margin-left:-11px}.hint--right:after{margin-bottom:-14px}.hint--right:before,.hint--right:after{bottom:50%;left:100%}.hint--right:hover:before,.hint--right:hover:after{transform:translate(8px)}.hint--left:before{margin-bottom:-6px;margin-right:-11px}.hint--left:after{margin-bottom:-14px}.hint--left:before,.hint--left:after{bottom:50%;right:100%}.hint--left:hover:before,.hint--left:hover:after{transform:translate(-8px)}.hint--top-left:before{margin-bottom:-11px}.hint--top-left:before,.hint--top-left:after{bottom:100%;left:50%}.hint--top-left:before{left:calc(50% - 6px)}.hint--top-left:after{margin-left:12px;transform:translate(-100%)}.hint--top-left:hover:before{transform:translateY(-8px)}.hint--top-left:hover:after{transform:translate(-100%)translateY(-8px)}.hint--top-right:before{margin-bottom:-11px}.hint--top-right:before,.hint--top-right:after{bottom:100%;left:50%}.hint--top-right:before{left:calc(50% - 6px)}.hint--top-right:after{margin-left:-12px;transform:translate(0)}.hint--top-right:hover:before,.hint--top-right:hover:after{transform:translateY(-8px)}.hint--bottom-left:before{margin-top:-11px}.hint--bottom-left:before,.hint--bottom-left:after{top:100%;left:50%}.hint--bottom-left:before{left:calc(50% - 6px)}.hint--bottom-left:after{margin-left:12px;transform:translate(-100%)}.hint--bottom-left:hover:before{transform:translateY(8px)}.hint--bottom-left:hover:after{transform:translate(-100%)translateY(8px)}.hint--bottom-right:before{margin-top:-11px}.hint--bottom-right:before,.hint--bottom-right:after{top:100%;left:50%}.hint--bottom-right:before{left:calc(50% - 6px)}.hint--bottom-right:after{margin-left:-12px;transform:translate(0)}.hint--bottom-right:hover:before,.hint--bottom-right:hover:after{transform:translateY(8px)}.hint--small:after,.hint--medium:after,.hint--large:after{white-space:normal;word-wrap:break-word;line-height:1.4em}.hint--small:after{width:80px}.hint--medium:after{width:150px}.hint--large:after{width:300px}[class*=hint--]:after{text-shadow:0 -1px #000;box-shadow:4px 4px 8px #0000004d}.hint--error:after{text-shadow:0 -1px #592726;background-color:#b34e4d}.hint--error.hint--top-left:before,.hint--error.hint--top-right:before,.hint--error.hint--top:before{border-top-color:#b34e4d}.hint--error.hint--bottom-left:before,.hint--error.hint--bottom-right:before,.hint--error.hint--bottom:before{border-bottom-color:#b34e4d}.hint--error.hint--left:before{border-left-color:#b34e4d}.hint--error.hint--right:before{border-right-color:#b34e4d}.hint--warning:after{text-shadow:0 -1px #6c5328;background-color:#c09854}.hint--warning.hint--top-left:before,.hint--warning.hint--top-right:before,.hint--warning.hint--top:before{border-top-color:#c09854}.hint--warning.hint--bottom-left:before,.hint--warning.hint--bottom-right:before,.hint--warning.hint--bottom:before{border-bottom-color:#c09854}.hint--warning.hint--left:before{border-left-color:#c09854}.hint--warning.hint--right:before{border-right-color:#c09854}.hint--info:after{text-shadow:0 -1px #1a3c4d;background-color:#3986ac}.hint--info.hint--top-left:before,.hint--info.hint--top-right:before,.hint--info.hint--top:before{border-top-color:#3986ac}.hint--info.hint--bottom-left:before,.hint--info.hint--bottom-right:before,.hint--info.hint--bottom:before{border-bottom-color:#3986ac}.hint--info.hint--left:before{border-left-color:#3986ac}.hint--info.hint--right:before{border-right-color:#3986ac}.hint--success:after{text-shadow:0 -1px #1a321a;background-color:#458746}.hint--success.hint--top-left:before,.hint--success.hint--top-right:before,.hint--success.hint--top:before{border-top-color:#458746}.hint--success.hint--bottom-left:before,.hint--success.hint--bottom-right:before,.hint--success.hint--bottom:before{border-bottom-color:#458746}.hint--success.hint--left:before{border-left-color:#458746}.hint--success.hint--right:before{border-right-color:#458746}.hint--always:after,.hint--always:before{opacity:1;visibility:visible}.hint--always.hint--top:before{transform:translateY(-8px)}.hint--always.hint--top:after{transform:translate(-50%)translateY(-8px)}.hint--always.hint--top-left:before{transform:translateY(-8px)}.hint--always.hint--top-left:after{transform:translate(-100%)translateY(-8px)}.hint--always.hint--top-right:before,.hint--always.hint--top-right:after{transform:translateY(-8px)}.hint--always.hint--bottom:before{transform:translateY(8px)}.hint--always.hint--bottom:after{transform:translate(-50%)translateY(8px)}.hint--always.hint--bottom-left:before{transform:translateY(8px)}.hint--always.hint--bottom-left:after{transform:translate(-100%)translateY(8px)}.hint--always.hint--bottom-right:before,.hint--always.hint--bottom-right:after{transform:translateY(8px)}.hint--always.hint--left:before,.hint--always.hint--left:after{transform:translate(-8px)}.hint--always.hint--right:before,.hint--always.hint--right:after{transform:translate(8px)}.hint--rounded:after{border-radius:4px}.hint--no-animate:before,.hint--no-animate:after{transition-duration:0s}.hint--bounce:before,.hint--bounce:after{-webkit-transition:opacity .3s,visibility .3s,-webkit-transform .3s cubic-bezier(.71,1.7,.77,1.24);-moz-transition:opacity .3s,visibility .3s,-moz-transform .3s cubic-bezier(.71,1.7,.77,1.24);transition:opacity .3s,visibility .3s,transform .3s cubic-bezier(.71,1.7,.77,1.24)}.hint--no-shadow:before,.hint--no-shadow:after{text-shadow:initial;box-shadow:initial}.hint--no-arrow:before{display:none}'},{}],"2A2W5":[function(e,t,r){t.exports=function(){"use strict";function e(t){return(e="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})(t)}var t=Object.prototype.toString,r=function(r){if(void 0===r)return"undefined";if(null===r)return"null";var i=e(r);if("boolean"===i)return"boolean";if("string"===i)return"string";if("number"===i)return"number";if("symbol"===i)return"symbol";if("function"===i)return function(e){return"GeneratorFunction"===o(e)}(r)?"generatorfunction":"function";if(function(e){return Array.isArray?Array.isArray(e):e instanceof Array}(r))return"array";if(function(e){return!(!e.constructor||"function"!=typeof e.constructor.isBuffer)&&e.constructor.isBuffer(e)}(r))return"buffer";if(function(e){try{if("number"==typeof e.length&&"function"==typeof e.callee)return!0}catch(e){if(-1!==e.message.indexOf("callee"))return!0}return!1}(r))return"arguments";if(function(e){return e instanceof Date||"function"==typeof e.toDateString&&"function"==typeof e.getDate&&"function"==typeof e.setDate}(r))return"date";if(function(e){return e instanceof Error||"string"==typeof e.message&&e.constructor&&"number"==typeof e.constructor.stackTraceLimit}(r))return"error";if(function(e){return e instanceof RegExp||"string"==typeof e.flags&&"boolean"==typeof e.ignoreCase&&"boolean"==typeof e.multiline&&"boolean"==typeof e.global}(r))return"regexp";switch(o(r)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(e){return"function"==typeof e.throw&&"function"==typeof e.return&&"function"==typeof e.next}(r))return"generator";switch(i=t.call(r)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return i.slice(8,-1).toLowerCase().replace(/\s/g,"")};function o(e){return e.constructor?e.constructor.name:null}function i(e,t){var o=2n)),o.export(r,"queryAll",(()=>a)),o.export(r,"addClass",(()=>s)),o.export(r,"removeClass",(()=>l)),o.export(r,"hasClass",(()=>c)),o.export(r,"append",(()=>p)),o.export(r,"remove",(()=>u)),o.export(r,"setStyle",(()=>d)),o.export(r,"setStyles",(()=>f)),o.export(r,"getStyle",(()=>h)),o.export(r,"sublings",(()=>m)),o.export(r,"inverseClass",(()=>g)),o.export(r,"tooltip",(()=>y)),o.export(r,"isInViewport",(()=>v)),o.export(r,"includeFromEvent",(()=>b)),o.export(r,"replaceElement",(()=>x));var i=e("./compatibility");function n(e,t=document){return t.querySelector(e)}function a(e,t=document){return Array.from(t.querySelectorAll(e))}function s(e,t){return e.classList.add(t)}function l(e,t){return e.classList.remove(t)}function c(e,t){return e.classList.contains(t)}function p(e,t){return t instanceof Element?e.appendChild(t):e.insertAdjacentHTML("beforeend",String(t)),e.lastElementChild||e.lastChild}function u(e){return e.parentNode.removeChild(e)}function d(e,t,r){return e.style[t]=r,e}function f(e,t){return Object.keys(t).forEach((r=>{d(e,r,t[r])})),e}function h(e,t,r=!0){const o=window.getComputedStyle(e,null).getPropertyValue(t);return r?parseFloat(o):o}function m(e){return Array.from(e.parentElement.children).filter((t=>t!==e))}function g(e,t){m(e).forEach((e=>l(e,t))),s(e,t)}function y(e,t,r="top"){i.isMobile||(e.setAttribute("aria-label",t),s(e,"hint--rounded"),s(e,`hint--${r}`))}function v(e,t=0){const r=e.getBoundingClientRect(),o=window.innerHeight||document.documentElement.clientHeight,i=window.innerWidth||document.documentElement.clientWidth,n=r.top-t<=o&&r.top+r.height+t>=0,a=r.left-t<=i+t&&r.left+r.width+t>=0;return n&&a}function b(e,t){return e.composedPath&&e.composedPath().indexOf(t)>-1}function x(e,t){return t.parentNode.replaceChild(e,t),e}},{"./compatibility":"e9wVp","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],e9wVp:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"userAgent",(()=>i)),o.export(r,"isMobile",(()=>n)),o.export(r,"isSafari",(()=>a)),o.export(r,"isWechat",(()=>s)),o.export(r,"isIE",(()=>l));const i="undefined"!=typeof window?window.navigator.userAgent:"",n=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(i),a=/^((?!chrome|android).)*safari/i.test(i),s=/MicroMessenger/i.test(i),l=/MSIE|Trident/i.test(i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],kNZvP:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"ArtPlayerError",(()=>i)),o.export(r,"errorHandle",(()=>n));class i extends Error{constructor(e,t){super(e),"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,t||this.constructor),this.name="ArtPlayerError"}}function n(e,t){if(!e)throw new i(t);return e}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],eZUgm:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e){return"WEBVTT \r\n\r\n".concat((t=e,t.replace(/(\d\d:\d\d:\d\d)[,.](\d+)/g,((e,t,r)=>{let o=r.slice(0,3);return 1===r.length&&(o=r+"00"),2===r.length&&(o=r+"0"),`${t},${o}`}))).replace(/\{\\([ibu])\}/g,"").replace(/\{\\([ibu])1\}/g,"<$1>").replace(/\{([ibu])\}/g,"<$1>").replace(/\{\/([ibu])\}/g,"").replace(/(\d\d:\d\d:\d\d),(\d\d\d)/g,"$1.$2").replace(/{[\s\S]*?}/g,"").concat("\r\n\r\n"));var t}function n(e){return URL.createObjectURL(new Blob([e],{type:"text/vtt"}))}function a(e){const t=new RegExp("Dialogue:\\s\\d,(\\d+:\\d\\d:\\d\\d.\\d\\d),(\\d+:\\d\\d:\\d\\d.\\d\\d),([^,]*),([^,]*),(?:[^,]*,){4}([\\s\\S]*)$","i");function r(e=""){return e.split(/[:.]/).map(((e,t,r)=>{if(t===r.length-1){if(1===e.length)return`.${e}00`;if(2===e.length)return`.${e}0`}else if(1===e.length)return(0===t?"0":":0")+e;return 0===t?e:t===r.length-1?`.${e}`:`:${e}`})).join("")}return`WEBVTT\n\n${e.split(/\r?\n/).map((e=>{const o=e.match(t);return o?{start:r(o[1].trim()),end:r(o[2].trim()),text:o[5].replace(/{[\s\S]*?}/g,"").replace(/(\\N)/g,"\n").trim().split(/\r?\n/).map((e=>e.trim())).join("\n")}:null})).filter((e=>e)).map(((e,t)=>e?`${t+1}\n${e.start} --\x3e ${e.end}\n${e.text}`:"")).filter((e=>e.trim())).join("\n\n")}`}o.defineInteropFlag(r),o.export(r,"srtToVtt",(()=>i)),o.export(r,"vttToBlob",(()=>n)),o.export(r,"assToVtt",(()=>a))},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],dYeSt:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e){return e.includes("?")?i(e.split("?")[0]):e.includes("#")?i(e.split("#")[0]):e.trim().toLowerCase().split(".").pop()}function n(e,t){const r=document.createElement("a");r.style.display="none",r.href=e,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r)}o.defineInteropFlag(r),o.export(r,"getExt",(()=>i)),o.export(r,"download",(()=>n))},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"5ynPA":[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"def",(()=>i)),o.export(r,"has",(()=>a)),o.export(r,"get",(()=>s)),o.export(r,"mergeDeep",(()=>l));const i=Object.defineProperty,{hasOwnProperty:n}=Object.prototype;function a(e,t){return n.call(e,t)}function s(e,t){return Object.getOwnPropertyDescriptor(e,t)}function l(...e){const t=e=>e&&"object"==typeof e&&!Array.isArray(e);return e.reduce(((e,r)=>(Object.keys(r).forEach((o=>{const i=e[o],n=r[o];Array.isArray(i)&&Array.isArray(n)?e[o]=i.concat(...n):!t(i)||!t(n)||n instanceof Element?e[o]=n:e[o]=l(i,n)})),e)),{})}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],kXYeR:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e=0){return new Promise((t=>setTimeout(t,e)))}function n(e,t,r){let o;function i(...i){clearTimeout(o),o=setTimeout((function(){o=null,e.apply(r,i)}),t)}return i.clearTimeout=function(){clearTimeout(o)},i}function a(e,t){let r,o,i=!1;return function n(...a){if(i)return r=a,void(o=this);i=!0,e.apply(this,a),setTimeout((()=>{i=!1,r&&(n.apply(o,r),r=null,o=null)}),t)}}o.defineInteropFlag(r),o.export(r,"sleep",(()=>i)),o.export(r,"debounce",(()=>n)),o.export(r,"throttle",(()=>a))},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],anS7L:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e,t,r){return Math.max(Math.min(e,Math.max(t,r)),Math.min(t,r))}function n(e){const t=Math.floor(e/3600),r=Math.floor((e-3600*t)/60),o=Math.floor(e-3600*t-60*r);return(t>0?[t,r,o]:[r,o]).map((e=>e<10?`0${e}`:String(e))).join(":")}function a(e){return e.replace(/[&<>'"]/g,(e=>({"&":"&","<":"<",">":">","'":"'",'"':"""}[e]||e)))}o.defineInteropFlag(r),o.export(r,"clamp",(()=>i)),o.export(r,"secondToTime",(()=>n)),o.export(r,"escape",(()=>a))},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"3izFE":[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"ComponentOption",(()=>u));var i=e("../utils");const n="boolean",a="string",s="number",l="object",c="function";function p(e,t,r){return i.errorHandle(t===a||e instanceof Element,`${r.join(".")} require '${a}' or 'Element' type`)}const u={html:p,disable:`?${n}`,name:`?${a}`,index:`?${s}`,style:`?${l}`,click:`?${c}`,mounted:`?${c}`,tooltip:`?${a}`,width:`?${s}`,selector:"?array",onSelect:`?${c}`};r.default={container:p,url:a,poster:a,title:a,type:a,theme:a,lang:a,volume:s,isLive:n,muted:n,autoplay:n,autoSize:n,autoMini:n,loop:n,flip:n,playbackRate:n,aspectRatio:n,screenshot:n,setting:n,hotkey:n,pip:n,mutex:n,backdrop:n,fullscreen:n,fullscreenWeb:n,subtitleOffset:n,miniProgressBar:n,useSSR:n,playsInline:n,lock:n,fastForward:n,autoPlayback:n,autoOrientation:n,ads:[{url:a}],plugins:[c],whitelist:[`${a}|${c}|regexp`],layers:[u],contextmenu:[u],settings:[u],controls:[{...u,position:(e,t,r)=>{const o=["top","left","right"];return i.errorHandle(o.includes(e),`${r.join(".")} only accept ${o.toString()} as parameters`)}}],quality:[{default:`?${n}`,html:a,url:a}],highlight:[{time:s,text:a}],thumbnails:{url:a,number:s,column:s},subtitle:{url:a,type:a,style:l,encoding:a},moreVideoAttr:l,icons:l,customType:l}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],ej4fZ:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default={propertys:["audioTracks","autoplay","buffered","controller","controls","crossOrigin","currentSrc","currentTime","defaultMuted","defaultPlaybackRate","duration","ended","error","loop","mediaGroup","muted","networkState","paused","playbackRate","played","preload","readyState","seekable","seeking","src","startDate","textTracks","videoTracks","volume"],methods:["addTextTrack","canPlayType","load","play","pause"],events:["abort","canplay","canplaythrough","durationchange","emptied","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],prototypes:["width","height","videoWidth","videoHeight","poster","webkitDecodedFrameCount","webkitDroppedFrameCount","playsInline","webkitSupportsFullscreen","webkitDisplayingFullscreen","onenterpictureinpicture","onleavepictureinpicture","disablePictureInPicture","cancelVideoFrameCallback","requestVideoFrameCallback","getVideoPlaybackQuality","requestPictureInPicture","webkitEnterFullScreen","webkitEnterFullscreen","webkitExitFullScreen","webkitExitFullscreen"]}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"7CkCt":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("./utils");r.default=class{constructor(e){this.art=e}get state(){const{option:e,constructor:{kindOf:t}}=this.art;return!o.isMobile||e.whitelist.some((e=>{switch(t(e)){case"string":return"*"===e||o.userAgent.indexOf(e)>-1;case"function":return e(o.userAgent);case"regexp":return e.test(o.userAgent);default:return!1}}))}}},{"./utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"8iGAh":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("./utils");class i{constructor(e){this.art=e;const{option:t,constructor:r,whitelist:i}=e;t.container instanceof Element?this.$container=t.container:(this.$container=o.query(t.container),o.errorHandle(this.$container,`No container element found by ${t.container}`));const n=this.$container.tagName.toLowerCase();o.errorHandle("div"===n,`Unsupported container element type, only support 'div' but got '${n}'`),o.errorHandle(r.instances.every((e=>e.template.$container!==this.$container)),"Cannot mount multiple instances on the same dom element"),this.query=this.query.bind(this),this.$container.dataset.artId=e.id,this.$original=this.$container.cloneNode(!0),i.state?this.desktop():this.mobile()}static get html(){return'
Player version:
4.3.17
Video url:
Video volume:
Video time:
Video duration:
Video resolution:
x
[x]
×
'}query(e){return o.query(e,this.$container)}desktop(){const{option:e}=this.art;e.useSSR||(this.$container.innerHTML=i.html),this.$player=this.query(".art-video-player"),this.$video=this.query(".art-video"),this.$poster=this.query(".art-poster"),this.$subtitle=this.query(".art-subtitle"),this.$danmuku=this.query(".art-danmuku"),this.$bottom=this.query(".art-bottom"),this.$progress=this.query(".art-progress"),this.$controls=this.query(".art-controls"),this.$controlsLeft=this.query(".art-controls-left"),this.$controlsRight=this.query(".art-controls-right"),this.$layer=this.query(".art-layers"),this.$loading=this.query(".art-loading"),this.$notice=this.query(".art-notice"),this.$noticeInner=this.query(".art-notice-inner"),this.$mask=this.query(".art-mask"),this.$state=this.query(".art-state"),this.$setting=this.query(".art-settings"),this.$info=this.query(".art-info"),this.$infoPanel=this.query(".art-info-panel"),this.$infoClose=this.query(".art-info-close"),this.$miniHeader=this.query(".art-mini-header"),this.$miniTitle=this.query(".art-mini-title"),this.$miniClose=this.query(".art-mini-close"),this.$contextmenu=this.query(".art-contextmenus"),e.backdrop&&(o.addClass(this.$setting,"art-backdrop-filter"),o.addClass(this.$contextmenu,"art-backdrop-filter"),o.addClass(this.$info,"art-backdrop-filter")),o.isMobile&&o.addClass(this.$player,"art-mobile")}mobile(){this.$container.innerHTML='
',this.$player=this.query(".art-video-player"),this.$video=this.query(".art-video")}destroy(e){e?o.replaceElement(this.$original,this.$container):o.addClass(this.$player,"art-destroy")}}r.default=i},{"./utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"3mM4M":[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../utils"),n=e("./zh-cn.json"),a=o.interopDefault(n),s=e("./zh-tw.json"),l=o.interopDefault(s),c=e("./pl.json"),p=o.interopDefault(c),u=e("./cs.json"),d=o.interopDefault(u);r.default=class{constructor(e){this.art=e,this.languages={"zh-cn":a.default,"zh-tw":l.default,pl:p.default,cs:d.default},this.init()}init(){const e=this.art.option.lang.toLowerCase();this.language=this.languages[e]||{}}get(e){return this.language[e]||e}update(e){this.languages=i.mergeDeep(this.languages,e),this.init()}}},{"../utils":"5yYFo","./zh-cn.json":"1f1tr","./zh-tw.json":"3hy9S","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY","./pl.json":"aFOXc","./cs.json":"aNfUP"}],"1f1tr":[function(e,t,r){t.exports=JSON.parse('{"Video Info":"统计信息","Close":"关闭","Video Load Failed":"加载失败","Volume":"音量","Play":"播放","Pause":"暂停","Rate":"速度","Mute":"静音","Video Flip":"画面翻转","Horizontal":"水平","Vertical":"垂直","Reconnect":"重新连接","Hide Subtitle":"隐藏字幕","Show Subtitle":"显示字幕","Show Setting":"显示设置","Hide Setting":"隐藏设置","Screenshot":"截图","Play Speed":"播放速度","Aspect Ratio":"画面比例","Default":"默认","Normal":"正常","Open":"打开","Switch Video":"切换","Switch Subtitle":"切换字幕","Fullscreen":"全屏","Exit Fullscreen":"退出全屏","Web Fullscreen":"网页全屏","Exit Web Fullscreen":"退出网页全屏","Mini Player":"迷你播放器","PIP Mode":"开启画中画","Exit PIP Mode":"退出画中画","PIP Not Supported":"不支持画中画","Fullscreen Not Supported":"不支持全屏","Subtitle Offset":"字幕偏移","Auto playback at":"已为您定位至"}')},{}],"3hy9S":[function(e,t,r){t.exports=JSON.parse('{"Video Info":"統計訊息","Close":"關閉","Video Load Failed":"載入失敗","Volume":"音量","Play":"播放","Pause":"暫停","Rate":"速度","Mute":"靜音","Video Flip":"畫面翻轉","Horizontal":"水平","Vertical":"垂直","Reconnect":"重新連接","Hide Subtitle":"隱藏字幕","Show Subtitle":"顯示字幕","Show Setting":"顯示设置","Hide Setting":"隱藏设置","Screenshot":"截圖","Play Speed":"播放速度","Aspect Ratio":"畫面比例","Default":"默認","Normal":"正常","Open":"打開","Switch Video":"切換","Switch Subtitle":"切換字幕","Fullscreen":"全屏","Exit Fullscreen":"退出全屏","Web Fullscreen":"網頁全屏","Exit Web Fullscreen":"退出網頁全屏","Mini Player":"迷你播放器","PIP Mode":"開啟畫中畫","Exit PIP Mode":"退出畫中畫","PIP Not Supported":"不支持畫中畫","Fullscreen Not Supported":"不支持全屏","Subtitle Offset":"字幕偏移","Auto playback at":"已為您定位至"}')},{}],aFOXc:[function(e,t,r){t.exports=JSON.parse('{"Video Info":"Informacje o wideo","Close":"Zamknij","Video Load Failed":"Błąd ładowania wideo","Volume":"Głośność","Play":"Odtwórz","Pause":"Wstrzymaj","Rate":"Oceń","Mute":"Wycisz","Video Flip":"Rotacja wideo","Horizontal":"Pozioma","Vertical":"Pionowa","Reconnect":"Połącz ponownie","Hide Subtitle":"Ukryj napisy","Show Subtitle":"Pokaż napisy","Show Setting":"Pokaż ustawienia","Hide Setting":"Ukryj ustawienia","Screenshot":"Zrzut ekranu","Play Speed":"Prędkość odtwarzania","Aspect Ratio":"Współczynnik proporcji","Default":"Domyślny","Normal":"Normalny","Open":"Otwórz","Switch Video":"Przełącz wideo","Switch Subtitle":"Przełącz napisy","Fullscreen":"Pełny ekran","Exit Fullscreen":"Zamknij pełny ekran","Web Fullscreen":"Tryb pełnej strony","Exit Web Fullscreen":"Zamknij tryb pełnej strony","Mini Player":"Miniodtwarzacz","PIP Mode":"Tryb PiP","Exit PIP Mode":"Zamknij tryb PiP","PIP Not Supported":"Tryb PiP nieobsługiwany","Fullscreen Not Supported":"Pełny ekran nieobsługiwany","Subtitle Offset":"Przesunięcie napisów","Auto playback at":"Automatyczne odtwarzanie za"}')},{}],aNfUP:[function(e,t,r){t.exports=JSON.parse('{"Video Info":"Info o videu","Close":"Zavřít","Video Load Failed":"Nahrání videa selhalo","Volume":"Hlasitost","Play":"Přehrát","Pause":"Pozastavit","Rate":"Hodnocení","Mute":"Ztlumit","Video Flip":"Otočit video","Horizontal":"Horizontálně","Vertical":"Vertikálně","Reconnect":"Opětovné připojení","Hide Subtitle":"Skrýt titulky","Show Subtitle":"Ukázat titulky","Show Setting":"Zobrazit nastavení","Hide Setting":"Skrýt nastavení","Screenshot":"Snímek obrazovky","Play Speed":"Rychlost přehrávání","Aspect Ratio":"Poměr stran","Default":"Výchozí","Normal":"Normální","Open":"Otevřít","Switch Video":"Přepnout video","Switch Subtitle":"Přepnout titulky","Fullscreen":"Celá obrazovka","Exit Fullscreen":"Opustit režim celé obrazovky","Web Fullscreen":"Celá stránka","Exit Web Fullscreen":"Zavřít režim celé stránky","Mini Player":"Mini přehrávač","PIP Mode":"Režim PIP","Exit PIP Mode":"Opustit režim PIP","PIP Not Supported":"Režim PIP není podporován","Fullscreen Not Supported":"Režim celé obrazovky není podporován","Subtitle Offset":"Posun titulků","Auto playback at":"Automatické přehrávání za"}')},{}],bCaa0:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./urlMix"),n=o.interopDefault(i),a=e("./attrMix"),s=o.interopDefault(a),l=e("./playMix"),c=o.interopDefault(l),p=e("./pauseMix"),u=o.interopDefault(p),d=e("./toggleMix"),f=o.interopDefault(d),h=e("./seekMix"),m=o.interopDefault(h),g=e("./volumeMix"),y=o.interopDefault(g),v=e("./currentTimeMix"),b=o.interopDefault(v),x=e("./durationMix"),w=o.interopDefault(x),j=e("./switchMix"),k=o.interopDefault(j),M=e("./playbackRateMix"),S=o.interopDefault(M),I=e("./aspectRatioMix"),F=o.interopDefault(I),$=e("./screenshotMix"),T=o.interopDefault($),E=e("./fullscreenMix"),C=o.interopDefault(E),z=e("./fullscreenWebMix"),Y=o.interopDefault(z),D=e("./pipMix"),P=o.interopDefault(D),R=e("./loadedMix"),A=o.interopDefault(R),O=e("./playedMix"),L=o.interopDefault(O),H=e("./playingMix"),_=o.interopDefault(H),N=e("./autoSizeMix"),J=o.interopDefault(N),V=e("./rectMix"),q=o.interopDefault(V),W=e("./flipMix"),B=o.interopDefault(W),U=e("./miniMix"),Z=o.interopDefault(U),X=e("./loopMix"),G=o.interopDefault(X),Q=e("./posterMix"),K=o.interopDefault(Q),ee=e("./autoHeightMix"),te=o.interopDefault(ee),re=e("./themeMix"),oe=o.interopDefault(re),ie=e("./titleMix"),ne=o.interopDefault(ie),ae=e("./normalSizeMix"),se=o.interopDefault(ae),le=e("./subtitleOffsetMix"),ce=o.interopDefault(le),pe=e("./optionInit"),ue=o.interopDefault(pe),de=e("./eventInit"),fe=o.interopDefault(de);r.default=class{constructor(e){n.default(e),s.default(e),c.default(e),u.default(e),f.default(e),m.default(e),y.default(e),b.default(e),w.default(e),k.default(e),S.default(e),F.default(e),T.default(e),C.default(e),Y.default(e),P.default(e),A.default(e),L.default(e),_.default(e),J.default(e),q.default(e),B.default(e),Z.default(e),G.default(e),K.default(e),te.default(e),oe.default(e),ne.default(e),se.default(e),ce.default(e),fe.default(e),ue.default(e)}}},{"./urlMix":"9mMBB","./attrMix":"ghisN","./playMix":"l5N6R","./pauseMix":"fVR5i","./toggleMix":"cZiBO","./seekMix":"bsO1Q","./volumeMix":"ivSmC","./currentTimeMix":"8LbXb","./durationMix":"f7tNT","./switchMix":"ejQWi","./playbackRateMix":"kNcxE","./aspectRatioMix":"8v5yt","./screenshotMix":"eLUEv","./fullscreenMix":"ifvhR","./fullscreenWebMix":"dsFtO","./pipMix":"gYMLD","./loadedMix":"fMSRd","./playedMix":"iRHNE","./playingMix":"dQ40z","./autoSizeMix":"iF844","./rectMix":"1hAm8","./flipMix":"dhi4g","./miniMix":"eQPx9","./loopMix":"gQaVE","./posterMix":"7n9Pt","./autoHeightMix":"8Az1F","./themeMix":"kXlsI","./titleMix":"b8f4Q","./normalSizeMix":"4fP62","./subtitleOffsetMix":"gdNfa","./optionInit":"luxZi","./eventInit":"b25aJ","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"9mMBB":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{option:t,template:{$video:r}}=e;o.def(e,"url",{get:()=>r.currentSrc,async set(i){const n=t.type||o.getExt(i),a=t.customType[n];n&&a?(await o.sleep(),e.loading.show=!0,a.call(e,r,i,e)):(e.url&&e.url!==i&&e.once("video:canplay",(()=>{e.isReady&&e.emit("restart")})),r.src=i,e.option.url=i,e.emit("url",i))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],ghisN:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{template:{$video:t}}=e;o.def(e,"attr",{value(e,r){if(void 0===r)return t[e];t[e]=r}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],l5N6R:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{i18n:t,notice:r,option:i,constructor:{instances:n},template:{$video:a}}=e;o.def(e,"play",{value(){const o=a.play();if(o&&o.then&&o.then().catch((e=>{throw r.show=e,e})),i.mutex)for(let t=0;te.playing?e.pause():e.play()})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],bsO1Q:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{notice:t}=e;o.def(e,"seek",{set(r){e.currentTime=r,e.emit("seek",e.currentTime),e.duration&&(t.show=`${o.secondToTime(e.currentTime)} / ${o.secondToTime(e.duration)}`)}}),o.def(e,"forward",{set(t){e.seek=e.currentTime+t}}),o.def(e,"backward",{set(t){e.seek=e.currentTime-t}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],ivSmC:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{template:{$video:t},i18n:r,notice:i,storage:n}=e;o.def(e,"volume",{get:()=>t.volume||0,set:a=>{t.volume=o.clamp(a,0,1),i.show=`${r.get("Volume")}: ${parseInt(100*t.volume,10)}`,0!==t.volume&&n.set("volume",t.volume),e.emit("volume",t.volume)}}),o.def(e,"muted",{get:()=>t.muted,set:r=>{t.muted=r,e.emit("volume",t.volume)}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"8LbXb":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{$video:t}=e.template;o.def(e,"currentTime",{get:()=>t.currentTime||0,set:r=>{r=parseFloat(r),Number.isNaN(r)||(t.currentTime=o.clamp(r,0,e.duration))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],f7tNT:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){o.def(e,"duration",{get:()=>{const{duration:t}=e.template.$video;return t===1/0?0:t||0}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],ejQWi:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{i18n:t,option:r,notice:i}=e;function n(o,n,a){return new Promise((s=>{if(o===e.url)return s(o);const{playing:l}=e;e.pause(),URL.revokeObjectURL(e.url),e.url=o,e.once("video:canplay",(()=>{e.playbackRate=!1,e.aspectRatio=!1,e.flip="normal",e.autoSize=r.autoSize,e.currentTime=a,e.notice.show="",l&&e.play(),n&&(i.show=`${t.get("Switch Video")}: ${n}`),e.emit("switch",o),s(o)}))}))}o.def(e,"switchQuality",{value:(t,r)=>n(t,r,e.currentTime)}),o.def(e,"switchUrl",{value:(e,t)=>n(e,t,0)})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],kNcxE:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{template:{$video:t},i18n:r,notice:i}=e;o.def(e,"playbackRate",{get:()=>t.playbackRate,set(n){if(n){if(n===t.playbackRate)return;const a=[.25,.5,.75,1,1.25,1.5,1.75,2,3,4];o.errorHandle(a.includes(n),`'playbackRate' only accept ${a.toString()} as parameters`),t.playbackRate=n,i.show=`${r.get("Rate")}: ${1===n?r.get("Normal"):`${n}x`}`,e.emit("playbackRate",n)}else e.playbackRate=1,e.emit("playbackRate")}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"8v5yt":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{template:{$video:t,$player:r},i18n:i,notice:n}=e;o.def(e,"aspectRatio",{get:()=>r.dataset.aspectRatio||"default",set(a){a||(a="default");const s=["default","4:3","16:9"];if(o.errorHandle(s.includes(a),`'aspectRatio' only accept ${s.toString()} as parameters`),"default"===a)o.setStyle(t,"width",null),o.setStyle(t,"height",null),o.setStyle(t,"padding",null),delete r.dataset.aspectRatio;else{const e=a.split(":").map(Number),{videoWidth:i,videoHeight:n}=t,{clientWidth:s,clientHeight:l}=r,c=i/n,p=e[0]/e[1];if(c>p){const e=p*n/i;o.setStyle(t,"width",100*e+"%"),o.setStyle(t,"height","100%"),o.setStyle(t,"padding",`0 ${(s-s*e)/2}px`)}else{const e=i/p/n;o.setStyle(t,"width","100%"),o.setStyle(t,"height",100*e+"%"),o.setStyle(t,"padding",(l-l*e)/2+"px 0")}r.dataset.aspectRatio=a}n.show=`${i.get("Aspect Ratio")}: ${"default"===a?i.get("Default"):a}`,e.emit("aspectRatio",a)}}),o.def(e,"aspectRatioReset",{set(t){if(t){const{aspectRatio:t}=e;e.aspectRatio=t}}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],eLUEv:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{option:t,notice:r,template:{$video:i}}=e,n=document.createElement("canvas");o.def(e,"getDataURL",{value:()=>new Promise(((e,t)=>{try{n.width=i.videoWidth,n.height=i.videoHeight,n.getContext("2d").drawImage(i,0,0),e(n.toDataURL("image/png"))}catch(e){r.show=e,t(e)}}))}),o.def(e,"getBlobUrl",{value:()=>new Promise(((e,t)=>{try{n.width=i.videoWidth,n.height=i.videoHeight,n.getContext("2d").drawImage(i,0,0),n.toBlob((t=>{e(URL.createObjectURL(t))}))}catch(e){r.show=e,t(e)}}))}),o.def(e,"screenshot",{value:async()=>{const r=await e.getDataURL();return o.download(r,`${t.title||"artplayer"}_${o.secondToTime(i.currentTime)}.png`),e.emit("screenshot",r),r}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],ifvhR:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../libs/screenfull"),n=o.interopDefault(i),a=e("../utils");r.default=function(e){const{i18n:t,notice:r,template:{$video:o,$player:i}}=e,s=n.default();e.once("video:loadedmetadata",(()=>{var n;s.isEnabled?(n=e,s.on("change",(()=>n.emit("fullscreen",s.isFullscreen))),a.def(n,"fullscreen",{get:()=>s.isFullscreen,async set(e){e?(n.normalSize="fullscreen",n.aspectRatioReset=!0,n.autoSize=!1,await s.request(i),a.addClass(i,"art-fullscreen"),n.emit("resize"),n.emit("fullscreen",!0),r.show=""):(n.aspectRatioReset=!0,n.autoSize=n.option.autoSize,await s.exit(),a.removeClass(i,"art-fullscreen"),n.emit("resize"),n.emit("fullscreen"),r.show="")}})):document.fullscreenEnabled||o.webkitSupportsFullscreen?(e=>{a.def(e,"fullscreen",{get:()=>o.webkitDisplayingFullscreen,set(t){t?(e.normalSize="fullscreen",o.webkitEnterFullscreen(),e.emit("fullscreen",!0),r.show=""):(o.webkitExitFullscreen(),e.emit("fullscreen"),r.show="")}})})(e):a.def(e,"fullscreen",{get:()=>!1,set(){r.show=t.get("Fullscreen Not Supported")}}),a.def(e,"fullscreen",a.get(e,"fullscreen"))}))}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY","../libs/screenfull":"hXAU9"}],hXAU9:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(){const e=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],t=(()=>{const t=e[0],r={};for(const o of e){const e=o?.[1];if(e in document){for(const[e,i]of o.entries())r[t[e]]=i;return r}}return!1})(),r={change:t.fullscreenchange,error:t.fullscreenerror};let o={request:(e=document.documentElement,r)=>new Promise(((i,n)=>{const a=()=>{o.off("change",a),i()};o.on("change",a);const s=e[t.requestFullscreen](r);s instanceof Promise&&s.then(a).catch(n)})),exit:()=>new Promise(((e,r)=>{if(!o.isFullscreen)return void e();const i=()=>{o.off("change",i),e()};o.on("change",i);const n=document[t.exitFullscreen]();n instanceof Promise&&n.then(i).catch(r)})),toggle:(e,t)=>o.isFullscreen?o.exit():o.request(e,t),onchange(e){o.on("change",e)},onerror(e){o.on("error",e)},on(e,t){const o=r[e];o&&document.addEventListener(o,t,!1)},off(e,t){const o=r[e];o&&document.removeEventListener(o,t,!1)},raw:t};return Object.defineProperties(o,{isFullscreen:{get:()=>Boolean(document[t.fullscreenElement])},element:{enumerable:!0,get:()=>document[t.fullscreenElement]??void 0},isEnabled:{enumerable:!0,get:()=>Boolean(document[t.fullscreenEnabled])}}),t||(o={isEnabled:!1}),o}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],dsFtO:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{notice:t,template:{$player:r}}=e;o.def(e,"fullscreenWeb",{get:()=>o.hasClass(r,"art-fullscreen-web"),set(i){i?(e.normalSize="fullscreenWeb",o.addClass(r,"art-fullscreen-web"),e.aspectRatioReset=!0,e.autoSize=!1,e.emit("resize"),e.emit("fullscreenWeb",!0),t.show=""):(o.removeClass(r,"art-fullscreen-web"),e.aspectRatioReset=!0,e.autoSize=e.option.autoSize,e.emit("resize"),e.emit("fullscreenWeb"),t.show="")}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],gYMLD:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{i18n:t,notice:r,template:{$video:i}}=e;document.pictureInPictureEnabled?function(e){const{template:{$video:t},events:{proxy:r},notice:i}=e;t.disablePictureInPicture=!1,o.def(e,"pip",{get:()=>document.pictureInPictureElement,set(r){r?(e.normalSize="pip",t.requestPictureInPicture().catch((e=>{throw i.show=e,e}))):document.exitPictureInPicture().catch((e=>{throw i.show=e,e}))}}),r(t,"enterpictureinpicture",(()=>{e.emit("pip",!0)})),r(t,"leavepictureinpicture",(()=>{e.emit("pip")}))}(e):i.webkitSupportsPresentationMode?function(e){const{$video:t}=e.template;t.webkitSetPresentationMode("inline"),o.def(e,"pip",{get:()=>"picture-in-picture"===t.webkitPresentationMode,set(r){r?(e.normalSize="pip",t.webkitSetPresentationMode("picture-in-picture"),e.emit("pip",!0)):(t.webkitSetPresentationMode("inline"),e.emit("pip"))}})}(e):o.def(e,"pip",{get:()=>!1,set(){r.show=t.get("PIP Not Supported")}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],fMSRd:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{$video:t}=e.template;o.def(e,"loaded",{get:()=>e.loadedTime/t.duration}),o.def(e,"loadedTime",{get:()=>t.buffered.length?t.buffered.end(t.buffered.length-1):0})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],iRHNE:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){o.def(e,"played",{get:()=>e.currentTime/e.duration})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],dQ40z:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{$video:t}=e.template;o.def(e,"playing",{get:()=>!!(t.currentTime>0&&!t.paused&&!t.ended&&t.readyState>2)})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],iF844:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{$container:t,$player:r,$video:i}=e.template;o.def(e,"autoSize",{get:()=>o.hasClass(t,"art-auto-size"),set(n){if(n){const{videoWidth:n,videoHeight:a}=i,{width:s,height:l}=t.getBoundingClientRect(),c=n/a,p=s/l;if(o.addClass(t,"art-auto-size"),p>c){const e=l*c/s*100;o.setStyle(r,"width",`${e}%`),o.setStyle(r,"height","100%")}else{const e=s/c/l*100;o.setStyle(r,"width","100%"),o.setStyle(r,"height",`${e}%`)}e.emit("autoSize",{width:e.width,height:e.height})}else o.removeClass(t,"art-auto-size"),o.setStyle(r,"width",null),o.setStyle(r,"height",null),e.emit("autoSize")}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"1hAm8":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){o.def(e,"rect",{get:()=>e.template.$player.getBoundingClientRect()});const t=["bottom","height","left","right","top","width"];for(let r=0;re.rect[i]})}o.def(e,"x",{get:()=>e.left+window.pageXOffset}),o.def(e,"y",{get:()=>e.top+window.pageYOffset})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],dhi4g:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{template:{$player:t},i18n:r,notice:i}=e;o.def(e,"flip",{get:()=>t.dataset.flip||"normal",set(n){n||(n="normal");const a=["normal","horizontal","vertical"];o.errorHandle(a.includes(n),`'flip' only accept ${a.toString()} as parameters`),"normal"===n?delete t.dataset.flip:(e.rotate=!1,t.dataset.flip=n);const s=n.replace(n[0],n[0].toUpperCase());i.show=`${r.get("Video Flip")}: ${r.get(s)}`,e.emit("flip",n)}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],eQPx9:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{i18n:t,option:r,storage:i,events:{proxy:n},template:{$player:a,$miniClose:s,$miniTitle:l,$miniHeader:c}}=e;let p="",u=!1,d=0,f=0,h=0,m=0;n(c,"mousedown",(t=>{u=!0,d=t.pageX,f=t.pageY,h=e.left,m=e.top})),n(document,"mousemove",(e=>{if(u){o.addClass(a,"art-is-dragging");const t=m+e.pageY-f,r=h+e.pageX-d;o.setStyle(a,"top",`${t}px`),o.setStyle(a,"left",`${r}px`),i.set("top",t),i.set("left",r)}})),n(document,"mouseup",(()=>{u=!1,o.removeClass(a,"art-is-dragging")})),n(s,"click",(()=>{e.mini=!1,u=!1,o.removeClass(a,"art-is-dragging")})),o.append(l,r.title||t.get("Mini Player")),o.def(e,"mini",{get:()=>o.hasClass(a,"art-mini"),set(t){if(t){e.normalSize="mini",e.autoSize=!1,p=a.style.cssText,o.addClass(a,"art-mini");const t=i.get("top"),r=i.get("left");if(t&&r)o.setStyle(a,"top",`${t}px`),o.setStyle(a,"left",`${r}px`),o.isInViewport(c)||(i.del("top"),i.del("left"),e.mini=!0);else{const t=document.body,r=t.clientHeight-e.height-50,n=t.clientWidth-e.width-50;i.set("top",r),i.set("left",n),o.setStyle(a,"top",`${r}px`),o.setStyle(a,"left",`${n}px`)}e.aspectRatio=!1,e.playbackRate=!1,e.notice.show="",e.emit("mini",!0)}else a.style.cssText=p,o.removeClass(a,"art-mini"),o.setStyle(a,"top",null),o.setStyle(a,"left",null),e.aspectRatio=!1,e.playbackRate=!1,e.autoSize=r.autoSize,e.notice.show="",e.emit("mini")}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],gQaVE:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){let t=[];o.def(e,"loop",{get:()=>t,set:r=>{if(Array.isArray(r)&&"number"==typeof r[0]&&"number"==typeof r[1]){const i=o.clamp(r[0],0,Math.min(r[1],e.duration)),n=o.clamp(r[1],i,e.duration);n-i>=1?(t=[i,n],e.emit("loop",t)):(t=[],e.emit("loop"))}else t=[],e.emit("loop")}}),e.on("video:timeupdate",(()=>{t.length&&(e.currentTimet[1])&&(e.seek=t[0])}))}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"7n9Pt":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{option:t,template:{$poster:r}}=e;o.def(e,"poster",{get:()=>t.poster,set(e){t.poster=e,o.setStyle(r,"backgroundImage",`url(${e})`)}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"8Az1F":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{option:t,template:{$container:r,$video:i}}=e,n=r.style.height;o.def(e,"autoHeight",{get:()=>o.hasClass(r,"art-auto-height"),set(a){if(a){const{clientWidth:n}=r,{videoHeight:a,videoWidth:s}=i,l=a*(n/s);o.setStyle(r,"height",l+"px"),o.addClass(r,"art-auto-height"),e.autoSize=t.autoSize,e.emit("autoHeight",l)}else o.setStyle(r,"height",n),o.removeClass(r,"art-auto-height"),e.autoSize=t.autoSize,e.emit("autoHeight")}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],kXlsI:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{option:t,template:{$player:r}}=e;o.def(e,"theme",{get:()=>getComputedStyle(r).getPropertyValue("--theme"),set(e){t.theme=e,r.style.setProperty("--theme",e)}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],b8f4Q:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){o.def(e,"title",{get:()=>e.option.title,set(t){e.option.title=t}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"4fP62":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const t=["mini","pip","fullscreen","fullscreenWeb"];o.def(e,"normalSize",{get:()=>t.every((t=>!e[t])),set(r){t.filter((e=>e!==r)).forEach((t=>{e[t]&&(e[t]=!1)}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],gdNfa:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{clamp:t}=e.constructor.utils,{notice:r,template:i,i18n:n}=e;let a=0,s=[];e.on("subtitle:switch",(()=>{s=[]})),o.def(e,"subtitleOffset",{get:()=>a,set(o){if(i.$track&&i.$track.track){const l=Array.from(i.$track.track.cues);a=t(o,-5,5);for(let r=0;r{e.attr(r,t.moreVideoAttr[r])})),t.muted&&(e.muted=t.muted),t.volume&&(i.volume=o.clamp(t.volume,0,1));const a=r.get("volume");"number"==typeof a&&(i.volume=o.clamp(a,0,1)),t.poster&&o.setStyle(n,"backgroundImage",`url(${t.poster})`),t.autoplay&&(i.autoplay=t.autoplay),t.playsInline&&(i.playsInline=!0,i["webkit-playsinline"]=!0),t.theme&&(e.theme=t.theme),0===t.ads.length&&(e.url=t.url)}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],b25aJ:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../config"),n=o.interopDefault(i),a=e("../utils");r.default=function(e){const{i18n:t,notice:r,option:o,constructor:i,events:{proxy:s},template:{$player:l,$video:c,$poster:p}}=e;let u=0;for(let t=0;t{e.emit(`video:${t.type}`,t)}));e.on("video:canplay",(()=>{u=0,e.loading.show=!1})),e.once("video:canplay",(()=>{e.loading.show=!1,e.controls.show=!0,e.mask.show=!0,e.isReady=!0,e.emit("ready")})),e.on("video:ended",(()=>{o.loop?(e.seek=0,e.play(),e.controls.show=!1,e.mask.show=!1):(e.controls.show=!0,e.mask.show=!0)})),e.on("video:error",(async()=>{u{e.autoSize=o.autoSize,a.isMobile&&(e.loading.show=!1,e.controls.show=!0,e.mask.show=!0)})),e.on("video:loadstart",(()=>{e.loading.show=!0})),e.on("video:pause",(()=>{e.controls.show=!0,e.mask.show=!0})),e.on("video:play",(()=>{e.mask.show=!1,a.setStyle(p,"display","none")})),e.on("video:playing",(()=>{e.mask.show=!1})),e.on("video:seeked",(()=>{e.loading.show=!1})),e.on("video:seeking",(()=>{e.loading.show=!0})),e.on("video:timeupdate",(()=>{e.mask.show=!1})),e.on("video:waiting",(()=>{e.loading.show=!0}))}},{"../config":"ej4fZ","../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"3qXcr":[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../utils"),n=e("../utils/component"),a=o.interopDefault(n),s=e("./fullscreen"),l=o.interopDefault(s),c=e("./fullscreenWeb"),p=o.interopDefault(c),u=e("./pip"),d=o.interopDefault(u),f=e("./playAndPause"),h=o.interopDefault(f),m=e("./progress"),g=o.interopDefault(m),y=e("./subtitle"),v=o.interopDefault(y),b=e("./time"),x=o.interopDefault(b),w=e("./volume"),j=o.interopDefault(w),k=e("./setting"),M=o.interopDefault(k),S=e("./thumbnails"),I=o.interopDefault(S),F=e("./screenshot"),$=o.interopDefault(F),T=e("./quality"),E=o.interopDefault(T),C=e("./loop"),z=o.interopDefault(C);class Y extends a.default{constructor(e){super(e),this.name="control";const{option:t,constructor:r,events:{proxy:o},template:{$player:n}}=e;let a=Date.now();o(n,["click","mousemove","touchstart","touchmove"],(()=>{this.show=!0,i.removeClass(n,"art-hide-cursor"),i.addClass(n,"art-hover"),a=Date.now()})),e.on("video:timeupdate",(()=>{e.playing&&this.show&&Date.now()-a>=r.CONTROL_HIDE_TIME&&(this.show=!1,i.addClass(n,"art-hide-cursor"),i.removeClass(n,"art-hover"))})),e.once("video:loadedmetadata",(()=>{this.add(g.default({name:"progress",disable:t.isLive,position:"top",index:10})),this.add(I.default({name:"thumbnails",disable:!t.thumbnails.url||t.isLive||i.isMobile,position:"top",index:20})),this.add(z.default({name:"loop",disable:!1,position:"top",index:30})),this.add(h.default({name:"playAndPause",disable:!1,position:"left",index:10})),this.add(j.default({name:"volume",disable:!1,position:"left",index:20})),this.add(x.default({name:"time",disable:t.isLive,position:"left",index:30})),this.add(E.default({name:"quality",disable:0===t.quality.length,position:"right",index:10})),this.add($.default({name:"screenshot",disable:!t.screenshot||i.isMobile,position:"right",index:20})),this.add(v.default({name:"subtitle",disable:!t.subtitle.url,position:"right",index:30})),this.add(M.default({name:"setting",disable:!t.setting,position:"right",index:40})),this.add(d.default({name:"pip",disable:!t.pip,position:"right",index:50})),this.add(p.default({name:"fullscreenWeb",disable:!t.fullscreenWeb,position:"right",index:60})),this.add(l.default({name:"fullscreen",disable:!t.fullscreen,position:"right",index:70}));for(let e=0;eNumber(e.dataset.index)>=Number(o.dataset.index)));return p?p.insertAdjacentElement("beforebegin",o):i.append(this.$parent,o),t.html&&i.append(o,t.html),t.style&&i.setStyles(o,t.style),t.tooltip&&i.tooltip(o,t.tooltip),t.click&&this.art.events.proxy(o,"click",(e=>{e.preventDefault(),t.click.call(this.art,this,e)})),t.selector&&["left","right"].includes(t.position)&&this.selector(t,o),t.mounted&&t.mounted.call(this.art,o),1===o.childNodes.length&&3===o.childNodes[0].nodeType&&i.addClass(o,"art-control-onlyText"),l.def(this,r,{value:o}),o}selector(e,t){const{hover:r,proxy:o}=this.art.events;i.addClass(t,"art-control-selector");const n=document.createElement("div");i.addClass(n,"art-selector-value"),i.append(n,e.html),t.innerText="",i.append(t,n);const a=e.selector.map(((e,t)=>`
${e.html}
`)).join(""),s=document.createElement("div");i.addClass(s,"art-selector-list"),i.append(s,a),i.append(t,s);const l=()=>{const e=i.getStyle(t,"width")/2-i.getStyle(s,"width")/2;s.style.left=`${e}px`};r(t,l),o(s,"click",(async t=>{const r=(t.composedPath()||[]).find((e=>i.hasClass(e,"art-selector-item")));if(!r)return;i.inverseClass(r,"art-current");const o=Number(r.dataset.index),a=e.selector[o]||{};if(n.innerText=r.innerText,e.onSelect){const o=await e.onSelect.call(this.art,a,r,t);"string"!=typeof o&&"number"!=typeof o||(n.innerHTML=o)}l(),this.art.emit("selector",a,r)}))}}},{"./dom":"fqaW9","option-validator":"2A2W5","../scheme":"3izFE","./property":"5ynPA","./error":"kNZvP","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"43BKT":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>({...e,tooltip:t.i18n.get("Fullscreen"),mounted:e=>{const{events:{proxy:r},icons:i,i18n:n}=t,a=o.append(e,i.fullscreenOn),s=o.append(e,i.fullscreenOff);o.setStyle(s,"display","none"),r(e,"click",(()=>{t.fullscreen=!t.fullscreen})),t.on("fullscreen",(t=>{t?(o.tooltip(e,n.get("Exit Fullscreen")),o.setStyle(a,"display","none"),o.setStyle(s,"display","inline-flex")):(o.tooltip(e,n.get("Fullscreen")),o.setStyle(a,"display","inline-flex"),o.setStyle(s,"display","none"))}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],kQJHz:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>({...e,tooltip:t.i18n.get("Web Fullscreen"),mounted:e=>{const{events:{proxy:r},icons:i,i18n:n}=t,a=o.append(e,i.fullscreenWebOn),s=o.append(e,i.fullscreenWebOff);o.setStyle(s,"display","none"),r(e,"click",(()=>{t.fullscreenWeb=!t.fullscreenWeb})),t.on("fullscreenWeb",(t=>{t?(o.tooltip(e,n.get("Exit Web Fullscreen")),o.setStyle(a,"display","none"),o.setStyle(s,"display","inline-flex")):(o.tooltip(e,n.get("Web Fullscreen")),o.setStyle(a,"display","inline-flex"),o.setStyle(s,"display","none"))}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],aWne0:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>({...e,tooltip:t.i18n.get("PIP Mode"),mounted:e=>{const{events:{proxy:r},icons:i,i18n:n}=t;o.append(e,i.pip),r(e,"click",(()=>{t.pip=!t.pip})),t.on("pip",(t=>{o.tooltip(e,n.get(t?"Exit PIP Mode":"PIP Mode"))}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"4z78f":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>({...e,mounted:e=>{const{events:{proxy:r},icons:i,i18n:n}=t,a=o.append(e,i.play),s=o.append(e,i.pause);function l(){o.setStyle(a,"display","flex"),o.setStyle(s,"display","none")}function c(){o.setStyle(a,"display","none"),o.setStyle(s,"display","flex")}o.tooltip(a,n.get("Play")),o.tooltip(s,n.get("Pause")),r(a,"click",(()=>{t.play()})),r(s,"click",(()=>{t.pause()})),t.playing?c():l(),t.on("video:playing",(()=>{c()})),t.on("video:pause",(()=>{l()}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"19nwD":[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"getPosFromEvent",(()=>n));var i=e("../utils");function n(e,t){const{$progress:r}=e.template,{left:o}=r.getBoundingClientRect(),n=t.pageX,a=i.clamp(n-o,0,r.clientWidth),s=a/r.clientWidth*e.duration;return{second:s,time:i.secondToTime(s),width:a,percentage:i.clamp(a/r.clientWidth,0,1)}}r.default=function(e){return t=>{const{icons:r,option:o,events:{proxy:a}}=t;return{...e,html:'
',mounted:e=>{let s=!1;const l=i.query(".art-progress-loaded",e),c=i.query(".art-progress-played",e),p=i.query(".art-progress-highlight",e),u=i.query(".art-progress-indicator",e),d=i.query(".art-progress-tip",e);i.setStyle(c,"backgroundColor","var(--theme)");let f=t.constructor.INDICATOR_SIZE;function h(e,t){"loaded"===e&&i.setStyle(l,"width",100*t+"%"),"played"===e&&(i.setStyle(c,"width",100*t+"%"),i.setStyle(u,"left",`calc(${100*t}% - ${f/2}px)`))}r.indicator?(f=t.constructor.INDICATOR_SIZE_ICON,i.append(u,r.indicator)):i.setStyles(u,{backgroundColor:"var(--theme)"}),i.isMobile&&(f=t.constructor.INDICATOR_SIZE_MOBILE,r.indicator&&(f=t.constructor.INDICATOR_SIZE_MOBILE_ICON)),i.setStyles(u,{left:`-${f/2}px`,width:`${f}px`,height:`${f}px`});for(let e=0;e`)}h("loaded",t.loaded),t.on("setBar",((e,t)=>{h(e,t)})),t.on("video:progress",(()=>{h("loaded",t.loaded)})),t.on("video:timeupdate",(()=>{h("played",t.played)})),t.on("video:ended",(()=>{h("played",1)})),i.isMobile||(a(e,"click",(e=>{if(e.target!==u){const{second:r,percentage:o}=n(t,e);h("played",o),t.seek=r}})),a(e,"mousemove",(r=>{i.setStyle(d,"display","block"),i.includeFromEvent(r,p)?function(r){const{width:o}=n(t,r),{text:a}=r.target.dataset;d.innerHTML=a;const s=d.clientWidth;o<=s/2?i.setStyle(d,"left",0):o>e.clientWidth-s/2?i.setStyle(d,"left",e.clientWidth-s+"px"):i.setStyle(d,"left",o-s/2+"px")}(r):function(r){const{width:o,time:a}=n(t,r);d.innerHTML=a;const s=d.clientWidth;o<=s/2?i.setStyle(d,"left",0):o>e.clientWidth-s/2?i.setStyle(d,"left",e.clientWidth-s+"px"):i.setStyle(d,"left",o-s/2+"px")}(r)})),a(e,"mouseout",(()=>{i.setStyle(d,"display","none")})),a(u,"mousedown",(()=>{s=!0})),a(document,"mousemove",(e=>{if(s){const{second:r,percentage:o}=n(t,e);h("played",o),t.seek=r}})),a(document,"mouseup",(()=>{s&&(s=!1)})))}}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"31jqM":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>({...e,tooltip:t.i18n.get("Hide Subtitle"),mounted:e=>{const{events:{proxy:r},icons:i,i18n:n,subtitle:a}=t;o.append(e,i.subtitle),r(e,"click",(()=>{a.toggle=!0})),t.on("subtitle",(t=>{o.tooltip(e,n.get(t?"Hide Subtitle":"Show Subtitle"))}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],lh90q:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>({...e,style:{cursor:"auto"},mounted:e=>{function r(){const r=`${o.secondToTime(t.currentTime)} / ${o.secondToTime(t.duration)}`;r!==e.innerText&&(e.innerText=r)}r();const i=["video:loadedmetadata","video:timeupdate","video:progress"];for(let e=0;e({...e,mounted:e=>{const{events:{proxy:r},icons:i,i18n:n}=t;let a=!1;const s=t.constructor.VOLUME_PANEL_WIDTH,l=t.constructor.VOLUME_HANDLE_WIDTH,c=o.append(e,i.volume),p=o.append(e,i.volumeClose),u=o.append(e,'
'),d=o.append(u,'
');function f(e){const{left:t}=u.getBoundingClientRect();return o.clamp(e.pageX-t-l/2,0,s-l/2)/(s-l)}function h(e=.7){if(t.muted||0===e)o.setStyle(c,"display","none"),o.setStyle(p,"display","flex"),o.setStyle(d,"left","0");else{const t=(s-l)*e;o.setStyle(c,"display","flex"),o.setStyle(p,"display","none"),o.setStyle(d,"left",`${t}px`)}}o.tooltip(c,n.get("Mute")),o.setStyle(p,"display","none"),o.isMobile&&o.setStyle(u,"display","none"),h(t.volume),t.on("video:volumechange",(()=>{h(t.volume)})),r(c,"click",(()=>{t.muted=!0})),r(p,"click",(()=>{t.muted=!1})),r(u,"click",(e=>{t.muted=!1,t.volume=f(e)})),r(d,"mousedown",(()=>{a=!0})),r(e,"mousemove",(e=>{a&&(t.muted=!1,t.volume=f(e))})),r(document,"mouseup",(()=>{a&&(a=!1)}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"4rv3i":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>({...e,tooltip:t.i18n.get("Show Setting"),mounted:e=>{const{events:{proxy:r},icons:i,i18n:n,setting:a}=t;o.append(e,i.setting),r(e,"click",(()=>{a.toggle=!0})),t.on("setting",(t=>{o.tooltip(e,n.get(t?"Hide Setting":"Show Setting"))}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],lTgvI:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils"),i=e("./progress");r.default=function(e){return t=>({...e,mounted:e=>{const{option:r,template:{$progress:n,$video:a},events:{proxy:s,loadImg:l}}=t;let c=null,p=!1,u=!1;s(n,"mousemove",(async s=>{if(!p){p=!0;const e=await l(r.thumbnails.url);c=e,u=!0}u&&(o.setStyle(e,"display","block"),function(s){const{width:l}=i.getPosFromEvent(t,s),{url:p,number:u,column:d}=r.thumbnails,f=c.naturalWidth/d,h=f/(a.videoWidth/a.videoHeight),m=n.clientWidth/u,g=Math.floor(l/m),y=Math.ceil(g/d)-1,v=g%d||d-1;o.setStyle(e,"backgroundImage",`url(${p})`),o.setStyle(e,"height",`${h}px`),o.setStyle(e,"width",`${f}px`),o.setStyle(e,"backgroundPosition",`-${v*f}px -${y*h}px`),l<=f/2?o.setStyle(e,"left",0):l>n.clientWidth-f/2?o.setStyle(e,"left",n.clientWidth-f+"px"):o.setStyle(e,"left",l-f/2+"px")}(s))})),s(n,"mouseout",(()=>{o.setStyle(e,"display","none")}))}})}},{"../utils":"5yYFo","./progress":"19nwD","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"71GuX":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>({...e,tooltip:t.i18n.get("Screenshot"),mounted:e=>{const{events:{proxy:r},icons:i}=t;o.append(e,i.screenshot),r(e,"click",(()=>{t.screenshot()}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],f9VNW:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(e){return t=>{const r=t.option.quality,o=r.find((e=>e.default))||r[0];return{...e,html:o?o.html:"",selector:r,onSelect(e){t.switchQuality(e.url,e.html)}}}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],d1O2Q:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>({...e,mounted:e=>{const r=o.append(e,''),i=o.append(e,'');t.on("loop",(n=>{n?(o.setStyle(e,"display","block"),o.setStyle(r,"left",`calc(${n[0]/t.duration*100}% - ${r.clientWidth}px)`),o.setStyle(i,"left",n[1]/t.duration*100+"%")):o.setStyle(e,"display","none")}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],hTnNz:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../utils"),n=e("../utils/component"),a=o.interopDefault(n),s=e("./playbackRate"),l=o.interopDefault(s),c=e("./aspectRatio"),p=o.interopDefault(c),u=e("./flip"),d=o.interopDefault(u),f=e("./info"),h=o.interopDefault(f),m=e("./version"),g=o.interopDefault(m),y=e("./close"),v=o.interopDefault(y);class b extends a.default{constructor(e){super(e),this.art=e,this.name="contextmenu",this.$parent=e.template.$contextmenu,e.once("video:loadedmetadata",(()=>{i.isMobile||this.init()}))}init(){const{option:e,template:{$player:t,$contextmenu:r},events:{proxy:o}}=this.art;this.add(l.default({disable:!e.playbackRate,name:"playbackRate",index:10})),this.add(p.default({disable:!e.aspectRatio,name:"aspectRatio",index:20})),this.add(d.default({disable:!e.flip,name:"flip",index:30})),this.add(h.default({disable:!1,name:"info",index:40})),this.add(g.default({disable:!1,name:"version",index:50})),this.add(v.default({disable:!1,name:"close",index:60}));for(let t=0;t{e.preventDefault(),this.show=!0;const o=e.clientX,n=e.clientY,{height:a,width:s,left:l,top:c}=t.getBoundingClientRect(),{height:p,width:u}=r.getBoundingClientRect();let d=o-l,f=n-c;o+u>l+s&&(d=s-u),n+p>c+a&&(f=a-p),i.setStyles(r,{top:`${f}px`,left:`${d}px`})})),o(t,"click",(e=>{i.includeFromEvent(e,r)||(this.show=!1)})),this.art.on("blur",(()=>{this.show=!1}))}}r.default=b},{"../utils":"5yYFo","../utils/component":"5MLcx","./playbackRate":"1uTBJ","./aspectRatio":"cFKj0","./flip":"l7S3g","./info":"ihHBb","./version":"3q8wK","./close":"sLP7j","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"1uTBJ":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>{const{i18n:r}=t;return{...e,html:`${r.get("Play Speed")}:0.50.75${r.get("Normal")}1.251.52.0`,click:(e,r)=>{const{value:o}=r.target.dataset;o&&(t.playbackRate=Number(o),e.show=!1)},mounted:e=>{t.on("playbackRate",(t=>{const r=o.queryAll("span",e).find((e=>Number(e.dataset.value)===t));r&&o.inverseClass(r,"art-current")}))}}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],cFKj0:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>{const{i18n:r}=t;return{...e,html:`${r.get("Aspect Ratio")}:${r.get("Default")}4:316:9`,click:(e,r)=>{const{value:o}=r.target.dataset;o&&(t.aspectRatio=o,e.show=!1)},mounted:e=>{t.on("aspectRatio",(t=>{const r=o.queryAll("span",e).find((e=>e.dataset.value===t));r&&o.inverseClass(r,"art-current")}))}}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],l7S3g:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>{const{i18n:r}=t;return{...e,html:`${r.get("Video Flip")}:${r.get("Normal")}${r.get("Horizontal")}${r.get("Vertical")}`,click:(e,r)=>{const{value:o}=r.target.dataset;o&&(t.flip=o,e.show=!1)},mounted:e=>{t.on("flip",(t=>{const r=o.queryAll("span",e).find((e=>e.dataset.value===t));r&&o.inverseClass(r,"art-current")}))}}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],ihHBb:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(e){return t=>({...e,html:t.i18n.get("Video Info"),click:e=>{t.info.show=!0,e.show=!1}})}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"3q8wK":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(e){return{...e,html:'ArtPlayer 4.3.17'}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],sLP7j:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(e){return t=>({...e,html:t.i18n.get("Close"),click:e=>{e.show=!1}})}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],bfwuE:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./utils"),n=e("./utils/component"),a=o.interopDefault(n);class s extends a.default{constructor(e){super(e),this.name="info",e.once("video:loadedmetadata",(()=>{i.isMobile||this.init()}))}init(){const{constructor:e,events:{proxy:t},template:{$infoPanel:r,$infoClose:o,$video:n}}=this.art;t(o,"click",(()=>{this.show=!1}));let a=null;const s=i.queryAll("[data-video]",r)||[];this.art.on("destroy",(()=>{clearTimeout(a)})),function t(){for(let e=0;e{this.init(e.option.subtitle)}))}get url(){return this.art.template.$track.src}set url(e){this.switch(e)}get textTrack(){return this.art.template.$video.textTracks[0]}get activeCue(){return this.textTrack.activeCues[0]}style(e,t){const{$subtitle:r}=this.art.template;return"object"==typeof e?i.setStyles(r,e):i.setStyle(r,e,t)}update(){const{$subtitle:e}=this.art.template;e.innerHTML="",this.activeCue&&(e.innerHTML=this.activeCue.text.split(/\r?\n/).map((e=>`

${i.escape(e)}

`)).join(""),this.art.emit("subtitleUpdate",this.activeCue.text))}async switch(e,t={}){const{i18n:r,notice:o,option:i}=this.art,n={...i.subtitle,...t,url:e},a=await this.init(n);return t.name&&(o.show=`${r.get("Switch Subtitle")}: ${t.name}`),a}init(e){if(l.default(e,p.default.subtitle),!e.url)return;const{notice:t,events:{proxy:r},template:{$subtitle:o,$video:n,$track:a}}=this.art;if(!a){const e=document.createElement("track");e.default=!0,e.kind="metadata",n.appendChild(e),this.art.template.$track=e,r(this.textTrack,"cuechange",this.update.bind(this))}return this.style(e.style),i.errorHandle(window.fetch,"fetch not support"),fetch(e.url).then((e=>e.arrayBuffer())).then((t=>{i.errorHandle(window.TextDecoder,"TextDecoder not support");const r=new TextDecoder(e.encoding).decode(t);switch(this.art.emit("subtitleLoad",e.url),e.type||i.getExt(e.url)){case"srt":return i.vttToBlob(i.srtToVtt(r));case"ass":return i.vttToBlob(i.assToVtt(r));case"vtt":return i.vttToBlob(r);default:return e.url}})).then((e=>(o.innerHTML="",this.url===e||(URL.revokeObjectURL(this.url),this.art.template.$track.src=e,this.art.emit("subtitleSwitch",e)),e))).catch((e=>{throw t.show=e,e}))}}r.default=u},{"./utils":"5yYFo","./utils/component":"5MLcx","option-validator":"2A2W5","./scheme":"3izFE","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"9oLaG":[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../utils/error"),n=e("./clickInit"),a=o.interopDefault(n),s=e("./hoverInit"),l=o.interopDefault(s),c=e("./mousemoveInit"),p=o.interopDefault(c),u=e("./resizeInit"),d=o.interopDefault(u),f=e("./gestureInit"),h=o.interopDefault(f),m=e("./viewInit"),g=o.interopDefault(m);r.default=class{constructor(e){this.destroyEvents=[],this.proxy=this.proxy.bind(this),this.hover=this.hover.bind(this),this.loadImg=this.loadImg.bind(this),e.whitelist.state&&e.once("video:loadedmetadata",(()=>{a.default(e,this),l.default(e,this),p.default(e,this),d.default(e,this),h.default(e,this),g.default(e,this)}))}proxy(e,t,r,o={}){if(Array.isArray(t))return t.map((t=>this.proxy(e,t,r,o)));e.addEventListener(t,r,o);const i=()=>e.removeEventListener(t,r,o);return this.destroyEvents.push(i),i}hover(e,t,r){t&&this.proxy(e,"mouseenter",t),r&&this.proxy(e,"mouseleave",r)}loadImg(e){return new Promise(((t,r)=>{let o;if(e instanceof HTMLImageElement)o=e;else{if("string"!=typeof e)return r(new i.ArtPlayerError("Unable to get Image"));o=new Image,o.src=e}if(o.complete)return t(o);this.proxy(o,"load",(()=>t(o))),this.proxy(o,"error",(()=>r(new i.ArtPlayerError(`Failed to load Image: ${o.src}`))))}))}destroy(){for(let e=0;e{o.includeFromEvent(t,i)?(e.isFocus=!0,e.emit("focus")):(e.isFocus=!1,e.emit("blur"))}));let a=0;t.proxy(n,"click",(()=>{const t=Date.now();t-a<=r.DB_CLICE_TIME?(e.emit("dblclick"),o.isMobile?e.toggle():e.fullscreen=!e.fullscreen):(e.emit("click"),o.isMobile||e.toggle()),a=t}))}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],eIqcL:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e,t){const{$player:r}=e.template;t.hover(r,(()=>{o.addClass(r,"art-hover"),e.emit("hover",!0)}),(()=>{o.removeClass(r,"art-hover"),e.emit("hover")}))}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],hEy8X:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(e,t){const{$player:r}=e.template;t.proxy(r,"mousemove",(t=>{e.emit("mousemove",t)}))}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"9c8lQ":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e,t){const{notice:r,option:i}=e,n=o.throttle((()=>{e.normalSize&&(e.autoSize=i.autoSize),e.aspectRatioReset=!0,r.show="",e.emit("resize")}),e.constructor.RESIZE_TIME);t.proxy(window,["orientationchange","resize"],(()=>{n()})),screen&&screen.orientation&&screen.orientation.onchange&&t.proxy(screen.orientation,"change",(()=>{n()}))}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],gzHdo:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e,t){if(o.isMobile&&!e.option.isLive){const{notice:r,plugins:i,template:{$video:n,$bottom:a,$controls:s}}=e;let l=!1,c=0,p=0,u=0;const d=t=>{if(1===t.touches.length){l=!0;const{clientX:r,clientY:o}=t.touches[0];c=r,p=o,u=e.currentTime}},f=t=>{if(1===t.touches.length&&l&&e.duration){const n=i.autoOrientation&&i.autoOrientation.state,{clientX:a,clientY:s}=t.touches[0],l=o.clamp((a-c)/e.width,-1,1),d=o.clamp((s-p)/e.height,-1,1),f=n?d:l,h=o.clamp(u+e.duration*f/2,0,e.duration);e.seek=h,e.emit("setBar","played",o.clamp(h/e.duration,0,1)),r.show=`${o.secondToTime(h)} / ${o.secondToTime(e.duration)}`}},h=()=>{l&&(c=0,p=0,u=0,l=!1)};t.proxy(a,"touchstart",(e=>{o.includeFromEvent(e,s)||d(e)})),t.proxy(a,"touchmove",f),t.proxy(n,"touchstart",d),t.proxy(n,"touchmove",f),t.proxy(document,"touchend",h)}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],cJlT5:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e,t){const{option:r,constructor:i,template:{$container:n}}=e,a=o.throttle((()=>{e.emit("view",o.isInViewport(n,i.SCROLL_GAP))}),i.SCROLL_TIME);t.proxy(window,"scroll",(()=>{a()})),e.on("view",(t=>{r.autoMini&&(e.mini=!t)}))}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],cKO4X:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("./utils");r.default=class{constructor(e){this.art=e,this.keys={},e.once("video:loadedmetadata",(()=>{e.option.hotkey&&!o.isMobile&&this.init()}))}init(){const{proxy:e}=this.art.events;this.add(27,(()=>{this.art.fullscreenWeb&&(this.art.fullscreenWeb=!1)})),this.add(32,(()=>{this.art.toggle()})),this.add(37,(()=>{this.art.backward=5})),this.add(38,(()=>{this.art.volume+=.1})),this.add(39,(()=>{this.art.forward=5})),this.add(40,(()=>{this.art.volume-=.1})),e(window,"keydown",(e=>{if(this.art.isFocus){const t=document.activeElement.tagName.toUpperCase(),r=document.activeElement.getAttribute("contenteditable");if("INPUT"!==t&&"TEXTAREA"!==t&&""!==r&&"true"!==r){const t=this.keys[e.keyCode];if(t){e.preventDefault();for(let r=0;r{for(let e=0;e{i.innerText="",o.removeClass(r,"art-notice-show")}),t.NOTICE_TIME)):o.removeClass(r,"art-notice-show")}}},{"./utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],aJ0dF:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./utils"),n=e("./utils/component"),a=o.interopDefault(n);class s extends a.default{constructor(e){super(e),this.name="mask";const{template:t,icons:r,events:o}=e;i.append(t.$state,r.state),o.proxy(t.$state,"click",(()=>e.play()))}}r.default=s},{"./utils":"5yYFo","./utils/component":"5MLcx","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],jx1Wu:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../utils"),n=e("bundle-text:./loading.svg"),a=o.interopDefault(n),s=e("bundle-text:./state.svg"),l=o.interopDefault(s),c=e("bundle-text:./check.svg"),p=o.interopDefault(c),u=e("bundle-text:./play.svg"),d=o.interopDefault(u),f=e("bundle-text:./pause.svg"),h=o.interopDefault(f),m=e("bundle-text:./volume.svg"),g=o.interopDefault(m),y=e("bundle-text:./volume-close.svg"),v=o.interopDefault(y),b=e("bundle-text:./subtitle.svg"),x=o.interopDefault(b),w=e("bundle-text:./screenshot.svg"),j=o.interopDefault(w),k=e("bundle-text:./setting.svg"),M=o.interopDefault(k),S=e("bundle-text:./arrow-left.svg"),I=o.interopDefault(S),F=e("bundle-text:./arrow-right.svg"),$=o.interopDefault(F),T=e("bundle-text:./playback-rate.svg"),E=o.interopDefault(T),C=e("bundle-text:./aspect-ratio.svg"),z=o.interopDefault(C),Y=e("bundle-text:./config.svg"),D=o.interopDefault(Y),P=e("bundle-text:./pip.svg"),R=o.interopDefault(P),A=e("bundle-text:./lock.svg"),O=o.interopDefault(A),L=e("bundle-text:./unlock.svg"),H=o.interopDefault(L),_=e("bundle-text:./fullscreen-off.svg"),N=o.interopDefault(_),J=e("bundle-text:./fullscreen-on.svg"),V=o.interopDefault(J),q=e("bundle-text:./fullscreen-web-off.svg"),W=o.interopDefault(q),B=e("bundle-text:./fullscreen-web-on.svg"),U=o.interopDefault(B);r.default=class{constructor(e){const t={loading:a.default,state:l.default,play:d.default,pause:h.default,check:p.default,volume:g.default,volumeClose:v.default,subtitle:x.default,screenshot:j.default,setting:M.default,pip:R.default,arrowLeft:I.default,arrowRight:$.default,playbackRate:E.default,aspectRatio:z.default,config:D.default,lock:O.default,unlock:H.default,fullscreenOff:N.default,fullscreenOn:V.default,fullscreenWebOff:W.default,fullscreenWebOn:U.default,...e.option.icons};Object.keys(t).forEach((e=>{i.def(this,e,{get:()=>{const r=document.createElement("i");return i.addClass(r,"art-icon"),i.addClass(r,`art-icon-${e}`),i.append(r,t[e]),r}})}))}}},{"../utils":"5yYFo","bundle-text:./loading.svg":"gFMCI","bundle-text:./state.svg":"iYMJD","bundle-text:./check.svg":"hyrDV","bundle-text:./play.svg":"eZys6","bundle-text:./pause.svg":"hITjK","bundle-text:./volume.svg":"hNNiX","bundle-text:./volume-close.svg":"dC2M2","bundle-text:./subtitle.svg":"iCL9K","bundle-text:./screenshot.svg":"9hKk0","bundle-text:./setting.svg":"47p50","bundle-text:./arrow-left.svg":"5je49","bundle-text:./arrow-right.svg":"2HKZ5","bundle-text:./playback-rate.svg":"hdBpQ","bundle-text:./aspect-ratio.svg":"alUG1","bundle-text:./config.svg":"6B4Bn","bundle-text:./pip.svg":"2Ya1d","bundle-text:./lock.svg":"5Bna4","bundle-text:./unlock.svg":"daCyz","bundle-text:./fullscreen-off.svg":"bx7Yh","bundle-text:./fullscreen-on.svg":"fxY8n","bundle-text:./fullscreen-web-off.svg":"96euD","bundle-text:./fullscreen-web-on.svg":"ccnBB","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],gFMCI:[function(e,t,r){t.exports=''},{}],iYMJD:[function(e,t,r){t.exports=''},{}],hyrDV:[function(e,t,r){t.exports=''},{}],eZys6:[function(e,t,r){t.exports=''},{}],hITjK:[function(e,t,r){t.exports=''},{}],hNNiX:[function(e,t,r){t.exports=''},{}],dC2M2:[function(e,t,r){t.exports=''},{}],iCL9K:[function(e,t,r){t.exports=''},{}],"9hKk0":[function(e,t,r){t.exports=''},{}],"47p50":[function(e,t,r){t.exports=''},{}],"5je49":[function(e,t,r){t.exports=''},{}],"2HKZ5":[function(e,t,r){t.exports=''},{}],hdBpQ:[function(e,t,r){t.exports=''},{}],alUG1:[function(e,t,r){t.exports=''},{}],"6B4Bn":[function(e,t,r){t.exports=''},{}],"2Ya1d":[function(e,t,r){t.exports=''},{}],"5Bna4":[function(e,t,r){t.exports=''},{}],daCyz:[function(e,t,r){t.exports=''},{}],bx7Yh:[function(e,t,r){t.exports=''},{}],fxY8n:[function(e,t,r){t.exports=''},{}],"96euD":[function(e,t,r){t.exports=''},{}],ccnBB:[function(e,t,r){t.exports=''},{}],hdF39:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./flip"),n=o.interopDefault(i),a=e("./aspectRatio"),s=o.interopDefault(a),l=e("./playbackRate"),c=o.interopDefault(l),p=e("./subtitleOffset"),u=o.interopDefault(p),d=e("../utils/component"),f=o.interopDefault(d),h=e("../utils");function m(e,t,r){for(let o=0;o{t.playbackRate&&this.option.push(c.default(e)),t.aspectRatio&&this.option.push(s.default(e)),t.flip&&this.option.push(n.default(e)),t.subtitleOffset&&this.option.push(u.default(e));for(let e=0;e{this.show&&(this.show=!1,this.init(this.option))})),r(i,"click",(t=>{!this.show||h.includeFromEvent(t,e.controls.setting)||h.includeFromEvent(t,this.$parent)||(this.show=!1,this.init(this.option))})))}add(e){"function"==typeof e?this.option.push(e(this.art)):this.option.push(e),this.cache=new Map,this.events.forEach((e=>e())),this.events=[],this.$parent.innerHTML="",this.option=m(this.option),this.init(this.option)}creatHeader(e){const{icons:t,events:{proxy:r}}=this.art,o=document.createElement("div");h.addClass(o,"art-setting-item"),h.addClass(o,"art-setting-item-back");const i=h.append(o,'
'),n=document.createElement("div");h.addClass(n,"art-setting-item-left-icon"),h.append(n,t.arrowLeft),h.append(i,n),h.append(i,e._parentItem.html);const a=r(o,"click",(()=>{this.init(e._parentList)}));return this.events.push(a),o}creatItem(e){const{icons:t,events:{proxy:r}}=this.art,o=e.selector&&e.selector.length,i=document.createElement("div");h.addClass(i,"art-setting-item"),e.default&&h.addClass(i,"art-current");const n=h.append(i,'
'),a=h.append(i,'
'),s=document.createElement("div");h.addClass(s,"art-setting-item-left-icon"),h.append(s,o?e.icon||t.config:t.check),h.append(n,s),e._$icon=s,h.def(e,"icon",{get:()=>s.innerHTML,set(e){"string"!=typeof e&&"number"!=typeof e||(s.innerHTML=e)}});const l=document.createElement("div");if(h.addClass(l,"art-setting-item-left-text"),h.append(l,e.html||""),h.append(n,l),e._$html=l,h.def(e,"html",{get:()=>l.innerHTML,set(e){"string"!=typeof e&&"number"!=typeof e||(l.innerHTML=e)}}),o){const r=document.createElement("div");h.addClass(r,"art-setting-item-right-tooltip"),h.append(r,e.tooltip||""),h.append(a,r),e._$tooltip=r,h.def(e,"tooltip",{get:()=>r.innerHTML,set(e){"string"!=typeof e&&"number"!=typeof e||(r.innerHTML=e)}});const o=document.createElement("div");h.addClass(o,"art-setting-item-right-icon"),h.append(o,t.arrowRight),h.append(a,o)}const c=r(i,"click",(async t=>{if(o)this.init(e.selector,e.width);else if(h.inverseClass(i,"art-current"),e._parentList&&this.init(e._parentList),e._parentItem&&e._parentItem.onSelect){const r=await e._parentItem.onSelect.call(this.art,e,i,t);e._parentItem._$tooltip&&("string"!=typeof r&&"number"!=typeof r||(e._parentItem._$tooltip.innerHTML=r))}}));return this.events.push(c),i}init(e,t){const{constructor:r}=this.art;if(this.cache.has(e)){const t=this.cache.get(e);h.inverseClass(t,"art-current"),h.setStyle(this.$parent,"width",`${t.dataset.width}px`),h.setStyle(this.$parent,"height",`${t.dataset.height}px`)}else{const o=document.createElement("div");h.addClass(o,"art-setting-panel"),o.dataset.width=t||r.SETTING_WIDTH,o.dataset.height=e.length*r.SETTING_ITEM_HEIGHT,e[0]&&e[0]._parentItem&&(h.append(o,this.creatHeader(e[0])),o.dataset.height=Number(o.dataset.height)+r.SETTING_ITEM_HEIGHT);for(let t=0;te.dataset.value===i));a&&o.inverseClass(a,"art-current")}return{width:i.SETTING_ITEM_WIDTH,html:t.get("Video Flip"),tooltip:t.get(n[e.flip]),icon:r.config,selector:Object.keys(n).map((r=>({value:r,default:r===e.flip,html:t.get(n[r])}))),onSelect(t){e.flip=t.value},mounted:(t,r)=>{a(t,r._$tooltip,e.flip),e.on("flip",(()=>{a(t,r._$tooltip,e.flip)}))}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],jTfLi:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{i18n:t,icons:r,constructor:i}=e;function n(e){return"default"===e?t.get("Default"):e}function a(e,t,r){t&&(t.innerText=n(r));const i=o.queryAll(".art-setting-item",e).find((e=>e.dataset.value===r));i&&o.inverseClass(i,"art-current")}return{width:i.SETTING_ITEM_WIDTH,html:t.get("Aspect Ratio"),icon:r.aspectRatio,tooltip:n(e.aspectRatio),selector:["default","4:3","16:9"].map((t=>({value:t,default:t===e.aspectRatio,html:n(t)}))),onSelect(t){e.aspectRatio=t.value},mounted:(t,r)=>{a(t,r._$tooltip,e.aspectRatio),e.on("aspectRatio",(()=>{a(t,r._$tooltip,e.aspectRatio)}))}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],aowja:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{i18n:t,icons:r,constructor:i}=e;function n(e){return 1===e?t.get("Normal"):e}function a(e,t,r){t&&(t.innerText=n(r));const i=o.queryAll(".art-setting-item",e).find((e=>Number(e.dataset.value)===r));i&&o.inverseClass(i,"art-current")}return{width:i.SETTING_ITEM_WIDTH,html:t.get("Play Speed"),tooltip:n(e.playbackRate),icon:r.playbackRate,selector:[.5,.75,1,1.25,1.5,2].map((t=>({value:t,default:t===e.playbackRate,html:n(t)}))),onSelect(t){e.playbackRate=t.value},mounted:(t,r)=>{a(t,r._$tooltip,e.playbackRate),e.on("playbackRate",(()=>{a(t,r._$tooltip,e.playbackRate)}))}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],aPjJK:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{i18n:t,icons:r,constructor:i}=e;function n(e){return 0===e?t.get("Normal"):e}function a(e,t,r){t&&(t.innerText=n(r));const i=o.queryAll(".art-setting-item",e).find((e=>Number(e.dataset.value)===r));i&&o.inverseClass(i,"art-current")}return{width:i.SETTING_ITEM_WIDTH,html:t.get("Subtitle Offset"),tooltip:n(e.subtitleOffset),icon:r.subtitle,selector:[-5,-4,-3,-2,-1,0,1,2,3,4,5].map((t=>({value:t,default:t===e.subtitleOffset,html:n(t)}))),onSelect(t){e.subtitleOffset=t.value},mounted:(t,r)=>{a(t,r._$tooltip,e.subtitleOffset),e.on("subtitleOffset",(()=>{a(t,r._$tooltip,e.subtitleOffset)}))}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],bCcu0:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);r.default=class{constructor(){this.name="artplayer_settings",this.settings={}}get(e){try{const t=JSON.parse(window.localStorage.getItem(this.name))||{};return e?t[e]:t}catch(t){return e?this.settings[e]:this.settings}}set(e,t){try{const r=Object.assign({},this.get(),{[e]:t});window.localStorage.setItem(this.name,JSON.stringify(r))}catch(r){this.settings[e]=t}}del(e){try{const t=this.get();delete t[e],window.localStorage.setItem(this.name,JSON.stringify(t))}catch(t){delete this.settings[e]}}clear(){try{window.localStorage.removeItem(this.name)}catch(e){this.settings={}}}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"1v13t":[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../utils"),n=e("./miniProgressBar"),a=o.interopDefault(n),s=e("./autoOrientation"),l=o.interopDefault(s),c=e("./autoPlayback"),p=o.interopDefault(c),u=e("./fastForward"),d=o.interopDefault(u),f=e("./lock"),h=o.interopDefault(f);r.default=class{constructor(e){this.art=e,this.id=0;const{option:t}=e;t.miniProgressBar&&!t.isLive&&this.add(a.default),t.lock&&i.isMobile&&this.add(h.default),t.autoPlayback&&this.add(p.default),t.autoOrientation&&i.isMobile&&this.add(l.default),t.fastForward&&i.isMobile&&!t.isLive&&this.add(d.default);for(let e=0;e{e.layers.add({name:"miniProgressBar",mounted(t){e.on("destroy",(()=>{t.style.display="none"})),e.on("video:timeupdate",(()=>{t.style.width=100*e.played+"%"})),e.on("setBar",((e,r)=>{"played"===e&&(t.style.width=100*r+"%")}))}})})),{name:"miniProgressBar"}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],bcdCk:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{option:t,constructor:r,template:{$player:i,$video:n}}=e;return e.on("fullscreenWeb",(a=>{if(a){const{videoWidth:t,videoHeight:a}=n,{clientWidth:s,clientHeight:l}=document.documentElement;(t>a&&sl)&&setTimeout((()=>{o.setStyle(i,"width",`${l}px`),o.setStyle(i,"height",`${s}px`),o.setStyle(i,"transform-origin","0 0"),o.setStyle(i,"transform",`rotate(90deg) translate(0, -${s}px)`),o.addClass(i,"art-auto-orientation"),e.emit("resize")}),r.MOBILE_AUTO_ORIENTATION_TIME)}else o.hasClass(i,"art-auto-orientation")&&(o.setStyle(i,"width",null),o.setStyle(i,"height",null),o.setStyle(i,"transform",null),o.setStyle(i,"transform-origin",null),o.removeClass(i,"art-auto-orientation"),e.aspectRatioReset=!0,e.autoSize=t.autoSize,e.notice.show="",e.emit("resize"))})),e.on("fullscreen",(async e=>{const t=screen.orientation.type;if(e){const{videoWidth:e,videoHeight:r}=n,{clientWidth:a,clientHeight:s}=document.documentElement;if(e>r&&as){const e=t.startsWith("portrait")?"landscape":"portrait";await screen.orientation.lock(e),o.addClass(i,"art-auto-orientation-fullscreen")}}else o.hasClass(i,"art-auto-orientation-fullscreen")&&(await screen.orientation.lock(t),o.removeClass(i,"art-auto-orientation-fullscreen"))})),{name:"autoOrientation",get state(){return o.hasClass(i,"art-auto-orientation")}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"1nHHC":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{i18n:t,storage:r,constructor:i,template:{$poster:n}}=e;return e.on("video:timeupdate",(()=>{const t=r.get("times")||{},o=Object.keys(t);o.length>i.AUTO_PLAYBACK_MAX&&delete t[o[0]],t[e.option.url]=e.currentTime,r.set("times",t)})),e.on("ready",(()=>{const i=(r.get("times")||{})[e.option.url];i&&(e.seek=i,o.setStyle(n,"display","none"),e.notice.show=`${t.get("Auto playback at")} ${o.secondToTime(i)}`)})),{name:"autoPlayback",get times(){return r.get("times")||{}},clear:()=>r.del("times")}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"4gkmX":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{constructor:t,events:{proxy:r},template:{$player:i,$video:n}}=e;let a=null,s=!1;const l=()=>{clearTimeout(a),s&&(s=!1,e.playbackRate=1,o.removeClass(i,"art-fast-forward"))};return r(n,"touchstart",(r=>{1===r.touches.length&&e.playing&&(a=setTimeout((()=>{s=!0,e.playbackRate=t.FAST_FORWARD_VALUE,o.addClass(i,"art-fast-forward")}),t.FAST_FORWARD_TIME))})),r(document,"touchmove",l),r(document,"touchend",l),{name:"fastForward",get state(){return o.hasClass(i,"art-fast-forward")}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],ij5nM:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{layers:t,icons:r,template:{$player:i}}=e;return t.add({name:"lock",mounted(t){const i=o.append(t,r.lock),n=o.append(t,r.unlock);o.setStyle(i,"display","none"),e.on("lock",(e=>{e?(o.setStyle(i,"display","inline-flex"),o.setStyle(n,"display","none")):(o.setStyle(i,"display","none"),o.setStyle(n,"display","inline-flex"))}))},click(){o.hasClass(i,"art-lock")?(o.removeClass(i,"art-lock"),e.emit("lock",!1)):(o.addClass(i,"art-lock"),e.emit("lock",!0))}}),{name:"lock",get state(){return o.hasClass(i,"art-lock")}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],jXgJj:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);r.default=class{constructor(e){this.art=e,this.init()}get current(){return this.art.option.ads[this.index]}get prev(){return this.art.option.ads[this.index-1]}get next(){return this.art.option.ads[this.index+1]}init(){this.index=0,this.isEnd=!1,this.playing=!1,this.urlCache=this.art.option.url,this.current&&(this.playing=!0,this.play(this.current))}play(e={}){this.isEnd||(this.art.switchUrl(e.url),this.art.once("video:timeupdate",(()=>{this.art.emit("ads:start",e)})),this.art.once("video:ended",(()=>{const e=this.next;e?(this.index+=1,this.play(e)):this.end()})))}end(){this.isEnd||(this.isEnd=!0,this.playing=!1,this.art.option.url=this.urlCache,this.art.switchUrl(this.urlCache),this.art.emit("ads:end"))}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],eD5Ch:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./config"),n=o.interopDefault(i),a=e("./utils");r.default=class{constructor(e){const{option:t,events:{proxy:r},template:{$video:o}}=e;for(let t=0;t{e.emit(`video:${t.type}`,t)}));Object.keys(t.moreVideoAttr).forEach((e=>{o[e]=t.moreVideoAttr[e]})),t.muted&&(o.muted=t.muted),t.volume&&(o.volume=a.clamp(t.volume,0,1)),t.poster&&(o.poster=t.poster),t.autoplay&&(o.autoplay=t.autoplay),t.playsInline&&(o.playsInline=!0,o["webkit-playsinline"]=!0);const i=t.type||a.getExt(t.url),s=t.customType[i];i&&s?(s(o,t.url,e),e.emit("customType",i)):(o.src=t.url,e.emit("url",o.src))}}},{"./config":"ej4fZ","./utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}]},["E13ST"],"E13ST"); \ No newline at end of file +!function(e,t,r,o,i){var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof n.parcelRequireb749&&n.parcelRequireb749,s=a.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,r){if(!s[t]){if(!e[t]){var o="function"==typeof n.parcelRequireb749&&n.parcelRequireb749;if(!r&&o)return o(t,!0);if(a)return a(t,!0);if(l&&"string"==typeof t)return l(t);var i=new Error("Cannot find module '"+t+"'");throw i.code="MODULE_NOT_FOUND",i}u.resolve=function(r){var o=e[t][1][r];return null!=o?o:r},u.cache={};var p=s[t]=new c.Module(t);e[t][0].call(p.exports,u,p,p.exports,this)}return s[t].exports;function u(e){var t=u.resolve(e);return!1===t?{}:c(t)}}c.isParcelRequire=!0,c.Module=function(e){this.id=e,this.bundle=c,this.exports={}},c.modules=e,c.cache=s,c.parent=a,c.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(c,"root",{get:function(){return n.parcelRequireb749}}),n.parcelRequireb749=c;for(var p=0;pt.call(this))),re.push(this)}static get instances(){return re}static get version(){return"4.3.18"}static get env(){return"production"}static get build(){return"1651549870334"}static get config(){return h.default}static get utils(){return p}static get scheme(){return d.default}static get Emitter(){return c.default}static get validator(){return s.default}static get kindOf(){return s.default.kindOf}static get html(){return v.default.html}static get option(){return{container:"#artplayer",url:"",poster:"",title:"",type:"",theme:"#f00",volume:.7,isLive:!1,muted:!1,autoplay:!1,autoSize:!1,autoMini:!1,loop:!1,flip:!1,playbackRate:!1,aspectRatio:!1,screenshot:!1,setting:!1,hotkey:!0,pip:!1,mutex:!0,backdrop:!0,fullscreen:!1,fullscreenWeb:!1,subtitleOffset:!1,miniProgressBar:!1,useSSR:!1,playsInline:!0,lock:!1,fastForward:!1,autoPlayback:!1,autoOrientation:!1,ads:[],layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],whitelist:[],thumbnails:{url:"",number:60,column:10},subtitle:{url:"",type:"",style:{},encoding:"utf-8"},moreVideoAttr:{controls:!1,preload:p.isSafari?"auto":"metadata"},icons:{},customType:{},lang:navigator.language.toLowerCase()}}get proxy(){return this.events.proxy}get query(){return this.template.query}destroy(e=!0){this.events.destroy(),this.template.destroy(e),re.splice(re.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}if(r.default=oe,oe.NOTICE_TIME=2e3,oe.SETTING_WIDTH=250,oe.SETTING_ITEM_WIDTH=200,oe.SETTING_ITEM_HEIGHT=35,oe.INDICATOR_SIZE=14,oe.INDICATOR_SIZE_ICON=16,oe.INDICATOR_SIZE_MOBILE=18,oe.INDICATOR_SIZE_MOBILE_ICON=20,oe.VOLUME_PANEL_WIDTH=60,oe.VOLUME_HANDLE_WIDTH=12,oe.RESIZE_TIME=500,oe.SCROLL_TIME=200,oe.SCROLL_GAP=50,oe.AUTO_PLAYBACK_MAX=10,oe.RECONNECT_TIME_MAX=5,oe.RECONNECT_SLEEP_TIME=1e3,oe.CONTROL_HIDE_TIME=3e3,oe.DB_CLICE_TIME=300,oe.MOBILE_AUTO_PLAYBACKRATE=3,oe.MOBILE_AUTO_PLAYBACKRATE_TIME=1e3,oe.MOBILE_AUTO_ORIENTATION_TIME=200,oe.INFO_LOOP_TIME=1e3,oe.FAST_FORWARD_VALUE=3,oe.FAST_FORWARD_TIME=1e3,"undefined"!=typeof document){const e=document.createElement("style");e.dataset.from="artplayer",e.textContent=n.default,document.head.appendChild(e)}"undefined"!=typeof window&&(window.Artplayer=oe),console.log(`%c ArtPlayer %c ${oe.version} %c https://artplayer.org`,"color: #fff; background: #5f5f5f","color: #fff; background: #4bc729","")},{"bundle-text:./style/index.less":"6U764","option-validator":"2A2W5","./utils/emitter":"1SgiG","./utils":"5yYFo","./scheme":"3izFE","./config":"ej4fZ","./whitelist":"7CkCt","./template":"8iGAh","./i18n":"3mM4M","./player":"bCaa0","./control":"3qXcr","./contextmenu":"hTnNz","./info":"bfwuE","./subtitle":"bWZ2U","./events":"9oLaG","./hotkey":"cKO4X","./layer":"kZD92","./loading":"c9b9e","./notice":"SxQeL","./mask":"aJ0dF","./icons":"jx1Wu","./setting":"hdF39","./storage":"bCcu0","./plugins":"1v13t","./ads":"jXgJj","./mobile":"eD5Ch","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"6U764":[function(e,t,r){t.exports='.art-video-player{z-index:20;width:100%;height:100%;zoom:1;color:#eee;text-align:left;direction:ltr;user-select:none;-webkit-tap-highlight-color:#0000;touch-action:manipulation;-ms-high-contrast-adjust:none;background-color:#000;outline:0;margin:0 auto;font-family:Roboto,Arial,Helvetica,sans-serif;font-size:14px;line-height:1.3;display:flex;position:relative}.art-video-player *{box-sizing:border-box;margin:0;padding:0}.art-video-player ::-webkit-scrollbar{width:5px;height:5px}.art-video-player ::-webkit-scrollbar-thumb{background-color:#666}.art-video-player ::-webkit-scrollbar-thumb:hover{background-color:#ccc}.art-video-player .art-icon{justify-content:center;align-items:center;line-height:1.5;display:inline-flex}.art-video-player .art-icon svg{fill:#fff}.art-video-player img{max-width:100%;vertical-align:top}@supports ((-webkit-backdrop-filter: initial) or (backdrop-filter: initial)){.art-video-player .art-backdrop-filter{-webkit-backdrop-filter:saturate(180%)blur(20px);backdrop-filter:saturate(180%)blur(20px);background-color:#000000b3!important}}.art-video-player .art-video{z-index:10;width:100%;height:100%;cursor:pointer;background-color:#000;position:absolute;inset:0}.art-video-player .art-poster{z-index:11;width:100%;height:100%;user-select:none;pointer-events:none;background-position:50%;background-repeat:no-repeat;background-size:cover;position:absolute;inset:0}.art-video-player .art-subtitle{z-index:20;width:100%;text-align:center;color:#fff;pointer-events:none;text-shadow:1px 0 1px #000,0 1px 1px #000,-1px 0 1px #000,0 -1px 1px #000,1px 1px 1px #000,-1px -1px 1px #000,1px -1px 1px #000,-1px 1px 1px #000;padding:0 20px;font-size:20px;display:none;position:absolute;bottom:10px}.art-video-player .art-subtitle p{word-break:break-all;height:fit-content;margin:5px 0 0;line-height:1.2}.art-video-player.art-subtitle-show .art-subtitle{display:block}.art-video-player.art-control-show .art-subtitle{bottom:50px}.art-video-player .art-danmuku{z-index:30;width:100%;height:100%;pointer-events:none;position:absolute;inset:0;overflow:hidden}.art-video-player .art-layers{z-index:40;width:100%;height:100%;pointer-events:none;display:none;position:absolute;inset:0;overflow:hidden}.art-video-player .art-layers .art-layer{pointer-events:auto}.art-video-player.art-layer-show .art-layers{display:block}.art-video-player .art-mask{z-index:50;width:100%;height:100%;pointer-events:none;justify-content:center;align-items:center;display:none;position:absolute;inset:0;overflow:hidden}.art-video-player .art-mask .art-state{width:60px;height:60px;opacity:.85;cursor:pointer;pointer-events:all;justify-content:center;align-items:center;display:flex;position:absolute;bottom:65px;right:30px}.art-video-player.art-mask-show .art-mask{display:flex}.art-video-player.art-mobile .art-state{position:static}.art-video-player .art-loading{z-index:70;width:100%;height:100%;pointer-events:none;justify-content:center;align-items:center;display:none;position:absolute;inset:0}.art-video-player.art-loading-show .art-loading{display:flex}.art-video-player .art-bottom{z-index:60;height:100px;opacity:0;visibility:hidden;pointer-events:none;background-image:linear-gradient(#0000,#0006,#000);background-position:bottom;background-repeat:repeat-x;flex-direction:column;justify-content:space-between;padding:50px 10px 0;transition:all .2s ease-in-out;display:flex;position:absolute;bottom:0;left:0;right:0}.art-video-player .art-bottom .art-progress{z-index:0;pointer-events:auto;flex:1;position:relative}.art-video-player .art-bottom .art-progress .art-control-progress{height:4px;cursor:pointer;flex-direction:row;align-items:center;display:flex;position:relative}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner{height:50%;width:100%;background:#fff3;align-items:center;display:flex;position:relative}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-loaded{z-index:10;height:100%;width:0;background:#fff6;position:absolute;inset:0}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-played{z-index:20;height:100%;width:0;position:absolute;inset:0}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight{z-index:30;height:100%;pointer-events:none;position:absolute;inset:0}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight span{width:7px;height:100%;pointer-events:auto;background:#fff;display:inline-block;position:absolute;top:0;left:0}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator{visibility:hidden;z-index:40;border-radius:50%;justify-content:center;align-items:center;transition:transform .1s ease-in-out;position:absolute;transform:scale(.1)}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator .art-icon{width:100%;height:100%;pointer-events:none;user-select:none}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-tip{z-index:50;height:20px;color:#fff;text-align:center;white-space:nowrap;background:#000000b3;border-radius:3px;padding:0 5px;font-size:12px;font-weight:700;line-height:20px;display:none;position:absolute;top:-25px;left:0}.art-video-player .art-bottom .art-progress .art-control-thumbnails{pointer-events:none;background-color:#000000b3;display:none;position:absolute;bottom:8px;left:0}.art-video-player .art-bottom .art-progress .art-control-loop{width:100%;height:100%;pointer-events:none;display:none;position:absolute;inset:0}.art-video-player .art-bottom .art-progress .art-control-loop .art-loop-point{width:2px;height:8px;background:#ffffffbf;position:absolute;top:-2px;left:0}.art-video-player .art-bottom .art-controls{z-index:1;pointer-events:auto;height:45px;justify-content:space-between;align-items:center;display:flex;position:relative}.art-video-player .art-bottom .art-controls .art-controls-left,.art-video-player .art-bottom .art-controls .art-controls-right{display:flex}.art-video-player .art-bottom .art-controls .art-controls-right{justify-content:flex-end}.art-video-player .art-bottom .art-controls .art-control{opacity:.9;min-height:36px;min-width:36px;text-align:center;cursor:pointer;white-space:nowrap;justify-content:center;align-items:center;font-size:12px;line-height:1;display:flex}.art-video-player .art-bottom .art-controls .art-control .art-icon{float:left;height:36px;width:36px;justify-content:center;align-items:center;display:flex}.art-video-player .art-bottom .art-controls .art-control:hover{opacity:1}.art-video-player .art-bottom .art-controls .art-control-onlyText{padding:0 10px}.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel{float:left;width:0;height:100%;transition:margin .2s cubic-bezier(.4,0,1,1),width .2s cubic-bezier(.4,0,1,1);position:relative;overflow:hidden}.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel .art-volume-slider-handle{width:12px;height:12px;background:#fff;border-radius:12px;margin-top:-6px;position:absolute;top:50%;left:0}.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel .art-volume-slider-handle:before{background:#fff;left:-54px}.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel .art-volume-slider-handle:after{background:#fff3;left:6px}.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel .art-volume-slider-handle:before,.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel .art-volume-slider-handle:after{content:"";height:3px;width:60px;margin-top:-2px;display:block;position:absolute;top:50%}.art-video-player .art-bottom .art-controls .art-control-volume:hover .art-volume-panel{width:60px}.art-video-player .art-bottom .art-controls .art-control-quality{z-index:30;position:relative}.art-video-player .art-bottom .art-controls .art-control-quality .art-qualitys{width:100px;text-align:center;color:#fff;background:#000c;border-radius:3px;padding:5px 0;display:none;position:absolute;bottom:35px}.art-video-player .art-bottom .art-controls .art-control-quality .art-qualitys .art-quality-item{height:30px;text-overflow:ellipsis;white-space:nowrap;text-shadow:0 0 2px #00000080;line-height:30px;overflow:hidden}.art-video-player .art-bottom .art-controls .art-control-quality .art-qualitys .art-quality-item:hover{background-color:#ffffff1a}.art-video-player .art-bottom .art-controls .art-control-quality:hover .art-qualitys{display:block}.art-video-player .art-bottom:hover .art-progress .art-control-progress .art-control-progress-inner{height:100%}.art-video-player .art-bottom:hover .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator{visibility:visible;transform:scale(1)}.art-video-player.art-control-show .art-bottom,.art-video-player.art-hover .art-bottom{opacity:1;visibility:visible}.art-video-player.art-error .art-progress-indicator,.art-video-player.art-destroy .art-progress-indicator,.art-video-player.art-error .art-progress-tip,.art-video-player.art-destroy .art-progress-tip{display:none!important}.art-video-player.art-mobile .art-bottom{padding:50px 7px 0}.art-video-player.art-mobile .art-bottom .art-controls{height:40px}.art-video-player.art-mobile .art-bottom .art-progress-indicator{visibility:visible!important;transform:scale(1)!important}.art-video-player .art-notice{z-index:80;width:100%;pointer-events:none;padding:10px;font-size:14px;display:none;position:absolute;top:0;left:0}.art-video-player .art-notice .art-notice-inner{color:#fff;background-color:#0009;border-radius:3px;padding:5px 10px;display:inline-block}.art-video-player.art-notice-show .art-notice{display:flex}.art-video-player .art-contextmenus{z-index:120;min-width:200px;background-color:#000000e6;border-radius:3px;flex-direction:column;padding:5px 0;display:none;position:absolute;top:10px;left:10px}.art-video-player .art-contextmenus .art-contextmenu{cursor:pointer;color:#fff;text-overflow:ellipsis;white-space:nowrap;text-shadow:0 0 2px #00000080;border-bottom:1px solid #ffffff1a;padding:10px 15px;font-size:12px;display:block;overflow:hidden}.art-video-player .art-contextmenus .art-contextmenu a{color:#fff;text-decoration:none}.art-video-player .art-contextmenus .art-contextmenu span{padding:0 7px;display:inline-block}.art-video-player .art-contextmenus .art-contextmenu span:hover,.art-video-player .art-contextmenus .art-contextmenu span.art-current{color:#00c9ff}.art-video-player .art-contextmenus .art-contextmenu:hover{background-color:#ffffff1a}.art-video-player .art-contextmenus .art-contextmenu:last-child{border-bottom:0}.art-video-player.art-contextmenu-show .art-contextmenus{display:flex}.art-video-player .art-settings{z-index:90;height:auto;max-height:300px;background-color:#000000e6;border-radius:3px;font-size:13px;transition:all .2s;display:none;position:absolute;bottom:50px;right:10px;overflow:auto}.art-video-player .art-settings .art-setting-panel{display:none}.art-video-player .art-settings .art-setting-panel.art-current{display:block}.art-video-player .art-settings .art-setting-panel .art-setting-item{height:35px;cursor:pointer;color:#fffc;justify-content:space-between;align-items:center;padding:0 5px;line-height:1;display:flex;overflow:hidden}.art-video-player .art-settings .art-setting-panel .art-setting-item:hover,.art-video-player .art-settings .art-setting-panel .art-setting-item.art-current{color:#fff;background-color:#ffffff1a}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-icon{width:30px;height:30px;justify-content:center;align-items:center;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-icon-check{visibility:hidden;height:15px}.art-video-player .art-settings .art-setting-panel .art-setting-item.art-current .art-icon-check{visibility:visible}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-left{white-space:nowrap;align-items:center;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-left .art-setting-item-left-icon{height:24px;width:24px;justify-content:center;align-items:center;margin-right:10px;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right{align-items:center;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-item-right-tooltip{white-space:nowrap;color:#ffffff80;font-size:12px}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-item-right-icon{height:24px;width:24px;justify-content:center;align-items:center;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item-back{border-bottom:1px solid #ffffff1a}.art-video-player.art-setting-show .art-settings{display:block}.art-video-player.art-mobile .art-settings{max-height:200px}.art-video-player .art-info{z-index:100;width:350px;color:#fff;-webkit-font-smoothing:antialiased;background-color:#000000e6;flex-direction:column;padding:10px;font-family:Noto Sans CJK SC DemiLight,Roboto,Segoe UI,Tahoma,Arial,Helvetica,sans-serif;font-size:12px;display:none;position:absolute;top:10px;left:10px}.art-video-player .art-info .art-info-item{margin-bottom:5px;display:flex}.art-video-player .art-info .art-info-item .art-info-title{width:100px;text-align:right}.art-video-player .art-info .art-info-item .art-info-content{text-overflow:ellipsis;white-space:nowrap;flex:1;padding-left:5px;overflow:hidden}.art-video-player .art-info .art-info-item:last-child{margin-bottom:0}.art-video-player .art-info .art-info-close{cursor:pointer;position:absolute;top:5px;right:5px}.art-video-player.art-info-show .art-info{display:flex}.art-video-player.art-hide-cursor *{cursor:none!important}.art-video-player[data-aspect-ratio] video{box-sizing:content-box;object-fit:fill}.art-video-player.art-fullscreen-web{z-index:9999;width:100%;height:100%;position:fixed;inset:0}.art-fullscreen-rotate{z-index:9999;width:100%;height:100%;background-color:#000;position:fixed;inset:0}.art-video-player .art-mini-header{z-index:110;height:35px;color:#fff;opacity:0;visibility:hidden;background-color:#00000080;justify-content:space-between;align-items:center;line-height:35px;transition:all .2s ease-in-out;display:none;position:absolute;top:0;left:0;right:0}.art-video-player .art-mini-header .art-mini-title{text-overflow:ellipsis;white-space:nowrap;cursor:move;flex:1;padding:0 10px;overflow:hidden}.art-video-player .art-mini-header .art-mini-close{width:35px;text-align:center;cursor:pointer;font-size:22px}.art-video-player.art-is-dragging{opacity:.7}.art-video-player.art-mini{z-index:9999;width:400px;height:225px;position:fixed;box-shadow:0 2px 5px #00000029,0 3px 6px #0003}.art-video-player.art-mini .art-mini-header{user-select:none;display:flex}.art-video-player.art-mini.art-hover .art-mini-header{opacity:1;visibility:visible}.art-video-player.art-mini .art-mask .art-state{position:static}.art-video-player.art-mini .art-contextmenu,.art-video-player.art-mini .art-bottom,.art-video-player.art-mini .art-danmu,.art-video-player.art-mini .art-info,.art-video-player.art-mini .art-layers,.art-video-player.art-mini .art-notice,.art-video-player.art-mini .art-setting,.art-video-player.art-mini .art-subtitle{display:none!important}.art-auto-size{justify-content:center;align-items:center;display:flex}.art-video-player[data-flip=horizontal] .art-video{transform:scaleX(-1)}.art-video-player[data-flip=vertical] .art-video{transform:scaleY(-1)}.art-video-player .art-layer-miniProgressBar{height:2px;background-color:var(--theme);display:block;position:absolute;bottom:0;left:0;right:0}.art-video-player .art-layer-lock{height:34px;width:34px;color:#fff;background-color:#00000080;border-radius:50%;justify-content:center;align-items:center;display:none;position:absolute;top:calc(50% - 17px);left:15px}.art-video-player.art-lock .art-bottom{display:none!important}.art-video-player.art-lock .art-subtitle{bottom:10px!important}.art-video-player.art-lock .art-layer-miniProgressBar{display:block!important}.art-video-player.art-control-show .art-layer-miniProgressBar{display:none}.art-video-player.art-control-show .art-layer-lock{display:flex}.art-video-player .art-control-selector{position:relative}.art-video-player .art-control-selector .art-selector-list{min-width:100px;max-width:200px;max-height:200px;text-align:center;color:#fff;background-color:#000c;border-radius:3px;padding:5px 0;display:none;position:absolute;bottom:35px;overflow:auto}.art-video-player .art-control-selector .art-selector-list .art-selector-item{height:30px;text-overflow:ellipsis;white-space:nowrap;text-shadow:0 0 2px #00000080;padding:0 5px;line-height:30px;overflow:hidden}.art-video-player .art-control-selector .art-selector-list .art-selector-item:hover{background-color:#ffffff1a}.art-video-player .art-control-selector .art-selector-list .art-selector-item:hover,.art-video-player .art-control-selector .art-selector-list .art-selector-item.art-current{color:#00c9ff}.art-video-player .art-control-selector:hover .art-selector-list{display:block}[class*=hint--]{font-style:normal;display:inline-block;position:relative}[class*=hint--]:before,[class*=hint--]:after{visibility:hidden;opacity:0;z-index:1000000;pointer-events:none;transition:all .3s;position:absolute;transform:translate(0,0)}[class*=hint--]:hover:before,[class*=hint--]:hover:after{visibility:visible;opacity:1;transition-delay:.1s}[class*=hint--]:before{content:"";z-index:1000000;background:0 0;border:6px solid #0000;position:absolute}[class*=hint--]:after{color:#fff;white-space:nowrap;background:#000;padding:8px 10px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:12px;line-height:12px}[class*=hint--][aria-label]:after{content:attr(aria-label)}[class*=hint--][data-hint]:after{content:attr(data-hint)}[aria-label=""]:before,[aria-label=""]:after,[data-hint=""]:before,[data-hint=""]:after{display:none!important}.hint--top-left:before,.hint--top-right:before,.hint--top:before{border-top-color:#000}.hint--bottom-left:before,.hint--bottom-right:before,.hint--bottom:before{border-bottom-color:#000}.hint--left:before{border-left-color:#000}.hint--right:before{border-right-color:#000}.hint--top:before{margin-bottom:-11px}.hint--top:before,.hint--top:after{bottom:100%;left:50%}.hint--top:before{left:calc(50% - 6px)}.hint--top:after{transform:translate(-50%)}.hint--top:hover:before{transform:translateY(-8px)}.hint--top:hover:after{transform:translate(-50%)translateY(-8px)}.hint--bottom:before{margin-top:-11px}.hint--bottom:before,.hint--bottom:after{top:100%;left:50%}.hint--bottom:before{left:calc(50% - 6px)}.hint--bottom:after{transform:translate(-50%)}.hint--bottom:hover:before{transform:translateY(8px)}.hint--bottom:hover:after{transform:translate(-50%)translateY(8px)}.hint--right:before{margin-bottom:-6px;margin-left:-11px}.hint--right:after{margin-bottom:-14px}.hint--right:before,.hint--right:after{bottom:50%;left:100%}.hint--right:hover:before,.hint--right:hover:after{transform:translate(8px)}.hint--left:before{margin-bottom:-6px;margin-right:-11px}.hint--left:after{margin-bottom:-14px}.hint--left:before,.hint--left:after{bottom:50%;right:100%}.hint--left:hover:before,.hint--left:hover:after{transform:translate(-8px)}.hint--top-left:before{margin-bottom:-11px}.hint--top-left:before,.hint--top-left:after{bottom:100%;left:50%}.hint--top-left:before{left:calc(50% - 6px)}.hint--top-left:after{margin-left:12px;transform:translate(-100%)}.hint--top-left:hover:before{transform:translateY(-8px)}.hint--top-left:hover:after{transform:translate(-100%)translateY(-8px)}.hint--top-right:before{margin-bottom:-11px}.hint--top-right:before,.hint--top-right:after{bottom:100%;left:50%}.hint--top-right:before{left:calc(50% - 6px)}.hint--top-right:after{margin-left:-12px;transform:translate(0)}.hint--top-right:hover:before,.hint--top-right:hover:after{transform:translateY(-8px)}.hint--bottom-left:before{margin-top:-11px}.hint--bottom-left:before,.hint--bottom-left:after{top:100%;left:50%}.hint--bottom-left:before{left:calc(50% - 6px)}.hint--bottom-left:after{margin-left:12px;transform:translate(-100%)}.hint--bottom-left:hover:before{transform:translateY(8px)}.hint--bottom-left:hover:after{transform:translate(-100%)translateY(8px)}.hint--bottom-right:before{margin-top:-11px}.hint--bottom-right:before,.hint--bottom-right:after{top:100%;left:50%}.hint--bottom-right:before{left:calc(50% - 6px)}.hint--bottom-right:after{margin-left:-12px;transform:translate(0)}.hint--bottom-right:hover:before,.hint--bottom-right:hover:after{transform:translateY(8px)}.hint--small:after,.hint--medium:after,.hint--large:after{white-space:normal;word-wrap:break-word;line-height:1.4em}.hint--small:after{width:80px}.hint--medium:after{width:150px}.hint--large:after{width:300px}[class*=hint--]:after{text-shadow:0 -1px #000;box-shadow:4px 4px 8px #0000004d}.hint--error:after{text-shadow:0 -1px #592726;background-color:#b34e4d}.hint--error.hint--top-left:before,.hint--error.hint--top-right:before,.hint--error.hint--top:before{border-top-color:#b34e4d}.hint--error.hint--bottom-left:before,.hint--error.hint--bottom-right:before,.hint--error.hint--bottom:before{border-bottom-color:#b34e4d}.hint--error.hint--left:before{border-left-color:#b34e4d}.hint--error.hint--right:before{border-right-color:#b34e4d}.hint--warning:after{text-shadow:0 -1px #6c5328;background-color:#c09854}.hint--warning.hint--top-left:before,.hint--warning.hint--top-right:before,.hint--warning.hint--top:before{border-top-color:#c09854}.hint--warning.hint--bottom-left:before,.hint--warning.hint--bottom-right:before,.hint--warning.hint--bottom:before{border-bottom-color:#c09854}.hint--warning.hint--left:before{border-left-color:#c09854}.hint--warning.hint--right:before{border-right-color:#c09854}.hint--info:after{text-shadow:0 -1px #1a3c4d;background-color:#3986ac}.hint--info.hint--top-left:before,.hint--info.hint--top-right:before,.hint--info.hint--top:before{border-top-color:#3986ac}.hint--info.hint--bottom-left:before,.hint--info.hint--bottom-right:before,.hint--info.hint--bottom:before{border-bottom-color:#3986ac}.hint--info.hint--left:before{border-left-color:#3986ac}.hint--info.hint--right:before{border-right-color:#3986ac}.hint--success:after{text-shadow:0 -1px #1a321a;background-color:#458746}.hint--success.hint--top-left:before,.hint--success.hint--top-right:before,.hint--success.hint--top:before{border-top-color:#458746}.hint--success.hint--bottom-left:before,.hint--success.hint--bottom-right:before,.hint--success.hint--bottom:before{border-bottom-color:#458746}.hint--success.hint--left:before{border-left-color:#458746}.hint--success.hint--right:before{border-right-color:#458746}.hint--always:after,.hint--always:before{opacity:1;visibility:visible}.hint--always.hint--top:before{transform:translateY(-8px)}.hint--always.hint--top:after{transform:translate(-50%)translateY(-8px)}.hint--always.hint--top-left:before{transform:translateY(-8px)}.hint--always.hint--top-left:after{transform:translate(-100%)translateY(-8px)}.hint--always.hint--top-right:before,.hint--always.hint--top-right:after{transform:translateY(-8px)}.hint--always.hint--bottom:before{transform:translateY(8px)}.hint--always.hint--bottom:after{transform:translate(-50%)translateY(8px)}.hint--always.hint--bottom-left:before{transform:translateY(8px)}.hint--always.hint--bottom-left:after{transform:translate(-100%)translateY(8px)}.hint--always.hint--bottom-right:before,.hint--always.hint--bottom-right:after{transform:translateY(8px)}.hint--always.hint--left:before,.hint--always.hint--left:after{transform:translate(-8px)}.hint--always.hint--right:before,.hint--always.hint--right:after{transform:translate(8px)}.hint--rounded:after{border-radius:4px}.hint--no-animate:before,.hint--no-animate:after{transition-duration:0s}.hint--bounce:before,.hint--bounce:after{-webkit-transition:opacity .3s,visibility .3s,-webkit-transform .3s cubic-bezier(.71,1.7,.77,1.24);-moz-transition:opacity .3s,visibility .3s,-moz-transform .3s cubic-bezier(.71,1.7,.77,1.24);transition:opacity .3s,visibility .3s,transform .3s cubic-bezier(.71,1.7,.77,1.24)}.hint--no-shadow:before,.hint--no-shadow:after{text-shadow:initial;box-shadow:initial}.hint--no-arrow:before{display:none}'},{}],"2A2W5":[function(e,t,r){t.exports=function(){"use strict";function e(t){return(e="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})(t)}var t=Object.prototype.toString,r=function(r){if(void 0===r)return"undefined";if(null===r)return"null";var i=e(r);if("boolean"===i)return"boolean";if("string"===i)return"string";if("number"===i)return"number";if("symbol"===i)return"symbol";if("function"===i)return function(e){return"GeneratorFunction"===o(e)}(r)?"generatorfunction":"function";if(function(e){return Array.isArray?Array.isArray(e):e instanceof Array}(r))return"array";if(function(e){return!(!e.constructor||"function"!=typeof e.constructor.isBuffer)&&e.constructor.isBuffer(e)}(r))return"buffer";if(function(e){try{if("number"==typeof e.length&&"function"==typeof e.callee)return!0}catch(e){if(-1!==e.message.indexOf("callee"))return!0}return!1}(r))return"arguments";if(function(e){return e instanceof Date||"function"==typeof e.toDateString&&"function"==typeof e.getDate&&"function"==typeof e.setDate}(r))return"date";if(function(e){return e instanceof Error||"string"==typeof e.message&&e.constructor&&"number"==typeof e.constructor.stackTraceLimit}(r))return"error";if(function(e){return e instanceof RegExp||"string"==typeof e.flags&&"boolean"==typeof e.ignoreCase&&"boolean"==typeof e.multiline&&"boolean"==typeof e.global}(r))return"regexp";switch(o(r)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(e){return"function"==typeof e.throw&&"function"==typeof e.return&&"function"==typeof e.next}(r))return"generator";switch(i=t.call(r)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return i.slice(8,-1).toLowerCase().replace(/\s/g,"")};function o(e){return e.constructor?e.constructor.name:null}function i(e,t){var o=2n)),o.export(r,"queryAll",(()=>a)),o.export(r,"addClass",(()=>s)),o.export(r,"removeClass",(()=>l)),o.export(r,"hasClass",(()=>c)),o.export(r,"append",(()=>p)),o.export(r,"remove",(()=>u)),o.export(r,"setStyle",(()=>d)),o.export(r,"setStyles",(()=>f)),o.export(r,"getStyle",(()=>h)),o.export(r,"sublings",(()=>m)),o.export(r,"inverseClass",(()=>g)),o.export(r,"tooltip",(()=>y)),o.export(r,"isInViewport",(()=>v)),o.export(r,"includeFromEvent",(()=>b)),o.export(r,"replaceElement",(()=>x));var i=e("./compatibility");function n(e,t=document){return t.querySelector(e)}function a(e,t=document){return Array.from(t.querySelectorAll(e))}function s(e,t){return e.classList.add(t)}function l(e,t){return e.classList.remove(t)}function c(e,t){return e.classList.contains(t)}function p(e,t){return t instanceof Element?e.appendChild(t):e.insertAdjacentHTML("beforeend",String(t)),e.lastElementChild||e.lastChild}function u(e){return e.parentNode.removeChild(e)}function d(e,t,r){return e.style[t]=r,e}function f(e,t){return Object.keys(t).forEach((r=>{d(e,r,t[r])})),e}function h(e,t,r=!0){const o=window.getComputedStyle(e,null).getPropertyValue(t);return r?parseFloat(o):o}function m(e){return Array.from(e.parentElement.children).filter((t=>t!==e))}function g(e,t){m(e).forEach((e=>l(e,t))),s(e,t)}function y(e,t,r="top"){i.isMobile||(e.setAttribute("aria-label",t),s(e,"hint--rounded"),s(e,`hint--${r}`))}function v(e,t=0){const r=e.getBoundingClientRect(),o=window.innerHeight||document.documentElement.clientHeight,i=window.innerWidth||document.documentElement.clientWidth,n=r.top-t<=o&&r.top+r.height+t>=0,a=r.left-t<=i+t&&r.left+r.width+t>=0;return n&&a}function b(e,t){return e.composedPath&&e.composedPath().indexOf(t)>-1}function x(e,t){return t.parentNode.replaceChild(e,t),e}},{"./compatibility":"e9wVp","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],e9wVp:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"userAgent",(()=>i)),o.export(r,"isMobile",(()=>n)),o.export(r,"isSafari",(()=>a)),o.export(r,"isWechat",(()=>s)),o.export(r,"isIE",(()=>l));const i="undefined"!=typeof window?window.navigator.userAgent:"",n=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(i),a=/^((?!chrome|android).)*safari/i.test(i),s=/MicroMessenger/i.test(i),l=/MSIE|Trident/i.test(i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],kNZvP:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"ArtPlayerError",(()=>i)),o.export(r,"errorHandle",(()=>n));class i extends Error{constructor(e,t){super(e),"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,t||this.constructor),this.name="ArtPlayerError"}}function n(e,t){if(!e)throw new i(t);return e}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],eZUgm:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e){return"WEBVTT \r\n\r\n".concat((t=e,t.replace(/(\d\d:\d\d:\d\d)[,.](\d+)/g,((e,t,r)=>{let o=r.slice(0,3);return 1===r.length&&(o=r+"00"),2===r.length&&(o=r+"0"),`${t},${o}`}))).replace(/\{\\([ibu])\}/g,"").replace(/\{\\([ibu])1\}/g,"<$1>").replace(/\{([ibu])\}/g,"<$1>").replace(/\{\/([ibu])\}/g,"").replace(/(\d\d:\d\d:\d\d),(\d\d\d)/g,"$1.$2").replace(/{[\s\S]*?}/g,"").concat("\r\n\r\n"));var t}function n(e){return URL.createObjectURL(new Blob([e],{type:"text/vtt"}))}function a(e){const t=new RegExp("Dialogue:\\s\\d,(\\d+:\\d\\d:\\d\\d.\\d\\d),(\\d+:\\d\\d:\\d\\d.\\d\\d),([^,]*),([^,]*),(?:[^,]*,){4}([\\s\\S]*)$","i");function r(e=""){return e.split(/[:.]/).map(((e,t,r)=>{if(t===r.length-1){if(1===e.length)return`.${e}00`;if(2===e.length)return`.${e}0`}else if(1===e.length)return(0===t?"0":":0")+e;return 0===t?e:t===r.length-1?`.${e}`:`:${e}`})).join("")}return`WEBVTT\n\n${e.split(/\r?\n/).map((e=>{const o=e.match(t);return o?{start:r(o[1].trim()),end:r(o[2].trim()),text:o[5].replace(/{[\s\S]*?}/g,"").replace(/(\\N)/g,"\n").trim().split(/\r?\n/).map((e=>e.trim())).join("\n")}:null})).filter((e=>e)).map(((e,t)=>e?`${t+1}\n${e.start} --\x3e ${e.end}\n${e.text}`:"")).filter((e=>e.trim())).join("\n\n")}`}o.defineInteropFlag(r),o.export(r,"srtToVtt",(()=>i)),o.export(r,"vttToBlob",(()=>n)),o.export(r,"assToVtt",(()=>a))},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],dYeSt:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e){return e.includes("?")?i(e.split("?")[0]):e.includes("#")?i(e.split("#")[0]):e.trim().toLowerCase().split(".").pop()}function n(e,t){const r=document.createElement("a");r.style.display="none",r.href=e,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r)}o.defineInteropFlag(r),o.export(r,"getExt",(()=>i)),o.export(r,"download",(()=>n))},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"5ynPA":[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"def",(()=>i)),o.export(r,"has",(()=>a)),o.export(r,"get",(()=>s)),o.export(r,"mergeDeep",(()=>l));const i=Object.defineProperty,{hasOwnProperty:n}=Object.prototype;function a(e,t){return n.call(e,t)}function s(e,t){return Object.getOwnPropertyDescriptor(e,t)}function l(...e){const t=e=>e&&"object"==typeof e&&!Array.isArray(e);return e.reduce(((e,r)=>(Object.keys(r).forEach((o=>{const i=e[o],n=r[o];Array.isArray(i)&&Array.isArray(n)?e[o]=i.concat(...n):!t(i)||!t(n)||n instanceof Element?e[o]=n:e[o]=l(i,n)})),e)),{})}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],kXYeR:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e=0){return new Promise((t=>setTimeout(t,e)))}function n(e,t,r){let o;function i(...i){clearTimeout(o),o=setTimeout((function(){o=null,e.apply(r,i)}),t)}return i.clearTimeout=function(){clearTimeout(o)},i}function a(e,t){let r,o,i=!1;return function n(...a){if(i)return r=a,void(o=this);i=!0,e.apply(this,a),setTimeout((()=>{i=!1,r&&(n.apply(o,r),r=null,o=null)}),t)}}o.defineInteropFlag(r),o.export(r,"sleep",(()=>i)),o.export(r,"debounce",(()=>n)),o.export(r,"throttle",(()=>a))},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],anS7L:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e,t,r){return Math.max(Math.min(e,Math.max(t,r)),Math.min(t,r))}function n(e){const t=Math.floor(e/3600),r=Math.floor((e-3600*t)/60),o=Math.floor(e-3600*t-60*r);return(t>0?[t,r,o]:[r,o]).map((e=>e<10?`0${e}`:String(e))).join(":")}function a(e){return e.replace(/[&<>'"]/g,(e=>({"&":"&","<":"<",">":">","'":"'",'"':"""}[e]||e)))}o.defineInteropFlag(r),o.export(r,"clamp",(()=>i)),o.export(r,"secondToTime",(()=>n)),o.export(r,"escape",(()=>a))},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"3izFE":[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"ComponentOption",(()=>u));var i=e("../utils");const n="boolean",a="string",s="number",l="object",c="function";function p(e,t,r){return i.errorHandle(t===a||e instanceof Element,`${r.join(".")} require '${a}' or 'Element' type`)}const u={html:p,disable:`?${n}`,name:`?${a}`,index:`?${s}`,style:`?${l}`,click:`?${c}`,mounted:`?${c}`,tooltip:`?${a}`,width:`?${s}`,selector:"?array",onSelect:`?${c}`};r.default={container:p,url:a,poster:a,title:a,type:a,theme:a,lang:a,volume:s,isLive:n,muted:n,autoplay:n,autoSize:n,autoMini:n,loop:n,flip:n,playbackRate:n,aspectRatio:n,screenshot:n,setting:n,hotkey:n,pip:n,mutex:n,backdrop:n,fullscreen:n,fullscreenWeb:n,subtitleOffset:n,miniProgressBar:n,useSSR:n,playsInline:n,lock:n,fastForward:n,autoPlayback:n,autoOrientation:n,ads:[{url:a}],plugins:[c],whitelist:[`${a}|${c}|regexp`],layers:[u],contextmenu:[u],settings:[u],controls:[{...u,position:(e,t,r)=>{const o=["top","left","right"];return i.errorHandle(o.includes(e),`${r.join(".")} only accept ${o.toString()} as parameters`)}}],quality:[{default:`?${n}`,html:a,url:a}],highlight:[{time:s,text:a}],thumbnails:{url:a,number:s,column:s},subtitle:{url:a,type:a,style:l,encoding:a},moreVideoAttr:l,icons:l,customType:l}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],ej4fZ:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default={propertys:["audioTracks","autoplay","buffered","controller","controls","crossOrigin","currentSrc","currentTime","defaultMuted","defaultPlaybackRate","duration","ended","error","loop","mediaGroup","muted","networkState","paused","playbackRate","played","preload","readyState","seekable","seeking","src","startDate","textTracks","videoTracks","volume"],methods:["addTextTrack","canPlayType","load","play","pause"],events:["abort","canplay","canplaythrough","durationchange","emptied","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],prototypes:["width","height","videoWidth","videoHeight","poster","webkitDecodedFrameCount","webkitDroppedFrameCount","playsInline","webkitSupportsFullscreen","webkitDisplayingFullscreen","onenterpictureinpicture","onleavepictureinpicture","disablePictureInPicture","cancelVideoFrameCallback","requestVideoFrameCallback","getVideoPlaybackQuality","requestPictureInPicture","webkitEnterFullScreen","webkitEnterFullscreen","webkitExitFullScreen","webkitExitFullscreen"]}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"7CkCt":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("./utils");r.default=class{constructor(e){this.art=e}get state(){const{option:e,constructor:{kindOf:t}}=this.art;return!o.isMobile||e.whitelist.some((e=>{switch(t(e)){case"string":return"*"===e||o.userAgent.indexOf(e)>-1;case"function":return e(o.userAgent);case"regexp":return e.test(o.userAgent);default:return!1}}))}}},{"./utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"8iGAh":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("./utils");class i{constructor(e){this.art=e;const{option:t,constructor:r,whitelist:i}=e;t.container instanceof Element?this.$container=t.container:(this.$container=o.query(t.container),o.errorHandle(this.$container,`No container element found by ${t.container}`));const n=this.$container.tagName.toLowerCase();o.errorHandle("div"===n,`Unsupported container element type, only support 'div' but got '${n}'`),o.errorHandle(r.instances.every((e=>e.template.$container!==this.$container)),"Cannot mount multiple instances on the same dom element"),this.query=this.query.bind(this),this.$container.dataset.artId=e.id,this.$original=this.$container.cloneNode(!0),i.state?this.desktop():this.mobile()}static get html(){return'
Player version:
4.3.18
Video url:
Video volume:
Video time:
Video duration:
Video resolution:
x
[x]
×
'}query(e){return o.query(e,this.$container)}desktop(){const{option:e}=this.art;e.useSSR||(this.$container.innerHTML=i.html),this.$player=this.query(".art-video-player"),this.$video=this.query(".art-video"),this.$poster=this.query(".art-poster"),this.$subtitle=this.query(".art-subtitle"),this.$danmuku=this.query(".art-danmuku"),this.$bottom=this.query(".art-bottom"),this.$progress=this.query(".art-progress"),this.$controls=this.query(".art-controls"),this.$controlsLeft=this.query(".art-controls-left"),this.$controlsRight=this.query(".art-controls-right"),this.$layer=this.query(".art-layers"),this.$loading=this.query(".art-loading"),this.$notice=this.query(".art-notice"),this.$noticeInner=this.query(".art-notice-inner"),this.$mask=this.query(".art-mask"),this.$state=this.query(".art-state"),this.$setting=this.query(".art-settings"),this.$info=this.query(".art-info"),this.$infoPanel=this.query(".art-info-panel"),this.$infoClose=this.query(".art-info-close"),this.$miniHeader=this.query(".art-mini-header"),this.$miniTitle=this.query(".art-mini-title"),this.$miniClose=this.query(".art-mini-close"),this.$contextmenu=this.query(".art-contextmenus"),e.backdrop&&(o.addClass(this.$setting,"art-backdrop-filter"),o.addClass(this.$contextmenu,"art-backdrop-filter"),o.addClass(this.$info,"art-backdrop-filter")),o.isMobile&&o.addClass(this.$player,"art-mobile")}mobile(){this.$container.innerHTML='
',this.$player=this.query(".art-video-player"),this.$video=this.query(".art-video")}destroy(e){e?o.replaceElement(this.$original,this.$container):o.addClass(this.$player,"art-destroy")}}r.default=i},{"./utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"3mM4M":[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../utils"),n=e("./zh-cn.json"),a=o.interopDefault(n),s=e("./zh-tw.json"),l=o.interopDefault(s),c=e("./pl.json"),p=o.interopDefault(c),u=e("./cs.json"),d=o.interopDefault(u);r.default=class{constructor(e){this.art=e,this.languages={"zh-cn":a.default,"zh-tw":l.default,pl:p.default,cs:d.default},this.init()}init(){const e=this.art.option.lang.toLowerCase();this.language=this.languages[e]||{}}get(e){return this.language[e]||e}update(e){this.languages=i.mergeDeep(this.languages,e),this.init()}}},{"../utils":"5yYFo","./zh-cn.json":"1f1tr","./zh-tw.json":"3hy9S","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY","./pl.json":"aFOXc","./cs.json":"aNfUP"}],"1f1tr":[function(e,t,r){t.exports=JSON.parse('{"Video Info":"统计信息","Close":"关闭","Video Load Failed":"加载失败","Volume":"音量","Play":"播放","Pause":"暂停","Rate":"速度","Mute":"静音","Video Flip":"画面翻转","Horizontal":"水平","Vertical":"垂直","Reconnect":"重新连接","Hide Subtitle":"隐藏字幕","Show Subtitle":"显示字幕","Show Setting":"显示设置","Hide Setting":"隐藏设置","Screenshot":"截图","Play Speed":"播放速度","Aspect Ratio":"画面比例","Default":"默认","Normal":"正常","Open":"打开","Switch Video":"切换","Switch Subtitle":"切换字幕","Fullscreen":"全屏","Exit Fullscreen":"退出全屏","Web Fullscreen":"网页全屏","Exit Web Fullscreen":"退出网页全屏","Mini Player":"迷你播放器","PIP Mode":"开启画中画","Exit PIP Mode":"退出画中画","PIP Not Supported":"不支持画中画","Fullscreen Not Supported":"不支持全屏","Subtitle Offset":"字幕偏移","Auto playback at":"已为您定位至"}')},{}],"3hy9S":[function(e,t,r){t.exports=JSON.parse('{"Video Info":"統計訊息","Close":"關閉","Video Load Failed":"載入失敗","Volume":"音量","Play":"播放","Pause":"暫停","Rate":"速度","Mute":"靜音","Video Flip":"畫面翻轉","Horizontal":"水平","Vertical":"垂直","Reconnect":"重新連接","Hide Subtitle":"隱藏字幕","Show Subtitle":"顯示字幕","Show Setting":"顯示设置","Hide Setting":"隱藏设置","Screenshot":"截圖","Play Speed":"播放速度","Aspect Ratio":"畫面比例","Default":"默認","Normal":"正常","Open":"打開","Switch Video":"切換","Switch Subtitle":"切換字幕","Fullscreen":"全屏","Exit Fullscreen":"退出全屏","Web Fullscreen":"網頁全屏","Exit Web Fullscreen":"退出網頁全屏","Mini Player":"迷你播放器","PIP Mode":"開啟畫中畫","Exit PIP Mode":"退出畫中畫","PIP Not Supported":"不支持畫中畫","Fullscreen Not Supported":"不支持全屏","Subtitle Offset":"字幕偏移","Auto playback at":"已為您定位至"}')},{}],aFOXc:[function(e,t,r){t.exports=JSON.parse('{"Video Info":"Informacje o wideo","Close":"Zamknij","Video Load Failed":"Błąd ładowania wideo","Volume":"Głośność","Play":"Odtwórz","Pause":"Wstrzymaj","Rate":"Oceń","Mute":"Wycisz","Video Flip":"Rotacja wideo","Horizontal":"Pozioma","Vertical":"Pionowa","Reconnect":"Połącz ponownie","Hide Subtitle":"Ukryj napisy","Show Subtitle":"Pokaż napisy","Show Setting":"Pokaż ustawienia","Hide Setting":"Ukryj ustawienia","Screenshot":"Zrzut ekranu","Play Speed":"Prędkość odtwarzania","Aspect Ratio":"Współczynnik proporcji","Default":"Domyślny","Normal":"Normalny","Open":"Otwórz","Switch Video":"Przełącz wideo","Switch Subtitle":"Przełącz napisy","Fullscreen":"Pełny ekran","Exit Fullscreen":"Zamknij pełny ekran","Web Fullscreen":"Tryb pełnej strony","Exit Web Fullscreen":"Zamknij tryb pełnej strony","Mini Player":"Miniodtwarzacz","PIP Mode":"Tryb PiP","Exit PIP Mode":"Zamknij tryb PiP","PIP Not Supported":"Tryb PiP nieobsługiwany","Fullscreen Not Supported":"Pełny ekran nieobsługiwany","Subtitle Offset":"Przesunięcie napisów","Auto playback at":"Automatyczne odtwarzanie za"}')},{}],aNfUP:[function(e,t,r){t.exports=JSON.parse('{"Video Info":"Info o videu","Close":"Zavřít","Video Load Failed":"Nahrání videa selhalo","Volume":"Hlasitost","Play":"Přehrát","Pause":"Pozastavit","Rate":"Hodnocení","Mute":"Ztlumit","Video Flip":"Otočit video","Horizontal":"Horizontálně","Vertical":"Vertikálně","Reconnect":"Opětovné připojení","Hide Subtitle":"Skrýt titulky","Show Subtitle":"Ukázat titulky","Show Setting":"Zobrazit nastavení","Hide Setting":"Skrýt nastavení","Screenshot":"Snímek obrazovky","Play Speed":"Rychlost přehrávání","Aspect Ratio":"Poměr stran","Default":"Výchozí","Normal":"Normální","Open":"Otevřít","Switch Video":"Přepnout video","Switch Subtitle":"Přepnout titulky","Fullscreen":"Celá obrazovka","Exit Fullscreen":"Opustit režim celé obrazovky","Web Fullscreen":"Celá stránka","Exit Web Fullscreen":"Zavřít režim celé stránky","Mini Player":"Mini přehrávač","PIP Mode":"Režim PIP","Exit PIP Mode":"Opustit režim PIP","PIP Not Supported":"Režim PIP není podporován","Fullscreen Not Supported":"Režim celé obrazovky není podporován","Subtitle Offset":"Posun titulků","Auto playback at":"Automatické přehrávání za"}')},{}],bCaa0:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./urlMix"),n=o.interopDefault(i),a=e("./attrMix"),s=o.interopDefault(a),l=e("./playMix"),c=o.interopDefault(l),p=e("./pauseMix"),u=o.interopDefault(p),d=e("./toggleMix"),f=o.interopDefault(d),h=e("./seekMix"),m=o.interopDefault(h),g=e("./volumeMix"),y=o.interopDefault(g),v=e("./currentTimeMix"),b=o.interopDefault(v),x=e("./durationMix"),w=o.interopDefault(x),j=e("./switchMix"),k=o.interopDefault(j),M=e("./playbackRateMix"),S=o.interopDefault(M),I=e("./aspectRatioMix"),F=o.interopDefault(I),$=e("./screenshotMix"),T=o.interopDefault($),E=e("./fullscreenMix"),C=o.interopDefault(E),z=e("./fullscreenWebMix"),Y=o.interopDefault(z),D=e("./pipMix"),P=o.interopDefault(D),R=e("./loadedMix"),A=o.interopDefault(R),O=e("./playedMix"),L=o.interopDefault(O),H=e("./playingMix"),_=o.interopDefault(H),N=e("./autoSizeMix"),J=o.interopDefault(N),V=e("./rectMix"),q=o.interopDefault(V),W=e("./flipMix"),B=o.interopDefault(W),U=e("./miniMix"),Z=o.interopDefault(U),X=e("./loopMix"),G=o.interopDefault(X),Q=e("./posterMix"),K=o.interopDefault(Q),ee=e("./autoHeightMix"),te=o.interopDefault(ee),re=e("./themeMix"),oe=o.interopDefault(re),ie=e("./titleMix"),ne=o.interopDefault(ie),ae=e("./normalSizeMix"),se=o.interopDefault(ae),le=e("./subtitleOffsetMix"),ce=o.interopDefault(le),pe=e("./optionInit"),ue=o.interopDefault(pe),de=e("./eventInit"),fe=o.interopDefault(de);r.default=class{constructor(e){n.default(e),s.default(e),c.default(e),u.default(e),f.default(e),m.default(e),y.default(e),b.default(e),w.default(e),k.default(e),S.default(e),F.default(e),T.default(e),C.default(e),Y.default(e),P.default(e),A.default(e),L.default(e),_.default(e),J.default(e),q.default(e),B.default(e),Z.default(e),G.default(e),K.default(e),te.default(e),oe.default(e),ne.default(e),se.default(e),ce.default(e),fe.default(e),ue.default(e)}}},{"./urlMix":"9mMBB","./attrMix":"ghisN","./playMix":"l5N6R","./pauseMix":"fVR5i","./toggleMix":"cZiBO","./seekMix":"bsO1Q","./volumeMix":"ivSmC","./currentTimeMix":"8LbXb","./durationMix":"f7tNT","./switchMix":"ejQWi","./playbackRateMix":"kNcxE","./aspectRatioMix":"8v5yt","./screenshotMix":"eLUEv","./fullscreenMix":"ifvhR","./fullscreenWebMix":"dsFtO","./pipMix":"gYMLD","./loadedMix":"fMSRd","./playedMix":"iRHNE","./playingMix":"dQ40z","./autoSizeMix":"iF844","./rectMix":"1hAm8","./flipMix":"dhi4g","./miniMix":"eQPx9","./loopMix":"gQaVE","./posterMix":"7n9Pt","./autoHeightMix":"8Az1F","./themeMix":"kXlsI","./titleMix":"b8f4Q","./normalSizeMix":"4fP62","./subtitleOffsetMix":"gdNfa","./optionInit":"luxZi","./eventInit":"b25aJ","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"9mMBB":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{option:t,template:{$video:r}}=e;o.def(e,"url",{get:()=>r.currentSrc,async set(i){const n=t.type||o.getExt(i),a=t.customType[n];n&&a?(await o.sleep(),e.loading.show=!0,a.call(e,r,i,e)):(e.url&&e.url!==i&&e.once("video:canplay",(()=>{e.isReady&&e.emit("restart")})),r.src=i,e.option.url=i,e.emit("url",i))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],ghisN:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{template:{$video:t}}=e;o.def(e,"attr",{value(e,r){if(void 0===r)return t[e];t[e]=r}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],l5N6R:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{i18n:t,notice:r,option:i,constructor:{instances:n},template:{$video:a}}=e;o.def(e,"play",{value(){const o=a.play();if(o&&o.then&&o.then().catch((e=>{throw r.show=e,e})),i.mutex)for(let t=0;te.playing?e.pause():e.play()})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],bsO1Q:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{notice:t}=e;o.def(e,"seek",{set(r){e.currentTime=r,e.emit("seek",e.currentTime),e.duration&&(t.show=`${o.secondToTime(e.currentTime)} / ${o.secondToTime(e.duration)}`)}}),o.def(e,"forward",{set(t){e.seek=e.currentTime+t}}),o.def(e,"backward",{set(t){e.seek=e.currentTime-t}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],ivSmC:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{template:{$video:t},i18n:r,notice:i,storage:n}=e;o.def(e,"volume",{get:()=>t.volume||0,set:a=>{t.volume=o.clamp(a,0,1),i.show=`${r.get("Volume")}: ${parseInt(100*t.volume,10)}`,0!==t.volume&&n.set("volume",t.volume),e.emit("volume",t.volume)}}),o.def(e,"muted",{get:()=>t.muted,set:r=>{t.muted=r,e.emit("volume",t.volume)}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"8LbXb":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{$video:t}=e.template;o.def(e,"currentTime",{get:()=>t.currentTime||0,set:r=>{r=parseFloat(r),Number.isNaN(r)||(t.currentTime=o.clamp(r,0,e.duration))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],f7tNT:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){o.def(e,"duration",{get:()=>{const{duration:t}=e.template.$video;return t===1/0?0:t||0}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],ejQWi:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{i18n:t,option:r,notice:i}=e;function n(o,n,a){return new Promise((s=>{if(o===e.url)return s(o);const{playing:l}=e;e.pause(),URL.revokeObjectURL(e.url),e.url=o,e.once("video:canplay",(()=>{e.playbackRate=!1,e.aspectRatio=!1,e.flip="normal",e.autoSize=r.autoSize,e.currentTime=a,e.notice.show="",l&&e.play(),n&&(i.show=`${t.get("Switch Video")}: ${n}`),e.emit("switch",o),s(o)}))}))}o.def(e,"switchQuality",{value:(t,r)=>n(t,r,e.currentTime)}),o.def(e,"switchUrl",{value:(e,t)=>n(e,t,0)})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],kNcxE:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{template:{$video:t},i18n:r,notice:i}=e;o.def(e,"playbackRate",{get:()=>t.playbackRate,set(n){if(n){if(n===t.playbackRate)return;const a=[.25,.5,.75,1,1.25,1.5,1.75,2,3,4];o.errorHandle(a.includes(n),`'playbackRate' only accept ${a.toString()} as parameters`),t.playbackRate=n,i.show=`${r.get("Rate")}: ${1===n?r.get("Normal"):`${n}x`}`,e.emit("playbackRate",n)}else e.playbackRate=1,e.emit("playbackRate")}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"8v5yt":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{template:{$video:t,$player:r},i18n:i,notice:n}=e;o.def(e,"aspectRatio",{get:()=>r.dataset.aspectRatio||"default",set(a){a||(a="default");const s=["default","4:3","16:9"];if(o.errorHandle(s.includes(a),`'aspectRatio' only accept ${s.toString()} as parameters`),"default"===a)o.setStyle(t,"width",null),o.setStyle(t,"height",null),o.setStyle(t,"padding",null),delete r.dataset.aspectRatio;else{const e=a.split(":").map(Number),{videoWidth:i,videoHeight:n}=t,{clientWidth:s,clientHeight:l}=r,c=i/n,p=e[0]/e[1];if(c>p){const e=p*n/i;o.setStyle(t,"width",100*e+"%"),o.setStyle(t,"height","100%"),o.setStyle(t,"padding",`0 ${(s-s*e)/2}px`)}else{const e=i/p/n;o.setStyle(t,"width","100%"),o.setStyle(t,"height",100*e+"%"),o.setStyle(t,"padding",(l-l*e)/2+"px 0")}r.dataset.aspectRatio=a}n.show=`${i.get("Aspect Ratio")}: ${"default"===a?i.get("Default"):a}`,e.emit("aspectRatio",a)}}),o.def(e,"aspectRatioReset",{set(t){if(t){const{aspectRatio:t}=e;e.aspectRatio=t}}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],eLUEv:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{option:t,notice:r,template:{$video:i}}=e,n=document.createElement("canvas");o.def(e,"getDataURL",{value:()=>new Promise(((e,t)=>{try{n.width=i.videoWidth,n.height=i.videoHeight,n.getContext("2d").drawImage(i,0,0),e(n.toDataURL("image/png"))}catch(e){r.show=e,t(e)}}))}),o.def(e,"getBlobUrl",{value:()=>new Promise(((e,t)=>{try{n.width=i.videoWidth,n.height=i.videoHeight,n.getContext("2d").drawImage(i,0,0),n.toBlob((t=>{e(URL.createObjectURL(t))}))}catch(e){r.show=e,t(e)}}))}),o.def(e,"screenshot",{value:async()=>{const r=await e.getDataURL();return o.download(r,`${t.title||"artplayer"}_${o.secondToTime(i.currentTime)}.png`),e.emit("screenshot",r),r}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],ifvhR:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../libs/screenfull"),n=o.interopDefault(i),a=e("../utils");r.default=function(e){const{i18n:t,notice:r,template:{$video:o,$player:i}}=e,s=n.default();e.once("video:loadedmetadata",(()=>{var n;s.isEnabled?(n=e,s.on("change",(()=>n.emit("fullscreen",s.isFullscreen))),a.def(n,"fullscreen",{get:()=>s.isFullscreen,async set(e){e?(n.normalSize="fullscreen",n.aspectRatioReset=!0,n.autoSize=!1,await s.request(i),a.addClass(i,"art-fullscreen"),n.emit("resize"),n.emit("fullscreen",!0),r.show=""):(n.aspectRatioReset=!0,n.autoSize=n.option.autoSize,await s.exit(),a.removeClass(i,"art-fullscreen"),n.emit("resize"),n.emit("fullscreen"),r.show="")}})):document.fullscreenEnabled||o.webkitSupportsFullscreen?(e=>{a.def(e,"fullscreen",{get:()=>o.webkitDisplayingFullscreen,set(t){t?(e.normalSize="fullscreen",o.webkitEnterFullscreen(),e.emit("fullscreen",!0),r.show=""):(o.webkitExitFullscreen(),e.emit("fullscreen"),r.show="")}})})(e):a.def(e,"fullscreen",{get:()=>!1,set(){r.show=t.get("Fullscreen Not Supported")}}),a.def(e,"fullscreen",a.get(e,"fullscreen"))}))}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY","../libs/screenfull":"hXAU9"}],hXAU9:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(){const e=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],t=(()=>{const t=e[0],r={};for(const o of e){const e=o?.[1];if(e in document){for(const[e,i]of o.entries())r[t[e]]=i;return r}}return!1})(),r={change:t.fullscreenchange,error:t.fullscreenerror};let o={request:(e=document.documentElement,r)=>new Promise(((i,n)=>{const a=()=>{o.off("change",a),i()};o.on("change",a);const s=e[t.requestFullscreen](r);s instanceof Promise&&s.then(a).catch(n)})),exit:()=>new Promise(((e,r)=>{if(!o.isFullscreen)return void e();const i=()=>{o.off("change",i),e()};o.on("change",i);const n=document[t.exitFullscreen]();n instanceof Promise&&n.then(i).catch(r)})),toggle:(e,t)=>o.isFullscreen?o.exit():o.request(e,t),onchange(e){o.on("change",e)},onerror(e){o.on("error",e)},on(e,t){const o=r[e];o&&document.addEventListener(o,t,!1)},off(e,t){const o=r[e];o&&document.removeEventListener(o,t,!1)},raw:t};return Object.defineProperties(o,{isFullscreen:{get:()=>Boolean(document[t.fullscreenElement])},element:{enumerable:!0,get:()=>document[t.fullscreenElement]??void 0},isEnabled:{enumerable:!0,get:()=>Boolean(document[t.fullscreenEnabled])}}),t||(o={isEnabled:!1}),o}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],dsFtO:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{notice:t,template:{$player:r}}=e;o.def(e,"fullscreenWeb",{get:()=>o.hasClass(r,"art-fullscreen-web"),set(i){i?(e.normalSize="fullscreenWeb",o.addClass(r,"art-fullscreen-web"),e.aspectRatioReset=!0,e.autoSize=!1,e.emit("resize"),e.emit("fullscreenWeb",!0),t.show=""):(o.removeClass(r,"art-fullscreen-web"),e.aspectRatioReset=!0,e.autoSize=e.option.autoSize,e.emit("resize"),e.emit("fullscreenWeb"),t.show="")}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],gYMLD:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{i18n:t,notice:r,template:{$video:i}}=e;document.pictureInPictureEnabled?function(e){const{template:{$video:t},events:{proxy:r},notice:i}=e;t.disablePictureInPicture=!1,o.def(e,"pip",{get:()=>document.pictureInPictureElement,set(r){r?(e.normalSize="pip",t.requestPictureInPicture().catch((e=>{throw i.show=e,e}))):document.exitPictureInPicture().catch((e=>{throw i.show=e,e}))}}),r(t,"enterpictureinpicture",(()=>{e.emit("pip",!0)})),r(t,"leavepictureinpicture",(()=>{e.emit("pip")}))}(e):i.webkitSupportsPresentationMode?function(e){const{$video:t}=e.template;t.webkitSetPresentationMode("inline"),o.def(e,"pip",{get:()=>"picture-in-picture"===t.webkitPresentationMode,set(r){r?(e.normalSize="pip",t.webkitSetPresentationMode("picture-in-picture"),e.emit("pip",!0)):(t.webkitSetPresentationMode("inline"),e.emit("pip"))}})}(e):o.def(e,"pip",{get:()=>!1,set(){r.show=t.get("PIP Not Supported")}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],fMSRd:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{$video:t}=e.template;o.def(e,"loaded",{get:()=>e.loadedTime/t.duration}),o.def(e,"loadedTime",{get:()=>t.buffered.length?t.buffered.end(t.buffered.length-1):0})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],iRHNE:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){o.def(e,"played",{get:()=>e.currentTime/e.duration})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],dQ40z:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{$video:t}=e.template;o.def(e,"playing",{get:()=>!!(t.currentTime>0&&!t.paused&&!t.ended&&t.readyState>2)})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],iF844:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{$container:t,$player:r,$video:i}=e.template;o.def(e,"autoSize",{get:()=>o.hasClass(t,"art-auto-size"),set(n){if(n){const{videoWidth:n,videoHeight:a}=i,{width:s,height:l}=t.getBoundingClientRect(),c=n/a,p=s/l;if(o.addClass(t,"art-auto-size"),p>c){const e=l*c/s*100;o.setStyle(r,"width",`${e}%`),o.setStyle(r,"height","100%")}else{const e=s/c/l*100;o.setStyle(r,"width","100%"),o.setStyle(r,"height",`${e}%`)}e.emit("autoSize",{width:e.width,height:e.height})}else o.removeClass(t,"art-auto-size"),o.setStyle(r,"width",null),o.setStyle(r,"height",null),e.emit("autoSize")}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"1hAm8":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){o.def(e,"rect",{get:()=>e.template.$player.getBoundingClientRect()});const t=["bottom","height","left","right","top","width"];for(let r=0;re.rect[i]})}o.def(e,"x",{get:()=>e.left+window.pageXOffset}),o.def(e,"y",{get:()=>e.top+window.pageYOffset})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],dhi4g:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{template:{$player:t},i18n:r,notice:i}=e;o.def(e,"flip",{get:()=>t.dataset.flip||"normal",set(n){n||(n="normal");const a=["normal","horizontal","vertical"];o.errorHandle(a.includes(n),`'flip' only accept ${a.toString()} as parameters`),"normal"===n?delete t.dataset.flip:(e.rotate=!1,t.dataset.flip=n);const s=n.replace(n[0],n[0].toUpperCase());i.show=`${r.get("Video Flip")}: ${r.get(s)}`,e.emit("flip",n)}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],eQPx9:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{i18n:t,option:r,storage:i,events:{proxy:n},template:{$player:a,$miniClose:s,$miniTitle:l,$miniHeader:c}}=e;let p="",u=!1,d=0,f=0,h=0,m=0;n(c,"mousedown",(t=>{u=!0,d=t.pageX,f=t.pageY,h=e.left,m=e.top})),n(document,"mousemove",(e=>{if(u){o.addClass(a,"art-is-dragging");const t=m+e.pageY-f,r=h+e.pageX-d;o.setStyle(a,"top",`${t}px`),o.setStyle(a,"left",`${r}px`),i.set("top",t),i.set("left",r)}})),n(document,"mouseup",(()=>{u=!1,o.removeClass(a,"art-is-dragging")})),n(s,"click",(()=>{e.mini=!1,u=!1,o.removeClass(a,"art-is-dragging")})),o.append(l,r.title||t.get("Mini Player")),o.def(e,"mini",{get:()=>o.hasClass(a,"art-mini"),set(t){if(t){e.normalSize="mini",e.autoSize=!1,p=a.style.cssText,o.addClass(a,"art-mini");const t=i.get("top"),r=i.get("left");if(t&&r)o.setStyle(a,"top",`${t}px`),o.setStyle(a,"left",`${r}px`),o.isInViewport(c)||(i.del("top"),i.del("left"),e.mini=!0);else{const t=document.body,r=t.clientHeight-e.height-50,n=t.clientWidth-e.width-50;i.set("top",r),i.set("left",n),o.setStyle(a,"top",`${r}px`),o.setStyle(a,"left",`${n}px`)}e.aspectRatio=!1,e.playbackRate=!1,e.notice.show="",e.emit("mini",!0)}else a.style.cssText=p,o.removeClass(a,"art-mini"),o.setStyle(a,"top",null),o.setStyle(a,"left",null),e.aspectRatio=!1,e.playbackRate=!1,e.autoSize=r.autoSize,e.notice.show="",e.emit("mini")}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],gQaVE:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){let t=[];o.def(e,"loop",{get:()=>t,set:r=>{if(Array.isArray(r)&&"number"==typeof r[0]&&"number"==typeof r[1]){const i=o.clamp(r[0],0,Math.min(r[1],e.duration)),n=o.clamp(r[1],i,e.duration);n-i>=1?(t=[i,n],e.emit("loop",t)):(t=[],e.emit("loop"))}else t=[],e.emit("loop")}}),e.on("video:timeupdate",(()=>{t.length&&(e.currentTimet[1])&&(e.seek=t[0])}))}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"7n9Pt":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{option:t,template:{$poster:r}}=e;o.def(e,"poster",{get:()=>t.poster,set(e){t.poster=e,o.setStyle(r,"backgroundImage",`url(${e})`)}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"8Az1F":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{option:t,template:{$container:r,$video:i}}=e,n=r.style.height;o.def(e,"autoHeight",{get:()=>o.hasClass(r,"art-auto-height"),set(a){if(a){const{clientWidth:n}=r,{videoHeight:a,videoWidth:s}=i,l=a*(n/s);o.setStyle(r,"height",l+"px"),o.addClass(r,"art-auto-height"),e.autoSize=t.autoSize,e.emit("autoHeight",l)}else o.setStyle(r,"height",n),o.removeClass(r,"art-auto-height"),e.autoSize=t.autoSize,e.emit("autoHeight")}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],kXlsI:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{option:t,template:{$player:r}}=e;o.def(e,"theme",{get:()=>getComputedStyle(r).getPropertyValue("--theme"),set(e){t.theme=e,r.style.setProperty("--theme",e)}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],b8f4Q:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){o.def(e,"title",{get:()=>e.option.title,set(t){e.option.title=t}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"4fP62":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const t=["mini","pip","fullscreen","fullscreenWeb"];o.def(e,"normalSize",{get:()=>t.every((t=>!e[t])),set(r){t.filter((e=>e!==r)).forEach((t=>{e[t]&&(e[t]=!1)}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],gdNfa:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{clamp:t}=e.constructor.utils,{notice:r,template:i,i18n:n}=e;let a=0,s=[];e.on("subtitle:switch",(()=>{s=[]})),o.def(e,"subtitleOffset",{get:()=>a,set(o){if(i.$track&&i.$track.track){const l=Array.from(i.$track.track.cues);a=t(o,-5,5);for(let r=0;r{e.attr(r,t.moreVideoAttr[r])})),t.muted&&(e.muted=t.muted),t.volume&&(i.volume=o.clamp(t.volume,0,1));const a=r.get("volume");"number"==typeof a&&(i.volume=o.clamp(a,0,1)),t.poster&&o.setStyle(n,"backgroundImage",`url(${t.poster})`),t.autoplay&&(i.autoplay=t.autoplay),t.playsInline&&(i.playsInline=!0,i["webkit-playsinline"]=!0),t.theme&&(e.theme=t.theme),0===t.ads.length&&(e.url=t.url)}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],b25aJ:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../config"),n=o.interopDefault(i),a=e("../utils");r.default=function(e){const{i18n:t,notice:r,option:o,constructor:i,events:{proxy:s},template:{$player:l,$video:c,$poster:p}}=e;let u=0;for(let t=0;t{e.emit(`video:${t.type}`,t)}));e.on("video:canplay",(()=>{u=0,e.loading.show=!1})),e.once("video:canplay",(()=>{e.loading.show=!1,e.controls.show=!0,e.mask.show=!0,e.isReady=!0,e.emit("ready")})),e.on("video:ended",(()=>{o.loop?(e.seek=0,e.play(),e.controls.show=!1,e.mask.show=!1):(e.controls.show=!0,e.mask.show=!0)})),e.on("video:error",(async()=>{u{e.autoSize=o.autoSize,a.isMobile&&(e.loading.show=!1,e.controls.show=!0,e.mask.show=!0)})),e.on("video:loadstart",(()=>{e.loading.show=!0})),e.on("video:pause",(()=>{e.controls.show=!0,e.mask.show=!0})),e.on("video:play",(()=>{e.mask.show=!1,a.setStyle(p,"display","none")})),e.on("video:playing",(()=>{e.mask.show=!1})),e.on("video:seeked",(()=>{e.loading.show=!1})),e.on("video:seeking",(()=>{e.loading.show=!0})),e.on("video:timeupdate",(()=>{e.mask.show=!1})),e.on("video:waiting",(()=>{e.loading.show=!0}))}},{"../config":"ej4fZ","../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"3qXcr":[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../utils"),n=e("../utils/component"),a=o.interopDefault(n),s=e("./fullscreen"),l=o.interopDefault(s),c=e("./fullscreenWeb"),p=o.interopDefault(c),u=e("./pip"),d=o.interopDefault(u),f=e("./playAndPause"),h=o.interopDefault(f),m=e("./progress"),g=o.interopDefault(m),y=e("./subtitle"),v=o.interopDefault(y),b=e("./time"),x=o.interopDefault(b),w=e("./volume"),j=o.interopDefault(w),k=e("./setting"),M=o.interopDefault(k),S=e("./thumbnails"),I=o.interopDefault(S),F=e("./screenshot"),$=o.interopDefault(F),T=e("./quality"),E=o.interopDefault(T),C=e("./loop"),z=o.interopDefault(C);class Y extends a.default{constructor(e){super(e),this.name="control";const{option:t,constructor:r,events:{proxy:o},template:{$player:n}}=e;let a=Date.now();o(n,["click","mousemove","touchstart","touchmove"],(()=>{this.show=!0,i.removeClass(n,"art-hide-cursor"),i.addClass(n,"art-hover"),a=Date.now()})),e.on("video:timeupdate",(()=>{e.playing&&this.show&&Date.now()-a>=r.CONTROL_HIDE_TIME&&(this.show=!1,i.addClass(n,"art-hide-cursor"),i.removeClass(n,"art-hover"))})),e.once("video:loadedmetadata",(()=>{this.add(g.default({name:"progress",disable:t.isLive,position:"top",index:10})),this.add(I.default({name:"thumbnails",disable:!t.thumbnails.url||t.isLive||i.isMobile,position:"top",index:20})),this.add(z.default({name:"loop",disable:!1,position:"top",index:30})),this.add(h.default({name:"playAndPause",disable:!1,position:"left",index:10})),this.add(j.default({name:"volume",disable:!1,position:"left",index:20})),this.add(x.default({name:"time",disable:t.isLive,position:"left",index:30})),this.add(E.default({name:"quality",disable:0===t.quality.length,position:"right",index:10})),this.add($.default({name:"screenshot",disable:!t.screenshot||i.isMobile,position:"right",index:20})),this.add(v.default({name:"subtitle",disable:!t.subtitle.url,position:"right",index:30})),this.add(M.default({name:"setting",disable:!t.setting,position:"right",index:40})),this.add(d.default({name:"pip",disable:!t.pip,position:"right",index:50})),this.add(p.default({name:"fullscreenWeb",disable:!t.fullscreenWeb,position:"right",index:60})),this.add(l.default({name:"fullscreen",disable:!t.fullscreen,position:"right",index:70}));for(let e=0;eNumber(e.dataset.index)>=Number(o.dataset.index)));return p?p.insertAdjacentElement("beforebegin",o):i.append(this.$parent,o),t.html&&i.append(o,t.html),t.style&&i.setStyles(o,t.style),t.tooltip&&i.tooltip(o,t.tooltip),t.click&&this.art.events.proxy(o,"click",(e=>{e.preventDefault(),t.click.call(this.art,this,e)})),t.selector&&["left","right"].includes(t.position)&&this.selector(t,o),t.mounted&&t.mounted.call(this.art,o),1===o.childNodes.length&&3===o.childNodes[0].nodeType&&i.addClass(o,"art-control-onlyText"),l.def(this,r,{value:o}),o}selector(e,t){const{hover:r,proxy:o}=this.art.events;i.addClass(t,"art-control-selector");const n=document.createElement("div");i.addClass(n,"art-selector-value"),i.append(n,e.html),t.innerText="",i.append(t,n);const a=e.selector.map(((e,t)=>`
${e.html}
`)).join(""),s=document.createElement("div");i.addClass(s,"art-selector-list"),i.append(s,a),i.append(t,s);const l=()=>{const e=i.getStyle(t,"width")/2-i.getStyle(s,"width")/2;s.style.left=`${e}px`};r(t,l),o(s,"click",(async t=>{const r=(t.composedPath()||[]).find((e=>i.hasClass(e,"art-selector-item")));if(!r)return;i.inverseClass(r,"art-current");const o=Number(r.dataset.index),a=e.selector[o]||{};if(n.innerText=r.innerText,e.onSelect){const o=await e.onSelect.call(this.art,a,r,t);"string"!=typeof o&&"number"!=typeof o||(n.innerHTML=o)}l(),this.art.emit("selector",a,r)}))}}},{"./dom":"fqaW9","option-validator":"2A2W5","../scheme":"3izFE","./property":"5ynPA","./error":"kNZvP","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"43BKT":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>({...e,tooltip:t.i18n.get("Fullscreen"),mounted:e=>{const{events:{proxy:r},icons:i,i18n:n}=t,a=o.append(e,i.fullscreenOn),s=o.append(e,i.fullscreenOff);o.setStyle(s,"display","none"),r(e,"click",(()=>{t.fullscreen=!t.fullscreen})),t.on("fullscreen",(t=>{t?(o.tooltip(e,n.get("Exit Fullscreen")),o.setStyle(a,"display","none"),o.setStyle(s,"display","inline-flex")):(o.tooltip(e,n.get("Fullscreen")),o.setStyle(a,"display","inline-flex"),o.setStyle(s,"display","none"))}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],kQJHz:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>({...e,tooltip:t.i18n.get("Web Fullscreen"),mounted:e=>{const{events:{proxy:r},icons:i,i18n:n}=t,a=o.append(e,i.fullscreenWebOn),s=o.append(e,i.fullscreenWebOff);o.setStyle(s,"display","none"),r(e,"click",(()=>{t.fullscreenWeb=!t.fullscreenWeb})),t.on("fullscreenWeb",(t=>{t?(o.tooltip(e,n.get("Exit Web Fullscreen")),o.setStyle(a,"display","none"),o.setStyle(s,"display","inline-flex")):(o.tooltip(e,n.get("Web Fullscreen")),o.setStyle(a,"display","inline-flex"),o.setStyle(s,"display","none"))}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],aWne0:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>({...e,tooltip:t.i18n.get("PIP Mode"),mounted:e=>{const{events:{proxy:r},icons:i,i18n:n}=t;o.append(e,i.pip),r(e,"click",(()=>{t.pip=!t.pip})),t.on("pip",(t=>{o.tooltip(e,n.get(t?"Exit PIP Mode":"PIP Mode"))}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"4z78f":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>({...e,mounted:e=>{const{events:{proxy:r},icons:i,i18n:n}=t,a=o.append(e,i.play),s=o.append(e,i.pause);function l(){o.setStyle(a,"display","flex"),o.setStyle(s,"display","none")}function c(){o.setStyle(a,"display","none"),o.setStyle(s,"display","flex")}o.tooltip(a,n.get("Play")),o.tooltip(s,n.get("Pause")),r(a,"click",(()=>{t.play()})),r(s,"click",(()=>{t.pause()})),t.playing?c():l(),t.on("video:playing",(()=>{c()})),t.on("video:pause",(()=>{l()}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"19nwD":[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"getPosFromEvent",(()=>n));var i=e("../utils");function n(e,t){const{$progress:r}=e.template,{left:o}=r.getBoundingClientRect(),n=t.pageX,a=i.clamp(n-o,0,r.clientWidth),s=a/r.clientWidth*e.duration;return{second:s,time:i.secondToTime(s),width:a,percentage:i.clamp(a/r.clientWidth,0,1)}}r.default=function(e){return t=>{const{icons:r,option:o,events:{proxy:a}}=t;return{...e,html:'
',mounted:e=>{let s=!1;const l=i.query(".art-progress-loaded",e),c=i.query(".art-progress-played",e),p=i.query(".art-progress-highlight",e),u=i.query(".art-progress-indicator",e),d=i.query(".art-progress-tip",e);i.setStyle(c,"backgroundColor","var(--theme)");let f=t.constructor.INDICATOR_SIZE;function h(e,t){"loaded"===e&&i.setStyle(l,"width",100*t+"%"),"played"===e&&(i.setStyle(c,"width",100*t+"%"),i.setStyle(u,"left",`calc(${100*t}% - ${f/2}px)`))}r.indicator?(f=t.constructor.INDICATOR_SIZE_ICON,i.append(u,r.indicator)):i.setStyles(u,{backgroundColor:"var(--theme)"}),i.isMobile&&(f=t.constructor.INDICATOR_SIZE_MOBILE,r.indicator&&(f=t.constructor.INDICATOR_SIZE_MOBILE_ICON)),i.setStyles(u,{left:`-${f/2}px`,width:`${f}px`,height:`${f}px`});for(let e=0;e`)}h("loaded",t.loaded),t.on("setBar",((e,t)=>{h(e,t)})),t.on("video:progress",(()=>{h("loaded",t.loaded)})),t.on("video:timeupdate",(()=>{h("played",t.played)})),t.on("video:ended",(()=>{h("played",1)})),i.isMobile||(a(e,"click",(e=>{if(e.target!==u){const{second:r,percentage:o}=n(t,e);h("played",o),t.seek=r}})),a(e,"mousemove",(r=>{i.setStyle(d,"display","block"),i.includeFromEvent(r,p)?function(r){const{width:o}=n(t,r),{text:a}=r.target.dataset;d.innerHTML=a;const s=d.clientWidth;o<=s/2?i.setStyle(d,"left",0):o>e.clientWidth-s/2?i.setStyle(d,"left",e.clientWidth-s+"px"):i.setStyle(d,"left",o-s/2+"px")}(r):function(r){const{width:o,time:a}=n(t,r);d.innerHTML=a;const s=d.clientWidth;o<=s/2?i.setStyle(d,"left",0):o>e.clientWidth-s/2?i.setStyle(d,"left",e.clientWidth-s+"px"):i.setStyle(d,"left",o-s/2+"px")}(r)})),a(e,"mouseout",(()=>{i.setStyle(d,"display","none")})),a(u,"mousedown",(()=>{s=!0})),a(document,"mousemove",(e=>{if(s){const{second:r,percentage:o}=n(t,e);h("played",o),t.seek=r}})),a(document,"mouseup",(()=>{s&&(s=!1)})))}}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"31jqM":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>({...e,tooltip:t.i18n.get("Hide Subtitle"),mounted:e=>{const{events:{proxy:r},icons:i,i18n:n,subtitle:a}=t;o.append(e,i.subtitle),r(e,"click",(()=>{a.toggle=!0})),t.on("subtitle",(t=>{o.tooltip(e,n.get(t?"Hide Subtitle":"Show Subtitle"))}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],lh90q:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>({...e,style:{cursor:"auto"},mounted:e=>{function r(){const r=`${o.secondToTime(t.currentTime)} / ${o.secondToTime(t.duration)}`;r!==e.innerText&&(e.innerText=r)}r();const i=["video:loadedmetadata","video:timeupdate","video:progress"];for(let e=0;e({...e,mounted:e=>{const{events:{proxy:r},icons:i,i18n:n}=t;let a=!1;const s=t.constructor.VOLUME_PANEL_WIDTH,l=t.constructor.VOLUME_HANDLE_WIDTH,c=o.append(e,i.volume),p=o.append(e,i.volumeClose),u=o.append(e,'
'),d=o.append(u,'
');function f(e){const{left:t}=u.getBoundingClientRect();return o.clamp(e.pageX-t-l/2,0,s-l/2)/(s-l)}function h(e=.7){if(t.muted||0===e)o.setStyle(c,"display","none"),o.setStyle(p,"display","flex"),o.setStyle(d,"left","0");else{const t=(s-l)*e;o.setStyle(c,"display","flex"),o.setStyle(p,"display","none"),o.setStyle(d,"left",`${t}px`)}}o.tooltip(c,n.get("Mute")),o.setStyle(p,"display","none"),o.isMobile&&o.setStyle(u,"display","none"),h(t.volume),t.on("video:volumechange",(()=>{h(t.volume)})),r(c,"click",(()=>{t.muted=!0})),r(p,"click",(()=>{t.muted=!1})),r(u,"click",(e=>{t.muted=!1,t.volume=f(e)})),r(d,"mousedown",(()=>{a=!0})),r(e,"mousemove",(e=>{a&&(t.muted=!1,t.volume=f(e))})),r(document,"mouseup",(()=>{a&&(a=!1)}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"4rv3i":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>({...e,tooltip:t.i18n.get("Show Setting"),mounted:e=>{const{events:{proxy:r},icons:i,i18n:n,setting:a}=t;o.append(e,i.setting),r(e,"click",(()=>{a.toggle=!0})),t.on("setting",(t=>{o.tooltip(e,n.get(t?"Hide Setting":"Show Setting"))}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],lTgvI:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils"),i=e("./progress");r.default=function(e){return t=>({...e,mounted:e=>{const{option:r,template:{$progress:n,$video:a},events:{proxy:s,loadImg:l}}=t;let c=null,p=!1,u=!1;s(n,"mousemove",(async s=>{if(!p){p=!0;const e=await l(r.thumbnails.url);c=e,u=!0}u&&(o.setStyle(e,"display","block"),function(s){const{width:l}=i.getPosFromEvent(t,s),{url:p,number:u,column:d}=r.thumbnails,f=c.naturalWidth/d,h=f/(a.videoWidth/a.videoHeight),m=n.clientWidth/u,g=Math.floor(l/m),y=Math.ceil(g/d)-1,v=g%d||d-1;o.setStyle(e,"backgroundImage",`url(${p})`),o.setStyle(e,"height",`${h}px`),o.setStyle(e,"width",`${f}px`),o.setStyle(e,"backgroundPosition",`-${v*f}px -${y*h}px`),l<=f/2?o.setStyle(e,"left",0):l>n.clientWidth-f/2?o.setStyle(e,"left",n.clientWidth-f+"px"):o.setStyle(e,"left",l-f/2+"px")}(s))})),s(n,"mouseout",(()=>{o.setStyle(e,"display","none")}))}})}},{"../utils":"5yYFo","./progress":"19nwD","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"71GuX":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>({...e,tooltip:t.i18n.get("Screenshot"),mounted:e=>{const{events:{proxy:r},icons:i}=t;o.append(e,i.screenshot),r(e,"click",(()=>{t.screenshot()}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],f9VNW:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(e){return t=>{const r=t.option.quality,o=r.find((e=>e.default))||r[0];return{...e,html:o?o.html:"",selector:r,onSelect(e){t.switchQuality(e.url,e.html)}}}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],d1O2Q:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>({...e,mounted:e=>{const r=o.append(e,''),i=o.append(e,'');t.on("loop",(n=>{n?(o.setStyle(e,"display","block"),o.setStyle(r,"left",`calc(${n[0]/t.duration*100}% - ${r.clientWidth}px)`),o.setStyle(i,"left",n[1]/t.duration*100+"%")):o.setStyle(e,"display","none")}))}})}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],hTnNz:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../utils"),n=e("../utils/component"),a=o.interopDefault(n),s=e("./playbackRate"),l=o.interopDefault(s),c=e("./aspectRatio"),p=o.interopDefault(c),u=e("./flip"),d=o.interopDefault(u),f=e("./info"),h=o.interopDefault(f),m=e("./version"),g=o.interopDefault(m),y=e("./close"),v=o.interopDefault(y);class b extends a.default{constructor(e){super(e),this.art=e,this.name="contextmenu",this.$parent=e.template.$contextmenu,e.once("video:loadedmetadata",(()=>{i.isMobile||this.init()}))}init(){const{option:e,template:{$player:t,$contextmenu:r},events:{proxy:o}}=this.art;this.add(l.default({disable:!e.playbackRate,name:"playbackRate",index:10})),this.add(p.default({disable:!e.aspectRatio,name:"aspectRatio",index:20})),this.add(d.default({disable:!e.flip,name:"flip",index:30})),this.add(h.default({disable:!1,name:"info",index:40})),this.add(g.default({disable:!1,name:"version",index:50})),this.add(v.default({disable:!1,name:"close",index:60}));for(let t=0;t{e.preventDefault(),this.show=!0;const o=e.clientX,n=e.clientY,{height:a,width:s,left:l,top:c}=t.getBoundingClientRect(),{height:p,width:u}=r.getBoundingClientRect();let d=o-l,f=n-c;o+u>l+s&&(d=s-u),n+p>c+a&&(f=a-p),i.setStyles(r,{top:`${f}px`,left:`${d}px`})})),o(t,"click",(e=>{i.includeFromEvent(e,r)||(this.show=!1)})),this.art.on("blur",(()=>{this.show=!1}))}}r.default=b},{"../utils":"5yYFo","../utils/component":"5MLcx","./playbackRate":"1uTBJ","./aspectRatio":"cFKj0","./flip":"l7S3g","./info":"ihHBb","./version":"3q8wK","./close":"sLP7j","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"1uTBJ":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>{const{i18n:r}=t;return{...e,html:`${r.get("Play Speed")}:0.50.75${r.get("Normal")}1.251.52.0`,click:(e,r)=>{const{value:o}=r.target.dataset;o&&(t.playbackRate=Number(o),e.show=!1)},mounted:e=>{t.on("playbackRate",(t=>{const r=o.queryAll("span",e).find((e=>Number(e.dataset.value)===t));r&&o.inverseClass(r,"art-current")}))}}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],cFKj0:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>{const{i18n:r}=t;return{...e,html:`${r.get("Aspect Ratio")}:${r.get("Default")}4:316:9`,click:(e,r)=>{const{value:o}=r.target.dataset;o&&(t.aspectRatio=o,e.show=!1)},mounted:e=>{t.on("aspectRatio",(t=>{const r=o.queryAll("span",e).find((e=>e.dataset.value===t));r&&o.inverseClass(r,"art-current")}))}}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],l7S3g:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){return t=>{const{i18n:r}=t;return{...e,html:`${r.get("Video Flip")}:${r.get("Normal")}${r.get("Horizontal")}${r.get("Vertical")}`,click:(e,r)=>{const{value:o}=r.target.dataset;o&&(t.flip=o,e.show=!1)},mounted:e=>{t.on("flip",(t=>{const r=o.queryAll("span",e).find((e=>e.dataset.value===t));r&&o.inverseClass(r,"art-current")}))}}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],ihHBb:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(e){return t=>({...e,html:t.i18n.get("Video Info"),click:e=>{t.info.show=!0,e.show=!1}})}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"3q8wK":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(e){return{...e,html:'ArtPlayer 4.3.18'}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],sLP7j:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(e){return t=>({...e,html:t.i18n.get("Close"),click:e=>{e.show=!1}})}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],bfwuE:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./utils"),n=e("./utils/component"),a=o.interopDefault(n);class s extends a.default{constructor(e){super(e),this.name="info",e.once("video:loadedmetadata",(()=>{i.isMobile||this.init()}))}init(){const{constructor:e,events:{proxy:t},template:{$infoPanel:r,$infoClose:o,$video:n}}=this.art;t(o,"click",(()=>{this.show=!1}));let a=null;const s=i.queryAll("[data-video]",r)||[];this.art.on("destroy",(()=>{clearTimeout(a)})),function t(){for(let e=0;e{this.init(e.option.subtitle)}))}get url(){return this.art.template.$track.src}set url(e){this.switch(e)}get textTrack(){return this.art.template.$video.textTracks[0]}get activeCue(){return this.textTrack.activeCues[0]}style(e,t){const{$subtitle:r}=this.art.template;return"object"==typeof e?i.setStyles(r,e):i.setStyle(r,e,t)}update(){const{$subtitle:e}=this.art.template;e.innerHTML="",this.activeCue&&(e.innerHTML=this.activeCue.text.split(/\r?\n/).map((e=>`

${i.escape(e)}

`)).join(""),this.art.emit("subtitleUpdate",this.activeCue.text))}async switch(e,t={}){const{i18n:r,notice:o,option:i}=this.art,n={...i.subtitle,...t,url:e},a=await this.init(n);return t.name&&(o.show=`${r.get("Switch Subtitle")}: ${t.name}`),a}init(e){if(l.default(e,p.default.subtitle),!e.url)return;const{notice:t,events:{proxy:r},template:{$subtitle:o,$video:n,$track:a}}=this.art;if(!a){const e=document.createElement("track");e.default=!0,e.kind="metadata",n.appendChild(e),this.art.template.$track=e,r(this.textTrack,"cuechange",this.update.bind(this))}return this.style(e.style),i.errorHandle(window.fetch,"fetch not support"),fetch(e.url).then((e=>e.arrayBuffer())).then((t=>{i.errorHandle(window.TextDecoder,"TextDecoder not support");const r=new TextDecoder(e.encoding).decode(t);switch(this.art.emit("subtitleLoad",e.url),e.type||i.getExt(e.url)){case"srt":return i.vttToBlob(i.srtToVtt(r));case"ass":return i.vttToBlob(i.assToVtt(r));case"vtt":return i.vttToBlob(r);default:return e.url}})).then((e=>(o.innerHTML="",this.url===e||(URL.revokeObjectURL(this.url),this.art.template.$track.src=e,this.art.emit("subtitleSwitch",e)),e))).catch((e=>{throw t.show=e,e}))}}r.default=u},{"./utils":"5yYFo","./utils/component":"5MLcx","option-validator":"2A2W5","./scheme":"3izFE","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"9oLaG":[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../utils/error"),n=e("./clickInit"),a=o.interopDefault(n),s=e("./hoverInit"),l=o.interopDefault(s),c=e("./mousemoveInit"),p=o.interopDefault(c),u=e("./resizeInit"),d=o.interopDefault(u),f=e("./gestureInit"),h=o.interopDefault(f),m=e("./viewInit"),g=o.interopDefault(m);r.default=class{constructor(e){this.destroyEvents=[],this.proxy=this.proxy.bind(this),this.hover=this.hover.bind(this),this.loadImg=this.loadImg.bind(this),e.whitelist.state&&e.once("video:loadedmetadata",(()=>{a.default(e,this),l.default(e,this),p.default(e,this),d.default(e,this),h.default(e,this),g.default(e,this)}))}proxy(e,t,r,o={}){if(Array.isArray(t))return t.map((t=>this.proxy(e,t,r,o)));e.addEventListener(t,r,o);const i=()=>e.removeEventListener(t,r,o);return this.destroyEvents.push(i),i}hover(e,t,r){t&&this.proxy(e,"mouseenter",t),r&&this.proxy(e,"mouseleave",r)}loadImg(e){return new Promise(((t,r)=>{let o;if(e instanceof HTMLImageElement)o=e;else{if("string"!=typeof e)return r(new i.ArtPlayerError("Unable to get Image"));o=new Image,o.src=e}if(o.complete)return t(o);this.proxy(o,"load",(()=>t(o))),this.proxy(o,"error",(()=>r(new i.ArtPlayerError(`Failed to load Image: ${o.src}`))))}))}destroy(){for(let e=0;e{o.includeFromEvent(t,i)?(e.isFocus=!0,e.emit("focus")):(e.isFocus=!1,e.emit("blur"))}));let a=0;t.proxy(n,"click",(()=>{const t=Date.now();t-a<=r.DB_CLICE_TIME?(e.emit("dblclick"),o.isMobile?e.toggle():e.fullscreen=!e.fullscreen):(e.emit("click"),o.isMobile||e.toggle()),a=t}))}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],eIqcL:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e,t){const{$player:r}=e.template;t.hover(r,(()=>{o.addClass(r,"art-hover"),e.emit("hover",!0)}),(()=>{o.removeClass(r,"art-hover"),e.emit("hover")}))}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],hEy8X:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(e,t){const{$player:r}=e.template;t.proxy(r,"mousemove",(t=>{e.emit("mousemove",t)}))}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"9c8lQ":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e,t){const{notice:r,option:i}=e,n=o.throttle((()=>{e.normalSize&&(e.autoSize=i.autoSize),e.aspectRatioReset=!0,r.show="",e.emit("resize")}),e.constructor.RESIZE_TIME);t.proxy(window,["orientationchange","resize"],(()=>{n()})),screen&&screen.orientation&&screen.orientation.onchange&&t.proxy(screen.orientation,"change",(()=>{n()}))}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],gzHdo:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e,t){if(o.isMobile&&!e.option.isLive){const{notice:r,plugins:i,template:{$video:n,$bottom:a,$controls:s}}=e;let l=!1,c=0,p=0,u=0;const d=t=>{if(1===t.touches.length){l=!0;const{clientX:r,clientY:o}=t.touches[0];c=r,p=o,u=e.currentTime}},f=t=>{if(1===t.touches.length&&l&&e.duration){const n=i.autoOrientation&&i.autoOrientation.state,{clientX:a,clientY:s}=t.touches[0],l=o.clamp((a-c)/e.width,-1,1),d=o.clamp((s-p)/e.height,-1,1),f=n?d:l,h=o.clamp(u+e.duration*f/2,0,e.duration);e.seek=h,e.emit("setBar","played",o.clamp(h/e.duration,0,1)),r.show=`${o.secondToTime(h)} / ${o.secondToTime(e.duration)}`}},h=()=>{l&&(c=0,p=0,u=0,l=!1)};t.proxy(a,"touchstart",(e=>{o.includeFromEvent(e,s)||d(e)})),t.proxy(a,"touchmove",f),t.proxy(n,"touchstart",d),t.proxy(n,"touchmove",f),t.proxy(document,"touchend",h)}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],cJlT5:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e,t){const{option:r,constructor:i,template:{$container:n}}=e,a=o.throttle((()=>{e.emit("view",o.isInViewport(n,i.SCROLL_GAP))}),i.SCROLL_TIME);t.proxy(window,"scroll",(()=>{a()})),e.on("view",(t=>{r.autoMini&&(e.mini=!t)}))}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],cKO4X:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("./utils");r.default=class{constructor(e){this.art=e,this.keys={},e.once("video:loadedmetadata",(()=>{e.option.hotkey&&!o.isMobile&&this.init()}))}init(){const{proxy:e}=this.art.events;this.add(27,(()=>{this.art.fullscreenWeb&&(this.art.fullscreenWeb=!1)})),this.add(32,(()=>{this.art.toggle()})),this.add(37,(()=>{this.art.backward=5})),this.add(38,(()=>{this.art.volume+=.1})),this.add(39,(()=>{this.art.forward=5})),this.add(40,(()=>{this.art.volume-=.1})),e(window,"keydown",(e=>{if(this.art.isFocus){const t=document.activeElement.tagName.toUpperCase(),r=document.activeElement.getAttribute("contenteditable");if("INPUT"!==t&&"TEXTAREA"!==t&&""!==r&&"true"!==r){const t=this.keys[e.keyCode];if(t){e.preventDefault();for(let r=0;r{for(let e=0;e{i.innerText="",o.removeClass(r,"art-notice-show")}),t.NOTICE_TIME)):o.removeClass(r,"art-notice-show")}}},{"./utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],aJ0dF:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./utils"),n=e("./utils/component"),a=o.interopDefault(n);class s extends a.default{constructor(e){super(e),this.name="mask";const{template:t,icons:r,events:o}=e;i.append(t.$state,r.state),o.proxy(t.$state,"click",(()=>e.play()))}}r.default=s},{"./utils":"5yYFo","./utils/component":"5MLcx","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],jx1Wu:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../utils"),n=e("bundle-text:./loading.svg"),a=o.interopDefault(n),s=e("bundle-text:./state.svg"),l=o.interopDefault(s),c=e("bundle-text:./check.svg"),p=o.interopDefault(c),u=e("bundle-text:./play.svg"),d=o.interopDefault(u),f=e("bundle-text:./pause.svg"),h=o.interopDefault(f),m=e("bundle-text:./volume.svg"),g=o.interopDefault(m),y=e("bundle-text:./volume-close.svg"),v=o.interopDefault(y),b=e("bundle-text:./subtitle.svg"),x=o.interopDefault(b),w=e("bundle-text:./screenshot.svg"),j=o.interopDefault(w),k=e("bundle-text:./setting.svg"),M=o.interopDefault(k),S=e("bundle-text:./arrow-left.svg"),I=o.interopDefault(S),F=e("bundle-text:./arrow-right.svg"),$=o.interopDefault(F),T=e("bundle-text:./playback-rate.svg"),E=o.interopDefault(T),C=e("bundle-text:./aspect-ratio.svg"),z=o.interopDefault(C),Y=e("bundle-text:./config.svg"),D=o.interopDefault(Y),P=e("bundle-text:./pip.svg"),R=o.interopDefault(P),A=e("bundle-text:./lock.svg"),O=o.interopDefault(A),L=e("bundle-text:./unlock.svg"),H=o.interopDefault(L),_=e("bundle-text:./fullscreen-off.svg"),N=o.interopDefault(_),J=e("bundle-text:./fullscreen-on.svg"),V=o.interopDefault(J),q=e("bundle-text:./fullscreen-web-off.svg"),W=o.interopDefault(q),B=e("bundle-text:./fullscreen-web-on.svg"),U=o.interopDefault(B);r.default=class{constructor(e){const t={loading:a.default,state:l.default,play:d.default,pause:h.default,check:p.default,volume:g.default,volumeClose:v.default,subtitle:x.default,screenshot:j.default,setting:M.default,pip:R.default,arrowLeft:I.default,arrowRight:$.default,playbackRate:E.default,aspectRatio:z.default,config:D.default,lock:O.default,unlock:H.default,fullscreenOff:N.default,fullscreenOn:V.default,fullscreenWebOff:W.default,fullscreenWebOn:U.default,...e.option.icons};Object.keys(t).forEach((e=>{i.def(this,e,{get:()=>{const r=document.createElement("i");return i.addClass(r,"art-icon"),i.addClass(r,`art-icon-${e}`),i.append(r,t[e]),r}})}))}}},{"../utils":"5yYFo","bundle-text:./loading.svg":"gFMCI","bundle-text:./state.svg":"iYMJD","bundle-text:./check.svg":"hyrDV","bundle-text:./play.svg":"eZys6","bundle-text:./pause.svg":"hITjK","bundle-text:./volume.svg":"hNNiX","bundle-text:./volume-close.svg":"dC2M2","bundle-text:./subtitle.svg":"iCL9K","bundle-text:./screenshot.svg":"9hKk0","bundle-text:./setting.svg":"47p50","bundle-text:./arrow-left.svg":"5je49","bundle-text:./arrow-right.svg":"2HKZ5","bundle-text:./playback-rate.svg":"hdBpQ","bundle-text:./aspect-ratio.svg":"alUG1","bundle-text:./config.svg":"6B4Bn","bundle-text:./pip.svg":"2Ya1d","bundle-text:./lock.svg":"5Bna4","bundle-text:./unlock.svg":"daCyz","bundle-text:./fullscreen-off.svg":"bx7Yh","bundle-text:./fullscreen-on.svg":"fxY8n","bundle-text:./fullscreen-web-off.svg":"96euD","bundle-text:./fullscreen-web-on.svg":"ccnBB","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],gFMCI:[function(e,t,r){t.exports=''},{}],iYMJD:[function(e,t,r){t.exports=''},{}],hyrDV:[function(e,t,r){t.exports=''},{}],eZys6:[function(e,t,r){t.exports=''},{}],hITjK:[function(e,t,r){t.exports=''},{}],hNNiX:[function(e,t,r){t.exports=''},{}],dC2M2:[function(e,t,r){t.exports=''},{}],iCL9K:[function(e,t,r){t.exports=''},{}],"9hKk0":[function(e,t,r){t.exports=''},{}],"47p50":[function(e,t,r){t.exports=''},{}],"5je49":[function(e,t,r){t.exports=''},{}],"2HKZ5":[function(e,t,r){t.exports=''},{}],hdBpQ:[function(e,t,r){t.exports=''},{}],alUG1:[function(e,t,r){t.exports=''},{}],"6B4Bn":[function(e,t,r){t.exports=''},{}],"2Ya1d":[function(e,t,r){t.exports=''},{}],"5Bna4":[function(e,t,r){t.exports=''},{}],daCyz:[function(e,t,r){t.exports=''},{}],bx7Yh:[function(e,t,r){t.exports=''},{}],fxY8n:[function(e,t,r){t.exports=''},{}],"96euD":[function(e,t,r){t.exports=''},{}],ccnBB:[function(e,t,r){t.exports=''},{}],hdF39:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./flip"),n=o.interopDefault(i),a=e("./aspectRatio"),s=o.interopDefault(a),l=e("./playbackRate"),c=o.interopDefault(l),p=e("./subtitleOffset"),u=o.interopDefault(p),d=e("../utils/component"),f=o.interopDefault(d),h=e("../utils");function m(e,t,r){for(let o=0;o{t.playbackRate&&this.option.push(c.default(e)),t.aspectRatio&&this.option.push(s.default(e)),t.flip&&this.option.push(n.default(e)),t.subtitleOffset&&this.option.push(u.default(e));for(let e=0;e{this.show&&(this.show=!1,this.init(this.option))})),r(i,"click",(t=>{!this.show||h.includeFromEvent(t,e.controls.setting)||h.includeFromEvent(t,this.$parent)||(this.show=!1,this.init(this.option))})))}add(e){"function"==typeof e?this.option.push(e(this.art)):this.option.push(e),this.cache=new Map,this.events.forEach((e=>e())),this.events=[],this.$parent.innerHTML="",this.option=m(this.option),this.init(this.option)}creatHeader(e){const{icons:t,events:{proxy:r}}=this.art,o=document.createElement("div");h.addClass(o,"art-setting-item"),h.addClass(o,"art-setting-item-back");const i=h.append(o,'
'),n=document.createElement("div");h.addClass(n,"art-setting-item-left-icon"),h.append(n,t.arrowLeft),h.append(i,n),h.append(i,e._parentItem.html);const a=r(o,"click",(()=>{this.init(e._parentList)}));return this.events.push(a),o}creatItem(e){const{icons:t,events:{proxy:r}}=this.art,o=e.selector&&e.selector.length,i=document.createElement("div");h.addClass(i,"art-setting-item"),e.default&&h.addClass(i,"art-current");const n=h.append(i,'
'),a=h.append(i,'
'),s=document.createElement("div");h.addClass(s,"art-setting-item-left-icon"),h.append(s,o?e.icon||t.config:t.check),h.append(n,s),e._$icon=s,h.def(e,"icon",{get:()=>s.innerHTML,set(e){"string"!=typeof e&&"number"!=typeof e||(s.innerHTML=e)}});const l=document.createElement("div");if(h.addClass(l,"art-setting-item-left-text"),h.append(l,e.html||""),h.append(n,l),e._$html=l,h.def(e,"html",{get:()=>l.innerHTML,set(e){"string"!=typeof e&&"number"!=typeof e||(l.innerHTML=e)}}),o){const r=document.createElement("div");h.addClass(r,"art-setting-item-right-tooltip"),h.append(r,e.tooltip||""),h.append(a,r),e._$tooltip=r,h.def(e,"tooltip",{get:()=>r.innerHTML,set(e){"string"!=typeof e&&"number"!=typeof e||(r.innerHTML=e)}});const o=document.createElement("div");h.addClass(o,"art-setting-item-right-icon"),h.append(o,t.arrowRight),h.append(a,o)}const c=r(i,"click",(async t=>{if(o)this.init(e.selector,e.width);else if(h.inverseClass(i,"art-current"),e._parentList&&this.init(e._parentList),e._parentItem&&e._parentItem.onSelect){const r=await e._parentItem.onSelect.call(this.art,e,i,t);e._parentItem._$tooltip&&("string"!=typeof r&&"number"!=typeof r||(e._parentItem._$tooltip.innerHTML=r))}}));return this.events.push(c),i}init(e,t){const{constructor:r}=this.art;if(this.cache.has(e)){const t=this.cache.get(e);h.inverseClass(t,"art-current"),h.setStyle(this.$parent,"width",`${t.dataset.width}px`),h.setStyle(this.$parent,"height",`${t.dataset.height}px`)}else{const o=document.createElement("div");h.addClass(o,"art-setting-panel"),o.dataset.width=t||r.SETTING_WIDTH,o.dataset.height=e.length*r.SETTING_ITEM_HEIGHT,e[0]&&e[0]._parentItem&&(h.append(o,this.creatHeader(e[0])),o.dataset.height=Number(o.dataset.height)+r.SETTING_ITEM_HEIGHT);for(let t=0;te.dataset.value===i));a&&o.inverseClass(a,"art-current")}return{width:i.SETTING_ITEM_WIDTH,html:t.get("Video Flip"),tooltip:t.get(n[e.flip]),icon:r.config,selector:Object.keys(n).map((r=>({value:r,default:r===e.flip,html:t.get(n[r])}))),onSelect(t){e.flip=t.value},mounted:(t,r)=>{a(t,r._$tooltip,e.flip),e.on("flip",(()=>{a(t,r._$tooltip,e.flip)}))}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],jTfLi:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{i18n:t,icons:r,constructor:i}=e;function n(e){return"default"===e?t.get("Default"):e}function a(e,t,r){t&&(t.innerText=n(r));const i=o.queryAll(".art-setting-item",e).find((e=>e.dataset.value===r));i&&o.inverseClass(i,"art-current")}return{width:i.SETTING_ITEM_WIDTH,html:t.get("Aspect Ratio"),icon:r.aspectRatio,tooltip:n(e.aspectRatio),selector:["default","4:3","16:9"].map((t=>({value:t,default:t===e.aspectRatio,html:n(t)}))),onSelect(t){e.aspectRatio=t.value},mounted:(t,r)=>{a(t,r._$tooltip,e.aspectRatio),e.on("aspectRatio",(()=>{a(t,r._$tooltip,e.aspectRatio)}))}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],aowja:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{i18n:t,icons:r,constructor:i}=e;function n(e){return 1===e?t.get("Normal"):e}function a(e,t,r){t&&(t.innerText=n(r));const i=o.queryAll(".art-setting-item",e).find((e=>Number(e.dataset.value)===r));i&&o.inverseClass(i,"art-current")}return{width:i.SETTING_ITEM_WIDTH,html:t.get("Play Speed"),tooltip:n(e.playbackRate),icon:r.playbackRate,selector:[.5,.75,1,1.25,1.5,2].map((t=>({value:t,default:t===e.playbackRate,html:n(t)}))),onSelect(t){e.playbackRate=t.value},mounted:(t,r)=>{a(t,r._$tooltip,e.playbackRate),e.on("playbackRate",(()=>{a(t,r._$tooltip,e.playbackRate)}))}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],aPjJK:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{i18n:t,icons:r,constructor:i}=e;function n(e){return 0===e?t.get("Normal"):e}function a(e,t,r){t&&(t.innerText=n(r));const i=o.queryAll(".art-setting-item",e).find((e=>Number(e.dataset.value)===r));i&&o.inverseClass(i,"art-current")}return{width:i.SETTING_ITEM_WIDTH,html:t.get("Subtitle Offset"),tooltip:n(e.subtitleOffset),icon:r.subtitle,selector:[-5,-4,-3,-2,-1,0,1,2,3,4,5].map((t=>({value:t,default:t===e.subtitleOffset,html:n(t)}))),onSelect(t){e.subtitleOffset=t.value},mounted:(t,r)=>{a(t,r._$tooltip,e.subtitleOffset),e.on("subtitleOffset",(()=>{a(t,r._$tooltip,e.subtitleOffset)}))}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],bCcu0:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);r.default=class{constructor(){this.name="artplayer_settings",this.settings={}}get(e){try{const t=JSON.parse(window.localStorage.getItem(this.name))||{};return e?t[e]:t}catch(t){return e?this.settings[e]:this.settings}}set(e,t){try{const r=Object.assign({},this.get(),{[e]:t});window.localStorage.setItem(this.name,JSON.stringify(r))}catch(r){this.settings[e]=t}}del(e){try{const t=this.get();delete t[e],window.localStorage.setItem(this.name,JSON.stringify(t))}catch(t){delete this.settings[e]}}clear(){try{window.localStorage.removeItem(this.name)}catch(e){this.settings={}}}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"1v13t":[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../utils"),n=e("./miniProgressBar"),a=o.interopDefault(n),s=e("./autoOrientation"),l=o.interopDefault(s),c=e("./autoPlayback"),p=o.interopDefault(c),u=e("./fastForward"),d=o.interopDefault(u),f=e("./lock"),h=o.interopDefault(f);r.default=class{constructor(e){this.art=e,this.id=0;const{option:t}=e;t.miniProgressBar&&!t.isLive&&this.add(a.default),t.lock&&i.isMobile&&this.add(h.default),t.autoPlayback&&this.add(p.default),t.autoOrientation&&i.isMobile&&this.add(l.default),t.fastForward&&i.isMobile&&!t.isLive&&this.add(d.default);for(let e=0;e{e.layers.add({name:"miniProgressBar",mounted(t){e.on("destroy",(()=>{t.style.display="none"})),e.on("video:timeupdate",(()=>{t.style.width=100*e.played+"%"})),e.on("setBar",((e,r)=>{"played"===e&&(t.style.width=100*r+"%")}))}})})),{name:"miniProgressBar"}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],bcdCk:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{option:t,constructor:r,template:{$player:i,$video:n}}=e;return e.on("fullscreenWeb",(a=>{if(a){const{videoWidth:t,videoHeight:a}=n,{clientWidth:s,clientHeight:l}=document.documentElement;(t>a&&sl)&&setTimeout((()=>{o.setStyle(i,"width",`${l}px`),o.setStyle(i,"height",`${s}px`),o.setStyle(i,"transform-origin","0 0"),o.setStyle(i,"transform",`rotate(90deg) translate(0, -${s}px)`),o.addClass(i,"art-auto-orientation"),e.emit("resize")}),r.MOBILE_AUTO_ORIENTATION_TIME)}else o.hasClass(i,"art-auto-orientation")&&(o.setStyle(i,"width",null),o.setStyle(i,"height",null),o.setStyle(i,"transform",null),o.setStyle(i,"transform-origin",null),o.removeClass(i,"art-auto-orientation"),e.aspectRatioReset=!0,e.autoSize=t.autoSize,e.notice.show="",e.emit("resize"))})),e.on("fullscreen",(async e=>{const t=screen.orientation.type;if(e){const{videoWidth:e,videoHeight:r}=n,{clientWidth:a,clientHeight:s}=document.documentElement;if(e>r&&as){const e=t.startsWith("portrait")?"landscape":"portrait";await screen.orientation.lock(e),o.addClass(i,"art-auto-orientation-fullscreen")}}else o.hasClass(i,"art-auto-orientation-fullscreen")&&(await screen.orientation.lock(t),o.removeClass(i,"art-auto-orientation-fullscreen"))})),{name:"autoOrientation",get state(){return o.hasClass(i,"art-auto-orientation")}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"1nHHC":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{i18n:t,storage:r,constructor:i,template:{$poster:n}}=e;return e.on("video:timeupdate",(()=>{const t=r.get("times")||{},o=Object.keys(t);o.length>i.AUTO_PLAYBACK_MAX&&delete t[o[0]],t[e.option.url]=e.currentTime,r.set("times",t)})),e.on("ready",(()=>{const i=(r.get("times")||{})[e.option.url];i&&(e.seek=i,o.setStyle(n,"display","none"),e.notice.show=`${t.get("Auto playback at")} ${o.secondToTime(i)}`)})),{name:"autoPlayback",get times(){return r.get("times")||{}},clear:()=>r.del("times")}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"4gkmX":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{constructor:t,events:{proxy:r},template:{$player:i,$video:n}}=e;let a=null,s=!1;const l=()=>{clearTimeout(a),s&&(s=!1,e.playbackRate=1,o.removeClass(i,"art-fast-forward"))};return r(n,"touchstart",(r=>{1===r.touches.length&&e.playing&&(a=setTimeout((()=>{s=!0,e.playbackRate=t.FAST_FORWARD_VALUE,o.addClass(i,"art-fast-forward")}),t.FAST_FORWARD_TIME))})),r(document,"touchmove",l),r(document,"touchend",l),{name:"fastForward",get state(){return o.hasClass(i,"art-fast-forward")}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],ij5nM:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../utils");r.default=function(e){const{layers:t,icons:r,template:{$player:i}}=e;return t.add({name:"lock",mounted(t){const i=o.append(t,r.lock),n=o.append(t,r.unlock);o.setStyle(i,"display","none"),e.on("lock",(e=>{e?(o.setStyle(i,"display","inline-flex"),o.setStyle(n,"display","none")):(o.setStyle(i,"display","none"),o.setStyle(n,"display","inline-flex"))}))},click(){o.hasClass(i,"art-lock")?(o.removeClass(i,"art-lock"),e.emit("lock",!1)):(o.addClass(i,"art-lock"),e.emit("lock",!0))}}),{name:"lock",get state(){return o.hasClass(i,"art-lock")}}}},{"../utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],jXgJj:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);r.default=class{constructor(e){this.art=e,this.init()}get current(){return this.art.option.ads[this.index]}get prev(){return this.art.option.ads[this.index-1]}get next(){return this.art.option.ads[this.index+1]}init(){this.index=0,this.isEnd=!1,this.playing=!1,this.urlCache=this.art.option.url,this.current&&(this.playing=!0,this.play(this.current))}play(e={}){this.isEnd||(this.art.switchUrl(e.url),this.art.once("video:timeupdate",(()=>{this.art.emit("ads:start",e)})),this.art.once("video:ended",(()=>{const e=this.next;e?(this.index+=1,this.play(e)):this.end()})))}end(){this.isEnd||(this.isEnd=!0,this.playing=!1,this.art.option.url=this.urlCache,this.art.switchUrl(this.urlCache),this.art.emit("ads:end"))}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],eD5Ch:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./config"),n=o.interopDefault(i),a=e("./utils");r.default=class{constructor(e){const{option:t,events:{proxy:r},template:{$video:o}}=e;for(let t=0;t{e.emit(`video:${t.type}`,t)}));Object.keys(t.moreVideoAttr).forEach((e=>{o[e]=t.moreVideoAttr[e]})),t.muted&&(o.muted=t.muted),t.volume&&(o.volume=a.clamp(t.volume,0,1)),t.poster&&(o.poster=t.poster),t.autoplay&&(o.autoplay=t.autoplay),t.playsInline&&(o.playsInline=!0,o["webkit-playsinline"]=!0);const i=t.type||a.getExt(t.url),s=t.customType[i];i&&s?(s(o,t.url,e),e.emit("customType",i)):(o.src=t.url,e.emit("url",o.src))}}},{"./config":"ej4fZ","./utils":"5yYFo","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}]},["E13ST"],"E13ST"); \ No newline at end of file diff --git a/packages/artplayer/package.json b/packages/artplayer/package.json index 4f372848c..f1e696c9c 100644 --- a/packages/artplayer/package.json +++ b/packages/artplayer/package.json @@ -1,7 +1,7 @@ { "license": "MIT", "name": "artplayer", - "version": "4.3.17", + "version": "4.3.18", "main": "dist/artplayer.js", "types": "types/artplayer.d.ts", "homepage": "https://artPlayer.org",