/*! * artplayer-plugin-danmuku.js v5.0.1 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2023 Harvey Zack * Released under the MIT License. */ !// modules are defined as an array // [ module function, map of requires ] // // map of requires is short require name -> numeric require // // anything defined in a previous bundle is accessed via the // orig method which is the require for previous bundles function(t,e,r,n,a){/* eslint-disable no-undef */var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof o[n]&&o[n],u=i.cache||{},s="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function l(e,r){if(!u[e]){if(!t[e]){// if we cannot find the module within our internal map or // cache jump to the current global require ie. the last bundle // that was added to the page. var a="function"==typeof o[n]&&o[n];if(!r&&a)return a(e,!0);// If there are other bundles on this page the require from the // previous one is saved to 'previousRequire'. Repeat this as // many times as there are bundles until the module is found or // we exhaust the require chain. if(i)return i(e,!0);// Try the node require function if it exists. if(s&&"string"==typeof e)return s(e);var c=Error("Cannot find module '"+e+"'");throw c.code="MODULE_NOT_FOUND",c}f.resolve=function(r){var n=t[e][1][r];return null!=n?n:r},f.cache={};var p=u[e]=new l.Module(e);t[e][0].call(p.exports,f,p,p.exports,this)}return u[e].exports;function f(t){var e=f.resolve(t);return!1===e?{}:l(e)}}l.isParcelRequire=!0,l.Module=function(t){this.id=t,this.bundle=l,this.exports={}},l.modules=t,l.cache=u,l.parent=i,l.register=function(e,r){t[e]=[function(t,e){e.exports=r},{}]},Object.defineProperty(l,"root",{get:function(){return o[n]}}),o[n]=l;for(var c=0;c=5,"Artplayer.js@".concat(n," 不兼容该弹幕库,请更新到 Artplayer.js@5.x.x 版本以上"));var r,n,a,i=new o.default(e,t);return(0,u.default)(e,i),t.heatmap&&(0,l.default)(e,i,t.heatmap),{name:"artplayerPluginDanmuku",emit:i.emit.bind(i),load:i.load.bind(i),config:i.config.bind(i),hide:i.hide.bind(i),show:i.show.bind(i),reset:i.reset.bind(i),get option(){return i.option},get isHide(){return i.isHide},get isStop(){return i.isStop}}}}c.env="production",c.version="5.0.1",c.build="2023-11-23 23:22:00","undefined"!=typeof window&&(window.artplayerPluginDanmuku=c)},{"./danmuku":"jgffw","./setting":"d3V7t","./heatmap":"dXFn2","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],jgffw:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return d});var a=t("@swc/helpers/_/_async_to_generator"),o=t("@swc/helpers/_/_class_call_check"),i=t("@swc/helpers/_/_create_class"),u=t("@swc/helpers/_/_object_spread"),s=t("@swc/helpers/_/_object_spread_props"),l=t("@swc/helpers/_/_ts_generator"),c=t("./bilibili"),p=t("./getDanmuTop"),f=n.interopDefault(p),d=/*#__PURE__*/function(){function e(r,n){(0,o._)(this,e);var a=r.constructor,i=r.template;if(this.utils=a.utils,this.validator=a.validator,this.$danmuku=i.$danmuku,this.$player=i.$player,this.art=r,this.danmus=[],this.queue=[],this.option={},this.$refs=[],this.isStop=!1,this.isHide=!1,this.timer=null,this.config(n),this.option.useWorker)try{this.worker=new Worker(t("e55e9b30c441298a"))}catch(t){// }this.start=this.start.bind(this),this.stop=this.stop.bind(this),this.reset=this.reset.bind(this),this.destroy=this.destroy.bind(this),r.on("video:play",this.start),r.on("video:playing",this.start),r.on("video:pause",this.stop),r.on("video:waiting",this.stop),r.on("resize",this.reset),r.on("destroy",this.destroy),this.load()}return(0,i._)(e,[{key:"isRotate",get:function(){return this.art.plugins.autoOrientation&&this.art.plugins.autoOrientation.state}},{key:"marginTop",get:function(){var t=this.utils.clamp,r=this.option.margin[0],n=this.$player.clientHeight;return"number"==typeof r?t(r,0,n):"string"==typeof r&&r.endsWith("%")?t(n*(parseFloat(r)/100),0,n):e.option.margin[0]}},{key:"marginBottom",get:function(){var t=this.utils.clamp,r=this.option.margin[1],n=this.$player.clientHeight;return"number"==typeof r?t(r,0,n):"string"==typeof r&&r.endsWith("%")?t(n*(parseFloat(r)/100),0,n):e.option.margin[1]}},{key:"filter",value:function(t,e){return this.queue.filter(function(e){return e.$state===t}).map(e)}},{key:"getLeft",value:function(t){var e=t.getBoundingClientRect();return this.isRotate?e.top:e.left}},{key:"getRef",value:function(){var t=this.$refs.pop();if(t)return t;var 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}},{key:"getReady",value:function(){var t=this.art.currentTime;return this.queue.filter(function(e){return"ready"===e.$state||"wait"===e.$state&&t+.1>=e.time&&e.time>=t-.1})}},{key:"getEmits",value:function(){var t=this,e=[],r=this.$player.clientWidth,n=this.getLeft(this.$player);return this.filter("emit",function(a){var o=a.$ref.offsetTop,i=t.getLeft(a.$ref)-n,u=a.$ref.clientHeight,s=a.$ref.clientWidth,l=i+s,c=r-l,p=l/a.$restTime,f={};f.top=o,f.left=i,f.height=u,f.width=s,f.right=c,f.speed=p,f.distance=l,f.time=a.$restTime,f.mode=a.mode,e.push(f)}),e}},{key:"getFontSize",value:function(t){var r=this.utils.clamp,n=this.$player.clientHeight;return"number"==typeof t?r(t,12,n):"string"==typeof t&&t.endsWith("%")?r(n*(parseFloat(t)/100),12,n):e.option.fontSize}},{key:"postMessage",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this;return new Promise(function(r){e.option.useWorker&&e.worker&&e.worker.postMessage?(t.id=Date.now(),e.worker.postMessage(t),e.worker.onmessage=function(e){var n=e.data;n.id===t.id&&r(n)}):r({top:(0,f.default)(t)})})}},{key:"load",value:function(){var t=this;return(0,a._)(function(){var e;return(0,l._)(this,function(r){switch(r.label){case 0:if(r.trys.push([0,8,,9]),"function"!=typeof t.option.danmuku)return[3,2];return[4,t.option.danmuku()];case 1:case 3:case 5:return t.danmus=r.sent(),[3,7];case 2:if("function"!=typeof t.option.danmuku.then)return[3,4];return[4,t.option.danmuku];case 4:if("string"!=typeof t.option.danmuku)return[3,6];return[4,(0,c.bilibiliDanmuParseFromUrl)(t.option.danmuku)];case 6:t.danmus=t.option.danmuku,r.label=7;case 7:return t.utils.errorHandle(Array.isArray(t.danmus),"Danmuku need return an array as result"),t.art.emit("artplayerPluginDanmuku:loaded",t.danmus),t.queue=[],t.$danmuku.innerText="",t.danmus.forEach(function(e){return t.emit(e)}),[3,9];case 8:throw e=r.sent(),t.art.emit("artplayerPluginDanmuku:error",e),e;case 9:return[2,t]}})})()}},{key:"config",value:function(t){var r=this.utils.clamp;return this.option=Object.assign({},e.option,this.option,t),this.validator(this.option,e.scheme),this.option.speed=r(this.option.speed,1,10),this.option.opacity=r(this.option.opacity,0,1),this.option.lockTime=r(Math.floor(this.option.lockTime),0,60),this.option.maxLength=r(this.option.maxLength,0,500),this.option.minWidth=r(this.option.minWidth,0,500),this.option.maxWidth=r(this.option.maxWidth,0,1/0),t.fontSize&&(this.option.fontSize=this.getFontSize(this.option.fontSize),this.reset()),this.art.emit("artplayerPluginDanmuku:config",this.option),this}},{key:"makeWait",value:function(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)}},{key:"continue",value:function(){var t=this.$player.clientWidth;return this.filter("stop",function(e){if(e.$state="emit",e.$lastStartTime=Date.now(),0===e.mode){var r=t+e.$ref.clientWidth;e.$ref.style.transform="translateX(".concat(-r,"px)"),e.$ref.style.transition="transform ".concat(e.$restTime,"s linear 0s")}}),this}},{key:"suspend",value:function(){var t=this,e=this.$player.clientWidth;return this.filter("emit",function(r){if(r.$state="stop",0===r.mode){var n=e-(t.getLeft(r.$ref)-t.getLeft(t.$player));r.$ref.style.transform="translateX(".concat(-n,"px)"),r.$ref.style.transition="transform 0s linear 0s"}}),this}},{key:"reset",value:function(){var t=this;return this.queue.forEach(function(e){return t.makeWait(e)}),this}},{key:"update",value:function(){var t=this;return this.timer=window.requestAnimationFrame(/*#__PURE__*/(0,a._)(function(){var e,r,n,a,o,i,u,s,c;return(0,l._)(this,function(l){switch(l.label){case 0:if(!(t.art.playing&&!t.isHide))return[3,4];t.filter("emit",function(e){var r=(Date.now()-e.$lastStartTime)/1e3;e.$restTime-=r,e.$lastStartTime=Date.now(),e.$restTime<=0&&t.makeWait(e)}),e=t.getReady(),n=(r=t.$player).clientWidth,a=r.clientHeight,o=0,l.label=1;case 1:if(!(oe.indexOf(n)&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(t);ae.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(t,n[a])&&(r[n[a]]=t[n[a]]);return r}function l(t,e,r,n){var a,o=arguments.length,i=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,r,n);else for(var u=t.length-1;u>=0;u--)(a=t[u])&&(i=(o<3?a(i):o>3?a(e,r,i):a(e,r))||i);return o>3&&i&&Object.defineProperty(e,r,i),i}function c(t,e){return function(r,n){e(r,n,t)}}function p(t,e,r,n,a,o){function i(t){if(void 0!==t&&"function"!=typeof t)throw TypeError("Function expected");return t}for(var u,s=n.kind,l="getter"===s?"get":"setter"===s?"set":"value",c=!e&&t?n.static?t:t.prototype:null,p=e||(c?Object.getOwnPropertyDescriptor(c,n.name):{}),f=!1,d=r.length-1;d>=0;d--){var m={};for(var h in n)m[h]="access"===h?{}:n[h];for(var h in n.access)m.access[h]=n.access[h];m.addInitializer=function(t){if(f)throw TypeError("Cannot add initializers after decoration has completed");o.push(i(t||null))};var y=(0,r[d])("accessor"===s?{get:p.get,set:p.set}:p[l],m);if("accessor"===s){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw TypeError("Object expected");(u=i(y.get))&&(p.get=u),(u=i(y.set))&&(p.set=u),(u=i(y.init))&&a.unshift(u)}else(u=i(y))&&("field"===s?a.unshift(u):p[l]=u)}c&&Object.defineProperty(c,n.name,p),f=!0}function f(t,e,r){for(var n=arguments.length>2,a=0;a0&&a[a.length-1])&&(6===u[0]||2===u[0])){i=0;continue}if(3===u[0]&&(!a||u[1]>a[0]&&u[1]=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function k(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,a,o=r.call(t),i=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)i.push(n.value)}catch(t){a={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(a)throw a.error}}return i}function x(){for(var t=[],e=0;e1||u(t,e)})})}function u(t,e){try{var r;(r=a[t](e)).value instanceof j?Promise.resolve(r.value.v).then(s,l):c(o[0][2],r)}catch(t){c(o[0][3],t)}}function s(t){u("next",t)}function l(t){u("throw",t)}function c(t,e){t(e),o.shift(),o.length&&u(o[0][0],o[0][1])}}function C(t){var e,r;return e={},n("next"),n("throw",function(t){throw t}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(n,a){e[n]=t[n]?function(e){return(r=!r)?{value:j(t[n](e)),done:!1}:a?a(e):e}:a}}function O(t){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t=b(t),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(r){e[r]=t[r]&&function(e){return new Promise(function(n,a){!function(t,e,r,n){Promise.resolve(n).then(function(e){t({value:e,done:r})},e)}(n,a,(e=t[r](e)).done,e.value)})}}}function B(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var $=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e};function F(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&v(e,t,r);return $(e,t),e}function A(t){return t&&t.__esModule?t:{default:t}}function P(t,e,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(t):n?n.value:e.get(t)}function M(t,e,r,n,a){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!a)throw TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!a:!e.has(t))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?a.call(t,r):a?a.value=r:e.set(t,r),r}function T(t,e){if(null===e||"object"!=typeof e&&"function"!=typeof e)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof t?e===t:t.has(e)}function W(t,e,r){if(null!=e){var n;if("object"!=typeof e&&"function"!=typeof e)throw TypeError("Object expected.");if(r){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");n=e[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");n=e[Symbol.dispose]}if("function"!=typeof n)throw TypeError("Object not disposable.");t.stack.push({value:e,dispose:n,async:r})}else r&&t.stack.push({async:!0});return e}var E="function"==typeof SuppressedError?SuppressedError:function(t,e,r){var n=Error(r);return n.name="SuppressedError",n.error=t,n.suppressed=e,n};function H(t){function e(e){t.error=t.hasError?new E(e,t.error,"An error was suppressed during disposal."):e,t.hasError=!0}return function r(){for(;t.stack.length;){var n=t.stack.pop();try{var a=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(a).then(r,function(t){return e(t),r()})}catch(t){e(t)}}if(t.hasError)throw t.error}()}r.default={__extends:i,__assign:u,__rest:s,__decorate:l,__param:c,__metadata:h,__awaiter:y,__generator:g,__createBinding:v,__exportStar:_,__values:b,__read:k,__spread:x,__spreadArrays:w,__spreadArray:D,__await:j,__asyncGenerator:S,__asyncDelegator:C,__asyncValues:O,__makeTemplateObject:B,__importStar:F,__importDefault:A,__classPrivateFieldGet:P,__classPrivateFieldSet:M,__classPrivateFieldIn:T,__addDisposableResource:W,__disposeResources:H}},{"@swc/helpers/_/_type_of":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],felZi:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function a(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t}n.defineInteropFlag(r),n.export(r,"_type_of",function(){return a}),n.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],kMsXR:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function a(t){switch(t){case 1:case 2:case 3:default:return 0;case 4:case 5:return 1}}function o(t){return"string"!=typeof t?[]:Array.from(t.matchAll(RegExp('(?.+?)<\\/d>',"gs"))).map(function(t){var e=t.groups.p.split(",");return e.length>=8?{text:t.groups.text.trim().replaceAll(""",'"').replaceAll("'","'").replaceAll("<","<").replaceAll(">",">").replaceAll("&","&"),time:Number(e[0]),mode:a(Number(e[1])),fontSize:Number(e[2]),color:"#".concat(Number(e[3]).toString(16)),timestamp:Number(e[4]),pool:Number(e[5]),userID:e[6],rowID:Number(e[7])}:null}).filter(Boolean)}function i(t){return fetch(t).then(function(t){return t.text()}).then(function(t){return o(t)})}n.defineInteropFlag(r),n.export(r,"getMode",function(){return a}),n.export(r,"bilibiliDanmuParseFromXml",function(){return o}),n.export(r,"bilibiliDanmuParseFromUrl",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],fdr65:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return o});var a=t("@swc/helpers/_/_to_consumable_array");function o(t){var e=t.target,r=t.emits,n=t.clientWidth,o=t.clientHeight,i=t.marginBottom,u=t.marginTop,s=t.antiOverlap,l=r.filter(function(t){return t.mode===e.mode&&t.top<=o-i}).sort(function(t,e){return t.top-e.top});if(0===l.length)return u;l.unshift({top:0,left:0,right:0,height:u,width:n,speed:0,distance:n}),l.push({top:o-i,left:0,right:0,height:i,width:n,speed:0,distance:n});for(var c=1;c=e.height)return d}for(var m=[],h=1;ht.time)})});return v&&v[0]?v[0].top:void 0;case 1:return}else{switch(e.mode){case 0:m.sort(function(t,e){var r,n,o=(r=Math).min.apply(r,(0,a._)(e.map(function(t){return t.right}))),i=(n=Math).min.apply(n,(0,a._)(t.map(function(t){return t.right})));return o*e.length-i*t.length});break;case 1:m.sort(function(t,e){var r,n,o=(r=Math).max.apply(r,(0,a._)(e.map(function(t){return t.width})));return(n=Math).max.apply(n,(0,a._)(t.map(function(t){return t.width})))*t.length-o*e.length})}return m[0][0].top}}},{"@swc/helpers/_/_to_consumable_array":"iwLF0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iwLF0:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_to_consumable_array",function(){return s}),n.export(r,"_",function(){return s});var a=t("./_array_without_holes.js"),o=t("./_iterable_to_array.js"),i=t("./_non_iterable_spread.js"),u=t("./_unsupported_iterable_to_array.js");function s(t){return(0,a._array_without_holes)(t)||(0,o._iterable_to_array)(t)||(0,u._unsupported_iterable_to_array)(t)||(0,i._non_iterable_spread)()}},{"./_array_without_holes.js":"cuL6A","./_iterable_to_array.js":"2thrs","./_non_iterable_spread.js":"a8nO2","./_unsupported_iterable_to_array.js":"5m31D","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cuL6A:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_array_without_holes",function(){return o}),n.export(r,"_",function(){return o});var a=t("./_array_like_to_array.js");function o(t){if(Array.isArray(t))return(0,a._array_like_to_array)(t)}},{"./_array_like_to_array.js":"djwRR","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],djwRR:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r')}),i=h(a,'
模式
滚动
静止
颜色
').concat(n.join(""),'
发送
')),u=v(".art-danmuku-style",i),s=v(".art-danmuku-input",i),l=v(".art-danmuku-send",i),c=v(".art-danmuku-style-panel-inner",i),p=v(".art-danmuku-style-panel-modes",i),d=v(".art-danmuku-style-panel-colors",i),g=r.mount||h(o,'
');t.option.backdrop&&m(c,"art-backdrop-filter"),r.theme&&m(i,"art-danmuku-theme-".concat(r.theme));var b=null,k=r.mode,x=r.color;function w(){var n={mode:k,color:x,border:!0,text:s.value.trim()};null===b&&r.beforeEmit(n)&&(s.value="",e.emit(n),m(l,"art-disabled"),function t(e){e<=0?(b=null,l.innerText="发送",f(l,"art-disabled")):(l.innerText=e,b=setTimeout(function(){return t(e-1)},1e3))}(r.lockTime),t.emit("artplayerPluginDanmuku:emit",n))}function j(){a.clientWidth0&&void 0!==arguments[0]?arguments[0]:[];if(s=null,l=null,u.innerHTML="",t.duration&&!t.option.isLive){var d={w:u.offsetWidth,h:u.offsetHeight},m={xMin:0,xMax:d.w,yMin:0,yMax:128,scale:.25,opacity:.2,minHeight:Math.floor(.05*d.h),sampling:Math.floor(d.w/100),smoothing:.2,flattening:.2};"object"==typeof r&&Object.assign(m,r);var h=[];if(Array.isArray(f)&&f.length)h=(0,a._)(f);else for(var y=function(t){var r=e.danmus.filter(function(e){var r=e.time;return r>t*g&&r<=(t+m.sampling)*g}).length;h.push([t,r])},g=t.duration/d.w,v=0;v<=d.w;v+=m.sampling)y(v);if(0!==h.length){var _=h[h.length-1],b=_[0],k=_[1];b!==d.w&&h.push([d.w,k]);for(var x=h.map(function(t){return t[1]}),w=((c=Math).min.apply(c,(0,a._)(x))+(p=Math).max.apply(p,(0,a._)(x)))/2,D=0;Dw?1+m.scale:1-m.scale)+m.minHeight}var C=function(t,e,r,n){var a=i(e||t,r||t),u=o.map(Math.cos(a.angle)*m.flattening,0,1,1,0),s=a.angle*u+(n?Math.PI:0),l=a.length*m.smoothing;return[t[0]+Math.cos(s)*l,t[1]+Math.sin(s)*l]},O=function(t,e,r){var n=C(r[e-1],r[e-2],t),a=C(t,r[e-1],r[e+1],!0),o=e===r.length-1?" z":"";return"C ".concat(n[0],",").concat(n[1]," ").concat(a[0],",").concat(a[1]," ").concat(t[0],",").concat(t[1]).concat(o)},B=h.map(function(t){return[o.map(t[0],m.xMin,m.xMax,0,d.w),o.map(t[1],m.yMin,m.yMax,d.h,0)]}).reduce(function(t,e,r,n){return 0===r?"M ".concat(n[n.length-1][0],",").concat(d.h," L ").concat(e[0],",").concat(d.h," L ").concat(e[0],",").concat(e[1]):"".concat(t," ").concat(O(e,r,n))},"");u.innerHTML=''),s=n("#heatmap-start",u),l=n("#heatmap-stop",u),s.setAttribute("offset","".concat(100*t.played,"%")),l.setAttribute("offset","".concat(100*t.played,"%"))}}}t.on("video:timeupdate",function(){s&&l&&(s.setAttribute("offset","".concat(100*t.played,"%")),l.setAttribute("offset","".concat(100*t.played,"%")))}),t.on("setBar",function(t,e){s&&l&&"played"===t&&(s.setAttribute("offset","".concat(100*e,"%")),l.setAttribute("offset","".concat(100*e,"%")))}),t.on("ready",function(){return c()}),t.on("resize",function(){return c()}),t.on("artplayerPluginDanmuku:loaded",function(){return c()}),t.on("artplayerPluginDanmuku:points",function(t){return c(t)})}})}},{"@swc/helpers/_/_to_consumable_array":"iwLF0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}]},["40mNk"],"40mNk","parcelRequire4dc0");