window.DanmuJs=function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=4)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,i=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"";this.logger=new a.default(t+".js")}}]),t}();e.default=s,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o={createDom:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=document.createElement(t);return i.className=o,i.innerHTML=e,Object.keys(n).forEach((function(e){var o=e,r=n[e];"video"===t||"audio"===t?r&&i.setAttribute(o,r):i.setAttribute(o,r)})),i},hasClass:function(t,e){return t.classList?Array.prototype.some.call(t.classList,(function(t){return t===e})):!!t.className.match(new RegExp("(\\s|^)"+e+"(\\s|$)"))},addClass:function(t,e){t.classList?e.replace(/(^\s+|\s+$)/g,"").split(/\s+/g).forEach((function(e){e&&t.classList.add(e)})):o.hasClass(t,e)||(t.className+=" "+e)},removeClass:function(t,e){t.classList?e.split(/\s+/g).forEach((function(e){t.classList.remove(e)})):o.hasClass(t,e)&&e.split(/\s+/g).forEach((function(e){var n=new RegExp("(\\s|^)"+e+"(\\s|$)");t.className=t.className.replace(n," ")}))},toggleClass:function(t,e){e.split(/\s+/g).forEach((function(e){o.hasClass(t,e)?o.removeClass(t,e):o.addClass(t,e)}))},findDom:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=arguments[1],n=void 0;try{n=t.querySelector(e)}catch(o){e.startsWith("#")&&(n=t.getElementById(e.slice(1)))}return n},deepCopy:function(t,e){if("Object"===o.typeOf(e)&&"Object"===o.typeOf(t))return Object.keys(e).forEach((function(n){"Object"!==o.typeOf(e[n])||e[n]instanceof Node?"Array"===o.typeOf(e[n])?t[n]="Array"===o.typeOf(t[n])?t[n].concat(e[n]):e[n]:t[n]=e[n]:t[n]?o.deepCopy(t[n],e[n]):t[n]=e[n]})),t},typeOf:function(t){return Object.prototype.toString.call(t).match(/([^\s.*]+)(?=]$)/g)[0]},copyDom:function(t){if(t&&1===t.nodeType){var e=document.createElement(t.tagName);return Array.prototype.forEach.call(t.attributes,(function(t){e.setAttribute(t.name,t.value)})),t.innerHTML&&(e.innerHTML=t.innerHTML),e}return""},formatTime:function(t){var e=Math.floor(t);return 1e3*e+(t-e)},offInDestroy:function(t,e,n,o){t.once(o,(function i(){t.off(e,n),t.off(o,i)}))},on:function(t,e,n,i){if(i)t.on(e,n),o.offInDestroy(t,e,n,i);else{t.on(e,(function o(i){n(i),t.off(e,o)}))}}};e.default=o,t.exports=e.default},function(t,e,n){"use strict";var o=n(19)();t.exports=function(t){return t!==o&&null!==t}},function(t,e,n){"use strict";t.exports=function(t){return null!=t}},function(t,e,n){t.exports=n(5)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,i=n(6),r=(o=i)&&o.__esModule?o:{default:o};n(33),e.default=r.default,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"scroll",e=arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.logger.info("setAllDuration: mode "+t+" duration "+e+" force "+n);var o=this.container.getBoundingClientRect();e&&(e=e||5e3,n&&(this.bulletBtn.main.forceDuration=e),this.bulletBtn.main.data.forEach((function(n){t===n.mode&&(n.duration=e)})),this.bulletBtn.main.queue.forEach((function(n){t===n.mode&&(n.duration=e,n.pauseMove(o),"paused"!==n.danmu.bulletBtn.main.status&&n.startMove(o))})))}},{key:"setOpacity",value:function(t){this.logger.info("setOpacity: opacity "+t),this.container.style.opacity=t}},{key:"setFontSize",value:function(t,e){var n=this;this.logger.info("setFontSize: size "+t+" channelSize "+e),this.fontSize=t+"px",t&&(this.bulletBtn.main.data.forEach((function(t){t.style&&(t.style.fontSize=n.fontSize)})),this.bulletBtn.main.queue.forEach((function(t){t.options.style||(t.options.style={}),t.options.style.fontSize=n.fontSize,t.setFontSize(n.fontSize),e&&(t.top=t.channel_id[0]*e,t.topInit())}))),e&&(this.config.channelSize=e,this.bulletBtn.main.channel.resize(!0))}},{key:"setArea",value:function(t){this.logger.info("setArea: area "+t),this.config.area=t,this.bulletBtn.main.channel.resize(!0)}},{key:"hide",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"scroll";this.logger.info("hide: mode "+t),this.hideArr.indexOf(t)<0&&this.hideArr.push(t);var e=this.bulletBtn.main.queue.filter((function(e){return t===e.mode||"color"===t&&e.color}));e.forEach((function(t){return t.remove()}))}},{key:"show",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"scroll";this.logger.info("show: mode "+t);var e=this.hideArr.indexOf(t);e>-1&&this.hideArr.splice(e,1)}},{key:"setDirection",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"r2l";this.logger.info("setDirection: direction "+t),this.emit("changeDirection",t)}},{key:"resize",value:function(){this.logger.info("resize"),this.emit("channel_resize")}}]),e}(r.default);e.default=h,t.exports=e.default},function(t,e,n){"use strict";var o,i,r,a,s,u,l,c=n(8),f=n(25),h=Function.prototype.apply,d=Function.prototype.call,p=Object.create,m=Object.defineProperty,g=Object.defineProperties,v=Object.prototype.hasOwnProperty,b={configurable:!0,enumerable:!1,writable:!0};i=function(t,e){var n,i;return f(e),i=this,o.call(this,t,n=function(){r.call(i,t,n),h.call(e,this,arguments)}),n.__eeOnceListener__=e,this},s={on:o=function(t,e){var n;return f(e),v.call(this,"__ee__")?n=this.__ee__:(n=b.value=p(null),m(this,"__ee__",b),b.value=null),n[t]?"object"==typeof n[t]?n[t].push(e):n[t]=[n[t],e]:n[t]=e,this},once:i,off:r=function(t,e){var n,o,i,r;if(f(e),!v.call(this,"__ee__"))return this;if(!(n=this.__ee__)[t])return this;if("object"==typeof(o=n[t]))for(r=0;i=o[r];++r)i!==e&&i.__eeOnceListener__!==e||(2===o.length?n[t]=o[r?0:1]:o.splice(r,1));else o!==e&&o.__eeOnceListener__!==e||delete n[t];return this},emit:a=function(t){var e,n,o,i,r;if(v.call(this,"__ee__")&&(i=this.__ee__[t]))if("object"==typeof i){for(n=arguments.length,r=new Array(n-1),e=1;e-1}},function(t,e,n){"use strict";t.exports=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n-1,r=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.constructorName=e||""}return o(t,[{key:"info",value:function(t){for(var e,n=arguments.length,o=Array(n>1?n-1:0),r=1;r0&&void 0!==arguments[0])||arguments[0];return this.logger.info("createSwitch"),this.switchBtn=r.default.createDom("dk-switch",'',{},"danmu-switch "+(t?"danmu-switch-active":"")),this.switchBtn}},{key:"destroy",value:function(){for(var t in this.logger.info("destroy"),this.main.destroy(),this)delete this[t]}}]),e}(i.default);e.default=u,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n0&&["scroll","top","bottom"].forEach((function(o){t.queue.forEach((function(t){t.startMove(n),t.resized=!0}));for(var i=0;i0&&this.queue.forEach((function(t){t.pauseMove(e)}))}},{key:"dataHandle",value:function(){var t=this;"paused"!==this.status&&"closed"!==this.status&&t.queue.length&&t.queue.forEach((function(e){"waiting"===e.status&&e.startMove(t.channel.containerPos)}))}},{key:"readData",value:function(){var t=this,e=this.danmu,n=0;e.player&&e.player.currentTime&&(n=s.default.formatTime(e.player.currentTime));var o=void 0,i=t.interval,r=t.channel,u=void 0;e.player?(u=t.data.filter((function(e){return!e.start&&t.danmu.hideArr.indexOf(e.mode)<0&&(!e.color||t.danmu.hideArr.indexOf("color")<0)&&(e.start=n),t.danmu.hideArr.indexOf(e.mode)<0&&(!e.color||t.danmu.hideArr.indexOf("color")<0)&&e.start-i<=n&&n<=e.start+i})),e.live&&(t.data=t.data.filter((function(t){return t.start||(t.start=n),t.start>n-3*i})))):0===(u=t.data.splice(0,1)).length&&(u=t.playedData.splice(0,1)),u.length>0&&u.forEach((function(n){t.forceDuration&&t.forceDuration!=n.duration&&(n.duration=t.forceDuration),o=new a.default(e,n),n.hasAttached||(o.attach(),n.hasAttached=!0,r.addBullet(o).result?(t.queue.push(o),t.nums++,o.topInit()):(o.detach(),n.hasAttached=!1,n.noDiscard&&(n.prior?t.data.unshift(n):t.data.push(n))))}))}}]),e}(i.default);e.default=l,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]&&arguments[0];this.logger.info("resize");var e=this.danmu.container,n=this;n.resizing||(n.resizing=!0,this.resizeTimer=setTimeout((function(){n.danmu.bulletBtn.main.status;n.danmu.bulletBtn.main.data&&n.danmu.bulletBtn.main.data.forEach((function(t){t.bookChannelId&&(delete t.bookChannelId,n.logger.info("resize导致"+t.id+"号优先弹幕预定取消"))})),n.logger.info("resize导致所有轨道恢复正常使用");var o=e.getBoundingClientRect();n.width=o.width,n.height=o.height,n.danmu.config.area&&n.danmu.config.area.start>=0&&n.danmu.config.area.end>=n.danmu.config.area.start&&("b2t"===n.direction?n.width=n.width*(n.danmu.config.area.end-n.danmu.config.area.start):n.height=n.height*(n.danmu.config.area.end-n.danmu.config.area.start)),n.container=e;var i=n.danmu.config.channelSize||(/mobile/gi.test(navigator.userAgent)?10:12),r=void 0;r="b2t"===n.direction?Math.floor(n.width/i):Math.floor(n.height/i);for(var a=[],s=0;sa.length){for(var h=function(e){a[e]={id:e,queue:{scroll:[],top:[],bottom:[]},operating:{scroll:!1,top:!1,bottom:!1},bookId:{}},["scroll","top","bottom"].forEach((function(o){if("top"===o&&e>Math.floor(a.length/2));else if("bottom"===o&&e<=Math.floor(a.length/2));else{var r="bottom"===o?e-a.length+n.channels.length:e;n.channels[r].queue[o].forEach((function(s,u){if(s.el){if(a[e].queue[o].push(s),"bottom"===o&&s.channel_id[0]+s.channel_id[1]-1===r){var l=[].concat(s.channel_id);s.channel_id=[l[0]-n.channels.length+a.length,l[1]],s.top=s.channel_id[0]*i,n.danmu.config.area&&n.danmu.config.area.start&&(s.top+=n.containerHeight*n.danmu.config.area.start),s.topInit()}s.pauseMove(n.containerPos,t),"paused"!==s.danmu.bulletBtn.main.status&&s.startMove(n.containerPos),s.resized||(s.resized=!0)}n.channels[r].queue[o].splice(u,1)}))}}))},d=0;do.length)return{result:!1,message:"exceed channels.length, occupy="+a+",channelsSize="+o.length};for(var s=!0,u=void 0,l=-1,c=0,f=o.length;ce.containerPos.bottom){s=!1,u.operating.scroll=!1;break}}else if(g.right>e.containerPos.right){s=!1,u.operating.scroll=!1;break}var v,b=void 0,y=void 0,w=void 0,_=void 0;if("b2t"===e.direction?(y=(g.top-e.containerPos.top+g.height)/(b=(e.containerPos.height+g.height)/m.duration),w=e.containerPos.height,_=(e.containerPos.height+t.height)/t.duration):(y=(g.left-e.containerPos.left+g.width)/(b=(e.containerPos.width+g.width)/m.duration),w=e.containerPos.width,_=(e.containerPos.width+t.width)/t.duration),v=w/_,n.config.bOffset||(n.config.bOffset=0),b<_&&y+n.config.bOffset>v){s=!1,u.operating.scroll=!1;break}}u.operating.scroll=!1}if(s){l=h;break}}else if("top"===t.mode)for(var k=0,O=o.length-a;k<=O;k++){s=!0;for(var x=k;xMath.floor(o.length/2)){s=!1;break}if((u=o[x]).operating[t.mode]){s=!1;break}if((u.bookId[t.mode]||t.prior)&&u.bookId[t.mode]!==t.id){s=!1;break}if(u.operating[t.mode]=!0,u.queue[t.mode].length>0){s=!1,u.operating[t.mode]=!1;break}u.operating[t.mode]=!1}if(s){l=k;break}}else if("bottom"===t.mode)for(var M=o.length-a;M>=0;M--){s=!0;for(var C=M;C0){s=!1,u.operating[t.mode]=!1;break}u.operating[t.mode]=!1}if(s){l=M;break}}if(-1!==l){for(var j=l,P=l+a;je.containerPos.right&&t.start>=T&&(T=t.start,n,B=t)})),B){t.channel_id=B.channel_id;for(var E=B.channel_id[0],z=B.channel_id[0]+B.channel_id[1];E-1&&o.queue[t.mode].splice(a,1),o.operating[t.mode]=!1}t.options.loop&&this.danmu.bulletBtn.main.playedData.push(t.options)}},{key:"resetArea",value:function(){this.logger.info("resetArea");var t=this.danmu.container,e=this,n=t.getBoundingClientRect();e.width=n.width,e.height=n.height,e.danmu.config.area&&e.danmu.config.area.start>=0&&e.danmu.config.area.end>=e.danmu.config.area.start&&("b2t"===e.direction?e.width=e.width*(e.danmu.config.area.end-e.danmu.config.area.start):e.height=e.height*(e.danmu.config.area.end-e.danmu.config.area.start)),e.container=t;var o=e.danmu.config.channelSize||(/mobile/gi.test(navigator.userAgent)?10:12),i=void 0;i="b2t"===e.direction?Math.floor(e.width/o):Math.floor(e.height/o);for(var r=[],a=0;ar.length){for(var f=function(t){r[t]={id:t,queue:{scroll:[],top:[],bottom:[]},operating:{scroll:!1,top:!1,bottom:!1},bookId:{}},["scroll","top","bottom"].forEach((function(n){if("top"===n&&t>Math.floor(r.length/2));else if("bottom"===n&&t<=Math.floor(r.length/2));else{var i="bottom"===n?t-r.length+e.channels.length:t;e.channels[i].queue[n].forEach((function(a,s){if(a.el){if(r[t].queue[n].push(a),"bottom"===n&&a.channel_id[0]+a.channel_id[1]-1===i){var u=[].concat(a.channel_id);a.channel_id=[u[0]-e.channels.length+r.length,u[1]],a.top=a.channel_id[0]*o,e.danmu.config.area&&e.danmu.config.area.start&&(a.top+=e.containerHeight*e.danmu.config.area.start),a.topInit()}a.resized||(a.pauseMove(e.containerPos,!1),a.startMove(e.containerPos),a.resized=!0)}e.channels[i].queue[n].splice(s,1)}))}}))},h=0;h0&&["scroll","top","bottom"].forEach((function(t){for(var n=0;n=0&&e.danmu.config.area.end>=e.danmu.config.area.start&&("b2t"===e.direction?e.width=e.width*(e.danmu.config.area.end-e.danmu.config.area.start):e.height=e.height*(e.danmu.config.area.end-e.danmu.config.area.start)),e.container=t;var o=e.danmu.config.channelSize||(/mobile/gi.test(navigator.userAgent)?10:12),i=void 0;i="b2t"===e.direction?Math.floor(e.width/o):Math.floor(e.height/o);for(var r=[],a=0;a0&&["scroll","top","bottom"].forEach((function(t){for(var e=0;e=0&&o.danmu.config.area.end>=o.danmu.config.area.start&&("b2t"===o.direction?o.width=o.width*(o.danmu.config.area.end-o.danmu.config.area.start):o.height=o.height*(o.danmu.config.area.end-o.danmu.config.area.start)),o.container=n;var r=o.danmu.config.channelSize||(/mobile/gi.test(navigator.userAgent)?10:12),a=void 0;a="b2t"===o.direction?Math.floor(o.width/r):Math.floor(o.height/r);for(var s=[],u=0;u100?200:u.width/10));return n.realTime&&(l=0),o.el.style.left=u.width+l+"px",o.containerPos=u,o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"attach",value:function(){if(this.container.appendChild(this.el),this.elPos=this.el.getBoundingClientRect(),"b2t"===this.direction?(this.width=this.elPos.height,this.height=this.elPos.width):(this.width=this.elPos.width,this.height=this.elPos.height),this.moveV){var t=this.containerPos;this.duration=(t.width+this.width)/this.moveV*1e3}this.danmu.config.mouseControl&&this.el.addEventListener("mouseover",this.mouseoverFun.bind(this))}},{key:"mouseoverFun",value:function(t){this.danmu.mouseControl&&this.danmu.config.mouseControlPause||"waiting"===this.status||"end"===this.status||this.danmu.emit("bullet_hover",{bullet:this,event:t})}},{key:"detach",value:function(){this.container&&this.el&&this.domObj.unuse(this.el),this.danmu.off("changeDirection",this.onChangeDirection)}},{key:"topInit",value:function(){if(this.logger.info("topInit #"+(this.options.txt||"[DOM Element]")+"#"),"b2t"===this.direction){var t=this.containerPos;this.el.style.transformOrigin="left top",this.el.style.transform="translateX(-"+this.top+"px) translateY("+t.height+"px) translateZ(0px) rotate(90deg)",this.el.style.transition="transform 0s linear 0s"}else this.el.style.top=this.top+"px"}},{key:"pauseMove",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.logger.info("pauseMove #"+(this.options.txt||"[DOM Element]")+"#");var n=this;if("paused"!==this.status&&("forcedPause"!==n.status&&(this.status="paused"),clearTimeout(n.removeTimer),this.el))if(this.el.style.willChange="auto","scroll"===this.mode){if(e){var o=((new Date).getTime()-n.moveTime)/1e3,i=o*this.moveV,r=0;r=n.moveMoreS-i>=0?"b2t"===this.direction?(n.moveMoreS-i)/n.moveContainerHeight*t.height:(n.moveMoreS-i)/n.moveContainerWidth*t.width:n.moveMoreS-i,"b2t"===this.direction?this.el.style.transform="translateX(-"+this.top+"px) translateY("+r+"px) translateZ(0px) rotate(90deg)":this.el.style.left=r+"px"}else"b2t"===this.direction?this.el.style.transform="translateX(-"+this.top+"px) translateY("+(this.el.getBoundingClientRect().top-t.top)+"px) translateZ(0px) rotate(90deg)":this.el.style.left=this.el.getBoundingClientRect().left-t.left+"px";"b2t"===this.direction||(this.el.style.transform="translateX(0px) translateY(0px) translateZ(0px)"),this.el.style.transition="transform 0s linear 0s"}else this.pastDuration&&this.startTime?this.pastDuration=this.pastDuration+(new Date).getTime()-this.startTime:this.pastDuration=1}},{key:"startMove",value:function(t,e){this.logger.info("startMove #"+(this.options.txt||"[DOM Element]")+"#");var n=this;if(n.hasMove||(n.danmu.emit("bullet_start",n),n.hasMove=!0),("forcedPause"!==n.status||e)&&this.el&&"start"!==this.status)if(this.status="start",this.el.style.willChange="transform","scroll"===this.mode)if("b2t"===this.direction){this.moveV=(t.height+this.height)/this.duration*1e3;var o=(n.el.getBoundingClientRect().bottom-t.top)/this.moveV;this.el.style.transition="transform "+o+"s linear 0s",this.startMoveTimer=setTimeout((function(){n.el&&(n.el.style.transform="translateX(-"+n.top+"px) translateY(-"+n.height+"px) translateZ(0px) rotate(90deg)",n.moveTime=(new Date).getTime(),n.moveMoreS=n.el.getBoundingClientRect().top-t.top,n.moveContainerHeight=t.height,n.removeTimer=setTimeout(a,1e3*o))}),20)}else{this.moveV=(t.width+this.width)/this.duration*1e3;var i=(n.el.getBoundingClientRect().right-t.left)/this.moveV;this.el.style.transition="transform "+i+"s linear 0s",this.startMoveTimer=setTimeout((function(){n.el&&(n.el.style.transform="translateX(-"+(n.el.getBoundingClientRect().right-t.left)+"px) translateY(0px) translateZ(0px)",n.moveTime=(new Date).getTime(),n.moveMoreS=n.el.getBoundingClientRect().left-t.left,n.moveContainerWidth=t.width,n.removeTimer=setTimeout(a,1e3*i))}),20)}else{this.el.style.left="50%",this.el.style.margin="0 0 0 -"+this.width/2+"px",this.pastDuration||(this.pastDuration=1);var r=this.duration>=this.pastDuration?this.duration-this.pastDuration:0;this.removeTimer=setTimeout(a,r),this.startTime=(new Date).getTime()}function a(){if(n.el)if("scroll"===n.mode){var t=n.containerPos,e=n.el.getBoundingClientRect();"b2t"===n.direction?e&&e.bottom<=t.top+100?(n.status="end",n.remove()):(n.pauseMove(t),"paused"!==n.danmu.bulletBtn.main.status&&n.startMove(t)):e&&e.right<=t.left+100?(n.status="end",n.remove()):(n.pauseMove(t),"paused"!==n.danmu.bulletBtn.main.status&&n.startMove(t))}else n.status="end",n.remove()}}},{key:"remove",value:function(){this.logger.info("remove #"+(this.options.txt||"[DOM Element]")+"#");(this.removeTimer&&clearTimeout(this.removeTimer),this.startMoveTimer&&clearTimeout(this.startMoveTimer),this.el&&this.el.parentNode)&&(this.el.style.willChange="auto",this.danmu.off("changeDirection",this.onChangeDirection),this.domObj.unuse(this.el),this.el.parentNode.removeChild(this.el),this.el=null,this.danmu.emit("bullet_remove",{bullet:this}))}},{key:"setFontSize",value:function(t){this.el&&(this.el.style.fontSize=t)}},{key:"setLikeDom",value:function(t,e){if(t){Object.keys(e).forEach((function(n){t.style[n]=e[n]}));if(t.className="danmu-like",this.el){var n=this.el.querySelector(".danmu-like");n&&this.el.removeChild(n),this.el.innerHTML=""+this.el.innerHTML+t.outerHTML}}return t}}]),e}(i.default);e.default=s,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n*{position:absolute;white-space:nowrap}.danmu-switch{width:32px;height:20px;border-radius:100px;background-color:#ccc;-webkit-box-sizing:border-box;box-sizing:border-box;outline:none;cursor:pointer;position:relative;text-align:center;margin:10px auto}.danmu-switch.danmu-switch-active{padding-left:12px;background-color:#f85959}.danmu-switch span.txt{width:20px;height:20px;line-height:20px;text-align:center;display:block;border-radius:100px;background-color:#ffffff;-webkit-box-shadow:-2px 0 0 0 rgba(0, 0, 0, .04);box-shadow:-2px 0 0 0 rgba(0, 0, 0, .04);font-family:PingFangSC;font-size:10px;font-weight:500;color:#f44336}\n",""])},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n=t[1]||"",o=t[3];if(!o)return n;if(e&&"function"==typeof btoa){var i=(a=o,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),r=o.sources.map((function(t){return"/*# sourceURL="+o.sourceRoot+t+" */"}));return[n].concat(r).concat([i]).join("\n")}var a;return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n})).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var o={},i=0;i=0&&f.splice(e,1)}function v(t){var e=document.createElement("style");return void 0===t.attrs.type&&(t.attrs.type="text/css"),b(e,t.attrs),m(t,e),e}function b(t,e){Object.keys(e).forEach((function(n){t.setAttribute(n,e[n])}))}function y(t,e){var n,o,i,r;if(e.transform&&t.css){if(!(r=e.transform(t.css)))return function(){};t.css=r}if(e.singleton){var a=c++;n=l||(l=v(e)),o=k.bind(null,n,a,!1),i=k.bind(null,n,a,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",b(e,t.attrs),m(t,e),e}(e),o=x.bind(null,n,e),i=function(){g(n),n.href&&URL.revokeObjectURL(n.href)}):(n=v(e),o=O.bind(null,n),i=function(){g(n)});return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else i()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=a()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=p(t,e);return d(n,e),function(t){for(var o=[],i=0;i